Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6997 in orxonox.OLD


Ignore:
Timestamp:
Feb 3, 2006, 12:04:51 AM (18 years ago)
Author:
bensch
Message:

trunk: UP is FORWARD, DOWN is BACKWARD

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/globals.h

    r5996 r6997  
    6868#define   CONFIG_NAME_ALWAYS_SHOW_GUI      "Always-Show-The-Gui"
    6969// evenets
    70 #define   CONFIG_NAME_PLAYER_UP            "Up"
    71 #define   CONFIG_NAME_PLAYER_DOWN          "Down"
     70#define   CONFIG_NAME_PLAYER_FORWARD       "Forward"
     71#define   CONFIG_NAME_PLAYER_BACKWARD      "Backward"
    7272#define   CONFIG_NAME_PLAYER_LEFT          "Left"
    7373#define   CONFIG_NAME_PLAYER_RIGHT         "Right"
  • trunk/src/lib/event/key_mapper.cc

    r5978 r6997  
    3333
    3434/* initialize all variables to a reasonable value*/
    35 int KeyMapper::PEV_UP                = EV_UNKNOWN;
    36 int KeyMapper::PEV_DOWN              = EV_UNKNOWN;
     35int KeyMapper::PEV_FORWARD           = EV_UNKNOWN;
     36int KeyMapper::PEV_BACKWARD          = EV_UNKNOWN;
    3737int KeyMapper::PEV_LEFT              = EV_UNKNOWN;
    3838int KeyMapper::PEV_RIGHT             = EV_UNKNOWN;
     
    6767 */
    6868orxKeyMapping map[] = {
    69   {&KeyMapper::PEV_UP,                   CONFIG_NAME_PLAYER_UP},
    70   {&KeyMapper::PEV_DOWN,                 CONFIG_NAME_PLAYER_DOWN},
     69  {&KeyMapper::PEV_FORWARD,                   CONFIG_NAME_PLAYER_FORWARD},
     70  {&KeyMapper::PEV_BACKWARD,                 CONFIG_NAME_PLAYER_BACKWARD},
    7171  {&KeyMapper::PEV_LEFT,                 CONFIG_NAME_PLAYER_LEFT},
    7272  {&KeyMapper::PEV_RIGHT,                CONFIG_NAME_PLAYER_RIGHT},
  • trunk/src/lib/event/key_mapper.h

    r5978 r6997  
    3939
    4040 public:
    41   static int PEV_UP;                //!< up button
    42   static int PEV_DOWN;              //!< down buttton
     41  static int PEV_FORWARD;           //!< forward button
     42  static int PEV_BACKWARD;          //!< backward buttton
    4343  static int PEV_LEFT;              //!< left button
    4444  static int PEV_RIGHT;             //!< right button
  • trunk/src/lib/gui/gtk_gui/gui_keys.cc

    r5978 r6997  
    115115
    116116        pKeysBox->setGroupName(player);
    117         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "w"));
    118         pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "s"));
     117        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FORWARD, "w"));
     118        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_BACKWARD, "s"));
    119119        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "a"));
    120120        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "d"));
  • trunk/src/util/track/pilot_node.cc

    r4836 r6997  
    103103void PilotNode::process( const Event &event)
    104104{
    105   if( event.type == KeyMapper::PEV_UP)
     105  if( event.type == KeyMapper::PEV_FORWARD)
    106106    {
    107107      this->bUp = event.bPressed;
    108108    }
    109   else if( event.type == KeyMapper::PEV_DOWN)
     109  else if( event.type == KeyMapper::PEV_BACKWARD)
    110110    {
    111111      this->bDown = event.bPressed;
  • trunk/src/world_entities/space_ships/helicopter.cc

    r6986 r6997  
    150150
    151151  //add events to the eventlist
    152   registerEvent(KeyMapper::PEV_UP);
    153   registerEvent(KeyMapper::PEV_DOWN);
     152  registerEvent(KeyMapper::PEV_FORWARD);
     153  registerEvent(KeyMapper::PEV_BACKWARD);
    154154  registerEvent(KeyMapper::PEV_LEFT);
    155155  registerEvent(KeyMapper::PEV_RIGHT);
     
    412412  else if( event.type == SDLK_c)
    413413    this->bDescend = event.bPressed;
    414   else if( event.type == KeyMapper::PEV_UP)
     414  else if( event.type == KeyMapper::PEV_FORWARD)
    415415    this->bUp = event.bPressed;
    416   else if( event.type == KeyMapper::PEV_DOWN)
     416  else if( event.type == KeyMapper::PEV_BACKWARD)
    417417    this->bDown = event.bPressed;
    418418  else if( event.type == EV_MOUSE_MOTION)
  • trunk/src/world_entities/space_ships/hover.cc

    r6986 r6997  
    141141
    142142  //add events to the eventlist
    143   registerEvent(KeyMapper::PEV_UP);
    144   registerEvent(KeyMapper::PEV_DOWN);
     143  registerEvent(KeyMapper::PEV_FORWARD);
     144  registerEvent(KeyMapper::PEV_BACKWARD);
    145145  registerEvent(KeyMapper::PEV_LEFT);
    146146  registerEvent(KeyMapper::PEV_RIGHT);
     
    366366  else if( event.type == SDLK_c)
    367367    this->bDescend = event.bPressed; //this->shiftCoor(0,-.1,0);
    368   else if( event.type == KeyMapper::PEV_UP)
     368  else if( event.type == KeyMapper::PEV_FORWARD)
    369369    this->bForward = event.bPressed; //this->shiftCoor(0,.1,0);
    370   else if( event.type == KeyMapper::PEV_DOWN)
     370  else if( event.type == KeyMapper::PEV_BACKWARD)
    371371    this->bBackward = event.bPressed; //this->shiftCoor(0,-.1,0);
    372372  else if( event.type == EV_MOUSE_MOTION)
  • trunk/src/world_entities/space_ships/space_ship.cc

    r6994 r6997  
    170170
    171171  //add events to the eventlist
    172   registerEvent(KeyMapper::PEV_UP);
    173   registerEvent(KeyMapper::PEV_DOWN);
     172  registerEvent(KeyMapper::PEV_FORWARD);
     173  registerEvent(KeyMapper::PEV_BACKWARD);
    174174  registerEvent(KeyMapper::PEV_LEFT);
    175175  registerEvent(KeyMapper::PEV_RIGHT);
     
    490490  else if( event.type == KeyMapper::PEV_RIGHT)
    491491      this->bRollR = event.bPressed;
    492   else if( event.type == KeyMapper::PEV_UP)
     492  else if( event.type == KeyMapper::PEV_FORWARD)
    493493    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
    494   else if( event.type == KeyMapper::PEV_DOWN)
     494  else if( event.type == KeyMapper::PEV_BACKWARD)
    495495    this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0);
    496496  else if( event.type == EV_MOUSE_MOTION)
Note: See TracChangeset for help on using the changeset viewer.