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/Special/SpecialFinish.txt
1487 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Special Finish 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.textTopPos
14
private alias object.value2 : object.textMidPos
15
private alias object.value3 : object.textBottomPos
16
private alias object.value4 : object.scorePos
17
private alias object.value5 : object.p1RingPos
18
private alias object.value6 : object.p2RingPos
19
private alias object.value7 : object.gemPos
20
private alias object.value8 : object.p1RingBonus
21
private alias object.value9 : object.p2RingBonus
22
private alias object.value10 : object.gemBonus
23
private alias object.value11 : object.resultsTextTop
24
private alias object.value12 : object.resultsTextMid
25
private alias object.value13 : object.resultsTextBottom
26
private alias object.value14 : object.emeraldAlpha
27
28
// Text Messages
29
private alias 0 : TEXT_NONE
30
private alias 1 : TEXT_FAILED
31
private alias 2 : TEXT_ONEEMERALD
32
private alias 3 : TEXT_ALLEMERALDS_CHAOS
33
private alias 4 : TEXT_CANCHANGEFORM
34
private alias 5 : TEXT_TOHIDDENPALACE
35
36
// States
37
private alias 0 : SPECIALFINISH_FADEIN
38
private alias 1 : SPECIALFINISH_FADEIDLE
39
private alias 2 : SPECIALFINISH_ENTERTEXT
40
private alias 3 : SPECIALFINISH_ENTEREMERALDS
41
private alias 4 : SPECIALFINISH_TALLYSCORE
42
private alias 5 : SPECIALFINISH_FAILED
43
private alias 6 : SPECIALFINISH_FADEOUT
44
private alias 7 : SPECIALFINISH_EXITRESULTS
45
private alias 8 : SPECIALFINISH_WINSHOWREWARD
46
private alias 9 : SPECIALFINISH_WINENTERTEXT
47
private alias 10 : SPECIALFINISH_WINEVENT
48
private alias 11 : SPECIALFINISH_WINIDLE
49
private alias 12 : SPECIALFINISH_WAITFORCALLBACK
50
51
// Player Aliases
52
private alias object.value0 : player.rings
53
54
private alias StageStatsUsabilityParam5 : stageStat.playerRings
55
56
57
// ========================
58
// Tables
59
// ========================
60
61
private table SpecialFinish_emeraldXPosTable
62
0, 24, 24, 0, -24, -24, 0
63
end table
64
65
private table SpecialFinish_emeraldYPosTable
66
84, 96, 120, 132, 120, 96, 108
67
end table
68
69
70
// ========================
71
// Events
72
// ========================
73
74
event ObjectUpdate
75
options.touchControls = false
76
switch object.state
77
case SPECIALFINISH_FADEIN
78
if object.timer < 256
79
object.timer += 8
80
SetScreenFade(224, 224, 224, object.timer)
81
else
82
if SpecialSetup_gotEmerald == true
83
temp0 = stage.actNum
84
temp0--
85
SetBit(specialStage.emeralds, temp0, true)
86
if specialStage.emeralds == 0x7F
87
object.resultsTextTop = TEXT_ALLEMERALDS_CHAOS
88
object.resultsTextMid = TEXT_ALLEMERALDS_CHAOS
89
#platform: USE_ORIGINS
90
CallNativeFunction2(NotifyCallback, NOTIFY_STATS_PARAM_2, 0)
91
#endplatform
92
else
93
object.resultsTextTop = TEXT_ONEEMERALD
94
object.resultsTextMid = TEXT_ONEEMERALD
95
end if
96
object.gemBonus = 10000
97
specialStage.listPos++
98
specialStage.listPos %= 7
99
else
100
object.resultsTextTop = TEXT_NONE
101
object.resultsTextMid = TEXT_FAILED
102
object.gemBonus = 0
103
end if
104
object.resultsTextBottom = 0
105
106
#platform: USE_ORIGINS
107
stageStat.playerRings = player[2].rings
108
#endplatform
109
object.p1RingBonus = player[2].rings
110
if stage.player2Enabled == true
111
object.p2RingBonus = player[3].rings
112
#platform: USE_ORIGINS
113
stageStat.playerRings += player[3].rings
114
#endplatform
115
else
116
object.p2RingBonus = 0
117
end if
118
119
#platform: USE_STANDALONE
120
stage.listPos = specialStage.nextZone
121
stage.activeList = REGULAR_STAGE
122
#endplatform
123
124
object.timer = 0
125
temp0 = 0
126
while temp0 < 20
127
ResetObjectEntity(temp0, TypeName[Blank Object], 0, 0, 0)
128
temp0++
129
loop
130
temp0++
131
while temp0 < 0x4A0
132
ResetObjectEntity(temp0, TypeName[Blank Object], 0, 0, 0)
133
temp0++
134
loop
135
stage.activeLayer[0] = 9
136
stage.activeLayer[1] = 9
137
stage.activeLayer[2] = 9
138
stage.activeLayer[3] = 9
139
object.controlMode = CONTROLMODE_P1
140
keyDown[0].left = false
141
keyDown[0].right = false
142
object.direction = FLIP_NONE
143
object.textTopPos = -384
144
object.textMidPos = 384
145
object.scorePos = 640
146
object.p1RingPos = 656
147
object.p2RingPos = 672
148
object.gemPos = 688
149
object.scorePos += 128
150
object.p1RingPos += 128
151
object.p2RingPos += 128
152
object.gemPos += 128
153
object.inkEffect = INK_ALPHA
154
PlayMusic(1)
155
#platform: USE_ORIGINS
156
game.callbackResult = -1
157
CallNativeFunction4(NotifyCallback, NOTIFY_SPECIAL_RETRY, SpecialSetup_gotEmerald, specialStage.listPos, specialStage.emeralds)
158
object.state = SPECIALFINISH_WAITFORCALLBACK
159
#endplatform
160
#platform: USE_STANDALONE
161
object.state++
162
#endplatform
163
SetScreenFade(224, 224, 224, 255)
164
end if
165
break
166
167
case SPECIALFINISH_FADEIDLE
168
object.timer++
169
if object.timer > 15
170
object.timer = 0
171
object.state++
172
#platform: USE_ORIGINS
173
stage.activeList = REGULAR_STAGE
174
stage.listPos = specialStage.nextZone
175
#endplatform
176
end if
177
SetScreenFade(224, 224, 224, 255)
178
break
179
180
case SPECIALFINISH_ENTERTEXT
181
if object.textTopPos < 0
182
object.textTopPos += 16
183
end if
184
185
if object.textMidPos > 0
186
object.textMidPos -= 16
187
end if
188
189
if object.scorePos > 0
190
object.scorePos -= 16
191
end if
192
193
if object.p1RingPos > 0
194
object.p1RingPos -= 16
195
end if
196
197
if object.p2RingPos > 0
198
object.p2RingPos -= 16
199
end if
200
201
if object.gemPos > 0
202
object.gemPos -= 16
203
else
204
object.state++
205
end if
206
break
207
208
case SPECIALFINISH_ENTEREMERALDS
209
object.timer++
210
if object.emeraldAlpha < 256
211
object.emeraldAlpha += 8
212
end if
213
if object.timer > 299
214
object.timer = 0
215
object.state++
216
end if
217
break
218
219
case SPECIALFINISH_TALLYSCORE
220
if object.p1RingBonus > 0
221
object.p1RingBonus--
222
player.score += 100
223
end if
224
225
if object.p2RingBonus > 0
226
object.p2RingBonus--
227
player.score += 100
228
end if
229
230
if object.gemBonus > 0
231
object.gemBonus -= 100
232
player.score += 100
233
end if
234
235
if player.score >= player.scoreBonus
236
#platform: USE_STANDALONE
237
player.lives++
238
#endplatform
239
#platform: USE_ORIGINS
240
if game.coinMode == false
241
player.lives++
242
else
243
CallNativeFunction2(NotifyCallback, NOTIFY_ADD_COIN, 1)
244
end if
245
#endplatform
246
player.scoreBonus += 50000
247
PlaySfx(SfxName[Life], false)
248
end if
249
250
CheckGreater(object.p1RingBonus, 0)
251
temp0 = checkResult
252
CheckGreater(object.p2RingBonus, 0)
253
temp0 |= checkResult
254
CheckGreater(object.gemBonus, 0)
255
temp0 |= checkResult
256
if temp0 == true
257
object.timer++
258
if object.timer == 2
259
PlaySfx(SfxName[Score Add], false)
260
object.timer = 0
261
end if
262
else
263
if SpecialSetup_gotEmerald == true
264
if specialStage.emeralds == 0x3FFF
265
object.state = SPECIALFINISH_WINSHOWREWARD
266
else
267
if specialStage.emeralds == 0x7F
268
switch stage.playerListPos
269
case PLAYER_SONIC_A
270
case PLAYER_KNUCKLES_A
271
object.state = SPECIALFINISH_WINSHOWREWARD
272
break
273
274
case PLAYER_TAILS_A
275
if options.superTails == true
276
object.state = SPECIALFINISH_WINSHOWREWARD
277
else
278
object.state++
279
end if
280
break
281
282
#platform: USE_ORIGINS
283
case PLAYER_AMY_A
284
object.state++
285
break
286
#endplatform
287
end switch
288
else
289
object.state++
290
end if
291
end if
292
else
293
object.state++
294
end if
295
object.timer = 0
296
PlaySfx(SfxName[Score Total], false)
297
end if
298
break
299
300
case SPECIALFINISH_FAILED
301
object.timer++
302
if object.timer == 160
303
object.timer = 0
304
object.state++
305
PlaySfx(SfxName[Warp], false)
306
end if
307
break
308
309
case SPECIALFINISH_FADEOUT
310
if object.timer < 400
311
object.timer += 8
312
SetScreenFade(248, 248, 248, object.timer)
313
else
314
object.timer = 248
315
object.state++
316
SetScreenFade(248, 248, 248, 255)
317
end if
318
break
319
320
case SPECIALFINISH_EXITRESULTS
321
if object.timer > 0
322
object.timer -= 8
323
else
324
#platform: USE_ORIGINS
325
recScore = player.score
326
#endplatform
327
fadeColor = 0
328
#platform: USE_ORIGINS
329
CallNativeFunction2(NotifyCallback, NOTIFY_STATS_RING, stageStat.playerRings)
330
#endplatform
331
if stage.listPos < stage.listSize
332
LoadStage()
333
else
334
stage.activeList = PRESENTATION_STAGE
335
stage.listPos = 0
336
LoadStage()
337
end if
338
end if
339
SetScreenFade(object.timer, object.timer, object.timer, 255)
340
break
341
342
case SPECIALFINISH_WINSHOWREWARD
343
object.timer++
344
if object.timer == 90
345
object.timer = 0
346
object.textBottomPos = 0
347
object.state++
348
end if
349
break
350
351
case SPECIALFINISH_WINENTERTEXT
352
if object.textTopPos > -384
353
object.textTopPos -= 32
354
object.textBottomPos -= 32
355
end if
356
if object.textMidPos < 384
357
object.textMidPos += 32
358
else
359
if specialStage.emeralds == 0x3FFF
360
object.resultsTextTop = TEXT_CANCHANGEFORM
361
object.resultsTextMid = TEXT_CANCHANGEFORM
362
object.resultsTextBottom = TEXT_CANCHANGEFORM
363
else
364
if options.hiddenPalace == true
365
object.resultsTextTop = TEXT_TOHIDDENPALACE
366
object.resultsTextMid = TEXT_TOHIDDENPALACE
367
object.resultsTextBottom = TEXT_TOHIDDENPALACE
368
else
369
object.resultsTextTop = TEXT_CANCHANGEFORM
370
object.resultsTextMid = TEXT_CANCHANGEFORM
371
object.resultsTextBottom = TEXT_CANCHANGEFORM
372
end if
373
end if
374
object.state++
375
end if
376
break
377
378
case SPECIALFINISH_WINEVENT
379
if object.textTopPos < 0
380
object.textTopPos += 16
381
object.textBottomPos += 16
382
end if
383
if object.textMidPos > 0
384
object.textMidPos -= 16
385
else
386
PlaySfx(SfxName[Event], false)
387
object.state++
388
end if
389
break
390
391
case SPECIALFINISH_WINIDLE
392
object.timer++
393
if object.timer == 200
394
object.timer = 0
395
object.state = SPECIALFINISH_FADEOUT
396
PlaySfx(SfxName[Warp], false)
397
end if
398
break
399
400
#platform: USE_ORIGINS
401
case SPECIALFINISH_WAITFORCALLBACK
402
if game.callbackResult >= 0
403
object.state = SPECIALFINISH_FADEIDLE
404
object.timer = 0
405
end if
406
SetScreenFade(224, 224, 224, 255)
407
break
408
#endplatform
409
end switch
410
end event
411
412
413
event ObjectDraw
414
switch object.state
415
case SPECIALFINISH_ENTERTEXT
416
case SPECIALFINISH_ENTEREMERALDS
417
case SPECIALFINISH_TALLYSCORE
418
case SPECIALFINISH_FAILED
419
case SPECIALFINISH_FADEOUT
420
case SPECIALFINISH_WINSHOWREWARD
421
case SPECIALFINISH_WINENTERTEXT
422
case SPECIALFINISH_WINEVENT
423
case SPECIALFINISH_WINIDLE
424
ClearScreen(152) // (White)
425
426
object.animationTimer += 16
427
object.animationTimer &= 0x1FF
428
Sin(temp0, object.animationTimer)
429
temp0 >>= 3
430
temp0 += 190
431
temp0 *= object.emeraldAlpha
432
temp0 >>= 8
433
object.alpha = temp0
434
435
temp0 = 0
436
while temp0 < 7
437
GetBit(temp1, specialStage.emeralds, temp0)
438
if temp1 == true
439
GetTableValue(temp2, temp0, SpecialFinish_emeraldXPosTable)
440
temp2 += screen.xcenter
441
GetTableValue(temp3, temp0, SpecialFinish_emeraldYPosTable)
442
#platform: USE_ORIGINS
443
if game.playMode == BOOT_PLAYMODE_MIRRORING
444
object.direction = FLIP_X
445
DrawSpriteScreenFX(temp0, FX_FLIP, temp2, temp3) // guess there's no fade-in in mirror mode
446
else
447
DrawSpriteScreenFX(temp0, FX_INK, temp2, temp3)
448
end if
449
#endplatform
450
#platform: USE_STANDALONE
451
DrawSpriteScreenFX(temp0, FX_INK, temp2, temp3)
452
#endplatform
453
end if
454
temp0++
455
temp1++
456
loop
457
458
temp7 = object.textTopPos
459
temp7 += screen.xcenter
460
switch object.resultsTextTop
461
default
462
break
463
464
case TEXT_ONEEMERALD
465
DrawSpriteScreenXY(24, temp7, 0)
466
DrawSpriteScreenXY(25, temp7, 0)
467
break
468
469
case TEXT_ALLEMERALDS_CHAOS
470
DrawSpriteScreenXY(27, temp7, 0)
471
DrawSpriteScreenXY(28, temp7, 0)
472
break
473
474
case TEXT_CANCHANGEFORM
475
DrawSpriteScreenXY(30, temp7, 0)
476
DrawSpriteScreenXY(31, temp7, 0)
477
DrawSpriteScreenXY(32, temp7, 0)
478
break
479
480
case TEXT_TOHIDDENPALACE
481
DrawSpriteScreenXY(36, temp7, 0)
482
DrawSpriteScreenXY(37, temp7, 0)
483
break
484
end switch
485
486
temp7 = object.textMidPos
487
temp7 += screen.xcenter
488
switch object.resultsTextMid
489
default
490
break
491
492
case TEXT_FAILED
493
DrawSpriteScreenXY(23, temp7, 0)
494
break
495
496
case TEXT_ONEEMERALD
497
DrawSpriteScreenXY(26, temp7, 0)
498
break
499
500
case TEXT_ALLEMERALDS_CHAOS
501
DrawSpriteScreenXY(29, temp7, 0)
502
break
503
504
case TEXT_CANCHANGEFORM
505
DrawSpriteScreenXY(33, temp7, 0)
506
break
507
508
case TEXT_TOHIDDENPALACE
509
DrawSpriteScreenXY(38, temp7, 0)
510
DrawSpriteScreenXY(39, temp7, 0)
511
DrawSpriteScreenXY(40, temp7, 0)
512
break
513
end switch
514
515
temp7 = object.textBottomPos
516
temp7 += screen.xcenter
517
switch object.resultsTextBottom
518
default
519
break
520
521
case TEXT_CANCHANGEFORM
522
DrawSpriteScreenXY(34, temp7, 0)
523
DrawSpriteScreenXY(35, temp7, 0)
524
break
525
526
case TEXT_TOHIDDENPALACE
527
DrawSpriteScreenXY(41, temp7, 0)
528
break
529
end switch
530
531
temp7 = object.scorePos
532
temp7 += screen.xcenter
533
DrawSpriteScreenXY(17, temp7, 145)
534
535
temp7 += 88
536
DrawNumbers(7, temp7, 145, player.score, 9, 8, false)
537
538
if stage.player2Enabled == true
539
temp7 = object.p1RingPos
540
temp7 += screen.xcenter
541
542
#platform: USE_STANDALONE
543
// It always shows "SONIC RINGS" regardless of the character...
544
DrawSpriteScreenXY(20, temp7, 161)
545
#endplatform
546
547
#platform: USE_ORIGINS
548
// ...they fixed that in Origins Plus!
549
switch stage.playerListPos
550
case PLAYER_SONIC_A
551
case PLAYER_SONIC_TAILS_A
552
DrawSpriteScreenXY(20, temp7, 161)
553
break
554
555
case PLAYER_TAILS_A
556
DrawSpriteScreenXY(21, temp7, 161)
557
break
558
559
case PLAYER_KNUCKLES_A
560
case PLAYER_KNUCKLES_TAILS_A
561
DrawSpriteScreenXY(42, temp7, 161)
562
break
563
564
case PLAYER_AMY_A
565
case PLAYER_AMY_TAILS_A
566
DrawSpriteScreenXY(43, temp7, 161)
567
break
568
end switch
569
#endplatform
570
571
temp7 += 88
572
DrawNumbers(7, temp7, 161, object.p1RingBonus, 5, 8, false)
573
574
temp7 = object.p2RingPos
575
temp7 += screen.xcenter
576
DrawSpriteScreenXY(21, temp7, 177)
577
578
temp7 += 88
579
DrawNumbers(7, temp7, 177, object.p2RingBonus, 5, 8, false)
580
581
if SpecialSetup_gotEmerald == true
582
temp7 = object.gemPos
583
temp7 += screen.xcenter
584
DrawSpriteScreenXY(22, temp7, 193)
585
586
temp7 += 88
587
DrawNumbers(7, temp7, 193, object.gemBonus, 5, 8, false)
588
end if
589
else
590
temp7 = object.p1RingPos
591
temp7 += screen.xcenter
592
DrawSpriteScreenXY(18, temp7, 169)
593
594
temp7 += 88
595
DrawNumbers(7, temp7, 169, object.p1RingBonus, 5, 8, false)
596
597
if SpecialSetup_gotEmerald == true
598
temp7 = object.p2RingPos
599
temp7 += screen.xcenter
600
DrawSpriteScreenXY(19, temp7, 193)
601
602
temp7 += 88
603
DrawNumbers(7, temp7, 193, object.gemBonus, 5, 8, false)
604
end if
605
end if
606
break
607
608
#platform: USE_ORIGINS
609
case SPECIALFINISH_WAITFORCALLBACK
610
break
611
#endplatform
612
end switch
613
end event
614
615
616
event ObjectStartup
617
LoadSpriteSheet("Special/Objects.gif")
618
619
// Chaos Emerald Frames
620
SpriteFrame(-8, -8, 16, 16, 1, 260) // Chaos Emerald 1 #0
621
SpriteFrame(-8, -8, 16, 16, 18, 260) // Chaos Emerald 2 #1
622
SpriteFrame(-8, -8, 16, 16, 35, 260) // Chaos Emerald 3 #2
623
SpriteFrame(-8, -8, 16, 16, 52, 260) // Chaos Emerald 4 #3
624
SpriteFrame(-8, -8, 16, 16, 69, 260) // Chaos Emerald 5 #4
625
SpriteFrame(-8, -8, 16, 16, 86, 260) // Chaos Emerald 6 #5
626
SpriteFrame(-8, -8, 16, 16, 103, 260) // Chaos Emerald 7 #6
627
628
// Number Frames
629
SpriteFrame(0, 0, 8, 11, 1, 361) // 0 - #7
630
SpriteFrame(0, 0, 8, 11, 10, 361) // 1 - #8
631
SpriteFrame(0, 0, 8, 11, 19, 361) // 2 - #9
632
SpriteFrame(0, 0, 8, 11, 28, 361) // 3 - #10
633
SpriteFrame(0, 0, 8, 11, 37, 361) // 4 - #11
634
SpriteFrame(0, 0, 8, 11, 46, 361) // 5 - #12
635
SpriteFrame(0, 0, 8, 11, 55, 361) // 6 - #13
636
SpriteFrame(0, 0, 8, 11, 64, 361) // 7 - #14
637
SpriteFrame(0, 0, 8, 11, 73, 361) // 8 - #15
638
SpriteFrame(0, 0, 8, 11, 82, 361) // 9 - #16
639
640
SpriteFrame(-96, 0, 44, 15, 1, 345) // Score Text - #17
641
SpriteFrame(-96, 0, 44, 15, 46, 345) // Rings Text - #18
642
SpriteFrame(-96, 0, 84, 15, 91, 345) // Gems Bonus Text - #19
643
SpriteFrame(-96, 0, 92, 15, 176, 345) // Sonic Rings Text - #20 (even if this sprite's position on the sheet was shifted 1 pixel left in Plus, this SpriteFrame was left alone, resulting in the sprite appearing cut off on the left with a white rectangle on the right when seen in-game)
644
if options.region == false
645
SpriteFrame(-96, 0, 92, 15, 269, 345) // Tails Rings Text - #21
646
else
647
SpriteFrame(-96, 0, 92, 15, 269, 329) // Miles Rings Text - #21
648
end if
649
SpriteFrame(-96, 0, 92, 15, 362, 345) // Gems Bonus (Again) - #22
650
SpriteFrame(-96, 50, 187, 16, 1, 277) // Special Stage Text - #23
651
652
//"[Player] Got A Chaos Emerald" Frames
653
switch stage.playerListPos
654
case PLAYER_SONIC_A
655
SpriteFrame(-72, 32, 72, 16, 189, 277) // Sonic Text - #24
656
SpriteFrame(8, 32, 72, 16, 412, 277) // "GOT A" Text - #25
657
break
658
659
case PLAYER_TAILS_A
660
if options.region == false
661
SpriteFrame(-69, 32, 69, 16, 262, 277) // Tails Text - #24
662
else
663
SpriteFrame(-79, 32, 79, 16, 332, 277) // Miles Text - #24
664
end if
665
666
SpriteFrame(8, 32, 72, 16, 412, 277) // "GOT A" Text - #25
667
break
668
669
case PLAYER_KNUCKLES_A
670
SpriteFrame(-104, 32, 128, 16, 1, 294) // Knuckles Text - #24
671
SpriteFrame(32, 32, 72, 16, 412, 277) // "GOT A" Text - #25
672
break
673
674
#platform: USE_ORIGINS
675
case PLAYER_AMY_A
676
SpriteFrame(-54, 32, 54, 16, 362, 328) // Amy Text - #24
677
SpriteFrame(8, 32, 72, 16, 412, 277) // "GOT A" Text - #25
678
break
679
#endplatform
680
end switch
681
682
SpriteFrame(-104, 50, 208, 16, 130, 294) // "Chaos Emerald" Text - #26
683
684
//"[Player] Has All The Chaos Emeralds" Frames
685
switch stage.playerListPos
686
case PLAYER_SONIC_A
687
SpriteFrame(-120, 32, 72, 16, 189, 277) // Sonic Text - #37
688
SpriteFrame(-40, 32, 159, 16, 162, 311) // "HAS ALL THE" Text - #28
689
break
690
691
case PLAYER_TAILS_A
692
if options.region == false
693
SpriteFrame(-117, 32, 69, 16, 262, 277) // Tails Text - #27
694
else
695
SpriteFrame(-127, 32, 79, 16, 332, 277) // Miles Text - #27
696
end if
697
698
SpriteFrame(-40, 32, 159, 16, 162, 311) // "HAS ALL THE" Text - #28
699
break
700
701
case PLAYER_KNUCKLES_A
702
SpriteFrame(-148, 32, 128, 16, 1, 294) // Knuckles Text - #27
703
SpriteFrame(-12, 32, 159, 16, 162, 311) // "HAS ALL THE" Text - #28
704
break
705
706
#platform: USE_ORIGINS
707
case PLAYER_AMY_A
708
SpriteFrame(-102, 32, 54, 16, 362, 328) // Amy Text - #27
709
SpriteFrame(-40, 32, 159, 16, 162, 311) // "HAS ALL THE" Text - #28
710
break
711
#endplatform
712
end switch
713
714
SpriteFrame(-112, 50, 224, 16, 130, 294) // "Chaos Emeralds" Text - #29
715
716
//"Now [Player] Can be Super/Hyper [Player]"
717
switch stage.playerListPos
718
case PLAYER_SONIC_A
719
SpriteFrame(-96, 20, 55, 16, 355, 294) // "NOW" Text - #30
720
SpriteFrame(-32, 20, 72, 16, 189, 277) // Sonic Text - #31
721
SpriteFrame(48, 20, 48, 16, 411, 294) // "CAN" Text - #32
722
break
723
724
case PLAYER_TAILS_A
725
SpriteFrame(-96, 20, 55, 16, 355, 294) // "NOW" Text - #30
726
727
if options.region == false
728
SpriteFrame(-32, 20, 69, 16, 262, 277) // Tails Text - #31
729
else
730
SpriteFrame(-32, 20, 79, 16, 332, 277) // Miles Text - #31
731
end if
732
733
SpriteFrame(48, 20, 48, 16, 411, 294) // "CAN" Text - #32
734
break
735
736
case PLAYER_KNUCKLES_A
737
SpriteFrame(-124, 20, 55, 16, 355, 294) // "NOW" Text - #30
738
SpriteFrame(-60, 20, 128, 16, 1, 294) // Knuckles Text - #31
739
SpriteFrame(76, 20, 48, 16, 411, 294) // "CAN" Text - #32
740
break
741
742
#platform: USE_ORIGINS
743
case PLAYER_AMY_A
744
SpriteFrame(-96, 20, 55, 16, 355, 294) // "NOW" Text - #30
745
SpriteFrame(-32, 20, 54, 16, 362, 328) // Amy Text - #31
746
SpriteFrame(48, 20, 48, 16, 411, 294) // "CAN" Text - #32
747
break
748
#endplatform
749
end switch
750
751
SpriteFrame(-80, 38, 160, 16, 1, 311) // "CHANGE INTO" Text - #33
752
753
if specialStage.emeralds <= 0x7F
754
temp0 = 322 // Super
755
else
756
temp0 = 403 // Hyper
757
end if
758
759
switch stage.playerListPos
760
case PLAYER_SONIC_A
761
SpriteFrame(-80, 56, 80, 16, temp0, 311) // Super/Hyper Text - #34
762
SpriteFrame(8, 56, 72, 16, 189, 277) // Sonic Text - #35
763
break
764
765
case PLAYER_TAILS_A
766
SpriteFrame(-80, 56, 80, 16, temp0, 311) // Super/Hyper Text - #34
767
768
if options.region == false
769
SpriteFrame(8, 56, 69, 16, 262, 277) // Tails Text - #35
770
else
771
SpriteFrame(8, 56, 79, 16, 332, 277) // Miles Text - #35
772
end if
773
774
break
775
776
case PLAYER_KNUCKLES_A
777
SpriteFrame(-108, 56, 80, 16, temp0, 311) // Super/Hyper Text - #34
778
SpriteFrame(-20, 56, 128, 16, 1, 294) // Knuckles Text - #35
779
break
780
781
#platform: USE_ORIGINS
782
case PLAYER_AMY_A
783
SpriteFrame(-80, 56, 80, 16, temp0, 311) // Super/Hyper Text - #34
784
SpriteFrame(8, 56, 54, 16, 362, 328) // Amy Text - #35
785
break
786
#endplatform
787
end switch
788
789
//"Now [Player] Can Go To Hidden Palace" frames
790
switch stage.playerListPos
791
case PLAYER_SONIC_A
792
SpriteFrame(-72, 20, 55, 16, 355, 294) // "NOW" Text - #36
793
SpriteFrame(0, 20, 72, 16, 189, 277) // Sonic Text - #37
794
break
795
796
case PLAYER_TAILS_A
797
SpriteFrame(-72, 20, 55, 16, 355, 294) // "NOW" Text - #36
798
799
if options.region == false
800
SpriteFrame(0, 20, 69, 16, 262, 277) // Tails Text - #37
801
else
802
SpriteFrame(0, 20, 79, 16, 332, 277) // Miles Text - #37
803
end if
804
break
805
806
case PLAYER_KNUCKLES_A
807
SpriteFrame(-100, 20, 55, 16, 355, 294) // "NOW" Text - #36
808
SpriteFrame(-28, 20, 128, 16, 1, 294) // Knuckles Text - #37
809
break
810
811
#platform: USE_ORIGINS
812
case PLAYER_AMY_A
813
SpriteFrame(-72, 20, 55, 16, 355, 294) // "NOW" Text - #36
814
SpriteFrame(0, 20, 54, 16, 362, 328) // Amy Text - #37
815
break
816
#endplatform
817
end switch
818
819
SpriteFrame(-72, 38, 48, 16, 411, 294) // "CAN" - #38
820
SpriteFrame(-8, 38, 32, 16, 1, 328) // "GO" - #39
821
SpriteFrame(40, 38, 32, 16, 34, 328) // "TO" - #40
822
SpriteFrame(-100, 56, 200, 16, 67, 328) // "HIDDEN PALACE" - #41
823
824
#platform: USE_ORIGINS
825
SpriteFrame(-124, 0, 120, 15, 126, 427) // Knuckles Rings Text - #42
826
SpriteFrame(-96, 0, 92, 15, 154, 410) // Amy Rings Text - #43
827
#endplatform
828
end event
829
830
831
// ========================
832
// Editor Events
833
// ========================
834
835
event RSDKDraw
836
DrawSprite(0)
837
end event
838
839
840
event RSDKLoad
841
LoadSpriteSheet("Global/Display.gif")
842
SpriteFrame(-16, -16, 32, 32, 1, 143)
843
844
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
845
end event
846
847