Mercurial > mm7
annotate Keyboard.h @ 2475:acac52e9e36a
remove DirectX11.cpp/.h for VS2010, MatrixMultiply and other
author | Ritor1 |
---|---|
date | Thu, 21 Aug 2014 11:24:51 +0600 |
parents | 6a7309a847ea |
children |
rev | line source |
---|---|
0 | 1 #pragma once |
2 | |
3 | |
4 /* 284 */ | |
5 enum InputAction : __int32 | |
6 { | |
7 INPUT_MoveForward = 0x0, | |
8 INPUT_MoveBackwards = 0x1, | |
9 INPUT_TurnLeft = 0x2, | |
10 INPUT_TurnRight = 0x3, | |
11 INPUT_Yell = 0x4, | |
12 INPUT_Jump = 0x5, | |
13 INPUT_Combat = 0x6, | |
14 INPUT_CastReady = 0x7, | |
15 INPUT_Attack = 0x8, | |
16 INPUT_EventTrigger = 0x9, | |
17 INPUT_Cast = 0xA, | |
18 INPUT_Pass = 0xB, | |
19 INPUT_CharCycle = 0xC, | |
20 INPUT_Quest = 0xD, | |
21 INPUT_QuickRef = 0xE, | |
22 INPUT_Rest = 0xF, | |
23 INPUT_TimeCal = 0x10, | |
24 INPUT_Autonotes = 0x11, | |
25 INPUT_Mapbook = 0x12, | |
26 INPUT_AlwaysRun = 0x13, | |
27 INPUT_LookUp = 0x14, | |
28 INPUT_LookDown = 0x15, | |
29 INPUT_CenterView = 0x16, | |
30 INPUT_ZoomIn = 0x17, | |
31 INPUT_ZoomOut = 0x18, | |
32 INPUT_FlyUp = 0x19, | |
33 INPUT_FlyDown = 0x1A, | |
34 INPUT_Land = 0x1B, | |
35 INPUT_StrafeLeft = 0x1C, | |
36 INPUT_StrafeRight = 0x1D, | |
37 }; | |
38 | |
39 | |
40 | |
41 enum KeyToggleType : __int32 | |
42 { | |
43 TOGGLE_Continuously = 0x0, | |
44 TOGGLE_OneTimePress = 0x1, | |
45 }; | |
46 | |
47 #pragma pack(push, 1) | |
48 struct KeyboardActionMapping | |
49 { | |
50 KeyboardActionMapping(); | |
51 | |
52 void SetKeyMapping(int uAction, int vKey, KeyToggleType type); | |
53 unsigned int GetActionVKey(enum InputAction eAction); | |
2200
f0477fe92362
Keyboard.cpp removing the huge cases and separating data and code
Grumpy7
parents:
2152
diff
changeset
|
54 const char *GetVKeyDisplayName(unsigned char a1); |
f0477fe92362
Keyboard.cpp removing the huge cases and separating data and code
Grumpy7
parents:
2152
diff
changeset
|
55 const unsigned __int8 TranslateKeyNameToKeyCode(const char *Str); |
0 | 56 void ReadMappings(); |
57 void StoreMappings(); | |
2201 | 58 bool ProcessTextInput(unsigned int a2); |
1038 | 59 void SetWindowInputStatus(int a2); |
60 void EnterText(int a2, int max_string_len, struct GUIWindow *pWindow); | |
0 | 61 void ResetKeys(); |
62 void SetDefaultMapping(); | |
63 | |
64 unsigned int uLastKeyPressed; | |
65 int field_4; | |
66 int field_8; | |
67 unsigned int pVirtualKeyCodesMapping[30]; | |
68 KeyToggleType pToggleTypes[30]; | |
1038 | 69 int max_input_string_len; |
2389 | 70 __int8 pPressedKeysBuffer[257]; |
0 | 71 unsigned __int8 uNumKeysPressed; |
72 char field_202; | |
73 char field_203; | |
74 int field_204; | |
75 struct GUIWindow *pWindow; | |
76 }; | |
77 #pragma pack(pop) | |
78 | |
79 #pragma pack(push, 1) | |
1103 | 80 class Keyboard |
0 | 81 { |
1103 | 82 public: |
2152 | 83 inline Keyboard(): |
84 bUsingAsynKeyboard(false) | |
85 {} | |
0 | 86 bool WasKeyPressed(int vKey); |
2201 | 87 static bool IsKeyBeingHeld(int vKey); |
2331
9551756f46c4
Moving functions out of mm7_6.cpp into appropriate classes as static methods or free functions
Grumpy7
parents:
2201
diff
changeset
|
88 static void ProcessInputActions(); |
0 | 89 bool IsShiftHeld(); |
90 void EnterCriticalSection(); | |
91 | |
1458 | 92 void ( ***vdestructor_ptr)(Keyboard *, bool); |
0 | 93 unsigned int bUsingAsynKeyboard; |
94 }; | |
95 #pragma pack(pop) | |
96 | |
97 | |
98 | |
2343 | 99 void OnPressSpace(); |
0 | 100 |
1038 | 101 extern struct KeyboardActionMapping *pKeyActionMap; |