Path: blob/master/SonicMania/Objects/SSZ/HotaruHiWatt.h
338 views
#ifndef OBJ_HOTARUHIWATT_H1#define OBJ_HOTARUHIWATT_H23#include "Game.h"45typedef enum {6HHW_BOSS,7HHW_SINGLE_HOTARU,8HHW_PAIR_HOTARU,9HHW_UNUSED1,10HHW_SMALL_HOTARU,11HHW_FLASH,12HHW_UNUSED2,13HHW_MINILASER,14HHW_ELECTRICORB,15} HHWTypes;1617// Object Class18struct ObjectHotaruHiWatt {19RSDK_OBJECT20TABLE(int32 debrisInfo[33],21{ 8, 0, 0, -0x20000, -0x28000, 1, 0, 0x20000, -0x28000, 2, 0, -0x28000, -0x20000, 3, 0, 0x28000, -0x20000,224, 0, -0x28000, -0x18000, 5, 0, 0x28000, -0x18000, 6, 0, -0x20000, -0x10000, 7, 0, 0x20000, -0x10000 });23int32 boundsL;24int32 boundsM;25int32 boundsR;26int32 boundsT;27int32 boundsB;28int32 startY;29bool32 spawnedLaserStrike;30uint16 sfxHit;31uint16 sfxExplosion;32uint16 sfxHHWAppear;33uint16 sfxFlash;34uint16 sfxLaser;35uint16 sfxAppear;36uint16 sfxFly;37uint16 sfxFlyUp;38uint16 sfxCharge;39uint16 aniFrames;40uint16 hotaruFrames;41};4243// Entity Class44struct EntityHotaruHiWatt {45RSDK_ENTITY46StateMachine(state);47StateMachine(nextState);48StateMachine(stateDraw);49int32 type;50int32 timer;51int32 invincibilityTimer;52int32 health;53int32 formationCircleRadius;54int32 bulbAlpha;55int32 unused;56Vector2 originPos;57Vector2 targetPos;58Vector2 laserImpactPos;59EntityHotaruHiWatt *parents[3];60bool32 playingBossTrack;61Animator mainAnimator;62Animator headAnimator;63Animator bulbAnimator;64Animator bulbFlashAnimator;65Animator laserImpactAnimator;66Hitbox hitbox;67};6869// Object Struct70extern ObjectHotaruHiWatt *HotaruHiWatt;7172// Standard Entity Events73void HotaruHiWatt_Update(void);74void HotaruHiWatt_LateUpdate(void);75void HotaruHiWatt_StaticUpdate(void);76void HotaruHiWatt_Draw(void);77void HotaruHiWatt_Create(void *data);78void HotaruHiWatt_StageLoad(void);79#if GAME_INCLUDE_EDITOR80void HotaruHiWatt_EditorDraw(void);81void HotaruHiWatt_EditorLoad(void);82#endif83void HotaruHiWatt_Serialize(void);8485// Extra Entity Functions86bool32 HotaruHiWatt_SfxCheck_Zap(void);87bool32 HotaruHiWatt_SfxCheck_HHWLaser(void);88void HotaruHiWatt_SfxUpdate_HHWLaser(int32 sfx);8990void HotaruHiWatt_Hit(void);91void HotaruHiWatt_Explode(void);9293void HotaruHiWatt_CheckPlayerCollisions_Hotaru(void);94void HotaruHiWatt_CheckPlayerCollisions_Boss(void);95void HotaruHiWatt_CheckPlayerCollisions_MiniLaser(void);96void HotaruHiWatt_CheckPlayerCollisions_BossLaser(void);9798// Drawing99void HotaruHiWatt_Draw_Hotaru(void);100void HotaruHiWatt_Draw_HotaruAttacking(void);101void HotaruHiWatt_Draw_Boss(void);102void HotaruHiWatt_Draw_BossLaserCharging(void);103void HotaruHiWatt_Draw_BossLaser(void);104void HotaruHiWatt_Draw_FormingHHW(void);105void HotaruHiWatt_Draw_FlashAppear(void);106107// End of attack helpers108void HotaruHiWatt_SpawnPairHotarus(void);109void HotaruHiWatt_SetupHHWReappear(void);110111// HotaruHiWatt Appear112void HotaruHiWatt_StateBoss_SetupArena(void);113void HotaruHiWatt_StateBoss_AwaitPlayer(void);114void HotaruHiWatt_StateBoss_Appear(void);115void HotaruHiWatt_StateBoss_FlyUp(void);116117// Hotaru Misc118void HotaruHiWatt_StateHotaru_MoveToTarget(void);119120void HotaruHiWatt_StateBoss_FlashFadeOut(void);121122// Dimming/Undimming the screen123void HotaruHiWatt_StateBoss_HiddenDimScreen(void);124void HotaruHiWatt_StateBoss_HiddenUndimScreen(void);125126// Single Hotaru127void HotaruHiWatt_StateHotaru_DimScreen(void);128void HotaruHiWatt_StateHotaru_Charging(void);129void HotaruHiWatt_StateHotaru_Attacking(void);130void HotaruHiWatt_StateHotaru_FinishedAttack(void);131void HotaruHiWatt_StateHotaru_EndAttackSequence(void);132133// Single Hotaru (Laser)134void HotaruHiWatt_State_MiniLaser(void);135void HotaruHiWatt_State_MiniLaserStrike(void);136137// Pair Hotarus138void HotaruHiWatt_StateHotaruPair_DimScreen(void);139void HotaruHiWatt_StateHotaruPair_PrepareAttack(void);140void HotaruHiWatt_StateHotaruPair_Charging(void);141void HotaruHiWatt_StateHotaruPair_AttackDelay(void);142void HotaruHiWatt_StateHotaruPair_AttackMovingDown(void);143void HotaruHiWatt_StateHotaruPair_AttackMovingUp(void);144145// Sparky Orb146void HotaruHiWatt_State_SparkyOrb(void);147void HotaruHiWatt_State_SparkyOrb_FadeOut(void);148149// HotaruHiWatt150void HotaruHiWatt_StateBoss_DimScreen(void);151void HotaruHiWatt_StateBoss_CreateSmallHHWs(void);152void HotaruHiWatt_StateBoss_FormingHHW(void);153void HotaruHiWatt_StateBoss_FlashAppear(void);154void HotaruHiWatt_StateBoss_LaserAttackDelay(void);155void HotaruHiWatt_StateBoss_ChargingLaser(void);156void HotaruHiWatt_StateBoss_LaserAttack_Right(void);157void HotaruHiWatt_StateBoss_LaserAttack_Left(void);158void HotaruHiWatt_StateBoss_FinishedLaserAttack(void);159void HotaruHiWatt_StateBoss_Destroyed(void);160void HotaruHiWatt_StateBoss_Finished(void);161162#endif //! OBJ_HOTARUHIWATT_H163164165