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/EHZ/EHZSetup.txt
1480 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: EHZ Setup 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.value1 : object.bgWaterPaletteTimer
13
private alias object.value4 : object.deformTimer
14
15
private alias object.value5 : object.bgLightDuration
16
private alias object.value6 : object.bgLightFrame
17
18
private alias object.value7 : object.pinkFlowerDuration
19
private alias object.value8 : object.pinkFlowerFrame
20
21
private alias object.value9 : object.redFlowerDuration
22
private alias object.value10 : object.redFlowerFrame
23
24
private alias object.value11 : object.rectFlowerDuration
25
private alias object.value12 : object.rectFlowerFrame
26
27
private alias object.value13 : object.pointyFlowerDuration
28
private alias object.value14 : object.pointyFlowerFrame
29
30
// Game Modes
31
private alias 0 : MODE_NOSAVE
32
private alias 1 : MODE_SAVEGAME
33
private alias 2 : MODE_TIMEATTACK
34
35
// Tracks
36
private alias 0 : TRACK_STAGE
37
private alias 1 : TRACK_ACTFINISH
38
private alias 2 : TRACK_INVINCIBLE
39
private alias 3 : TRACK_CONTINUE
40
private alias 4 : TRACK_BOSS
41
private alias 5 : TRACK_GAMEOVER
42
private alias 6 : TRACK_DROWNING
43
private alias 7 : TRACK_SUPER
44
45
// Reserved object slots
46
private alias 10 : SLOT_ZONESETUP
47
private alias 25 : SLOT_MUSICEVENT_CHANGE
48
private alias 26 : SLOT_MUSICEVENT_BOSS
49
50
// Music Events
51
private alias 2 : MUSICEVENT_TRANSITION
52
53
private alias 0 : MUSICEVENT_FLAG_NOCHANGE
54
private alias 1 : MUSICEVENT_FLAG_SPEEDUP
55
private alias 2 : MUSICEVENT_FLAG_SLOWDOWN
56
57
// Music Loops
58
private alias 152750 : MUSIC_LOOP_EHZ_1P
59
private alias 122240 : MUSIC_LOOP_EHZ_1P_F
60
61
private alias 99572 : MUSIC_LOOP_EHZ_2P
62
private alias 79604 : MUSIC_LOOP_EHZ_2P_F
63
64
private alias 38679 : MUSIC_LOOP_INV
65
private alias 30897 : MUSIC_LOOP_INV_F
66
67
// Achievement Aliases
68
private alias 2 : ACHIEVEMENT_EARLYBIRDSPECIAL
69
70
71
// ========================
72
// Function Declarations
73
// ========================
74
75
reserve function EHZSetup_SpeedUpMusic1P
76
reserve function EHZSetup_SlowDownMusic1P
77
reserve function EHZSetup_SpeedUpMusic2P
78
reserve function EHZSetup_SlowDownMusic2P
79
80
81
// ========================
82
// Static Values
83
// ========================
84
85
private value EHZSetup_hasAchievement = 0
86
87
88
// ========================
89
// Tables
90
// ========================
91
92
private table EHZSetup_bgLightFrameTable
93
508, 24
94
509, 10
95
510, 12
96
511, 24
97
510, 12
98
509, 10
99
end table
100
101
private table EHZSetup_pinkFlowerFrameTable
102
512, 128
103
513, 20
104
512, 8
105
513, 8
106
512, 8
107
513, 8
108
end table
109
110
private table EHZSetup_redFlowerFrameTable
111
514, 128
112
515, 12
113
514, 12
114
515, 12
115
514, 6
116
515, 6
117
514, 6
118
515, 6
119
end table
120
121
private table EHZSetup_rectFlowerFrameTable
122
516, 8
123
517, 8
124
end table
125
126
private table EHZSetup_pointyFlowerFrameTable
127
518, 128
128
519, 8
129
518, 8
130
519, 8
131
518, 8
132
519, 12
133
518, 12
134
519, 12
135
end table
136
137
private table EHZSetup_deformationTable
138
1, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 0, 0
139
2, 0, 3, 2, 2, 3, 2, 2, 1, 3, 0, 0, 1, 0, 1, 3
140
1, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 0, 0
141
2, 0, 3, 2, 2, 3, 2, 2, 1, 3, 0, 0, 1, 0, 1, 3
142
end table
143
144
private table EHZSetup_replay_attract_S
145
0x440000, 0x2910000
146
0x20, 1
147
0x28, 27
148
0x08, 39
149
0x38, 1
150
0x28, 9
151
0x08, 40
152
0x38, 1
153
0x28, 6
154
0x08, 8
155
0x38, 1
156
0x28, 6
157
0x08, 175
158
0x38, 1
159
0x28, 7
160
0x08, 111
161
0x00, 2
162
0x04, 35
163
0x34, 1
164
0x24, 7
165
0x04, 73
166
0x00, 4
167
0x08, 4
168
0x38, 1
169
0x28, 7
170
0x08, 68
171
0x00, 5
172
0x04, 30
173
0x00, 8
174
0x02, 4
175
0x32, 1
176
0x22, 1
177
0x32, 1
178
0x20, 4
179
0x00, 15
180
0x08, 56
181
0x00, 1
182
0x02, 32
183
0x32, 1
184
0x22, 1
185
0x2A, 1
186
0x28, 3
187
0x08, 255
188
0x08, 97
189
0x00, 12
190
0x04, 5
191
0x00, 26
192
0x08, 21
193
0x38, 1
194
0x28, 9
195
0x08, 255
196
0x08, 4
197
0x0A, 3
198
0x02, 7
199
0x0A, 2
200
end table
201
202
private table EHZSetup_replay_attract_T
203
0x440000, 0x2950000
204
0x20, 13
205
0x28, 38
206
0x08, 47
207
0x38, 1
208
0x28, 12
209
0x08, 224
210
0x38, 1
211
0x28, 5
212
0x08, 69
213
0x38, 1
214
0x28, 8
215
0x20, 2
216
0x00, 2
217
0x08, 12
218
0x00, 28
219
0x08, 16
220
0x00, 1
221
0x08, 255
222
0x08, 5
223
0x38, 1
224
0x28, 24
225
0x08, 218
226
0x38, 1
227
0x28, 9
228
0x08, 50
229
0x00, 1
230
0x04, 7
231
0x00, 16
232
0x08, 174
233
0x38, 1
234
0x28, 12
235
0x08, 7
236
0x38, 1
237
0x28, 8
238
0x08, 4
239
0x38, 1
240
0x28, 5
241
0x08, 3
242
0x04, 2
243
0x34, 1
244
0x24, 5
245
0x04, 4
246
0x34, 1
247
0x20, 5
248
0x00, 4
249
0x04, 1
250
0x34, 1
251
0x24, 3
252
0x04, 4
253
0x34, 1
254
0x24, 4
255
0x04, 5
256
0x34, 1
257
0x24, 3
258
0x04, 1
259
0x00, 2
260
0x08, 2
261
0x38, 1
262
0x28, 3
263
0x20, 2
264
0x00, 1
265
0x08, 5
266
0x00, 5
267
0x08, 3
268
0x38, 1
269
0x28, 2
270
0x08, 1
271
0x00, 9
272
0x08, 5
273
0x00, 15
274
0x08, 22
275
0x00, 3
276
0x04, 2
277
0x34, 1
278
0x24, 9
279
0x20, 2
280
0x28, 8
281
0x08, 4
282
0x38, 1
283
0x28, 4
284
0x20, 1
285
0x00, 3
286
0x30, 1
287
0x20, 6
288
0x00, 4
289
0x30, 1
290
0x20, 5
291
0x00, 1
292
0x08, 3
293
0x00, 1
294
0x30, 1
295
0x20, 5
296
0x00, 3
297
0x30, 1
298
0x20, 3
299
0x28, 3
300
0x08, 2
301
0x00, 1
302
0x30, 1
303
0x20, 5
304
0x00, 5
305
0x30, 1
306
0x20, 4
307
0x00, 4
308
0x30, 1
309
0x20, 4
310
0x00, 5
311
0x30, 1
312
0x20, 4
313
0x00, 4
314
0x30, 1
315
0x20, 5
316
0x00, 4
317
0x30, 1
318
0x20, 4
319
0x00, 5
320
0x30, 1
321
0x20, 4
322
0x00, 5
323
0x30, 1
324
0x20, 4
325
0x00, 5
326
0x30, 1
327
0x20, 5
328
0x00, 3
329
0x30, 1
330
0x20, 4
331
0x00, 4
332
0x30, 1
333
0x20, 5
334
0x00, 3
335
0x30, 1
336
0x20, 5
337
0x00, 3
338
0x30, 1
339
0x20, 6
340
0x00, 3
341
0x30, 1
342
0x20, 4
343
0x00, 4
344
0x30, 1
345
0x20, 4
346
0x00, 4
347
0x30, 1
348
0x20, 4
349
0x00, 4
350
0x30, 1
351
0x20, 4
352
0x28, 2
353
0x08, 39
354
0x38, 1
355
0x28, 12
356
0x08, 13
357
0x00, 17
358
0x08, 4
359
0x00, 12
360
0x04, 11
361
0x08, 8
362
end table
363
364
private table EHZSetup_replay_attract_K
365
0x440000, 0x2910000
366
0x00, 18
367
0x08, 77
368
0x38, 1
369
0x28, 13
370
0x08, 70
371
0x38, 1
372
0x28, 14
373
0x08, 3
374
0x00, 22
375
0x04, 4
376
0x00, 3
377
0x30, 1
378
0x20, 16
379
0x28, 3
380
0x08, 1
381
0x00, 30
382
0x30, 1
383
0x20, 38
384
0x28, 149
385
0x08, 11
386
0x00, 3
387
0x04, 6
388
0x00, 4
389
0x04, 5
390
0x00, 5
391
0x08, 13
392
0x00, 14
393
0x04, 89
394
0x00, 6
395
0x08, 44
396
0x0A, 1
397
0x02, 13
398
0x00, 52
399
0x08, 59
400
0x38, 1
401
0x28, 17
402
0x08, 18
403
0x00, 4
404
0x04, 33
405
0x00, 1
406
0x08, 105
407
0x38, 1
408
0x28, 30
409
0x08, 45
410
0x04, 6
411
0x00, 52
412
0x08, 6
413
0x38, 1
414
0x28, 19
415
0x08, 54
416
0x0A, 6
417
0x02, 17
418
0x0A, 2
419
0x08, 58
420
0x38, 1
421
0x28, 4
422
0x08, 197
423
0x38, 1
424
0x29, 10
425
0x09, 14
426
0x39, 1
427
0x29, 40
428
0x21, 4
429
0x01, 126
430
0x09, 12
431
0x08, 6
432
0x38, 1
433
0x28, 12
434
end table
435
436
437
// ========================
438
// Function Definitions
439
// ========================
440
441
private function EHZSetup_SpeedUpMusic1P
442
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].type, TypeName[Music Event])
443
temp0 = checkResult
444
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].propertyValue, MUSICEVENT_TRANSITION)
445
temp0 &= checkResult
446
CheckEqual(stage.musicFlag, MUSICEVENT_FLAG_NOCHANGE)
447
temp0 &= checkResult
448
if temp0 == false
449
switch music.currentTrack
450
case TRACK_STAGE
451
SetMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F)
452
SwapMusicTrack("EmeraldHill_F.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P_F, 8000)
453
break
454
455
case TRACK_INVINCIBLE
456
SetMusicTrack("EmeraldHill_F.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P_F)
457
SwapMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F, 8000)
458
break
459
460
case TRACK_BOSS
461
case TRACK_DROWNING
462
case TRACK_SUPER
463
SetMusicTrack("EmeraldHill_F.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P_F)
464
SetMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F)
465
break
466
467
end switch
468
else
469
stage.musicFlag = MUSICEVENT_FLAG_SPEEDUP
470
end if
471
end function
472
473
474
private function EHZSetup_SlowDownMusic1P
475
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].type, TypeName[Music Event])
476
temp0 = checkResult
477
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].propertyValue, MUSICEVENT_TRANSITION)
478
temp0 &= checkResult
479
CheckEqual(stage.musicFlag, MUSICEVENT_FLAG_NOCHANGE)
480
temp0 &= checkResult
481
if temp0 == false
482
switch music.currentTrack
483
case TRACK_STAGE
484
SetMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV)
485
SwapMusicTrack("EmeraldHill.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P, 12500)
486
break
487
488
case TRACK_INVINCIBLE
489
SetMusicTrack("EmeraldHill.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P)
490
SwapMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV, 12500)
491
break
492
493
case TRACK_BOSS
494
case TRACK_DROWNING
495
case TRACK_SUPER
496
SetMusicTrack("EmeraldHill.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P)
497
SetMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV)
498
break
499
500
end switch
501
else
502
stage.musicFlag = MUSICEVENT_FLAG_SLOWDOWN
503
end if
504
end function
505
506
507
private function EHZSetup_SpeedUpMusic2P
508
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].type, TypeName[Music Event])
509
temp0 = checkResult
510
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].propertyValue, MUSICEVENT_TRANSITION)
511
temp0 &= checkResult
512
CheckEqual(stage.musicFlag, MUSICEVENT_FLAG_NOCHANGE)
513
temp0 &= checkResult
514
if temp0 == false
515
switch music.currentTrack
516
case TRACK_STAGE
517
SetMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F)
518
SwapMusicTrack("EmeraldHill2_F.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P_F, 8000)
519
break
520
521
case TRACK_INVINCIBLE
522
SetMusicTrack("EmeraldHill2_F.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P_F)
523
SwapMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F, 8000)
524
break
525
526
case TRACK_BOSS
527
case TRACK_DROWNING
528
case TRACK_SUPER
529
SetMusicTrack("EmeraldHill2_F.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P_F)
530
SetMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F)
531
break
532
533
end switch
534
else
535
stage.musicFlag = MUSICEVENT_FLAG_SPEEDUP
536
end if
537
end function
538
539
540
private function EHZSetup_SlowDownMusic2P
541
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].type, TypeName[Music Event])
542
temp0 = checkResult
543
CheckEqual(object[SLOT_MUSICEVENT_CHANGE].propertyValue, MUSICEVENT_TRANSITION)
544
temp0 &= checkResult
545
CheckEqual(stage.musicFlag, MUSICEVENT_FLAG_NOCHANGE)
546
temp0 &= checkResult
547
if temp0 == false
548
switch music.currentTrack
549
case TRACK_STAGE
550
SetMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV)
551
SwapMusicTrack("EmeraldHill2.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P, 12500)
552
break
553
554
case TRACK_INVINCIBLE
555
SetMusicTrack("EmeraldHill2.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P)
556
SwapMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV, 12500)
557
break
558
559
case TRACK_BOSS
560
case TRACK_DROWNING
561
case TRACK_SUPER
562
SetMusicTrack("EmeraldHill2.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P)
563
SetMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV)
564
break
565
566
end switch
567
else
568
stage.musicFlag = MUSICEVENT_FLAG_SLOWDOWN
569
end if
570
end function
571
572
573
// ========================
574
// Events
575
// ========================
576
577
event ObjectUpdate
578
// What's this check supposed to be?
579
// This object's state always seems to be 0, and 5 is such a strange number...
580
// (S1's GHZ Setup had this same state check too and it made just as little sense there, as well...)
581
if object.state < 5
582
object.bgWaterPaletteTimer++
583
if object.bgWaterPaletteTimer == 8
584
object.bgWaterPaletteTimer = 0
585
GetPaletteEntry(0, 159, temp1)
586
587
GetPaletteEntry(0, 158, temp0)
588
SetPaletteEntry(0, 159, temp0)
589
590
GetPaletteEntry(0, 148, temp0)
591
SetPaletteEntry(0, 158, temp0)
592
593
GetPaletteEntry(0, 147, temp0)
594
SetPaletteEntry(0, 148, temp0)
595
596
SetPaletteEntry(0, 147, temp1)
597
end if
598
end if
599
600
// Update the shimmering water in the background
601
object.deformTimer++
602
if object.deformTimer > 7
603
tileLayer[1].deformationOffset++
604
object.deformTimer = 0
605
end if
606
607
if object.bgLightDuration < 2
608
GetTableValue(temp0, object.bgLightFrame, EHZSetup_bgLightFrameTable)
609
610
Copy16x16Tile(502, temp0)
611
temp0 += 12
612
613
Copy16x16Tile(503, temp0)
614
temp0 += 4
615
616
Copy16x16Tile(504, temp0)
617
object.bgLightFrame++
618
619
GetTableValue(object.bgLightDuration, object.bgLightFrame, EHZSetup_bgLightFrameTable)
620
object.bgLightFrame++
621
622
object.bgLightFrame %= 12
623
else
624
object.bgLightDuration--
625
end if
626
627
if object.pinkFlowerDuration < 2
628
GetTableValue(temp0, object.pinkFlowerFrame, EHZSetup_pinkFlowerFrameTable)
629
630
Copy16x16Tile(764, temp0)
631
object.pinkFlowerFrame++
632
633
GetTableValue(object.pinkFlowerDuration, object.pinkFlowerFrame, EHZSetup_pinkFlowerFrameTable)
634
object.pinkFlowerFrame++
635
636
object.pinkFlowerFrame %= 12
637
else
638
object.pinkFlowerDuration--
639
end if
640
641
if object.redFlowerDuration < 2
642
GetTableValue(temp0, object.redFlowerFrame, EHZSetup_redFlowerFrameTable)
643
644
Copy16x16Tile(765, temp0)
645
object.redFlowerFrame++
646
647
GetTableValue(object.redFlowerDuration, object.redFlowerFrame, EHZSetup_redFlowerFrameTable)
648
object.redFlowerFrame++
649
650
object.redFlowerFrame &= 15
651
else
652
object.redFlowerDuration--
653
end if
654
655
if object.rectFlowerDuration < 2
656
GetTableValue(temp0, object.rectFlowerFrame, EHZSetup_rectFlowerFrameTable)
657
658
Copy16x16Tile(766, temp0)
659
object.rectFlowerFrame++
660
661
GetTableValue(object.rectFlowerDuration, object.rectFlowerFrame, EHZSetup_rectFlowerFrameTable)
662
object.rectFlowerFrame++
663
664
object.rectFlowerFrame &= 3
665
else
666
object.rectFlowerDuration--
667
end if
668
669
if object.pointyFlowerDuration < 2
670
GetTableValue(temp0, object.pointyFlowerFrame, EHZSetup_pointyFlowerFrameTable)
671
672
Copy16x16Tile(767, temp0)
673
object.pointyFlowerFrame++
674
675
GetTableValue(object.pointyFlowerDuration, object.pointyFlowerFrame, EHZSetup_pointyFlowerFrameTable)
676
object.pointyFlowerFrame++
677
678
object.pointyFlowerFrame &= 15
679
else
680
object.pointyFlowerDuration--
681
end if
682
683
if EHZSetup_hasAchievement == false
684
if stage.debugMode == false
685
if specialStage.emeralds >= 0x7F
686
// Grant the "Early Bird Special" Achievement, if applicable
687
688
if options.gameMode == MODE_NOSAVE
689
EHZSetup_hasAchievement = true
690
CallNativeFunction2(SetAchievement, ACHIEVEMENT_EARLYBIRDSPECIAL, 100)
691
end if
692
693
if options.gameMode == MODE_SAVEGAME
694
arrayPos1 = options.saveSlot
695
arrayPos1 <<= 3
696
arrayPos1 += 4
697
if saveRAM[arrayPos1] < 20 // Make sure our save file hasn't been completed yet, you have to play by the rules and do it on the first go!
698
EHZSetup_hasAchievement = true
699
CallNativeFunction2(SetAchievement, ACHIEVEMENT_EARLYBIRDSPECIAL, 100)
700
end if
701
end if
702
end if
703
end if
704
end if
705
end event
706
707
708
event ObjectStartup
709
if stage.activeList != BONUS_STAGE
710
// Different music based on the current mode
711
// To accommodate the different music, there are also separate speedup and slowdown functions for each track
712
if options.vsMode == false
713
SetMusicTrack("EmeraldHill.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P)
714
SpeedUpMusic = EHZSetup_SpeedUpMusic1P
715
SlowDownMusic = EHZSetup_SlowDownMusic1P
716
else
717
SetMusicTrack("EmeraldHill2.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_2P)
718
SpeedUpMusic = EHZSetup_SpeedUpMusic2P
719
SlowDownMusic = EHZSetup_SlowDownMusic2P
720
end if
721
else
722
// In the Boss Attack version of the stage, play the DEZ track instead
723
// (This applies to both the 2013's Boss Attack as well as Origins's new Boss Attack)
724
SetMusicTrack("DeathEgg.ogg", TRACK_STAGE, true)
725
726
// (Nothing for speed up or slow down here since a speed up version of DEZ's music doesn't exist, and it's not needed anyway)
727
end if
728
729
#platform: USE_ORIGINS
730
// In Mission Mode, disregard the previous code and always play EHZ 1P
731
// (The Mission stages are all on the Bonus stage list, which triggers the DEZ music code)
732
if game.playMode == BOOT_PLAYMODE_MISSION
733
SetMusicTrack("EmeraldHill.ogg", TRACK_STAGE, MUSIC_LOOP_EHZ_1P)
734
SpeedUpMusic = EHZSetup_SpeedUpMusic1P
735
SlowDownMusic = EHZSetup_SlowDownMusic1P
736
end if
737
#endplatform
738
739
animalType1 = TypeName[Flicky]
740
animalType2 = TypeName[Ricky]
741
742
tileLayer[1].scrollPos = -0x80000
743
744
arrayPos0 = 0
745
while arrayPos0 < 576
746
temp0 = arrayPos0
747
temp0 &= 0x3F
748
GetTableValue(stage.deformationData2[arrayPos0], temp0, EHZSetup_deformationTable)
749
arrayPos0++
750
loop
751
752
object[SLOT_ZONESETUP].type = TypeName[EHZ Setup]
753
object[SLOT_ZONESETUP].priority = PRIORITY_ACTIVE
754
755
// Reset the boss flash color
756
SetPaletteEntry(0, 192, 0x000000)
757
758
if options.attractMode == true
759
switch stage.playerListPos
760
case PLAYER_SONIC_A
761
#platform: USE_ORIGINS
762
case PLAYER_AMY_A // Amy isn't even able to show up in demos, but check for her anyway I guess
763
#endplatform
764
Player_attractTable = EHZSetup_replay_attract_S
765
Player_attractTableSize = 110
766
Player_attractDuration = 1620
767
break
768
769
case PLAYER_TAILS_A
770
Player_attractTable = EHZSetup_replay_attract_T
771
Player_attractTableSize = 318
772
Player_attractDuration = 1800
773
break
774
775
case PLAYER_KNUCKLES_A
776
Player_attractTable = EHZSetup_replay_attract_K
777
Player_attractTableSize = 138
778
Player_attractDuration = 1800
779
break
780
end switch
781
782
CallFunction(Player_SetupAttractDemo)
783
end if
784
end event
785
786
787
// ========================
788
// Editor Events
789
// ========================
790
791
event RSDKDraw
792
DrawSprite(0)
793
end event
794
795
796
event RSDKLoad
797
LoadSpriteSheet("Global/Display.gif")
798
SpriteFrame(-16, -16, 32, 32, 1, 143)
799
800
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
801
end event
802
803