NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_md_actor.hpp
1#pragma once
2
3#include <game/bases/d_base_actor.hpp>
4#include <game/mLib/m_sphere.hpp>
5
6/**
7 * @brief The minimum required implementation for a cutscene actor.
8 * @ingroup bases
9 * @details
10 * ## Overview
11 * dMdActor_c serves as the base for all cutscene actors (Md stands for Movie Demo). It does not add any
12 * particularly relevant components, but a few overloads are provided for convenience.
13 *
14 * ## Notable Operation Changes
15 * The following operation changes have been made:
16 * - The execute operation is not performed if the game @ref dGameCom::isGameStop "is stopped" for
17 * @ref dGameCom::GAME_STOP_e::GAME_STOP_ANY "any reason".
18 *
19 * ## Unused Content
20 * - The @ref mCullSphere "bounding sphere" mechanism from dWmActor_c is present in this class as well,
21 * however no cutscene actors make use of it.
22 * - Similarly, the World Select Menu check from the same class is also present, but it will never be
23 * triggered since no cutscene actors are ever active on the world map.
24 * - Due to the above, it is theorized that cutscene actors were likely intended to support more complex
25 * behaviour similar to their world map counterparts, however this was scrapped in favour of a simpler
26 * approach.
27 */
28class dMdActor_c : public dBaseActor_c {
29 dMdActor_c(); ///< @copydoc dBaseActor_c::dBaseActor_c
30
31 virtual int preCreate();
32 virtual void postCreate(fBase_c::MAIN_STATE_e status);
33
34 virtual int preDelete();
35 virtual void postDelete(fBase_c::MAIN_STATE_e status);
36
37 virtual int preExecute();
38 virtual void postExecute(fBase_c::MAIN_STATE_e status);
39
40 virtual int preDraw();
41 virtual void postDraw(fBase_c::MAIN_STATE_e status);
42
43 virtual ~dMdActor_c(); ///< @copydoc dBaseActor_c::~dBaseActor_c
44
45 virtual int GetActorType();
46
47 /// @brief Creates a child cutscene actor with the given parent. See
48 /// @ref dBaseActor_c::construct(ProfileName, dBase_c*, unsigned long, const mVec3_c*, const mAng3_c*)
49 /// "dBaseActor_c::construct".
50 static dMdActor_c *construct(ProfileName profName, dBase_c *base, unsigned long param, const mVec3_c *position, const mAng3_c *rotation);
51
52private:
53 mSphere_c mCullSphere; ///< @unused A sphere representing the actor's visible area.
54};
dBaseActor_c()
Constructs a new actor.
dBase_c()
Constructs a new base.
Definition d_base.cpp:12
dMdActor_c()
Constructs a new actor.
Definition d_md_actor.cpp:6
virtual void postDraw(fBase_c::MAIN_STATE_e status)
post method for the draw operation.
virtual void postDelete(fBase_c::MAIN_STATE_e status)
post method for the delete operation.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
virtual int preDraw()
pre method for the draw operation.
mSphere_c mCullSphere
[Unused]. A sphere representing the actor's visible area.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
virtual int preCreate()
pre method for the create operation.
virtual int preDelete()
pre method for the delete operation.
static dMdActor_c * construct(ProfileName profName, dBase_c *base, unsigned long param, const mVec3_c *position, const mAng3_c *rotation)
Creates a child cutscene actor with the given parent. See dBaseActor_c::construct.
virtual int GetActorType()
Gets the actor kind. See ACTOR_KIND_e.
virtual int preExecute()
pre method for the execute operation.
virtual ~dMdActor_c()
Destroys the actor.
Definition d_md_actor.cpp:8
MAIN_STATE_e
The possible operation results.
Definition f_base.hpp:137
A three-dimensional short angle vector.
Definition m_angle.hpp:60
A three-dimensional floating point vector.
Definition m_vec.hpp:100
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
Definition f_profile.hpp:32