NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_a_boss_demo.hpp
1#pragma once
2
3#include <game/bases/d_actor_state.hpp>
4#include <game/bases/d_enemy_boss.hpp>
5#include <game/sLib/s_GlobalData.hpp>
6
7/// @brief Base class for boss battle cutscene managers.
8/// @statetable
9/// @ingroup bases
11public:
12 struct GlobalData_t {
13 bool mForceOtehonClear;
14 };
15
16 daBossDemo_c() : dActorState_c() {} ///< @copydoc dActorState_c::dActorState_c
17 ~daBossDemo_c() {} ///< @copydoc dActorState_c::~dActorState_c
18
19 virtual int create() override;
20 virtual int doDelete() override;
21 virtual int execute() override;
22 virtual int draw() override;
23 virtual void deleteReady() override;
24
25 STATE_VIRTUAL_FUNC_DECLARE(daBossDemo_c, Ready); ///< Ready for the boss battle cutscene to start.
26 STATE_VIRTUAL_FUNC_DECLARE(daBossDemo_c, BattleStDemo); ///< In the boss battle starting cutscene.
27 STATE_VIRTUAL_FUNC_DECLARE(daBossDemo_c, BattleIn); ///< In the boss battle.
28 STATE_VIRTUAL_FUNC_DECLARE(daBossDemo_c, BattleEdDemo); ///< In the boss battle ending cutscene.
29
30 /// @brief Returns to the world map and clears the course after finishing it with Super Guide.
31 virtual bool abandonRetryAfterOtehonClear();
32
33 /// @brief Returns to the world map without clearing the course after finishing it with Super Guide.
34 virtual void retryAfterOtehonClear();
35
36 virtual void startBGM() {} ///< Starts the boss battle background music.
37 virtual void stopBGM() {} ///< Stops the boss battle background music.
38
39 virtual fBaseID_e getBossID() { return mBossID; }
40 virtual void setBossID(fBaseID_e bossID) { mBossID = bossID; }
41
42 virtual BOOL checkBattleStDemo() { return false; } ///< Returns whether the boss battle start cutscene is ready to play.
43 virtual BOOL checkBattleEdDemo() { return mBattleEnd; } ///< Returns whether the boss battle end cutscene is ready to play.
44 virtual bool demoScroll() { return true; } ///< Returns whether the camera has finished scrolling to the boss.
45 virtual dEnBoss_c *bossSearch() { return nullptr; } ///< Returns the corresponding boss actor.
46 virtual void initialize() {} ///< Subclass-specific initialization code.
47
48 void setBattleResult(); ///< Saves the star coins collected and the remaining lives of each player.
49 void setMultiCourseClear(); ///< Marks the course as cleared.
50 bool checkStartRetry(bool b); ///< Returns whether to show the "Want to try without Super Guide?" prompt.
51
52 bool isOtehonClear(); ///< Returns whether this course was only cleared by the Super Guide. @unofficial
53
54 u32 m_3d0;
55 BOOL mBattleEnd; ///< Whether the boss battle has ended.
56 fBaseID_e mBossID; ///< The ID of the boss actor.
57};
dActorState_c()
Constructs a new actor.
The base class for boss enemies.
void setBattleResult()
Saves the star coins collected and the remaining lives of each player.
bool isOtehonClear()
Returns whether this course was only cleared by the Super Guide.
BOOL mBattleEnd
Whether the boss battle has ended.
virtual BOOL checkBattleStDemo()
Returns whether the boss battle start cutscene is ready to play.
virtual BOOL checkBattleEdDemo()
Returns whether the boss battle end cutscene is ready to play.
virtual int draw() override
do method for the draw operation.
virtual int create() override
do method for the create operation.
virtual int doDelete() override
do method for the delete operation.
virtual void initialize()
Subclass-specific initialization code.
virtual dEnBoss_c * bossSearch()
Returns the corresponding boss actor.
virtual void startBGM()
Starts the boss battle background music.
daBossDemo_c()
Constructs a new actor.
virtual bool demoScroll()
Returns whether the camera has finished scrolling to the boss.
virtual void deleteReady() override
Informs the base that it's about to be deleted.
virtual void retryAfterOtehonClear()
Returns to the world map without clearing the course after finishing it with Super Guide.
virtual int execute() override
do method for the execute operation.
virtual void stopBGM()
Stops the boss battle background music.
fBaseID_e mBossID
The ID of the boss actor.
bool checkStartRetry(bool b)
Returns whether to show the "Want to try without Super Guide?" prompt.
virtual bool abandonRetryAfterOtehonClear()
Returns to the world map and clears the course after finishing it with Super Guide.
void setMultiCourseClear()
Marks the course as cleared.
~daBossDemo_c()
Destroys the actor.
fBaseID_e
A unique identifier for each base.
Definition f_base_id.hpp:6
#define STATE_VIRTUAL_FUNC_DECLARE(class, name)
Declares a virtual state.
Definition s_State.hpp:22