NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_controller_information.hpp
1#pragma once
2#include <game/bases/d_base.hpp>
3#include <game/bases/d_lytbase.hpp>
4
5/**
6 * @brief Displays the controller information screen.
7 * @ingroup bases
8 * @details This is the screen that reads "Hold the Wii Remote sideways". It's spawned automatically by
9 * the boot scene (dScBoot_c), which also performs the button input check and consequent
10 * @ref STATE_e "state change".
11 */
13public:
14
15 /// @brief The identifier for each animation.
16 enum ANIM_e {
17 IN2BTN, ///< The button's pop-out animation.
18 LOOP2BTN, ///< The button's blinking loop animation.
19 HIT2BTN ///< The button's hit animation.
20 };
21
22 /// @brief The screen's current state.
23 enum STATE_e {
24 IDLE, ///< Initial state; waiting for layout creation.
25 SHOW_IN, ///< Playing the button pop-out animation.
26 SHOW_LOOP, ///< Waiting for the pop-out to finish.
27 WAITING_FOR_END, ///< Playing the button animation while waiting for user input.
28 END ///< Playing the button pressed sound effect and the button shrinking animation.
29 };
30
31 dControllerInformation_c(); ///< @copydoc fBase_c::fBase_c
32 virtual ~dControllerInformation_c(); ///< @copydoc fBase_c::~fBase_c
33 virtual int create();
34 virtual int doDelete();
35 virtual int execute();
36 virtual int draw();
37
38 void setVisible(bool visible) { mVisible = visible; }
39 void setState(STATE_e state) { mState = state; }
40
41 /// @brief Loads the resources and creates the layout for the base.
42 /// @return If the creation was successful.
43private:
44 bool createLayout();
45
46 LytBase_c mLayout; ///< The layout of the base.
47 bool mIsCreated; ///< If the layout has been successfully created.
48 bool mVisible; ///< If the layout should be rendered.
49 STATE_e mState; ///< Which state the base is currently in.
50};
dBase_c()
Constructs a new base.
Definition d_base.cpp:13
bool mIsCreated
If the layout has been successfully created.
STATE_e mState
Which state the base is currently in.
STATE_e
The screen's current state.
@ WAITING_FOR_END
Playing the button animation while waiting for user input.
@ SHOW_IN
Playing the button pop-out animation.
@ END
Playing the button pressed sound effect and the button shrinking animation.
@ SHOW_LOOP
Waiting for the pop-out to finish.
@ IDLE
Initial state; waiting for layout creation.
virtual int execute()
do method for the execute operation.
virtual int doDelete()
do method for the delete operation.
dControllerInformation_c()
Constructs a new base.
virtual int draw()
do method for the draw operation.
virtual int create()
do method for the create operation.
bool mVisible
If the layout should be rendered.
bool createLayout()
Loads the resources and creates the layout for the base.
LytBase_c mLayout
The layout of the base.
ANIM_e
The identifier for each animation.
@ LOOP2BTN
The button's blinking loop animation.
@ HIT2BTN
The button's hit animation.
@ IN2BTN
The button's pop-out animation.
virtual ~dControllerInformation_c()
Destroys the base.