Path: blob/main/Scripts/R4/BossBubble1.txt
1319 views
//----------------Sonic CD Boss Bubble 1 Script---------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//34// Aliases5#alias Object.Value0 : Object.Timer6#alias Object.Value1 : Object.Oscillation7#alias Object.Value2 : Object.XOffSet8#alias Object.Value3 : Object.YOffSet9#alias Object.Value4 : Object.XShift10#alias Object.Value5 : Object.BossEntity11#alias Object.Value6 : Object.RadiusSize12#alias Object.Value7 : Object.Rotation1314// States15#alias 0 : BOSSBUBBLE1_SETUP16#alias 1 : BOSSBUBBLE1_FLOAT1718// R4 Eggman States19#alias 4 : R4_EGG_BUBBLE_EXPAND_SHIELD202122sub ObjectMain23if Object.State == BOSSBUBBLE1_SETUP24if Object.Frame < 425Object.Timer++26if Object.Timer > 927if Object.Frame < 328Object.Timer = 029end if30Object.Frame++31end if32end if3334Object.YPos -= 0x180003536Sin(Object.XPos, Object.Oscillation)37Object.XPos <<= Object.XShift38Object.XPos += Object.XOffSet3940Object.Oscillation += 441Object.Oscillation &= 5114243if Object.RadiusSize != 044ArrayPos0 = Object.BossEntity4546TempValue0 = Object[ArrayPos0].YPos47TempValue0 += Object.RadiusSize4849if Object.YPos < TempValue050TempValue0 = Object.XPos51TempValue0 -= Object[ArrayPos0].XPos52if TempValue0 < 053FlipSign(TempValue0)54end if55TempValue0 >>= 1956switch TempValue057case 058Object.Rotation = 459break6061case 162Object.Rotation = 563break6465case 266Object.Rotation = 667break6869case 370Object.Rotation = 771break7273case 474case 575case 676Object.Rotation = 877break7879end switch8081Object.State = BOSSBUBBLE1_FLOAT8283Object.Oscillation = 08485Object.XOffSet = Object.XPos86Object.YOffSet = Object.YPos87end if8889end if9091if Object.OutOfBounds == true92Object.Type = TypeName[Blank Object]93end if94else95ArrayPos0 = Object.BossEntity9697TempValue0 = Object.XOffSet98TempValue0 -= Object[ArrayPos0].XPos99if TempValue0 < -0x1A0000100TempValue0 += 0x10000101Object.XOffSet += 0x10000102end if103if TempValue0 > 0x1A0000104TempValue0 -= 0x10000105Object.XOffSet -= 0x10000106end if107TempValue0 >>= 8108109TempValue1 = Object.YOffSet110TempValue1 -= Object[ArrayPos0].YPos111if TempValue1 < -0x1A0000112TempValue1 += 0x10000113Object.YOffSet += 0x10000114end if115if TempValue1 > 0x1A0000116TempValue1 -= 0x10000117Object.YOffSet -= 0x10000118end if119TempValue1 >>= 8120121Sin(TempValue2, Object.Oscillation)122TempValue2 *= TempValue1123124Cos(TempValue3, Object.Oscillation)125TempValue3 *= TempValue0126127Object.XPos = TempValue2128Object.XPos += TempValue3129Object.XPos >>= 1130Object.XPos += Object[ArrayPos0].XPos131132Cos(TempValue2, Object.Oscillation)133TempValue2 *= TempValue1134135Sin(TempValue3, Object.Oscillation)136TempValue3 *= TempValue0137138Object.YPos = TempValue2139Object.YPos -= TempValue3140Object.YPos >>= 1141Object.YPos += Object[ArrayPos0].YPos142143Object.Oscillation += Object.Rotation144Object.Oscillation &= 511145146if Object[ArrayPos0].State == R4_EGG_BUBBLE_EXPAND_SHIELD147Object.Type = TypeName[Blank Object]148end if149end if150end sub151152153sub ObjectDraw154DrawSprite(Object.Frame)155end sub156157158sub ObjectStartup159LoadSpriteSheet("R4/Objects.gif")160161SpriteFrame(-4, -4, 8, 8, 212, 61) // #0 - Small Bubble 1162SpriteFrame(-4, -4, 8, 8, 212, 70) // #1 - Small Bubble 2163SpriteFrame(-4, -4, 8, 8, 246, 18) // #2 - Small Bubble 3164165SpriteFrame(-8, -8, 16, 16, 116, 181) // #3 - Medium Bubble 1166SpriteFrame(-8, -8, 16, 16, 116, 198) // #4 - Medium Bubble 2167end sub168169170// ========================171// Editor Subs172// ========================173174sub RSDKDraw175DrawSprite(0)176end sub177178179sub RSDKLoad180LoadSpriteSheet("R4/Objects.gif")181182SpriteFrame(-4, -4, 8, 8, 212, 61) // #0 - Small Bubble 1183184SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")185end sub186187188