Path: blob/master/Sonic 2/Scripts/HPZ/BridgeEnd.txt
1479 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Bridge End Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Function Declarations9// ========================1011reserve function BridgeEnd_DebugDraw12reserve function BridgeEnd_DebugSpawn131415// ========================16// Function Definitions17// ========================1819private function BridgeEnd_DebugDraw20// this object has the same sprite regardless of its direction...21// (leftover from EHZ's Bridge End, which itself is based off of GHZ's Bridge End)22temp0 = object.direction23temp0 &= FLIP_X24DrawSprite(temp0)25end function262728private function BridgeEnd_DebugSpawn29CreateTempObject(TypeName[Bridge End], 0, object.xpos, object.ypos)30object[tempObjectPos].drawOrder = 43132// this object's propertyValue doesn't mean anything anyway...33// (leftover from EHZ's Bridge End, which itself is based off of GHZ's Bridge End)34object[tempObjectPos].propertyValue = object.direction35object[tempObjectPos].propertyValue &= FLIP_X36end function373839// ========================40// Events41// ========================4243event ObjectUpdate44object.frame = object.animationTimer45object.frame /= 946object.animationTimer++47object.animationTimer %= 5448end event495051event ObjectDraw52DrawSprite(object.frame)53end event545556event ObjectStartup57LoadSpriteSheet("HPZ/Objects.gif")58SpriteFrame(-4, -12, 8, 24, 214, 206)59SpriteFrame(-4, -12, 8, 24, 214, 206)60SpriteFrame(-4, -12, 8, 24, 205, 206)61SpriteFrame(-4, -12, 8, 24, 196, 206)62SpriteFrame(-4, -12, 8, 24, 196, 206)63SpriteFrame(-4, -12, 8, 24, 205, 206)6465arrayPos0 = 3266while arrayPos0 < 0x42067if object[arrayPos0].type == TypeName[Bridge End]68object[arrayPos0].drawOrder = 469end if7071arrayPos0++72loop7374SetTableValue(TypeName[Bridge End], DebugMode_ObjCount, DebugMode_TypesTable)75SetTableValue(BridgeEnd_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)76SetTableValue(BridgeEnd_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)77DebugMode_ObjCount++78end event798081// ========================82// Editor Events83// ========================8485event RSDKDraw86DrawSprite(0)87end event888990event RSDKLoad91LoadSpriteSheet("HPZ/Objects.gif")92SpriteFrame(-4, -12, 8, 24, 205, 206)9394SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")95end event969798