Back to index

supertuxkart  0.5+dfsg1
Classes | Enumerations | Variables
input.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Input

Enumerations

enum  AxisDirection { AD_NEGATIVE, AD_POSITIVE, AD_NEUTRAL }
enum  InputType {
  IT_NONE = 0, IT_KEYBOARD, IT_STICKMOTION, IT_STICKBUTTON,
  IT_STICKHAT, IT_MOUSEMOTION, IT_MOUSEBUTTON
}
enum  KartAction {
  KA_LEFT, KA_RIGHT, KA_ACCEL, KA_BRAKE,
  KA_WHEELIE, KA_JUMP, KA_RESCUE, KA_FIRE,
  KA_LOOK_BACK
}
enum  GameAction {
  GA_NULL, GA_SENSE_CANCEL, GA_SENSE_COMPLETE, GA_ENTER,
  GA_LEAVE, GA_CLEAR_MAPPING, GA_INC_SCROLL_SPEED, GA_INC_SCROLL_SPEED_FAST,
  GA_DEC_SCROLL_SPEED, GA_DEC_SCROLL_SPEED_FAST, GA_CURSOR_UP, GA_CURSOR_DOWN,
  GA_CURSOR_LEFT, GA_CURSOR_RIGHT, GA_P1_LEFT, GA_P1_RIGHT,
  GA_P1_ACCEL, GA_P1_BRAKE, GA_P1_WHEELIE, GA_P1_JUMP,
  GA_P1_RESCUE, GA_P1_FIRE, GA_P1_LOOK_BACK, GA_P2_LEFT,
  GA_P2_RIGHT, GA_P2_ACCEL, GA_P2_BRAKE, GA_P2_WHEELIE,
  GA_P2_JUMP, GA_P2_RESCUE, GA_P2_FIRE, GA_P2_LOOK_BACK,
  GA_P3_LEFT, GA_P3_RIGHT, GA_P3_ACCEL, GA_P3_BRAKE,
  GA_P3_WHEELIE, GA_P3_JUMP, GA_P3_RESCUE, GA_P3_FIRE,
  GA_P3_LOOK_BACK, GA_P4_LEFT, GA_P4_RIGHT, GA_P4_ACCEL,
  GA_P4_BRAKE, GA_P4_WHEELIE, GA_P4_JUMP, GA_P4_RESCUE,
  GA_P4_FIRE, GA_P4_LOOK_BACK, GA_TOGGLE_FULLSCREEN, GA_LEAVE_RACE,
  GA_DEBUG_ADD_MISSILE, GA_DEBUG_ADD_SPARK, GA_DEBUG_ADD_HOMING, GA_DEBUG_TOGGLE_FPS,
  GA_DEBUG_TOGGLE_WIREFRAME, GA_DEBUG_HISTORY
}

Variables

const int IT_LAST = IT_MOUSEBUTTON
const int KA_FIRST = KA_LEFT
const int KA_LAST = KA_LOOK_BACK
const int KC_COUNT = (KA_LAST + 1)
const int GA_FIRST = GA_NULL
 Generally the first GameAction constant.
const int GA_COUNT = (GA_DEBUG_HISTORY + 1)
 A usefull value for array allocations.
const int GA_FIRST_MENU = GA_ENTER
const int GA_LAST_MENU = GA_CURSOR_RIGHT
const int GA_FIRST_INGAME = GA_P1_LEFT
const int GA_LAST_INGAME = GA_DEBUG_HISTORY
const int GA_FIRST_INGAME_FIXED = GA_TOGGLE_FULLSCREEN
const int GA_LAST_INGAME_FIXED = GA_DEBUG_HISTORY
const int GA_FIRST_KARTACTION = GA_P1_LEFT
 The range of GameAction constants that defines the mapping for the players kart actions.
const int GA_LAST_KARTACTION = GA_P4_LOOK_BACK

Enumeration Type Documentation

Enumerator:
AD_NEGATIVE 
AD_POSITIVE 
AD_NEUTRAL 

Definition at line 23 of file input.hpp.

enum GameAction
Enumerator:
GA_NULL 
GA_SENSE_CANCEL 
GA_SENSE_COMPLETE 
GA_ENTER 
GA_LEAVE 
GA_CLEAR_MAPPING 
GA_INC_SCROLL_SPEED 
GA_INC_SCROLL_SPEED_FAST 
GA_DEC_SCROLL_SPEED 
GA_DEC_SCROLL_SPEED_FAST 
GA_CURSOR_UP 
GA_CURSOR_DOWN 
GA_CURSOR_LEFT 
GA_CURSOR_RIGHT 
GA_P1_LEFT 
GA_P1_RIGHT 
GA_P1_ACCEL 
GA_P1_BRAKE 
GA_P1_WHEELIE 
GA_P1_JUMP 
GA_P1_RESCUE 
GA_P1_FIRE 
GA_P1_LOOK_BACK 
GA_P2_LEFT 
GA_P2_RIGHT 
GA_P2_ACCEL 
GA_P2_BRAKE 
GA_P2_WHEELIE 
GA_P2_JUMP 
GA_P2_RESCUE 
GA_P2_FIRE 
GA_P2_LOOK_BACK 
GA_P3_LEFT 
GA_P3_RIGHT 
GA_P3_ACCEL 
GA_P3_BRAKE 
GA_P3_WHEELIE 
GA_P3_JUMP 
GA_P3_RESCUE 
GA_P3_FIRE 
GA_P3_LOOK_BACK 
GA_P4_LEFT 
GA_P4_RIGHT 
GA_P4_ACCEL 
GA_P4_BRAKE 
GA_P4_WHEELIE 
GA_P4_JUMP 
GA_P4_RESCUE 
GA_P4_FIRE 
GA_P4_LOOK_BACK 
GA_TOGGLE_FULLSCREEN 
GA_LEAVE_RACE 
GA_DEBUG_ADD_MISSILE 
GA_DEBUG_ADD_SPARK 
GA_DEBUG_ADD_HOMING 
GA_DEBUG_TOGGLE_FPS 
GA_DEBUG_TOGGLE_WIREFRAME 
GA_DEBUG_HISTORY 

Definition at line 103 of file input.hpp.

{
       // Below this are synthetic game actions which are never triggered through
       // an input device.
       GA_NULL,                           // Nothing dummy entry.
       GA_SENSE_CANCEL,            // Input sensing canceled.
       GA_SENSE_COMPLETE,          // Input sensing successfully finished.
       
       // Below this point are the game actions which can happen while in menu
       // mode.
              
       GA_ENTER,                          // Enter menu, acknowledge, ...
       GA_LEAVE,                          // Leave a menu.
       
       GA_CLEAR_MAPPING,           // Clear an input mapping.
       
       GA_INC_SCROLL_SPEED,
       GA_INC_SCROLL_SPEED_FAST,
       GA_DEC_SCROLL_SPEED,
       GA_DEC_SCROLL_SPEED_FAST,
       
       GA_CURSOR_UP,
       GA_CURSOR_DOWN,
       GA_CURSOR_LEFT,
       GA_CURSOR_RIGHT,
       
       // The following game actions occur when in ingame mode (= within a race).

       GA_P1_LEFT,
       GA_P1_RIGHT,
       GA_P1_ACCEL,
       GA_P1_BRAKE,
       GA_P1_WHEELIE,
       GA_P1_JUMP,
       GA_P1_RESCUE,
       GA_P1_FIRE,
       GA_P1_LOOK_BACK,
       
       GA_P2_LEFT,
       GA_P2_RIGHT,
       GA_P2_ACCEL,
       GA_P2_BRAKE,
       GA_P2_WHEELIE,
       GA_P2_JUMP,
       GA_P2_RESCUE,
       GA_P2_FIRE,
       GA_P2_LOOK_BACK,
       
       GA_P3_LEFT,
       GA_P3_RIGHT,
       GA_P3_ACCEL,
       GA_P3_BRAKE,
       GA_P3_WHEELIE,
       GA_P3_JUMP,
       GA_P3_RESCUE,
       GA_P3_FIRE,
       GA_P3_LOOK_BACK,
       
       GA_P4_LEFT,
       GA_P4_RIGHT,
       GA_P4_ACCEL,
       GA_P4_BRAKE,
       GA_P4_WHEELIE,
       GA_P4_JUMP,
       GA_P4_RESCUE,
       GA_P4_FIRE,
       GA_P4_LOOK_BACK,

       GA_TOGGLE_FULLSCREEN,       // Switch between windowed/fullscreen mode
       GA_LEAVE_RACE,                     // Switch from race to menu.
       
       GA_DEBUG_ADD_MISSILE,
       GA_DEBUG_ADD_SPARK,
       GA_DEBUG_ADD_HOMING,
       GA_DEBUG_TOGGLE_FPS,
       GA_DEBUG_TOGGLE_WIREFRAME,
       GA_DEBUG_HISTORY
       
};
enum InputType
Enumerator:
IT_NONE 
IT_KEYBOARD 
IT_STICKMOTION 
IT_STICKBUTTON 
IT_STICKHAT 
IT_MOUSEMOTION 
IT_MOUSEBUTTON 

Definition at line 29 of file input.hpp.

enum KartAction
Enumerator:
KA_LEFT 
KA_RIGHT 
KA_ACCEL 
KA_BRAKE 
KA_WHEELIE 
KA_JUMP 
KA_RESCUE 
KA_FIRE 
KA_LOOK_BACK 

Definition at line 88 of file input.hpp.


Variable Documentation

const int GA_COUNT = (GA_DEBUG_HISTORY + 1)

A usefull value for array allocations.

Should always be to the last constant + 1.

Definition at line 193 of file input.hpp.

const int GA_FIRST = GA_NULL

Generally the first GameAction constant.

Unlikely to change.

Definition at line 188 of file input.hpp.

Definition at line 200 of file input.hpp.

Definition at line 206 of file input.hpp.

The range of GameAction constants that defines the mapping for the players kart actions.

Besides that these are the actions whose mappings are changeable by the user (via menu & config file). When looking for conflicting mappings only the user changeable GameAction constants are regarded.

Definition at line 215 of file input.hpp.

const int GA_FIRST_MENU = GA_ENTER

Definition at line 196 of file input.hpp.

Definition at line 201 of file input.hpp.

Definition at line 207 of file input.hpp.

Definition at line 216 of file input.hpp.

Definition at line 197 of file input.hpp.

const int IT_LAST = IT_MOUSEBUTTON

Definition at line 38 of file input.hpp.

const int KA_FIRST = KA_LEFT

Definition at line 99 of file input.hpp.

const int KA_LAST = KA_LOOK_BACK

Definition at line 100 of file input.hpp.

const int KC_COUNT = (KA_LAST + 1)

Definition at line 101 of file input.hpp.