save_manager OK

This commit is contained in:
robojumper
2025-05-01 15:11:11 +02:00
parent 594bc67d67
commit b148d141a0
33 changed files with 2961 additions and 303 deletions
+4
View File
@@ -24,6 +24,10 @@ public:
field_0x703 = val;
}
void setField704(bool val) {
field_0x704 = val;
}
dCursorHitCheck_c *getHitCheck() {
return mCursorIf.getHit();
}
+10
View File
@@ -0,0 +1,10 @@
#ifndef D_D2D_H
#define D_D2D_H
namespace d2d {
void defaultSet();
} // namespace d2d
#endif
+47
View File
@@ -4,6 +4,10 @@
#include "common.h"
#include "egg/core/eggHeap.h"
// This file is related to errors that are
// displayed on the screen, using a backup font
// included in the DOL.
namespace dDvdUnk {
class unkstruct_c {
@@ -21,6 +25,49 @@ private:
char field_0x4;
};
class FontUnk {
public:
FontUnk() {}
static FontUnk *GetInstance() {
return sInstance;
}
void fn_80052D00(bool);
void fn_80052D50();
void fn_80052C90();
s32 getField_0x24() const {
return field_0x24;
}
u8 getField_0x28() const {
return field_0x28;
}
u8 getField_0x29() const {
return field_0x29;
}
void setField_0x2C(u8 val) {
field_0x2C = val;
}
private:
static FontUnk *sInstance;
/* 0x00 */ nw4r::ut::ResFont mFont;
/* 0x1C */ s32 field_0x1C;
/* 0x20 */ s32 field_0x20;
/* 0x24 */ s32 field_0x24;
/* 0x28 */ u8 field_0x28;
/* 0x29 */ u8 field_0x29;
/* 0x2A */ u8 field_0x2A;
/* 0x2B */ u8 field_0x2B;
/* 0x2C */ u8 field_0x2C;
/* 0x2D */ u8 field_0x2D;
};
} // namespace dDvdUnk
#endif
+32
View File
@@ -0,0 +1,32 @@
#ifndef D_GFX_H
#define D_GFX_H
#include "common.h"
// Made up name
class dGfx_c {
public:
typedef void (*PreDrawCallback)(void);
void setDrawCallback(PreDrawCallback cb) {
mPreDrawCb = cb;
}
void setField0x09(u8 val) {
field_0x09 = val;
}
static dGfx_c *GetInstance() {
return sInstance;
}
private:
static dGfx_c *sInstance;
/* 0x00 */ u8 _0x00[0x04 - 0x00];
/* 0x04 */ PreDrawCallback mPreDrawCb;
/* 0x08 */ u8 field_0x08;
/* 0x09 */ u8 field_0x09;
};
#endif
+4 -1
View File
@@ -20,9 +20,12 @@ public:
STATE_FUNC_DECLARE(dScBoot_c, Connect);
STATE_FUNC_DECLARE(dScBoot_c, Save);
static dScBoot_c *sInstance;
static dScBoot_c *GetInstance() {
return sInstance;
}
private:
static dScBoot_c *sInstance;
class strap_c {
public:
strap_c();
+70
View File
@@ -0,0 +1,70 @@
#ifndef D_LYT_SAVE_MSG_WINDOW_H
#define D_LYT_SAVE_MSG_WINDOW_H
#include "d/lyt/d2d.h"
#include "d/lyt/msg_window/d_lyt_msg_window_select_btn.h"
#include "s/s_State.hpp"
#include "sized_string.h"
class dLytSaveMsgWindow_c {
public:
dLytSaveMsgWindow_c();
virtual ~dLytSaveMsgWindow_c() {}
bool build(bool);
bool remove();
bool execute();
bool draw();
bool drawNow();
void reset();
bool setProperties(const char *message, s32, s32, u8);
bool checkIsWait();
void setNumLines(s32 numLines) {
mNumLines = numLines;
}
u8 getWillFinishOut() const {
return mWillFinishOut;
}
private:
void resetProperties();
void setupSaveTextMaybe();
void updateSaveTextMaybe();
void updateSaveText();
void setAnmFrame(s32 group, f32 frame);
void unbindAnm(s32 group);
STATE_FUNC_DECLARE(dLytSaveMsgWindow_c, Init);
STATE_FUNC_DECLARE(dLytSaveMsgWindow_c, In);
STATE_FUNC_DECLARE(dLytSaveMsgWindow_c, Wait);
STATE_FUNC_DECLARE(dLytSaveMsgWindow_c, Out);
/* 0x0004 */ UI_STATE_MGR_DECLARE(dLytSaveMsgWindow_c);
/* 0x0040 */ d2d::ResAccIf_c mResAcc;
/* 0x03B0 */ d2d::LytBase_c mLyt;
/* 0x0440 */ d2d::AnmGroup_c mAnm[9];
/* 0x0680 */ d2d::SubPaneList mSubpaneList;
/* 0x068C */ d2d::SubPaneListNode mSubpanes[1];
/* 0x069C */ dLytMsgWindowSelectBtn_c mBtn;
/* 0x1070 */ SizedString<64> mLabel;
/* 0x10B0 */ s32 field_0x10B0;
/* 0x10B4 */ s32 field_0x10B4;
/* 0x10B8 */ s32 field_0x10B8;
/* 0x10BC */ s32 field_0x10BC;
/* 0x10C0 */ s32 field_0x10C0;
/* 0x10C4 */ s32 field_0x10C4;
/* 0x10C8 */ s32 field_0x10C8;
/* 0x10CC */ s32 mNumLines;
/* 0x10D0 */ s32 mSaveobjId;
/* 0x10D4 */ f32 mLineSpace;
/* 0x10D8 */ u8 field_0x10D8;
/* 0x10D9 */ u8 mWillFinishOut;
/* 0x10DA */ u8 field_0x10DA;
/* 0x10DB */ u8 field_0x10DB;
/* 0x10DC */ u8 field_0x10DC;
/* 0x10DD */ u8 field_0x10DD;
};
#endif
+35
View File
@@ -0,0 +1,35 @@
#ifndef D_LYT_SYSTEM_WINDOW_H
#define D_LYT_SYSTEM_WINDOW_H
#include "common.h"
class dLytSystemWindow_c {
public:
virtual ~dLytSystemWindow_c();
// TODO fill out
static dLytSystemWindow_c *GetInstance() {
return sInstance;
}
bool setProperties(const char *label, bool, const wchar_t *);
void showMaybe();
void showMaybe(s32 arg);
s32 getField_0xE10() const {
return field_0xE10;
}
s32 getField_0xDE0() const;
bool getField_0xDFC() const;
bool fn_80152F50() const;
bool fn_80152F60() const;
bool fn_80152F70() const;
private:
static dLytSystemWindow_c *sInstance;
/* 0x004 */ u8 _0x004[0xE10 - 0x004];
/* 0xE10 */ u8 field_0xE10;
};
#endif
@@ -36,6 +36,7 @@ class dLytMsgWindowSelectBtnParts_c {
public:
dLytMsgWindowSelectBtnParts_c() : mStateMgr(*this) {}
~dLytMsgWindowSelectBtnParts_c() {}
void init();
void execute();
@@ -73,6 +74,14 @@ public:
bool draw();
u8 getField_0x9A4() const {
return field_0x9A4;
}
s32 getField_0x9B0() const {
return field_0x9B0;
}
s32 getField_0x9B4() const {
return field_0x9B4;
}
@@ -85,14 +94,26 @@ public:
field_0x9BC = value;
}
void setField_0x9C4(s32 value) {
field_0x9C4 = value;
}
void setField_0x990(s32 value) {
mBtnHelper.field_0x4C = value;
}
void setField_0x998(dTagProcessor_c *value) {
void setField_0x9A0(s32 value) {
field_0x9A0 = value;
}
void setTagProcessor(dTagProcessor_c *value) {
mpTagProcessor = value;
}
void setField_0x99C(s32 value) {
field_0x99C = value;
}
void fn_8011E5D0(u32, bool);
dTextBox_c *getSelectTextBox(s32 option, s32 idx) const {
@@ -136,7 +157,7 @@ private:
/* 0x9B8 */ s32 field_0x9B8;
/* 0x9BC */ s32 field_0x9BC;
/* 0x9C0 */ s32 field_0x9C0;
/* 0x9C4 */ void *field_0x9C4;
/* 0x9C4 */ s32 field_0x9C4;
/* 0x9C8 */ s32 field_0x9C8;
/* 0x9CC */ s8 field_0x9CC;
/* 0x9CD */ u8 field_0x9CD;