1#include <game/bases/d_scene.hpp>
2#include <game/bases/d_audio.hpp>
3#include <game/bases/d_actor.hpp>
4#include <game/bases/d_effectmanager.hpp>
5#include <game/bases/d_fader.hpp>
6#include <game/bases/d_game_com.hpp>
7#include <game/bases/d_reset.hpp>
8#include <game/bases/d_s_restart_crsin.hpp>
9#include <game/bases/d_s_stage.hpp>
10#include <game/bases/d_WarningManager.hpp>
11#include <game/mLib/m_fader.hpp>
28 EffectManager_c::m_firstCalc =
false;
31 dActor_c::mExecStopReq = 0;
32 dActor_c::mDrawStopReq = 0;
33 dActor_c::mExecStop = 0;
34 dActor_c::mDrawStop = 0;
37dScene_c::~dScene_c() {
38 if (dWarningManager_c::m_WarningForbid > 0) {
39 dWarningManager_c::m_WarningForbid--;
41 dAudio::destroySceneSnd();
56 dAudio::prepareSceneSnd();
138 dAudio::setNextScene(fProfile::BOOT, 0);
142 dScRestartCrsin_c::startTitle(0,
true);
151 if (newScene !=
nullptr) {
168 bool isChangeDisallowed =
174 if (!isChangeDisallowed || forceChange) {
175 if (
m_nowScene == fProfile::STAGE && nextScene != fProfile::STAGE) {
178 dAudio::setNextScene(nextScene, param);
virtual int preDelete()
pre method for the delete operation.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
virtual void postDraw(fBase_c::MAIN_STATE_e status)
post method for the draw operation.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
virtual int preDraw()
pre method for the draw operation.
static dBase_c * createRoot(ProfileName profName, unsigned long param, u8 groupType)
Creates a root base.
virtual void postDelete(fBase_c::MAIN_STATE_e status)
post method for the delete operation.
virtual int preExecute()
pre method for the execute operation.
virtual int preCreate()
pre method for the create operation.
System reset management class.
static dReset::Manage_c * GetInstance()
Gets a pointer to the instance of this class.
int mModeProc
The game's current running state. See Mode_e.
@ SAFETY_WAIT
The game is about to execute the hard reset procedure indicated in mExecMode.
@ SOFT_RESET
The game is being soft reset (from the Home Menu).
int mModeInit
The running state the game's about to switch to. See Mode_e.
static bool m_isCourseOut
Whether the game is transitioning from a stage scene to a non-stage scene.
virtual int preExecute()
Code to be executed before execute.
static void setFadeInFrame(unsigned short length)
Sets the duration of the next fade-in transition to length.
static void setStartScene()
Sets up the scene to be shown when the game boots up.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
See dBase_c::postExecute.
virtual void postDelete(fBase_c::MAIN_STATE_e status)
See dBase_c::postDelete.
static dScene_c * createNextScene()
Creates and returns a root base for the next scene.
virtual int preDraw()
See dBase_c::preDraw.
static void setFadeOutFrame(unsigned short length)
Sets the duration of the next fade-out transition to length.
virtual void postDraw(fBase_c::MAIN_STATE_e status)
See dBase_c::postDraw.
static bool m_isAutoFadeIn
If a fade-in should automatically be performed on scene load.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
Code to be executed after create.
sPhase_c * mpPhase
The phase to be completed before preExecute succeeds.
static ProfileName m_nextScene
The profile name of the next scene.
virtual int preDelete()
See dBase_c::preDelete.
static u16 m_fadeInFrame
The duration of the next fade-in.
static bool m_otherSceneFlg
Whether the next scene has already been created.
static void setResetScene()
Sets up the scene to be shown after a game reset.
static u32 mPara
The parameters for the next scene.
static ProfileName m_nowScene
The profile name of the current scene.
virtual int preCreate()
See dBase_c::preCreate.
static u16 m_fadeOutFrame
The duration of the next fade-out.
static void setFadeInOutFrame(unsigned short length)
Sets the duration of the next fade-in and fade-out transitions to length.
static void setNextScene(ProfileName nextScene, unsigned long param, bool forceChange)
Attempts to prepare the transition to a new state.
static ProfileName m_oldScene
The profile name of the previous scene.
MAIN_STATE_e
The possible operation results.
@ SUCCESS
The operation was completed successfully.
static fBase_c * createChild(ProfileName profName, fBase_c *parent, unsigned long param, u8 groupType)
Creates a child base under the given parent.
void deleteRequest()
Requests deletion of the base.
@ SCENE
The base is a scene.
@ OTHER
The base is a generic process.
bool checkChildProcessCreateState() const
Checks if the base has at least one child in the CREATING state.
void clearProcControlFlag(u8 flag)
Clears a flag in mProcControl.
void setProcControlFlag(u8 flag)
Sets a flag in mProcControl.
@ ROOT_DISABLE_EXECUTE
Execution is disabled, and this is a root base.
@ ROOT_DISABLE_DRAW
Drawing is disabled, and this is a root base.
@ NOT_READY
The step could not completed at this time.
@ SUCCEEDED
The step was completed successfully.
bool isProcControlFlag(u8 flag) const
Checks if a flag is set in mProcControl.
@ HIDDEN
The screen is completely unblocked.
@ OPAQUE
The screen is completely blacked out.
static bool isStatus(mFaderBase_c::EStatus status)
Checks if the current fader's status matches status .
METHOD_RESULT_e callMethod(void *thisPtr)
Executes the phase until the end is reached or a method returns METHOD_RESULT_e::WAIT.
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
void clearGameStop()
Resets the game stop state.