From bc09a831c52b505ecdd5e617fb31ece9fa7d6c6c Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 18 May 2026 00:54:24 -0400 Subject: [PATCH] Fix compile and link errors when building in debug mode --- .vscode/tasks.json | 2 +- config/D44J01/config.yml | 3 +++ include/JSystem/JGadget/define.h | 17 +++++++++++++---- include/d/actor/d_a_bdk.h | 2 +- include/d/actor/d_a_bwds.h | 2 ++ include/d/actor/d_a_daiocta.h | 2 ++ include/d/actor/d_a_daiocta_eye.h | 3 +++ include/d/actor/d_a_npc_ls1.h | 3 +++ include/d/actor/d_a_obj_bemos.h | 2 ++ include/d/actor/d_a_oship.h | 3 +++ include/d/actor/d_a_tag_md_cb.h | 2 ++ include/d/d_file_error.h | 2 ++ include/d/d_menu_cloth.h | 2 ++ include/d/d_menu_item.h | 2 ++ include/d/d_menu_window.h | 4 ++++ include/d/d_name.h | 1 + src/d/actor/d_a_yougan.cpp | 2 ++ 17 files changed, 48 insertions(+), 6 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6c45c86d5..b2b588259 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,7 +11,7 @@ "GZLJ01", // GCN JPN "GZLE01", // GCN USA "GZLP01", // GCN PAL - "D44J01 --debug --map", + "D44J01 --debug --map --non-matching", ], "default": "GZLE01", "description": "Game version to build." diff --git a/config/D44J01/config.yml b/config/D44J01/config.yml index 431939631..696e11229 100644 --- a/config/D44J01/config.yml +++ b/config/D44J01/config.yml @@ -8,6 +8,9 @@ splits: config/D44J01/splits.txt symbols: config/D44J01/symbols.txt # map: orig/D44J01/files/maps/framework.map +force_active: +- C_MTXMultVecArray # Debug only, added here so debug can be linked + mw_comment_version: 10 # GC Linker 1.3.2 symbols_known: true # Very fast analysis fill_gaps: false # Alignments known diff --git a/include/JSystem/JGadget/define.h b/include/JSystem/JGadget/define.h index f8cf504b6..bf219aa73 100644 --- a/include/JSystem/JGadget/define.h +++ b/include/JSystem/JGadget/define.h @@ -10,16 +10,25 @@ class JGadget_outMessage { public: typedef void (*MessageFunc)(const char*, int, const char*); - static void warning(const char*, int, const char*); + static void warning(const char*, int, const char*) { + /* Nonmatching - debug only */ + } - JGadget_outMessage(MessageFunc fn, const char* file, int line); - ~JGadget_outMessage(); + JGadget_outMessage(MessageFunc fn, const char* file, int line) { + /* Nonmatching - debug only */ + } + ~JGadget_outMessage() { + /* Nonmatching - debug only */ + } JGadget_outMessage& operator<<(int param_1) { return *this << (s32)param_1; } JGadget_outMessage& operator<<(u16); JGadget_outMessage& operator<<(unsigned int); JGadget_outMessage& operator<<(u8); - JGadget_outMessage& operator<<(const char* str); + JGadget_outMessage& operator<<(const char* str) { + /* Nonmatching - debug only */ + return *this; + } JGadget_outMessage& operator<<(s8); JGadget_outMessage& operator<<(s32); JGadget_outMessage& operator<<(u32); diff --git a/include/d/actor/d_a_bdk.h b/include/d/actor/d_a_bdk.h index 180d94505..8fb4c463b 100644 --- a/include/d/actor/d_a_bdk.h +++ b/include/d/actor/d_a_bdk.h @@ -182,7 +182,7 @@ class daBdk_HIO_c : public JORReflexible { public: daBdk_HIO_c(); virtual ~daBdk_HIO_c() {} - void genMessage(JORMContext* ctx); + void genMessage(JORMContext* ctx) {} public: /* 0x004 */ s8 mNo; /* 0x005 */ u8 m005; diff --git a/include/d/actor/d_a_bwds.h b/include/d/actor/d_a_bwds.h index 802fac5ff..edbdd4cd5 100644 --- a/include/d/actor/d_a_bwds.h +++ b/include/d/actor/d_a_bwds.h @@ -66,6 +66,8 @@ public: daBwds_HIO_c(); virtual ~daBwds_HIO_c() {} + void genMessage(JORMContext* ctx) {} + public: /* 0x004 */ s8 mNo; /* 0x005 */ u8 m005; diff --git a/include/d/actor/d_a_daiocta.h b/include/d/actor/d_a_daiocta.h index c9de1d57f..f613c279d 100644 --- a/include/d/actor/d_a_daiocta.h +++ b/include/d/actor/d_a_daiocta.h @@ -170,6 +170,8 @@ class daDaiocta_HIO_c : public mDoHIO_entry_c { public: daDaiocta_HIO_c(); + void genMessage(JORMContext* ctx) {} + public: /* 0x004 */ u8 m004; /* 0x005 */ u8 m005; diff --git a/include/d/actor/d_a_daiocta_eye.h b/include/d/actor/d_a_daiocta_eye.h index 2d1c6aaea..497a135d1 100644 --- a/include/d/actor/d_a_daiocta_eye.h +++ b/include/d/actor/d_a_daiocta_eye.h @@ -102,6 +102,9 @@ STATIC_ASSERT(sizeof(daDaiocta_Eye_c) == 0x4A0); class daDaiocta_Eye_HIO_c : public mDoHIO_entry_c { public: daDaiocta_Eye_HIO_c(); + + void genMessage(JORMContext* ctx) {} + public: s16 m04; u8 m06[0x08 - 0x06]; diff --git a/include/d/actor/d_a_npc_ls1.h b/include/d/actor/d_a_npc_ls1.h index 1bbc6d1a0..8b6ba3a02 100644 --- a/include/d/actor/d_a_npc_ls1.h +++ b/include/d/actor/d_a_npc_ls1.h @@ -242,6 +242,9 @@ public: }; // Size: 0x38 daNpc_Ls1_HIO_c(); inline virtual ~daNpc_Ls1_HIO_c(); + + void genMessage(JORMContext* ctx) {} + public: /* 0x04 */ s8 m04; /* 0x08 */ s32 m08; diff --git a/include/d/actor/d_a_obj_bemos.h b/include/d/actor/d_a_obj_bemos.h index 1202542ca..94f65bfb8 100644 --- a/include/d/actor/d_a_obj_bemos.h +++ b/include/d/actor/d_a_obj_bemos.h @@ -119,6 +119,8 @@ public: daBemos_HIO_c(); virtual ~daBemos_HIO_c() {} + void genMessage(JORMContext* ctx) {} + public: /* 0x04 */ s8 mNo; /* 0x05 */ u8 m05[0x08 - 0x05]; diff --git a/include/d/actor/d_a_oship.h b/include/d/actor/d_a_oship.h index 0ec3101a7..e85c57c57 100644 --- a/include/d/actor/d_a_oship.h +++ b/include/d/actor/d_a_oship.h @@ -154,6 +154,9 @@ class daOship_HIO_c : public mDoHIO_entry_c { public: daOship_HIO_c(); virtual ~daOship_HIO_c() {} + + void genMessage(JORMContext* ctx) {} + public: /* 0x04 */ u8 m04; /* 0x05 */ bool m05; diff --git a/include/d/actor/d_a_tag_md_cb.h b/include/d/actor/d_a_tag_md_cb.h index 119bd1d97..fcb1c2283 100644 --- a/include/d/actor/d_a_tag_md_cb.h +++ b/include/d/actor/d_a_tag_md_cb.h @@ -95,6 +95,8 @@ public: virtual ~daTag_MdCb_HIO_c() {} + void genMessage(JORMContext* ctx) {} + public: /* 0x04 */ s8 mNo; /* 0x08 */ hio_prm_c mPrm; diff --git a/include/d/d_file_error.h b/include/d/d_file_error.h index 5cae62c76..42aa44098 100644 --- a/include/d/d_file_error.h +++ b/include/d/d_file_error.h @@ -18,6 +18,8 @@ public: virtual ~dFe_HIO_c() {} + void genMessage(JORMContext* ctx) {} + /* 0x004 */ s8 mNo; /* 0x005 */ u8 m5; /* 0x006 */ s16 m6; diff --git a/include/d/d_menu_cloth.h b/include/d/d_menu_cloth.h index c70b6b607..17bb0e357 100644 --- a/include/d/d_menu_cloth.h +++ b/include/d/d_menu_cloth.h @@ -116,6 +116,8 @@ public: daCLOTH_HIO_c(); virtual ~daCLOTH_HIO_c() {} + void genMessage(JORMContext* ctx) {} + public: /* 0x0004 */ s8 mNo; /* 0x0008 */ daCLOTH_ChildHIO_c mChildren[3]; diff --git a/include/d/d_menu_item.h b/include/d/d_menu_item.h index 1bdcd82e9..b498d1ae1 100644 --- a/include/d/d_menu_item.h +++ b/include/d/d_menu_item.h @@ -121,6 +121,8 @@ public: dMi_HIO_c(); virtual ~dMi_HIO_c() {} + void genMessage(JORMContext* ctx) {} + static const int ARR_SIZE = 5; public: diff --git a/include/d/d_menu_window.h b/include/d/d_menu_window.h index 4a57d993f..b3ce2e310 100644 --- a/include/d/d_menu_window.h +++ b/include/d/d_menu_window.h @@ -90,6 +90,8 @@ public: dMw_HIO_c(); virtual ~dMw_HIO_c() {} + void genMessage(JORMContext* ctx) {} + /* 0x04 */ s8 mNo; /* 0x06 */ u16 field_0x06; /* 0x08 */ u16 field_0x08; @@ -153,6 +155,8 @@ public: dMw_DHIO_c(); virtual ~dMw_DHIO_c() {} + void genMessage(JORMContext* ctx) {} + /* 0x04 */ s8 mNo; /* 0x05 */ u8 arr_0x05[0xC][0x10]; }; diff --git a/include/d/d_name.h b/include/d/d_name.h index 73e55d4bf..4a7672201 100644 --- a/include/d/d_name.h +++ b/include/d/d_name.h @@ -2,6 +2,7 @@ #define D_NAME_H #include "d/d_drawlist.h" +#include "m_Do/m_Do_hostIO.h" class dNm_HIO_c { public: diff --git a/src/d/actor/d_a_yougan.cpp b/src/d/actor/d_a_yougan.cpp index 5e2a1c153..e34b1db77 100644 --- a/src/d/actor/d_a_yougan.cpp +++ b/src/d/actor/d_a_yougan.cpp @@ -15,6 +15,8 @@ public: daYOUGAN_HIO_c(); virtual ~daYOUGAN_HIO_c() {} + void genMessage(JORMContext* ctx) {} + public: /* 0x04 */ s8 mNo; /* 0x06 */ s16 field_0x06;