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_py_mng.hpp>
5#include <game/bases/d_a_py_demo_mng.hpp>
20 static const char *animeNames[] = {
21 "wipeMario_02_inWindow.brlan",
22 "wipeMario_02_outWindow.brlan"
25 static const int groupIdxs[] = {0, 1};
26 static const char *groupNames[] = {
31 static const char *windowNames[] = {
39 bool res =
mLyt.ReadResource(
"wipeMario/wipeMario.arc",
false);
44 mLyt.build(
"wipeMario_02.brlyt", 0);
45 mLyt.AnimeResRegister(animeNames, ARRAY_SIZE(animeNames));
46 mLyt.GroupRegister(groupNames, groupIdxs, ARRAY_SIZE(groupNames));
52 mLyt.AllAnimeEndSetup();
55 mLyt.mDrawOrder = 154;
62const actMeth actMeths[] = {
87 mLyt.AllAnimeEndSetup();
88 mLyt.AnimeStartSetup(
OUT,
false);
93 if (!
mLyt.isAnime(-1)) {
96 mFlag |= FADE_IN_COMPLETE;
100 mFlag |= FADE_OUT_COMPLETE;
107 mLyt.AllAnimeEndSetup();
108 mLyt.AnimeStartSetup(
IN,
false);
116 mpWnd[0]->setFieldB8(255);
117 mLyt.ReverseAnimeStartSetup(
OUT,
false);
122 }
else if (stat ==
HIDDEN) {
125 mpWnd[0]->setFieldB8(0);
126 mLyt.ReverseAnimeStartSetup(
IN,
false);
A fader that animates a Mario texture in/out.
dWipeMario_c(nw4r::ut::Color, mFaderBase_c::EStatus stat)
See mFaderBase_c::mFaderBase_c.
@ 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.
virtual void setStatus(mFaderBase_c::EStatus stat)
Sets the fader's status.
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.
ACTION_e mAction
The action to be performed in calc.
bool createLayout()
Loads the resources and creates the layout for the fader.
nw4r::lyt::Window * mpWnd[1]
The window pane containing the fader texture.
Base fader implementation.
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.
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.