Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4366 in orxonox.OLD


Ignore:
Timestamp:
May 28, 2005, 3:53:41 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: player defined keys mapping started

Location:
orxonox/trunk/src/util/event
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/event/event_def.h

    r4365 r4366  
    99
    1010#include "SDL_keysym.h"
     11
     12/*
     13int PEV_UP = 0;
     14int PEV_DOWN = 0;
     15int PEV_LEFT = 0;
     16int PEV_RIGHT = 0;
     17
     18    PEV_STRAFE_LEFT,
     19    PEV_STRAFE_RIGHT,
     20
     21    PEV_FIRE1,
     22    PEV_FIRE2,
     23
     24    PEV_VIEW1,
     25    PEV_VIEW2,
     26    PEV_VIEW3,
     27    PEV_VIEW4
     28*/
     29
     30
    1131
    1232#define CMD_LENGHT 16
     
    2949  };
    3050
     51
     52
    3153typedef enum elState
    3254  {
  • orxonox/trunk/src/util/event/event_handler.cc

    r4365 r4366  
    228228  while( SDL_PollEvent (&event))
    229229    {
    230       //memset (ev.cmd, 0, CMD_LENGHT);
    231230      switch( event.type)
    232231        {
     
    280279
    281280      /* small debug routine: shows alle events dispatched by the event handler */
    282       PRINT(0)("\n==========================| EventHandler::Process () |===\n");
     281      PRINT(0)("\n==========================| EventHandler::process () |===\n");
    283282      PRINT(0)("=  Got Event nr%i\n, for state %i", event.type, this->state); 
    284283     
  • orxonox/trunk/src/util/event/event_handler.h

    r4364 r4366  
    5151  static EventHandler* singletonRef;
    5252
     53
     54 public:
     55  /* i will make a special class for the key mappings incl ini parsing! TEMP only: */
     56  static int PEV_UP;
     57  static int PEV_DOWN;
     58  static int PEV_LEFT;
     59  static int PEV_RIGHT;
     60 
     61  static int PEV_STRAFE_LEFT;
     62  static int PEV_STRAFE_RIGHT;
     63
     64  static int PEV_FIRE1;
     65  static int PEV_FIRE2;
     66
     67  static int PEV_VIEW1;
     68  static int PEV_VIEW2;
     69  static int PEV_VIEW3;
     70  static int PEV_VIEW4;
     71
     72 private:
    5373  KeyBindings* keyAliases;
    5474  EventListener*** listeners;                         //!< a list of registered listeners
Note: See TracChangeset for help on using the changeset viewer.