summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMattias Blum <142374929+mattias-blum@users.noreply.github.com>2026-07-18 17:37:31 -0400
committerGitHub <noreply@github.com>2026-07-18 17:37:31 -0400
commitdb61d3102208a949d7941f4491706eba16ba2686 (patch)
tree6383abfb9d89786d1d456637d031a32c60bc83a3 /include
parentc1513e97e57f13a37f1d6637d508b04da8490654 (diff)
d_picture_box mostly matching for GZLE01 (#1125)
* initial progress * more progress * more progress * d_picture_box mostly matching for GZLE01 Unable to resolve the regswap in dJle_Pb_c::draw() * reverted some changes to member names * filled missing enum value * PR changes made * renamed some fields
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J2DGraph/J2DPane.h3
-rw-r--r--include/d/d_com_inf_game.h29
-rw-r--r--include/d/d_picture_box.h139
-rw-r--r--include/f_op/f_op_msg.h1
-rw-r--r--include/f_op/f_op_msg_mng.h6
-rw-r--r--include/m_Do/m_Do_graphic.h6
6 files changed, 167 insertions, 17 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h
index 5bd81613..ccd6e785 100644
--- a/include/JSystem/J2DGraph/J2DPane.h
+++ b/include/JSystem/J2DGraph/J2DPane.h
@@ -54,8 +54,9 @@ public:
virtual void move(f32 x, f32 y);
virtual void add(f32 x, f32 y);
- // fakematch, this getter doesn't exist
+ // fakematch, these getters don't exist
f32 resize__getMinX() const { return mBounds.i.x; }
+ f32 resize__getMinY() const { return mBounds.i.y; }
virtual void resize(f32 w, f32 h) {
f32 x = resize__getMinX();
x += w;
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index b6e002eb..bbb4b67e 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -503,8 +503,9 @@ public:
void setPictureStatusOn() { mPictureStatus = 2; }
void setPictureStatusGetOn(u8 to_set) {
mPictureStatus = 3;
- field_0x495f = to_set;
+ mGetPictureNum = to_set;
}
+ u8 getGetPictureNum() { return mGetPictureNum; }
u8 getScopeMesgStatus() { return mScopeMesgStatus; }
void setScopeMesgStatus(u8 status) { mScopeMesgStatus = status; }
@@ -589,6 +590,7 @@ public:
void setActionIconArchive(JKRArchive * pArc) { mpActionIconArchive = pArc; }
JKRArchive* getActionIconArchive() { return mpActionIconArchive; }
void setScopeResArchive(JKRArchive * pArc) { mpScopeResArchive = pArc; }
+ JKRArchive* getCameraResArchive() { return mpCameraResArchive; }
void setCameraResArchive(JKRArchive * pArc) { mpCameraResArchive = pArc; }
JKRArchive* getSwimResArchive() { return mpSwimResArchive; }
void setSwimResArchive(JKRArchive * pArc) { mpSwimResArchive = pArc; }
@@ -623,7 +625,9 @@ public:
u8 getSelectPicture() { return mSelectPicture; }
void setSelectPicture(u8 i) { mSelectPicture = i; }
u8 getPictureResult() { return mPictureResult; }
+ void setPictureResult(u8 i) { mPictureResult = i; }
u8 getPictureResultDetail() { return mPictureResultDetail; }
+ void setPictureResultDetail(u8 i) { mPictureResultDetail = i; }
void setBossBattleData(JKRAramBlock* aramBlock, int i) { mBossBattleData[i] = aramBlock; }
void startFwaterTimer() { mFwaterTimer = 1; }
@@ -826,7 +830,7 @@ public:
/* 0x495C */ u8 mPictureResult;
/* 0x495D */ u8 mPictureResultDetail;
/* 0x495E */ u8 mPictureStatus;
- /* 0x495F */ u8 field_0x495f;
+ /* 0x495F */ u8 mGetPictureNum;
/* 0x4960 */ u8 mPictureFormat;
/* 0x4961 */ u8 mSelectPicture;
/* 0x4962 */ u8 mHeapLockFlag;
@@ -2981,8 +2985,8 @@ inline u8 dComIfGp_getAStatusForce() {
}
// B Button
-inline void dComIfGp_setAStatusForce(u8 value) {
- g_dComIfG_gameInfo.play.setAStatusForce(value);
+inline void dComIfGp_setAStatusForce(u8 status) {
+ g_dComIfG_gameInfo.play.setAStatusForce(status);
}
// A Button
@@ -2991,8 +2995,8 @@ inline u8 dComIfGp_getDoStatusForce() {
}
// A Button
-inline void dComIfGp_setDoStatusForce(u8 value) {
- g_dComIfG_gameInfo.play.setDoStatusForce(value);
+inline void dComIfGp_setDoStatusForce(u8 status) {
+ g_dComIfG_gameInfo.play.setDoStatusForce(status);
}
inline u8 dComIfGp_getPictureStatus() {
@@ -3007,6 +3011,10 @@ inline void dComIfGp_setPictureStatusOn() {
g_dComIfG_gameInfo.play.setPictureStatusOn();
}
+inline u8 dComIfGp_getGetPictureNum() {
+ return g_dComIfG_gameInfo.play.getGetPictureNum();
+}
+
inline void dComIfGp_setPictureStatusGetOn(u8 to_set){
g_dComIfG_gameInfo.play.setPictureStatusGetOn(to_set);
}
@@ -3207,10 +3215,18 @@ inline u8 dComIfGp_getPictureResult() {
return g_dComIfG_gameInfo.play.getPictureResult();
}
+inline void dComIfGp_setPictureResult(u8 i) {
+ g_dComIfG_gameInfo.play.setPictureResult(i);
+}
+
inline u8 dComIfGp_getPictureResultDetail() {
return g_dComIfG_gameInfo.play.getPictureResultDetail();
}
+inline void dComIfGp_setPictureResultDetail(u8 i) {
+ g_dComIfG_gameInfo.play.setPictureResultDetail(i);
+}
+
inline void dComIfGp_setBossBattleData(JKRAramBlock* aramBlock, int i) {
g_dComIfG_gameInfo.play.setBossBattleData(aramBlock, i);
}
@@ -3897,6 +3913,7 @@ inline JKRArchive* dComIfGp_getErrorResArchive() { return g_dComIfG_gameInfo.pla
inline void dComIfGp_setActionIconArchive(JKRArchive * pArc) { g_dComIfG_gameInfo.play.setActionIconArchive(pArc); }
inline JKRArchive* dComIfGp_getActionIconArchive() { return g_dComIfG_gameInfo.play.getActionIconArchive(); }
inline void dComIfGp_setScopeResArchive(JKRArchive * pArc) { g_dComIfG_gameInfo.play.setScopeResArchive(pArc); }
+inline JKRArchive* dComIfGp_getCameraResArchive() { return g_dComIfG_gameInfo.play.getCameraResArchive(); }
inline void dComIfGp_setCameraResArchive(JKRArchive * pArc) { g_dComIfG_gameInfo.play.setCameraResArchive(pArc); }
inline JKRArchive* dComIfGp_getSwimResArchive() { return g_dComIfG_gameInfo.play.getSwimResArchive(); }
inline void dComIfGp_setSwimResArchive(JKRArchive * pArc) { g_dComIfG_gameInfo.play.setSwimResArchive(pArc); }
diff --git a/include/d/d_picture_box.h b/include/d/d_picture_box.h
index 0d6c1144..290f45f7 100644
--- a/include/d/d_picture_box.h
+++ b/include/d/d_picture_box.h
@@ -3,17 +3,58 @@
#include "dolphin/types.h"
#include "f_op/f_op_msg.h"
+#include "f_op/f_op_msg_mng.h"
+#include "d/d_drawlist.h"
+#include "JSystem/J2DGraph/J2DScreen.h"
+#include "JSystem/J2DGraph/J2DTextBox.h"
+#include "d/d_lib.h"
+
+class J3DModel;
class JKRExpHeap;
+class J2DScreen;
+class J2DTextBox;
+class mDoDvdThd_toMainRam_c;
struct fopMsgM_pane_class;
struct fopMsgM_pane_alpha_class;
-class sub_pb_class : public msg_class {
-public:
- /* Place member variables here */
+enum dJlePbExecState {
+ PB_EXEC_CAMERA_OPEN_e = 0x0,
+ PB_EXEC_CAMERA_MOVE_e = 0x1,
+ PB_EXEC_BROWSE_OPEN_e = 0x2,
+ PB_EXEC_BROWSE_MOVE_e = 0x3,
+ PB_EXEC_GET_OPEN_e = 0x4,
+ PB_EXEC_GET_MOVE_e = 0x5,
+ PB_EXEC_CLOSE_e = 0x6,
+ PB_EXEC_CLOSED_e = 0x7,
+};
+
+enum dJlePbModeSubState {
+ PB_SUB_IDLE_e = 0x0,
+ PB_SUB_CONFIRM_e = 0x1,
+ PB_SUB_SHIFT_1_TO_0_e = 0x2,
+ PB_SUB_SHIFT_0_TO_2_e = 0x3,
+ PB_SUB_SHIFT_0_TO_1_e = 0x4,
+ PB_SUB_SHIFT_2_TO_0_e = 0x5,
};
-class dJle_Pb_c {
+enum dJlePbViewMode {
+ PB_VIEW_CAMERA_e = 0x0,
+ PB_VIEW_BROWSE_e = 0x1,
+ PB_VIEW_GET_e = 0x2,
+};
+
+struct dPbPhotoSlotData {
+ /* 0x0000 */ u8 pad[0x1EE0 - 0x0000];
+ /* 0x1EE0 */ u32 mSnapResultId;
+ /* 0x1EE4 */ u8 mSnapResultDetail;
+ /* 0x1EE5 */ u8 mPhotoFormat;
+};
+
+void dPb_erasePicture();
+
+class dJle_Pb_c : public dDlst_base_c {
+public:
void alphaChange(fopMsgM_pane_alpha_class*, f32) {}
void alphaChange(fopMsgM_pane_class*, f32) {}
void getMemory(void*, int) {}
@@ -49,8 +90,8 @@ class dJle_Pb_c {
void setColorInit(u8);
void setColorAnime(u8);
void changeData();
- void label_sort();
- void getPicLabelData(u8);
+ bool label_sort();
+ u8 getPicLabelData(u8);
void shutterLineRotateCenter(f32, int);
void shutterLineRotateInitPos(f32, int);
void shutterLineMove();
@@ -70,6 +111,90 @@ class dJle_Pb_c {
void _gmove();
void draw();
void _delete(JKRExpHeap*);
+
+public:
+ /* 0x004 */ J2DScreen* scrn;
+ /* 0x008 */ J2DScreen* scrn1;
+ /* 0x00C */ J2DScreen* scrn2;
+ /* 0x010 */ fopMsgM_pane_class pane_st[12];
+ /* 0x2B0 */ fopMsgM_pane_class pane_sb[12];
+ /* 0x550 */ fopMsgM_pane_class pane_ylig;
+ /* 0x588 */ fopMsgM_pane_class pane_ylef;
+ /* 0x5C0 */ fopMsgM_pane_class pane_icn[3];
+ /* 0x668 */ fopMsgM_pane_class pane_emp[3];
+ /* 0x710 */ fopMsgM_pane_class pane_ct1;
+ /* 0x748 */ fopMsgM_pane_class pane_ct2;
+ /* 0x780 */ fopMsgM_pane_class pane_sp[8];
+ /* 0x940 */ fopMsgM_pane_class pane_no[3];
+ /* 0x9E8 */ fopMsgM_pane_class pane_nob[3];
+ /* 0xA90 */ fopMsgM_pane_class pane_nok[3];
+ /* 0xB38 */ fopMsgM_pane_class pane_b1;
+ /* 0xB70 */ fopMsgM_pane_class pane_b2;
+ /* 0xBA8 */ fopMsgM_pane_class pane_wnum;
+ /* 0xBE0 */ fopMsgM_pane_class pane_wnuk;
+ /* 0xC18 */ fopMsgM_pane_class pane_wpba;
+ /* 0xC50 */ fopMsgM_pane_class pane_wbap;
+ /* 0xC88 */ fopMsgM_pane_class pane_wpsc;
+ /* 0xCC0 */ fopMsgM_pane_class pane_yrtn;
+ /* 0xCF8 */ fopMsgM_pane_class pane_yzom;
+ /* 0xD30 */ fopMsgM_pane_class pane_crtn;
+ /* 0xD68 */ fopMsgM_pane_class pane_czom;
+ /* 0xDA0 */ fopMsgM_pane_class pane_lrtn;
+ /* 0xDD8 */ fopMsgM_pane_class pane_rzom;
+ /* 0xE10 */ fopMsgM_pane_class pane_shut;
+ /* 0xE48 */ fopMsgM_pane_class pane_fd00;
+ /* 0xE80 */ fopMsgM_pane_class pane_wp04;
+ /* 0xEB8 */ fopMsgM_pane_class pane_wp01;
+ /* 0xEF0 */ fopMsgM_pane_class pane_wp02;
+ /* 0xF28 */ fopMsgM_pane_class pane_wp03;
+ /* 0xF60 */ fopMsgM_pane_alpha_class pane_tx[4];
+ /* 0xF80 */ mDoDvdThd_toMainRam_c* mImportedPhotoLoadReq; // Async request for imported gallery photo data.
+ /* 0xF84 */ J2DPicture* mMsgIconFontMainPic; // Message icon sheet used by fopMsgM_outFontDraw.
+ /* 0xF88 */ J2DPicture* mMsgIconFontSubPic; // Secondary icon sheet used by fopMsgM_outFontDraw.
+ /* 0xF8C */ J2DPicture* mMsgSelectArrowPic; // Select-arrow sprite for two-choice message prompts.
+ /* 0xF90 */ JUTFont* font0;
+ /* 0xF94 */ JUTFont* font1;
+ /* 0xF98 */ STControl* stick;
+ /* 0xF9C */ u8 mF9C[0xFA0 - 0xF9C];
+ /* 0xFA0 */ mesg_header* head_p;
+ /* 0xFA4 */ JMSMesgEntry_c mMsgEntry; // Current parsed message entry metadata.
+ /* 0xFBC */ fopMsgM_msgDataProc_c mMsgDataProc; // Message parser/layout state and choice helper.
+ /* 0x125C */ JUtility::TColor icn_white;
+ /* 0x1260 */ JUtility::TColor icn_black;
+ /* 0x1264 */ JUtility::TColor emp_white;
+ /* 0x1268 */ JUtility::TColor emp_black;
+ /* 0x126C */ dPbPhotoSlotData* mPhotoBuffer[4]; // Three saved slots + one import/get temporary slot.
+ /* 0x127C */ f32 mZoomScale;
+ /* 0x1280 */ f32 mShutterLineX1[12];
+ /* 0x12B0 */ f32 mShutterLineY1[12];
+ /* 0x12E0 */ f32 mShutterLineX2[12];
+ /* 0x1310 */ f32 mShutterLineY2[12];
+ /* 0x1340 */ int mChoiceCursorX0; // X anchor for first message choice marker.
+ /* 0x1344 */ int mChoiceCursorX1; // X anchor for second message choice marker.
+ /* 0x1348 */ int mChoiceCursorY; // Y anchor for message choice marker.
+ /* 0x134C */ int mChoiceCursorYAlt; // Alternate Y anchor parsed from second choice token.
+ /* 0x1350 */ char* mMsgTextBuffer[4]; // Output text buffers for the four message panes.
+ /* 0x1360 */ s16 mFadeTimer; // Open/close fade timer.
+ /* 0x1362 */ s16 mShutterCounter;
+ /* 0x1364 */ s16 mMsgLineCount; // Cached message line count for vertical alignment.
+ /* 0x1366 */ s16 mMsgIconDrawState; // Scratch state used by icon font setup/draw helpers.
+ /* 0x1368 */ u8 mPictureSlotSortMap[3]; // Mapping from sorted slot order to source slot index.
+ /* 0x136B */ u8 mExecState; // Top-level state machine used by execute dispatch (open/move/close/etc.).
+ /* 0x136C */ u8 mModeSubState; // Per-mode substate (camera capture/select, browse erase/slide animation states).
+ /* 0x136D */ u8 mViewMode; // Selects camera vs browse vs get-photo mode paths.
+ /* 0x136E */ u8 mSelectedPhotoSlot; // Active browse slot index.
+ /* 0x136F */ u8 mSelectedChoiceIndex; // Active index in two-choice message prompts.
+ /* 0x1370 */ u8 mModeSwapActive; // Non-zero while shutter transition between camera/browse is running.
+ /* 0x1371 */ u8 mPhotoSlotOccupied[3]; // Per-slot occupancy flags for saved photos.
+ /* 0x1374 */ u8 mPhotoDeletedFlag; // Set when a photo was deleted during this session.
+ /* 0x1375 */ u8 mChoiceArrowIconIdx; // Icon token index currently used for select-arrow placement.
+ /* 0x1376 */ u8 mCaptureFormat;
+};
+
+class sub_pb_class : public msg_class {
+public:
+ /* 0x00FC */ JKRExpHeap* heap;
+ /* 0x0100 */ dJle_Pb_c* dPb_c;
+ /* 0x0104 */ dPbPhotoSlotData* buffer[4];
};
-void dPb_erasePicture();
#endif /* D_PICTURE_BOX_H */
diff --git a/include/f_op/f_op_msg.h b/include/f_op/f_op_msg.h
index d8b7e0ae..760c8a21 100644
--- a/include/f_op/f_op_msg.h
+++ b/include/f_op/f_op_msg.h
@@ -7,6 +7,7 @@
class fopAc_ac_c;
enum fopMsg_MessageStatus_e {
+ fopMsgStts_MSG_UNK0_e = 0x00,
fopMsgStts_MSG_PREPARING_e = 0x01,
fopMsgStts_BOX_OPENING_e = 0x02,
fopMsgStts_MSG_TYPING_e = 0x06,
diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h
index cddc59c0..e82fbf70 100644
--- a/include/f_op/f_op_msg_mng.h
+++ b/include/f_op/f_op_msg_mng.h
@@ -239,7 +239,7 @@ public:
void tag_input_kenshi();
#endif
- void getIconColor(int) {}
+ u32 getIconColor(int i_no) { return field_0x1E0[i_no]; }
u8 getIconNum(int i_no) { return field_0x281[i_no]; }
int getIconPosX(int i_no) { return field_0x168[i_no]; }
int getIconPosY(int i_no) { return field_0x1A4[i_no]; }
@@ -365,9 +365,9 @@ public:
/* 0x164 */ int field_0x164; // keyWaitTimer?
/* 0x168 */ int field_0x168[0xF]; // IconPosX
/* 0x1A4 */ int field_0x1A4[0xF]; // IconPosY
- /* 0x1A4 */ u32 field_0x1E0[0xF];
+ /* 0x1E0 */ u32 field_0x1E0[0xF]; // IconColor
/* 0x21C */ int field_0x21C;
- /* 0x21C */ u32 field_0x220[0xF];
+ /* 0x220 */ u32 field_0x220[0xF];
/* 0x25C */ u32 field_0x25C;
/* 0x260 */ s16 field_0x260;
/* 0x264 */ f32 field_0x264;
diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h
index ff2a003d..0f7bedee 100644
--- a/include/m_Do/m_Do_graphic.h
+++ b/include/m_Do/m_Do_graphic.h
@@ -11,6 +11,12 @@ bool mDoGph_AfterOfDraw();
bool mDoGph_Painter();
void mDoGph_BlankingON();
void mDoGph_BlankingOFF();
+void mDoGph_setCaptureStep(s16 step);
+void* mDoGph_getCaptureTextureBuffer();
+void mDoGph_setCaptureCaptureFormat(u8 fmt);
+void mDoGph_setCaptureTextureFormat(u8 fmt);
+s16 mDoGph_getCaptureStep();
+void mDoGph_CaptureCansel();
struct ResTIMG;