2016-02-13 09:02:47 +00:00
|
|
|
#ifndef __PSHAG_CCONTROLMAPPER_HPP__
|
|
|
|
#define __PSHAG_CCONTROLMAPPER_HPP__
|
2015-08-28 00:11:31 +00:00
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
namespace pshag
|
2015-08-28 00:11:31 +00:00
|
|
|
{
|
|
|
|
class CFinalInput;
|
|
|
|
|
|
|
|
class ControlMapper
|
|
|
|
{
|
|
|
|
public:
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class ECommands
|
2015-08-28 00:11:31 +00:00
|
|
|
{
|
2015-11-21 01:16:07 +00:00
|
|
|
Forward,
|
|
|
|
Backward,
|
|
|
|
TurnLeft,
|
|
|
|
TurnRight,
|
|
|
|
StrafeLeft,
|
|
|
|
StrafeRight,
|
|
|
|
LookLeft,
|
|
|
|
LookRight,
|
|
|
|
LookUp,
|
|
|
|
LookDown,
|
|
|
|
JumpOrBoost,
|
|
|
|
FireOrBomb,
|
|
|
|
MissileOrPowerBomb,
|
|
|
|
Morph,
|
|
|
|
AimUp,
|
|
|
|
AimDown,
|
|
|
|
CycleBeamUp,
|
|
|
|
CycleBeamDown,
|
|
|
|
CycleItem,
|
|
|
|
PowerBeam,
|
|
|
|
IceBeam,
|
|
|
|
WaveBeam,
|
|
|
|
PlasmaBeam,
|
|
|
|
ToggleHolster,
|
|
|
|
OrbitClose,
|
|
|
|
OrbitFar,
|
|
|
|
OrbitObject,
|
|
|
|
OrbitSelect,
|
|
|
|
OrbitConfirm,
|
|
|
|
OrbitLeft,
|
|
|
|
OrbitRight,
|
|
|
|
OrbitUp,
|
|
|
|
OrbitDown,
|
|
|
|
LookHold1,
|
|
|
|
LookHold2,
|
|
|
|
LookZoomIn,
|
|
|
|
LookZoomOut,
|
|
|
|
AimHold,
|
|
|
|
MapCircleUp,
|
|
|
|
MapCircleDown,
|
|
|
|
MapCircleLeft,
|
|
|
|
MapCircleRight,
|
|
|
|
MapMoveForward,
|
|
|
|
MapMoveBack,
|
|
|
|
MapMoveLeft,
|
|
|
|
MapMoveRight,
|
|
|
|
MapZoomIn,
|
|
|
|
MapZoomOut,
|
|
|
|
ChaseCamera,
|
|
|
|
XrayVisor,
|
|
|
|
ThermoVisor,
|
|
|
|
InviroVisor,
|
|
|
|
NoVisor,
|
|
|
|
VisorMenu,
|
|
|
|
VisorUp,
|
|
|
|
VisorDown,
|
|
|
|
UseSheild=0x3B,
|
|
|
|
ScanItem=0x3C,
|
|
|
|
UNKNOWN,
|
|
|
|
None,
|
|
|
|
MAX
|
2015-08-28 00:11:31 +00:00
|
|
|
};
|
|
|
|
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EFunctionList
|
2015-08-28 00:11:31 +00:00
|
|
|
{
|
2015-11-21 01:16:07 +00:00
|
|
|
None,
|
|
|
|
LeftStickUp,
|
|
|
|
LeftStickDown,
|
|
|
|
LeftStickLeft,
|
|
|
|
LeftStickRight,
|
|
|
|
RightStickUp,
|
|
|
|
RightStickDown,
|
|
|
|
RightStickLeft,
|
|
|
|
RightStickRight,
|
|
|
|
LeftTrigger,
|
|
|
|
RightTrigger,
|
|
|
|
DPadUp,
|
|
|
|
DPadDown,
|
|
|
|
DPadLeft,
|
|
|
|
DPadRight,
|
|
|
|
AButton,
|
|
|
|
BButton,
|
|
|
|
XButton,
|
|
|
|
YButton,
|
|
|
|
ZButton,
|
|
|
|
LeftTriggerPress,
|
|
|
|
RightTriggerPress,
|
|
|
|
Start,
|
|
|
|
MAX // default case
|
2015-08-28 00:11:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static void SetCommandFiltered(ECommands cmd, bool filtered);
|
|
|
|
static void ResetCommandFilters();
|
|
|
|
static bool GetPressInput(ECommands cmd, const CFinalInput& input);
|
|
|
|
static bool GetDigitalInput(ECommands cmd, const CFinalInput& input);
|
|
|
|
static float GetAnalogInput(ECommands cmd, const CFinalInput& input);
|
|
|
|
static const char* GetDescriptionForCommand(ECommands cmd);
|
|
|
|
static const char* GetDescriptionForFunction(EFunctionList func);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
#endif // __PSHAG_CCONTROLMAPPER_HPP__
|