Path: blob/master/SonicMania/Objects/ERZ/ERZGunner.h
338 views
#ifndef OBJ_ERZGUNNER_H1#define OBJ_ERZGUNNER_H23#include "Game.h"45typedef enum {6ERZGUNNER_BOSS,7ERZGUNNER_LAUNCHROCKET,8ERZGUNNER_MORTAR,9ERZGUNNER_NAPALM,10ERZGUNNER_DUD,11ERZGUNNER_NAPALM_EXPLOSION,12ERZGUNNER_MORTAR_EXPLOSION,13} ERZGunnerTypes;1415// Object Class16struct ObjectERZGunner {17RSDK_OBJECT18// Technically a "Vector2" but since that can't be saved in static objects, it's an int32 array19TABLE(int32 rocketOffsets[32], { -22, -24, -10, -24, -22, -31, -10, -31, -22, -38, -10, -38, -22, -45, -10, -45,2010, -24, 22, -24, 10, -31, 22, -31, 10, -38, 22, -38, 10, -45, 22, -45 });21int32 launchedRocketID;22Hitbox hitboxNapalm;23Hitbox hitboxMortar;24Hitbox hitboxDud;25uint16 aniFrames;26};2728// Entity Class29struct EntityERZGunner {30RSDK_ENTITY31StateMachine(state);32StateMachine(stateDraw);33Vector2 originPos;34int32 type;35EntityERZGunner *parent;36int32 timer;37int32 invincibilityTimer;38int32 fireAnimTimer;39int32 rocketLaunchCount;40int32 rocketOffsetID;41int32 napalmExplosionPos;42Vector2 screenPos;43Animator mainAnimator;44Animator fxAnimator;45Animator tailAnimator;46Animator parachuteAnimator;47Animator unusedAnimator;48};4950// Object Struct51extern ObjectERZGunner *ERZGunner;5253// Standard Entity Events54void ERZGunner_Update(void);55void ERZGunner_LateUpdate(void);56void ERZGunner_StaticUpdate(void);57void ERZGunner_Draw(void);58void ERZGunner_Create(void *data);59void ERZGunner_StageLoad(void);60#if GAME_INCLUDE_EDITOR61void ERZGunner_EditorDraw(void);62void ERZGunner_EditorLoad(void);63#endif64void ERZGunner_Serialize(void);6566// Extra Entity Functions67void ERZGunner_HandleDudExhaust(void);68void ERZGunner_HandleMalfunctionDudExhaust(void);69void ERZGunner_SpawnDust(void);70void ERZGunner_HandleRotations(int32 angle);71void ERZGunner_CheckPlayerMissileCollisions(void);72void ERZGunner_CheckPlayerExplosionCollisions(void);73void ERZGunner_Hit(EntityERZGunner *entity);7475void ERZGunner_Draw_Gunner(void);76void ERZGunner_Draw_RocketLaunch(void);77void ERZGunner_Draw_Rocket(void);7879void ERZGunner_State_Idle(void);80void ERZGunner_State_LaunchRockets(void);8182void ERZGunner_State_LaunchedRocket(void);83void ERZGunner_State_Mortar(void);84void ERZGunner_State_Napalm(void);85void ERZGunner_State_Dud_Active(void);86void ERZGunner_State_Dud_HitByPlayer(void);87void ERZGunner_State_Dud_Malfunction(void);88void ERZGunner_State_Dud_Explode(void);8990void ERZGunner_State_NapalmExplosion(void);91void ERZGunner_State_MortarExplosion(void);9293#endif //! OBJ_ERZGUNNER_H949596