NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_s_stage.hpp
1#pragma once
2#include <game/bases/d_scene.hpp>
3#include <game/bases/d_info.hpp>
4#include <game/bases/d_fader.hpp>
5#include <game/bases/d_otehon_clear.hpp>
6#include <game/mLib/m_vec.hpp>
8
9class dScStage_c : public dScene_c {
10public:
11 enum Exit_e {
12 EXIT_0,
13 EXIT_1,
14 EXIT_2,
15 EXIT_3
16 };
17
18 /// @brief The possible stage loop types.
20 LOOP_NONE, ///< No stage looping occurs.
21 LOOP_EDGES, ///< The stage loops around on the zone edges. Only works for specific zone sizes.
22 LOOP_SECTION, ///< The stage loops in specific sections.
23 LOOP_COUNT,
24 };
25
26 static void play();
27
28 typedef void (*changePosFunc)(mVec3_c *);
29 static void setChangePosFunc(int);
30
31 static void setTitleReplayRandomTable();
32
33 static void setNextScene(ProfileName, int, Exit_e, dFader_c::fader_type_e);
34
35 static void createReplayDataHeap(EGG::Heap *heap, ulong size, int options);
36
37 char pad[0x1198];
38 u8 mCurrWorld;
39 u8 mCurrCourse;
40 u8 mCurrFile;
41 u8 mCurrAreaNo;
42 u8 mCurrLayer;
43
44 u8 getCurrWorld() const { return mCurrWorld; }
45 u8 getCurrArea() const { return mCurrAreaNo; }
46
47 static dScStage_c *getInstance() { return m_instance; }
48 static NOINLINE Exit_e getExitMode() { return m_exitMode; }
49
50 static float getLoopPosX(float x);
51 static u32 m_exeFrame;
52 static int m_loopType;
53 static PLAYER_TYPE_e mCollectionCoin[STAR_COIN_COUNT];
54 static int m_titleCount;
55 static u8 m_titleRandomTable[];
56
57 static const char mCdArcName[];
58
59 static bool m_isCourseOut; ///< Whether the game is transitioning from a stage scene to a non-stage scene.
60 static dOtehonClear_c *m_OtehonClear_p;
61 static bool m_KoopaJrEscape;
62 static dInfo_c::GameMode_e m_gameMode;
63 static Exit_e m_exitMode;
64
65 static int m_miniGame;
66 static bool m_isStaffCredit;
67 static changePosFunc changePos;
68 static dScStage_c *m_instance;
69
70 ACTOR_PARAM_CONFIG(File, 8, 4);
71 ACTOR_PARAM_CONFIG(NextGotoID, 0, 8);
72};
LOOP_TYPE_e
The possible stage loop types.
Definition d_s_stage.hpp:19
@ LOOP_NONE
No stage looping occurs.
Definition d_s_stage.hpp:20
@ LOOP_SECTION
The stage loops in specific sections.
Definition d_s_stage.hpp:22
@ LOOP_EDGES
The stage loops around on the zone edges. Only works for specific zone sizes.
Definition d_s_stage.hpp:21
static bool m_isCourseOut
Whether the game is transitioning from a stage scene to a non-stage scene.
Definition d_s_stage.hpp:59
dScene_c()
Creates a new scene.
Definition d_scene.cpp:23
A three-dimensional floating point vector.
Definition m_vec.hpp:122
PLAYER_TYPE_e
The identifiers for each player type.
#define STAR_COIN_COUNT
The amount of Star Coins per level.
u16 ProfileName
The name of a profile. Value is a fProf::PROFILE_NAME_e.
Definition f_profile.hpp:32