1#include <game/bases/d_wipe_mario.hpp>
2#include <game/bases/d_base_actor.hpp>
3#include <game/bases/d_game_com.hpp>
4#include <game/bases/d_a_player_manager.hpp>
5#include <game/bases/d_a_player_demo_manager.hpp>
20 static const char *AnmNameTbl[ANIM_NAME_COUNT] = {
21 "wipeMario_02_inWindow.brlan",
22 "wipeMario_02_outWindow.brlan"
25 static const char *GROUP_NAME_DT[ANIM_COUNT] = {
30 static const int ANIME_INDEX_TBL[ANIM_COUNT] = {
35 static const char *WPANE_NAME_DT[W_COUNT] = {
43 bool res =
mLyt.ReadResource(
"wipeMario/wipeMario.arc",
false);
48 mLyt.build(
"wipeMario_02.brlyt", 0);
49 mLyt.AnimeResRegister(AnmNameTbl, ANIM_NAME_COUNT);
50 mLyt.GroupRegister(GROUP_NAME_DT, ANIME_INDEX_TBL, ANIM_COUNT);
52 mLyt.WPaneRegister(WPANE_NAME_DT,
mpWnd, W_COUNT);
56 mLyt.AllAnimeEndSetup();
59 mLyt.mDrawOrder = m2d::DRAW_ORDER_WIPE;
68 static const Proc Proc_tbl[] = {
92 mLyt.AllAnimeEndSetup();
93 mLyt.AnimeStartSetup(
OUT,
false);
98 if (!
mLyt.isAnime(-1)) {
101 mFlag |= FADE_IN_COMPLETE;
105 mFlag |= FADE_OUT_COMPLETE;
112 mLyt.AllAnimeEndSetup();
113 mLyt.AnimeStartSetup(
IN,
false);
121 mpWnd[W_Mario_00]->SetAlpha(255);
122 mLyt.ReverseAnimeStartSetup(
OUT,
false);
127 }
else if (status ==
HIDDEN) {
130 mpWnd[W_Mario_00]->SetAlpha(0);
131 mLyt.ReverseAnimeStartSetup(
IN,
false);
A fader that animates a Mario texture in/out.
dWipeMario_c(nw4r::ut::Color, mFaderBase_c::EStatus status)
Constructs a new fader.
@ CLOSE_SETUP
Prepare the fade-in transition.
@ OPEN_SETUP
Prepare the fade-out transition.
@ ANIME_END_CHECK
Fade has begun, waiting for it to end.
@ IDLE
The fade has not been started.
virtual bool fadeOut()
Initiates a fade out from no-obstruction.
void CloseSetup()
Prepares the fade-in transition.
bool mIsCreated
Whether the layout for the fader has been created.
static dWipeMario_c * m_instance
The instance of the fader.
virtual int calc()
Calculates the fader at the current frame.
nw4r::lyt::Pane * mpRootPane
The root pane of the fader layout.
void AnimeEndCheck()
Checks if the fade animation has finished yet.
nw4r::lyt::Window * mpWnd[W_COUNT]
The window panes used for the fader.
virtual bool fadeIn()
Initiates a fade in from pure blacked-out.
void OpenSetup()
Prepares the fade-out transition.
~dWipeMario_c()
Destroys the fader.
LytBase_c mLyt
The layout for the fader.
virtual void draw()
Draws the fader.
virtual void setStatus(mFaderBase_c::EStatus status)
Sets the fader's status.
ACTION_e mAction
The action to be performed in calc().
bool createLayout()
Loads the resources and creates the layout for the fader.
EStatus mStatus
The fader's status.
virtual EStatus getStatus() const
Gets the fader's status.
u8 mFlag
The fader's flags.
virtual bool fadeIn()
Initiates a fade in from pure blacked-out.
mFaderBase_c(const mColor &color, EStatus status)
Constructs a new fader.
EStatus
The fader's status.
@ FADE_IN
Transition from OPAQUE to HIDDEN.
@ HIDDEN
The screen is completely unblocked.
@ OPAQUE
The screen is completely blacked out.
virtual bool fadeOut()
Initiates a fade out from no-obstruction.