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>
5
6/// @brief A collection of various functions used throughout the game.
7/// @details Name stands for Game Common.
8/// @ingroup bases
9namespace dGameCom {
10
11 //////////////////////////////////
12 // Random Number Generation API //
13 //////////////////////////////////
14
15 u32 getRandomSeed(); ///< Gets a seed used for randomness.
16
17 ////////////////////
18 // Game Pause API //
19 ////////////////////
20
21 /// @brief The game stopping conditions.
23 GAME_STOP_PAUSE = BIT_FLAG(0), ///< The pause menu is open.
24 GAME_STOP_WARNING = BIT_FLAG(1), ///< An error occurred.
25 GAME_STOP_OTASUKE_PAUSE = BIT_FLAG(2), ///< The pause menu is open during super guide/hint movie playback.
26 GAME_STOP_HOME_MENU = BIT_FLAG(3), ///< The Home Menu is open.
27 GAME_STOP_ANY = -1, ///< The game is stopped for any unspecified reason.
28 };
29
30 /// @brief Determines if gameplay is currently stopped for the specified reason(s).
31 /// @param flag The pause reasons. Value is a ::GAME_STOP_e.
32 bool isGameStop(ulong flag);
33 void clearGameStop(); ///< Resets the game stop state.
34
35 ////////////////////////
36 // Model Lighting API //
37 ////////////////////////
38
39 void SetSoftLight_Player(m3d::bmdl_c&, int); ///< Sets the soft light effect for players.
40 void SetSoftLight_Map(m3d::bmdl_c&, int); ///< Sets the soft light effect for map actors.
41 void SetSoftLight_Boss(m3d::bmdl_c&, int); ///< Sets the soft light effect for bosses.
42 void SetSoftLight_Enemy(m3d::bmdl_c&, int); ///< Sets the soft light effect for enemies.
43 void SetSoftLight_MapObj(m3d::bmdl_c&, int); ///< Sets the soft light effect for map objects.
44 void SetSoftLight_Item(m3d::bmdl_c&, int); ///< Sets the soft light effect for items.
45
46 ////////////////
47 // Other APIs //
48 ////////////////
49
50 /// @unofficial
51 void updateSelectCursor(nw4r::lyt::Picture *pic, int index, bool useSpecialDraw);
52 float getDispCenterY();
53}
A collection of various functions used throughout the game.
Definition d_game_com.hpp:9
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.