NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_a_wm_peach.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/mdl.hpp>
5#include <game/bases/d_wm_demo_actor.hpp>
7/// @brief The worldmap Peach actor, used during the World 8-Castle unlock cutscene.
8/// @ingroup bases
9class daWmPeach_c : public dWmDemoActor_c {
10public:
11 enum PROC_TYPE_e {
12 PROC_TYPE_EXEC,
13 PROC_COUNT
14 };
15
16 /// @brief The available animations for this actor.
17 enum ANIM_e {
18 fly_wmap_B1,
19 fly_wmap_B2,
20 ANIM_COUNT
21 };
22
23 typedef void (daWmPeach_c::*ProcFunc)();
24
25 daWmPeach_c(); ///< @copydoc dWmDemoActor_c::dWmDemoActor_c
26 ~daWmPeach_c(); ///< @copydoc dWmDemoActor_c::~dWmDemoActor_c
27
28 virtual int create();
29 virtual int execute();
30 virtual int draw();
31 virtual int doDelete();
32
33 virtual void processCutsceneCommand(int cutsceneCommandId, bool isFirstFrame);
34
35 void createModel(); ///< Initializes the resources for the actor.
36 void calcModel(); ///< Updates the model's transformation matrix.
37
38 /// @brief Sets an animation on the actor.
39 /// @param animIdx The animation to play. Value is an ANIM_e.
40 /// @param blendFrame The animation blending duration, in frames.
41 /// @param rate The animation playback speed.
42 /// @param frame The animation frame to start playing from.
43 void setAnim(int animIdx, float blendFrame, float rate, float frame);
44
45 void initState(); ///< Sets up the actor's initial state.
46 void init_exec(); ///< Process initialization function for the @ref PROC_TYPE_EXEC "exec" process type.
47 void mode_exec(); ///< Process function for the @ref PROC_TYPE_EXEC "exec" process type.
48
49 dHeapAllocator_c mAllocator; ///< The allocator.
50 nw4r::g3d::ResFile mResFile; ///< The resource file.
51 m3d::mdl_c mModel; ///< The model.
52 m3d::anmChr_c mChrAnim[ANIM_COUNT]; ///< The model animations.
53 u32 mUnk250; ///< @unused
54 PROC_TYPE_e mCurrProc; ///< The current process type. See PROC_TYPE_e.
55
56 static const char *smc_resAnmNames[ANIM_COUNT]; ///< The animation names.
57};
dWmDemoActor_c()
Constructs a new actor.
The worldmap Peach actor, used during the World 8-Castle unlock cutscene.
virtual int execute()
do method for the execute operation.
void mode_exec()
Process function for the exec process type.
m3d::mdl_c mModel
The model.
nw4r::g3d::ResFile mResFile
The resource file.
void createModel()
Initializes the resources for the actor.
virtual int doDelete()
do method for the delete operation.
daWmPeach_c()
Constructs a new actor.
ANIM_e
The available animations for this actor.
~daWmPeach_c()
Destroys the actor.
void calcModel()
Updates the model's transformation matrix.
dHeapAllocator_c mAllocator
The allocator.
static const char * smc_resAnmNames[ANIM_COUNT]
The animation names.
void setAnim(int animIdx, float blendFrame, float rate, float frame)
Sets an animation on the actor.
void init_exec()
Process initialization function for the exec process type.
virtual void processCutsceneCommand(int cutsceneCommandId, bool isFirstFrame)
Contains the actor-specific logic for processing the current world map cutscene.
m3d::anmChr_c mChrAnim[ANIM_COUNT]
The model animations.
PROC_TYPE_e mCurrProc
The current process type. See PROC_TYPE_e.
virtual int create()
do method for the create operation.
void initState()
Sets up the actor's initial state.
virtual int draw()
do method for the draw operation.