Path: blob/master/SonicMania/Objects/SPZ/LoveTester.h
338 views
#ifndef OBJ_LOVETESTER_H1#define OBJ_LOVETESTER_H23#include "Game.h"45typedef enum {6LOVETESTER_LIST_NONE,7LOVETESTER_LIST_SONIC,8LOVETESTER_LIST_TAILS,9LOVETESTER_LIST_KNUX,10LOVETESTER_LIST_EGGMAN,11LOVETESTER_LIST_AMY,12LOVETESTER_LIST_HEART,13LOVETESTER_LIST_HEARTBROKEN,14} LoveTesterDisplays;1516// Object Class17struct ObjectLoveTester {18RSDK_OBJECT19Hitbox hitboxEntry;20Hitbox hitboxL;21Hitbox hitboxR;22uint16 aniFrames;23uint16 sfxScore;24Vector2 tvOffsetTop;25Vector2 tvOffsetBottom;26Vector2 lightOffset[10];27};2829// Entity Class30struct EntityLoveTester {31RSDK_ENTITY32StateMachine(state);33StateMachine(stateLights);34uint8 activePlayers;35Vector2 startPos;36EntityPlayer *playerPtr;37bool32 matchingFinished;38bool32 isTVActiveTop;39uint8 tvDisplayTop;40uint8 tvFrameTop;41bool32 isTVActiveBottom;42uint8 tvDisplayBottom;43uint8 tvFrameBottom;44uint8 nextDisplayBottom;45int32 timer;46int32 lightsID;47Animator mainAnimator;48Animator lightAnimator[10];49};5051// Object Struct52extern ObjectLoveTester *LoveTester;5354// Standard Entity Events55void LoveTester_Update(void);56void LoveTester_LateUpdate(void);57void LoveTester_StaticUpdate(void);58void LoveTester_Draw(void);59void LoveTester_Create(void *data);60void LoveTester_StageLoad(void);61#if GAME_INCLUDE_EDITOR62void LoveTester_EditorDraw(void);63void LoveTester_EditorLoad(void);64#endif65void LoveTester_Serialize(void);6667// Extra Entity Functions68void LoveTester_SetupHitboxes(void);69void LoveTester_SetupLightOffsets(void);70void LoveTester_DrawSprites(void);71void LoveTester_DrawTVDisplay(uint8 displayList, uint8 frame, bool32 isTVActive);72void LoveTester_CheckPlayerCollisions_Solid(void);73void LoveTester_CheckPlayerCollisions_Entry(bool32 allowSidekick);74void LoveTester_GiveScore(EntityPlayer *player);75void LoveTester_CreateHeartParticles(void);7677void LoveTester_State_Init(void);78void LoveTester_State_WaitForActivated(void);79void LoveTester_State_SetupTopDisplay(void);80void LoveTester_State_SetupMatching(void);81void LoveTester_State_UnluckyMatch(void);82void LoveTester_State_GoodMatch(void);83void LoveTester_State_BadMatch(void);84void LoveTester_State_ReleasePlayers(void);8586void LoveTester_State_HeartParticles(void);8788void LoveTester_StateLights_FlashSlow(void);89void LoveTester_StateLights_FlashMed(void);90void LoveTester_StateLights_FlashFast(void);9192#endif //! OBJ_LOVETESTER_H939495