-
Notifications
You must be signed in to change notification settings - Fork 1
/
charDatClass.h
136 lines (120 loc) · 2.18 KB
/
charDatClass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#ifndef CASTER_CHARDAT
#define CASTER_CHARDAT
#if _MSC_VER >= 1300
# include <windows.h>
# define DIRECTINPUT_VERSION 0x0700//DirectX7 ‚Ì DirectInput‚ðŽg—p
# include <dinput.h>
# include <iostream>
#else
# include <windows.h>
# include <dinput.h>
# include <iostream.h>
#endif
#define key_right 1
#define key_left 2
#define key_down 4
#define key_up 8
#define key_A 16
#define key_B 32
#define key_C 64
#define key_start 256
typedef struct{
LONG X;
LONG Y;
LONG Z;
LONG Rx;
LONG Ry;
LONG Rz;
LONG S1;
LONG S2;
LONG P1;
LONG P2;
LONG P3;
LONG P4;
BYTE Button1;
BYTE Button2;
BYTE Button3;
BYTE Button4;
BYTE Button5;
BYTE Button6;
BYTE Button7;
BYTE Button8;
BYTE Button9;
BYTE Button10;
BYTE Button11;
BYTE Button12;
BYTE Button13;
BYTE Button14;
BYTE Button15;
BYTE Button16;
BYTE Button17;
BYTE Button18;
BYTE Button19;
BYTE Button20;
BYTE Button21;
BYTE Button22;
BYTE Button23;
BYTE Button24;
BYTE Button25;
BYTE Button26;
BYTE Button27;
BYTE Button28;
BYTE Button29;
BYTE Button30;
BYTE Button31;
BYTE Button32;
} joyStatusFormat;
class charDatClass{
private:
BYTE keyIniUp;
BYTE keyIniDown;
BYTE keyIniLeft;
BYTE keyIniRight;
BYTE keyIniA;
BYTE keyIniB;
BYTE keyIniC;
BYTE keyIniStart;
BYTE keyIniAB;
BYTE keyIniBC;
BYTE keyIniABC;
joyStatusFormat joyStatus;
BYTE keyStatus[256];
BYTE* Button;
BYTE inputBufBody[7];
BYTE inputBufChar[7];
LPDIRECTINPUT di;
LPDIRECTINPUTDEVICE2 device;
int isPolledDevice;
public:
charDatClass();
~charDatClass();
int init_int(int n);
int init();
int init2p();
int diInit();
int GetInput();
int SetInput(int);
int SetBodyInput(int);
int SetCharInput(int);
void end();
void storeCharInput();
void storeBodyInput();
void writeCharInput();
void writeBodyInput();
DWORD lastCharInput;
DWORD storedCharInput;
DWORD lastBodyInput;
DWORD storedBodyInput;
GUID guid;
BYTE inputDeviceType;
WORD enumCounter;
WORD playerSide;
WORD diFlg;
WORD* th075Flg;
HANDLE* hProcess;
BYTE permissionA;
BYTE permissionB;
bool forceJoystick;
int povSensitivity;
};
#endif