summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorPheenoh <pheenoh@gmail.com>2023-03-07 18:03:46 -0700
committerGitHub <noreply@github.com>2023-03-07 18:03:46 -0700
commitf31ab5ae0be3de6e0910b2d5942e33458be043ac (patch)
tree4fbfdeda4e8bfac575a81ab9d4eaa79530ea35c5 /include/d
parent6c2e18af70dcc392b49cacf77fdb6ff8a164c0a5 (diff)
Misc Changes (#306)
Diffstat (limited to 'include/d')
-rw-r--r--include/d/a/d_a_alink.h51
-rw-r--r--include/d/a/d_a_player.h18
-rw-r--r--include/d/com/d_com_inf_actor.h6
-rw-r--r--include/d/com/d_com_inf_game.h11
-rw-r--r--include/d/d_error_msg.h17
-rw-r--r--include/d/event/d_event.h34
-rw-r--r--include/d/menu/d_menu_save.h3
-rw-r--r--include/d/save/d_save.h9
8 files changed, 143 insertions, 6 deletions
diff --git a/include/d/a/d_a_alink.h b/include/d/a/d_a_alink.h
index 1199671694..778ff90eb3 100644
--- a/include/d/a/d_a_alink.h
+++ b/include/d/a/d_a_alink.h
@@ -6260,6 +6260,7 @@ public:
enum daMidna_FLG1 {
FLG1_FORCE_NORMAL_COL = 8,
FLG1_FORCE_TIRED_COL = 4,
+ FLG1_SHADOW_MODEL_DRAW_DEMO_FORCE = 2,
};
enum daMidna_ANM {};
@@ -6327,6 +6328,48 @@ public:
BOOL checkNoDraw() const { return checkStateFlg0(FLG0_NO_DRAW); }
BOOL checkNoInput() const { return checkStateFlg0(FLG0_NO_INPUT); }
int checkMetamorphoseEnable() { return (this->*mpFunc)(); }
+ int checkShadowModelDrawDemoForce() const { return checkStateFlg1(FLG1_SHADOW_MODEL_DRAW_DEMO_FORCE); }
+
+ bool checkShadowModelDrawSmode() const {
+ if (field_0x84e != 3 && field_0x84e != 4) {
+ if (field_0x84e == 2) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+
+ int checkShadowModelDraw() const {
+ int ret = 0;
+
+ if (checkShadowModelDrawDemoForce() == 0) {
+ if (checkShadowModelDrawSmode() != 0) {
+ ret = 0;
+ }
+ }
+
+ return ret;
+ }
+
+ int checkShadowReturnEnd() const {
+ if (field_0x5e4[0].getIdx() == 0x21c && !field_0x578->isStop()) {
+ return 1;
+ }
+
+ return 0;
+ }
+
+ int checkShadowModeTalkWait() const {
+ if (mDemoType != 2 && mDemoType != 1) {
+ return 0;
+ }
+
+ return 1;
+ }
+
+ void setShadowReturn() { mDemoType = 4; }
+
bool checkPortalObjRide() const {
return checkStateFlg0(FLG0_UNK_8000000) && checkStateFlg0(FLG0_UNK_200);
@@ -6342,7 +6385,7 @@ private:
/* 0x0570 */ J3DModel* field_0x570;
/* 0x0574 */ J3DModel* field_0x574;
/* 0x0578 */ mDoExt_McaMorfSO* field_0x578;
- /* 0x057C */ mDoExt_McaMorfCallBack1_c* field_0x57c;
+ /* 0x057C */ mDoExt_McaMorfCallBack1_c* field_0x57c; // this is really daMidna_McaMorfCB1_c. fix later
/* 0x0580 */ cXyz* field_0x580;
/* 0x0584 */ mDoExt_bckAnm field_0x584;
/* 0x05A0 */ mDoExt_bckAnm field_0x5a0;
@@ -6395,7 +6438,7 @@ private:
/* 0x06DC */ mDoExt_bckAnm* mpDemoHDTmpBck;
/* 0x06E0 */ J3DGXColorS10 field_0x6e0;
/* 0x06E8 */ J3DGXColor field_0x6e8;
- /* 0x06EC */ u8 field_0x6ec;
+ /* 0x06EC */ u8 field_0x6ec; // this is probably J3DGXColor. fix later
/* 0x06ED */ u8 field_0x6ed;
/* 0x06EE */ u8 field_0x6ee;
/* 0x06EF */ u8 field_0x6ef;
@@ -6414,7 +6457,7 @@ private:
/* 0x085A */ s16 field_0x85a;
/* 0x085C */ u8 field_0x85c[0x22];
/* 0x087E */ s16 field_0x87e;
- /* 0x0880 */ u8 field_0x880[0xC];
+ /* 0x0880 */ u8 field_0x880[0xC]; // csXyz in here, fix later
/* 0x088C */ int mStaffID;
/* 0x0890 */ u32 mStateFlg0;
/* 0x0894 */ u32 mStateFlg1;
@@ -6426,7 +6469,7 @@ private:
/* 0x08CC */ u8 field_0x8cc[0x14];
/* 0x08E0 */ cXyz field_0x8e0[5];
/* 0x091C */ cXyz field_0x91c[5];
- /* 0x0958 */ u8 field_0x958[0xC];
+ /* 0x0958 */ u8 field_0x958[0xC]; // cXyz here, fix later
/* 0x0964 */ cXyz field_0x964[5];
/* 0x09A0 */ u8 field_0x9a0[0x14];
/* 0x09C4 */ cXyz field_0x9c4;
diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h
index 3cafc4240c..3a19fc9d30 100644
--- a/include/d/a/d_a_player.h
+++ b/include/d/a/d_a_player.h
@@ -160,6 +160,10 @@ public:
s16 getMoveAngle() const { return mDemoMoveAngle; }
f32 getStick() { return mStick; }
int getParam0() const { return mParam0; }
+ void setParam0(int value) { mParam0 = value;}
+ void setParam1(int value) { mParam1 = value;}
+ void setParam2(int value) { mParam2 = value;}
+ void setPos0(const cXyz* pos) { mDemoPos0 = *pos;}
private:
/* 0x00 */ u16 mDemoType;
@@ -761,6 +765,20 @@ public:
u32 i_checkBoarSingleBattle() const { return i_checkNoResetFlg2(FLG2_BOAR_SINGLE_BATTLE); }
+ void i_changeOriginalDemo() {
+ mDemo.setOriginalDemoType();
+ mDemo.setParam0(0);
+ }
+
+ void i_changeDemoMode(u32 i_demoMode,int i_param0,int i_param1,s16 i_param2) {
+ mDemo.setDemoMode(i_demoMode);
+ mDemo.setParam0(i_param0);
+ mDemo.setParam1(i_param1);
+ mDemo.setParam2(i_param2);
+ }
+
+ void i_changeDemoPos0(const cXyz* i_posP) { mDemo.setPos0(i_posP); }
+
inline static u32 i_getLastSceneMode();
inline static u32 getLastSceneMode();
inline static bool checkWoodSwordEquip();
diff --git a/include/d/com/d_com_inf_actor.h b/include/d/com/d_com_inf_actor.h
index ca9321197f..25860fd43c 100644
--- a/include/d/com/d_com_inf_actor.h
+++ b/include/d/com/d_com_inf_actor.h
@@ -3,12 +3,18 @@
#include "dolphin/types.h"
+class dComIfGoat_info_c {
+public:
+ /* 0x0 */ int field_0x0;
+};
+
class dComIfAc_info_c {
public:
/* 0x0 */ int field_0x0;
/* 0x4 */ bool mPause;
};
+extern dComIfGoat_info_c g_dComIfGoat_gameInfo;
extern dComIfAc_info_c g_dComIfAc_gameInfo;
inline bool dComIfA_PauseCheck() {
diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h
index 52f2870120..abe20294b6 100644
--- a/include/d/com/d_com_inf_game.h
+++ b/include/d/com/d_com_inf_game.h
@@ -815,6 +815,9 @@ const char* dComIfGs_getWarpStageName();
s16 dComIfGs_getWarpPlayerAngleY();
s8 dComIfGs_getWarpRoomNo();
BOOL dComIfGs_isOneZoneSwitch(int i_swBit, int i_roomNo);
+BOOL dComIfGs_isOneZoneItem(int i_swBit, int i_roomNo);
+BOOL dComIfGs_isZoneSwitch(int,int);
+BOOL dComIfGs_isZoneItem(int,int);
void dComIfGs_setLastWarpMarkItemData(const char* stage, cXyz pos, s16 angle, s8 roomNo, u8, u8);
u16 dComIfGs_getMaxLifeGauge();
void dComIfGs_setWarpMarkFlag(u8);
@@ -1129,6 +1132,10 @@ inline BOOL dComIfGs_isTbox(int i_no) {
return g_dComIfG_gameInfo.info.getMemory().getBit().isTbox(i_no);
}
+inline BOOL dComIfGs_isSaveItem(int i_no) {
+ return g_dComIfG_gameInfo.info.getMemory().getBit().isItem(i_no);
+}
+
inline BOOL dComIfGs_isSaveTbox(int i_stageNo, int i_no) {
return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().isTbox(i_no);
}
@@ -1137,6 +1144,10 @@ inline BOOL dComIfGs_isSaveDunSwitch(int i_no) {
return g_dComIfG_gameInfo.info.getDan().isSwitch(i_no);
}
+inline BOOL dComIfGs_isSaveDunItem(int i_no) {
+ return g_dComIfG_gameInfo.info.getDan().isItem(i_no);
+}
+
inline void dComIfGs_onSaveSwitch(int i_stageNo, int i_no) {
g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().onSwitch(i_no);
}
diff --git a/include/d/d_error_msg.h b/include/d/d_error_msg.h
index 5aca3c39b5..6ce99acf76 100644
--- a/include/d/d_error_msg.h
+++ b/include/d/d_error_msg.h
@@ -1,6 +1,21 @@
#ifndef D_D_ERROR_MSG_H
#define D_D_ERROR_MSG_H
-#include "dolphin/types.h"
+#include "d/com/d_com_inf_game.h"
+
+struct dShutdownErrorMsg_c {
+ /* 8009D790 */ static bool execute();
+};
+
+struct dDvdErrorMsg_c {
+ /* 8009D194 */ void draw(s32);
+ /* 8009D354 */ static u8 execute();
+};
+
+struct J2DOrthoGraph {
+ /* 802E96D0 */ J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
+ /* 802E97B4 */ void setPort();
+ /* 802E980C */ void setOrtho(JGeometry::TBox2<f32> const&, f32, f32);
+};
#endif /* D_D_ERROR_MSG_H */
diff --git a/include/d/event/d_event.h b/include/d/event/d_event.h
index b41de22e21..cc024e776b 100644
--- a/include/d/event/d_event.h
+++ b/include/d/event/d_event.h
@@ -8,6 +8,40 @@
#include "d/save/d_save.h"
#include "dolphin/types.h"
+#if DEBUG
+class dEvDb_bit_c {
+public:
+ /* 0x00 */ char* mFlagName;
+ /* 0x04 */ char* mFlagDescription;
+ /* 0x08 */ char* mFlagAuthor;
+ /* 0x0C */ u16 mFlagValue;
+ /* 0x10 */ char* mArea; // Area in the game where flag is used
+ /* 0x14 */ u8 field_0x14;
+ /* 0x15 */ u8 field_0x15;
+};
+
+class dEvDb_reg_c {
+public:
+ /* 0x00 */ char* mFlagName;
+ /* 0x04 */ char* mFlagDescription;
+ /* 0x08 */ char* mFlagAuthor;
+ /* 0x0C */ u16 mFlagValue;
+ /* 0x10 */ char* mArea; // Area in the game where flag is used
+ /* 0x14 */ u8 field_0x14;
+ /* 0x15 */ u8 field_0x15;
+};
+
+class dEvDb_flag_base_c {
+public:
+ /* 0x00 */ dEvDb_bit_c* mBitTable;
+ /* 0x04 */ dEvDb_reg_c* mRegTable;
+ /* 0x08 */ int mBitNum;
+ /* 0x0C */ int mRegNum;
+ /* 0x10 */ field_0x10;
+ /* 0x14 */ field_0x14;
+}
+#endif
+
class dEvt_order_c {
public:
~dEvt_order_c() {}
diff --git a/include/d/menu/d_menu_save.h b/include/d/menu/d_menu_save.h
index 324e43473c..201cb0a27b 100644
--- a/include/d/menu/d_menu_save.h
+++ b/include/d/menu/d_menu_save.h
@@ -6,6 +6,7 @@
#include "d/d_select_cursor.h"
#include "dolphin/types.h"
#include "m_Do/m_Do_dvd_thread.h"
+#include "d/save/d_save.h"
class dMsgString_c;
class dFile_warning_c;
@@ -368,7 +369,7 @@ private:
/* 0x01BF */ u8 field_0x1bf;
/* 0x01C0 */ u8 field_0x1c0;
/* 0x01CC */ void (dMenu_save_c::*mpErrFunc)();
- /* 0x01D0 */ u8 mSaveBuffer[0xA94 * 3];
+ /* 0x01D0 */ u8 mSaveBuffer[QUEST_LOG_SIZE * 3];
/* 0x218C */ dMsgScrnExplain_c* mpScrnExplain;
/* 0x2190 */ u8 field_0x2190;
/* 0x2192 */ u16 field_0x2192;
diff --git a/include/d/save/d_save.h b/include/d/save/d_save.h
index 8071645b43..b008503a7a 100644
--- a/include/d/save/d_save.h
+++ b/include/d/save/d_save.h
@@ -24,6 +24,7 @@
#define SWITCH_ONE_ZONE_MAX 0x10
#define ITEM_ZONE_MAX 0x20
#define ITEM_ONE_ZONE_MAX 0x10
+#define QUEST_LOG_SIZE 0xA94
enum Wallets {
/* 0x0 */ WALLET,
@@ -1134,11 +1135,19 @@ private:
class dSv_event_flag_c {
public:
+ enum {
+ #include "d/save/d_save_bit_labels.inc"
+ };
+
static u16 saveBitLabels[822];
};
class dSv_event_tmp_flag_c {
public:
+ enum {
+ #include "d/save/d_save_temp_bit_labels.inc"
+ };
+
static u16 const tempBitLabels[185];
};