Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4454 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Jun 1, 2005, 11:29:44 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: some more event cleanu[

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

Legend:

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

    r4404 r4454  
    2222
    2323
    24   int offset;                      //!< offset in the event type array
    25   char cmd[CMD_LENGHT];            //!< the command delivered
    26   int type;                        //!< the type field
    27   bool bPressed;                   //!< is true, if the button/mouse was pressed, false if released
     24  int      offset;                      //!< offset in the event type array
     25  int      type;                        //!< the type field
     26  bool     bPressed;                    //!< is true, if the button/mouse was pressed, false if released
    2827       
    29   Uint16 x, y;                     //!< x and y coordinates
    30   Sint16 xRel, yRel;               //!< relative x and y movement to last point
     28  Uint16   x;                           //!< x coordinate
     29  Uint16   y;                           //!< y coordinate
     30  Sint16   xRel;                        //!< relative x movement to last point
     31  Sint16   yRel;                        //!< relative y movement to last point
    3132};
    3233
  • orxonox/trunk/src/util/event/event_def.h

    r4450 r4454  
    1111#include "stdincl.h"
    1212
    13 
    14 #define CMD_LENGHT 16
    15 #define N_STD_KEYS SDLK_LAST
    16 #define N_BUTTONS 6
    17 #define DEFAULT_KEYBIND_FILE "~/.orxonox/orxonox.conf"
    18 
    19 
    20 #define EVENT_QUEUE_LENGTH 32
    2113
    2214//! these are the extended event types, that are not included in SDL_keysym
     
    3931  };
    4032
     33
    4134//! this is an enumeration of all states of the event_handler/game
    4235typedef enum elState
  • orxonox/trunk/src/util/event/event_handler.cc

    r4450 r4454  
    9393/**
    9494   \brief set the state of the event handler
    95    \param state to which the event handler shall change
     95   \param state: to which the event handler shall change
    9696*/
    9797void EventHandler::setState(elState state)
     
    103103/**
    104104   \brief subscribe to an event
    105    \param the event listener that wants to subscribe itself, the listener that will be called when the evetn occures
    106    \param state for which the listener wants to receive events
    107    \param the event type that wants to be listened for.
     105   \param el: the event listener that wants to subscribe itself, the listener that will be called when the evetn occures
     106   \param state: for which the listener wants to receive events
     107   \param eventType: the event type that wants to be listened for.
    108108
    109109   This is one of the most important function of the EventHandler. If you would like to subscribe for more
     
    134134/**
    135135   \brief unsubscribe from the EventHandler
    136    \param the stat in which it has been subscribed
    137    \param the event, that shall be unsubscribed
     136   \param state: the stat in which it has been subscribed
     137   \param eventType: the event, that shall be unsubscribed
    138138
    139139   if you want to unsubscribe an event listener from all subscribed events, just use the
     
    149149/**
    150150   \brief unsubscribe all events from a specific listener
    151    \param the listener that wants to unsubscribe itself
    152    \param the state in which the events shall be unsubscribed
     151   \param el: the listener that wants to unsubscribe itself
     152   \param state: the state in which the events shall be unsubscribed
    153153   
    154154*/
     
    179179/**
    180180   \brief flush all registered events
    181    \param in a specific state
     181   \param state: a specific state
    182182*/
    183183void EventHandler::flush(elState state)
  • orxonox/trunk/src/util/event/event_listener.h

    r4452 r4454  
    2020  virtual ~EventListener();
    2121
     22  /**
     23     \brief abstract function that processes events from the handler
     24     \param event: the event
     25  */
    2226  virtual void process(const Event &event) = NULL;
    2327};
  • orxonox/trunk/src/util/event/key_mapper.cc

    r4452 r4454  
    103103
    104104
    105 
    106105/**
    107106   \brief loads new key bindings from a file
  • orxonox/trunk/src/util/event/key_mapper.h

    r4452 r4454  
    2828  virtual ~KeyMapper();
    2929
    30   void loadKeyBindings(const char* fileName = "~/.orxonox/orxonox.conf");
     30  void loadKeyBindings(const char* fileName = DEFAULT_CONFIG_FILE);
    3131
    3232  void debug();
     
    6464
    6565 private:
    66   Sint32 coord[2];                   //!< temp place to save variables in nameToIndex() function
     66  Sint32     coord[2];              //!< temp place to save variables in nameToIndex() function
    6767};
    6868
Note: See TracChangeset for help on using the changeset viewer.