annotate Keyboard.h @ 1303:dcc52e17b517

m
author Ritor1
date Sun, 23 Jun 2013 14:02:07 +0600
parents db395ce89ede
children 934074e7fcc1
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4 /* 284 */
Ritor1
parents:
diff changeset
5 enum InputAction : __int32
Ritor1
parents:
diff changeset
6 {
Ritor1
parents:
diff changeset
7 INPUT_MoveForward = 0x0,
Ritor1
parents:
diff changeset
8 INPUT_MoveBackwards = 0x1,
Ritor1
parents:
diff changeset
9 INPUT_TurnLeft = 0x2,
Ritor1
parents:
diff changeset
10 INPUT_TurnRight = 0x3,
Ritor1
parents:
diff changeset
11 INPUT_Yell = 0x4,
Ritor1
parents:
diff changeset
12 INPUT_Jump = 0x5,
Ritor1
parents:
diff changeset
13 INPUT_Combat = 0x6,
Ritor1
parents:
diff changeset
14 INPUT_CastReady = 0x7,
Ritor1
parents:
diff changeset
15 INPUT_Attack = 0x8,
Ritor1
parents:
diff changeset
16 INPUT_EventTrigger = 0x9,
Ritor1
parents:
diff changeset
17 INPUT_Cast = 0xA,
Ritor1
parents:
diff changeset
18 INPUT_Pass = 0xB,
Ritor1
parents:
diff changeset
19 INPUT_CharCycle = 0xC,
Ritor1
parents:
diff changeset
20 INPUT_Quest = 0xD,
Ritor1
parents:
diff changeset
21 INPUT_QuickRef = 0xE,
Ritor1
parents:
diff changeset
22 INPUT_Rest = 0xF,
Ritor1
parents:
diff changeset
23 INPUT_TimeCal = 0x10,
Ritor1
parents:
diff changeset
24 INPUT_Autonotes = 0x11,
Ritor1
parents:
diff changeset
25 INPUT_Mapbook = 0x12,
Ritor1
parents:
diff changeset
26 INPUT_AlwaysRun = 0x13,
Ritor1
parents:
diff changeset
27 INPUT_LookUp = 0x14,
Ritor1
parents:
diff changeset
28 INPUT_LookDown = 0x15,
Ritor1
parents:
diff changeset
29 INPUT_CenterView = 0x16,
Ritor1
parents:
diff changeset
30 INPUT_ZoomIn = 0x17,
Ritor1
parents:
diff changeset
31 INPUT_ZoomOut = 0x18,
Ritor1
parents:
diff changeset
32 INPUT_FlyUp = 0x19,
Ritor1
parents:
diff changeset
33 INPUT_FlyDown = 0x1A,
Ritor1
parents:
diff changeset
34 INPUT_Land = 0x1B,
Ritor1
parents:
diff changeset
35 INPUT_StrafeLeft = 0x1C,
Ritor1
parents:
diff changeset
36 INPUT_StrafeRight = 0x1D,
Ritor1
parents:
diff changeset
37 };
Ritor1
parents:
diff changeset
38
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40
Ritor1
parents:
diff changeset
41 enum KeyToggleType : __int32
Ritor1
parents:
diff changeset
42 {
Ritor1
parents:
diff changeset
43 TOGGLE_Continuously = 0x0,
Ritor1
parents:
diff changeset
44 TOGGLE_OneTimePress = 0x1,
Ritor1
parents:
diff changeset
45 };
Ritor1
parents:
diff changeset
46
Ritor1
parents:
diff changeset
47 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
48 struct KeyboardActionMapping
Ritor1
parents:
diff changeset
49 {
Ritor1
parents:
diff changeset
50 KeyboardActionMapping();
Ritor1
parents:
diff changeset
51
Ritor1
parents:
diff changeset
52 void SetKeyMapping(int uAction, int vKey, KeyToggleType type);
Ritor1
parents:
diff changeset
53 unsigned int GetActionVKey(enum InputAction eAction);
Ritor1
parents:
diff changeset
54 const char *GetVKeyDisplayName(signed int a1);
Ritor1
parents:
diff changeset
55 const unsigned __int8 GetActionDefaultVKey(const char *Str);
Ritor1
parents:
diff changeset
56 void ReadMappings();
Ritor1
parents:
diff changeset
57 void StoreMappings();
Ritor1
parents:
diff changeset
58 bool _459F10(unsigned int a2);
1038
39f42990698f Cleanings
Nomad
parents: 3
diff changeset
59 void SetWindowInputStatus(int a2);
39f42990698f Cleanings
Nomad
parents: 3
diff changeset
60 void EnterText(int a2, int max_string_len, struct GUIWindow *pWindow);
0
Ritor1
parents:
diff changeset
61 void ResetKeys();
Ritor1
parents:
diff changeset
62 void SetDefaultMapping();
Ritor1
parents:
diff changeset
63
Ritor1
parents:
diff changeset
64 unsigned int uLastKeyPressed;
Ritor1
parents:
diff changeset
65 int field_4;
Ritor1
parents:
diff changeset
66 int field_8;
Ritor1
parents:
diff changeset
67 unsigned int pVirtualKeyCodesMapping[30];
Ritor1
parents:
diff changeset
68 KeyToggleType pToggleTypes[30];
1038
39f42990698f Cleanings
Nomad
parents: 3
diff changeset
69 int max_input_string_len;
0
Ritor1
parents:
diff changeset
70 unsigned __int8 pPressedKeysBuffer[257];
Ritor1
parents:
diff changeset
71 unsigned __int8 uNumKeysPressed;
Ritor1
parents:
diff changeset
72 char field_202;
Ritor1
parents:
diff changeset
73 char field_203;
Ritor1
parents:
diff changeset
74 int field_204;
Ritor1
parents:
diff changeset
75 struct GUIWindow *pWindow;
Ritor1
parents:
diff changeset
76 };
Ritor1
parents:
diff changeset
77 #pragma pack(pop)
Ritor1
parents:
diff changeset
78
Ritor1
parents:
diff changeset
79 #pragma pack(push, 1)
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1038
diff changeset
80 class Keyboard
0
Ritor1
parents:
diff changeset
81 {
1103
db395ce89ede struct/class incostintency
Grumpy7
parents: 1038
diff changeset
82 public:
0
Ritor1
parents:
diff changeset
83 Keyboard();
Ritor1
parents:
diff changeset
84 bool WasKeyPressed(int vKey);
Ritor1
parents:
diff changeset
85 bool IsKeyBeingHeld(int vKey);
Ritor1
parents:
diff changeset
86 bool IsShiftHeld();
Ritor1
parents:
diff changeset
87 void EnterCriticalSection();
Ritor1
parents:
diff changeset
88
Ritor1
parents:
diff changeset
89 void (__thiscall ***vdestructor_ptr)(Keyboard *, bool);
Ritor1
parents:
diff changeset
90 unsigned int bUsingAsynKeyboard;
Ritor1
parents:
diff changeset
91 };
Ritor1
parents:
diff changeset
92 #pragma pack(pop)
Ritor1
parents:
diff changeset
93
Ritor1
parents:
diff changeset
94
Ritor1
parents:
diff changeset
95
Ritor1
parents:
diff changeset
96
1038
39f42990698f Cleanings
Nomad
parents: 3
diff changeset
97 extern struct KeyboardActionMapping *pKeyActionMap;