Path: blob/master/SonicMania/Objects/Common/CollapsingPlatform.h
338 views
#ifndef OBJ_COLLAPSINGPLATFORM_H1#define OBJ_COLLAPSINGPLATFORM_H23#include "Game.h"45typedef enum {6COLLAPSEPLAT_LEFT,7COLLAPSEPLAT_RIGHT,8COLLAPSEPLAT_CENTER,9COLLAPSEPLAT_LR,10COLLAPSEPLAT_LRC,11} CollapsingPlatformTypes;1213typedef enum {14COLLAPSEPLAT_TARGET_LOW,15COLLAPSEPLAT_TARGET_HIGH,16} CollapsingPlatformTargetLayers;1718// Object Class19struct ObjectCollapsingPlatform {20RSDK_OBJECT21uint8 shift;22Animator animator;23uint16 aniFrames;24uint16 sfxCrumble;25};2627// Entity Class28struct EntityCollapsingPlatform {29RSDK_ENTITY30StateMachine(state);31Vector2 size;32bool32 respawn;33uint16 targetLayer;34uint8 type;35int32 delay;36bool32 eventOnly;37bool32 mightyOnly;38int32 unused1;39int32 collapseDelay;40uint16 storedTiles[256];41Hitbox hitboxTrigger;42Vector2 stoodPos;43};4445// Object Struct46extern ObjectCollapsingPlatform *CollapsingPlatform;4748// Standard Entity Events49void CollapsingPlatform_Update(void);50void CollapsingPlatform_LateUpdate(void);51void CollapsingPlatform_StaticUpdate(void);52void CollapsingPlatform_Draw(void);53void CollapsingPlatform_Create(void *data);54void CollapsingPlatform_StageLoad(void);55#if GAME_INCLUDE_EDITOR56void CollapsingPlatform_EditorDraw(void);57void CollapsingPlatform_EditorLoad(void);58#endif59void CollapsingPlatform_Serialize(void);6061// Extra Entity Functions62void CollapsingPlatform_State_Left(void);63void CollapsingPlatform_State_Right(void);64void CollapsingPlatform_State_Center(void);65void CollapsingPlatform_State_LeftRight(void);66void CollapsingPlatform_State_LeftRightCenter(void);6768#endif //! OBJ_COLLAPSINGPLATFORM_H697071