Path: blob/main/Scripts/R8/R81DSetup.txt
1319 views
//---------------Sonic CD R8 1 D Setup Script-----------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.PaletteTimer6#alias Object.Value1 : Object.CurrentPalette7#alias Object.Value2 : Object.VGearFrame8#alias Object.Value3 : Object.HCylinderFrame9#alias Object.Value4 : Object.VCylinderFrame10#alias Object.Value5 : Object.LightsFrame1112// Priority13#alias 1 : PRIORITY_ACTIVE141516sub ObjectMain17Object.Rotation++18Object.Rotation %= 1441920TempValue0 = Object.VGearFrame21TempValue0 %= 722if TempValue0 == 023TempValue0 = Object.VGearFrame24TempValue0 /= 725TempValue0 <<= 126TempValue0 += 60027Copy16x16Tile(444, TempValue0)28TempValue0++29Copy16x16Tile(445, TempValue0)30end if31Object.VGearFrame++32Object.VGearFrame %= 283334TempValue0 = Object.HCylinderFrame35TempValue0 &= 336if TempValue0 == 037TempValue0 = Object.HCylinderFrame38TempValue0 >>= 239TempValue0 <<= 140TempValue0 += 60841Copy16x16Tile(446, TempValue0)42TempValue0++43Copy16x16Tile(447, TempValue0)44end if45Object.HCylinderFrame++46Object.HCylinderFrame &= 154748TempValue0 = Object.VCylinderFrame49TempValue0 %= 550if TempValue0 == 051TempValue0 = Object.VCylinderFrame52TempValue0 /= 553TempValue0 <<= 254TempValue0 += 61655Copy16x16Tile(448, TempValue0)56TempValue0++57Copy16x16Tile(449, TempValue0)58TempValue0++59Copy16x16Tile(450, TempValue0)60TempValue0++61Copy16x16Tile(451, TempValue0)62end if63Object.VCylinderFrame++64Object.VCylinderFrame %= 206566TempValue0 = Object.LightsFrame67TempValue0 &= 768if TempValue0 == 069TempValue0 = Object.LightsFrame70TempValue0 >>= 371TempValue0 += 63272Copy16x16Tile(452, TempValue0)73end if74Object.LightsFrame++75Object.LightsFrame %= 567677Object.PaletteTimer++78if Object.PaletteTimer == 579Object.PaletteTimer = 080if Object.CurrentPalette > 281Object.CurrentPalette = 182else83Object.CurrentPalette++84end if85Object.CurrentPalette %= 386if Object.CurrentPalette == 087switch Object.AnimationTimer88case 389Object.CurrentPalette += 390break91case 492Object.CurrentPalette += 493break94case 595Object.CurrentPalette += 596break97end switch98Object.AnimationTimer++99Object.AnimationTimer %= 6100end if101end if102SetActivePalette(Object.CurrentPalette, 0, Screen.YSize)103end sub104105106sub ObjectStartup107Object[19].Type = TypeName[R8 Setup]108Object[19].Priority = PRIORITY_ACTIVE109110CopyPalette(0, 1)111CopyPalette(0, 2)112CopyPalette(0, 3)113CopyPalette(0, 4)114CopyPalette(0, 5)115116TempValue0 = 0117TempValue1 = 0118TempValue2 = 32119while TempValue0 < 6120LoadPalette("R81D_PalCycle.act", TempValue0, 160, TempValue1, TempValue2)121TempValue0++122TempValue1 += 32123TempValue2 += 32124loop125end sub126127128// ========================129// Editor Subs130// ========================131132sub RSDKDraw133DrawSprite(0)134end sub135136137sub RSDKLoad138LoadSpriteSheet("Global/Display.gif")139SpriteFrame(-16, -16, 32, 32, 1, 143) // #0 - "Script" Icon140141SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")142end sub143144145