Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rubberduckycooly
GitHub Repository: rubberduckycooly/Sonic-1-Sonic-2-2013-Script-Decompilation
Path: blob/master/Sonic 2/Scripts/LevelSelect/ConfigScreen.txt
1479 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Config Screen Object
4
// Script Author: Christian Whitehead/Simon Thomley
5
// Unpacked by Rubberduckycooly's script unpacker
6
// ----------------------------------
7
8
// ========================
9
// Aliases
10
// ========================
11
12
private alias object.value0 : object.timer
13
private alias object.value1 : object.bgBoxSize.x
14
private alias object.value2 : object.bgBoxSize.y
15
private alias object.value3 : object.selection
16
private alias object.value4 : object.playerID
17
18
private alias object.value5 : object.prevPlayerSelected
19
private alias object.value6 : object.prevItemsSelected
20
private alias object.value7 : object.nextPlayerSelected
21
private alias object.value8 : object.nextItemsSelected
22
private alias object.value9 : object.flightOnSelected
23
private alias object.value10 : object.spdCapOnSelected
24
private alias object.value11 : object.flightOffSelected
25
private alias object.value12 : object.spdCapOffSelected
26
private alias object.value13 : object.okSelected
27
28
// States
29
private alias 0 : CONFIGSCREEN_SETUP
30
private alias 1 : CONFIGSCREEN_ENTERMENU
31
private alias 2 : CONFIGSCREEN_APPEAR
32
private alias 3 : CONFIGSCREEN_SELECTING
33
private alias 4 : CONFIGSCREEN_SELECTEDDELAY
34
private alias 5 : CONFIGSCREEN_DISAPPEAR
35
private alias 6 : CONFIGSCREEN_EXITMENU
36
37
// Selection IDs
38
private alias 0 : CONFIGSCREEN_SEL_NONE
39
private alias 1 : CONFIGSCREEN_SEL_PLAYER
40
private alias 2 : CONFIGSCREEN_SEL_ITEMS
41
private alias 3 : CONFIGSCREEN_SEL_FLIGHT
42
private alias 4 : CONFIGSCREEN_SEL_SPDCAP
43
private alias 5 : CONFIGSCREEN_SEL_OK
44
45
// Player IDs
46
private alias 0 : CONFIGSCREEN_PLAYER_ST
47
private alias 1 : CONFIGSCREEN_PLAYER_S
48
private alias 2 : CONFIGSCREEN_PLAYER_T
49
private alias 3 : CONFIGSCREEN_PLAYER_K
50
private alias 4 : CONFIGSCREEN_PLAYER_KT
51
52
// Origins Plus Player IDs
53
private alias 4 : CONFIGSCREEN_PLAYER_A
54
private alias 5 : CONFIGSCREEN_PLAYER_KT_O
55
private alias 6 : CONFIGSCREEN_PLAYER_AT
56
57
// Shield Types Aliases
58
private alias 0 : SHIELDTYPE_S2
59
private alias 1 : SHIELDTYPE_S3
60
private alias 2 : SHIELDTYPE_RAND_S2
61
private alias 3 : SHIELDTYPE_RAND_S3
62
63
// Player List Pos Aliases
64
private alias 0 : PLAYER_SONIC_A
65
private alias 1 : PLAYER_TAILS_A
66
private alias 2 : PLAYER_KNUCKLES_A
67
private alias 3 : PLAYER_SONIC_TAILS_A
68
private alias 4 : PLAYER_KNUCKLES_TAILS_A
69
private alias 5 : PLAYER_AMY_A
70
private alias 6 : PLAYER_AMY_TAILS_A
71
72
73
// ========================
74
// Function Declarations
75
// ========================
76
77
reserve function ConfigScreen_SetPlayer
78
79
80
// ========================
81
// Function Definitions
82
// ========================
83
84
private function ConfigScreen_SetPlayer
85
#platform: USE_ORIGINS
86
// Introduced in Origins Plus
87
88
switch object.playerID
89
case CONFIGSCREEN_PLAYER_ST
90
stage.playerListPos = PLAYER_SONIC
91
stage.player2Enabled = true
92
break
93
94
case CONFIGSCREEN_PLAYER_S
95
stage.playerListPos = PLAYER_SONIC
96
stage.player2Enabled = false
97
break
98
99
case CONFIGSCREEN_PLAYER_T
100
stage.playerListPos = PLAYER_TAILS
101
stage.player2Enabled = false
102
break
103
104
case CONFIGSCREEN_PLAYER_K
105
stage.playerListPos = PLAYER_KNUCKLES
106
stage.player2Enabled = false
107
break
108
109
case CONFIGSCREEN_PLAYER_KT_O
110
stage.playerListPos = PLAYER_KNUCKLES
111
stage.player2Enabled = true
112
break
113
114
case CONFIGSCREEN_PLAYER_A
115
stage.playerListPos = PLAYER_AMY
116
stage.player2Enabled = false
117
break
118
119
case CONFIGSCREEN_PLAYER_AT
120
stage.playerListPos = PLAYER_AMY
121
stage.player2Enabled = true
122
break
123
end switch
124
#endplatform
125
end function
126
127
// ========================
128
// Events
129
// ========================
130
131
event ObjectUpdate
132
switch object.state
133
case CONFIGSCREEN_SETUP
134
object.inkEffect = INK_ALPHA
135
object.alpha = 0x00
136
object.drawOrder = 6
137
object.state++
138
break
139
140
case CONFIGSCREEN_ENTERMENU
141
temp0 = 198
142
temp0 -= object.bgBoxSize.x
143
temp0 >>= 3
144
object.bgBoxSize.x += temp0
145
146
temp0 = 216
147
temp0 -= object.bgBoxSize.y
148
temp0 >>= 3
149
object.bgBoxSize.y += temp0
150
151
if object.bgBoxSize.x >= 188
152
object.bgBoxSize.x = 188
153
object.bgBoxSize.y = 208
154
object.state++
155
end if
156
break
157
158
case CONFIGSCREEN_APPEAR
159
if object.alpha < 0x100
160
object.alpha += 0x10
161
else
162
if options.physicalControls == true
163
object.selection = CONFIGSCREEN_SEL_PLAYER
164
else
165
object.selection = CONFIGSCREEN_SEL_NONE
166
end if
167
object.state++
168
end if
169
break
170
171
case CONFIGSCREEN_SELECTING
172
if options.physicalControls == true
173
if keyPress[0].up == true
174
object.selection--
175
if object.selection < CONFIGSCREEN_SEL_PLAYER
176
object.selection = CONFIGSCREEN_SEL_OK
177
end if
178
PlaySfx(SfxName[Menu Move], false)
179
end if
180
181
if keyPress[0].down == true
182
object.selection++
183
if object.selection > CONFIGSCREEN_SEL_OK
184
object.selection = CONFIGSCREEN_SEL_PLAYER
185
end if
186
187
PlaySfx(SfxName[Menu Move], false)
188
end if
189
190
switch object.selection
191
case CONFIGSCREEN_SEL_PLAYER
192
if keyPress[0].left == true
193
object.playerID--
194
195
#platform: USE_STANDALONE
196
if object.playerID < CONFIGSCREEN_PLAYER_ST
197
object.playerID = CONFIGSCREEN_PLAYER_KT
198
end if
199
#endplatform
200
201
#platform: USE_ORIGINS
202
if object.playerID == CONFIGSCREEN_PLAYER_A
203
if game.hasPlusDLC == false
204
object.playerID--
205
end if
206
end if
207
208
if object.playerID < CONFIGSCREEN_PLAYER_ST
209
if game.hasPlusDLC == true
210
object.playerID = CONFIGSCREEN_PLAYER_AT
211
else
212
object.playerID = CONFIGSCREEN_PLAYER_KT_O
213
end if
214
end if
215
#endplatform
216
PlaySfx(SfxName[Menu Move], false)
217
end if
218
219
if keyPress[0].right == true
220
object.playerID++
221
222
#platform: USE_STANDALONE
223
if object.playerID > CONFIGSCREEN_PLAYER_KT
224
object.playerID = CONFIGSCREEN_PLAYER_ST
225
end if
226
#endplatform
227
228
#platform: USE_ORIGINS
229
if object.playerID == CONFIGSCREEN_PLAYER_A
230
if game.hasPlusDLC == false
231
object.playerID++
232
end if
233
end if
234
235
if object.playerID == CONFIGSCREEN_PLAYER_AT
236
if game.hasPlusDLC == false
237
object.playerID++
238
end if
239
end if
240
241
if object.playerID > CONFIGSCREEN_PLAYER_AT
242
object.playerID = CONFIGSCREEN_PLAYER_ST
243
end if
244
#endplatform
245
PlaySfx(SfxName[Menu Move], false)
246
end if
247
248
#platform: USE_STANDALONE
249
switch object.playerID
250
case CONFIGSCREEN_PLAYER_ST
251
stage.playerListPos = PLAYER_SONIC_A
252
stage.player2Enabled = true
253
break
254
255
case CONFIGSCREEN_PLAYER_S
256
stage.playerListPos = PLAYER_SONIC_A
257
stage.player2Enabled = false
258
break
259
260
case CONFIGSCREEN_PLAYER_T
261
stage.playerListPos = PLAYER_TAILS_A
262
stage.player2Enabled = false
263
break
264
265
case CONFIGSCREEN_PLAYER_K
266
stage.playerListPos = PLAYER_KNUCKLES_A
267
stage.player2Enabled = false
268
break
269
270
case CONFIGSCREEN_PLAYER_KT
271
stage.playerListPos = PLAYER_KNUCKLES_A
272
stage.player2Enabled = true
273
break
274
end switch
275
#endplatform
276
277
#platform: USE_ORIGINS
278
CallFunction(ConfigScreen_SetPlayer)
279
#endplatform
280
break
281
282
case CONFIGSCREEN_SEL_ITEMS
283
if keyPress[0].left == true
284
options.shieldType--
285
if options.shieldType < SHIELDTYPE_S2
286
options.shieldType = SHIELDTYPE_RAND_S3
287
end if
288
PlaySfx(SfxName[Menu Move], false)
289
end if
290
291
if keyPress[0].right == true
292
options.shieldType++
293
if options.shieldType > SHIELDTYPE_RAND_S3
294
options.shieldType = SHIELDTYPE_S2
295
end if
296
PlaySfx(SfxName[Menu Move], false)
297
end if
298
break
299
300
case CONFIGSCREEN_SEL_FLIGHT
301
if keyPress[0].left == true
302
options.tailsFlight ^= 1
303
PlaySfx(SfxName[Menu Move], false)
304
end if
305
306
if keyPress[0].right == true
307
options.tailsFlight ^= 1
308
PlaySfx(SfxName[Menu Move], false)
309
end if
310
break
311
312
case CONFIGSCREEN_SEL_SPDCAP
313
if keyPress[0].left == true
314
options.airSpeedCap ^= 1
315
PlaySfx(SfxName[Menu Move], false)
316
end if
317
318
if keyPress[0].right == true
319
options.airSpeedCap ^= 1
320
PlaySfx(SfxName[Menu Move], false)
321
end if
322
break
323
324
case CONFIGSCREEN_SEL_OK
325
if keyPress[0].buttonA == true
326
object.state = CONFIGSCREEN_SELECTEDDELAY
327
PlaySfx(SfxName[Menu Select], false)
328
end if
329
330
if keyPress[0].start == true
331
object.state = CONFIGSCREEN_SELECTEDDELAY
332
PlaySfx(SfxName[Menu Select], false)
333
end if
334
break
335
end switch
336
337
if keyPress[0].buttonB == true
338
object.state = CONFIGSCREEN_DISAPPEAR
339
PlaySfx(SfxName[Menu Back], false)
340
end if
341
342
if object.state == CONFIGSCREEN_SELECTING
343
CheckTouchRect(0, 0, screen.xsize, screen.ysize)
344
if checkResult > -1
345
options.physicalControls = false
346
object.selection = CONFIGSCREEN_SEL_NONE
347
end if
348
end if
349
else
350
CheckTouchRect(0, 0, screen.xsize, screen.ysize)
351
if checkResult > -1
352
// Prev Player & Item Mode
353
temp0 = screen.xcenter
354
temp0 -= 26
355
temp1 = temp0
356
temp1 += 38
357
CheckTouchRect(temp0, 36, temp1, 68)
358
if checkResult > -1
359
object.prevPlayerSelected = true
360
else
361
object.prevPlayerSelected = false
362
end if
363
364
CheckTouchRect(temp0, 76, temp1, 108)
365
if checkResult > -1
366
object.prevItemsSelected = true
367
else
368
object.prevItemsSelected = false
369
end if
370
371
// Next Player & Item Mode
372
temp0 = screen.xcenter
373
temp0 += 58
374
temp1 = temp0
375
temp1 += 38
376
CheckTouchRect(temp0, 36, temp1, 68)
377
if checkResult > -1
378
object.nextPlayerSelected = true
379
else
380
object.nextPlayerSelected = false
381
end if
382
383
CheckTouchRect(temp0, 76, temp1, 108)
384
if checkResult > -1
385
object.nextItemsSelected = true
386
else
387
object.nextItemsSelected = false
388
end if
389
390
// Flight on/Speed Cap on
391
temp0 = screen.xcenter
392
temp0 -= 16
393
temp1 = temp0
394
temp1 += 54
395
CheckTouchRect(temp0, 116, temp1, 148)
396
if checkResult > -1
397
object.flightOnSelected = true
398
else
399
object.flightOnSelected = false
400
end if
401
402
CheckTouchRect(temp0, 156, temp1, 188)
403
if checkResult > -1
404
object.spdCapOnSelected = true
405
else
406
object.spdCapOnSelected = false
407
end if
408
409
// Flight on/Speed Cap off
410
temp0 = screen.xcenter
411
temp0 += 38
412
temp1 = temp0
413
temp1 += 54
414
CheckTouchRect(temp0, 116, temp1, 148)
415
if checkResult > -1
416
object.flightOffSelected = true
417
else
418
object.flightOffSelected = false
419
end if
420
421
CheckTouchRect(temp0, 156, temp1, 188)
422
if checkResult > -1
423
object.spdCapOffSelected = true
424
else
425
object.spdCapOffSelected = false
426
end if
427
428
// OK button
429
temp0 = screen.xcenter
430
temp0 -= 27
431
temp1 = temp0
432
temp1 += 54
433
CheckTouchRect(temp0, 192, temp1, 218)
434
if checkResult > -1
435
object.okSelected = true
436
else
437
object.okSelected = false
438
end if
439
else
440
if object.prevPlayerSelected == true
441
object.prevPlayerSelected = false
442
object.playerID--
443
444
#platform: USE_STANDALONE
445
if object.playerID < CONFIGSCREEN_PLAYER_ST
446
object.playerID = CONFIGSCREEN_PLAYER_KT
447
end if
448
449
switch object.playerID
450
case CONFIGSCREEN_PLAYER_ST
451
stage.playerListPos = PLAYER_SONIC_A
452
stage.player2Enabled = true
453
break
454
455
case CONFIGSCREEN_PLAYER_S
456
stage.playerListPos = PLAYER_SONIC_A
457
stage.player2Enabled = false
458
break
459
460
case CONFIGSCREEN_PLAYER_T
461
stage.playerListPos = PLAYER_TAILS_A
462
stage.player2Enabled = false
463
break
464
465
case CONFIGSCREEN_PLAYER_K
466
stage.playerListPos = PLAYER_KNUCKLES_A
467
stage.player2Enabled = false
468
break
469
470
case CONFIGSCREEN_PLAYER_KT
471
stage.playerListPos = PLAYER_KNUCKLES_A
472
stage.player2Enabled = true
473
break
474
end switch
475
#endplatform
476
477
#platform: USE_ORIGINS
478
// Uh... there's no DLC checks here...
479
// Yeah, Origins doesn't have touch controls, but why did they edit this at all at that point?
480
if object.playerID < CONFIGSCREEN_PLAYER_ST
481
object.playerID = CONFIGSCREEN_PLAYER_AT
482
end if
483
484
CallFunction(ConfigScreen_SetPlayer)
485
#endplatform
486
487
PlaySfx(SfxName[Menu Move], false)
488
end if
489
490
if object.prevItemsSelected == true
491
object.prevItemsSelected = false
492
options.shieldType--
493
if options.shieldType < SHIELDTYPE_S2
494
options.shieldType = SHIELDTYPE_RAND_S3
495
end if
496
PlaySfx(SfxName[Menu Move], false)
497
end if
498
499
if object.nextPlayerSelected == true
500
object.nextPlayerSelected = false
501
object.playerID++
502
if object.playerID > CONFIGSCREEN_PLAYER_KT
503
object.playerID = CONFIGSCREEN_PLAYER_ST
504
end if
505
506
#platform: USE_STANDALONE
507
switch object.playerID
508
case CONFIGSCREEN_PLAYER_ST
509
stage.playerListPos = PLAYER_SONIC_A
510
stage.player2Enabled = true
511
break
512
513
case CONFIGSCREEN_PLAYER_S
514
stage.playerListPos = PLAYER_SONIC_A
515
stage.player2Enabled = false
516
break
517
518
case CONFIGSCREEN_PLAYER_T
519
stage.playerListPos = PLAYER_TAILS_A
520
stage.player2Enabled = false
521
break
522
523
case CONFIGSCREEN_PLAYER_K
524
stage.playerListPos = PLAYER_KNUCKLES_A
525
stage.player2Enabled = false
526
break
527
528
case CONFIGSCREEN_PLAYER_KT
529
stage.playerListPos = PLAYER_KNUCKLES_A
530
stage.player2Enabled = true
531
break
532
end switch
533
#endplatform
534
535
#platform: USE_ORIGINS
536
// Uh... there's no DLC checks here...
537
// Yeah, Origins doesn't have touch controls, but why did they edit this at all at that point?
538
if object.playerID > CONFIGSCREEN_PLAYER_AT
539
object.playerID = CONFIGSCREEN_PLAYER_ST
540
end if
541
542
CallFunction(ConfigScreen_SetPlayer)
543
#endplatform
544
545
PlaySfx(SfxName[Menu Move], false)
546
end if
547
548
if object.nextItemsSelected == true
549
object.nextItemsSelected = false
550
options.shieldType++
551
if options.shieldType > SHIELDTYPE_RAND_S3
552
options.shieldType = SHIELDTYPE_S2
553
end if
554
PlaySfx(SfxName[Menu Move], false)
555
end if
556
557
if object.flightOnSelected == true
558
object.flightOnSelected = false
559
options.tailsFlight = true
560
PlaySfx(SfxName[Menu Move], false)
561
end if
562
563
if object.flightOffSelected == true
564
object.flightOffSelected = false
565
options.tailsFlight = false
566
PlaySfx(SfxName[Menu Move], false)
567
end if
568
569
if object.spdCapOnSelected == true
570
object.spdCapOnSelected = false
571
options.airSpeedCap = true
572
PlaySfx(SfxName[Menu Move], false)
573
end if
574
575
if object.spdCapOffSelected == true
576
object.spdCapOffSelected = false
577
options.airSpeedCap = false
578
PlaySfx(SfxName[Menu Move], false)
579
end if
580
581
if object.okSelected == true
582
object.okSelected = false
583
object.state = CONFIGSCREEN_SELECTEDDELAY
584
PlaySfx(SfxName[Menu Select], false)
585
end if
586
end if
587
588
if keyPress[0].buttonB == true
589
object.state = CONFIGSCREEN_DISAPPEAR
590
PlaySfx(SfxName[Menu Back], false)
591
end if
592
593
if object.state == CONFIGSCREEN_SELECTING
594
if keyPress[0].up == true
595
options.physicalControls = true
596
object.selection = CONFIGSCREEN_SEL_OK
597
end if
598
599
if keyPress[0].down == true
600
options.physicalControls = true
601
object.selection = CONFIGSCREEN_SEL_PLAYER
602
end if
603
end if
604
end if
605
break
606
607
case CONFIGSCREEN_SELECTEDDELAY
608
if object.timer < 32
609
object.timer++
610
else
611
object.timer = 0
612
object.state++
613
end if
614
break
615
616
case CONFIGSCREEN_DISAPPEAR
617
if object.alpha > 0
618
object.alpha -= 16
619
else
620
object.state++
621
end if
622
break
623
624
case CONFIGSCREEN_EXITMENU
625
temp0 = 0
626
temp0 -= object.bgBoxSize.x
627
temp0 >>= 3
628
object.bgBoxSize.x += temp0
629
630
temp0 = 0
631
temp0 -= object.bgBoxSize.y
632
temp0 >>= 3
633
object.bgBoxSize.y += temp0
634
635
if object.bgBoxSize.x < 4
636
object.bgBoxSize.x = 0
637
object.bgBoxSize.y = 0
638
MenuControl_optionsMenuOpen = false
639
ResetObjectEntity(object.entityPos, TypeName[Blank Object], 0, 0, 0)
640
end if
641
break
642
643
end switch
644
end event
645
646
647
event ObjectDraw
648
temp0 = object.bgBoxSize.x
649
temp0 >>= 1
650
FlipSign(temp0)
651
temp0 += screen.xcenter
652
temp1 = object.bgBoxSize.y
653
temp1 >>= 1
654
FlipSign(temp1)
655
temp1 += screen.ycenter
656
DrawRect(temp0, temp1, object.bgBoxSize.x, object.bgBoxSize.y, 0x00, 0x00, 0x60, 0xFF)
657
658
temp0 += 2
659
temp1 += 2
660
temp2 = object.bgBoxSize.x
661
temp2 -= 4
662
temp3 = object.bgBoxSize.y
663
temp3 -= 4
664
DrawRect(temp0, temp1, temp2, temp3, 0x00, 0x20, 0xC0, 0xFF)
665
666
DrawSpriteScreenFX(0, FX_INK, screen.xcenter, 25)
667
if object.selection == CONFIGSCREEN_SEL_PLAYER
668
DrawSpriteScreenFX(2, FX_INK, screen.xcenter, 49)
669
else
670
DrawSpriteScreenFX(1, FX_INK, screen.xcenter, 49)
671
end if
672
673
if object.selection == CONFIGSCREEN_SEL_ITEMS
674
DrawSpriteScreenFX(4, FX_INK, screen.xcenter, 89)
675
else
676
DrawSpriteScreenFX(3, FX_INK, screen.xcenter, 89)
677
end if
678
679
if object.selection == CONFIGSCREEN_SEL_FLIGHT
680
DrawSpriteScreenFX(6, FX_INK, screen.xcenter, 129)
681
else
682
DrawSpriteScreenFX(5, FX_INK, screen.xcenter, 129)
683
end if
684
685
if object.selection == CONFIGSCREEN_SEL_SPDCAP
686
DrawSpriteScreenFX(8, FX_INK, screen.xcenter, 169)
687
else
688
DrawSpriteScreenFX(7, FX_INK, screen.xcenter, 169)
689
end if
690
691
if object.prevPlayerSelected == true
692
DrawSpriteScreenFX(10, FX_INK, screen.xcenter, 43)
693
else
694
DrawSpriteScreenFX(9, FX_INK, screen.xcenter, 43)
695
end if
696
697
if object.nextPlayerSelected == true
698
DrawSpriteScreenFX(12, FX_INK, screen.xcenter, 43)
699
else
700
DrawSpriteScreenFX(11, FX_INK, screen.xcenter, 43)
701
end if
702
703
if object.prevItemsSelected == true
704
DrawSpriteScreenFX(10, FX_INK, screen.xcenter, 83)
705
else
706
DrawSpriteScreenFX(9, FX_INK, screen.xcenter, 83)
707
end if
708
709
if object.nextItemsSelected == true
710
DrawSpriteScreenFX(12, FX_INK, screen.xcenter, 83)
711
else
712
DrawSpriteScreenFX(11, FX_INK, screen.xcenter, 83)
713
end if
714
715
if object.flightOnSelected == true
716
DrawSpriteScreenFX(14, FX_INK, screen.xcenter, 123)
717
else
718
DrawSpriteScreenFX(13, FX_INK, screen.xcenter, 123)
719
end if
720
721
if object.flightOffSelected == true
722
DrawSpriteScreenFX(16, FX_INK, screen.xcenter, 123)
723
else
724
DrawSpriteScreenFX(15, FX_INK, screen.xcenter, 123)
725
end if
726
727
if options.tailsFlight == true
728
DrawSpriteScreenFX(19, FX_INK, screen.xcenter, 123)
729
else
730
DrawSpriteScreenFX(20, FX_INK, screen.xcenter, 123)
731
end if
732
733
if object.spdCapOnSelected == true
734
DrawSpriteScreenFX(14, FX_INK, screen.xcenter, 163)
735
else
736
DrawSpriteScreenFX(13, FX_INK, screen.xcenter, 163)
737
end if
738
739
if object.spdCapOffSelected == true
740
DrawSpriteScreenFX(16, FX_INK, screen.xcenter, 163)
741
else
742
DrawSpriteScreenFX(15, FX_INK, screen.xcenter, 163)
743
end if
744
745
if options.airSpeedCap == true
746
DrawSpriteScreenFX(19, FX_INK, screen.xcenter, 163)
747
else
748
DrawSpriteScreenFX(20, FX_INK, screen.xcenter, 163)
749
end if
750
751
temp0 = object.timer
752
temp0 >>= 1
753
temp0 &= 1
754
temp0 += 17
755
if object.okSelected == true
756
temp0 = 18
757
end if
758
DrawSpriteScreenFX(temp0, FX_INK, screen.xcenter, 195)
759
760
if options.physicalControls == true
761
if object.selection == CONFIGSCREEN_SEL_OK
762
if object.state != CONFIGSCREEN_SELECTEDDELAY
763
DrawSpriteScreenFX(21, FX_INK, screen.xcenter, 195)
764
end if
765
end if
766
end if
767
768
switch object.playerID
769
case CONFIGSCREEN_PLAYER_ST
770
DrawSpriteScreenFX(22, FX_INK, screen.xcenter, 41)
771
DrawSpriteScreenFX(23, FX_INK, screen.xcenter, 41)
772
break
773
774
case CONFIGSCREEN_PLAYER_S
775
DrawSpriteScreenFX(24, FX_INK, screen.xcenter, 41)
776
break
777
778
case CONFIGSCREEN_PLAYER_T
779
DrawSpriteScreenFX(25, FX_INK, screen.xcenter, 41)
780
break
781
782
case CONFIGSCREEN_PLAYER_K
783
DrawSpriteScreenFX(26, FX_INK, screen.xcenter, 41)
784
break
785
786
#platform: USE_STANDALONE
787
case CONFIGSCREEN_PLAYER_KT
788
DrawSpriteScreenFX(27, FX_INK, screen.xcenter, 41)
789
DrawSpriteScreenFX(28, FX_INK, screen.xcenter, 41)
790
break
791
#endplatform
792
793
#platform: USE_ORIGINS
794
case CONFIGSCREEN_PLAYER_KT_O
795
DrawSpriteScreenFX(27, FX_INK, screen.xcenter, 41)
796
DrawSpriteScreenFX(28, FX_INK, screen.xcenter, 41)
797
break
798
799
case CONFIGSCREEN_PLAYER_A
800
DrawSpriteScreenFX(29, FX_INK, screen.xcenter, 41)
801
break
802
803
case CONFIGSCREEN_PLAYER_AT
804
DrawSpriteScreenFX(30, FX_INK, screen.xcenter, 41)
805
DrawSpriteScreenFX(31, FX_INK, screen.xcenter, 41)
806
break
807
#endplatform
808
end switch
809
810
#platform: USE_STANDALONE
811
switch options.shieldType
812
case SHIELDTYPE_S2
813
DrawSpriteScreenFX(29, FX_INK, screen.xcenter, 86)
814
break
815
816
case SHIELDTYPE_S3
817
DrawSpriteScreenFX(30, FX_INK, screen.xcenter, 78)
818
break
819
820
case SHIELDTYPE_RAND_S2
821
DrawSpriteScreenFX(31, FX_INK, screen.xcenter, 86)
822
break
823
824
case SHIELDTYPE_RAND_S3
825
DrawSpriteScreenFX(30, FX_INK, screen.xcenter, 78)
826
DrawSpriteScreenFX(32, FX_INK, screen.xcenter, 78)
827
break
828
end switch
829
#endplatform
830
831
#platform: USE_ORIGINS
832
switch options.shieldType
833
case SHIELDTYPE_S2
834
DrawSpriteScreenFX(32, FX_INK, screen.xcenter, 86)
835
break
836
837
case SHIELDTYPE_S3
838
DrawSpriteScreenFX(33, FX_INK, screen.xcenter, 78)
839
break
840
841
case SHIELDTYPE_RAND_S2
842
DrawSpriteScreenFX(34, FX_INK, screen.xcenter, 86)
843
break
844
845
case SHIELDTYPE_RAND_S3
846
DrawSpriteScreenFX(33, FX_INK, screen.xcenter, 78)
847
DrawSpriteScreenFX(35, FX_INK, screen.xcenter, 78)
848
break
849
end switch
850
#endplatform
851
end event
852
853
854
event ObjectStartup
855
LoadSpriteSheet("LevelSelect/Icons.gif")
856
SpriteFrame(-52, 0, 104, 7, 103, 430) // GAME CONFIG text - #0
857
858
SpriteFrame(-82, 0, 48, 7, 158, 454) // PLAYER text - #1
859
SpriteFrame(-82, 0, 48, 7, 207, 454) // PLAYER text (Selected) - #2
860
SpriteFrame(-82, 0, 40, 7, 158, 446) // ITEMS text - #3
861
SpriteFrame(-82, 0, 40, 7, 207, 446) // ITEMS text (Selected) - #4
862
SpriteFrame(-82, 0, 48, 7, 158, 438) // FLIGHT text - #5
863
SpriteFrame(-82, 0, 48, 7, 207, 438) // FLIGHT text (Selected) - #6
864
SpriteFrame(-82, 0, 56, 7, 46, 378) // AIR CAP text - #7
865
SpriteFrame(-82, 0, 56, 7, 199, 462) // AIR CAP text (Selected) - #8
866
867
SpriteFrame(-16, 0, 20, 20, 138, 22) // Left - #9
868
SpriteFrame(-16, 0, 20, 20, 138, 64) // Left (Selected) - #10
869
SpriteFrame(64, 0, 20, 20, 159, 22) // Right - #11
870
SpriteFrame(64, 0, 20, 20, 159, 64) // Right (Selected) - #12
871
872
SpriteFrame(-8, 0, 40, 20, 1, 411) // ON - #13
873
SpriteFrame(-8, 0, 40, 20, 42, 411) // ON (Selected) - #14
874
SpriteFrame(44, 0, 40, 20, 1, 432) // OFF - #15
875
SpriteFrame(44, 0, 40, 20, 42, 432) // OFF (Selected) - #16
876
SpriteFrame(-20, 0, 40, 20, 1, 320) // OK - #17
877
SpriteFrame(-20, 0, 40, 20, 42, 320) // OK (Selected) - #18
878
SpriteFrame(-10, -2, 42, 22, 1, 362) // Back - #19
879
SpriteFrame(42, -2, 42, 22, 1, 362) // Back (Selected) - #20
880
SpriteFrame(-22, -2, 42, 22, 1, 362) // Selection Box - #21
881
882
SpriteFrame(16, 0, 16, 23, 46, 386) // Sonic (Alone) - #22
883
SpriteFrame(36, 0, 16, 23, 63, 386) // Tails (Alone) - #23
884
SpriteFrame(26, 0, 16, 23, 46, 386) // Sonic (& Tails) - #24
885
SpriteFrame(26, 0, 16, 23, 63, 386) // Tails (& Sonic) - #25
886
SpriteFrame(26, 0, 16, 23, 80, 386) // Knuckles (Alone) - #26
887
SpriteFrame(16, 0, 16, 23, 80, 386) // Knuckles (& Tails) - #27
888
SpriteFrame(36, 0, 16, 23, 63, 386) // Tails (& Knux) - #28
889
#platform: USE_ORIGINS
890
SpriteFrame(25, 1, 17, 22, 83, 410) // Amy (Alone) - #29
891
SpriteFrame(17, 1, 17, 22, 83, 410) // Amy (& Tails) - #30
892
SpriteFrame(36, 0, 16, 23, 63, 386) // Tails (& Amy) - #31
893
#endplatform
894
895
SpriteFrame(26, 0, 16, 14, 207, 314) // Shields (S2) - #29/32
896
SpriteFrame(17, 0, 34, 30, 207, 314) // Shields (S3) - #30/33
897
SpriteFrame(26, 0, 16, 14, 228, 299) // Random (S2) - #31/34
898
SpriteFrame(17, 0, 16, 14, 228, 299) // Random (S3) - #32/35
899
end event
900
901
902
// ========================
903
// Events
904
// ========================
905
906
event RSDKDraw
907
DrawSprite(0)
908
end event
909
910
911
event RSDKLoad
912
LoadSpriteSheet("Global/Display.gif")
913
SpriteFrame(-16, -16, 32, 32, 1, 143)
914
915
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
916
end event
917
918