forked from Xeeynamo/vscode-rsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rsdk-snippets.json
1518 lines (1373 loc) · 46.7 KB
/
rsdk-snippets.json
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
{
"Setup v3 Script":{
"prefix": "v3 Setup",
"body": [
"// RSDK Project ${3|Sonic CD,Custom v3 Project|}",
"// Script Name: $TM_FILENAME_BASE",
"// Script Author: ${4:Script Author}",
"",
"// Aliases",
"",
"// States",
"",
"// Custom Aliases",
"",
"",
"// Function declarations",
"",
"",
"sub ObjectMain",
"\t$0",
"end sub",
"",
"",
"sub ObjectPlayerInteraction",
"",
"end sub",
"",
"",
"sub ObjectDraw",
"",
"end sub",
"",
"",
"sub ObjectStartup",
"",
"end sub",
"",
"",
"// ========================",
"// Editor Subs",
"// ========================",
"",
"sub RSDKDraw",
"\tDrawSprite(0)",
"end sub",
"",
"sub RSDKLoad",
"\tLoadSpriteSheet(\"Global/Display.gif\")",
"\tSpriteFrame(-16, -16, 32, 32, 1, 143)\t\t// #0 - \"Script\" Icon",
"\t",
"\tSetVariableAlias(ALIAS_VAR_PROPVAL, \"unused\")",
"end sub"
],
"description": "Set basic format for a v3 script"
},
"Setup v4 Script":{
"prefix": "v4 Setup",
"body": [
"// ${3|Sonic 1,Sonic 2,Custom v4 Project|}",
"// Script Name: $TM_FILENAME_BASE",
"// Script Author: ${4:Script Author}",
"",
"// ========================",
"// Aliases",
"// ========================",
"",
"// States",
"",
"// Custom Aliases",
"",
"",
"// ========================",
"// Function Declarations",
"// ========================",
"",
"",
"// ========================",
"// Static Values",
"// ========================",
"",
"",
"// ========================",
"// Tables",
"// ========================",
"",
"",
"// ========================",
"// Function Definitions",
"// ========================",
"",
"",
"// ========================",
"// Events",
"// ========================",
"",
"event ObjectUpdate",
"\t$0",
"end event",
"",
"",
"event ObjectDraw",
"",
"end event",
"",
"",
"event ObjectStartup",
"",
"end event",
"",
"",
"// ========================",
"// Editor Events",
"// ========================",
"",
"event RSDKDraw",
"\tDrawSprite(0)",
"end event",
"",
"event RSDKLoad",
"\tLoadSpriteSheet(\"Global/Display.gif\")",
"\tSpriteFrame(-16, -16, 32, 32, 1, 143)\t\t// #0 - \"Script\" Icon",
"\t",
"\tSetVariableAlias(ALIAS_VAR_PROPVAL, \"unused\")",
"end event"
],
"description": "Set basic format for a v4 script"
},
"v3 Sub Events": {
"prefix": "(v3) sub Event",
"body": [
"sub ${3|ObjectMain,ObjectDraw,ObjectPlayerInteraction,ObjectStartup|}",
"\t$0",
"end sub"
],
"description": [
"ObjectMain - Calls once every frame per object",
"\rif priority allows for it\n",
"ObjectDraw - Calls once every frame per object",
"\rif priority allows for it. The order is based",
"\ron the value of Object.DrawOrder\n",
"ObjectPlayerInteraction - Calls once every frame per object",
"\rif priority allows for it",
"\rand Player.ObjectInteractions is enabled\n",
"ObjectStartup - Calls once per object type",
"\rwhen the stage loads.",
"\rUsed for loading sheets, SpriteFrames",
"\rand change behaviour based on property"
]
},
"v4 Events": {
"prefix": "(v4) Events",
"body": [
"event ${3|ObjectUpdate,ObjectDraw,ObjectStartup|}",
"\t$0",
"end event"
],
"description": [
"ObjectUpdate - Calls once every frame per object",
"\rif priority allows for it\n",
"ObjectDraw - Calls once every frame per object",
"\rif priority allows for it. The order is based",
"\ron the value of Object.DrawOrder\n",
"ObjectStartup - Calls once per object type",
"\rwhen the stage loads.",
"\rUsed for loading sheets, SpriteFrames",
"\rand change behaviour based on property"
]
},
"Tips":{
"prefix": "RetroScript Tips",
"body": [
"// -Indexed arrays can have a '+' or '-' added to refer to the next or previous object in the level object list",
"\r// -While their name give an indication of for what they should be used, the purpose of a variable is not set in stone",
"\r// -Be careful with usage of TempValues, since they are used for all objects, a constant miss-use of them can break behaviour of objects",
"\r// -Object.XPos and Object.YPos use floating points, the last 4 zeroes on the value are sub-pixel values",
"\r// -Due to how the engine works, using iXPos or iYPos at any point will truncate the sub-pixel value of XPos and YPos in the object\n"
],
"description": "Just some general tips"
},
"Add v3 callback aliases":{
"prefix": "(v3) Callback aliases",
"body": [
"// Engine Callbacks aliases",
"#alias 2 : CALLBACK_TATTACK_NOTIFY_ENTER",
"#alias 3 : CALLBACK_TATTACK_NOTIFY_EXIT",
"#alias 6 : CALLBACK_RESTART_SELECTED",
"#alias 7 : CALLBACK_EXIT_SELECTED",
"#alias 13 : CALLBACK_PAUSE_REQUESTED",
"#alias 15 : CALLBACK_STAFF_CREDITS",
"",
"#alias 4097 : CALLBACK_SET1P",
"#alias 4098 : CALLBACK_SET2P\n"
],
"description": "Add alias in script of the most used engine states\n\rplus SET1P and 2P, which helps adding an AI player"
},
"Add v3 tileinfo aliases":{
"prefix": "(v3) Tileinfo aliases",
"body": [
"// Tileinfo Aliases",
"#alias 0 : TILEINFO_INDEX",
"#alias 1 : TILEINFO_DIRECTION",
"#alias 2 : TILEINFO_VISUALPLANE",
"#alias 3 : TILEINFO_SOLIDITYA",
"#alias 4 : TILEINFO_SOLIDITYB",
"#alias 5 : TILEINFO_FLAGSA",
"#alias 6 : TILEINFO_ANGLEA",
"#alias 7 : TILEINFO_FLAGSB",
"#alias 8 : TILEINFO_ANGLEB\n"
],
"description": "Add alias in script for usage in TileInfo funcs\n\rFLAGSB and ANGLEB are read-only"
},
"Add v3 face flag aliases":{
"prefix": "(v3) Face aliases",
"body": [
"// Face Aliases",
"#alias 0 : FACE_TEXTURED_3D",
"#alias 1 : FACE_TEXTURED_2D",
"#alias 2 : FACE_COLOURED_3D",
"#alias 3 : FACE_COLOURED_2D\n"
],
"description": "Add alias in script for usage in FaceBuffer.Flag"
},
"Add v3 collision side aliases":{
"prefix": "(v3) CSIDE aliases",
"body": [
"// Collision Side Aliases",
"#alias 0 : CSIDE_FLOOR",
"#alias 1 : CSIDE_LWALL",
"#alias 2 : CSIDE_RWALL",
"#alias 3 : CSIDE_ROOF\n"
],
"description": "Add alias in script for usage with ObjectTileCollision"
},
"Add v3 collision mode aliases":{
"prefix": "(v3) CMODE aliases",
"body": [
"// Collision Mode Aliases",
"#alias 0 : CMODE_FLOOR",
"#alias 1 : CMODE_LWALL",
"#alias 2 : CMODE_ROOF",
"#alias 3 : CMODE_RWALL\n"
],
"description": "Add alias in script for usage with ObjectTileCollision"
},
"Add v3 priority aliases":{
"prefix": "(v3) Priority aliases",
"body": [
"// Priority Aliases",
"#alias 0 : PRIORITY_BOUNDS // Object updates within 128 pixels of the screen border left/right and 256 pixels up/down",
"#alias 1 : PRIORITY_ACTIVE // Object will always update, unless paused/frozen",
"#alias 2 : PRIORITY_ALWAYS // Object will always update",
"#alias 3 : PRIORITY_XBOUNDS // Object updates within 128 pixels of the screen border left/right",
"#alias 4 : PRIORITY_BOUNDS_DESTROY // Object updates within 128 pixels of the screen border left/right, object will be set to Blank Object if the check fails",
"#alias 5 : PRIORITY_INACTIVE // Object never updates\n"
],
"description": "Add alias in script for usage with Object.Priority"
},
"Add v3 ink effect aliases":{
"prefix": "(v3) InkEffect aliases",
"body": [
"// Ink Effect Aliases",
"#alias 0 : INK_NONE // Disables transparency",
"#alias 1 : INK_BLEND // Uses half transparency",
"#alias 2 : INK_ALPHA // Uses transparency value of Object.Alpha",
"#alias 3 : INK_ADD // Uses transparency value of Object.Alpha, and a bright tint",
"#alias 4 : INK_SUB // Uses transparency value of Object.Alpha, and a dark tint\n"
],
"description": "Add alias in script for usage with Object.InkEffect"
},
"Add v3 misc aliases":{
"prefix": "(v3) Misc aliases",
"body": [
"// Misc aliases",
"#alias 0 : GRAVITY_GROUND",
"#alias 1 : GRAVITY_AIR\n",
"#alias 0 : COLLISION_PLANE_A",
"#alias 1 : COLLISION_PLANE_B\n",
"#alias -1 : CONTROL_DISABLED",
"#alias 0 : CONTROL_ENABLED\n",
"#alias 0 : GAMEMODE_NOSAVE",
"#alias 1 : GAMEMODE_SAVEGAME",
"#alias 2 : GAMEMODE_TIMEATTACK",
"#alias 3 : GAMEMODE_DEMOMODE\n"
],
"description": "Add alias in script for misc stuff"
},
"Add v3 camera aliases":{
"prefix": "(v3) Camera aliases",
"body": [
"// Camera aliases",
"#alias 0 : CAMERASTYLE_FOLLOW",
"#alias 1 : CAMERASTYLE_EXTENDED",
"#alias 2 : CAMERASTYLE_EXTENDED_OFFSET_L",
"#alias 3 : CAMERASTYLE_EXTENDED_OFFSET_R",
"#alias 4 : CAMERASTYLE_HLOCKED\n"
],
"description": "Add alias in script for camera styles"
},
"Add v4 tile info aliases":{
"prefix": "(v4) Tileinfo aliases",
"body": [
"// Tileinfo aliases",
"private alias 0 : TILEINFO_INDEX",
"private alias 1 : TILEINFO_DIRECTION",
"private alias 2 : TILEINFO_VISUALPLANE",
"private alias 3 : TILEINFO_SOLIDITYA",
"private alias 4 : TILEINFO_SOLIDITYB",
"private alias 5 : TILEINFO_FLAGSA",
"private alias 6 : TILEINFO_ANGLEA",
"private alias 7 : TILEINFO_FLAGSB",
"private alias 8 : TILEINFO_ANGLEB\n"
],
"description": "Add alias in script for usage in TileInfo funcs\n\rFLAGSB and ANGLEB are read-only"
},
"Add v4 face flag aliases":{
"prefix": "(v4) Face aliases",
"body": [
"// Face Aliases",
"private alias 0 : FACE_TEXTURED_3D",
"private alias 1 : FACE_TEXTURED_2D",
"private alias 2 : FACE_COLOURED_3D",
"private alias 3 : FACE_COLOURED_2D",
"private alias 4 : FACE_FADED",
"private alias 5 : FACE_TEXTURED_C",
"private alias 6 : FACE_TEXTURED_D",
"private alias 7 : FACE_SPRITE3D\n"
],
"description": "Add alias in script for usage in FaceBuffer.Flag"
},
"Add v4 collision side aliases":{
"prefix": "(v4) CSIDE aliases",
"body": [
"// Collision Side Aliases",
"private alias 0 : CSIDE_FLOOR",
"private alias 1 : CSIDE_LWALL",
"private alias 2 : CSIDE_RWALL",
"private alias 3 : CSIDE_ROOF\n"
],
"description": "Add alias in script for usage with ObjectTileCollision"
},
"Add v4 collision mode aliases":{
"prefix": "(v4) CMODE aliases",
"body": [
"// Collision Mode Aliases",
"private alias 0 : CMODE_FLOOR",
"private alias 1 : CMODE_LWALL",
"private alias 2 : CMODE_ROOF",
"private alias 3 : CMODE_RWALL\n"
],
"description": "Add alias in script for usage with ObjectTileCollision"
},
"Add v4 priority aliases":{
"prefix": "(v4) Priority aliases",
"body": [
"// Priority Aliases",
"private alias 0 : PRIORITY_BOUNDS // Object updates within 128 pixels of the screen border left/right and 256 pixels up/down",
"private alias 1 : PRIORITY_ACTIVE // Object will always update, unless paused/frozen",
"private alias 2 : PRIORITY_ALWAYS // Object will always update",
"private alias 3 : PRIORITY_XBOUNDS // Object updates within 128 pixels of the screen border left/right",
"private alias 4 : PRIORITY_BOUNDS_DESTROY // Object updates within 128 pixels of the screen border left/right, object will be set to Blank Object if the check fails",
"private alias 5 : PRIORITY_INACTIVE // Object never updates",
"private alias 6 : PRIORITY_BOUNDS_SMALL // Object updates within 32 pixels of the screen border left/right and 128 pixels up/down",
"private alias 7 : PRIORITY_ACTIVE_SMALL // Object will always update, unless paused/frozen. The bounds ofobject.outOfBounds are much smaller\n"
],
"description": "Add alias in script for usage with object.priority"
},
"Add v4 inkeffect aliases":{
"prefix": "(v4) inkEffect aliases",
"body": [
"// Ink Effect Aliases",
"private alias 0 : INK_NONE // Disables transparency",
"private alias 1 : INK_BLEND // Uses half transparency",
"private alias 2 : INK_ALPHA // Uses transparency value of Object.Alpha",
"private alias 3 : INK_ADD // Uses transparency value of Object.Alpha, and a bright tint",
"private alias 4 : INK_SUB // Uses transparency value of Object.Alpha, and a dark tint\n"
],
"description": "Add alias in script for usage with object.inkEffect"
},
"Add v4 direction aliases":{
"prefix": "(v4) direction aliases",
"body": [
"// Direction Aliases",
"private alias 0 : FLIP_NONE // Sprite's normal direction",
"private alias 1 : FLIP_X // Sprite flipped horizontally",
"private alias 2 : FLIP_Y // Sprite flipped vertically",
"private alias 3 : FLIP_XY // Sprite flipped horizontally and vertically\n"
],
"description": "Add alias in script for usage with object.direction."
},
"Add v4 engine state aliases":{
"prefix": "(v4) engine state aliases",
"body": [
"// Engine State Aliases",
"private alias 0 : ENGINE_DEVMENU",
"private alias 1 : ENGINE_MAINGAME",
"private alias 2 : ENGINE_INITDEVMENU",
"private alias 3 : ENGINE_WAIT",
"private alias 4 : ENGINE_SCRIPTERROR",
"private alias 5 : ENGINE_INITPAUSE",
"private alias 6 : ENGINE_EXITPAUSE",
"private alias 7 : ENGINE_ENDGAME",
"private alias 8 : ENGINE_RESETGAME\n"
],
"description": "Add alias in script for usage with object.direction"
},
"Add v4 collision aliases":{
"prefix": "(v4) collision aliases",
"body": [
"// Collision Aliases",
"private alias 0 : COL_NONE",
"private alias 1 : COL_TOP",
"private alias 2 : COL_LEFT",
"private alias 3 : COL_RIGHT\n"
],
"description": "Add alias in script for collision."
},
"Add v4 misc aliases":{
"prefix": "(v4) Misc aliases",
"body": [
"// Misc aliases",
"private alias 0 : GRAVITY_GROUND",
"private alias 1 : GRAVITY_AIR\n",
"private alias 0 : PATH_A",
"private alias 1 : PATH_B\n",
"private alias -1 : CONTROLMODE_NONE",
"private alias 0 : CONTROLMODE_NORMAL\n",
"private alias 0 : GROUP_ALL\n"
],
"description": "Add alias in script for misc stuff"
},
"Add v4 camera aliases":{
"prefix": "(v4) Camera aliases",
"body": [
"// Camera aliases",
"private alias 0 : CAMERASTYLE_FOLLOW",
"private alias 1 : CAMERASTYLE_EXTENDED",
"private alias 2 : CAMERASTYLE_EXTENDED_OFFSET_L",
"private alias 3 : CAMERASTYLE_EXTENDED_OFFSET_R",
"private alias 4 : CAMERASTYLE_HLOCKED\n"
],
"description": "Add alias in script for camera styles"
},
"Alias":{
"prefix": "Alias",
"body": "${3|#alias,private alias,public alias|} ${4:var} : ${5:alias}\n",
"description": [
"Creates a new alias, it will",
"\rbe replaced with var on compile time",
"\r#alias is the format used in v3 and is always private",
"\rpublic/private alias is v4's"
]
},
"v3 Platform Types":{
"prefix": "(v3) #Platform",
"body": [
"#platform: ${3|Standard,Mobile,Use_Standalone,Use_Origins,SW_Renderer,HW_Renderer,Use_Haptics,No_Haptics,Use_Decomp|}",
"\t$0",
"#endplatform\n"
],
"description": [
"Skip over lines of code if",
"\rtype does not match with what",
"\rthe bytecode is being compiled for."
]
},
"v4 Platform Types":{
"prefix": "(v4) #Platform",
"body": [
"#platform: ${4|STANDARD,MOBILE,USE_STANDALONE,USE_ORIGINS,SW_RENDERING,HW_RENDERING,USE_F_FEEDBACK,NO_F_FEEDBACK,USE_NETWORKING,USE_DECOMP|}",
"\t$0",
"#endplatform\n"
],
"description": [
"Skip over lines of code if",
"\rtype does not match with what",
"\rthe bytecode is being compiled for."
]
},
"CheckEqual": {
"prefix": "Check Equal",
"body": "CheckEqual(${3:A}, ${4:B})\n",
"description": [
"Boolean expression.\n",
"\rmakes CheckResult true if A is the same as B"
]
},
"CheckNotEqual": {
"prefix": "Check Not Equal",
"body": "CheckNotEqual(${3:A}, ${4:B})\n",
"description": [
"Boolean expression.",
"\rmakes CheckResult true if A is not the same as B"
]
},
"CheckGreater": {
"prefix": "Check Greater",
"body": "CheckGreater(${3:A}, ${4:B})\n",
"description": [
"Boolean expression.",
"\rmakes CheckResult true if A is greater than B"
]
},
"CheckLower": {
"prefix": "Check Lower",
"body": "CheckLower(${3:A}, ${4:B})\n",
"description": [
"Boolean expression.",
"\rmakes CheckResult true if A is lower than B"
]
},
"if statement": {
"prefix": "if-statement",
"body": [
"if ${3:var} ${4:bool expression} ${5:int/var/alias}",
"\t$0",
"",
"end if"
],
"description": "if statement"
},
"if-else statement": {
"prefix": "if-else-statement",
"body": [
"if ${3:var} ${4:bool expression} ${5:int/var/alias}",
"\t$0",
"else",
"\t",
"end if"
],
"description": "if-else statement"
},
"switch statement": {
"prefix": "switch-statement",
"body": [
"switch ${3:var}",
"case ${4:int/alias}",
"\t$0",
"\tbreak\n",
"end switch"
],
"description": [
"Switch statement",
"\r'default' is optional.",
"\r'break' is used to stop fallthrough"
]
},
"while statement": {
"prefix": "while-statement",
"body": [
"while ${3:var} ${4:bool expression} ${5:int/var/alias}",
"\t$0",
"loop"
],
"description": "While statement"
},
"for-each statement": {
"prefix": "(v4) foreach-statement",
"body": [
"foreach(TypeName[${3:objectName}], ${4:int store}, ${5|ALL_ENTITIES,ACTIVE_ENTITIES|})",
"\t$0",
"next"
],
"description": [
"foreach statement",
"\riterates every TypeName object",
"\rand sets 'store' to the object's slotID.",
"\r'type' by default are the available three"
]
},
"Set new music track":{
"prefix": "Set Music Track",
"body": "SetMusicTrack(\"${3:string filePath}\", ${4:int trackID}, ${5:int loopPoint})\n",
"description": [
"Loads an ogg formatted file from",
"\rData/Music/[filePath] into trackList",
"\rslot trackID, with a loop point of loopPoint",
"\r(0 = no loop, 1 = loop from start, anything else is a sample to loop)"
]
},
"Play music":{
"prefix": "Play Music",
"body": "PlayMusic(${3:int trackID})\n",
"description": "Plays the music track loaded into the slot trackID"
},
"Stop music":{
"prefix": "Stop Music",
"body": "StopMusic()\n",
"description": "Stops the currently playing music track"
},
"Pause music":{
"prefix": "Pause Music",
"body": "PauseMusic()\n",
"description": "Pauses the currently playing music track"
},
"Resume music":{
"prefix": "Resume Music",
"body": "ResumeMusic()\n",
"description": "Resumes paused music"
},
"Swap music track":{
"prefix": "(v4) Swap Music Track",
"body": "SwapMusicTrack(\"${3:string filePath}\", ${4:int trackID}, ${5:int loopPoint}, ${6:int ratio})\n",
"description": [
"Similar to SetMusicTrack() and PlayMusic()",
"\rbut starts at a position based on ratio.",
"\rratio uses a 10000-based value",
"\rso 10000 = 1.0 music speed, 5000 = 0.5, etc.",
"\rUsed more commonly with speed shoes"
]
},
"Play sfx":{
"prefix": "Play Sfx",
"body": "PlaySfx(${3:int sfx}, ${4:bool loop})\n",
"description": "Plays the sfx with matching index (gameconfig index on v3), looping if the bool is true"
},
"Stop sfx":{
"prefix": "Stop Sfx",
"body": "StopSfx(${3:int sfx})\n",
"description": "Stops the sfx with matching index (gameconfig index on v3)"
},
"Play stage sfx":{
"prefix": "(v3) Play Stage Sfx",
"body": "PlayStageSfx(${3:int sfx}, ${4:bool loop})\n",
"description": [
"Plays the sfx with matching stageconfig index, looping if bool is true",
"merged in v4 with PlaySfx"
]
},
"Stop stage sfx":{
"prefix": "(v3) Stop Stage Sfx",
"body": "StopStageSfx(${3:int sfx})\n",
"description": [
"Stops the sfx with matching stageconfig index",
"merged in v4 with StopSfx"
]
},
"Set sfx attributes":{
"prefix": "Set Sfx Attributes",
"body": "SetSfxAttributes(${3:int sfx}, ${4:int loopCount}, ${5:int pan})\n",
"description": [
"Sets the amount of times for sfx to loop to loopCount",
"\r(-1 to leave it unchanged) and the panning of sfx to pan",
"\r(-100 to 100 for left to right, with 0 being balanced)"
]
},
"Load SpriteSheet":{
"prefix": "Load SpriteSheet",
"body": "LoadSpriteSheet(\"${3:Filepath}\")\n",
"description": [
"Loads a spritesheet from Data/Sprites/[Filepath]",
"\rand sets Object.SpriteSheet to the sheet's ID"
]
},
"Remove SpriteSheet":{
"prefix": "Remove Sprite Sheet",
"body": "RemoveSpriteSheet(\"${3:Filepath}\")\n",
"description": "Removes a sheet that matches Filepath if it exists"
},
"Add SpriteFrame":{
"prefix": "Sprite Frame",
"body": "SpriteFrame(${3:int PivotX}, ${4:int PivotY}, ${5:int Width}, ${6:int Height}, ${7:int sprX}, ${8:int sprY})\n",
"description": "Creates a spriteframe with the specified values"
},
"Edit Frame":{
"prefix": "Edit Frame",
"body": "EditFrame(${3:int frame}, ${4:int PivotX}, ${5:int PivotY}, ${6:int Width}, ${7:int Height}, ${8:int sprX}, ${9:int sprY})\n",
"description": [
"Creates a spriteframe with the specified values",
"\rthis feature is not in the 2011 steam release"
]
},
"Draw Sprite in object position":{
"prefix": "Draw Sprite",
"body": "DrawSprite(${3:int frame})\n",
"description": "Draw sprite frame at object's X and Y position"
},
"Draw Sprite w/ custom position":{
"prefix": "Draw Sprite XY",
"body": "DrawSpriteXY(${3:int frame}, ${4:int XPos}, ${5:int YPos})\n",
"description": [
"Draw sprite frame to a specified X and Y position",
"the position is interpreted as world-space (0x10000 = 1px)"
]
},
"Draw Sprite w/ custom screen position":{
"prefix": "Draw Sprite Screen XY",
"body": "DrawSpriteScreenXY(${3:int frame}, ${4:int iXPos}, ${5:int iYPos})\n",
"description": [
"Draw sprite frame to a specified X and Y position",
"the position is interpreted as screen-space (1px = 1px)"
]
},
"Draw Sprite w/ visual effects in custom position":{
"prefix": "Draw Sprite FX",
"body": "DrawSpriteFX(${3:int frame}, ${4|FX_SCALE,FX_ROTATE,FX_ROTOZOOM,FX_INK,FX_TINT,FX_FLIP|}, ${5:int XPos}, ${6:int YPos})\n",
"description": [
"Draw sprite frame to a specified X and Y position",
"\rposition is interpreted as world-space (0x10000 = 1px)"
]
},
"Draw Sprite w/ visual effects in custom screen position":{
"prefix": "Draw Sprite Screen FX",
"body": "DrawSpriteScreenFX(${3:int frame}, ${4|FX_SCALE,FX_ROTATE,FX_ROTOZOOM,FX_INK,FX_TINT,FX_FLIP|}, ${5:int iXPos}, ${6:int iYPos})\n",
"description": [
"Draw sprite frame to a specified X and Y position",
"\rposition is interpreted as screen-space (1 = 1px)"
]
},
"Draw tinted rectangle":{
"prefix": "Draw Tint Rect",
"body": "DrawTintRect(${3:int iXPos}, ${4:int iYPos}, ${5:int width}, ${6:int height})\n",
"description": [
"Draws a tinted rectangle with a size of width,height",
"\rat ixPos and iYPos"
]
},
"Draw Numbers":{
"prefix": "Draw Numbers",
"body": "DrawNumbers(${3:int startingFrame}, ${4:int iXPos}, ${5:int iYPos}, ${6:int value}, ${7:int digitCnt}, ${8:int spacing}, ${9:bool showAllDigits})\n",
"description": [
"Draws values using startingFrame as the",
"\rstarting point at iXPos and iYPos",
"\rwith spacing pixels between frames\n",
"\rif showAllDigits is false, only draw valid digits",
"\rotherwise, draw digitCnt digits with extras as 0"
]
},
"Draw Act Name":{
"prefix": "Draw Act Name",
"body": "DrawActName(${3:int startingFrame}, ${4:int iXPos}, ${5:int iYPos}, ${6:int align}, ${7:bool allowLowerCase}, ${8:int space width}, ${9:int spacing})\n",
"description": [
"Draws the loaded stage's act name using 26 frames",
"\rstarting from startingFrame at iXPos and iYPos",
"\rwith spacing pixels between each letter\n",
"\ralign determines how the act name should be drawn",
"\rwith 0 drawing the whole name, while 1 and 2 picks",
"\rthe first and second words respectively and draw separate",
"\r(while v3 has access to this,\n CD titlecards don't use this system by default)"
]
},
"Draw rectangle":{
"prefix": "Draw Rect",
"body": "DrawRect(${3:int iXPos}, ${4:int iYPos}, ${5:int width}, ${6:int height}, ${7:int Red}, ${8:int Green}, ${9:int Blue}, ${10:int Alpha})\n",
"description": [
"Draws a rectangle with a size of width,height\nat ixPos and iYPos,",
"\rwith a color of Red, Green, Blue along Alpha"
]
},
"Load Animation":{
"prefix": "Load Animation",
"body": "LoadAnimation(\"${3:AniPath}\")\n",
"description": [
"Loads an animation from Data/Animations/[AniPath]",
"\rfor the object to use"
]
},
"Draw Player Animation":{
"prefix": "(v3) Draw Player Animation",
"body": "DrawPlayerAnimation()\n",
"description": [
"Draws the player at it's X and Y position",
"\rbased on the loaded animation and",
"\rObject.Frame/Object.Animation.\n",
"\rv3 Exclusive, merged with DrawObjectAnimation in v4"
]
},
"Draw Object Animation":{
"prefix": "Draw Object Animation",
"body": "DrawObjectAnimation()\n",
"description": [
"Draws the object at it's X and Y position",
"\rbased on the loaded animation and",
"\rObject.Frame/Object.Animation.\n",
"\rObjects that use animation files cannot use transparency or scale\n",
"\rin v3 rotation is not possible on objects with",
"\ranimation files aside from the player"
]
},
"Load Video":{
"prefix": "(v3) Load Video",
"body": "LoadVideo(\"${3:VideoName}\")\n",
"description": [
"Load a video with the name of VideoName",
"\rfrom Videos/. If the filename extension is .rsv",
"\ran RSV file will load instead"
]
},
"Next RSV Frame":{
"prefix": "(v3) Next Video Frame",
"body": "NextVideoFrame()\n",
"description": "Advances the video frame from an RSV file"
},
"Clear Draw List":{
"prefix": "Clear Draw List",
"body": "ClearDrawList(${3:int layer})\n",
"description": "Removes all entries in drawList layer"
},
"Add entity reference in Draw List":{
"prefix": "Add Draw List Entity Ref",
"body": "AddDrawListEntityRef(${3:int layer}, ${4:int ObjectPos})\n",
"description": "Adds ObjectPos to the drawList layer"
},
"Get entity reference in Draw List":{
"prefix": "Get Draw List Entity Ref",
"body": "GetDrawListEntityRef(${3:var store}, ${4:int layer}, ${5:int ObjectPos})\n",
"description": [
"Gets ObjectPos value in drawList layer",
"\rand stores it in store"
]
},
"Set entity reference in Draw List":{
"prefix": "Set Draw List Entity Ref",
"body": "SetDrawListEntityRef(${3:int newValue}, ${4:int layer}, ${5:int ObjectPos})\n",
"description": [
"Sets ObjectPos value in drawList layer",
"\rto the value of newValue"
]
},
"Load Palette":{
"prefix": "Load Palette",
"body": "LoadPalette(\"${3:string filePath}\", ${4:int palBankID}, ${5:int startPalIndex}, ${6:int startIndex}, ${7:int endIndex})\n",
"description": [
"Loads a palette from Data/Palettes/[filePath]",
"into a palette bank starting from startPalIndex,",
"with a file offset of startIndex and reading all",
"colors through to endIndex",
"HW Renderer cannot use this function"
]
},
"Rotate Palette":{
"prefix": "Rotate Palette",
"body": "RotatePalette(${3:int palBankID}, ${4:int startIndex}, ${5:int endIndex}, ${6:int rotationDirection})\n",
"description": [
"Rotates all colours in the palette bank",
"starting from startIndex through to endIndex,",
"it will move left if rotationDirection is 0",
"otherwise it will move right",
"HW Renderer cannot use this function"
]
},
"Set Screen Fade":{
"prefix": "Set Screen Fade",
"body": ["SetScreenFade(${3:int Red}, ${4:int Green}, ${5:int Blue}, ${6:int Alpha})\n"],
"description": [
"Sets the fade out effect",
"\rbased on Red, Blue, Green and Alpha values"
]
},
"Set Active Palette":{
"prefix": "Set Active Palette",
"body": "SetActivePalette(${3:int palBankID}, ${4:int startLine}, ${5:int endLine})\n",
"description": [
"Sets the active palette for palBankID",
"\rfor all lines from startLine through to endLine"
]
},
"Set Palette Entry":{
"prefix": "(v4) Set Palette Entry",
"body": "SetPaletteEntry(${3:int palBankID}, ${4:int palIndex}, ${5:int color})\n",
"description": [
"Sets the palette entry in palBankID",
"\rat palIndex to the value of 'color'",
"\rThe format for color is 0xRRGGBB"
]
},
"Get Palette Entry":{
"prefix": "(v4) Get Palette Entry",
"body": "GetPaletteEntry(${3:int palBankID}, ${4:int palIndex}, ${5:var palStore})\n",
"description": [
"Gets the palette entry in palBankID",
"\rat palIndex and stores it in palStore"
]
},
"Set Palette Fade":{
"prefix": "Set Palette Fade",
"body": "SetPaletteFade(${3:int destPalBankID}, ${4:int Red}, ${5:int Green}, ${6:int Blue}, ${7:int blendAmount}, ${8:int startIndex}, ${9:int endIndex})\n",
"description": [
"Blends the currently active palette with",
"\rRed, Green and Blue by blendAmount,",
"\rand stores it in destPalBankID,",
"\rstarting at palIndex and",
"\rcontinuing through to endIndex"
]
},
"v3 Copy Palette":{
"prefix": "(v3) Copy Palette",
"body": "CopyPalette(${3:int srcPal}, ${4:int destPal})\n",
"description": "Copies srcPal into destPal"
},
"v4 Copy Palette":{
"prefix": "(v4) Copy Palette",
"body": "CopyPalette(${3:int srcPal}, ${4:int srcPalStart}, ${5:int destPal}, ${6:int destPalStart}, ${7:int count})\n",
"description": [
"Copies count colors from srcPal",
"\rstarting at srcPalStart.",
"\rTo destPal, starting at destPalStart"
]
},
"Clear Screen":{
"prefix": "Clear Screen",
"body": "ClearScreen(${3:int clearIndex})\n",
"description": [
"Clears all pixels on screen with",
"\rclearIndex color in the active palette"
]
},
"Create Temporary Object": {
"prefix": "Create Temp Object",
"body": "CreateTempObject(${3:int objectType}, ${4:int propertyValue}, ${5:int XPos}, ${6:int YPos})\n",
"description": [
"Creates a temporary object specified",
"\rby objectType, propertyValue, XPos and YPos",
"\rnear the end of the object list and sets",
"\rTempObjectPos to the created object slotID.\n",
"\rThis should only be used for misc objects",
"\rthat aren't required for too long in the stage"
]
},