102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference |
GitLab repository
Toggle main menu visibility
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1
#ifndef PCDOGS_INPUT_CONSTANTS_H
2
#define PCDOGS_INPUT_CONSTANTS_H
3
4
#define INPUT_BUTTON_LEFT (1 << 0)
5
#define INPUT_BUTTON_RIGHT (1 << 1)
6
#define INPUT_BUTTON_UP (1 << 2)
7
#define INPUT_BUTTON_DOWN (1 << 3)
8
#define INPUT_BUTTON_ACTION_1 (1 << 4)
9
#define INPUT_BUTTON_ACTION_2 (1 << 5)
10
#define INPUT_BUTTON_ACTION_3 (1 << 6)
11
#define INPUT_BUTTON_CONFIRM (1 << 7)
12
#define INPUT_BUTTON_LEFT_TRIGGER (1 << 10)
13
#define INPUT_BUTTON_RIGHT_TRIGGER (1 << 11)
14
#define INPUT_BUTTON_CAMERA_YAW_NEGATIVE (1 << 12)
15
#define INPUT_BUTTON_CAMERA_YAW_POSITIVE (1 << 13)
16
#define INPUT_BUTTON_SPECIAL (1 << 14)
17
#define INPUT_BUTTON_CANCEL (1 << 15)
18
#define INPUT_BUTTON_DIRECTIONS (INPUT_BUTTON_LEFT | INPUT_BUTTON_RIGHT | INPUT_BUTTON_UP | INPUT_BUTTON_DOWN)
19
#define INPUT_STATE_RETURN_TO_TITLE_REQUEST (1 << 28)
20
#define INPUT_STATE_DISABLED (1 << 29)
21
#define INPUT_DIRECTINPUT_VERSION 0x700
22
#define INPUT_DEVICE_ENUM_CAPACITY 8
23
#define INPUT_JOYSTICK_AXIS_MIN 0xfffffc18
24
#define INPUT_JOYSTICK_AXIS_MAX 1000
25
#define INPUT_JOYSTICK_DIGITAL_THRESHOLD 700
26
#define INPUT_JOYSTICK_RZ_THRESHOLD 600
27
#define INPUT_JOYSTICK_DEADZONE 100
28
#define INPUT_KEY_CODE_COUNT 256
29
#define INPUT_KEY_CODE_MAX (INPUT_KEY_CODE_COUNT - 1)
30
#define INPUT_LOCALIZED_GAMEPAD_CODE_BIAS 744
31
#define INPUT_BUTTON_NAME_CAPACITY 20
32
#define INPUT_PLAYER_COUNT 2
33
#define INPUT_Q12_SHIFT 12
34
#define INPUT_Q14_TO_Q12_SHIFT 2
35
#define INPUT_BUTTON_DOWN_BIT_INDEX 7
36
#define INPUT_MAPPING_ENTRY_SHIFT 2
37
#define INPUT_MAPPING_ENTRY_BYTES 4
38
#define INPUT_Q12_ONE 4096
39
#define INPUT_Q12_NEGATIVE_ONE_BITS 0xf000
40
#define INPUT_ANGLE_QUARTER_TURN 1024
41
#define INPUT_ANGLE_EIGHTH_TURN 512
42
#define INPUT_ANGLE_HALF_TURN 2048
43
#define INPUT_DIGITAL_STRENGTH 100
44
#define INPUT_ANALOG_STRENGTH_MAX 200
45
#define INPUT_BIT_INDEX_MASK 31
46
#define INPUT_BIT_COUNT 32
47
#define INPUT_AXIS_DISPATCH_LAST_OFFSET 39
48
#define INPUT_RUMBLE_DURATION_MICROSECONDS 100000
49
#define INPUT_RUMBLE_SCALE_DEFAULT 0.75f
50
#define INPUT_AXIS_RECIPROCAL_RANGE 0.00166666671f
51
#define INPUT_Q12_RECIPROCAL 0.000244140625f
52
#define INPUT_RUMBLE_FULL_MAGNITUDE 10000.0f
53
#define INPUT_RUMBLE_HALF_MAGNITUDE 5000.0f
54
#define INPUT_CHEAT_SEQUENCE_LENGTH 6
55
#define INPUT_DEFAULT_GAMMA 5
56
#define INPUT_DEFAULT_PLAYER_ONE_BINDING_COUNT 11
57
#define INPUT_DEFAULT_PLAYER_TWO_BINDING_COUNT 10
58
#define INPUT_CONTROLLER_PRESET_TAIL_COUNT 9
59
#define INPUT_NO_CONTROL (-1)
60
/* Low-byte arithmetic mask computes the native inactive analog result. */
61
#define INPUT_INACTIVE_ANALOG_RESULT_MASK 0x38
62
63
enum
Input_JoystickSetupMode
64
{
65
INPUT_JOYSTICK_BASIC
= 1,
66
INPUT_JOYSTICK_EXTENDED
= 2
67
};
68
69
enum
Input_GamepadControlCode
70
{
71
INPUT_GAMEPAD_UP
= 1000,
72
INPUT_GAMEPAD_DOWN
,
73
INPUT_GAMEPAD_LEFT
,
74
INPUT_GAMEPAD_RIGHT
,
75
INPUT_GAMEPAD_RZ_NEGATIVE
,
76
INPUT_GAMEPAD_RZ_POSITIVE
,
77
INPUT_GAMEPAD_BUTTON_0
,
78
INPUT_GAMEPAD_BUTTON_1
,
79
INPUT_GAMEPAD_BUTTON_2
,
80
INPUT_GAMEPAD_BUTTON_3
,
81
INPUT_GAMEPAD_BUTTON_4
,
82
INPUT_GAMEPAD_BUTTON_5
,
83
INPUT_GAMEPAD_BUTTON_6
,
84
INPUT_GAMEPAD_BUTTON_7
,
85
INPUT_GAMEPAD_BUTTON_8
,
86
INPUT_GAMEPAD_BUTTON_9
,
87
INPUT_GAMEPAD_BUTTON_10
,
88
INPUT_GAMEPAD_BUTTON_11
,
89
INPUT_GAMEPAD_BUTTON_12
90
};
91
92
enum
Input_AnalogControlCode
93
{
94
INPUT_ANALOG_COMBINED_POSITIVE_X
= 32,
95
INPUT_ANALOG_COMBINED_NEGATIVE_X
,
96
INPUT_ANALOG_COMBINED_POSITIVE_Y
,
97
INPUT_ANALOG_COMBINED_NEGATIVE_Y
98
};
99
100
enum
Input_AxisDispatch
101
{
102
INPUT_AXIS_COMBINED
= 0,
103
INPUT_AXIS_PRIMARY_POSITIVE_X
,
104
INPUT_AXIS_PRIMARY_NEGATIVE_X
,
105
INPUT_AXIS_PRIMARY_POSITIVE_Y
,
106
INPUT_AXIS_PRIMARY_NEGATIVE_Y
,
107
INPUT_AXIS_AUX_POSITIVE_X
,
108
INPUT_AXIS_AUX_NEGATIVE_X
,
109
INPUT_AXIS_AUX_POSITIVE_Y
,
110
INPUT_AXIS_AUX_NEGATIVE_Y
111
};
112
113
enum
Input_ButtonNameIndex
114
{
115
INPUT_BUTTON_NAME_LEFT
= 0,
116
INPUT_BUTTON_NAME_RIGHT
,
117
INPUT_BUTTON_NAME_UP
,
118
INPUT_BUTTON_NAME_DOWN
,
119
INPUT_BUTTON_NAME_LEFT_TRIGGER
,
120
INPUT_BUTTON_NAME_RIGHT_TRIGGER
,
121
INPUT_BUTTON_NAME_CONFIRM
,
122
INPUT_BUTTON_NAME_ACTION_1
,
123
INPUT_BUTTON_NAME_ACTION_3
,
124
INPUT_BUTTON_NAME_ACTION_2
,
125
INPUT_BUTTON_NAME_CANCEL
,
126
INPUT_BUTTON_NAME_SPECIAL
,
127
INPUT_BUTTON_NAME_UNASSIGNED
128
};
129
130
#endif
Input_JoystickSetupMode
Input_JoystickSetupMode
Definition
constants.h:64
INPUT_JOYSTICK_BASIC
@ INPUT_JOYSTICK_BASIC
Definition
constants.h:65
INPUT_JOYSTICK_EXTENDED
@ INPUT_JOYSTICK_EXTENDED
Definition
constants.h:66
Input_ButtonNameIndex
Input_ButtonNameIndex
Definition
constants.h:114
INPUT_BUTTON_NAME_ACTION_2
@ INPUT_BUTTON_NAME_ACTION_2
Definition
constants.h:124
INPUT_BUTTON_NAME_CANCEL
@ INPUT_BUTTON_NAME_CANCEL
Definition
constants.h:125
INPUT_BUTTON_NAME_ACTION_3
@ INPUT_BUTTON_NAME_ACTION_3
Definition
constants.h:123
INPUT_BUTTON_NAME_UP
@ INPUT_BUTTON_NAME_UP
Definition
constants.h:117
INPUT_BUTTON_NAME_DOWN
@ INPUT_BUTTON_NAME_DOWN
Definition
constants.h:118
INPUT_BUTTON_NAME_LEFT
@ INPUT_BUTTON_NAME_LEFT
Definition
constants.h:115
INPUT_BUTTON_NAME_CONFIRM
@ INPUT_BUTTON_NAME_CONFIRM
Definition
constants.h:121
INPUT_BUTTON_NAME_LEFT_TRIGGER
@ INPUT_BUTTON_NAME_LEFT_TRIGGER
Definition
constants.h:119
INPUT_BUTTON_NAME_ACTION_1
@ INPUT_BUTTON_NAME_ACTION_1
Definition
constants.h:122
INPUT_BUTTON_NAME_UNASSIGNED
@ INPUT_BUTTON_NAME_UNASSIGNED
Definition
constants.h:127
INPUT_BUTTON_NAME_RIGHT_TRIGGER
@ INPUT_BUTTON_NAME_RIGHT_TRIGGER
Definition
constants.h:120
INPUT_BUTTON_NAME_RIGHT
@ INPUT_BUTTON_NAME_RIGHT
Definition
constants.h:116
INPUT_BUTTON_NAME_SPECIAL
@ INPUT_BUTTON_NAME_SPECIAL
Definition
constants.h:126
Input_AnalogControlCode
Input_AnalogControlCode
Definition
constants.h:93
INPUT_ANALOG_COMBINED_NEGATIVE_X
@ INPUT_ANALOG_COMBINED_NEGATIVE_X
Definition
constants.h:95
INPUT_ANALOG_COMBINED_NEGATIVE_Y
@ INPUT_ANALOG_COMBINED_NEGATIVE_Y
Definition
constants.h:97
INPUT_ANALOG_COMBINED_POSITIVE_X
@ INPUT_ANALOG_COMBINED_POSITIVE_X
Definition
constants.h:94
INPUT_ANALOG_COMBINED_POSITIVE_Y
@ INPUT_ANALOG_COMBINED_POSITIVE_Y
Definition
constants.h:96
Input_GamepadControlCode
Input_GamepadControlCode
Definition
constants.h:70
INPUT_GAMEPAD_BUTTON_6
@ INPUT_GAMEPAD_BUTTON_6
Definition
constants.h:83
INPUT_GAMEPAD_DOWN
@ INPUT_GAMEPAD_DOWN
Definition
constants.h:72
INPUT_GAMEPAD_UP
@ INPUT_GAMEPAD_UP
Definition
constants.h:71
INPUT_GAMEPAD_LEFT
@ INPUT_GAMEPAD_LEFT
Definition
constants.h:73
INPUT_GAMEPAD_BUTTON_3
@ INPUT_GAMEPAD_BUTTON_3
Definition
constants.h:80
INPUT_GAMEPAD_BUTTON_11
@ INPUT_GAMEPAD_BUTTON_11
Definition
constants.h:88
INPUT_GAMEPAD_BUTTON_7
@ INPUT_GAMEPAD_BUTTON_7
Definition
constants.h:84
INPUT_GAMEPAD_BUTTON_0
@ INPUT_GAMEPAD_BUTTON_0
Definition
constants.h:77
INPUT_GAMEPAD_BUTTON_2
@ INPUT_GAMEPAD_BUTTON_2
Definition
constants.h:79
INPUT_GAMEPAD_BUTTON_8
@ INPUT_GAMEPAD_BUTTON_8
Definition
constants.h:85
INPUT_GAMEPAD_BUTTON_1
@ INPUT_GAMEPAD_BUTTON_1
Definition
constants.h:78
INPUT_GAMEPAD_BUTTON_4
@ INPUT_GAMEPAD_BUTTON_4
Definition
constants.h:81
INPUT_GAMEPAD_RIGHT
@ INPUT_GAMEPAD_RIGHT
Definition
constants.h:74
INPUT_GAMEPAD_BUTTON_9
@ INPUT_GAMEPAD_BUTTON_9
Definition
constants.h:86
INPUT_GAMEPAD_BUTTON_10
@ INPUT_GAMEPAD_BUTTON_10
Definition
constants.h:87
INPUT_GAMEPAD_BUTTON_5
@ INPUT_GAMEPAD_BUTTON_5
Definition
constants.h:82
INPUT_GAMEPAD_BUTTON_12
@ INPUT_GAMEPAD_BUTTON_12
Definition
constants.h:89
INPUT_GAMEPAD_RZ_NEGATIVE
@ INPUT_GAMEPAD_RZ_NEGATIVE
Definition
constants.h:75
INPUT_GAMEPAD_RZ_POSITIVE
@ INPUT_GAMEPAD_RZ_POSITIVE
Definition
constants.h:76
Input_AxisDispatch
Input_AxisDispatch
Definition
constants.h:101
INPUT_AXIS_AUX_NEGATIVE_X
@ INPUT_AXIS_AUX_NEGATIVE_X
Definition
constants.h:108
INPUT_AXIS_AUX_POSITIVE_Y
@ INPUT_AXIS_AUX_POSITIVE_Y
Definition
constants.h:109
INPUT_AXIS_PRIMARY_NEGATIVE_Y
@ INPUT_AXIS_PRIMARY_NEGATIVE_Y
Definition
constants.h:106
INPUT_AXIS_COMBINED
@ INPUT_AXIS_COMBINED
Definition
constants.h:102
INPUT_AXIS_PRIMARY_POSITIVE_X
@ INPUT_AXIS_PRIMARY_POSITIVE_X
Definition
constants.h:103
INPUT_AXIS_PRIMARY_NEGATIVE_X
@ INPUT_AXIS_PRIMARY_NEGATIVE_X
Definition
constants.h:104
INPUT_AXIS_AUX_POSITIVE_X
@ INPUT_AXIS_AUX_POSITIVE_X
Definition
constants.h:107
INPUT_AXIS_PRIMARY_POSITIVE_Y
@ INPUT_AXIS_PRIMARY_POSITIVE_Y
Definition
constants.h:105
INPUT_AXIS_AUX_NEGATIVE_Y
@ INPUT_AXIS_AUX_NEGATIVE_Y
Definition
constants.h:110
include
pcdogs
input
constants.h
Generated by
1.17.0