NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_multi_manager.hpp
1#pragma once
2
3#include <types.h>
5
6/// @brief Multiplayer manager.
7/// Keeps track of statistics for each player,
8/// used for Coin Battle and Free Mode.
10public:
11 dMultiMng_c(); ///< Creates a new multiplayer manager.
12 virtual ~dMultiMng_c(); ///< Destroys the multiplayer manager.
13
14 void initStage(); ///< Initializes all counters to zero.
15 void setClapSE(); ///< Plays the clap sound effect.
16 void setRest(int rest, int plrNo); ///< Sets the remaining lives for a player.
17 void addScore(int value, int plrNo); ///< Adds to the score of a player.
18 void incCoin(int plrNo); ///< Increments the coin count for a player.
19 void incEnemyDown(int plrNo); ///< Increments the enemy kill count for a player.
20 void setBattleCoin(int plrNo, int value); ///< Rewards a battle coin to a player.
21 void setCollectionCoin(); ///< Loads the star coin collection information.
22
23 int m_04; ///< @unused
24 int mRest[PLAYER_COUNT]; ///< The number of remaining lives for each player.
25 int mScore[PLAYER_COUNT]; ///< The score of each player.
26 int mCoin[PLAYER_COUNT]; ///< The coin count for each player.
27 int mEnemyDown[PLAYER_COUNT]; ///< The enemy kill count for each player.
28 int mBattleCoin[PLAYER_COUNT]; ///< The battle coin count for each player.
29 /// @brief The star coin collection status for each player.
30 /// Each byte is a bitfield representing whether each star coin has been collected
31 /// by the corresponding player.
32 /// 0x1 is the first star coin, 0x2 is the second, and 0x4 is the third.
33 u8 mCollectionCoin[PLAYER_COUNT];
34
35 static dMultiMng_c *mspInstance; ///< The instance of this class.
36};
void incEnemyDown(int plrNo)
Increments the enemy kill count for a player.
void initStage()
Initializes all counters to zero.
u8 mCollectionCoin[PLAYER_COUNT]
The star coin collection status for each player. Each byte is a bitfield representing whether each st...
dMultiMng_c()
Creates a new multiplayer manager.
void setBattleCoin(int plrNo, int value)
Rewards a battle coin to a player.
void addScore(int value, int plrNo)
Adds to the score of a player.
void setClapSE()
Plays the clap sound effect.
int mBattleCoin[PLAYER_COUNT]
int mScore[PLAYER_COUNT]
The score of each player.
virtual ~dMultiMng_c()
Destroys the multiplayer manager.
int mCoin[PLAYER_COUNT]
The coin count for each player.
void setRest(int rest, int plrNo)
Sets the remaining lives for a player.
int mRest[PLAYER_COUNT]
The number of remaining lives for each player.
static dMultiMng_c * mspInstance
The instance of this class.
void setCollectionCoin()
Loads the star coin collection information.
void incCoin(int plrNo)
Increments the coin count for a player.
int mEnemyDown[PLAYER_COUNT]
The enemy kill count for each player.