summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZeclos <Zeclos99@gmail.com>2025-05-25 23:01:01 +0200
committerGitHub <noreply@github.com>2025-05-25 17:01:01 -0400
commit3755fbfd3904bd100c155e4007b6196dc83edeef (patch)
treea0c9db7b5374d5566db0343423447434f7acd429 /include
parent7cd75e8f7b01a45ca8c72facfd5b4a3c1906c0e1 (diff)
D_a_npc_photo (#759)
* bit too difficult for me for now, might go back later * progress * getmsg * logic matching data isnt * data section matches * mathubcg 100% * cleanup * revert this change * final cleanup and configure.py * nevermind cleanup * Equivalent onstead of matching * removed padding * cleanup code comments and a bit more * Fix build --------- Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_npc_photo.h130
-rw-r--r--include/d/actor/d_a_tag_photo.h7
-rw-r--r--include/d/d_com_inf_game.h8
-rw-r--r--include/d/d_picture_box.h2
4 files changed, 116 insertions, 31 deletions
diff --git a/include/d/actor/d_a_npc_photo.h b/include/d/actor/d_a_npc_photo.h
index 56d71ec0..50de06ed 100644
--- a/include/d/actor/d_a_npc_photo.h
+++ b/include/d/actor/d_a_npc_photo.h
@@ -3,14 +3,25 @@
#include "f_op/f_op_actor.h"
#include "d/d_cc_d.h"
+#include "d/d_npc.h"
struct sPhotoAnmDat {
-
+ /* 0x00 */ u8 field_0x00;
+ /* 0x01 */ u8 field_0x01;
+ /* 0x02 */ u8 field_0x02;
};
-class daNpcPhoto_c : public fopAc_ac_c {
+class daNpcPhoto_c : public fopNpc_npc_c {
public:
- void getPhaseP() {}
+ enum Prm_e {
+ PRM_RAIL_ID_W = 0x8,
+ PRM_RAIL_ID_S = 0x10,
+
+ PRM_ARG0_W = 0x8,
+ PRM_ARG0_S = 0x0,
+ };
+
+ request_of_phase_process_class* getPhaseP() { return &mPhs1; }
void incMsgTbl() {}
void isDate() {}
void nullMsgTbl() {}
@@ -20,12 +31,12 @@ public:
daNpcPhoto_c();
cPhs_State _create();
- void createHeap();
- void createInit();
+ BOOL createHeap();
+ cPhs_State createInit();
bool _delete();
bool _draw();
bool _execute();
- void executeCommon();
+ bool executeCommon();
void executeSetMode(unsigned char);
void executeWait();
void executeTalk();
@@ -36,46 +47,109 @@ public:
void eventMove();
void privateCut();
void eventMesSetInit(int);
- void eventMesSet();
+ bool eventMesSet();
void eventSeSetInit(int);
void eventPosSetInit();
void eventGetItemInit();
- void eventGetItem();
+ bool eventGetItem();
void eventSetAngleInit();
void eventSetEyeInit();
- void eventSetEye();
+ bool eventSetEye();
void eventTurnToPlayerInit();
- void eventTurnToPlayer();
+ bool eventTurnToPlayer();
void eventClrHanmeInit();
void eventGetPhotoInit();
- void eventGetPhoto();
+ bool eventGetPhoto();
void eventMesSetUbInit(int);
- void eventMesSetUb();
- void eventLookUb();
- void talk2(int);
+ bool eventMesSetUb();
+ bool eventLookUb();
+ u16 talk2(int);
void setMsgCamera();
- void next_msgStatus(unsigned long*);
- void getMsg();
- void setMessage(unsigned long);
+ u16 next_msgStatus(u32*);
+ u32 getMsg();
+ void setMessage(u32);
void setAnmFromMsgTag();
- void getPrmRailID();
- void getPrmArg0();
+ u8 getPrmRailID();
+ u8 getPrmArg0();
void setMtx();
void chkAttention();
void lookBack();
- void initTexPatternAnm(bool, int);
+ BOOL initTexPatternAnm(bool, int);
void playTexPatternAnm();
void playAnm();
- void setAnm(unsigned char, int, float);
- void setAnmTbl(sPhotoAnmDat*);
- void XyCheckCB(int);
- void XyEventCB(int);
- void isPhotoOk();
- void isPhotoDxOk();
+ void setAnm(u8, int, f32);
+ bool setAnmTbl(sPhotoAnmDat*);
+ s16 XyCheckCB(int);
+ s16 XyEventCB(int);
+ BOOL isPhotoOk();
+ BOOL isPhotoDxOk();
void setCollision(dCcD_Cyl*, cXyz, float, float);
+ static const char m_arcname[4];
+
public:
- /* Place member variables here */
-};
+ typedef void(daNpcPhoto_c::*MoveFunc_t)();
+
+ /* 0x6C4 */ request_of_phase_process_class mPhs1;
+ /* 0x6CC */ request_of_phase_process_class mPhs2;
+ /* 0x6D4 */ J3DAnmTexPattern* m_head_tex_pattern;
+ /* 0x6D8 */ mDoExt_btpAnm mBtpAnm;
+ /* 0x6EC */ u32 mShadowId;
+ /* 0x6F0 */ dNpc_PathRun_c mPathRun;
+ /* 0x6F8 */ dCcD_Cyl field_0x6F8[2];
+ /* 0x958 */ cXyz field_0x958;
+ /* 0x964 */ cXyz mLookAtPos;
+ /* 0x970 */ cXyz mEyePos;
+ /* 0x97C */ sPhotoAnmDat* mpAnmDat;
+ /* 0x980 */ u32* field_0x980;
+ /* 0x984 */ f32 field_0x984;
+ /* 0x988 */ f32 field_0x988;
+ /* 0x98C */ f32 field_0x98C;
+ /* 0x990 */ int mMsgNno;
+ /* 0x994 */ bool field_0x994;
+ /* 0x996 */ s16 mPhotoLinkBackEventIdx;
+ /* 0x998 */ s16 mPhotoGetItemEventIdx;
+ /* 0x99A */ s16 mPhotoGetItem2EventIdx;
+ /* 0x99C */ s16 mPhotoGetPhotoEventIdx;
+ /* 0x99E */ s16 mPhotoGalleryEventIdx;
+ /* 0x9A0 */ s16 mPhotoCounterTalk0EventIdx;
+ /* 0x9A2 */ s16 mPhotoCounterTalk1EventIdx;
+ /* 0x9A4 */ s16 mPhotoDateUB4EventIdx;
+ /* 0x9A6 */ s16 field_0x9A6;
+ /* 0x9A8 */ s16 field_0x9A8;
+ /* 0x9AA */ u8 field_0x9AA[0x9AC - 0x9AA];
+ /* 0x9AC */ s16 field_0x9AC;
+ /* 0x9AE */ s16 field_0x9AE;
+ /* 0x9B0 */ s16 field_0x9B0;
+ /* 0x9B2 */ s16 field_0x9B2;
+ /* 0x9B4 */ s16 mTimer;
+ /* 0x9B6 */ s16 field_0x9B6;
+ /* 0x9B8 */ s16 field_0x9B8;
+ /* 0x9BA */ s16 field_0x9BA;
+ /* 0x9BC */ bool field_0x9BC;
+ /* 0x9BD */ bool field_0x9BD;
+ /* 0x9BE */ u8 field_0x9BE;
+ /* 0x9BF */ u8 mFrame;
+ /* 0x9C0 */ u8 field_0x9C0;
+ /* 0x9C1 */ u8 field_0x9C1;
+ /* 0x9C2 */ bool field_0x9C2;
+ /* 0x9C3 */ u8 field_0x9C3;
+ /* 0x9C4 */ u8 field_0x9C4[0x9C5 - 0x9C4];
+ /* 0x9C5 */ u8 mItemNo;
+ /* 0x9C6 */ u8 field_0x9C6;
+ /* 0x9C7 */ bool field_0x9C7;
+ /* 0x9C8 */ u8 field_0x9C8;
+ /* 0x9C9 */ u8 field_0x9C9;
+ /* 0x9CA */ s8 field_0x9CA;
+ /* 0x9CB */ s8 mActIdx;
+ /* 0x9CC */ bool field_0x9CC;
+ /* 0x9CD */ bool field_0x9CD;
+ /* 0x9D0 */ u8* field_0x9D0;
+ /* 0x9D4 */ bool field_0x9D4;
+ /* 0x9D5 */ u8 field_0x9D5;
+ /* 0x9D6 */ s8 field_0x9D6;
+ /* 0x9D7 */ bool field_0x9D7;
+ /* 0x9D8 */ bool field_0x9D8;
+}; // Size: 0x9DC
#endif /* D_A_NPC_PHOTO_H */
diff --git a/include/d/actor/d_a_tag_photo.h b/include/d/actor/d_a_tag_photo.h
index 972265be..1818d152 100644
--- a/include/d/actor/d_a_tag_photo.h
+++ b/include/d/actor/d_a_tag_photo.h
@@ -7,7 +7,7 @@ class daTagPhoto_c : public fopAc_ac_c {
public:
daTagPhoto_c();
- void getTagNo() {}
+ int getTagNo() { return mTagNo; }
cPhs_State _create();
void createHeap();
@@ -32,6 +32,9 @@ public:
public:
/* Place member variables here */
-};
+ /* 0x290 */ u8 field_0x290[0x318 - 0x290];
+ /* 0x318 */ u8 mTagNo;
+ /* 0x31C */ u8 field_0x31C[0x320 - 0x31C];
+}; // Size: 0x320
#endif /* D_A_TAG_PHOTO_H */
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index d8fba087..d2a403cb 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -522,6 +522,10 @@ public:
u8 getPictureStatus() { return mPictureStatus; }
void setPictureStatusOn() { mPictureStatus = 2; }
+ void setPictureStatusGetOn(u8 to_set) {
+ mPictureStatus = 3;
+ field_0x495f = to_set;
+ }
u8 getScopeMesgStatus() { return mScopeMesgStatus; }
void setScopeMesgStatus(u8 status) { mScopeMesgStatus = status; }
@@ -2768,6 +2772,10 @@ inline void dComIfGp_setPictureStatusOn() {
g_dComIfG_gameInfo.play.setPictureStatusOn();
}
+inline void dComIfGp_setPictureStatusGetOn(u8 to_set){
+ g_dComIfG_gameInfo.play.setPictureStatusGetOn(to_set);
+}
+
inline s16 dComIfGp_getMiniGameRupee() {
return g_dComIfG_gameInfo.play.getMiniGameRupee();
}
diff --git a/include/d/d_picture_box.h b/include/d/d_picture_box.h
index 5d8ac449..60a60431 100644
--- a/include/d/d_picture_box.h
+++ b/include/d/d_picture_box.h
@@ -67,5 +67,5 @@ class dJle_Pb_c {
void draw();
void _delete(JKRExpHeap*);
};
-
+void dPb_erasePicture();
#endif /* D_PICTURE_BOX_H */