Path: blob/master/Sonic 1/Scripts/LZ/Wheel.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: Wheel Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.beltDir121314// ========================15// Function Declarations16// ========================1718reserve function Wheel_DebugDraw19reserve function Wheel_DebugSpawn202122// ========================23// Function Definitions24// ========================2526private function Wheel_DebugDraw27DrawSpriteFX(0, FX_FLIP, object.xpos, object.ypos)28end function293031private function Wheel_DebugSpawn32CreateTempObject(TypeName[Wheel], 0, object.xpos, object.ypos)33object[tempObjectPos].drawOrder = 434end function353637// ========================38// Events39// ========================4041event ObjectUpdate42if object.beltDir != LZSetup_beltDirection43object.direction ^= 144object.beltDir = LZSetup_beltDirection45temp2 = 146else47object.frame = oscillation48object.frame >>= 249object.frame &= 350if object.direction == 151object.frame ^= 352end if53end if54end event555657event ObjectDraw58DrawSprite(object.frame)59end event606162event ObjectStartup63LoadSpriteSheet("LZ/Objects.gif")64SpriteFrame(-16, -16, 32, 32, 223, 22)65SpriteFrame(-16, -16, 32, 32, 223, 55)66SpriteFrame(-16, -16, 32, 32, 223, 88)67SpriteFrame(-16, -16, 32, 32, 223, 121)6869foreach (TypeName[Wheel], arrayPos0, ALL_ENTITIES)70object[arrayPos0].drawOrder = 471next7273SetTableValue(TypeName[Wheel], DebugMode_ObjCount, DebugMode_TypesTable)74SetTableValue(Wheel_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)75SetTableValue(Wheel_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)76DebugMode_ObjCount++77end event787980// ========================81// Editor Events82// ========================8384event RSDKDraw85DrawSprite(0)86end event878889event RSDKLoad90LoadSpriteSheet("LZ/Objects.gif")91SpriteFrame(-16, -16, 32, 32, 223, 22)9293// 127 in the scene, doesn't seem to do anything though94SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")95end event969798