summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlepelog <25211966+lepelog@users.noreply.github.com>2022-06-08 21:50:29 +0200
committerlepelog <25211966+lepelog@users.noreply.github.com>2022-06-08 21:50:29 +0200
commit8945d46f0913ec203975ef08864f0dbd6ef6a371 (patch)
tree0ce97eebcc262b2637332ffd47889f078b48fc8d /include
parentfb9dd3cdee440e61d96ddd2efd0216a99df14997 (diff)
progress
Diffstat (limited to 'include')
-rw-r--r--include/SSystem/SComponent/c_xyz.h6
-rw-r--r--include/d/com/d_com_inf_game.h29
-rw-r--r--include/d/d_demo.h35
-rw-r--r--include/d/d_gameover.h46
-rw-r--r--include/d/d_stage.h8
-rw-r--r--include/d/event/d_event_data.h24
-rw-r--r--include/d/event/d_event_manager.h1
-rw-r--r--include/d/kankyo/d_kankyo.h2
-rw-r--r--include/dolphin/mtx/vec.h6
-rw-r--r--include/f_op/f_op_msg_mng.h5
10 files changed, 144 insertions, 18 deletions
diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h
index e218303fc1..2492f92906 100644
--- a/include/SSystem/SComponent/c_xyz.h
+++ b/include/SSystem/SComponent/c_xyz.h
@@ -72,11 +72,7 @@ struct cXyz : Vec {
/* 80267128 */ s16 atan2sX_Z() const;
/* 80267150 */ s16 atan2sY_XZ() const;
- void setAll(f32 f) {
- z = f;
- y = f;
- x = f;
- }
+ void setAll(f32 f) { set(f, f, f); }
void setMin(const cXyz& other) {
if (x > other.x) {
diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h
index ce6b801e64..9a905f66a2 100644
--- a/include/d/com/d_com_inf_game.h
+++ b/include/d/com/d_com_inf_game.h
@@ -389,6 +389,10 @@ public:
mWindow[i].setMode(mode);
}
+ char* getLastPlayStageName() { return mLastPlayStageName; }
+
+ u8 getGameoverStatus() { return mGameoverStatus; }
+
public:
/* 0x00000 */ dBgS mBgs;
/* 0x01404 */ dCcS mCcs;
@@ -651,6 +655,7 @@ void dComIfG_get_timelayer(int* layer);
int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName);
int dComIfG_changeOpeningScene(scene_class* scene, s16 procName);
int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_name);
+BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no);
inline void dComIfG_setBrightness(u8 brightness) {
g_dComIfG_gameInfo.mFadeBrightness = brightness;
@@ -2059,6 +2064,14 @@ inline void dComIfGp_evmng_cutEnd(int param_0) {
dComIfGp_getPEvtManager()->cutEnd(param_0);
}
+inline int i_dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, int param_2) {
+ return dComIfGp_getPEvtManager()->getMyStaffId(pName, pActor, param_2);
+}
+
+inline int dComIfGp_evmng_getIsAddvance(int param_0) {
+ return dComIfGp_getPEvtManager()->getIsAddvance(param_0);
+}
+
inline int* dComIfGp_evmng_getMyIntegerP(int index, char* name) {
return (int*)dComIfGp_getPEvtManager()->getMySubstanceP(index, name, dEvDtData_c::TYPE_INT);
}
@@ -2071,6 +2084,14 @@ inline f32* dComIfGp_evmng_getMyFloatP(int index, char* name) {
return (f32*)dComIfGp_getPEvtManager()->getMySubstanceP(index, name, dEvDtData_c::TYPE_FLOAT);
}
+inline cXyz* dComIfGp_evmng_getMyXyzP(int index, char* name) {
+ return (cXyz*)dComIfGp_getPEvtManager()->getMySubstanceP(index, name, dEvDtData_c::TYPE_VEC);
+}
+
+inline int dComIfGp_evmng_getMySubstanceNum(int index, char* name) {
+ return dComIfGp_getPEvtManager()->getMySubstanceNum(index, name);
+}
+
inline void dComIfGp_evmng_create() {
g_dComIfG_gameInfo.play.getEvtManager().create();
}
@@ -2253,4 +2274,12 @@ inline daAlink_c* daAlink_getAlinkActorClass() {
return (daAlink_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
}
+inline char* dComIfGp_getLastPlayStageName() {
+ return g_dComIfG_gameInfo.play.getLastPlayStageName();
+}
+
+inline u8 dComIfGp_getGameoverStatus() {
+ return g_dComIfG_gameInfo.play.getGameoverStatus();
+}
+
#endif /* D_COM_D_COM_INF_GAME_H */
diff --git a/include/d/d_demo.h b/include/d/d_demo.h
index 003c01ad63..0ff56ba4fe 100644
--- a/include/d/d_demo.h
+++ b/include/d/d_demo.h
@@ -3,4 +3,39 @@
#include "dolphin/types.h"
+class cXyz;
+struct dDemo_c {
+ /* 80039678 */ void create();
+ /* 80039910 */ void remove();
+ /* 80039B6C */ void start(u8 const*, cXyz*, f32);
+ /* 80039CF8 */ void end();
+ /* 80039D4C */ void branch();
+ /* 80039DA4 */ void update();
+ /* 80039EDC */ void setBranchType(u16);
+ /* 80039EEC */ void setBranchId(u16, s16);
+ /* 80039F04 */ void reset();
+
+ static u32 getFrameNoMsg() { return m_frameNoMsg; }
+
+ static u16 m_branchId[1 + 3 /* padding */];
+ static u8 m_system[4];
+ static u8 m_control[4];
+ static u8 m_stage[4];
+ static u8 m_audio[4];
+ static u8 m_particle[4];
+ static u8 m_message[4];
+ static u8 m_factory[4];
+ static u8 m_mesgControl[4];
+ static u8 m_object[4];
+ static u8 m_data[4];
+ static u8 m_frame[4];
+ static u8 m_translation[4];
+ static f32 m_rotationY;
+ static u32 m_frameNoMsg;
+ static u8 m_mode[4];
+ static u8 m_status[4];
+ static u8 m_branchType[2 + 2 /* padding */];
+ static u8 m_branchData[4];
+};
+
#endif /* D_D_DEMO_H */
diff --git a/include/d/d_gameover.h b/include/d/d_gameover.h
index a4e496374c..318cf8756b 100644
--- a/include/d/d_gameover.h
+++ b/include/d/d_gameover.h
@@ -1,6 +1,52 @@
#ifndef D_D_GAMEOVER_H
#define D_D_GAMEOVER_H
+#include "d/msg/d_msg_class.h"
#include "dolphin/types.h"
+#include "f_op/f_op_msg_mng.h"
+
+struct dGameover_c : msg_class {
+ /* 8019B044 */ void _create();
+ /* 8019B2F4 */ void _execute();
+ /* 8019B384 */ void playerAnmWait_init();
+ /* 8019B388 */ void playerAnmWait_proc();
+ /* 8019B3A0 */ void dispFadeOut_init();
+ /* 8019B3E8 */ void dispFadeOut_proc();
+ /* 8019B40C */ void dispWait_init();
+ /* 8019B454 */ void dispWait_proc();
+ /* 8019B478 */ void demoFadeIn_init();
+ /* 8019B484 */ void demoFadeIn_proc();
+ /* 8019B4D8 */ void demoFadeOut_init();
+ /* 8019B4E4 */ void demoFadeOut_proc();
+ /* 8019B560 */ void saveOpen_init();
+ /* 8019B564 */ void saveOpen_proc();
+ /* 8019B5A4 */ void saveMove_init();
+ /* 8019B5A8 */ void saveMove_proc();
+ /* 8019B5F0 */ void saveClose_init();
+ /* 8019B5F4 */ void saveClose_proc();
+ /* 8019B7BC */ void deleteWait_init();
+ /* 8019B7C0 */ void deleteWait_proc();
+ /* 8019B7C4 */ void _draw();
+ /* 8019B864 */ void _delete();
+ s32 deleteCheck() { return _0x108 == 8; }
+
+ /* 0x100 */ u8 _0x100[0x118 - 0x100];
+ /* 0x108 */ u8 _0x108;
+}; // size unknown
+
+s32 d_GameOver_Create(u8 param_0);
+void d_GameOver_Delete(unsigned int& param_0);
+inline s32 d_GameOver_CheckDelete(unsigned int& id) {
+ if (id != UINT32_MAX) {
+ dGameover_c* gameover = (dGameover_c*)fopMsgM_SearchByID(id);
+ if (gameover != NULL) {
+ return gameover->deleteCheck();
+ } else {
+ return 0;
+ }
+ } else {
+ return 0;
+ }
+}
#endif /* D_D_GAMEOVER_H */
diff --git a/include/d/d_stage.h b/include/d/d_stage.h
index 032fac58c6..597a4e8112 100644
--- a/include/d/d_stage.h
+++ b/include/d/d_stage.h
@@ -890,7 +890,7 @@ inline u32 dStage_stagInfo_GetArg0(stage_stag_info_class* p_info) {
return (p_info->field_0x0c >> 0x14) & 0xFF;
}
-inline s8 dStage_sclsInfo_getSceneLayer(stage_scls_info_class* p_info) {
+inline int dStage_sclsInfo_getSceneLayer(stage_scls_info_class* p_info) {
return p_info->field_0xb & 0xF;
}
@@ -898,12 +898,12 @@ inline s8 dStage_sclsInfo_getWipe(stage_scls_info_class* p_info) {
return p_info->mWipe;
}
-inline s8 dStage_sclsInfo_getWipeTime(stage_scls_info_class* p_info) {
- return p_info->field_0xb >> 5;
+inline u32 dStage_sclsInfo_getWipeTime(stage_scls_info_class* p_info) {
+ return (p_info->field_0xb & 0xF0) >> 5;
}
inline int dStage_sclsInfo_getTimeH(stage_scls_info_class* p_info) {
- return ((p_info->field_0xb & 0xF0) >> 4) | ((p_info->field_0xa & 0x0F) << 4);
+ return ((p_info->field_0xa & 0xF0) >> 4) | (p_info->field_0xb & 0x10);
}
inline u32 dStage_FileList_dt_getMiniMap(dStage_FileList_dt_c* p_fList) {
diff --git a/include/d/event/d_event_data.h b/include/d/event/d_event_data.h
index 1d2e77e357..feed849256 100644
--- a/include/d/event/d_event_data.h
+++ b/include/d/event/d_event_data.h
@@ -2,6 +2,7 @@
#define D_EVENT_D_EVENT_DATA_H
#include "d/d_stage.h"
+#include "d/msg/d_msg_class.h"
#include "d/save/d_save.h"
#include "dolphin/types.h"
@@ -81,6 +82,14 @@ public:
/* 0xC */ TYPE_CREATE,
};
+ struct StaffWork {
+ unsigned int _0;
+ msg_class* mLMsg;
+ unsigned int mMsgNo;
+ s32 mMsgSubstanceNum;
+ int* mMsgSubstanceP;
+ };
+
void specialProc_WaitStart(int);
void specialProc_WaitProc(int);
void specialProc();
@@ -101,7 +110,9 @@ public:
int getStartCut() { return mStartCut; }
// private:
- /* 0x00 */ char mName[32];
+ /* 0x00 */ char mName[8];
+ /* 0x08 */ StaffWork mWork;
+ /* 0x0C */ u8 field_0x1C[0x20 - 0x1C];
/* 0x20 */ s32 mTagID;
/* 0x24 */ u32 mIndex;
/* 0x28 */ u32 mFlagID;
@@ -121,7 +132,7 @@ public:
class dEvDtEvent_c {
public:
int finishCheck();
- void forceFinish();
+ int forceFinish();
void specialStaffProc(dEvDtStaff_c*);
int getNStaff() { return mNStaff; }
int getStaff(int idx) { return mStaff[idx]; }
@@ -136,8 +147,7 @@ public:
/* 0x7C */ int mNStaff;
/* 0x80 */ u8 field_0x80[4];
/* 0x84 */ int field_0x84;
- /* 0x88 */ int field_0x88[2];
- /* 0x90 */ int field_0x90;
+ /* 0x88 */ int field_0x88[3];
/* 0x94 */ bool mPlaySound;
/* 0x95 */ u8 field_0x95[0xF];
/* 0xA4 */ int mEventState;
@@ -147,9 +157,9 @@ public:
class dEvDtFlag_c {
public:
dEvDtFlag_c() {}
- void flagCheck(int);
- void flagSet(int);
- bool flagMaxCheck(int);
+ BOOL flagCheck(int);
+ BOOL flagSet(int);
+ BOOL flagMaxCheck(int);
void init();
#define FlagMax 0x2800
diff --git a/include/d/event/d_event_manager.h b/include/d/event/d_event_manager.h
index 344f1f59ad..fc4dffb85b 100644
--- a/include/d/event/d_event_manager.h
+++ b/include/d/event/d_event_manager.h
@@ -72,6 +72,7 @@ public:
dEvDtBase_c& getBase() { return mEventList[mCurrentEventType]; }
void setFlag(int flag) { mFlags.flagSet(flag); }
+ int flagCheck(int flag) { return mFlags.flagCheck(flag); }
static int getIndexCompositId(s16 param_0) { return param_0 != -1 ? (u8)param_0 : -1; }
static int getTypeCompositId(s16 param_0) { return param_0 == -1 ? 0 : param_0 >> 8; }
diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h
index 11b0607e4c..ccdd271eaa 100644
--- a/include/d/kankyo/d_kankyo.h
+++ b/include/d/kankyo/d_kankyo.h
@@ -24,6 +24,8 @@ s32 dKy_daynight_check();
void dKy_clear_game_init();
void dKy_setLight_init();
u8 dKy_pol_sound_get(cBgS_PolyInfo const* param_0);
+void dKy_instant_rainchg();
+void dKy_instant_timechg(f32);
struct LIGHT_INFLUENCE {
/* 800CFC7C */ ~LIGHT_INFLUENCE();
diff --git a/include/dolphin/mtx/vec.h b/include/dolphin/mtx/vec.h
index 2b8091fb5a..d52c79d450 100644
--- a/include/dolphin/mtx/vec.h
+++ b/include/dolphin/mtx/vec.h
@@ -35,6 +35,12 @@ struct SVec {
y = oY;
z = oZ;
}
+
+ void setall(s16 val) {
+ x = val;
+ y = val;
+ z = val;
+ }
};
extern "C" {
diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h
index 85c00e2f5b..05abfdc3f0 100644
--- a/include/f_op/f_op_msg_mng.h
+++ b/include/f_op/f_op_msg_mng.h
@@ -36,8 +36,9 @@ u32 fopMsgM_Create(s16, fopMsgCreateFunc, void*);
void fopMsgM_setMessageID(unsigned int);
void fopMsgM_destroyExpHeap(JKRExpHeap*);
s32 fopMsgM_setStageLayer(void*);
-void fopMsgM_messageSetDemo(u32 param_0);
+int fopMsgM_messageSet(u32 param_0, u32 param_1);
+int fopMsgM_messageSetDemo(u32 param_0);
msg_class* fopMsgM_SearchByID(unsigned int param_0);
char* fopMsgM_messageGet(char* msg, u32 string_id);
-#endif \ No newline at end of file
+#endif