Path: blob/master/Sonic 2/Scripts/ARZ/ARZSetup.txt
1478 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: ARZ Setup Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value6 : object.clrDivisor_R12private alias object.value7 : object.clrDivisor_G13private alias object.value8 : object.clrDivisor_B14private alias object.value9 : object.waterClrDivisor_R15private alias object.value10 : object.waterClrDivisor_G16private alias object.value11 : object.waterClrDivisor_B1718private alias object.value1 : object.paletteTimer1920// Tracks21private alias 0 : TRACK_STAGE22private alias 1 : TRACK_ACTFINISH23private alias 2 : TRACK_INVINCIBLE24private alias 3 : TRACK_CONTINUE25private alias 4 : TRACK_BOSS26private alias 5 : TRACK_GAMEOVER27private alias 6 : TRACK_DROWNING28private alias 7 : TRACK_SUPER2930// Reserved object slots31private alias 10 : SLOT_ZONESETUP32private alias 25 : SLOT_MUSICEVENT_CHANGE33private alias 26 : SLOT_MUSICEVENT_BOSS3435// Music Events36private alias 2 : MUSICEVENT_TRANSITION3738private alias 0 : MUSICEVENT_FLAG_NOCHANGE39private alias 1 : MUSICEVENT_FLAG_SPEEDUP40private alias 2 : MUSICEVENT_FLAG_SLOWDOWN4142// Music Loops43private alias 1 : MUSIC_LOOP_ARZ44private alias 1 : MUSIC_LOOP_ARZ_F4546private alias 38679 : MUSIC_LOOP_INV47private alias 30897 : MUSIC_LOOP_INV_F484950// ========================51// Function Declarations52// ========================5354reserve function ARZSetup_getClrDivisor55reserve function ARZSetup_InitSuperSonicPal56reserve function ARZSetup_InitSuperTailsPal57reserve function ARZSetup_InitSuperKnuxPal58reserve function ARZSetup_InitSuperAmyPal59reserve function ARZSetup_SpeedUpMusic60reserve function ARZSetup_SlowDownMusic616263// ========================64// Static Values65// ========================6667public value Water_flashTimer = 0 // Uses "Water_" since all water objects use it from the setup so its easier to make new objs this way686970// ========================71// Tables72// ========================7374private table ARZSetup_replay_attract_S750x6C0000, 0x37D0000760x00, 68770x08, 68780x38, 1790x28, 4800x08, 6810x00, 26820x08, 37830x00, 2840x08, 13850x00, 28860x30, 1870x20, 10880x24, 3890x20, 15900x28, 5910x08, 34920x38, 1930x28, 5940x08, 170950x00, 2960x02, 8970x06, 1980x04, 15990x00, 181000x08, 811010x00, 531020x30, 11030x20, 61040x24, 231050x00, 571060x08, 521070x38, 11080x28, 21090x08, 431100x00, 761110x30, 11120x20, 171130x28, 391140x08, 321150x0A, 21160x02, 151170x00, 351180x30, 11190x20, 451200x00, 331210x30, 11220x20, 521230x24, 31240x04, 251250x00, 51260x30, 11270x20, 11280x28, 961290x20, 11300x24, 21310x04, 131320x00, 271330x08, 71340x38, 11350x28, 221360x08, 111370x00, 11380x04, 101390x00, 101400x08, 851410x00, 81420x08, 111430x38, 11440x28, 41450x08, 231460x00, 661470x08, 51480x38, 11490x28, 191500x08, 841510x38, 1152end table153154155private table ARZSetup_replay_attract_T1560x6C0000, 0x38100001570x00, 181580x08, 631590x38, 11600x28, 51610x08, 851620x38, 11630x28, 11640x20, 161650x28, 71660x08, 1751670x38, 11680x28, 481690x08, 151700x38, 11710x28, 451720x08, 971730x0A, 31740x02, 391750x00, 41760x08, 1081770x38, 11780x28, 461790x08, 1991800x38, 11810x28, 591820x08, 31830x0A, 41840x02, 41850x0A, 111860x08, 21870x00, 11880x02, 281890x08, 2141900x0A, 21910x02, 771920x00, 11930x04, 201940x00, 651950x08, 221960x38, 11970x28, 21980x08, 1611990x38, 12000x28, 122010x08, 432020x38, 12030x28, 82040x08, 82050x38, 12060x28, 72070x08, 42080x38, 12090x28, 42100x08, 42110x38, 12120x28, 62130x08, 32140x38, 12150x28, 62160x08, 32170x38, 12180x28, 62190x08, 32200x38, 12210x28, 62220x08, 32230x38, 12240x28, 5225end table226227228private table ARZSetup_replay_attract_K2290x6C0000, 0x37D00002300x00, 502310x08, 662320x38, 12330x28, 52340x08, 862350x38, 12360x28, 62370x08, 2162380x38, 12390x28, 142400x08, 232410x38, 12420x28, 182430x08, 1162440x0A, 22450x02, 52460x00, 32470x08, 1442480x38, 12490x28, 232500x08, 52510x38, 12520x28, 1272530x00, 112540x02, 132550x32, 12560x22, 32570x00, 52580x08, 962590x0A, 12600x02, 82610x0A, 22620x08, 1592630x38, 12640x28, 182650x08, 52660x38, 12670x28, 572680x08, 12690x00, 102700x02, 172710x32, 12720x22, 32730x00, 62740x08, 402750x00, 192760x08, 272770x38, 12780x28, 112790x08, 62800x38, 12810x28, 662820x29, 62830x21, 142840x01, 222850x00, 1072860x01, 512870x00, 62880x02, 62890x32, 12900x22, 22910x00, 1292end table293294295// ========================296// Function Definitions297// ========================298299private function ARZSetup_getClrDivisor300object.clrDivisor_R = temp1301object.clrDivisor_R >>= 16302303object.clrDivisor_G = temp1304object.clrDivisor_G >>= 8305object.clrDivisor_G &= 0xFF306307object.clrDivisor_B = temp1308object.clrDivisor_B &= 0xFF309310object.waterClrDivisor_R = temp2311object.waterClrDivisor_R >>= 16312313object.waterClrDivisor_G = temp2314object.waterClrDivisor_G >>= 8315object.waterClrDivisor_G &= 0xFF316317object.waterClrDivisor_B = temp2318object.waterClrDivisor_B &= 0xFF319320if object.waterClrDivisor_R == 0321object.waterClrDivisor_R = 1322end if323324if object.waterClrDivisor_G == 0325object.waterClrDivisor_G = 1326end if327328if object.waterClrDivisor_B == 0329object.waterClrDivisor_B = 1330end if331332object.clrDivisor_R <<= 8333object.clrDivisor_G <<= 8334object.clrDivisor_B <<= 8335object.clrDivisor_R /= object.waterClrDivisor_R336object.clrDivisor_G /= object.waterClrDivisor_G337object.clrDivisor_B /= object.waterClrDivisor_B338339if object.clrDivisor_R == 0340object.clrDivisor_R = 0x100341end if342343if object.clrDivisor_G == 0344object.clrDivisor_G = 0x100345end if346347if object.clrDivisor_B == 0348object.clrDivisor_B = 0x100349end if350end function351352353private function ARZSetup_InitSuperSonicPal354temp0 = 0355356GetPaletteEntry(1, 2, temp1)357SetTableValue(temp1, temp0, Player_SonicSuperAltPal)358temp0++359360GetPaletteEntry(1, 3, temp1)361SetTableValue(temp1, temp0, Player_SonicSuperAltPal)362temp0++363364GetPaletteEntry(1, 4, temp1)365SetTableValue(temp1, temp0, Player_SonicSuperAltPal)366temp0++367368GetPaletteEntry(1, 5, temp1)369SetTableValue(temp1, temp0, Player_SonicSuperAltPal)370temp0++371372while temp0 < 64373GetPaletteEntry(0, 2, temp1)374GetPaletteEntry(1, 2, temp2)375376CallFunction(ARZSetup_getClrDivisor)377378GetTableValue(temp1, temp0, Player_SonicSuperPal)379380temp2 = temp1381temp2 >>= 8382temp2 &= 0xFF383384temp3 = temp1385temp3 &= 0xFF386387temp1 >>= 16388389temp1 *= 0xE0390temp1 /= object.clrDivisor_R391392temp2 *= 0xE0393temp2 /= object.clrDivisor_G394395temp3 *= 0xE0396temp3 /= object.clrDivisor_B397398temp1 &= 0xF0399temp2 &= 0xF0400temp3 &= 0xF0401402if temp1 > 0xE0403temp1 = 0xE0404end if405406if temp2 > 0xE0407temp2 = 0xE0408end if409410if temp3 > 0xE0411temp3 = 0xE0412end if413414temp1 <<= 16415temp2 <<= 8416temp1 += temp2417temp1 += temp3418SetTableValue(temp1, temp0, Player_SonicSuperAltPal)419temp0++420421GetPaletteEntry(0, 3, temp1)422GetPaletteEntry(1, 3, temp2)423424CallFunction(ARZSetup_getClrDivisor)425426GetTableValue(temp1, temp0, Player_SonicSuperPal)427428temp2 = temp1429temp2 >>= 8430temp2 &= 0xFF431432temp3 = temp1433temp3 &= 0xFF434435temp1 >>= 16436437temp1 *= 0xE8438temp1 /= object.clrDivisor_R439440temp2 *= 0xE8441temp2 /= object.clrDivisor_G442443temp3 *= 0xE8444temp3 /= object.clrDivisor_B445446temp1 &= 0xF0447temp2 &= 0xF0448temp3 &= 0xF0449450if temp1 > 0xE0451temp1 = 0xE0452end if453454if temp2 > 0xE0455temp2 = 0xE0456end if457458if temp3 > 0xE0459temp3 = 0xE0460end if461462temp1 <<= 16463temp2 <<= 8464temp1 += temp2465temp1 += temp3466SetTableValue(temp1, temp0, Player_SonicSuperAltPal)467temp0++468469GetPaletteEntry(0, 4, temp1)470GetPaletteEntry(1, 4, temp2)471472CallFunction(ARZSetup_getClrDivisor)473474GetTableValue(temp1, temp0, Player_SonicSuperPal)475476temp2 = temp1477temp2 >>= 8478temp2 &= 0xFF479480temp3 = temp1481temp3 &= 0xFF482483temp1 >>= 16484485temp1 *= 0xF4486temp1 /= object.clrDivisor_R487488temp2 *= 0xF4489temp2 /= object.clrDivisor_G490491temp3 *= 0xF4492temp3 /= object.clrDivisor_B493494temp1 &= 0xF0495temp2 &= 0xF0496temp3 &= 0xF0497498if temp1 > 0xE0499temp1 = 0xE0500end if501502if temp2 > 0xE0503temp2 = 0xE0504end if505506if temp3 > 0xE0507temp3 = 0xE0508end if509510temp1 <<= 16511temp2 <<= 8512temp1 += temp2513temp1 += temp3514SetTableValue(temp1, temp0, Player_SonicSuperAltPal)515temp0++516517GetPaletteEntry(0, 5, temp1)518GetPaletteEntry(1, 5, temp2)519520CallFunction(ARZSetup_getClrDivisor)521522GetTableValue(temp1, temp0, Player_SonicSuperPal)523524temp2 = temp1525temp2 >>= 8526temp2 &= 0xFF527528temp3 = temp1529temp3 &= 0xFF530531temp1 >>= 16532533temp1 *= 0x100534temp1 /= object.clrDivisor_R535536temp2 *= 0x100537temp2 /= object.clrDivisor_G538539temp3 *= 0x100540temp3 /= object.clrDivisor_B541542temp1 &= 0xF0543temp2 &= 0xF0544temp3 &= 0xF0545546if temp1 > 0xE0547temp1 = 0xE0548end if549550if temp2 > 0xE0551temp2 = 0xE0552end if553554if temp3 > 0xE0555temp3 = 0xE0556end if557558temp1 <<= 16559temp2 <<= 8560temp1 += temp2561temp1 += temp3562SetTableValue(temp1, temp0, Player_SonicSuperAltPal)563temp0++564loop565end function566567568private function ARZSetup_InitSuperTailsPal569temp0 = 0570GetPaletteEntry(1, 13, temp1)571SetTableValue(temp1, temp0, Player_TailsSuperAltPal)572temp0++573574GetPaletteEntry(1, 17, temp1)575SetTableValue(temp1, temp0, Player_TailsSuperAltPal)576temp0++577578GetPaletteEntry(1, 18, temp1)579SetTableValue(temp1, temp0, Player_TailsSuperAltPal)580temp0++581582GetPaletteEntry(1, 16, temp1)583SetTableValue(temp1, temp0, Player_TailsSuperAltPal)584temp0++585586while temp0 < 24587GetPaletteEntry(0, 13, temp1)588GetPaletteEntry(1, 13, temp2)589590CallFunction(ARZSetup_getClrDivisor)591592GetTableValue(temp1, temp0, Player_TailsSuperPal)593594temp2 = temp1595temp2 >>= 8596temp2 &= 0xFF597598temp3 = temp1599temp3 &= 0xFF600601temp1 >>= 16602603temp1 *= 0xF8604temp1 /= object.clrDivisor_R605606temp2 *= 0xF8607temp2 /= object.clrDivisor_G608609temp3 *= 0xF8610temp3 /= object.clrDivisor_B611612temp1 &= 0xF0613temp2 &= 0xF0614temp3 &= 0xF0615616if temp1 > 0xE0617temp1 = 0xE0618end if619620if temp2 > 0xE0621temp2 = 0xE0622end if623624if temp3 > 0xE0625temp3 = 0xE0626end if627628temp1 <<= 16629temp2 <<= 8630temp1 += temp2631temp1 += temp3632SetTableValue(temp1, temp0, Player_TailsSuperAltPal)633temp0++634635636GetPaletteEntry(0, 17, temp1)637GetPaletteEntry(1, 17, temp2)638639CallFunction(ARZSetup_getClrDivisor)640641GetTableValue(temp1, temp0, Player_TailsSuperPal)642643temp2 = temp1644temp2 >>= 8645temp2 &= 0xFF646647temp3 = temp1648temp3 &= 0xFF649650temp1 >>= 16651652temp1 *= 0x100653temp1 /= object.clrDivisor_R654655temp2 *= 0x100656temp2 /= object.clrDivisor_G657658temp3 *= 0x100659temp3 /= object.clrDivisor_B660661temp1 &= 0xF0662temp2 &= 0xF0663temp3 &= 0xF0664665if temp1 > 0xE0666temp1 = 0xE0667end if668669if temp2 > 0xE0670temp2 = 0xE0671end if672673if temp3 > 0xE0674temp3 = 0xE0675end if676677temp1 <<= 16678temp2 <<= 8679temp1 += temp2680temp1 += temp3681SetTableValue(temp1, temp0, Player_TailsSuperAltPal)682temp0++683684685GetPaletteEntry(0, 18, temp1)686GetPaletteEntry(1, 18, temp2)687688CallFunction(ARZSetup_getClrDivisor)689690GetTableValue(temp1, temp0, Player_TailsSuperPal)691692temp2 = temp1693temp2 >>= 8694temp2 &= 0xFF695696temp3 = temp1697temp3 &= 0xFF698699temp1 >>= 16700701temp1 *= 0x100702temp1 /= object.clrDivisor_R703704temp2 *= 0x100705temp2 /= object.clrDivisor_G706707temp3 *= 0x100708temp3 /= object.clrDivisor_B709710temp1 &= 0xF0711temp2 &= 0xF0712temp3 &= 0xF0713714if temp1 > 0xE0715temp1 = 0xE0716end if717718if temp2 > 0xE0719temp2 = 0xE0720end if721722if temp3 > 0xE0723temp3 = 0xE0724end if725726temp1 <<= 16727temp2 <<= 8728temp1 += temp2729temp1 += temp3730SetTableValue(temp1, temp0, Player_TailsSuperAltPal)731temp0++732733GetPaletteEntry(0, 16, temp1)734GetPaletteEntry(1, 16, temp2)735736CallFunction(ARZSetup_getClrDivisor)737738GetTableValue(temp1, temp0, Player_TailsSuperPal)739temp2 = temp1740temp2 >>= 8741temp2 &= 0xFF742743temp3 = temp1744temp3 &= 0xFF745746temp1 >>= 16747748temp1 *= 0x100749temp1 /= object.clrDivisor_R750751temp2 *= 0x100752temp2 /= object.clrDivisor_G753754temp3 *= 0x100755temp3 /= object.clrDivisor_B756757temp1 &= 0xF0758temp2 &= 0xF0759temp3 &= 0xF0760761if temp1 > 0xE0762temp1 = 0xE0763end if764765if temp2 > 0xE0766temp2 = 0xE0767end if768769if temp3 > 0xE0770temp3 = 0xE0771end if772773temp1 <<= 16774temp2 <<= 8775temp1 += temp2776temp1 += temp3777SetTableValue(temp1, temp0, Player_TailsSuperAltPal)778temp0++779loop780end function781782783private function ARZSetup_InitSuperKnuxPal784temp0 = 0785786GetPaletteEntry(1, 26, temp1)787SetTableValue(temp1, temp0, Player_KnuxSuperAltPal)788temp0++789790GetPaletteEntry(1, 27, temp1)791SetTableValue(temp1, temp0, Player_KnuxSuperAltPal)792temp0++793794GetPaletteEntry(1, 28, temp1)795SetTableValue(temp1, temp0, Player_KnuxSuperAltPal)796temp0++797end function798799800private function ARZSetup_InitSuperAmyPal801#platform: USE_ORIGINS802temp0 = 0803804GetPaletteEntry(1, 54, temp1)805SetTableValue(temp1, temp0, Player_AmySuperAltPal)806temp0++807808GetPaletteEntry(1, 50, temp1)809SetTableValue(temp1, temp0, Player_AmySuperAltPal)810temp0++811812GetPaletteEntry(1, 51, temp1)813SetTableValue(temp1, temp0, Player_AmySuperAltPal)814temp0++815816GetPaletteEntry(1, 52, temp1)817SetTableValue(temp1, temp0, Player_AmySuperAltPal)818temp0++819820GetPaletteEntry(1, 53, temp1)821SetTableValue(temp1, temp0, Player_AmySuperAltPal)822temp0++823824while temp0 < 30825temp4 = temp0826temp4 -= 5827828GetTableValue(temp1, temp4, Player_AmySuperAltPal)829830temp2 = temp1831temp2 >>= 8832temp2 &= 255833834temp3 = temp1835temp3 &= 255836837temp1 >>= 16838temp1 += 32839if temp1 > 255840temp1 = 255841end if842843temp2 += 32844if temp2 > 255845temp2 = 255846end if847848temp3 += 32849if temp3 > 255850temp3 = 255851end if852853temp1 <<= 16854temp2 <<= 8855temp1 += temp2856temp1 += temp3857SetTableValue(temp1, temp0, Player_AmySuperAltPal)858temp0++859loop860861temp6 = 25862while temp0 < 50863temp5 = 0864while temp5 < 5865temp4 = temp6866temp4 += temp5867GetTableValue(temp1, temp4, Player_AmySuperAltPal)868SetTableValue(temp1, temp0, Player_AmySuperAltPal)869temp0++870temp5++871loop872873temp6 -= 5874loop875#endplatform876end function877878879private function ARZSetup_SpeedUpMusic880CheckEqual(object[SLOT_MUSICEVENT_CHANGE].type, TypeName[Music Event])881temp0 = checkResult882CheckEqual(object[SLOT_MUSICEVENT_CHANGE].propertyValue, MUSICEVENT_TRANSITION)883temp0 &= checkResult884CheckEqual(stage.musicFlag, MUSICEVENT_FLAG_NOCHANGE)885temp0 &= checkResult886if temp0 == false887switch music.currentTrack888case TRACK_STAGE889SetMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F)890SwapMusicTrack("AquaticRuin_F.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ_F, 8000)891break892893case TRACK_INVINCIBLE894SetMusicTrack("AquaticRuin_F.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ_F)895SwapMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F, 8000)896break897898case TRACK_BOSS899case TRACK_DROWNING900case TRACK_SUPER901SetMusicTrack("AquaticRuin_F.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ_F)902SetMusicTrack("Invincibility_F.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV_F)903break904end switch905else906stage.musicFlag = MUSICEVENT_FLAG_SPEEDUP907end if908end function909910911private function ARZSetup_SlowDownMusic912CheckEqual(object[SLOT_MUSICEVENT_CHANGE].type, TypeName[Music Event])913temp0 = checkResult914CheckEqual(object[SLOT_MUSICEVENT_CHANGE].propertyValue, MUSICEVENT_TRANSITION)915temp0 &= checkResult916CheckEqual(stage.musicFlag, MUSICEVENT_FLAG_NOCHANGE)917temp0 &= checkResult918if temp0 == false919switch music.currentTrack920case TRACK_STAGE921SetMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV)922SwapMusicTrack("AquaticRuin.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ, 12500)923break924925case TRACK_INVINCIBLE926SetMusicTrack("AquaticRuin.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ)927SwapMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV, 12500)928break929930case TRACK_BOSS931case TRACK_DROWNING932case TRACK_SUPER933SetMusicTrack("AquaticRuin.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ)934SetMusicTrack("Invincibility.ogg", TRACK_INVINCIBLE, MUSIC_LOOP_INV)935break936end switch937else938stage.musicFlag = MUSICEVENT_FLAG_SLOWDOWN939end if940end function941942943// ========================944// Events945// ========================946947event ObjectUpdate948object.paletteTimer++949if object.paletteTimer == 6950// Animate the waterfalls951object.paletteTimer = 0952RotatePalette(0, 162, 165, true)953RotatePalette(1, 162, 165, true)954end if955956if Water_flashTimer > 0957Water_flashTimer--958end if959end event960961962event ObjectDraw963temp0 = stage.waterLevel964temp0 -= screen.yoffset965if temp0 < 0966temp0 = 0967end if968if temp0 > screen.ysize969temp0 = screen.ysize970end if971972SetActivePalette(0, 0, temp0)973if Water_flashTimer > 0974SetActivePalette(2, temp0, screen.ysize)975else976SetActivePalette(1, temp0, screen.ysize)977end if978end event979980981event ObjectStartup982// Set the stage layer midpoint but, this is already what's present in the scene file?983// So why is it set again here..?984stage.midPoint = 2985986// Reset the boss flash color to be pure black987SetPaletteEntry(0, 192, 0x000000)988989SetMusicTrack("AquaticRuin.ogg", TRACK_STAGE, MUSIC_LOOP_ARZ)990991SpeedUpMusic = ARZSetup_SpeedUpMusic992SlowDownMusic = ARZSetup_SlowDownMusic993994animalType1 = TypeName[Flicky]995animalType2 = TypeName[Pecky]996997object[SLOT_ZONESETUP].type = TypeName[ARZ Setup]998object[SLOT_ZONESETUP].priority = PRIORITY_ACTIVE999object[SLOT_ZONESETUP].drawOrder = 010001001// Different BG properties for the different acts1002// -> Boss attack isn't listed here, so it uses the default values already in the scene file1003switch stage.actNum1004case 11005stage.curYBoundary1 = 5121006tileLayer[1].scrollPos = -0x18000001007tileLayer[2].scrollPos = -0x18000001008tileLayer[1].parallaxFactor = 0x1001009tileLayer[2].parallaxFactor = 0x1001010break10111012case 21013stage.curYBoundary1 = 3841014tileLayer[3].scrollPos = -0x8000001015tileLayer[4].scrollPos = -0x8000001016tileLayer[3].parallaxFactor = 0x801017tileLayer[4].parallaxFactor = 0x801018break1019end switch10201021LoadPalette("ARZ_WaterPal.act", 1, 0, 0, 256)10221023CallFunction(ARZSetup_InitSuperSonicPal)1024CallFunction(ARZSetup_InitSuperTailsPal)1025CallFunction(ARZSetup_InitSuperKnuxPal)1026#platform: USE_ORIGINS1027CallFunction(ARZSetup_InitSuperAmyPal)1028#endplatform10291030LoadPalette("ElectricFlash.act", 2, 0, 0, 256)1031Water_flashTimer = 010321033if options.attractMode == true1034switch stage.playerListPos1035case PLAYER_SONIC_A1036#platform: USE_ORIGINS1037case PLAYER_AMY_A // Amy isn't even able to show up in demos, but check for her anyway I guess1038#endplatform1039Player_attractTable = ARZSetup_replay_attract_S1040Player_attractTableSize = 1541041Player_attractDuration = 17401042break10431044case PLAYER_TAILS_A1045Player_attractTable = ARZSetup_replay_attract_T1046Player_attractTableSize = 1381047Player_attractDuration = 18001048break10491050case PLAYER_KNUCKLES_A1051Player_attractTable = ARZSetup_replay_attract_K1052Player_attractTableSize = 1261053Player_attractDuration = 18001054break1055end switch10561057CallFunction(Player_SetupAttractDemo)1058end if1059end event106010611062// ========================1063// Editor Events1064// ========================10651066event RSDKDraw1067DrawSprite(0)1068end event106910701071event RSDKLoad1072LoadSpriteSheet("Global/Display.gif")1073SpriteFrame(-16, -16, 32, 32, 1, 143)10741075SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")1076end event107710781079