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
*/
12
class
dControllerInformation_c
:
public
dBase_c
{
13
public
:
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.
43
private
:
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
};
LytBase_c
Definition
d_lytbase.hpp:9
dBase_c::dBase_c
dBase_c()
Constructs a new base.
Definition
d_base.cpp:13
dControllerInformation_c::mIsCreated
bool mIsCreated
If the layout has been successfully created.
Definition
d_controller_information.hpp:47
dControllerInformation_c::mState
STATE_e mState
Which state the base is currently in.
Definition
d_controller_information.hpp:49
dControllerInformation_c::STATE_e
STATE_e
The screen's current state.
Definition
d_controller_information.hpp:23
dControllerInformation_c::WAITING_FOR_END
@ WAITING_FOR_END
Playing the button animation while waiting for user input.
Definition
d_controller_information.hpp:27
dControllerInformation_c::SHOW_IN
@ SHOW_IN
Playing the button pop-out animation.
Definition
d_controller_information.hpp:25
dControllerInformation_c::END
@ END
Playing the button pressed sound effect and the button shrinking animation.
Definition
d_controller_information.hpp:28
dControllerInformation_c::SHOW_LOOP
@ SHOW_LOOP
Waiting for the pop-out to finish.
Definition
d_controller_information.hpp:26
dControllerInformation_c::IDLE
@ IDLE
Initial state; waiting for layout creation.
Definition
d_controller_information.hpp:24
dControllerInformation_c::execute
virtual int execute()
do method for the execute operation.
Definition
d_controller_information.cpp:71
dControllerInformation_c::doDelete
virtual int doDelete()
do method for the delete operation.
Definition
d_controller_information.cpp:107
dControllerInformation_c::dControllerInformation_c
dControllerInformation_c()
Constructs a new base.
Definition
d_controller_information.cpp:10
dControllerInformation_c::draw
virtual int draw()
do method for the draw operation.
Definition
d_controller_information.cpp:100
dControllerInformation_c::create
virtual int create()
do method for the create operation.
Definition
d_controller_information.cpp:14
dControllerInformation_c::mVisible
bool mVisible
If the layout should be rendered.
Definition
d_controller_information.hpp:48
dControllerInformation_c::createLayout
bool createLayout()
Loads the resources and creates the layout for the base.
Definition
d_controller_information.cpp:33
dControllerInformation_c::mLayout
LytBase_c mLayout
The layout of the base.
Definition
d_controller_information.hpp:46
dControllerInformation_c::ANIM_e
ANIM_e
The identifier for each animation.
Definition
d_controller_information.hpp:16
dControllerInformation_c::LOOP2BTN
@ LOOP2BTN
The button's blinking loop animation.
Definition
d_controller_information.hpp:18
dControllerInformation_c::HIT2BTN
@ HIT2BTN
The button's hit animation.
Definition
d_controller_information.hpp:19
dControllerInformation_c::IN2BTN
@ IN2BTN
The button's pop-out animation.
Definition
d_controller_information.hpp:17
dControllerInformation_c::~dControllerInformation_c
virtual ~dControllerInformation_c()
Destroys the base.
Definition
d_controller_information.cpp:12
include
game
bases
d_controller_information.hpp
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2