NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_a_wm_peach_castle.hpp
1#pragma once
2#include <game/bases/d_heap_allocator.hpp>
3#include <game/mLib/m_3d/anm_chr.hpp>
4#include <game/mLib/m_3d/anm_chr_blend.hpp>
5#include <game/mLib/m_3d/mdl.hpp>
6#include <game/bases/d_wm_obj_actor.hpp>
7
8/**
9* @brief The actor for Peach's Castle found on the World Map.
10* @ingroup bases
11* @paramtable
12*/
14public:
15 /// @brief The available animations for this actor.
16 enum ANIM_e {
17 cobPeachCastleFlag, ///< The flag animation.
18 cobPeachCastleOpen, ///< The door open animation.
19 cobPeachCastleClose, ///< The door close animation.
20 ANIM_COUNT
21 };
22
23 daWmPeachCastle_c(); ///< @copydoc dWmObjActor_c::dWmObjActor_c
24 ~daWmPeachCastle_c(); ///< @copydoc dWmObjActor_c::~dWmObjActor_c
25
26 virtual int create();
27 virtual int execute();
28 virtual int draw();
29 virtual int doDelete();
30
31 virtual void processCutsceneCommand(int cutsceneCommandId, bool isFirstFrame);
32
33 void initState(); ///< Sets up the actor's initial state.
34 void initUnk(); ///< Initializes #mUnk2B8.
35
36 void createModel(); ///< Initializes the resources for the actor.
37 void calcModel(); ///< Updates the model's transformation matrix.
38
39 void initFlagAnim(); ///< Initializes the flag animation.
40 void initDoorOpenAnim(); ///< Initializes the door open animation.
41 void initDoorCloseAnim(); ///< Initializes the door close animation.
42 void ensureCourseClear(); ///< Ensures the course associated to the actor is cleared.
43
44 dHeapAllocator_c mAllocator; ///< The allocator.
45 nw4r::g3d::ResFile mResFile; ///< The resource file.
46 m3d::mdl_c mModel; ///< The model.
47 m3d::anmChr_c mChrAnim[ANIM_COUNT]; ///< The model animations.
48 m3d::anmChrBlend_c mChrBlendAnim; ///< The blended animation.
49 int mUnk2B8; ///< @unused
50
51 static const char *smc_doorNodeNames[]; ///< The node names for the door open/close animations. @hideinitializer
52};
dWmObjActor_c()
Constructs a new object.
dHeapAllocator_c mAllocator
The allocator.
ANIM_e
The available animations for this actor.
@ cobPeachCastleOpen
The door open animation.
@ cobPeachCastleFlag
The flag animation.
@ cobPeachCastleClose
The door close animation.
void ensureCourseClear()
Ensures the course associated to the actor is cleared.
daWmPeachCastle_c()
Constructs a new object.
virtual int execute()
do method for the execute operation.
nw4r::g3d::ResFile mResFile
The resource file.
void initState()
Sets up the actor's initial state.
void calcModel()
Updates the model's transformation matrix.
virtual void processCutsceneCommand(int cutsceneCommandId, bool isFirstFrame)
Contains the actor-specific logic for processing the current world map cutscene.
~daWmPeachCastle_c()
Destroys the object.
void initDoorCloseAnim()
Initializes the door close animation.
static const char * smc_doorNodeNames[]
The node names for the door open/close animations.
m3d::anmChrBlend_c mChrBlendAnim
The blended animation.
void initDoorOpenAnim()
Initializes the door open animation.
virtual int doDelete()
do method for the delete operation.
void initUnk()
Initializes mUnk2B8.
virtual int create()
do method for the create operation.
virtual int draw()
do method for the draw operation.
void initFlagAnim()
Initializes the flag animation.
m3d::anmChr_c mChrAnim[ANIM_COUNT]
The model animations.
m3d::mdl_c mModel
The model.
void createModel()
Initializes the resources for the actor.