Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4399 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 30, 2005, 5:23:30 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: key mapping alg implementation

Location:
orxonox/trunk/src/util/event
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/event/key_mapper.cc

    r4398 r4399  
    101101  while( parser.nextVar (namebuf, valuebuf) != -1)
    102102    {
    103       PRINTF(0)("Keys: Parsing %s, %s now.\n", namebuf, valuebuf);
     103      PRINTF(3)("Keys: Parsing %s, %s now.\n", namebuf, valuebuf);
    104104      index = nameToIndex (valuebuf);
    105105
     
    107107        {
    108108        case 0:
    109           PRINTF(0)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
     109          PRINTF(3)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
    110110          strcpy (this->keyAliases->keys[index[1]], namebuf);
    111111          break;
    112112        case 1:
    113           PRINTF(0)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
     113          PRINTF(3)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
    114114          strcpy (this->keyAliases->buttons[index[1]], namebuf);
    115115          break;
     
    131131  while( parser.nextVar (namebuf, valuebuf) != -1)
    132132    {
    133       PRINTF(0)("MISC: Parsing %s, %s now.\n", namebuf, valuebuf);
     133      PRINTF(3)("MISC: Parsing %s, %s now.\n", namebuf, valuebuf);
    134134      index = nameToIndex (valuebuf);     
    135135
     
    137137        {
    138138        case 0:
    139           PRINTF(0)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
     139          PRINTF(3)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf);
    140140          strcpy (keyAliases->keys[index[1]], namebuf);
    141141          break;
    142142        case 1:
    143           PRINTF(0)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
     143          PRINTF(3)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf);
    144144          strcpy (keyAliases->buttons[index[1]], namebuf);
    145145          break;
     
    173173
    174174
     175
     176void KeyMapper::mapKeys()
     177{
     178 for(int i = 0; i < N_STD_KEYS; ++i)
     179    {
     180      PRINTF(0)("Button binding array entry %i - %s\n", i, this->keyAliases->keys[i]);
     181    }
     182}
     183
     184
    175185void KeyMapper::debug()
    176186{
  • orxonox/trunk/src/util/event/key_mapper.h

    r4389 r4399  
    3939 private:
    4040  int* nameToIndex (char* name);
     41  void mapKeys();
    4142
    4243 public:
Note: See TracChangeset for help on using the changeset viewer.