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/MenuControl.txt
1478 views
1
// ----------------------------------
2
// RSDK Project: Sonic 2
3
// Script Description: Menu Control 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.scrollDelayUp
14
private alias object.value2 : object.scrollDelayDown
15
private alias object.value3 : object.currentSelection
16
private alias object.value4 : object.soundTestCooldown
17
18
// HexNo Aliases
19
private alias object.value0 : hexNo.number
20
private alias object.value1 : hexNo.highlighted
21
22
private alias 0 : HEXNO_HIGHLIGHT_FALSE
23
private alias 16 : HEXNO_HIGHLIGHT_TRUE
24
25
private alias 0 : MENUCONTROL_INIT
26
private alias 1 : MENUCONTROL_FADEIN
27
private alias 2 : MENUCONTROL_MAIN
28
private alias 3 : MENUCONTROL_LOADLEVEL
29
private alias 4 : MENUCONTROL_LOADSPECIAL
30
31
// The maximum number of selections available
32
// (Inclusive limit)
33
private alias 22 : MAX_SELECTION_COUNT
34
35
// Music Loops
36
private alias 152750 : MUSIC_LOOP_EHZ_1P
37
private alias 18671 : MUSIC_LOOP_MCZ_2P // This is 18672 in some other cases...
38
private alias 293572 : MUSIC_LOOP_OOZ
39
private alias 309378 : MUSIC_LOOP_MPZ
40
private alias 1 : MUSIC_LOOP_HTZ
41
private alias 1 : MUSIC_LOOP_ARZ
42
private alias 95868 : MUSIC_LOOP_CNZ_2P
43
private alias 62820 : MUSIC_LOOP_CNZ_1P
44
private alias 1 : MUSIC_LOOP_DEZ
45
private alias 99356 : MUSIC_LOOP_MCZ_1P
46
private alias 99572 : MUSIC_LOOP_EHZ_2P
47
private alias 198253 : MUSIC_LOOP_SCZ
48
private alias 684580 : MUSIC_LOOP_CPZ
49
private alias 99874 : MUSIC_LOOP_WFZ
50
private alias 59852 : MUSIC_LOOP_PPZ
51
private alias 496644 : MUSIC_LOOP_SPECIAL
52
private alias 38679 : MUSIC_LOOP_INV
53
54
// Music Event Aliases
55
private alias 2 : MUSICEVENT_TRANSITION
56
57
58
// ========================
59
// Function Declarations
60
// ========================
61
62
reserve function MenuControl_HandleSecrets
63
reserve function MenuControl_SoundTestPlayer
64
65
66
// ========================
67
// Static Values
68
// ========================
69
70
public value MenuControl_optionsMenuOpen = 0
71
private value MenuControl_optionsMenuCounter = 0
72
private value MenuControl_debugModeCounter = 0
73
private value MenuControl_emeraldCodeCounter = 0
74
private value MenuControl_continueCodeCounter = 0
75
private value MenuControl_PPZCodeCounter = 0
76
77
78
// ========================
79
// Tables
80
// ========================
81
82
// Code to open the game config menu
83
private table MenuControl_OptionsMenu
84
0, 0, 0
85
end table
86
87
// Code to enable debug mode
88
private table MenuControl_SecretDebugMode
89
1, 9, 9, 2, 1, 1, 2, 4
90
end table
91
92
// Code to give all emeralds
93
private table MenuControl_SecretEmeralds
94
4, 1, 2, 6
95
end table
96
97
// Code to give 14 continues
98
private table MenuControl_SecretContinues
99
1, 1, 2, 4
100
end table
101
102
// Code to replace Hidden Palace Zone with Proto Palace Zone
103
private table MenuControl_SecretPPZ
104
3, 3, 3, 11, 16, 16, 16, 4
105
end table
106
107
108
// This table holds data for every stage with six values for every stage,
109
// -> First entry is menu table the stage option is on
110
// -> Second is what number this one is on the list, from top to bottom
111
// -> Third is the active stage list the stage is on
112
// -> Fourth is the stage's position in the stage list
113
// -> Fifth is the menu entry of what is on the opposite side of this selection, like how MTZ is to the right of EHZ and vice versa
114
// -> Sixth is the icon the entry uses
115
116
private table MenuControl_EntryTable
117
0, 0, 1, 0, 14, 1 // 0 - Emerald Hill 1
118
0, 1, 1, 1, 15, 1 // 1 - Emerald Hill 2
119
0, 3, 1, 2, 17, 2 // 2 - Chemical Plant 1
120
0, 4, 1, 3, 17, 2 // 3 - Chemical Plant 2
121
0, 6, 1, 4, 18, 3 // 4 - Aquatic Ruin 1
122
0, 7, 1, 5, 18, 3 // 5 - Aquatic Ruin 2
123
0, 9, 1, 6, 19, 4 // 6 - Casino Night 1
124
0, 10, 1, 7, 19, 4 // 7 - Casino Night 2
125
0, 12, 1, 8, 20, 5 // 8 - Hill Top 1
126
0, 13, 1, 9, 20, 5 // 9 - Hill Top 2
127
0, 15, 1, 10, 21, 6 // 10 - Mystic Cave 1
128
0, 16, 1, 11, 21, 6 // 11 - Mystic Cave 2
129
0, 18, 1, 12, 22, 8 // 12 - Oil Ocean 1
130
0, 19, 1, 13, 22, 8 // 13 - Oil Ocean 2
131
1, 0, 1, 14, 0, 9 // 14 - Metropolis 1
132
1, 1, 1, 15, 1, 9 // 15 - Metropolis 2
133
1, 2, 1, 16, 2, 9 // 16 - Metropolis 3
134
1, 3, 1, 17, 2, 10 // 17 - Sky Chase
135
1, 6, 1, 18, 4, 11 // 18 - Wing Fortress
136
1, 9, 1, 19, 6, 12 // 19 - Death Egg
137
1, 12, 1, 20, 8, 7 // 20 - Hidden Palace (or Proto Palace)
138
1, 15, 2, 0, 10, 13 // 21 - Special Stage
139
1, 18, 0, 0, 67, 0 // 22 - Sound Test
140
end table
141
142
143
// ========================
144
// Function Defintions
145
// ========================
146
147
private function MenuControl_HandleSecrets
148
// Set the Special Stage act number, for acts 1-8
149
if hexNo[+1].number < 8
150
SetTableValue(hexNo[+1].number, 129, MenuControl_EntryTable)
151
end if
152
153
// Handle the options menu check
154
GetTableValue(temp0, MenuControl_optionsMenuCounter, MenuControl_OptionsMenu)
155
156
if temp0 == hexNo[+1].number
157
MenuControl_optionsMenuCounter++
158
if MenuControl_optionsMenuCounter == 3
159
MenuControl_optionsMenuCounter = 0
160
161
CreateTempObject(TypeName[Config Screen], 0, 0, 0)
162
MenuControl_optionsMenuOpen = true
163
164
PlaySfx(SfxName[Resume], false)
165
end if
166
else
167
MenuControl_optionsMenuCounter = 0
168
end if
169
170
// Handle the debug mode code
171
GetTableValue(temp0, MenuControl_debugModeCounter, MenuControl_SecretDebugMode)
172
173
if temp0 == hexNo[+1].number
174
MenuControl_debugModeCounter++
175
if MenuControl_debugModeCounter == 8
176
MenuControl_debugModeCounter = 0
177
178
stage.debugMode = true
179
180
PlaySfx(SfxName[Ring L], false)
181
end if
182
else
183
MenuControl_debugModeCounter = 0
184
end if
185
186
// Handles the code for all emeralds
187
GetTableValue(temp0, MenuControl_emeraldCodeCounter, MenuControl_SecretEmeralds)
188
189
if temp0 == hexNo[+1].number
190
MenuControl_emeraldCodeCounter++
191
if MenuControl_emeraldCodeCounter == 4
192
MenuControl_emeraldCodeCounter = 0
193
194
// Give the player all 7 emeralds
195
specialStage.emeralds = 0x7F
196
#platform: USE_ORIGINS
197
game.cheatEmeralds = true
198
#endplatform
199
PlaySfx(SfxName[Emerald], false)
200
StopMusic()
201
end if
202
else
203
MenuControl_emeraldCodeCounter = 0
204
end if
205
206
if MenuControl_debugModeCounter < 2
207
GetTableValue(temp0, MenuControl_continueCodeCounter, MenuControl_SecretContinues)
208
if temp0 == hexNo[+1].number
209
MenuControl_continueCodeCounter++
210
if MenuControl_continueCodeCounter == 4
211
MenuControl_continueCodeCounter = 0
212
213
player.continues = 14
214
PlaySfx(SfxName[Continue], false)
215
end if
216
else
217
MenuControl_continueCodeCounter = 0
218
end if
219
else
220
MenuControl_continueCodeCounter = 0
221
end if
222
223
#platform: USE_ORIGINS
224
// In place of unlocking PPZ, Origins added in some cool debug stuff instead
225
CallNativeFunction4(NotifyCallback, NOTIFY_DEBUGPRINT, stage.debugMode, MenuControl_PPZCodeCounter, hexNo[+1].number)
226
#endplatform
227
228
if stage.debugMode == true
229
GetTableValue(temp0, MenuControl_PPZCodeCounter, MenuControl_SecretPPZ)
230
if temp0 == hexNo[+1].number
231
MenuControl_PPZCodeCounter++
232
if MenuControl_PPZCodeCounter == 8
233
MenuControl_PPZCodeCounter = 0
234
235
#platform: USE_STANDALONE
236
// Change the Hidden Palace slot to use Proto Palace instead
237
SetTableValue(BONUS_STAGE, 122, MenuControl_EntryTable)
238
SetTableValue(11, 123, MenuControl_EntryTable)
239
#endplatform
240
241
PlaySfx(SfxName[Ring L], false)
242
243
// Set the Hidden Palace unlock flag to true
244
saveRAM[46] = true
245
end if
246
else
247
MenuControl_PPZCodeCounter = 0
248
end if
249
end if
250
end function
251
252
253
private function MenuControl_SoundTestPlayer
254
// Don't play songs in quick succession
255
if object.soundTestCooldown == 0
256
object.soundTestCooldown = 30
257
258
switch hexNo[+1].number
259
case 0
260
break
261
262
case 1
263
SetMusicTrack("Results.ogg", 0, true)
264
PlayMusic(0)
265
break
266
267
case 2
268
SetMusicTrack("EmeraldHill.ogg", 0, MUSIC_LOOP_EHZ_1P)
269
PlayMusic(0)
270
break
271
272
case 3
273
SetMusicTrack("MysticCave2.ogg", 0, MUSIC_LOOP_MCZ_2P)
274
PlayMusic(0)
275
break
276
277
case 4
278
SetMusicTrack("OilOcean.ogg", 0, MUSIC_LOOP_OOZ)
279
PlayMusic(0)
280
break
281
282
case 5
283
SetMusicTrack("Metropolis.ogg", 0, MUSIC_LOOP_MPZ)
284
PlayMusic(0)
285
break
286
287
case 6
288
SetMusicTrack("HillTop.ogg", 0, MUSIC_LOOP_HTZ)
289
PlayMusic(0)
290
break
291
292
case 7
293
SetMusicTrack("AquaticRuin.ogg", 0, MUSIC_LOOP_ARZ)
294
PlayMusic(0)
295
break
296
297
case 8
298
SetMusicTrack("CasinoNight2.ogg", 0, MUSIC_LOOP_CNZ_2P)
299
PlayMusic(0)
300
break
301
302
case 9
303
SetMusicTrack("CasinoNight.ogg", 0, MUSIC_LOOP_CNZ_1P)
304
PlayMusic(0)
305
break
306
307
case 10
308
SetMusicTrack("DeathEgg.ogg", 0, MUSIC_LOOP_DEZ)
309
PlayMusic(0)
310
break
311
312
case 11
313
SetMusicTrack("MysticCave.ogg", 0, MUSIC_LOOP_MCZ_1P)
314
PlayMusic(0)
315
break
316
317
case 12
318
SetMusicTrack("EmeraldHill2.ogg", 0, MUSIC_LOOP_EHZ_2P)
319
PlayMusic(0)
320
break
321
322
case 13
323
SetMusicTrack("SkyChase.ogg", 0, MUSIC_LOOP_SCZ)
324
PlayMusic(0)
325
break
326
327
case 14
328
SetMusicTrack("ChemicalPlant.ogg", 0, MUSIC_LOOP_CPZ)
329
PlayMusic(0)
330
break
331
332
case 15
333
SetMusicTrack("WingFortress.ogg", 0, MUSIC_LOOP_WFZ)
334
PlayMusic(0)
335
break
336
337
case 16
338
SetMusicTrack("Extra.ogg", 0, MUSIC_LOOP_PPZ)
339
PlayMusic(0)
340
break
341
342
case 17
343
SetMusicTrack("Options.ogg", 0, true)
344
PlayMusic(0)
345
break
346
347
case 18
348
SetMusicTrack("SpecialStage.ogg", 0, MUSIC_LOOP_SPECIAL)
349
PlayMusic(0)
350
break
351
352
case 19
353
SetMusicTrack("Boss.ogg", 0, true)
354
PlayMusic(0)
355
break
356
357
case 20
358
SetMusicTrack("FinalBoss.ogg", 0, true)
359
PlayMusic(0)
360
break
361
362
case 21
363
SetMusicTrack("Ending.ogg", 0, false)
364
PlayMusic(0)
365
break
366
367
case 22
368
SetMusicTrack("Super.ogg", 0, true)
369
PlayMusic(0)
370
break
371
372
case 23
373
SetMusicTrack("Invincibility.ogg", 0, MUSIC_LOOP_INV)
374
PlayMusic(0)
375
break
376
377
case 24
378
PlaySfx(SfxName[Life], false)
379
PauseMusic()
380
ResetObjectEntity(26, TypeName[Music Event], MUSICEVENT_TRANSITION, 0, 0)
381
object[26].priority = PRIORITY_ACTIVE
382
break
383
384
case 25
385
SetMusicTrack("TitleScreen.ogg", 0, false)
386
PlayMusic(0)
387
break
388
389
case 26
390
SetMusicTrack("ActComplete.ogg", 0, false)
391
PlayMusic(0)
392
break
393
394
case 27
395
SetMusicTrack("GameOver.ogg", 0, false)
396
PlayMusic(0)
397
break
398
399
case 28
400
SetMusicTrack("Continue.ogg", 0, false)
401
PlayMusic(0)
402
break
403
404
case 29
405
StopMusic()
406
PlaySfx(SfxName[Emerald], false)
407
break
408
409
case 30
410
SetMusicTrack("Credits.ogg", 0, false)
411
PlayMusic(0)
412
break
413
414
case 31
415
SetMusicTrack("Drowning.ogg", 0, false)
416
PlayMusic(0)
417
break
418
end switch
419
end if
420
end function
421
422
423
// ========================
424
// Events
425
// ========================
426
427
event ObjectUpdate
428
// Setup the HexNo object
429
object[+1].xpos = screen.xcenter
430
object[+1].xpos += 118
431
432
switch object.state
433
case MENUCONTROL_INIT
434
object.timer = 320
435
SetScreenFade(0, 0, 0, object.timer)
436
object[+1].ypos = 160
437
object[+1].priority = PRIORITY_ACTIVE
438
object.state++
439
break
440
441
case MENUCONTROL_FADEIN
442
if object.timer > 0
443
object.timer -= 16
444
else
445
PlayMusic(0)
446
object.state++
447
end if
448
SetScreenFade(0, 0, 0, object.timer)
449
break
450
451
case MENUCONTROL_MAIN
452
// Don't do any of this if the options menu is open
453
if MenuControl_optionsMenuOpen == false
454
if keyDown[0].down == true
455
object.scrollDelayUp = 0
456
object.scrollDelayDown++
457
if object.scrollDelayDown == 1
458
object.currentSelection++
459
end if
460
461
object.scrollDelayDown %= 12
462
else
463
if keyDown[0].up == true
464
object.scrollDelayDown = 0
465
object.scrollDelayUp++
466
if object.scrollDelayUp == 1
467
object.currentSelection--
468
end if
469
470
object.scrollDelayUp %= 12
471
else
472
object.scrollDelayUp = 0
473
object.scrollDelayDown = 0
474
end if
475
end if
476
477
if object.currentSelection > MAX_SELECTION_COUNT
478
object.currentSelection = 0
479
end if
480
481
if object.currentSelection < 0
482
object.currentSelection = MAX_SELECTION_COUNT
483
end if
484
485
temp0 = object.currentSelection
486
temp0 *= 6
487
temp0++
488
GetTableValue(temp2, temp0, MenuControl_EntryTable)
489
temp0 += 3
490
GetTableValue(temp1, temp0, MenuControl_EntryTable)
491
492
switch temp1
493
default
494
checkResult = keyPress[0].left
495
checkResult |= keyPress[0].right
496
497
if checkResult == true
498
object.currentSelection = temp1
499
end if
500
501
hexNo[+1].highlighted = HEXNO_HIGHLIGHT_FALSE
502
503
if keyPress[0].buttonA == true
504
keyPress[0].start = true
505
end if
506
break
507
508
case 67 // Sound test
509
if object.soundTestCooldown > 0
510
object.soundTestCooldown--
511
end if
512
513
hexNo[+1].highlighted = HEXNO_HIGHLIGHT_TRUE
514
515
#platform: USE_STANDALONE
516
if keyPress[0].buttonA == true
517
#endplatform
518
#platform: USE_ORIGINS
519
if keyPress[0].buttonC == true
520
#endplatform
521
hexNo[+1].number += 16
522
end if
523
524
if keyPress[0].left == true
525
hexNo[+1].number--
526
end if
527
528
if keyPress[0].right == true
529
hexNo[+1].number++
530
end if
531
532
// Limit the number's maximum count
533
hexNo[+1].number &= 31
534
535
if keyPress[0].buttonB == true
536
CallFunction(MenuControl_SoundTestPlayer)
537
CallFunction(MenuControl_HandleSecrets)
538
end if
539
540
#platform: USE_STANDALONE
541
if keyPress[0].buttonC == true
542
#endplatform
543
#platform: USE_ORIGINS
544
if keyPress[0].buttonA == true
545
#endplatform
546
CallFunction(MenuControl_SoundTestPlayer)
547
CallFunction(MenuControl_HandleSecrets)
548
end if
549
break
550
end switch
551
552
temp0 = object.currentSelection
553
temp0 *= 6
554
GetTableValue(temp1, temp0, MenuControl_EntryTable)
555
temp0++
556
557
if temp1 == MENU_1
558
menu2.selection = -1
559
GetTableValue(menu1.selection, temp0, MenuControl_EntryTable)
560
else // MENU_2
561
menu1.selection = -1
562
GetTableValue(menu2.selection, temp0, MenuControl_EntryTable)
563
end if
564
565
// Set the preview image to what it should be
566
temp0 += 4
567
GetTableValue(BGAnimation_currentPreview, temp0, MenuControl_EntryTable)
568
569
// Player selected the option?
570
if keyPress[0].start == true
571
572
// Special Stage
573
if object.currentSelection == 21
574
PlaySfx(SfxName[Warp], false)
575
object.state = MENUCONTROL_LOADSPECIAL
576
fadeColor = 208
577
fadeColor <<= 16
578
temp0 = 255
579
temp0 <<= 8
580
fadeColor += temp0
581
fadeColor += 224
582
else
583
// Hidden Palace?
584
if object.currentSelection == 20
585
// See if the player has it unlocked
586
if saveRAM[46] == true
587
// Proceed and load the level like normal
588
object.state = MENUCONTROL_LOADLEVEL
589
else
590
// Haven't played it legitimately yet, sorry...
591
PlaySfx(SfxName[Fail], false)
592
end if
593
else
594
// Normal stage - let the player proceed
595
object.state = MENUCONTROL_LOADLEVEL
596
end if
597
end if
598
end if
599
end if
600
break
601
602
case MENUCONTROL_LOADLEVEL
603
if object.timer < 256
604
music.volume -= 10
605
object.timer += 16
606
SetScreenFade(0, 0, 0, object.timer)
607
else
608
#platform: USE_ORIGINS
609
CallNativeFunction2(NotifyCallback, NOTIFY_LEVEL_SELECT_MENU, true)
610
CallNativeFunction4(NotifyCallback, NOTIFY_PLAYER_SET, stage.playerListPos, stage.player2Enabled, 0)
611
#endplatform
612
613
StopMusic()
614
temp0 = object.currentSelection
615
temp0 *= 6
616
temp0 += 2
617
GetTableValue(temp1, temp0, MenuControl_EntryTable)
618
temp0++
619
GetTableValue(temp2, temp0, MenuControl_EntryTable)
620
stage.activeList = temp1
621
stage.listPos = temp2
622
LoadStage()
623
SetScreenFade(0x00, 0x00, 0x00, 0xFF)
624
end if
625
break
626
627
case MENUCONTROL_LOADSPECIAL
628
if object.timer < 768
629
music.volume -= 10
630
object.timer += 8
631
SetScreenFade(0xD0, 0xFF, 0xE0, object.timer)
632
else
633
StopMusic()
634
temp0 = object.currentSelection
635
temp0 *= 6
636
temp0 += 2
637
GetTableValue(temp1, temp0, MenuControl_EntryTable)
638
temp0++
639
GetTableValue(temp2, temp0, MenuControl_EntryTable)
640
stage.activeList = temp1
641
stage.listPos = temp2
642
LoadStage()
643
SetScreenFade(0xD0, 0xFF, 0xE0, 0xFF)
644
end if
645
break
646
end switch
647
end event
648
649
650
event ObjectDraw
651
// Two rows, two menus to be drawn
652
653
temp0 = screen.xcenter
654
temp0 -= 10
655
DrawMenu(MENU_1, temp0, 16)
656
657
temp0 = screen.xcenter
658
temp0 += 142
659
DrawMenu(MENU_2, temp0, 16)
660
end event
661
662
663
event ObjectStartup
664
// Load the sprite sheet
665
// No need to setup sprite frames since using the menu system will handle them automatically
666
LoadSpriteSheet("LevelSelect/Text.gif")
667
668
// All Menu Control objects should be active
669
// -> Note that there should only ever be one of them in a scene, though
670
foreach (TypeName[Menu Control], arrayPos0, ALL_ENTITIES)
671
object[arrayPos0].priority = PRIORITY_ACTIVE
672
next
673
674
#platform: USE_STANDALONE
675
if stage.actNum < 3
676
options.stageSelectFlag = true
677
end if
678
#endplatform
679
680
options.touchControls = false
681
682
SetMusicTrack("Options.ogg", 0, true)
683
684
// Setup menu 1 (left column)
685
SetupMenu(MENU_1, 0, 3, 1)
686
687
// Add the entries
688
AddMenuEntry(MENU_1, "EMERALD HILL@@ 1", true)
689
AddMenuEntry(MENU_1, "2", false)
690
AddMenuEntry(MENU_1, " ", false)
691
AddMenuEntry(MENU_1, "CHEMICAL PLANT 1", true)
692
AddMenuEntry(MENU_1, "2", false)
693
AddMenuEntry(MENU_1, " ", false)
694
AddMenuEntry(MENU_1, "AQUATIC RUIN@@ 1", true)
695
AddMenuEntry(MENU_1, "2", false)
696
AddMenuEntry(MENU_1, " ", false)
697
AddMenuEntry(MENU_1, "CASINO NIGHT@@ 1", true)
698
AddMenuEntry(MENU_1, "2", false)
699
AddMenuEntry(MENU_1, " ", false)
700
AddMenuEntry(MENU_1, "HILL TOP@@@@@@ 1", true)
701
AddMenuEntry(MENU_1, "2", false)
702
AddMenuEntry(MENU_1, " ", false)
703
AddMenuEntry(MENU_1, "MYSTIC CAVE@@@ 1", true)
704
AddMenuEntry(MENU_1, "2", false)
705
AddMenuEntry(MENU_1, " ", false)
706
AddMenuEntry(MENU_1, "OIL OCEAN@@@@@ 1", true)
707
AddMenuEntry(MENU_1, "2", false)
708
AddMenuEntry(MENU_1, " ", false)
709
710
// Setup menu 2 (right column)
711
SetupMenu(MENU_2, 0, 3, 1)
712
713
// Add its entries
714
AddMenuEntry(MENU_2, "METROPOLIS@@@@ 1", true)
715
AddMenuEntry(MENU_2, "2", false)
716
AddMenuEntry(MENU_2, "3", false)
717
AddMenuEntry(MENU_2, "SKY CHASE@@@@@@@", true)
718
AddMenuEntry(MENU_2, " ", false)
719
AddMenuEntry(MENU_2, " ", false)
720
AddMenuEntry(MENU_2, "WING FORTRESS@@@", true)
721
AddMenuEntry(MENU_2, " ", false)
722
AddMenuEntry(MENU_2, " ", false)
723
AddMenuEntry(MENU_2, "DEATH EGG@@@@@@@", true)
724
AddMenuEntry(MENU_2, " ", false)
725
AddMenuEntry(MENU_2, " ", false)
726
AddMenuEntry(MENU_2, "HIDDEN PALACE@@@", true)
727
AddMenuEntry(MENU_2, " ", 0)
728
AddMenuEntry(MENU_2, " ", 0)
729
AddMenuEntry(MENU_2, "SPECIAL STAGE@@@", true)
730
AddMenuEntry(MENU_2, " ", false)
731
AddMenuEntry(MENU_2, " ", false)
732
AddMenuEntry(MENU_2, "SOUND TEST@ *@@*", true)
733
734
menu1.selection = 0
735
menu2.selection = -1
736
737
// Not in the original, but origins compiler swaps the value of SPECIAL_STAGE to 2 (rather than 3 originally)
738
temp0 = 21
739
temp0 *= 6
740
temp0 += 2
741
SetTableValue(SPECIAL_STAGE, temp0, MenuControl_EntryTable)
742
end event
743
744
745
// ========================
746
// Editor Events
747
// ========================
748
749
event RSDKDraw
750
DrawSprite(0)
751
end event
752
753
754
event RSDKLoad
755
LoadSpriteSheet("Global/Display.gif")
756
SpriteFrame(-16, -16, 32, 32, 1, 143)
757
758
SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
759
end event
760
761