NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_a_nice_coin.hpp
1#pragma once
2#include <game/bases/d_actor_state.hpp>
3
4/// @brief A tracker for collected coins and blue coins.
5/// @details Once all the paired coins are collected, a clap sound will be played.
6/// @paramtable
7/// @statetable
8/// @ingroup bases
9class daNiceCoin_c : public dActorState_c {
10public:
11
12 /// @brief The possible collection types.
14 TYPE_NORMAL, ///< Normal coins.
15 TYPE_BLUE, ///< Blue coins.
16 TYPE_BOTH, ///< Both normal and blue coins.
17 };
18
19 /// @brief The "Nice Coin" type of this actor.
21 TYPE_NICE_COIN, ///< AC_NICE_COIN
22 TYPE_NICE_COIN_REGULAR, ///< AC_NICE_COIN_REGULAR
23 };
24
25 daNiceCoin_c() {} ///< @copydoc dActorState_c::dActorState_c
26 virtual ~daNiceCoin_c() {} ///< @copydoc dActorState_c::~dActorState_c
27
28 virtual int create();
29 virtual int doDelete();
30 virtual int execute();
31 virtual int draw();
32
33 STATE_FUNC_DECLARE(daNiceCoin_c, Search); ///< Checking if coins are collected.
34 STATE_FUNC_DECLARE(daNiceCoin_c, EndWait); ///< Empty state after the coins were collected.
35
36 int mCollectionID; ///< The ID used to check for collected coins.
37 COLLECT_TYPE_e mCollectType; ///< The type of coins being tracked.
38 NICE_TYPE_e mNiceType; ///< The type of this actor.
39
40 int mReqCoinNum; ///< The number of coins that need to be collected.
41 int mReqBlueCoinNum; ///< The number of blue coins that need to be collected.
42
43 int mCollectedCoinNum; ///< The number of coins collected so far.
44 int mCollectedBlueCoinNum; ///< The number of blue coins collected so far.
45
46 ACTOR_PARAM_CONFIG(CollectionID, 0, 4); ///< The ID to pair coins with.
47 ACTOR_PARAM_CONFIG(CoinNum, 8, 8); ///< The number of coins to collect.
48 ACTOR_PARAM_CONFIG(BlueCoinNum, 16, 8); ///< The number of blue coins to collect.
49};
dActorState_c()
Constructs a new actor.
virtual int doDelete()
do method for the delete operation.
ACTOR_PARAM_CONFIG(CoinNum, 8, 8)
The number of coins to collect.
COLLECT_TYPE_e mCollectType
The type of coins being tracked.
NICE_TYPE_e
The "Nice Coin" type of this actor.
@ TYPE_NICE_COIN_REGULAR
AC_NICE_COIN_REGULAR.
@ TYPE_NICE_COIN
AC_NICE_COIN.
int mReqBlueCoinNum
The number of blue coins that need to be collected.
virtual int create()
do method for the create operation.
virtual int execute()
do method for the execute operation.
int mCollectedCoinNum
The number of coins collected so far.
daNiceCoin_c()
Constructs a new actor.
ACTOR_PARAM_CONFIG(CollectionID, 0, 4)
The ID to pair coins with.
int mReqCoinNum
The number of coins that need to be collected.
int mCollectionID
The ID used to check for collected coins.
ACTOR_PARAM_CONFIG(BlueCoinNum, 16, 8)
The number of blue coins to collect.
NICE_TYPE_e mNiceType
The type of this actor.
virtual ~daNiceCoin_c()
Destroys the actor.
COLLECT_TYPE_e
The possible collection types.
@ TYPE_BOTH
Both normal and blue coins.
@ TYPE_BLUE
Blue coins.
@ TYPE_NORMAL
Normal coins.
int mCollectedBlueCoinNum
The number of blue coins collected so far.
virtual int draw()
do method for the draw operation.
#define STATE_FUNC_DECLARE(class, name)
Declares a state.
Definition s_State.hpp:12