Path: blob/master/SonicMania/Objects/TMZ/SentryBug.h
338 views
#ifndef OBJ_SENTRYBUG_H1#define OBJ_SENTRYBUG_H23#include "Game.h"45// Object Class6struct ObjectSentryBug {7RSDK_OBJECT8TABLE(int32 orbOffsets_Attached[84], { -0x50000, 0x30000, -0x90000, 0xA0000, -0x70000, 0x100000, 0x70000, 0x30000, 0x30000, 0xA0000,9-0x30000, 0x100000, -0x70000, 0x30000, -0xB0000, 0xA0000, -0x80000, 0x100000, 0x90000, 0x30000,100x60000, 0xA0000, 0, 0x100000, -0x90000, 0x30000, -0xB0000, 0xA0000, -0x80000, 0x100000,110x90000, 0x30000, 0x80000, 0xA0000, 0x30000, 0x100000, -0x90000, 0x30000, -0xB0000, 0xA0000,12-0x80000, 0x100000, 0x90000, 0x30000, 0xB0000, 0xA0000, 0x80000, 0x100000, 0x90000, 0x30000,130xB0000, 0xA0000, 0x80000, 0x100000, -0x90000, 0x30000, -0x80000, 0xA0000, -0x30000, 0x100000,140x70000, 0x30000, 0xB0000, 0xA0000, 0x80000, 0x100000, -0x90000, 0x30000, -0x60000, 0xA0000,150, 0x100000, 0x50000, 0x30000, 0x90000, 0xA0000, 0x70000, 0x100000, -0x70000, 0x30000,16-0x30000, 0xA0000, 0x30000, 0x100000 });17TABLE(int32 dropVelR[12], { -0x10000, -0x10000, -0x20000, -0x8000, -0x10000, 0x8000, 0x10000, -0x10000, 0x20000, -0x8000, 0x10000, 0x8000 });18TABLE(int32 dropVelL[12], { 0x10000, -0x10000, 0x20000, -0x8000, 0x10000, 0x8000, -0x10000, -0x10000, -0x20000, -0x8000, -0x10000, 0x8000 });19Hitbox hitbox;20uint16 meshFrames;21uint16 sceneIndex;22uint16 aniFrames;23uint16 sfxPon;24uint16 sfxSwarm;25};2627// Entity Class28struct EntitySentryBug {29RSDK_ENTITY30StateMachine(state);31StateMachine(stateOrbs);32uint8 speed;33Vector2 amplitude;34bool32 orbsDetached;35bool32 showNet;36int32 timer;37Vector2 originPos;38Vector2 startPos;39EntityPlayer *playerPtr;40Vector2 netPos;41int32 netRotation;42int32 netScale;43int32 netColor;44Vector2 orbPositions[6];45Vector2 orbVelocities[6];46Animator unusedAnimator;47Matrix matUnused;48Matrix matTransform;49Matrix matWorld;50Animator bugAnimator;51Animator orbAnimator;52};5354// Object Struct55extern ObjectSentryBug *SentryBug;5657// Standard Entity Events58void SentryBug_Update(void);59void SentryBug_LateUpdate(void);60void SentryBug_StaticUpdate(void);61void SentryBug_Draw(void);62void SentryBug_Create(void *data);63void SentryBug_StageLoad(void);64#if GAME_INCLUDE_EDITOR65void SentryBug_EditorDraw(void);66void SentryBug_EditorLoad(void);67#endif68void SentryBug_Serialize(void);6970// Extra Entity Functions71void SentryBug_DebugSpawn(void);72void SentryBug_DebugDraw(void);7374void SentryBug_CheckPlayerCollisions(void);7576void SentryBug_SetupOrbDropVelocity(void);77void SentryBug_StateOrbs_Attached(void);78void SentryBug_StateOrbs_Dropped(void);79void SentryBug_StateOrbs_BeginNetRotation(void);80void SentryBug_StateOrbs_RotateAroundNet(void);81void SentryBug_StateOrbs_ReturnToSlots(void);8283void SentryBug_State_AwaitPlayer(void);84void SentryBug_State_DropOrbs(void);85void SentryBug_State_NetAppear(void);86void SentryBug_State_NetShrink(void);87void SentryBug_State_NetFlash(void);88void SentryBug_State_ReturnToSlots(void);8990#endif //! OBJ_SENTRYBUG_H919293