- Timestamp:
- Feb 3, 2006, 12:29:57 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/globals.h
r6997 r6998 74 74 #define CONFIG_NAME_PLAYER_ROLL_RIGHT "RollR" 75 75 #define CONFIG_NAME_PLAYER_ROLL_LEFT "RollL" 76 #define CONFIG_NAME_PLAYER_UP "Up" 77 #define CONFIG_NAME_PLAYER_DOWN "Down" 76 78 77 79 #define CONFIG_NAME_PLAYER_FIRE "Fire" 78 80 #define CONFIG_NAME_PLAYER_NEXT_WEAPON "Next" 79 81 #define CONFIG_NAME_PLAYER_PREV_WEAPON "Prev" 82 #define CONFIG_NAME_PLAYER_CHANGE_SHIP "Change_Ship" 83 80 84 #define CONFIG_NAME_QUIT "Quit" 81 85 #define CONFIG_NAME_PAUSE "Pause" -
trunk/src/lib/event/key_mapper.cc
r6997 r6998 37 37 int KeyMapper::PEV_LEFT = EV_UNKNOWN; 38 38 int KeyMapper::PEV_RIGHT = EV_UNKNOWN; 39 int KeyMapper::PEV_UP = EV_UNKNOWN; 40 int KeyMapper::PEV_DOWN = EV_UNKNOWN; 39 41 int KeyMapper::PEV_ROLL_LEFT = EV_UNKNOWN; 40 42 int KeyMapper::PEV_ROLL_RIGHT = EV_UNKNOWN; … … 46 48 int KeyMapper::PEV_PREVIOUS_WEAPON = EV_UNKNOWN; 47 49 int KeyMapper::PEV_NEXT_WEAPON = EV_UNKNOWN; 50 51 int KeyMapper::PEV_CHANGE_SHIP = EV_UNKNOWN; 48 52 49 53 int KeyMapper::PEV_VIEW0 = EV_UNKNOWN; … … 67 71 */ 68 72 orxKeyMapping map[] = { 69 {&KeyMapper::PEV_FORWARD, CONFIG_NAME_PLAYER_FORWARD}, 70 {&KeyMapper::PEV_BACKWARD, CONFIG_NAME_PLAYER_BACKWARD}, 73 {&KeyMapper::PEV_FORWARD, CONFIG_NAME_PLAYER_FORWARD}, 74 {&KeyMapper::PEV_BACKWARD, CONFIG_NAME_PLAYER_BACKWARD}, 75 {&KeyMapper::PEV_UP, CONFIG_NAME_PLAYER_UP}, 76 {&KeyMapper::PEV_DOWN, CONFIG_NAME_PLAYER_DOWN}, 71 77 {&KeyMapper::PEV_LEFT, CONFIG_NAME_PLAYER_LEFT}, 72 78 {&KeyMapper::PEV_RIGHT, CONFIG_NAME_PLAYER_RIGHT}, … … 81 87 {&KeyMapper::PEV_NEXT_WEAPON, CONFIG_NAME_PLAYER_NEXT_WEAPON}, 82 88 {&KeyMapper::PEV_PREVIOUS_WEAPON, CONFIG_NAME_PLAYER_PREV_WEAPON}, 89 90 {&KeyMapper::PEV_CHANGE_SHIP, CONFIG_NAME_PLAYER_CHANGE_SHIP}, 83 91 84 92 -
trunk/src/lib/event/key_mapper.h
r6997 r6998 43 43 static int PEV_LEFT; //!< left button 44 44 static int PEV_RIGHT; //!< right button 45 static int PEV_UP; //!< up button 46 static int PEV_DOWN; //!< down button 45 47 46 48 static int PEV_ROLL_LEFT; //!< rolls left … … 54 56 static int PEV_PREVIOUS_WEAPON; //!< prev weapon button 55 57 static int PEV_NEXT_WEAPON; //!< next weapon button 58 59 static int PEV_CHANGE_SHIP; //!< The button to change the Ship. 56 60 57 61 static int PEV_VIEW0; //!< view 0 button -
trunk/src/lib/gui/gtk_gui/gui_keys.cc
r6997 r6998 119 119 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "a")); 120 120 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "d")); 121 122 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "r")); 123 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "f")); 121 124 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_ROLL_LEFT, "q")); 122 125 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_ROLL_RIGHT, "e")); 126 123 127 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FIRE, "BUTTON_LEFT")); 124 128 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_NEXT_WEAPON, "m")); 125 129 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_PREV_WEAPON, "n")); 130 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_CHANGE_SHIP, "g")); 126 131 closeButton = new Button("close"); 127 132 #ifdef HAVE_GTK2 -
trunk/src/world_entities/player.cc
r6987 r6998 40 40 this->hud.show(); 41 41 42 EventHandler::getInstance()->subscribe(this, ES_GAME, SDLK_l);42 EventHandler::getInstance()->subscribe(this, ES_GAME, KeyMapper::PEV_CHANGE_SHIP); 43 43 } 44 44 … … 98 98 void Player::process(const Event &event) 99 99 { 100 if (event.type == SDLK_l&& event.bPressed)100 if (event.type == KeyMapper::PEV_CHANGE_SHIP && event.bPressed) 101 101 { 102 102 /// FIXME this should be in the ObjectManager -
trunk/src/world_entities/space_ships/hover.cc
r6997 r6998 145 145 registerEvent(KeyMapper::PEV_LEFT); 146 146 registerEvent(KeyMapper::PEV_RIGHT); 147 registerEvent( SDLK_e); /// FIXME148 registerEvent( SDLK_c); /// FIXME147 registerEvent(KeyMapper::PEV_UP); 148 registerEvent(KeyMapper::PEV_DOWN); 149 149 registerEvent(KeyMapper::PEV_FIRE1); 150 150 registerEvent(KeyMapper::PEV_NEXT_WEAPON); … … 362 362 else if( event.type == KeyMapper::PEV_RIGHT) 363 363 this->bRight = event.bPressed; 364 else if( event.type == SDLK_e)364 else if( event.type == KeyMapper::PEV_UP) 365 365 this->bAscend = event.bPressed; //this->shiftCoor(0,.1,0); 366 else if( event.type == SDLK_c)366 else if( event.type == KeyMapper::PEV_DOWN) 367 367 this->bDescend = event.bPressed; //this->shiftCoor(0,-.1,0); 368 368 else if( event.type == KeyMapper::PEV_FORWARD)
Note: See TracChangeset
for help on using the changeset viewer.