• Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About hnderk

  • Rank
  1. Changeable Input

    Thanks, but how can I do it for SDL_Event structure ? I'd like to use joystick too, it seems that is for keyboard only. [quote name='SiCrane' timestamp='1326554293' post='4902658'] Exact details depend on what programming language you are using, but there are a number of ways to do this. One way is to create a map or associative array of event objects to function pointers or function objects. Then in each event handling block invoke the functor for the received events. Alternately you can use a map of events to tokens and then have your input handling functionality dispatch tokens to game state objects. [/quote] Could you write how to use a map of events ? I tried it myself but it doesn't work.
  2. Changeable Input

    I'm using C++, could you explain it a little more with short code example ?
  3. Changeable Input

    Hi all ! I'm writing a simple 2d game using SDL. I would like my game has got a changeable input from user. For the example: left arrow on the keyboard moves sth to the left. User change it, now Joystick axis motion moves sth to the left. I have no idea how do that. Can anybody help me ?