-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDL2.au3
4254 lines (3466 loc) · 154 KB
/
SDL2.au3
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;;;;;;;;;;;;;;;;;;;;;;;
; SDL2 AutoIt3 Wrapper ;
; Wrapper by: Andy P. ;
;Icy Viking Games ;
;For AutoIt3 ;
;Copyright (c) 2022 ;
;;;;;;;;;;;;;;;;;;;;;;;;
;SDL 2 Flags - Note Hex values are converted to decimal values
#include-once
;Init Flags
Global Const $SDL_INIT_TIMER = 1
Global Const $SDL_INIT_AUDIO = 16
Global Const $SDL_INIT_VIDEO = 32
Global Const $SDL_INIT_JOYSTICK = 512
Global Const $SDL_INIT_HAPTIC = 4096
Global Const $SDL_INIT_GAMECONTROLLER = 8192
Global Const $SDL_INIT_EVENTS = 16384
Global Const $SDL_INIT_NOPARACHUTE = 1048576
Global Const $SDL_INIT_EVERYTHING = BitOR($SDL_INIT_TIMER, $SDL_INIT_AUDIO, $SDL_INIT_VIDEO, $SDL_INIT_EVENTS, $SDL_INIT_JOYSTICK, $SDL_INIT_HAPTIC,$SDL_INIT_GAMECONTROLLER)
;SDL2 Assert Flags
Global Enum $SDL_ASSERTION_RETRY, $SDL_ASSERTION_BREAK, $SDL_ASSERTION_ABORT, $SDL_ASSERTION_IGNORE, $SDL_ASSERTION_ALWAYS_IGNORE
;SDL2 Audio Flags
Global Const $SDL_AUDIO_MASK_BITSIZE = 255
Global Const $SDL_AUDIO_MASK_DATATYPE = 256
Global Const $SDL_AUDIO_MASK_ENDIAN = 4096
Global Const $SDL_AUDIO_MASK_SIGNED = 32768
Global Const $SDL_AUDIO_BITSIZE = $SDL_AUDIO_MASK_BITSIZE
Global Const $SDL_AUDIO_ISFLOAT = $SDL_AUDIO_MASK_DATATYPE
Global Const $SDL_AUDIO_ISBIGENDIAN = $SDL_AUDIO_MASK_ENDIAN
Global Const $SDL_AUDIO_ISSIGNED = $SDL_AUDIO_MASK_SIGNED
Global Const $SDL_AUDIO_ISINT = $SDL_AUDIO_ISFLOAT
Global Const $SDL_AUDIO_ISLITTLEENDIAN = -$SDL_AUDIO_ISBIGENDIAN
Global Const $SDL_AUDIO_ISUNSIGNED = -$SDL_AUDIO_ISSIGNED
;SDL2 Video Flags
Global Const $SDL_WINDOW_FULLSCREEN = 1
Global Const $SDL_WINDOW_OPENGL = 2
Global Const $SDL_WINDOW_SHOWN = 4
Global Const $SDL_WINDOW_HIDDEN = 8
Global Const $SDL_WINDOW_BORDERLESS = 16
Global Const $SDL_WINDOW_RESIZABLE = 32
Global Const $SDL_WINDOW_MINIMIZED = 64
Global Const $SDL_WINDOW_MAXIMIZED = 128
Global Const $SDL_WINDOW_INPUT_GRABBED = 256
Global Const $SDL_WINDOW_INPUT_FOCUS = 512
Global Const $SDL_WINDOW_MOUSE_FOCUS = 1024
Global Const $SDL_WINDOW_FULLSCREEN_DESKTOP = BitOR($SDL_WINDOW_FULLSCREEN, 256)
Global Const $SDL_WINDOW_FOREIGN = 2048
Global Const $SDL_WINDOW_HIGHDPI = 8192
Global Const $SDL_WINDOW_ALWAYS_ON_TOP = 32768
;Audio Flags Cont.
Global Const $AUDIO_U8 = 8
Global Const $AUDIO_S8 = 32776
Global Const $AUDIO_U16LSB = 16
Global Const $AUDIO_S16LSB = 32784
Global Const $AUDIO_U16MSB = 4112
Global Const $AUDIO_S16MSB = 36880
Global Const $AUDIO_U16 = $AUDIO_U16LSB
Global Const $AUDIO_S16 = $AUDIO_S16LSB
;Audio Flags Cont.
Global Const $AUDIO_S32LSB = 32800
Global Const $AUDIO_S32MSB = 36896
Global Const $AUDIO_S32 = $AUDIO_S32LSB
;Audio Flags Cont.
Global Const $AUDIO_F32LSB = 33056
Global Const $AUDIO_F32MSB = 37152
Global Const $AUDIO_F32 = $AUDIO_F32LSB
;Audio Flags Cont.
Global Const $AUDIO_U16SYS = $AUDIO_U16LSB
Global Const $AUDIO_S16SYS = $AUDIO_S16LSB
Global Const $AUDIO_S32SYS = $AUDIO_S32LSB
Global Const $AUDIO_F32SYS = $AUDIO_F32LSB
Global Const $SDL_AUDIO_ALLOW_FREQUENCY_CHANGE = 1
Global Const $SDL_AUDIO_ALLOW_FORMAT_CHANGE = 2
Global Const $SDL_AUDIO_ALLOW_CHANNELS_CHANGE = 4
Global Const $SDL_AUDIO_ALLOW_ANY_CHANGE = BitOR($SDL_AUDIO_ALLOW_FREQUENCY_CHANGE,$SDL_AUDIO_ALLOW_FORMAT_CHANGE,$SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
Global Enum $SDL_AUDIO_STOPPED, $SDL_AUDIO_PLAYING, $SDL_AUDIO_PAUSED
Global Const $SDL_MIX_MAXVOLUME = 128
;SDL2 Joystick Flags
Global Const $SDL_JOYSTICK_AXIS_MAX = 32767
Global Const $SDL_JOYSTICK_AXIS_MIN = -32768
;SDL2 Blend Flags
Global Enum $SDL_BLENDMODE_NONE, $SDL_BLENDMODE_BLEND,$SDL_BLENDMODE_ADD,$SDL_BLENDMODE_MOD = 4
Global Enum $SDL_BLENDOPERATION_ADD = 1, $SDL_BLENDOPERATION_SUBTRACT, $SDL_BLENDOPERATION_REV_SUBTRACT,$SDL_BLENDOPERATION_MINIMUM,$SDL_BLENDOPERATION_MAXIMUM
Global Enum $SDL_BLENDFACTOR_ZERO = 1, $SDL_BLENDFACTOR_ONE, $SDL_BLENDFACTOR_SRC_COLOR, $SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR, $SDL_BLENDFACTOR_SRC_ALPHA, $SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, $SDL_BLENDFACTOR_DST_COLOR, $SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR, $SDL_BLENDFACTOR_DST_ALPHA, $SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA
Global Const $SDL_CACHELINE_SIZE = 128
;SDL2 Misc Flags
Global Const $SDL_LIL_ENDIAN = 1234
Global Const $SDL_BIG_ENDIAN = 4321
Global Enum $SDL_ENOMEM, $SDL_EFREAD, $SDL_EFWRITE, $SDL_EFSEEK, $SDL_UNSUPPORTED, $SDL_LASTERROR
Global Const $SDL_RELEASED = 0
Global Const $SDL_PRESSED = 1
;SDL2 Event Flags
Global Enum $SDL_FIRSTEVENT, $SDL_QUIT = 256, $SDL_APP_TERMINATING, $SDL_APP_LOWMEMORY, $SDL_APP_WILLENTERBACKGROUND, $SDL_DIDENTERBACKGROUND, $SDL_APP_WILLENTERFOREGROUND, $SDL_APP_DIDENTERFOREGROUND
Global Enum $SDL_WINDOWEVENT = 512, $SDL_SYSWMEVENT
Global Enum $SDL_KEYDOWN = 768, $SDL_KEYUP, $SDL_TEXTEDITING, $SDL_TEXTINPUT
Global Enum $SDL_MOUSEMOTION = 1024, $SDL_MOUSEBUTTONDOWN, $SDL_MOUSEBUTTONUP, $SDL_MOUSEWHEEL
Global Enum $SDL_JOYAXISMOTION = 1536, $SDL_JOYBALLMOTION, $SDL_JOYHATMOTION, $SDL_JOYBUTTONDOWN, $SDL_JOYBUTTONUP, $SDL_JOYDEVICEADDED, $SDL_JOYDEVICEREMOVED
Global Enum $SDL_CONTROLLERAXISMOTION = 1616, $SDL_CONTROLLERBUTTONDOWN, $SDL_CONTROLLERBUTTONUP, $SDL_CONTROLLERDEVICEADDED, $SDL_CONTROLLERDEVICEREMOVED, $SDL_CONTROLLERDEVICEREMAPPED
Global Enum $SDL_FINGERDOWN = 1792, $SDL_FINGERUP, $SDL_FINGERMOTION
Global Enum $SDL_DOLLARGESTURE = 2048, $SDL_DOLLARRECORD, $SDL_MULTIGESTURE
Global Enum $SDL_CLIPBOARDUPDATE = 2304, $SDL_DROPFILE = 4096, $SDL_RENDER_TARGETS_RESET = 8192, $SDL_USEREVENT = 32768, $SDL_LASTEVENT = 65535
Global Enum $SDL_ADDEVENT, $SDL_PEEKEVENT, $SDL_GETEVENT
Global Const $SDL_QUERY = -1
Global Const $SDL_IGNORE = 0
Global Const $SDL_DISABLE = 0
Global Const $SDL_ENABLE = 1
;Gamecontroller flags
Global Enum $SDL_CONTROLLER_BINDTYPE_NONE, $SDL_CONTROLLER_BINDTYPE_BUTTON, $SDL_CONTROLLER_BINDTYPE_AXIS, $SDL_CONTROLLER_BINDTYPE_HAT
Global Enum $SDL_CONTROLLER_AXIS_INVALID = -1, $SDL_CONTROLLER_AXIS_LEFTX,$SDL_CONTROLLER_AXIS_LEFTY,$SDL_CONTROLLER_RIGHTX,$SDL_CONTROLLER_RIGHTY,$SDL_CONTROLLER_AXIS_TRIGGERLEFT,$SDL_CONTROLLER_AXIS_TRIGGERRIGHT,$SDL_CONTROLLER_AXIS_MAX
Global Enum $SDL_CONTROLLER_BUTTON_INVALID = -1, $SDL_CONTROLLER_BUTTON_A,$SDL_CONTROLLER_BUTTON_B,$SDL_CONTROLLER_BUTTON_X,$SDL_CONTROLLER_BUTTON_Y,$SDL_CONTROLLER_BUTTON_BACK,$SDL_CONTROLLER_BUTTON_GUIDE,$SDL_CONTROLLER_BUTTON_START,$SDL_CONTROLLER_BUTTON_LEFTSTICK,$SDL_CONTROLLER_BUTTON_RIGHTSTICK, $SDL_CONTROLLER_BUTTON_LEFTSHOULDER,$SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,$SDL_CONTROLLER_BUTTON_DPAD_UP,$SDL_CONTROLLER_BUTTON_DPAD_DOWN,$SDL_CONTROLLER_BUTTON_DPAD_LEFT,$SDL_CONTROLLER_BUTTON_DPAD_RIGHT,$SDL_CONTROLLER_BUTTON_MAX
;Haptic(rumble) flags
Global Const $SDL_HAPTIC_CONSTANT = 0
Global Const $SDL_HAPTIC_SINE = 2
Global Const $SDL_HAPTIC_LEFTRIGHT = 4
Global Const $SDL_HAPTIC_TRIANGLE = 8
Global Const $SDL_HAPTIC_SAWTOOTUP = 16
Global Const $SDL_HAPTIC_SAWTOOTHDOWN = 32
Global Const $SDL_HAPTIC_RAMP = 64
Global Const $SDL_HAPTIC_SPRING = 128
Global Const $SDL_HAPTIC_DAMPER = 256
Global Const $SDL_HAPTIC_INERTIA = 512
Global Const $SDL_HAPTIC_FRICTION = 1024
Global Const $SDL_HAPTIC_CUSTOM = 2048
Global const $SDL_HAPTIC_GAIN = 4096
Global Const $SDL_HAPTIC_AUTOCENTER = 8192
Global Const $SDL_HAPTIC_STATUS = 16384
Global Const $SDL_HAPTIC_PAUSE = 32768
Global Const $SDL_HAPTIC_POLAR = 0
Global const $SDL_HAPTIC_CARTESIAN = 1
Global Const $SDL_HAPTIC_SPHERICAL = 2
Global Const $SDL_HAPTIC_INFINITY = 285960729237
Global Enum $SDL_HINT_DEFAULT, $SDL_HINT_NORMAL, $SDL_HINT_OVERRIDE
;joystick flags
Global Const $SDL_HAT_CENTERED = 0
Global Const $SDL_HAT_UP = 1
Global Const $SDL_HAT_RIGHT = 2
Global Const $SDL_HAT_DOWN = 4
Global Const $SDL_HAT_LEFT = 8
Global const $SDL_RIGHTUP = BitOR($SDL_HAT_RIGHT,$SDL_HAT_UP)
Global Const $SDL_RIGHTDOWN = BitOR($SDL_HAT_RIGHT,$SDL_HAT_DOWN)
Global Const $SDL_LEFTUP = BitOR($SDL_HAT_LEFT,$SDL_HAT_UP)
Global Const $SDL_LEFTDOWN = BitOR($SDL_HAT_LEFT,$SDL_HAT_DOWN)
Global Const $SDLK_SCANCODE_MASK = 1073741824
Global Const $SDL_SCANCODE_TO_KEYCODE = $SDLK_SCANCODE_MASK
;Keycode Flags (in the C code it is declared as a enum, due to the way enums are handled in AutoIt, I'll be
;declaring them as global consts to make it easier)
Global Const $SDL_SCANCODE_UNKNOWN = 0
Global Const $SDL_SCANCODE_A = 4
Global Const $SDL_SCANCODE_B = 5
Global Const $SDL_SCANCODE_C = 6
Global Const $SDL_SCANCODE_D = 7
Global Const $SDL_SCANCODE_E = 8
Global Const $SDL_SCANCODE_F = 9
Global Const $SDL_SCANCODE_G = 10
Global Const $SDL_SCANCODE_H = 11
Global Const $SDL_SCANCODE_I = 12
Global Const $SDL_SCANCODE_J = 13
Global Const $SDL_SCANCODE_K = 14
Global Const $SDL_SCANCODE_L = 15
Global Const $SDL_SCANCODE_M = 16
Global Const $SDL_SCANCODE_N = 17
Global Const $SDL_SCANCODE_O = 18
Global Const $SDL_SCANCODE_P = 19
Global Const $SDL_SCANCODE_Q = 20
Global Const $SDL_SCANCODE_R = 21
Global Const $SDL_SCANCODE_S = 22
Global Const $SDL_SCANCODE_T = 23
Global Const $SDL_SCANCODE_U = 24
Global Const $SDL_SCANCODE_V = 25
Global Const $SDL_SCANCODE_W = 26
Global Const $SDL_SCANCODE_X = 27
Global Const $SDL_SCANCODE_Y = 28
Global Const $SDL_SCANCODE_Z = 29
Global Const $SDL_SCANCODE_1 = 30
Global Const $SDL_SCANCODE_2 = 31
Global Const $SDL_SCANCODE_3 = 32
Global Const $SDL_SCANCODE_4 = 33
Global Const $SDL_SCANCODE_5 = 34
Global Const $SDL_SCANCODE_6 = 35
Global Const $SDL_SCANCODE_7 = 36
Global Const $SDL_SCANCODE_8 = 37
Global Const $SDL_SCANCODE_9 = 38
Global Const $SDL_SCANCODE_0 = 39
Global Const $SDL_SCANCODE_RETURN = 40
Global Const $SDL_SCANCODE_ESCAPE = 41
Global Const $SDL_SCANCODE_BACKSPACE = 42
Global Const $SDL_SCANCODE_TAB = 43
Global Const $SDL_SCANCODE_SPACE = 44
Global Const $SDL_SCANCODE_MINUS = 45
Global Const $SDL_SCANCODE_EQUALS = 46
Global Const $SDL_SCANCODE_LEFTBRACKET = 47
Global Const $SDL_SCANCODE_RIGHTBRACKET = 48
Global Const $SDL_SCANCODE_BACKSLASH = 49
Global Const $SDL_SCANCODE_NONUSHASH = 50
Global Const $SDL_SCANCODE_SEMICOLON = 51
Global Const $SDL_SCANCODE_APOSTROPHE = 52
Global Const $SDL_SCANCODE_GRAVE = 53
Global Const $SDL_SCANCODE_COMMA = 54
Global Const $SDL_SCANCODE_PERIOD = 55
Global Const $SDL_SCANCODE_SLASH = 56
Global Const $SDL_SCANCODE_CAPSLOCK = 57
Global Const $SDL_SCANCODE_F1 = 58
Global Const $SDL_SCANCODE_F2 = 59
Global Const $SDL_SCANCODE_F3 = 60
Global Const $SDL_SCANCODE_F4 = 61
Global Const $SDL_SCANCODE_F5 = 62
Global Const $SDL_SCANCODE_F6 = 63
Global Const $SDL_SCANCODE_F7 = 64
Global Const $SDL_SCANCODE_F8 = 65
Global Const $SDL_SCANCODE_F9 = 66
Global Const $SDL_SCANCODE_F10 = 67
Global Const $SDL_SCANCODE_F11 = 68
Global Const $SDL_SCANCODE_F12 = 69
Global Const $SDL_SCANCODE_PRINTSCREEN = 70
Global Const $SDL_SCANCODE_SCROLLLOCK = 71
Global Const $SDL_SCANCODE_PAUSE = 72
Global Const $SDL_SCANCODE_INSERT = 73
Global Const $SDL_SCANCODE_HOME = 74
Global Const $SDL_SCANCODE_PAGEUP = 75
Global Const $SDL_SCANCODE_DELETE = 76
Global Const $SDL_SCANCODE_END = 77
Global Const $SDL_SCANCODE_PAGEDOWN = 78
Global Const $SDL_SCANCODE_RIGHT = 79
Global Const $SDL_SCANCODE_LEFT = 80
Global Const $SDL_SCANCODE_DOWN = 81
Global Const $SDL_SCANCODE_UP = 82
Global Const $SDL_SCANCODE_NUMLOCKCLEAR = 83
Global Const $SDL_SCANCODE_KP_DIVIDE = 84
Global Const $SDL_SCANCODE_KP_MULTIPLY = 85
Global Const $SDL_SCANCODE_KP_MINUS = 86
Global Const $SDL_SCANCODE_KP_PLUS = 87
Global Const $SDL_SCANCODE_KP_ENTER = 88
Global Const $SDL_SCANCODE_KP_1 = 89
Global Const $SDL_SCANCODE_KP_2 = 90
Global Const $SDL_SCANCODE_KP_3 = 91
Global Const $SDL_SCANCODE_KP_4 = 92
Global Const $SDL_SCANCODE_KP_5 = 93
Global Const $SDL_SCANCODE_KP_6 = 94
Global Const $SDL_SCANCODE_KP_7 = 95
Global Const $SDL_SCANCODE_KP_8 = 96
Global Const $SDL_SCANCODE_KP_9 = 97
Global Const $SDL_SCANCODE_KP_0 = 98
Global Const $SDL_SCANCODE_KP_PERIOD = 99
Global Const $SDL_SCANCODE_NONUSBACKSLASH = 100
Global Const $SDL_SCANCODE_APPLICATION = 101
Global Const $SDL_SCANCODE_POWER = 102
Global Const $SDL_SCANCODE_KP_EQUALS = 103
Global Const $SDL_SCANCODE_F13 = 104
Global Const $SDL_SCANCODE_F14 = 105
Global Const $SDL_SCANCODE_F15 = 106
Global Const $SDL_SCANCODE_F16 = 107
Global Const $SDL_SCANCODE_F17 = 108
Global Const $SDL_SCANCODE_F18 = 109
Global Const $SDL_SCANCODE_F19 = 110
Global Const $SDL_SCANCODE_F20 = 111
Global Const $SDL_SCANCODE_F21 = 112
Global Const $SDL_SCANCODE_F22 = 113
Global Const $SDL_SCANCODE_F23 = 114
Global Const $SDL_SCANCODE_F24 = 115
Global Const $SDL_SCANCODE_EXECUTE = 116
Global Const $SDL_SCANCODE_HELP = 117
Global Const $SDL_SCANCODE_MENU = 118
Global Const $SDL_SCANCODE_SELECT = 119
Global Const $SDL_SCANCODE_STOP = 120
Global Const $SDL_SCANCODE_AGAIN = 121
Global Const $SDL_SCANCODE_UNDO = 122
Global Const $SDL_SCANCODE_CUT = 123
Global Const $SDL_SCANCODE_COPY = 124
Global Const $SDL_SCANCODE_PASTE = 125
Global Const $SDL_SCANCODE_FIND = 126
Global Const $SDL_SCANCODE_MUTE = 127
Global Const $SDL_SCANCODE_VOLUMEUP = 128
Global Const $SDL_SCANCODE_VOLUMEDOWN = 129
Global Const $SDL_SCANCODE_LOCKINGCAPSLOCK = 130
Global Const $SDL_SCANCODE_LOCKINGNUMLOCK = 131
Global Const $SDL_SCANCODE_LOCKINGSCROLLLOCK = 132
Global Const $SDL_SCANCODE_KP_COMMA = 133
Global Const $SDL_SCANCODE_KP_EQUALS400 = 134
Global Const $SDL_SCANCODE_INTERNATIONAL = 135
Global Const $SDL_SCANCODE_INTERNATIONAL2 = 136
Global Const $SDL_SCANCODE_INTERNATIONAL3 = 137
Global Const $SDL_SCANCODE_INTERNATIONAL4 = 138
Global Const $SDL_SCANCODE_INTERNATIONAL5 = 139
Global Const $SDL_SCANCODE_INTERNATIONAL6 = 140
Global Const $SDL_SCANCODE_INTERNATIONAL7 = 141
Global Const $SDL_SCANCODE_INTERNATIONAL8 = 142
Global Const $SDL_SCANCODE_INTERNATIONAL9 = 143
Global Const $SDL_SCANCODE_LANG1 = 144
Global Const $SDL_SCANCODE_LANG2 = 145
Global Const $SDL_SCANCODE_LANG3 = 146
Global Const $SDL_SCANCODE_LANG4 = 147
Global Const $SDL_SCANCODE_LANG5 = 148
Global Const $SDL_SCANCODE_LANG6 = 149
Global Const $SDL_SCANCODE_LANG7 = 150
Global Const $SDL_SCANCODE_LANG8 = 151
Global Const $SDL_SCANCODE_LANG9 = 152
Global Const $SDL_SCANCODE_ALTERASE = 153
Global Const $SDL_SCANCODE_SYSREQ = 154
Global Const $SDL_SCANCODE_CANCEL = 155
Global Const $SDL_SCANCODE_CLEAR = 156
Global Const $SDL_SCANCODE_PRIOR = 157
Global Const $SDL_SCANCODE_RETURN2 = 158
Global Const $SDL_SCANCODE_SEPARATOR = 159
Global Const $SDL_SCANCODE_OUT = 160
Global Const $SDL_SCANCODE_OPER = 161
Global Const $SDL_SCANCODE_CLEARAGAIN = 162
Global Const $SDL_SCANCODE_CRSEL = 163
Global Const $SDL_SCANCODE_EXSEL = 164
Global Const $SDL_SCANCODE_KP_00 = 176
Global Const $SDL_SCANCODE_KP_000 = 177
Global Const $SDL_SCANCODE_THOUNSANDSSEPARATOR = 178
Global Const $SDL_SCANCODE_DECIMALSEPARATOR = 179
Global Const $SDL_SCANCODE_CURRENCYUINT = 180
Global Const $SDL_SCANCODE_CURRENCYSUBUINT = 181
Global Const $SDL_SCANCODE_KP_LEFTPAREN = 182
Global Const $SDL_SCANCODE_KP_RIGHTPAREN = 183
Global Const $SDL_SCANCODE_KP_LEFTBRACE = 184
Global Const $SDL_SCANCODE_KP_RIGHTBRACE = 185
Global Const $SDL_SCANCODE_KP_TAB = 186
Global Const $SDL_SCANCODE_KP_BACKSPACE = 187
Global Const $SDL_SCANCODE_KP_A = 188
Global Const $SDL_SCANCODE_KP_B = 189
Global Const $SDL_SCANCODE_KP_C = 190
Global Const $SDL_SCANCODE_KP_D = 191
Global Const $SDL_SCANCODE_KP_E = 192
Global Const $SDL_SCANCODE_KP_F = 193
Global Const $SDL_SCANCODE_KP_XOR = 194
Global Const $SDL_SCANCODE_KP_POWER = 195
Global Const $SDL_SCANCODE_KP_PERCENT = 196
Global Const $SDL_SCANCODE_KP_LESS = 197
Global Const $SDL_SCANCODE_KP_GREATER = 198
Global Const $SDL_SCANCODE_KP_AMPERSAND = 199
Global Const $SDL_SCANCODE_KP_DBLAMPERSAND = 200
Global Const $SDL_SCANCODE_KP_VERTICALBAR = 201
Global Const $SDL_SCANCODE_KP_DBLVERTICALBAR = 202
Global Const $SDL_SCANCODE_KP_COLON = 203
Global Const $SDL_SCANCODE_KP_HASH = 204
Global Const $SDL_SCANCODE_KP_SPACE = 205
Global Const $SDL_SCANCODE_KP_AT = 206
Global Const $SDL_SCANCODE_KP_EXCLAM = 207
Global Const $SDL_SCANCODE_KP_MEMSTORE = 208
Global Const $SDL_SCANCODE_KP_MEMRECALL = 209
Global Const $SDL_SCANCODE_KP_MEMCLEAR = 210
Global Const $SDL_SCANCODE_KP_MEMADD = 211
Global Const $SDL_SCANCODE_KP_MEMSUBTRACT = 212
Global Const $SDL_SCANCODE_KP_MEMULTIPLY = 213
Global Const $SDL_SCANCODE_KP_MEMDIVIDE = 214
Global Const $SDL_SCANCODE_KP_PLUSMINUS = 215
Global Const $SDL_SCANCODE_KP_CLEAR = 216
Global Const $SDL_SCANCODE_KP_CLEARENTRY = 217
Global Const $SDL_SCANCODE_KP_BINARY = 218
Global Const $SDL_SCANCODE_KP_OCTAL = 219
Global Const $SDL_SCANCODE_KP_DECIMAL = 220
Global Const $SDL_SCANCODE_KP_HEXADECIMAL = 221
Global Const $SDL_SCANCODE_LCTRL = 224
Global Const $SDL_SCANCODE_LSHIFT = 225
Global Const $SDL_SCANCODE_LALT = 226
Global Const $SDL_SCANCODE_LGUI = 227
Global Const $SDL_SCANCODE_RCTRL = 228
Global Const $SDL_SCANCODE_RSHIFT = 229
Global Const $SDL_SCANCODE_RALT = 230
Global Const $SDL_SCANCODE_RGUI = 231
Global Const $SDL_SCANCODE_MODE = 257
Global Const $SDL_SCANCODE_AUDIONEXT = 258
Global Const $SDL_SCANCODE_AUDIOPREV = 259
Global Const $SDL_SCANCODE_AUDIOSTOP = 260
Global Const $SDL_SCANCODE_AUDIOPLAY = 261
Global Const $SDL_SCANCODE_AUDIOMUTE = 262
Global Const $SDL_SCANCODE_MEDIASELECT = 263
Global Const $SDL_SCANCODE_WWW = 264
Global Const $SDL_SCANCODE_MAIL = 265
Global Const $SDL_SCANCODE_CALCULATOR = 266
Global Const $SDL_SCANCODE_COMPUTER = 267
Global Const $SDL_SCANCODE_AC_SEARCH = 268
Global Const $SDL_SCANCODE_AC_HOME = 269
Global Const $SDL_SCANCODE_AC_BACK = 270
Global Const $SDL_SCANCODE_AC_FORWARD = 271
Global Const $SDL_SCANCODE_AC_STOP = 272
Global Const $SDL_SCANCODE_AC_REFRESH = 273
Global Const $SDL_SCANCODE_AC_BOOKMARKS = 274
Global Const $SDL_SCANCODE_BRIGHTNESSDOWN = 275
Global Const $SDL_SCANCODE_BRIGHTNESSUP = 276
Global Const $SDL_SCANCODE_DISPLAYSWITCH = 277
Global Const $SDL_SCANCODE_KBDILLUMTOGGLE = 278
Global Const $SDL_SCANCODE_KBDILLUMDOWN = 279
Global Const $SDL_SCANCODE_KBDILLUMUP = 280
Global Const $SDL_SCANCODE_EJECT = 281
Global Const $SDL_SCANCODE_SLEEP = 282
Global Const $SDL_SCANCODE_APP1 = 283
Global Const $SDL_SCANCODE_APP2 = 284
Global Const $SDL_NUM_SCANCODES = 512
;Note declared as enum in the C code, but using consts here
Global Const $SDLK_UNKNOWN = 0
Global Const $SDLK_RETURN = 1
Global Const $SDLK_ESCAPE = 2
Global Const $SDLK_BACKSPACE = 3
Global Const $SDLK_TAB = 4
Global Const $SDLK_SPACE = 5
Global Const $SDLK_EXCLAIM = 6
Global Const $SDLK_QUOTEDEBL = 7
Global Const $SDLK_HASH = 8
Global Const $SDLK_PERCENT = 9
Global Const $SDLK_DOLLAR = 10
Global Const $SDLK_AMPERSAND = 11
Global Const $SDLK_QUOTE = 12
Global Const $SDLK_LEFTPAREN = 13
Global Const $SDLK_RIGHTPAREN = 14
Global Const $SDLK_ASTERISK = 15
Global Const $SDLK_PLUS = 16
Global Const $SDLK_COMMA = 17
Global Const $SDLK_MINUS = 18
Global Const $SDLK_PERIOD = 19
Global Const $SDLK_SLASH = 20
Global Const $SDLK_0 = 21
Global Const $SDLK_1 = 22
Global Const $SDLK_2 = 23
Global Const $SDLK_3 = 24
Global Const $SDLK_4 = 25
Global Const $SDLK_5 = 26
Global Const $SDLK_6 = 27
Global Const $SDLK_7 = 28
Global Const $SDLK_8 = 29
Global Const $SDLK_9 = 30
Global Const $SDLK_COLON = 31
Global Const $SDLK_SEMICOLON = 32
Global Const $SDLK_LESS = 33
Global Const $SDLK_EQUALS = 34
Global Const $SDLK_GREATER = 35
Global Const $SDLK_QUESTION = 36
Global Const $SDLK_AT = 37
Global Const $SDLK_LEFTBRACKET = 38
Global Const $SDLK_BACKSLASH = 39
Global Const $SDLK_RIGHTBRACKET = 40
Global Const $SDLK_CARET = 41
Global Const $SDLK_UNDERSCORE = 42
Global Const $SDLK_BACKQUOTE = 43
Global Const $SDLK_a = 44
Global Const $SDLK_b = 45
Global Const $SDLK_c = 46
Global Const $SDLK_d = 47
Global Const $SDLK_e = 48
Global Const $SDLK_f = 49
Global Const $SDLK_g = 50
Global Const $SDLK_h = 51
Global Const $SDLK_i = 52
Global Const $SDLK_j = 53
Global Const $SDLK_k = 54
Global Const $SDLK_l = 55
Global Const $SDLK_m = 56
Global Const $SDLK_n = 57
Global Const $SDLK_o = 58
Global Const $SDLK_p = 59
Global Const $SDLK_q = 60
Global Const $SDLK_r = 61
Global Const $SDLK_s = 62
Global Const $SDLK_t = 63
Global Const $SDLK_u = 64
Global Const $SDLK_v = 65
Global Const $SDLK_w = 66
Global Const $SDLK_x = 67
Global Const $SDLK_y = 68
Global Const $SDLK_z = 69
Global Const $SDLK_CAPSLOCK = $SDL_SCANCODE_CAPSLOCK
Global Const $SDLK_F1 = $SDL_SCANCODE_F1
Global Const $SDLK_F2 = $SDL_SCANCODE_F2
Global Const $SDLK_F3 = $SDL_SCANCODE_F3
Global Const $SDLK_F4 = $SDL_SCANCODE_F4
Global Const $SDLK_F5 = $SDL_SCANCODE_F5
Global Const $SDLK_F6 = $SDL_SCANCODE_F6
Global Const $SDLK_F7 = $SDL_SCANCODE_F7
Global Const $SDLK_F8 = $SDL_SCANCODE_F8
Global Const $SDLK_F9 = $SDL_SCANCODE_F9
Global Const $SDLK_F10 = $SDL_SCANCODE_F10
Global Const $SDLK_F11 = $SDL_SCANCODE_F11
Global Const $SDLK_F12 = $SDL_SCANCODE_F12
Global Const $SDLK_PRINTSCREEN = $SDL_SCANCODE_PRINTSCREEN
Global Const $SDLK_SCROLLLOCK = $SDL_SCANCODE_SCROLLLOCK
Global Const $SDLK_PAUSE = $SDL_SCANCODE_PAUSE
Global Const $SDLK_INSERT = $SDL_SCANCODE_INSERT
Global Const $SDLK_HOME = $SDL_SCANCODE_HOME
Global Const $SDLK_PAGEUP = $SDL_SCANCODE_PAGEUP
Global Const $SDLK_DELETE = $SDL_SCANCODE_DELETE
Global Const $SDLK_END = $SDL_SCANCODE_END
Global Const $SDLK_PAGEDOWN = $SDL_SCANCODE_PAGEDOWN
Global Const $SDLK_RIGHT = $SDL_SCANCODE_RIGHT
Global Const $SDLK_LEFT = $SDL_SCANCODE_LEFT
Global Const $SDLK_DOWN = $SDL_SCANCODE_DOWN
Global Const $SDLK_UP = $SDL_SCANCODE_UP
Global Const $SDLK_NUMLOCKCLEAR = $SDL_SCANCODE_NUMLOCKCLEAR
Global Const $SDLK_KP_DIVIDE = $SDL_SCANCODE_KP_DIVIDE
Global Const $SDLK_KP_MULTIPLY = $SDL_SCANCODE_KP_MULTIPLY
Global Const $SDLK_KP_MINUS = $SDL_SCANCODE_KP_MINUS
Global Const $SDLK_KP_PLUS = $SDL_SCANCODE_KP_PLUS
Global Const $SDLK_KP_ENTER = $SDL_SCANCODE_KP_ENTER
Global Const $SDLK_KP_1 = $SDL_SCANCODE_KP_1
Global Const $SDLK_KP_2 = $SDL_SCANCODE_KP_2
Global Const $SDLK_KP_3 = $SDL_SCANCODE_KP_3
Global Const $SDLK_KP_4 = $SDL_SCANCODE_KP_4
Global Const $SDLK_KP_5 = $SDL_SCANCODE_KP_5
Global Const $SDLK_KP_6 = $SDL_SCANCODE_KP_6
Global Const $SDLK_KP_7 = $SDL_SCANCODE_KP_7
Global Const $SDLK_KP_8 = $SDL_SCANCODE_KP_8
Global Const $SDLK_KP_9 = $SDL_SCANCODE_KP_9
Global Const $SDLK_KP_0 = $SDL_SCANCODE_KP_0
Global Const $SDLK_KP_PERIOD = $SDL_SCANCODE_KP_PERIOD
Global Const $SDLK_APPLICATION = $SDL_SCANCODE_APPLICATION
Global Const $SDLK_POWER = $SDL_SCANCODE_POWER
;Global Const $SDLK_EQUALS = $SDL_SCANCODE_EQUALS ;Redeclaration?
Global Const $SDLK_F13 = $SDL_SCANCODE_F13
Global Const $SDLK_F14 = $SDL_SCANCODE_F14
Global Const $SDLK_F15 = $SDL_SCANCODE_F15
Global Const $SDLK_F16 = $SDL_SCANCODE_F16
Global Const $SDLK_F17 = $SDL_SCANCODE_F17
Global Const $SDLK_F18 = $SDL_SCANCODE_F18
Global Const $SDLK_F19 = $SDL_SCANCODE_F19
Global Const $SDLK_F20 = $SDL_SCANCODE_F20
Global Const $SDLK_F21 = $SDL_SCANCODE_F21
Global Const $SDLK_F22 = $SDL_SCANCODE_F22
Global Const $SDLK_F23 = $SDL_SCANCODE_F23
Global Const $SDLK_F24 = $SDL_SCANCODE_F24
Global Const $SDLK_EXECUTE = $SDL_SCANCODE_EXECUTE
Global Const $SDLK_HELP = $SDL_SCANCODE_HELP
Global Const $SDLK_MENU = $SDL_SCANCODE_MENU
Global Const $SDLK_SELECT = $SDL_SCANCODE_SELECT
Global Const $SDLK_STOP = $SDL_SCANCODE_STOP
Global Const $SDLK_AGAIN = $SDL_SCANCODE_AGAIN
Global Const $SDLK_UNDO = $SDL_SCANCODE_UNDO
Global Const $SDLK_CUT = $SDL_SCANCODE_CUT
Global Const $SDLK_COPY = $SDL_SCANCODE_COPY
Global Const $SDLK_PASTE = $SDL_SCANCODE_PASTE
Global Const $SDLK_FIND = $SDL_SCANCODE_FIND
Global Const $SDLK_MUTE = $SDL_SCANCODE_MUTE
Global Const $SDLK_VOLUMEUP = $SDL_SCANCODE_VOLUMEUP
Global Const $SDLK_VOLUMEDOWN = $SDL_SCANCODE_VOLUMEDOWN
Global Const $SDLK_KP_COMMA = $SDL_SCANCODE_KP_COMMA
Global Const $SDLK_KP_EQUALS400 = $SDL_SCANCODE_KP_EQUALS400
Global Const $SDLK_ALTERASE = $SDL_SCANCODE_ALTERASE
Global Const $SDLK_SYSREQ = $SDL_SCANCODE_SYSREQ
Global Const $SDLK_CANCEL = $SDL_SCANCODE_CANCEL
Global Const $SDLK_CLEAR = $SDL_SCANCODE_CLEAR
Global Const $SDLK_PRIOR = $SDL_SCANCODE_PRIOR
Global Const $SDLK_RETURN2 = $SDL_SCANCODE_RETURN2
Global Const $SDLK_SEPARATOR = $SDL_SCANCODE_SEPARATOR
Global Const $SDLK_OUT = $SDL_SCANCODE_OUT
Global Const $SDLK_OPER = $SDL_SCANCODE_OPER
Global Const $SDLK_CLEARAGAIN = $SDL_SCANCODE_CLEARAGAIN
Global Const $SDLK_CRSEL = $SDL_SCANCODE_CRSEL
Global Const $SDLK_EXSEL = $SDL_SCANCODE_EXSEL
Global Const $SDLK_KP_00 = $SDL_SCANCODE_KP_00
Global Const $SDLK_KP_000 = $SDL_SCANCODE_KP_000
Global Const $SDLK_THOUNSANDSSEPARATOR = $SDL_SCANCODE_THOUNSANDSSEPARATOR
Global Const $SDLK_DECIMALSEPARATOR = $SDL_SCANCODE_DECIMALSEPARATOR
Global Const $SDLK_CURRENCYUINT = $SDL_SCANCODE_CURRENCYUINT
Global Const $SDLK_CURRENCYSUBUNIT = $SDL_SCANCODE_CURRENCYSUBUINT
Global Const $SDLK_KP_LEFTPAREN = $SDL_SCANCODE_KP_LEFTPAREN
Global Const $SDLK_KP_LEFTBRACE = $SDL_SCANCODE_KP_LEFTBRACE
Global Const $SDLK_KP_RIGHTPAREN = $SDL_SCANCODE_KP_RIGHTPAREN
Global Const $SDLK_KP_RIGHTBRACE = $SDL_SCANCODE_KP_RIGHTBRACE
Global Const $SDLK_KP_TAB = $SDL_SCANCODE_KP_TAB
Global Const $SDLK_KP_BACKSPACE = $SDL_SCANCODE_KP_BACKSPACE
Global Const $SDLK_KP_A = $SDL_SCANCODE_KP_A
Global Const $SDLK_KP_B = $SDL_SCANCODE_KP_B
Global Const $SDLK_KP_C = $SDL_SCANCODE_KP_C
Global Const $SDLK_KP_D = $SDL_SCANCODE_KP_D
Global Const $SDLK_KP_E = $SDL_SCANCODE_KP_E
Global Const $SDLK_KP_F = $SDL_SCANCODE_KP_F
Global Const $SDLK_KP_XOR = $SDL_SCANCODE_KP_XOR
Global Const $SDLK_KP_POWER = $SDL_SCANCODE_KP_POWER
Global Const $SDLK_KP_PERCENT = $SDL_SCANCODE_KP_PERCENT
Global Const $SDLK_KP_LESS = $SDL_SCANCODE_KP_LESS
Global Const $SDLK_KP_GREATER = $SDL_SCANCODE_KP_GREATER
Global Const $SDLK_KP_AMPERSAND = $SDL_SCANCODE_KP_AMPERSAND
Global Const $SDLK_KP_DBLAMPERSAND = $SDL_SCANCODE_KP_DBLAMPERSAND
Global Const $SDLK_KP_VERTICALBAR = $SDL_SCANCODE_KP_VERTICALBAR
Global Const $SDLK_KP_DBLVERTICALBAR = $SDL_SCANCODE_KP_DBLVERTICALBAR
Global Const $SDLK_KP_COLON = $SDL_SCANCODE_KP_COLON
Global Const $SDLK_KP_HASH = $SDL_SCANCODE_KP_HASH
Global Const $SDLK_KP_SPACE = $SDL_SCANCODE_KP_SPACE
Global Const $SDLK_KP_AT = $SDL_SCANCODE_KP_AT
Global Const $SDLK_KP_EXCLAM = $SDL_SCANCODE_KP_EXCLAM
Global Const $SDLK_KP_MEMSTORE = $SDL_SCANCODE_KP_MEMSTORE
Global Const $SDLK_KP_MEMRECALL = $SDL_SCANCODE_KP_MEMRECALL
Global Const $SDLK_KP_MEMCLEAR = $SDL_SCANCODE_KP_MEMCLEAR
Global Const $SDLK_KP_MEMADD = $SDL_SCANCODE_KP_MEMADD
Global Const $SDLK_KP_MEMSUBSTRACT = $SDL_SCANCODE_KP_MEMSUBTRACT
Global Const $SDLK_KP_MEMMULTIPLY = $SDL_SCANCODE_KP_MEMULTIPLY
Global Const $SDLK_KP_MEMDIVIDE = $SDL_SCANCODE_KP_MEMDIVIDE
Global Const $SDLK_KP_PLUSMINUS = $SDL_SCANCODE_KP_PLUSMINUS
Global Const $SDLK_KP_CLEAR = $SDL_SCANCODE_KP_CLEAR
Global Const $SDLK_KP_CLEARENTRY = $SDL_SCANCODE_KP_CLEARENTRY
Global Const $SDLK_KP_BINARY = $SDL_SCANCODE_KP_BINARY
Global Const $SDLK_KP_OCTAL = $SDL_SCANCODE_KP_OCTAL
Global Const $SDLK_KP_DECIMAL = $SDL_SCANCODE_KP_DECIMAL
Global Const $SDLK_KP_HEXADECIMAL = $SDL_SCANCODE_KP_HEXADECIMAL
Global Const $SDLK_LCTRL = $SDL_SCANCODE_LCTRL
Global Const $SDLK_LSHFIT = $SDL_SCANCODE_LSHIFT
Global Const $SDLK_LALT = $SDL_SCANCODE_LALT
Global Const $SDLK_LGUI = $SDL_SCANCODE_LGUI
Global Const $SDLK_RCTRL = $SDL_SCANCODE_RCTRL
Global Const $SDLK_RSHIFT = $SDL_SCANCODE_RSHIFT
Global Const $SDLK_RALT = $SDL_SCANCODE_RALT
Global Const $SDLK_RGUI = $SDL_SCANCODE_RGUI
Global Const $SDLK_MODE = $SDL_SCANCODE_MODE
Global Const $SDLK_AUDIONEXT = $SDL_SCANCODE_AUDIONEXT
Global Const $SDLK_AUDIOPREV = $SDL_SCANCODE_AUDIOPREV
Global Const $SDLK_AUDIOSTOP = $SDL_SCANCODE_AUDIOSTOP
Global Const $SDLK_AUDIOPLAY = $SDL_SCANCODE_AUDIOPLAY
Global Const $SDLK_AUDIOMUTE = $SDL_SCANCODE_AUDIOMUTE
Global Const $SDLK_MEDIASELECT = $SDL_SCANCODE_MEDIASELECT
Global Const $SDLK_WWW = $SDL_SCANCODE_WWW
Global Const $SDLK_MAIL = $SDL_SCANCODE_MAIL
Global Const $SDLK_CALCULATOR = $SDL_SCANCODE_CALCULATOR
Global Const $SDLK_COMPUTER = $SDL_SCANCODE_COMPUTER
Global Const $SDLK_AC_SEARCH = $SDL_SCANCODE_AC_SEARCH
Global Const $SDLK_AC_HOME = $SDL_SCANCODE_AC_HOME
Global Const $SDLK_AC_FORWARD = $SDL_SCANCODE_AC_FORWARD
Global Const $SDLK_AC_STOP = $SDL_SCANCODE_AC_STOP
Global Const $SDLK_AC_REFRESH = $SDL_SCANCODE_AC_REFRESH
Global Const $SDLK_AC_BOOKMARKS = $SDL_SCANCODE_AC_BOOKMARKS
Global Const $SDLK_BRIGHTNESSDOWN = $SDL_SCANCODE_BRIGHTNESSDOWN
Global Const $SDLK_BRIGHTNESSUP = $SDL_SCANCODE_BRIGHTNESSUP
Global Const $SDLK_DISPLAYSWITCH = $SDL_SCANCODE_DISPLAYSWITCH
Global Const $SDLK_KBDILLUMTOGGLE = $SDL_SCANCODE_KBDILLUMTOGGLE
Global Const $SDLK_KBDILLUMDOWN = $SDL_SCANCODE_KBDILLUMDOWN
Global Const $SDLK_KBDILLUMUP = $SDL_SCANCODE_KBDILLUMUP
Global Const $SDLK_EJECT = $SDL_SCANCODE_EJECT
Global Const $SDLK_SLEEP = $SDL_SCANCODE_SLEEP
Global Const $KMOD_NONE = 0
Global Const $KMOD_LSHIFT = 1
Global Const $KMOD_RSHIFT = 2
Global Const $KMOD_LCTRL = 64
Global const $KMOD_RCTRL = 128
Global Const $KMOD_LALT = 256
Global Const $KMOD_RALT = 512
Global Const $KMOD_LGUI = 1024
Global Const $KMOD_RGUI = 2048
Global Const $KMOD_NUMS = 4096
Global Const $KMOD_CAPS = 8192
Global Const $KMOD_MODE = 16384
Global Const $KMOD_RESERVED = 32768
Global Const $KMOD_CTRL = BitOR($KMOD_LCTRL,$KMOD_RCTRL)
Global Const $KMOD_SHIFT = BitOR($KMOD_LSHIFT,$KMOD_RSHIFT)
Global Const $KMOD_ALT = BitOR($KMOD_LALT,$KMOD_RALT)
Global Const $KMOD_GUI = BitOR($KMOD_LGUI,$KMOD_RGUI)
;WindowShape Flags
Global Const $SDL_NONSHAPEABLE_WINDOW = -1
Global Const $SDL_INVALID_SHAPE_ARGUMENT = -2
Global Const $SDL_WINDOW_LACKS_SHAPE = -3
Global Const $SHAPE_MODE_FAULT = 0
Global Const $SHAPE_MODE_BINARIZE_ALPHA = 1
Global Const $SHAPE_MODE_REVERSE_BINARIZE_ALPHA = 2
Global Const $SHAPE_MODE_COLOR_KEY = 3
;Misc flags
Global Const $SDL_FALSE = 0
Global Const $SDL_TRUE = 1
Global Const $DUMMY_ENUM_VALUE = 0
Global Const $SDL_SWSURFACE = 0
Global Const $SDL_PREALLOC = 1
Global Const $SDL_RLEACCEL = 2
Global Const $SDL_DONTFREE = 4
Global Const $SDL_MUSTLOCK = $SDL_RLEACCEL
Global Enum $SDL_WINRT_PATH_INSTALLED_LOCATON, $SDL_WINRT_PATH_LOCAL_FOLDER, $SDL_WINRT_PATH_ROAMING_FOLDER, $SDL_WINRT_PATH_TEMP_FOLDER
Global Enum $SDL_SYSWM_UNKNOWN, $SDL_SYSWM_WINDOWS, $SDL_SYSWM_X11, $SDL_SYSWM_DIRECTFB, $SDL_SYSWM_COCOA, $SDL_SYSWM_UIKIT, $SDL_SYSWM_WAYLAND, $SDL_SYSWM_MIR, $SDL_SYSWM_WINRT
Global Const $SDLTEST_MAX_LOGMESSAGE_LENGTH = 3584
Global Const $ASSERT_FAIL = 0
Global Const $ASSERT_PASS = 1
Global Const $DEFAULT_WINDOW_WIDTH = 640
Global Const $DEFAULT_WINDOW_HEIGHT = 480
Global Const $VERBOSE_VIDEO = 1
Global Const $VERBOSE_MODES = 2
Global Const $VERBOSE_RENDER = 4
Global Const $VERBOSE_EVENT = 8
Global Const $VERBOSE_AUDIO = 16
Global Const $FONT_CHARACTER_SIZE = 8
Global Const $TEST_ENABLED = 1
Global Const $TEST_DISABLED = 0
Global Const $TEST_ABORTED = -1
Global Const $TEST_STARTED = 0
Global Const $TEST_COMPLETED = 1
Global Const $TEST_SKIPPED = 2
Global Const $TEST_RESULT_PASSED = 0
Global Const $TEST_RESULT_FAILED = 1
Global Const $TEST_RESULT_NO_ASSERT = 2
Global Const $TEST_RESULT_SKIPPED = 3
Global Const $TEST_RESULT_SETUP_FAILURE = 4
Global Enum $SDL_THREAD_PRIORITY_LOW, $SDL_THREAD_PRIORITY_NORMAL, $SDL_THREAD_PRIORITY_HIGH
Global Const $SDL_TOUCH_MOUSEID = -1
;SDL version flags
Global Const $SDL_MAJOR_VERSION = 2
Global Const $SDL_MINOR_VERSION = 0
Global Const $SDL_PATCHLEVEL = 10
;Window flags Cont.
Global Const $SDL_WINDOWPOS_UNDEFINED_MASK = 536805376
Global Const $SDL_WINDOWPOS_UNDEFINED_DISPLAY = $SDL_WINDOWPOS_UNDEFINED_MASK
Global Const $SDL_WINDOWPOS_UNDEFINED = $SDL_WINDOWPOS_UNDEFINED_DISPLAY
Global Const $SDL_WINDOWPOS_ISUNDEFINED = $SDL_WINDOWPOS_UNDEFINED_MASK
Global Const $SDL_WINDOWPOS_CENTERED_MASK = 805240832
Global Const $SDL_WINDOWPOS_CENTERED_DISPLAY = $SDL_WINDOWPOS_CENTERED_MASK
Global Const $SDL_WINDOWPOS_CENTERED = $SDL_WINDOWPOS_CENTERED_DISPLAY
Global Const $SDL_WINDOWPOS_ISCENTERED = $SDL_WINDOWPOS_CENTERED_MASK
;WindowEvent flags
Global Const $SDL_WINDOWEVENT_NONE = 0
Global Const $SDL_WINDOWEVENT_SHOWN = 1
Global Const $SDL_WINDOWEVENT_HIDDEN = 2
Global Const $SDL_WINDOWEVENT_EXPOSED = 3
Global Const $SDL_WINDOWEVENT_MOVED = 4
Global Const $SDL_WINDOWEVENT_RESIZED = 5
Global Const $SDL_WINDOWEVENT_SIZE_CHANGED = 6
Global Const $SDL_WINDOWEVENT_MINIMIZED = 7
Global Const $SDL_WINDOWEVENT_MAXIMIZED = 8
Global Const $SDL_WINDOWEVENT_RESTORED = 9
Global Const $SDL_WINDOWEVENT_ENTER = 10
Global Const $SDL_WINDOWEVENT_LEAVE = 11
Global Const $SDL_WINDOWEVENT_FOCUS_GAINED = 12
Global Const $SDL_WINDOWEVENT_FOCUS_LOST = 13
Global Const $SDL_WINDOWEVENT_CLOSE = 14
;GL flags
Global Const $SDL_GL_RED_SIZE = 0
Global Const $SDL_GL_GREEN_SIZE = 1
Global Const $SDL_GL_BLUE_SIZE = 2
Global Const $SDL_GL_ALPHA_SIZE = 3
Global Const $SDL_GL_BUFFER_SIZE = 4
Global Const $SDL_GL_DOUBLEBUFFER = 5
Global Const $SDL_GL_DEPTH_SIZE = 6
Global Const $SDL_GL_STENCIL_SIZE = 7
Global Const $SDL_GL_ACCUM_RED_SIZE = 8
Global Const $SDL_GL_ACCUM_GREEN_SIZE = 9
Global Const $SDL_GL_ACCUM_BLUE_SIZE = 10
Global Const $SDL_GL_ACCUM_ALPHA_SIZE = 11
Global Const $SDL_GL_STEREO = 12
Global Const $SDL_GL_MULTISAMPLEBUFFERS = 13
Global Const $SDL_GL_MULTISAMPLESAMPLES = 14
Global Const $SDL_GL_ACCELERATED_VISUAL = 15
Global Const $SDL_GL_RETAINED_BACKING = 16
Global Const $SDL_GL_CONTEXT_MAJOR_VERSION = 17
Global Const $SDL_GL_CONTEXT_MINOR_VERSION = 18
Global Const $SDL_GL_CONTEXT_EGL = 19
Global Const $SDL_GL_CONTEXT_FLAGS = 20
Global Const $SDL_GL_CONTEXT_PROFILE_MASK = 21
Global Const $SDL_GL_SHARE_WITH_CURRENT_CONTEXT = 22
Global Const $SDL_GL_FRAMEBUFFER_SRGB_CAPABLE = 23
;gl profile flags
Global Const $SDL_GL_CONTEXT_PROFILE_CORE = 1
Global Const $SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 2
Global Const $SDL_GL_CONTEXT_PROFILE_ES = 4
Global Const $SDL_GL_CONTEXT_DEBUG_FLAG = 1
Global Const $SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 2
Global Const $SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 4
Global Const $SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 8
;SDL RWOPs flags
Global Const $SDL_RWOPS_UNKNOWN = 0
Global Const $SDL_RWOPS_WINFILE = 1
Global Const $SDL_RWOPS_STDFILE = 2
Global Const $SDL_RWOPS_JNIFILE = 3
Global Const $SDL_RWOPS_MEMORY = 4
Global Const $SDL_RWOPS_MEMORY_RO = 5
Global Const $RW_SEEK_SET = 0
Global Const $RW_SEEK_CUR = 1
Global Const $RW_SEEK_END = 2
;Render flags
Global Const $SDL_RENDERER_SOFTWARE = 1
Global Const $SDL_RENDERER_ACCELERATED = 2
Global Const $SDL_RENDERER_PRESENTVSYNC = 4
Global Const $SDL_RENDERER_TARGETEXTURE = 8
Global Const $SDL_TEXTUREACCESS_STATIC = 0
Global Const $SDL_TEXTUREACESS_STREAMING = 1
Global Const $SDL_TEXTUREACESS_TARGET = 2
Global Const $SDL_TEXTUREMODULATE_NONE = 0
Global Const $SDL_TEXTUREMODULATE_COLOR = 1
Global Const $SDL_TEXTUREMODULATE_ALPHA = 2
Global Enum $SDL_FLIP_NONE, $SDL_FLIP_HORIZONTAL, $SDL_FLIP_VERTICAL
Global Enum $SDL_PIXELTYPE_UNKNOWN, $SDL_PIXELTYPE_INDEX1, $SDL_PIXELTYPE_INDEX4,$SDL_PIXELTYPE_INDEX8,$SDL_PIXELTYPE_PACKED8,$SDL_PIXELTYPE_PACKED16,$SDL_PIXELTYPE_PACKED32,$SDL_PIXELTYPE_ARRAYU8,$SDL_PIXELTYPE_ARRAYU16,$SDL_PIXELTYPE_ARRAYU32, $SDL_PIXELTYPE_ARRAYF16,$SDL_PIXELTYPE_ARRAYF32
Global Enum $SDL_BITMAPORDER_NONE, $SDL_BITMAPORDER_4321, $SDL_BITMAPORDER_1234
Global Enum $SDL_PACKEDORDER_NONE,$SDL_PACKEDORDER_XRGB,$SDL_PACKEDORDER_RGBX,$SDL_PACKEDORDER_ARGB,$SDL_PACKEDORDER_RGBA,$SDL_PACKEDORDER_XBGR,$SDL_PACKEDORDER_BGRX,$SDL_PACKEDORDER_ABGR,$SDL_PACKEDORDER_BGRA
Global Enum $SDL_ARRAYORDER_NONE,$SDL_ARRAYORDER_RGB,$SDL_ARRAYORDER_RGBA,$SDL_ARRAYORDER_ARGB,$SDL_ARRAYORDER_BGR,$SDL_ARRAYORDER_BGRA,$SDL_ARRAYORDER_ABGR
Global Enum $SDL_PACKEDLAYOUT_NONE,$SDL_PACKEDLAYOUT_332,$SDL_PACKEDLAYOUT_4444,$SDL_PACKEDLAYOUT_1555,$SDL_PACKEDLAYOUT_5551,$SDL_PACKEDLAYOUT_565,$SDL_PACKEDLAYOUT_8888,$SDL_PACKEDLAYOUT_2101010,$SDL_PACKEDLAYOUT_1010102
Global Enum $SDL_POWERSTATE_UNKNOWN,$SDL_POWERSTATE_ON_BATTERY,$SDL_POWERSTATE_NO_BATTERY,$SDL_POWERSTATE_CHARGING,$SDL_POWERSTATE_CHARGED
Global Enum $SDL_JOYSTICK_TYPE_UNKNOWN,$SDL_JOYSTICK_TYPE_GAMECONTROLLER,$SDL_JOYSTICK_TYPE_WHEEL,$SDL_JOYSTICK_TYPE_ARCADE_STICK,$SDL_JOYSTICK_TYPE_FLIGHT_STICK,$SDL_JOYSTICK_TYPE_DANCE_PAD,$SDL_JOYSTICK_TYPE_GUITAR,$SDL_JOYSTICK_DRUM_KIT,$SDL_JOYSTICK_ARCADE_PAD,$SDL_JOYSTICK_TYPE_THROTTLE
Global Enum $SDL_JOYSTICK_POWER_UNKNOWN = -1,$SDL_JOYSTICK_POWER_EMPTY,$SDL_JOYSTICK_POWER_LOW,$SDL_JOYSTICK_POWER_MEDIUM,$SDL_JOYSTICK_POWER_FULL,$SDL_JOYSTICK_POWER_WIRED,$SDL_JOYSTICK_POWER_MAX
Global Const $SDL_CONTROLLER_TYPE_UNKNOWN = 0
Global Const $SDL_CONTROLLER_TYPE_XBOX360 = 1
Global Const $SDL_CONTROLLER_TYPE_XBOXONE = 2
Global Const $SDL_CONTROLLER_TYPE_PS3 = 3
Global Const $SDL_CONTROLLER_TYPE_PS4 = 4
Global Const $SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO = 5
Global Const $SDL_CONTROLLER_TYPE_VIRTUAL = 6
Global Const $SDL_CONTROLLER_TYPE_PS5 = 7
Global Const $SDL_CONTROLLER_TYPE_AMAZON_LUNA = 8
Global Const $SDL_CONTROLLER_TYPE_GOOGLE_STADIA = 9
Global Enum $SDL_FLASH_CANCEL = 0, $SDL_FLASH_BRIEFLY,$SDL_FLASH_UNTIL_FOCUSED
;Sensor flags
Global Const $SDL_DISPLAYEVENT = 336
Global Const $SDL_SENSOREVENT = 4608
Global Const $SDL_STANDARD_GRAVITY = 9.80665
;Open the SDL2 DLL
Global $SDL = 0 ;("SDL2.dll")
;Check to make sure SDL2 DLL is there
if $SDL = -1 Then
MsgBox($MB_SYSTEMMODAL,"Error","Could not load SDL2.dll!\n")
EndIf
;Struct for SDL_RECT
Func SDL_Rect($x,$y,$w,$h)
$xSDL_Rect = DllStructCreate("int;int;int;int")
DllStructSetData($SDL_Rect,1,$x)
DllStructSetData($SDL_Rect,2,$y)
DllStructSetData($SDL_Rect,3,$w)
DllStructSetData($SDL_Rect,4,$h)
Return $xSDL_Rect
EndFunc
;SDL Init Functions
Func SDL_Init($flags)
$SDL = DllOpen("SDL2.dll")
If @error Then Return SetError(1, @error, -1)
Local $xSDL_Init = DllCall($SDL,"int:cdecl","SDL_Init","uint", $flags)
If @error Then Return SetError(1, @error, -1)
Return $xSDL_Init[0]
EndFunc
Func SDL_InitSubSystem($flags)
Local $xSDL_InitSubSystem = DllCall($SDL,"int:cdecl","SDL_InitSubSystem","uint", $flags)
Return $xSDL_InitSubSystem[0]
EndFunc
Func SDL_Quit()
$xSDL_Quit = DllCall($SDL,"none:cdecl","SDL_Quit")
If @error Then Return SetError(1, @error, -1)
;Return $xSDL_Quit[0]
DllClose($SDL)
EndFunc
Func SDL_QuitSubSystem($flags)
$xSDL_QuitSubSystem = DllCall($SDL,"none:cdecl","SDL_QuitSubSystem","uint",$flags)
;Return $xSDL_QuitSubSystem[0]
EndFunc
Func SDL_SetMainReady()
$xSDL_SetMainReady = DllCall($SDL,"none:cdecl","SDL_SetMainReady","")
;Return $xSDL_SetMainReady[0]
EndFunc
Func SDL_WasInit($flags)
Local $xSDL_WasInit = DllCall($SDL,"uint:cdecl","SDL_WasInit","uint",$flags)
Return $xSDL_WasInit[0]
EndFunc
Func SDL_WinRTRunApp($f,$r)
Local $xSDL_WinRTRunApp = DllCall($SDL,"int:cdecl","SDL_WinRTRunApp","ptr",$f,"ptr",$r)
Return $xSDL_WinRTRunApp[0]
EndFunc
;SDL Window Funcs
Func SDL_CreateWindow($title,$x,$y,$w,$h,$flags)
Local $xSDL_CreateWindow = DllCall($SDL,"ptr:cdecl","SDL_CreateWindow","str",$title,"int",$x,"int",$y,"int",$w,"int",$h,"uint",$flags)
If @error Then Return SetError(1, @error, -1)
Return $xSDL_CreateWindow[0]
EndFunc
Func SDL_CreateWindowAndRenderer($w,$h,$flags,$win,$ren)
Local $xSDL_CreateWindowAndRenderer = DllCall($SDL,"int:cdecl","SDL_CreateWindowAndRenderer","int",$w,"int",$h,"uint",$flags,"ptr",$win,"ptr",$ren)
Return $xSDL_CreateWindowAndRenderer[0]
EndFunc
Func SDL_CreateWindowFrom($data)
Local $xSDL_CreateWindowFrom = DllCall($SDL,"ptr:cdecl","SDL_CreateWindowFrom","ptr",$data)
Return $xSDL_CreateWindowFrom[0]
EndFunc
Func SDL_DestroyWindow($win)
$xSDL_DestroyWindow = DllCall($SDL,"none:cdecl","SDL_DestroyWindow","ptr",$win)
;Return $xSDL_DestroyWindow[0]
EndFunc
Func SDL_DisableScreenSaver()
$xSDL_DisableScreenSaver = DllCall($SDL,"none:cdecl","SDL_DisableScreenSaver")
EndFunc