Path: blob/master/SonicMania/Objects/OOZ/Hatch.h
338 views
#ifndef OBJ_HATCH_H1#define OBJ_HATCH_H23#include "Game.h"45typedef enum {6HATCH_GO_SUBENTRYHATCH,7HATCH_GO_SUBEXITHATCH_COPYTILES,8HATCH_GO_SUBENTRYHATCH_SMOGONLY,9HATCH_GO_SUBEXIT,10HATCH_GO_SUBEXITHATCH_NOCOPY,11} HatchGoTypes;1213// Object Class14struct ObjectHatch {15RSDK_OBJECT16Hitbox hitboxSubExit;17Hitbox hitboxRange;18Hitbox hitboxL;19Hitbox hitboxR;20Hitbox hitboxEntry;21uint16 aniFrames;22uint16 sfxHatchOpen;23uint16 sfxHatchClose;24uint16 sfxDescend;25uint16 sfxSurface;26uint16 sfxGasPop;27};2829// Entity Class30struct EntityHatch {31RSDK_ENTITY32StateMachine(state);33uint8 go;34Vector2 subOff1;35Vector2 subOff2;36int32 depth;37int32 dest;38Vector2 startPos;39int32 hScrollPos;40int32 vScrollPos;41int32 timer;42bool32 useMoveLayer;43EntityPlayer *playerPtr;44StateMachine(stateStore);45bool32 interactionStore;46bool32 tileColStore;47Animator baseAnimator;48Animator hatchAnimator;49Hitbox hitbox;50Hitbox hitboxWarpDoor;51};5253// Object Struct54extern ObjectHatch *Hatch;5556// Standard Entity Events57void Hatch_Update(void);58void Hatch_LateUpdate(void);59void Hatch_StaticUpdate(void);60void Hatch_Draw(void);61void Hatch_Create(void *data);62void Hatch_StageLoad(void);63#if GAME_INCLUDE_EDITOR64void Hatch_EditorDraw(void);65void Hatch_EditorLoad(void);66#endif67void Hatch_Serialize(void);6869// Extra Entity Functions70void Hatch_State_SubEntryHatch(void);71void Hatch_State_PlayerEntered(void);72void Hatch_State_Descend(void);73void Hatch_State_MoveToDestPos(void);74void Hatch_State_Surfacing(void);75void Hatch_State_OpenHatchReleasePlayer(void);76void Hatch_State_CloseHatch(void);77void Hatch_State_FadeIn(void);78void Hatch_State_SubExit(void);79void Hatch_State_FadeOut(void);80void Hatch_State_SubExitHatch(void);8182#endif //! OBJ_HATCH_H838485