Path: blob/master/SonicMania/Objects/MSZ/MSZSetup.h
338 views
#ifndef OBJ_MSZSETUP_H1#define OBJ_MSZSETUP_H23#include "Game.h"45typedef enum { MSZ_GENERICTRIGGER_ACHIEVEMENT } GenericTriggerTypesMSZ;67typedef enum {8MSZ_DECORATION_MAIN,9MSZ_DECORATION_TANKERRAIL,10MSZ_DECORATION_TANKERWHEEL,11MSZ_DECORATION_CARRIAGEWHEEL,12MSZ_DECORATION_CONNECTOR1,13MSZ_DECORATION_CONNECTOR2,14} DecorationTypesMSZ;1516typedef enum {17MSZ_PARALLAXSPRITE_CACTUS1,18MSZ_PARALLAXSPRITE_CACTUS2,19MSZ_PARALLAXSPRITE_CACTUS3,20MSZ_PARALLAXSPRITE_CACTUS4,21MSZ_PARALLAXSPRITE_CACTUS5,22MSZ_PARALLAXSPRITE_CACTUS6,23MSZ_PARALLAXSPRITE_CACTUS7,24MSZ_PARALLAXSPRITE_OOZPEEK,25} ParallaxSpriteAniIDsMSZ;2627// Object Class28struct ObjectMSZSetup {29RSDK_OBJECT30int32 fadeTimer;31uint16 aniTiles;32TileLayer *background1;33TABLE(int32 deformData[32], { -1, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });34STATIC(int32 bladeCactusFlowerAniTimer, 16);35STATIC(int32 bobbingCactusFlowerAniTimer, 30);36int32 bladeCactusFlowerAniFrame;37int32 bobbingCactusFlowerAniFrame;38int32 spinningCactusFlowerAniFrame;39bool32 usingRegularPalette;40TABLE(int32 bladeCactusFlowerAniSprPos[14], { 0, 1, 2, 3, 4, 5, 2, 3, 4, 5, 2, 1, 6, 7 });41TABLE(int32 bladeCactusFlowerAniDuration[14], { 16, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3 });42TABLE(int32 bobbingCactusFlowerAniDuration[8], { 16, 2, 4, 5, 16, 2, 4, 5 });43int32 storedParallax[512];44int32 parallaxMult;45int32 parallaxPos;46bool32 hasAchievement;47EntityMSZ2Cutscene *msz2Cutscene;48int32 starPostID;49#if MANIA_USE_PLUS50int32 chuggaVolume;51int32 chuggaChannel;52uint16 sfxLocoChugga;53#endif54};5556// Entity Class57struct EntityMSZSetup {58RSDK_ENTITY59StateMachine(state);60int32 timer;61};6263// Object Struct64extern ObjectMSZSetup *MSZSetup;6566// Standard Entity Events67void MSZSetup_Update(void);68void MSZSetup_LateUpdate(void);69void MSZSetup_StaticUpdate(void);70void MSZSetup_Draw(void);71void MSZSetup_Create(void *data);72void MSZSetup_StageLoad(void);73#if GAME_INCLUDE_EDITOR74void MSZSetup_EditorDraw(void);75void MSZSetup_EditorLoad(void);76#endif77void MSZSetup_Serialize(void);7879// Extra Entity Functions80void MSZSetup_SetBGScrollOrigin(int32 x, int32 y);81void MSZSetup_StoreBGParallax(void);82void MSZSetup_ReloadBGParallax(void);83void MSZSetup_ReloadBGParallax_Multiply(int32 parallaxMult);8485void MSZSetup_State_ManageFade_ST(void);86void MSZSetup_State_ManageFade_K(void);87#if MANIA_USE_PLUS88void MSZSetup_State_ManageFade_E(void);89#endif9091void MSZSetup_StageFinish_EndAct1ST(void);92void MSZSetup_StageFinish_EndAct1K(void);93#if MANIA_USE_PLUS94void MSZSetup_StageFinish_EndAct1E(void);95#endif9697void MSZSetup_StageFinish_EndAct2(void);98void MSZSetup_Trigger_AwardAchievement(void);99void MSZSetup_HandleRestart(void);100void MSZSetup_State_SwitchPalettes(void);101102#if MANIA_USE_PLUS103void MSZSetup_State_CheckFadeTrigger_E(void);104void MSZSetup_State_CheckTrainStart(void);105void MSZSetup_State_TrainStarting(void);106void MSZSetup_State_TrainSequence_MSZ1E(void);107void MSZSetup_State_Boss_MSZ1E(void);108void MSZSetup_State_AwaitActClearStart(void);109void MSZSetup_State_AwaitActClearFinish(void);110void MSZSetup_State_MoveToMSZ2Start(void);111void MSZSetup_State_AwaitPlayerStopped(void);112void MSZSetup_State_StoreMSZ1ScrollPos_E(void);113#endif114void MSZSetup_State_StoreMSZ1ScrollPos_ST(void);115116void MSZSetup_PlayerState_Pilot(void);117void MSZSetup_PlayerState_PostCrashJumpIn(void);118119#endif //! OBJ_MSZSETUP_H120121122