Path: blob/master/Sonic 1/Scripts/LevelSelect/MenuControl.txt
1483 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Menu Control Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.timer12private alias object.value1 : object.scrollDelayUp13private alias object.value2 : object.scrollDelayDown14private alias object.value3 : object.currentSelection15private alias object.value4 : object.soundTestCooldown1617// States18private alias 0 : MENUCONTROL_INIT19private alias 1 : MENUCONTROL_FADEIN20private alias 2 : MENUCONTROL_SELECTING21private alias 3 : MENUCONTROL_LOADLEVEL22private alias 4 : MENUCONTROL_LOADSPECIAL2324// The maximum number of selections available25private alias 27 : MAX_SELECTION_COUNT2627// Aliases for some of the special options28private alias 64 : SETTING_PLAYER29private alias 65 : SETTING_SPINDASH30private alias 66 : SETTING_GNDSPDCAP31private alias 67 : SETTING_AIRSPDCAP32private alias 68 : SETTING_S1SPIKES33private alias 69 : SETTING_ITEMS34private alias 70 : SETTING_EMERALDS3536private alias 71 : ENTRY_SOUNDTEST3738// Player IDs39private alias 0 : MENUCONTROL_PLAYER_ST40private alias 1 : MENUCONTROL_PLAYER_S41private alias 2 : MENUCONTROL_PLAYER_T42private alias 3 : MENUCONTROL_PLAYER_K4344// Origins Plus Player IDs45private alias 4 : MENUCONTROL_PLAYER_A46private alias 5 : MENUCONTROL_PLAYER_AT4748// HexNo Aliases49private alias object.value0 : hexNo.number50private alias object.value1 : hexNo.highlighted5152private alias 0 : HEXNO_HIGHLIGHT_FALSE53private alias 16 : HEXNO_HIGHLIGHT_TRUE5455// Shield Type Aliases56private alias 0 : SHIELDTYPE_S157private alias 1 : SHIELDTYPE_S258private alias 2 : SHIELDTYPE_S3_S159private alias 3 : SHIELDTYPE_S3_S26061// Player List Pos Aliases62public alias 0 : PLAYER_SONIC_A63public alias 1 : PLAYER_TAILS_A64public alias 2 : PLAYER_KNUCKLES_A65public alias 3 : PLAYER_SONIC_TAILS_A66public alias 4 : PLAYER_KNUCKLES_TAILS_A67public alias 5 : PLAYER_AMY_A68public alias 6 : PLAYER_AMY_TAILS_A6970// Music loops71private alias 635050 : MUSIC_LOOP_GHZ // 635970 in older S1 versions, changed some time around 1.0.772private alias 99380 : MUSIC_LOOP_MZ73private alias 100712 : MUSIC_LOOP_SYZ // This is 101364 in the normal stage...74private alias 84444 : MUSIC_LOOP_LZ75private alias 84364 : MUSIC_LOOP_SLZ76private alias 1 : MUSIC_LOOP_SBZ77private alias 84680 : MUSIC_LOOP_FINAL78private alias 39528 : MUSIC_LOOP_INV7980// Music Event Aliases81private alias 25 : SLOT_MUSICEVENT_CHANGE8283private alias 2 : MUSICEVENT_TRANSITION848586// ========================87// Function Declarations88// ========================8990reserve function MenuControl_HandleSecrets91reserve function MenuControl_PlaySong929394// ========================95// Static Values96// ========================9798private value MenuControl_DebugCheatCodePos = 099private value MenuControl_EmeraldCheatCodePos = 0100101102// ========================103// Tables104// ========================105106private table MenuControl_DebugModeCheatCode1071, 9, 9, 1, 0, 6, 2, 3108end table109110private table MenuControl_EmeraldsCheatCode1114, 1, 2, 6112end table113114// This table holds data for every stage with six values for every stage,115// -> First entry is menu table the stage option is on116// -> Second is what number this one is on the list, from top to bottom117// -> Third is the active stage list the stage is on118// -> Fourth is the stage's position in the stage list119// -> Fifth is the menu entry of what is on the opposite side of this selection, like how SBZ is to the right of GHZ and vice versa120// -> For "special" selections (like settings) this value is instead used to hold a special ID121// -> Sixth is the icon the entry uses (based on Sprite Frames in the BG Animation object)122private table MenuControl_EntryTable1230, 0, 1, 0, 15, 1 // 0 - GHZ 11240, 1, 1, 1, 16, 1 // 1 - GHZ 21250, 2, 1, 2, 17, 1 // 2 - GHZ 31260, 4, 1, 3, 18, 2 // 3 - MZ 11270, 5, 1, 4, 18, 2 // 4 - MZ 21280, 6, 1, 5, 19, 2 // 5 - MZ 31290, 8, 1, 6, 19, 3 // 6 - SYZ 11300, 9, 1, 7, 20, 3 // 7 - SYZ 21310, 10, 1, 8, 21, 3 // 8 - SYZ 31320, 12, 1, 9, 23, 4 // 9 - LZ 11330, 13, 1, 10, 24, 4 // 10 - LZ 21340, 14, 1, 11, 25, 4 // 11 - LZ 31350, 16, 1, 12, 26, 5 // 12 - SLZ 11360, 17, 1, 13, 26, 5 // 13 - SLZ 21370, 18, 1, 14, 27, 5 // 14 - SLZ 31381, 0, 1, 15, 0, 6 // 15 - SBZ 11391, 1, 1, 16, 1, 6 // 16 - SBZ 21401, 2, 1, 17, 2, 6 // 17 - SBZ 31411, 4, 1, 18, 3, 7 // 18 - Final Zone1421, 6, 2, 0, 5, 8 // 19 - Special Stage1431, 9, 0, 0, 64, 0 // 20 - Player Option1441, 10, 0, 0, 65, 0 // 21 - Spindash Setting1451, 11, 0, 0, 66, 0 // 22 - Ground Speed Cap Setting1461, 12, 0, 0, 67, 0 // 23 - Air Speed Cap Setting1471, 13, 0, 0, 68, 0 // 24 - S1 Spikes Setting1481, 14, 0, 0, 69, 0 // 25 - Items Setting1491, 15, 0, 0, 70, 0 // 26 - Max Emeralds Count1501, 18, 0, 0, 71, 0 // 27 - Sound Test151end table152153154// ========================155// Function Definitions156// ========================157158private function MenuControl_HandleSecrets159if hexNo[+2].number < 8160SetTableValue(hexNo[+2].number, 117, MenuControl_EntryTable)161end if162163GetTableValue(temp0, MenuControl_DebugCheatCodePos, MenuControl_DebugModeCheatCode)164if temp0 == hexNo[+2].number165MenuControl_DebugCheatCodePos++166if MenuControl_DebugCheatCodePos == 8167MenuControl_DebugCheatCodePos = 0168stage.debugMode = true169PlaySfx(SfxName[Ring L], false)170end if171else172MenuControl_DebugCheatCodePos = 0173end if174175GetTableValue(temp0, MenuControl_EmeraldCheatCodePos, MenuControl_EmeraldsCheatCode)176if temp0 == hexNo[+2].number177MenuControl_EmeraldCheatCodePos++178if MenuControl_EmeraldCheatCodePos == 4179MenuControl_EmeraldCheatCodePos = 0180if options.superStates == true181// Give the player all seven emeralds182specialStage.emeralds = 0x7F183else184// Only give the player 6 emeralds, as the seventh one shouldn't really exist185specialStage.emeralds = 0x3F186specialStage.listPos = 6187end if188189PlaySfx(SfxName[Emerald], false)190StopMusic()191end if192else193MenuControl_EmeraldCheatCodePos = 0194end if195end function196197198private function MenuControl_PlaySong199// Don't allow playing of songs in quick succession200if object.soundTestCooldown == 0201object.soundTestCooldown = 30202203switch hexNo[+2].number204case 0205StopMusic()206break207208case 1209SetMusicTrack("GreenHill.ogg", 0, MUSIC_LOOP_GHZ)210PlayMusic(0)211break212213case 2214SetMusicTrack("Marble.ogg", 0, MUSIC_LOOP_MZ)215PlayMusic(0)216break217218case 3219SetMusicTrack("SpringYard.ogg", 0, MUSIC_LOOP_SYZ)220PlayMusic(0)221break222223case 4224SetMusicTrack("Labyrinth.ogg", 0, MUSIC_LOOP_LZ)225PlayMusic(0)226break227228case 5229SetMusicTrack("Starlight.ogg", 0, MUSIC_LOOP_SLZ)230PlayMusic(0)231break232233case 6234SetMusicTrack("ScrapBrain.ogg", 0, MUSIC_LOOP_SBZ)235PlayMusic(0)236break237238case 7239SetMusicTrack("Invincibility.ogg", 0, MUSIC_LOOP_INV)240PlayMusic(0)241break242243case 8244PlaySfx(SfxName[Life], false)245PauseMusic()246ResetObjectEntity(SLOT_MUSICEVENT_CHANGE, TypeName[Music Event], MUSICEVENT_TRANSITION, 0, 0)247object[SLOT_MUSICEVENT_CHANGE].priority = PRIORITY_ACTIVE248break249250case 9251SetMusicTrack("SpecialStage.ogg", 0, true)252PlayMusic(0)253break254255case 10256SetMusicTrack("Titlescreen.ogg", 0, false)257PlayMusic(0)258break259260case 11261SetMusicTrack("Ending.ogg", 0, false)262PlayMusic(0)263break264265case 12266SetMusicTrack("Boss.ogg", 0, true)267PlayMusic(0)268break269270case 13271SetMusicTrack("Final.ogg", 0, MUSIC_LOOP_FINAL)272PlayMusic(0)273break274275case 14276SetMusicTrack("ActComplete.ogg", 0, false)277PlayMusic(0)278break279280case 15281SetMusicTrack("GameOver.ogg", 0, false)282PlayMusic(0)283break284285case 16286SetMusicTrack("Continue.ogg", 0, false)287PlayMusic(0)288break289290case 17291SetMusicTrack("Credits.ogg", 0, false)292PlayMusic(0)293break294295case 18296SetMusicTrack("Drowning.ogg", 0, false)297PlayMusic(0)298break299300end switch301end if302end function303304305// ========================306// Events307// ========================308309event ObjectUpdate310// Set up the positions of the two HexNo objects311// (Not sure why this can't be in INIT like the ypos setup, but if you really wanna ig)312object[+1].xpos = screen.xcenter313object[+1].xpos += 118314object[+2].xpos = object[+1].xpos315316switch object.state317case MENUCONTROL_INIT318object.timer = 320319320SetScreenFade(0, 0, 0, object.timer)321322// Setup the next two HexNo objects' positions323324object[+1].ypos = 88325object[+1].priority = PRIORITY_ACTIVE326327object[+2].ypos = 160328object[+2].priority = PRIORITY_ACTIVE329330switch stage.playerListPos331case PLAYER_SONIC_A332hexNo[+1].number = MENUCONTROL_PLAYER_S333break334335case PLAYER_TAILS_A336hexNo[+1].number = MENUCONTROL_PLAYER_T337break338339case PLAYER_KNUCKLES_A340hexNo[+1].number = MENUCONTROL_PLAYER_K341break342343case PLAYER_SONIC_TAILS_A344hexNo[+1].number = MENUCONTROL_PLAYER_ST345break346#platform: USE_ORIGINS347case PLAYER_AMY_A348hexNo[+1].number = MENUCONTROL_PLAYER_A349break350351case PLAYER_AMY_TAILS_A352hexNo[+1].number = MENUCONTROL_PLAYER_AT353break354#endplatform355356end switch357358object.state++359break360361case MENUCONTROL_FADEIN362if object.timer > 0363object.timer -= 16364else365object.state++366end if367368SetScreenFade(0, 0, 0, object.timer)369break370371case MENUCONTROL_SELECTING372if keyDown[0].down == true373object.scrollDelayUp = 0374object.scrollDelayDown++375376if object.scrollDelayDown == 1377object.currentSelection++378end if379380object.scrollDelayDown %= 12381else382383if keyDown[0].up == true384object.scrollDelayDown = 0385386object.scrollDelayUp++387if object.scrollDelayUp == 1388object.currentSelection--389end if390391object.scrollDelayUp %= 12392else393object.scrollDelayUp = 0394object.scrollDelayDown = 0395end if396end if397398// Loop back if max count reached399if object.currentSelection > MAX_SELECTION_COUNT400object.currentSelection = 0401end if402403// Go back to mex if player if trying to go back from the first entry404if object.currentSelection < 0405object.currentSelection = MAX_SELECTION_COUNT406end if407408// Get info about the current selection409temp0 = object.currentSelection410temp0 *= 6411temp0++412413// Get what row the selection is in414GetTableValue(temp2, temp0, MenuControl_EntryTable)415temp0 += 3416417// Get the selection's special ID (will return a normal value if it's a normal selection)418GetTableValue(temp1, temp0, MenuControl_EntryTable)419420// Switch statement based on the entry's special ID421switch temp1422default423// Default - anything that isn't an option or sound test will end up here424checkResult = keyPress[0].left425checkResult |= keyPress[0].right426427if checkResult == true428object.currentSelection = temp1429end if430431hexNo[+1].highlighted = HEXNO_HIGHLIGHT_FALSE432hexNo[+2].highlighted = HEXNO_HIGHLIGHT_FALSE433434if keyPress[0].buttonA == true435keyPress[0].start = true436end if437break438439case SETTING_PLAYER440// Player option441hexNo[+1].highlighted = HEXNO_HIGHLIGHT_TRUE442hexNo[+2].highlighted = HEXNO_HIGHLIGHT_FALSE443444if keyPress[0].left == true445hexNo[+1].number--446#platform: USE_ORIGINS447if hexNo[+1].number == MENUCONTROL_PLAYER_A448if game.hasPlusDLC == false449hexNo[+1].number--450end if451end if452453if hexNo[+1].number < MENUCONTROL_PLAYER_ST454if game.hasPlusDLC == true455hexNo[+1].number = MENUCONTROL_PLAYER_AT456else457hexNo[+1].number = MENUCONTROL_PLAYER_K458end if459end if460#endplatform461end if462463if keyPress[0].right == true464hexNo[+1].number++465#platform: USE_ORIGINS466if game.hasPlusDLC == false467if hexNo[+1].number == MENUCONTROL_PLAYER_A468hexNo[+1].number++469end if470471if hexNo[+1].number == MENUCONTROL_PLAYER_AT472hexNo[+1].number++473end if474end if475476if hexNo[+1].number > MENUCONTROL_PLAYER_AT477hexNo[+1].number = MENUCONTROL_PLAYER_ST478end if479#endplatform480end if481482#platform: USE_STANDALONE483hexNo[+1].number &= MENUCONTROL_PLAYER_K484#endplatform485486switch hexNo[+1].number487case MENUCONTROL_PLAYER_ST488#platform: USE_STANDALONE489stage.playerListPos = PLAYER_SONIC_TAILS_A490#endplatform491#platform: USE_ORIGINS492stage.playerListPos = PLAYER_SONIC_TAILS493#endplatform494break495496case MENUCONTROL_PLAYER_S497#platform: USE_STANDALONE498stage.playerListPos = PLAYER_SONIC_A499#endplatform500#platform: USE_ORIGINS501stage.playerListPos = PLAYER_SONIC502#endplatform503stage.player2Enabled = false504break505506case MENUCONTROL_PLAYER_T507#platform: USE_STANDALONE508stage.playerListPos = PLAYER_TAILS_A509#endplatform510#platform: USE_ORIGINS511stage.playerListPos = PLAYER_TAILS512#endplatform513stage.player2Enabled = false514break515516case MENUCONTROL_PLAYER_K517#platform: USE_STANDALONE518stage.playerListPos = PLAYER_KNUCKLES_A519#endplatform520#platform: USE_ORIGINS521stage.playerListPos = PLAYER_KNUCKLES522#endplatform523stage.player2Enabled = false524break525526#platform: USE_ORIGINS527case MENUCONTROL_PLAYER_A528stage.playerListPos = PLAYER_AMY529stage.player2Enabled = false530break531532case MENUCONTROL_PLAYER_AT533stage.playerListPos = PLAYER_AMY_TAILS534stage.player2Enabled = true535break536#endplatform537538end switch539break540541case SETTING_SPINDASH542// Spindash setting543hexNo[+1].highlighted = HEXNO_HIGHLIGHT_FALSE544hexNo[+2].highlighted = HEXNO_HIGHLIGHT_FALSE545546checkResult = keyPress[0].left547checkResult |= keyPress[0].right548549if checkResult == true550// Toggle it551options.spindash ^= true552553// Update the menu to match554if options.spindash == true555EditMenuEntry(MENU_2, "SPINDASH@@@@@*ON*", temp2, true)556else557EditMenuEntry(MENU_2, "SPINDASH@@@@*OFF*", temp2, true)558end if559end if560break561562case SETTING_GNDSPDCAP563// Ground speed cap option564checkResult = keyPress[0].left565checkResult |= keyPress[0].right566567if checkResult == true568// Toggle it569options.speedCap ^= true570571// Update the menu text to match the new setting572if options.speedCap == true573EditMenuEntry(MENU_2, "GND SPD CAP@@*ON*", temp2, true)574else575EditMenuEntry(MENU_2, "GND SPD CAP *OFF*", temp2, true)576end if577end if578break579580case SETTING_AIRSPDCAP581// Air speed cap option582checkResult = keyPress[0].left583checkResult |= keyPress[0].right584585if checkResult == true586// Toggle it587options.airSpeedCap ^= true588589// Change the menu text to match the new option setting590if options.airSpeedCap == true591EditMenuEntry(MENU_2, "AIR SPD CAP@@*ON*", temp2, true)592else593EditMenuEntry(MENU_2, "AIR SPD CAP *OFF*", temp2, true)594end if595end if596break597598case SETTING_S1SPIKES599// Spike behavior600checkResult = keyPress[0].left601checkResult |= keyPress[0].right602603if checkResult == true604// Toggle the option605options.spikeBehavior ^= true606607// Update the menu text608if options.spikeBehavior == true609EditMenuEntry(MENU_2, "S1 SPIKES@@@@*ON*", temp2, true)610else611EditMenuEntry(MENU_2, "S1 SPIKES@@@*OFF*", temp2, true)612end if613end if614break615616case SETTING_ITEMS617// Monitors option618checkResult = keyPress[0].left619checkResult |= keyPress[0].right620621if checkResult == true622if keyPress[0].left == true623options.shieldType--624end if625626if keyPress[0].right == true627options.shieldType++628end if629630options.shieldType &= SHIELDTYPE_S3_S2631632// Update the menu text to account for the new change633switch options.shieldType634case SHIELDTYPE_S1635EditMenuEntry(MENU_2, "ITEMS@@@@@@@@*S1*", temp2, true)636break637638case SHIELDTYPE_S2639EditMenuEntry(MENU_2, "ITEMS@@@@@@@@*S2*", temp2, true)640break641642case SHIELDTYPE_S3_S1643EditMenuEntry(MENU_2, "ITEMS@@@@@*S1+S3*", temp2, true)644break645646case SHIELDTYPE_S3_S2647EditMenuEntry(MENU_2, "ITEMS@@@@@*S2+S3*", temp2, true)648break649end switch650end if651break652653case SETTING_EMERALDS654// Max emeralds setting655hexNo[+1].highlighted = HEXNO_HIGHLIGHT_FALSE656hexNo[+2].highlighted = HEXNO_HIGHLIGHT_FALSE657658checkResult = keyPress[0].left659checkResult |= keyPress[0].right660661if checkResult == true662// Change the setting663options.superStates ^= true664665// And update the menu to match666if options.superStates == true667EditMenuEntry(MENU_2, "MAX EMERALDS *07*", temp2, true)668else669EditMenuEntry(MENU_2, "MAX EMERALDS *06*", temp2, true)670end if671end if672break673674case ENTRY_SOUNDTEST675// Sound test676if object.soundTestCooldown > 0677object.soundTestCooldown--678end if679680hexNo[+1].highlighted = HEXNO_HIGHLIGHT_FALSE681hexNo[+2].highlighted = HEXNO_HIGHLIGHT_TRUE682683684if keyPress[0].buttonC == true685// Add 16 to the count686hexNo[+2].number += 16687end if688689if keyPress[0].left == true690hexNo[+2].number--691end if692693if keyPress[0].right == true694hexNo[+2].number++695end if696697// There are only 32 entries698hexNo[+2].number &= 31699700if keyPress[0].buttonA == true701CallFunction(MenuControl_PlaySong)702CallFunction(MenuControl_HandleSecrets)703end if704705if keyPress[0].buttonB == true706CallFunction(MenuControl_PlaySong)707CallFunction(MenuControl_HandleSecrets)708end if709break710711end switch712713temp0 = object.currentSelection714temp0 *= 6715716// Get what menu the current selection is on717GetTableValue(temp1, temp0, MenuControl_EntryTable)718temp0++719if temp1 == MENU_1720menu2.selection = -1721GetTableValue(menu1.selection, temp0, MenuControl_EntryTable)722else // MENU_2723menu1.selection = -1724GetTableValue(menu2.selection, temp0, MenuControl_EntryTable)725end if726727temp0 += 4728729// Get what picture the current selection should show730GetTableValue(BGAnimation_currentPreview, temp0, MenuControl_EntryTable)731732// Check if the player wants to enter the level733if keyPress[0].start == true734// Special stage?735if object.currentSelection == 19736// Special fade for special stages737PlaySfx(SfxName[Warp], false)738object.state = MENUCONTROL_LOADSPECIAL739fadeColor = 0xD0740fadeColor <<= 16741temp0 = 0xFF742temp0 <<= 8743fadeColor += temp0744fadeColor += 0xE0745else746// Use the normal level loading routine747object.state = MENUCONTROL_LOADLEVEL748end if749end if750break751752case MENUCONTROL_LOADLEVEL // Black fade for entering a normal stage753if object.timer < 0x100754music.volume -= 10755object.timer += 16756SetScreenFade(0, 0, 0, object.timer)757else758#platform: USE_ORIGINS759CallNativeFunction2(NotifyCallback, NOTIFY_LEVEL_SELECT_MENU, true)760CallNativeFunction2(NotifyCallback, NOTIFY_PLAYER_SET, stage.playerListPos)761#endplatform762763StopMusic()764765// Start getting info about the currently selected stage766temp0 = object.currentSelection767temp0 *= 6768temp0 += 2769770// Get what stage list it's on771GetTableValue(temp1, temp0, MenuControl_EntryTable)772temp0++773774// And then get the stage's list pos775GetTableValue(temp2, temp0, MenuControl_EntryTable)776777stage.activeList = temp1778stage.listPos = temp2779780LoadStage()781782SetScreenFade(0x00, 0x00, 0x00, 0xFF)783end if784break785786case MENUCONTROL_LOADSPECIAL787if object.timer < 768788music.volume -= 10789object.timer += 8790SetScreenFade(0xD0, 0xFF, 0xE0, object.timer)791else792StopMusic()793794temp0 = object.currentSelection795temp0 *= 6796temp0 += 2797798// Get what stage list it's on799GetTableValue(temp1, temp0, MenuControl_EntryTable)800temp0++801802// And then get the stage's list position803GetTableValue(temp2, temp0, MenuControl_EntryTable)804805stage.activeList = temp1806stage.listPos = temp2807808LoadStage()809810SetScreenFade(0xD0, 0xFF, 0xE0, 0xFF)811end if812break813814end switch815end event816817818event ObjectDraw819temp0 = screen.xcenter820temp0 -= 10821DrawMenu(MENU_1, temp0, 16)822823temp0 = screen.xcenter824temp0 += 142825DrawMenu(MENU_2, temp0, 16)826end event827828829event ObjectStartup830LoadSpriteSheet("LevelSelect/Text.gif")831832foreach (TypeName[Menu Control], arrayPos0, ALL_ENTITIES)833// Set all Menu Control objects to be active834object[arrayPos0].priority = PRIORITY_ACTIVE835next836837// Player is on stage select, so set the flag838options.stageSelectFlag = true839840// (Initial verions of S1 used to reset stage.player2Enabled here, but that line was later removed)841842// Setup the menu and its entries843844// Left column845SetupMenu(MENU_1, 0, 3, 1)846AddMenuEntry(MENU_1, "GREEN HILL 1", true)847AddMenuEntry(MENU_1, "2", false)848AddMenuEntry(MENU_1, "3", false)849AddMenuEntry(MENU_1, " ", false)850AddMenuEntry(MENU_1, "MARBLE 1", true)851AddMenuEntry(MENU_1, "2", false)852AddMenuEntry(MENU_1, "3", false)853AddMenuEntry(MENU_1, " ", false)854AddMenuEntry(MENU_1, "SPRING YARD 1", true)855AddMenuEntry(MENU_1, "2", false)856AddMenuEntry(MENU_1, "3", false)857AddMenuEntry(MENU_1, " ", false)858AddMenuEntry(MENU_1, "LABYRINTH 1", true)859AddMenuEntry(MENU_1, "2", false)860AddMenuEntry(MENU_1, "3", false)861AddMenuEntry(MENU_1, " ", false)862AddMenuEntry(MENU_1, "STAR LIGHT 1", true)863AddMenuEntry(MENU_1, "2", false)864AddMenuEntry(MENU_1, "3", false)865AddMenuEntry(MENU_1, " ", false)866867// Right column868SetupMenu(MENU_2, 0, 3, 1)869AddMenuEntry(MENU_2, "SCRAP BRAIN 1", true)870AddMenuEntry(MENU_2, "2", false)871AddMenuEntry(MENU_2, "3", false)872AddMenuEntry(MENU_2, " ", false)873AddMenuEntry(MENU_2, "FINAL ", true)874AddMenuEntry(MENU_2, " ", false)875AddMenuEntry(MENU_2, "SPECIAL STAGE ", true)876AddMenuEntry(MENU_2, " ", false)877AddMenuEntry(MENU_2, " ", false)878879// (Neat note - In initial S1 versions, spaces were used as placeholder letters rather than @'s)880881AddMenuEntry(MENU_2, "PLAYER@@@@@@@*@@*", true)882883if options.spindash == true884AddMenuEntry(MENU_2, "SPINDASH@@@@@*ON*", true)885else886AddMenuEntry(MENU_2, "SPINDASH@@@@*OFF*", true)887end if888889if options.speedCap == true890AddMenuEntry(MENU_2, "GND SPD CAP@@*ON*", true)891else892AddMenuEntry(MENU_2, "GND SPD CAP@*OFF*", true)893end if894895if options.airSpeedCap == true896AddMenuEntry(MENU_2, "AIR SPD CAP@@*ON*", true)897else898AddMenuEntry(MENU_2, "AIR SPD CAP@*OFF*", true)899end if900901if options.spikeBehavior == true902AddMenuEntry(MENU_2, "S1 SPIKES@@@@*ON*", true)903else904AddMenuEntry(MENU_2, "S1 SPIKES@@@*OFF*", true)905end if906907switch options.shieldType908case SHIELDTYPE_S1909AddMenuEntry(MENU_2, "ITEMS@@@@@@@@*S1*", true)910break911912case SHIELDTYPE_S2913AddMenuEntry(MENU_2, "ITEMS@@@@@@@@*S2*", true)914break915916case SHIELDTYPE_S3_S1917AddMenuEntry(MENU_2, "ITEMS@@@@@*S1+S3*", true)918break919920case SHIELDTYPE_S3_S2921AddMenuEntry(MENU_2, "ITEMS@@@@@*S2+S3*", true)922break923924end switch925926if options.superStates == false927AddMenuEntry(MENU_2, "MAX EMERALDS *06*", true)928else929AddMenuEntry(MENU_2, "MAX EMERALDS *07*", true)930end if931932AddMenuEntry(MENU_2, " ", false)933AddMenuEntry(MENU_2, " ", false)934AddMenuEntry(MENU_2, "SOUND TEST *@@*", true)935936menu1.selection = 0937menu2.selection = -1938939// Not in the original, but origins compiler swaps the value of SPECIAL_STAGE to 2 (rather than 3 originally)940temp0 = 19941temp0 *= 6942temp0 += 2943SetTableValue(SPECIAL_STAGE, temp0, MenuControl_EntryTable)944end event945946947// ========================948// Editor Events949// ========================950951event RSDKDraw952DrawSprite(0)953end event954955956event RSDKLoad957LoadSpriteSheet("Global/Display.gif")958SpriteFrame(-16, -16, 32, 32, 1, 143)959960SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")961end event962963964