NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_wm_demo_actor.hpp
1#pragma once
2
3#include <game/bases/d_wm_actor.hpp>
4#include <game/bases/d_wm_sv_mdl.hpp>
5
6/// @brief The minimum required implementation for world map event-driven actors.
7/// @ingroup bases
8class dWmDemoActor_c : public dWmActor_c {
9public:
10 dWmDemoActor_c(); ///< @copydoc dWmActor_c::dWmActor_c
11
12 virtual ~dWmDemoActor_c() {} ///< @copydoc dWmActor_c::~dWmActor_c
13 virtual int create() { return SUCCEEDED; }
14 virtual int draw() { return SUCCEEDED; }
15 virtual int doDelete() { return SUCCEEDED; }
16 virtual int execute() = 0;
17 virtual int GetActorType() { return ACTOR_MAP_DEMO; }
18
19 /// @brief Contains the actor-specific logic for processing the current world map cutscene.
20 /// @param cutsceneCommandId The cutscene type.
21 /// @param isFirstFrame @p true on the first frame the cutscene is executing, @p false on subsequent frames.
22 /// @unofficial
23 virtual void processCutsceneCommand(int cutsceneCommandId, bool isFirstFrame);
24 virtual bool checkCutEnd() { return mIsCutEnd; }
25 virtual void setCutEnd() { mIsCutEnd = true; }
26 virtual void clearCutEnd() { mIsCutEnd = false; }
27
28 bool isStaff();
29
30 void InitJumpParam(const mVec3_c &startPos, const mVec3_c &targetPos, int numFrames, float jumpSpeed, float maxYSpeed);
31 void __initJumpParam1(const mVec3_c &startPos, const mVec3_c &targetPos, int numFrames, float jumpSpeed, float maxYSpeed);
32 void __initJumpParam2(const mVec3_c &startPos, const mVec3_c &targetPos, int numFrames, float jumpSpeed, float maxYSpeed);
33 void initJumpBase(mVec3_c pos, int numFrames, float jumpSpeed);
34 bool procJumpBase();
35 void _initDemoJumpBaseCore(const mVec3_c &pos, int delay, int frames, float jumpSpeed, float startScale, float targetScale, const short &angY);
36 void _initDemoJumpBase(const mVec3_c &pos, int delay, int frames, float jumpSpeed, float startScale, float targetScale, const mVec3_c &dir);
37 bool _procDemoJumpBase();
38
39 void setDirection(const mVec3_c &dir);
40 void rotDirectionY(short angle, bool is3D);
41 void rotDirectionX(short angle, bool is3D);
42 bool checkArriveTargetXYZ(const mVec3_c &startPos, const mVec3_c &targetPos);
43 bool checkArriveTargetXZ(const mVec3_c &startPos, const mVec3_c &targetPos);
44
45 void CreateShadowModel(const char *arc, const char *path, const char *mdlName, bool param4);
46 void CalcShadow(float yOffs, float scaleX, float scaleY, float scaleZ);
47 void CalcShadow(float yOffs, float scale);
48 void DrawShadow(bool param1);
49
50 float GetBgPosY(const mVec3_c &startPos, const mVec3_c &targetPos, int directionType);
51 void CsSPosSimple(int directionType, float yTarget);
52 void clearSpeedAll();
53 void adjustHeightBase(const mVec3_c &startPos, const mVec3_c &targetPos, int directionType);
54 bool isCutsceneCommandPlaying(const int *cmdList, int cmdCount); ///< @unofficial
55
56 static dWmDemoActor_c *GetChildDemoActor(dBaseActor_c *prev, dWmDemoActor_c *&next); ///< @unofficial
57
58protected:
59 bool m_00;
60 bool mIsCutEnd;
61 mHeapAllocator_c mHeapAllocator;
62 m3d::smdl_c mModel;
63 dWmSVMdl_c *mSvMdl;
64 mVec3_c mTargetPos;
65 float mScaleCurr;
66 float mScaleDelta;
67 float mScaleTarget;
68 int mScaleDelay;
69};
@ ACTOR_MAP_DEMO
A map actor affected by cutscenes (dWmDemoActor_c).
dBaseActor_c()
Constructs a new actor.
dWmActor_c()
Constructs a new actor.
Definition d_wm_actor.cpp:6
virtual void processCutsceneCommand(int cutsceneCommandId, bool isFirstFrame)
Contains the actor-specific logic for processing the current world map cutscene.
virtual int execute()=0
do method for the execute operation.
virtual int draw()
do method for the draw operation.
dWmDemoActor_c()
Constructs a new actor.
virtual int doDelete()
do method for the delete operation.
virtual int GetActorType()
Gets the actor kind. See ACTOR_KIND_e.
static dWmDemoActor_c * GetChildDemoActor(dBaseActor_c *prev, dWmDemoActor_c *&next)
bool isCutsceneCommandPlaying(const int *cmdList, int cmdCount)
virtual int create()
do method for the create operation.
virtual ~dWmDemoActor_c()
Destroys the actor.
@ SUCCEEDED
The step was completed successfully.
Definition f_base.hpp:46