Path: blob/main/Scripts/R5/ForegroundPiece.txt
1319 views
//--------------Sonic CD Foreground Piece Script--------------//1//--------Scripted by Christian Whitehead 'The Taxman'--------//2//-------Unpacked By Rubberduckycooly's Script Unpacker-------//345sub ObjectDraw67// Nothing complex needs to happen here, just draw the sprite with the sprite ID specified8DrawSprite(Object.PropertyValue)910end sub111213sub ObjectStartup14LoadSpriteSheet("R5/Objects3.gif")1516// Foreground Piece Frames, they're all mostly just tiny sprites17SpriteFrame(-26, -4, 52, 8, 165, 1)18SpriteFrame(-4, -26, 8, 52, 218, 1)19SpriteFrame(-16, -4, 32, 8, 165, 10)20SpriteFrame(-8, -4, 16, 8, 165, 10)21SpriteFrame(-4, -16, 8, 32, 227, 1)22SpriteFrame(-4, -8, 8, 16, 227, 1)23SpriteFrame(-20, -4, 40, 8, 165, 19)24SpriteFrame(-20, -4, 40, 8, 165, 28)25SpriteFrame(-4, -20, 8, 40, 236, 1)26SpriteFrame(-4, -20, 8, 40, 245, 1)27SpriteFrame(-20, -4, 40, 8, 165, 37)28SpriteFrame(-20, -4, 40, 8, 165, 46)29SpriteFrame(-4, -20, 8, 40, 236, 42)30SpriteFrame(-4, -20, 8, 40, 245, 42)3132// Cycle through all Foreground Piece Objects in the level33ArrayPos0 = 3234while ArrayPos0 < 105635if Object[ArrayPos0].Type == TypeName[Foreground Piece]3637// Give them all a Draw Order of 4 in order to, well, truly make them *Foreground* Pieces38Object[ArrayPos0].DrawOrder = 43940end if4142ArrayPos0++43loop4445end sub464748// ========================49// Editor Subs50// ========================5152sub RSDKDraw53DrawSprite(Object.PropertyValue)54end sub555657sub RSDKLoad58LoadSpriteSheet("R5/Objects3.gif")59SpriteFrame(-26, -4, 52, 8, 165, 1)60SpriteFrame(-4, -26, 8, 52, 218, 1)61SpriteFrame(-16, -4, 32, 8, 165, 10)62SpriteFrame(-8, -4, 16, 8, 165, 10)63SpriteFrame(-4, -16, 8, 32, 227, 1)64SpriteFrame(-4, -8, 8, 16, 227, 1)65SpriteFrame(-20, -4, 40, 8, 165, 19)66SpriteFrame(-20, -4, 40, 8, 165, 28)67SpriteFrame(-4, -20, 8, 40, 236, 1)68SpriteFrame(-4, -20, 8, 40, 245, 1)69SpriteFrame(-20, -4, 40, 8, 165, 37)70SpriteFrame(-20, -4, 40, 8, 165, 46)71SpriteFrame(-4, -20, 8, 40, 236, 42)72SpriteFrame(-4, -20, 8, 40, 245, 42)7374SetVariableAlias(ALIAS_VAR_PROPVAL, "spriteID")75end sub767778