NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_model_play_guide.cpp
1#include <game/bases/d_model_play_guide.hpp>
2#include <game/bases/d_game_com.hpp>
4#include <game/framework/f_profile_name.hpp>
5#include <game/bases/d_WarningManager.hpp>
6
7BASE_PROFILE(MODEL_PLAY_GUIDE, dModelPlayGuide_c);
8
10
12
14 if (mIsCreated) {
15 return SUCCEEDED;
16 }
17
18 if (!createLayout()) {
19 return NOT_READY;
20 }
21
22 mIsCreated = true;
23 mLayout.mDrawOrder = m2d::DRAW_ORDER_MODEL_PLAY_GUIDE;
24 mpRootPane->SetVisible(true);
25
26 return SUCCEEDED;
27}
28
30 bool res = mLayout.ReadResource("modelPlayGuide/modelPlayGuide.arc", false);
31 if (!res) {
32 return false;
33 }
34
35 if (dGameCom::GetAspectRatio() == EGG::Screen::TV_MODE_16_9) {
36 mLayout.build("modelPlayGuide_02.brlyt", nullptr);
37 } else {
38 mLayout.build("modelPlayGuide_43.brlyt", nullptr);
39 }
40
41 mpRootPane = mLayout.getRootPane();
42 return true;
43}
44
47 return NOT_READY;
48 }
49
50 return !dWarningManager_c::isWarning();
51}
52
54 if (mIsCreated) {
55 mLayout.calc();
56 }
57
58 return SUCCEEDED;
59}
60
62 if (mIsCreated) {
63 mLayout.entry();
64 }
65
66 return SUCCEEDED;
67}
68
70 return mLayout.doDelete();
71}
virtual int preExecute()
pre method for the execute operation.
Definition d_base.cpp:54
The screen overlay for Hint Movies.
virtual int execute()
do method for the execute operation.
nw4r::lyt::Pane * mpRootPane
The root pane of the layout.
virtual int create()
do method for the create operation.
virtual int draw()
do method for the draw operation.
bool createLayout()
Loads the resources and creates the layout for the base.
virtual ~dModelPlayGuide_c()
Destroys the base.
dModelPlayGuide_c()
Constructs a new base.
virtual int preExecute()
pre method for the execute operation.
bool mIsCreated
If the layout has been successfully created.
LytBase_c mLayout
The layout of the overlay.
virtual int doDelete()
do method for the delete operation.
@ NOT_READY
The step could not completed at this time.
Definition f_base.hpp:45
@ SUCCEEDED
The step was completed successfully.
Definition f_base.hpp:46
#define BASE_PROFILE(profName, className)
Creates a basic profile, using the profile number as the execute and draw order value.
Definition f_profile.hpp:23