Changeset 4452 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 1, 2005, 11:18:44 PM (19 years ago)
- Location:
- orxonox/trunk/src/util/event
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/event/event_listener.cc
r4346 r4452 23 23 /** 24 24 \brief standard constructor 25 \todo this constructor is not jet implemented - do it26 25 */ 27 26 EventListener::EventListener () … … 36 35 */ 37 36 EventListener::~EventListener () 38 { 39 // delete what has to be deleted here 40 } 37 {} -
orxonox/trunk/src/util/event/event_listener.h
r4404 r4452 21 21 22 22 virtual void process(const Event &event) = NULL; 23 24 private:25 26 27 23 }; 28 24 -
orxonox/trunk/src/util/event/key_mapper.cc
r4412 r4452 27 27 28 28 29 30 int KeyMapper::PEV_UP = -1;31 int KeyMapper::PEV_DOWN = -1;32 int KeyMapper::PEV_LEFT = -1;33 int KeyMapper::PEV_RIGHT = -1;34 int KeyMapper::PEV_STRAFE_LEFT = -1;35 int KeyMapper::PEV_STRAFE_RIGHT = -1;36 37 int KeyMapper::PEV_FIRE1 = -1;38 int KeyMapper::PEV_FIRE2 = -1;39 int KeyMapper::PEV_PREVIOUS_WEAPON = -1;40 int KeyMapper::PEV_NEXT_WEAPON = -1;41 42 int KeyMapper::PEV_VIEW0 = -1;43 int KeyMapper::PEV_VIEW1 = -1;44 int KeyMapper::PEV_VIEW2 = -1;45 int KeyMapper::PEV_VIEW3 = -1;46 int KeyMapper::PEV_VIEW4 = -1;47 int KeyMapper::PEV_VIEW5 = -1;48 49 int KeyMapper::PEV_NEXT_WORLD = -1;50 int KeyMapper::PEV_PREVIOUS_WORLD = -1;51 52 int KeyMapper::PEV_PAUSE = -1;53 int KeyMapper::PEV_QUIT = -1;54 55 56 57 29 /* initialize all variables to a reasonable value*/ 30 int KeyMapper::PEV_UP = EV_UNKNOWN; 31 int KeyMapper::PEV_DOWN = EV_UNKNOWN; 32 int KeyMapper::PEV_LEFT = EV_UNKNOWN; 33 int KeyMapper::PEV_RIGHT = EV_UNKNOWN; 34 int KeyMapper::PEV_STRAFE_LEFT = EV_UNKNOWN; 35 int KeyMapper::PEV_STRAFE_RIGHT = EV_UNKNOWN; 36 37 int KeyMapper::PEV_FIRE1 = EV_UNKNOWN; 38 int KeyMapper::PEV_FIRE2 = EV_UNKNOWN; 39 int KeyMapper::PEV_PREVIOUS_WEAPON = EV_UNKNOWN; 40 int KeyMapper::PEV_NEXT_WEAPON = EV_UNKNOWN; 41 42 int KeyMapper::PEV_VIEW0 = EV_UNKNOWN; 43 int KeyMapper::PEV_VIEW1 = EV_UNKNOWN; 44 int KeyMapper::PEV_VIEW2 = EV_UNKNOWN; 45 int KeyMapper::PEV_VIEW3 = EV_UNKNOWN; 46 int KeyMapper::PEV_VIEW4 = EV_UNKNOWN; 47 int KeyMapper::PEV_VIEW5 = EV_UNKNOWN; 48 49 int KeyMapper::PEV_NEXT_WORLD = EV_UNKNOWN; 50 int KeyMapper::PEV_PREVIOUS_WORLD = EV_UNKNOWN; 51 52 int KeyMapper::PEV_PAUSE = EV_UNKNOWN; 53 int KeyMapper::PEV_QUIT = EV_UNKNOWN; 54 55 56 57 //! this is the mapping array from names to ids: enter all orxonox.conf keys here 58 58 orxKeyMapping map[] = { {&KeyMapper::PEV_UP, "Up"}, 59 59 {&KeyMapper::PEV_DOWN, "Down"}, … … 85 85 86 86 87 87 88 /** 88 89 \brief standard constructor 89 \todo this constructor is not jet implemented - do it90 90 */ 91 91 KeyMapper::KeyMapper () … … 97 97 /** 98 98 \brief standard deconstructor 99 100 99 */ 101 100 KeyMapper::~KeyMapper () 102 101 { 103 // delete what has to be deleted here 104 } 105 106 \ 102 } 103 104 105 107 106 /** 108 107 \brief loads new key bindings from a file … … 185 184 186 185 187 186 /** 187 \brief this function looks up name to key index 188 \param the name of the button 189 */ 188 190 int* KeyMapper::nameToIndex (char* name) 189 191 { … … 205 207 206 208 207 209 /** 210 \brief the function maps name to key ids 211 \param name of the key 212 \param id of the key 213 */ 208 214 void KeyMapper::mapKeys(char* name, int keyID) 209 215 { … … 216 222 217 223 224 /** 225 \brief this function gives some debug information about the key mapper class 226 */ 218 227 void KeyMapper::debug() 219 228 { 220 //PRINT(0)("\n==========================| KeyMapper::debug() |===\n"); 221 229 PRINT(0)("\n==========================| KeyMapper::debug() |===\n"); 222 230 for(int i = 0; map[i].pValue != NULL; ++i) 223 231 { 224 232 PRINT(0)("%s = %i\n",map[i].pName, *map[i].pValue); 225 233 } 226 227 //PRINT(0)("=======================================================\n"); 228 } 234 PRINT(0)("=======================================================\n"); 235 } -
orxonox/trunk/src/util/event/key_mapper.h
r4412 r4452 13 13 14 14 15 16 17 15 //! A mapping from key-name to key-id 18 16 typedef struct orxKeyMapping 19 17 { … … 39 37 40 38 public: 41 static int PEV_UP; 42 static int PEV_DOWN; 43 static int PEV_LEFT; 44 static int PEV_RIGHT; 39 static int PEV_UP; //!< up button 40 static int PEV_DOWN; //!< down buttton 41 static int PEV_LEFT; //!< left button 42 static int PEV_RIGHT; //!< right button 45 43 46 static int PEV_STRAFE_LEFT; 47 static int PEV_STRAFE_RIGHT; 44 static int PEV_STRAFE_LEFT; //!< strafe left button 45 static int PEV_STRAFE_RIGHT; //!< strafe right button 48 46 49 static int PEV_FIRE1; 50 static int PEV_FIRE2; 51 static int PEV_PREVIOUS_WEAPON; 52 static int PEV_NEXT_WEAPON; 47 static int PEV_FIRE1; //!< fire button 1 48 static int PEV_FIRE2; //!< fire button 2 49 static int PEV_PREVIOUS_WEAPON; //!< prev weapon button 50 static int PEV_NEXT_WEAPON; //!< next weapon button 53 51 54 static int PEV_VIEW0; 55 static int PEV_VIEW1; 56 static int PEV_VIEW2; 57 static int PEV_VIEW3; 58 static int PEV_VIEW4; 59 static int PEV_VIEW5; 52 static int PEV_VIEW0; //!< view 0 button 53 static int PEV_VIEW1; //!< view 1 button 54 static int PEV_VIEW2; //!< view 2 button 55 static int PEV_VIEW3; //!< view 3 button 56 static int PEV_VIEW4; //!< view 4 button 57 static int PEV_VIEW5; //!< view 5 button 60 58 61 static int PEV_NEXT_WORLD; 62 static int PEV_PREVIOUS_WORLD; 59 static int PEV_NEXT_WORLD; //!< next world button 60 static int PEV_PREVIOUS_WORLD; //!< prev world button 63 61 64 static int PEV_PAUSE; 65 static int PEV_QUIT; 62 static int PEV_PAUSE; //!< pause button 63 static int PEV_QUIT; //!< quit button 66 64 67 65 private: 68 Sint32 coord[2]; 66 Sint32 coord[2]; //!< temp place to save variables in nameToIndex() function 69 67 }; 70 68
Note: See TracChangeset
for help on using the changeset viewer.