Path: blob/master/Sonic 1/Scripts/SBZ/VPlatform.txt
1480 views
// ----------------------------------1// RSDK Project: Sonic 12// Script Description: V Platform Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value1 : object.drawPos.y1213// Player Aliases14private alias object.ypos : player.ypos151617// ========================18// Function Declarations19// ========================2021reserve function VPlatform_DebugDraw22reserve function VPlatform_DebugSpawn232425// ========================26// Tables27// ========================2829private function VPlatform_DebugDraw30DrawSprite(0)31end function323334private function VPlatform_DebugSpawn35CreateTempObject(TypeName[V Platform], 0, object.xpos, object.ypos)36end function373839// ========================40// Events41// ========================4243event ObjectUpdate44GetTableValue(temp1, 14, StageSetup_oscillationTable)45temp1 <<= 846temp0 = object.ypos47temp0 -= temp148temp2 = object.drawPos.y49temp2 &= 0xFFFF000050temp1 = temp051temp1 &= 0xFFFF000052temp1 -= temp253temp2 = object.ypos5455object.ypos = object.drawPos.y56foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)57BoxCollisionTest(C_PLATFORM, object.entityPos, -32, -12, 32, 4, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)58if checkResult == true59player[currentPlayer].ypos += temp160end if61next6263object.ypos = temp264object.drawPos.y = temp065end event666768event ObjectDraw69DrawSpriteXY(0, object.xpos, object.drawPos.y)70end event717273event ObjectStartup74LoadSpriteSheet("SBZ/Objects.gif")75SpriteFrame(-32, -12, 64, 24, 318, 140)7677SetTableValue(TypeName[V Platform], DebugMode_ObjCount, DebugMode_TypesTable)78SetTableValue(VPlatform_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)79SetTableValue(VPlatform_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)80DebugMode_ObjCount++81end event828384// ========================85// Editor Events86// ========================8788event RSDKDraw89DrawSprite(0)90end event919293event RSDKLoad94LoadSpriteSheet("SBZ/Objects.gif")95SpriteFrame(-32, -12, 64, 24, 318, 140)9697SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")98end event99100101