Path: blob/master/SonicMania/Objects/MMZ/Gachapandora.h
338 views
#ifndef OBJ_GACHAPANDORA_H1#define OBJ_GACHAPANDORA_H23#include "Game.h"45#define GACHAPANDORA_CAPSULE_COUNT (4)67typedef enum {8GACHAPANDORA_MAIN,9GACHAPANDORA_EGGMAN,10GACHAPANDORA_PRIZE,11GACHAPANDORA_AMY,12GACHAPANDORA_DRILLER,13GACHAPANDORA_FIREDROPPER,14GACHAPANDORA_FIREBALL,15GACHAPANDORA_DEBRIS,16GACHAPANDORA_SPARK,17} GachapandoraTypes;1819// Object Class20struct ObjectGachapandora {21RSDK_OBJECT22TABLE(int32 capsuleOffsets[56],23{ 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 49, 50, 50, 50, 51, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53,2454, 54, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 52, 52, 52, 52, 51, 51, 51, 50, 50, 50, 50, 49, 49, 48, 48 });25uint8 destroyedToys;26uint8 handleDir;27uint8 eggmanDir;28uint8 capsuleOffsetL[4];29uint8 capsuleSpeedL[4];30uint8 capsuleMaxL[4];31uint8 capsuleTypeL[4];32uint8 capsuleDelayL[4];33uint8 capsuleOffsetR[4];34uint8 capsuleSpeedR[4];35uint8 capsuleMaxR[4];36uint8 capsuleTypeR[4];37uint8 capsuleDelayR[4];38int16 handleSpinTimer;39uint8 nextPrizeType;40int8 nextCapsuleL;41int8 nextCapsuleR;42int8 lastCapsuleType;43uint8 capsuleCount[3];44uint8 capsuleSide;45uint8 debrisTimer;46uint8 sideSparkTimer[2];47int32 unused1;48int32 unused2;49uint8 activeToys;50uint8 awardAchievement;51EntityGachapandora *eggman;52uint16 aniFrames;53uint16 eggmanFrames;54Hitbox hitboxHandle;55Hitbox hitboxAmyRange;56Hitbox hitboxAmy;57Hitbox hitboxFireball;58Hitbox hitboxDrill;59Hitbox hitboxSpark;60uint16 sfxHit;61uint16 sfxExplosion;62uint16 sfxUnravel;63uint16 sfxPon;64uint16 sfxFireball;65uint16 sfxGiggle;66};6768// Entity Class69struct EntityGachapandora {70RSDK_ENTITY71StateMachine(state);72StateMachine(stateDraw);73int32 unused;74uint8 type;75uint16 shakeTimer;76uint16 shakeCount;77uint16 prevShakeFlags;78int32 timer;79int32 startY;80int32 invincibilityTimer;81uint8 health;82Vector2 originPos;83EntityGachapandora *parent;84Animator mainAnimator;85Animator eggmanAnimator;86Animator handleAnimator;87Animator capsuleAnimator;88Hitbox hitbox;89};9091// Object Struct92extern ObjectGachapandora *Gachapandora;9394// Standard Entity Events95void Gachapandora_Update(void);96void Gachapandora_LateUpdate(void);97void Gachapandora_StaticUpdate(void);98void Gachapandora_Draw(void);99void Gachapandora_Create(void *data);100void Gachapandora_StageLoad(void);101#if GAME_INCLUDE_EDITOR102void Gachapandora_EditorDraw(void);103void Gachapandora_EditorLoad(void);104#endif105void Gachapandora_Serialize(void);106107// Extra Entity Functions108void Gachapandora_CheckPlayerCollisions_Prize(void);109void Gachapandora_Explode(int32 xMin, int32 xMax, int32 yMin, int32 yMax);110111void Gachapandora_Player_StateInput_P1Grabbed(void);112void Gachapandora_Player_StateInput_P2PlayerGrabbed(void);113void Gachapandora_Player_StateInput_P2AIGrabbed(void);114115void Gachapandora_HandleSparksAndDebris(void);116void Gachapandora_HandleAnimations(void);117118void Gachapandora_StateBoss_SetupArena(void);119void Gachapandora_StateBoss_AwaitPlayer(void);120void Gachapandora_StateBoss_EnterEggman(void);121void Gachapandora_StateBoss_FloatAround(void);122void Gachapandora_StateBoss_HandleSpun(void);123void Gachapandora_StateBoss_Explode(void);124void Gachapandora_StateBoss_PanicFlee(void);125void Gachapandora_StateBoss_EnsureAllCapsulesDestroyed(void);126void Gachapandora_StateBoss_LastDitchAttack(void);127void Gachapandora_StateBoss_Defeated(void);128void Gachapandora_StateBoss_EggmanFallOut(void);129void Gachapandora_StateBoss_Finish(void);130void Gachapandora_Draw_Boss(void);131void Gachapandora_Draw_BossDestroyed(void);132133void Gachapandora_StatePrize_CapsuleFall(void);134void Gachapandora_StatePrize_ExitCapsule(void);135void Gachapandora_StatePrize_Destroyed(void);136void Gachapandora_StatePrize_DrillerCapsuleExitBounce(void);137void Gachapandora_StatePrize_DrillerMove(void);138void Gachapandora_StatePrize_FireDropperMove(void);139void Gachapandora_StatePrize_AmyIdle(void);140void Gachapandora_StatePrize_AmyWalk(void);141void Gachapandora_StatePrize_AmyJump(void);142void Gachapandora_StatePrize_AmyRebound(void);143void Gachapandora_StatePrize_AmyGrabbed(void);144void Gachapandora_Draw_Prize(void);145146void Gachapandora_StateFireball_Falling(void);147void Gachapandora_StateFireball_BurnGround(void);148149void Gachapandora_Draw_Simple(void);150151void Gachapandora_StateDebris_Delay(void);152void Gachapandora_StateDebris_Falling(void);153void Gachapandora_StateDebris_BossDebris(void);154void Gachapandora_Draw_BossDebris(void);155156void Gachapandora_StateSpark_Attached(void);157void Gachapandora_StateSpark_Detached(void);158159void Gachapandora_StateEggman_Falling(void);160void Gachapandora_StateEggman_Escape(void);161void Gachapandora_StateEggman_RunAway(void);162163#endif //! OBJ_GACHAPANDORA_H164165166