Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4398 in orxonox.OLD for orxonox/trunk/src/util/event/key_mapper.cc


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

orxonox/trunk: moved the keynames strucure to a place closer to util/event, some small tests

File:
1 edited

Legend:

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

    r4389 r4398  
    101101  while( parser.nextVar (namebuf, valuebuf) != -1)
    102102    {
    103       //index = nameToIndex (valuebuf);
    104       int c;
    105       if( (c = keynameToSDLK (valuebuf)) != -1)
    106         {
    107           index[1] = c; index[0] = 0;
    108         }
    109       if( (c = buttonnameToSDLB (valuebuf)) != -1)
    110         {
    111           index[1] = c; index[0] = 1;
    112         }
     103      PRINTF(0)("Keys: Parsing %s, %s now.\n", namebuf, valuebuf);
     104      index = nameToIndex (valuebuf);
    113105
    114106      switch( index[0])
     
    139131  while( parser.nextVar (namebuf, valuebuf) != -1)
    140132    {
     133      PRINTF(0)("MISC: Parsing %s, %s now.\n", namebuf, valuebuf);
    141134      index = nameToIndex (valuebuf);     
    142135
     
    183176{
    184177  //PRINT(0)("\n==========================| KeyMapper::debug() |===\n"); 
    185   PRINT(0)("Command 'up' got SDL key-ref nr %i \n", (this->nameToIndex("UP"))[0]);
    186   PRINT(0)("Command 'down' got SDL key-ref nr %i \n", (this->nameToIndex("DOWN"))[0]);
    187   PRINT(0)("Command 'right' got SDL key-ref nr %i \n", (this->nameToIndex("RIGHT"))[0]);
    188   PRINT(0)("Command 'left' got SDL key-ref nr %i \n", (this->nameToIndex("LEFT"))[0]);
     178  PRINT(0)("Command 'up' got SDL key-ref nr %i \n", keynameToSDLK("UP"));
     179  PRINT(0)("Command 'down' got SDL key-ref nr %i \n", (this->nameToIndex("DOWN"))[1]);
     180  PRINT(0)("Command 'right' got SDL key-ref nr %i \n", (this->nameToIndex("RIGHT"))[1]);
     181  PRINT(0)("Command 'left' got SDL key-ref nr %i \n", (this->nameToIndex("LEFT"))[1]);
    189182
    190183  //PRINT(0)("=======================================================\n");       
Note: See TracChangeset for help on using the changeset viewer.