Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/util/event/key_mapper.h @ 4415

Last change on this file since 4415 was 4412, checked in by patrick, 20 years ago

orxonox/trunk: now shooting and weapon change work again

File size: 1.1 KB
Line 
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
15
16
17
18typedef struct orxKeyMapping
19{
20  int* pValue;
21  char* pName;
22};
23
24
25//! The map class functionalities
26class KeyMapper : public BaseObject {
27
28 public:
29  KeyMapper();
30  virtual ~KeyMapper();
31
32  void loadKeyBindings(const char* fileName = "~/.orxonox/orxonox.conf");
33
34  void debug();
35
36 private:
37  int* nameToIndex (char* name);
38  void mapKeys(char* name, int keyID);
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  static int PEV_PREVIOUS_WEAPON;
52  static int PEV_NEXT_WEAPON;
53
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;
60
61  static int PEV_NEXT_WORLD;
62  static int PEV_PREVIOUS_WORLD;
63
64  static int PEV_PAUSE;
65  static int PEV_QUIT;
66
67 private:
68  Sint32 coord[2];
69};
70
71
72
73
74#endif /* _KEY_MAPPER_H */
Note: See TracBrowser for help on using the repository browser.