Last change
on this file since 4387 was
4387,
checked in by patrick, 19 years ago
|
orxonox/trunk: little fix to prevent compile error
|
File size:
1.0 KB
|
Rev | Line | |
---|
[4367] | 1 | /*! |
---|
| 2 | \file key_mapper.h |
---|
| 3 | \brief a construct to map player defined keys to SDL keys |
---|
| 4 | |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | #ifndef _KEY_MAPPER_H |
---|
| 8 | #define _KEY_MAPPER_H |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | #include "base_object.h" |
---|
| 12 | #include "event_def.h" |
---|
| 13 | |
---|
| 14 | |
---|
[4387] | 15 | |
---|
[4386] | 16 | //! Key aliasing structure |
---|
| 17 | /** |
---|
| 18 | This structure contains the key aliasing information, e.g. the command strings that |
---|
| 19 | have been bound to the keys. |
---|
| 20 | */ |
---|
| 21 | typedef struct |
---|
| 22 | { |
---|
| 23 | char keys[N_STD_KEYS][CMD_LENGHT]; |
---|
| 24 | char buttons[N_BUTTONS][CMD_LENGHT]; |
---|
| 25 | } KeyBindings; |
---|
| 26 | |
---|
| 27 | |
---|
[4367] | 28 | //! The map class functionalities |
---|
| 29 | class KeyMapper : public BaseObject { |
---|
| 30 | |
---|
| 31 | public: |
---|
| 32 | KeyMapper(); |
---|
| 33 | virtual ~KeyMapper(); |
---|
| 34 | |
---|
[4368] | 35 | void loadKeyBindings(const char* fileName); |
---|
| 36 | |
---|
| 37 | private: |
---|
| 38 | int* nameToIndex (char* name); |
---|
| 39 | |
---|
| 40 | public: |
---|
| 41 | static int PEV_UP; |
---|
| 42 | static int PEV_DOWN; |
---|
| 43 | static int PEV_LEFT; |
---|
| 44 | static int PEV_RIGHT; |
---|
| 45 | |
---|
| 46 | static int PEV_STRAFE_LEFT; |
---|
| 47 | static int PEV_STRAFE_RIGHT; |
---|
| 48 | |
---|
| 49 | static int PEV_FIRE1; |
---|
| 50 | static int PEV_FIRE2; |
---|
| 51 | |
---|
| 52 | static int PEV_VIEW1; |
---|
| 53 | static int PEV_VIEW2; |
---|
| 54 | static int PEV_VIEW3; |
---|
| 55 | static int PEV_VIEW4; |
---|
| 56 | |
---|
| 57 | private: |
---|
| 58 | KeyBindings* keyAliases; |
---|
[4386] | 59 | Sint32 coord[2]; |
---|
[4367] | 60 | }; |
---|
| 61 | |
---|
| 62 | #endif /* _KEY_MAPPER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.