Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2860 in orxonox.OLD for orxonox/branches/dave/src/command_node.h


Ignore:
Timestamp:
Nov 15, 2004, 11:13:21 PM (19 years ago)
Author:
dave
Message:

orxonox/branches/dave: das level hat jetzt form angenommen, stand:nach der Convention vom Samstag….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/dave/src/command_node.h

    r2190 r2860  
    1919//! Key aliasing structure
    2020/**
    21         This structure contains the key aliasing information, e.g. the command strings that
    22         have been bound to the keys.
     21   This structure contains the key aliasing information, e.g. the command strings that
     22   have been bound to the keys.
    2323*/
    2424typedef struct
    2525{
    26         char keys[N_STD_KEYS][CMD_LENGHT];
    27         char buttons[N_BUTTONS][CMD_LENGHT];
     26  char keys[N_STD_KEYS][CMD_LENGHT];
     27  char buttons[N_BUTTONS][CMD_LENGHT];
    2828} KeyBindings;
    2929
    3030//! Command Node
    3131/**
    32         This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is
    33         captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()).
    34         Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created
    35         with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass
    36         them on to it's WorldEntities.
     32   This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is
     33   captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()).
     34   Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created
     35   with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass
     36   them on to it's WorldEntities.
    3737*/
    3838class CommandNode {
    3939 private:
    40         bool bLocalInput;       //!< Identifies the CommandNode that processes local input
    41         int netID;      //!< Unique identifier that is used to determine between remote CommandNodes
    42         KeyBindings* aliases;
    43         List<WorldEntity>* bound;       //!< List of WorldEntites that recieve commands from this CommandNode
    44         Sint32 coord[2];
    45        
    46         void relay (Command* cmd);
    47         int* name_to_index (char* name);
    48         void process_local ();
    49         void process_network ();
    50         void send_over_network (Command* cmd);
    51        
     40  bool bLocalInput;     //!< Identifies the CommandNode that processes local input
     41  int netID;    //!< Unique identifier that is used to determine between remote CommandNodes
     42  KeyBindings* aliases;
     43  List* bound;  //!< List of WorldEntites that recieve commands from this CommandNode
     44  Sint32 coord[2];
     45 
     46
     47  void relay (Command* cmd);
     48  int* name_to_index (char* name);
     49  void process_local ();
     50  void process_network ();
     51  void send_over_network (Command* cmd);
     52 
    5253 public:
    5354  CommandNode (int ID);
    5455  CommandNode (char* filename);
    5556  ~CommandNode ();
    56  
     57
     58  void reset(); 
    5759  void load_bindings (char* filename);
    5860  void bind (WorldEntity* entity);
Note: See TracChangeset for help on using the changeset viewer.