mirror of
https://github.com/zeldaret/ss
synced 2026-09-09 19:51:39 -04:00
d_scene OK (#114)
* d_scene OK * d_s_boot * Rename -> PROFILE_MAX * Some more ---------
This commit is contained in:
@@ -17,4 +17,13 @@ private:
|
||||
int mCount;
|
||||
};
|
||||
|
||||
namespace dDyl {
|
||||
|
||||
void initRelsArc();
|
||||
bool destroy();
|
||||
bool isLinked(u16 relId);
|
||||
int tryLink(u16 relId);
|
||||
|
||||
} // namespace dDyl
|
||||
|
||||
#endif
|
||||
|
||||
+31
-5
@@ -6,9 +6,9 @@
|
||||
#include "m/m_color_fader.h"
|
||||
#include "m/m_fader.h"
|
||||
|
||||
class dFader_c : mFader_c {
|
||||
class dFader_c : public mFader_c {
|
||||
public:
|
||||
dFader_c() : mpColorFader(nullptr), mpLytFader(nullptr), mpScreenFader(nullptr) {}
|
||||
dFader_c() : mpColorFader(nullptr), mpLytFader(nullptr), mpScreenFader(nullptr), field_0x14(0) {}
|
||||
virtual ~dFader_c();
|
||||
|
||||
bool create();
|
||||
@@ -16,15 +16,41 @@ public:
|
||||
u8 getColorFaderAlpha();
|
||||
bool initForLyt();
|
||||
|
||||
bool fadeIn() {
|
||||
setFader(mFadeInType);
|
||||
mpFader->setFrame(mFadeInFrame);
|
||||
return mpFader->fadeIn();
|
||||
}
|
||||
|
||||
bool fadeOut() {
|
||||
setFader(mFadeOutType);
|
||||
mpFader->setFrame(mFadeOutFrame);
|
||||
return mpFader->fadeOut();
|
||||
}
|
||||
|
||||
void setTypes(s32 fadeInType, s32 fadeOutType) {
|
||||
mFadeInType = fadeInType;
|
||||
mFadeOutType = fadeOutType;
|
||||
}
|
||||
|
||||
void resetFrames() {
|
||||
mFadeInFrame = 30;
|
||||
mFadeOutFrame = 30;
|
||||
}
|
||||
|
||||
void setFadeInFrame(u16 frame) {
|
||||
mFadeInFrame = frame;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x08 */ mColorFader_c *mpColorFader;
|
||||
/* 0x0C */ dLytFader_c *mpLytFader;
|
||||
/* 0x10 */ dScreenFader_c *mpScreenFader;
|
||||
/* 0x14 */ UNKWORD field_0x14;
|
||||
/* 0x14 */ u8 field_0x14;
|
||||
/* 0x18 */ s32 mFadeInType;
|
||||
/* 0x1C */ s32 mFadeOutType;
|
||||
/* 0x20 */ u16 field_0x20;
|
||||
/* 0x22 */ u16 field_0x22;
|
||||
/* 0x20 */ u16 mFadeInFrame;
|
||||
/* 0x22 */ u16 mFadeOutFrame;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+72
-4
@@ -1,11 +1,16 @@
|
||||
#ifndef D_S_BOOT_H
|
||||
#define D_S_BOOT_H
|
||||
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_fader.h"
|
||||
#include "d/d_scene.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "m/m2d.h"
|
||||
#include "m/m_dvd.h"
|
||||
#include "s/s_FPhase.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
#include "sized_string.h"
|
||||
|
||||
class dScBoot_c : public dBase_c {
|
||||
class dScBoot_c : public dScene_c {
|
||||
public:
|
||||
dScBoot_c();
|
||||
virtual ~dScBoot_c();
|
||||
@@ -15,8 +20,71 @@ public:
|
||||
STATE_FUNC_DECLARE(dScBoot_c, Connect);
|
||||
STATE_FUNC_DECLARE(dScBoot_c, Save);
|
||||
|
||||
static dScBoot_c *sInstance;
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dScBoot_c);
|
||||
class strap_c {
|
||||
public:
|
||||
strap_c();
|
||||
|
||||
bool create();
|
||||
bool execute();
|
||||
bool remove();
|
||||
void draw();
|
||||
void init();
|
||||
|
||||
private:
|
||||
/* 0x000 */ SizedString<64> mArcName;
|
||||
/* 0x040 */ SizedString<64> mStr2;
|
||||
/* 0x080 */ SizedString<64> mStr3;
|
||||
/* 0x0C0 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x430 */ m2d::Simple_c mLyt;
|
||||
/* 0x4C8 */ m2d::Anm_c mAnm;
|
||||
/* 0x4EC */ u8 field_0x4EC;
|
||||
/* 0x4EE */ u16 field_0x4EE;
|
||||
/* 0x4F0 */ u8 field_0x4F0;
|
||||
};
|
||||
|
||||
sFPhaseBase::sFPhaseState executeLoadPhase();
|
||||
|
||||
virtual int create() override;
|
||||
virtual int execute() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int draw() override;
|
||||
virtual void deleteReady() override;
|
||||
|
||||
bool checkDone();
|
||||
|
||||
sFPhaseBase::sFPhaseState cb1();
|
||||
sFPhaseBase::sFPhaseState cb2();
|
||||
sFPhaseBase::sFPhaseState cb3();
|
||||
sFPhaseBase::sFPhaseState cb4();
|
||||
sFPhaseBase::sFPhaseState cb5();
|
||||
sFPhaseBase::sFPhaseState cb6();
|
||||
sFPhaseBase::sFPhaseState cb7();
|
||||
sFPhaseBase::sFPhaseState cb8();
|
||||
sFPhaseBase::sFPhaseState cb9();
|
||||
|
||||
static u32 dvdCallback(void *data);
|
||||
|
||||
static sFPhase<dScBoot_c>::phaseCallback sCallbacks[];
|
||||
|
||||
/* 0x068 */ strap_c mStrapScreen;
|
||||
/* 0x55C */ sFPhase<dScBoot_c> mPhases;
|
||||
/* 0x570 */ mDvd_callback_c *mpDvdCallback;
|
||||
/* 0x574 */ STATE_MGR_DECLARE(dScBoot_c);
|
||||
/* 0x5B4 */ dFader_c mFader;
|
||||
/* 0x5D4 */ s32 field_0x5D4;
|
||||
/* 0x5D8 */ u32 field_0x5D8;
|
||||
/* 0x5DC */ u8 field_0x5DC;
|
||||
/* 0x5DD */ u8 field_0x5DD;
|
||||
/* 0x5DE */ u8 field_0x5DE;
|
||||
/* 0x5DF */ u8 field_0x5DF;
|
||||
/* 0x5E0 */ u8 field_0x5E0;
|
||||
/* 0x5E1 */ u8 field_0x5E1;
|
||||
/* 0x5E2 */ u8 field_0x5E2;
|
||||
/* 0x5E3 */ u8 field_0x5E3;
|
||||
/* 0x5E4 */ u8 field_0x5E4;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef D_SCENE_H
|
||||
#define D_SCENE_H
|
||||
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_fader.h"
|
||||
#include "f/f_profile_name.h"
|
||||
|
||||
class dScene_c : public dBase_c {
|
||||
public:
|
||||
dScene_c();
|
||||
virtual ~dScene_c() {}
|
||||
|
||||
virtual void postCreate(MAIN_STATE_e state) override;
|
||||
virtual void postDelete(MAIN_STATE_e state) override;
|
||||
virtual int preExecute() override;
|
||||
virtual void postExecute(MAIN_STATE_e status) override;
|
||||
|
||||
static void staticCreate();
|
||||
static dBase_c *staticExecute();
|
||||
static void setRootActor(fProfile::PROFILE_NAME_e rootActor, u32 params, s32 fadeInType, s32 fadeOutType);
|
||||
|
||||
protected:
|
||||
static dFader_c sFader;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,12 @@
|
||||
#ifndef D_SYS_H
|
||||
#define D_SYS_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
namespace dSys {
|
||||
|
||||
void setFrameRate(u32);
|
||||
|
||||
} // namespace dSys_c
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user