RigsofRods
Soft-body Physics Simulation
Data Structures | Namespaces | Macros | Enumerations | Variables
InputEngine.h File Reference

Handles controller inputs from player. Defines input events and binding mechanism, see eventtypes, events. Reads bindings from "*.map" file(s). More...

#include "Application.h"
#include "ForceFeedback.h"
#include <OgreUTFString.h>
#include "OISEvents.h"
#include "OISForceFeedback.h"
#include "OISInputManager.h"
#include "OISJoyStick.h"
#include "OISKeyboard.h"
#include "OISMouse.h"
+ Include dependency graph for InputEngine.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RoR::InputEvent
 
struct  RoR::event_trigger_t
 
class  RoR::InputEngine
 Manages controller configuration, evaluates input events. More...
 

Namespaces

 RoR
 

Macros

#define MAX_JOYSTICKS   10
 
#define MAX_JOYSTICK_POVS   4
 
#define MAX_JOYSTICK_SLIDERS   4
 
#define MAX_JOYSTICK_AXIS   32
 

Enumerations

enum  RoR::eventtypes {
  RoR::ET_NONE =0, RoR::ET_Keyboard, RoR::ET_MouseButton, RoR::ET_MouseAxisX,
  RoR::ET_MouseAxisY, RoR::ET_MouseAxisZ, RoR::ET_JoystickButton, RoR::ET_JoystickAxisAbs,
  RoR::ET_JoystickAxisRel, RoR::ET_JoystickPov, RoR::ET_JoystickSliderX, RoR::ET_JoystickSliderY,
  RoR::ET_END
}
 
enum  RoR::InputSourceType { RoR::InputSourceType::IST_ANY, RoR::InputSourceType::IST_DIGITAL, RoR::InputSourceType::IST_ANALOG }
 
enum  RoR::events {
  RoR::EV_AIRPLANE_AIRBRAKES_FULL =0, RoR::EV_AIRPLANE_AIRBRAKES_LESS, RoR::EV_AIRPLANE_AIRBRAKES_MORE, RoR::EV_AIRPLANE_AIRBRAKES_NONE,
  RoR::EV_AIRPLANE_BRAKE, RoR::EV_AIRPLANE_ELEVATOR_DOWN, RoR::EV_AIRPLANE_ELEVATOR_UP, RoR::EV_AIRPLANE_FLAPS_FULL,
  RoR::EV_AIRPLANE_FLAPS_LESS, RoR::EV_AIRPLANE_FLAPS_MORE, RoR::EV_AIRPLANE_FLAPS_NONE, RoR::EV_AIRPLANE_PARKING_BRAKE,
  RoR::EV_AIRPLANE_REVERSE, RoR::EV_AIRPLANE_RUDDER_LEFT, RoR::EV_AIRPLANE_RUDDER_RIGHT, RoR::EV_AIRPLANE_STEER_LEFT,
  RoR::EV_AIRPLANE_STEER_RIGHT, RoR::EV_AIRPLANE_THROTTLE, RoR::EV_AIRPLANE_THROTTLE_AXIS, RoR::EV_AIRPLANE_THROTTLE_DOWN,
  RoR::EV_AIRPLANE_THROTTLE_FULL, RoR::EV_AIRPLANE_THROTTLE_NO, RoR::EV_AIRPLANE_THROTTLE_UP, RoR::EV_AIRPLANE_TOGGLE_ENGINES,
  RoR::EV_BOAT_CENTER_RUDDER, RoR::EV_BOAT_REVERSE, RoR::EV_BOAT_STEER_LEFT, RoR::EV_BOAT_STEER_LEFT_AXIS,
  RoR::EV_BOAT_STEER_RIGHT, RoR::EV_BOAT_STEER_RIGHT_AXIS, RoR::EV_BOAT_THROTTLE_AXIS, RoR::EV_BOAT_THROTTLE_DOWN,
  RoR::EV_BOAT_THROTTLE_UP, RoR::EV_SKY_DECREASE_TIME, RoR::EV_SKY_DECREASE_TIME_FAST, RoR::EV_SKY_INCREASE_TIME,
  RoR::EV_SKY_INCREASE_TIME_FAST, RoR::EV_CAMERA_CHANGE, RoR::EV_CAMERA_DOWN, RoR::EV_CAMERA_FREE_MODE,
  RoR::EV_CAMERA_FREE_MODE_FIX, RoR::EV_CAMERA_LOOKBACK, RoR::EV_CAMERA_RESET, RoR::EV_CAMERA_ROTATE_DOWN,
  RoR::EV_CAMERA_ROTATE_LEFT, RoR::EV_CAMERA_ROTATE_RIGHT, RoR::EV_CAMERA_ROTATE_UP, RoR::EV_CAMERA_UP,
  RoR::EV_CAMERA_ZOOM_IN, RoR::EV_CAMERA_ZOOM_IN_FAST, RoR::EV_CAMERA_ZOOM_OUT, RoR::EV_CAMERA_ZOOM_OUT_FAST,
  RoR::EV_CHARACTER_BACKWARDS, RoR::EV_CHARACTER_FORWARD, RoR::EV_CHARACTER_JUMP, RoR::EV_CHARACTER_LEFT,
  RoR::EV_CHARACTER_RIGHT, RoR::EV_CHARACTER_ROT_DOWN, RoR::EV_CHARACTER_ROT_UP, RoR::EV_CHARACTER_RUN,
  RoR::EV_CHARACTER_SIDESTEP_LEFT, RoR::EV_CHARACTER_SIDESTEP_RIGHT, RoR::EV_COMMANDS_01, RoR::EV_COMMANDS_02,
  RoR::EV_COMMANDS_03, RoR::EV_COMMANDS_04, RoR::EV_COMMANDS_05, RoR::EV_COMMANDS_06,
  RoR::EV_COMMANDS_07, RoR::EV_COMMANDS_08, RoR::EV_COMMANDS_09, RoR::EV_COMMANDS_10,
  RoR::EV_COMMANDS_11, RoR::EV_COMMANDS_12, RoR::EV_COMMANDS_13, RoR::EV_COMMANDS_14,
  RoR::EV_COMMANDS_15, RoR::EV_COMMANDS_16, RoR::EV_COMMANDS_17, RoR::EV_COMMANDS_18,
  RoR::EV_COMMANDS_19, RoR::EV_COMMANDS_20, RoR::EV_COMMANDS_21, RoR::EV_COMMANDS_22,
  RoR::EV_COMMANDS_23, RoR::EV_COMMANDS_24, RoR::EV_COMMANDS_25, RoR::EV_COMMANDS_26,
  RoR::EV_COMMANDS_27, RoR::EV_COMMANDS_28, RoR::EV_COMMANDS_29, RoR::EV_COMMANDS_30,
  RoR::EV_COMMANDS_31, RoR::EV_COMMANDS_32, RoR::EV_COMMANDS_33, RoR::EV_COMMANDS_34,
  RoR::EV_COMMANDS_35, RoR::EV_COMMANDS_36, RoR::EV_COMMANDS_37, RoR::EV_COMMANDS_38,
  RoR::EV_COMMANDS_39, RoR::EV_COMMANDS_40, RoR::EV_COMMANDS_41, RoR::EV_COMMANDS_42,
  RoR::EV_COMMANDS_43, RoR::EV_COMMANDS_44, RoR::EV_COMMANDS_45, RoR::EV_COMMANDS_46,
  RoR::EV_COMMANDS_47, RoR::EV_COMMANDS_48, RoR::EV_COMMANDS_49, RoR::EV_COMMANDS_50,
  RoR::EV_COMMANDS_51, RoR::EV_COMMANDS_52, RoR::EV_COMMANDS_53, RoR::EV_COMMANDS_54,
  RoR::EV_COMMANDS_55, RoR::EV_COMMANDS_56, RoR::EV_COMMANDS_57, RoR::EV_COMMANDS_58,
  RoR::EV_COMMANDS_59, RoR::EV_COMMANDS_60, RoR::EV_COMMANDS_61, RoR::EV_COMMANDS_62,
  RoR::EV_COMMANDS_63, RoR::EV_COMMANDS_64, RoR::EV_COMMANDS_65, RoR::EV_COMMANDS_66,
  RoR::EV_COMMANDS_67, RoR::EV_COMMANDS_68, RoR::EV_COMMANDS_69, RoR::EV_COMMANDS_70,
  RoR::EV_COMMANDS_71, RoR::EV_COMMANDS_72, RoR::EV_COMMANDS_73, RoR::EV_COMMANDS_74,
  RoR::EV_COMMANDS_75, RoR::EV_COMMANDS_76, RoR::EV_COMMANDS_77, RoR::EV_COMMANDS_78,
  RoR::EV_COMMANDS_79, RoR::EV_COMMANDS_80, RoR::EV_COMMANDS_81, RoR::EV_COMMANDS_82,
  RoR::EV_COMMANDS_83, RoR::EV_COMMANDS_84, RoR::EV_COMMON_ACCELERATE_SIMULATION, RoR::EV_COMMON_DECELERATE_SIMULATION,
  RoR::EV_COMMON_RESET_SIMULATION_PACE, RoR::EV_COMMON_AUTOLOCK, RoR::EV_COMMON_CONSOLE_TOGGLE, RoR::EV_COMMON_ENTER_CHATMODE,
  RoR::EV_COMMON_ENTER_OR_EXIT_TRUCK, RoR::EV_COMMON_ENTER_NEXT_TRUCK, RoR::EV_COMMON_ENTER_PREVIOUS_TRUCK, RoR::EV_COMMON_REMOVE_CURRENT_TRUCK,
  RoR::EV_COMMON_RESPAWN_LAST_TRUCK, RoR::EV_COMMON_FOV_LESS, RoR::EV_COMMON_FOV_MORE, RoR::EV_COMMON_FOV_RESET,
  RoR::EV_COMMON_FULLSCREEN_TOGGLE, RoR::EV_COMMON_HIDE_GUI, RoR::EV_COMMON_TOGGLE_DASHBOARD, RoR::EV_COMMON_LOCK,
  RoR::EV_COMMON_NETCHATDISPLAY, RoR::EV_COMMON_NETCHATMODE, RoR::EV_COMMON_OUTPUT_POSITION, RoR::EV_COMMON_GET_NEW_VEHICLE,
  RoR::EV_COMMON_PRESSURE_LESS, RoR::EV_COMMON_PRESSURE_MORE, RoR::EV_COMMON_QUICKLOAD, RoR::EV_COMMON_QUICKSAVE,
  RoR::EV_COMMON_QUIT_GAME, RoR::EV_COMMON_REPAIR_TRUCK, RoR::EV_COMMON_LIVE_REPAIR_MODE, RoR::EV_COMMON_REPLAY_BACKWARD,
  RoR::EV_COMMON_REPLAY_FAST_BACKWARD, RoR::EV_COMMON_REPLAY_FAST_FORWARD, RoR::EV_COMMON_REPLAY_FORWARD, RoR::EV_COMMON_RESCUE_TRUCK,
  RoR::EV_COMMON_RESET_TRUCK, RoR::EV_COMMON_TOGGLE_RESET_MODE, RoR::EV_COMMON_ROPELOCK, RoR::EV_COMMON_SAVE_TERRAIN,
  RoR::EV_COMMON_SCREENSHOT, RoR::EV_COMMON_SCREENSHOT_BIG, RoR::EV_COMMON_SECURE_LOAD, RoR::EV_COMMON_SEND_CHAT,
  RoR::EV_COMMON_TOGGLE_DEBUG_VIEW, RoR::EV_COMMON_CYCLE_DEBUG_VIEWS, RoR::EV_COMMON_TOGGLE_TERRAIN_EDITOR, RoR::EV_COMMON_TOGGLE_CUSTOM_PARTICLES,
  RoR::EV_COMMON_TOGGLE_MAT_DEBUG, RoR::EV_COMMON_TOGGLE_REPLAY_MODE, RoR::EV_COMMON_TOGGLE_PHYSICS, RoR::EV_COMMON_TOGGLE_STATS,
  RoR::EV_COMMON_TOGGLE_TRUCK_BEACONS, RoR::EV_COMMON_CYCLE_TRUCK_LIGHTS, RoR::EV_COMMON_TOGGLE_TRUCK_LOW_BEAMS, RoR::EV_COMMON_TOGGLE_TRUCK_HIGH_BEAMS,
  RoR::EV_COMMON_TOGGLE_TRUCK_FOG_LIGHTS, RoR::EV_COMMON_TRUCK_INFO, RoR::EV_COMMON_TRUCK_DESCRIPTION, RoR::EV_COMMON_TRUCK_REMOVE,
  RoR::EV_GRASS_LESS, RoR::EV_GRASS_MORE, RoR::EV_GRASS_MOST, RoR::EV_GRASS_NONE,
  RoR::EV_GRASS_SAVE, RoR::EV_MENU_DOWN, RoR::EV_MENU_LEFT, RoR::EV_MENU_RIGHT,
  RoR::EV_MENU_SELECT, RoR::EV_MENU_UP, RoR::EV_SURVEY_MAP_TOGGLE_ICONS, RoR::EV_SURVEY_MAP_CYCLE,
  RoR::EV_SURVEY_MAP_TOGGLE, RoR::EV_SURVEY_MAP_ZOOM_IN, RoR::EV_SURVEY_MAP_ZOOM_OUT, RoR::EV_TRUCK_ACCELERATE,
  RoR::EV_TRUCK_ACCELERATE_MODIFIER_25, RoR::EV_TRUCK_ACCELERATE_MODIFIER_50, RoR::EV_TRUCK_ANTILOCK_BRAKE, RoR::EV_TRUCK_AUTOSHIFT_DOWN,
  RoR::EV_TRUCK_AUTOSHIFT_UP, RoR::EV_TRUCK_BLINK_LEFT, RoR::EV_TRUCK_BLINK_RIGHT, RoR::EV_TRUCK_BLINK_WARN,
  RoR::EV_TRUCK_BRAKE, RoR::EV_TRUCK_BRAKE_MODIFIER_25, RoR::EV_TRUCK_BRAKE_MODIFIER_50, RoR::EV_TRUCK_CRUISE_CONTROL,
  RoR::EV_TRUCK_CRUISE_CONTROL_ACCL, RoR::EV_TRUCK_CRUISE_CONTROL_DECL, RoR::EV_TRUCK_CRUISE_CONTROL_READJUST, RoR::EV_TRUCK_HORN,
  RoR::EV_TRUCK_LEFT_MIRROR_LEFT, RoR::EV_TRUCK_LEFT_MIRROR_RIGHT, RoR::EV_TRUCK_LIGHTTOGGLE01, RoR::EV_TRUCK_LIGHTTOGGLE02,
  RoR::EV_TRUCK_LIGHTTOGGLE03, RoR::EV_TRUCK_LIGHTTOGGLE04, RoR::EV_TRUCK_LIGHTTOGGLE05, RoR::EV_TRUCK_LIGHTTOGGLE06,
  RoR::EV_TRUCK_LIGHTTOGGLE07, RoR::EV_TRUCK_LIGHTTOGGLE08, RoR::EV_TRUCK_LIGHTTOGGLE09, RoR::EV_TRUCK_LIGHTTOGGLE10,
  RoR::EV_TRUCK_MANUAL_CLUTCH, RoR::EV_TRUCK_PARKING_BRAKE, RoR::EV_TRUCK_TRAILER_PARKING_BRAKE, RoR::EV_TRUCK_RIGHT_MIRROR_LEFT,
  RoR::EV_TRUCK_RIGHT_MIRROR_RIGHT, RoR::EV_TRUCK_SHIFT_DOWN, RoR::EV_TRUCK_SHIFT_GEAR01, RoR::EV_TRUCK_SHIFT_GEAR02,
  RoR::EV_TRUCK_SHIFT_GEAR03, RoR::EV_TRUCK_SHIFT_GEAR04, RoR::EV_TRUCK_SHIFT_GEAR05, RoR::EV_TRUCK_SHIFT_GEAR06,
  RoR::EV_TRUCK_SHIFT_GEAR07, RoR::EV_TRUCK_SHIFT_GEAR08, RoR::EV_TRUCK_SHIFT_GEAR09, RoR::EV_TRUCK_SHIFT_GEAR10,
  RoR::EV_TRUCK_SHIFT_GEAR11, RoR::EV_TRUCK_SHIFT_GEAR12, RoR::EV_TRUCK_SHIFT_GEAR13, RoR::EV_TRUCK_SHIFT_GEAR14,
  RoR::EV_TRUCK_SHIFT_GEAR15, RoR::EV_TRUCK_SHIFT_GEAR16, RoR::EV_TRUCK_SHIFT_GEAR17, RoR::EV_TRUCK_SHIFT_GEAR18,
  RoR::EV_TRUCK_SHIFT_GEAR_REVERSE, RoR::EV_TRUCK_SHIFT_HIGHRANGE, RoR::EV_TRUCK_SHIFT_LOWRANGE, RoR::EV_TRUCK_SHIFT_MIDRANGE,
  RoR::EV_TRUCK_SHIFT_NEUTRAL, RoR::EV_TRUCK_SHIFT_UP, RoR::EV_TRUCK_STARTER, RoR::EV_TRUCK_STEER_LEFT,
  RoR::EV_TRUCK_STEER_RIGHT, RoR::EV_TRUCK_SWITCH_SHIFT_MODES, RoR::EV_TRUCK_TOGGLE_CONTACT, RoR::EV_TRUCK_TOGGLE_FORWARDCOMMANDS,
  RoR::EV_TRUCK_TOGGLE_IMPORTCOMMANDS, RoR::EV_TRUCK_TOGGLE_INTER_AXLE_DIFF, RoR::EV_TRUCK_TOGGLE_INTER_WHEEL_DIFF, RoR::EV_TRUCK_TOGGLE_PHYSICS,
  RoR::EV_TRUCK_TOGGLE_TCASE_4WD_MODE, RoR::EV_TRUCK_TOGGLE_TCASE_GEAR_RATIO, RoR::EV_TRUCK_TOGGLE_VIDEOCAMERA, RoR::EV_TRUCK_TRACTION_CONTROL,
  RoR::EV_COMMON_QUICKSAVE_01, RoR::EV_COMMON_QUICKSAVE_02, RoR::EV_COMMON_QUICKSAVE_03, RoR::EV_COMMON_QUICKSAVE_04,
  RoR::EV_COMMON_QUICKSAVE_05, RoR::EV_COMMON_QUICKSAVE_06, RoR::EV_COMMON_QUICKSAVE_07, RoR::EV_COMMON_QUICKSAVE_08,
  RoR::EV_COMMON_QUICKSAVE_09, RoR::EV_COMMON_QUICKSAVE_10, RoR::EV_COMMON_QUICKLOAD_01, RoR::EV_COMMON_QUICKLOAD_02,
  RoR::EV_COMMON_QUICKLOAD_03, RoR::EV_COMMON_QUICKLOAD_04, RoR::EV_COMMON_QUICKLOAD_05, RoR::EV_COMMON_QUICKLOAD_06,
  RoR::EV_COMMON_QUICKLOAD_07, RoR::EV_COMMON_QUICKLOAD_08, RoR::EV_COMMON_QUICKLOAD_09, RoR::EV_COMMON_QUICKLOAD_10,
  RoR::EV_TRUCKEDIT_RELOAD, RoR::EV_ROAD_EDITOR_POINT_INSERT, RoR::EV_ROAD_EDITOR_POINT_SET_POS, RoR::EV_ROAD_EDITOR_POINT_GOTO,
  RoR::EV_ROAD_EDITOR_POINT_DELETE, RoR::EV_ROAD_EDITOR_REBUILD_MESH, RoR::EV_MODE_BEFORELAST, RoR::EV_MODE_LAST
}
 

Variables

const events RoR::EV_INVALID = (events)-1
 

Detailed Description

Handles controller inputs from player. Defines input events and binding mechanism, see eventtypes, events. Reads bindings from "*.map" file(s).

Definition in file InputEngine.h.

Macro Definition Documentation

◆ MAX_JOYSTICK_AXIS

#define MAX_JOYSTICK_AXIS   32

Definition at line 43 of file InputEngine.h.

◆ MAX_JOYSTICK_POVS

#define MAX_JOYSTICK_POVS   4

Definition at line 41 of file InputEngine.h.

◆ MAX_JOYSTICK_SLIDERS

#define MAX_JOYSTICK_SLIDERS   4

Definition at line 42 of file InputEngine.h.

◆ MAX_JOYSTICKS

#define MAX_JOYSTICKS   10

Definition at line 40 of file InputEngine.h.