summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2026-07-05 10:34:40 -0700
committerGitHub <noreply@github.com>2026-07-05 13:34:40 -0400
commitd3c642c5d39902875ff8dc7278ef012c7dd3dd2a (patch)
tree6c2d09bc7d146c0b3cb0be7ac9677164ca03d190 /include
parenta7a5b5d6364e06e439d53a095ef6fd1ef25d7a68 (diff)
d_menu_save mostly done (#1103)
Diffstat (limited to 'include')
-rw-r--r--include/d/d_com_inf_game.h5
-rw-r--r--include/d/d_file_error.h12
-rw-r--r--include/d/d_menu_save.h210
-rw-r--r--include/d/d_save.h4
-rw-r--r--include/f_op/f_op_msg_mng.h179
-rw-r--r--include/m_Do/m_Do_MemCard.h70
6 files changed, 307 insertions, 173 deletions
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index 28f955d4..f491e698 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -904,6 +904,7 @@ void dComIfGs_setGameStartStage();
void dComIfGs_gameStart();
void dComIfGs_copyPlayerRecollectionData();
u8 dComIfGs_checkGetItem(u8);
+void dComIfGs_exchangePlayerRecollectionData();
inline void dComIfGs_init() {
g_dComIfG_gameInfo.save.init();
@@ -1471,8 +1472,8 @@ inline void dComIfGs_setTurnRestart(const cXyz& i_pos, s16 i_angle, s8 i_roomNo,
}
#endif
-inline void dComIfGs_setMemoryToCard(u8* i_cardPtr, int i_dataNum) {
- g_dComIfG_gameInfo.save.memory_to_card((char*)i_cardPtr, i_dataNum);
+inline int dComIfGs_setMemoryToCard(u8* i_cardPtr, int i_dataNum) {
+ return g_dComIfG_gameInfo.save.memory_to_card((char*)i_cardPtr, i_dataNum);
}
inline void dComIfGs_setInitDataToCard(u8* i_cardPtr, int i_dataNum) {
diff --git a/include/d/d_file_error.h b/include/d/d_file_error.h
index 42aa4409..6903ad2d 100644
--- a/include/d/d_file_error.h
+++ b/include/d/d_file_error.h
@@ -69,10 +69,10 @@ public:
class dFile_error_c {
public:
- void getStatus() {}
- void getYesNo() {}
+ u8 getStatus() { return mStatus; }
+ u8 getYesNo() { return mYesNo ^ 1; }
void setDbgErrMessage(char*, int) {}
- void setTimeCountDownMode() {}
+ void setTimeCountDownMode() { mTimeCountDownMode = 1; }
virtual ~dFile_error_c() {}
void _create();
@@ -117,14 +117,14 @@ public:
/* 0x2ec */ char* mMessage;
/* 0x2f0 */ STControl* stick;
/* 0x2f4 */ u8 mState;
- /* 0x2f5 */ u8 m2f5;
- /* 0x2f6 */ u8 mSelectedOption;
+ /* 0x2f5 */ u8 mStatus;
+ /* 0x2f6 */ u8 mYesNo;
/* 0x2f7 */ u8 m2f7;
/* 0x2f8 */ u8 m2f8;
/* 0x2f9 */ u8 m2f9;
/* 0x2fa */ u8 m2fa;
/* 0x2fb */ u8 m2fb;
- /* 0x2fc */ u8 m2fc;
+ /* 0x2fc */ u8 mTimeCountDownMode;
/* 0x2fd */ u8 m2fd;
/* 0x2fe */ s16 m2fe;
/* 0x300 */ f32 m300;
diff --git a/include/d/d_menu_save.h b/include/d/d_menu_save.h
index 9d4733cb..b4108851 100644
--- a/include/d/d_menu_save.h
+++ b/include/d/d_menu_save.h
@@ -2,7 +2,8 @@
#define D_MENU_SAVE_H
#include "d/d_drawlist.h"
-#include "dolphin/types.h"
+#include "f_op/f_op_msg_mng.h"
+#include "m_Do/m_Do_hostIO.h"
struct fopMsgM_pane_class;
@@ -10,16 +11,66 @@ class dDlst_MenuSave_c : public dDlst_base_c {
public:
~dDlst_MenuSave_c() {}
void draw();
+
+ /* 0x4 */ J2DScreen* Scr;
+ /* 0x8 */ JUTFont* font;
};
+class dFile_error_c;
+class STControl;
+
class dMenu_save_c {
public:
- u8* getDataBufPtr() { return mDataBuf; }
- u8 getEndStatus() { return mEndStatus; }
- u8 getSaveStatus() { return mSaveStatus; }
+ enum {
+ PROC_SAVE_QUESTION,
+ PROC_MEMCARD_CHECK,
+ PROC_OPEN_SAVE_MENU,
+ PROC_CLOSE_SAVE_MENU,
+ PROC_MEMCARD_ERR_MSG_WAIT_KEY,
+ PROC_MEMCARD_ERR_MSG_WAIT_KEY2,
+ PROC_MEMCARD_ERR_MSG_WAIT_KEY3,
+ PROC_MEMCARD_ERR_GO_IPL_SEL,
+ PROC_MEMCARD_ERR_GO_IPL_SEL2,
+ PROC_MEMCARD_FORMAT,
+ PROC_MEMCARD_ERR_MSG_WAIT_FORMAT_SEL,
+ PROC_MEMCARD_ERR_MSG_WAIT_FORMAT_SEL2,
+ PROC_MEMCARD_FORMAT_CHECK,
+ PROC_MEMCARD_MAKE_GAME_FILE_SEL,
+ PROC_MEMCARD_MAKE_GAME_FILE,
+ PROC_MEMCARD_MAKE_GAME_FILE_CHECK,
+ PROC_MEMCARD_DATA_LOAD_WAIT,
+ PROC_MEMCARD_DATA_LOAT_WAIT2,
+ PROC_MEMCARD_DATA_SAVE,
+ PROC_MEMCARD_DATA_SAVE_UP_MENU,
+ PROC_MEMCARD_DATA_SAVE_SEL,
+ PROC_MEMCARD_DATA_SAVE_DOWN_MENU,
+ PROC_MEMCARD_DATA_SAVE_WAIT,
+ PROC_MSG_WAIT,
+ PROC_MSG_WAIT2,
+ PROC_SAVE_END_WAIT,
+ PROC_SAVE_WAIT,
+ PROC_CAN_NOT_SAVE,
+ PROC_CAN_NOT_SAVE2,
+ PROC_GAME_CONTINUE,
+ PROC_GAME_CONTINUE2,
+ PROC_GAME_CONTINUE3,
+#if VERSION >= VERSION_JPN
+ PROC_GAME_CONTINUE4,
+#endif
+ PROC_ENDING_NO_SAVE,
+ PROC_ENDING_NO_SAVE2,
+ PROC_ENDING_NO_SAVE3,
+ PROC_ENDING_DATA_CHECK,
+ PROC_NO_SAVE,
+ PROC_NO_SAVE2,
+ };
+
+ u8* getDataBufPtr() { return dataBuf; }
+ u8 getEndStatus() { return endStatus; }
+ u8 getSaveStatus() { return saveStatus; }
void setErrorFlag(u8) {}
void setErrorType(u8) {}
- void setUseType(u8 useType) { mUseType = useType; }
+ void setUseType(u8 i_useType) { useType = i_useType; }
virtual ~dMenu_save_c() {}
void _create();
@@ -31,19 +82,19 @@ public:
void _delete();
void initialize();
- void openNormal();
- void closeNormal();
- void openForCollect();
- void openForItem();
- void closeForCollect();
- void closeForItem();
- void openForGameover();
- void closeForGameover();
- void closeForGameover_1();
- void closeForGameover_2();
- void openForEnding();
- void openForEnding2();
- void closeForEnding();
+ BOOL openNormal();
+ BOOL closeNormal();
+ BOOL openForCollect();
+ BOOL openForItem();
+ BOOL closeForCollect();
+ BOOL closeForItem();
+ BOOL openForGameover();
+ BOOL closeForGameover();
+ BOOL closeForGameover_1();
+ BOOL closeForGameover_2();
+ BOOL openForEnding();
+ BOOL openForEnding2();
+ BOOL closeForEnding();
void noSave();
void noSave2();
void saveQuestion();
@@ -84,54 +135,111 @@ public:
void endingNoSave3();
void endingDataCheck();
void saveWait();
- void YesNoSelect(int);
- void YesNoSelect2(int);
+ BOOL YesNoSelect(int);
+ BOOL YesNoSelect2(int);
void CursorAlphaInit();
void CursorMove();
void CursorAnime();
- void openSave();
- void closeSave();
+ BOOL openSave();
+ BOOL closeSave();
void screenSet();
void paneTransInit();
void displayInit();
void initializeEx();
- void menuUp();
- void menuDown();
- void PaneAlphaMsgTxt(s16, u8);
- void PaneTranceBase(s16, u8, f32, f32, u8, int);
- void PaneScaleAlphaWipe(s16, u8, f32, u8, int);
- void PaneAlphaMask(s16, u8, u8, int);
- void PaneTranceTitle(s16, u8, f32, f32, u8, int);
- void PaneRotate(s16, u8, fopMsgM_pane_class*, f32, f32, f32, u8);
- void PaneTranceMenu(s16, u8, fopMsgM_pane_class*, f32, f32, u8, int);
+ BOOL menuUp();
+ BOOL menuDown();
+ BOOL PaneAlphaMsgTxt(s16, u8);
+ BOOL PaneTranceBase(s16, u8, f32, f32, u8, int);
+ BOOL PaneScaleAlphaWipe(s16, u8, f32, u8, int);
+ BOOL PaneAlphaMask(s16, u8, u8, int);
+ BOOL PaneTranceTitle(s16, u8, f32, f32, u8, int);
+ BOOL PaneRotate(s16, u8, fopMsgM_pane_class*, f32, f32, f32, u8);
+ BOOL PaneTranceMenu(s16, u8, fopMsgM_pane_class*, f32, f32, u8, int);
public:
- /* 0x0004 */ u8 field_0x0004;
- /* 0x0008 */ dDlst_MenuSave_c mDlst;
+ /* 0x0004 */ JKRArchive* archive;
+ /* 0x0008 */ dDlst_MenuSave_c MenuSave;
+ /* 0x0014 */ fopMsgM_pane_class field_0x14[8];
+ /* 0x01D4 */ fopMsgM_pane_class field_0x1d4;
+ /* 0x020C */ fopMsgM_pane_class field_0x20c[5];
+ /* 0x0324 */ fopMsgM_pane_class field_0x324;
+ /* 0x035C */ fopMsgM_pane_class field_0x35c;
+ /* 0x0394 */ fopMsgM_pane_class field_0x394;
+ /* 0x03CC */ fopMsgM_pane_class field_0x3cc;
+ /* 0x0404 */ fopMsgM_pane_class field_0x404;
+ /* 0x043C */ fopMsgM_pane_class field_0x43c;
+ /* 0x0474 */ fopMsgM_pane_class field_0x474;
+ /* 0x04AC */ fopMsgM_pane_class field_0x4ac;
+ /* 0x04E4 */ fopMsgM_pane_class field_0x4e4;
#if VERSION == VERSION_PAL
- // Not 100% sure where these extra bytes go, but it has to be before field_0x0537.
- /* 0x000C */ u8 field_0x000c_pal[0x0038];
+ /* 0x051C */ fopMsgM_pane_class field_0x51c_pal;
#endif
- /* 0x000C */ u8 field_0x000c[0x0524];
- /* 0x0530 */ u8 field_0x0530;
- /* 0x0531 */ u8 mSaveStatus;
- /* 0x0532 */ u8 field_0x0532;
- /* 0x0533 */ u8 field_0x0533;
- /* 0x0534 */ u8 field_0x0534;
- /* 0x0535 */ u8 field_0x0535;
- /* 0x0536 */ u8 field_0x0536;
- /* 0x0537 */ u8 mUseType;
- /* 0x0538 */ u8 mEndStatus;
- /* 0x0539 */ u8 field_0x0539[0x053C - 0x0539];
- /* 0x053C */ u8 field_0x053c;
- /* 0x053D */ u8 field_0x053d;
- /* 0x053E */ u8 field_0x053e[0x0554 - 0x053E];
- /* 0x0554 */ u8 mDataBuf[0x1650];
+ /* 0x051C */ char* field_0x51c[2];
+ /* 0x0524 */ dFile_error_c* dFe_c;
+ /* 0x0528 */ STControl* stick;
+ /* 0x052C */ u8 proc;
+ /* 0x052D */ u8 field_0x52d;
+ /* 0x052E */ u8 field_0x52e;
+ /* 0x052F */ u8 field_0x52f;
+ /* 0x0530 */ u8 field_0x530;
+ /* 0x0531 */ u8 saveStatus;
+ /* 0x0532 */ u8 field_0x532;
+ /* 0x0533 */ u8 field_0x533;
+ /* 0x0534 */ u8 field_0x534;
+ /* 0x0535 */ u8 field_0x535;
+ /* 0x0536 */ u8 field_0x536;
+ /* 0x0537 */ u8 useType;
+ /* 0x0538 */ u8 endStatus;
+ /* 0x0539 */ u8 field_0x539;
+ /* 0x053A */ u8 field_0x53a;
+ /* 0x053B */ u8 field_0x53b;
+ /* 0x053C */ u8 field_0x53c;
+ /* 0x053D */ u8 field_0x53d;
+ /* 0x0540 */ int field_0x540;
+ /* 0x0544 */ s16 field_0x544;
+ /* 0x0546 */ u8 field_0x546[0x0554 - 0x0546];
+ /* 0x0554 */ u8 dataBuf[5712];
}; // Size: 0x1BA4
-class dMs_HIO_c {
+class dMs_HIO_c : public JORReflexible {
public:
dMs_HIO_c();
+ virtual ~dMs_HIO_c() {}
+
+ /* 0x04 */ s8 id;
+ /* 0x05 */ u8 field_0x5;
+ /* 0x06 */ u8 field_0x6;
+ /* 0x07 */ u8 field_0x7;
+ /* 0x08 */ u8 field_0x8;
+ /* 0x09 */ u8 field_0x9;
+ /* 0x0A */ u8 field_0xa;
+ /* 0x0B */ u8 field_0xb;
+ /* 0x0C */ s16 field_0xc;
+ /* 0x0E */ s16 field_0xe;
+ /* 0x10 */ u8 field_0x10;
+ /* 0x11 */ u8 field_0x11;
+ /* 0x12 */ u8 field_0x12;
+ /* 0x13 */ u8 field_0x13;
+ /* 0x14 */ s16 field_0x14;
+ /* 0x16 */ s16 field_0x16;
+ /* 0x18 */ u8 field_0x18;
+ /* 0x19 */ u8 field_0x19;
+ /* 0x1A */ u8 field_0x1a;
+ /* 0x1B */ u8 field_0x1b;
+ /* 0x1C */ u8 field_0x1c;
+ /* 0x1E */ s16 field_0x1e;
+ /* 0x20 */ u8 field_0x20;
+ /* 0x21 */ u8 field_0x21;
+ /* 0x22 */ u8 field_0x22;
+ /* 0x23 */ u8 field_0x23;
+ /* 0x24 */ u8 field_0x24;
+ /* 0x25 */ u8 field_0x25;
+ /* 0x26 */ s16 field_0x26;
+ /* 0x28 */ u8 field_0x28;
+ /* 0x29 */ u8 field_0x29;
+ /* 0x2A */ u8 field_0x2a;
+ /* 0x2C */ s16 field_0x2c;
+ /* 0x2E */ u8 field_0x2e;
};
diff --git a/include/d/d_save.h b/include/d/d_save.h
index 3bf1ac8d..5b5d252a 100644
--- a/include/d/d_save.h
+++ b/include/d/d_save.h
@@ -977,8 +977,8 @@ public:
/* 0x1158 */ dSv_event_c mTmp;
/* 0x1258 */ dSv_turnRestart_c mTurnRestart;
/* 0x1290 */ u8 mDataNum;
- /* 0x1291 */ u8 mNoFile;
- /* 0x1292 */ u8 mNewFile;
+ /* 0x1291 */ u8 mNewFile;
+ /* 0x1292 */ u8 mNoFile;
/* 0x1298 */ u64 mMemCardCheckID;
}; // Size: 0x12A0
diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h
index 2965cea1..cddc59c0 100644
--- a/include/f_op/f_op_msg_mng.h
+++ b/include/f_op/f_op_msg_mng.h
@@ -41,7 +41,7 @@ struct JMSMesgEntry_c {
struct msg_process_profile_definition {
/* 0x00 */ leaf_process_profile_definition base;
- /* 0x24 */ msg_method_class* sub_method; // Subclass methods
+ /* 0x24 */ msg_method_class* sub_method; // Subclass methods
};
struct fopMsg_prm_class {
@@ -50,7 +50,7 @@ struct fopMsg_prm_class {
/* 0x10 */ u32 mMsgNo;
/* 0x14 */ u32 field_0x14;
/* 0x18 */ int field_0x18;
-}; // Size: 0x1C
+}; // Size: 0x1C
struct fopMsg_prm_timer : public fopMsg_prm_class {
/* 0x1C */ int mTimerMode;
@@ -59,7 +59,7 @@ struct fopMsg_prm_timer : public fopMsg_prm_class {
/* 0x23 */ u8 mIconType;
/* 0x24 */ cXy mTimerPos;
/* 0x2C */ cXy mRupeePos;
-}; // Size: 0x34
+}; // Size: 0x34
class J2DScreen;
@@ -70,7 +70,7 @@ public:
};
struct fopMsgM_pane_class {
- /* 0x00 */ J2DPane * pane;
+ /* 0x00 */ J2DPane* pane;
/* 0x04 */ fopMsgM_f2d_class mPosTopLeftOrig;
/* 0x0C */ fopMsgM_f2d_class mPosTopLeft;
/* 0x14 */ fopMsgM_f2d_class mPosCenterOrig;
@@ -80,10 +80,10 @@ struct fopMsgM_pane_class {
/* 0x34 */ u8 mInitAlpha;
/* 0x35 */ u8 mNowAlpha;
/* 0x36 */ s16 mUserArea;
-}; // Size: 0x38
+}; // Size: 0x38
struct fopMsgM_pane_alpha_class {
- /* 0x00 */ J2DPane * pane;
+ /* 0x00 */ J2DPane* pane;
/* 0x04 */ u8 mInitAlpha;
/* 0x05 */ u8 mNowAlpha;
};
@@ -91,15 +91,13 @@ struct fopMsgM_pane_alpha_class {
class fopMsgM_msgGet_c {
public:
virtual ~fopMsgM_msgGet_c() {}
- mesg_header* getMesgHeader(u32);
- mesg_info* getMesgInfo(mesg_header*);
- mesg_data* getMesgData(mesg_header*);
- JMSMesgEntry_c getMesgEntry(mesg_header*);
- const char* getMessage(mesg_header*);
-
- u32 getMesgNumber() {
- return (mGroupID << 8) | mResMsgNo;
- }
+ mesg_header* getMesgHeader(u32 i_msgNo);
+ mesg_info* getMesgInfo(mesg_header* i_head);
+ mesg_data* getMesgData(mesg_header* i_head);
+ JMSMesgEntry_c getMesgEntry(mesg_header* i_head);
+ const char* getMessage(mesg_header* i_head);
+
+ u32 getMesgNumber() { return (mGroupID << 8) | mResMsgNo; }
public:
/* 0x04 */ u32 mMsgIdx;
@@ -116,11 +114,11 @@ public:
mResMsgNo = 0;
}
virtual ~fopMsgM_itemMsgGet_c() {}
- mesg_header* getMesgHeader(u32);
- mesg_info* getMesgInfo(mesg_header*);
- mesg_data* getMesgData(mesg_header*);
- JMSMesgEntry_c getMesgEntry(mesg_header*);
- const char* getMessage(mesg_header*);
+ mesg_header* getMesgHeader(u32 i_msgNo);
+ mesg_info* getMesgInfo(mesg_header* i_head);
+ mesg_data* getMesgData(mesg_header* i_head);
+ JMSMesgEntry_c getMesgEntry(mesg_header* i_head);
+ const char* getMessage(mesg_header* i_head);
public:
/* 0x04 */ u32 mMsgIdx;
@@ -130,7 +128,8 @@ public:
class MyPicture : public J2DPicture {
public:
- MyPicture(J2DPane* pParent, JSURandomInputStream* pStream) : J2DPicture(pParent, pStream) {
+ MyPicture(J2DPane* pParent, JSURandomInputStream* pStream)
+ : J2DPicture(pParent, pStream) {
m134 = 0;
}
@@ -271,8 +270,8 @@ public:
int getLineCount() { return lineCount; }
u8 getMesgStatus() { return mesgStatus; }
f32 getNowCursorPos() { return field_0x20; }
- u8 getRCharAlpha() { return field_0x291; } // ?
- u8 getRGradAlpha() { return field_0x290; } // ?
+ u8 getRCharAlpha() { return field_0x291; } // ?
+ u8 getRGradAlpha() { return field_0x290; } // ?
void getSelectFlag() {}
void getSelectLength() {}
void getStringColor() {}
@@ -309,14 +308,10 @@ public:
void setStringColor(u32) {}
void set_waitTimer(int) {}
void set_waitTimerZero() {}
- void shortCut() {
- field_0x299 = 1;
- }
+ void shortCut() { field_0x299 = 1; }
// fake, replace with real inline once it's figured out
- u32 get_0x220(int i) {
- return field_0x220[i];
- }
+ u32 get_0x220(int i) { return field_0x220[i]; }
public:
/* 0x004 */ JUTFont* font[2];
@@ -325,7 +320,7 @@ public:
/* 0x014 */ f32 field_0x14;
/* 0x018 */ f32 field_0x18;
/* 0x01C */ f32 field_0x1C;
- /* 0x020 */ f32 field_0x20; // NowCursorPos?
+ /* 0x020 */ f32 field_0x20; // NowCursorPos?
/* 0x024 */ f32 field_0x24;
/* 0x028 */ f32 field_0x28;
/* 0x02C */ u32 field_0x2C;
@@ -367,9 +362,9 @@ public:
/* 0x158 */ u32 field_0x158;
/* 0x15C */ int spaceTimer;
/* 0x160 */ int sendSpeed;
- /* 0x164 */ int field_0x164; // keyWaitTimer?
- /* 0x168 */ int field_0x168[0xF]; // IconPosX
- /* 0x1A4 */ int field_0x1A4[0xF]; // IconPosY
+ /* 0x164 */ int field_0x164; // keyWaitTimer?
+ /* 0x168 */ int field_0x168[0xF]; // IconPosX
+ /* 0x1A4 */ int field_0x1A4[0xF]; // IconPosY
/* 0x1A4 */ u32 field_0x1E0[0xF];
/* 0x21C */ int field_0x21C;
/* 0x21C */ u32 field_0x220[0xF];
@@ -407,64 +402,64 @@ public:
typedef int (*fopMsgCreateFunc)(void*);
-JKRExpHeap* fopMsgM_createExpHeap(u32, JKRHeap*);
-JKRExpHeap* fopMsgM_createExpHeap(u32);
-fpc_ProcID fopMsgM_Create(s16, fopMsgCreateFunc, void*);
-fpc_ProcID fopMsgM_create(s16 i_procName, fopAc_ac_c* param_1 = NULL, cXyz* param_2 = NULL,
- u32* param_3 = NULL, u32* param_4 = NULL, fopMsgCreateFunc createFunc = NULL);
-inline fpc_ProcID fopMsgM_MiniGameStarter_create(s16 i_procName, u8 param_1, u16 param_2, fopMsgCreateFunc createFunc) {
+JKRExpHeap* fopMsgM_createExpHeap(u32 i_size, JKRHeap* i_heap);
+JKRExpHeap* fopMsgM_createExpHeap(u32 i_size);
+fpc_ProcID fopMsgM_Create(s16 i_procName, fopMsgCreateFunc, void*);
+fpc_ProcID fopMsgM_create(s16 i_procName, fopAc_ac_c* i_actor = NULL, cXyz* i_pos = NULL, u32* i_msgNo = NULL, u32* param_4 = NULL, fopMsgCreateFunc i_createFunc = NULL);
+
+inline fpc_ProcID fopMsgM_MiniGameStarter_create(s16 i_procName, u8 param_1, u16 param_2, fopMsgCreateFunc i_createFunc) {
u32 parameter = param_1;
parameter |= param_2 << 16;
- return fopMsgM_create(i_procName, NULL, NULL, &parameter, &parameter, createFunc);
+ return fopMsgM_create(i_procName, NULL, NULL, &parameter, &parameter, i_createFunc);
}
-fpc_ProcID fop_MGameTerm_create(s16, s16, s16, int, int, fopMsgCreateFunc);
-inline fpc_ProcID fopMsgM_MiniGameTerminater_create(s16 param_0, s16 param_1, s16 param_2, int param_3, int param_4, fopMsgCreateFunc createFunc) {
- return fop_MGameTerm_create(param_0, param_1, param_2, param_3, param_4, createFunc);
+
+fpc_ProcID fop_MGameTerm_create(s16 i_procName, s16, s16, int, int, fopMsgCreateFunc);
+
+inline fpc_ProcID fopMsgM_MiniGameTerminater_create(s16 i_procName, s16 param_1, s16 param_2, int param_3, int param_4, fopMsgCreateFunc i_createFunc) {
+ return fop_MGameTerm_create(i_procName, param_1, param_2, param_3, param_4, i_createFunc);
}
-void fopMsgM_Delete(void* process);
-fopMsg_prm_class* fopMsgM_GetAppend(void* msg);
-void fopMsgM_destroyExpHeap(JKRExpHeap*);
-f32 fopMsgM_valueIncrease(int param_0, int param_1, u8 param_2);
+
+void fopMsgM_Delete(void* i_proc);
+fopMsg_prm_class* fopMsgM_GetAppend(void* i_proc);
+void fopMsgM_destroyExpHeap(JKRExpHeap* i_heap);
+f32 fopMsgM_valueIncrease(int i_max, int i_value, u8 i_mode);
#if VERSION >= VERSION_USA
-bool fopMsgM_hyrule_language_check(u32 msgNo);
+bool fopMsgM_hyrule_language_check(u32 i_msgNo);
#endif
-s32 fopMsgM_setStageLayer(void*);
-fpc_ProcID fopMsgM_messageSet(u32 i_msgNo, fopAc_ac_c* i_actorP);
-fpc_ProcID fopMsgM_messageSet(u32 param_0, cXyz*);
-fpc_ProcID fopMsgM_messageSet(u32 param_0);
-fpc_ProcID fopMsgM_scopeMessageSet(u32 param_0);
-int fopMsgM_messageSetDemo(u32 param_0);
-msg_class* fopMsgM_SearchByID(fpc_ProcID param_0);
-char* fopMsgM_messageGet(char* dst, u32 msgNo);
-char* fopMsgM_passwordGet(char* dst, u32 msgNo);
-fpc_ProcID fop_Timer_create(s16 param_0, u8 param_1, u16 param_2, u8 param_3, u8 param_4, f32 param_5,
- f32 param_6, f32 param_7, f32 param_8, fopMsgCreateFunc createFunc);
-inline fpc_ProcID fopMsgM_Timer_create(s16 param_0, u8 param_1, u16 param_2, u8 param_3, u8 param_4,
- f32 param_5, f32 param_6, f32 param_7, f32 param_8,
- fopMsgCreateFunc createFunc) {
- return fop_Timer_create(param_0, param_1, param_2, param_3, param_4, param_5, param_6, param_7,
- param_8, createFunc);
+s32 fopMsgM_setStageLayer(void* i_proc);
+fpc_ProcID fopMsgM_messageSet(u32 i_msgNo, fopAc_ac_c* i_actor);
+fpc_ProcID fopMsgM_messageSet(u32 i_msgNo, cXyz*);
+fpc_ProcID fopMsgM_messageSet(u32 i_msgNo);
+fpc_ProcID fopMsgM_scopeMessageSet(u32 i_msgNo);
+int fopMsgM_messageSetDemo(u32 i_msgNo);
+msg_class* fopMsgM_SearchByID(fpc_ProcID i_pid);
+char* fopMsgM_messageGet(char* i_dest, u32 i_msgNo);
+char* fopMsgM_passwordGet(char* i_dest, u32 i_msgNo);
+fpc_ProcID fop_Timer_create(s16 i_procName, u8 i_mode, u16 i_limitTimeMs, u8 i_showType, u8 i_iconType, f32 i_posX, f32 i_posY, f32 i_rupeePosX, f32 i_rupeePosY, fopMsgCreateFunc i_createFunc);
+
+inline fpc_ProcID fopMsgM_Timer_create(s16 i_procName, u8 i_mode, u16 i_limitTimeMs, u8 i_showType, u8 i_iconType, f32 i_posX, f32 i_posY, f32 i_rupeePosX, f32 i_rupeePosY, fopMsgCreateFunc createFunc) {
+ return fop_Timer_create(i_procName, i_mode, i_limitTimeMs, i_showType, i_iconType, i_posX, i_posY, i_rupeePosX, i_rupeePosY, createFunc);
}
-void fopMsgM_setPaneData(fopMsgM_pane_class*, J2DPane*);
-void fopMsgM_setPaneData(fopMsgM_pane_class*, J2DScreen*, u32);
-void fopMsgM_setInitAlpha(fopMsgM_pane_class*);
-void fopMsgM_setNowAlpha(fopMsgM_pane_class*, f32);
-void fopMsgM_setNowAlphaZero(fopMsgM_pane_class*);
-void fopMsgM_setAlpha(fopMsgM_pane_class*);
-void fopMsgM_paneScaleX(fopMsgM_pane_class* i_this, f32 s);
-void fopMsgM_paneScaleY(fopMsgM_pane_class* i_this, f32 s);
-void fopMsgM_paneScale(fopMsgM_pane_class* i_this, f32 sx, f32 sy);
-void fopMsgM_paneScaleXY(fopMsgM_pane_class*, f32);
-void fopMsgM_cposMove(fopMsgM_pane_class*);
-void fopMsgM_paneTrans(fopMsgM_pane_class*, f32, f32);
-
-void fopMsgM_setPaneData(fopMsgM_pane_alpha_class*, J2DPane*);
-void fopMsgM_setPaneData(fopMsgM_pane_alpha_class*, J2DScreen*, u32);
-void fopMsgM_setNowAlpha(fopMsgM_pane_alpha_class*, f32);
-void fopMsgM_setAlpha(fopMsgM_pane_alpha_class*);
-
-u32 fopMsgM_searchMessageNumber(u32);
+void fopMsgM_setPaneData(fopMsgM_pane_class* i_pane, J2DPane* i_paneData);
+void fopMsgM_setPaneData(fopMsgM_pane_class* i_pane, J2DScreen* i_scrn, u32 i_tag);
+void fopMsgM_setInitAlpha(fopMsgM_pane_class* i_pane);
+void fopMsgM_setNowAlpha(fopMsgM_pane_class* i_pane, f32 i_alpha);
+void fopMsgM_setNowAlphaZero(fopMsgM_pane_class* i_pane);
+void fopMsgM_setAlpha(fopMsgM_pane_class* i_pane);
+void fopMsgM_paneScaleX(fopMsgM_pane_class* i_pane, f32 i_scale);
+void fopMsgM_paneScaleY(fopMsgM_pane_class* i_pane, f32 i_scale);
+void fopMsgM_paneScale(fopMsgM_pane_class* i_pane, f32 i_scaleX, f32 i_scaleY);
+void fopMsgM_paneScaleXY(fopMsgM_pane_class* i_pane, f32 i_scale);
+void fopMsgM_cposMove(fopMsgM_pane_class* i_pane);
+void fopMsgM_paneTrans(fopMsgM_pane_class* i_pane, f32 i_transX, f32 i_transY);
+
+void fopMsgM_setPaneData(fopMsgM_pane_alpha_class* i_pane, J2DPane* i_paneData);
+void fopMsgM_setPaneData(fopMsgM_pane_alpha_class* i_pane, J2DScreen* i_scrn, u32 i_tag);
+void fopMsgM_setNowAlpha(fopMsgM_pane_alpha_class* i_pane, f32 i_alpha);
+void fopMsgM_setAlpha(fopMsgM_pane_alpha_class* i_pane);
+
+u32 fopMsgM_searchMessageNumber(u32 i_msgNo);
bool fopMsgM_forceSendOn();
void fopMsgM_messageSendOn();
void fopMsgM_messageSendOff();
@@ -484,20 +479,20 @@ bool fopMsgM_tactMsgFlagCheck();
void fopMsgM_nextMsgFlagOff();
bool fopMsgM_nextMsgFlagCheck();
-void fopMsgM_blendInit(fopMsgM_pane_class* i_this, const char* data);
+void fopMsgM_blendInit(fopMsgM_pane_class* i_pane, const char* data);
void fopMsgM_blendInit(J2DPicture* pic, const char* data);
-u8 fopMsgM_itemNumIdx(u8 i);
-u8 fopMsgM_itemNum(u8 itemNo);
-u32 fopMsgM_getColorTable(u16 param_1);
-void fopMsgM_blendDraw(fopMsgM_pane_class* i_this, const char* data);
+u8 fopMsgM_itemNumIdx(u8 i_no);
+u8 fopMsgM_itemNum(u8 i_itemNo);
+u32 fopMsgM_getColorTable(u16 i_colorNo);
+void fopMsgM_blendDraw(fopMsgM_pane_class* i_pane, const char* data);
void fopMsgM_blendDraw(J2DPicture* pic, const char* data);
void fopMsgM_setFontsizeCenter(char* param_1, char* param_2, char* param_3, char* param_4, int param_5, int param_6);
void fopMsgM_setFontsizeCenter2(char* a, char* b, char* c, char* d, int, int size, int, int);
-void fopMsgM_outFontSet(J2DPicture*, J2DPicture*, s16*, u32, u8);
-void fopMsgM_outFontSet(J2DPicture*, s16*, u32, u8);
-void fopMsgM_outFontDraw(J2DPicture*, J2DPicture*, int, int, int, s16*, u8, u8);
-void fopMsgM_outFontDraw2(J2DPicture*, J2DPicture*, int, int, int, int, s16*, u8, u8);
+void fopMsgM_outFontSet(J2DPicture* i_iconPic, J2DPicture* i_sdwPic, s16* i_timer, u32 i_color, u8 i_iconNo);
+void fopMsgM_outFontSet(J2DPicture* i_iconPic, s16* i_timer, u32 i_color, u8 i_iconNo);
+void fopMsgM_outFontDraw(J2DPicture* i_iconPic, J2DPicture* i_sdwPic, int param_3, int param_4, int param_5, s16* i_timer, u8 i_alpha, u8 i_iconNo);
+void fopMsgM_outFontDraw2(J2DPicture* i_iconPic, J2DPicture* param_2, int param_3, int param_4, int i_width, int i_height, s16* i_timer, u8 i_alpha, u8 i_iconNo);
extern u16 zfont[][2];
diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h
index 2651d432..938e2839 100644
--- a/include/m_Do/m_Do_MemCard.h
+++ b/include/m_Do/m_Do_MemCard.h
@@ -19,6 +19,19 @@ public:
#endif
};
+ enum CardStatus {
+ CARD_STAT_WAIT,
+ CARD_STAT_RESTORE,
+ CARD_STAT_CREATE,
+ CARD_STAT_FORMAT,
+ CARD_STAT_READY,
+ CARD_STAT_DETACH,
+ CARD_STAT_ENCODING,
+ CARD_STAT_ERROR,
+ CARD_STAT_WRONG_DEVICE = 10,
+ CARD_STAT_IOERROR = 12,
+ };
+
mDoMemCd_Ctrl_c();
void ThdInit();
void main();
@@ -57,17 +70,17 @@ public:
u8 getCopyToPos() { return mCopyToPos; }
void setCopyToPos(u8 pos) { mCopyToPos = pos; }
- void clearProbeStat() {}
+ void clearProbeStat() { mProbeStat = 2; }
u64 getCardSerialNo() { return mCardSerialNo; }
- void getDataVersion() {}
- void getProbeStat() {}
+ u32 getDataVersion() { return mDataVersion; }
+ u8 getProbeStat() { return mProbeStat; }
/* 0x0000 */ u8 mData[3 * sizeof(card_gamedata)];
/* 0x1650 */ u8* mPictDataPtr;
/* 0x1654 */ u8* mPictDataWritePtr;
/* 0x1658 */ u8 mCardSlot;
/* 0x1659 */ u8 mCopyToPos;
- /* 0x165A */ u8 field_0x165A;
+ /* 0x165A */ u8 mProbeStat;
/* 0x165B */ u8 field_0x165B;
/* 0x165C */ s32 mCommand;
/* 0x1660 */ s32 field_0x1660;
@@ -91,8 +104,8 @@ inline void mDoMemCd_ThdInit() {
g_mDoMemCd_control.ThdInit();
}
-inline void mDoMemCd_Save(void* i_data, u32 param_1, u32 param_2) {
- g_mDoMemCd_control.save(i_data,param_1,param_2);
+inline void mDoMemCd_Save(void* i_data, u32 i_size, u32 i_position) {
+ g_mDoMemCd_control.save(i_data, i_size, i_position);
}
inline u8 mDoMemCd_getNowSlot() {
@@ -103,28 +116,28 @@ inline u64 mDoMemCd_getCardSerialNo() {
return g_mDoMemCd_control.getCardSerialNo();
}
-inline void mDoMemCd_setCardSerialNo(u64 v) {
- g_mDoMemCd_control.setCardSerialNo(v);
+inline void mDoMemCd_setCardSerialNo(u64 i_serialNo) {
+ g_mDoMemCd_control.setCardSerialNo(i_serialNo);
}
-inline void mDoMemCd_setDataVersion(u32 v) {
- g_mDoMemCd_control.setDataVersion(v);
+inline void mDoMemCd_setDataVersion(u32 i_version) {
+ g_mDoMemCd_control.setDataVersion(i_version);
}
inline u8* mDoMemCd_getPictDataPtr() {
return g_mDoMemCd_control.getPictDataPtr();
}
-inline void mDoMemCd_setPictDataPtr(u8* v) {
- g_mDoMemCd_control.setPictDataPtr(v);
+inline void mDoMemCd_setPictDataPtr(u8* i_dataPtr) {
+ g_mDoMemCd_control.setPictDataPtr(i_dataPtr);
}
inline u8* mDoMemCd_getPictWriteDataPtr() {
return g_mDoMemCd_control.getPictWriteDataPtr();
}
-inline void mDoMemCd_setPictWriteDataPtr(u8* v) {
- g_mDoMemCd_control.setPictWriteDataPtr(v);
+inline void mDoMemCd_setPictWriteDataPtr(u8* i_dataPtr) {
+ g_mDoMemCd_control.setPictWriteDataPtr(i_dataPtr);
}
inline u8 mDoMemCd_getCopyToPos() {
@@ -151,11 +164,28 @@ inline u32 mDoMemCd_getStatus(u32 status) {
return g_mDoMemCd_control.getStatus(status);
}
-inline void mDoMemCd_Format() {}
-inline void mDoMemCd_Load() {}
-inline void mDoMemCd_LoadSync(void*, u32, u32) {}
-inline void mDoMemCd_clearProbeStat() {}
-inline void mDoMemCd_getDataVersion() {}
-inline void mDoMemCd_getProbeStat() {}
+inline void mDoMemCd_Format() {
+ g_mDoMemCd_control.command_format();
+}
+
+inline void mDoMemCd_Load() {
+ g_mDoMemCd_control.load();
+}
+
+inline u32 mDoMemCd_LoadSync(void* i_buffer, u32 i_size, u32 i_position) {
+ return g_mDoMemCd_control.LoadSync(i_buffer, i_size, i_position);
+}
+
+inline void mDoMemCd_clearProbeStat() {
+ g_mDoMemCd_control.clearProbeStat();
+}
+
+inline u32 mDoMemCd_getDataVersion() {
+ return g_mDoMemCd_control.getDataVersion();
+}
+
+inline u8 mDoMemCd_getProbeStat() {
+ return g_mDoMemCd_control.getProbeStat();
+}
#endif /* M_DO_M_DO_MEMCARD_H */