-
Notifications
You must be signed in to change notification settings - Fork 0
/
defines.go
364 lines (347 loc) · 8.99 KB
/
defines.go
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
package dxlib
// Boolean
const (
TRUE = 1
FALSE = 0
)
// 描画先画面指定用定義
const (
DX_SCREEN_FRONT = -4
DX_SCREEN_BACK = -2
DX_SCREEN_WORK = -3
DX_SCREEN_TEMPFRONT = -16
DX_SCREEN_OTHER = -6
DX_NONE_GRAPH = -5 // グラフィックなしハンドル
)
// 入力タイプ
const (
DX_CHECKINPUT_KEY = 1
DX_CHECKINPUT_PAD = 2
DX_CHECKINPUT_MOUSE = 4
DX_CHECKINPUT_ALL = DX_CHECKINPUT_KEY
)
// キー入力
const (
KEY_INPUT_BACK = 14
KEY_INPUT_TAB = 15
KEY_INPUT_RETURN = 28
KEY_INPUT_LSHIFT = 42
KEY_INPUT_RSHIFT = 54
KEY_INPUT_LCONTROL = 29
KEY_INPUT_RCONTROL = 157
KEY_INPUT_ESCAPE = 1
KEY_INPUT_SPACE = 57
KEY_INPUT_PGUP = 201
KEY_INPUT_PGDN = 209
KEY_INPUT_END = 207
KEY_INPUT_HOME = 199
KEY_INPUT_LEFT = 203
KEY_INPUT_UP = 200
KEY_INPUT_RIGHT = 205
KEY_INPUT_DOWN = 208
KEY_INPUT_INSERT = 210
KEY_INPUT_DELETE = 211
KEY_INPUT_MINUS = 12
KEY_INPUT_YEN = 125
KEY_INPUT_PREVTRACK = 144
KEY_INPUT_PERIOD = 52
KEY_INPUT_SLASH = 53
KEY_INPUT_LALT = 56
KEY_INPUT_RALT = 184
KEY_INPUT_SCROLL = 70
KEY_INPUT_SEMICOLON = 39
KEY_INPUT_COLON = 146
KEY_INPUT_LBRACKET = 26
KEY_INPUT_RBRACKET = 27
KEY_INPUT_AT = 145
KEY_INPUT_BACKSLASH = 43
KEY_INPUT_COMMA = 51
KEY_INPUT_KANJI = 148
KEY_INPUT_CONVERT = 121
KEY_INPUT_NOCONVERT = 123
KEY_INPUT_KANA = 112
KEY_INPUT_APPS = 221
KEY_INPUT_CAPSLOCK = 58
KEY_INPUT_SYSRQ = 183
KEY_INPUT_PAUSE = 197
KEY_INPUT_LWIN = 219
KEY_INPUT_RWIN = 220
KEY_INPUT_NUMLOCK = 69
KEY_INPUT_NUMPAD0 = 82
KEY_INPUT_NUMPAD1 = 79
KEY_INPUT_NUMPAD2 = 80
KEY_INPUT_NUMPAD3 = 81
KEY_INPUT_NUMPAD4 = 75
KEY_INPUT_NUMPAD5 = 76
KEY_INPUT_NUMPAD6 = 77
KEY_INPUT_NUMPAD7 = 71
KEY_INPUT_NUMPAD8 = 72
KEY_INPUT_NUMPAD9 = 73
KEY_INPUT_MULTIPLY = 55
KEY_INPUT_ADD = 78
KEY_INPUT_SUBTRACT = 74
KEY_INPUT_DECIMAL = 83
KEY_INPUT_DIVIDE = 181
KEY_INPUT_NUMPADENTER = 156
KEY_INPUT_F1 = 59
KEY_INPUT_F2 = 60
KEY_INPUT_F3 = 61
KEY_INPUT_F4 = 62
KEY_INPUT_F5 = 63
KEY_INPUT_F6 = 64
KEY_INPUT_F7 = 65
KEY_INPUT_F8 = 66
KEY_INPUT_F9 = 67
KEY_INPUT_F10 = 68
KEY_INPUT_F11 = 87
KEY_INPUT_F12 = 88
KEY_INPUT_A = 30
KEY_INPUT_B = 48
KEY_INPUT_C = 46
KEY_INPUT_D = 32
KEY_INPUT_E = 18
KEY_INPUT_F = 33
KEY_INPUT_G = 34
KEY_INPUT_H = 35
KEY_INPUT_I = 23
KEY_INPUT_J = 36
KEY_INPUT_K = 37
KEY_INPUT_L = 38
KEY_INPUT_M = 50
KEY_INPUT_N = 49
KEY_INPUT_O = 24
KEY_INPUT_P = 25
KEY_INPUT_Q = 16
KEY_INPUT_R = 19
KEY_INPUT_S = 31
KEY_INPUT_T = 20
KEY_INPUT_U = 22
KEY_INPUT_V = 47
KEY_INPUT_W = 17
KEY_INPUT_X = 45
KEY_INPUT_Y = 21
KEY_INPUT_Z = 44
KEY_INPUT_0 = 11
KEY_INPUT_1 = 2
KEY_INPUT_2 = 3
KEY_INPUT_3 = 4
KEY_INPUT_4 = 5
KEY_INPUT_5 = 6
KEY_INPUT_6 = 7
KEY_INPUT_7 = 8
KEY_INPUT_8 = 9
KEY_INPUT_9 = 10
)
// パッド入力
const (
DX_INPUT_PAD1 = 1
DX_INPUT_PAD2 = 2
DX_INPUT_PAD3 = 3
DX_INPUT_PAD4 = 4
DX_INPUT_PAD5 = 5
DX_INPUT_PAD6 = 6
DX_INPUT_PAD7 = 7
DX_INPUT_PAD8 = 8
DX_INPUT_PAD9 = 9
DX_INPUT_PAD10 = 10
DX_INPUT_PAD11 = 11
DX_INPUT_PAD12 = 12
DX_INPUT_PAD13 = 13
DX_INPUT_PAD14 = 14
DX_INPUT_PAD15 = 15
DX_INPUT_PAD16 = 16
DX_INPUT_KEY = 4096
TOUCHINPUTPOINT_MAX = 16
PAD_INPUT_DOWN = 1
PAD_INPUT_LEFT = 2
PAD_INPUT_RIGHT = 4
PAD_INPUT_UP = 8
PAD_INPUT_A = 16
PAD_INPUT_B = 32
PAD_INPUT_C = 64
PAD_INPUT_X = 128
PAD_INPUT_Y = 256
PAD_INPUT_Z = 512
PAD_INPUT_L = 1024
PAD_INPUT_R = 2048
PAD_INPUT_START = 4096
PAD_INPUT_M = 8192
PAD_INPUT_D = 16384
PAD_INPUT_F = 32768
PAD_INPUT_G = 65536
PAD_INPUT_H = 131072
PAD_INPUT_I = 262144
PAD_INPUT_J = 524288
PAD_INPUT_K = 1048576
PAD_INPUT_LL = 2097152
PAD_INPUT_N = 4194304
PAD_INPUT_O = 8388608
PAD_INPUT_P = 16777216
PAD_INPUT_RR = 33554432
PAD_INPUT_S = 67108864
PAD_INPUT_T = 134217728
PAD_INPUT_U = 268435456
PAD_INPUT_V = 536870912
PAD_INPUT_W = 1073741824
PAD_INPUT_XX = -2147483648
PAD_INPUT_1 = 16
PAD_INPUT_2 = 32
PAD_INPUT_3 = 64
PAD_INPUT_4 = 128
PAD_INPUT_5 = 256
PAD_INPUT_6 = 512
PAD_INPUT_7 = 1024
PAD_INPUT_8 = 2048
PAD_INPUT_9 = 4096
PAD_INPUT_10 = 8192
PAD_INPUT_11 = 16384
PAD_INPUT_12 = 32768
PAD_INPUT_13 = 65536
PAD_INPUT_14 = 131072
PAD_INPUT_15 = 262144
PAD_INPUT_16 = 524288
PAD_INPUT_17 = 1048576
PAD_INPUT_18 = 2097152
PAD_INPUT_19 = 4194304
PAD_INPUT_20 = 8388608
PAD_INPUT_21 = 16777216
PAD_INPUT_22 = 33554432
PAD_INPUT_23 = 67108864
PAD_INPUT_24 = 134217728
PAD_INPUT_25 = 268435456
PAD_INPUT_26 = 536870912
PAD_INPUT_27 = 1073741824
PAD_INPUT_28 = -2147483648
)
// XInput
const (
XINPUT_BUTTON_DPAD_UP = 0
XINPUT_BUTTON_DPAD_DOWN = 1
XINPUT_BUTTON_DPAD_LEFT = 2
XINPUT_BUTTON_DPAD_RIGHT = 3
XINPUT_BUTTON_START = 4
XINPUT_BUTTON_BACK = 5
XINPUT_BUTTON_LEFT_THUMB = 6
XINPUT_BUTTON_RIGHT_THUMB = 7
XINPUT_BUTTON_LEFT_SHOULDER = 8
XINPUT_BUTTON_RIGHT_SHOULDER = 9
XINPUT_BUTTON_A = 12
XINPUT_BUTTON_B = 13
XINPUT_BUTTON_X = 14
XINPUT_BUTTON_Y = 15
)
// マウス入力
const (
MOUSE_INPUT_LEFT = 1
MOUSE_INPUT_RIGHT = 2
MOUSE_INPUT_MIDDLE = 4
MOUSE_INPUT_1 = 1
MOUSE_INPUT_2 = 2
MOUSE_INPUT_3 = 4
MOUSE_INPUT_4 = 8
MOUSE_INPUT_5 = 16
MOUSE_INPUT_6 = 32
MOUSE_INPUT_7 = 64
MOUSE_INPUT_8 = 128
MOUSE_INPUT_LOG_DOWN = 0
MOUSE_INPUT_LOG_UP = 1
)
// 操作コード ...
const (
CTRL_CODE_BS = 8
CTRL_CODE_TAB = 9
CTRL_CODE_CR = 13
CTRL_CODE_DEL = 16
CTRL_CODE_COPY = 3
CTRL_CODE_PASTE = 22
CTRL_CODE_CUT = 24
CTRL_CODE_ALL = 1
CTRL_CODE_LEFT = 29
CTRL_CODE_RIGHT = 28
CTRL_CODE_UP = 30
CTRL_CODE_DOWN = 31
CTRL_CODE_HOME = 26
CTRL_CODE_END = 25
CTRL_CODE_PAGE_UP = 23
CTRL_CODE_PAGE_DOWN = 21
CTRL_CODE_ESC = 27
CTRL_CODE_CMP = 32
)
// 音楽プレイタイプ
const (
DX_PLAYTYPE_LOOPBIT = 2
DX_PLAYTYPE_BACKBIT = 1
DX_PLAYTYPE_NORMAL = 0
DX_PLAYTYPE_BACK = DX_PLAYTYPE_BACKBIT
DX_PLAYTYPE_LOOP = DX_PLAYTYPE_LOOPBIT | DX_PLAYTYPE_BACKBIT
)
// 描画モード
const (
DX_DRAWMODE_NEAREST = 0
DX_DRAWMODE_BILINEAR = 1
DX_DRAWMODE_ANISOTROPIC = 2
DX_DRAWMODE_OTHER = 3
DX_DRAWMODE_NUM = 4
)
// 動画再生タイプ
const (
DX_MOVIEPLAYTYPE_BCANCEL = 0
DX_MOVIEPLAYTYPE_NORMAL = 1
)
// ブレンドモード
const (
DX_BLENDMODE_NOBLEND = 0
DX_BLENDMODE_ALPHA = 1
DX_BLENDMODE_ADD = 2
DX_BLENDMODE_SUB = 3
DX_BLENDMODE_MUL = 4
DX_BLENDMODE_SUB2 = 5
DX_BLENDMODE_XOR = 6
DX_BLENDMODE_DESTCOLOR = 8
DX_BLENDMODE_INVDESTCOLOR = 9
DX_BLENDMODE_INVSRC = 10
DX_BLENDMODE_MULA = 11
DX_BLENDMODE_ALPHA_X4 = 12
DX_BLENDMODE_ADD_X4 = 13
DX_BLENDMODE_SRCCOLOR = 14
DX_BLENDMODE_HALF_ADD = 15
DX_BLENDMODE_SUB1 = 16
DX_BLENDMODE_PMA_ALPHA = 17
DX_BLENDMODE_PMA_ADD = 18
DX_BLENDMODE_PMA_SUB = 19
DX_BLENDMODE_PMA_INVSRC = 20
DX_BLENDMODE_PMA_ALPHA_X4 = 21
DX_BLENDMODE_PMA_ADD_X4 = 22
DX_BLENDMODE_LIVE2D_ZERO = 23
DX_BLENDMODE_LIVE2D_NORMAL = 24
DX_BLENDMODE_LIVE2D_ADD = 25
DX_BLENDMODE_LIVE2D_MULT = 26
DX_BLENDMODE_LIVE2D_MASK = 27
DX_BLENDMODE_NUM = 28
)
// フォントタイプ
const (
DX_FONTTYPE_NORMAL = 0
DX_FONTTYPE_EDGE = 1
DX_FONTTYPE_ANTIALIASING = 2
DX_FONTTYPE_ANTIALIASING_4X4 = 18
DX_FONTTYPE_ANTIALIASING_8X8 = 34
DX_FONTTYPE_ANTIALIASING_EDGE = 3
DX_FONTTYPE_ANTIALIASING_EDGE_4X4 = 19
DX_FONTTYPE_ANTIALIASING_EDGE_8X8 = 35
)
// 画像の保存タイプ
const (
DX_IMAGESAVETYPE_BMP = 0
DX_IMAGESAVETYPE_JPEG = 1
DX_IMAGESAVETYPE_PNG = 2
)
type RECT struct {
left int32
top int32
right int32
bottom int32
}
type VECTOR struct {
X, Y, Z float64
}