NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_game_com.hpp
1#pragma once
2#include <types.h>
3#include <lib/nw4r/lyt/lyt_picture.hpp>
4#include <game/mLib/m_3d.hpp>
5#include <game/mLib/m_vec.hpp>
6#include <game/bases/d_lyttextBox.hpp>
7
8/// @brief A collection of various functions used throughout the game.
9/// @details Name stands for Game Common.
10/// @ingroup bases
11namespace dGameCom {
12
13 //////////////////////////////////
14 // Random Number Generation API //
15 //////////////////////////////////
16
17 u32 getRandomSeed(); ///< Gets a seed used for randomness.
18
19 ////////////////////
20 // Game Pause API //
21 ////////////////////
22
23 /// @brief The game stopping conditions.
25 GAME_STOP_PAUSE = BIT_FLAG(0), ///< The pause menu is open.
26 GAME_STOP_WARNING = BIT_FLAG(1), ///< An error occurred.
27 GAME_STOP_OTASUKE_PAUSE = BIT_FLAG(2), ///< The pause menu is open during super guide/hint movie playback.
28 GAME_STOP_HOME_MENU = BIT_FLAG(3), ///< The Home Menu is open.
29 GAME_STOP_ANY = -1, ///< The game is stopped for any unspecified reason.
30 };
31
32 /// @brief Determines if gameplay is currently stopped for the specified reason(s).
33 /// @param flag The pause reasons. Value is a ::GAME_STOP_e.
34 bool isGameStop(ulong flag);
35 void clearGameStop(); ///< Resets the game stop state.
36
37 ////////////////////////
38 // Model Lighting API //
39 ////////////////////////
40
41 void SetSoftLight_Player(m3d::bmdl_c&, int); ///< Sets the soft light effect for players.
42 void SetSoftLight_Map(m3d::bmdl_c&, int); ///< Sets the soft light effect for map actors.
43 void SetSoftLight_Boss(m3d::bmdl_c&, int); ///< Sets the soft light effect for bosses.
44 void SetSoftLight_Enemy(m3d::bmdl_c&, int); ///< Sets the soft light effect for enemies.
45 void SetSoftLight_MapObj(m3d::bmdl_c&, int); ///< Sets the soft light effect for map objects.
46 void SetSoftLight_Item(m3d::bmdl_c&, int); ///< Sets the soft light effect for items.
47
48 ////////////////
49 // Other APIs //
50 ////////////////
51
52 void CreateSmallScore(const mVec3_c &, int, int, bool);
53 u8 GetAspectRatio();
54 bool PlayerEnterCheck(int);
55 void Player1upColor(LytTextBox_c *, int);
56 void getGlbPosToLyt(mVec3_c &);
57
58 /// @unofficial
59 void updateSelectCursor(nw4r::lyt::Picture *pic, int index, bool useSpecialDraw);
60 float getDispCenterY();
61}
A three-dimensional floating point vector.
Definition m_vec.hpp:100
A collection of various functions used throughout the game.
void SetSoftLight_Player(m3d::bmdl_c &, int)
Sets the soft light effect for players.
void SetSoftLight_Enemy(m3d::bmdl_c &, int)
Sets the soft light effect for enemies.
void SetSoftLight_MapObj(m3d::bmdl_c &, int)
Sets the soft light effect for map objects.
void SetSoftLight_Item(m3d::bmdl_c &, int)
Sets the soft light effect for items.
void SetSoftLight_Map(m3d::bmdl_c &, int)
Sets the soft light effect for map actors.
u32 getRandomSeed()
Gets a seed used for randomness.
bool isGameStop(ulong flag)
Determines if gameplay is currently stopped for the specified reason(s).
void clearGameStop()
Resets the game stop state.
void SetSoftLight_Boss(m3d::bmdl_c &, int)
Sets the soft light effect for bosses.
void updateSelectCursor(nw4r::lyt::Picture *pic, int index, bool useSpecialDraw)
GAME_STOP_e
The game stopping conditions.
@ GAME_STOP_OTASUKE_PAUSE
The pause menu is open during super guide/hint movie playback.
@ GAME_STOP_PAUSE
The pause menu is open.
@ GAME_STOP_WARNING
An error occurred.
@ GAME_STOP_HOME_MENU
The Home Menu is open.
@ GAME_STOP_ANY
The game is stopped for any unspecified reason.