Changeset 4398 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- May 30, 2005, 5:01:25 PM (20 years ago)
- Location:
- orxonox/trunk/src/util/event
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/event/event_handler.cc
r4390 r4398 198 198 PRINT(0)("\n==========================| EventHandler::test () |===\n"); 199 199 PRINT(0)("Eventhandler init successfuly\n"); 200 //KeyMapper km;200 KeyMapper km; 201 201 PRINT(0)("KeyMapper loaded\n"); 202 //km.loadKeyBindings();203 //km.debug();202 km.loadKeyBindings(); 203 km.debug(); 204 204 205 205 PRINT(0)("=======================================================\n"); -
orxonox/trunk/src/util/event/key_mapper.cc
r4389 r4398 101 101 while( parser.nextVar (namebuf, valuebuf) != -1) 102 102 { 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); 113 105 114 106 switch( index[0]) … … 139 131 while( parser.nextVar (namebuf, valuebuf) != -1) 140 132 { 133 PRINTF(0)("MISC: Parsing %s, %s now.\n", namebuf, valuebuf); 141 134 index = nameToIndex (valuebuf); 142 135 … … 183 176 { 184 177 //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]); 189 182 190 183 //PRINT(0)("=======================================================\n");
Note: See TracChangeset
for help on using the changeset viewer.