From f52c715364b861d76512ed6e5167751f30d974bb Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Tue, 28 Apr 2026 02:53:36 -0700 Subject: [PATCH 001/223] convert d_name literals to hex + enable version --- src/d/actor/d_flower.inc | 20 +++++++------- src/d/actor/d_grass.inc | 16 +++++------ src/d/d_name.cpp | 57 +++++++++++++++++++++++++++++++++++++++ src/dusk/iso_validate.cpp | 1 + src/dusk/version.cpp | 2 ++ 5 files changed, 78 insertions(+), 18 deletions(-) diff --git a/src/d/actor/d_flower.inc b/src/d/actor/d_flower.inc index 4024d5ad6a..4b78e2950d 100644 --- a/src/d/actor/d_flower.inc +++ b/src/d/actor/d_flower.inc @@ -13,7 +13,7 @@ const u16 l_J_Ohana00_64TEX__height = 63; #if TARGET_PC #include "dusk/dvd_asset.hpp" using GameVersion = dusk::version::GameVersion; -static u8* l_J_Ohana00_64TEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9060}, {GameVersion::GcnPal, 0x9060}}, 0x800), true); return buf; } +static u8* l_J_Ohana00_64TEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9060}, {GameVersion::GcnPal, 0x9060}, {GameVersion::GcnJpn, 0x9060}}, 0x800), true); return buf; } #define l_J_Ohana00_64TEX (l_J_Ohana00_64TEX_get()) #else #include "assets/l_J_Ohana00_64TEX.h" @@ -111,10 +111,10 @@ static u8 l_flowerTexCoord[] = { #if TARGET_PC using GameVersion = dusk::version::GameVersion; -static u8* l_J_hana00DL_get() { static u8 buf[0x150]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9D20}, {GameVersion::GcnPal, 0x9D20}}, 0x150), true); return buf; } -static u8* l_J_hana00_cDL_get() { static u8 buf[0xDE]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9E80}, {GameVersion::GcnPal, 0x9E80}}, 0xDE), true); return buf; } -static u8* l_matDL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9F60}, {GameVersion::GcnPal, 0x9F60}}, 0x99), true); return buf; } -static u8* l_matLight4DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xA000}, {GameVersion::GcnPal, 0xA000}}, 0x99), true); return buf; } +static u8* l_J_hana00DL_get() { static u8 buf[0x150]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9D20}, {GameVersion::GcnPal, 0x9D20}, {GameVersion::GcnJpn, 0x9D20}}, 0x150), true); return buf; } +static u8* l_J_hana00_cDL_get() { static u8 buf[0xDE]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9E80}, {GameVersion::GcnPal, 0x9E80}, {GameVersion::GcnJpn, 0x9E80}}, 0xDE), true); return buf; } +static u8* l_matDL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9F60}, {GameVersion::GcnPal, 0x9F60}, {GameVersion::GcnJpn, 0x9F60}}, 0x99), true); return buf; } +static u8* l_matLight4DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xA000}, {GameVersion::GcnPal, 0xA000}, {GameVersion::GcnJpn, 0xA000}}, 0x99), true); return buf; } #define l_J_hana00DL (l_J_hana00DL_get()) #define l_J_hana00_cDL (l_J_hana00_cDL_get()) #define l_matDL (l_matDL_get()) @@ -270,11 +270,11 @@ static u8 l_flowerTexCoord2[] = { #if TARGET_PC using GameVersion = dusk::version::GameVersion; -static u8* l_J_hana01DL_get() { static u8 buf[0x138]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB7C0}, {GameVersion::GcnPal, 0xB7C0}}, 0x138), true); return buf; } -static u8* l_J_hana01_c_00DL_get() { static u8 buf[0xDE]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB900}, {GameVersion::GcnPal, 0xB900}}, 0xDE), true); return buf; } -static u8* l_J_hana01_c_01DL_get() { static u8 buf[0x128]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB9E0}, {GameVersion::GcnPal, 0xB9E0}}, 0x128), true); return buf; } -static u8* l_mat2DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xBB20}, {GameVersion::GcnPal, 0xBB20}}, 0x99), true); return buf; } -static u8* l_mat2Light4DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xBBC0}, {GameVersion::GcnPal, 0xBBC0}}, 0x99), true); return buf; } +static u8* l_J_hana01DL_get() { static u8 buf[0x138]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB7C0}, {GameVersion::GcnPal, 0xB7C0}, {GameVersion::GcnJpn, 0xB7C0}}, 0x138), true); return buf; } +static u8* l_J_hana01_c_00DL_get() { static u8 buf[0xDE]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB900}, {GameVersion::GcnPal, 0xB900}, {GameVersion::GcnJpn, 0xB900}}, 0xDE), true); return buf; } +static u8* l_J_hana01_c_01DL_get() { static u8 buf[0x128]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB9E0}, {GameVersion::GcnPal, 0xB9E0}, {GameVersion::GcnJpn, 0xB9E0}}, 0x128), true); return buf; } +static u8* l_mat2DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xBB20}, {GameVersion::GcnPal, 0xBB20}, {GameVersion::GcnJpn, 0xBB20}}, 0x99), true); return buf; } +static u8* l_mat2Light4DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xBBC0}, {GameVersion::GcnPal, 0xBBC0}, {GameVersion::GcnJpn, 0xBBC0}}, 0x99), true); return buf; } #define l_J_hana01DL (l_J_hana01DL_get()) #define l_J_hana01_c_00DL (l_J_hana01_c_00DL_get()) #define l_J_hana01_c_01DL (l_J_hana01_c_01DL_get()) diff --git a/src/d/actor/d_grass.inc b/src/d/actor/d_grass.inc index 3d67a57007..785b05c281 100644 --- a/src/d/actor/d_grass.inc +++ b/src/d/actor/d_grass.inc @@ -21,8 +21,8 @@ const u16 l_M_kusa05_RGBATEX__height = 31; #if TARGET_PC #include "dusk/dvd_asset.hpp" using GameVersion = dusk::version::GameVersion; -static u8* l_M_kusa05_RGBATEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x7680}, {GameVersion::GcnPal, 0x7680}}, 0x800), true); return buf; } -static u8* l_M_Hijiki00TEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x7E80}, {GameVersion::GcnPal, 0x7E80}}, 0x800), true); return buf; } +static u8* l_M_kusa05_RGBATEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x7680}, {GameVersion::GcnPal, 0x7680}, {GameVersion::GcnJpn, 0x7680}}, 0x800), true); return buf; } +static u8* l_M_Hijiki00TEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x7E80}, {GameVersion::GcnPal, 0x7E80}, {GameVersion::GcnJpn, 0x7E80}}, 0x800), true); return buf; } #define l_M_kusa05_RGBATEX (l_M_kusa05_RGBATEX_get()) #define l_M_Hijiki00TEX (l_M_Hijiki00TEX_get()) #else @@ -116,12 +116,12 @@ static u8 l_texCoord[160] = { #if TARGET_PC using GameVersion = dusk::version::GameVersion; -static u8* l_M_Kusa_9qDL_get() { static u8 buf[0xCB]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8B00}, {GameVersion::GcnPal, 0x8B00}}, 0xCB), true); return buf; } -static u8* l_M_Kusa_9q_cDL_get() { static u8 buf[0xCB]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8BE0}, {GameVersion::GcnPal, 0x8BE0}}, 0xCB), true); return buf; } -static u8* l_M_TenGusaDL_get() { static u8 buf[0xD4]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8CC0}, {GameVersion::GcnPal, 0x8CC0}}, 0xD4), true); return buf; } -static u8* l_Tengusa_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8DA0}, {GameVersion::GcnPal, 0x8DA0}}, 0xA8), true); return buf; } -static u8* l_kusa9q_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8E60}, {GameVersion::GcnPal, 0x8E60}}, 0xA8), true); return buf; } -static u8* l_kusa9q_l4_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8F20}, {GameVersion::GcnPal, 0x8F20}}, 0xA8), true); return buf; } +static u8* l_M_Kusa_9qDL_get() { static u8 buf[0xCB]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8B00}, {GameVersion::GcnPal, 0x8B00}, {GameVersion::GcnJpn, 0x8B00}}, 0xCB), true); return buf; } +static u8* l_M_Kusa_9q_cDL_get() { static u8 buf[0xCB]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8BE0}, {GameVersion::GcnPal, 0x8BE0}, {GameVersion::GcnJpn, 0x8BE0}}, 0xCB), true); return buf; } +static u8* l_M_TenGusaDL_get() { static u8 buf[0xD4]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8CC0}, {GameVersion::GcnPal, 0x8CC0}, {GameVersion::GcnJpn, 0x8CC0}}, 0xD4), true); return buf; } +static u8* l_Tengusa_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8DA0}, {GameVersion::GcnPal, 0x8DA0}, {GameVersion::GcnJpn, 0x8DA0}}, 0xA8), true); return buf; } +static u8* l_kusa9q_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8E60}, {GameVersion::GcnPal, 0x8E60}, {GameVersion::GcnJpn, 0x8E60}}, 0xA8), true); return buf; } +static u8* l_kusa9q_l4_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8F20}, {GameVersion::GcnPal, 0x8F20}, {GameVersion::GcnJpn, 0x8F20}}, 0xA8), true); return buf; } #define l_M_Kusa_9qDL (l_M_Kusa_9qDL_get()) #define l_M_Kusa_9q_cDL (l_M_Kusa_9q_cDL_get()) #define l_M_TenGusaDL (l_M_TenGusaDL_get()) diff --git a/src/d/d_name.cpp b/src/d/d_name.cpp index 1f3ccbb1d7..56fea3309d 100644 --- a/src/d/d_name.cpp +++ b/src/d/d_name.cpp @@ -17,6 +17,62 @@ static bool isPalOrJpn() { return dusk::version::isRegionPal() || dusk::version::isRegionJpn(); } +#if TARGET_PC +static const char* l_mojiHira[65] = { + "\x82\xA0", "\x82\xA2", "\x82\xA4", "\x82\xA6", "\x82\xA8", "\x82\xA9", "\x82\xAB", "\x82\xAD", "\x82\xAF", "\x82\xB1", "\x82\xB3", "\x82\xB5", "\x82\xB7", + "\x82\xB9", "\x82\xBB", "\x82\xBD", "\x82\xBF", "\x82\xC2", "\x82\xC4", "\x82\xC6", "\x82\xC8", "\x82\xC9", "\x82\xCA", "\x82\xCB", "\x82\xCC", "\x82\xCD", + "\x82\xD0", "\x82\xD3", "\x82\xD6", "\x82\xD9", "\x82\xDC", "\x82\xDD", "\x82\xDE", "\x82\xDF", "\x82\xE0", "\x82\xE2", "\x81\x40", "\x82\xE4", "\x81\x40", + "\x82\xE6", "\x82\xE7", "\x82\xE8", "\x82\xE9", "\x82\xEA", "\x82\xEB", "\x82\xED", "\x81\x40", "\x82\xF0", "\x81\x40", "\x82\xF1", "\x82\x9F", "\x82\xA1", + "\x82\xA3", "\x82\xA5", "\x82\xA7", "\x82\xE1", "\x81\x40", "\x82\xE3", "\x81\x40", "\x82\xE5", "\x82\xC1", "\x81\x40", "\x81\x5B", "\x81\x4A", "\x81\x4B", +}; + +static const char* l_mojiHira2[65] = { + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x82\xAA", "\x82\xAC", "\x82\xAE", "\x82\xB0", "\x82\xB2", "\x82\xB4", "\x82\xB6", "\x82\xB8", + "\x82\xBA", "\x82\xBC", "\x82\xBE", "\x82\xC0", "\x82\xC3", "\x82\xC5", "\x82\xC7", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x82\xCE", + "\x82\xD1", "\x82\xD4", "\x82\xD7", "\x82\xDA", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", +}; + +static const char* l_mojiHira3[65] = { + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x82\xCF", + "\x82\xD2", "\x82\xD5", "\x82\xD8", "\x82\xDB", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", +}; + +static const char* l_mojikata[65] = { + "\x83\x41", "\x83\x43", "\x83\x45", "\x83\x47", "\x83\x49", "\x83\x4A", "\x83\x4C", "\x83\x4E", "\x83\x50", "\x83\x52", "\x83\x54", "\x83\x56", "\x83\x58", + "\x83\x5A", "\x83\x5C", "\x83\x5E", "\x83\x60", "\x83\x63", "\x83\x65", "\x83\x67", "\x83\x69", "\x83\x6A", "\x83\x6B", "\x83\x6C", "\x83\x6D", "\x83\x6E", + "\x83\x71", "\x83\x74", "\x83\x77", "\x83\x7A", "\x83\x7D", "\x83\x7E", "\x83\x80", "\x83\x81", "\x83\x82", "\x83\x84", "\x81\x40", "\x83\x86", "\x81\x40", + "\x83\x88", "\x83\x89", "\x83\x8A", "\x83\x8B", "\x83\x8C", "\x83\x8D", "\x83\x8F", "\x81\x40", "\x83\x93", "\x81\x40", "\x83\x93", "\x83\x40", "\x83\x42" + "\x83\x44", "\x83\x46", "\x83\x48", "\x83\x83", "\x81\x40", "\x83\x85", "\x81\x40", "\x83\x87", "\x83\x62", "\x81\x40", "\x81\x5B", "\x81\x4A", "\x81\x4B", +}; + +static const char* l_mojikata2[65] = { + "\x81\x8F", "\x81\x8F", "\x83\x94", "\x81\x8F", "\x81\x8F", "\x83\x4B", "\x83\x4D", "\x83\x4F", "\x83\x51", "\x83\x53", "\x83\x55", "\x83\x57", "\x83\x59", + "\x83\x5B", "\x83\x5D", "\x83\x5F", "\x83\x61", "\x83\x64", "\x83\x66", "\x83\x68", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x83\x6F", + "\x83\x72", "\x83\x75", "\x83\x78", "\x83\x7B", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", +}; + +static const char* l_mojikata3[65] = { + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x83\x70", + "\x83\x73", "\x83\x76", "\x83\x79", "\x83\x7C", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", + "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", +}; + +static const char* l_mojiEisu[65] = { + "A", "N", "a", "n", "1", "B", "O", "b", "o", "2", "C", "P", "c", "p", "3", "D", "Q", + "d", "q", "4", "E", "R", "e", "r", "5", "F", "S", "f", "s", "6", "G", "T", "g", "t", + "7", "H", "U", "h", "u", "8", "I", "V", "i", "v", "9", "J", "W", "j", "w", "0", "K", + "X", "k", "x", ",", "L", "Y", "l", "y", ".", "M", "Z", "m", "z", " ", +}; +#else static const char* l_mojiHira[65] = { "あ", "い", "う", "え", "お", "か", "き", "く", "け", "こ", "さ", "し", "す", "せ", "そ", "た", "ち", "つ", "て", "と", "な", "に", "ぬ", "ね", "の", "は", @@ -71,6 +127,7 @@ static const char* l_mojiEisu[65] = { "7", "H", "U", "h", "u", "8", "I", "V", "i", "v", "9", "J", "W", "j", "w", "0", "K", "X", "k", "x", ",", "L", "Y", "l", "y", ".", "M", "Z", "m", "z", " ", }; +#endif #if TARGET_PC // The game normally mutates this string list to fill in the real character codes. diff --git a/src/dusk/iso_validate.cpp b/src/dusk/iso_validate.cpp index e83b3fd34e..0eac34711b 100644 --- a/src/dusk/iso_validate.cpp +++ b/src/dusk/iso_validate.cpp @@ -25,6 +25,7 @@ constexpr const char* PAL_GAME_IDS[] = { constexpr const char* SUPPORTED_TP_GAME_IDS[] = { "GZ2E01", // GCN USA "GZ2P01", // GCN PAL + "GZ2J01", }; template diff --git a/src/dusk/version.cpp b/src/dusk/version.cpp index e925dabaf8..1655031cdb 100644 --- a/src/dusk/version.cpp +++ b/src/dusk/version.cpp @@ -28,6 +28,8 @@ void init() { gameVersion = GameVersion::GcnUsa; } else if (game == "GZ2P") { gameVersion = GameVersion::GcnPal; + } else if (game == "GZ2J") { + gameVersion = GameVersion::GcnJpn; } else { // TODO: Handle remaining valid versions. DuskLog.fatal("Unknown/unsupported game version in disc: {}", game); From 00704ad838667e3c47b1fdd58adcc24c20ed5974 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Tue, 28 Apr 2026 03:43:52 -0700 Subject: [PATCH 002/223] mDoExt font region handling --- src/m_Do/m_Do_ext.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index fc8952e91d..48aa1cc2cd 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -3701,7 +3701,15 @@ static ResFONT* mDoExt_resfont0; static void mDoExt_initFont0() { static char const fontdata[] = "rodan_b_24_22.bfn"; -#if REGION_JPN +#if TARGET_PC + if (getGameVersion() == GameVersion::GcnJpn) { + mDoExt_initFontCommon(&mDoExt_font0, &mDoExt_resfont0, mDoExt_getZeldaHeap(), + fontdata, dComIfGp_getFontArchive(), 0, 200, 512); + } else { + mDoExt_initFontCommon(&mDoExt_font0, &mDoExt_resfont0, mDoExt_getZeldaHeap(), + fontdata, dComIfGp_getFontArchive(), 1, 0, 0); + } +#elif REGION_JPN mDoExt_initFontCommon(&mDoExt_font0, &mDoExt_resfont0, mDoExt_getZeldaHeap(), fontdata, dComIfGp_getFontArchive(), 0, 200, 512); #else @@ -3728,7 +3736,13 @@ void mDoExt_removeMesgFont() { JKR_DELETE(mDoExt_font0); mDoExt_font0 = NULL; if (mDoExt_resfont0 != NULL) { -#if REGION_JPN +#if TARGET_PC + if (getGameVersion() == GameVersion::GcnJpn) { + JKRFileLoader::removeResource(mDoExt_resfont0, NULL); + } else { + JKRFree(mDoExt_resfont0); + } +#elif REGION_JPN JKRFileLoader::removeResource(mDoExt_resfont0, NULL); #else JKRFree(mDoExt_resfont0); From 9a3428983bc7bb4df50511c08cdfc7a45dbb2dd4 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sat, 16 May 2026 19:37:46 -0700 Subject: [PATCH 003/223] build fix / verif --- src/dusk/iso_validate.cpp | 2 +- src/m_Do/m_Do_ext.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dusk/iso_validate.cpp b/src/dusk/iso_validate.cpp index 00cd365ca9..fbb05bab13 100644 --- a/src/dusk/iso_validate.cpp +++ b/src/dusk/iso_validate.cpp @@ -88,7 +88,7 @@ struct KnownDisc { constexpr auto KNOWN_DISCS = std::to_array({ {"GZ2E01", Platform::GameCube, Region::NorthAmerica, "14e886f08e548a000afde98a3195e788"}, - {"GZ2J01", Platform::GameCube, Region::Japan}, + {"GZ2J01", Platform::GameCube, Region::Japan, "5967dc7a6a553652f4d2050aeef6f368"}, {"GZ2P01", Platform::GameCube, Region::Europe, "9ef597588b0035ca9e91b333fa9a8a7e"}, {"RZDE01", Platform::Wii, Region::NorthAmerica}, {"RZDJ01", Platform::Wii, Region::Japan}, diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index 48aa1cc2cd..0ea258c527 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -26,6 +26,7 @@ #include #include "dusk/logging.h" #include "dusk/frame_interpolation.h" +#include "dusk/version.hpp" u8 mDoExt::CurrentHeapAdjustVerbose; u8 mDoExt::HeapAdjustVerbose; @@ -3702,7 +3703,7 @@ static ResFONT* mDoExt_resfont0; static void mDoExt_initFont0() { static char const fontdata[] = "rodan_b_24_22.bfn"; #if TARGET_PC - if (getGameVersion() == GameVersion::GcnJpn) { + if (dusk::version::getGameVersion() == dusk::version::GameVersion::GcnJpn) { mDoExt_initFontCommon(&mDoExt_font0, &mDoExt_resfont0, mDoExt_getZeldaHeap(), fontdata, dComIfGp_getFontArchive(), 0, 200, 512); } else { @@ -3737,7 +3738,7 @@ void mDoExt_removeMesgFont() { mDoExt_font0 = NULL; if (mDoExt_resfont0 != NULL) { #if TARGET_PC - if (getGameVersion() == GameVersion::GcnJpn) { + if (dusk::version::getGameVersion() == dusk::version::GameVersion::GcnJpn) { JKRFileLoader::removeResource(mDoExt_resfont0, NULL); } else { JKRFree(mDoExt_resfont0); From 1a7c853d9be2a38b2347850fd79af386fe0d0d8d Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sat, 16 May 2026 21:06:55 -0700 Subject: [PATCH 004/223] better disc info display --- src/d/d_s_logo.cpp | 9 ++++++++- src/dusk/iso_validate.cpp | 22 +++++++--------------- src/dusk/iso_validate.hpp | 15 ++++++++++++++- src/dusk/ui/prelaunch.cpp | 32 ++++++++++++++++++++++++++++++-- src/dusk/ui/settings.cpp | 4 ++-- 5 files changed, 61 insertions(+), 21 deletions(-) diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index db0cfa1387..7a58a4cf77 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -907,7 +907,14 @@ dScnLogo_c::~dScnLogo_c() { mDoExt_getRubyFont(); mDoExt_setAraCacheSize(free_size - aram_heap->getTotalFreeSize()); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (getGameVersion() == GameVersion::GcnJpn) { + if (dComIfGp_getFontArchive() != NULL) { + dComIfGp_getFontArchive()->unmount(); + dComIfGp_setFontArchive(NULL); + } + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGp_getFontArchive() != NULL) { dComIfGp_getFontArchive()->unmount(); dComIfGp_setFontArchive(NULL); diff --git a/src/dusk/iso_validate.cpp b/src/dusk/iso_validate.cpp index fbb05bab13..9dc2c894b8 100644 --- a/src/dusk/iso_validate.cpp +++ b/src/dusk/iso_validate.cpp @@ -60,18 +60,6 @@ const char* verification_state_name(dusk::DiscVerificationState state) noexcept namespace dusk::iso { -enum class Platform : u8 { - GameCube, - Wii, -}; - -enum class Region : u8 { - NorthAmerica, - Europe, - Japan, - Korea, -}; - struct KnownDisc { std::string_view id; Platform platform; @@ -216,7 +204,9 @@ ValidationError validate(const char* path, VerificationStatus& status, DiscInfo& return ValidationError::WrongGame; } status.knownDisc = knownDisc; - info.isPal = knownDisc->region == Region::Europe; + + info.platform = knownDisc->platform; + info.region = knownDisc->region; if (!knownDisc->supported) { return ValidationError::WrongVersion; } @@ -251,7 +241,9 @@ ValidationError inspect(const char* path, DiscInfo& info) { if (!knownDisc) { return ValidationError::WrongGame; } - info.isPal = knownDisc->region == Region::Europe; + + info.platform = knownDisc->platform; + info.region = knownDisc->region; if (!knownDisc->supported) { return ValidationError::WrongVersion; } @@ -260,7 +252,7 @@ ValidationError inspect(const char* path, DiscInfo& info) { bool isPal(const char* path) { DiscInfo info{}; - return inspect(path, info) == ValidationError::Success && info.isPal; + return inspect(path, info) == ValidationError::Success && info.region == Region::Europe; } void log_verification_state(std::string_view path, DiscVerificationState state) { diff --git a/src/dusk/iso_validate.hpp b/src/dusk/iso_validate.hpp index 176284fd02..c064aa81cd 100644 --- a/src/dusk/iso_validate.hpp +++ b/src/dusk/iso_validate.hpp @@ -17,6 +17,18 @@ enum class ValidationError : u8 { Success }; +enum class Platform : u8 { + GameCube, + Wii, +}; + +enum class Region : u8 { + NorthAmerica, + Europe, + Japan, + Korea, +}; + struct VerificationStatus { std::atomic_size_t bytesRead = 0; std::atomic_size_t bytesTotal = 0; @@ -25,7 +37,8 @@ struct VerificationStatus { }; struct DiscInfo { - bool isPal = false; + Platform platform = Platform::GameCube; + Region region = Region::NorthAmerica; }; ValidationError inspect(const char* path, DiscInfo& info); diff --git a/src/dusk/ui/prelaunch.cpp b/src/dusk/ui/prelaunch.cpp index ef6b6e5709..44f7ea47d6 100644 --- a/src/dusk/ui/prelaunch.cpp +++ b/src/dusk/ui/prelaunch.cpp @@ -877,8 +877,36 @@ void Prelaunch::update() { if (mDiscDetail != nullptr) { if (activeDiscLoaded) { mDiscDetail->SetProperty(Rml::PropertyId::Display, Rml::Style::Display::Block); - Rml::String innerRML = "GameCube • "; - innerRML += state.activeDiscInfo.isPal ? "EUR" : "USA"; + Rml::String innerRML = ""; + + switch (state.activeDiscInfo.platform) { + case iso::Platform::GameCube: + innerRML += "GameCube"; + break; + case iso::Platform::Wii: + innerRML += "Wii"; + break; + } + + innerRML += " • "; + + switch (state.activeDiscInfo.region) { + case iso::Region::Japan: + innerRML += "JPN"; + break; + case iso::Region::Europe: + innerRML += "EUR"; + break; + case iso::Region::NorthAmerica: + innerRML += "USA"; + break; + case iso::Region::Korea: + innerRML += "KOR"; + break; + default: + innerRML += "Unknown"; + break; + } mDiscDetail->SetInnerRML(innerRML); } else { mDiscDetail->SetProperty(Rml::PropertyId::Display, Rml::Style::Display::None); diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index f12cb11ade..0300b84747 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -562,7 +562,7 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) { .getValue = [] { const auto& state = prelaunch_state(); - if (!state.configuredDiscCanLaunch || !state.configuredDiscInfo.isPal) { + if (!state.configuredDiscCanLaunch || state.configuredDiscInfo.region != iso::Region::Europe) { return kLanguageNames[0]; } const u8 idx = static_cast(getSettings().game.language.getValue()); @@ -572,7 +572,7 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) { [] { const auto& state = prelaunch_state(); return !state.configuredDiscCanLaunch || - !state.configuredDiscInfo.isPal; + state.configuredDiscInfo.region != iso::Region::Europe; }, .isModified = [] { From 848f635798bf1d13fba6591b2714a8660e5e10a5 Mon Sep 17 00:00:00 2001 From: madeline Date: Mon, 1 Jun 2026 22:56:14 -0700 Subject: [PATCH 005/223] better tools --- files.cmake | 2894 ++++++++++++++++--------------- include/d/d_stage.h | 3 + include/dusk/game_clock.h | 4 + include/dusk/game_combos.h | 22 + include/dusk/settings.h | 2 + res/rml/command_console.rcss | 70 + src/d/d_stage.cpp | 21 + src/dusk/commands.cpp | 617 +++++++ src/dusk/commands.hpp | 22 + src/dusk/game_clock.cpp | 29 +- src/dusk/game_combos.cpp | 136 ++ src/dusk/imgui/ImGuiConsole.cpp | 6 - src/dusk/settings.cpp | 6 +- src/dusk/ui/command_console.cpp | 223 +++ src/dusk/ui/command_console.hpp | 55 + src/dusk/ui/settings.cpp | 14 + src/f_ap/f_ap_game.cpp | 16 - src/m_Do/m_Do_main.cpp | 20 +- 18 files changed, 2680 insertions(+), 1480 deletions(-) create mode 100644 include/dusk/game_combos.h create mode 100644 res/rml/command_console.rcss create mode 100644 src/dusk/commands.cpp create mode 100644 src/dusk/commands.hpp create mode 100644 src/dusk/game_combos.cpp create mode 100644 src/dusk/ui/command_console.cpp create mode 100644 src/dusk/ui/command_console.hpp diff --git a/files.cmake b/files.cmake index fe558ba41f..e4aa4968ae 100644 --- a/files.cmake +++ b/files.cmake @@ -1,1406 +1,1406 @@ set(DOLZEL_FILES - src/m_Do/m_Do_main.cpp - #src/m_Do/m_Do_printf.cpp - src/m_Do/m_Do_audio.cpp - src/m_Do/m_Do_controller_pad.cpp - #src/m_Do/m_Re_controller_pad.cpp - src/m_Do/m_Do_graphic.cpp - src/m_Do/m_Do_machine.cpp - src/m_Do/m_Do_mtx.cpp - src/m_Do/m_Do_ext.cpp - src/m_Do/m_Do_lib.cpp - src/m_Do/m_Do_Reset.cpp - src/m_Do/m_Do_dvd_thread.cpp - src/m_Do/m_Do_DVDError.cpp - src/m_Do/m_Do_MemCard.cpp - src/m_Do/m_Do_MemCardRWmng.cpp - src/m_Do/m_Do_hostIO.cpp - src/c/c_damagereaction.cpp - src/c/c_dylink.cpp - src/f_ap/f_ap_game.cpp - src/f_op/f_op_actor.cpp - src/f_op/f_op_actor_iter.cpp - src/f_op/f_op_actor_tag.cpp - src/f_op/f_op_camera.cpp - src/f_op/f_op_actor_mng.cpp - src/f_op/f_op_camera_mng.cpp - src/f_op/f_op_overlap.cpp - src/f_op/f_op_overlap_mng.cpp - src/f_op/f_op_overlap_req.cpp - src/f_op/f_op_scene.cpp - src/f_op/f_op_scene_iter.cpp - src/f_op/f_op_scene_mng.cpp - src/f_op/f_op_scene_req.cpp - src/f_op/f_op_scene_tag.cpp - src/f_op/f_op_view.cpp - src/f_op/f_op_kankyo.cpp - src/f_op/f_op_msg.cpp - src/f_op/f_op_kankyo_mng.cpp - src/f_op/f_op_msg_mng.cpp - src/f_op/f_op_draw_iter.cpp - src/f_op/f_op_draw_tag.cpp - src/f_op/f_op_scene_pause.cpp - src/f_pc/f_pc_base.cpp - src/f_pc/f_pc_create_iter.cpp - src/f_pc/f_pc_create_req.cpp - src/f_pc/f_pc_create_tag.cpp - src/f_pc/f_pc_creator.cpp - src/f_pc/f_pc_delete_tag.cpp - src/f_pc/f_pc_deletor.cpp - src/f_pc/f_pc_draw_priority.cpp - src/f_pc/f_pc_executor.cpp - src/f_pc/f_pc_layer.cpp - src/f_pc/f_pc_leaf.cpp - src/f_pc/f_pc_layer_iter.cpp - src/f_pc/f_pc_layer_tag.cpp - src/f_pc/f_pc_line.cpp - src/f_pc/f_pc_load.cpp - src/f_pc/f_pc_manager.cpp - src/f_pc/f_pc_method.cpp - src/f_pc/f_pc_node.cpp - src/f_pc/f_pc_node_req.cpp - src/f_pc/f_pc_priority.cpp - src/f_pc/f_pc_profile.cpp - src/f_pc/f_pc_searcher.cpp - src/f_pc/f_pc_line_tag.cpp - src/f_pc/f_pc_line_iter.cpp - src/f_pc/f_pc_method_iter.cpp - src/f_pc/f_pc_method_tag.cpp - src/f_pc/f_pc_pause.cpp - src/f_pc/f_pc_draw.cpp - src/f_pc/f_pc_fstcreate_req.cpp - src/f_pc/f_pc_stdcreate_req.cpp - src/f_pc/f_pc_debug_sv.cpp - src/d/d_stage.cpp - src/d/d_map.cpp - src/d/d_com_inf_game.cpp - src/d/d_com_static.cpp - src/d/d_com_inf_actor.cpp - src/d/d_bomb.cpp - src/d/d_lib.cpp - src/d/d_save.cpp - src/d/d_save_init.cpp - src/d/d_jnt_col.cpp - src/d/d_a_obj.cpp - src/d/d_a_itembase_static.cpp - src/d/d_a_item_static.cpp - src/d/d_a_shop_item_static.cpp - src/d/d_a_horse_static.cpp - src/d/d_demo.cpp - src/d/d_door_param2.cpp - src/d/d_resorce.cpp - src/d/d_map_path.cpp - src/d/d_map_path_fmap.cpp - src/d/d_map_path_dmap.cpp - src/d/d_event.cpp - src/d/d_event_data.cpp - src/d/d_event_manager.cpp - src/d/d_event_lib.cpp - src/d/d_simple_model.cpp - src/d/d_particle.cpp - src/d/d_particle_name.cpp - src/d/d_particle_copoly.cpp - src/d/d_path.cpp - src/d/d_drawlist.cpp - src/d/d_kankyo_data.cpp - src/d/d_kankyo_wether.cpp - src/d/d_kankyo_rain.cpp - src/d/d_kankyo_debug.cpp - src/d/d_vibration.cpp - src/d/d_vib_pattern.cpp - src/d/d_attention.cpp - src/d/d_bg_parts.cpp - src/d/d_bg_pc.cpp - src/d/d_att_dist.cpp - src/d/d_bg_plc.cpp - src/d/d_bg_s.cpp - src/d/d_bg_s_acch.cpp - src/d/d_bg_s_capt_poly.cpp - src/d/d_bg_s_chk.cpp - src/d/d_bg_s_gnd_chk.cpp - src/d/d_bg_s_grp_pass_chk.cpp - src/d/d_bg_s_lin_chk.cpp - src/d/d_bg_s_movebg_actor.cpp - src/d/d_bg_s_sph_chk.cpp - src/d/d_bg_s_spl_grp_chk.cpp - src/d/d_bg_s_poly_pass_chk.cpp - src/d/d_bg_s_roof_chk.cpp - src/d/d_bg_s_wtr_chk.cpp - src/d/d_bg_w.cpp - src/d/d_bg_w_base.cpp - src/d/d_bg_w_kcol.cpp - src/d/d_bg_w_sv.cpp - src/d/d_cc_d.cpp - src/d/d_cc_mass_s.cpp - src/d/d_cc_s.cpp - src/d/d_cc_uty.cpp - src/d/d_cam_param.cpp - src/d/d_ev_camera.cpp - src/d/d_spline_path.cpp - src/d/d_item_data.cpp - src/d/d_item.cpp - src/d/d_tresure.cpp - src/d/d_model.cpp - src/d/d_eye_hl.cpp - src/d/d_error_msg.cpp - src/d/d_debug_viewer.cpp - src/d/d_debug_camera.cpp - src/d/actor/d_a_alink.cpp - src/d/actor/d_a_itembase.cpp - src/d/actor/d_a_no_chg_room.cpp - src/d/actor/d_a_npc.cpp - src/d/actor/d_a_npc_cd.cpp - src/d/actor/d_a_npc_cd2.cpp - src/d/actor/d_a_obj_item.cpp - src/d/d_insect.cpp - src/d/actor/d_a_obj_ss_base.cpp - src/d/actor/d_a_player.cpp - src/d/d_camera.cpp - src/d/d_envse.cpp - src/d/d_file_select.cpp - src/d/d_file_sel_warning.cpp - src/d/d_file_sel_info.cpp - src/d/d_bright_check.cpp - src/d/d_scope.cpp - src/d/d_select_cursor.cpp - src/d/d_select_icon.cpp - src/d/d_shop_camera.cpp - src/d/d_shop_item_ctrl.cpp - src/d/d_shop_system.cpp - src/d/d_gameover.cpp - src/d/d_kankyo.cpp - src/d/d_kyeff.cpp - src/d/d_kyeff2.cpp - src/d/d_ky_thunder.cpp - src/d/d_kantera_icon_meter.cpp - src/d/d_menu_calibration.cpp - src/d/d_menu_collect.cpp - src/d/d_menu_dmap.cpp - src/d/d_menu_dmap_map.cpp - src/d/d_menu_map_common.cpp - src/d/d_menu_fishing.cpp - src/d/d_menu_fmap.cpp - src/d/d_menu_fmap_map.cpp - src/d/d_menu_fmap2D.cpp - src/d/d_menu_insect.cpp - src/d/d_menu_item_explain.cpp - src/d/d_menu_letter.cpp - src/d/d_menu_option.cpp - src/d/d_menu_ring.cpp - src/d/d_menu_save.cpp - src/d/d_menu_skill.cpp - src/d/d_menu_window_HIO.cpp - src/d/d_menu_window.cpp - src/d/d_meter_HIO.cpp - src/d/d_meter_button.cpp - src/d/d_meter_haihai.cpp - src/d/d_meter_hakusha.cpp - src/d/d_meter_map.cpp - src/d/d_meter_string.cpp - src/d/d_meter2_draw.cpp - src/d/d_meter2_info.cpp - src/d/d_meter2.cpp - src/d/d_msg_out_font.cpp - src/d/d_msg_class.cpp - src/d/d_msg_object.cpp - src/d/d_msg_unit.cpp - src/d/d_msg_scrn_3select.cpp - src/d/d_msg_scrn_arrow.cpp - src/d/d_msg_scrn_base.cpp - src/d/d_msg_scrn_boss.cpp - src/d/d_msg_scrn_explain.cpp - src/d/d_msg_scrn_item.cpp - src/d/d_msg_scrn_howl.cpp - src/d/d_msg_scrn_jimaku.cpp - src/d/d_msg_scrn_kanban.cpp - src/d/d_msg_scrn_light.cpp - src/d/d_msg_scrn_place.cpp - src/d/d_msg_scrn_staff.cpp - src/d/d_msg_scrn_talk.cpp - src/d/d_msg_scrn_tree.cpp - src/d/d_msg_string_base.cpp - src/d/d_msg_string.cpp - src/d/d_msg_flow.cpp - src/d/d_name.cpp - src/d/d_npc_lib.cpp - src/d/d_ovlp_fade.cpp - src/d/d_ovlp_fade2.cpp - src/d/d_ovlp_fade3.cpp - src/d/d_pane_class.cpp - src/d/d_pane_class_alpha.cpp - src/d/d_pane_class_ex.cpp - src/d/d_s_logo.cpp - src/d/d_s_menu.cpp - src/d/d_s_name.cpp - src/d/d_s_play.cpp - src/d/d_s_room.cpp - src/d/d_s_title.cpp - src/d/d_save_HIO.cpp - src/d/d_timer.cpp - src/d/d_k_wmark.cpp - src/d/d_k_wpillar.cpp - src/DynamicLink.cpp - src/CaptureScreen.cpp + src/m_Do/m_Do_main.cpp + #src/m_Do/m_Do_printf.cpp + src/m_Do/m_Do_audio.cpp + src/m_Do/m_Do_controller_pad.cpp + #src/m_Do/m_Re_controller_pad.cpp + src/m_Do/m_Do_graphic.cpp + src/m_Do/m_Do_machine.cpp + src/m_Do/m_Do_mtx.cpp + src/m_Do/m_Do_ext.cpp + src/m_Do/m_Do_lib.cpp + src/m_Do/m_Do_Reset.cpp + src/m_Do/m_Do_dvd_thread.cpp + src/m_Do/m_Do_DVDError.cpp + src/m_Do/m_Do_MemCard.cpp + src/m_Do/m_Do_MemCardRWmng.cpp + src/m_Do/m_Do_hostIO.cpp + src/c/c_damagereaction.cpp + src/c/c_dylink.cpp + src/f_ap/f_ap_game.cpp + src/f_op/f_op_actor.cpp + src/f_op/f_op_actor_iter.cpp + src/f_op/f_op_actor_tag.cpp + src/f_op/f_op_camera.cpp + src/f_op/f_op_actor_mng.cpp + src/f_op/f_op_camera_mng.cpp + src/f_op/f_op_overlap.cpp + src/f_op/f_op_overlap_mng.cpp + src/f_op/f_op_overlap_req.cpp + src/f_op/f_op_scene.cpp + src/f_op/f_op_scene_iter.cpp + src/f_op/f_op_scene_mng.cpp + src/f_op/f_op_scene_req.cpp + src/f_op/f_op_scene_tag.cpp + src/f_op/f_op_view.cpp + src/f_op/f_op_kankyo.cpp + src/f_op/f_op_msg.cpp + src/f_op/f_op_kankyo_mng.cpp + src/f_op/f_op_msg_mng.cpp + src/f_op/f_op_draw_iter.cpp + src/f_op/f_op_draw_tag.cpp + src/f_op/f_op_scene_pause.cpp + src/f_pc/f_pc_base.cpp + src/f_pc/f_pc_create_iter.cpp + src/f_pc/f_pc_create_req.cpp + src/f_pc/f_pc_create_tag.cpp + src/f_pc/f_pc_creator.cpp + src/f_pc/f_pc_delete_tag.cpp + src/f_pc/f_pc_deletor.cpp + src/f_pc/f_pc_draw_priority.cpp + src/f_pc/f_pc_executor.cpp + src/f_pc/f_pc_layer.cpp + src/f_pc/f_pc_leaf.cpp + src/f_pc/f_pc_layer_iter.cpp + src/f_pc/f_pc_layer_tag.cpp + src/f_pc/f_pc_line.cpp + src/f_pc/f_pc_load.cpp + src/f_pc/f_pc_manager.cpp + src/f_pc/f_pc_method.cpp + src/f_pc/f_pc_node.cpp + src/f_pc/f_pc_node_req.cpp + src/f_pc/f_pc_priority.cpp + src/f_pc/f_pc_profile.cpp + src/f_pc/f_pc_searcher.cpp + src/f_pc/f_pc_line_tag.cpp + src/f_pc/f_pc_line_iter.cpp + src/f_pc/f_pc_method_iter.cpp + src/f_pc/f_pc_method_tag.cpp + src/f_pc/f_pc_pause.cpp + src/f_pc/f_pc_draw.cpp + src/f_pc/f_pc_fstcreate_req.cpp + src/f_pc/f_pc_stdcreate_req.cpp + src/f_pc/f_pc_debug_sv.cpp + src/d/d_stage.cpp + src/d/d_map.cpp + src/d/d_com_inf_game.cpp + src/d/d_com_static.cpp + src/d/d_com_inf_actor.cpp + src/d/d_bomb.cpp + src/d/d_lib.cpp + src/d/d_save.cpp + src/d/d_save_init.cpp + src/d/d_jnt_col.cpp + src/d/d_a_obj.cpp + src/d/d_a_itembase_static.cpp + src/d/d_a_item_static.cpp + src/d/d_a_shop_item_static.cpp + src/d/d_a_horse_static.cpp + src/d/d_demo.cpp + src/d/d_door_param2.cpp + src/d/d_resorce.cpp + src/d/d_map_path.cpp + src/d/d_map_path_fmap.cpp + src/d/d_map_path_dmap.cpp + src/d/d_event.cpp + src/d/d_event_data.cpp + src/d/d_event_manager.cpp + src/d/d_event_lib.cpp + src/d/d_simple_model.cpp + src/d/d_particle.cpp + src/d/d_particle_name.cpp + src/d/d_particle_copoly.cpp + src/d/d_path.cpp + src/d/d_drawlist.cpp + src/d/d_kankyo_data.cpp + src/d/d_kankyo_wether.cpp + src/d/d_kankyo_rain.cpp + src/d/d_kankyo_debug.cpp + src/d/d_vibration.cpp + src/d/d_vib_pattern.cpp + src/d/d_attention.cpp + src/d/d_bg_parts.cpp + src/d/d_bg_pc.cpp + src/d/d_att_dist.cpp + src/d/d_bg_plc.cpp + src/d/d_bg_s.cpp + src/d/d_bg_s_acch.cpp + src/d/d_bg_s_capt_poly.cpp + src/d/d_bg_s_chk.cpp + src/d/d_bg_s_gnd_chk.cpp + src/d/d_bg_s_grp_pass_chk.cpp + src/d/d_bg_s_lin_chk.cpp + src/d/d_bg_s_movebg_actor.cpp + src/d/d_bg_s_sph_chk.cpp + src/d/d_bg_s_spl_grp_chk.cpp + src/d/d_bg_s_poly_pass_chk.cpp + src/d/d_bg_s_roof_chk.cpp + src/d/d_bg_s_wtr_chk.cpp + src/d/d_bg_w.cpp + src/d/d_bg_w_base.cpp + src/d/d_bg_w_kcol.cpp + src/d/d_bg_w_sv.cpp + src/d/d_cc_d.cpp + src/d/d_cc_mass_s.cpp + src/d/d_cc_s.cpp + src/d/d_cc_uty.cpp + src/d/d_cam_param.cpp + src/d/d_ev_camera.cpp + src/d/d_spline_path.cpp + src/d/d_item_data.cpp + src/d/d_item.cpp + src/d/d_tresure.cpp + src/d/d_model.cpp + src/d/d_eye_hl.cpp + src/d/d_error_msg.cpp + src/d/d_debug_viewer.cpp + src/d/d_debug_camera.cpp + src/d/actor/d_a_alink.cpp + src/d/actor/d_a_itembase.cpp + src/d/actor/d_a_no_chg_room.cpp + src/d/actor/d_a_npc.cpp + src/d/actor/d_a_npc_cd.cpp + src/d/actor/d_a_npc_cd2.cpp + src/d/actor/d_a_obj_item.cpp + src/d/d_insect.cpp + src/d/actor/d_a_obj_ss_base.cpp + src/d/actor/d_a_player.cpp + src/d/d_camera.cpp + src/d/d_envse.cpp + src/d/d_file_select.cpp + src/d/d_file_sel_warning.cpp + src/d/d_file_sel_info.cpp + src/d/d_bright_check.cpp + src/d/d_scope.cpp + src/d/d_select_cursor.cpp + src/d/d_select_icon.cpp + src/d/d_shop_camera.cpp + src/d/d_shop_item_ctrl.cpp + src/d/d_shop_system.cpp + src/d/d_gameover.cpp + src/d/d_kankyo.cpp + src/d/d_kyeff.cpp + src/d/d_kyeff2.cpp + src/d/d_ky_thunder.cpp + src/d/d_kantera_icon_meter.cpp + src/d/d_menu_calibration.cpp + src/d/d_menu_collect.cpp + src/d/d_menu_dmap.cpp + src/d/d_menu_dmap_map.cpp + src/d/d_menu_map_common.cpp + src/d/d_menu_fishing.cpp + src/d/d_menu_fmap.cpp + src/d/d_menu_fmap_map.cpp + src/d/d_menu_fmap2D.cpp + src/d/d_menu_insect.cpp + src/d/d_menu_item_explain.cpp + src/d/d_menu_letter.cpp + src/d/d_menu_option.cpp + src/d/d_menu_ring.cpp + src/d/d_menu_save.cpp + src/d/d_menu_skill.cpp + src/d/d_menu_window_HIO.cpp + src/d/d_menu_window.cpp + src/d/d_meter_HIO.cpp + src/d/d_meter_button.cpp + src/d/d_meter_haihai.cpp + src/d/d_meter_hakusha.cpp + src/d/d_meter_map.cpp + src/d/d_meter_string.cpp + src/d/d_meter2_draw.cpp + src/d/d_meter2_info.cpp + src/d/d_meter2.cpp + src/d/d_msg_out_font.cpp + src/d/d_msg_class.cpp + src/d/d_msg_object.cpp + src/d/d_msg_unit.cpp + src/d/d_msg_scrn_3select.cpp + src/d/d_msg_scrn_arrow.cpp + src/d/d_msg_scrn_base.cpp + src/d/d_msg_scrn_boss.cpp + src/d/d_msg_scrn_explain.cpp + src/d/d_msg_scrn_item.cpp + src/d/d_msg_scrn_howl.cpp + src/d/d_msg_scrn_jimaku.cpp + src/d/d_msg_scrn_kanban.cpp + src/d/d_msg_scrn_light.cpp + src/d/d_msg_scrn_place.cpp + src/d/d_msg_scrn_staff.cpp + src/d/d_msg_scrn_talk.cpp + src/d/d_msg_scrn_tree.cpp + src/d/d_msg_string_base.cpp + src/d/d_msg_string.cpp + src/d/d_msg_flow.cpp + src/d/d_name.cpp + src/d/d_npc_lib.cpp + src/d/d_ovlp_fade.cpp + src/d/d_ovlp_fade2.cpp + src/d/d_ovlp_fade3.cpp + src/d/d_pane_class.cpp + src/d/d_pane_class_alpha.cpp + src/d/d_pane_class_ex.cpp + src/d/d_s_logo.cpp + src/d/d_s_menu.cpp + src/d/d_s_name.cpp + src/d/d_s_play.cpp + src/d/d_s_room.cpp + src/d/d_s_title.cpp + src/d/d_save_HIO.cpp + src/d/d_timer.cpp + src/d/d_k_wmark.cpp + src/d/d_k_wpillar.cpp + src/DynamicLink.cpp + src/CaptureScreen.cpp ) if(DEBUG) list(APPEND DOLZEL_FILES src/d/d_event_debug.cpp) endif(DEBUG) set(Z2AUDIOLIB_FILES - src/Z2AudioLib/Z2Calc.cpp - src/Z2AudioLib/Z2AudioArcLoader.cpp - src/Z2AudioLib/Z2Param.cpp - src/Z2AudioLib/Z2SoundMgr.cpp - src/Z2AudioLib/Z2SoundStarter.cpp - src/Z2AudioLib/Z2SoundHandles.cpp - src/Z2AudioLib/Z2SeMgr.cpp - src/Z2AudioLib/Z2SeqMgr.cpp - src/Z2AudioLib/Z2StatusMgr.cpp - src/Z2AudioLib/Z2SceneMgr.cpp - src/Z2AudioLib/Z2FxLineMgr.cpp - src/Z2AudioLib/Z2SoundInfo.cpp - src/Z2AudioLib/Z2Audience.cpp - src/Z2AudioLib/Z2SoundObject.cpp - src/Z2AudioLib/Z2SoundObjMgr.cpp - src/Z2AudioLib/Z2Creature.cpp - src/Z2AudioLib/Z2LinkMgr.cpp - src/Z2AudioLib/Z2EnvSeMgr.cpp - src/Z2AudioLib/Z2WolfHowlMgr.cpp - src/Z2AudioLib/Z2SpeechMgr2.cpp - src/Z2AudioLib/Z2AudioMgr.cpp + src/Z2AudioLib/Z2Calc.cpp + src/Z2AudioLib/Z2AudioArcLoader.cpp + src/Z2AudioLib/Z2Param.cpp + src/Z2AudioLib/Z2SoundMgr.cpp + src/Z2AudioLib/Z2SoundStarter.cpp + src/Z2AudioLib/Z2SoundHandles.cpp + src/Z2AudioLib/Z2SeMgr.cpp + src/Z2AudioLib/Z2SeqMgr.cpp + src/Z2AudioLib/Z2StatusMgr.cpp + src/Z2AudioLib/Z2SceneMgr.cpp + src/Z2AudioLib/Z2FxLineMgr.cpp + src/Z2AudioLib/Z2SoundInfo.cpp + src/Z2AudioLib/Z2Audience.cpp + src/Z2AudioLib/Z2SoundObject.cpp + src/Z2AudioLib/Z2SoundObjMgr.cpp + src/Z2AudioLib/Z2Creature.cpp + src/Z2AudioLib/Z2LinkMgr.cpp + src/Z2AudioLib/Z2EnvSeMgr.cpp + src/Z2AudioLib/Z2WolfHowlMgr.cpp + src/Z2AudioLib/Z2SpeechMgr2.cpp + src/Z2AudioLib/Z2AudioMgr.cpp ) set(SSYSTEM_FILES - src/SSystem/SComponent/c_malloc.cpp - src/SSystem/SComponent/c_API.cpp - src/SSystem/SComponent/c_API_controller_pad.cpp - src/SSystem/SComponent/c_API_graphic.cpp - src/SSystem/SComponent/c_cc_d.cpp - src/SSystem/SComponent/c_cc_s.cpp - src/SSystem/SComponent/c_counter.cpp - src/SSystem/SComponent/c_list.cpp - src/SSystem/SComponent/c_list_iter.cpp - src/SSystem/SComponent/c_node.cpp - src/SSystem/SComponent/c_node_iter.cpp - src/SSystem/SComponent/c_tree.cpp - src/SSystem/SComponent/c_tree_iter.cpp - src/SSystem/SComponent/c_phase.cpp - src/SSystem/SComponent/c_request.cpp - src/SSystem/SComponent/c_tag.cpp - src/SSystem/SComponent/c_tag_iter.cpp - src/SSystem/SComponent/c_xyz.cpp - src/SSystem/SComponent/c_sxyz.cpp - src/SSystem/SComponent/c_math.cpp - src/SSystem/SComponent/c_bg_s_chk.cpp - src/SSystem/SComponent/c_bg_s_gnd_chk.cpp - src/SSystem/SComponent/c_bg_s_lin_chk.cpp - src/SSystem/SComponent/c_bg_s_shdw_draw.cpp - src/SSystem/SComponent/c_bg_s_poly_info.cpp - src/SSystem/SComponent/c_bg_w.cpp - src/SSystem/SComponent/c_m2d.cpp - src/SSystem/SComponent/c_m3d.cpp - src/SSystem/SComponent/c_m3d_g_aab.cpp - src/SSystem/SComponent/c_m3d_g_cir.cpp - src/SSystem/SComponent/c_m3d_g_cps.cpp - src/SSystem/SComponent/c_m3d_g_cyl.cpp - src/SSystem/SComponent/c_m3d_g_lin.cpp - src/SSystem/SComponent/c_m3d_g_pla.cpp - src/SSystem/SComponent/c_m3d_g_sph.cpp - src/SSystem/SComponent/c_m3d_g_tri.cpp - src/SSystem/SComponent/c_m3d_g_vtx.cpp - src/SSystem/SComponent/c_lib.cpp - src/SSystem/SComponent/c_angle.cpp - src/SSystem/SStandard/s_basic.cpp + src/SSystem/SComponent/c_malloc.cpp + src/SSystem/SComponent/c_API.cpp + src/SSystem/SComponent/c_API_controller_pad.cpp + src/SSystem/SComponent/c_API_graphic.cpp + src/SSystem/SComponent/c_cc_d.cpp + src/SSystem/SComponent/c_cc_s.cpp + src/SSystem/SComponent/c_counter.cpp + src/SSystem/SComponent/c_list.cpp + src/SSystem/SComponent/c_list_iter.cpp + src/SSystem/SComponent/c_node.cpp + src/SSystem/SComponent/c_node_iter.cpp + src/SSystem/SComponent/c_tree.cpp + src/SSystem/SComponent/c_tree_iter.cpp + src/SSystem/SComponent/c_phase.cpp + src/SSystem/SComponent/c_request.cpp + src/SSystem/SComponent/c_tag.cpp + src/SSystem/SComponent/c_tag_iter.cpp + src/SSystem/SComponent/c_xyz.cpp + src/SSystem/SComponent/c_sxyz.cpp + src/SSystem/SComponent/c_math.cpp + src/SSystem/SComponent/c_bg_s_chk.cpp + src/SSystem/SComponent/c_bg_s_gnd_chk.cpp + src/SSystem/SComponent/c_bg_s_lin_chk.cpp + src/SSystem/SComponent/c_bg_s_shdw_draw.cpp + src/SSystem/SComponent/c_bg_s_poly_info.cpp + src/SSystem/SComponent/c_bg_w.cpp + src/SSystem/SComponent/c_m2d.cpp + src/SSystem/SComponent/c_m3d.cpp + src/SSystem/SComponent/c_m3d_g_aab.cpp + src/SSystem/SComponent/c_m3d_g_cir.cpp + src/SSystem/SComponent/c_m3d_g_cps.cpp + src/SSystem/SComponent/c_m3d_g_cyl.cpp + src/SSystem/SComponent/c_m3d_g_lin.cpp + src/SSystem/SComponent/c_m3d_g_pla.cpp + src/SSystem/SComponent/c_m3d_g_sph.cpp + src/SSystem/SComponent/c_m3d_g_tri.cpp + src/SSystem/SComponent/c_m3d_g_vtx.cpp + src/SSystem/SComponent/c_lib.cpp + src/SSystem/SComponent/c_angle.cpp + src/SSystem/SStandard/s_basic.cpp ) add_library(JSystem_JParticle STATIC - libs/JSystem/src/JParticle/JPAResourceManager.cpp - libs/JSystem/src/JParticle/JPAResource.cpp - libs/JSystem/src/JParticle/JPABaseShape.cpp - libs/JSystem/src/JParticle/JPAExtraShape.cpp - libs/JSystem/src/JParticle/JPAChildShape.cpp - libs/JSystem/src/JParticle/JPAExTexShape.cpp - libs/JSystem/src/JParticle/JPADynamicsBlock.cpp - libs/JSystem/src/JParticle/JPAFieldBlock.cpp - libs/JSystem/src/JParticle/JPAKeyBlock.cpp - libs/JSystem/src/JParticle/JPATexture.cpp - libs/JSystem/src/JParticle/JPAResourceLoader.cpp - libs/JSystem/src/JParticle/JPAEmitterManager.cpp - libs/JSystem/src/JParticle/JPAEmitter.cpp - libs/JSystem/src/JParticle/JPAParticle.cpp - libs/JSystem/src/JParticle/JPAMath.cpp + libs/JSystem/src/JParticle/JPAResourceManager.cpp + libs/JSystem/src/JParticle/JPAResource.cpp + libs/JSystem/src/JParticle/JPABaseShape.cpp + libs/JSystem/src/JParticle/JPAExtraShape.cpp + libs/JSystem/src/JParticle/JPAChildShape.cpp + libs/JSystem/src/JParticle/JPAExTexShape.cpp + libs/JSystem/src/JParticle/JPADynamicsBlock.cpp + libs/JSystem/src/JParticle/JPAFieldBlock.cpp + libs/JSystem/src/JParticle/JPAKeyBlock.cpp + libs/JSystem/src/JParticle/JPATexture.cpp + libs/JSystem/src/JParticle/JPAResourceLoader.cpp + libs/JSystem/src/JParticle/JPAEmitterManager.cpp + libs/JSystem/src/JParticle/JPAEmitter.cpp + libs/JSystem/src/JParticle/JPAParticle.cpp + libs/JSystem/src/JParticle/JPAMath.cpp ) add_library(JSystem_JFramework STATIC - libs/JSystem/src/JFramework/JFWSystem.cpp - libs/JSystem/src/JFramework/JFWDisplay.cpp + libs/JSystem/src/JFramework/JFWSystem.cpp + libs/JSystem/src/JFramework/JFWDisplay.cpp ) add_library(JSystem_J3DU STATIC - libs/JSystem/src/J3DU/J3DUClipper.cpp - libs/JSystem/src/J3DU/J3DUDL.cpp + libs/JSystem/src/J3DU/J3DUClipper.cpp + libs/JSystem/src/J3DU/J3DUDL.cpp ) add_library(JSystem_JKernel STATIC - libs/JSystem/src/JKernel/JKRHeap.cpp - libs/JSystem/src/JKernel/JKRExpHeap.cpp - libs/JSystem/src/JKernel/JKRSolidHeap.cpp - libs/JSystem/src/JKernel/JKRAssertHeap.cpp - libs/JSystem/src/JKernel/JKRDisposer.cpp - libs/JSystem/src/JKernel/JKRThread.cpp - libs/JSystem/src/JKernel/JKRAram.cpp - libs/JSystem/src/JKernel/JKRAramHeap.cpp - libs/JSystem/src/JKernel/JKRAramBlock.cpp - libs/JSystem/src/JKernel/JKRAramPiece.cpp - libs/JSystem/src/JKernel/JKRAramStream.cpp - libs/JSystem/src/JKernel/JKRFileLoader.cpp - libs/JSystem/src/JKernel/JKRFileFinder.cpp - libs/JSystem/src/JKernel/JKRFileCache.cpp - libs/JSystem/src/JKernel/JKRArchivePub.cpp - libs/JSystem/src/JKernel/JKRArchivePri.cpp - libs/JSystem/src/JKernel/JKRMemArchive.cpp - libs/JSystem/src/JKernel/JKRAramArchive.cpp - libs/JSystem/src/JKernel/JKRDvdArchive.cpp - libs/JSystem/src/JKernel/JKRCompArchive.cpp - libs/JSystem/src/JKernel/JKRFile.cpp - libs/JSystem/src/JKernel/JKRDvdFile.cpp - libs/JSystem/src/JKernel/JKRDvdRipper.cpp - libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp - libs/JSystem/src/JKernel/JKRDecomp.cpp + libs/JSystem/src/JKernel/JKRHeap.cpp + libs/JSystem/src/JKernel/JKRExpHeap.cpp + libs/JSystem/src/JKernel/JKRSolidHeap.cpp + libs/JSystem/src/JKernel/JKRAssertHeap.cpp + libs/JSystem/src/JKernel/JKRDisposer.cpp + libs/JSystem/src/JKernel/JKRThread.cpp + libs/JSystem/src/JKernel/JKRAram.cpp + libs/JSystem/src/JKernel/JKRAramHeap.cpp + libs/JSystem/src/JKernel/JKRAramBlock.cpp + libs/JSystem/src/JKernel/JKRAramPiece.cpp + libs/JSystem/src/JKernel/JKRAramStream.cpp + libs/JSystem/src/JKernel/JKRFileLoader.cpp + libs/JSystem/src/JKernel/JKRFileFinder.cpp + libs/JSystem/src/JKernel/JKRFileCache.cpp + libs/JSystem/src/JKernel/JKRArchivePub.cpp + libs/JSystem/src/JKernel/JKRArchivePri.cpp + libs/JSystem/src/JKernel/JKRMemArchive.cpp + libs/JSystem/src/JKernel/JKRAramArchive.cpp + libs/JSystem/src/JKernel/JKRDvdArchive.cpp + libs/JSystem/src/JKernel/JKRCompArchive.cpp + libs/JSystem/src/JKernel/JKRFile.cpp + libs/JSystem/src/JKernel/JKRDvdFile.cpp + libs/JSystem/src/JKernel/JKRDvdRipper.cpp + libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp + libs/JSystem/src/JKernel/JKRDecomp.cpp ) add_library(JSystem_JMath STATIC - libs/JSystem/src/JMath/JMath.cpp - libs/JSystem/src/JMath/random.cpp - libs/JSystem/src/JMath/JMATrigonometric.cpp + libs/JSystem/src/JMath/JMath.cpp + libs/JSystem/src/JMath/random.cpp + libs/JSystem/src/JMath/JMATrigonometric.cpp ) add_library(JSystem_JSupport STATIC - libs/JSystem/src/JSupport/JSUList.cpp - libs/JSystem/src/JSupport/JSUInputStream.cpp - libs/JSystem/src/JSupport/JSUOutputStream.cpp - libs/JSystem/src/JSupport/JSUMemoryStream.cpp - libs/JSystem/src/JSupport/JSUFileStream.cpp + libs/JSystem/src/JSupport/JSUList.cpp + libs/JSystem/src/JSupport/JSUInputStream.cpp + libs/JSystem/src/JSupport/JSUOutputStream.cpp + libs/JSystem/src/JSupport/JSUMemoryStream.cpp + libs/JSystem/src/JSupport/JSUFileStream.cpp ) add_library(JSystem_JUtility STATIC - libs/JSystem/src/JUtility/JUTCacheFont.cpp - libs/JSystem/src/JUtility/JUTResource.cpp - libs/JSystem/src/JUtility/JUTTexture.cpp - libs/JSystem/src/JUtility/JUTPalette.cpp - libs/JSystem/src/JUtility/JUTNameTab.cpp - libs/JSystem/src/JUtility/JUTGraphFifo.cpp - libs/JSystem/src/JUtility/JUTFont.cpp - libs/JSystem/src/JUtility/JUTResFont.cpp - libs/JSystem/src/JUtility/JUTDbPrint.cpp - libs/JSystem/src/JUtility/JUTGamePad.cpp - libs/JSystem/src/JUtility/JUTException.cpp - libs/JSystem/src/JUtility/JUTDirectPrint.cpp - libs/JSystem/src/JUtility/JUTAssert.cpp - libs/JSystem/src/JUtility/JUTVideo.cpp - libs/JSystem/src/JUtility/JUTXfb.cpp - libs/JSystem/src/JUtility/JUTFader.cpp - libs/JSystem/src/JUtility/JUTProcBar.cpp - libs/JSystem/src/JUtility/JUTConsole.cpp - libs/JSystem/src/JUtility/JUTDirectFile.cpp - libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp + libs/JSystem/src/JUtility/JUTCacheFont.cpp + libs/JSystem/src/JUtility/JUTResource.cpp + libs/JSystem/src/JUtility/JUTTexture.cpp + libs/JSystem/src/JUtility/JUTPalette.cpp + libs/JSystem/src/JUtility/JUTNameTab.cpp + libs/JSystem/src/JUtility/JUTGraphFifo.cpp + libs/JSystem/src/JUtility/JUTFont.cpp + libs/JSystem/src/JUtility/JUTResFont.cpp + libs/JSystem/src/JUtility/JUTDbPrint.cpp + libs/JSystem/src/JUtility/JUTGamePad.cpp + libs/JSystem/src/JUtility/JUTException.cpp + libs/JSystem/src/JUtility/JUTDirectPrint.cpp + libs/JSystem/src/JUtility/JUTAssert.cpp + libs/JSystem/src/JUtility/JUTVideo.cpp + libs/JSystem/src/JUtility/JUTXfb.cpp + libs/JSystem/src/JUtility/JUTFader.cpp + libs/JSystem/src/JUtility/JUTProcBar.cpp + libs/JSystem/src/JUtility/JUTConsole.cpp + libs/JSystem/src/JUtility/JUTDirectFile.cpp + libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp ) add_library(JSystem_JStage STATIC - libs/JSystem/src/JStage/JSGActor.cpp - libs/JSystem/src/JStage/JSGAmbientLight.cpp - libs/JSystem/src/JStage/JSGCamera.cpp - libs/JSystem/src/JStage/JSGFog.cpp - libs/JSystem/src/JStage/JSGLight.cpp - libs/JSystem/src/JStage/JSGObject.cpp - libs/JSystem/src/JStage/JSGSystem.cpp + libs/JSystem/src/JStage/JSGActor.cpp + libs/JSystem/src/JStage/JSGAmbientLight.cpp + libs/JSystem/src/JStage/JSGCamera.cpp + libs/JSystem/src/JStage/JSGFog.cpp + libs/JSystem/src/JStage/JSGLight.cpp + libs/JSystem/src/JStage/JSGObject.cpp + libs/JSystem/src/JStage/JSGSystem.cpp ) add_library(JSystem_J2DGraph STATIC - libs/JSystem/src/J2DGraph/J2DGrafContext.cpp - libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp - libs/JSystem/src/J2DGraph/J2DTevs.cpp - libs/JSystem/src/J2DGraph/J2DMaterial.cpp - libs/JSystem/src/J2DGraph/J2DMatBlock.cpp - libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp - libs/JSystem/src/J2DGraph/J2DPrint.cpp - libs/JSystem/src/J2DGraph/J2DPane.cpp - libs/JSystem/src/J2DGraph/J2DScreen.cpp - libs/JSystem/src/J2DGraph/J2DWindow.cpp - libs/JSystem/src/J2DGraph/J2DPicture.cpp - libs/JSystem/src/J2DGraph/J2DTextBox.cpp - libs/JSystem/src/J2DGraph/J2DWindowEx.cpp - libs/JSystem/src/J2DGraph/J2DPictureEx.cpp - libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp - libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp - libs/JSystem/src/J2DGraph/J2DAnimation.cpp - libs/JSystem/src/J2DGraph/J2DManage.cpp + libs/JSystem/src/J2DGraph/J2DGrafContext.cpp + libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp + libs/JSystem/src/J2DGraph/J2DTevs.cpp + libs/JSystem/src/J2DGraph/J2DMaterial.cpp + libs/JSystem/src/J2DGraph/J2DMatBlock.cpp + libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp + libs/JSystem/src/J2DGraph/J2DPrint.cpp + libs/JSystem/src/J2DGraph/J2DPane.cpp + libs/JSystem/src/J2DGraph/J2DScreen.cpp + libs/JSystem/src/J2DGraph/J2DWindow.cpp + libs/JSystem/src/J2DGraph/J2DPicture.cpp + libs/JSystem/src/J2DGraph/J2DTextBox.cpp + libs/JSystem/src/J2DGraph/J2DWindowEx.cpp + libs/JSystem/src/J2DGraph/J2DPictureEx.cpp + libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp + libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp + libs/JSystem/src/J2DGraph/J2DAnimation.cpp + libs/JSystem/src/J2DGraph/J2DManage.cpp ) add_library(JSystem_J3DGraphBase STATIC - libs/JSystem/src/J3DGraphBase/J3DGD.cpp - libs/JSystem/src/J3DGraphBase/J3DSys.cpp - libs/JSystem/src/J3DGraphBase/J3DVertex.cpp - libs/JSystem/src/J3DGraphBase/J3DTransform.cpp - libs/JSystem/src/J3DGraphBase/J3DTexture.cpp - libs/JSystem/src/J3DGraphBase/J3DPacket.cpp - libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp - libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp - libs/JSystem/src/J3DGraphBase/J3DShape.cpp - libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp - libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp - libs/JSystem/src/J3DGraphBase/J3DTevs.cpp - libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp - libs/JSystem/src/J3DGraphBase/J3DStruct.cpp + libs/JSystem/src/J3DGraphBase/J3DGD.cpp + libs/JSystem/src/J3DGraphBase/J3DSys.cpp + libs/JSystem/src/J3DGraphBase/J3DVertex.cpp + libs/JSystem/src/J3DGraphBase/J3DTransform.cpp + libs/JSystem/src/J3DGraphBase/J3DTexture.cpp + libs/JSystem/src/J3DGraphBase/J3DPacket.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp + libs/JSystem/src/J3DGraphBase/J3DShape.cpp + libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp + libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp + libs/JSystem/src/J3DGraphBase/J3DTevs.cpp + libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp + libs/JSystem/src/J3DGraphBase/J3DStruct.cpp ) add_library(JSystem_J3DGraphAnimator STATIC - libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp - libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp - libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp - libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp - libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp - libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp - libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp - libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp + libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp + libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp + libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp + libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp ) add_library(JSystem_J3DGraphLoader STATIC - libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp - libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp - libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp - libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp - libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp + libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp + libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp ) add_library(JSystem_JStudio STATIC - libs/JSystem/src/JStudio/JStudio/ctb.cpp - libs/JSystem/src/JStudio/JStudio/ctb-data.cpp - libs/JSystem/src/JStudio/JStudio/functionvalue.cpp - libs/JSystem/src/JStudio/JStudio/fvb.cpp - libs/JSystem/src/JStudio/JStudio/fvb-data.cpp - libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp - libs/JSystem/src/JStudio/JStudio/object-id.cpp - libs/JSystem/src/JStudio/JStudio/stb.cpp - libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp - libs/JSystem/src/JStudio/JStudio/stb-data.cpp + libs/JSystem/src/JStudio/JStudio/ctb.cpp + libs/JSystem/src/JStudio/JStudio/ctb-data.cpp + libs/JSystem/src/JStudio/JStudio/functionvalue.cpp + libs/JSystem/src/JStudio/JStudio/fvb.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp + libs/JSystem/src/JStudio/JStudio/object-id.cpp + libs/JSystem/src/JStudio/JStudio/stb.cpp + libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/stb-data.cpp ) add_library(JSystem_JStudio_JStage STATIC - libs/JSystem/src/JStudio/JStudio_JStage/control.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp + libs/JSystem/src/JStudio/JStudio_JStage/control.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp ) add_library(JSystem_JStudio_JAudio2 STATIC - libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp - libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp ) add_library(JSystem_JStudio_JParticle STATIC - libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp - libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp ) add_library(JSystem_JAudio2 STATIC - libs/JSystem/src/JAudio2/JASCalc.cpp - libs/JSystem/src/JAudio2/JASTaskThread.cpp - libs/JSystem/src/JAudio2/JASDvdThread.cpp - libs/JSystem/src/JAudio2/JASCallback.cpp - libs/JSystem/src/JAudio2/JASHeapCtrl.cpp - libs/JSystem/src/JAudio2/JASResArcLoader.cpp - libs/JSystem/src/JAudio2/JASProbe.cpp - libs/JSystem/src/JAudio2/JASReport.cpp - libs/JSystem/src/JAudio2/JASCmdStack.cpp - libs/JSystem/src/JAudio2/JASTrack.cpp - libs/JSystem/src/JAudio2/JASTrackPort.cpp - libs/JSystem/src/JAudio2/JASRegisterParam.cpp - libs/JSystem/src/JAudio2/JASSeqCtrl.cpp - libs/JSystem/src/JAudio2/JASSeqParser.cpp - libs/JSystem/src/JAudio2/JASSeqReader.cpp - libs/JSystem/src/JAudio2/JASAramStream.cpp - libs/JSystem/src/JAudio2/JASBank.cpp - libs/JSystem/src/JAudio2/JASBasicBank.cpp - libs/JSystem/src/JAudio2/JASVoiceBank.cpp - libs/JSystem/src/JAudio2/JASBasicInst.cpp - libs/JSystem/src/JAudio2/JASDrumSet.cpp - libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp - libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp - libs/JSystem/src/JAudio2/JASWSParser.cpp - libs/JSystem/src/JAudio2/JASBNKParser.cpp - libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp - libs/JSystem/src/JAudio2/JASChannel.cpp - libs/JSystem/src/JAudio2/JASLfo.cpp - libs/JSystem/src/JAudio2/JASOscillator.cpp - libs/JSystem/src/JAudio2/JASAiCtrl.cpp - libs/JSystem/src/JAudio2/JASAudioThread.cpp - libs/JSystem/src/JAudio2/JASAudioReseter.cpp - libs/JSystem/src/JAudio2/JASDSPChannel.cpp - libs/JSystem/src/JAudio2/JASDSPInterface.cpp - libs/JSystem/src/JAudio2/JASDriverIF.cpp - libs/JSystem/src/JAudio2/JASSoundParams.cpp - libs/JSystem/src/JAudio2/JAIAudible.cpp - libs/JSystem/src/JAudio2/JAIAudience.cpp - libs/JSystem/src/JAudio2/JAISe.cpp - libs/JSystem/src/JAudio2/JAISeMgr.cpp - libs/JSystem/src/JAudio2/JAISeq.cpp - libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp - libs/JSystem/src/JAudio2/JAISeqMgr.cpp - libs/JSystem/src/JAudio2/JAISound.cpp - libs/JSystem/src/JAudio2/JAISoundChild.cpp - libs/JSystem/src/JAudio2/JAISoundHandles.cpp - libs/JSystem/src/JAudio2/JAISoundInfo.cpp - libs/JSystem/src/JAudio2/JAISoundParams.cpp - libs/JSystem/src/JAudio2/JAISoundStarter.cpp - libs/JSystem/src/JAudio2/JAIStream.cpp - libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp - libs/JSystem/src/JAudio2/JAIStreamMgr.cpp - libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp - libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp - libs/JSystem/src/JAudio2/JAUAudioMgr.cpp - libs/JSystem/src/JAudio2/JAUBankTable.cpp - libs/JSystem/src/JAudio2/JAUClusterSound.cpp - libs/JSystem/src/JAudio2/JAUInitializer.cpp - libs/JSystem/src/JAudio2/JAUSectionHeap.cpp - libs/JSystem/src/JAudio2/JAUSeqCollection.cpp - libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp - libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp - libs/JSystem/src/JAudio2/JAUSoundTable.cpp - libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp + libs/JSystem/src/JAudio2/JASCalc.cpp + libs/JSystem/src/JAudio2/JASTaskThread.cpp + libs/JSystem/src/JAudio2/JASDvdThread.cpp + libs/JSystem/src/JAudio2/JASCallback.cpp + libs/JSystem/src/JAudio2/JASHeapCtrl.cpp + libs/JSystem/src/JAudio2/JASResArcLoader.cpp + libs/JSystem/src/JAudio2/JASProbe.cpp + libs/JSystem/src/JAudio2/JASReport.cpp + libs/JSystem/src/JAudio2/JASCmdStack.cpp + libs/JSystem/src/JAudio2/JASTrack.cpp + libs/JSystem/src/JAudio2/JASTrackPort.cpp + libs/JSystem/src/JAudio2/JASRegisterParam.cpp + libs/JSystem/src/JAudio2/JASSeqCtrl.cpp + libs/JSystem/src/JAudio2/JASSeqParser.cpp + libs/JSystem/src/JAudio2/JASSeqReader.cpp + libs/JSystem/src/JAudio2/JASAramStream.cpp + libs/JSystem/src/JAudio2/JASBank.cpp + libs/JSystem/src/JAudio2/JASBasicBank.cpp + libs/JSystem/src/JAudio2/JASVoiceBank.cpp + libs/JSystem/src/JAudio2/JASBasicInst.cpp + libs/JSystem/src/JAudio2/JASDrumSet.cpp + libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp + libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp + libs/JSystem/src/JAudio2/JASWSParser.cpp + libs/JSystem/src/JAudio2/JASBNKParser.cpp + libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp + libs/JSystem/src/JAudio2/JASChannel.cpp + libs/JSystem/src/JAudio2/JASLfo.cpp + libs/JSystem/src/JAudio2/JASOscillator.cpp + libs/JSystem/src/JAudio2/JASAiCtrl.cpp + libs/JSystem/src/JAudio2/JASAudioThread.cpp + libs/JSystem/src/JAudio2/JASAudioReseter.cpp + libs/JSystem/src/JAudio2/JASDSPChannel.cpp + libs/JSystem/src/JAudio2/JASDSPInterface.cpp + libs/JSystem/src/JAudio2/JASDriverIF.cpp + libs/JSystem/src/JAudio2/JASSoundParams.cpp + libs/JSystem/src/JAudio2/JAIAudible.cpp + libs/JSystem/src/JAudio2/JAIAudience.cpp + libs/JSystem/src/JAudio2/JAISe.cpp + libs/JSystem/src/JAudio2/JAISeMgr.cpp + libs/JSystem/src/JAudio2/JAISeq.cpp + libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp + libs/JSystem/src/JAudio2/JAISeqMgr.cpp + libs/JSystem/src/JAudio2/JAISound.cpp + libs/JSystem/src/JAudio2/JAISoundChild.cpp + libs/JSystem/src/JAudio2/JAISoundHandles.cpp + libs/JSystem/src/JAudio2/JAISoundInfo.cpp + libs/JSystem/src/JAudio2/JAISoundParams.cpp + libs/JSystem/src/JAudio2/JAISoundStarter.cpp + libs/JSystem/src/JAudio2/JAIStream.cpp + libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp + libs/JSystem/src/JAudio2/JAIStreamMgr.cpp + libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp + libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp + libs/JSystem/src/JAudio2/JAUAudioMgr.cpp + libs/JSystem/src/JAudio2/JAUBankTable.cpp + libs/JSystem/src/JAudio2/JAUClusterSound.cpp + libs/JSystem/src/JAudio2/JAUInitializer.cpp + libs/JSystem/src/JAudio2/JAUSectionHeap.cpp + libs/JSystem/src/JAudio2/JAUSeqCollection.cpp + libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp + libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp + libs/JSystem/src/JAudio2/JAUSoundTable.cpp + libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp ) add_library(JSystem_JMessage STATIC - libs/JSystem/src/JMessage/control.cpp - libs/JSystem/src/JMessage/data.cpp - libs/JSystem/src/JMessage/processor.cpp - libs/JSystem/src/JMessage/resource.cpp - libs/JSystem/src/JMessage/locale.cpp + libs/JSystem/src/JMessage/control.cpp + libs/JSystem/src/JMessage/data.cpp + libs/JSystem/src/JMessage/processor.cpp + libs/JSystem/src/JMessage/resource.cpp + libs/JSystem/src/JMessage/locale.cpp ) add_library(JSystem_JGadget STATIC - libs/JSystem/src/JGadget/binary.cpp - libs/JSystem/src/JGadget/define.cpp - libs/JSystem/src/JGadget/linklist.cpp - libs/JSystem/src/JGadget/search.cpp - libs/JSystem/src/JGadget/std-vector.cpp + libs/JSystem/src/JGadget/binary.cpp + libs/JSystem/src/JGadget/define.cpp + libs/JSystem/src/JGadget/linklist.cpp + libs/JSystem/src/JGadget/search.cpp + libs/JSystem/src/JGadget/std-vector.cpp ) add_library(JSystem_JAHostIO STATIC - libs/JSystem/src/JAHostIO/JAHFrameNode.cpp - libs/JSystem/src/JAHostIO/JAHioMessage.cpp - libs/JSystem/src/JAHostIO/JAHioMgr.cpp - libs/JSystem/src/JAHostIO/JAHioNode.cpp - libs/JSystem/src/JAHostIO/JAHioUtil.cpp - libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp + libs/JSystem/src/JAHostIO/JAHFrameNode.cpp + libs/JSystem/src/JAHostIO/JAHioMessage.cpp + libs/JSystem/src/JAHostIO/JAHioMgr.cpp + libs/JSystem/src/JAHostIO/JAHioNode.cpp + libs/JSystem/src/JAHostIO/JAHioUtil.cpp + libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp ) add_library(JSystem_JHostIO STATIC - libs/JSystem/src/JHostIO/JORFile.cpp - libs/JSystem/src/JHostIO/JORHostInfo.cpp - libs/JSystem/src/JHostIO/JORMessageBox.cpp - libs/JSystem/src/JHostIO/JORServer.cpp - libs/JSystem/src/JHostIO/JHIhioASync.cpp - libs/JSystem/src/JHostIO/JHIRMcc.cpp - libs/JSystem/src/JHostIO/JHIMccBuf.cpp + libs/JSystem/src/JHostIO/JORFile.cpp + libs/JSystem/src/JHostIO/JORHostInfo.cpp + libs/JSystem/src/JHostIO/JORMessageBox.cpp + libs/JSystem/src/JHostIO/JORServer.cpp + libs/JSystem/src/JHostIO/JHIhioASync.cpp + libs/JSystem/src/JHostIO/JHIRMcc.cpp + libs/JSystem/src/JHostIO/JHIMccBuf.cpp ) set(JSYSTEM_LIBRARIES - JSystem_JParticle - JSystem_JFramework - JSystem_J3DU - JSystem_JKernel - JSystem_JMath - JSystem_JSupport - JSystem_JUtility - JSystem_JStage - JSystem_J2DGraph - JSystem_J3DGraphBase - JSystem_J3DGraphAnimator - JSystem_J3DGraphLoader - JSystem_JStudio - JSystem_JStudio_JStage - JSystem_JStudio_JAudio2 - JSystem_JStudio_JParticle - JSystem_JAudio2 - JSystem_JMessage - JSystem_JGadget - JSystem_JAHostIO - JSystem_JHostIO + JSystem_JParticle + JSystem_JFramework + JSystem_J3DU + JSystem_JKernel + JSystem_JMath + JSystem_JSupport + JSystem_JUtility + JSystem_JStage + JSystem_J2DGraph + JSystem_J3DGraphBase + JSystem_J3DGraphAnimator + JSystem_J3DGraphLoader + JSystem_JStudio + JSystem_JStudio_JStage + JSystem_JStudio_JAudio2 + JSystem_JStudio_JParticle + JSystem_JAudio2 + JSystem_JMessage + JSystem_JGadget + JSystem_JAHostIO + JSystem_JHostIO ) set(REL_FILES - src/f_pc/f_pc_profile_lst.cpp - src/d/actor/d_a_andsw.cpp - src/d/actor/d_a_bg.cpp - src/d/actor/d_a_bg_obj.cpp - src/d/actor/d_a_dmidna.cpp - src/d/actor/d_a_door_dbdoor00.cpp - src/d/actor/d_a_door_knob00.cpp - src/d/actor/d_a_door_shutter.cpp - src/d/actor/d_a_door_spiral.cpp - src/d/actor/d_a_dshutter.cpp - src/d/actor/d_a_ep.cpp - src/d/actor/d_a_hitobj.cpp - src/d/actor/d_a_kytag00.cpp - src/d/actor/d_a_kytag04.cpp - src/d/actor/d_a_kytag17.cpp - src/d/actor/d_a_obj_brakeeff.cpp - src/d/actor/d_a_obj_burnbox.cpp - src/d/actor/d_a_obj_carry.cpp - src/d/actor/d_a_obj_ito.cpp - src/d/actor/d_a_obj_movebox.cpp - src/d/actor/d_a_obj_swpush.cpp - src/d/actor/d_a_obj_timer.cpp - src/d/actor/d_a_path_line.cpp - src/d/actor/d_a_scene_exit.cpp - src/d/actor/d_a_set_bgobj.cpp - src/d/actor/d_a_swhit0.cpp - src/d/actor/d_a_tag_allmato.cpp - src/d/actor/d_a_tag_camera.cpp - src/d/actor/d_a_tag_chkpoint.cpp - src/d/actor/d_a_tag_event.cpp - src/d/actor/d_a_tag_evt.cpp - src/d/actor/d_a_tag_evtarea.cpp - src/d/actor/d_a_tag_evtmsg.cpp - src/d/actor/d_a_tag_howl.cpp - src/d/actor/d_a_tag_kmsg.cpp - src/d/actor/d_a_tag_lantern.cpp - src/d/actor/d_a_tag_mist.cpp - src/d/actor/d_a_tag_msg.cpp - src/d/actor/d_a_tag_push.cpp - src/d/actor/d_a_tag_telop.cpp - src/d/actor/d_a_tbox.cpp - src/d/actor/d_a_tbox2.cpp - src/d/actor/d_a_vrbox.cpp - src/d/actor/d_a_vrbox2.cpp - src/d/actor/d_a_arrow.cpp - src/d/actor/d_a_boomerang.cpp - src/d/actor/d_a_crod.cpp - src/d/actor/d_a_demo00.cpp - src/d/actor/d_a_disappear.cpp - src/d/actor/d_a_mg_rod.cpp - src/d/actor/d_a_midna.cpp - src/d/actor/d_a_nbomb.cpp - src/d/actor/d_a_obj_life_container.cpp - src/d/actor/d_a_obj_yousei.cpp - src/d/actor/d_a_spinner.cpp - src/d/actor/d_a_suspend.cpp - src/d/actor/d_a_tag_attention.cpp - src/d/actor/d_a_alldie.cpp - src/d/actor/d_a_andsw2.cpp - src/d/actor/d_a_bd.cpp - src/d/actor/d_a_canoe.cpp - src/d/actor/d_a_cstaF.cpp - src/d/actor/d_a_demo_item.cpp - src/d/actor/d_a_door_bossL1.cpp - src/d/actor/d_a_e_dn.cpp - src/d/actor/d_a_e_fm.cpp - src/d/actor/d_a_e_ga.cpp - src/d/actor/d_a_e_hb.cpp - src/d/actor/d_a_e_nest.cpp - src/d/actor/d_a_e_rd.cpp - src/d/actor/d_a_econt.cpp - src/d/actor/d_a_fr.cpp - src/d/actor/d_a_grass.cpp - src/d/actor/d_a_kytag05.cpp - src/d/actor/d_a_kytag10.cpp - src/d/actor/d_a_kytag11.cpp - src/d/actor/d_a_kytag14.cpp - src/d/actor/d_a_mg_fish.cpp - src/d/actor/d_a_npc_besu.cpp - src/d/actor/d_a_npc_fairy_seirei.cpp - src/d/actor/d_a_npc_fish.cpp - src/d/actor/d_a_npc_henna.cpp - src/d/actor/d_a_npc_kakashi.cpp - src/d/actor/d_a_npc_kkri.cpp - src/d/actor/d_a_npc_kolin.cpp - src/d/actor/d_a_npc_maro.cpp - src/d/actor/d_a_npc_taro.cpp - src/d/actor/d_a_npc_tkj.cpp - src/d/actor/d_a_obj_bhashi.cpp - src/d/actor/d_a_obj_bkdoor.cpp - src/d/actor/d_a_obj_bosswarp.cpp - src/d/actor/d_a_obj_cboard.cpp - src/d/actor/d_a_obj_digplace.cpp - src/d/actor/d_a_obj_eff.cpp - src/d/actor/d_a_obj_fmobj.cpp - src/d/actor/d_a_obj_gpTaru.cpp - src/d/actor/d_a_obj_hhashi.cpp - src/d/actor/d_a_obj_kanban2.cpp - src/d/actor/d_a_obj_kbacket.cpp - src/d/actor/d_a_obj_kgate.cpp - src/d/actor/d_a_obj_klift00.cpp - src/d/actor/d_a_obj_ktOnFire.cpp - src/d/actor/d_a_obj_ladder.cpp - src/d/actor/d_a_obj_lv2Candle.cpp - src/d/actor/d_a_obj_magne_arm.cpp - src/d/actor/d_a_obj_metalbox.cpp - src/d/actor/d_a_obj_mgate.cpp - src/d/actor/d_a_obj_nameplate.cpp - src/d/actor/d_a_obj_ornament_cloth.cpp - src/d/actor/d_a_obj_rope_bridge.cpp - src/d/actor/d_a_obj_sWallShutter.cpp - src/d/actor/d_a_obj_stick.cpp - src/d/actor/d_a_obj_stoneMark.cpp - src/d/actor/d_a_obj_swpropeller.cpp - src/d/actor/d_a_obj_swpush5.cpp - src/d/actor/d_a_obj_yobikusa.cpp - src/d/actor/d_a_scene_exit2.cpp - src/d/actor/d_a_shop_item.cpp - src/d/actor/d_a_sq.cpp - src/d/actor/d_a_swc00.cpp - src/d/actor/d_a_tag_CstaSw.cpp - src/d/actor/d_a_tag_ajnot.cpp - src/d/actor/d_a_tag_attack_item.cpp - src/d/actor/d_a_tag_gstart.cpp - src/d/actor/d_a_tag_hinit.cpp - src/d/actor/d_a_tag_hjump.cpp - src/d/actor/d_a_tag_hstop.cpp - src/d/actor/d_a_tag_lv2prchk.cpp - src/d/actor/d_a_tag_magne.cpp - src/d/actor/d_a_tag_mhint.cpp - src/d/actor/d_a_tag_mstop.cpp - src/d/actor/d_a_tag_spring.cpp - src/d/actor/d_a_tag_statue_evt.cpp - src/d/actor/d_a_ykgr.cpp - src/d/actor/d_a_L7demo_dr.cpp - src/d/actor/d_a_L7low_dr.cpp - src/d/actor/d_a_L7op_demo_dr.cpp - src/d/actor/d_a_b_bh.cpp - src/d/actor/d_a_b_bq.cpp - src/d/actor/d_a_b_dr.cpp - src/d/actor/d_a_b_dre.cpp - src/d/actor/d_a_b_ds.cpp - src/d/actor/d_a_b_gg.cpp - src/d/actor/d_a_b_gm.cpp - src/d/actor/d_a_b_gnd.cpp - src/d/actor/d_a_b_go.cpp - src/d/actor/d_a_b_gos.cpp - src/d/actor/d_a_b_mgn.cpp - src/d/actor/d_a_b_ob.cpp - src/d/actor/d_a_b_oh.cpp - src/d/actor/d_a_b_oh2.cpp - src/d/actor/d_a_b_tn.cpp - src/d/actor/d_a_b_yo.cpp - src/d/actor/d_a_b_yo_ice.cpp - src/d/actor/d_a_b_zant.cpp - src/d/actor/d_a_b_zant_magic.cpp - src/d/actor/d_a_b_zant_mobile.cpp - src/d/actor/d_a_b_zant_sima.cpp - src/d/actor/d_a_balloon_2D.cpp - src/d/actor/d_a_bullet.cpp - src/d/actor/d_a_coach_2D.cpp - src/d/actor/d_a_coach_fire.cpp - src/d/actor/d_a_cow.cpp - src/d/actor/d_a_cstatue.cpp - src/d/actor/d_a_do.cpp - src/d/actor/d_a_door_boss.cpp - src/d/actor/d_a_door_bossL5.cpp - src/d/actor/d_a_door_mbossL1.cpp - src/d/actor/d_a_door_push.cpp - src/d/actor/d_a_e_ai.cpp - src/d/actor/d_a_e_arrow.cpp - src/d/actor/d_a_e_ba.cpp - src/d/actor/d_a_e_bee.cpp - src/d/actor/d_a_e_bg.cpp - src/d/actor/d_a_e_bi.cpp - src/d/actor/d_a_e_bi_leaf.cpp - src/d/actor/d_a_e_bs.cpp - src/d/actor/d_a_e_bu.cpp - src/d/actor/d_a_e_bug.cpp - src/d/actor/d_a_e_cr.cpp - src/d/actor/d_a_e_cr_egg.cpp - src/d/actor/d_a_e_db.cpp - src/d/actor/d_a_e_db_leaf.cpp - src/d/actor/d_a_e_dd.cpp - src/d/actor/d_a_e_df.cpp - src/d/actor/d_a_e_dk.cpp - src/d/actor/d_a_e_dt.cpp - src/d/actor/d_a_e_fb.cpp - src/d/actor/d_a_e_fk.cpp - src/d/actor/d_a_e_fs.cpp - src/d/actor/d_a_e_fz.cpp - src/d/actor/d_a_e_gb.cpp - src/d/actor/d_a_e_ge.cpp - src/d/actor/d_a_e_gi.cpp - src/d/actor/d_a_e_gm.cpp - src/d/actor/d_a_e_gob.cpp - src/d/actor/d_a_e_gs.cpp - src/d/actor/d_a_e_hb_leaf.cpp - src/d/actor/d_a_e_hm.cpp - src/d/actor/d_a_e_hp.cpp - src/d/actor/d_a_e_hz.cpp - src/d/actor/d_a_e_hzelda.cpp - src/d/actor/d_a_e_is.cpp - src/d/actor/d_a_e_kg.cpp - src/d/actor/d_a_e_kk.cpp - src/d/actor/d_a_e_kr.cpp - src/d/actor/d_a_e_mb.cpp - src/d/actor/d_a_e_md.cpp - src/d/actor/d_a_e_mf.cpp - src/d/actor/d_a_e_mk.cpp - src/d/actor/d_a_e_mk_bo.cpp - src/d/actor/d_a_e_mm.cpp - src/d/actor/d_a_e_mm_mt.cpp - src/d/actor/d_a_e_ms.cpp - src/d/actor/d_a_e_nz.cpp - src/d/actor/d_a_e_oc.cpp - src/d/actor/d_a_e_oct_bg.cpp - src/d/actor/d_a_e_ot.cpp - src/d/actor/d_a_e_ph.cpp - src/d/actor/d_a_e_pm.cpp - src/d/actor/d_a_e_po.cpp - src/d/actor/d_a_e_pz.cpp - src/d/actor/d_a_e_rb.cpp - src/d/actor/d_a_e_rdb.cpp - src/d/actor/d_a_e_rdy.cpp - src/d/actor/d_a_e_s1.cpp - src/d/actor/d_a_e_sb.cpp - src/d/actor/d_a_e_sf.cpp - src/d/actor/d_a_e_sg.cpp - src/d/actor/d_a_e_sh.cpp - src/d/actor/d_a_e_sm.cpp - src/d/actor/d_a_e_sm2.cpp - src/d/actor/d_a_e_st.cpp - src/d/actor/d_a_e_st_line.cpp - src/d/actor/d_a_e_sw.cpp - src/d/actor/d_a_e_th.cpp - src/d/actor/d_a_e_th_ball.cpp - src/d/actor/d_a_e_tk.cpp - src/d/actor/d_a_e_tk2.cpp - src/d/actor/d_a_e_tk_ball.cpp - src/d/actor/d_a_e_tt.cpp - src/d/actor/d_a_e_vt.cpp - src/d/actor/d_a_e_warpappear.cpp - src/d/actor/d_a_e_wb.cpp - src/d/actor/d_a_e_ws.cpp - src/d/actor/d_a_e_ww.cpp - src/d/actor/d_a_e_yc.cpp - src/d/actor/d_a_e_yd.cpp - src/d/actor/d_a_e_yd_leaf.cpp - src/d/actor/d_a_e_yg.cpp - src/d/actor/d_a_e_yh.cpp - src/d/actor/d_a_e_yk.cpp - src/d/actor/d_a_e_ym.cpp - src/d/actor/d_a_e_ym_tag.cpp - src/d/actor/d_a_e_ymb.cpp - src/d/actor/d_a_e_yr.cpp - src/d/actor/d_a_e_zh.cpp - src/d/actor/d_a_e_zm.cpp - src/d/actor/d_a_e_zs.cpp - src/d/actor/d_a_formation_mng.cpp - src/d/actor/d_a_guard_mng.cpp - src/d/actor/d_a_horse.cpp - src/d/actor/d_a_hozelda.cpp - src/d/actor/d_a_izumi_gate.cpp - src/d/actor/d_a_kago.cpp - src/d/actor/d_a_kytag01.cpp - src/d/actor/d_a_kytag02.cpp - src/d/actor/d_a_kytag03.cpp - src/d/actor/d_a_kytag06.cpp - src/d/actor/d_a_kytag07.cpp - src/d/actor/d_a_kytag08.cpp - src/d/actor/d_a_kytag09.cpp - src/d/actor/d_a_kytag12.cpp - src/d/actor/d_a_kytag13.cpp - src/d/actor/d_a_kytag15.cpp - src/d/actor/d_a_kytag16.cpp - src/d/actor/d_a_mant.cpp - src/d/actor/d_a_mg_fshop.cpp - src/d/actor/d_a_mirror.cpp - src/d/actor/d_a_movie_player.cpp - src/d/actor/d_a_myna.cpp - src/d/actor/d_a_ni.cpp - src/d/actor/d_a_npc_aru.cpp - src/d/actor/d_a_npc_ash.cpp - src/d/actor/d_a_npc_ashB.cpp - src/d/actor/d_a_npc_bans.cpp - src/d/actor/d_a_npc_blue_ns.cpp - src/d/actor/d_a_npc_bou.cpp - src/d/actor/d_a_npc_bouS.cpp - src/d/actor/d_a_npc_cdn3.cpp - src/d/actor/d_a_npc_chat.cpp - src/d/actor/d_a_npc_chin.cpp - src/d/actor/d_a_npc_clerka.cpp - src/d/actor/d_a_npc_clerkb.cpp - src/d/actor/d_a_npc_clerkt.cpp - src/d/actor/d_a_npc_coach.cpp - src/d/actor/d_a_npc_df.cpp - src/d/actor/d_a_npc_doc.cpp - src/d/actor/d_a_npc_doorboy.cpp - src/d/actor/d_a_npc_drainSol.cpp - src/d/actor/d_a_npc_du.cpp - src/d/actor/d_a_npc_fairy.cpp - src/d/actor/d_a_npc_fguard.cpp - src/d/actor/d_a_npc_gnd.cpp - src/d/actor/d_a_npc_gra.cpp - src/d/actor/d_a_npc_grc.cpp - src/d/actor/d_a_npc_grd.cpp - src/d/actor/d_a_npc_grm.cpp - src/d/actor/d_a_npc_grmc.cpp - src/d/actor/d_a_npc_gro.cpp - src/d/actor/d_a_npc_grr.cpp - src/d/actor/d_a_npc_grs.cpp - src/d/actor/d_a_npc_grz.cpp - src/d/actor/d_a_npc_guard.cpp - src/d/actor/d_a_npc_gwolf.cpp - src/d/actor/d_a_npc_hanjo.cpp - src/d/actor/d_a_npc_henna0.cpp - src/d/actor/d_a_npc_hoz.cpp - src/d/actor/d_a_npc_impal.cpp - src/d/actor/d_a_npc_inko.cpp - src/d/actor/d_a_npc_ins.cpp - src/d/actor/d_a_npc_jagar.cpp - src/d/actor/d_a_npc_kasi_hana.cpp - src/d/actor/d_a_npc_kasi_kyu.cpp - src/d/actor/d_a_npc_kasi_mich.cpp - src/d/actor/d_a_npc_kdk.cpp - src/d/actor/d_a_npc_kn.cpp - src/d/actor/d_a_npc_knj.cpp - src/d/actor/d_a_npc_kolinb.cpp - src/d/actor/d_a_npc_ks.cpp - src/d/actor/d_a_npc_kyury.cpp - src/d/actor/d_a_npc_len.cpp - src/d/actor/d_a_npc_lf.cpp - src/d/actor/d_a_npc_lud.cpp - src/d/actor/d_a_npc_midp.cpp - src/d/actor/d_a_npc_mk.cpp - src/d/actor/d_a_npc_moi.cpp - src/d/actor/d_a_npc_moir.cpp - src/d/actor/d_a_npc_myna2.cpp - src/d/actor/d_a_npc_ne.cpp - src/d/actor/d_a_npc_p2.cpp - src/d/actor/d_a_npc_pachi_besu.cpp - src/d/actor/d_a_npc_pachi_maro.cpp - src/d/actor/d_a_npc_pachi_taro.cpp - src/d/actor/d_a_npc_passer.cpp - src/d/actor/d_a_npc_passer2.cpp - src/d/actor/d_a_npc_post.cpp - src/d/actor/d_a_npc_pouya.cpp - src/d/actor/d_a_npc_prayer.cpp - src/d/actor/d_a_npc_raca.cpp - src/d/actor/d_a_npc_rafrel.cpp - src/d/actor/d_a_npc_saru.cpp - src/d/actor/d_a_npc_seib.cpp - src/d/actor/d_a_npc_seic.cpp - src/d/actor/d_a_npc_seid.cpp - src/d/actor/d_a_npc_seira.cpp - src/d/actor/d_a_npc_seira2.cpp - src/d/actor/d_a_npc_seirei.cpp - src/d/actor/d_a_npc_shad.cpp - src/d/actor/d_a_npc_shaman.cpp - src/d/actor/d_a_npc_shoe.cpp - src/d/actor/d_a_npc_shop0.cpp - src/d/actor/d_a_npc_shop_maro.cpp - src/d/actor/d_a_npc_sola.cpp - src/d/actor/d_a_npc_soldierA.cpp - src/d/actor/d_a_npc_soldierB.cpp - src/d/actor/d_a_npc_sq.cpp - src/d/actor/d_a_npc_the.cpp - src/d/actor/d_a_npc_theB.cpp - src/d/actor/d_a_npc_tk.cpp - src/d/actor/d_a_npc_tkc.cpp - src/d/actor/d_a_npc_tkj2.cpp - src/d/actor/d_a_npc_tks.cpp - src/d/actor/d_a_npc_toby.cpp - src/d/actor/d_a_npc_tr.cpp - src/d/actor/d_a_npc_uri.cpp - src/d/actor/d_a_npc_worm.cpp - src/d/actor/d_a_npc_wrestler.cpp - src/d/actor/d_a_npc_yamid.cpp - src/d/actor/d_a_npc_yamis.cpp - src/d/actor/d_a_npc_yamit.cpp - src/d/actor/d_a_npc_yelia.cpp - src/d/actor/d_a_npc_ykm.cpp - src/d/actor/d_a_npc_ykw.cpp - src/d/actor/d_a_npc_zanb.cpp - src/d/actor/d_a_npc_zant.cpp - src/d/actor/d_a_npc_zelR.cpp - src/d/actor/d_a_npc_zelRo.cpp - src/d/actor/d_a_npc_zelda.cpp - src/d/actor/d_a_npc_zra.cpp - src/d/actor/d_a_npc_zrc.cpp - src/d/actor/d_a_npc_zrz.cpp - src/d/actor/d_a_obj_Lv5Key.cpp - src/d/actor/d_a_obj_Turara.cpp - src/d/actor/d_a_obj_TvCdlst.cpp - src/d/actor/d_a_obj_Y_taihou.cpp - src/d/actor/d_a_obj_amiShutter.cpp - src/d/actor/d_a_obj_ari.cpp - src/d/actor/d_a_obj_automata.cpp - src/d/actor/d_a_obj_avalanche.cpp - src/d/actor/d_a_obj_balloon.cpp - src/d/actor/d_a_obj_barDesk.cpp - src/d/actor/d_a_obj_batta.cpp - src/d/actor/d_a_obj_bbox.cpp - src/d/actor/d_a_obj_bed.cpp - src/d/actor/d_a_obj_bemos.cpp - src/d/actor/d_a_obj_bhbridge.cpp - src/d/actor/d_a_obj_bk_leaf.cpp - src/d/actor/d_a_obj_bky_rock.cpp - src/d/actor/d_a_obj_bmWindow.cpp - src/d/actor/d_a_obj_bmshutter.cpp - src/d/actor/d_a_obj_bombf.cpp - src/d/actor/d_a_obj_boumato.cpp - src/d/actor/d_a_obj_brg.cpp - src/d/actor/d_a_obj_bsGate.cpp - src/d/actor/d_a_obj_bubblePilar.cpp - src/d/actor/d_a_obj_catdoor.cpp - src/d/actor/d_a_obj_cb.cpp - src/d/actor/d_a_obj_cblock.cpp - src/d/actor/d_a_obj_cdoor.cpp - src/d/actor/d_a_obj_chandelier.cpp - src/d/actor/d_a_obj_chest.cpp - src/d/actor/d_a_obj_cho.cpp - src/d/actor/d_a_obj_cowdoor.cpp - src/d/actor/d_a_obj_crope.cpp - src/d/actor/d_a_obj_crvfence.cpp - src/d/actor/d_a_obj_crvgate.cpp - src/d/actor/d_a_obj_crvhahen.cpp - src/d/actor/d_a_obj_crvlh_down.cpp - src/d/actor/d_a_obj_crvlh_up.cpp - src/d/actor/d_a_obj_crvsteel.cpp - src/d/actor/d_a_obj_crystal.cpp - src/d/actor/d_a_obj_cwall.cpp - src/d/actor/d_a_obj_damCps.cpp - src/d/actor/d_a_obj_dan.cpp - src/d/actor/d_a_obj_digholl.cpp - src/d/actor/d_a_obj_digsnow.cpp - src/d/actor/d_a_obj_dmelevator.cpp - src/d/actor/d_a_obj_drop.cpp - src/d/actor/d_a_obj_dust.cpp - src/d/actor/d_a_obj_enemy_create.cpp - src/d/actor/d_a_obj_fallobj.cpp - src/d/actor/d_a_obj_fan.cpp - src/d/actor/d_a_obj_fchain.cpp - src/d/actor/d_a_obj_fireWood.cpp - src/d/actor/d_a_obj_fireWood2.cpp - src/d/actor/d_a_obj_firepillar.cpp - src/d/actor/d_a_obj_firepillar2.cpp - src/d/actor/d_a_obj_flag.cpp - src/d/actor/d_a_obj_flag2.cpp - src/d/actor/d_a_obj_flag3.cpp - src/d/actor/d_a_obj_food.cpp - src/d/actor/d_a_obj_fw.cpp - src/d/actor/d_a_obj_gadget.cpp - src/d/actor/d_a_obj_ganonwall.cpp - src/d/actor/d_a_obj_ganonwall2.cpp - src/d/actor/d_a_obj_gb.cpp - src/d/actor/d_a_obj_geyser.cpp - src/d/actor/d_a_obj_glowSphere.cpp - src/d/actor/d_a_obj_gm.cpp - src/d/actor/d_a_obj_goGate.cpp - src/d/actor/d_a_obj_gomikabe.cpp - src/d/actor/d_a_obj_gra2.cpp - src/d/actor/d_a_obj_graWall.cpp - src/d/actor/d_a_obj_gra_rock.cpp - src/d/actor/d_a_obj_grave_stone.cpp - src/d/actor/d_a_obj_groundwater.cpp - src/d/actor/d_a_obj_grz_rock.cpp - src/d/actor/d_a_obj_h_saku.cpp - src/d/actor/d_a_obj_hakai_brl.cpp - src/d/actor/d_a_obj_hakai_ftr.cpp - src/d/actor/d_a_obj_hasu2.cpp - src/d/actor/d_a_obj_hata.cpp - src/d/actor/d_a_obj_hb.cpp - src/d/actor/d_a_obj_hbombkoya.cpp - src/d/actor/d_a_obj_heavySw.cpp - src/d/actor/d_a_obj_hfuta.cpp - src/d/actor/d_a_obj_hsTarget.cpp - src/d/actor/d_a_obj_ice_l.cpp - src/d/actor/d_a_obj_ice_s.cpp - src/d/actor/d_a_obj_iceblock.cpp - src/d/actor/d_a_obj_iceleaf.cpp - src/d/actor/d_a_obj_ihasi.cpp - src/d/actor/d_a_obj_ikada.cpp - src/d/actor/d_a_obj_inobone.cpp - src/d/actor/d_a_obj_ita.cpp - src/d/actor/d_a_obj_itamato.cpp - src/d/actor/d_a_obj_kabuto.cpp - src/d/actor/d_a_obj_kag.cpp - src/d/actor/d_a_obj_kage.cpp - src/d/actor/d_a_obj_kago.cpp - src/d/actor/d_a_obj_kaisou.cpp - src/d/actor/d_a_obj_kamakiri.cpp - src/d/actor/d_a_obj_kantera.cpp - src/d/actor/d_a_obj_katatsumuri.cpp - src/d/actor/d_a_obj_kazeneko.cpp - src/d/actor/d_a_obj_kbox.cpp - src/d/actor/d_a_obj_key.cpp - src/d/actor/d_a_obj_keyhole.cpp - src/d/actor/d_a_obj_ki.cpp - src/d/actor/d_a_obj_kiPot.cpp - src/d/actor/d_a_obj_kita.cpp - src/d/actor/d_a_obj_kjgjs.cpp - src/d/actor/d_a_obj_kkanban.cpp - src/d/actor/d_a_obj_knBullet.cpp - src/d/actor/d_a_obj_kshutter.cpp - src/d/actor/d_a_obj_kuwagata.cpp - src/d/actor/d_a_obj_kwheel00.cpp - src/d/actor/d_a_obj_kwheel01.cpp - src/d/actor/d_a_obj_kznkarm.cpp - src/d/actor/d_a_obj_laundry.cpp - src/d/actor/d_a_obj_laundry_rope.cpp - src/d/actor/d_a_obj_lbox.cpp - src/d/actor/d_a_obj_lp.cpp - src/d/actor/d_a_obj_lv1Candle00.cpp - src/d/actor/d_a_obj_lv1Candle01.cpp - src/d/actor/d_a_obj_lv3Candle.cpp - src/d/actor/d_a_obj_lv3Water.cpp - src/d/actor/d_a_obj_lv3Water2.cpp - src/d/actor/d_a_obj_lv3WaterB.cpp - src/d/actor/d_a_obj_lv3saka00.cpp - src/d/actor/d_a_obj_lv3waterEff.cpp - src/d/actor/d_a_obj_lv4CandleDemoTag.cpp - src/d/actor/d_a_obj_lv4CandleTag.cpp - src/d/actor/d_a_obj_lv4EdShutter.cpp - src/d/actor/d_a_obj_lv4Gate.cpp - src/d/actor/d_a_obj_lv4HsTarget.cpp - src/d/actor/d_a_obj_lv4PoGate.cpp - src/d/actor/d_a_obj_lv4RailWall.cpp - src/d/actor/d_a_obj_lv4SlideWall.cpp - src/d/actor/d_a_obj_lv4bridge.cpp - src/d/actor/d_a_obj_lv4chandelier.cpp - src/d/actor/d_a_obj_lv4digsand.cpp - src/d/actor/d_a_obj_lv4floor.cpp - src/d/actor/d_a_obj_lv4gear.cpp - src/d/actor/d_a_obj_lv4prelvtr.cpp - src/d/actor/d_a_obj_lv4prwall.cpp - src/d/actor/d_a_obj_lv4sand.cpp - src/d/actor/d_a_obj_lv5FloorBoard.cpp - src/d/actor/d_a_obj_lv5IceWall.cpp - src/d/actor/d_a_obj_lv5SwIce.cpp - src/d/actor/d_a_obj_lv5ychndlr.cpp - src/d/actor/d_a_obj_lv5yiblltray.cpp - src/d/actor/d_a_obj_lv6ChangeGate.cpp - src/d/actor/d_a_obj_lv6FurikoTrap.cpp - src/d/actor/d_a_obj_lv6Lblock.cpp - src/d/actor/d_a_obj_lv6SwGate.cpp - src/d/actor/d_a_obj_lv6SzGate.cpp - src/d/actor/d_a_obj_lv6Tenbin.cpp - src/d/actor/d_a_obj_lv6TogeRoll.cpp - src/d/actor/d_a_obj_lv6TogeTrap.cpp - src/d/actor/d_a_obj_lv6bemos.cpp - src/d/actor/d_a_obj_lv6bemos2.cpp - src/d/actor/d_a_obj_lv6egate.cpp - src/d/actor/d_a_obj_lv6elevta.cpp - src/d/actor/d_a_obj_lv6swturn.cpp - src/d/actor/d_a_obj_lv7BsGate.cpp - src/d/actor/d_a_obj_lv7PropellerY.cpp - src/d/actor/d_a_obj_lv7bridge.cpp - src/d/actor/d_a_obj_lv8KekkaiTrap.cpp - src/d/actor/d_a_obj_lv8Lift.cpp - src/d/actor/d_a_obj_lv8OptiLift.cpp - src/d/actor/d_a_obj_lv8UdFloor.cpp - src/d/actor/d_a_obj_lv9SwShutter.cpp - src/d/actor/d_a_obj_magLift.cpp - src/d/actor/d_a_obj_magLiftRot.cpp - src/d/actor/d_a_obj_maki.cpp - src/d/actor/d_a_obj_master_sword.cpp - src/d/actor/d_a_obj_mato.cpp - src/d/actor/d_a_obj_mhole.cpp - src/d/actor/d_a_obj_mie.cpp - src/d/actor/d_a_obj_mirror_6pole.cpp - src/d/actor/d_a_obj_mirror_chain.cpp - src/d/actor/d_a_obj_mirror_sand.cpp - src/d/actor/d_a_obj_mirror_screw.cpp - src/d/actor/d_a_obj_mirror_table.cpp - src/d/actor/d_a_obj_msima.cpp - src/d/actor/d_a_obj_mvstair.cpp - src/d/actor/d_a_obj_myogan.cpp - src/d/actor/d_a_obj_nagaisu.cpp - src/d/actor/d_a_obj_nan.cpp - src/d/actor/d_a_obj_ndoor.cpp - src/d/actor/d_a_obj_nougu.cpp - src/d/actor/d_a_obj_octhashi.cpp - src/d/actor/d_a_obj_oiltubo.cpp - src/d/actor/d_a_obj_onsen.cpp - src/d/actor/d_a_obj_onsenFire.cpp - src/d/actor/d_a_obj_onsenTaru.cpp - src/d/actor/d_a_obj_pdoor.cpp - src/d/actor/d_a_obj_pdtile.cpp - src/d/actor/d_a_obj_pdwall.cpp - src/d/actor/d_a_obj_picture.cpp - src/d/actor/d_a_obj_pillar.cpp - src/d/actor/d_a_obj_pleaf.cpp - src/d/actor/d_a_obj_poCandle.cpp - src/d/actor/d_a_obj_poFire.cpp - src/d/actor/d_a_obj_poTbox.cpp - src/d/actor/d_a_obj_prop.cpp - src/d/actor/d_a_obj_pumpkin.cpp - src/d/actor/d_a_obj_rcircle.cpp - src/d/actor/d_a_obj_rfHole.cpp - src/d/actor/d_a_obj_rgate.cpp - src/d/actor/d_a_obj_riverrock.cpp - src/d/actor/d_a_obj_rock.cpp - src/d/actor/d_a_obj_rotBridge.cpp - src/d/actor/d_a_obj_rotTrap.cpp - src/d/actor/d_a_obj_roten.cpp - src/d/actor/d_a_obj_rstair.cpp - src/d/actor/d_a_obj_rw.cpp - src/d/actor/d_a_obj_saidan.cpp - src/d/actor/d_a_obj_sakuita.cpp - src/d/actor/d_a_obj_sakuita_rope.cpp - src/d/actor/d_a_obj_scannon.cpp - src/d/actor/d_a_obj_scannon_crs.cpp - src/d/actor/d_a_obj_scannon_ten.cpp - src/d/actor/d_a_obj_sekidoor.cpp - src/d/actor/d_a_obj_sekizo.cpp - src/d/actor/d_a_obj_sekizoa.cpp - src/d/actor/d_a_obj_shield.cpp - src/d/actor/d_a_obj_sm_door.cpp - src/d/actor/d_a_obj_smallkey.cpp - src/d/actor/d_a_obj_smgdoor.cpp - src/d/actor/d_a_obj_smoke.cpp - src/d/actor/d_a_obj_smtile.cpp - src/d/actor/d_a_obj_smw_stone.cpp - src/d/actor/d_a_obj_snowEffTag.cpp - src/d/actor/d_a_obj_snow_soup.cpp - src/d/actor/d_a_obj_so.cpp - src/d/actor/d_a_obj_spinLift.cpp - src/d/actor/d_a_obj_ss_drink.cpp - src/d/actor/d_a_obj_ss_item.cpp - src/d/actor/d_a_obj_stairBlock.cpp - src/d/actor/d_a_obj_stone.cpp - src/d/actor/d_a_obj_stopper.cpp - src/d/actor/d_a_obj_stopper2.cpp - src/d/actor/d_a_obj_suisya.cpp - src/d/actor/d_a_obj_sw.cpp - src/d/actor/d_a_obj_swBallA.cpp - src/d/actor/d_a_obj_swBallB.cpp - src/d/actor/d_a_obj_swBallC.cpp - src/d/actor/d_a_obj_swLight.cpp - src/d/actor/d_a_obj_swchain.cpp - src/d/actor/d_a_obj_swhang.cpp - src/d/actor/d_a_obj_sword.cpp - src/d/actor/d_a_obj_swpush2.cpp - src/d/actor/d_a_obj_swspinner.cpp - src/d/actor/d_a_obj_swturn.cpp - src/d/actor/d_a_obj_syRock.cpp - src/d/actor/d_a_obj_szbridge.cpp - src/d/actor/d_a_obj_taFence.cpp - src/d/actor/d_a_obj_table.cpp - src/d/actor/d_a_obj_takaraDai.cpp - src/d/actor/d_a_obj_tatigi.cpp - src/d/actor/d_a_obj_ten.cpp - src/d/actor/d_a_obj_testcube.cpp - src/d/actor/d_a_obj_tgake.cpp - src/d/actor/d_a_obj_thashi.cpp - src/d/actor/d_a_obj_thdoor.cpp - src/d/actor/d_a_obj_timeFire.cpp - src/d/actor/d_a_obj_tks.cpp - src/d/actor/d_a_obj_tmoon.cpp - src/d/actor/d_a_obj_toaru_maki.cpp - src/d/actor/d_a_obj_toby.cpp - src/d/actor/d_a_obj_tobyhouse.cpp - src/d/actor/d_a_obj_togeTrap.cpp - src/d/actor/d_a_obj_tombo.cpp - src/d/actor/d_a_obj_tornado.cpp - src/d/actor/d_a_obj_tornado2.cpp - src/d/actor/d_a_obj_tp.cpp - src/d/actor/d_a_obj_treesh.cpp - src/d/actor/d_a_obj_twGate.cpp - src/d/actor/d_a_obj_udoor.cpp - src/d/actor/d_a_obj_usaku.cpp - src/d/actor/d_a_obj_vground.cpp - src/d/actor/d_a_obj_volcball.cpp - src/d/actor/d_a_obj_volcbom.cpp - src/d/actor/d_a_obj_warp_kbrg.cpp - src/d/actor/d_a_obj_warp_obrg.cpp - src/d/actor/d_a_obj_waterGate.cpp - src/d/actor/d_a_obj_waterPillar.cpp - src/d/actor/d_a_obj_waterfall.cpp - src/d/actor/d_a_obj_wchain.cpp - src/d/actor/d_a_obj_wdStick.cpp - src/d/actor/d_a_obj_web0.cpp - src/d/actor/d_a_obj_web1.cpp - src/d/actor/d_a_obj_well_cover.cpp - src/d/actor/d_a_obj_wflag.cpp - src/d/actor/d_a_obj_wind_stone.cpp - src/d/actor/d_a_obj_window.cpp - src/d/actor/d_a_obj_wood_pendulum.cpp - src/d/actor/d_a_obj_wood_statue.cpp - src/d/actor/d_a_obj_wsword.cpp - src/d/actor/d_a_obj_yel_bag.cpp - src/d/actor/d_a_obj_ystone.cpp - src/d/actor/d_a_obj_zcloth.cpp - src/d/actor/d_a_obj_zdoor.cpp - src/d/actor/d_a_obj_zrTurara.cpp - src/d/actor/d_a_obj_zrTuraraRock.cpp - src/d/actor/d_a_obj_zraMark.cpp - src/d/actor/d_a_obj_zra_freeze.cpp - src/d/actor/d_a_obj_zra_rock.cpp - src/d/actor/d_a_passer_mng.cpp - src/d/actor/d_a_tag_arena.cpp - src/d/actor/d_a_peru.cpp - src/d/actor/d_a_ppolamp.cpp - src/d/actor/d_a_skip_2D.cpp - src/d/actor/d_a_startAndGoal.cpp - src/d/actor/d_a_swBall.cpp - src/d/actor/d_a_swLBall.cpp - src/d/actor/d_a_swTime.cpp - src/d/actor/d_a_tag_Lv6Gate.cpp - src/d/actor/d_a_tag_Lv7Gate.cpp - src/d/actor/d_a_tag_Lv8Gate.cpp - src/d/actor/d_a_tag_TWgate.cpp - src/d/actor/d_a_tag_lv6CstaSw.cpp - src/d/actor/d_a_tag_assistance.cpp - src/d/actor/d_a_tag_bottle_item.cpp - src/d/actor/d_a_tag_chgrestart.cpp - src/d/actor/d_a_tag_csw.cpp - src/d/actor/d_a_tag_escape.cpp - src/d/actor/d_a_tag_firewall.cpp - src/d/actor/d_a_tag_gra.cpp - src/d/actor/d_a_tag_guard.cpp - src/d/actor/d_a_tag_instruction.cpp - src/d/actor/d_a_tag_kago_fall.cpp - src/d/actor/d_a_tag_lightball.cpp - src/d/actor/d_a_tag_lv5soup.cpp - src/d/actor/d_a_tag_mmsg.cpp - src/d/actor/d_a_tag_mwait.cpp - src/d/actor/d_a_tag_myna2.cpp - src/d/actor/d_a_tag_myna_light.cpp - src/d/actor/d_a_tag_pachi.cpp - src/d/actor/d_a_tag_poFire.cpp - src/d/actor/d_a_tag_qs.cpp - src/d/actor/d_a_tag_ret_room.cpp - src/d/actor/d_a_tag_river_back.cpp - src/d/actor/d_a_tag_rmbit_sw.cpp - src/d/actor/d_a_tag_schedule.cpp - src/d/actor/d_a_tag_setBall.cpp - src/d/actor/d_a_tag_setrestart.cpp - src/d/actor/d_a_tag_shop_camera.cpp - src/d/actor/d_a_tag_shop_item.cpp - src/d/actor/d_a_tag_smk_emt.cpp - src/d/actor/d_a_tag_spinner.cpp - src/d/actor/d_a_tag_sppath.cpp - src/d/actor/d_a_tag_ss_drink.cpp - src/d/actor/d_a_tag_stream.cpp - src/d/actor/d_a_tag_theB_hint.cpp - src/d/actor/d_a_tag_wara_howl.cpp - src/d/actor/d_a_tag_watchge.cpp - src/d/actor/d_a_tag_waterfall.cpp - src/d/actor/d_a_tag_wljump.cpp - src/d/actor/d_a_tag_yami.cpp - src/d/actor/d_a_talk.cpp - src/d/actor/d_a_tboxSw.cpp - src/d/actor/d_a_title.cpp - src/d/actor/d_a_warp_bug.cpp + src/f_pc/f_pc_profile_lst.cpp + src/d/actor/d_a_andsw.cpp + src/d/actor/d_a_bg.cpp + src/d/actor/d_a_bg_obj.cpp + src/d/actor/d_a_dmidna.cpp + src/d/actor/d_a_door_dbdoor00.cpp + src/d/actor/d_a_door_knob00.cpp + src/d/actor/d_a_door_shutter.cpp + src/d/actor/d_a_door_spiral.cpp + src/d/actor/d_a_dshutter.cpp + src/d/actor/d_a_ep.cpp + src/d/actor/d_a_hitobj.cpp + src/d/actor/d_a_kytag00.cpp + src/d/actor/d_a_kytag04.cpp + src/d/actor/d_a_kytag17.cpp + src/d/actor/d_a_obj_brakeeff.cpp + src/d/actor/d_a_obj_burnbox.cpp + src/d/actor/d_a_obj_carry.cpp + src/d/actor/d_a_obj_ito.cpp + src/d/actor/d_a_obj_movebox.cpp + src/d/actor/d_a_obj_swpush.cpp + src/d/actor/d_a_obj_timer.cpp + src/d/actor/d_a_path_line.cpp + src/d/actor/d_a_scene_exit.cpp + src/d/actor/d_a_set_bgobj.cpp + src/d/actor/d_a_swhit0.cpp + src/d/actor/d_a_tag_allmato.cpp + src/d/actor/d_a_tag_camera.cpp + src/d/actor/d_a_tag_chkpoint.cpp + src/d/actor/d_a_tag_event.cpp + src/d/actor/d_a_tag_evt.cpp + src/d/actor/d_a_tag_evtarea.cpp + src/d/actor/d_a_tag_evtmsg.cpp + src/d/actor/d_a_tag_howl.cpp + src/d/actor/d_a_tag_kmsg.cpp + src/d/actor/d_a_tag_lantern.cpp + src/d/actor/d_a_tag_mist.cpp + src/d/actor/d_a_tag_msg.cpp + src/d/actor/d_a_tag_push.cpp + src/d/actor/d_a_tag_telop.cpp + src/d/actor/d_a_tbox.cpp + src/d/actor/d_a_tbox2.cpp + src/d/actor/d_a_vrbox.cpp + src/d/actor/d_a_vrbox2.cpp + src/d/actor/d_a_arrow.cpp + src/d/actor/d_a_boomerang.cpp + src/d/actor/d_a_crod.cpp + src/d/actor/d_a_demo00.cpp + src/d/actor/d_a_disappear.cpp + src/d/actor/d_a_mg_rod.cpp + src/d/actor/d_a_midna.cpp + src/d/actor/d_a_nbomb.cpp + src/d/actor/d_a_obj_life_container.cpp + src/d/actor/d_a_obj_yousei.cpp + src/d/actor/d_a_spinner.cpp + src/d/actor/d_a_suspend.cpp + src/d/actor/d_a_tag_attention.cpp + src/d/actor/d_a_alldie.cpp + src/d/actor/d_a_andsw2.cpp + src/d/actor/d_a_bd.cpp + src/d/actor/d_a_canoe.cpp + src/d/actor/d_a_cstaF.cpp + src/d/actor/d_a_demo_item.cpp + src/d/actor/d_a_door_bossL1.cpp + src/d/actor/d_a_e_dn.cpp + src/d/actor/d_a_e_fm.cpp + src/d/actor/d_a_e_ga.cpp + src/d/actor/d_a_e_hb.cpp + src/d/actor/d_a_e_nest.cpp + src/d/actor/d_a_e_rd.cpp + src/d/actor/d_a_econt.cpp + src/d/actor/d_a_fr.cpp + src/d/actor/d_a_grass.cpp + src/d/actor/d_a_kytag05.cpp + src/d/actor/d_a_kytag10.cpp + src/d/actor/d_a_kytag11.cpp + src/d/actor/d_a_kytag14.cpp + src/d/actor/d_a_mg_fish.cpp + src/d/actor/d_a_npc_besu.cpp + src/d/actor/d_a_npc_fairy_seirei.cpp + src/d/actor/d_a_npc_fish.cpp + src/d/actor/d_a_npc_henna.cpp + src/d/actor/d_a_npc_kakashi.cpp + src/d/actor/d_a_npc_kkri.cpp + src/d/actor/d_a_npc_kolin.cpp + src/d/actor/d_a_npc_maro.cpp + src/d/actor/d_a_npc_taro.cpp + src/d/actor/d_a_npc_tkj.cpp + src/d/actor/d_a_obj_bhashi.cpp + src/d/actor/d_a_obj_bkdoor.cpp + src/d/actor/d_a_obj_bosswarp.cpp + src/d/actor/d_a_obj_cboard.cpp + src/d/actor/d_a_obj_digplace.cpp + src/d/actor/d_a_obj_eff.cpp + src/d/actor/d_a_obj_fmobj.cpp + src/d/actor/d_a_obj_gpTaru.cpp + src/d/actor/d_a_obj_hhashi.cpp + src/d/actor/d_a_obj_kanban2.cpp + src/d/actor/d_a_obj_kbacket.cpp + src/d/actor/d_a_obj_kgate.cpp + src/d/actor/d_a_obj_klift00.cpp + src/d/actor/d_a_obj_ktOnFire.cpp + src/d/actor/d_a_obj_ladder.cpp + src/d/actor/d_a_obj_lv2Candle.cpp + src/d/actor/d_a_obj_magne_arm.cpp + src/d/actor/d_a_obj_metalbox.cpp + src/d/actor/d_a_obj_mgate.cpp + src/d/actor/d_a_obj_nameplate.cpp + src/d/actor/d_a_obj_ornament_cloth.cpp + src/d/actor/d_a_obj_rope_bridge.cpp + src/d/actor/d_a_obj_sWallShutter.cpp + src/d/actor/d_a_obj_stick.cpp + src/d/actor/d_a_obj_stoneMark.cpp + src/d/actor/d_a_obj_swpropeller.cpp + src/d/actor/d_a_obj_swpush5.cpp + src/d/actor/d_a_obj_yobikusa.cpp + src/d/actor/d_a_scene_exit2.cpp + src/d/actor/d_a_shop_item.cpp + src/d/actor/d_a_sq.cpp + src/d/actor/d_a_swc00.cpp + src/d/actor/d_a_tag_CstaSw.cpp + src/d/actor/d_a_tag_ajnot.cpp + src/d/actor/d_a_tag_attack_item.cpp + src/d/actor/d_a_tag_gstart.cpp + src/d/actor/d_a_tag_hinit.cpp + src/d/actor/d_a_tag_hjump.cpp + src/d/actor/d_a_tag_hstop.cpp + src/d/actor/d_a_tag_lv2prchk.cpp + src/d/actor/d_a_tag_magne.cpp + src/d/actor/d_a_tag_mhint.cpp + src/d/actor/d_a_tag_mstop.cpp + src/d/actor/d_a_tag_spring.cpp + src/d/actor/d_a_tag_statue_evt.cpp + src/d/actor/d_a_ykgr.cpp + src/d/actor/d_a_L7demo_dr.cpp + src/d/actor/d_a_L7low_dr.cpp + src/d/actor/d_a_L7op_demo_dr.cpp + src/d/actor/d_a_b_bh.cpp + src/d/actor/d_a_b_bq.cpp + src/d/actor/d_a_b_dr.cpp + src/d/actor/d_a_b_dre.cpp + src/d/actor/d_a_b_ds.cpp + src/d/actor/d_a_b_gg.cpp + src/d/actor/d_a_b_gm.cpp + src/d/actor/d_a_b_gnd.cpp + src/d/actor/d_a_b_go.cpp + src/d/actor/d_a_b_gos.cpp + src/d/actor/d_a_b_mgn.cpp + src/d/actor/d_a_b_ob.cpp + src/d/actor/d_a_b_oh.cpp + src/d/actor/d_a_b_oh2.cpp + src/d/actor/d_a_b_tn.cpp + src/d/actor/d_a_b_yo.cpp + src/d/actor/d_a_b_yo_ice.cpp + src/d/actor/d_a_b_zant.cpp + src/d/actor/d_a_b_zant_magic.cpp + src/d/actor/d_a_b_zant_mobile.cpp + src/d/actor/d_a_b_zant_sima.cpp + src/d/actor/d_a_balloon_2D.cpp + src/d/actor/d_a_bullet.cpp + src/d/actor/d_a_coach_2D.cpp + src/d/actor/d_a_coach_fire.cpp + src/d/actor/d_a_cow.cpp + src/d/actor/d_a_cstatue.cpp + src/d/actor/d_a_do.cpp + src/d/actor/d_a_door_boss.cpp + src/d/actor/d_a_door_bossL5.cpp + src/d/actor/d_a_door_mbossL1.cpp + src/d/actor/d_a_door_push.cpp + src/d/actor/d_a_e_ai.cpp + src/d/actor/d_a_e_arrow.cpp + src/d/actor/d_a_e_ba.cpp + src/d/actor/d_a_e_bee.cpp + src/d/actor/d_a_e_bg.cpp + src/d/actor/d_a_e_bi.cpp + src/d/actor/d_a_e_bi_leaf.cpp + src/d/actor/d_a_e_bs.cpp + src/d/actor/d_a_e_bu.cpp + src/d/actor/d_a_e_bug.cpp + src/d/actor/d_a_e_cr.cpp + src/d/actor/d_a_e_cr_egg.cpp + src/d/actor/d_a_e_db.cpp + src/d/actor/d_a_e_db_leaf.cpp + src/d/actor/d_a_e_dd.cpp + src/d/actor/d_a_e_df.cpp + src/d/actor/d_a_e_dk.cpp + src/d/actor/d_a_e_dt.cpp + src/d/actor/d_a_e_fb.cpp + src/d/actor/d_a_e_fk.cpp + src/d/actor/d_a_e_fs.cpp + src/d/actor/d_a_e_fz.cpp + src/d/actor/d_a_e_gb.cpp + src/d/actor/d_a_e_ge.cpp + src/d/actor/d_a_e_gi.cpp + src/d/actor/d_a_e_gm.cpp + src/d/actor/d_a_e_gob.cpp + src/d/actor/d_a_e_gs.cpp + src/d/actor/d_a_e_hb_leaf.cpp + src/d/actor/d_a_e_hm.cpp + src/d/actor/d_a_e_hp.cpp + src/d/actor/d_a_e_hz.cpp + src/d/actor/d_a_e_hzelda.cpp + src/d/actor/d_a_e_is.cpp + src/d/actor/d_a_e_kg.cpp + src/d/actor/d_a_e_kk.cpp + src/d/actor/d_a_e_kr.cpp + src/d/actor/d_a_e_mb.cpp + src/d/actor/d_a_e_md.cpp + src/d/actor/d_a_e_mf.cpp + src/d/actor/d_a_e_mk.cpp + src/d/actor/d_a_e_mk_bo.cpp + src/d/actor/d_a_e_mm.cpp + src/d/actor/d_a_e_mm_mt.cpp + src/d/actor/d_a_e_ms.cpp + src/d/actor/d_a_e_nz.cpp + src/d/actor/d_a_e_oc.cpp + src/d/actor/d_a_e_oct_bg.cpp + src/d/actor/d_a_e_ot.cpp + src/d/actor/d_a_e_ph.cpp + src/d/actor/d_a_e_pm.cpp + src/d/actor/d_a_e_po.cpp + src/d/actor/d_a_e_pz.cpp + src/d/actor/d_a_e_rb.cpp + src/d/actor/d_a_e_rdb.cpp + src/d/actor/d_a_e_rdy.cpp + src/d/actor/d_a_e_s1.cpp + src/d/actor/d_a_e_sb.cpp + src/d/actor/d_a_e_sf.cpp + src/d/actor/d_a_e_sg.cpp + src/d/actor/d_a_e_sh.cpp + src/d/actor/d_a_e_sm.cpp + src/d/actor/d_a_e_sm2.cpp + src/d/actor/d_a_e_st.cpp + src/d/actor/d_a_e_st_line.cpp + src/d/actor/d_a_e_sw.cpp + src/d/actor/d_a_e_th.cpp + src/d/actor/d_a_e_th_ball.cpp + src/d/actor/d_a_e_tk.cpp + src/d/actor/d_a_e_tk2.cpp + src/d/actor/d_a_e_tk_ball.cpp + src/d/actor/d_a_e_tt.cpp + src/d/actor/d_a_e_vt.cpp + src/d/actor/d_a_e_warpappear.cpp + src/d/actor/d_a_e_wb.cpp + src/d/actor/d_a_e_ws.cpp + src/d/actor/d_a_e_ww.cpp + src/d/actor/d_a_e_yc.cpp + src/d/actor/d_a_e_yd.cpp + src/d/actor/d_a_e_yd_leaf.cpp + src/d/actor/d_a_e_yg.cpp + src/d/actor/d_a_e_yh.cpp + src/d/actor/d_a_e_yk.cpp + src/d/actor/d_a_e_ym.cpp + src/d/actor/d_a_e_ym_tag.cpp + src/d/actor/d_a_e_ymb.cpp + src/d/actor/d_a_e_yr.cpp + src/d/actor/d_a_e_zh.cpp + src/d/actor/d_a_e_zm.cpp + src/d/actor/d_a_e_zs.cpp + src/d/actor/d_a_formation_mng.cpp + src/d/actor/d_a_guard_mng.cpp + src/d/actor/d_a_horse.cpp + src/d/actor/d_a_hozelda.cpp + src/d/actor/d_a_izumi_gate.cpp + src/d/actor/d_a_kago.cpp + src/d/actor/d_a_kytag01.cpp + src/d/actor/d_a_kytag02.cpp + src/d/actor/d_a_kytag03.cpp + src/d/actor/d_a_kytag06.cpp + src/d/actor/d_a_kytag07.cpp + src/d/actor/d_a_kytag08.cpp + src/d/actor/d_a_kytag09.cpp + src/d/actor/d_a_kytag12.cpp + src/d/actor/d_a_kytag13.cpp + src/d/actor/d_a_kytag15.cpp + src/d/actor/d_a_kytag16.cpp + src/d/actor/d_a_mant.cpp + src/d/actor/d_a_mg_fshop.cpp + src/d/actor/d_a_mirror.cpp + src/d/actor/d_a_movie_player.cpp + src/d/actor/d_a_myna.cpp + src/d/actor/d_a_ni.cpp + src/d/actor/d_a_npc_aru.cpp + src/d/actor/d_a_npc_ash.cpp + src/d/actor/d_a_npc_ashB.cpp + src/d/actor/d_a_npc_bans.cpp + src/d/actor/d_a_npc_blue_ns.cpp + src/d/actor/d_a_npc_bou.cpp + src/d/actor/d_a_npc_bouS.cpp + src/d/actor/d_a_npc_cdn3.cpp + src/d/actor/d_a_npc_chat.cpp + src/d/actor/d_a_npc_chin.cpp + src/d/actor/d_a_npc_clerka.cpp + src/d/actor/d_a_npc_clerkb.cpp + src/d/actor/d_a_npc_clerkt.cpp + src/d/actor/d_a_npc_coach.cpp + src/d/actor/d_a_npc_df.cpp + src/d/actor/d_a_npc_doc.cpp + src/d/actor/d_a_npc_doorboy.cpp + src/d/actor/d_a_npc_drainSol.cpp + src/d/actor/d_a_npc_du.cpp + src/d/actor/d_a_npc_fairy.cpp + src/d/actor/d_a_npc_fguard.cpp + src/d/actor/d_a_npc_gnd.cpp + src/d/actor/d_a_npc_gra.cpp + src/d/actor/d_a_npc_grc.cpp + src/d/actor/d_a_npc_grd.cpp + src/d/actor/d_a_npc_grm.cpp + src/d/actor/d_a_npc_grmc.cpp + src/d/actor/d_a_npc_gro.cpp + src/d/actor/d_a_npc_grr.cpp + src/d/actor/d_a_npc_grs.cpp + src/d/actor/d_a_npc_grz.cpp + src/d/actor/d_a_npc_guard.cpp + src/d/actor/d_a_npc_gwolf.cpp + src/d/actor/d_a_npc_hanjo.cpp + src/d/actor/d_a_npc_henna0.cpp + src/d/actor/d_a_npc_hoz.cpp + src/d/actor/d_a_npc_impal.cpp + src/d/actor/d_a_npc_inko.cpp + src/d/actor/d_a_npc_ins.cpp + src/d/actor/d_a_npc_jagar.cpp + src/d/actor/d_a_npc_kasi_hana.cpp + src/d/actor/d_a_npc_kasi_kyu.cpp + src/d/actor/d_a_npc_kasi_mich.cpp + src/d/actor/d_a_npc_kdk.cpp + src/d/actor/d_a_npc_kn.cpp + src/d/actor/d_a_npc_knj.cpp + src/d/actor/d_a_npc_kolinb.cpp + src/d/actor/d_a_npc_ks.cpp + src/d/actor/d_a_npc_kyury.cpp + src/d/actor/d_a_npc_len.cpp + src/d/actor/d_a_npc_lf.cpp + src/d/actor/d_a_npc_lud.cpp + src/d/actor/d_a_npc_midp.cpp + src/d/actor/d_a_npc_mk.cpp + src/d/actor/d_a_npc_moi.cpp + src/d/actor/d_a_npc_moir.cpp + src/d/actor/d_a_npc_myna2.cpp + src/d/actor/d_a_npc_ne.cpp + src/d/actor/d_a_npc_p2.cpp + src/d/actor/d_a_npc_pachi_besu.cpp + src/d/actor/d_a_npc_pachi_maro.cpp + src/d/actor/d_a_npc_pachi_taro.cpp + src/d/actor/d_a_npc_passer.cpp + src/d/actor/d_a_npc_passer2.cpp + src/d/actor/d_a_npc_post.cpp + src/d/actor/d_a_npc_pouya.cpp + src/d/actor/d_a_npc_prayer.cpp + src/d/actor/d_a_npc_raca.cpp + src/d/actor/d_a_npc_rafrel.cpp + src/d/actor/d_a_npc_saru.cpp + src/d/actor/d_a_npc_seib.cpp + src/d/actor/d_a_npc_seic.cpp + src/d/actor/d_a_npc_seid.cpp + src/d/actor/d_a_npc_seira.cpp + src/d/actor/d_a_npc_seira2.cpp + src/d/actor/d_a_npc_seirei.cpp + src/d/actor/d_a_npc_shad.cpp + src/d/actor/d_a_npc_shaman.cpp + src/d/actor/d_a_npc_shoe.cpp + src/d/actor/d_a_npc_shop0.cpp + src/d/actor/d_a_npc_shop_maro.cpp + src/d/actor/d_a_npc_sola.cpp + src/d/actor/d_a_npc_soldierA.cpp + src/d/actor/d_a_npc_soldierB.cpp + src/d/actor/d_a_npc_sq.cpp + src/d/actor/d_a_npc_the.cpp + src/d/actor/d_a_npc_theB.cpp + src/d/actor/d_a_npc_tk.cpp + src/d/actor/d_a_npc_tkc.cpp + src/d/actor/d_a_npc_tkj2.cpp + src/d/actor/d_a_npc_tks.cpp + src/d/actor/d_a_npc_toby.cpp + src/d/actor/d_a_npc_tr.cpp + src/d/actor/d_a_npc_uri.cpp + src/d/actor/d_a_npc_worm.cpp + src/d/actor/d_a_npc_wrestler.cpp + src/d/actor/d_a_npc_yamid.cpp + src/d/actor/d_a_npc_yamis.cpp + src/d/actor/d_a_npc_yamit.cpp + src/d/actor/d_a_npc_yelia.cpp + src/d/actor/d_a_npc_ykm.cpp + src/d/actor/d_a_npc_ykw.cpp + src/d/actor/d_a_npc_zanb.cpp + src/d/actor/d_a_npc_zant.cpp + src/d/actor/d_a_npc_zelR.cpp + src/d/actor/d_a_npc_zelRo.cpp + src/d/actor/d_a_npc_zelda.cpp + src/d/actor/d_a_npc_zra.cpp + src/d/actor/d_a_npc_zrc.cpp + src/d/actor/d_a_npc_zrz.cpp + src/d/actor/d_a_obj_Lv5Key.cpp + src/d/actor/d_a_obj_Turara.cpp + src/d/actor/d_a_obj_TvCdlst.cpp + src/d/actor/d_a_obj_Y_taihou.cpp + src/d/actor/d_a_obj_amiShutter.cpp + src/d/actor/d_a_obj_ari.cpp + src/d/actor/d_a_obj_automata.cpp + src/d/actor/d_a_obj_avalanche.cpp + src/d/actor/d_a_obj_balloon.cpp + src/d/actor/d_a_obj_barDesk.cpp + src/d/actor/d_a_obj_batta.cpp + src/d/actor/d_a_obj_bbox.cpp + src/d/actor/d_a_obj_bed.cpp + src/d/actor/d_a_obj_bemos.cpp + src/d/actor/d_a_obj_bhbridge.cpp + src/d/actor/d_a_obj_bk_leaf.cpp + src/d/actor/d_a_obj_bky_rock.cpp + src/d/actor/d_a_obj_bmWindow.cpp + src/d/actor/d_a_obj_bmshutter.cpp + src/d/actor/d_a_obj_bombf.cpp + src/d/actor/d_a_obj_boumato.cpp + src/d/actor/d_a_obj_brg.cpp + src/d/actor/d_a_obj_bsGate.cpp + src/d/actor/d_a_obj_bubblePilar.cpp + src/d/actor/d_a_obj_catdoor.cpp + src/d/actor/d_a_obj_cb.cpp + src/d/actor/d_a_obj_cblock.cpp + src/d/actor/d_a_obj_cdoor.cpp + src/d/actor/d_a_obj_chandelier.cpp + src/d/actor/d_a_obj_chest.cpp + src/d/actor/d_a_obj_cho.cpp + src/d/actor/d_a_obj_cowdoor.cpp + src/d/actor/d_a_obj_crope.cpp + src/d/actor/d_a_obj_crvfence.cpp + src/d/actor/d_a_obj_crvgate.cpp + src/d/actor/d_a_obj_crvhahen.cpp + src/d/actor/d_a_obj_crvlh_down.cpp + src/d/actor/d_a_obj_crvlh_up.cpp + src/d/actor/d_a_obj_crvsteel.cpp + src/d/actor/d_a_obj_crystal.cpp + src/d/actor/d_a_obj_cwall.cpp + src/d/actor/d_a_obj_damCps.cpp + src/d/actor/d_a_obj_dan.cpp + src/d/actor/d_a_obj_digholl.cpp + src/d/actor/d_a_obj_digsnow.cpp + src/d/actor/d_a_obj_dmelevator.cpp + src/d/actor/d_a_obj_drop.cpp + src/d/actor/d_a_obj_dust.cpp + src/d/actor/d_a_obj_enemy_create.cpp + src/d/actor/d_a_obj_fallobj.cpp + src/d/actor/d_a_obj_fan.cpp + src/d/actor/d_a_obj_fchain.cpp + src/d/actor/d_a_obj_fireWood.cpp + src/d/actor/d_a_obj_fireWood2.cpp + src/d/actor/d_a_obj_firepillar.cpp + src/d/actor/d_a_obj_firepillar2.cpp + src/d/actor/d_a_obj_flag.cpp + src/d/actor/d_a_obj_flag2.cpp + src/d/actor/d_a_obj_flag3.cpp + src/d/actor/d_a_obj_food.cpp + src/d/actor/d_a_obj_fw.cpp + src/d/actor/d_a_obj_gadget.cpp + src/d/actor/d_a_obj_ganonwall.cpp + src/d/actor/d_a_obj_ganonwall2.cpp + src/d/actor/d_a_obj_gb.cpp + src/d/actor/d_a_obj_geyser.cpp + src/d/actor/d_a_obj_glowSphere.cpp + src/d/actor/d_a_obj_gm.cpp + src/d/actor/d_a_obj_goGate.cpp + src/d/actor/d_a_obj_gomikabe.cpp + src/d/actor/d_a_obj_gra2.cpp + src/d/actor/d_a_obj_graWall.cpp + src/d/actor/d_a_obj_gra_rock.cpp + src/d/actor/d_a_obj_grave_stone.cpp + src/d/actor/d_a_obj_groundwater.cpp + src/d/actor/d_a_obj_grz_rock.cpp + src/d/actor/d_a_obj_h_saku.cpp + src/d/actor/d_a_obj_hakai_brl.cpp + src/d/actor/d_a_obj_hakai_ftr.cpp + src/d/actor/d_a_obj_hasu2.cpp + src/d/actor/d_a_obj_hata.cpp + src/d/actor/d_a_obj_hb.cpp + src/d/actor/d_a_obj_hbombkoya.cpp + src/d/actor/d_a_obj_heavySw.cpp + src/d/actor/d_a_obj_hfuta.cpp + src/d/actor/d_a_obj_hsTarget.cpp + src/d/actor/d_a_obj_ice_l.cpp + src/d/actor/d_a_obj_ice_s.cpp + src/d/actor/d_a_obj_iceblock.cpp + src/d/actor/d_a_obj_iceleaf.cpp + src/d/actor/d_a_obj_ihasi.cpp + src/d/actor/d_a_obj_ikada.cpp + src/d/actor/d_a_obj_inobone.cpp + src/d/actor/d_a_obj_ita.cpp + src/d/actor/d_a_obj_itamato.cpp + src/d/actor/d_a_obj_kabuto.cpp + src/d/actor/d_a_obj_kag.cpp + src/d/actor/d_a_obj_kage.cpp + src/d/actor/d_a_obj_kago.cpp + src/d/actor/d_a_obj_kaisou.cpp + src/d/actor/d_a_obj_kamakiri.cpp + src/d/actor/d_a_obj_kantera.cpp + src/d/actor/d_a_obj_katatsumuri.cpp + src/d/actor/d_a_obj_kazeneko.cpp + src/d/actor/d_a_obj_kbox.cpp + src/d/actor/d_a_obj_key.cpp + src/d/actor/d_a_obj_keyhole.cpp + src/d/actor/d_a_obj_ki.cpp + src/d/actor/d_a_obj_kiPot.cpp + src/d/actor/d_a_obj_kita.cpp + src/d/actor/d_a_obj_kjgjs.cpp + src/d/actor/d_a_obj_kkanban.cpp + src/d/actor/d_a_obj_knBullet.cpp + src/d/actor/d_a_obj_kshutter.cpp + src/d/actor/d_a_obj_kuwagata.cpp + src/d/actor/d_a_obj_kwheel00.cpp + src/d/actor/d_a_obj_kwheel01.cpp + src/d/actor/d_a_obj_kznkarm.cpp + src/d/actor/d_a_obj_laundry.cpp + src/d/actor/d_a_obj_laundry_rope.cpp + src/d/actor/d_a_obj_lbox.cpp + src/d/actor/d_a_obj_lp.cpp + src/d/actor/d_a_obj_lv1Candle00.cpp + src/d/actor/d_a_obj_lv1Candle01.cpp + src/d/actor/d_a_obj_lv3Candle.cpp + src/d/actor/d_a_obj_lv3Water.cpp + src/d/actor/d_a_obj_lv3Water2.cpp + src/d/actor/d_a_obj_lv3WaterB.cpp + src/d/actor/d_a_obj_lv3saka00.cpp + src/d/actor/d_a_obj_lv3waterEff.cpp + src/d/actor/d_a_obj_lv4CandleDemoTag.cpp + src/d/actor/d_a_obj_lv4CandleTag.cpp + src/d/actor/d_a_obj_lv4EdShutter.cpp + src/d/actor/d_a_obj_lv4Gate.cpp + src/d/actor/d_a_obj_lv4HsTarget.cpp + src/d/actor/d_a_obj_lv4PoGate.cpp + src/d/actor/d_a_obj_lv4RailWall.cpp + src/d/actor/d_a_obj_lv4SlideWall.cpp + src/d/actor/d_a_obj_lv4bridge.cpp + src/d/actor/d_a_obj_lv4chandelier.cpp + src/d/actor/d_a_obj_lv4digsand.cpp + src/d/actor/d_a_obj_lv4floor.cpp + src/d/actor/d_a_obj_lv4gear.cpp + src/d/actor/d_a_obj_lv4prelvtr.cpp + src/d/actor/d_a_obj_lv4prwall.cpp + src/d/actor/d_a_obj_lv4sand.cpp + src/d/actor/d_a_obj_lv5FloorBoard.cpp + src/d/actor/d_a_obj_lv5IceWall.cpp + src/d/actor/d_a_obj_lv5SwIce.cpp + src/d/actor/d_a_obj_lv5ychndlr.cpp + src/d/actor/d_a_obj_lv5yiblltray.cpp + src/d/actor/d_a_obj_lv6ChangeGate.cpp + src/d/actor/d_a_obj_lv6FurikoTrap.cpp + src/d/actor/d_a_obj_lv6Lblock.cpp + src/d/actor/d_a_obj_lv6SwGate.cpp + src/d/actor/d_a_obj_lv6SzGate.cpp + src/d/actor/d_a_obj_lv6Tenbin.cpp + src/d/actor/d_a_obj_lv6TogeRoll.cpp + src/d/actor/d_a_obj_lv6TogeTrap.cpp + src/d/actor/d_a_obj_lv6bemos.cpp + src/d/actor/d_a_obj_lv6bemos2.cpp + src/d/actor/d_a_obj_lv6egate.cpp + src/d/actor/d_a_obj_lv6elevta.cpp + src/d/actor/d_a_obj_lv6swturn.cpp + src/d/actor/d_a_obj_lv7BsGate.cpp + src/d/actor/d_a_obj_lv7PropellerY.cpp + src/d/actor/d_a_obj_lv7bridge.cpp + src/d/actor/d_a_obj_lv8KekkaiTrap.cpp + src/d/actor/d_a_obj_lv8Lift.cpp + src/d/actor/d_a_obj_lv8OptiLift.cpp + src/d/actor/d_a_obj_lv8UdFloor.cpp + src/d/actor/d_a_obj_lv9SwShutter.cpp + src/d/actor/d_a_obj_magLift.cpp + src/d/actor/d_a_obj_magLiftRot.cpp + src/d/actor/d_a_obj_maki.cpp + src/d/actor/d_a_obj_master_sword.cpp + src/d/actor/d_a_obj_mato.cpp + src/d/actor/d_a_obj_mhole.cpp + src/d/actor/d_a_obj_mie.cpp + src/d/actor/d_a_obj_mirror_6pole.cpp + src/d/actor/d_a_obj_mirror_chain.cpp + src/d/actor/d_a_obj_mirror_sand.cpp + src/d/actor/d_a_obj_mirror_screw.cpp + src/d/actor/d_a_obj_mirror_table.cpp + src/d/actor/d_a_obj_msima.cpp + src/d/actor/d_a_obj_mvstair.cpp + src/d/actor/d_a_obj_myogan.cpp + src/d/actor/d_a_obj_nagaisu.cpp + src/d/actor/d_a_obj_nan.cpp + src/d/actor/d_a_obj_ndoor.cpp + src/d/actor/d_a_obj_nougu.cpp + src/d/actor/d_a_obj_octhashi.cpp + src/d/actor/d_a_obj_oiltubo.cpp + src/d/actor/d_a_obj_onsen.cpp + src/d/actor/d_a_obj_onsenFire.cpp + src/d/actor/d_a_obj_onsenTaru.cpp + src/d/actor/d_a_obj_pdoor.cpp + src/d/actor/d_a_obj_pdtile.cpp + src/d/actor/d_a_obj_pdwall.cpp + src/d/actor/d_a_obj_picture.cpp + src/d/actor/d_a_obj_pillar.cpp + src/d/actor/d_a_obj_pleaf.cpp + src/d/actor/d_a_obj_poCandle.cpp + src/d/actor/d_a_obj_poFire.cpp + src/d/actor/d_a_obj_poTbox.cpp + src/d/actor/d_a_obj_prop.cpp + src/d/actor/d_a_obj_pumpkin.cpp + src/d/actor/d_a_obj_rcircle.cpp + src/d/actor/d_a_obj_rfHole.cpp + src/d/actor/d_a_obj_rgate.cpp + src/d/actor/d_a_obj_riverrock.cpp + src/d/actor/d_a_obj_rock.cpp + src/d/actor/d_a_obj_rotBridge.cpp + src/d/actor/d_a_obj_rotTrap.cpp + src/d/actor/d_a_obj_roten.cpp + src/d/actor/d_a_obj_rstair.cpp + src/d/actor/d_a_obj_rw.cpp + src/d/actor/d_a_obj_saidan.cpp + src/d/actor/d_a_obj_sakuita.cpp + src/d/actor/d_a_obj_sakuita_rope.cpp + src/d/actor/d_a_obj_scannon.cpp + src/d/actor/d_a_obj_scannon_crs.cpp + src/d/actor/d_a_obj_scannon_ten.cpp + src/d/actor/d_a_obj_sekidoor.cpp + src/d/actor/d_a_obj_sekizo.cpp + src/d/actor/d_a_obj_sekizoa.cpp + src/d/actor/d_a_obj_shield.cpp + src/d/actor/d_a_obj_sm_door.cpp + src/d/actor/d_a_obj_smallkey.cpp + src/d/actor/d_a_obj_smgdoor.cpp + src/d/actor/d_a_obj_smoke.cpp + src/d/actor/d_a_obj_smtile.cpp + src/d/actor/d_a_obj_smw_stone.cpp + src/d/actor/d_a_obj_snowEffTag.cpp + src/d/actor/d_a_obj_snow_soup.cpp + src/d/actor/d_a_obj_so.cpp + src/d/actor/d_a_obj_spinLift.cpp + src/d/actor/d_a_obj_ss_drink.cpp + src/d/actor/d_a_obj_ss_item.cpp + src/d/actor/d_a_obj_stairBlock.cpp + src/d/actor/d_a_obj_stone.cpp + src/d/actor/d_a_obj_stopper.cpp + src/d/actor/d_a_obj_stopper2.cpp + src/d/actor/d_a_obj_suisya.cpp + src/d/actor/d_a_obj_sw.cpp + src/d/actor/d_a_obj_swBallA.cpp + src/d/actor/d_a_obj_swBallB.cpp + src/d/actor/d_a_obj_swBallC.cpp + src/d/actor/d_a_obj_swLight.cpp + src/d/actor/d_a_obj_swchain.cpp + src/d/actor/d_a_obj_swhang.cpp + src/d/actor/d_a_obj_sword.cpp + src/d/actor/d_a_obj_swpush2.cpp + src/d/actor/d_a_obj_swspinner.cpp + src/d/actor/d_a_obj_swturn.cpp + src/d/actor/d_a_obj_syRock.cpp + src/d/actor/d_a_obj_szbridge.cpp + src/d/actor/d_a_obj_taFence.cpp + src/d/actor/d_a_obj_table.cpp + src/d/actor/d_a_obj_takaraDai.cpp + src/d/actor/d_a_obj_tatigi.cpp + src/d/actor/d_a_obj_ten.cpp + src/d/actor/d_a_obj_testcube.cpp + src/d/actor/d_a_obj_tgake.cpp + src/d/actor/d_a_obj_thashi.cpp + src/d/actor/d_a_obj_thdoor.cpp + src/d/actor/d_a_obj_timeFire.cpp + src/d/actor/d_a_obj_tks.cpp + src/d/actor/d_a_obj_tmoon.cpp + src/d/actor/d_a_obj_toaru_maki.cpp + src/d/actor/d_a_obj_toby.cpp + src/d/actor/d_a_obj_tobyhouse.cpp + src/d/actor/d_a_obj_togeTrap.cpp + src/d/actor/d_a_obj_tombo.cpp + src/d/actor/d_a_obj_tornado.cpp + src/d/actor/d_a_obj_tornado2.cpp + src/d/actor/d_a_obj_tp.cpp + src/d/actor/d_a_obj_treesh.cpp + src/d/actor/d_a_obj_twGate.cpp + src/d/actor/d_a_obj_udoor.cpp + src/d/actor/d_a_obj_usaku.cpp + src/d/actor/d_a_obj_vground.cpp + src/d/actor/d_a_obj_volcball.cpp + src/d/actor/d_a_obj_volcbom.cpp + src/d/actor/d_a_obj_warp_kbrg.cpp + src/d/actor/d_a_obj_warp_obrg.cpp + src/d/actor/d_a_obj_waterGate.cpp + src/d/actor/d_a_obj_waterPillar.cpp + src/d/actor/d_a_obj_waterfall.cpp + src/d/actor/d_a_obj_wchain.cpp + src/d/actor/d_a_obj_wdStick.cpp + src/d/actor/d_a_obj_web0.cpp + src/d/actor/d_a_obj_web1.cpp + src/d/actor/d_a_obj_well_cover.cpp + src/d/actor/d_a_obj_wflag.cpp + src/d/actor/d_a_obj_wind_stone.cpp + src/d/actor/d_a_obj_window.cpp + src/d/actor/d_a_obj_wood_pendulum.cpp + src/d/actor/d_a_obj_wood_statue.cpp + src/d/actor/d_a_obj_wsword.cpp + src/d/actor/d_a_obj_yel_bag.cpp + src/d/actor/d_a_obj_ystone.cpp + src/d/actor/d_a_obj_zcloth.cpp + src/d/actor/d_a_obj_zdoor.cpp + src/d/actor/d_a_obj_zrTurara.cpp + src/d/actor/d_a_obj_zrTuraraRock.cpp + src/d/actor/d_a_obj_zraMark.cpp + src/d/actor/d_a_obj_zra_freeze.cpp + src/d/actor/d_a_obj_zra_rock.cpp + src/d/actor/d_a_passer_mng.cpp + src/d/actor/d_a_tag_arena.cpp + src/d/actor/d_a_peru.cpp + src/d/actor/d_a_ppolamp.cpp + src/d/actor/d_a_skip_2D.cpp + src/d/actor/d_a_startAndGoal.cpp + src/d/actor/d_a_swBall.cpp + src/d/actor/d_a_swLBall.cpp + src/d/actor/d_a_swTime.cpp + src/d/actor/d_a_tag_Lv6Gate.cpp + src/d/actor/d_a_tag_Lv7Gate.cpp + src/d/actor/d_a_tag_Lv8Gate.cpp + src/d/actor/d_a_tag_TWgate.cpp + src/d/actor/d_a_tag_lv6CstaSw.cpp + src/d/actor/d_a_tag_assistance.cpp + src/d/actor/d_a_tag_bottle_item.cpp + src/d/actor/d_a_tag_chgrestart.cpp + src/d/actor/d_a_tag_csw.cpp + src/d/actor/d_a_tag_escape.cpp + src/d/actor/d_a_tag_firewall.cpp + src/d/actor/d_a_tag_gra.cpp + src/d/actor/d_a_tag_guard.cpp + src/d/actor/d_a_tag_instruction.cpp + src/d/actor/d_a_tag_kago_fall.cpp + src/d/actor/d_a_tag_lightball.cpp + src/d/actor/d_a_tag_lv5soup.cpp + src/d/actor/d_a_tag_mmsg.cpp + src/d/actor/d_a_tag_mwait.cpp + src/d/actor/d_a_tag_myna2.cpp + src/d/actor/d_a_tag_myna_light.cpp + src/d/actor/d_a_tag_pachi.cpp + src/d/actor/d_a_tag_poFire.cpp + src/d/actor/d_a_tag_qs.cpp + src/d/actor/d_a_tag_ret_room.cpp + src/d/actor/d_a_tag_river_back.cpp + src/d/actor/d_a_tag_rmbit_sw.cpp + src/d/actor/d_a_tag_schedule.cpp + src/d/actor/d_a_tag_setBall.cpp + src/d/actor/d_a_tag_setrestart.cpp + src/d/actor/d_a_tag_shop_camera.cpp + src/d/actor/d_a_tag_shop_item.cpp + src/d/actor/d_a_tag_smk_emt.cpp + src/d/actor/d_a_tag_spinner.cpp + src/d/actor/d_a_tag_sppath.cpp + src/d/actor/d_a_tag_ss_drink.cpp + src/d/actor/d_a_tag_stream.cpp + src/d/actor/d_a_tag_theB_hint.cpp + src/d/actor/d_a_tag_wara_howl.cpp + src/d/actor/d_a_tag_watchge.cpp + src/d/actor/d_a_tag_waterfall.cpp + src/d/actor/d_a_tag_wljump.cpp + src/d/actor/d_a_tag_yami.cpp + src/d/actor/d_a_talk.cpp + src/d/actor/d_a_tboxSw.cpp + src/d/actor/d_a_title.cpp + src/d/actor/d_a_warp_bug.cpp ) set(DOLPHIN_FILES @@ -1411,129 +1411,133 @@ set(DOLPHIN_FILES ) set(DUSK_FILES - include/dusk/action_bindings.h - include/dusk/endian_gx.hpp - include/dusk/config.hpp - include/dusk/dvd_asset.hpp - include/dusk/scope_guard.hpp - src/dusk/dvd_asset.cpp - src/d/actor/d_a_alink_dusk.cpp - src/dusk/asserts.cpp - src/dusk/config.cpp - src/dusk/crash_handler.cpp - src/dusk/crash_reporting.cpp - src/dusk/data.cpp - src/dusk/data.hpp - src/dusk/endian.cpp - src/dusk/extras.c - src/dusk/file_select.cpp - src/dusk/file_select.hpp - src/dusk/frame_interpolation.cpp - src/dusk/game_clock.cpp - src/dusk/globals.cpp - src/dusk/gyro.cpp - src/dusk/gamepad_color.cpp - src/dusk/autosave.cpp - src/dusk/http/http.hpp - src/dusk/io.cpp - src/dusk/layout.cpp - src/dusk/logging.cpp - src/dusk/settings.cpp - src/dusk/speedrun.cpp - src/dusk/string.cpp - src/dusk/stubs.cpp - include/dusk/texture_replacements.hpp - src/dusk/texture_replacements.cpp - src/dusk/update_check.cpp - src/dusk/update_check.hpp - #src/dusk/m_Do_ext_dusk.cpp - src/dusk/imgui/ImGuiConfig.hpp - src/dusk/imgui/ImGuiConsole.hpp - src/dusk/imgui/ImGuiConsole.cpp - src/dusk/imgui/ImGuiEngine.cpp - src/dusk/imgui/ImGuiEngine.hpp - src/dusk/imgui/ImGuiBloomWindow.cpp - src/dusk/imgui/ImGuiBloomWindow.hpp - src/dusk/imgui/ImGuiMenuTools.cpp - src/dusk/imgui/ImGuiMenuTools.hpp - src/dusk/imgui/ImGuiActorSpawner.cpp - src/dusk/imgui/ImGuiProcessOverlay.cpp - src/dusk/imgui/ImGuiCameraOverlay.cpp - src/dusk/imgui/ImGuiHeapOverlay.cpp - src/dusk/imgui/ImGuiControllerOverlay.cpp - src/dusk/imgui/ImGuiStubLog.cpp - src/dusk/imgui/ImGuiSaveEditor.cpp - src/dusk/imgui/ImGuiStateShare.hpp - src/dusk/imgui/ImGuiStateShare.cpp - src/dusk/ui/achievements.cpp - src/dusk/ui/achievements.hpp - src/dusk/ui/bool_button.cpp - src/dusk/ui/bool_button.hpp - src/dusk/ui/button.cpp - src/dusk/ui/button.hpp - src/dusk/ui/component.cpp - src/dusk/ui/component.hpp - src/dusk/ui/controller_config.cpp - src/dusk/ui/controller_config.hpp - src/dusk/ui/document.cpp - src/dusk/ui/document.hpp - src/dusk/ui/editor.cpp - src/dusk/ui/editor.hpp - src/dusk/ui/event.cpp - src/dusk/ui/event.hpp - src/dusk/ui/graphics_tuner.cpp - src/dusk/ui/graphics_tuner.hpp - src/dusk/ui/input.cpp - src/dusk/ui/input.hpp - src/dusk/ui/modal.cpp - src/dusk/ui/modal.hpp - src/dusk/ui/nav_types.hpp - src/dusk/ui/number_button.cpp - src/dusk/ui/number_button.hpp - src/dusk/ui/overlay.cpp - src/dusk/ui/overlay.hpp - src/dusk/ui/pane.cpp - src/dusk/ui/pane.hpp - src/dusk/ui/menu_bar.cpp - src/dusk/ui/menu_bar.hpp - src/dusk/ui/prelaunch.cpp - src/dusk/ui/prelaunch.hpp - src/dusk/ui/preset.cpp - src/dusk/ui/preset.hpp - src/dusk/ui/reporting.cpp - src/dusk/ui/reporting.hpp - src/dusk/ui/select_button.cpp - src/dusk/ui/select_button.hpp - src/dusk/ui/settings.cpp - src/dusk/ui/settings.hpp - src/dusk/ui/string_button.cpp - src/dusk/ui/string_button.hpp - src/dusk/ui/tab_bar.cpp - src/dusk/ui/tab_bar.hpp - src/dusk/ui/ui.cpp - src/dusk/ui/ui.hpp - src/dusk/ui/warp.cpp - src/dusk/ui/warp.hpp - src/dusk/ui/window.cpp - src/dusk/ui/window.hpp - src/dusk/achievements.cpp - src/dusk/iso_validate.cpp - src/dusk/livesplit.cpp - src/dusk/offset_ptr.cpp - src/dusk/OSContext.cpp - src/dusk/OSReport.cpp - src/dusk/OSThread.cpp - src/dusk/OSMutex.cpp - src/dusk/discord.cpp - src/dusk/discord.hpp - src/dusk/discord_presence.cpp - src/dusk/version.cpp - src/dusk/action_bindings.cpp + include/dusk/action_bindings.h + include/dusk/endian_gx.hpp + include/dusk/config.hpp + include/dusk/dvd_asset.hpp + include/dusk/scope_guard.hpp + src/dusk/dvd_asset.cpp + src/d/actor/d_a_alink_dusk.cpp + src/dusk/asserts.cpp + src/dusk/config.cpp + src/dusk/crash_handler.cpp + src/dusk/crash_reporting.cpp + src/dusk/data.cpp + src/dusk/data.hpp + src/dusk/endian.cpp + src/dusk/extras.c + src/dusk/file_select.cpp + src/dusk/file_select.hpp + src/dusk/frame_interpolation.cpp + src/dusk/commands.cpp + src/dusk/commands.hpp + src/dusk/game_clock.cpp + src/dusk/game_combos.cpp + src/dusk/globals.cpp + src/dusk/gyro.cpp + src/dusk/gamepad_color.cpp + src/dusk/autosave.cpp + src/dusk/http/http.hpp + src/dusk/io.cpp + src/dusk/layout.cpp + src/dusk/logging.cpp + src/dusk/settings.cpp + src/dusk/speedrun.cpp + src/dusk/string.cpp + src/dusk/stubs.cpp + include/dusk/texture_replacements.hpp + src/dusk/texture_replacements.cpp + src/dusk/update_check.cpp + src/dusk/update_check.hpp + src/dusk/imgui/ImGuiConfig.hpp + src/dusk/imgui/ImGuiConsole.hpp + src/dusk/imgui/ImGuiConsole.cpp + src/dusk/imgui/ImGuiEngine.cpp + src/dusk/imgui/ImGuiEngine.hpp + src/dusk/imgui/ImGuiBloomWindow.cpp + src/dusk/imgui/ImGuiBloomWindow.hpp + src/dusk/imgui/ImGuiMenuTools.cpp + src/dusk/imgui/ImGuiMenuTools.hpp + src/dusk/imgui/ImGuiActorSpawner.cpp + src/dusk/imgui/ImGuiProcessOverlay.cpp + src/dusk/imgui/ImGuiCameraOverlay.cpp + src/dusk/imgui/ImGuiHeapOverlay.cpp + src/dusk/imgui/ImGuiControllerOverlay.cpp + src/dusk/imgui/ImGuiStubLog.cpp + src/dusk/imgui/ImGuiSaveEditor.cpp + src/dusk/imgui/ImGuiStateShare.hpp + src/dusk/imgui/ImGuiStateShare.cpp + src/dusk/ui/achievements.cpp + src/dusk/ui/achievements.hpp + src/dusk/ui/command_console.cpp + src/dusk/ui/command_console.hpp + src/dusk/ui/bool_button.cpp + src/dusk/ui/bool_button.hpp + src/dusk/ui/button.cpp + src/dusk/ui/button.hpp + src/dusk/ui/component.cpp + src/dusk/ui/component.hpp + src/dusk/ui/controller_config.cpp + src/dusk/ui/controller_config.hpp + src/dusk/ui/document.cpp + src/dusk/ui/document.hpp + src/dusk/ui/editor.cpp + src/dusk/ui/editor.hpp + src/dusk/ui/event.cpp + src/dusk/ui/event.hpp + src/dusk/ui/graphics_tuner.cpp + src/dusk/ui/graphics_tuner.hpp + src/dusk/ui/input.cpp + src/dusk/ui/input.hpp + src/dusk/ui/modal.cpp + src/dusk/ui/modal.hpp + src/dusk/ui/nav_types.hpp + src/dusk/ui/number_button.cpp + src/dusk/ui/number_button.hpp + src/dusk/ui/overlay.cpp + src/dusk/ui/overlay.hpp + src/dusk/ui/pane.cpp + src/dusk/ui/pane.hpp + src/dusk/ui/menu_bar.cpp + src/dusk/ui/menu_bar.hpp + src/dusk/ui/prelaunch.cpp + src/dusk/ui/prelaunch.hpp + src/dusk/ui/preset.cpp + src/dusk/ui/preset.hpp + src/dusk/ui/reporting.cpp + src/dusk/ui/reporting.hpp + src/dusk/ui/select_button.cpp + src/dusk/ui/select_button.hpp + src/dusk/ui/settings.cpp + src/dusk/ui/settings.hpp + src/dusk/ui/string_button.cpp + src/dusk/ui/string_button.hpp + src/dusk/ui/tab_bar.cpp + src/dusk/ui/tab_bar.hpp + src/dusk/ui/ui.cpp + src/dusk/ui/ui.hpp + src/dusk/ui/warp.cpp + src/dusk/ui/warp.hpp + src/dusk/ui/window.cpp + src/dusk/ui/window.hpp + src/dusk/achievements.cpp + src/dusk/iso_validate.cpp + src/dusk/livesplit.cpp + src/dusk/offset_ptr.cpp + src/dusk/OSContext.cpp + src/dusk/OSReport.cpp + src/dusk/OSThread.cpp + src/dusk/OSMutex.cpp + src/dusk/discord.cpp + src/dusk/discord.hpp + src/dusk/discord_presence.cpp + src/dusk/version.cpp + src/dusk/action_bindings.cpp ) set(DUSK_HTTP_BACKEND_FILES - src/dusk/http/no_backend.cpp - src/dusk/http/curl.cpp - src/dusk/http/winhttp.cpp - src/dusk/http/url_session.mm + src/dusk/http/no_backend.cpp + src/dusk/http/curl.cpp + src/dusk/http/winhttp.cpp + src/dusk/http/url_session.mm ) diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 04a6115fd0..a27a9dc9c5 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1351,6 +1351,9 @@ enum dStage_SaveTbl { const char* dStage_getName2(s16, s8); dStage_objectNameInf* dStage_searchName(const char*); +#if TARGET_PC +dStage_objectNameInf* dStage_searchNameCI(const char*); +#endif static int dStage_stageKeepTresureInit(dStage_dt_c*, void*, int, void*); static int dStage_filiInfo2Init(dStage_dt_c*, void*, int, void*); static int dStage_mapPathInitCommonLayer(dStage_dt_c*, void*, int, void*); diff --git a/include/dusk/game_clock.h b/include/dusk/game_clock.h index 8bb277e070..6ad9c2c752 100644 --- a/include/dusk/game_clock.h +++ b/include/dusk/game_clock.h @@ -23,4 +23,8 @@ float sample_interpolation_step(); float consume_interval(const void* consumer); +// Runtime sim rate override (default 30 hz). Resets the frame timer. +void set_sim_rate(float hz); +float get_sim_rate(); + } // namespace dusk::game_clock diff --git a/include/dusk/game_combos.h b/include/dusk/game_combos.h new file mode 100644 index 0000000000..ed247fe4e4 --- /dev/null +++ b/include/dusk/game_combos.h @@ -0,0 +1,22 @@ +#pragma once + +#include + +namespace dusk { + +struct GameCombo { + using ConditionFn = bool(*)(); + using ActionFn = void(*)(); + + u32 holdMask; // all of these must be held (getHold) + u32 trigMask; // at least one must be newly triggered (getTrig); 0 = fires every frame while holdMask is held + bool strict; // if true: (held & ~trigMask) must equal holdMask exactly, no extra buttons held + ConditionFn condition; // extra game-state guard; nullptr = no extra check + ActionFn action; // runs when the combo is fired + u32 consumeMask; // buttons to clear after firing; 0 = pass-through + bool exclusive; // stop evaluating future combos if this fires +}; + +void processGameCombos(); + +} // namespace dusk diff --git a/include/dusk/settings.h b/include/dusk/settings.h index f48f5862ca..49823e045e 100644 --- a/include/dusk/settings.h +++ b/include/dusk/settings.h @@ -246,6 +246,8 @@ struct UserSettings { ConfigVar removeQuestMapMarkers; ConfigVar showInputViewer; ConfigVar showInputViewerGyro; + ConfigVar enableMoveLinkCombo; + ConfigVar enableTeleportCombo; } game; struct { diff --git a/res/rml/command_console.rcss b/res/rml/command_console.rcss new file mode 100644 index 0000000000..1446e6f165 --- /dev/null +++ b/res/rml/command_console.rcss @@ -0,0 +1,70 @@ +*, *:before, *:after { + box-sizing: border-box; +} + +body { + display: block; + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: visible; + pointer-events: none; +} + +console { + position: absolute; + bottom: 10dp; + left: 10dp; + width: 50%; + display: flex; + flex-direction: column; + background-color: rgba(0, 0, 0, 60%); + pointer-events: auto; + font-family: "Noto Mono"; + font-size: 14dp; + color: #FFFFFF; +} + +console[hidden] { + display: none; +} + +output { + display: block; + overflow: hidden; + max-height: 480dp; + padding: 4dp 8dp; + line-height: 1.4em; +} + +output[open] { + height: 480dp; + max-height: 480dp; + overflow-y: scroll; +} + +line { + display: block; + white-space: nowrap; +} + +line.cmd { + color: #FFD966; +} + +console input { + display: none; + width: 100%; + background-color: rgba(0, 0, 0, 40%); + border: 0dp; + border-top: 1dp rgba(255, 255, 255, 20%); + color: #FFFFFF; + font-family: "Noto Mono"; + font-size: 14dp; + padding: 4dp 8dp; +} + +console[open] input { + display: block; +} diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index 5836feccd2..69e7cdf7b3 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -1536,6 +1536,27 @@ dStage_objectNameInf* dStage_searchName(char const* objName) { return NULL; } +#if TARGET_PC +dStage_objectNameInf* dStage_searchNameCI(char const* objName) { + dStage_objectNameInf* obj = l_objectName; + + for (u32 i = 0; i < ARRAY_SIZEU(l_objectName); i++) { + const char* a = obj->name; + const char* b = objName; + while (*a && *b && tolower((unsigned char)*a) == tolower((unsigned char)*b)) { + ++a; + ++b; + } + if (*a == '\0' && *b == '\0') { + return obj; + } + obj++; + } + + return NULL; +} +#endif + const char* dStage_getName(s16 procName, s8 argument) { static char tmp_name[dStage_NAME_LENGTH]; diff --git a/src/dusk/commands.cpp b/src/dusk/commands.cpp new file mode 100644 index 0000000000..3f2ad03b53 --- /dev/null +++ b/src/dusk/commands.cpp @@ -0,0 +1,617 @@ +#include "commands.hpp" + +#include "JSystem/JUtility/JUTGamePad.h" +#include "SSystem/SComponent/c_sxyz.h" +#include "SSystem/SComponent/c_xyz.h" +#include "c/c_damagereaction.h" +#include "d/actor/d_a_alink.h" +#include "d/d_com_inf_game.h" +#include "d/d_kankyo.h" +#include "d/d_stage.h" +#include "dusk/game_clock.h" +#include "f_op/f_op_actor_mng.h" +#include "f_pc/f_pc_layer.h" +#include "f_pc/f_pc_layer_iter.h" +#include "f_pc/f_pc_manager.h" +#include "f_pc/f_pc_node.h" + +#include +#include +#include +#include +#include + +#include "fmt/format.h" + +namespace dusk { +namespace { + +static constexpr int kMaxHistory = 64; + +static std::vector SplitArgs(std::string_view input) { + std::vector args; + std::string cur; + for (char c : input) { + if (c == ' ' || c == '\t') { + if (!cur.empty()) { + args.push_back(std::move(cur)); + cur.clear(); + } + } else { + cur += c; + } + } + if (!cur.empty()) { + args.push_back(std::move(cur)); + } + return args; +} + +static std::optional ParseLong(const std::string& s) { + if (s.empty()) { + return std::nullopt; + } + char* end = nullptr; + const long v = std::strtol(s.c_str(), &end, 0); + return (end != s.c_str() && *end == '\0') ? std::optional{v} : std::nullopt; +} + +static std::optional ParseFloat(const std::string& s) { + if (s.empty()) { + return std::nullopt; + } + char* end = nullptr; + const float v = std::strtof(s.c_str(), &end); + return (end != s.c_str() && *end == '\0') ? std::optional{v} : std::nullopt; +} + +static const char* ActorShortName(s16 profname) { + const char* n = dStage_getName(profname, -1); + return n ? n : "?"; +} + +// Resolves @found / @link / @ to a process pointer, outputting an error on failure +static base_process_class* ParseProcArg( + const std::string& s, unsigned int foundProcId, const CommandOutput& output) { + if (s.empty() || s[0] != '@') { + output("Error: proc reference must start with @"); + return nullptr; + } + const std::string inner = s.substr(1); + unsigned int id; + if (inner == "found") { + if (foundProcId == 0) { + output("Error: @found is not set"); + return nullptr; + } + id = foundProcId; + } else if (inner == "link") { + auto* player = dComIfGp_getPlayer(0); + if (player == nullptr) { + output("Error: player not available"); + return nullptr; + } + id = (unsigned int)fpcM_GetID(player); + } else { + const auto v = ParseLong(inner); + if (!v) { + output("Error: invalid proc ID"); + return nullptr; + } + id = (unsigned int)*v; + } + auto* proc = fpcM_SearchByID(id); + if (proc == nullptr) { + output(fmt::format(FMT_STRING("Error: proc {} not found"), id)); + return nullptr; + } + return proc; +} + +// Like ParseProcArg but ensures the proc is an actor +static fopAc_ac_c* ParseActorArg( + const std::string& s, unsigned int foundProcId, const CommandOutput& output) { + auto* proc = ParseProcArg(s, foundProcId, output); + if (proc == nullptr) { + return nullptr; + } + if (!fopAcM_IsActor(proc)) { + output("Error: proc is not an actor"); + return nullptr; + } + return static_cast(proc); +} + +static std::optional ParseActorId(const std::string& s) { + if (const auto v = ParseLong(s)) { + return (s16)*v; + } + const auto* entry = dStage_searchNameCI(s.c_str()); + return entry ? std::optional{entry->procname} : std::nullopt; +} + +static std::optional ParseXYZ(const std::vector& args, size_t i) { + const auto x = ParseFloat(args[i]), y = ParseFloat(args[i + 1]), z = ParseFloat(args[i + 2]); + return (x && y && z) ? std::optional{cXyz(*x, *y, *z)} : std::nullopt; +} + +static bool TryAngle( + s16& out, const std::vector& args, size_t i, const CommandOutput& output) { + if (args.size() <= i) { + return true; + } + const auto a = ParseLong(args[i]); + if (!a) { + output("Error: invalid angle"); + return false; + } + out = (s16)*a; + return true; +} + +static std::string actorLine(const base_process_class* proc) { + const auto* ac = static_cast(proc); + return fmt::format(FMT_STRING("procId={} 0x{:04X} ({}) @ ({:.2f}, {:.2f}, {:.2f}) room={}"), + (unsigned int)proc->id, (unsigned int)(u16)proc->profname, ActorShortName(proc->profname), + ac->current.pos.x, ac->current.pos.y, ac->current.pos.z, (int)ac->current.roomNo); +} + +static void recurseLayer(void* p, int (*callback)(void*, void*), void* ctx) { + auto* proc = static_cast(p); + if (fpcBs_Is_JustOfType(g_fpcNd_type, proc->subtype)) { + fpcLyIt_OnlyHere(&static_cast(p)->layer, callback, ctx); + } +} + +struct ListContext { + s16 targetId; + std::vector* output; +}; +struct FindContext { + s16 targetId; + std::vector matches; +}; + +static int ListActorCallback(void* p, void* ctx) { + auto* proc = static_cast(p); + auto* context = static_cast(ctx); + if (fopAcM_IsActor(proc) && (context->targetId < 0 || proc->profname == context->targetId)) { + context->output->push_back(" " + actorLine(proc)); + } + recurseLayer(p, ListActorCallback, ctx); + return 1; +} + +static int FindActorCallback(void* p, void* ctx) { + auto* proc = static_cast(p); + auto* context = static_cast(ctx); + if (fopAcM_IsActor(proc) && proc->profname == context->targetId) { + context->matches.push_back(proc); + } + recurseLayer(p, FindActorCallback, ctx); + return 1; +} + +} // namespace + +void runCommand(std::string_view cmdLine, CommandState& state, const CommandOutput& output) { + output(fmt::format(FMT_STRING("> {}"), cmdLine)); + + if (!cmdLine.empty()) { + if (state.history.empty() || state.history.back() != cmdLine) { + state.history.push_back(std::string(cmdLine)); + if ((int)state.history.size() > kMaxHistory) { + state.history.erase(state.history.begin()); + } + } + } + + auto args = SplitArgs(cmdLine); + if (args.empty()) { + return; + } + const auto& cmd = args[0]; + + auto requirePlayer = [&]() -> daAlink_c* { + auto* p = (daAlink_c*)dComIfGp_getPlayer(0); + if (p == nullptr) { + output("Error: player not available"); + } + return p; + }; + + if (cmd == "tp") { + auto* player = requirePlayer(); + if (player == nullptr) { + return; + } + + if (args.size() >= 2 && args[1].starts_with('@')) { + auto* ac = ParseActorArg(args[1], state.foundProcId, output); + if (ac == nullptr) { + return; + } + + if (args.size() >= 3 && args[2].starts_with('@')) { + auto* destAc = ParseActorArg(args[2], state.foundProcId, output); + if (destAc == nullptr) { + return; + } + const cXyz destPos = destAc->current.pos; + ac->current.pos = destPos; + output(fmt::format(FMT_STRING("Moved actor {} to ({:.2f}, {:.2f}, {:.2f})"), ac->id, + destPos.x, destPos.y, destPos.z)); + return; + } + + if (args.size() >= 5) { + const auto pos = ParseXYZ(args, 2); + if (!pos) { + output("Error: invalid coordinates"); + return; + } + ac->current.pos = *pos; + if (!TryAngle(ac->shape_angle.y, args, 5, output)) { + return; + } + output(fmt::format(FMT_STRING("Moved actor {} to ({:.2f}, {:.2f}, {:.2f})"), ac->id, + pos->x, pos->y, pos->z)); + return; + } + + player->current.pos = ac->current.pos; + output(fmt::format(FMT_STRING("Teleported to actor {} ({:.2f}, {:.2f}, {:.2f})"), + ac->id, ac->current.pos.x, ac->current.pos.y, ac->current.pos.z)); + return; + } + + if (args.size() < 4) { + output("Usage: tp [angle] | tp @ [ [angle] | @link]"); + return; + } + const auto pos = ParseXYZ(args, 1); + if (!pos) { + output("Error: invalid coordinates"); + return; + } + player->current.pos = *pos; + if (!TryAngle(player->shape_angle.y, args, 4, output)) { + return; + } + output(fmt::format( + FMT_STRING("Teleported to ({:.2f}, {:.2f}, {:.2f})"), pos->x, pos->y, pos->z)); + return; + } + + if (cmd == "spawn") { + if (args.size() < 2) { + output("Usage: spawn [params] [x y z] [angle]"); + return; + } + auto* player = requirePlayer(); + if (player == nullptr) { + return; + } + + const auto actorId = ParseActorId(args[1]); + if (!actorId) { + output("Error: unknown actor ID or name"); + return; + } + + long paramsL = -1; + if (args.size() >= 3) { + const auto p = ParseLong(args[2]); + if (!p) { + output("Error: invalid params"); + return; + } + paramsL = *p; + } + + cXyz pos = player->current.pos; + if (args.size() >= 6) { + const auto spawnPos = ParseXYZ(args, 3); + if (!spawnPos) { + output("Error: invalid spawn coordinates"); + return; + } + pos = *spawnPos; + } + + s16 angleY = 0; + if (!TryAngle(angleY, args, 6, output)) { + return; + } + csXyz angle; + angle.set(0, angleY, 0); + cXyz scale(1.0f, 1.0f, 1.0f); + + layer_class* savedLayer = fpcLy_CurrentLayer(); + base_process_class* playScene = fpcM_SearchByName(fpcNm_PLAY_SCENE_e); + if (playScene != nullptr) { + fpcLy_SetCurrentLayer(&((process_node_class*)playScene)->layer); + } + unsigned int result = fopAcM_create( + *actorId, (u32)paramsL, &pos, player->current.roomNo, &angle, &scale, (s8)-1); + fpcLy_SetCurrentLayer(savedLayer); + + output(result != 0 ? fmt::format(FMT_STRING("Spawned actorId=0x{:04X} procId={}"), + (unsigned int)(u16)*actorId, result) : + fmt::format(FMT_STRING("Failed to spawn actorId=0x{:04X}"), + (unsigned int)(u16)*actorId)); + return; + } + + if (cmd == "reset") { + JUTGamePad::C3ButtonReset::sResetSwitchPushing = true; + output("Soft reset triggered"); + return; + } + + if (cmd == "warp") { + if (args.size() < 4) { + output("Usage: warp [layer=-1]"); + output(" e.g. warp F_SP121 0 0"); + return; + } + const auto pointL = ParseLong(args[2]), roomL = ParseLong(args[3]); + if (!pointL || !roomL) { + output("Error: invalid point or room number"); + return; + } + long layerL = -1; + if (args.size() >= 5) { + const auto l = ParseLong(args[4]); + if (!l) { + output("Error: invalid layer"); + return; + } + layerL = *l; + } + state.lastWarpStage = args[1]; + dComIfGp_setNextStage(state.lastWarpStage.c_str(), (s16)*pointL, (s8)*roomL, (s8)layerL); + output(fmt::format(FMT_STRING("Warping to {} point={} room={} layer={}"), args[1], + (int)(s16)*pointL, (int)(s8)*roomL, (int)(s8)layerL)); + return; + } + + if (cmd == "list") { + s16 targetId = -1; + if (args.size() >= 2) { + const auto id = ParseActorId(args[1]); + if (!id) { + output("Error: unknown actor ID or name"); + return; + } + targetId = *id; + } + std::vector results; + ListContext ctx{targetId, &results}; + fpcLyIt_OnlyHere(fpcLy_RootLayer(), ListActorCallback, &ctx); + output(results.empty() ? "No matching actors found" : + fmt::format(FMT_STRING("Found {} actor(s):"), results.size())); + for (const auto& r : results) { + output(r); + } + return; + } + + if (cmd == "killall") { + if (args.size() < 2) { + output("Usage: killall "); + return; + } + const auto targetId = ParseActorId(args[1]); + if (!targetId) { + output("Error: unknown actor ID or name"); + return; + } + FindContext ctx{*targetId, {}}; + fpcLyIt_OnlyHere(fpcLy_RootLayer(), FindActorCallback, &ctx); + for (auto* proc : ctx.matches) { + fpcM_Delete(proc); + } + output(fmt::format(FMT_STRING("Deleted {} actor(s) of type {} ({})"), + (int)ctx.matches.size(), (unsigned int)(u16)*targetId, ActorShortName(*targetId))); + return; + } + + if (cmd == "heal") { + auto* player = requirePlayer(); + if (player == nullptr) { + return; + } + const u16 maxLife = dComIfGs_getMaxLife() / 5 * 4; + u16 newLife = maxLife; + if (args.size() >= 2) { + const auto amount = ParseLong(args[1]); + if (!amount) { + output("Error: invalid amount"); + return; + } + newLife = + (u16)std::max(0L, std::min((long)maxLife, (long)dComIfGs_getLife() + *amount)); + } + dComIfGs_setLife(newLife); + output(fmt::format(FMT_STRING("Health: {}/{}"), (int)newLife, (int)maxLife)); + return; + } + + if (cmd == "kill") { + if (args.size() >= 2) { + auto* proc = ParseProcArg(args[1], state.foundProcId, output); + if (proc == nullptr) { + return; + } + fpcM_Delete(proc); + output(fmt::format(FMT_STRING("Deleted proc {}"), proc->id)); + } else { + auto* player = requirePlayer(); + if (player == nullptr) { + return; + } + dComIfGs_setLife(0); + output("Set Link's health to 0"); + } + return; + } + + if (cmd == "rate") { + if (args.size() >= 2) { + const auto hz = ParseLong(args[1]); + if (!hz || *hz <= 0) { + output("Error: rate must be a positive integer"); + return; + } + dusk::game_clock::set_sim_rate((float)*hz); + } + output(fmt::format(FMT_STRING("Sim rate: {} hz"), (int)dusk::game_clock::get_sim_rate())); + return; + } + + if (cmd == "ebf") { + if (args.size() >= 2) { + const auto val = ParseLong(args[1]); + if (!val || *val < 0 || *val > 255) { + output("Error: value must be 0-255"); + return; + } + cDmr_SkipInfo = (u8)*val; + } + output(fmt::format(FMT_STRING("EBF = {}"), (int)cDmr_SkipInfo)); + return; + } + + if (cmd == "time") { + if (args.size() >= 2) { + const auto t = ParseFloat(args[1]); + if (!t || *t < 0.0f || *t > 360.0f) { + output("Error: time must be a float between 0 and 360"); + return; + } + dKy_instant_timechg(*t); + } + output(fmt::format(FMT_STRING("Time: {:.2f} ({}:{:02d})"), dComIfGs_getTime(), + dKy_getdaytime_hour(), dKy_getdaytime_minute())); + return; + } + + if (cmd == "rupees") { + const u16 maxRupees = dComIfGs_getRupeeMax(); + if (args.size() >= 2) { + const auto amount = ParseLong(args[1]); + if (!amount) { + output("Error: invalid amount"); + return; + } + dComIfGs_setRupee((u16)std::max(0L, std::min((long)maxRupees, *amount))); + } + output(fmt::format(FMT_STRING("Rupees: {}/{}"), (int)dComIfGs_getRupee(), (int)maxRupees)); + return; + } + + if (cmd == "find") { + if (args.size() < 2) { + if (state.foundProcId == 0) { + output("@found is not set"); + return; + } + auto* proc = fpcM_SearchByID(state.foundProcId); + output(proc != nullptr && fopAcM_IsActor(proc) ? + "@found = " + actorLine(proc) : + fmt::format(FMT_STRING("@found = {} (no longer exists)"), + (unsigned int)state.foundProcId)); + return; + } + + const auto targetId = ParseActorId(args[1]); + if (!targetId) { + output("Error: unknown actor ID or name"); + return; + } + + int targetN = 1; + if (args.size() >= 3) { + const auto n = ParseLong(args[2]); + if (!n || *n < 1) { + output("Error: index must be >= 1"); + return; + } + targetN = (int)*n; + } + + FindContext ctx{*targetId, {}}; + fpcLyIt_OnlyHere(fpcLy_RootLayer(), FindActorCallback, &ctx); + + if (ctx.matches.empty()) { + output(fmt::format(FMT_STRING("No actors found for '{}'"), args[1])); + return; + } + + std::sort(ctx.matches.begin(), ctx.matches.end(), + [](const base_process_class* a, const base_process_class* b) { return a->id < b->id; }); + + if (targetN > (int)ctx.matches.size()) { + output(fmt::format( + FMT_STRING("Error: only {} actor(s) of that type exist"), (int)ctx.matches.size())); + return; + } + + auto* picked = ctx.matches[(size_t)(targetN - 1)]; + state.foundProcId = picked->id; + output(fmt::format( + FMT_STRING("@found [{}/{}] {}"), targetN, (int)ctx.matches.size(), actorLine(picked))); + return; + } + + if (cmd == "transform") { + auto* player = requirePlayer(); + if (player == nullptr) { return; } + player->procCoMetamorphoseInit(); + output("Transforming"); + return; + } + + if (cmd == "pos") { + auto* player = requirePlayer(); + if (player == nullptr) { + return; + } + output(fmt::format(FMT_STRING("pos: {:.4f} {:.4f} {:.4f}"), player->current.pos.x, + player->current.pos.y, player->current.pos.z)); + output( + fmt::format(FMT_STRING("stage: {} room: {} entry: {}"), dComIfGp_getStartStageName(), + (int)player->current.roomNo, (int)dComIfGp_getStartStagePoint())); + return; + } + + if (cmd == "help") { + output("@ = @ | @found | @link"); + output(""); + output("ebf [0-255] Get or set cDmr_SkipInfo"); + output("find [n=1] Store nth actor as @found"); + output("heal [amount] Heal to max, or by relative amount"); + output("kill Set Link health to 0"); + output("kill @ Delete proc"); + output("killall Delete all actors of a type"); + output("list [id|name] List actors in scene"); + output("pos Print player position and stage"); + output("rate [hz] Get or set sim rate (1-1000, default 30)"); + output("reset Soft reset"); + output("rupees [amount] Get or set rupee count"); + output("spawn [params] [x y z] [angle] Spawn actor"); + output("time [0-360] Get or set time of day"); + output("tp [angle] Teleport Link to coords"); + output("tp @ Teleport Link to actor"); + output("tp @ [angle] Move actor to coords"); + output("tp @ @ Move actor to actor"); + output("transform Force transform"); + output("warp [layer] Warp to stage"); + return; + } + + output(fmt::format(FMT_STRING("Unknown command '{}' (try 'help')"), cmd)); +} + +} // namespace dusk diff --git a/src/dusk/commands.hpp b/src/dusk/commands.hpp new file mode 100644 index 0000000000..b25901dafd --- /dev/null +++ b/src/dusk/commands.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include +#include +#include +#include + +namespace dusk { + +using CommandOutput = std::function; + +struct CommandState { + std::vector history; + unsigned int foundProcId = 0; + std::string lastWarpStage; +}; + +// Execute a single command line. Calls output() for every line of response. +// Manages history internally; callers need only hold a CommandState. +void runCommand(std::string_view cmdLine, CommandState& state, const CommandOutput& output); + +} // namespace dusk diff --git a/src/dusk/game_clock.cpp b/src/dusk/game_clock.cpp index 1dc7fbf322..bfc60eea49 100644 --- a/src/dusk/game_clock.cpp +++ b/src/dusk/game_clock.cpp @@ -16,8 +16,9 @@ clock::time_point s_current_snapshot_time{}; std::unordered_map s_interval_last_sample; -constexpr clock::duration kSimPeriodDuration = - std::chrono::duration_cast(std::chrono::duration(sim_pace())); +float s_sim_rate_hz = 30.0f; +clock::duration s_sim_period_duration = std::chrono::duration_cast(std::chrono::duration(sim_pace())); + constexpr clock::duration kAbnormalGapResetThreshold = std::chrono::milliseconds(250); constexpr int kMaxSimTicksPerFrame = 2; @@ -32,7 +33,17 @@ void ensure_initialized() { void reset_frame_timer() { s_previous_sample = clock::now(); - s_current_snapshot_time = s_previous_sample - kSimPeriodDuration; + s_current_snapshot_time = s_previous_sample - s_sim_period_duration; +} + +void set_sim_rate(float hz) { + s_sim_rate_hz = std::max(1.0f, std::min(hz, 1000.0f)); + s_sim_period_duration = std::chrono::duration_cast(std::chrono::duration(1.0f / s_sim_rate_hz)); + reset_frame_timer(); +} + +float get_sim_rate() { + return s_sim_rate_hz; } MainLoopPacer advance_main_loop() { @@ -45,12 +56,12 @@ MainLoopPacer advance_main_loop() { MainLoopPacer out{}; out.presentation_dt_seconds = presentation_dt; + out.sim_pace = 1.0f / s_sim_rate_hz; const bool should_interpolate = dusk::getSettings().game.enableFrameInterpolation.getValue() != dusk::FrameInterpMode::Off && !dusk::getTransientSettings().skipFrameRateLimit; out.is_interpolating = should_interpolate; - out.sim_pace = sim_pace(); if (!should_interpolate) { s_current_snapshot_time = now; @@ -59,16 +70,16 @@ MainLoopPacer advance_main_loop() { } if (frame_gap > kAbnormalGapResetThreshold) { - s_current_snapshot_time = now - kSimPeriodDuration; + s_current_snapshot_time = now - s_sim_period_duration; out.sim_ticks_to_run = 0; return out; } int sim_ticks_to_run = 0; clock::time_point projected_snapshot_time = s_current_snapshot_time; - const clock::time_point render_time = now - kSimPeriodDuration; + const clock::time_point render_time = now - s_sim_period_duration; while (sim_ticks_to_run < kMaxSimTicksPerFrame && projected_snapshot_time < render_time) { - projected_snapshot_time += kSimPeriodDuration; + projected_snapshot_time += s_sim_period_duration; sim_ticks_to_run++; } out.sim_ticks_to_run = sim_ticks_to_run; @@ -77,13 +88,13 @@ MainLoopPacer advance_main_loop() { void commit_sim_tick() { ensure_initialized(); - s_current_snapshot_time += kSimPeriodDuration; + s_current_snapshot_time += s_sim_period_duration; } float sample_interpolation_step() { ensure_initialized(); const float step = - std::chrono::duration(clock::now() - s_current_snapshot_time).count() / sim_pace(); + std::chrono::duration(clock::now() - s_current_snapshot_time).count() / (1.0f / s_sim_rate_hz); return std::clamp(step, 0.0f, 1.0f); } diff --git a/src/dusk/game_combos.cpp b/src/dusk/game_combos.cpp new file mode 100644 index 0000000000..90f4fb0770 --- /dev/null +++ b/src/dusk/game_combos.cpp @@ -0,0 +1,136 @@ +#include "dusk/game_combos.h" + +#include "SSystem/SComponent/c_API_controller_pad.h" +#include "SSystem/SComponent/c_xyz.h" +#include "d/actor/d_a_alink.h" +#include "d/d_com_inf_game.h" +#include "dusk/settings.h" +#include "m_Do/m_Do_controller_pad.h" + +namespace dusk { +namespace { + +cXyz s_savedTeleportPos{}; +s16 s_savedTeleportAngle = 0; +bool s_hasTeleportPos = false; + +static daAlink_c* getPlayer() { + return (daAlink_c*)dComIfGp_getPlayer(0); +} + +static void consumeButtons(u32 mask) { + mDoCPd_c::getCpadInfo(PAD_1).mPressedButtonFlags &= ~mask; + mDoCPd_c::getCpadInfo(PAD_1).mButtonFlags &= ~mask; +} + +// Table: holdMask, trigMask, strict, condition, action, consumeMask, exclusive +static const GameCombo kCombos[] = { + // Move Link (L+R+Y), pass-through, non-exclusive + { + PAD_TRIGGER_R | PAD_TRIGGER_L, + PAD_BUTTON_Y, + false, + [] { return (bool)getSettings().game.enableMoveLinkCombo; }, + [] { getTransientSettings().moveLinkActive = !getTransientSettings().moveLinkActive; }, + 0, + false, + }, + // Quick Transform (R+Y, strictly only R held) + { + PAD_TRIGGER_R, + PAD_BUTTON_Y, + true, + [] { return getPlayer() != nullptr; }, + [] { getPlayer()->handleQuickTransform(); }, + PAD_BUTTON_Y, + false, + }, + // Wolf Howl (R+X) + { + PAD_TRIGGER_R, + PAD_BUTTON_X, + false, + [] { return getPlayer() != nullptr; }, + [] { getPlayer()->handleWolfHowl(); }, + PAD_BUTTON_X, + false, + }, + // Teleport save (R+D-pad Up), consumes D-pad Up, exclusive + { + PAD_TRIGGER_R, + PAD_BUTTON_UP, + false, + [] { return getSettings().game.enableTeleportCombo && getPlayer() != nullptr; }, + [] { + auto* p = getPlayer(); + s_savedTeleportPos = p->current.pos; + s_savedTeleportAngle = p->shape_angle.y; + s_hasTeleportPos = true; + }, + PAD_BUTTON_UP, + true, + }, + // Teleport load (R+D-pad Down), consumes D-pad Down, exclusive + { + PAD_TRIGGER_R, + PAD_BUTTON_DOWN, + false, + [] { + return getSettings().game.enableTeleportCombo && s_hasTeleportPos && + getPlayer() != nullptr; + }, + [] { + auto* p = getPlayer(); + p->current.pos = s_savedTeleportPos; + p->shape_angle.y = s_savedTeleportAngle; + p->mNormalSpeed = 0.0f; + }, + PAD_BUTTON_DOWN, + true, + }, + // Moon Jump (R+A, hold), continuous, pass-through, non-exclusive + { + PAD_TRIGGER_R | PAD_BUTTON_A, + 0, + false, + [] { return getSettings().game.moonJump && getPlayer() != nullptr; }, + [] { getPlayer()->speed.y = 56.0f; }, + 0, + false, + }, +}; + +} // namespace + +void processGameCombos() { + if (!getSettings().game.enableMoveLinkCombo) { + getTransientSettings().moveLinkActive = false; + } + + const u32 held = mDoCPd_c::getHold(PAD_1); + const u32 trig = mDoCPd_c::getTrig(PAD_1); + + for (const auto& combo : kCombos) { + if ((held & combo.holdMask) != combo.holdMask) { + continue; + } + if (combo.strict && (held & ~combo.trigMask) != combo.holdMask) { + continue; + } + if (combo.trigMask != 0 && !(trig & combo.trigMask)) { + continue; + } + if (combo.condition != nullptr && !combo.condition()) { + continue; + } + combo.action(); + if (combo.consumeMask != 0) { + consumeButtons(combo.consumeMask); + } + if (combo.exclusive) { + return; + } + } +} + +} // namespace dusk diff --git a/src/dusk/imgui/ImGuiConsole.cpp b/src/dusk/imgui/ImGuiConsole.cpp index d8b85b2d63..db0ffeb2cd 100644 --- a/src/dusk/imgui/ImGuiConsole.cpp +++ b/src/dusk/imgui/ImGuiConsole.cpp @@ -243,12 +243,6 @@ namespace dusk { getTransientSettings().skipFrameRateLimit = getSettings().game.enableTurboKeybind && (ImGui::IsKeyDown(ImGuiKey_Tab) || getActionBindHoldAnyPort(ActionBinds::TURBO_SPEED_BUTTON)); - if (dusk::frame_interp::get_ui_tick_pending() && mDoMain::developmentMode == 1 && (mDoCPd_c::getHold(PAD_1) & (PAD_TRIGGER_R | PAD_TRIGGER_L)) == (PAD_TRIGGER_R | PAD_TRIGGER_L) && mDoCPd_c::getTrigY(PAD_1)) { - getTransientSettings().moveLinkActive = !getTransientSettings().moveLinkActive; - } - if (mDoMain::developmentMode != 1) { - getTransientSettings().moveLinkActive = false; - } } void ImGuiConsole::PreDraw() { diff --git a/src/dusk/settings.cpp b/src/dusk/settings.cpp index 3bea017e2c..ee6f09df8e 100644 --- a/src/dusk/settings.cpp +++ b/src/dusk/settings.cpp @@ -138,7 +138,9 @@ UserSettings g_userSettings = { .recordingMode {"game.recordingMode", false}, .removeQuestMapMarkers {"game.removeQuestMapMarkers", false}, .showInputViewer {"game.showInputViewer", false}, - .showInputViewerGyro {"game.showInputViewerGyro", false} + .showInputViewerGyro {"game.showInputViewerGyro", false}, + .enableMoveLinkCombo {"game.enableMoveLinkCombo", false}, + .enableTeleportCombo {"game.enableTeleportCombo", false} }, .backend = { @@ -267,6 +269,8 @@ void registerSettings() { Register(g_userSettings.game.removeQuestMapMarkers); Register(g_userSettings.game.showInputViewer); Register(g_userSettings.game.showInputViewerGyro); + Register(g_userSettings.game.enableMoveLinkCombo); + Register(g_userSettings.game.enableTeleportCombo); Register(g_userSettings.game.fastSpinner); Register(g_userSettings.game.infiniteHearts); Register(g_userSettings.game.infiniteArrows); diff --git a/src/dusk/ui/command_console.cpp b/src/dusk/ui/command_console.cpp new file mode 100644 index 0000000000..9f561fb08d --- /dev/null +++ b/src/dusk/ui/command_console.cpp @@ -0,0 +1,223 @@ +#include "command_console.hpp" + +#include +#include +#include +#include +#include + +#include "dusk/settings.h" + +#include +#include +#include + +#include "fmt/format.h" +#include "ui.hpp" + +namespace dusk::ui { +namespace { + +static const Rml::String kDocumentSource = R"RML( + + + + + + + + + + + +)RML"; + +static bool isCommand(std::string_view text) { + return text.size() >= 2 && text[0] == '>' && text[1] == ' '; +} + +} // namespace + +CommandConsole::CommandConsole() : Document(kDocumentSource) { + mConsole = mDocument ? mDocument->GetElementById("console") : nullptr; + mOutput = mDocument ? mDocument->GetElementById("console-output") : nullptr; + auto* rawInput = mDocument ? mDocument->GetElementById("console-input") : nullptr; + mInput = rmlui_dynamic_cast(rawInput); + + if (mConsole != nullptr) { + mConsole->SetAttribute("hidden", ""); + } + + listen( + Rml::EventId::Keydown, + [this](Rml::Event& event) { + if (!mInputActive) { + return; + } + const auto key = static_cast(event.GetParameter("key_identifier", Rml::Input::KI_UNKNOWN)); + if (key == Rml::Input::KI_RETURN) { + executeFromInput(); + event.StopImmediatePropagation(); + } else if (key == Rml::Input::KI_ESCAPE) { + closeInput(); + event.StopImmediatePropagation(); + } else if (key == Rml::Input::KI_UP) { + navigateHistory(-1); + event.StopImmediatePropagation(); + } else if (key == Rml::Input::KI_DOWN) { + navigateHistory(+1); + event.StopImmediatePropagation(); + } + }, + true); +} + +void CommandConsole::show() { + if (mDocument != nullptr) { + mDocument->Show(Rml::ModalFlag::None, Rml::FocusFlag::None, Rml::ScrollFlag::None); + } +} + +bool CommandConsole::handle_nav_command(Rml::Event&, NavCommand) { + return false; +} + +void CommandConsole::update() { + if (!getSettings().backend.enableAdvancedSettings) { + return; + } + + int numKeys = 0; + const bool* keyState = SDL_GetKeyboardState(&numKeys); + const bool slashNow = SDL_SCANCODE_SLASH < numKeys && keyState[SDL_SCANCODE_SLASH]; + if (!mInputActive && slashNow && !mPrevSlashState) { + openInput(); + } + mPrevSlashState = slashNow; + + const float dt = std::max(ImGui::GetIO().DeltaTime, 0.0f); + for (auto& line : mOutputLines) { + line.remain -= dt; + } + const auto [first, last] = + std::ranges::remove_if(mOutputLines, [](const OutputLine& l) { return l.remain <= 0.0f; }); + mOutputLines.erase(first, last); + + if (mConsole != nullptr) { + if (!mOutputLines.empty() || mInputActive) { + mConsole->RemoveAttribute("hidden"); + } else { + mConsole->SetAttribute("hidden", ""); + return; + } + } + + if (mOutput == nullptr) { + return; + } + + Rml::String html; + if (mInputActive) { + for (const auto& msg : mMsgHistory) { + html += isCommand(msg) ? "" + escape(msg) + "" : "" + escape(msg) + ""; + } + mOutput->SetAttribute("open", ""); + } else { + const int total = (int)mOutputLines.size(); + const int startIdx = std::max(0, total - kMaxVisibleLines); + for (int i = startIdx; i < total; ++i) { + const auto& line = mOutputLines[i]; + const float alpha = line.remain < kFadeSeconds ? line.remain / kFadeSeconds : 1.0f; + const Rml::String cls = isCommand(line.text) ? " class=\"cmd\"" : ""; + html += fmt::format(FMT_STRING("{}"), cls, + alpha, escape(line.text)); + } + mOutput->RemoveAttribute("open"); + } + + mOutput->SetInnerRML(html); + + if (mScrollToBottom && mInputActive) { + mOutput->SetScrollTop(1e9f); + mScrollToBottom = false; + } +} + +void CommandConsole::openInput() { + mInputActive = true; + mScrollToBottom = true; + if (mConsole != nullptr) { + mConsole->SetAttribute("open", ""); + mConsole->RemoveAttribute("hidden"); + } + if (mInput != nullptr) { + mInput->SetValue(""); + aurora::rmlui::set_input_type(aurora::rmlui::InputType::Text); + mInput->Focus(true); + } +} + +void CommandConsole::closeInput() { + mInputActive = false; + mHistoryPos = -1; + if (mConsole != nullptr) { + mConsole->RemoveAttribute("open"); + } + if (mInput != nullptr) { + mInput->SetValue(""); + } + if (mDocument != nullptr) { + mDocument->Focus(false); + } +} + +void CommandConsole::executeFromInput() { + if (mInput == nullptr) { + closeInput(); + return; + } + const Rml::String value = mInput->GetValue(); + closeInput(); + if (!value.empty()) { + runCommand(value, mState, [this](std::string text) { ConsolePrint(std::move(text)); }); + } + mScrollToBottom = true; +} + +void CommandConsole::navigateHistory(int dir) { + if (mState.history.empty() || mInput == nullptr) { + return; + } + const int prev = mHistoryPos; + if (dir < 0) { + if (mHistoryPos == -1) { + mHistoryPos = (int)mState.history.size() - 1; + } else if (mHistoryPos > 0) { + --mHistoryPos; + } + } else { + if (mHistoryPos != -1 && ++mHistoryPos >= (int)mState.history.size()) { + mHistoryPos = -1; + } + } + if (prev != mHistoryPos) { + const char* str = mHistoryPos >= 0 ? mState.history[mHistoryPos].c_str() : ""; + mInput->SetValue(str); + const int end = static_cast(Rml::StringUtilities::LengthUTF8(mInput->GetValue())); + mInput->SetSelectionRange(end, end); + } +} + +void CommandConsole::ConsolePrint(std::string text) { + mMsgHistory.push_back(text); + if ((int)mMsgHistory.size() > kMaxMsgHistory) { + mMsgHistory.erase(mMsgHistory.begin()); + } + mOutputLines.push_back({std::move(text), kDurationNormal}); + mScrollToBottom = true; + if ((int)mOutputLines.size() > kMaxStoredLines) { + mOutputLines.erase(mOutputLines.begin()); + } +} + +} // namespace dusk::ui diff --git a/src/dusk/ui/command_console.hpp b/src/dusk/ui/command_console.hpp new file mode 100644 index 0000000000..8d476ae085 --- /dev/null +++ b/src/dusk/ui/command_console.hpp @@ -0,0 +1,55 @@ +#pragma once + +#include "document.hpp" +#include "dusk/commands.hpp" + +#include +#include + +namespace Rml { +class ElementFormControlInput; +} + +namespace dusk::ui { + +class CommandConsole : public Document { +public: + CommandConsole(); + void show() override; + void update() override; + +private: + struct OutputLine { + std::string text; + float remain; + }; + + static constexpr float kDurationNormal = 6.0f; + static constexpr float kFadeSeconds = 0.8f; + static constexpr int kMaxStoredLines = 64; + static constexpr int kMaxVisibleLines = 24; + static constexpr int kMaxMsgHistory = 500; + + Rml::Element* mConsole = nullptr; + Rml::Element* mOutput = nullptr; + Rml::ElementFormControlInput* mInput = nullptr; + + std::vector mOutputLines; + std::vector mMsgHistory; + int mHistoryPos = -1; + bool mInputActive = false; + bool mScrollToBottom = false; + bool mPrevSlashState = false; + + CommandState mState; + + bool handle_nav_command(Rml::Event& event, NavCommand cmd) override; + + void ConsolePrint(std::string text); + void openInput(); + void closeInput(); + void executeFromInput(); + void navigateHistory(int dir); +}; + +} // namespace dusk::ui diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index 44fd9e1724..e0b0c79863 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -1504,6 +1504,20 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) { "Recording Mode", "Disables the game HUD and all background music.

Useful for recording footage."); }); + + add_tab("Tools", [this](Rml::Element* content) { + auto& leftPane = add_child(content, Pane::Type::Controlled); + auto& rightPane = add_child(content, Pane::Type::Uncontrolled); + + leftPane.add_section("Link"); + add_speedrun_disabled_option(leftPane, rightPane, getSettings().game.enableMoveLinkCombo, + "Move Link (L+R+Y)", + "Enables the L+R+Y button combo to toggle freely repositioning Link."); + add_speedrun_disabled_option(leftPane, rightPane, getSettings().game.enableTeleportCombo, + "Teleport (R+D-pad Up/Down)", + "R+D-pad Up stores Link's current position.
" + "R+D-pad Down teleports Link back to it."); + }); } void SettingsWindow::update() { diff --git a/src/f_ap/f_ap_game.cpp b/src/f_ap/f_ap_game.cpp index e2e8a61168..a45eaf830b 100644 --- a/src/f_ap/f_ap_game.cpp +++ b/src/f_ap/f_ap_game.cpp @@ -756,23 +756,7 @@ static void duskExecute() { isRecording = false; } - if (mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getTrigX(PAD_1)) { - if (const auto link = g_dComIfG_gameInfo.play.getPlayer(0)) { - dynamic_cast(link)->handleWolfHowl(); - } - } - if ((mDoCPd_c::getHold(PAD_1) & (PAD_TRIGGER_R | PAD_TRIGGER_L)) == PAD_TRIGGER_R && mDoCPd_c::getTrigY(PAD_1)) { - if (const auto link = g_dComIfG_gameInfo.play.getPlayer(0)) { - dynamic_cast(link)->handleQuickTransform(); - } - } - - if (dusk::getSettings().game.moonJump && (mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getHoldA(PAD_1))) { - if (const auto link = g_dComIfG_gameInfo.play.getPlayer(0)) { - link->speed.y = 56.0f; - } - } if (dusk::getSettings().game.fastSpinner && mDoCPd_c::getHoldR(PAD_1)) { if (const auto link = g_dComIfG_gameInfo.play.getPlayer(0)) { diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index bf37f964e6..e25f052861 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -55,11 +55,13 @@ #include "dusk/frame_interpolation.h" #include "dusk/game_clock.h" #include "dusk/gyro.h" +#include "dusk/game_combos.h" #include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/imgui/ImGuiEngine.hpp" #include "dusk/iso_validate.hpp" #include "dusk/logging.h" #include "dusk/main.h" +#include "dusk/ui/command_console.hpp" #include "dusk/ui/menu_bar.hpp" #include "dusk/ui/overlay.hpp" #include "dusk/ui/prelaunch.hpp" @@ -289,6 +291,7 @@ void main01(void) { dusk::frame_interp::begin_sim_tick(); mDoCPd_c::read(); dusk::gyro::read(pacing.sim_pace); + dusk::processGameCombos(); fapGm_Execute(); mDoAud_Execute(); dusk::game_clock::commit_sim_tick(); @@ -305,12 +308,13 @@ void main01(void) { dusk::frame_interp::end_presentation_camera(); dusk::frame_interp::set_ui_tick_pending(false); } else { - dusk::frame_interp::begin_frame(dusk::FrameInterpMode::Off, true, 0.0f); - dusk::frame_interp::set_ui_tick_pending(true); - // Game Inputs mDoCPd_c::read(); dusk::gyro::read(pacing.presentation_dt_seconds); + dusk::processGameCombos(); + + dusk::frame_interp::begin_frame(dusk::FrameInterpMode::Off, true, 0.0f); + dusk::frame_interp::set_ui_tick_pending(true); // EXECUTE GAME LOGIC & RENDER // This calls mDoGph_Painter -> JFWDisplay -> GX Functions @@ -332,6 +336,15 @@ void main01(void) { Limiter::duration_t sleepTime = main_loop_limiter.Sleep(target_ns); dusk::frameUsagePct = 100.0f * (1.0f - static_cast(sleepTime) / static_cast(target_ns)); + } else if (!pacing.is_interpolating && !dusk::getTransientSettings().skipFrameRateLimit) { + // Non-interp: throttle display rate to the configured sim rate so /rate works + const double sim_fps = static_cast(dusk::game_clock::get_sim_rate()); + const Limiter::duration_t sim_target_ns = static_cast(1'000'000'000.0 / sim_fps); + main_loop_limiter.Sleep(sim_target_ns); + } else if (dusk::getTransientSettings().skipFrameRateLimit) { + // Turbo: cap at 120 hz rather than running fully unlimited + constexpr Limiter::duration_t kTurboTargetNs = 1'000'000'000LL / 120LL; + main_loop_limiter.Sleep(kTurboTargetNs); } else { main_loop_limiter.Reset(); } @@ -638,6 +651,7 @@ int game_main(int argc, char* argv[]) { dusk::texture_replacements::reload(); dusk::ui::initialize(); dusk::ui::push_document(std::make_unique(), true, true); + dusk::ui::push_document(std::make_unique(), true, true); dusk::ui::push_document(std::make_unique(), false); // Invalidate a bad saved isoPath so that Dusklight can't get blocked from starting up. From 0b1a2c10b68f627415a7dfa448d4207499b1aba4 Mon Sep 17 00:00:00 2001 From: madeline Date: Mon, 1 Jun 2026 23:13:49 -0700 Subject: [PATCH 006/223] spaces --- files.cmake | 2902 +++++++++++++++++++++++++-------------------------- 1 file changed, 1451 insertions(+), 1451 deletions(-) diff --git a/files.cmake b/files.cmake index e416cd0c0c..9d1bdbfc11 100644 --- a/files.cmake +++ b/files.cmake @@ -1,1406 +1,1406 @@ set(DOLZEL_FILES - src/m_Do/m_Do_main.cpp - #src/m_Do/m_Do_printf.cpp - src/m_Do/m_Do_audio.cpp - src/m_Do/m_Do_controller_pad.cpp - #src/m_Do/m_Re_controller_pad.cpp - src/m_Do/m_Do_graphic.cpp - src/m_Do/m_Do_machine.cpp - src/m_Do/m_Do_mtx.cpp - src/m_Do/m_Do_ext.cpp - src/m_Do/m_Do_lib.cpp - src/m_Do/m_Do_Reset.cpp - src/m_Do/m_Do_dvd_thread.cpp - src/m_Do/m_Do_DVDError.cpp - src/m_Do/m_Do_MemCard.cpp - src/m_Do/m_Do_MemCardRWmng.cpp - src/m_Do/m_Do_hostIO.cpp - src/c/c_damagereaction.cpp - src/c/c_dylink.cpp - src/f_ap/f_ap_game.cpp - src/f_op/f_op_actor.cpp - src/f_op/f_op_actor_iter.cpp - src/f_op/f_op_actor_tag.cpp - src/f_op/f_op_camera.cpp - src/f_op/f_op_actor_mng.cpp - src/f_op/f_op_camera_mng.cpp - src/f_op/f_op_overlap.cpp - src/f_op/f_op_overlap_mng.cpp - src/f_op/f_op_overlap_req.cpp - src/f_op/f_op_scene.cpp - src/f_op/f_op_scene_iter.cpp - src/f_op/f_op_scene_mng.cpp - src/f_op/f_op_scene_req.cpp - src/f_op/f_op_scene_tag.cpp - src/f_op/f_op_view.cpp - src/f_op/f_op_kankyo.cpp - src/f_op/f_op_msg.cpp - src/f_op/f_op_kankyo_mng.cpp - src/f_op/f_op_msg_mng.cpp - src/f_op/f_op_draw_iter.cpp - src/f_op/f_op_draw_tag.cpp - src/f_op/f_op_scene_pause.cpp - src/f_pc/f_pc_base.cpp - src/f_pc/f_pc_create_iter.cpp - src/f_pc/f_pc_create_req.cpp - src/f_pc/f_pc_create_tag.cpp - src/f_pc/f_pc_creator.cpp - src/f_pc/f_pc_delete_tag.cpp - src/f_pc/f_pc_deletor.cpp - src/f_pc/f_pc_draw_priority.cpp - src/f_pc/f_pc_executor.cpp - src/f_pc/f_pc_layer.cpp - src/f_pc/f_pc_leaf.cpp - src/f_pc/f_pc_layer_iter.cpp - src/f_pc/f_pc_layer_tag.cpp - src/f_pc/f_pc_line.cpp - src/f_pc/f_pc_load.cpp - src/f_pc/f_pc_manager.cpp - src/f_pc/f_pc_method.cpp - src/f_pc/f_pc_node.cpp - src/f_pc/f_pc_node_req.cpp - src/f_pc/f_pc_priority.cpp - src/f_pc/f_pc_profile.cpp - src/f_pc/f_pc_searcher.cpp - src/f_pc/f_pc_line_tag.cpp - src/f_pc/f_pc_line_iter.cpp - src/f_pc/f_pc_method_iter.cpp - src/f_pc/f_pc_method_tag.cpp - src/f_pc/f_pc_pause.cpp - src/f_pc/f_pc_draw.cpp - src/f_pc/f_pc_fstcreate_req.cpp - src/f_pc/f_pc_stdcreate_req.cpp - src/f_pc/f_pc_debug_sv.cpp - src/d/d_stage.cpp - src/d/d_map.cpp - src/d/d_com_inf_game.cpp - src/d/d_com_static.cpp - src/d/d_com_inf_actor.cpp - src/d/d_bomb.cpp - src/d/d_lib.cpp - src/d/d_save.cpp - src/d/d_save_init.cpp - src/d/d_jnt_col.cpp - src/d/d_a_obj.cpp - src/d/d_a_itembase_static.cpp - src/d/d_a_item_static.cpp - src/d/d_a_shop_item_static.cpp - src/d/d_a_horse_static.cpp - src/d/d_demo.cpp - src/d/d_door_param2.cpp - src/d/d_resorce.cpp - src/d/d_map_path.cpp - src/d/d_map_path_fmap.cpp - src/d/d_map_path_dmap.cpp - src/d/d_event.cpp - src/d/d_event_data.cpp - src/d/d_event_manager.cpp - src/d/d_event_lib.cpp - src/d/d_simple_model.cpp - src/d/d_particle.cpp - src/d/d_particle_name.cpp - src/d/d_particle_copoly.cpp - src/d/d_path.cpp - src/d/d_drawlist.cpp - src/d/d_kankyo_data.cpp - src/d/d_kankyo_wether.cpp - src/d/d_kankyo_rain.cpp - src/d/d_kankyo_debug.cpp - src/d/d_vibration.cpp - src/d/d_vib_pattern.cpp - src/d/d_attention.cpp - src/d/d_bg_parts.cpp - src/d/d_bg_pc.cpp - src/d/d_att_dist.cpp - src/d/d_bg_plc.cpp - src/d/d_bg_s.cpp - src/d/d_bg_s_acch.cpp - src/d/d_bg_s_capt_poly.cpp - src/d/d_bg_s_chk.cpp - src/d/d_bg_s_gnd_chk.cpp - src/d/d_bg_s_grp_pass_chk.cpp - src/d/d_bg_s_lin_chk.cpp - src/d/d_bg_s_movebg_actor.cpp - src/d/d_bg_s_sph_chk.cpp - src/d/d_bg_s_spl_grp_chk.cpp - src/d/d_bg_s_poly_pass_chk.cpp - src/d/d_bg_s_roof_chk.cpp - src/d/d_bg_s_wtr_chk.cpp - src/d/d_bg_w.cpp - src/d/d_bg_w_base.cpp - src/d/d_bg_w_kcol.cpp - src/d/d_bg_w_sv.cpp - src/d/d_cc_d.cpp - src/d/d_cc_mass_s.cpp - src/d/d_cc_s.cpp - src/d/d_cc_uty.cpp - src/d/d_cam_param.cpp - src/d/d_ev_camera.cpp - src/d/d_spline_path.cpp - src/d/d_item_data.cpp - src/d/d_item.cpp - src/d/d_tresure.cpp - src/d/d_model.cpp - src/d/d_eye_hl.cpp - src/d/d_error_msg.cpp - src/d/d_debug_viewer.cpp - src/d/d_debug_camera.cpp - src/d/actor/d_a_alink.cpp - src/d/actor/d_a_itembase.cpp - src/d/actor/d_a_no_chg_room.cpp - src/d/actor/d_a_npc.cpp - src/d/actor/d_a_npc_cd.cpp - src/d/actor/d_a_npc_cd2.cpp - src/d/actor/d_a_obj_item.cpp - src/d/d_insect.cpp - src/d/actor/d_a_obj_ss_base.cpp - src/d/actor/d_a_player.cpp - src/d/d_camera.cpp - src/d/d_envse.cpp - src/d/d_file_select.cpp - src/d/d_file_sel_warning.cpp - src/d/d_file_sel_info.cpp - src/d/d_bright_check.cpp - src/d/d_scope.cpp - src/d/d_select_cursor.cpp - src/d/d_select_icon.cpp - src/d/d_shop_camera.cpp - src/d/d_shop_item_ctrl.cpp - src/d/d_shop_system.cpp - src/d/d_gameover.cpp - src/d/d_kankyo.cpp - src/d/d_kyeff.cpp - src/d/d_kyeff2.cpp - src/d/d_ky_thunder.cpp - src/d/d_kantera_icon_meter.cpp - src/d/d_menu_calibration.cpp - src/d/d_menu_collect.cpp - src/d/d_menu_dmap.cpp - src/d/d_menu_dmap_map.cpp - src/d/d_menu_map_common.cpp - src/d/d_menu_fishing.cpp - src/d/d_menu_fmap.cpp - src/d/d_menu_fmap_map.cpp - src/d/d_menu_fmap2D.cpp - src/d/d_menu_insect.cpp - src/d/d_menu_item_explain.cpp - src/d/d_menu_letter.cpp - src/d/d_menu_option.cpp - src/d/d_menu_ring.cpp - src/d/d_menu_save.cpp - src/d/d_menu_skill.cpp - src/d/d_menu_window_HIO.cpp - src/d/d_menu_window.cpp - src/d/d_meter_HIO.cpp - src/d/d_meter_button.cpp - src/d/d_meter_haihai.cpp - src/d/d_meter_hakusha.cpp - src/d/d_meter_map.cpp - src/d/d_meter_string.cpp - src/d/d_meter2_draw.cpp - src/d/d_meter2_info.cpp - src/d/d_meter2.cpp - src/d/d_msg_out_font.cpp - src/d/d_msg_class.cpp - src/d/d_msg_object.cpp - src/d/d_msg_unit.cpp - src/d/d_msg_scrn_3select.cpp - src/d/d_msg_scrn_arrow.cpp - src/d/d_msg_scrn_base.cpp - src/d/d_msg_scrn_boss.cpp - src/d/d_msg_scrn_explain.cpp - src/d/d_msg_scrn_item.cpp - src/d/d_msg_scrn_howl.cpp - src/d/d_msg_scrn_jimaku.cpp - src/d/d_msg_scrn_kanban.cpp - src/d/d_msg_scrn_light.cpp - src/d/d_msg_scrn_place.cpp - src/d/d_msg_scrn_staff.cpp - src/d/d_msg_scrn_talk.cpp - src/d/d_msg_scrn_tree.cpp - src/d/d_msg_string_base.cpp - src/d/d_msg_string.cpp - src/d/d_msg_flow.cpp - src/d/d_name.cpp - src/d/d_npc_lib.cpp - src/d/d_ovlp_fade.cpp - src/d/d_ovlp_fade2.cpp - src/d/d_ovlp_fade3.cpp - src/d/d_pane_class.cpp - src/d/d_pane_class_alpha.cpp - src/d/d_pane_class_ex.cpp - src/d/d_s_logo.cpp - src/d/d_s_menu.cpp - src/d/d_s_name.cpp - src/d/d_s_play.cpp - src/d/d_s_room.cpp - src/d/d_s_title.cpp - src/d/d_save_HIO.cpp - src/d/d_timer.cpp - src/d/d_k_wmark.cpp - src/d/d_k_wpillar.cpp - src/DynamicLink.cpp - src/CaptureScreen.cpp + src/m_Do/m_Do_main.cpp + #src/m_Do/m_Do_printf.cpp + src/m_Do/m_Do_audio.cpp + src/m_Do/m_Do_controller_pad.cpp + #src/m_Do/m_Re_controller_pad.cpp + src/m_Do/m_Do_graphic.cpp + src/m_Do/m_Do_machine.cpp + src/m_Do/m_Do_mtx.cpp + src/m_Do/m_Do_ext.cpp + src/m_Do/m_Do_lib.cpp + src/m_Do/m_Do_Reset.cpp + src/m_Do/m_Do_dvd_thread.cpp + src/m_Do/m_Do_DVDError.cpp + src/m_Do/m_Do_MemCard.cpp + src/m_Do/m_Do_MemCardRWmng.cpp + src/m_Do/m_Do_hostIO.cpp + src/c/c_damagereaction.cpp + src/c/c_dylink.cpp + src/f_ap/f_ap_game.cpp + src/f_op/f_op_actor.cpp + src/f_op/f_op_actor_iter.cpp + src/f_op/f_op_actor_tag.cpp + src/f_op/f_op_camera.cpp + src/f_op/f_op_actor_mng.cpp + src/f_op/f_op_camera_mng.cpp + src/f_op/f_op_overlap.cpp + src/f_op/f_op_overlap_mng.cpp + src/f_op/f_op_overlap_req.cpp + src/f_op/f_op_scene.cpp + src/f_op/f_op_scene_iter.cpp + src/f_op/f_op_scene_mng.cpp + src/f_op/f_op_scene_req.cpp + src/f_op/f_op_scene_tag.cpp + src/f_op/f_op_view.cpp + src/f_op/f_op_kankyo.cpp + src/f_op/f_op_msg.cpp + src/f_op/f_op_kankyo_mng.cpp + src/f_op/f_op_msg_mng.cpp + src/f_op/f_op_draw_iter.cpp + src/f_op/f_op_draw_tag.cpp + src/f_op/f_op_scene_pause.cpp + src/f_pc/f_pc_base.cpp + src/f_pc/f_pc_create_iter.cpp + src/f_pc/f_pc_create_req.cpp + src/f_pc/f_pc_create_tag.cpp + src/f_pc/f_pc_creator.cpp + src/f_pc/f_pc_delete_tag.cpp + src/f_pc/f_pc_deletor.cpp + src/f_pc/f_pc_draw_priority.cpp + src/f_pc/f_pc_executor.cpp + src/f_pc/f_pc_layer.cpp + src/f_pc/f_pc_leaf.cpp + src/f_pc/f_pc_layer_iter.cpp + src/f_pc/f_pc_layer_tag.cpp + src/f_pc/f_pc_line.cpp + src/f_pc/f_pc_load.cpp + src/f_pc/f_pc_manager.cpp + src/f_pc/f_pc_method.cpp + src/f_pc/f_pc_node.cpp + src/f_pc/f_pc_node_req.cpp + src/f_pc/f_pc_priority.cpp + src/f_pc/f_pc_profile.cpp + src/f_pc/f_pc_searcher.cpp + src/f_pc/f_pc_line_tag.cpp + src/f_pc/f_pc_line_iter.cpp + src/f_pc/f_pc_method_iter.cpp + src/f_pc/f_pc_method_tag.cpp + src/f_pc/f_pc_pause.cpp + src/f_pc/f_pc_draw.cpp + src/f_pc/f_pc_fstcreate_req.cpp + src/f_pc/f_pc_stdcreate_req.cpp + src/f_pc/f_pc_debug_sv.cpp + src/d/d_stage.cpp + src/d/d_map.cpp + src/d/d_com_inf_game.cpp + src/d/d_com_static.cpp + src/d/d_com_inf_actor.cpp + src/d/d_bomb.cpp + src/d/d_lib.cpp + src/d/d_save.cpp + src/d/d_save_init.cpp + src/d/d_jnt_col.cpp + src/d/d_a_obj.cpp + src/d/d_a_itembase_static.cpp + src/d/d_a_item_static.cpp + src/d/d_a_shop_item_static.cpp + src/d/d_a_horse_static.cpp + src/d/d_demo.cpp + src/d/d_door_param2.cpp + src/d/d_resorce.cpp + src/d/d_map_path.cpp + src/d/d_map_path_fmap.cpp + src/d/d_map_path_dmap.cpp + src/d/d_event.cpp + src/d/d_event_data.cpp + src/d/d_event_manager.cpp + src/d/d_event_lib.cpp + src/d/d_simple_model.cpp + src/d/d_particle.cpp + src/d/d_particle_name.cpp + src/d/d_particle_copoly.cpp + src/d/d_path.cpp + src/d/d_drawlist.cpp + src/d/d_kankyo_data.cpp + src/d/d_kankyo_wether.cpp + src/d/d_kankyo_rain.cpp + src/d/d_kankyo_debug.cpp + src/d/d_vibration.cpp + src/d/d_vib_pattern.cpp + src/d/d_attention.cpp + src/d/d_bg_parts.cpp + src/d/d_bg_pc.cpp + src/d/d_att_dist.cpp + src/d/d_bg_plc.cpp + src/d/d_bg_s.cpp + src/d/d_bg_s_acch.cpp + src/d/d_bg_s_capt_poly.cpp + src/d/d_bg_s_chk.cpp + src/d/d_bg_s_gnd_chk.cpp + src/d/d_bg_s_grp_pass_chk.cpp + src/d/d_bg_s_lin_chk.cpp + src/d/d_bg_s_movebg_actor.cpp + src/d/d_bg_s_sph_chk.cpp + src/d/d_bg_s_spl_grp_chk.cpp + src/d/d_bg_s_poly_pass_chk.cpp + src/d/d_bg_s_roof_chk.cpp + src/d/d_bg_s_wtr_chk.cpp + src/d/d_bg_w.cpp + src/d/d_bg_w_base.cpp + src/d/d_bg_w_kcol.cpp + src/d/d_bg_w_sv.cpp + src/d/d_cc_d.cpp + src/d/d_cc_mass_s.cpp + src/d/d_cc_s.cpp + src/d/d_cc_uty.cpp + src/d/d_cam_param.cpp + src/d/d_ev_camera.cpp + src/d/d_spline_path.cpp + src/d/d_item_data.cpp + src/d/d_item.cpp + src/d/d_tresure.cpp + src/d/d_model.cpp + src/d/d_eye_hl.cpp + src/d/d_error_msg.cpp + src/d/d_debug_viewer.cpp + src/d/d_debug_camera.cpp + src/d/actor/d_a_alink.cpp + src/d/actor/d_a_itembase.cpp + src/d/actor/d_a_no_chg_room.cpp + src/d/actor/d_a_npc.cpp + src/d/actor/d_a_npc_cd.cpp + src/d/actor/d_a_npc_cd2.cpp + src/d/actor/d_a_obj_item.cpp + src/d/d_insect.cpp + src/d/actor/d_a_obj_ss_base.cpp + src/d/actor/d_a_player.cpp + src/d/d_camera.cpp + src/d/d_envse.cpp + src/d/d_file_select.cpp + src/d/d_file_sel_warning.cpp + src/d/d_file_sel_info.cpp + src/d/d_bright_check.cpp + src/d/d_scope.cpp + src/d/d_select_cursor.cpp + src/d/d_select_icon.cpp + src/d/d_shop_camera.cpp + src/d/d_shop_item_ctrl.cpp + src/d/d_shop_system.cpp + src/d/d_gameover.cpp + src/d/d_kankyo.cpp + src/d/d_kyeff.cpp + src/d/d_kyeff2.cpp + src/d/d_ky_thunder.cpp + src/d/d_kantera_icon_meter.cpp + src/d/d_menu_calibration.cpp + src/d/d_menu_collect.cpp + src/d/d_menu_dmap.cpp + src/d/d_menu_dmap_map.cpp + src/d/d_menu_map_common.cpp + src/d/d_menu_fishing.cpp + src/d/d_menu_fmap.cpp + src/d/d_menu_fmap_map.cpp + src/d/d_menu_fmap2D.cpp + src/d/d_menu_insect.cpp + src/d/d_menu_item_explain.cpp + src/d/d_menu_letter.cpp + src/d/d_menu_option.cpp + src/d/d_menu_ring.cpp + src/d/d_menu_save.cpp + src/d/d_menu_skill.cpp + src/d/d_menu_window_HIO.cpp + src/d/d_menu_window.cpp + src/d/d_meter_HIO.cpp + src/d/d_meter_button.cpp + src/d/d_meter_haihai.cpp + src/d/d_meter_hakusha.cpp + src/d/d_meter_map.cpp + src/d/d_meter_string.cpp + src/d/d_meter2_draw.cpp + src/d/d_meter2_info.cpp + src/d/d_meter2.cpp + src/d/d_msg_out_font.cpp + src/d/d_msg_class.cpp + src/d/d_msg_object.cpp + src/d/d_msg_unit.cpp + src/d/d_msg_scrn_3select.cpp + src/d/d_msg_scrn_arrow.cpp + src/d/d_msg_scrn_base.cpp + src/d/d_msg_scrn_boss.cpp + src/d/d_msg_scrn_explain.cpp + src/d/d_msg_scrn_item.cpp + src/d/d_msg_scrn_howl.cpp + src/d/d_msg_scrn_jimaku.cpp + src/d/d_msg_scrn_kanban.cpp + src/d/d_msg_scrn_light.cpp + src/d/d_msg_scrn_place.cpp + src/d/d_msg_scrn_staff.cpp + src/d/d_msg_scrn_talk.cpp + src/d/d_msg_scrn_tree.cpp + src/d/d_msg_string_base.cpp + src/d/d_msg_string.cpp + src/d/d_msg_flow.cpp + src/d/d_name.cpp + src/d/d_npc_lib.cpp + src/d/d_ovlp_fade.cpp + src/d/d_ovlp_fade2.cpp + src/d/d_ovlp_fade3.cpp + src/d/d_pane_class.cpp + src/d/d_pane_class_alpha.cpp + src/d/d_pane_class_ex.cpp + src/d/d_s_logo.cpp + src/d/d_s_menu.cpp + src/d/d_s_name.cpp + src/d/d_s_play.cpp + src/d/d_s_room.cpp + src/d/d_s_title.cpp + src/d/d_save_HIO.cpp + src/d/d_timer.cpp + src/d/d_k_wmark.cpp + src/d/d_k_wpillar.cpp + src/DynamicLink.cpp + src/CaptureScreen.cpp ) if(DEBUG) list(APPEND DOLZEL_FILES src/d/d_event_debug.cpp) endif(DEBUG) set(Z2AUDIOLIB_FILES - src/Z2AudioLib/Z2Calc.cpp - src/Z2AudioLib/Z2AudioArcLoader.cpp - src/Z2AudioLib/Z2Param.cpp - src/Z2AudioLib/Z2SoundMgr.cpp - src/Z2AudioLib/Z2SoundStarter.cpp - src/Z2AudioLib/Z2SoundHandles.cpp - src/Z2AudioLib/Z2SeMgr.cpp - src/Z2AudioLib/Z2SeqMgr.cpp - src/Z2AudioLib/Z2StatusMgr.cpp - src/Z2AudioLib/Z2SceneMgr.cpp - src/Z2AudioLib/Z2FxLineMgr.cpp - src/Z2AudioLib/Z2SoundInfo.cpp - src/Z2AudioLib/Z2Audience.cpp - src/Z2AudioLib/Z2SoundObject.cpp - src/Z2AudioLib/Z2SoundObjMgr.cpp - src/Z2AudioLib/Z2Creature.cpp - src/Z2AudioLib/Z2LinkMgr.cpp - src/Z2AudioLib/Z2EnvSeMgr.cpp - src/Z2AudioLib/Z2WolfHowlMgr.cpp - src/Z2AudioLib/Z2SpeechMgr2.cpp - src/Z2AudioLib/Z2AudioMgr.cpp + src/Z2AudioLib/Z2Calc.cpp + src/Z2AudioLib/Z2AudioArcLoader.cpp + src/Z2AudioLib/Z2Param.cpp + src/Z2AudioLib/Z2SoundMgr.cpp + src/Z2AudioLib/Z2SoundStarter.cpp + src/Z2AudioLib/Z2SoundHandles.cpp + src/Z2AudioLib/Z2SeMgr.cpp + src/Z2AudioLib/Z2SeqMgr.cpp + src/Z2AudioLib/Z2StatusMgr.cpp + src/Z2AudioLib/Z2SceneMgr.cpp + src/Z2AudioLib/Z2FxLineMgr.cpp + src/Z2AudioLib/Z2SoundInfo.cpp + src/Z2AudioLib/Z2Audience.cpp + src/Z2AudioLib/Z2SoundObject.cpp + src/Z2AudioLib/Z2SoundObjMgr.cpp + src/Z2AudioLib/Z2Creature.cpp + src/Z2AudioLib/Z2LinkMgr.cpp + src/Z2AudioLib/Z2EnvSeMgr.cpp + src/Z2AudioLib/Z2WolfHowlMgr.cpp + src/Z2AudioLib/Z2SpeechMgr2.cpp + src/Z2AudioLib/Z2AudioMgr.cpp ) set(SSYSTEM_FILES - src/SSystem/SComponent/c_malloc.cpp - src/SSystem/SComponent/c_API.cpp - src/SSystem/SComponent/c_API_controller_pad.cpp - src/SSystem/SComponent/c_API_graphic.cpp - src/SSystem/SComponent/c_cc_d.cpp - src/SSystem/SComponent/c_cc_s.cpp - src/SSystem/SComponent/c_counter.cpp - src/SSystem/SComponent/c_list.cpp - src/SSystem/SComponent/c_list_iter.cpp - src/SSystem/SComponent/c_node.cpp - src/SSystem/SComponent/c_node_iter.cpp - src/SSystem/SComponent/c_tree.cpp - src/SSystem/SComponent/c_tree_iter.cpp - src/SSystem/SComponent/c_phase.cpp - src/SSystem/SComponent/c_request.cpp - src/SSystem/SComponent/c_tag.cpp - src/SSystem/SComponent/c_tag_iter.cpp - src/SSystem/SComponent/c_xyz.cpp - src/SSystem/SComponent/c_sxyz.cpp - src/SSystem/SComponent/c_math.cpp - src/SSystem/SComponent/c_bg_s_chk.cpp - src/SSystem/SComponent/c_bg_s_gnd_chk.cpp - src/SSystem/SComponent/c_bg_s_lin_chk.cpp - src/SSystem/SComponent/c_bg_s_shdw_draw.cpp - src/SSystem/SComponent/c_bg_s_poly_info.cpp - src/SSystem/SComponent/c_bg_w.cpp - src/SSystem/SComponent/c_m2d.cpp - src/SSystem/SComponent/c_m3d.cpp - src/SSystem/SComponent/c_m3d_g_aab.cpp - src/SSystem/SComponent/c_m3d_g_cir.cpp - src/SSystem/SComponent/c_m3d_g_cps.cpp - src/SSystem/SComponent/c_m3d_g_cyl.cpp - src/SSystem/SComponent/c_m3d_g_lin.cpp - src/SSystem/SComponent/c_m3d_g_pla.cpp - src/SSystem/SComponent/c_m3d_g_sph.cpp - src/SSystem/SComponent/c_m3d_g_tri.cpp - src/SSystem/SComponent/c_m3d_g_vtx.cpp - src/SSystem/SComponent/c_lib.cpp - src/SSystem/SComponent/c_angle.cpp - src/SSystem/SStandard/s_basic.cpp + src/SSystem/SComponent/c_malloc.cpp + src/SSystem/SComponent/c_API.cpp + src/SSystem/SComponent/c_API_controller_pad.cpp + src/SSystem/SComponent/c_API_graphic.cpp + src/SSystem/SComponent/c_cc_d.cpp + src/SSystem/SComponent/c_cc_s.cpp + src/SSystem/SComponent/c_counter.cpp + src/SSystem/SComponent/c_list.cpp + src/SSystem/SComponent/c_list_iter.cpp + src/SSystem/SComponent/c_node.cpp + src/SSystem/SComponent/c_node_iter.cpp + src/SSystem/SComponent/c_tree.cpp + src/SSystem/SComponent/c_tree_iter.cpp + src/SSystem/SComponent/c_phase.cpp + src/SSystem/SComponent/c_request.cpp + src/SSystem/SComponent/c_tag.cpp + src/SSystem/SComponent/c_tag_iter.cpp + src/SSystem/SComponent/c_xyz.cpp + src/SSystem/SComponent/c_sxyz.cpp + src/SSystem/SComponent/c_math.cpp + src/SSystem/SComponent/c_bg_s_chk.cpp + src/SSystem/SComponent/c_bg_s_gnd_chk.cpp + src/SSystem/SComponent/c_bg_s_lin_chk.cpp + src/SSystem/SComponent/c_bg_s_shdw_draw.cpp + src/SSystem/SComponent/c_bg_s_poly_info.cpp + src/SSystem/SComponent/c_bg_w.cpp + src/SSystem/SComponent/c_m2d.cpp + src/SSystem/SComponent/c_m3d.cpp + src/SSystem/SComponent/c_m3d_g_aab.cpp + src/SSystem/SComponent/c_m3d_g_cir.cpp + src/SSystem/SComponent/c_m3d_g_cps.cpp + src/SSystem/SComponent/c_m3d_g_cyl.cpp + src/SSystem/SComponent/c_m3d_g_lin.cpp + src/SSystem/SComponent/c_m3d_g_pla.cpp + src/SSystem/SComponent/c_m3d_g_sph.cpp + src/SSystem/SComponent/c_m3d_g_tri.cpp + src/SSystem/SComponent/c_m3d_g_vtx.cpp + src/SSystem/SComponent/c_lib.cpp + src/SSystem/SComponent/c_angle.cpp + src/SSystem/SStandard/s_basic.cpp ) add_library(JSystem_JParticle STATIC - libs/JSystem/src/JParticle/JPAResourceManager.cpp - libs/JSystem/src/JParticle/JPAResource.cpp - libs/JSystem/src/JParticle/JPABaseShape.cpp - libs/JSystem/src/JParticle/JPAExtraShape.cpp - libs/JSystem/src/JParticle/JPAChildShape.cpp - libs/JSystem/src/JParticle/JPAExTexShape.cpp - libs/JSystem/src/JParticle/JPADynamicsBlock.cpp - libs/JSystem/src/JParticle/JPAFieldBlock.cpp - libs/JSystem/src/JParticle/JPAKeyBlock.cpp - libs/JSystem/src/JParticle/JPATexture.cpp - libs/JSystem/src/JParticle/JPAResourceLoader.cpp - libs/JSystem/src/JParticle/JPAEmitterManager.cpp - libs/JSystem/src/JParticle/JPAEmitter.cpp - libs/JSystem/src/JParticle/JPAParticle.cpp - libs/JSystem/src/JParticle/JPAMath.cpp + libs/JSystem/src/JParticle/JPAResourceManager.cpp + libs/JSystem/src/JParticle/JPAResource.cpp + libs/JSystem/src/JParticle/JPABaseShape.cpp + libs/JSystem/src/JParticle/JPAExtraShape.cpp + libs/JSystem/src/JParticle/JPAChildShape.cpp + libs/JSystem/src/JParticle/JPAExTexShape.cpp + libs/JSystem/src/JParticle/JPADynamicsBlock.cpp + libs/JSystem/src/JParticle/JPAFieldBlock.cpp + libs/JSystem/src/JParticle/JPAKeyBlock.cpp + libs/JSystem/src/JParticle/JPATexture.cpp + libs/JSystem/src/JParticle/JPAResourceLoader.cpp + libs/JSystem/src/JParticle/JPAEmitterManager.cpp + libs/JSystem/src/JParticle/JPAEmitter.cpp + libs/JSystem/src/JParticle/JPAParticle.cpp + libs/JSystem/src/JParticle/JPAMath.cpp ) add_library(JSystem_JFramework STATIC - libs/JSystem/src/JFramework/JFWSystem.cpp - libs/JSystem/src/JFramework/JFWDisplay.cpp + libs/JSystem/src/JFramework/JFWSystem.cpp + libs/JSystem/src/JFramework/JFWDisplay.cpp ) add_library(JSystem_J3DU STATIC - libs/JSystem/src/J3DU/J3DUClipper.cpp - libs/JSystem/src/J3DU/J3DUDL.cpp + libs/JSystem/src/J3DU/J3DUClipper.cpp + libs/JSystem/src/J3DU/J3DUDL.cpp ) add_library(JSystem_JKernel STATIC - libs/JSystem/src/JKernel/JKRHeap.cpp - libs/JSystem/src/JKernel/JKRExpHeap.cpp - libs/JSystem/src/JKernel/JKRSolidHeap.cpp - libs/JSystem/src/JKernel/JKRAssertHeap.cpp - libs/JSystem/src/JKernel/JKRDisposer.cpp - libs/JSystem/src/JKernel/JKRThread.cpp - libs/JSystem/src/JKernel/JKRAram.cpp - libs/JSystem/src/JKernel/JKRAramHeap.cpp - libs/JSystem/src/JKernel/JKRAramBlock.cpp - libs/JSystem/src/JKernel/JKRAramPiece.cpp - libs/JSystem/src/JKernel/JKRAramStream.cpp - libs/JSystem/src/JKernel/JKRFileLoader.cpp - libs/JSystem/src/JKernel/JKRFileFinder.cpp - libs/JSystem/src/JKernel/JKRFileCache.cpp - libs/JSystem/src/JKernel/JKRArchivePub.cpp - libs/JSystem/src/JKernel/JKRArchivePri.cpp - libs/JSystem/src/JKernel/JKRMemArchive.cpp - libs/JSystem/src/JKernel/JKRAramArchive.cpp - libs/JSystem/src/JKernel/JKRDvdArchive.cpp - libs/JSystem/src/JKernel/JKRCompArchive.cpp - libs/JSystem/src/JKernel/JKRFile.cpp - libs/JSystem/src/JKernel/JKRDvdFile.cpp - libs/JSystem/src/JKernel/JKRDvdRipper.cpp - libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp - libs/JSystem/src/JKernel/JKRDecomp.cpp + libs/JSystem/src/JKernel/JKRHeap.cpp + libs/JSystem/src/JKernel/JKRExpHeap.cpp + libs/JSystem/src/JKernel/JKRSolidHeap.cpp + libs/JSystem/src/JKernel/JKRAssertHeap.cpp + libs/JSystem/src/JKernel/JKRDisposer.cpp + libs/JSystem/src/JKernel/JKRThread.cpp + libs/JSystem/src/JKernel/JKRAram.cpp + libs/JSystem/src/JKernel/JKRAramHeap.cpp + libs/JSystem/src/JKernel/JKRAramBlock.cpp + libs/JSystem/src/JKernel/JKRAramPiece.cpp + libs/JSystem/src/JKernel/JKRAramStream.cpp + libs/JSystem/src/JKernel/JKRFileLoader.cpp + libs/JSystem/src/JKernel/JKRFileFinder.cpp + libs/JSystem/src/JKernel/JKRFileCache.cpp + libs/JSystem/src/JKernel/JKRArchivePub.cpp + libs/JSystem/src/JKernel/JKRArchivePri.cpp + libs/JSystem/src/JKernel/JKRMemArchive.cpp + libs/JSystem/src/JKernel/JKRAramArchive.cpp + libs/JSystem/src/JKernel/JKRDvdArchive.cpp + libs/JSystem/src/JKernel/JKRCompArchive.cpp + libs/JSystem/src/JKernel/JKRFile.cpp + libs/JSystem/src/JKernel/JKRDvdFile.cpp + libs/JSystem/src/JKernel/JKRDvdRipper.cpp + libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp + libs/JSystem/src/JKernel/JKRDecomp.cpp ) add_library(JSystem_JMath STATIC - libs/JSystem/src/JMath/JMath.cpp - libs/JSystem/src/JMath/random.cpp - libs/JSystem/src/JMath/JMATrigonometric.cpp + libs/JSystem/src/JMath/JMath.cpp + libs/JSystem/src/JMath/random.cpp + libs/JSystem/src/JMath/JMATrigonometric.cpp ) add_library(JSystem_JSupport STATIC - libs/JSystem/src/JSupport/JSUList.cpp - libs/JSystem/src/JSupport/JSUInputStream.cpp - libs/JSystem/src/JSupport/JSUOutputStream.cpp - libs/JSystem/src/JSupport/JSUMemoryStream.cpp - libs/JSystem/src/JSupport/JSUFileStream.cpp + libs/JSystem/src/JSupport/JSUList.cpp + libs/JSystem/src/JSupport/JSUInputStream.cpp + libs/JSystem/src/JSupport/JSUOutputStream.cpp + libs/JSystem/src/JSupport/JSUMemoryStream.cpp + libs/JSystem/src/JSupport/JSUFileStream.cpp ) add_library(JSystem_JUtility STATIC - libs/JSystem/src/JUtility/JUTCacheFont.cpp - libs/JSystem/src/JUtility/JUTResource.cpp - libs/JSystem/src/JUtility/JUTTexture.cpp - libs/JSystem/src/JUtility/JUTPalette.cpp - libs/JSystem/src/JUtility/JUTNameTab.cpp - libs/JSystem/src/JUtility/JUTGraphFifo.cpp - libs/JSystem/src/JUtility/JUTFont.cpp - libs/JSystem/src/JUtility/JUTResFont.cpp - libs/JSystem/src/JUtility/JUTDbPrint.cpp - libs/JSystem/src/JUtility/JUTGamePad.cpp - libs/JSystem/src/JUtility/JUTException.cpp - libs/JSystem/src/JUtility/JUTDirectPrint.cpp - libs/JSystem/src/JUtility/JUTAssert.cpp - libs/JSystem/src/JUtility/JUTVideo.cpp - libs/JSystem/src/JUtility/JUTXfb.cpp - libs/JSystem/src/JUtility/JUTFader.cpp - libs/JSystem/src/JUtility/JUTProcBar.cpp - libs/JSystem/src/JUtility/JUTConsole.cpp - libs/JSystem/src/JUtility/JUTDirectFile.cpp - libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp + libs/JSystem/src/JUtility/JUTCacheFont.cpp + libs/JSystem/src/JUtility/JUTResource.cpp + libs/JSystem/src/JUtility/JUTTexture.cpp + libs/JSystem/src/JUtility/JUTPalette.cpp + libs/JSystem/src/JUtility/JUTNameTab.cpp + libs/JSystem/src/JUtility/JUTGraphFifo.cpp + libs/JSystem/src/JUtility/JUTFont.cpp + libs/JSystem/src/JUtility/JUTResFont.cpp + libs/JSystem/src/JUtility/JUTDbPrint.cpp + libs/JSystem/src/JUtility/JUTGamePad.cpp + libs/JSystem/src/JUtility/JUTException.cpp + libs/JSystem/src/JUtility/JUTDirectPrint.cpp + libs/JSystem/src/JUtility/JUTAssert.cpp + libs/JSystem/src/JUtility/JUTVideo.cpp + libs/JSystem/src/JUtility/JUTXfb.cpp + libs/JSystem/src/JUtility/JUTFader.cpp + libs/JSystem/src/JUtility/JUTProcBar.cpp + libs/JSystem/src/JUtility/JUTConsole.cpp + libs/JSystem/src/JUtility/JUTDirectFile.cpp + libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp ) add_library(JSystem_JStage STATIC - libs/JSystem/src/JStage/JSGActor.cpp - libs/JSystem/src/JStage/JSGAmbientLight.cpp - libs/JSystem/src/JStage/JSGCamera.cpp - libs/JSystem/src/JStage/JSGFog.cpp - libs/JSystem/src/JStage/JSGLight.cpp - libs/JSystem/src/JStage/JSGObject.cpp - libs/JSystem/src/JStage/JSGSystem.cpp + libs/JSystem/src/JStage/JSGActor.cpp + libs/JSystem/src/JStage/JSGAmbientLight.cpp + libs/JSystem/src/JStage/JSGCamera.cpp + libs/JSystem/src/JStage/JSGFog.cpp + libs/JSystem/src/JStage/JSGLight.cpp + libs/JSystem/src/JStage/JSGObject.cpp + libs/JSystem/src/JStage/JSGSystem.cpp ) add_library(JSystem_J2DGraph STATIC - libs/JSystem/src/J2DGraph/J2DGrafContext.cpp - libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp - libs/JSystem/src/J2DGraph/J2DTevs.cpp - libs/JSystem/src/J2DGraph/J2DMaterial.cpp - libs/JSystem/src/J2DGraph/J2DMatBlock.cpp - libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp - libs/JSystem/src/J2DGraph/J2DPrint.cpp - libs/JSystem/src/J2DGraph/J2DPane.cpp - libs/JSystem/src/J2DGraph/J2DScreen.cpp - libs/JSystem/src/J2DGraph/J2DWindow.cpp - libs/JSystem/src/J2DGraph/J2DPicture.cpp - libs/JSystem/src/J2DGraph/J2DTextBox.cpp - libs/JSystem/src/J2DGraph/J2DWindowEx.cpp - libs/JSystem/src/J2DGraph/J2DPictureEx.cpp - libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp - libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp - libs/JSystem/src/J2DGraph/J2DAnimation.cpp - libs/JSystem/src/J2DGraph/J2DManage.cpp + libs/JSystem/src/J2DGraph/J2DGrafContext.cpp + libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp + libs/JSystem/src/J2DGraph/J2DTevs.cpp + libs/JSystem/src/J2DGraph/J2DMaterial.cpp + libs/JSystem/src/J2DGraph/J2DMatBlock.cpp + libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp + libs/JSystem/src/J2DGraph/J2DPrint.cpp + libs/JSystem/src/J2DGraph/J2DPane.cpp + libs/JSystem/src/J2DGraph/J2DScreen.cpp + libs/JSystem/src/J2DGraph/J2DWindow.cpp + libs/JSystem/src/J2DGraph/J2DPicture.cpp + libs/JSystem/src/J2DGraph/J2DTextBox.cpp + libs/JSystem/src/J2DGraph/J2DWindowEx.cpp + libs/JSystem/src/J2DGraph/J2DPictureEx.cpp + libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp + libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp + libs/JSystem/src/J2DGraph/J2DAnimation.cpp + libs/JSystem/src/J2DGraph/J2DManage.cpp ) add_library(JSystem_J3DGraphBase STATIC - libs/JSystem/src/J3DGraphBase/J3DGD.cpp - libs/JSystem/src/J3DGraphBase/J3DSys.cpp - libs/JSystem/src/J3DGraphBase/J3DVertex.cpp - libs/JSystem/src/J3DGraphBase/J3DTransform.cpp - libs/JSystem/src/J3DGraphBase/J3DTexture.cpp - libs/JSystem/src/J3DGraphBase/J3DPacket.cpp - libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp - libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp - libs/JSystem/src/J3DGraphBase/J3DShape.cpp - libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp - libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp - libs/JSystem/src/J3DGraphBase/J3DTevs.cpp - libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp - libs/JSystem/src/J3DGraphBase/J3DStruct.cpp + libs/JSystem/src/J3DGraphBase/J3DGD.cpp + libs/JSystem/src/J3DGraphBase/J3DSys.cpp + libs/JSystem/src/J3DGraphBase/J3DVertex.cpp + libs/JSystem/src/J3DGraphBase/J3DTransform.cpp + libs/JSystem/src/J3DGraphBase/J3DTexture.cpp + libs/JSystem/src/J3DGraphBase/J3DPacket.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp + libs/JSystem/src/J3DGraphBase/J3DShape.cpp + libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp + libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp + libs/JSystem/src/J3DGraphBase/J3DTevs.cpp + libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp + libs/JSystem/src/J3DGraphBase/J3DStruct.cpp ) add_library(JSystem_J3DGraphAnimator STATIC - libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp - libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp - libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp - libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp - libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp - libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp - libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp - libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp + libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp + libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp + libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp + libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp ) add_library(JSystem_J3DGraphLoader STATIC - libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp - libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp - libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp - libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp - libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp + libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp + libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp ) add_library(JSystem_JStudio STATIC - libs/JSystem/src/JStudio/JStudio/ctb.cpp - libs/JSystem/src/JStudio/JStudio/ctb-data.cpp - libs/JSystem/src/JStudio/JStudio/functionvalue.cpp - libs/JSystem/src/JStudio/JStudio/fvb.cpp - libs/JSystem/src/JStudio/JStudio/fvb-data.cpp - libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp - libs/JSystem/src/JStudio/JStudio/object-id.cpp - libs/JSystem/src/JStudio/JStudio/stb.cpp - libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp - libs/JSystem/src/JStudio/JStudio/stb-data.cpp + libs/JSystem/src/JStudio/JStudio/ctb.cpp + libs/JSystem/src/JStudio/JStudio/ctb-data.cpp + libs/JSystem/src/JStudio/JStudio/functionvalue.cpp + libs/JSystem/src/JStudio/JStudio/fvb.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp + libs/JSystem/src/JStudio/JStudio/object-id.cpp + libs/JSystem/src/JStudio/JStudio/stb.cpp + libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/stb-data.cpp ) add_library(JSystem_JStudio_JStage STATIC - libs/JSystem/src/JStudio/JStudio_JStage/control.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp + libs/JSystem/src/JStudio/JStudio_JStage/control.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp ) add_library(JSystem_JStudio_JAudio2 STATIC - libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp - libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp ) add_library(JSystem_JStudio_JParticle STATIC - libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp - libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp ) add_library(JSystem_JAudio2 STATIC - libs/JSystem/src/JAudio2/JASCalc.cpp - libs/JSystem/src/JAudio2/JASTaskThread.cpp - libs/JSystem/src/JAudio2/JASDvdThread.cpp - libs/JSystem/src/JAudio2/JASCallback.cpp - libs/JSystem/src/JAudio2/JASHeapCtrl.cpp - libs/JSystem/src/JAudio2/JASResArcLoader.cpp - libs/JSystem/src/JAudio2/JASProbe.cpp - libs/JSystem/src/JAudio2/JASReport.cpp - libs/JSystem/src/JAudio2/JASCmdStack.cpp - libs/JSystem/src/JAudio2/JASTrack.cpp - libs/JSystem/src/JAudio2/JASTrackPort.cpp - libs/JSystem/src/JAudio2/JASRegisterParam.cpp - libs/JSystem/src/JAudio2/JASSeqCtrl.cpp - libs/JSystem/src/JAudio2/JASSeqParser.cpp - libs/JSystem/src/JAudio2/JASSeqReader.cpp - libs/JSystem/src/JAudio2/JASAramStream.cpp - libs/JSystem/src/JAudio2/JASBank.cpp - libs/JSystem/src/JAudio2/JASBasicBank.cpp - libs/JSystem/src/JAudio2/JASVoiceBank.cpp - libs/JSystem/src/JAudio2/JASBasicInst.cpp - libs/JSystem/src/JAudio2/JASDrumSet.cpp - libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp - libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp - libs/JSystem/src/JAudio2/JASWSParser.cpp - libs/JSystem/src/JAudio2/JASBNKParser.cpp - libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp - libs/JSystem/src/JAudio2/JASChannel.cpp - libs/JSystem/src/JAudio2/JASLfo.cpp - libs/JSystem/src/JAudio2/JASOscillator.cpp - libs/JSystem/src/JAudio2/JASAiCtrl.cpp - libs/JSystem/src/JAudio2/JASAudioThread.cpp - libs/JSystem/src/JAudio2/JASAudioReseter.cpp - libs/JSystem/src/JAudio2/JASDSPChannel.cpp - libs/JSystem/src/JAudio2/JASDSPInterface.cpp - libs/JSystem/src/JAudio2/JASDriverIF.cpp - libs/JSystem/src/JAudio2/JASSoundParams.cpp - libs/JSystem/src/JAudio2/JAIAudible.cpp - libs/JSystem/src/JAudio2/JAIAudience.cpp - libs/JSystem/src/JAudio2/JAISe.cpp - libs/JSystem/src/JAudio2/JAISeMgr.cpp - libs/JSystem/src/JAudio2/JAISeq.cpp - libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp - libs/JSystem/src/JAudio2/JAISeqMgr.cpp - libs/JSystem/src/JAudio2/JAISound.cpp - libs/JSystem/src/JAudio2/JAISoundChild.cpp - libs/JSystem/src/JAudio2/JAISoundHandles.cpp - libs/JSystem/src/JAudio2/JAISoundInfo.cpp - libs/JSystem/src/JAudio2/JAISoundParams.cpp - libs/JSystem/src/JAudio2/JAISoundStarter.cpp - libs/JSystem/src/JAudio2/JAIStream.cpp - libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp - libs/JSystem/src/JAudio2/JAIStreamMgr.cpp - libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp - libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp - libs/JSystem/src/JAudio2/JAUAudioMgr.cpp - libs/JSystem/src/JAudio2/JAUBankTable.cpp - libs/JSystem/src/JAudio2/JAUClusterSound.cpp - libs/JSystem/src/JAudio2/JAUInitializer.cpp - libs/JSystem/src/JAudio2/JAUSectionHeap.cpp - libs/JSystem/src/JAudio2/JAUSeqCollection.cpp - libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp - libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp - libs/JSystem/src/JAudio2/JAUSoundTable.cpp - libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp + libs/JSystem/src/JAudio2/JASCalc.cpp + libs/JSystem/src/JAudio2/JASTaskThread.cpp + libs/JSystem/src/JAudio2/JASDvdThread.cpp + libs/JSystem/src/JAudio2/JASCallback.cpp + libs/JSystem/src/JAudio2/JASHeapCtrl.cpp + libs/JSystem/src/JAudio2/JASResArcLoader.cpp + libs/JSystem/src/JAudio2/JASProbe.cpp + libs/JSystem/src/JAudio2/JASReport.cpp + libs/JSystem/src/JAudio2/JASCmdStack.cpp + libs/JSystem/src/JAudio2/JASTrack.cpp + libs/JSystem/src/JAudio2/JASTrackPort.cpp + libs/JSystem/src/JAudio2/JASRegisterParam.cpp + libs/JSystem/src/JAudio2/JASSeqCtrl.cpp + libs/JSystem/src/JAudio2/JASSeqParser.cpp + libs/JSystem/src/JAudio2/JASSeqReader.cpp + libs/JSystem/src/JAudio2/JASAramStream.cpp + libs/JSystem/src/JAudio2/JASBank.cpp + libs/JSystem/src/JAudio2/JASBasicBank.cpp + libs/JSystem/src/JAudio2/JASVoiceBank.cpp + libs/JSystem/src/JAudio2/JASBasicInst.cpp + libs/JSystem/src/JAudio2/JASDrumSet.cpp + libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp + libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp + libs/JSystem/src/JAudio2/JASWSParser.cpp + libs/JSystem/src/JAudio2/JASBNKParser.cpp + libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp + libs/JSystem/src/JAudio2/JASChannel.cpp + libs/JSystem/src/JAudio2/JASLfo.cpp + libs/JSystem/src/JAudio2/JASOscillator.cpp + libs/JSystem/src/JAudio2/JASAiCtrl.cpp + libs/JSystem/src/JAudio2/JASAudioThread.cpp + libs/JSystem/src/JAudio2/JASAudioReseter.cpp + libs/JSystem/src/JAudio2/JASDSPChannel.cpp + libs/JSystem/src/JAudio2/JASDSPInterface.cpp + libs/JSystem/src/JAudio2/JASDriverIF.cpp + libs/JSystem/src/JAudio2/JASSoundParams.cpp + libs/JSystem/src/JAudio2/JAIAudible.cpp + libs/JSystem/src/JAudio2/JAIAudience.cpp + libs/JSystem/src/JAudio2/JAISe.cpp + libs/JSystem/src/JAudio2/JAISeMgr.cpp + libs/JSystem/src/JAudio2/JAISeq.cpp + libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp + libs/JSystem/src/JAudio2/JAISeqMgr.cpp + libs/JSystem/src/JAudio2/JAISound.cpp + libs/JSystem/src/JAudio2/JAISoundChild.cpp + libs/JSystem/src/JAudio2/JAISoundHandles.cpp + libs/JSystem/src/JAudio2/JAISoundInfo.cpp + libs/JSystem/src/JAudio2/JAISoundParams.cpp + libs/JSystem/src/JAudio2/JAISoundStarter.cpp + libs/JSystem/src/JAudio2/JAIStream.cpp + libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp + libs/JSystem/src/JAudio2/JAIStreamMgr.cpp + libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp + libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp + libs/JSystem/src/JAudio2/JAUAudioMgr.cpp + libs/JSystem/src/JAudio2/JAUBankTable.cpp + libs/JSystem/src/JAudio2/JAUClusterSound.cpp + libs/JSystem/src/JAudio2/JAUInitializer.cpp + libs/JSystem/src/JAudio2/JAUSectionHeap.cpp + libs/JSystem/src/JAudio2/JAUSeqCollection.cpp + libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp + libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp + libs/JSystem/src/JAudio2/JAUSoundTable.cpp + libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp ) add_library(JSystem_JMessage STATIC - libs/JSystem/src/JMessage/control.cpp - libs/JSystem/src/JMessage/data.cpp - libs/JSystem/src/JMessage/processor.cpp - libs/JSystem/src/JMessage/resource.cpp - libs/JSystem/src/JMessage/locale.cpp + libs/JSystem/src/JMessage/control.cpp + libs/JSystem/src/JMessage/data.cpp + libs/JSystem/src/JMessage/processor.cpp + libs/JSystem/src/JMessage/resource.cpp + libs/JSystem/src/JMessage/locale.cpp ) add_library(JSystem_JGadget STATIC - libs/JSystem/src/JGadget/binary.cpp - libs/JSystem/src/JGadget/define.cpp - libs/JSystem/src/JGadget/linklist.cpp - libs/JSystem/src/JGadget/search.cpp - libs/JSystem/src/JGadget/std-vector.cpp + libs/JSystem/src/JGadget/binary.cpp + libs/JSystem/src/JGadget/define.cpp + libs/JSystem/src/JGadget/linklist.cpp + libs/JSystem/src/JGadget/search.cpp + libs/JSystem/src/JGadget/std-vector.cpp ) add_library(JSystem_JAHostIO STATIC - libs/JSystem/src/JAHostIO/JAHFrameNode.cpp - libs/JSystem/src/JAHostIO/JAHioMessage.cpp - libs/JSystem/src/JAHostIO/JAHioMgr.cpp - libs/JSystem/src/JAHostIO/JAHioNode.cpp - libs/JSystem/src/JAHostIO/JAHioUtil.cpp - libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp + libs/JSystem/src/JAHostIO/JAHFrameNode.cpp + libs/JSystem/src/JAHostIO/JAHioMessage.cpp + libs/JSystem/src/JAHostIO/JAHioMgr.cpp + libs/JSystem/src/JAHostIO/JAHioNode.cpp + libs/JSystem/src/JAHostIO/JAHioUtil.cpp + libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp ) add_library(JSystem_JHostIO STATIC - libs/JSystem/src/JHostIO/JORFile.cpp - libs/JSystem/src/JHostIO/JORHostInfo.cpp - libs/JSystem/src/JHostIO/JORMessageBox.cpp - libs/JSystem/src/JHostIO/JORServer.cpp - libs/JSystem/src/JHostIO/JHIhioASync.cpp - libs/JSystem/src/JHostIO/JHIRMcc.cpp - libs/JSystem/src/JHostIO/JHIMccBuf.cpp + libs/JSystem/src/JHostIO/JORFile.cpp + libs/JSystem/src/JHostIO/JORHostInfo.cpp + libs/JSystem/src/JHostIO/JORMessageBox.cpp + libs/JSystem/src/JHostIO/JORServer.cpp + libs/JSystem/src/JHostIO/JHIhioASync.cpp + libs/JSystem/src/JHostIO/JHIRMcc.cpp + libs/JSystem/src/JHostIO/JHIMccBuf.cpp ) set(JSYSTEM_LIBRARIES - JSystem_JParticle - JSystem_JFramework - JSystem_J3DU - JSystem_JKernel - JSystem_JMath - JSystem_JSupport - JSystem_JUtility - JSystem_JStage - JSystem_J2DGraph - JSystem_J3DGraphBase - JSystem_J3DGraphAnimator - JSystem_J3DGraphLoader - JSystem_JStudio - JSystem_JStudio_JStage - JSystem_JStudio_JAudio2 - JSystem_JStudio_JParticle - JSystem_JAudio2 - JSystem_JMessage - JSystem_JGadget - JSystem_JAHostIO - JSystem_JHostIO + JSystem_JParticle + JSystem_JFramework + JSystem_J3DU + JSystem_JKernel + JSystem_JMath + JSystem_JSupport + JSystem_JUtility + JSystem_JStage + JSystem_J2DGraph + JSystem_J3DGraphBase + JSystem_J3DGraphAnimator + JSystem_J3DGraphLoader + JSystem_JStudio + JSystem_JStudio_JStage + JSystem_JStudio_JAudio2 + JSystem_JStudio_JParticle + JSystem_JAudio2 + JSystem_JMessage + JSystem_JGadget + JSystem_JAHostIO + JSystem_JHostIO ) set(REL_FILES - src/f_pc/f_pc_profile_lst.cpp - src/d/actor/d_a_andsw.cpp - src/d/actor/d_a_bg.cpp - src/d/actor/d_a_bg_obj.cpp - src/d/actor/d_a_dmidna.cpp - src/d/actor/d_a_door_dbdoor00.cpp - src/d/actor/d_a_door_knob00.cpp - src/d/actor/d_a_door_shutter.cpp - src/d/actor/d_a_door_spiral.cpp - src/d/actor/d_a_dshutter.cpp - src/d/actor/d_a_ep.cpp - src/d/actor/d_a_hitobj.cpp - src/d/actor/d_a_kytag00.cpp - src/d/actor/d_a_kytag04.cpp - src/d/actor/d_a_kytag17.cpp - src/d/actor/d_a_obj_brakeeff.cpp - src/d/actor/d_a_obj_burnbox.cpp - src/d/actor/d_a_obj_carry.cpp - src/d/actor/d_a_obj_ito.cpp - src/d/actor/d_a_obj_movebox.cpp - src/d/actor/d_a_obj_swpush.cpp - src/d/actor/d_a_obj_timer.cpp - src/d/actor/d_a_path_line.cpp - src/d/actor/d_a_scene_exit.cpp - src/d/actor/d_a_set_bgobj.cpp - src/d/actor/d_a_swhit0.cpp - src/d/actor/d_a_tag_allmato.cpp - src/d/actor/d_a_tag_camera.cpp - src/d/actor/d_a_tag_chkpoint.cpp - src/d/actor/d_a_tag_event.cpp - src/d/actor/d_a_tag_evt.cpp - src/d/actor/d_a_tag_evtarea.cpp - src/d/actor/d_a_tag_evtmsg.cpp - src/d/actor/d_a_tag_howl.cpp - src/d/actor/d_a_tag_kmsg.cpp - src/d/actor/d_a_tag_lantern.cpp - src/d/actor/d_a_tag_mist.cpp - src/d/actor/d_a_tag_msg.cpp - src/d/actor/d_a_tag_push.cpp - src/d/actor/d_a_tag_telop.cpp - src/d/actor/d_a_tbox.cpp - src/d/actor/d_a_tbox2.cpp - src/d/actor/d_a_vrbox.cpp - src/d/actor/d_a_vrbox2.cpp - src/d/actor/d_a_arrow.cpp - src/d/actor/d_a_boomerang.cpp - src/d/actor/d_a_crod.cpp - src/d/actor/d_a_demo00.cpp - src/d/actor/d_a_disappear.cpp - src/d/actor/d_a_mg_rod.cpp - src/d/actor/d_a_midna.cpp - src/d/actor/d_a_nbomb.cpp - src/d/actor/d_a_obj_life_container.cpp - src/d/actor/d_a_obj_yousei.cpp - src/d/actor/d_a_spinner.cpp - src/d/actor/d_a_suspend.cpp - src/d/actor/d_a_tag_attention.cpp - src/d/actor/d_a_alldie.cpp - src/d/actor/d_a_andsw2.cpp - src/d/actor/d_a_bd.cpp - src/d/actor/d_a_canoe.cpp - src/d/actor/d_a_cstaF.cpp - src/d/actor/d_a_demo_item.cpp - src/d/actor/d_a_door_bossL1.cpp - src/d/actor/d_a_e_dn.cpp - src/d/actor/d_a_e_fm.cpp - src/d/actor/d_a_e_ga.cpp - src/d/actor/d_a_e_hb.cpp - src/d/actor/d_a_e_nest.cpp - src/d/actor/d_a_e_rd.cpp - src/d/actor/d_a_econt.cpp - src/d/actor/d_a_fr.cpp - src/d/actor/d_a_grass.cpp - src/d/actor/d_a_kytag05.cpp - src/d/actor/d_a_kytag10.cpp - src/d/actor/d_a_kytag11.cpp - src/d/actor/d_a_kytag14.cpp - src/d/actor/d_a_mg_fish.cpp - src/d/actor/d_a_npc_besu.cpp - src/d/actor/d_a_npc_fairy_seirei.cpp - src/d/actor/d_a_npc_fish.cpp - src/d/actor/d_a_npc_henna.cpp - src/d/actor/d_a_npc_kakashi.cpp - src/d/actor/d_a_npc_kkri.cpp - src/d/actor/d_a_npc_kolin.cpp - src/d/actor/d_a_npc_maro.cpp - src/d/actor/d_a_npc_taro.cpp - src/d/actor/d_a_npc_tkj.cpp - src/d/actor/d_a_obj_bhashi.cpp - src/d/actor/d_a_obj_bkdoor.cpp - src/d/actor/d_a_obj_bosswarp.cpp - src/d/actor/d_a_obj_cboard.cpp - src/d/actor/d_a_obj_digplace.cpp - src/d/actor/d_a_obj_eff.cpp - src/d/actor/d_a_obj_fmobj.cpp - src/d/actor/d_a_obj_gpTaru.cpp - src/d/actor/d_a_obj_hhashi.cpp - src/d/actor/d_a_obj_kanban2.cpp - src/d/actor/d_a_obj_kbacket.cpp - src/d/actor/d_a_obj_kgate.cpp - src/d/actor/d_a_obj_klift00.cpp - src/d/actor/d_a_obj_ktOnFire.cpp - src/d/actor/d_a_obj_ladder.cpp - src/d/actor/d_a_obj_lv2Candle.cpp - src/d/actor/d_a_obj_magne_arm.cpp - src/d/actor/d_a_obj_metalbox.cpp - src/d/actor/d_a_obj_mgate.cpp - src/d/actor/d_a_obj_nameplate.cpp - src/d/actor/d_a_obj_ornament_cloth.cpp - src/d/actor/d_a_obj_rope_bridge.cpp - src/d/actor/d_a_obj_sWallShutter.cpp - src/d/actor/d_a_obj_stick.cpp - src/d/actor/d_a_obj_stoneMark.cpp - src/d/actor/d_a_obj_swpropeller.cpp - src/d/actor/d_a_obj_swpush5.cpp - src/d/actor/d_a_obj_yobikusa.cpp - src/d/actor/d_a_scene_exit2.cpp - src/d/actor/d_a_shop_item.cpp - src/d/actor/d_a_sq.cpp - src/d/actor/d_a_swc00.cpp - src/d/actor/d_a_tag_CstaSw.cpp - src/d/actor/d_a_tag_ajnot.cpp - src/d/actor/d_a_tag_attack_item.cpp - src/d/actor/d_a_tag_gstart.cpp - src/d/actor/d_a_tag_hinit.cpp - src/d/actor/d_a_tag_hjump.cpp - src/d/actor/d_a_tag_hstop.cpp - src/d/actor/d_a_tag_lv2prchk.cpp - src/d/actor/d_a_tag_magne.cpp - src/d/actor/d_a_tag_mhint.cpp - src/d/actor/d_a_tag_mstop.cpp - src/d/actor/d_a_tag_spring.cpp - src/d/actor/d_a_tag_statue_evt.cpp - src/d/actor/d_a_ykgr.cpp - src/d/actor/d_a_L7demo_dr.cpp - src/d/actor/d_a_L7low_dr.cpp - src/d/actor/d_a_L7op_demo_dr.cpp - src/d/actor/d_a_b_bh.cpp - src/d/actor/d_a_b_bq.cpp - src/d/actor/d_a_b_dr.cpp - src/d/actor/d_a_b_dre.cpp - src/d/actor/d_a_b_ds.cpp - src/d/actor/d_a_b_gg.cpp - src/d/actor/d_a_b_gm.cpp - src/d/actor/d_a_b_gnd.cpp - src/d/actor/d_a_b_go.cpp - src/d/actor/d_a_b_gos.cpp - src/d/actor/d_a_b_mgn.cpp - src/d/actor/d_a_b_ob.cpp - src/d/actor/d_a_b_oh.cpp - src/d/actor/d_a_b_oh2.cpp - src/d/actor/d_a_b_tn.cpp - src/d/actor/d_a_b_yo.cpp - src/d/actor/d_a_b_yo_ice.cpp - src/d/actor/d_a_b_zant.cpp - src/d/actor/d_a_b_zant_magic.cpp - src/d/actor/d_a_b_zant_mobile.cpp - src/d/actor/d_a_b_zant_sima.cpp - src/d/actor/d_a_balloon_2D.cpp - src/d/actor/d_a_bullet.cpp - src/d/actor/d_a_coach_2D.cpp - src/d/actor/d_a_coach_fire.cpp - src/d/actor/d_a_cow.cpp - src/d/actor/d_a_cstatue.cpp - src/d/actor/d_a_do.cpp - src/d/actor/d_a_door_boss.cpp - src/d/actor/d_a_door_bossL5.cpp - src/d/actor/d_a_door_mbossL1.cpp - src/d/actor/d_a_door_push.cpp - src/d/actor/d_a_e_ai.cpp - src/d/actor/d_a_e_arrow.cpp - src/d/actor/d_a_e_ba.cpp - src/d/actor/d_a_e_bee.cpp - src/d/actor/d_a_e_bg.cpp - src/d/actor/d_a_e_bi.cpp - src/d/actor/d_a_e_bi_leaf.cpp - src/d/actor/d_a_e_bs.cpp - src/d/actor/d_a_e_bu.cpp - src/d/actor/d_a_e_bug.cpp - src/d/actor/d_a_e_cr.cpp - src/d/actor/d_a_e_cr_egg.cpp - src/d/actor/d_a_e_db.cpp - src/d/actor/d_a_e_db_leaf.cpp - src/d/actor/d_a_e_dd.cpp - src/d/actor/d_a_e_df.cpp - src/d/actor/d_a_e_dk.cpp - src/d/actor/d_a_e_dt.cpp - src/d/actor/d_a_e_fb.cpp - src/d/actor/d_a_e_fk.cpp - src/d/actor/d_a_e_fs.cpp - src/d/actor/d_a_e_fz.cpp - src/d/actor/d_a_e_gb.cpp - src/d/actor/d_a_e_ge.cpp - src/d/actor/d_a_e_gi.cpp - src/d/actor/d_a_e_gm.cpp - src/d/actor/d_a_e_gob.cpp - src/d/actor/d_a_e_gs.cpp - src/d/actor/d_a_e_hb_leaf.cpp - src/d/actor/d_a_e_hm.cpp - src/d/actor/d_a_e_hp.cpp - src/d/actor/d_a_e_hz.cpp - src/d/actor/d_a_e_hzelda.cpp - src/d/actor/d_a_e_is.cpp - src/d/actor/d_a_e_kg.cpp - src/d/actor/d_a_e_kk.cpp - src/d/actor/d_a_e_kr.cpp - src/d/actor/d_a_e_mb.cpp - src/d/actor/d_a_e_md.cpp - src/d/actor/d_a_e_mf.cpp - src/d/actor/d_a_e_mk.cpp - src/d/actor/d_a_e_mk_bo.cpp - src/d/actor/d_a_e_mm.cpp - src/d/actor/d_a_e_mm_mt.cpp - src/d/actor/d_a_e_ms.cpp - src/d/actor/d_a_e_nz.cpp - src/d/actor/d_a_e_oc.cpp - src/d/actor/d_a_e_oct_bg.cpp - src/d/actor/d_a_e_ot.cpp - src/d/actor/d_a_e_ph.cpp - src/d/actor/d_a_e_pm.cpp - src/d/actor/d_a_e_po.cpp - src/d/actor/d_a_e_pz.cpp - src/d/actor/d_a_e_rb.cpp - src/d/actor/d_a_e_rdb.cpp - src/d/actor/d_a_e_rdy.cpp - src/d/actor/d_a_e_s1.cpp - src/d/actor/d_a_e_sb.cpp - src/d/actor/d_a_e_sf.cpp - src/d/actor/d_a_e_sg.cpp - src/d/actor/d_a_e_sh.cpp - src/d/actor/d_a_e_sm.cpp - src/d/actor/d_a_e_sm2.cpp - src/d/actor/d_a_e_st.cpp - src/d/actor/d_a_e_st_line.cpp - src/d/actor/d_a_e_sw.cpp - src/d/actor/d_a_e_th.cpp - src/d/actor/d_a_e_th_ball.cpp - src/d/actor/d_a_e_tk.cpp - src/d/actor/d_a_e_tk2.cpp - src/d/actor/d_a_e_tk_ball.cpp - src/d/actor/d_a_e_tt.cpp - src/d/actor/d_a_e_vt.cpp - src/d/actor/d_a_e_warpappear.cpp - src/d/actor/d_a_e_wb.cpp - src/d/actor/d_a_e_ws.cpp - src/d/actor/d_a_e_ww.cpp - src/d/actor/d_a_e_yc.cpp - src/d/actor/d_a_e_yd.cpp - src/d/actor/d_a_e_yd_leaf.cpp - src/d/actor/d_a_e_yg.cpp - src/d/actor/d_a_e_yh.cpp - src/d/actor/d_a_e_yk.cpp - src/d/actor/d_a_e_ym.cpp - src/d/actor/d_a_e_ym_tag.cpp - src/d/actor/d_a_e_ymb.cpp - src/d/actor/d_a_e_yr.cpp - src/d/actor/d_a_e_zh.cpp - src/d/actor/d_a_e_zm.cpp - src/d/actor/d_a_e_zs.cpp - src/d/actor/d_a_formation_mng.cpp - src/d/actor/d_a_guard_mng.cpp - src/d/actor/d_a_horse.cpp - src/d/actor/d_a_hozelda.cpp - src/d/actor/d_a_izumi_gate.cpp - src/d/actor/d_a_kago.cpp - src/d/actor/d_a_kytag01.cpp - src/d/actor/d_a_kytag02.cpp - src/d/actor/d_a_kytag03.cpp - src/d/actor/d_a_kytag06.cpp - src/d/actor/d_a_kytag07.cpp - src/d/actor/d_a_kytag08.cpp - src/d/actor/d_a_kytag09.cpp - src/d/actor/d_a_kytag12.cpp - src/d/actor/d_a_kytag13.cpp - src/d/actor/d_a_kytag15.cpp - src/d/actor/d_a_kytag16.cpp - src/d/actor/d_a_mant.cpp - src/d/actor/d_a_mg_fshop.cpp - src/d/actor/d_a_mirror.cpp - src/d/actor/d_a_movie_player.cpp - src/d/actor/d_a_myna.cpp - src/d/actor/d_a_ni.cpp - src/d/actor/d_a_npc_aru.cpp - src/d/actor/d_a_npc_ash.cpp - src/d/actor/d_a_npc_ashB.cpp - src/d/actor/d_a_npc_bans.cpp - src/d/actor/d_a_npc_blue_ns.cpp - src/d/actor/d_a_npc_bou.cpp - src/d/actor/d_a_npc_bouS.cpp - src/d/actor/d_a_npc_cdn3.cpp - src/d/actor/d_a_npc_chat.cpp - src/d/actor/d_a_npc_chin.cpp - src/d/actor/d_a_npc_clerka.cpp - src/d/actor/d_a_npc_clerkb.cpp - src/d/actor/d_a_npc_clerkt.cpp - src/d/actor/d_a_npc_coach.cpp - src/d/actor/d_a_npc_df.cpp - src/d/actor/d_a_npc_doc.cpp - src/d/actor/d_a_npc_doorboy.cpp - src/d/actor/d_a_npc_drainSol.cpp - src/d/actor/d_a_npc_du.cpp - src/d/actor/d_a_npc_fairy.cpp - src/d/actor/d_a_npc_fguard.cpp - src/d/actor/d_a_npc_gnd.cpp - src/d/actor/d_a_npc_gra.cpp - src/d/actor/d_a_npc_grc.cpp - src/d/actor/d_a_npc_grd.cpp - src/d/actor/d_a_npc_grm.cpp - src/d/actor/d_a_npc_grmc.cpp - src/d/actor/d_a_npc_gro.cpp - src/d/actor/d_a_npc_grr.cpp - src/d/actor/d_a_npc_grs.cpp - src/d/actor/d_a_npc_grz.cpp - src/d/actor/d_a_npc_guard.cpp - src/d/actor/d_a_npc_gwolf.cpp - src/d/actor/d_a_npc_hanjo.cpp - src/d/actor/d_a_npc_henna0.cpp - src/d/actor/d_a_npc_hoz.cpp - src/d/actor/d_a_npc_impal.cpp - src/d/actor/d_a_npc_inko.cpp - src/d/actor/d_a_npc_ins.cpp - src/d/actor/d_a_npc_jagar.cpp - src/d/actor/d_a_npc_kasi_hana.cpp - src/d/actor/d_a_npc_kasi_kyu.cpp - src/d/actor/d_a_npc_kasi_mich.cpp - src/d/actor/d_a_npc_kdk.cpp - src/d/actor/d_a_npc_kn.cpp - src/d/actor/d_a_npc_knj.cpp - src/d/actor/d_a_npc_kolinb.cpp - src/d/actor/d_a_npc_ks.cpp - src/d/actor/d_a_npc_kyury.cpp - src/d/actor/d_a_npc_len.cpp - src/d/actor/d_a_npc_lf.cpp - src/d/actor/d_a_npc_lud.cpp - src/d/actor/d_a_npc_midp.cpp - src/d/actor/d_a_npc_mk.cpp - src/d/actor/d_a_npc_moi.cpp - src/d/actor/d_a_npc_moir.cpp - src/d/actor/d_a_npc_myna2.cpp - src/d/actor/d_a_npc_ne.cpp - src/d/actor/d_a_npc_p2.cpp - src/d/actor/d_a_npc_pachi_besu.cpp - src/d/actor/d_a_npc_pachi_maro.cpp - src/d/actor/d_a_npc_pachi_taro.cpp - src/d/actor/d_a_npc_passer.cpp - src/d/actor/d_a_npc_passer2.cpp - src/d/actor/d_a_npc_post.cpp - src/d/actor/d_a_npc_pouya.cpp - src/d/actor/d_a_npc_prayer.cpp - src/d/actor/d_a_npc_raca.cpp - src/d/actor/d_a_npc_rafrel.cpp - src/d/actor/d_a_npc_saru.cpp - src/d/actor/d_a_npc_seib.cpp - src/d/actor/d_a_npc_seic.cpp - src/d/actor/d_a_npc_seid.cpp - src/d/actor/d_a_npc_seira.cpp - src/d/actor/d_a_npc_seira2.cpp - src/d/actor/d_a_npc_seirei.cpp - src/d/actor/d_a_npc_shad.cpp - src/d/actor/d_a_npc_shaman.cpp - src/d/actor/d_a_npc_shoe.cpp - src/d/actor/d_a_npc_shop0.cpp - src/d/actor/d_a_npc_shop_maro.cpp - src/d/actor/d_a_npc_sola.cpp - src/d/actor/d_a_npc_soldierA.cpp - src/d/actor/d_a_npc_soldierB.cpp - src/d/actor/d_a_npc_sq.cpp - src/d/actor/d_a_npc_the.cpp - src/d/actor/d_a_npc_theB.cpp - src/d/actor/d_a_npc_tk.cpp - src/d/actor/d_a_npc_tkc.cpp - src/d/actor/d_a_npc_tkj2.cpp - src/d/actor/d_a_npc_tks.cpp - src/d/actor/d_a_npc_toby.cpp - src/d/actor/d_a_npc_tr.cpp - src/d/actor/d_a_npc_uri.cpp - src/d/actor/d_a_npc_worm.cpp - src/d/actor/d_a_npc_wrestler.cpp - src/d/actor/d_a_npc_yamid.cpp - src/d/actor/d_a_npc_yamis.cpp - src/d/actor/d_a_npc_yamit.cpp - src/d/actor/d_a_npc_yelia.cpp - src/d/actor/d_a_npc_ykm.cpp - src/d/actor/d_a_npc_ykw.cpp - src/d/actor/d_a_npc_zanb.cpp - src/d/actor/d_a_npc_zant.cpp - src/d/actor/d_a_npc_zelR.cpp - src/d/actor/d_a_npc_zelRo.cpp - src/d/actor/d_a_npc_zelda.cpp - src/d/actor/d_a_npc_zra.cpp - src/d/actor/d_a_npc_zrc.cpp - src/d/actor/d_a_npc_zrz.cpp - src/d/actor/d_a_obj_Lv5Key.cpp - src/d/actor/d_a_obj_Turara.cpp - src/d/actor/d_a_obj_TvCdlst.cpp - src/d/actor/d_a_obj_Y_taihou.cpp - src/d/actor/d_a_obj_amiShutter.cpp - src/d/actor/d_a_obj_ari.cpp - src/d/actor/d_a_obj_automata.cpp - src/d/actor/d_a_obj_avalanche.cpp - src/d/actor/d_a_obj_balloon.cpp - src/d/actor/d_a_obj_barDesk.cpp - src/d/actor/d_a_obj_batta.cpp - src/d/actor/d_a_obj_bbox.cpp - src/d/actor/d_a_obj_bed.cpp - src/d/actor/d_a_obj_bemos.cpp - src/d/actor/d_a_obj_bhbridge.cpp - src/d/actor/d_a_obj_bk_leaf.cpp - src/d/actor/d_a_obj_bky_rock.cpp - src/d/actor/d_a_obj_bmWindow.cpp - src/d/actor/d_a_obj_bmshutter.cpp - src/d/actor/d_a_obj_bombf.cpp - src/d/actor/d_a_obj_boumato.cpp - src/d/actor/d_a_obj_brg.cpp - src/d/actor/d_a_obj_bsGate.cpp - src/d/actor/d_a_obj_bubblePilar.cpp - src/d/actor/d_a_obj_catdoor.cpp - src/d/actor/d_a_obj_cb.cpp - src/d/actor/d_a_obj_cblock.cpp - src/d/actor/d_a_obj_cdoor.cpp - src/d/actor/d_a_obj_chandelier.cpp - src/d/actor/d_a_obj_chest.cpp - src/d/actor/d_a_obj_cho.cpp - src/d/actor/d_a_obj_cowdoor.cpp - src/d/actor/d_a_obj_crope.cpp - src/d/actor/d_a_obj_crvfence.cpp - src/d/actor/d_a_obj_crvgate.cpp - src/d/actor/d_a_obj_crvhahen.cpp - src/d/actor/d_a_obj_crvlh_down.cpp - src/d/actor/d_a_obj_crvlh_up.cpp - src/d/actor/d_a_obj_crvsteel.cpp - src/d/actor/d_a_obj_crystal.cpp - src/d/actor/d_a_obj_cwall.cpp - src/d/actor/d_a_obj_damCps.cpp - src/d/actor/d_a_obj_dan.cpp - src/d/actor/d_a_obj_digholl.cpp - src/d/actor/d_a_obj_digsnow.cpp - src/d/actor/d_a_obj_dmelevator.cpp - src/d/actor/d_a_obj_drop.cpp - src/d/actor/d_a_obj_dust.cpp - src/d/actor/d_a_obj_enemy_create.cpp - src/d/actor/d_a_obj_fallobj.cpp - src/d/actor/d_a_obj_fan.cpp - src/d/actor/d_a_obj_fchain.cpp - src/d/actor/d_a_obj_fireWood.cpp - src/d/actor/d_a_obj_fireWood2.cpp - src/d/actor/d_a_obj_firepillar.cpp - src/d/actor/d_a_obj_firepillar2.cpp - src/d/actor/d_a_obj_flag.cpp - src/d/actor/d_a_obj_flag2.cpp - src/d/actor/d_a_obj_flag3.cpp - src/d/actor/d_a_obj_food.cpp - src/d/actor/d_a_obj_fw.cpp - src/d/actor/d_a_obj_gadget.cpp - src/d/actor/d_a_obj_ganonwall.cpp - src/d/actor/d_a_obj_ganonwall2.cpp - src/d/actor/d_a_obj_gb.cpp - src/d/actor/d_a_obj_geyser.cpp - src/d/actor/d_a_obj_glowSphere.cpp - src/d/actor/d_a_obj_gm.cpp - src/d/actor/d_a_obj_goGate.cpp - src/d/actor/d_a_obj_gomikabe.cpp - src/d/actor/d_a_obj_gra2.cpp - src/d/actor/d_a_obj_graWall.cpp - src/d/actor/d_a_obj_gra_rock.cpp - src/d/actor/d_a_obj_grave_stone.cpp - src/d/actor/d_a_obj_groundwater.cpp - src/d/actor/d_a_obj_grz_rock.cpp - src/d/actor/d_a_obj_h_saku.cpp - src/d/actor/d_a_obj_hakai_brl.cpp - src/d/actor/d_a_obj_hakai_ftr.cpp - src/d/actor/d_a_obj_hasu2.cpp - src/d/actor/d_a_obj_hata.cpp - src/d/actor/d_a_obj_hb.cpp - src/d/actor/d_a_obj_hbombkoya.cpp - src/d/actor/d_a_obj_heavySw.cpp - src/d/actor/d_a_obj_hfuta.cpp - src/d/actor/d_a_obj_hsTarget.cpp - src/d/actor/d_a_obj_ice_l.cpp - src/d/actor/d_a_obj_ice_s.cpp - src/d/actor/d_a_obj_iceblock.cpp - src/d/actor/d_a_obj_iceleaf.cpp - src/d/actor/d_a_obj_ihasi.cpp - src/d/actor/d_a_obj_ikada.cpp - src/d/actor/d_a_obj_inobone.cpp - src/d/actor/d_a_obj_ita.cpp - src/d/actor/d_a_obj_itamato.cpp - src/d/actor/d_a_obj_kabuto.cpp - src/d/actor/d_a_obj_kag.cpp - src/d/actor/d_a_obj_kage.cpp - src/d/actor/d_a_obj_kago.cpp - src/d/actor/d_a_obj_kaisou.cpp - src/d/actor/d_a_obj_kamakiri.cpp - src/d/actor/d_a_obj_kantera.cpp - src/d/actor/d_a_obj_katatsumuri.cpp - src/d/actor/d_a_obj_kazeneko.cpp - src/d/actor/d_a_obj_kbox.cpp - src/d/actor/d_a_obj_key.cpp - src/d/actor/d_a_obj_keyhole.cpp - src/d/actor/d_a_obj_ki.cpp - src/d/actor/d_a_obj_kiPot.cpp - src/d/actor/d_a_obj_kita.cpp - src/d/actor/d_a_obj_kjgjs.cpp - src/d/actor/d_a_obj_kkanban.cpp - src/d/actor/d_a_obj_knBullet.cpp - src/d/actor/d_a_obj_kshutter.cpp - src/d/actor/d_a_obj_kuwagata.cpp - src/d/actor/d_a_obj_kwheel00.cpp - src/d/actor/d_a_obj_kwheel01.cpp - src/d/actor/d_a_obj_kznkarm.cpp - src/d/actor/d_a_obj_laundry.cpp - src/d/actor/d_a_obj_laundry_rope.cpp - src/d/actor/d_a_obj_lbox.cpp - src/d/actor/d_a_obj_lp.cpp - src/d/actor/d_a_obj_lv1Candle00.cpp - src/d/actor/d_a_obj_lv1Candle01.cpp - src/d/actor/d_a_obj_lv3Candle.cpp - src/d/actor/d_a_obj_lv3Water.cpp - src/d/actor/d_a_obj_lv3Water2.cpp - src/d/actor/d_a_obj_lv3WaterB.cpp - src/d/actor/d_a_obj_lv3saka00.cpp - src/d/actor/d_a_obj_lv3waterEff.cpp - src/d/actor/d_a_obj_lv4CandleDemoTag.cpp - src/d/actor/d_a_obj_lv4CandleTag.cpp - src/d/actor/d_a_obj_lv4EdShutter.cpp - src/d/actor/d_a_obj_lv4Gate.cpp - src/d/actor/d_a_obj_lv4HsTarget.cpp - src/d/actor/d_a_obj_lv4PoGate.cpp - src/d/actor/d_a_obj_lv4RailWall.cpp - src/d/actor/d_a_obj_lv4SlideWall.cpp - src/d/actor/d_a_obj_lv4bridge.cpp - src/d/actor/d_a_obj_lv4chandelier.cpp - src/d/actor/d_a_obj_lv4digsand.cpp - src/d/actor/d_a_obj_lv4floor.cpp - src/d/actor/d_a_obj_lv4gear.cpp - src/d/actor/d_a_obj_lv4prelvtr.cpp - src/d/actor/d_a_obj_lv4prwall.cpp - src/d/actor/d_a_obj_lv4sand.cpp - src/d/actor/d_a_obj_lv5FloorBoard.cpp - src/d/actor/d_a_obj_lv5IceWall.cpp - src/d/actor/d_a_obj_lv5SwIce.cpp - src/d/actor/d_a_obj_lv5ychndlr.cpp - src/d/actor/d_a_obj_lv5yiblltray.cpp - src/d/actor/d_a_obj_lv6ChangeGate.cpp - src/d/actor/d_a_obj_lv6FurikoTrap.cpp - src/d/actor/d_a_obj_lv6Lblock.cpp - src/d/actor/d_a_obj_lv6SwGate.cpp - src/d/actor/d_a_obj_lv6SzGate.cpp - src/d/actor/d_a_obj_lv6Tenbin.cpp - src/d/actor/d_a_obj_lv6TogeRoll.cpp - src/d/actor/d_a_obj_lv6TogeTrap.cpp - src/d/actor/d_a_obj_lv6bemos.cpp - src/d/actor/d_a_obj_lv6bemos2.cpp - src/d/actor/d_a_obj_lv6egate.cpp - src/d/actor/d_a_obj_lv6elevta.cpp - src/d/actor/d_a_obj_lv6swturn.cpp - src/d/actor/d_a_obj_lv7BsGate.cpp - src/d/actor/d_a_obj_lv7PropellerY.cpp - src/d/actor/d_a_obj_lv7bridge.cpp - src/d/actor/d_a_obj_lv8KekkaiTrap.cpp - src/d/actor/d_a_obj_lv8Lift.cpp - src/d/actor/d_a_obj_lv8OptiLift.cpp - src/d/actor/d_a_obj_lv8UdFloor.cpp - src/d/actor/d_a_obj_lv9SwShutter.cpp - src/d/actor/d_a_obj_magLift.cpp - src/d/actor/d_a_obj_magLiftRot.cpp - src/d/actor/d_a_obj_maki.cpp - src/d/actor/d_a_obj_master_sword.cpp - src/d/actor/d_a_obj_mato.cpp - src/d/actor/d_a_obj_mhole.cpp - src/d/actor/d_a_obj_mie.cpp - src/d/actor/d_a_obj_mirror_6pole.cpp - src/d/actor/d_a_obj_mirror_chain.cpp - src/d/actor/d_a_obj_mirror_sand.cpp - src/d/actor/d_a_obj_mirror_screw.cpp - src/d/actor/d_a_obj_mirror_table.cpp - src/d/actor/d_a_obj_msima.cpp - src/d/actor/d_a_obj_mvstair.cpp - src/d/actor/d_a_obj_myogan.cpp - src/d/actor/d_a_obj_nagaisu.cpp - src/d/actor/d_a_obj_nan.cpp - src/d/actor/d_a_obj_ndoor.cpp - src/d/actor/d_a_obj_nougu.cpp - src/d/actor/d_a_obj_octhashi.cpp - src/d/actor/d_a_obj_oiltubo.cpp - src/d/actor/d_a_obj_onsen.cpp - src/d/actor/d_a_obj_onsenFire.cpp - src/d/actor/d_a_obj_onsenTaru.cpp - src/d/actor/d_a_obj_pdoor.cpp - src/d/actor/d_a_obj_pdtile.cpp - src/d/actor/d_a_obj_pdwall.cpp - src/d/actor/d_a_obj_picture.cpp - src/d/actor/d_a_obj_pillar.cpp - src/d/actor/d_a_obj_pleaf.cpp - src/d/actor/d_a_obj_poCandle.cpp - src/d/actor/d_a_obj_poFire.cpp - src/d/actor/d_a_obj_poTbox.cpp - src/d/actor/d_a_obj_prop.cpp - src/d/actor/d_a_obj_pumpkin.cpp - src/d/actor/d_a_obj_rcircle.cpp - src/d/actor/d_a_obj_rfHole.cpp - src/d/actor/d_a_obj_rgate.cpp - src/d/actor/d_a_obj_riverrock.cpp - src/d/actor/d_a_obj_rock.cpp - src/d/actor/d_a_obj_rotBridge.cpp - src/d/actor/d_a_obj_rotTrap.cpp - src/d/actor/d_a_obj_roten.cpp - src/d/actor/d_a_obj_rstair.cpp - src/d/actor/d_a_obj_rw.cpp - src/d/actor/d_a_obj_saidan.cpp - src/d/actor/d_a_obj_sakuita.cpp - src/d/actor/d_a_obj_sakuita_rope.cpp - src/d/actor/d_a_obj_scannon.cpp - src/d/actor/d_a_obj_scannon_crs.cpp - src/d/actor/d_a_obj_scannon_ten.cpp - src/d/actor/d_a_obj_sekidoor.cpp - src/d/actor/d_a_obj_sekizo.cpp - src/d/actor/d_a_obj_sekizoa.cpp - src/d/actor/d_a_obj_shield.cpp - src/d/actor/d_a_obj_sm_door.cpp - src/d/actor/d_a_obj_smallkey.cpp - src/d/actor/d_a_obj_smgdoor.cpp - src/d/actor/d_a_obj_smoke.cpp - src/d/actor/d_a_obj_smtile.cpp - src/d/actor/d_a_obj_smw_stone.cpp - src/d/actor/d_a_obj_snowEffTag.cpp - src/d/actor/d_a_obj_snow_soup.cpp - src/d/actor/d_a_obj_so.cpp - src/d/actor/d_a_obj_spinLift.cpp - src/d/actor/d_a_obj_ss_drink.cpp - src/d/actor/d_a_obj_ss_item.cpp - src/d/actor/d_a_obj_stairBlock.cpp - src/d/actor/d_a_obj_stone.cpp - src/d/actor/d_a_obj_stopper.cpp - src/d/actor/d_a_obj_stopper2.cpp - src/d/actor/d_a_obj_suisya.cpp - src/d/actor/d_a_obj_sw.cpp - src/d/actor/d_a_obj_swBallA.cpp - src/d/actor/d_a_obj_swBallB.cpp - src/d/actor/d_a_obj_swBallC.cpp - src/d/actor/d_a_obj_swLight.cpp - src/d/actor/d_a_obj_swchain.cpp - src/d/actor/d_a_obj_swhang.cpp - src/d/actor/d_a_obj_sword.cpp - src/d/actor/d_a_obj_swpush2.cpp - src/d/actor/d_a_obj_swspinner.cpp - src/d/actor/d_a_obj_swturn.cpp - src/d/actor/d_a_obj_syRock.cpp - src/d/actor/d_a_obj_szbridge.cpp - src/d/actor/d_a_obj_taFence.cpp - src/d/actor/d_a_obj_table.cpp - src/d/actor/d_a_obj_takaraDai.cpp - src/d/actor/d_a_obj_tatigi.cpp - src/d/actor/d_a_obj_ten.cpp - src/d/actor/d_a_obj_testcube.cpp - src/d/actor/d_a_obj_tgake.cpp - src/d/actor/d_a_obj_thashi.cpp - src/d/actor/d_a_obj_thdoor.cpp - src/d/actor/d_a_obj_timeFire.cpp - src/d/actor/d_a_obj_tks.cpp - src/d/actor/d_a_obj_tmoon.cpp - src/d/actor/d_a_obj_toaru_maki.cpp - src/d/actor/d_a_obj_toby.cpp - src/d/actor/d_a_obj_tobyhouse.cpp - src/d/actor/d_a_obj_togeTrap.cpp - src/d/actor/d_a_obj_tombo.cpp - src/d/actor/d_a_obj_tornado.cpp - src/d/actor/d_a_obj_tornado2.cpp - src/d/actor/d_a_obj_tp.cpp - src/d/actor/d_a_obj_treesh.cpp - src/d/actor/d_a_obj_twGate.cpp - src/d/actor/d_a_obj_udoor.cpp - src/d/actor/d_a_obj_usaku.cpp - src/d/actor/d_a_obj_vground.cpp - src/d/actor/d_a_obj_volcball.cpp - src/d/actor/d_a_obj_volcbom.cpp - src/d/actor/d_a_obj_warp_kbrg.cpp - src/d/actor/d_a_obj_warp_obrg.cpp - src/d/actor/d_a_obj_waterGate.cpp - src/d/actor/d_a_obj_waterPillar.cpp - src/d/actor/d_a_obj_waterfall.cpp - src/d/actor/d_a_obj_wchain.cpp - src/d/actor/d_a_obj_wdStick.cpp - src/d/actor/d_a_obj_web0.cpp - src/d/actor/d_a_obj_web1.cpp - src/d/actor/d_a_obj_well_cover.cpp - src/d/actor/d_a_obj_wflag.cpp - src/d/actor/d_a_obj_wind_stone.cpp - src/d/actor/d_a_obj_window.cpp - src/d/actor/d_a_obj_wood_pendulum.cpp - src/d/actor/d_a_obj_wood_statue.cpp - src/d/actor/d_a_obj_wsword.cpp - src/d/actor/d_a_obj_yel_bag.cpp - src/d/actor/d_a_obj_ystone.cpp - src/d/actor/d_a_obj_zcloth.cpp - src/d/actor/d_a_obj_zdoor.cpp - src/d/actor/d_a_obj_zrTurara.cpp - src/d/actor/d_a_obj_zrTuraraRock.cpp - src/d/actor/d_a_obj_zraMark.cpp - src/d/actor/d_a_obj_zra_freeze.cpp - src/d/actor/d_a_obj_zra_rock.cpp - src/d/actor/d_a_passer_mng.cpp - src/d/actor/d_a_tag_arena.cpp - src/d/actor/d_a_peru.cpp - src/d/actor/d_a_ppolamp.cpp - src/d/actor/d_a_skip_2D.cpp - src/d/actor/d_a_startAndGoal.cpp - src/d/actor/d_a_swBall.cpp - src/d/actor/d_a_swLBall.cpp - src/d/actor/d_a_swTime.cpp - src/d/actor/d_a_tag_Lv6Gate.cpp - src/d/actor/d_a_tag_Lv7Gate.cpp - src/d/actor/d_a_tag_Lv8Gate.cpp - src/d/actor/d_a_tag_TWgate.cpp - src/d/actor/d_a_tag_lv6CstaSw.cpp - src/d/actor/d_a_tag_assistance.cpp - src/d/actor/d_a_tag_bottle_item.cpp - src/d/actor/d_a_tag_chgrestart.cpp - src/d/actor/d_a_tag_csw.cpp - src/d/actor/d_a_tag_escape.cpp - src/d/actor/d_a_tag_firewall.cpp - src/d/actor/d_a_tag_gra.cpp - src/d/actor/d_a_tag_guard.cpp - src/d/actor/d_a_tag_instruction.cpp - src/d/actor/d_a_tag_kago_fall.cpp - src/d/actor/d_a_tag_lightball.cpp - src/d/actor/d_a_tag_lv5soup.cpp - src/d/actor/d_a_tag_mmsg.cpp - src/d/actor/d_a_tag_mwait.cpp - src/d/actor/d_a_tag_myna2.cpp - src/d/actor/d_a_tag_myna_light.cpp - src/d/actor/d_a_tag_pachi.cpp - src/d/actor/d_a_tag_poFire.cpp - src/d/actor/d_a_tag_qs.cpp - src/d/actor/d_a_tag_ret_room.cpp - src/d/actor/d_a_tag_river_back.cpp - src/d/actor/d_a_tag_rmbit_sw.cpp - src/d/actor/d_a_tag_schedule.cpp - src/d/actor/d_a_tag_setBall.cpp - src/d/actor/d_a_tag_setrestart.cpp - src/d/actor/d_a_tag_shop_camera.cpp - src/d/actor/d_a_tag_shop_item.cpp - src/d/actor/d_a_tag_smk_emt.cpp - src/d/actor/d_a_tag_spinner.cpp - src/d/actor/d_a_tag_sppath.cpp - src/d/actor/d_a_tag_ss_drink.cpp - src/d/actor/d_a_tag_stream.cpp - src/d/actor/d_a_tag_theB_hint.cpp - src/d/actor/d_a_tag_wara_howl.cpp - src/d/actor/d_a_tag_watchge.cpp - src/d/actor/d_a_tag_waterfall.cpp - src/d/actor/d_a_tag_wljump.cpp - src/d/actor/d_a_tag_yami.cpp - src/d/actor/d_a_talk.cpp - src/d/actor/d_a_tboxSw.cpp - src/d/actor/d_a_title.cpp - src/d/actor/d_a_warp_bug.cpp + src/f_pc/f_pc_profile_lst.cpp + src/d/actor/d_a_andsw.cpp + src/d/actor/d_a_bg.cpp + src/d/actor/d_a_bg_obj.cpp + src/d/actor/d_a_dmidna.cpp + src/d/actor/d_a_door_dbdoor00.cpp + src/d/actor/d_a_door_knob00.cpp + src/d/actor/d_a_door_shutter.cpp + src/d/actor/d_a_door_spiral.cpp + src/d/actor/d_a_dshutter.cpp + src/d/actor/d_a_ep.cpp + src/d/actor/d_a_hitobj.cpp + src/d/actor/d_a_kytag00.cpp + src/d/actor/d_a_kytag04.cpp + src/d/actor/d_a_kytag17.cpp + src/d/actor/d_a_obj_brakeeff.cpp + src/d/actor/d_a_obj_burnbox.cpp + src/d/actor/d_a_obj_carry.cpp + src/d/actor/d_a_obj_ito.cpp + src/d/actor/d_a_obj_movebox.cpp + src/d/actor/d_a_obj_swpush.cpp + src/d/actor/d_a_obj_timer.cpp + src/d/actor/d_a_path_line.cpp + src/d/actor/d_a_scene_exit.cpp + src/d/actor/d_a_set_bgobj.cpp + src/d/actor/d_a_swhit0.cpp + src/d/actor/d_a_tag_allmato.cpp + src/d/actor/d_a_tag_camera.cpp + src/d/actor/d_a_tag_chkpoint.cpp + src/d/actor/d_a_tag_event.cpp + src/d/actor/d_a_tag_evt.cpp + src/d/actor/d_a_tag_evtarea.cpp + src/d/actor/d_a_tag_evtmsg.cpp + src/d/actor/d_a_tag_howl.cpp + src/d/actor/d_a_tag_kmsg.cpp + src/d/actor/d_a_tag_lantern.cpp + src/d/actor/d_a_tag_mist.cpp + src/d/actor/d_a_tag_msg.cpp + src/d/actor/d_a_tag_push.cpp + src/d/actor/d_a_tag_telop.cpp + src/d/actor/d_a_tbox.cpp + src/d/actor/d_a_tbox2.cpp + src/d/actor/d_a_vrbox.cpp + src/d/actor/d_a_vrbox2.cpp + src/d/actor/d_a_arrow.cpp + src/d/actor/d_a_boomerang.cpp + src/d/actor/d_a_crod.cpp + src/d/actor/d_a_demo00.cpp + src/d/actor/d_a_disappear.cpp + src/d/actor/d_a_mg_rod.cpp + src/d/actor/d_a_midna.cpp + src/d/actor/d_a_nbomb.cpp + src/d/actor/d_a_obj_life_container.cpp + src/d/actor/d_a_obj_yousei.cpp + src/d/actor/d_a_spinner.cpp + src/d/actor/d_a_suspend.cpp + src/d/actor/d_a_tag_attention.cpp + src/d/actor/d_a_alldie.cpp + src/d/actor/d_a_andsw2.cpp + src/d/actor/d_a_bd.cpp + src/d/actor/d_a_canoe.cpp + src/d/actor/d_a_cstaF.cpp + src/d/actor/d_a_demo_item.cpp + src/d/actor/d_a_door_bossL1.cpp + src/d/actor/d_a_e_dn.cpp + src/d/actor/d_a_e_fm.cpp + src/d/actor/d_a_e_ga.cpp + src/d/actor/d_a_e_hb.cpp + src/d/actor/d_a_e_nest.cpp + src/d/actor/d_a_e_rd.cpp + src/d/actor/d_a_econt.cpp + src/d/actor/d_a_fr.cpp + src/d/actor/d_a_grass.cpp + src/d/actor/d_a_kytag05.cpp + src/d/actor/d_a_kytag10.cpp + src/d/actor/d_a_kytag11.cpp + src/d/actor/d_a_kytag14.cpp + src/d/actor/d_a_mg_fish.cpp + src/d/actor/d_a_npc_besu.cpp + src/d/actor/d_a_npc_fairy_seirei.cpp + src/d/actor/d_a_npc_fish.cpp + src/d/actor/d_a_npc_henna.cpp + src/d/actor/d_a_npc_kakashi.cpp + src/d/actor/d_a_npc_kkri.cpp + src/d/actor/d_a_npc_kolin.cpp + src/d/actor/d_a_npc_maro.cpp + src/d/actor/d_a_npc_taro.cpp + src/d/actor/d_a_npc_tkj.cpp + src/d/actor/d_a_obj_bhashi.cpp + src/d/actor/d_a_obj_bkdoor.cpp + src/d/actor/d_a_obj_bosswarp.cpp + src/d/actor/d_a_obj_cboard.cpp + src/d/actor/d_a_obj_digplace.cpp + src/d/actor/d_a_obj_eff.cpp + src/d/actor/d_a_obj_fmobj.cpp + src/d/actor/d_a_obj_gpTaru.cpp + src/d/actor/d_a_obj_hhashi.cpp + src/d/actor/d_a_obj_kanban2.cpp + src/d/actor/d_a_obj_kbacket.cpp + src/d/actor/d_a_obj_kgate.cpp + src/d/actor/d_a_obj_klift00.cpp + src/d/actor/d_a_obj_ktOnFire.cpp + src/d/actor/d_a_obj_ladder.cpp + src/d/actor/d_a_obj_lv2Candle.cpp + src/d/actor/d_a_obj_magne_arm.cpp + src/d/actor/d_a_obj_metalbox.cpp + src/d/actor/d_a_obj_mgate.cpp + src/d/actor/d_a_obj_nameplate.cpp + src/d/actor/d_a_obj_ornament_cloth.cpp + src/d/actor/d_a_obj_rope_bridge.cpp + src/d/actor/d_a_obj_sWallShutter.cpp + src/d/actor/d_a_obj_stick.cpp + src/d/actor/d_a_obj_stoneMark.cpp + src/d/actor/d_a_obj_swpropeller.cpp + src/d/actor/d_a_obj_swpush5.cpp + src/d/actor/d_a_obj_yobikusa.cpp + src/d/actor/d_a_scene_exit2.cpp + src/d/actor/d_a_shop_item.cpp + src/d/actor/d_a_sq.cpp + src/d/actor/d_a_swc00.cpp + src/d/actor/d_a_tag_CstaSw.cpp + src/d/actor/d_a_tag_ajnot.cpp + src/d/actor/d_a_tag_attack_item.cpp + src/d/actor/d_a_tag_gstart.cpp + src/d/actor/d_a_tag_hinit.cpp + src/d/actor/d_a_tag_hjump.cpp + src/d/actor/d_a_tag_hstop.cpp + src/d/actor/d_a_tag_lv2prchk.cpp + src/d/actor/d_a_tag_magne.cpp + src/d/actor/d_a_tag_mhint.cpp + src/d/actor/d_a_tag_mstop.cpp + src/d/actor/d_a_tag_spring.cpp + src/d/actor/d_a_tag_statue_evt.cpp + src/d/actor/d_a_ykgr.cpp + src/d/actor/d_a_L7demo_dr.cpp + src/d/actor/d_a_L7low_dr.cpp + src/d/actor/d_a_L7op_demo_dr.cpp + src/d/actor/d_a_b_bh.cpp + src/d/actor/d_a_b_bq.cpp + src/d/actor/d_a_b_dr.cpp + src/d/actor/d_a_b_dre.cpp + src/d/actor/d_a_b_ds.cpp + src/d/actor/d_a_b_gg.cpp + src/d/actor/d_a_b_gm.cpp + src/d/actor/d_a_b_gnd.cpp + src/d/actor/d_a_b_go.cpp + src/d/actor/d_a_b_gos.cpp + src/d/actor/d_a_b_mgn.cpp + src/d/actor/d_a_b_ob.cpp + src/d/actor/d_a_b_oh.cpp + src/d/actor/d_a_b_oh2.cpp + src/d/actor/d_a_b_tn.cpp + src/d/actor/d_a_b_yo.cpp + src/d/actor/d_a_b_yo_ice.cpp + src/d/actor/d_a_b_zant.cpp + src/d/actor/d_a_b_zant_magic.cpp + src/d/actor/d_a_b_zant_mobile.cpp + src/d/actor/d_a_b_zant_sima.cpp + src/d/actor/d_a_balloon_2D.cpp + src/d/actor/d_a_bullet.cpp + src/d/actor/d_a_coach_2D.cpp + src/d/actor/d_a_coach_fire.cpp + src/d/actor/d_a_cow.cpp + src/d/actor/d_a_cstatue.cpp + src/d/actor/d_a_do.cpp + src/d/actor/d_a_door_boss.cpp + src/d/actor/d_a_door_bossL5.cpp + src/d/actor/d_a_door_mbossL1.cpp + src/d/actor/d_a_door_push.cpp + src/d/actor/d_a_e_ai.cpp + src/d/actor/d_a_e_arrow.cpp + src/d/actor/d_a_e_ba.cpp + src/d/actor/d_a_e_bee.cpp + src/d/actor/d_a_e_bg.cpp + src/d/actor/d_a_e_bi.cpp + src/d/actor/d_a_e_bi_leaf.cpp + src/d/actor/d_a_e_bs.cpp + src/d/actor/d_a_e_bu.cpp + src/d/actor/d_a_e_bug.cpp + src/d/actor/d_a_e_cr.cpp + src/d/actor/d_a_e_cr_egg.cpp + src/d/actor/d_a_e_db.cpp + src/d/actor/d_a_e_db_leaf.cpp + src/d/actor/d_a_e_dd.cpp + src/d/actor/d_a_e_df.cpp + src/d/actor/d_a_e_dk.cpp + src/d/actor/d_a_e_dt.cpp + src/d/actor/d_a_e_fb.cpp + src/d/actor/d_a_e_fk.cpp + src/d/actor/d_a_e_fs.cpp + src/d/actor/d_a_e_fz.cpp + src/d/actor/d_a_e_gb.cpp + src/d/actor/d_a_e_ge.cpp + src/d/actor/d_a_e_gi.cpp + src/d/actor/d_a_e_gm.cpp + src/d/actor/d_a_e_gob.cpp + src/d/actor/d_a_e_gs.cpp + src/d/actor/d_a_e_hb_leaf.cpp + src/d/actor/d_a_e_hm.cpp + src/d/actor/d_a_e_hp.cpp + src/d/actor/d_a_e_hz.cpp + src/d/actor/d_a_e_hzelda.cpp + src/d/actor/d_a_e_is.cpp + src/d/actor/d_a_e_kg.cpp + src/d/actor/d_a_e_kk.cpp + src/d/actor/d_a_e_kr.cpp + src/d/actor/d_a_e_mb.cpp + src/d/actor/d_a_e_md.cpp + src/d/actor/d_a_e_mf.cpp + src/d/actor/d_a_e_mk.cpp + src/d/actor/d_a_e_mk_bo.cpp + src/d/actor/d_a_e_mm.cpp + src/d/actor/d_a_e_mm_mt.cpp + src/d/actor/d_a_e_ms.cpp + src/d/actor/d_a_e_nz.cpp + src/d/actor/d_a_e_oc.cpp + src/d/actor/d_a_e_oct_bg.cpp + src/d/actor/d_a_e_ot.cpp + src/d/actor/d_a_e_ph.cpp + src/d/actor/d_a_e_pm.cpp + src/d/actor/d_a_e_po.cpp + src/d/actor/d_a_e_pz.cpp + src/d/actor/d_a_e_rb.cpp + src/d/actor/d_a_e_rdb.cpp + src/d/actor/d_a_e_rdy.cpp + src/d/actor/d_a_e_s1.cpp + src/d/actor/d_a_e_sb.cpp + src/d/actor/d_a_e_sf.cpp + src/d/actor/d_a_e_sg.cpp + src/d/actor/d_a_e_sh.cpp + src/d/actor/d_a_e_sm.cpp + src/d/actor/d_a_e_sm2.cpp + src/d/actor/d_a_e_st.cpp + src/d/actor/d_a_e_st_line.cpp + src/d/actor/d_a_e_sw.cpp + src/d/actor/d_a_e_th.cpp + src/d/actor/d_a_e_th_ball.cpp + src/d/actor/d_a_e_tk.cpp + src/d/actor/d_a_e_tk2.cpp + src/d/actor/d_a_e_tk_ball.cpp + src/d/actor/d_a_e_tt.cpp + src/d/actor/d_a_e_vt.cpp + src/d/actor/d_a_e_warpappear.cpp + src/d/actor/d_a_e_wb.cpp + src/d/actor/d_a_e_ws.cpp + src/d/actor/d_a_e_ww.cpp + src/d/actor/d_a_e_yc.cpp + src/d/actor/d_a_e_yd.cpp + src/d/actor/d_a_e_yd_leaf.cpp + src/d/actor/d_a_e_yg.cpp + src/d/actor/d_a_e_yh.cpp + src/d/actor/d_a_e_yk.cpp + src/d/actor/d_a_e_ym.cpp + src/d/actor/d_a_e_ym_tag.cpp + src/d/actor/d_a_e_ymb.cpp + src/d/actor/d_a_e_yr.cpp + src/d/actor/d_a_e_zh.cpp + src/d/actor/d_a_e_zm.cpp + src/d/actor/d_a_e_zs.cpp + src/d/actor/d_a_formation_mng.cpp + src/d/actor/d_a_guard_mng.cpp + src/d/actor/d_a_horse.cpp + src/d/actor/d_a_hozelda.cpp + src/d/actor/d_a_izumi_gate.cpp + src/d/actor/d_a_kago.cpp + src/d/actor/d_a_kytag01.cpp + src/d/actor/d_a_kytag02.cpp + src/d/actor/d_a_kytag03.cpp + src/d/actor/d_a_kytag06.cpp + src/d/actor/d_a_kytag07.cpp + src/d/actor/d_a_kytag08.cpp + src/d/actor/d_a_kytag09.cpp + src/d/actor/d_a_kytag12.cpp + src/d/actor/d_a_kytag13.cpp + src/d/actor/d_a_kytag15.cpp + src/d/actor/d_a_kytag16.cpp + src/d/actor/d_a_mant.cpp + src/d/actor/d_a_mg_fshop.cpp + src/d/actor/d_a_mirror.cpp + src/d/actor/d_a_movie_player.cpp + src/d/actor/d_a_myna.cpp + src/d/actor/d_a_ni.cpp + src/d/actor/d_a_npc_aru.cpp + src/d/actor/d_a_npc_ash.cpp + src/d/actor/d_a_npc_ashB.cpp + src/d/actor/d_a_npc_bans.cpp + src/d/actor/d_a_npc_blue_ns.cpp + src/d/actor/d_a_npc_bou.cpp + src/d/actor/d_a_npc_bouS.cpp + src/d/actor/d_a_npc_cdn3.cpp + src/d/actor/d_a_npc_chat.cpp + src/d/actor/d_a_npc_chin.cpp + src/d/actor/d_a_npc_clerka.cpp + src/d/actor/d_a_npc_clerkb.cpp + src/d/actor/d_a_npc_clerkt.cpp + src/d/actor/d_a_npc_coach.cpp + src/d/actor/d_a_npc_df.cpp + src/d/actor/d_a_npc_doc.cpp + src/d/actor/d_a_npc_doorboy.cpp + src/d/actor/d_a_npc_drainSol.cpp + src/d/actor/d_a_npc_du.cpp + src/d/actor/d_a_npc_fairy.cpp + src/d/actor/d_a_npc_fguard.cpp + src/d/actor/d_a_npc_gnd.cpp + src/d/actor/d_a_npc_gra.cpp + src/d/actor/d_a_npc_grc.cpp + src/d/actor/d_a_npc_grd.cpp + src/d/actor/d_a_npc_grm.cpp + src/d/actor/d_a_npc_grmc.cpp + src/d/actor/d_a_npc_gro.cpp + src/d/actor/d_a_npc_grr.cpp + src/d/actor/d_a_npc_grs.cpp + src/d/actor/d_a_npc_grz.cpp + src/d/actor/d_a_npc_guard.cpp + src/d/actor/d_a_npc_gwolf.cpp + src/d/actor/d_a_npc_hanjo.cpp + src/d/actor/d_a_npc_henna0.cpp + src/d/actor/d_a_npc_hoz.cpp + src/d/actor/d_a_npc_impal.cpp + src/d/actor/d_a_npc_inko.cpp + src/d/actor/d_a_npc_ins.cpp + src/d/actor/d_a_npc_jagar.cpp + src/d/actor/d_a_npc_kasi_hana.cpp + src/d/actor/d_a_npc_kasi_kyu.cpp + src/d/actor/d_a_npc_kasi_mich.cpp + src/d/actor/d_a_npc_kdk.cpp + src/d/actor/d_a_npc_kn.cpp + src/d/actor/d_a_npc_knj.cpp + src/d/actor/d_a_npc_kolinb.cpp + src/d/actor/d_a_npc_ks.cpp + src/d/actor/d_a_npc_kyury.cpp + src/d/actor/d_a_npc_len.cpp + src/d/actor/d_a_npc_lf.cpp + src/d/actor/d_a_npc_lud.cpp + src/d/actor/d_a_npc_midp.cpp + src/d/actor/d_a_npc_mk.cpp + src/d/actor/d_a_npc_moi.cpp + src/d/actor/d_a_npc_moir.cpp + src/d/actor/d_a_npc_myna2.cpp + src/d/actor/d_a_npc_ne.cpp + src/d/actor/d_a_npc_p2.cpp + src/d/actor/d_a_npc_pachi_besu.cpp + src/d/actor/d_a_npc_pachi_maro.cpp + src/d/actor/d_a_npc_pachi_taro.cpp + src/d/actor/d_a_npc_passer.cpp + src/d/actor/d_a_npc_passer2.cpp + src/d/actor/d_a_npc_post.cpp + src/d/actor/d_a_npc_pouya.cpp + src/d/actor/d_a_npc_prayer.cpp + src/d/actor/d_a_npc_raca.cpp + src/d/actor/d_a_npc_rafrel.cpp + src/d/actor/d_a_npc_saru.cpp + src/d/actor/d_a_npc_seib.cpp + src/d/actor/d_a_npc_seic.cpp + src/d/actor/d_a_npc_seid.cpp + src/d/actor/d_a_npc_seira.cpp + src/d/actor/d_a_npc_seira2.cpp + src/d/actor/d_a_npc_seirei.cpp + src/d/actor/d_a_npc_shad.cpp + src/d/actor/d_a_npc_shaman.cpp + src/d/actor/d_a_npc_shoe.cpp + src/d/actor/d_a_npc_shop0.cpp + src/d/actor/d_a_npc_shop_maro.cpp + src/d/actor/d_a_npc_sola.cpp + src/d/actor/d_a_npc_soldierA.cpp + src/d/actor/d_a_npc_soldierB.cpp + src/d/actor/d_a_npc_sq.cpp + src/d/actor/d_a_npc_the.cpp + src/d/actor/d_a_npc_theB.cpp + src/d/actor/d_a_npc_tk.cpp + src/d/actor/d_a_npc_tkc.cpp + src/d/actor/d_a_npc_tkj2.cpp + src/d/actor/d_a_npc_tks.cpp + src/d/actor/d_a_npc_toby.cpp + src/d/actor/d_a_npc_tr.cpp + src/d/actor/d_a_npc_uri.cpp + src/d/actor/d_a_npc_worm.cpp + src/d/actor/d_a_npc_wrestler.cpp + src/d/actor/d_a_npc_yamid.cpp + src/d/actor/d_a_npc_yamis.cpp + src/d/actor/d_a_npc_yamit.cpp + src/d/actor/d_a_npc_yelia.cpp + src/d/actor/d_a_npc_ykm.cpp + src/d/actor/d_a_npc_ykw.cpp + src/d/actor/d_a_npc_zanb.cpp + src/d/actor/d_a_npc_zant.cpp + src/d/actor/d_a_npc_zelR.cpp + src/d/actor/d_a_npc_zelRo.cpp + src/d/actor/d_a_npc_zelda.cpp + src/d/actor/d_a_npc_zra.cpp + src/d/actor/d_a_npc_zrc.cpp + src/d/actor/d_a_npc_zrz.cpp + src/d/actor/d_a_obj_Lv5Key.cpp + src/d/actor/d_a_obj_Turara.cpp + src/d/actor/d_a_obj_TvCdlst.cpp + src/d/actor/d_a_obj_Y_taihou.cpp + src/d/actor/d_a_obj_amiShutter.cpp + src/d/actor/d_a_obj_ari.cpp + src/d/actor/d_a_obj_automata.cpp + src/d/actor/d_a_obj_avalanche.cpp + src/d/actor/d_a_obj_balloon.cpp + src/d/actor/d_a_obj_barDesk.cpp + src/d/actor/d_a_obj_batta.cpp + src/d/actor/d_a_obj_bbox.cpp + src/d/actor/d_a_obj_bed.cpp + src/d/actor/d_a_obj_bemos.cpp + src/d/actor/d_a_obj_bhbridge.cpp + src/d/actor/d_a_obj_bk_leaf.cpp + src/d/actor/d_a_obj_bky_rock.cpp + src/d/actor/d_a_obj_bmWindow.cpp + src/d/actor/d_a_obj_bmshutter.cpp + src/d/actor/d_a_obj_bombf.cpp + src/d/actor/d_a_obj_boumato.cpp + src/d/actor/d_a_obj_brg.cpp + src/d/actor/d_a_obj_bsGate.cpp + src/d/actor/d_a_obj_bubblePilar.cpp + src/d/actor/d_a_obj_catdoor.cpp + src/d/actor/d_a_obj_cb.cpp + src/d/actor/d_a_obj_cblock.cpp + src/d/actor/d_a_obj_cdoor.cpp + src/d/actor/d_a_obj_chandelier.cpp + src/d/actor/d_a_obj_chest.cpp + src/d/actor/d_a_obj_cho.cpp + src/d/actor/d_a_obj_cowdoor.cpp + src/d/actor/d_a_obj_crope.cpp + src/d/actor/d_a_obj_crvfence.cpp + src/d/actor/d_a_obj_crvgate.cpp + src/d/actor/d_a_obj_crvhahen.cpp + src/d/actor/d_a_obj_crvlh_down.cpp + src/d/actor/d_a_obj_crvlh_up.cpp + src/d/actor/d_a_obj_crvsteel.cpp + src/d/actor/d_a_obj_crystal.cpp + src/d/actor/d_a_obj_cwall.cpp + src/d/actor/d_a_obj_damCps.cpp + src/d/actor/d_a_obj_dan.cpp + src/d/actor/d_a_obj_digholl.cpp + src/d/actor/d_a_obj_digsnow.cpp + src/d/actor/d_a_obj_dmelevator.cpp + src/d/actor/d_a_obj_drop.cpp + src/d/actor/d_a_obj_dust.cpp + src/d/actor/d_a_obj_enemy_create.cpp + src/d/actor/d_a_obj_fallobj.cpp + src/d/actor/d_a_obj_fan.cpp + src/d/actor/d_a_obj_fchain.cpp + src/d/actor/d_a_obj_fireWood.cpp + src/d/actor/d_a_obj_fireWood2.cpp + src/d/actor/d_a_obj_firepillar.cpp + src/d/actor/d_a_obj_firepillar2.cpp + src/d/actor/d_a_obj_flag.cpp + src/d/actor/d_a_obj_flag2.cpp + src/d/actor/d_a_obj_flag3.cpp + src/d/actor/d_a_obj_food.cpp + src/d/actor/d_a_obj_fw.cpp + src/d/actor/d_a_obj_gadget.cpp + src/d/actor/d_a_obj_ganonwall.cpp + src/d/actor/d_a_obj_ganonwall2.cpp + src/d/actor/d_a_obj_gb.cpp + src/d/actor/d_a_obj_geyser.cpp + src/d/actor/d_a_obj_glowSphere.cpp + src/d/actor/d_a_obj_gm.cpp + src/d/actor/d_a_obj_goGate.cpp + src/d/actor/d_a_obj_gomikabe.cpp + src/d/actor/d_a_obj_gra2.cpp + src/d/actor/d_a_obj_graWall.cpp + src/d/actor/d_a_obj_gra_rock.cpp + src/d/actor/d_a_obj_grave_stone.cpp + src/d/actor/d_a_obj_groundwater.cpp + src/d/actor/d_a_obj_grz_rock.cpp + src/d/actor/d_a_obj_h_saku.cpp + src/d/actor/d_a_obj_hakai_brl.cpp + src/d/actor/d_a_obj_hakai_ftr.cpp + src/d/actor/d_a_obj_hasu2.cpp + src/d/actor/d_a_obj_hata.cpp + src/d/actor/d_a_obj_hb.cpp + src/d/actor/d_a_obj_hbombkoya.cpp + src/d/actor/d_a_obj_heavySw.cpp + src/d/actor/d_a_obj_hfuta.cpp + src/d/actor/d_a_obj_hsTarget.cpp + src/d/actor/d_a_obj_ice_l.cpp + src/d/actor/d_a_obj_ice_s.cpp + src/d/actor/d_a_obj_iceblock.cpp + src/d/actor/d_a_obj_iceleaf.cpp + src/d/actor/d_a_obj_ihasi.cpp + src/d/actor/d_a_obj_ikada.cpp + src/d/actor/d_a_obj_inobone.cpp + src/d/actor/d_a_obj_ita.cpp + src/d/actor/d_a_obj_itamato.cpp + src/d/actor/d_a_obj_kabuto.cpp + src/d/actor/d_a_obj_kag.cpp + src/d/actor/d_a_obj_kage.cpp + src/d/actor/d_a_obj_kago.cpp + src/d/actor/d_a_obj_kaisou.cpp + src/d/actor/d_a_obj_kamakiri.cpp + src/d/actor/d_a_obj_kantera.cpp + src/d/actor/d_a_obj_katatsumuri.cpp + src/d/actor/d_a_obj_kazeneko.cpp + src/d/actor/d_a_obj_kbox.cpp + src/d/actor/d_a_obj_key.cpp + src/d/actor/d_a_obj_keyhole.cpp + src/d/actor/d_a_obj_ki.cpp + src/d/actor/d_a_obj_kiPot.cpp + src/d/actor/d_a_obj_kita.cpp + src/d/actor/d_a_obj_kjgjs.cpp + src/d/actor/d_a_obj_kkanban.cpp + src/d/actor/d_a_obj_knBullet.cpp + src/d/actor/d_a_obj_kshutter.cpp + src/d/actor/d_a_obj_kuwagata.cpp + src/d/actor/d_a_obj_kwheel00.cpp + src/d/actor/d_a_obj_kwheel01.cpp + src/d/actor/d_a_obj_kznkarm.cpp + src/d/actor/d_a_obj_laundry.cpp + src/d/actor/d_a_obj_laundry_rope.cpp + src/d/actor/d_a_obj_lbox.cpp + src/d/actor/d_a_obj_lp.cpp + src/d/actor/d_a_obj_lv1Candle00.cpp + src/d/actor/d_a_obj_lv1Candle01.cpp + src/d/actor/d_a_obj_lv3Candle.cpp + src/d/actor/d_a_obj_lv3Water.cpp + src/d/actor/d_a_obj_lv3Water2.cpp + src/d/actor/d_a_obj_lv3WaterB.cpp + src/d/actor/d_a_obj_lv3saka00.cpp + src/d/actor/d_a_obj_lv3waterEff.cpp + src/d/actor/d_a_obj_lv4CandleDemoTag.cpp + src/d/actor/d_a_obj_lv4CandleTag.cpp + src/d/actor/d_a_obj_lv4EdShutter.cpp + src/d/actor/d_a_obj_lv4Gate.cpp + src/d/actor/d_a_obj_lv4HsTarget.cpp + src/d/actor/d_a_obj_lv4PoGate.cpp + src/d/actor/d_a_obj_lv4RailWall.cpp + src/d/actor/d_a_obj_lv4SlideWall.cpp + src/d/actor/d_a_obj_lv4bridge.cpp + src/d/actor/d_a_obj_lv4chandelier.cpp + src/d/actor/d_a_obj_lv4digsand.cpp + src/d/actor/d_a_obj_lv4floor.cpp + src/d/actor/d_a_obj_lv4gear.cpp + src/d/actor/d_a_obj_lv4prelvtr.cpp + src/d/actor/d_a_obj_lv4prwall.cpp + src/d/actor/d_a_obj_lv4sand.cpp + src/d/actor/d_a_obj_lv5FloorBoard.cpp + src/d/actor/d_a_obj_lv5IceWall.cpp + src/d/actor/d_a_obj_lv5SwIce.cpp + src/d/actor/d_a_obj_lv5ychndlr.cpp + src/d/actor/d_a_obj_lv5yiblltray.cpp + src/d/actor/d_a_obj_lv6ChangeGate.cpp + src/d/actor/d_a_obj_lv6FurikoTrap.cpp + src/d/actor/d_a_obj_lv6Lblock.cpp + src/d/actor/d_a_obj_lv6SwGate.cpp + src/d/actor/d_a_obj_lv6SzGate.cpp + src/d/actor/d_a_obj_lv6Tenbin.cpp + src/d/actor/d_a_obj_lv6TogeRoll.cpp + src/d/actor/d_a_obj_lv6TogeTrap.cpp + src/d/actor/d_a_obj_lv6bemos.cpp + src/d/actor/d_a_obj_lv6bemos2.cpp + src/d/actor/d_a_obj_lv6egate.cpp + src/d/actor/d_a_obj_lv6elevta.cpp + src/d/actor/d_a_obj_lv6swturn.cpp + src/d/actor/d_a_obj_lv7BsGate.cpp + src/d/actor/d_a_obj_lv7PropellerY.cpp + src/d/actor/d_a_obj_lv7bridge.cpp + src/d/actor/d_a_obj_lv8KekkaiTrap.cpp + src/d/actor/d_a_obj_lv8Lift.cpp + src/d/actor/d_a_obj_lv8OptiLift.cpp + src/d/actor/d_a_obj_lv8UdFloor.cpp + src/d/actor/d_a_obj_lv9SwShutter.cpp + src/d/actor/d_a_obj_magLift.cpp + src/d/actor/d_a_obj_magLiftRot.cpp + src/d/actor/d_a_obj_maki.cpp + src/d/actor/d_a_obj_master_sword.cpp + src/d/actor/d_a_obj_mato.cpp + src/d/actor/d_a_obj_mhole.cpp + src/d/actor/d_a_obj_mie.cpp + src/d/actor/d_a_obj_mirror_6pole.cpp + src/d/actor/d_a_obj_mirror_chain.cpp + src/d/actor/d_a_obj_mirror_sand.cpp + src/d/actor/d_a_obj_mirror_screw.cpp + src/d/actor/d_a_obj_mirror_table.cpp + src/d/actor/d_a_obj_msima.cpp + src/d/actor/d_a_obj_mvstair.cpp + src/d/actor/d_a_obj_myogan.cpp + src/d/actor/d_a_obj_nagaisu.cpp + src/d/actor/d_a_obj_nan.cpp + src/d/actor/d_a_obj_ndoor.cpp + src/d/actor/d_a_obj_nougu.cpp + src/d/actor/d_a_obj_octhashi.cpp + src/d/actor/d_a_obj_oiltubo.cpp + src/d/actor/d_a_obj_onsen.cpp + src/d/actor/d_a_obj_onsenFire.cpp + src/d/actor/d_a_obj_onsenTaru.cpp + src/d/actor/d_a_obj_pdoor.cpp + src/d/actor/d_a_obj_pdtile.cpp + src/d/actor/d_a_obj_pdwall.cpp + src/d/actor/d_a_obj_picture.cpp + src/d/actor/d_a_obj_pillar.cpp + src/d/actor/d_a_obj_pleaf.cpp + src/d/actor/d_a_obj_poCandle.cpp + src/d/actor/d_a_obj_poFire.cpp + src/d/actor/d_a_obj_poTbox.cpp + src/d/actor/d_a_obj_prop.cpp + src/d/actor/d_a_obj_pumpkin.cpp + src/d/actor/d_a_obj_rcircle.cpp + src/d/actor/d_a_obj_rfHole.cpp + src/d/actor/d_a_obj_rgate.cpp + src/d/actor/d_a_obj_riverrock.cpp + src/d/actor/d_a_obj_rock.cpp + src/d/actor/d_a_obj_rotBridge.cpp + src/d/actor/d_a_obj_rotTrap.cpp + src/d/actor/d_a_obj_roten.cpp + src/d/actor/d_a_obj_rstair.cpp + src/d/actor/d_a_obj_rw.cpp + src/d/actor/d_a_obj_saidan.cpp + src/d/actor/d_a_obj_sakuita.cpp + src/d/actor/d_a_obj_sakuita_rope.cpp + src/d/actor/d_a_obj_scannon.cpp + src/d/actor/d_a_obj_scannon_crs.cpp + src/d/actor/d_a_obj_scannon_ten.cpp + src/d/actor/d_a_obj_sekidoor.cpp + src/d/actor/d_a_obj_sekizo.cpp + src/d/actor/d_a_obj_sekizoa.cpp + src/d/actor/d_a_obj_shield.cpp + src/d/actor/d_a_obj_sm_door.cpp + src/d/actor/d_a_obj_smallkey.cpp + src/d/actor/d_a_obj_smgdoor.cpp + src/d/actor/d_a_obj_smoke.cpp + src/d/actor/d_a_obj_smtile.cpp + src/d/actor/d_a_obj_smw_stone.cpp + src/d/actor/d_a_obj_snowEffTag.cpp + src/d/actor/d_a_obj_snow_soup.cpp + src/d/actor/d_a_obj_so.cpp + src/d/actor/d_a_obj_spinLift.cpp + src/d/actor/d_a_obj_ss_drink.cpp + src/d/actor/d_a_obj_ss_item.cpp + src/d/actor/d_a_obj_stairBlock.cpp + src/d/actor/d_a_obj_stone.cpp + src/d/actor/d_a_obj_stopper.cpp + src/d/actor/d_a_obj_stopper2.cpp + src/d/actor/d_a_obj_suisya.cpp + src/d/actor/d_a_obj_sw.cpp + src/d/actor/d_a_obj_swBallA.cpp + src/d/actor/d_a_obj_swBallB.cpp + src/d/actor/d_a_obj_swBallC.cpp + src/d/actor/d_a_obj_swLight.cpp + src/d/actor/d_a_obj_swchain.cpp + src/d/actor/d_a_obj_swhang.cpp + src/d/actor/d_a_obj_sword.cpp + src/d/actor/d_a_obj_swpush2.cpp + src/d/actor/d_a_obj_swspinner.cpp + src/d/actor/d_a_obj_swturn.cpp + src/d/actor/d_a_obj_syRock.cpp + src/d/actor/d_a_obj_szbridge.cpp + src/d/actor/d_a_obj_taFence.cpp + src/d/actor/d_a_obj_table.cpp + src/d/actor/d_a_obj_takaraDai.cpp + src/d/actor/d_a_obj_tatigi.cpp + src/d/actor/d_a_obj_ten.cpp + src/d/actor/d_a_obj_testcube.cpp + src/d/actor/d_a_obj_tgake.cpp + src/d/actor/d_a_obj_thashi.cpp + src/d/actor/d_a_obj_thdoor.cpp + src/d/actor/d_a_obj_timeFire.cpp + src/d/actor/d_a_obj_tks.cpp + src/d/actor/d_a_obj_tmoon.cpp + src/d/actor/d_a_obj_toaru_maki.cpp + src/d/actor/d_a_obj_toby.cpp + src/d/actor/d_a_obj_tobyhouse.cpp + src/d/actor/d_a_obj_togeTrap.cpp + src/d/actor/d_a_obj_tombo.cpp + src/d/actor/d_a_obj_tornado.cpp + src/d/actor/d_a_obj_tornado2.cpp + src/d/actor/d_a_obj_tp.cpp + src/d/actor/d_a_obj_treesh.cpp + src/d/actor/d_a_obj_twGate.cpp + src/d/actor/d_a_obj_udoor.cpp + src/d/actor/d_a_obj_usaku.cpp + src/d/actor/d_a_obj_vground.cpp + src/d/actor/d_a_obj_volcball.cpp + src/d/actor/d_a_obj_volcbom.cpp + src/d/actor/d_a_obj_warp_kbrg.cpp + src/d/actor/d_a_obj_warp_obrg.cpp + src/d/actor/d_a_obj_waterGate.cpp + src/d/actor/d_a_obj_waterPillar.cpp + src/d/actor/d_a_obj_waterfall.cpp + src/d/actor/d_a_obj_wchain.cpp + src/d/actor/d_a_obj_wdStick.cpp + src/d/actor/d_a_obj_web0.cpp + src/d/actor/d_a_obj_web1.cpp + src/d/actor/d_a_obj_well_cover.cpp + src/d/actor/d_a_obj_wflag.cpp + src/d/actor/d_a_obj_wind_stone.cpp + src/d/actor/d_a_obj_window.cpp + src/d/actor/d_a_obj_wood_pendulum.cpp + src/d/actor/d_a_obj_wood_statue.cpp + src/d/actor/d_a_obj_wsword.cpp + src/d/actor/d_a_obj_yel_bag.cpp + src/d/actor/d_a_obj_ystone.cpp + src/d/actor/d_a_obj_zcloth.cpp + src/d/actor/d_a_obj_zdoor.cpp + src/d/actor/d_a_obj_zrTurara.cpp + src/d/actor/d_a_obj_zrTuraraRock.cpp + src/d/actor/d_a_obj_zraMark.cpp + src/d/actor/d_a_obj_zra_freeze.cpp + src/d/actor/d_a_obj_zra_rock.cpp + src/d/actor/d_a_passer_mng.cpp + src/d/actor/d_a_tag_arena.cpp + src/d/actor/d_a_peru.cpp + src/d/actor/d_a_ppolamp.cpp + src/d/actor/d_a_skip_2D.cpp + src/d/actor/d_a_startAndGoal.cpp + src/d/actor/d_a_swBall.cpp + src/d/actor/d_a_swLBall.cpp + src/d/actor/d_a_swTime.cpp + src/d/actor/d_a_tag_Lv6Gate.cpp + src/d/actor/d_a_tag_Lv7Gate.cpp + src/d/actor/d_a_tag_Lv8Gate.cpp + src/d/actor/d_a_tag_TWgate.cpp + src/d/actor/d_a_tag_lv6CstaSw.cpp + src/d/actor/d_a_tag_assistance.cpp + src/d/actor/d_a_tag_bottle_item.cpp + src/d/actor/d_a_tag_chgrestart.cpp + src/d/actor/d_a_tag_csw.cpp + src/d/actor/d_a_tag_escape.cpp + src/d/actor/d_a_tag_firewall.cpp + src/d/actor/d_a_tag_gra.cpp + src/d/actor/d_a_tag_guard.cpp + src/d/actor/d_a_tag_instruction.cpp + src/d/actor/d_a_tag_kago_fall.cpp + src/d/actor/d_a_tag_lightball.cpp + src/d/actor/d_a_tag_lv5soup.cpp + src/d/actor/d_a_tag_mmsg.cpp + src/d/actor/d_a_tag_mwait.cpp + src/d/actor/d_a_tag_myna2.cpp + src/d/actor/d_a_tag_myna_light.cpp + src/d/actor/d_a_tag_pachi.cpp + src/d/actor/d_a_tag_poFire.cpp + src/d/actor/d_a_tag_qs.cpp + src/d/actor/d_a_tag_ret_room.cpp + src/d/actor/d_a_tag_river_back.cpp + src/d/actor/d_a_tag_rmbit_sw.cpp + src/d/actor/d_a_tag_schedule.cpp + src/d/actor/d_a_tag_setBall.cpp + src/d/actor/d_a_tag_setrestart.cpp + src/d/actor/d_a_tag_shop_camera.cpp + src/d/actor/d_a_tag_shop_item.cpp + src/d/actor/d_a_tag_smk_emt.cpp + src/d/actor/d_a_tag_spinner.cpp + src/d/actor/d_a_tag_sppath.cpp + src/d/actor/d_a_tag_ss_drink.cpp + src/d/actor/d_a_tag_stream.cpp + src/d/actor/d_a_tag_theB_hint.cpp + src/d/actor/d_a_tag_wara_howl.cpp + src/d/actor/d_a_tag_watchge.cpp + src/d/actor/d_a_tag_waterfall.cpp + src/d/actor/d_a_tag_wljump.cpp + src/d/actor/d_a_tag_yami.cpp + src/d/actor/d_a_talk.cpp + src/d/actor/d_a_tboxSw.cpp + src/d/actor/d_a_title.cpp + src/d/actor/d_a_warp_bug.cpp ) set(DOLPHIN_FILES @@ -1411,135 +1411,135 @@ set(DOLPHIN_FILES ) set(DUSK_FILES - include/dusk/action_bindings.h - include/dusk/endian_gx.hpp - include/dusk/config.hpp - include/dusk/dvd_asset.hpp - include/dusk/scope_guard.hpp - src/dusk/dvd_asset.cpp - src/d/actor/d_a_alink_dusk.cpp - src/dusk/asserts.cpp - src/dusk/config.cpp - src/dusk/crash_handler.cpp - src/dusk/crash_reporting.cpp - src/dusk/data.cpp - src/dusk/data.hpp - src/dusk/endian.cpp - src/dusk/extras.c - src/dusk/file_select.cpp - src/dusk/file_select.hpp - src/dusk/frame_interpolation.cpp - src/dusk/commands.cpp - src/dusk/commands.hpp - src/dusk/game_clock.cpp - src/dusk/game_combos.cpp - src/dusk/globals.cpp - src/dusk/gyro.cpp - src/dusk/mouse.cpp - src/dusk/gamepad_color.cpp - src/dusk/autosave.cpp - src/dusk/http/http.hpp - src/dusk/io.cpp - src/dusk/layout.cpp - src/dusk/logging.cpp - src/dusk/settings.cpp - src/dusk/speedrun.cpp - src/dusk/string.cpp - src/dusk/stubs.cpp - include/dusk/texture_replacements.hpp - src/dusk/texture_replacements.cpp - src/dusk/update_check.cpp - src/dusk/update_check.hpp - #src/dusk/m_Do_ext_dusk.cpp - src/dusk/imgui/ImGuiConfig.hpp - src/dusk/imgui/ImGuiConsole.hpp - src/dusk/imgui/ImGuiConsole.cpp - src/dusk/imgui/ImGuiEngine.cpp - src/dusk/imgui/ImGuiEngine.hpp - src/dusk/imgui/ImGuiBloomWindow.cpp - src/dusk/imgui/ImGuiBloomWindow.hpp - src/dusk/imgui/ImGuiMenuTools.cpp - src/dusk/imgui/ImGuiMenuTools.hpp - src/dusk/imgui/ImGuiActorSpawner.cpp - src/dusk/imgui/ImGuiProcessOverlay.cpp - src/dusk/imgui/ImGuiCameraOverlay.cpp - src/dusk/imgui/ImGuiHeapOverlay.cpp - src/dusk/imgui/ImGuiControllerOverlay.cpp - src/dusk/imgui/ImGuiStubLog.cpp - src/dusk/imgui/ImGuiSaveEditor.cpp - src/dusk/imgui/ImGuiStateShare.hpp - src/dusk/imgui/ImGuiStateShare.cpp - src/dusk/ui/achievements.cpp - src/dusk/ui/achievements.hpp - src/dusk/ui/command_console.cpp - src/dusk/ui/command_console.hpp - src/dusk/ui/bool_button.cpp - src/dusk/ui/bool_button.hpp - src/dusk/ui/button.cpp - src/dusk/ui/button.hpp - src/dusk/ui/component.cpp - src/dusk/ui/component.hpp - src/dusk/ui/controller_config.cpp - src/dusk/ui/controller_config.hpp - src/dusk/ui/document.cpp - src/dusk/ui/document.hpp - src/dusk/ui/editor.cpp - src/dusk/ui/editor.hpp - src/dusk/ui/event.cpp - src/dusk/ui/event.hpp - src/dusk/ui/graphics_tuner.cpp - src/dusk/ui/graphics_tuner.hpp - src/dusk/ui/input.cpp - src/dusk/ui/input.hpp - src/dusk/ui/modal.cpp - src/dusk/ui/modal.hpp - src/dusk/ui/nav_types.hpp - src/dusk/ui/number_button.cpp - src/dusk/ui/number_button.hpp - src/dusk/ui/overlay.cpp - src/dusk/ui/overlay.hpp - src/dusk/ui/pane.cpp - src/dusk/ui/pane.hpp - src/dusk/ui/menu_bar.cpp - src/dusk/ui/menu_bar.hpp - src/dusk/ui/prelaunch.cpp - src/dusk/ui/prelaunch.hpp - src/dusk/ui/preset.cpp - src/dusk/ui/preset.hpp - src/dusk/ui/reporting.cpp - src/dusk/ui/reporting.hpp - src/dusk/ui/select_button.cpp - src/dusk/ui/select_button.hpp - src/dusk/ui/settings.cpp - src/dusk/ui/settings.hpp - src/dusk/ui/string_button.cpp - src/dusk/ui/string_button.hpp - src/dusk/ui/tab_bar.cpp - src/dusk/ui/tab_bar.hpp - src/dusk/ui/ui.cpp - src/dusk/ui/ui.hpp - src/dusk/ui/warp.cpp - src/dusk/ui/warp.hpp - src/dusk/ui/window.cpp - src/dusk/ui/window.hpp - src/dusk/achievements.cpp - src/dusk/iso_validate.cpp - src/dusk/livesplit.cpp - src/dusk/offset_ptr.cpp - src/dusk/OSContext.cpp - src/dusk/OSReport.cpp - src/dusk/OSThread.cpp - src/dusk/OSMutex.cpp - src/dusk/discord.cpp - src/dusk/discord.hpp - src/dusk/discord_presence.cpp - src/dusk/version.cpp - src/dusk/action_bindings.cpp + include/dusk/action_bindings.h + include/dusk/endian_gx.hpp + include/dusk/config.hpp + include/dusk/dvd_asset.hpp + include/dusk/scope_guard.hpp + src/dusk/dvd_asset.cpp + src/d/actor/d_a_alink_dusk.cpp + src/dusk/asserts.cpp + src/dusk/config.cpp + src/dusk/crash_handler.cpp + src/dusk/crash_reporting.cpp + src/dusk/data.cpp + src/dusk/data.hpp + src/dusk/endian.cpp + src/dusk/extras.c + src/dusk/file_select.cpp + src/dusk/file_select.hpp + src/dusk/frame_interpolation.cpp + src/dusk/commands.cpp + src/dusk/commands.hpp + src/dusk/game_clock.cpp + src/dusk/game_combos.cpp + src/dusk/globals.cpp + src/dusk/gyro.cpp + src/dusk/mouse.cpp + src/dusk/gamepad_color.cpp + src/dusk/autosave.cpp + src/dusk/http/http.hpp + src/dusk/io.cpp + src/dusk/layout.cpp + src/dusk/logging.cpp + src/dusk/settings.cpp + src/dusk/speedrun.cpp + src/dusk/string.cpp + src/dusk/stubs.cpp + include/dusk/texture_replacements.hpp + src/dusk/texture_replacements.cpp + src/dusk/update_check.cpp + src/dusk/update_check.hpp + #src/dusk/m_Do_ext_dusk.cpp + src/dusk/imgui/ImGuiConfig.hpp + src/dusk/imgui/ImGuiConsole.hpp + src/dusk/imgui/ImGuiConsole.cpp + src/dusk/imgui/ImGuiEngine.cpp + src/dusk/imgui/ImGuiEngine.hpp + src/dusk/imgui/ImGuiBloomWindow.cpp + src/dusk/imgui/ImGuiBloomWindow.hpp + src/dusk/imgui/ImGuiMenuTools.cpp + src/dusk/imgui/ImGuiMenuTools.hpp + src/dusk/imgui/ImGuiActorSpawner.cpp + src/dusk/imgui/ImGuiProcessOverlay.cpp + src/dusk/imgui/ImGuiCameraOverlay.cpp + src/dusk/imgui/ImGuiHeapOverlay.cpp + src/dusk/imgui/ImGuiControllerOverlay.cpp + src/dusk/imgui/ImGuiStubLog.cpp + src/dusk/imgui/ImGuiSaveEditor.cpp + src/dusk/imgui/ImGuiStateShare.hpp + src/dusk/imgui/ImGuiStateShare.cpp + src/dusk/ui/achievements.cpp + src/dusk/ui/achievements.hpp + src/dusk/ui/command_console.cpp + src/dusk/ui/command_console.hpp + src/dusk/ui/bool_button.cpp + src/dusk/ui/bool_button.hpp + src/dusk/ui/button.cpp + src/dusk/ui/button.hpp + src/dusk/ui/component.cpp + src/dusk/ui/component.hpp + src/dusk/ui/controller_config.cpp + src/dusk/ui/controller_config.hpp + src/dusk/ui/document.cpp + src/dusk/ui/document.hpp + src/dusk/ui/editor.cpp + src/dusk/ui/editor.hpp + src/dusk/ui/event.cpp + src/dusk/ui/event.hpp + src/dusk/ui/graphics_tuner.cpp + src/dusk/ui/graphics_tuner.hpp + src/dusk/ui/input.cpp + src/dusk/ui/input.hpp + src/dusk/ui/modal.cpp + src/dusk/ui/modal.hpp + src/dusk/ui/nav_types.hpp + src/dusk/ui/number_button.cpp + src/dusk/ui/number_button.hpp + src/dusk/ui/overlay.cpp + src/dusk/ui/overlay.hpp + src/dusk/ui/pane.cpp + src/dusk/ui/pane.hpp + src/dusk/ui/menu_bar.cpp + src/dusk/ui/menu_bar.hpp + src/dusk/ui/prelaunch.cpp + src/dusk/ui/prelaunch.hpp + src/dusk/ui/preset.cpp + src/dusk/ui/preset.hpp + src/dusk/ui/reporting.cpp + src/dusk/ui/reporting.hpp + src/dusk/ui/select_button.cpp + src/dusk/ui/select_button.hpp + src/dusk/ui/settings.cpp + src/dusk/ui/settings.hpp + src/dusk/ui/string_button.cpp + src/dusk/ui/string_button.hpp + src/dusk/ui/tab_bar.cpp + src/dusk/ui/tab_bar.hpp + src/dusk/ui/ui.cpp + src/dusk/ui/ui.hpp + src/dusk/ui/warp.cpp + src/dusk/ui/warp.hpp + src/dusk/ui/window.cpp + src/dusk/ui/window.hpp + src/dusk/achievements.cpp + src/dusk/iso_validate.cpp + src/dusk/livesplit.cpp + src/dusk/offset_ptr.cpp + src/dusk/OSContext.cpp + src/dusk/OSReport.cpp + src/dusk/OSThread.cpp + src/dusk/OSMutex.cpp + src/dusk/discord.cpp + src/dusk/discord.hpp + src/dusk/discord_presence.cpp + src/dusk/version.cpp + src/dusk/action_bindings.cpp ) set(DUSK_HTTP_BACKEND_FILES - src/dusk/http/no_backend.cpp - src/dusk/http/curl.cpp - src/dusk/http/winhttp.cpp - src/dusk/http/url_session.mm + src/dusk/http/no_backend.cpp + src/dusk/http/curl.cpp + src/dusk/http/winhttp.cpp + src/dusk/http/url_session.mm ) From 91e77b10515382da086716e8cb3fe0cbcb51de02 Mon Sep 17 00:00:00 2001 From: madeline Date: Mon, 1 Jun 2026 23:18:56 -0700 Subject: [PATCH 007/223] eight (8) spaces --- files.cmake | 2904 +++++++++++++++++++++++++-------------------------- 1 file changed, 1452 insertions(+), 1452 deletions(-) diff --git a/files.cmake b/files.cmake index 9d1bdbfc11..2b5632c2f2 100644 --- a/files.cmake +++ b/files.cmake @@ -1,1540 +1,1540 @@ set(DOLZEL_FILES - src/m_Do/m_Do_main.cpp - #src/m_Do/m_Do_printf.cpp - src/m_Do/m_Do_audio.cpp - src/m_Do/m_Do_controller_pad.cpp - #src/m_Do/m_Re_controller_pad.cpp - src/m_Do/m_Do_graphic.cpp - src/m_Do/m_Do_machine.cpp - src/m_Do/m_Do_mtx.cpp - src/m_Do/m_Do_ext.cpp - src/m_Do/m_Do_lib.cpp - src/m_Do/m_Do_Reset.cpp - src/m_Do/m_Do_dvd_thread.cpp - src/m_Do/m_Do_DVDError.cpp - src/m_Do/m_Do_MemCard.cpp - src/m_Do/m_Do_MemCardRWmng.cpp - src/m_Do/m_Do_hostIO.cpp - src/c/c_damagereaction.cpp - src/c/c_dylink.cpp - src/f_ap/f_ap_game.cpp - src/f_op/f_op_actor.cpp - src/f_op/f_op_actor_iter.cpp - src/f_op/f_op_actor_tag.cpp - src/f_op/f_op_camera.cpp - src/f_op/f_op_actor_mng.cpp - src/f_op/f_op_camera_mng.cpp - src/f_op/f_op_overlap.cpp - src/f_op/f_op_overlap_mng.cpp - src/f_op/f_op_overlap_req.cpp - src/f_op/f_op_scene.cpp - src/f_op/f_op_scene_iter.cpp - src/f_op/f_op_scene_mng.cpp - src/f_op/f_op_scene_req.cpp - src/f_op/f_op_scene_tag.cpp - src/f_op/f_op_view.cpp - src/f_op/f_op_kankyo.cpp - src/f_op/f_op_msg.cpp - src/f_op/f_op_kankyo_mng.cpp - src/f_op/f_op_msg_mng.cpp - src/f_op/f_op_draw_iter.cpp - src/f_op/f_op_draw_tag.cpp - src/f_op/f_op_scene_pause.cpp - src/f_pc/f_pc_base.cpp - src/f_pc/f_pc_create_iter.cpp - src/f_pc/f_pc_create_req.cpp - src/f_pc/f_pc_create_tag.cpp - src/f_pc/f_pc_creator.cpp - src/f_pc/f_pc_delete_tag.cpp - src/f_pc/f_pc_deletor.cpp - src/f_pc/f_pc_draw_priority.cpp - src/f_pc/f_pc_executor.cpp - src/f_pc/f_pc_layer.cpp - src/f_pc/f_pc_leaf.cpp - src/f_pc/f_pc_layer_iter.cpp - src/f_pc/f_pc_layer_tag.cpp - src/f_pc/f_pc_line.cpp - src/f_pc/f_pc_load.cpp - src/f_pc/f_pc_manager.cpp - src/f_pc/f_pc_method.cpp - src/f_pc/f_pc_node.cpp - src/f_pc/f_pc_node_req.cpp - src/f_pc/f_pc_priority.cpp - src/f_pc/f_pc_profile.cpp - src/f_pc/f_pc_searcher.cpp - src/f_pc/f_pc_line_tag.cpp - src/f_pc/f_pc_line_iter.cpp - src/f_pc/f_pc_method_iter.cpp - src/f_pc/f_pc_method_tag.cpp - src/f_pc/f_pc_pause.cpp - src/f_pc/f_pc_draw.cpp - src/f_pc/f_pc_fstcreate_req.cpp - src/f_pc/f_pc_stdcreate_req.cpp - src/f_pc/f_pc_debug_sv.cpp - src/d/d_stage.cpp - src/d/d_map.cpp - src/d/d_com_inf_game.cpp - src/d/d_com_static.cpp - src/d/d_com_inf_actor.cpp - src/d/d_bomb.cpp - src/d/d_lib.cpp - src/d/d_save.cpp - src/d/d_save_init.cpp - src/d/d_jnt_col.cpp - src/d/d_a_obj.cpp - src/d/d_a_itembase_static.cpp - src/d/d_a_item_static.cpp - src/d/d_a_shop_item_static.cpp - src/d/d_a_horse_static.cpp - src/d/d_demo.cpp - src/d/d_door_param2.cpp - src/d/d_resorce.cpp - src/d/d_map_path.cpp - src/d/d_map_path_fmap.cpp - src/d/d_map_path_dmap.cpp - src/d/d_event.cpp - src/d/d_event_data.cpp - src/d/d_event_manager.cpp - src/d/d_event_lib.cpp - src/d/d_simple_model.cpp - src/d/d_particle.cpp - src/d/d_particle_name.cpp - src/d/d_particle_copoly.cpp - src/d/d_path.cpp - src/d/d_drawlist.cpp - src/d/d_kankyo_data.cpp - src/d/d_kankyo_wether.cpp - src/d/d_kankyo_rain.cpp - src/d/d_kankyo_debug.cpp - src/d/d_vibration.cpp - src/d/d_vib_pattern.cpp - src/d/d_attention.cpp - src/d/d_bg_parts.cpp - src/d/d_bg_pc.cpp - src/d/d_att_dist.cpp - src/d/d_bg_plc.cpp - src/d/d_bg_s.cpp - src/d/d_bg_s_acch.cpp - src/d/d_bg_s_capt_poly.cpp - src/d/d_bg_s_chk.cpp - src/d/d_bg_s_gnd_chk.cpp - src/d/d_bg_s_grp_pass_chk.cpp - src/d/d_bg_s_lin_chk.cpp - src/d/d_bg_s_movebg_actor.cpp - src/d/d_bg_s_sph_chk.cpp - src/d/d_bg_s_spl_grp_chk.cpp - src/d/d_bg_s_poly_pass_chk.cpp - src/d/d_bg_s_roof_chk.cpp - src/d/d_bg_s_wtr_chk.cpp - src/d/d_bg_w.cpp - src/d/d_bg_w_base.cpp - src/d/d_bg_w_kcol.cpp - src/d/d_bg_w_sv.cpp - src/d/d_cc_d.cpp - src/d/d_cc_mass_s.cpp - src/d/d_cc_s.cpp - src/d/d_cc_uty.cpp - src/d/d_cam_param.cpp - src/d/d_ev_camera.cpp - src/d/d_spline_path.cpp - src/d/d_item_data.cpp - src/d/d_item.cpp - src/d/d_tresure.cpp - src/d/d_model.cpp - src/d/d_eye_hl.cpp - src/d/d_error_msg.cpp - src/d/d_debug_viewer.cpp - src/d/d_debug_camera.cpp - src/d/actor/d_a_alink.cpp - src/d/actor/d_a_itembase.cpp - src/d/actor/d_a_no_chg_room.cpp - src/d/actor/d_a_npc.cpp - src/d/actor/d_a_npc_cd.cpp - src/d/actor/d_a_npc_cd2.cpp - src/d/actor/d_a_obj_item.cpp - src/d/d_insect.cpp - src/d/actor/d_a_obj_ss_base.cpp - src/d/actor/d_a_player.cpp - src/d/d_camera.cpp - src/d/d_envse.cpp - src/d/d_file_select.cpp - src/d/d_file_sel_warning.cpp - src/d/d_file_sel_info.cpp - src/d/d_bright_check.cpp - src/d/d_scope.cpp - src/d/d_select_cursor.cpp - src/d/d_select_icon.cpp - src/d/d_shop_camera.cpp - src/d/d_shop_item_ctrl.cpp - src/d/d_shop_system.cpp - src/d/d_gameover.cpp - src/d/d_kankyo.cpp - src/d/d_kyeff.cpp - src/d/d_kyeff2.cpp - src/d/d_ky_thunder.cpp - src/d/d_kantera_icon_meter.cpp - src/d/d_menu_calibration.cpp - src/d/d_menu_collect.cpp - src/d/d_menu_dmap.cpp - src/d/d_menu_dmap_map.cpp - src/d/d_menu_map_common.cpp - src/d/d_menu_fishing.cpp - src/d/d_menu_fmap.cpp - src/d/d_menu_fmap_map.cpp - src/d/d_menu_fmap2D.cpp - src/d/d_menu_insect.cpp - src/d/d_menu_item_explain.cpp - src/d/d_menu_letter.cpp - src/d/d_menu_option.cpp - src/d/d_menu_ring.cpp - src/d/d_menu_save.cpp - src/d/d_menu_skill.cpp - src/d/d_menu_window_HIO.cpp - src/d/d_menu_window.cpp - src/d/d_meter_HIO.cpp - src/d/d_meter_button.cpp - src/d/d_meter_haihai.cpp - src/d/d_meter_hakusha.cpp - src/d/d_meter_map.cpp - src/d/d_meter_string.cpp - src/d/d_meter2_draw.cpp - src/d/d_meter2_info.cpp - src/d/d_meter2.cpp - src/d/d_msg_out_font.cpp - src/d/d_msg_class.cpp - src/d/d_msg_object.cpp - src/d/d_msg_unit.cpp - src/d/d_msg_scrn_3select.cpp - src/d/d_msg_scrn_arrow.cpp - src/d/d_msg_scrn_base.cpp - src/d/d_msg_scrn_boss.cpp - src/d/d_msg_scrn_explain.cpp - src/d/d_msg_scrn_item.cpp - src/d/d_msg_scrn_howl.cpp - src/d/d_msg_scrn_jimaku.cpp - src/d/d_msg_scrn_kanban.cpp - src/d/d_msg_scrn_light.cpp - src/d/d_msg_scrn_place.cpp - src/d/d_msg_scrn_staff.cpp - src/d/d_msg_scrn_talk.cpp - src/d/d_msg_scrn_tree.cpp - src/d/d_msg_string_base.cpp - src/d/d_msg_string.cpp - src/d/d_msg_flow.cpp - src/d/d_name.cpp - src/d/d_npc_lib.cpp - src/d/d_ovlp_fade.cpp - src/d/d_ovlp_fade2.cpp - src/d/d_ovlp_fade3.cpp - src/d/d_pane_class.cpp - src/d/d_pane_class_alpha.cpp - src/d/d_pane_class_ex.cpp - src/d/d_s_logo.cpp - src/d/d_s_menu.cpp - src/d/d_s_name.cpp - src/d/d_s_play.cpp - src/d/d_s_room.cpp - src/d/d_s_title.cpp - src/d/d_save_HIO.cpp - src/d/d_timer.cpp - src/d/d_k_wmark.cpp - src/d/d_k_wpillar.cpp - src/DynamicLink.cpp - src/CaptureScreen.cpp + src/m_Do/m_Do_main.cpp + #src/m_Do/m_Do_printf.cpp + src/m_Do/m_Do_audio.cpp + src/m_Do/m_Do_controller_pad.cpp + #src/m_Do/m_Re_controller_pad.cpp + src/m_Do/m_Do_graphic.cpp + src/m_Do/m_Do_machine.cpp + src/m_Do/m_Do_mtx.cpp + src/m_Do/m_Do_ext.cpp + src/m_Do/m_Do_lib.cpp + src/m_Do/m_Do_Reset.cpp + src/m_Do/m_Do_dvd_thread.cpp + src/m_Do/m_Do_DVDError.cpp + src/m_Do/m_Do_MemCard.cpp + src/m_Do/m_Do_MemCardRWmng.cpp + src/m_Do/m_Do_hostIO.cpp + src/c/c_damagereaction.cpp + src/c/c_dylink.cpp + src/f_ap/f_ap_game.cpp + src/f_op/f_op_actor.cpp + src/f_op/f_op_actor_iter.cpp + src/f_op/f_op_actor_tag.cpp + src/f_op/f_op_camera.cpp + src/f_op/f_op_actor_mng.cpp + src/f_op/f_op_camera_mng.cpp + src/f_op/f_op_overlap.cpp + src/f_op/f_op_overlap_mng.cpp + src/f_op/f_op_overlap_req.cpp + src/f_op/f_op_scene.cpp + src/f_op/f_op_scene_iter.cpp + src/f_op/f_op_scene_mng.cpp + src/f_op/f_op_scene_req.cpp + src/f_op/f_op_scene_tag.cpp + src/f_op/f_op_view.cpp + src/f_op/f_op_kankyo.cpp + src/f_op/f_op_msg.cpp + src/f_op/f_op_kankyo_mng.cpp + src/f_op/f_op_msg_mng.cpp + src/f_op/f_op_draw_iter.cpp + src/f_op/f_op_draw_tag.cpp + src/f_op/f_op_scene_pause.cpp + src/f_pc/f_pc_base.cpp + src/f_pc/f_pc_create_iter.cpp + src/f_pc/f_pc_create_req.cpp + src/f_pc/f_pc_create_tag.cpp + src/f_pc/f_pc_creator.cpp + src/f_pc/f_pc_delete_tag.cpp + src/f_pc/f_pc_deletor.cpp + src/f_pc/f_pc_draw_priority.cpp + src/f_pc/f_pc_executor.cpp + src/f_pc/f_pc_layer.cpp + src/f_pc/f_pc_leaf.cpp + src/f_pc/f_pc_layer_iter.cpp + src/f_pc/f_pc_layer_tag.cpp + src/f_pc/f_pc_line.cpp + src/f_pc/f_pc_load.cpp + src/f_pc/f_pc_manager.cpp + src/f_pc/f_pc_method.cpp + src/f_pc/f_pc_node.cpp + src/f_pc/f_pc_node_req.cpp + src/f_pc/f_pc_priority.cpp + src/f_pc/f_pc_profile.cpp + src/f_pc/f_pc_searcher.cpp + src/f_pc/f_pc_line_tag.cpp + src/f_pc/f_pc_line_iter.cpp + src/f_pc/f_pc_method_iter.cpp + src/f_pc/f_pc_method_tag.cpp + src/f_pc/f_pc_pause.cpp + src/f_pc/f_pc_draw.cpp + src/f_pc/f_pc_fstcreate_req.cpp + src/f_pc/f_pc_stdcreate_req.cpp + src/f_pc/f_pc_debug_sv.cpp + src/d/d_stage.cpp + src/d/d_map.cpp + src/d/d_com_inf_game.cpp + src/d/d_com_static.cpp + src/d/d_com_inf_actor.cpp + src/d/d_bomb.cpp + src/d/d_lib.cpp + src/d/d_save.cpp + src/d/d_save_init.cpp + src/d/d_jnt_col.cpp + src/d/d_a_obj.cpp + src/d/d_a_itembase_static.cpp + src/d/d_a_item_static.cpp + src/d/d_a_shop_item_static.cpp + src/d/d_a_horse_static.cpp + src/d/d_demo.cpp + src/d/d_door_param2.cpp + src/d/d_resorce.cpp + src/d/d_map_path.cpp + src/d/d_map_path_fmap.cpp + src/d/d_map_path_dmap.cpp + src/d/d_event.cpp + src/d/d_event_data.cpp + src/d/d_event_manager.cpp + src/d/d_event_lib.cpp + src/d/d_simple_model.cpp + src/d/d_particle.cpp + src/d/d_particle_name.cpp + src/d/d_particle_copoly.cpp + src/d/d_path.cpp + src/d/d_drawlist.cpp + src/d/d_kankyo_data.cpp + src/d/d_kankyo_wether.cpp + src/d/d_kankyo_rain.cpp + src/d/d_kankyo_debug.cpp + src/d/d_vibration.cpp + src/d/d_vib_pattern.cpp + src/d/d_attention.cpp + src/d/d_bg_parts.cpp + src/d/d_bg_pc.cpp + src/d/d_att_dist.cpp + src/d/d_bg_plc.cpp + src/d/d_bg_s.cpp + src/d/d_bg_s_acch.cpp + src/d/d_bg_s_capt_poly.cpp + src/d/d_bg_s_chk.cpp + src/d/d_bg_s_gnd_chk.cpp + src/d/d_bg_s_grp_pass_chk.cpp + src/d/d_bg_s_lin_chk.cpp + src/d/d_bg_s_movebg_actor.cpp + src/d/d_bg_s_sph_chk.cpp + src/d/d_bg_s_spl_grp_chk.cpp + src/d/d_bg_s_poly_pass_chk.cpp + src/d/d_bg_s_roof_chk.cpp + src/d/d_bg_s_wtr_chk.cpp + src/d/d_bg_w.cpp + src/d/d_bg_w_base.cpp + src/d/d_bg_w_kcol.cpp + src/d/d_bg_w_sv.cpp + src/d/d_cc_d.cpp + src/d/d_cc_mass_s.cpp + src/d/d_cc_s.cpp + src/d/d_cc_uty.cpp + src/d/d_cam_param.cpp + src/d/d_ev_camera.cpp + src/d/d_spline_path.cpp + src/d/d_item_data.cpp + src/d/d_item.cpp + src/d/d_tresure.cpp + src/d/d_model.cpp + src/d/d_eye_hl.cpp + src/d/d_error_msg.cpp + src/d/d_debug_viewer.cpp + src/d/d_debug_camera.cpp + src/d/actor/d_a_alink.cpp + src/d/actor/d_a_itembase.cpp + src/d/actor/d_a_no_chg_room.cpp + src/d/actor/d_a_npc.cpp + src/d/actor/d_a_npc_cd.cpp + src/d/actor/d_a_npc_cd2.cpp + src/d/actor/d_a_obj_item.cpp + src/d/d_insect.cpp + src/d/actor/d_a_obj_ss_base.cpp + src/d/actor/d_a_player.cpp + src/d/d_camera.cpp + src/d/d_envse.cpp + src/d/d_file_select.cpp + src/d/d_file_sel_warning.cpp + src/d/d_file_sel_info.cpp + src/d/d_bright_check.cpp + src/d/d_scope.cpp + src/d/d_select_cursor.cpp + src/d/d_select_icon.cpp + src/d/d_shop_camera.cpp + src/d/d_shop_item_ctrl.cpp + src/d/d_shop_system.cpp + src/d/d_gameover.cpp + src/d/d_kankyo.cpp + src/d/d_kyeff.cpp + src/d/d_kyeff2.cpp + src/d/d_ky_thunder.cpp + src/d/d_kantera_icon_meter.cpp + src/d/d_menu_calibration.cpp + src/d/d_menu_collect.cpp + src/d/d_menu_dmap.cpp + src/d/d_menu_dmap_map.cpp + src/d/d_menu_map_common.cpp + src/d/d_menu_fishing.cpp + src/d/d_menu_fmap.cpp + src/d/d_menu_fmap_map.cpp + src/d/d_menu_fmap2D.cpp + src/d/d_menu_insect.cpp + src/d/d_menu_item_explain.cpp + src/d/d_menu_letter.cpp + src/d/d_menu_option.cpp + src/d/d_menu_ring.cpp + src/d/d_menu_save.cpp + src/d/d_menu_skill.cpp + src/d/d_menu_window_HIO.cpp + src/d/d_menu_window.cpp + src/d/d_meter_HIO.cpp + src/d/d_meter_button.cpp + src/d/d_meter_haihai.cpp + src/d/d_meter_hakusha.cpp + src/d/d_meter_map.cpp + src/d/d_meter_string.cpp + src/d/d_meter2_draw.cpp + src/d/d_meter2_info.cpp + src/d/d_meter2.cpp + src/d/d_msg_out_font.cpp + src/d/d_msg_class.cpp + src/d/d_msg_object.cpp + src/d/d_msg_unit.cpp + src/d/d_msg_scrn_3select.cpp + src/d/d_msg_scrn_arrow.cpp + src/d/d_msg_scrn_base.cpp + src/d/d_msg_scrn_boss.cpp + src/d/d_msg_scrn_explain.cpp + src/d/d_msg_scrn_item.cpp + src/d/d_msg_scrn_howl.cpp + src/d/d_msg_scrn_jimaku.cpp + src/d/d_msg_scrn_kanban.cpp + src/d/d_msg_scrn_light.cpp + src/d/d_msg_scrn_place.cpp + src/d/d_msg_scrn_staff.cpp + src/d/d_msg_scrn_talk.cpp + src/d/d_msg_scrn_tree.cpp + src/d/d_msg_string_base.cpp + src/d/d_msg_string.cpp + src/d/d_msg_flow.cpp + src/d/d_name.cpp + src/d/d_npc_lib.cpp + src/d/d_ovlp_fade.cpp + src/d/d_ovlp_fade2.cpp + src/d/d_ovlp_fade3.cpp + src/d/d_pane_class.cpp + src/d/d_pane_class_alpha.cpp + src/d/d_pane_class_ex.cpp + src/d/d_s_logo.cpp + src/d/d_s_menu.cpp + src/d/d_s_name.cpp + src/d/d_s_play.cpp + src/d/d_s_room.cpp + src/d/d_s_title.cpp + src/d/d_save_HIO.cpp + src/d/d_timer.cpp + src/d/d_k_wmark.cpp + src/d/d_k_wpillar.cpp + src/DynamicLink.cpp + src/CaptureScreen.cpp ) if(DEBUG) - list(APPEND DOLZEL_FILES src/d/d_event_debug.cpp) + list(APPEND DOLZEL_FILES src/d/d_event_debug.cpp) endif(DEBUG) set(Z2AUDIOLIB_FILES - src/Z2AudioLib/Z2Calc.cpp - src/Z2AudioLib/Z2AudioArcLoader.cpp - src/Z2AudioLib/Z2Param.cpp - src/Z2AudioLib/Z2SoundMgr.cpp - src/Z2AudioLib/Z2SoundStarter.cpp - src/Z2AudioLib/Z2SoundHandles.cpp - src/Z2AudioLib/Z2SeMgr.cpp - src/Z2AudioLib/Z2SeqMgr.cpp - src/Z2AudioLib/Z2StatusMgr.cpp - src/Z2AudioLib/Z2SceneMgr.cpp - src/Z2AudioLib/Z2FxLineMgr.cpp - src/Z2AudioLib/Z2SoundInfo.cpp - src/Z2AudioLib/Z2Audience.cpp - src/Z2AudioLib/Z2SoundObject.cpp - src/Z2AudioLib/Z2SoundObjMgr.cpp - src/Z2AudioLib/Z2Creature.cpp - src/Z2AudioLib/Z2LinkMgr.cpp - src/Z2AudioLib/Z2EnvSeMgr.cpp - src/Z2AudioLib/Z2WolfHowlMgr.cpp - src/Z2AudioLib/Z2SpeechMgr2.cpp - src/Z2AudioLib/Z2AudioMgr.cpp + src/Z2AudioLib/Z2Calc.cpp + src/Z2AudioLib/Z2AudioArcLoader.cpp + src/Z2AudioLib/Z2Param.cpp + src/Z2AudioLib/Z2SoundMgr.cpp + src/Z2AudioLib/Z2SoundStarter.cpp + src/Z2AudioLib/Z2SoundHandles.cpp + src/Z2AudioLib/Z2SeMgr.cpp + src/Z2AudioLib/Z2SeqMgr.cpp + src/Z2AudioLib/Z2StatusMgr.cpp + src/Z2AudioLib/Z2SceneMgr.cpp + src/Z2AudioLib/Z2FxLineMgr.cpp + src/Z2AudioLib/Z2SoundInfo.cpp + src/Z2AudioLib/Z2Audience.cpp + src/Z2AudioLib/Z2SoundObject.cpp + src/Z2AudioLib/Z2SoundObjMgr.cpp + src/Z2AudioLib/Z2Creature.cpp + src/Z2AudioLib/Z2LinkMgr.cpp + src/Z2AudioLib/Z2EnvSeMgr.cpp + src/Z2AudioLib/Z2WolfHowlMgr.cpp + src/Z2AudioLib/Z2SpeechMgr2.cpp + src/Z2AudioLib/Z2AudioMgr.cpp ) set(SSYSTEM_FILES - src/SSystem/SComponent/c_malloc.cpp - src/SSystem/SComponent/c_API.cpp - src/SSystem/SComponent/c_API_controller_pad.cpp - src/SSystem/SComponent/c_API_graphic.cpp - src/SSystem/SComponent/c_cc_d.cpp - src/SSystem/SComponent/c_cc_s.cpp - src/SSystem/SComponent/c_counter.cpp - src/SSystem/SComponent/c_list.cpp - src/SSystem/SComponent/c_list_iter.cpp - src/SSystem/SComponent/c_node.cpp - src/SSystem/SComponent/c_node_iter.cpp - src/SSystem/SComponent/c_tree.cpp - src/SSystem/SComponent/c_tree_iter.cpp - src/SSystem/SComponent/c_phase.cpp - src/SSystem/SComponent/c_request.cpp - src/SSystem/SComponent/c_tag.cpp - src/SSystem/SComponent/c_tag_iter.cpp - src/SSystem/SComponent/c_xyz.cpp - src/SSystem/SComponent/c_sxyz.cpp - src/SSystem/SComponent/c_math.cpp - src/SSystem/SComponent/c_bg_s_chk.cpp - src/SSystem/SComponent/c_bg_s_gnd_chk.cpp - src/SSystem/SComponent/c_bg_s_lin_chk.cpp - src/SSystem/SComponent/c_bg_s_shdw_draw.cpp - src/SSystem/SComponent/c_bg_s_poly_info.cpp - src/SSystem/SComponent/c_bg_w.cpp - src/SSystem/SComponent/c_m2d.cpp - src/SSystem/SComponent/c_m3d.cpp - src/SSystem/SComponent/c_m3d_g_aab.cpp - src/SSystem/SComponent/c_m3d_g_cir.cpp - src/SSystem/SComponent/c_m3d_g_cps.cpp - src/SSystem/SComponent/c_m3d_g_cyl.cpp - src/SSystem/SComponent/c_m3d_g_lin.cpp - src/SSystem/SComponent/c_m3d_g_pla.cpp - src/SSystem/SComponent/c_m3d_g_sph.cpp - src/SSystem/SComponent/c_m3d_g_tri.cpp - src/SSystem/SComponent/c_m3d_g_vtx.cpp - src/SSystem/SComponent/c_lib.cpp - src/SSystem/SComponent/c_angle.cpp - src/SSystem/SStandard/s_basic.cpp + src/SSystem/SComponent/c_malloc.cpp + src/SSystem/SComponent/c_API.cpp + src/SSystem/SComponent/c_API_controller_pad.cpp + src/SSystem/SComponent/c_API_graphic.cpp + src/SSystem/SComponent/c_cc_d.cpp + src/SSystem/SComponent/c_cc_s.cpp + src/SSystem/SComponent/c_counter.cpp + src/SSystem/SComponent/c_list.cpp + src/SSystem/SComponent/c_list_iter.cpp + src/SSystem/SComponent/c_node.cpp + src/SSystem/SComponent/c_node_iter.cpp + src/SSystem/SComponent/c_tree.cpp + src/SSystem/SComponent/c_tree_iter.cpp + src/SSystem/SComponent/c_phase.cpp + src/SSystem/SComponent/c_request.cpp + src/SSystem/SComponent/c_tag.cpp + src/SSystem/SComponent/c_tag_iter.cpp + src/SSystem/SComponent/c_xyz.cpp + src/SSystem/SComponent/c_sxyz.cpp + src/SSystem/SComponent/c_math.cpp + src/SSystem/SComponent/c_bg_s_chk.cpp + src/SSystem/SComponent/c_bg_s_gnd_chk.cpp + src/SSystem/SComponent/c_bg_s_lin_chk.cpp + src/SSystem/SComponent/c_bg_s_shdw_draw.cpp + src/SSystem/SComponent/c_bg_s_poly_info.cpp + src/SSystem/SComponent/c_bg_w.cpp + src/SSystem/SComponent/c_m2d.cpp + src/SSystem/SComponent/c_m3d.cpp + src/SSystem/SComponent/c_m3d_g_aab.cpp + src/SSystem/SComponent/c_m3d_g_cir.cpp + src/SSystem/SComponent/c_m3d_g_cps.cpp + src/SSystem/SComponent/c_m3d_g_cyl.cpp + src/SSystem/SComponent/c_m3d_g_lin.cpp + src/SSystem/SComponent/c_m3d_g_pla.cpp + src/SSystem/SComponent/c_m3d_g_sph.cpp + src/SSystem/SComponent/c_m3d_g_tri.cpp + src/SSystem/SComponent/c_m3d_g_vtx.cpp + src/SSystem/SComponent/c_lib.cpp + src/SSystem/SComponent/c_angle.cpp + src/SSystem/SStandard/s_basic.cpp ) add_library(JSystem_JParticle STATIC - libs/JSystem/src/JParticle/JPAResourceManager.cpp - libs/JSystem/src/JParticle/JPAResource.cpp - libs/JSystem/src/JParticle/JPABaseShape.cpp - libs/JSystem/src/JParticle/JPAExtraShape.cpp - libs/JSystem/src/JParticle/JPAChildShape.cpp - libs/JSystem/src/JParticle/JPAExTexShape.cpp - libs/JSystem/src/JParticle/JPADynamicsBlock.cpp - libs/JSystem/src/JParticle/JPAFieldBlock.cpp - libs/JSystem/src/JParticle/JPAKeyBlock.cpp - libs/JSystem/src/JParticle/JPATexture.cpp - libs/JSystem/src/JParticle/JPAResourceLoader.cpp - libs/JSystem/src/JParticle/JPAEmitterManager.cpp - libs/JSystem/src/JParticle/JPAEmitter.cpp - libs/JSystem/src/JParticle/JPAParticle.cpp - libs/JSystem/src/JParticle/JPAMath.cpp + libs/JSystem/src/JParticle/JPAResourceManager.cpp + libs/JSystem/src/JParticle/JPAResource.cpp + libs/JSystem/src/JParticle/JPABaseShape.cpp + libs/JSystem/src/JParticle/JPAExtraShape.cpp + libs/JSystem/src/JParticle/JPAChildShape.cpp + libs/JSystem/src/JParticle/JPAExTexShape.cpp + libs/JSystem/src/JParticle/JPADynamicsBlock.cpp + libs/JSystem/src/JParticle/JPAFieldBlock.cpp + libs/JSystem/src/JParticle/JPAKeyBlock.cpp + libs/JSystem/src/JParticle/JPATexture.cpp + libs/JSystem/src/JParticle/JPAResourceLoader.cpp + libs/JSystem/src/JParticle/JPAEmitterManager.cpp + libs/JSystem/src/JParticle/JPAEmitter.cpp + libs/JSystem/src/JParticle/JPAParticle.cpp + libs/JSystem/src/JParticle/JPAMath.cpp ) add_library(JSystem_JFramework STATIC - libs/JSystem/src/JFramework/JFWSystem.cpp - libs/JSystem/src/JFramework/JFWDisplay.cpp + libs/JSystem/src/JFramework/JFWSystem.cpp + libs/JSystem/src/JFramework/JFWDisplay.cpp ) add_library(JSystem_J3DU STATIC - libs/JSystem/src/J3DU/J3DUClipper.cpp - libs/JSystem/src/J3DU/J3DUDL.cpp + libs/JSystem/src/J3DU/J3DUClipper.cpp + libs/JSystem/src/J3DU/J3DUDL.cpp ) add_library(JSystem_JKernel STATIC - libs/JSystem/src/JKernel/JKRHeap.cpp - libs/JSystem/src/JKernel/JKRExpHeap.cpp - libs/JSystem/src/JKernel/JKRSolidHeap.cpp - libs/JSystem/src/JKernel/JKRAssertHeap.cpp - libs/JSystem/src/JKernel/JKRDisposer.cpp - libs/JSystem/src/JKernel/JKRThread.cpp - libs/JSystem/src/JKernel/JKRAram.cpp - libs/JSystem/src/JKernel/JKRAramHeap.cpp - libs/JSystem/src/JKernel/JKRAramBlock.cpp - libs/JSystem/src/JKernel/JKRAramPiece.cpp - libs/JSystem/src/JKernel/JKRAramStream.cpp - libs/JSystem/src/JKernel/JKRFileLoader.cpp - libs/JSystem/src/JKernel/JKRFileFinder.cpp - libs/JSystem/src/JKernel/JKRFileCache.cpp - libs/JSystem/src/JKernel/JKRArchivePub.cpp - libs/JSystem/src/JKernel/JKRArchivePri.cpp - libs/JSystem/src/JKernel/JKRMemArchive.cpp - libs/JSystem/src/JKernel/JKRAramArchive.cpp - libs/JSystem/src/JKernel/JKRDvdArchive.cpp - libs/JSystem/src/JKernel/JKRCompArchive.cpp - libs/JSystem/src/JKernel/JKRFile.cpp - libs/JSystem/src/JKernel/JKRDvdFile.cpp - libs/JSystem/src/JKernel/JKRDvdRipper.cpp - libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp - libs/JSystem/src/JKernel/JKRDecomp.cpp + libs/JSystem/src/JKernel/JKRHeap.cpp + libs/JSystem/src/JKernel/JKRExpHeap.cpp + libs/JSystem/src/JKernel/JKRSolidHeap.cpp + libs/JSystem/src/JKernel/JKRAssertHeap.cpp + libs/JSystem/src/JKernel/JKRDisposer.cpp + libs/JSystem/src/JKernel/JKRThread.cpp + libs/JSystem/src/JKernel/JKRAram.cpp + libs/JSystem/src/JKernel/JKRAramHeap.cpp + libs/JSystem/src/JKernel/JKRAramBlock.cpp + libs/JSystem/src/JKernel/JKRAramPiece.cpp + libs/JSystem/src/JKernel/JKRAramStream.cpp + libs/JSystem/src/JKernel/JKRFileLoader.cpp + libs/JSystem/src/JKernel/JKRFileFinder.cpp + libs/JSystem/src/JKernel/JKRFileCache.cpp + libs/JSystem/src/JKernel/JKRArchivePub.cpp + libs/JSystem/src/JKernel/JKRArchivePri.cpp + libs/JSystem/src/JKernel/JKRMemArchive.cpp + libs/JSystem/src/JKernel/JKRAramArchive.cpp + libs/JSystem/src/JKernel/JKRDvdArchive.cpp + libs/JSystem/src/JKernel/JKRCompArchive.cpp + libs/JSystem/src/JKernel/JKRFile.cpp + libs/JSystem/src/JKernel/JKRDvdFile.cpp + libs/JSystem/src/JKernel/JKRDvdRipper.cpp + libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp + libs/JSystem/src/JKernel/JKRDecomp.cpp ) add_library(JSystem_JMath STATIC - libs/JSystem/src/JMath/JMath.cpp - libs/JSystem/src/JMath/random.cpp - libs/JSystem/src/JMath/JMATrigonometric.cpp + libs/JSystem/src/JMath/JMath.cpp + libs/JSystem/src/JMath/random.cpp + libs/JSystem/src/JMath/JMATrigonometric.cpp ) add_library(JSystem_JSupport STATIC - libs/JSystem/src/JSupport/JSUList.cpp - libs/JSystem/src/JSupport/JSUInputStream.cpp - libs/JSystem/src/JSupport/JSUOutputStream.cpp - libs/JSystem/src/JSupport/JSUMemoryStream.cpp - libs/JSystem/src/JSupport/JSUFileStream.cpp + libs/JSystem/src/JSupport/JSUList.cpp + libs/JSystem/src/JSupport/JSUInputStream.cpp + libs/JSystem/src/JSupport/JSUOutputStream.cpp + libs/JSystem/src/JSupport/JSUMemoryStream.cpp + libs/JSystem/src/JSupport/JSUFileStream.cpp ) add_library(JSystem_JUtility STATIC - libs/JSystem/src/JUtility/JUTCacheFont.cpp - libs/JSystem/src/JUtility/JUTResource.cpp - libs/JSystem/src/JUtility/JUTTexture.cpp - libs/JSystem/src/JUtility/JUTPalette.cpp - libs/JSystem/src/JUtility/JUTNameTab.cpp - libs/JSystem/src/JUtility/JUTGraphFifo.cpp - libs/JSystem/src/JUtility/JUTFont.cpp - libs/JSystem/src/JUtility/JUTResFont.cpp - libs/JSystem/src/JUtility/JUTDbPrint.cpp - libs/JSystem/src/JUtility/JUTGamePad.cpp - libs/JSystem/src/JUtility/JUTException.cpp - libs/JSystem/src/JUtility/JUTDirectPrint.cpp - libs/JSystem/src/JUtility/JUTAssert.cpp - libs/JSystem/src/JUtility/JUTVideo.cpp - libs/JSystem/src/JUtility/JUTXfb.cpp - libs/JSystem/src/JUtility/JUTFader.cpp - libs/JSystem/src/JUtility/JUTProcBar.cpp - libs/JSystem/src/JUtility/JUTConsole.cpp - libs/JSystem/src/JUtility/JUTDirectFile.cpp - libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp + libs/JSystem/src/JUtility/JUTCacheFont.cpp + libs/JSystem/src/JUtility/JUTResource.cpp + libs/JSystem/src/JUtility/JUTTexture.cpp + libs/JSystem/src/JUtility/JUTPalette.cpp + libs/JSystem/src/JUtility/JUTNameTab.cpp + libs/JSystem/src/JUtility/JUTGraphFifo.cpp + libs/JSystem/src/JUtility/JUTFont.cpp + libs/JSystem/src/JUtility/JUTResFont.cpp + libs/JSystem/src/JUtility/JUTDbPrint.cpp + libs/JSystem/src/JUtility/JUTGamePad.cpp + libs/JSystem/src/JUtility/JUTException.cpp + libs/JSystem/src/JUtility/JUTDirectPrint.cpp + libs/JSystem/src/JUtility/JUTAssert.cpp + libs/JSystem/src/JUtility/JUTVideo.cpp + libs/JSystem/src/JUtility/JUTXfb.cpp + libs/JSystem/src/JUtility/JUTFader.cpp + libs/JSystem/src/JUtility/JUTProcBar.cpp + libs/JSystem/src/JUtility/JUTConsole.cpp + libs/JSystem/src/JUtility/JUTDirectFile.cpp + libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp ) add_library(JSystem_JStage STATIC - libs/JSystem/src/JStage/JSGActor.cpp - libs/JSystem/src/JStage/JSGAmbientLight.cpp - libs/JSystem/src/JStage/JSGCamera.cpp - libs/JSystem/src/JStage/JSGFog.cpp - libs/JSystem/src/JStage/JSGLight.cpp - libs/JSystem/src/JStage/JSGObject.cpp - libs/JSystem/src/JStage/JSGSystem.cpp + libs/JSystem/src/JStage/JSGActor.cpp + libs/JSystem/src/JStage/JSGAmbientLight.cpp + libs/JSystem/src/JStage/JSGCamera.cpp + libs/JSystem/src/JStage/JSGFog.cpp + libs/JSystem/src/JStage/JSGLight.cpp + libs/JSystem/src/JStage/JSGObject.cpp + libs/JSystem/src/JStage/JSGSystem.cpp ) add_library(JSystem_J2DGraph STATIC - libs/JSystem/src/J2DGraph/J2DGrafContext.cpp - libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp - libs/JSystem/src/J2DGraph/J2DTevs.cpp - libs/JSystem/src/J2DGraph/J2DMaterial.cpp - libs/JSystem/src/J2DGraph/J2DMatBlock.cpp - libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp - libs/JSystem/src/J2DGraph/J2DPrint.cpp - libs/JSystem/src/J2DGraph/J2DPane.cpp - libs/JSystem/src/J2DGraph/J2DScreen.cpp - libs/JSystem/src/J2DGraph/J2DWindow.cpp - libs/JSystem/src/J2DGraph/J2DPicture.cpp - libs/JSystem/src/J2DGraph/J2DTextBox.cpp - libs/JSystem/src/J2DGraph/J2DWindowEx.cpp - libs/JSystem/src/J2DGraph/J2DPictureEx.cpp - libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp - libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp - libs/JSystem/src/J2DGraph/J2DAnimation.cpp - libs/JSystem/src/J2DGraph/J2DManage.cpp + libs/JSystem/src/J2DGraph/J2DGrafContext.cpp + libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp + libs/JSystem/src/J2DGraph/J2DTevs.cpp + libs/JSystem/src/J2DGraph/J2DMaterial.cpp + libs/JSystem/src/J2DGraph/J2DMatBlock.cpp + libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp + libs/JSystem/src/J2DGraph/J2DPrint.cpp + libs/JSystem/src/J2DGraph/J2DPane.cpp + libs/JSystem/src/J2DGraph/J2DScreen.cpp + libs/JSystem/src/J2DGraph/J2DWindow.cpp + libs/JSystem/src/J2DGraph/J2DPicture.cpp + libs/JSystem/src/J2DGraph/J2DTextBox.cpp + libs/JSystem/src/J2DGraph/J2DWindowEx.cpp + libs/JSystem/src/J2DGraph/J2DPictureEx.cpp + libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp + libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp + libs/JSystem/src/J2DGraph/J2DAnimation.cpp + libs/JSystem/src/J2DGraph/J2DManage.cpp ) add_library(JSystem_J3DGraphBase STATIC - libs/JSystem/src/J3DGraphBase/J3DGD.cpp - libs/JSystem/src/J3DGraphBase/J3DSys.cpp - libs/JSystem/src/J3DGraphBase/J3DVertex.cpp - libs/JSystem/src/J3DGraphBase/J3DTransform.cpp - libs/JSystem/src/J3DGraphBase/J3DTexture.cpp - libs/JSystem/src/J3DGraphBase/J3DPacket.cpp - libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp - libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp - libs/JSystem/src/J3DGraphBase/J3DShape.cpp - libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp - libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp - libs/JSystem/src/J3DGraphBase/J3DTevs.cpp - libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp - libs/JSystem/src/J3DGraphBase/J3DStruct.cpp + libs/JSystem/src/J3DGraphBase/J3DGD.cpp + libs/JSystem/src/J3DGraphBase/J3DSys.cpp + libs/JSystem/src/J3DGraphBase/J3DVertex.cpp + libs/JSystem/src/J3DGraphBase/J3DTransform.cpp + libs/JSystem/src/J3DGraphBase/J3DTexture.cpp + libs/JSystem/src/J3DGraphBase/J3DPacket.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp + libs/JSystem/src/J3DGraphBase/J3DShape.cpp + libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp + libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp + libs/JSystem/src/J3DGraphBase/J3DTevs.cpp + libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp + libs/JSystem/src/J3DGraphBase/J3DStruct.cpp ) add_library(JSystem_J3DGraphAnimator STATIC - libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp - libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp - libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp - libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp - libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp - libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp - libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp - libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp - libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp + libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp + libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp + libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp + libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp ) add_library(JSystem_J3DGraphLoader STATIC - libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp - libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp - libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp - libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp - libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp - libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp + libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp + libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp ) add_library(JSystem_JStudio STATIC - libs/JSystem/src/JStudio/JStudio/ctb.cpp - libs/JSystem/src/JStudio/JStudio/ctb-data.cpp - libs/JSystem/src/JStudio/JStudio/functionvalue.cpp - libs/JSystem/src/JStudio/JStudio/fvb.cpp - libs/JSystem/src/JStudio/JStudio/fvb-data.cpp - libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp - libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp - libs/JSystem/src/JStudio/JStudio/object-id.cpp - libs/JSystem/src/JStudio/JStudio/stb.cpp - libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp - libs/JSystem/src/JStudio/JStudio/stb-data.cpp + libs/JSystem/src/JStudio/JStudio/ctb.cpp + libs/JSystem/src/JStudio/JStudio/ctb-data.cpp + libs/JSystem/src/JStudio/JStudio/functionvalue.cpp + libs/JSystem/src/JStudio/JStudio/fvb.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp + libs/JSystem/src/JStudio/JStudio/object-id.cpp + libs/JSystem/src/JStudio/JStudio/stb.cpp + libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/stb-data.cpp ) add_library(JSystem_JStudio_JStage STATIC - libs/JSystem/src/JStudio/JStudio_JStage/control.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp - libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp + libs/JSystem/src/JStudio/JStudio_JStage/control.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp ) add_library(JSystem_JStudio_JAudio2 STATIC - libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp - libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp ) add_library(JSystem_JStudio_JParticle STATIC - libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp - libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp ) add_library(JSystem_JAudio2 STATIC - libs/JSystem/src/JAudio2/JASCalc.cpp - libs/JSystem/src/JAudio2/JASTaskThread.cpp - libs/JSystem/src/JAudio2/JASDvdThread.cpp - libs/JSystem/src/JAudio2/JASCallback.cpp - libs/JSystem/src/JAudio2/JASHeapCtrl.cpp - libs/JSystem/src/JAudio2/JASResArcLoader.cpp - libs/JSystem/src/JAudio2/JASProbe.cpp - libs/JSystem/src/JAudio2/JASReport.cpp - libs/JSystem/src/JAudio2/JASCmdStack.cpp - libs/JSystem/src/JAudio2/JASTrack.cpp - libs/JSystem/src/JAudio2/JASTrackPort.cpp - libs/JSystem/src/JAudio2/JASRegisterParam.cpp - libs/JSystem/src/JAudio2/JASSeqCtrl.cpp - libs/JSystem/src/JAudio2/JASSeqParser.cpp - libs/JSystem/src/JAudio2/JASSeqReader.cpp - libs/JSystem/src/JAudio2/JASAramStream.cpp - libs/JSystem/src/JAudio2/JASBank.cpp - libs/JSystem/src/JAudio2/JASBasicBank.cpp - libs/JSystem/src/JAudio2/JASVoiceBank.cpp - libs/JSystem/src/JAudio2/JASBasicInst.cpp - libs/JSystem/src/JAudio2/JASDrumSet.cpp - libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp - libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp - libs/JSystem/src/JAudio2/JASWSParser.cpp - libs/JSystem/src/JAudio2/JASBNKParser.cpp - libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp - libs/JSystem/src/JAudio2/JASChannel.cpp - libs/JSystem/src/JAudio2/JASLfo.cpp - libs/JSystem/src/JAudio2/JASOscillator.cpp - libs/JSystem/src/JAudio2/JASAiCtrl.cpp - libs/JSystem/src/JAudio2/JASAudioThread.cpp - libs/JSystem/src/JAudio2/JASAudioReseter.cpp - libs/JSystem/src/JAudio2/JASDSPChannel.cpp - libs/JSystem/src/JAudio2/JASDSPInterface.cpp - libs/JSystem/src/JAudio2/JASDriverIF.cpp - libs/JSystem/src/JAudio2/JASSoundParams.cpp - libs/JSystem/src/JAudio2/JAIAudible.cpp - libs/JSystem/src/JAudio2/JAIAudience.cpp - libs/JSystem/src/JAudio2/JAISe.cpp - libs/JSystem/src/JAudio2/JAISeMgr.cpp - libs/JSystem/src/JAudio2/JAISeq.cpp - libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp - libs/JSystem/src/JAudio2/JAISeqMgr.cpp - libs/JSystem/src/JAudio2/JAISound.cpp - libs/JSystem/src/JAudio2/JAISoundChild.cpp - libs/JSystem/src/JAudio2/JAISoundHandles.cpp - libs/JSystem/src/JAudio2/JAISoundInfo.cpp - libs/JSystem/src/JAudio2/JAISoundParams.cpp - libs/JSystem/src/JAudio2/JAISoundStarter.cpp - libs/JSystem/src/JAudio2/JAIStream.cpp - libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp - libs/JSystem/src/JAudio2/JAIStreamMgr.cpp - libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp - libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp - libs/JSystem/src/JAudio2/JAUAudioMgr.cpp - libs/JSystem/src/JAudio2/JAUBankTable.cpp - libs/JSystem/src/JAudio2/JAUClusterSound.cpp - libs/JSystem/src/JAudio2/JAUInitializer.cpp - libs/JSystem/src/JAudio2/JAUSectionHeap.cpp - libs/JSystem/src/JAudio2/JAUSeqCollection.cpp - libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp - libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp - libs/JSystem/src/JAudio2/JAUSoundTable.cpp - libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp + libs/JSystem/src/JAudio2/JASCalc.cpp + libs/JSystem/src/JAudio2/JASTaskThread.cpp + libs/JSystem/src/JAudio2/JASDvdThread.cpp + libs/JSystem/src/JAudio2/JASCallback.cpp + libs/JSystem/src/JAudio2/JASHeapCtrl.cpp + libs/JSystem/src/JAudio2/JASResArcLoader.cpp + libs/JSystem/src/JAudio2/JASProbe.cpp + libs/JSystem/src/JAudio2/JASReport.cpp + libs/JSystem/src/JAudio2/JASCmdStack.cpp + libs/JSystem/src/JAudio2/JASTrack.cpp + libs/JSystem/src/JAudio2/JASTrackPort.cpp + libs/JSystem/src/JAudio2/JASRegisterParam.cpp + libs/JSystem/src/JAudio2/JASSeqCtrl.cpp + libs/JSystem/src/JAudio2/JASSeqParser.cpp + libs/JSystem/src/JAudio2/JASSeqReader.cpp + libs/JSystem/src/JAudio2/JASAramStream.cpp + libs/JSystem/src/JAudio2/JASBank.cpp + libs/JSystem/src/JAudio2/JASBasicBank.cpp + libs/JSystem/src/JAudio2/JASVoiceBank.cpp + libs/JSystem/src/JAudio2/JASBasicInst.cpp + libs/JSystem/src/JAudio2/JASDrumSet.cpp + libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp + libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp + libs/JSystem/src/JAudio2/JASWSParser.cpp + libs/JSystem/src/JAudio2/JASBNKParser.cpp + libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp + libs/JSystem/src/JAudio2/JASChannel.cpp + libs/JSystem/src/JAudio2/JASLfo.cpp + libs/JSystem/src/JAudio2/JASOscillator.cpp + libs/JSystem/src/JAudio2/JASAiCtrl.cpp + libs/JSystem/src/JAudio2/JASAudioThread.cpp + libs/JSystem/src/JAudio2/JASAudioReseter.cpp + libs/JSystem/src/JAudio2/JASDSPChannel.cpp + libs/JSystem/src/JAudio2/JASDSPInterface.cpp + libs/JSystem/src/JAudio2/JASDriverIF.cpp + libs/JSystem/src/JAudio2/JASSoundParams.cpp + libs/JSystem/src/JAudio2/JAIAudible.cpp + libs/JSystem/src/JAudio2/JAIAudience.cpp + libs/JSystem/src/JAudio2/JAISe.cpp + libs/JSystem/src/JAudio2/JAISeMgr.cpp + libs/JSystem/src/JAudio2/JAISeq.cpp + libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp + libs/JSystem/src/JAudio2/JAISeqMgr.cpp + libs/JSystem/src/JAudio2/JAISound.cpp + libs/JSystem/src/JAudio2/JAISoundChild.cpp + libs/JSystem/src/JAudio2/JAISoundHandles.cpp + libs/JSystem/src/JAudio2/JAISoundInfo.cpp + libs/JSystem/src/JAudio2/JAISoundParams.cpp + libs/JSystem/src/JAudio2/JAISoundStarter.cpp + libs/JSystem/src/JAudio2/JAIStream.cpp + libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp + libs/JSystem/src/JAudio2/JAIStreamMgr.cpp + libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp + libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp + libs/JSystem/src/JAudio2/JAUAudioMgr.cpp + libs/JSystem/src/JAudio2/JAUBankTable.cpp + libs/JSystem/src/JAudio2/JAUClusterSound.cpp + libs/JSystem/src/JAudio2/JAUInitializer.cpp + libs/JSystem/src/JAudio2/JAUSectionHeap.cpp + libs/JSystem/src/JAudio2/JAUSeqCollection.cpp + libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp + libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp + libs/JSystem/src/JAudio2/JAUSoundTable.cpp + libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp ) add_library(JSystem_JMessage STATIC - libs/JSystem/src/JMessage/control.cpp - libs/JSystem/src/JMessage/data.cpp - libs/JSystem/src/JMessage/processor.cpp - libs/JSystem/src/JMessage/resource.cpp - libs/JSystem/src/JMessage/locale.cpp + libs/JSystem/src/JMessage/control.cpp + libs/JSystem/src/JMessage/data.cpp + libs/JSystem/src/JMessage/processor.cpp + libs/JSystem/src/JMessage/resource.cpp + libs/JSystem/src/JMessage/locale.cpp ) add_library(JSystem_JGadget STATIC - libs/JSystem/src/JGadget/binary.cpp - libs/JSystem/src/JGadget/define.cpp - libs/JSystem/src/JGadget/linklist.cpp - libs/JSystem/src/JGadget/search.cpp - libs/JSystem/src/JGadget/std-vector.cpp + libs/JSystem/src/JGadget/binary.cpp + libs/JSystem/src/JGadget/define.cpp + libs/JSystem/src/JGadget/linklist.cpp + libs/JSystem/src/JGadget/search.cpp + libs/JSystem/src/JGadget/std-vector.cpp ) add_library(JSystem_JAHostIO STATIC - libs/JSystem/src/JAHostIO/JAHFrameNode.cpp - libs/JSystem/src/JAHostIO/JAHioMessage.cpp - libs/JSystem/src/JAHostIO/JAHioMgr.cpp - libs/JSystem/src/JAHostIO/JAHioNode.cpp - libs/JSystem/src/JAHostIO/JAHioUtil.cpp - libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp + libs/JSystem/src/JAHostIO/JAHFrameNode.cpp + libs/JSystem/src/JAHostIO/JAHioMessage.cpp + libs/JSystem/src/JAHostIO/JAHioMgr.cpp + libs/JSystem/src/JAHostIO/JAHioNode.cpp + libs/JSystem/src/JAHostIO/JAHioUtil.cpp + libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp ) add_library(JSystem_JHostIO STATIC - libs/JSystem/src/JHostIO/JORFile.cpp - libs/JSystem/src/JHostIO/JORHostInfo.cpp - libs/JSystem/src/JHostIO/JORMessageBox.cpp - libs/JSystem/src/JHostIO/JORServer.cpp - libs/JSystem/src/JHostIO/JHIhioASync.cpp - libs/JSystem/src/JHostIO/JHIRMcc.cpp - libs/JSystem/src/JHostIO/JHIMccBuf.cpp + libs/JSystem/src/JHostIO/JORFile.cpp + libs/JSystem/src/JHostIO/JORHostInfo.cpp + libs/JSystem/src/JHostIO/JORMessageBox.cpp + libs/JSystem/src/JHostIO/JORServer.cpp + libs/JSystem/src/JHostIO/JHIhioASync.cpp + libs/JSystem/src/JHostIO/JHIRMcc.cpp + libs/JSystem/src/JHostIO/JHIMccBuf.cpp ) set(JSYSTEM_LIBRARIES - JSystem_JParticle - JSystem_JFramework - JSystem_J3DU - JSystem_JKernel - JSystem_JMath - JSystem_JSupport - JSystem_JUtility - JSystem_JStage - JSystem_J2DGraph - JSystem_J3DGraphBase - JSystem_J3DGraphAnimator - JSystem_J3DGraphLoader - JSystem_JStudio - JSystem_JStudio_JStage - JSystem_JStudio_JAudio2 - JSystem_JStudio_JParticle - JSystem_JAudio2 - JSystem_JMessage - JSystem_JGadget - JSystem_JAHostIO - JSystem_JHostIO + JSystem_JParticle + JSystem_JFramework + JSystem_J3DU + JSystem_JKernel + JSystem_JMath + JSystem_JSupport + JSystem_JUtility + JSystem_JStage + JSystem_J2DGraph + JSystem_J3DGraphBase + JSystem_J3DGraphAnimator + JSystem_J3DGraphLoader + JSystem_JStudio + JSystem_JStudio_JStage + JSystem_JStudio_JAudio2 + JSystem_JStudio_JParticle + JSystem_JAudio2 + JSystem_JMessage + JSystem_JGadget + JSystem_JAHostIO + JSystem_JHostIO ) set(REL_FILES - src/f_pc/f_pc_profile_lst.cpp - src/d/actor/d_a_andsw.cpp - src/d/actor/d_a_bg.cpp - src/d/actor/d_a_bg_obj.cpp - src/d/actor/d_a_dmidna.cpp - src/d/actor/d_a_door_dbdoor00.cpp - src/d/actor/d_a_door_knob00.cpp - src/d/actor/d_a_door_shutter.cpp - src/d/actor/d_a_door_spiral.cpp - src/d/actor/d_a_dshutter.cpp - src/d/actor/d_a_ep.cpp - src/d/actor/d_a_hitobj.cpp - src/d/actor/d_a_kytag00.cpp - src/d/actor/d_a_kytag04.cpp - src/d/actor/d_a_kytag17.cpp - src/d/actor/d_a_obj_brakeeff.cpp - src/d/actor/d_a_obj_burnbox.cpp - src/d/actor/d_a_obj_carry.cpp - src/d/actor/d_a_obj_ito.cpp - src/d/actor/d_a_obj_movebox.cpp - src/d/actor/d_a_obj_swpush.cpp - src/d/actor/d_a_obj_timer.cpp - src/d/actor/d_a_path_line.cpp - src/d/actor/d_a_scene_exit.cpp - src/d/actor/d_a_set_bgobj.cpp - src/d/actor/d_a_swhit0.cpp - src/d/actor/d_a_tag_allmato.cpp - src/d/actor/d_a_tag_camera.cpp - src/d/actor/d_a_tag_chkpoint.cpp - src/d/actor/d_a_tag_event.cpp - src/d/actor/d_a_tag_evt.cpp - src/d/actor/d_a_tag_evtarea.cpp - src/d/actor/d_a_tag_evtmsg.cpp - src/d/actor/d_a_tag_howl.cpp - src/d/actor/d_a_tag_kmsg.cpp - src/d/actor/d_a_tag_lantern.cpp - src/d/actor/d_a_tag_mist.cpp - src/d/actor/d_a_tag_msg.cpp - src/d/actor/d_a_tag_push.cpp - src/d/actor/d_a_tag_telop.cpp - src/d/actor/d_a_tbox.cpp - src/d/actor/d_a_tbox2.cpp - src/d/actor/d_a_vrbox.cpp - src/d/actor/d_a_vrbox2.cpp - src/d/actor/d_a_arrow.cpp - src/d/actor/d_a_boomerang.cpp - src/d/actor/d_a_crod.cpp - src/d/actor/d_a_demo00.cpp - src/d/actor/d_a_disappear.cpp - src/d/actor/d_a_mg_rod.cpp - src/d/actor/d_a_midna.cpp - src/d/actor/d_a_nbomb.cpp - src/d/actor/d_a_obj_life_container.cpp - src/d/actor/d_a_obj_yousei.cpp - src/d/actor/d_a_spinner.cpp - src/d/actor/d_a_suspend.cpp - src/d/actor/d_a_tag_attention.cpp - src/d/actor/d_a_alldie.cpp - src/d/actor/d_a_andsw2.cpp - src/d/actor/d_a_bd.cpp - src/d/actor/d_a_canoe.cpp - src/d/actor/d_a_cstaF.cpp - src/d/actor/d_a_demo_item.cpp - src/d/actor/d_a_door_bossL1.cpp - src/d/actor/d_a_e_dn.cpp - src/d/actor/d_a_e_fm.cpp - src/d/actor/d_a_e_ga.cpp - src/d/actor/d_a_e_hb.cpp - src/d/actor/d_a_e_nest.cpp - src/d/actor/d_a_e_rd.cpp - src/d/actor/d_a_econt.cpp - src/d/actor/d_a_fr.cpp - src/d/actor/d_a_grass.cpp - src/d/actor/d_a_kytag05.cpp - src/d/actor/d_a_kytag10.cpp - src/d/actor/d_a_kytag11.cpp - src/d/actor/d_a_kytag14.cpp - src/d/actor/d_a_mg_fish.cpp - src/d/actor/d_a_npc_besu.cpp - src/d/actor/d_a_npc_fairy_seirei.cpp - src/d/actor/d_a_npc_fish.cpp - src/d/actor/d_a_npc_henna.cpp - src/d/actor/d_a_npc_kakashi.cpp - src/d/actor/d_a_npc_kkri.cpp - src/d/actor/d_a_npc_kolin.cpp - src/d/actor/d_a_npc_maro.cpp - src/d/actor/d_a_npc_taro.cpp - src/d/actor/d_a_npc_tkj.cpp - src/d/actor/d_a_obj_bhashi.cpp - src/d/actor/d_a_obj_bkdoor.cpp - src/d/actor/d_a_obj_bosswarp.cpp - src/d/actor/d_a_obj_cboard.cpp - src/d/actor/d_a_obj_digplace.cpp - src/d/actor/d_a_obj_eff.cpp - src/d/actor/d_a_obj_fmobj.cpp - src/d/actor/d_a_obj_gpTaru.cpp - src/d/actor/d_a_obj_hhashi.cpp - src/d/actor/d_a_obj_kanban2.cpp - src/d/actor/d_a_obj_kbacket.cpp - src/d/actor/d_a_obj_kgate.cpp - src/d/actor/d_a_obj_klift00.cpp - src/d/actor/d_a_obj_ktOnFire.cpp - src/d/actor/d_a_obj_ladder.cpp - src/d/actor/d_a_obj_lv2Candle.cpp - src/d/actor/d_a_obj_magne_arm.cpp - src/d/actor/d_a_obj_metalbox.cpp - src/d/actor/d_a_obj_mgate.cpp - src/d/actor/d_a_obj_nameplate.cpp - src/d/actor/d_a_obj_ornament_cloth.cpp - src/d/actor/d_a_obj_rope_bridge.cpp - src/d/actor/d_a_obj_sWallShutter.cpp - src/d/actor/d_a_obj_stick.cpp - src/d/actor/d_a_obj_stoneMark.cpp - src/d/actor/d_a_obj_swpropeller.cpp - src/d/actor/d_a_obj_swpush5.cpp - src/d/actor/d_a_obj_yobikusa.cpp - src/d/actor/d_a_scene_exit2.cpp - src/d/actor/d_a_shop_item.cpp - src/d/actor/d_a_sq.cpp - src/d/actor/d_a_swc00.cpp - src/d/actor/d_a_tag_CstaSw.cpp - src/d/actor/d_a_tag_ajnot.cpp - src/d/actor/d_a_tag_attack_item.cpp - src/d/actor/d_a_tag_gstart.cpp - src/d/actor/d_a_tag_hinit.cpp - src/d/actor/d_a_tag_hjump.cpp - src/d/actor/d_a_tag_hstop.cpp - src/d/actor/d_a_tag_lv2prchk.cpp - src/d/actor/d_a_tag_magne.cpp - src/d/actor/d_a_tag_mhint.cpp - src/d/actor/d_a_tag_mstop.cpp - src/d/actor/d_a_tag_spring.cpp - src/d/actor/d_a_tag_statue_evt.cpp - src/d/actor/d_a_ykgr.cpp - src/d/actor/d_a_L7demo_dr.cpp - src/d/actor/d_a_L7low_dr.cpp - src/d/actor/d_a_L7op_demo_dr.cpp - src/d/actor/d_a_b_bh.cpp - src/d/actor/d_a_b_bq.cpp - src/d/actor/d_a_b_dr.cpp - src/d/actor/d_a_b_dre.cpp - src/d/actor/d_a_b_ds.cpp - src/d/actor/d_a_b_gg.cpp - src/d/actor/d_a_b_gm.cpp - src/d/actor/d_a_b_gnd.cpp - src/d/actor/d_a_b_go.cpp - src/d/actor/d_a_b_gos.cpp - src/d/actor/d_a_b_mgn.cpp - src/d/actor/d_a_b_ob.cpp - src/d/actor/d_a_b_oh.cpp - src/d/actor/d_a_b_oh2.cpp - src/d/actor/d_a_b_tn.cpp - src/d/actor/d_a_b_yo.cpp - src/d/actor/d_a_b_yo_ice.cpp - src/d/actor/d_a_b_zant.cpp - src/d/actor/d_a_b_zant_magic.cpp - src/d/actor/d_a_b_zant_mobile.cpp - src/d/actor/d_a_b_zant_sima.cpp - src/d/actor/d_a_balloon_2D.cpp - src/d/actor/d_a_bullet.cpp - src/d/actor/d_a_coach_2D.cpp - src/d/actor/d_a_coach_fire.cpp - src/d/actor/d_a_cow.cpp - src/d/actor/d_a_cstatue.cpp - src/d/actor/d_a_do.cpp - src/d/actor/d_a_door_boss.cpp - src/d/actor/d_a_door_bossL5.cpp - src/d/actor/d_a_door_mbossL1.cpp - src/d/actor/d_a_door_push.cpp - src/d/actor/d_a_e_ai.cpp - src/d/actor/d_a_e_arrow.cpp - src/d/actor/d_a_e_ba.cpp - src/d/actor/d_a_e_bee.cpp - src/d/actor/d_a_e_bg.cpp - src/d/actor/d_a_e_bi.cpp - src/d/actor/d_a_e_bi_leaf.cpp - src/d/actor/d_a_e_bs.cpp - src/d/actor/d_a_e_bu.cpp - src/d/actor/d_a_e_bug.cpp - src/d/actor/d_a_e_cr.cpp - src/d/actor/d_a_e_cr_egg.cpp - src/d/actor/d_a_e_db.cpp - src/d/actor/d_a_e_db_leaf.cpp - src/d/actor/d_a_e_dd.cpp - src/d/actor/d_a_e_df.cpp - src/d/actor/d_a_e_dk.cpp - src/d/actor/d_a_e_dt.cpp - src/d/actor/d_a_e_fb.cpp - src/d/actor/d_a_e_fk.cpp - src/d/actor/d_a_e_fs.cpp - src/d/actor/d_a_e_fz.cpp - src/d/actor/d_a_e_gb.cpp - src/d/actor/d_a_e_ge.cpp - src/d/actor/d_a_e_gi.cpp - src/d/actor/d_a_e_gm.cpp - src/d/actor/d_a_e_gob.cpp - src/d/actor/d_a_e_gs.cpp - src/d/actor/d_a_e_hb_leaf.cpp - src/d/actor/d_a_e_hm.cpp - src/d/actor/d_a_e_hp.cpp - src/d/actor/d_a_e_hz.cpp - src/d/actor/d_a_e_hzelda.cpp - src/d/actor/d_a_e_is.cpp - src/d/actor/d_a_e_kg.cpp - src/d/actor/d_a_e_kk.cpp - src/d/actor/d_a_e_kr.cpp - src/d/actor/d_a_e_mb.cpp - src/d/actor/d_a_e_md.cpp - src/d/actor/d_a_e_mf.cpp - src/d/actor/d_a_e_mk.cpp - src/d/actor/d_a_e_mk_bo.cpp - src/d/actor/d_a_e_mm.cpp - src/d/actor/d_a_e_mm_mt.cpp - src/d/actor/d_a_e_ms.cpp - src/d/actor/d_a_e_nz.cpp - src/d/actor/d_a_e_oc.cpp - src/d/actor/d_a_e_oct_bg.cpp - src/d/actor/d_a_e_ot.cpp - src/d/actor/d_a_e_ph.cpp - src/d/actor/d_a_e_pm.cpp - src/d/actor/d_a_e_po.cpp - src/d/actor/d_a_e_pz.cpp - src/d/actor/d_a_e_rb.cpp - src/d/actor/d_a_e_rdb.cpp - src/d/actor/d_a_e_rdy.cpp - src/d/actor/d_a_e_s1.cpp - src/d/actor/d_a_e_sb.cpp - src/d/actor/d_a_e_sf.cpp - src/d/actor/d_a_e_sg.cpp - src/d/actor/d_a_e_sh.cpp - src/d/actor/d_a_e_sm.cpp - src/d/actor/d_a_e_sm2.cpp - src/d/actor/d_a_e_st.cpp - src/d/actor/d_a_e_st_line.cpp - src/d/actor/d_a_e_sw.cpp - src/d/actor/d_a_e_th.cpp - src/d/actor/d_a_e_th_ball.cpp - src/d/actor/d_a_e_tk.cpp - src/d/actor/d_a_e_tk2.cpp - src/d/actor/d_a_e_tk_ball.cpp - src/d/actor/d_a_e_tt.cpp - src/d/actor/d_a_e_vt.cpp - src/d/actor/d_a_e_warpappear.cpp - src/d/actor/d_a_e_wb.cpp - src/d/actor/d_a_e_ws.cpp - src/d/actor/d_a_e_ww.cpp - src/d/actor/d_a_e_yc.cpp - src/d/actor/d_a_e_yd.cpp - src/d/actor/d_a_e_yd_leaf.cpp - src/d/actor/d_a_e_yg.cpp - src/d/actor/d_a_e_yh.cpp - src/d/actor/d_a_e_yk.cpp - src/d/actor/d_a_e_ym.cpp - src/d/actor/d_a_e_ym_tag.cpp - src/d/actor/d_a_e_ymb.cpp - src/d/actor/d_a_e_yr.cpp - src/d/actor/d_a_e_zh.cpp - src/d/actor/d_a_e_zm.cpp - src/d/actor/d_a_e_zs.cpp - src/d/actor/d_a_formation_mng.cpp - src/d/actor/d_a_guard_mng.cpp - src/d/actor/d_a_horse.cpp - src/d/actor/d_a_hozelda.cpp - src/d/actor/d_a_izumi_gate.cpp - src/d/actor/d_a_kago.cpp - src/d/actor/d_a_kytag01.cpp - src/d/actor/d_a_kytag02.cpp - src/d/actor/d_a_kytag03.cpp - src/d/actor/d_a_kytag06.cpp - src/d/actor/d_a_kytag07.cpp - src/d/actor/d_a_kytag08.cpp - src/d/actor/d_a_kytag09.cpp - src/d/actor/d_a_kytag12.cpp - src/d/actor/d_a_kytag13.cpp - src/d/actor/d_a_kytag15.cpp - src/d/actor/d_a_kytag16.cpp - src/d/actor/d_a_mant.cpp - src/d/actor/d_a_mg_fshop.cpp - src/d/actor/d_a_mirror.cpp - src/d/actor/d_a_movie_player.cpp - src/d/actor/d_a_myna.cpp - src/d/actor/d_a_ni.cpp - src/d/actor/d_a_npc_aru.cpp - src/d/actor/d_a_npc_ash.cpp - src/d/actor/d_a_npc_ashB.cpp - src/d/actor/d_a_npc_bans.cpp - src/d/actor/d_a_npc_blue_ns.cpp - src/d/actor/d_a_npc_bou.cpp - src/d/actor/d_a_npc_bouS.cpp - src/d/actor/d_a_npc_cdn3.cpp - src/d/actor/d_a_npc_chat.cpp - src/d/actor/d_a_npc_chin.cpp - src/d/actor/d_a_npc_clerka.cpp - src/d/actor/d_a_npc_clerkb.cpp - src/d/actor/d_a_npc_clerkt.cpp - src/d/actor/d_a_npc_coach.cpp - src/d/actor/d_a_npc_df.cpp - src/d/actor/d_a_npc_doc.cpp - src/d/actor/d_a_npc_doorboy.cpp - src/d/actor/d_a_npc_drainSol.cpp - src/d/actor/d_a_npc_du.cpp - src/d/actor/d_a_npc_fairy.cpp - src/d/actor/d_a_npc_fguard.cpp - src/d/actor/d_a_npc_gnd.cpp - src/d/actor/d_a_npc_gra.cpp - src/d/actor/d_a_npc_grc.cpp - src/d/actor/d_a_npc_grd.cpp - src/d/actor/d_a_npc_grm.cpp - src/d/actor/d_a_npc_grmc.cpp - src/d/actor/d_a_npc_gro.cpp - src/d/actor/d_a_npc_grr.cpp - src/d/actor/d_a_npc_grs.cpp - src/d/actor/d_a_npc_grz.cpp - src/d/actor/d_a_npc_guard.cpp - src/d/actor/d_a_npc_gwolf.cpp - src/d/actor/d_a_npc_hanjo.cpp - src/d/actor/d_a_npc_henna0.cpp - src/d/actor/d_a_npc_hoz.cpp - src/d/actor/d_a_npc_impal.cpp - src/d/actor/d_a_npc_inko.cpp - src/d/actor/d_a_npc_ins.cpp - src/d/actor/d_a_npc_jagar.cpp - src/d/actor/d_a_npc_kasi_hana.cpp - src/d/actor/d_a_npc_kasi_kyu.cpp - src/d/actor/d_a_npc_kasi_mich.cpp - src/d/actor/d_a_npc_kdk.cpp - src/d/actor/d_a_npc_kn.cpp - src/d/actor/d_a_npc_knj.cpp - src/d/actor/d_a_npc_kolinb.cpp - src/d/actor/d_a_npc_ks.cpp - src/d/actor/d_a_npc_kyury.cpp - src/d/actor/d_a_npc_len.cpp - src/d/actor/d_a_npc_lf.cpp - src/d/actor/d_a_npc_lud.cpp - src/d/actor/d_a_npc_midp.cpp - src/d/actor/d_a_npc_mk.cpp - src/d/actor/d_a_npc_moi.cpp - src/d/actor/d_a_npc_moir.cpp - src/d/actor/d_a_npc_myna2.cpp - src/d/actor/d_a_npc_ne.cpp - src/d/actor/d_a_npc_p2.cpp - src/d/actor/d_a_npc_pachi_besu.cpp - src/d/actor/d_a_npc_pachi_maro.cpp - src/d/actor/d_a_npc_pachi_taro.cpp - src/d/actor/d_a_npc_passer.cpp - src/d/actor/d_a_npc_passer2.cpp - src/d/actor/d_a_npc_post.cpp - src/d/actor/d_a_npc_pouya.cpp - src/d/actor/d_a_npc_prayer.cpp - src/d/actor/d_a_npc_raca.cpp - src/d/actor/d_a_npc_rafrel.cpp - src/d/actor/d_a_npc_saru.cpp - src/d/actor/d_a_npc_seib.cpp - src/d/actor/d_a_npc_seic.cpp - src/d/actor/d_a_npc_seid.cpp - src/d/actor/d_a_npc_seira.cpp - src/d/actor/d_a_npc_seira2.cpp - src/d/actor/d_a_npc_seirei.cpp - src/d/actor/d_a_npc_shad.cpp - src/d/actor/d_a_npc_shaman.cpp - src/d/actor/d_a_npc_shoe.cpp - src/d/actor/d_a_npc_shop0.cpp - src/d/actor/d_a_npc_shop_maro.cpp - src/d/actor/d_a_npc_sola.cpp - src/d/actor/d_a_npc_soldierA.cpp - src/d/actor/d_a_npc_soldierB.cpp - src/d/actor/d_a_npc_sq.cpp - src/d/actor/d_a_npc_the.cpp - src/d/actor/d_a_npc_theB.cpp - src/d/actor/d_a_npc_tk.cpp - src/d/actor/d_a_npc_tkc.cpp - src/d/actor/d_a_npc_tkj2.cpp - src/d/actor/d_a_npc_tks.cpp - src/d/actor/d_a_npc_toby.cpp - src/d/actor/d_a_npc_tr.cpp - src/d/actor/d_a_npc_uri.cpp - src/d/actor/d_a_npc_worm.cpp - src/d/actor/d_a_npc_wrestler.cpp - src/d/actor/d_a_npc_yamid.cpp - src/d/actor/d_a_npc_yamis.cpp - src/d/actor/d_a_npc_yamit.cpp - src/d/actor/d_a_npc_yelia.cpp - src/d/actor/d_a_npc_ykm.cpp - src/d/actor/d_a_npc_ykw.cpp - src/d/actor/d_a_npc_zanb.cpp - src/d/actor/d_a_npc_zant.cpp - src/d/actor/d_a_npc_zelR.cpp - src/d/actor/d_a_npc_zelRo.cpp - src/d/actor/d_a_npc_zelda.cpp - src/d/actor/d_a_npc_zra.cpp - src/d/actor/d_a_npc_zrc.cpp - src/d/actor/d_a_npc_zrz.cpp - src/d/actor/d_a_obj_Lv5Key.cpp - src/d/actor/d_a_obj_Turara.cpp - src/d/actor/d_a_obj_TvCdlst.cpp - src/d/actor/d_a_obj_Y_taihou.cpp - src/d/actor/d_a_obj_amiShutter.cpp - src/d/actor/d_a_obj_ari.cpp - src/d/actor/d_a_obj_automata.cpp - src/d/actor/d_a_obj_avalanche.cpp - src/d/actor/d_a_obj_balloon.cpp - src/d/actor/d_a_obj_barDesk.cpp - src/d/actor/d_a_obj_batta.cpp - src/d/actor/d_a_obj_bbox.cpp - src/d/actor/d_a_obj_bed.cpp - src/d/actor/d_a_obj_bemos.cpp - src/d/actor/d_a_obj_bhbridge.cpp - src/d/actor/d_a_obj_bk_leaf.cpp - src/d/actor/d_a_obj_bky_rock.cpp - src/d/actor/d_a_obj_bmWindow.cpp - src/d/actor/d_a_obj_bmshutter.cpp - src/d/actor/d_a_obj_bombf.cpp - src/d/actor/d_a_obj_boumato.cpp - src/d/actor/d_a_obj_brg.cpp - src/d/actor/d_a_obj_bsGate.cpp - src/d/actor/d_a_obj_bubblePilar.cpp - src/d/actor/d_a_obj_catdoor.cpp - src/d/actor/d_a_obj_cb.cpp - src/d/actor/d_a_obj_cblock.cpp - src/d/actor/d_a_obj_cdoor.cpp - src/d/actor/d_a_obj_chandelier.cpp - src/d/actor/d_a_obj_chest.cpp - src/d/actor/d_a_obj_cho.cpp - src/d/actor/d_a_obj_cowdoor.cpp - src/d/actor/d_a_obj_crope.cpp - src/d/actor/d_a_obj_crvfence.cpp - src/d/actor/d_a_obj_crvgate.cpp - src/d/actor/d_a_obj_crvhahen.cpp - src/d/actor/d_a_obj_crvlh_down.cpp - src/d/actor/d_a_obj_crvlh_up.cpp - src/d/actor/d_a_obj_crvsteel.cpp - src/d/actor/d_a_obj_crystal.cpp - src/d/actor/d_a_obj_cwall.cpp - src/d/actor/d_a_obj_damCps.cpp - src/d/actor/d_a_obj_dan.cpp - src/d/actor/d_a_obj_digholl.cpp - src/d/actor/d_a_obj_digsnow.cpp - src/d/actor/d_a_obj_dmelevator.cpp - src/d/actor/d_a_obj_drop.cpp - src/d/actor/d_a_obj_dust.cpp - src/d/actor/d_a_obj_enemy_create.cpp - src/d/actor/d_a_obj_fallobj.cpp - src/d/actor/d_a_obj_fan.cpp - src/d/actor/d_a_obj_fchain.cpp - src/d/actor/d_a_obj_fireWood.cpp - src/d/actor/d_a_obj_fireWood2.cpp - src/d/actor/d_a_obj_firepillar.cpp - src/d/actor/d_a_obj_firepillar2.cpp - src/d/actor/d_a_obj_flag.cpp - src/d/actor/d_a_obj_flag2.cpp - src/d/actor/d_a_obj_flag3.cpp - src/d/actor/d_a_obj_food.cpp - src/d/actor/d_a_obj_fw.cpp - src/d/actor/d_a_obj_gadget.cpp - src/d/actor/d_a_obj_ganonwall.cpp - src/d/actor/d_a_obj_ganonwall2.cpp - src/d/actor/d_a_obj_gb.cpp - src/d/actor/d_a_obj_geyser.cpp - src/d/actor/d_a_obj_glowSphere.cpp - src/d/actor/d_a_obj_gm.cpp - src/d/actor/d_a_obj_goGate.cpp - src/d/actor/d_a_obj_gomikabe.cpp - src/d/actor/d_a_obj_gra2.cpp - src/d/actor/d_a_obj_graWall.cpp - src/d/actor/d_a_obj_gra_rock.cpp - src/d/actor/d_a_obj_grave_stone.cpp - src/d/actor/d_a_obj_groundwater.cpp - src/d/actor/d_a_obj_grz_rock.cpp - src/d/actor/d_a_obj_h_saku.cpp - src/d/actor/d_a_obj_hakai_brl.cpp - src/d/actor/d_a_obj_hakai_ftr.cpp - src/d/actor/d_a_obj_hasu2.cpp - src/d/actor/d_a_obj_hata.cpp - src/d/actor/d_a_obj_hb.cpp - src/d/actor/d_a_obj_hbombkoya.cpp - src/d/actor/d_a_obj_heavySw.cpp - src/d/actor/d_a_obj_hfuta.cpp - src/d/actor/d_a_obj_hsTarget.cpp - src/d/actor/d_a_obj_ice_l.cpp - src/d/actor/d_a_obj_ice_s.cpp - src/d/actor/d_a_obj_iceblock.cpp - src/d/actor/d_a_obj_iceleaf.cpp - src/d/actor/d_a_obj_ihasi.cpp - src/d/actor/d_a_obj_ikada.cpp - src/d/actor/d_a_obj_inobone.cpp - src/d/actor/d_a_obj_ita.cpp - src/d/actor/d_a_obj_itamato.cpp - src/d/actor/d_a_obj_kabuto.cpp - src/d/actor/d_a_obj_kag.cpp - src/d/actor/d_a_obj_kage.cpp - src/d/actor/d_a_obj_kago.cpp - src/d/actor/d_a_obj_kaisou.cpp - src/d/actor/d_a_obj_kamakiri.cpp - src/d/actor/d_a_obj_kantera.cpp - src/d/actor/d_a_obj_katatsumuri.cpp - src/d/actor/d_a_obj_kazeneko.cpp - src/d/actor/d_a_obj_kbox.cpp - src/d/actor/d_a_obj_key.cpp - src/d/actor/d_a_obj_keyhole.cpp - src/d/actor/d_a_obj_ki.cpp - src/d/actor/d_a_obj_kiPot.cpp - src/d/actor/d_a_obj_kita.cpp - src/d/actor/d_a_obj_kjgjs.cpp - src/d/actor/d_a_obj_kkanban.cpp - src/d/actor/d_a_obj_knBullet.cpp - src/d/actor/d_a_obj_kshutter.cpp - src/d/actor/d_a_obj_kuwagata.cpp - src/d/actor/d_a_obj_kwheel00.cpp - src/d/actor/d_a_obj_kwheel01.cpp - src/d/actor/d_a_obj_kznkarm.cpp - src/d/actor/d_a_obj_laundry.cpp - src/d/actor/d_a_obj_laundry_rope.cpp - src/d/actor/d_a_obj_lbox.cpp - src/d/actor/d_a_obj_lp.cpp - src/d/actor/d_a_obj_lv1Candle00.cpp - src/d/actor/d_a_obj_lv1Candle01.cpp - src/d/actor/d_a_obj_lv3Candle.cpp - src/d/actor/d_a_obj_lv3Water.cpp - src/d/actor/d_a_obj_lv3Water2.cpp - src/d/actor/d_a_obj_lv3WaterB.cpp - src/d/actor/d_a_obj_lv3saka00.cpp - src/d/actor/d_a_obj_lv3waterEff.cpp - src/d/actor/d_a_obj_lv4CandleDemoTag.cpp - src/d/actor/d_a_obj_lv4CandleTag.cpp - src/d/actor/d_a_obj_lv4EdShutter.cpp - src/d/actor/d_a_obj_lv4Gate.cpp - src/d/actor/d_a_obj_lv4HsTarget.cpp - src/d/actor/d_a_obj_lv4PoGate.cpp - src/d/actor/d_a_obj_lv4RailWall.cpp - src/d/actor/d_a_obj_lv4SlideWall.cpp - src/d/actor/d_a_obj_lv4bridge.cpp - src/d/actor/d_a_obj_lv4chandelier.cpp - src/d/actor/d_a_obj_lv4digsand.cpp - src/d/actor/d_a_obj_lv4floor.cpp - src/d/actor/d_a_obj_lv4gear.cpp - src/d/actor/d_a_obj_lv4prelvtr.cpp - src/d/actor/d_a_obj_lv4prwall.cpp - src/d/actor/d_a_obj_lv4sand.cpp - src/d/actor/d_a_obj_lv5FloorBoard.cpp - src/d/actor/d_a_obj_lv5IceWall.cpp - src/d/actor/d_a_obj_lv5SwIce.cpp - src/d/actor/d_a_obj_lv5ychndlr.cpp - src/d/actor/d_a_obj_lv5yiblltray.cpp - src/d/actor/d_a_obj_lv6ChangeGate.cpp - src/d/actor/d_a_obj_lv6FurikoTrap.cpp - src/d/actor/d_a_obj_lv6Lblock.cpp - src/d/actor/d_a_obj_lv6SwGate.cpp - src/d/actor/d_a_obj_lv6SzGate.cpp - src/d/actor/d_a_obj_lv6Tenbin.cpp - src/d/actor/d_a_obj_lv6TogeRoll.cpp - src/d/actor/d_a_obj_lv6TogeTrap.cpp - src/d/actor/d_a_obj_lv6bemos.cpp - src/d/actor/d_a_obj_lv6bemos2.cpp - src/d/actor/d_a_obj_lv6egate.cpp - src/d/actor/d_a_obj_lv6elevta.cpp - src/d/actor/d_a_obj_lv6swturn.cpp - src/d/actor/d_a_obj_lv7BsGate.cpp - src/d/actor/d_a_obj_lv7PropellerY.cpp - src/d/actor/d_a_obj_lv7bridge.cpp - src/d/actor/d_a_obj_lv8KekkaiTrap.cpp - src/d/actor/d_a_obj_lv8Lift.cpp - src/d/actor/d_a_obj_lv8OptiLift.cpp - src/d/actor/d_a_obj_lv8UdFloor.cpp - src/d/actor/d_a_obj_lv9SwShutter.cpp - src/d/actor/d_a_obj_magLift.cpp - src/d/actor/d_a_obj_magLiftRot.cpp - src/d/actor/d_a_obj_maki.cpp - src/d/actor/d_a_obj_master_sword.cpp - src/d/actor/d_a_obj_mato.cpp - src/d/actor/d_a_obj_mhole.cpp - src/d/actor/d_a_obj_mie.cpp - src/d/actor/d_a_obj_mirror_6pole.cpp - src/d/actor/d_a_obj_mirror_chain.cpp - src/d/actor/d_a_obj_mirror_sand.cpp - src/d/actor/d_a_obj_mirror_screw.cpp - src/d/actor/d_a_obj_mirror_table.cpp - src/d/actor/d_a_obj_msima.cpp - src/d/actor/d_a_obj_mvstair.cpp - src/d/actor/d_a_obj_myogan.cpp - src/d/actor/d_a_obj_nagaisu.cpp - src/d/actor/d_a_obj_nan.cpp - src/d/actor/d_a_obj_ndoor.cpp - src/d/actor/d_a_obj_nougu.cpp - src/d/actor/d_a_obj_octhashi.cpp - src/d/actor/d_a_obj_oiltubo.cpp - src/d/actor/d_a_obj_onsen.cpp - src/d/actor/d_a_obj_onsenFire.cpp - src/d/actor/d_a_obj_onsenTaru.cpp - src/d/actor/d_a_obj_pdoor.cpp - src/d/actor/d_a_obj_pdtile.cpp - src/d/actor/d_a_obj_pdwall.cpp - src/d/actor/d_a_obj_picture.cpp - src/d/actor/d_a_obj_pillar.cpp - src/d/actor/d_a_obj_pleaf.cpp - src/d/actor/d_a_obj_poCandle.cpp - src/d/actor/d_a_obj_poFire.cpp - src/d/actor/d_a_obj_poTbox.cpp - src/d/actor/d_a_obj_prop.cpp - src/d/actor/d_a_obj_pumpkin.cpp - src/d/actor/d_a_obj_rcircle.cpp - src/d/actor/d_a_obj_rfHole.cpp - src/d/actor/d_a_obj_rgate.cpp - src/d/actor/d_a_obj_riverrock.cpp - src/d/actor/d_a_obj_rock.cpp - src/d/actor/d_a_obj_rotBridge.cpp - src/d/actor/d_a_obj_rotTrap.cpp - src/d/actor/d_a_obj_roten.cpp - src/d/actor/d_a_obj_rstair.cpp - src/d/actor/d_a_obj_rw.cpp - src/d/actor/d_a_obj_saidan.cpp - src/d/actor/d_a_obj_sakuita.cpp - src/d/actor/d_a_obj_sakuita_rope.cpp - src/d/actor/d_a_obj_scannon.cpp - src/d/actor/d_a_obj_scannon_crs.cpp - src/d/actor/d_a_obj_scannon_ten.cpp - src/d/actor/d_a_obj_sekidoor.cpp - src/d/actor/d_a_obj_sekizo.cpp - src/d/actor/d_a_obj_sekizoa.cpp - src/d/actor/d_a_obj_shield.cpp - src/d/actor/d_a_obj_sm_door.cpp - src/d/actor/d_a_obj_smallkey.cpp - src/d/actor/d_a_obj_smgdoor.cpp - src/d/actor/d_a_obj_smoke.cpp - src/d/actor/d_a_obj_smtile.cpp - src/d/actor/d_a_obj_smw_stone.cpp - src/d/actor/d_a_obj_snowEffTag.cpp - src/d/actor/d_a_obj_snow_soup.cpp - src/d/actor/d_a_obj_so.cpp - src/d/actor/d_a_obj_spinLift.cpp - src/d/actor/d_a_obj_ss_drink.cpp - src/d/actor/d_a_obj_ss_item.cpp - src/d/actor/d_a_obj_stairBlock.cpp - src/d/actor/d_a_obj_stone.cpp - src/d/actor/d_a_obj_stopper.cpp - src/d/actor/d_a_obj_stopper2.cpp - src/d/actor/d_a_obj_suisya.cpp - src/d/actor/d_a_obj_sw.cpp - src/d/actor/d_a_obj_swBallA.cpp - src/d/actor/d_a_obj_swBallB.cpp - src/d/actor/d_a_obj_swBallC.cpp - src/d/actor/d_a_obj_swLight.cpp - src/d/actor/d_a_obj_swchain.cpp - src/d/actor/d_a_obj_swhang.cpp - src/d/actor/d_a_obj_sword.cpp - src/d/actor/d_a_obj_swpush2.cpp - src/d/actor/d_a_obj_swspinner.cpp - src/d/actor/d_a_obj_swturn.cpp - src/d/actor/d_a_obj_syRock.cpp - src/d/actor/d_a_obj_szbridge.cpp - src/d/actor/d_a_obj_taFence.cpp - src/d/actor/d_a_obj_table.cpp - src/d/actor/d_a_obj_takaraDai.cpp - src/d/actor/d_a_obj_tatigi.cpp - src/d/actor/d_a_obj_ten.cpp - src/d/actor/d_a_obj_testcube.cpp - src/d/actor/d_a_obj_tgake.cpp - src/d/actor/d_a_obj_thashi.cpp - src/d/actor/d_a_obj_thdoor.cpp - src/d/actor/d_a_obj_timeFire.cpp - src/d/actor/d_a_obj_tks.cpp - src/d/actor/d_a_obj_tmoon.cpp - src/d/actor/d_a_obj_toaru_maki.cpp - src/d/actor/d_a_obj_toby.cpp - src/d/actor/d_a_obj_tobyhouse.cpp - src/d/actor/d_a_obj_togeTrap.cpp - src/d/actor/d_a_obj_tombo.cpp - src/d/actor/d_a_obj_tornado.cpp - src/d/actor/d_a_obj_tornado2.cpp - src/d/actor/d_a_obj_tp.cpp - src/d/actor/d_a_obj_treesh.cpp - src/d/actor/d_a_obj_twGate.cpp - src/d/actor/d_a_obj_udoor.cpp - src/d/actor/d_a_obj_usaku.cpp - src/d/actor/d_a_obj_vground.cpp - src/d/actor/d_a_obj_volcball.cpp - src/d/actor/d_a_obj_volcbom.cpp - src/d/actor/d_a_obj_warp_kbrg.cpp - src/d/actor/d_a_obj_warp_obrg.cpp - src/d/actor/d_a_obj_waterGate.cpp - src/d/actor/d_a_obj_waterPillar.cpp - src/d/actor/d_a_obj_waterfall.cpp - src/d/actor/d_a_obj_wchain.cpp - src/d/actor/d_a_obj_wdStick.cpp - src/d/actor/d_a_obj_web0.cpp - src/d/actor/d_a_obj_web1.cpp - src/d/actor/d_a_obj_well_cover.cpp - src/d/actor/d_a_obj_wflag.cpp - src/d/actor/d_a_obj_wind_stone.cpp - src/d/actor/d_a_obj_window.cpp - src/d/actor/d_a_obj_wood_pendulum.cpp - src/d/actor/d_a_obj_wood_statue.cpp - src/d/actor/d_a_obj_wsword.cpp - src/d/actor/d_a_obj_yel_bag.cpp - src/d/actor/d_a_obj_ystone.cpp - src/d/actor/d_a_obj_zcloth.cpp - src/d/actor/d_a_obj_zdoor.cpp - src/d/actor/d_a_obj_zrTurara.cpp - src/d/actor/d_a_obj_zrTuraraRock.cpp - src/d/actor/d_a_obj_zraMark.cpp - src/d/actor/d_a_obj_zra_freeze.cpp - src/d/actor/d_a_obj_zra_rock.cpp - src/d/actor/d_a_passer_mng.cpp - src/d/actor/d_a_tag_arena.cpp - src/d/actor/d_a_peru.cpp - src/d/actor/d_a_ppolamp.cpp - src/d/actor/d_a_skip_2D.cpp - src/d/actor/d_a_startAndGoal.cpp - src/d/actor/d_a_swBall.cpp - src/d/actor/d_a_swLBall.cpp - src/d/actor/d_a_swTime.cpp - src/d/actor/d_a_tag_Lv6Gate.cpp - src/d/actor/d_a_tag_Lv7Gate.cpp - src/d/actor/d_a_tag_Lv8Gate.cpp - src/d/actor/d_a_tag_TWgate.cpp - src/d/actor/d_a_tag_lv6CstaSw.cpp - src/d/actor/d_a_tag_assistance.cpp - src/d/actor/d_a_tag_bottle_item.cpp - src/d/actor/d_a_tag_chgrestart.cpp - src/d/actor/d_a_tag_csw.cpp - src/d/actor/d_a_tag_escape.cpp - src/d/actor/d_a_tag_firewall.cpp - src/d/actor/d_a_tag_gra.cpp - src/d/actor/d_a_tag_guard.cpp - src/d/actor/d_a_tag_instruction.cpp - src/d/actor/d_a_tag_kago_fall.cpp - src/d/actor/d_a_tag_lightball.cpp - src/d/actor/d_a_tag_lv5soup.cpp - src/d/actor/d_a_tag_mmsg.cpp - src/d/actor/d_a_tag_mwait.cpp - src/d/actor/d_a_tag_myna2.cpp - src/d/actor/d_a_tag_myna_light.cpp - src/d/actor/d_a_tag_pachi.cpp - src/d/actor/d_a_tag_poFire.cpp - src/d/actor/d_a_tag_qs.cpp - src/d/actor/d_a_tag_ret_room.cpp - src/d/actor/d_a_tag_river_back.cpp - src/d/actor/d_a_tag_rmbit_sw.cpp - src/d/actor/d_a_tag_schedule.cpp - src/d/actor/d_a_tag_setBall.cpp - src/d/actor/d_a_tag_setrestart.cpp - src/d/actor/d_a_tag_shop_camera.cpp - src/d/actor/d_a_tag_shop_item.cpp - src/d/actor/d_a_tag_smk_emt.cpp - src/d/actor/d_a_tag_spinner.cpp - src/d/actor/d_a_tag_sppath.cpp - src/d/actor/d_a_tag_ss_drink.cpp - src/d/actor/d_a_tag_stream.cpp - src/d/actor/d_a_tag_theB_hint.cpp - src/d/actor/d_a_tag_wara_howl.cpp - src/d/actor/d_a_tag_watchge.cpp - src/d/actor/d_a_tag_waterfall.cpp - src/d/actor/d_a_tag_wljump.cpp - src/d/actor/d_a_tag_yami.cpp - src/d/actor/d_a_talk.cpp - src/d/actor/d_a_tboxSw.cpp - src/d/actor/d_a_title.cpp - src/d/actor/d_a_warp_bug.cpp + src/f_pc/f_pc_profile_lst.cpp + src/d/actor/d_a_andsw.cpp + src/d/actor/d_a_bg.cpp + src/d/actor/d_a_bg_obj.cpp + src/d/actor/d_a_dmidna.cpp + src/d/actor/d_a_door_dbdoor00.cpp + src/d/actor/d_a_door_knob00.cpp + src/d/actor/d_a_door_shutter.cpp + src/d/actor/d_a_door_spiral.cpp + src/d/actor/d_a_dshutter.cpp + src/d/actor/d_a_ep.cpp + src/d/actor/d_a_hitobj.cpp + src/d/actor/d_a_kytag00.cpp + src/d/actor/d_a_kytag04.cpp + src/d/actor/d_a_kytag17.cpp + src/d/actor/d_a_obj_brakeeff.cpp + src/d/actor/d_a_obj_burnbox.cpp + src/d/actor/d_a_obj_carry.cpp + src/d/actor/d_a_obj_ito.cpp + src/d/actor/d_a_obj_movebox.cpp + src/d/actor/d_a_obj_swpush.cpp + src/d/actor/d_a_obj_timer.cpp + src/d/actor/d_a_path_line.cpp + src/d/actor/d_a_scene_exit.cpp + src/d/actor/d_a_set_bgobj.cpp + src/d/actor/d_a_swhit0.cpp + src/d/actor/d_a_tag_allmato.cpp + src/d/actor/d_a_tag_camera.cpp + src/d/actor/d_a_tag_chkpoint.cpp + src/d/actor/d_a_tag_event.cpp + src/d/actor/d_a_tag_evt.cpp + src/d/actor/d_a_tag_evtarea.cpp + src/d/actor/d_a_tag_evtmsg.cpp + src/d/actor/d_a_tag_howl.cpp + src/d/actor/d_a_tag_kmsg.cpp + src/d/actor/d_a_tag_lantern.cpp + src/d/actor/d_a_tag_mist.cpp + src/d/actor/d_a_tag_msg.cpp + src/d/actor/d_a_tag_push.cpp + src/d/actor/d_a_tag_telop.cpp + src/d/actor/d_a_tbox.cpp + src/d/actor/d_a_tbox2.cpp + src/d/actor/d_a_vrbox.cpp + src/d/actor/d_a_vrbox2.cpp + src/d/actor/d_a_arrow.cpp + src/d/actor/d_a_boomerang.cpp + src/d/actor/d_a_crod.cpp + src/d/actor/d_a_demo00.cpp + src/d/actor/d_a_disappear.cpp + src/d/actor/d_a_mg_rod.cpp + src/d/actor/d_a_midna.cpp + src/d/actor/d_a_nbomb.cpp + src/d/actor/d_a_obj_life_container.cpp + src/d/actor/d_a_obj_yousei.cpp + src/d/actor/d_a_spinner.cpp + src/d/actor/d_a_suspend.cpp + src/d/actor/d_a_tag_attention.cpp + src/d/actor/d_a_alldie.cpp + src/d/actor/d_a_andsw2.cpp + src/d/actor/d_a_bd.cpp + src/d/actor/d_a_canoe.cpp + src/d/actor/d_a_cstaF.cpp + src/d/actor/d_a_demo_item.cpp + src/d/actor/d_a_door_bossL1.cpp + src/d/actor/d_a_e_dn.cpp + src/d/actor/d_a_e_fm.cpp + src/d/actor/d_a_e_ga.cpp + src/d/actor/d_a_e_hb.cpp + src/d/actor/d_a_e_nest.cpp + src/d/actor/d_a_e_rd.cpp + src/d/actor/d_a_econt.cpp + src/d/actor/d_a_fr.cpp + src/d/actor/d_a_grass.cpp + src/d/actor/d_a_kytag05.cpp + src/d/actor/d_a_kytag10.cpp + src/d/actor/d_a_kytag11.cpp + src/d/actor/d_a_kytag14.cpp + src/d/actor/d_a_mg_fish.cpp + src/d/actor/d_a_npc_besu.cpp + src/d/actor/d_a_npc_fairy_seirei.cpp + src/d/actor/d_a_npc_fish.cpp + src/d/actor/d_a_npc_henna.cpp + src/d/actor/d_a_npc_kakashi.cpp + src/d/actor/d_a_npc_kkri.cpp + src/d/actor/d_a_npc_kolin.cpp + src/d/actor/d_a_npc_maro.cpp + src/d/actor/d_a_npc_taro.cpp + src/d/actor/d_a_npc_tkj.cpp + src/d/actor/d_a_obj_bhashi.cpp + src/d/actor/d_a_obj_bkdoor.cpp + src/d/actor/d_a_obj_bosswarp.cpp + src/d/actor/d_a_obj_cboard.cpp + src/d/actor/d_a_obj_digplace.cpp + src/d/actor/d_a_obj_eff.cpp + src/d/actor/d_a_obj_fmobj.cpp + src/d/actor/d_a_obj_gpTaru.cpp + src/d/actor/d_a_obj_hhashi.cpp + src/d/actor/d_a_obj_kanban2.cpp + src/d/actor/d_a_obj_kbacket.cpp + src/d/actor/d_a_obj_kgate.cpp + src/d/actor/d_a_obj_klift00.cpp + src/d/actor/d_a_obj_ktOnFire.cpp + src/d/actor/d_a_obj_ladder.cpp + src/d/actor/d_a_obj_lv2Candle.cpp + src/d/actor/d_a_obj_magne_arm.cpp + src/d/actor/d_a_obj_metalbox.cpp + src/d/actor/d_a_obj_mgate.cpp + src/d/actor/d_a_obj_nameplate.cpp + src/d/actor/d_a_obj_ornament_cloth.cpp + src/d/actor/d_a_obj_rope_bridge.cpp + src/d/actor/d_a_obj_sWallShutter.cpp + src/d/actor/d_a_obj_stick.cpp + src/d/actor/d_a_obj_stoneMark.cpp + src/d/actor/d_a_obj_swpropeller.cpp + src/d/actor/d_a_obj_swpush5.cpp + src/d/actor/d_a_obj_yobikusa.cpp + src/d/actor/d_a_scene_exit2.cpp + src/d/actor/d_a_shop_item.cpp + src/d/actor/d_a_sq.cpp + src/d/actor/d_a_swc00.cpp + src/d/actor/d_a_tag_CstaSw.cpp + src/d/actor/d_a_tag_ajnot.cpp + src/d/actor/d_a_tag_attack_item.cpp + src/d/actor/d_a_tag_gstart.cpp + src/d/actor/d_a_tag_hinit.cpp + src/d/actor/d_a_tag_hjump.cpp + src/d/actor/d_a_tag_hstop.cpp + src/d/actor/d_a_tag_lv2prchk.cpp + src/d/actor/d_a_tag_magne.cpp + src/d/actor/d_a_tag_mhint.cpp + src/d/actor/d_a_tag_mstop.cpp + src/d/actor/d_a_tag_spring.cpp + src/d/actor/d_a_tag_statue_evt.cpp + src/d/actor/d_a_ykgr.cpp + src/d/actor/d_a_L7demo_dr.cpp + src/d/actor/d_a_L7low_dr.cpp + src/d/actor/d_a_L7op_demo_dr.cpp + src/d/actor/d_a_b_bh.cpp + src/d/actor/d_a_b_bq.cpp + src/d/actor/d_a_b_dr.cpp + src/d/actor/d_a_b_dre.cpp + src/d/actor/d_a_b_ds.cpp + src/d/actor/d_a_b_gg.cpp + src/d/actor/d_a_b_gm.cpp + src/d/actor/d_a_b_gnd.cpp + src/d/actor/d_a_b_go.cpp + src/d/actor/d_a_b_gos.cpp + src/d/actor/d_a_b_mgn.cpp + src/d/actor/d_a_b_ob.cpp + src/d/actor/d_a_b_oh.cpp + src/d/actor/d_a_b_oh2.cpp + src/d/actor/d_a_b_tn.cpp + src/d/actor/d_a_b_yo.cpp + src/d/actor/d_a_b_yo_ice.cpp + src/d/actor/d_a_b_zant.cpp + src/d/actor/d_a_b_zant_magic.cpp + src/d/actor/d_a_b_zant_mobile.cpp + src/d/actor/d_a_b_zant_sima.cpp + src/d/actor/d_a_balloon_2D.cpp + src/d/actor/d_a_bullet.cpp + src/d/actor/d_a_coach_2D.cpp + src/d/actor/d_a_coach_fire.cpp + src/d/actor/d_a_cow.cpp + src/d/actor/d_a_cstatue.cpp + src/d/actor/d_a_do.cpp + src/d/actor/d_a_door_boss.cpp + src/d/actor/d_a_door_bossL5.cpp + src/d/actor/d_a_door_mbossL1.cpp + src/d/actor/d_a_door_push.cpp + src/d/actor/d_a_e_ai.cpp + src/d/actor/d_a_e_arrow.cpp + src/d/actor/d_a_e_ba.cpp + src/d/actor/d_a_e_bee.cpp + src/d/actor/d_a_e_bg.cpp + src/d/actor/d_a_e_bi.cpp + src/d/actor/d_a_e_bi_leaf.cpp + src/d/actor/d_a_e_bs.cpp + src/d/actor/d_a_e_bu.cpp + src/d/actor/d_a_e_bug.cpp + src/d/actor/d_a_e_cr.cpp + src/d/actor/d_a_e_cr_egg.cpp + src/d/actor/d_a_e_db.cpp + src/d/actor/d_a_e_db_leaf.cpp + src/d/actor/d_a_e_dd.cpp + src/d/actor/d_a_e_df.cpp + src/d/actor/d_a_e_dk.cpp + src/d/actor/d_a_e_dt.cpp + src/d/actor/d_a_e_fb.cpp + src/d/actor/d_a_e_fk.cpp + src/d/actor/d_a_e_fs.cpp + src/d/actor/d_a_e_fz.cpp + src/d/actor/d_a_e_gb.cpp + src/d/actor/d_a_e_ge.cpp + src/d/actor/d_a_e_gi.cpp + src/d/actor/d_a_e_gm.cpp + src/d/actor/d_a_e_gob.cpp + src/d/actor/d_a_e_gs.cpp + src/d/actor/d_a_e_hb_leaf.cpp + src/d/actor/d_a_e_hm.cpp + src/d/actor/d_a_e_hp.cpp + src/d/actor/d_a_e_hz.cpp + src/d/actor/d_a_e_hzelda.cpp + src/d/actor/d_a_e_is.cpp + src/d/actor/d_a_e_kg.cpp + src/d/actor/d_a_e_kk.cpp + src/d/actor/d_a_e_kr.cpp + src/d/actor/d_a_e_mb.cpp + src/d/actor/d_a_e_md.cpp + src/d/actor/d_a_e_mf.cpp + src/d/actor/d_a_e_mk.cpp + src/d/actor/d_a_e_mk_bo.cpp + src/d/actor/d_a_e_mm.cpp + src/d/actor/d_a_e_mm_mt.cpp + src/d/actor/d_a_e_ms.cpp + src/d/actor/d_a_e_nz.cpp + src/d/actor/d_a_e_oc.cpp + src/d/actor/d_a_e_oct_bg.cpp + src/d/actor/d_a_e_ot.cpp + src/d/actor/d_a_e_ph.cpp + src/d/actor/d_a_e_pm.cpp + src/d/actor/d_a_e_po.cpp + src/d/actor/d_a_e_pz.cpp + src/d/actor/d_a_e_rb.cpp + src/d/actor/d_a_e_rdb.cpp + src/d/actor/d_a_e_rdy.cpp + src/d/actor/d_a_e_s1.cpp + src/d/actor/d_a_e_sb.cpp + src/d/actor/d_a_e_sf.cpp + src/d/actor/d_a_e_sg.cpp + src/d/actor/d_a_e_sh.cpp + src/d/actor/d_a_e_sm.cpp + src/d/actor/d_a_e_sm2.cpp + src/d/actor/d_a_e_st.cpp + src/d/actor/d_a_e_st_line.cpp + src/d/actor/d_a_e_sw.cpp + src/d/actor/d_a_e_th.cpp + src/d/actor/d_a_e_th_ball.cpp + src/d/actor/d_a_e_tk.cpp + src/d/actor/d_a_e_tk2.cpp + src/d/actor/d_a_e_tk_ball.cpp + src/d/actor/d_a_e_tt.cpp + src/d/actor/d_a_e_vt.cpp + src/d/actor/d_a_e_warpappear.cpp + src/d/actor/d_a_e_wb.cpp + src/d/actor/d_a_e_ws.cpp + src/d/actor/d_a_e_ww.cpp + src/d/actor/d_a_e_yc.cpp + src/d/actor/d_a_e_yd.cpp + src/d/actor/d_a_e_yd_leaf.cpp + src/d/actor/d_a_e_yg.cpp + src/d/actor/d_a_e_yh.cpp + src/d/actor/d_a_e_yk.cpp + src/d/actor/d_a_e_ym.cpp + src/d/actor/d_a_e_ym_tag.cpp + src/d/actor/d_a_e_ymb.cpp + src/d/actor/d_a_e_yr.cpp + src/d/actor/d_a_e_zh.cpp + src/d/actor/d_a_e_zm.cpp + src/d/actor/d_a_e_zs.cpp + src/d/actor/d_a_formation_mng.cpp + src/d/actor/d_a_guard_mng.cpp + src/d/actor/d_a_horse.cpp + src/d/actor/d_a_hozelda.cpp + src/d/actor/d_a_izumi_gate.cpp + src/d/actor/d_a_kago.cpp + src/d/actor/d_a_kytag01.cpp + src/d/actor/d_a_kytag02.cpp + src/d/actor/d_a_kytag03.cpp + src/d/actor/d_a_kytag06.cpp + src/d/actor/d_a_kytag07.cpp + src/d/actor/d_a_kytag08.cpp + src/d/actor/d_a_kytag09.cpp + src/d/actor/d_a_kytag12.cpp + src/d/actor/d_a_kytag13.cpp + src/d/actor/d_a_kytag15.cpp + src/d/actor/d_a_kytag16.cpp + src/d/actor/d_a_mant.cpp + src/d/actor/d_a_mg_fshop.cpp + src/d/actor/d_a_mirror.cpp + src/d/actor/d_a_movie_player.cpp + src/d/actor/d_a_myna.cpp + src/d/actor/d_a_ni.cpp + src/d/actor/d_a_npc_aru.cpp + src/d/actor/d_a_npc_ash.cpp + src/d/actor/d_a_npc_ashB.cpp + src/d/actor/d_a_npc_bans.cpp + src/d/actor/d_a_npc_blue_ns.cpp + src/d/actor/d_a_npc_bou.cpp + src/d/actor/d_a_npc_bouS.cpp + src/d/actor/d_a_npc_cdn3.cpp + src/d/actor/d_a_npc_chat.cpp + src/d/actor/d_a_npc_chin.cpp + src/d/actor/d_a_npc_clerka.cpp + src/d/actor/d_a_npc_clerkb.cpp + src/d/actor/d_a_npc_clerkt.cpp + src/d/actor/d_a_npc_coach.cpp + src/d/actor/d_a_npc_df.cpp + src/d/actor/d_a_npc_doc.cpp + src/d/actor/d_a_npc_doorboy.cpp + src/d/actor/d_a_npc_drainSol.cpp + src/d/actor/d_a_npc_du.cpp + src/d/actor/d_a_npc_fairy.cpp + src/d/actor/d_a_npc_fguard.cpp + src/d/actor/d_a_npc_gnd.cpp + src/d/actor/d_a_npc_gra.cpp + src/d/actor/d_a_npc_grc.cpp + src/d/actor/d_a_npc_grd.cpp + src/d/actor/d_a_npc_grm.cpp + src/d/actor/d_a_npc_grmc.cpp + src/d/actor/d_a_npc_gro.cpp + src/d/actor/d_a_npc_grr.cpp + src/d/actor/d_a_npc_grs.cpp + src/d/actor/d_a_npc_grz.cpp + src/d/actor/d_a_npc_guard.cpp + src/d/actor/d_a_npc_gwolf.cpp + src/d/actor/d_a_npc_hanjo.cpp + src/d/actor/d_a_npc_henna0.cpp + src/d/actor/d_a_npc_hoz.cpp + src/d/actor/d_a_npc_impal.cpp + src/d/actor/d_a_npc_inko.cpp + src/d/actor/d_a_npc_ins.cpp + src/d/actor/d_a_npc_jagar.cpp + src/d/actor/d_a_npc_kasi_hana.cpp + src/d/actor/d_a_npc_kasi_kyu.cpp + src/d/actor/d_a_npc_kasi_mich.cpp + src/d/actor/d_a_npc_kdk.cpp + src/d/actor/d_a_npc_kn.cpp + src/d/actor/d_a_npc_knj.cpp + src/d/actor/d_a_npc_kolinb.cpp + src/d/actor/d_a_npc_ks.cpp + src/d/actor/d_a_npc_kyury.cpp + src/d/actor/d_a_npc_len.cpp + src/d/actor/d_a_npc_lf.cpp + src/d/actor/d_a_npc_lud.cpp + src/d/actor/d_a_npc_midp.cpp + src/d/actor/d_a_npc_mk.cpp + src/d/actor/d_a_npc_moi.cpp + src/d/actor/d_a_npc_moir.cpp + src/d/actor/d_a_npc_myna2.cpp + src/d/actor/d_a_npc_ne.cpp + src/d/actor/d_a_npc_p2.cpp + src/d/actor/d_a_npc_pachi_besu.cpp + src/d/actor/d_a_npc_pachi_maro.cpp + src/d/actor/d_a_npc_pachi_taro.cpp + src/d/actor/d_a_npc_passer.cpp + src/d/actor/d_a_npc_passer2.cpp + src/d/actor/d_a_npc_post.cpp + src/d/actor/d_a_npc_pouya.cpp + src/d/actor/d_a_npc_prayer.cpp + src/d/actor/d_a_npc_raca.cpp + src/d/actor/d_a_npc_rafrel.cpp + src/d/actor/d_a_npc_saru.cpp + src/d/actor/d_a_npc_seib.cpp + src/d/actor/d_a_npc_seic.cpp + src/d/actor/d_a_npc_seid.cpp + src/d/actor/d_a_npc_seira.cpp + src/d/actor/d_a_npc_seira2.cpp + src/d/actor/d_a_npc_seirei.cpp + src/d/actor/d_a_npc_shad.cpp + src/d/actor/d_a_npc_shaman.cpp + src/d/actor/d_a_npc_shoe.cpp + src/d/actor/d_a_npc_shop0.cpp + src/d/actor/d_a_npc_shop_maro.cpp + src/d/actor/d_a_npc_sola.cpp + src/d/actor/d_a_npc_soldierA.cpp + src/d/actor/d_a_npc_soldierB.cpp + src/d/actor/d_a_npc_sq.cpp + src/d/actor/d_a_npc_the.cpp + src/d/actor/d_a_npc_theB.cpp + src/d/actor/d_a_npc_tk.cpp + src/d/actor/d_a_npc_tkc.cpp + src/d/actor/d_a_npc_tkj2.cpp + src/d/actor/d_a_npc_tks.cpp + src/d/actor/d_a_npc_toby.cpp + src/d/actor/d_a_npc_tr.cpp + src/d/actor/d_a_npc_uri.cpp + src/d/actor/d_a_npc_worm.cpp + src/d/actor/d_a_npc_wrestler.cpp + src/d/actor/d_a_npc_yamid.cpp + src/d/actor/d_a_npc_yamis.cpp + src/d/actor/d_a_npc_yamit.cpp + src/d/actor/d_a_npc_yelia.cpp + src/d/actor/d_a_npc_ykm.cpp + src/d/actor/d_a_npc_ykw.cpp + src/d/actor/d_a_npc_zanb.cpp + src/d/actor/d_a_npc_zant.cpp + src/d/actor/d_a_npc_zelR.cpp + src/d/actor/d_a_npc_zelRo.cpp + src/d/actor/d_a_npc_zelda.cpp + src/d/actor/d_a_npc_zra.cpp + src/d/actor/d_a_npc_zrc.cpp + src/d/actor/d_a_npc_zrz.cpp + src/d/actor/d_a_obj_Lv5Key.cpp + src/d/actor/d_a_obj_Turara.cpp + src/d/actor/d_a_obj_TvCdlst.cpp + src/d/actor/d_a_obj_Y_taihou.cpp + src/d/actor/d_a_obj_amiShutter.cpp + src/d/actor/d_a_obj_ari.cpp + src/d/actor/d_a_obj_automata.cpp + src/d/actor/d_a_obj_avalanche.cpp + src/d/actor/d_a_obj_balloon.cpp + src/d/actor/d_a_obj_barDesk.cpp + src/d/actor/d_a_obj_batta.cpp + src/d/actor/d_a_obj_bbox.cpp + src/d/actor/d_a_obj_bed.cpp + src/d/actor/d_a_obj_bemos.cpp + src/d/actor/d_a_obj_bhbridge.cpp + src/d/actor/d_a_obj_bk_leaf.cpp + src/d/actor/d_a_obj_bky_rock.cpp + src/d/actor/d_a_obj_bmWindow.cpp + src/d/actor/d_a_obj_bmshutter.cpp + src/d/actor/d_a_obj_bombf.cpp + src/d/actor/d_a_obj_boumato.cpp + src/d/actor/d_a_obj_brg.cpp + src/d/actor/d_a_obj_bsGate.cpp + src/d/actor/d_a_obj_bubblePilar.cpp + src/d/actor/d_a_obj_catdoor.cpp + src/d/actor/d_a_obj_cb.cpp + src/d/actor/d_a_obj_cblock.cpp + src/d/actor/d_a_obj_cdoor.cpp + src/d/actor/d_a_obj_chandelier.cpp + src/d/actor/d_a_obj_chest.cpp + src/d/actor/d_a_obj_cho.cpp + src/d/actor/d_a_obj_cowdoor.cpp + src/d/actor/d_a_obj_crope.cpp + src/d/actor/d_a_obj_crvfence.cpp + src/d/actor/d_a_obj_crvgate.cpp + src/d/actor/d_a_obj_crvhahen.cpp + src/d/actor/d_a_obj_crvlh_down.cpp + src/d/actor/d_a_obj_crvlh_up.cpp + src/d/actor/d_a_obj_crvsteel.cpp + src/d/actor/d_a_obj_crystal.cpp + src/d/actor/d_a_obj_cwall.cpp + src/d/actor/d_a_obj_damCps.cpp + src/d/actor/d_a_obj_dan.cpp + src/d/actor/d_a_obj_digholl.cpp + src/d/actor/d_a_obj_digsnow.cpp + src/d/actor/d_a_obj_dmelevator.cpp + src/d/actor/d_a_obj_drop.cpp + src/d/actor/d_a_obj_dust.cpp + src/d/actor/d_a_obj_enemy_create.cpp + src/d/actor/d_a_obj_fallobj.cpp + src/d/actor/d_a_obj_fan.cpp + src/d/actor/d_a_obj_fchain.cpp + src/d/actor/d_a_obj_fireWood.cpp + src/d/actor/d_a_obj_fireWood2.cpp + src/d/actor/d_a_obj_firepillar.cpp + src/d/actor/d_a_obj_firepillar2.cpp + src/d/actor/d_a_obj_flag.cpp + src/d/actor/d_a_obj_flag2.cpp + src/d/actor/d_a_obj_flag3.cpp + src/d/actor/d_a_obj_food.cpp + src/d/actor/d_a_obj_fw.cpp + src/d/actor/d_a_obj_gadget.cpp + src/d/actor/d_a_obj_ganonwall.cpp + src/d/actor/d_a_obj_ganonwall2.cpp + src/d/actor/d_a_obj_gb.cpp + src/d/actor/d_a_obj_geyser.cpp + src/d/actor/d_a_obj_glowSphere.cpp + src/d/actor/d_a_obj_gm.cpp + src/d/actor/d_a_obj_goGate.cpp + src/d/actor/d_a_obj_gomikabe.cpp + src/d/actor/d_a_obj_gra2.cpp + src/d/actor/d_a_obj_graWall.cpp + src/d/actor/d_a_obj_gra_rock.cpp + src/d/actor/d_a_obj_grave_stone.cpp + src/d/actor/d_a_obj_groundwater.cpp + src/d/actor/d_a_obj_grz_rock.cpp + src/d/actor/d_a_obj_h_saku.cpp + src/d/actor/d_a_obj_hakai_brl.cpp + src/d/actor/d_a_obj_hakai_ftr.cpp + src/d/actor/d_a_obj_hasu2.cpp + src/d/actor/d_a_obj_hata.cpp + src/d/actor/d_a_obj_hb.cpp + src/d/actor/d_a_obj_hbombkoya.cpp + src/d/actor/d_a_obj_heavySw.cpp + src/d/actor/d_a_obj_hfuta.cpp + src/d/actor/d_a_obj_hsTarget.cpp + src/d/actor/d_a_obj_ice_l.cpp + src/d/actor/d_a_obj_ice_s.cpp + src/d/actor/d_a_obj_iceblock.cpp + src/d/actor/d_a_obj_iceleaf.cpp + src/d/actor/d_a_obj_ihasi.cpp + src/d/actor/d_a_obj_ikada.cpp + src/d/actor/d_a_obj_inobone.cpp + src/d/actor/d_a_obj_ita.cpp + src/d/actor/d_a_obj_itamato.cpp + src/d/actor/d_a_obj_kabuto.cpp + src/d/actor/d_a_obj_kag.cpp + src/d/actor/d_a_obj_kage.cpp + src/d/actor/d_a_obj_kago.cpp + src/d/actor/d_a_obj_kaisou.cpp + src/d/actor/d_a_obj_kamakiri.cpp + src/d/actor/d_a_obj_kantera.cpp + src/d/actor/d_a_obj_katatsumuri.cpp + src/d/actor/d_a_obj_kazeneko.cpp + src/d/actor/d_a_obj_kbox.cpp + src/d/actor/d_a_obj_key.cpp + src/d/actor/d_a_obj_keyhole.cpp + src/d/actor/d_a_obj_ki.cpp + src/d/actor/d_a_obj_kiPot.cpp + src/d/actor/d_a_obj_kita.cpp + src/d/actor/d_a_obj_kjgjs.cpp + src/d/actor/d_a_obj_kkanban.cpp + src/d/actor/d_a_obj_knBullet.cpp + src/d/actor/d_a_obj_kshutter.cpp + src/d/actor/d_a_obj_kuwagata.cpp + src/d/actor/d_a_obj_kwheel00.cpp + src/d/actor/d_a_obj_kwheel01.cpp + src/d/actor/d_a_obj_kznkarm.cpp + src/d/actor/d_a_obj_laundry.cpp + src/d/actor/d_a_obj_laundry_rope.cpp + src/d/actor/d_a_obj_lbox.cpp + src/d/actor/d_a_obj_lp.cpp + src/d/actor/d_a_obj_lv1Candle00.cpp + src/d/actor/d_a_obj_lv1Candle01.cpp + src/d/actor/d_a_obj_lv3Candle.cpp + src/d/actor/d_a_obj_lv3Water.cpp + src/d/actor/d_a_obj_lv3Water2.cpp + src/d/actor/d_a_obj_lv3WaterB.cpp + src/d/actor/d_a_obj_lv3saka00.cpp + src/d/actor/d_a_obj_lv3waterEff.cpp + src/d/actor/d_a_obj_lv4CandleDemoTag.cpp + src/d/actor/d_a_obj_lv4CandleTag.cpp + src/d/actor/d_a_obj_lv4EdShutter.cpp + src/d/actor/d_a_obj_lv4Gate.cpp + src/d/actor/d_a_obj_lv4HsTarget.cpp + src/d/actor/d_a_obj_lv4PoGate.cpp + src/d/actor/d_a_obj_lv4RailWall.cpp + src/d/actor/d_a_obj_lv4SlideWall.cpp + src/d/actor/d_a_obj_lv4bridge.cpp + src/d/actor/d_a_obj_lv4chandelier.cpp + src/d/actor/d_a_obj_lv4digsand.cpp + src/d/actor/d_a_obj_lv4floor.cpp + src/d/actor/d_a_obj_lv4gear.cpp + src/d/actor/d_a_obj_lv4prelvtr.cpp + src/d/actor/d_a_obj_lv4prwall.cpp + src/d/actor/d_a_obj_lv4sand.cpp + src/d/actor/d_a_obj_lv5FloorBoard.cpp + src/d/actor/d_a_obj_lv5IceWall.cpp + src/d/actor/d_a_obj_lv5SwIce.cpp + src/d/actor/d_a_obj_lv5ychndlr.cpp + src/d/actor/d_a_obj_lv5yiblltray.cpp + src/d/actor/d_a_obj_lv6ChangeGate.cpp + src/d/actor/d_a_obj_lv6FurikoTrap.cpp + src/d/actor/d_a_obj_lv6Lblock.cpp + src/d/actor/d_a_obj_lv6SwGate.cpp + src/d/actor/d_a_obj_lv6SzGate.cpp + src/d/actor/d_a_obj_lv6Tenbin.cpp + src/d/actor/d_a_obj_lv6TogeRoll.cpp + src/d/actor/d_a_obj_lv6TogeTrap.cpp + src/d/actor/d_a_obj_lv6bemos.cpp + src/d/actor/d_a_obj_lv6bemos2.cpp + src/d/actor/d_a_obj_lv6egate.cpp + src/d/actor/d_a_obj_lv6elevta.cpp + src/d/actor/d_a_obj_lv6swturn.cpp + src/d/actor/d_a_obj_lv7BsGate.cpp + src/d/actor/d_a_obj_lv7PropellerY.cpp + src/d/actor/d_a_obj_lv7bridge.cpp + src/d/actor/d_a_obj_lv8KekkaiTrap.cpp + src/d/actor/d_a_obj_lv8Lift.cpp + src/d/actor/d_a_obj_lv8OptiLift.cpp + src/d/actor/d_a_obj_lv8UdFloor.cpp + src/d/actor/d_a_obj_lv9SwShutter.cpp + src/d/actor/d_a_obj_magLift.cpp + src/d/actor/d_a_obj_magLiftRot.cpp + src/d/actor/d_a_obj_maki.cpp + src/d/actor/d_a_obj_master_sword.cpp + src/d/actor/d_a_obj_mato.cpp + src/d/actor/d_a_obj_mhole.cpp + src/d/actor/d_a_obj_mie.cpp + src/d/actor/d_a_obj_mirror_6pole.cpp + src/d/actor/d_a_obj_mirror_chain.cpp + src/d/actor/d_a_obj_mirror_sand.cpp + src/d/actor/d_a_obj_mirror_screw.cpp + src/d/actor/d_a_obj_mirror_table.cpp + src/d/actor/d_a_obj_msima.cpp + src/d/actor/d_a_obj_mvstair.cpp + src/d/actor/d_a_obj_myogan.cpp + src/d/actor/d_a_obj_nagaisu.cpp + src/d/actor/d_a_obj_nan.cpp + src/d/actor/d_a_obj_ndoor.cpp + src/d/actor/d_a_obj_nougu.cpp + src/d/actor/d_a_obj_octhashi.cpp + src/d/actor/d_a_obj_oiltubo.cpp + src/d/actor/d_a_obj_onsen.cpp + src/d/actor/d_a_obj_onsenFire.cpp + src/d/actor/d_a_obj_onsenTaru.cpp + src/d/actor/d_a_obj_pdoor.cpp + src/d/actor/d_a_obj_pdtile.cpp + src/d/actor/d_a_obj_pdwall.cpp + src/d/actor/d_a_obj_picture.cpp + src/d/actor/d_a_obj_pillar.cpp + src/d/actor/d_a_obj_pleaf.cpp + src/d/actor/d_a_obj_poCandle.cpp + src/d/actor/d_a_obj_poFire.cpp + src/d/actor/d_a_obj_poTbox.cpp + src/d/actor/d_a_obj_prop.cpp + src/d/actor/d_a_obj_pumpkin.cpp + src/d/actor/d_a_obj_rcircle.cpp + src/d/actor/d_a_obj_rfHole.cpp + src/d/actor/d_a_obj_rgate.cpp + src/d/actor/d_a_obj_riverrock.cpp + src/d/actor/d_a_obj_rock.cpp + src/d/actor/d_a_obj_rotBridge.cpp + src/d/actor/d_a_obj_rotTrap.cpp + src/d/actor/d_a_obj_roten.cpp + src/d/actor/d_a_obj_rstair.cpp + src/d/actor/d_a_obj_rw.cpp + src/d/actor/d_a_obj_saidan.cpp + src/d/actor/d_a_obj_sakuita.cpp + src/d/actor/d_a_obj_sakuita_rope.cpp + src/d/actor/d_a_obj_scannon.cpp + src/d/actor/d_a_obj_scannon_crs.cpp + src/d/actor/d_a_obj_scannon_ten.cpp + src/d/actor/d_a_obj_sekidoor.cpp + src/d/actor/d_a_obj_sekizo.cpp + src/d/actor/d_a_obj_sekizoa.cpp + src/d/actor/d_a_obj_shield.cpp + src/d/actor/d_a_obj_sm_door.cpp + src/d/actor/d_a_obj_smallkey.cpp + src/d/actor/d_a_obj_smgdoor.cpp + src/d/actor/d_a_obj_smoke.cpp + src/d/actor/d_a_obj_smtile.cpp + src/d/actor/d_a_obj_smw_stone.cpp + src/d/actor/d_a_obj_snowEffTag.cpp + src/d/actor/d_a_obj_snow_soup.cpp + src/d/actor/d_a_obj_so.cpp + src/d/actor/d_a_obj_spinLift.cpp + src/d/actor/d_a_obj_ss_drink.cpp + src/d/actor/d_a_obj_ss_item.cpp + src/d/actor/d_a_obj_stairBlock.cpp + src/d/actor/d_a_obj_stone.cpp + src/d/actor/d_a_obj_stopper.cpp + src/d/actor/d_a_obj_stopper2.cpp + src/d/actor/d_a_obj_suisya.cpp + src/d/actor/d_a_obj_sw.cpp + src/d/actor/d_a_obj_swBallA.cpp + src/d/actor/d_a_obj_swBallB.cpp + src/d/actor/d_a_obj_swBallC.cpp + src/d/actor/d_a_obj_swLight.cpp + src/d/actor/d_a_obj_swchain.cpp + src/d/actor/d_a_obj_swhang.cpp + src/d/actor/d_a_obj_sword.cpp + src/d/actor/d_a_obj_swpush2.cpp + src/d/actor/d_a_obj_swspinner.cpp + src/d/actor/d_a_obj_swturn.cpp + src/d/actor/d_a_obj_syRock.cpp + src/d/actor/d_a_obj_szbridge.cpp + src/d/actor/d_a_obj_taFence.cpp + src/d/actor/d_a_obj_table.cpp + src/d/actor/d_a_obj_takaraDai.cpp + src/d/actor/d_a_obj_tatigi.cpp + src/d/actor/d_a_obj_ten.cpp + src/d/actor/d_a_obj_testcube.cpp + src/d/actor/d_a_obj_tgake.cpp + src/d/actor/d_a_obj_thashi.cpp + src/d/actor/d_a_obj_thdoor.cpp + src/d/actor/d_a_obj_timeFire.cpp + src/d/actor/d_a_obj_tks.cpp + src/d/actor/d_a_obj_tmoon.cpp + src/d/actor/d_a_obj_toaru_maki.cpp + src/d/actor/d_a_obj_toby.cpp + src/d/actor/d_a_obj_tobyhouse.cpp + src/d/actor/d_a_obj_togeTrap.cpp + src/d/actor/d_a_obj_tombo.cpp + src/d/actor/d_a_obj_tornado.cpp + src/d/actor/d_a_obj_tornado2.cpp + src/d/actor/d_a_obj_tp.cpp + src/d/actor/d_a_obj_treesh.cpp + src/d/actor/d_a_obj_twGate.cpp + src/d/actor/d_a_obj_udoor.cpp + src/d/actor/d_a_obj_usaku.cpp + src/d/actor/d_a_obj_vground.cpp + src/d/actor/d_a_obj_volcball.cpp + src/d/actor/d_a_obj_volcbom.cpp + src/d/actor/d_a_obj_warp_kbrg.cpp + src/d/actor/d_a_obj_warp_obrg.cpp + src/d/actor/d_a_obj_waterGate.cpp + src/d/actor/d_a_obj_waterPillar.cpp + src/d/actor/d_a_obj_waterfall.cpp + src/d/actor/d_a_obj_wchain.cpp + src/d/actor/d_a_obj_wdStick.cpp + src/d/actor/d_a_obj_web0.cpp + src/d/actor/d_a_obj_web1.cpp + src/d/actor/d_a_obj_well_cover.cpp + src/d/actor/d_a_obj_wflag.cpp + src/d/actor/d_a_obj_wind_stone.cpp + src/d/actor/d_a_obj_window.cpp + src/d/actor/d_a_obj_wood_pendulum.cpp + src/d/actor/d_a_obj_wood_statue.cpp + src/d/actor/d_a_obj_wsword.cpp + src/d/actor/d_a_obj_yel_bag.cpp + src/d/actor/d_a_obj_ystone.cpp + src/d/actor/d_a_obj_zcloth.cpp + src/d/actor/d_a_obj_zdoor.cpp + src/d/actor/d_a_obj_zrTurara.cpp + src/d/actor/d_a_obj_zrTuraraRock.cpp + src/d/actor/d_a_obj_zraMark.cpp + src/d/actor/d_a_obj_zra_freeze.cpp + src/d/actor/d_a_obj_zra_rock.cpp + src/d/actor/d_a_passer_mng.cpp + src/d/actor/d_a_tag_arena.cpp + src/d/actor/d_a_peru.cpp + src/d/actor/d_a_ppolamp.cpp + src/d/actor/d_a_skip_2D.cpp + src/d/actor/d_a_startAndGoal.cpp + src/d/actor/d_a_swBall.cpp + src/d/actor/d_a_swLBall.cpp + src/d/actor/d_a_swTime.cpp + src/d/actor/d_a_tag_Lv6Gate.cpp + src/d/actor/d_a_tag_Lv7Gate.cpp + src/d/actor/d_a_tag_Lv8Gate.cpp + src/d/actor/d_a_tag_TWgate.cpp + src/d/actor/d_a_tag_lv6CstaSw.cpp + src/d/actor/d_a_tag_assistance.cpp + src/d/actor/d_a_tag_bottle_item.cpp + src/d/actor/d_a_tag_chgrestart.cpp + src/d/actor/d_a_tag_csw.cpp + src/d/actor/d_a_tag_escape.cpp + src/d/actor/d_a_tag_firewall.cpp + src/d/actor/d_a_tag_gra.cpp + src/d/actor/d_a_tag_guard.cpp + src/d/actor/d_a_tag_instruction.cpp + src/d/actor/d_a_tag_kago_fall.cpp + src/d/actor/d_a_tag_lightball.cpp + src/d/actor/d_a_tag_lv5soup.cpp + src/d/actor/d_a_tag_mmsg.cpp + src/d/actor/d_a_tag_mwait.cpp + src/d/actor/d_a_tag_myna2.cpp + src/d/actor/d_a_tag_myna_light.cpp + src/d/actor/d_a_tag_pachi.cpp + src/d/actor/d_a_tag_poFire.cpp + src/d/actor/d_a_tag_qs.cpp + src/d/actor/d_a_tag_ret_room.cpp + src/d/actor/d_a_tag_river_back.cpp + src/d/actor/d_a_tag_rmbit_sw.cpp + src/d/actor/d_a_tag_schedule.cpp + src/d/actor/d_a_tag_setBall.cpp + src/d/actor/d_a_tag_setrestart.cpp + src/d/actor/d_a_tag_shop_camera.cpp + src/d/actor/d_a_tag_shop_item.cpp + src/d/actor/d_a_tag_smk_emt.cpp + src/d/actor/d_a_tag_spinner.cpp + src/d/actor/d_a_tag_sppath.cpp + src/d/actor/d_a_tag_ss_drink.cpp + src/d/actor/d_a_tag_stream.cpp + src/d/actor/d_a_tag_theB_hint.cpp + src/d/actor/d_a_tag_wara_howl.cpp + src/d/actor/d_a_tag_watchge.cpp + src/d/actor/d_a_tag_waterfall.cpp + src/d/actor/d_a_tag_wljump.cpp + src/d/actor/d_a_tag_yami.cpp + src/d/actor/d_a_talk.cpp + src/d/actor/d_a_tboxSw.cpp + src/d/actor/d_a_title.cpp + src/d/actor/d_a_warp_bug.cpp ) set(DOLPHIN_FILES - libs/dolphin/src/gf/GFGeometry.cpp - libs/dolphin/src/gf/GFLight.cpp - libs/dolphin/src/gf/GFPixel.cpp - libs/dolphin/src/gf/GFTev.cpp + libs/dolphin/src/gf/GFGeometry.cpp + libs/dolphin/src/gf/GFLight.cpp + libs/dolphin/src/gf/GFPixel.cpp + libs/dolphin/src/gf/GFTev.cpp ) set(DUSK_FILES - include/dusk/action_bindings.h - include/dusk/endian_gx.hpp - include/dusk/config.hpp - include/dusk/dvd_asset.hpp - include/dusk/scope_guard.hpp - src/dusk/dvd_asset.cpp - src/d/actor/d_a_alink_dusk.cpp - src/dusk/asserts.cpp - src/dusk/config.cpp - src/dusk/crash_handler.cpp - src/dusk/crash_reporting.cpp - src/dusk/data.cpp - src/dusk/data.hpp - src/dusk/endian.cpp - src/dusk/extras.c - src/dusk/file_select.cpp - src/dusk/file_select.hpp - src/dusk/frame_interpolation.cpp - src/dusk/commands.cpp - src/dusk/commands.hpp - src/dusk/game_clock.cpp - src/dusk/game_combos.cpp - src/dusk/globals.cpp - src/dusk/gyro.cpp - src/dusk/mouse.cpp - src/dusk/gamepad_color.cpp - src/dusk/autosave.cpp - src/dusk/http/http.hpp - src/dusk/io.cpp - src/dusk/layout.cpp - src/dusk/logging.cpp - src/dusk/settings.cpp - src/dusk/speedrun.cpp - src/dusk/string.cpp - src/dusk/stubs.cpp - include/dusk/texture_replacements.hpp - src/dusk/texture_replacements.cpp - src/dusk/update_check.cpp - src/dusk/update_check.hpp - #src/dusk/m_Do_ext_dusk.cpp - src/dusk/imgui/ImGuiConfig.hpp - src/dusk/imgui/ImGuiConsole.hpp - src/dusk/imgui/ImGuiConsole.cpp - src/dusk/imgui/ImGuiEngine.cpp - src/dusk/imgui/ImGuiEngine.hpp - src/dusk/imgui/ImGuiBloomWindow.cpp - src/dusk/imgui/ImGuiBloomWindow.hpp - src/dusk/imgui/ImGuiMenuTools.cpp - src/dusk/imgui/ImGuiMenuTools.hpp - src/dusk/imgui/ImGuiActorSpawner.cpp - src/dusk/imgui/ImGuiProcessOverlay.cpp - src/dusk/imgui/ImGuiCameraOverlay.cpp - src/dusk/imgui/ImGuiHeapOverlay.cpp - src/dusk/imgui/ImGuiControllerOverlay.cpp - src/dusk/imgui/ImGuiStubLog.cpp - src/dusk/imgui/ImGuiSaveEditor.cpp - src/dusk/imgui/ImGuiStateShare.hpp - src/dusk/imgui/ImGuiStateShare.cpp - src/dusk/ui/achievements.cpp - src/dusk/ui/achievements.hpp - src/dusk/ui/command_console.cpp - src/dusk/ui/command_console.hpp - src/dusk/ui/bool_button.cpp - src/dusk/ui/bool_button.hpp - src/dusk/ui/button.cpp - src/dusk/ui/button.hpp - src/dusk/ui/component.cpp - src/dusk/ui/component.hpp - src/dusk/ui/controller_config.cpp - src/dusk/ui/controller_config.hpp - src/dusk/ui/document.cpp - src/dusk/ui/document.hpp - src/dusk/ui/editor.cpp - src/dusk/ui/editor.hpp - src/dusk/ui/event.cpp - src/dusk/ui/event.hpp - src/dusk/ui/graphics_tuner.cpp - src/dusk/ui/graphics_tuner.hpp - src/dusk/ui/input.cpp - src/dusk/ui/input.hpp - src/dusk/ui/modal.cpp - src/dusk/ui/modal.hpp - src/dusk/ui/nav_types.hpp - src/dusk/ui/number_button.cpp - src/dusk/ui/number_button.hpp - src/dusk/ui/overlay.cpp - src/dusk/ui/overlay.hpp - src/dusk/ui/pane.cpp - src/dusk/ui/pane.hpp - src/dusk/ui/menu_bar.cpp - src/dusk/ui/menu_bar.hpp - src/dusk/ui/prelaunch.cpp - src/dusk/ui/prelaunch.hpp - src/dusk/ui/preset.cpp - src/dusk/ui/preset.hpp - src/dusk/ui/reporting.cpp - src/dusk/ui/reporting.hpp - src/dusk/ui/select_button.cpp - src/dusk/ui/select_button.hpp - src/dusk/ui/settings.cpp - src/dusk/ui/settings.hpp - src/dusk/ui/string_button.cpp - src/dusk/ui/string_button.hpp - src/dusk/ui/tab_bar.cpp - src/dusk/ui/tab_bar.hpp - src/dusk/ui/ui.cpp - src/dusk/ui/ui.hpp - src/dusk/ui/warp.cpp - src/dusk/ui/warp.hpp - src/dusk/ui/window.cpp - src/dusk/ui/window.hpp - src/dusk/achievements.cpp - src/dusk/iso_validate.cpp - src/dusk/livesplit.cpp - src/dusk/offset_ptr.cpp - src/dusk/OSContext.cpp - src/dusk/OSReport.cpp - src/dusk/OSThread.cpp - src/dusk/OSMutex.cpp - src/dusk/discord.cpp - src/dusk/discord.hpp - src/dusk/discord_presence.cpp - src/dusk/version.cpp - src/dusk/action_bindings.cpp + include/dusk/action_bindings.h + include/dusk/endian_gx.hpp + include/dusk/config.hpp + include/dusk/dvd_asset.hpp + include/dusk/scope_guard.hpp + src/dusk/dvd_asset.cpp + src/d/actor/d_a_alink_dusk.cpp + src/dusk/asserts.cpp + src/dusk/config.cpp + src/dusk/crash_handler.cpp + src/dusk/crash_reporting.cpp + src/dusk/data.cpp + src/dusk/data.hpp + src/dusk/endian.cpp + src/dusk/extras.c + src/dusk/file_select.cpp + src/dusk/file_select.hpp + src/dusk/frame_interpolation.cpp + src/dusk/commands.cpp + src/dusk/commands.hpp + src/dusk/game_clock.cpp + src/dusk/game_combos.cpp + src/dusk/globals.cpp + src/dusk/gyro.cpp + src/dusk/mouse.cpp + src/dusk/gamepad_color.cpp + src/dusk/autosave.cpp + src/dusk/http/http.hpp + src/dusk/io.cpp + src/dusk/layout.cpp + src/dusk/logging.cpp + src/dusk/settings.cpp + src/dusk/speedrun.cpp + src/dusk/string.cpp + src/dusk/stubs.cpp + include/dusk/texture_replacements.hpp + src/dusk/texture_replacements.cpp + src/dusk/update_check.cpp + src/dusk/update_check.hpp + #src/dusk/m_Do_ext_dusk.cpp + src/dusk/imgui/ImGuiConfig.hpp + src/dusk/imgui/ImGuiConsole.hpp + src/dusk/imgui/ImGuiConsole.cpp + src/dusk/imgui/ImGuiEngine.cpp + src/dusk/imgui/ImGuiEngine.hpp + src/dusk/imgui/ImGuiBloomWindow.cpp + src/dusk/imgui/ImGuiBloomWindow.hpp + src/dusk/imgui/ImGuiMenuTools.cpp + src/dusk/imgui/ImGuiMenuTools.hpp + src/dusk/imgui/ImGuiActorSpawner.cpp + src/dusk/imgui/ImGuiProcessOverlay.cpp + src/dusk/imgui/ImGuiCameraOverlay.cpp + src/dusk/imgui/ImGuiHeapOverlay.cpp + src/dusk/imgui/ImGuiControllerOverlay.cpp + src/dusk/imgui/ImGuiStubLog.cpp + src/dusk/imgui/ImGuiSaveEditor.cpp + src/dusk/imgui/ImGuiStateShare.hpp + src/dusk/imgui/ImGuiStateShare.cpp + src/dusk/ui/achievements.cpp + src/dusk/ui/achievements.hpp + src/dusk/ui/command_console.cpp + src/dusk/ui/command_console.hpp + src/dusk/ui/bool_button.cpp + src/dusk/ui/bool_button.hpp + src/dusk/ui/button.cpp + src/dusk/ui/button.hpp + src/dusk/ui/component.cpp + src/dusk/ui/component.hpp + src/dusk/ui/controller_config.cpp + src/dusk/ui/controller_config.hpp + src/dusk/ui/document.cpp + src/dusk/ui/document.hpp + src/dusk/ui/editor.cpp + src/dusk/ui/editor.hpp + src/dusk/ui/event.cpp + src/dusk/ui/event.hpp + src/dusk/ui/graphics_tuner.cpp + src/dusk/ui/graphics_tuner.hpp + src/dusk/ui/input.cpp + src/dusk/ui/input.hpp + src/dusk/ui/modal.cpp + src/dusk/ui/modal.hpp + src/dusk/ui/nav_types.hpp + src/dusk/ui/number_button.cpp + src/dusk/ui/number_button.hpp + src/dusk/ui/overlay.cpp + src/dusk/ui/overlay.hpp + src/dusk/ui/pane.cpp + src/dusk/ui/pane.hpp + src/dusk/ui/menu_bar.cpp + src/dusk/ui/menu_bar.hpp + src/dusk/ui/prelaunch.cpp + src/dusk/ui/prelaunch.hpp + src/dusk/ui/preset.cpp + src/dusk/ui/preset.hpp + src/dusk/ui/reporting.cpp + src/dusk/ui/reporting.hpp + src/dusk/ui/select_button.cpp + src/dusk/ui/select_button.hpp + src/dusk/ui/settings.cpp + src/dusk/ui/settings.hpp + src/dusk/ui/string_button.cpp + src/dusk/ui/string_button.hpp + src/dusk/ui/tab_bar.cpp + src/dusk/ui/tab_bar.hpp + src/dusk/ui/ui.cpp + src/dusk/ui/ui.hpp + src/dusk/ui/warp.cpp + src/dusk/ui/warp.hpp + src/dusk/ui/window.cpp + src/dusk/ui/window.hpp + src/dusk/achievements.cpp + src/dusk/iso_validate.cpp + src/dusk/livesplit.cpp + src/dusk/offset_ptr.cpp + src/dusk/OSContext.cpp + src/dusk/OSReport.cpp + src/dusk/OSThread.cpp + src/dusk/OSMutex.cpp + src/dusk/discord.cpp + src/dusk/discord.hpp + src/dusk/discord_presence.cpp + src/dusk/version.cpp + src/dusk/action_bindings.cpp ) set(DUSK_HTTP_BACKEND_FILES From e17d0f21fcfa03f4baa25f659229f833d55af768 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 2 Jun 2026 00:40:49 -0600 Subject: [PATCH 008/223] Console focus & closing fixes --- res/rml/command_console.rcss | 4 --- src/dusk/ui/command_console.cpp | 54 ++++++++++++--------------------- src/dusk/ui/command_console.hpp | 8 ++--- src/dusk/ui/document.cpp | 1 + src/dusk/ui/ui.cpp | 14 +++++++++ src/m_Do/m_Do_main.cpp | 1 - 6 files changed, 39 insertions(+), 43 deletions(-) diff --git a/res/rml/command_console.rcss b/res/rml/command_console.rcss index 1446e6f165..44074d40a5 100644 --- a/res/rml/command_console.rcss +++ b/res/rml/command_console.rcss @@ -26,10 +26,6 @@ console { color: #FFFFFF; } -console[hidden] { - display: none; -} - output { display: block; overflow: hidden; diff --git a/src/dusk/ui/command_console.cpp b/src/dusk/ui/command_console.cpp index 9f561fb08d..3f964b1f0c 100644 --- a/src/dusk/ui/command_console.cpp +++ b/src/dusk/ui/command_console.cpp @@ -44,10 +44,6 @@ CommandConsole::CommandConsole() : Document(kDocumentSource) { auto* rawInput = mDocument ? mDocument->GetElementById("console-input") : nullptr; mInput = rmlui_dynamic_cast(rawInput); - if (mConsole != nullptr) { - mConsole->SetAttribute("hidden", ""); - } - listen( Rml::EventId::Keydown, [this](Rml::Event& event) { @@ -59,7 +55,7 @@ CommandConsole::CommandConsole() : Document(kDocumentSource) { executeFromInput(); event.StopImmediatePropagation(); } else if (key == Rml::Input::KI_ESCAPE) { - closeInput(); + hide(true); event.StopImmediatePropagation(); } else if (key == Rml::Input::KI_UP) { navigateHistory(-1); @@ -72,12 +68,6 @@ CommandConsole::CommandConsole() : Document(kDocumentSource) { true); } -void CommandConsole::show() { - if (mDocument != nullptr) { - mDocument->Show(Rml::ModalFlag::None, Rml::FocusFlag::None, Rml::ScrollFlag::None); - } -} - bool CommandConsole::handle_nav_command(Rml::Event&, NavCommand) { return false; } @@ -87,14 +77,6 @@ void CommandConsole::update() { return; } - int numKeys = 0; - const bool* keyState = SDL_GetKeyboardState(&numKeys); - const bool slashNow = SDL_SCANCODE_SLASH < numKeys && keyState[SDL_SCANCODE_SLASH]; - if (!mInputActive && slashNow && !mPrevSlashState) { - openInput(); - } - mPrevSlashState = slashNow; - const float dt = std::max(ImGui::GetIO().DeltaTime, 0.0f); for (auto& line : mOutputLines) { line.remain -= dt; @@ -103,13 +85,9 @@ void CommandConsole::update() { std::ranges::remove_if(mOutputLines, [](const OutputLine& l) { return l.remain <= 0.0f; }); mOutputLines.erase(first, last); - if (mConsole != nullptr) { - if (!mOutputLines.empty() || mInputActive) { - mConsole->RemoveAttribute("hidden"); - } else { - mConsole->SetAttribute("hidden", ""); - return; - } + if (mOutputLines.empty() && !mInputActive) { + Document::hide(mPendingClose); + return; } if (mOutput == nullptr) { @@ -143,21 +121,28 @@ void CommandConsole::update() { } } -void CommandConsole::openInput() { +void CommandConsole::show() { + if (mDocument != nullptr) { + mDocument->Show(Rml::ModalFlag::None, Rml::FocusFlag::None, Rml::ScrollFlag::None); + } mInputActive = true; mScrollToBottom = true; if (mConsole != nullptr) { mConsole->SetAttribute("open", ""); - mConsole->RemoveAttribute("hidden"); } + focus(); +} + +bool CommandConsole::focus() { if (mInput != nullptr) { mInput->SetValue(""); aurora::rmlui::set_input_type(aurora::rmlui::InputType::Text); - mInput->Focus(true); + return mInput->Focus(true); } + return false; } -void CommandConsole::closeInput() { +void CommandConsole::hide(bool close) { mInputActive = false; mHistoryPos = -1; if (mConsole != nullptr) { @@ -166,18 +151,19 @@ void CommandConsole::closeInput() { if (mInput != nullptr) { mInput->SetValue(""); } - if (mDocument != nullptr) { - mDocument->Focus(false); + mPendingClose = close; + // Immediately refocus + if (auto* doc = top_document()) { + doc->focus(); } } void CommandConsole::executeFromInput() { if (mInput == nullptr) { - closeInput(); return; } const Rml::String value = mInput->GetValue(); - closeInput(); + hide(true); if (!value.empty()) { runCommand(value, mState, [this](std::string text) { ConsolePrint(std::move(text)); }); } diff --git a/src/dusk/ui/command_console.hpp b/src/dusk/ui/command_console.hpp index 8d476ae085..b228158f6a 100644 --- a/src/dusk/ui/command_console.hpp +++ b/src/dusk/ui/command_console.hpp @@ -15,8 +15,11 @@ namespace dusk::ui { class CommandConsole : public Document { public: CommandConsole(); - void show() override; + void update() override; + void show() override; + bool focus() override; + void hide(bool close) override; private: struct OutputLine { @@ -39,15 +42,12 @@ private: int mHistoryPos = -1; bool mInputActive = false; bool mScrollToBottom = false; - bool mPrevSlashState = false; CommandState mState; bool handle_nav_command(Rml::Event& event, NavCommand cmd) override; void ConsolePrint(std::string text); - void openInput(); - void closeInput(); void executeFromInput(); void navigateHistory(int dir); }; diff --git a/src/dusk/ui/document.cpp b/src/dusk/ui/document.cpp index a7bcc3f9ed..91e126fc00 100644 --- a/src/dusk/ui/document.cpp +++ b/src/dusk/ui/document.cpp @@ -68,6 +68,7 @@ void Document::show() { focus(); } } + mPendingClose = false; } void Document::hide(bool close) { diff --git a/src/dusk/ui/ui.cpp b/src/dusk/ui/ui.cpp index af05d0f476..37a403d8af 100644 --- a/src/dusk/ui/ui.cpp +++ b/src/dusk/ui/ui.cpp @@ -11,6 +11,7 @@ #include #include "aurora/lib/window.hpp" +#include "command_console.hpp" #include "dusk/io.hpp" #include "input.hpp" #include "prelaunch.hpp" @@ -172,6 +173,19 @@ void handle_event(const SDL_Event& event) noexcept { sConnectedGamepads.erase(event.gdevice.which); } input::handle_event(event); + // TODO: don't overlap with PAD bindings? + if (event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_SLASH) { + bool found = false; + for (auto& doc : sDocumentStack) { + if (auto* console = dynamic_cast(doc.get())) { + console->show(); + found = true; + } + } + if (!found) { + push_document(std::make_unique(), true, false); + } + } } Document& push_document(std::unique_ptr doc, bool show, bool passive) noexcept { diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index a904f23b30..a59ab186e7 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -658,7 +658,6 @@ int game_main(int argc, char* argv[]) { dusk::texture_replacements::reload(); dusk::ui::initialize(); dusk::ui::push_document(std::make_unique(), true, true); - dusk::ui::push_document(std::make_unique(), true, true); dusk::ui::push_document(std::make_unique(), false); // Invalidate a bad saved isoPath so that Dusklight can't get blocked from starting up. From 7df07c6904dcfdb61fa1088255723e4617552bde Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 9 Jul 2026 18:54:44 -0600 Subject: [PATCH 009/223] Mod API: Camera service --- docs/modding.md | 19 +++++ files.cmake | 1 + include/mods/svc/camera.h | 64 ++++++++++++++++ src/dusk/mods/svc/camera.cpp | 134 +++++++++++++++++++++++++++++++++ src/dusk/mods/svc/registry.cpp | 1 + src/dusk/mods/svc/registry.hpp | 1 + 6 files changed, 220 insertions(+) create mode 100644 include/mods/svc/camera.h create mode 100644 src/dusk/mods/svc/camera.cpp diff --git a/docs/modding.md b/docs/modding.md index 7b616989e8..031f08c602 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -409,6 +409,25 @@ existing documents restyle immediately, and future ones pick it up when created. host styles and may override them. Scope selectors tightly (use `[mod-id="..."]`!), especially for `UI_SCOPE_WINDOW`, unless changing host UI is intentional. +### CameraService (`mods/svc/camera.h`) + +Converts a game view provided by a render callback into WebGPU-convention camera data. Matrix fields are column-major +`float[16]` values using the matrix * column-vector convention (transpose of the game's row-major `Mtx`/`Mtx44` layout), +ready to copy into WGSL `mat4x4f` uniforms. + +```cpp +IMPORT_SERVICE(CameraService, svc_camera); + +CameraInfo camera = CAMERA_INFO_INIT; +if (svc_camera->get_camera(mod_ctx, game_view, &camera) == MOD_OK) { + // camera.view_from_world, camera.proj_from_view, camera.eye, ... +} +``` + +`get_camera` returns `MOD_UNAVAILABLE` while the view is not a valid perspective camera, such as before the +first in-game frame. Projection matrices match the renderer's WebGPU clip convention and renderer depth convention +(reversed-Z by default). + --- ## Hooking Game Functions diff --git a/files.cmake b/files.cmake index 15b64c3a3f..358d2373c1 100644 --- a/files.cmake +++ b/files.cmake @@ -1562,6 +1562,7 @@ set(DUSK_FILES src/dusk/mods/loader/loader.hpp src/dusk/mods/loader/native_module.cpp src/dusk/mods/loader/native_module.hpp + src/dusk/mods/svc/camera.cpp src/dusk/mods/svc/config.cpp src/dusk/mods/svc/config.hpp src/dusk/mods/svc/game.cpp diff --git a/include/mods/svc/camera.h b/include/mods/svc/camera.h new file mode 100644 index 0000000000..f974cec152 --- /dev/null +++ b/include/mods/svc/camera.h @@ -0,0 +1,64 @@ +#pragma once + +#include "mods/api.h" + +#define CAMERA_SERVICE_ID "dev.twilitrealm.dusklight.camera" +#define CAMERA_SERVICE_MAJOR 1u +#define CAMERA_SERVICE_MINOR 0u + +/* + * Snapshot of a game camera for the frame currently being recorded. + * + * Matrix conventions: every matrix is a column-major float[16] using the matrix * column-vector + * convention, ready to memcpy into a WGSL mat4x4f uniform. NOTE: this is the TRANSPOSE of the + * game's row-major Mtx/Mtx44 layout; mods that want the raw game matrices should read the + * view_class directly instead. + * + * View space is right-handed with -Z forward. Projection matrices are in WebGPU clip convention + * and follow the renderer's depth mode: reversed-Z by default (depth 1.0 at the near plane, + * 0.0 at far). + * + * Unprojecting a depth-buffer texel at uv with sampled depth d: + * let ndc = vec3f(uv.x * 2.0 - 1.0, 1.0 - uv.y * 2.0, d); // WebGPU framebuffer y is down + * let world4 = world_from_proj * vec4f(ndc, 1.0); + * let world = world4.xyz / world4.w; + */ +typedef struct CameraInfo { + uint32_t struct_size; + + float view_from_world[16]; /* the view matrix */ + float world_from_view[16]; /* its inverse; column 3 is the camera position */ + float proj_from_view[16]; /* WebGPU-convention projection (+ Aurora reversed-Z) */ + float view_from_proj[16]; /* its inverse */ + float proj_from_world[16]; /* proj_from_view * view_from_world */ + float world_from_proj[16]; /* one-step depth-buffer -> world unproject */ + + float eye[3]; /* camera position in world space */ + float fovy; /* vertical field of view, degrees */ + float aspect; + float near_plane; + float far_plane; +} CameraInfo; + +#define CAMERA_INFO_INIT {sizeof(CameraInfo)} + +typedef struct CameraService { + ServiceHeader header; + + /* + * Snapshots a camera. game_view must be a view_class pointer, such as from a render stage + * callback's game view. Game thread only. Returns MOD_UNAVAILABLE when the view is not a valid + * perspective camera. + */ + ModResult (*get_camera)(ModContext* ctx, const void* game_view, CameraInfo* out_info); +} CameraService; + +#ifdef __cplusplus +#include "mods/service.hpp" + +template <> +struct dusk::mods::ServiceTraits { + static constexpr const char* id = CAMERA_SERVICE_ID; + static constexpr uint16_t major_version = CAMERA_SERVICE_MAJOR; +}; +#endif diff --git a/src/dusk/mods/svc/camera.cpp b/src/dusk/mods/svc/camera.cpp new file mode 100644 index 0000000000..37057e2397 --- /dev/null +++ b/src/dusk/mods/svc/camera.cpp @@ -0,0 +1,134 @@ +#include "registry.hpp" + +#include "dusk/mods/loader/loader.hpp" +#include "mods/svc/camera.h" + +#include "f_op/f_op_view.h" +#include "m_Do/m_Do_mtx.h" + +#include +#include + +namespace dusk::mods::svc { +namespace { + +void to_column_major(const Mtx44 in, float out[16]) { + for (int c = 0; c < 4; ++c) { + for (int r = 0; r < 4; ++r) { + out[c * 4 + r] = in[r][c]; + } + } +} + +void store_affine(const Mtx in, float out[16]) { + for (int c = 0; c < 4; ++c) { + for (int r = 0; r < 3; ++r) { + out[c * 4 + r] = in[r][c]; + } + out[c * 4 + 3] = 0.0f; + } + out[15] = 1.0f; +} + +/* affine * 4x4; operand-order mirror of cMtx_concatProjView */ +void concat_affine_proj(const Mtx a, const Mtx44 b, Mtx44 out) { + for (int r = 0; r < 3; ++r) { + for (int c = 0; c < 4; ++c) { + out[r][c] = + a[r][0] * b[0][c] + a[r][1] * b[1][c] + a[r][2] * b[2][c] + a[r][3] * b[3][c]; + } + } + std::memcpy(out[3], b[3], sizeof(f32) * 4); +} + +ModResult snapshot_view(const view_class* view, CameraInfo* outInfo) { + if (view == nullptr || !(view->near_ > 0.0f) || !(view->far_ > view->near_) || + !(view->fovy > 0.0f) || view->fovy >= 180.0f || !(view->aspect > 0.0f)) + { + return MOD_UNAVAILABLE; + } + + // Build from the GXSetProjection values + const f32 p00 = view->projMtx[0][0]; + const f32 p02 = view->projMtx[0][2]; + const f32 p11 = view->projMtx[1][1]; + const f32 p12 = view->projMtx[1][2]; + const f32 p22 = view->projMtx[2][2]; + const f32 p23 = view->projMtx[2][3]; + if (view->projMtx[3][2] != -1.0f || p00 == 0.0f || p11 == 0.0f || p23 == 0.0f) { + return MOD_UNAVAILABLE; + } + + // WebGPU-convention projection + Aurora reversed Z + const bool reversedZ = aurora::gfx::uses_reversed_z(); + const f32 e = reversedZ ? -p22 : p22 - 1.0f; + const f32 f = reversedZ ? -p23 : p23; + Mtx44 proj{}; + proj[0][0] = p00; + proj[0][2] = p02; + proj[1][1] = p11; + proj[1][2] = p12; + proj[2][2] = e; + proj[2][3] = f; + proj[3][2] = -1.0f; + + // Analytic inverse of the sparse perspective form + Mtx44 invProj{}; + invProj[0][0] = 1.0f / p00; + invProj[0][3] = p02 / p00; + invProj[1][1] = 1.0f / p11; + invProj[1][3] = p12 / p11; + invProj[2][3] = -1.0f; + invProj[3][2] = 1.0f / f; + invProj[3][3] = e / f; + + Mtx44 projWorld; + cMtx_concatProjView(proj, view->viewMtx, projWorld); + Mtx44 worldProj; + concat_affine_proj(view->invViewMtx, invProj, worldProj); + + store_affine(view->viewMtx, outInfo->view_from_world); + store_affine(view->invViewMtx, outInfo->world_from_view); + to_column_major(proj, outInfo->proj_from_view); + to_column_major(invProj, outInfo->view_from_proj); + to_column_major(projWorld, outInfo->proj_from_world); + to_column_major(worldProj, outInfo->world_from_proj); + + outInfo->eye[0] = view->lookat.eye.x; + outInfo->eye[1] = view->lookat.eye.y; + outInfo->eye[2] = view->lookat.eye.z; + outInfo->fovy = view->fovy; + outInfo->aspect = view->aspect; + outInfo->near_plane = view->near_; + outInfo->far_plane = view->far_; + return MOD_OK; +} + +ModResult camera_get_camera_from_view( + ModContext* context, const void* gameView, CameraInfo* outInfo) { + if (outInfo == nullptr || outInfo->struct_size < sizeof(CameraInfo) || + mod_from_context(context) == nullptr || gameView == nullptr) + { + return MOD_INVALID_ARGUMENT; + } + const uint32_t structSize = outInfo->struct_size; + std::memset(outInfo, 0, sizeof(CameraInfo)); + outInfo->struct_size = structSize; + return snapshot_view(static_cast(gameView), outInfo); +} + +constexpr CameraService s_cameraService{ + .header = SERVICE_HEADER(CameraService, CAMERA_SERVICE_MAJOR, CAMERA_SERVICE_MINOR), + .get_camera = camera_get_camera_from_view, +}; + +} // namespace + +constinit const ServiceModule g_cameraModule{ + .id = CAMERA_SERVICE_ID, + .majorVersion = CAMERA_SERVICE_MAJOR, + .minorVersion = CAMERA_SERVICE_MINOR, + .service = &s_cameraService, +}; + +} // namespace dusk::mods::svc diff --git a/src/dusk/mods/svc/registry.cpp b/src/dusk/mods/svc/registry.cpp index 206acc8994..f9e7f96476 100644 --- a/src/dusk/mods/svc/registry.cpp +++ b/src/dusk/mods/svc/registry.cpp @@ -208,6 +208,7 @@ void ModLoader::init_services() { &svc::g_configModule, &svc::g_uiModule, &svc::g_gameModule, + &svc::g_cameraModule, }) { svc::register_module(*module); diff --git a/src/dusk/mods/svc/registry.hpp b/src/dusk/mods/svc/registry.hpp index 71fda98abd..b4b76cd510 100644 --- a/src/dusk/mods/svc/registry.hpp +++ b/src/dusk/mods/svc/registry.hpp @@ -70,5 +70,6 @@ extern const ServiceModule g_textureModule; extern const ServiceModule g_configModule; extern const ServiceModule g_uiModule; extern const ServiceModule g_gameModule; +extern const ServiceModule g_cameraModule; } // namespace dusk::mods::svc From 3585ab8a59a45bed50962c1f9e901753950dfe99 Mon Sep 17 00:00:00 2001 From: Irastris Date: Thu, 9 Jul 2026 20:57:38 -0400 Subject: [PATCH 010/223] Add deltatime to bloom/fog transitions --- src/d/d_kankyo.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index 36949adc76..048b8b844d 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -37,6 +37,7 @@ #include "dusk/settings.h" #include "dusk/frame_interpolation.h" #include "dusk/game_clock.h" +static f32 timeScale = 1.0f; #endif static void GxXFog_set(); @@ -1799,6 +1800,9 @@ void dScnKy_env_light_c::setLight_palno_get(u8* prev_envr_id_p, u8* next_envr_id u8 psel_idx = 0; int i; int sp14 = 0; +#if TARGET_PC + const f32 timeScale = (pattern_ratio_p == &g_env_light.pat_ratio) ? ::timeScale : 1.0f; +#endif if (*init_timer_p != 0) { (*init_timer_p)++; @@ -2132,14 +2136,22 @@ void dScnKy_env_light_c::setLight_palno_get(u8* prev_envr_id_p, u8* next_envr_id if (g_env_light.mColPatMode == 0) { if (pselect_p->change_rate > 0.0f) { +#if TARGET_PC + *pattern_ratio_p += timeScale * ((1.0f / 30) / pselect_p->change_rate); +#else *pattern_ratio_p += (1.0f / 30) / pselect_p->change_rate; +#endif } // pattern change rate is faster in hyrule field if (strcmp(dComIfGp_getStartStageName(), "F_SP121") == 0 && *prev_pat_p == *next_pat_p) { +#if TARGET_PC + *pattern_ratio_p += timeScale * (1.0f / 15); +#else *pattern_ratio_p += (1.0f / 15); +#endif } if (*pattern_ratio_p >= 1.0f) { @@ -2332,6 +2344,10 @@ void dScnKy_env_light_c::setLight() { u8 next_pal_start_id; u8 prev_pal_end_id; u8 next_pal_end_id; +#if TARGET_PC + const f32 deltaTime = dusk::game_clock::consume_interval(this); + timeScale = deltaTime / dusk::game_clock::period_for_original_frames(1.0f); +#endif setLight_palno_get(&g_env_light.PrevCol, &g_env_light.UseCol, &g_env_light.wether_pat0, &g_env_light.wether_pat1, &prev_pal_start_id, &prev_pal_end_id, &next_pal_start_id, &next_pal_end_id, &color_ratio, &start_pat_pal_id, @@ -2517,8 +2533,6 @@ void dScnKy_env_light_c::setLight() { f32 sin = cM_ssin(S_fuwan_sin); #if TARGET_PC - const f32 deltaTime = dusk::game_clock::consume_interval(this); - const f32 timeScale = deltaTime / dusk::game_clock::period_for_original_frames(1.0f); S_fuwan_sin += (s16)((cM_rndF(2000.0f) + 500) * timeScale); #else S_fuwan_sin += (s16)cM_rndF(2000.0f) + 500; From d9a978f21fbd2d0083ef52bc9ba8eaffc1e3d85a Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 9 Jul 2026 23:08:59 -0600 Subject: [PATCH 011/223] Mod API: gfx service --- docs/modding.md | 29 ++ files.cmake | 1 + include/dusk/gfx.hpp | 10 + include/mods/svc/gfx.h | 209 ++++++++ src/dusk/mods/svc/gfx.cpp | 846 +++++++++++++++++++++++++++++++++ src/dusk/mods/svc/registry.cpp | 1 + src/dusk/mods/svc/registry.hpp | 1 + src/m_Do/m_Do_graphic.cpp | 21 + 8 files changed, 1118 insertions(+) create mode 100644 include/dusk/gfx.hpp create mode 100644 include/mods/svc/gfx.h create mode 100644 src/dusk/mods/svc/gfx.cpp diff --git a/docs/modding.md b/docs/modding.md index 031f08c602..b2e7ba2e26 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -409,6 +409,35 @@ existing documents restyle immediately, and future ones pick it up when created. host styles and may override them. Scope selectors tightly (use `[mod-id="..."]`!), especially for `UI_SCOPE_WINDOW`, unless changing host UI is intentional. +### GfxService (`mods/svc/gfx.h`) + +Direct WebGPU access at various stages of the rendering pipeline. Mods use the `wgpu*` C API (via `webgpu/webgpu.h`) for +custom draws and compute dispatches. Mods must manage their own WebGPU state, including pipelines and bind groups. + +```cpp +IMPORT_SERVICE(GfxService, svc_gfx); + +GfxDeviceInfo info = GFX_DEVICE_INFO_INIT; +svc_gfx->get_device_info(mod_ctx, &info); +``` + +`register_stage_hook` runs a game-thread callback during frame recording. The public stages are: + +- `GFX_STAGE_SCENE_BEGIN`: world camera window after camera/projection/light setup +- `GFX_STAGE_SCENE_AFTER_TERRAIN`: after terrain/shadow lists, before object and translucent lists +- `GFX_STAGE_SCENE_AFTER_OPAQUE`: after sky/terrain/object opaque lists, before translucent lists +- `GFX_STAGE_FRAME_BEFORE_HUD`: 3D scene and wipe are complete, before 2D/HUD lists +- `GFX_STAGE_FRAME_AFTER_HUD`: full game scene, including HUD + +Inside a stage callback, record work with `push_draw`, stream per-frame data with `push_verts`, `push_indices`, +`push_uniform`, or `push_storage`, snapshot the current frame with `resolve_pass`, and use `create_pass`/`resolve_pass` +for temporary offscreen passes. Draw callbacks run later on the render worker thread with the live +`WGPURenderPassEncoder`; they may use only their `GfxDrawContext` handles and raw `wgpu*` calls. Compute callbacks +registered with `register_compute_type` follow the same worker-thread rule and run on the frame command encoder. + +All WGPU handles from the service are borrowed. Resolved target views are valid for the current frame only. GPU objects +created by a mod are owned by that mod and should be released in `mod_shutdown`. + ### CameraService (`mods/svc/camera.h`) Converts a game view provided by a render callback into WebGPU-convention camera data. Matrix fields are column-major diff --git a/files.cmake b/files.cmake index 358d2373c1..c1546f1db0 100644 --- a/files.cmake +++ b/files.cmake @@ -1566,6 +1566,7 @@ set(DUSK_FILES src/dusk/mods/svc/config.cpp src/dusk/mods/svc/config.hpp src/dusk/mods/svc/game.cpp + src/dusk/mods/svc/gfx.cpp src/dusk/mods/svc/hook.cpp src/dusk/mods/svc/host.cpp src/dusk/mods/svc/log.cpp diff --git a/include/dusk/gfx.hpp b/include/dusk/gfx.hpp new file mode 100644 index 0000000000..adb04bee51 --- /dev/null +++ b/include/dusk/gfx.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "mods/svc/gfx.h" + +namespace dusk::mods { + +void gfx_run_stage(GfxStage stage, const view_class* gameView = nullptr, + const view_port_class* gameViewport = nullptr); + +} // namespace dusk::mods diff --git a/include/mods/svc/gfx.h b/include/mods/svc/gfx.h new file mode 100644 index 0000000000..a9812fd044 --- /dev/null +++ b/include/mods/svc/gfx.h @@ -0,0 +1,209 @@ +#pragma once + +#include "mods/api.h" + +#include + +/* + * Direct WebGPU access at various stages of the rendering pipeline. Mods use the wgpu* C API + * (via webgpu/webgpu.h) for custom draws and compute dispatches. + * + * Every service function must be called on the game thread. GfxStageFn callbacks run on the game + * thread during frame recording. push_draw, push_* and pass functions are valid from a stage + * callback and anywhere else GX commands are being recorded. + * + * GfxDrawFn and GfxComputeFn callbacks run on the render worker thread while the frame is encoded. + * They may use only the handles in their context struct and raw wgpu* calls; no other service may + * be called from them. + * + * All WGPU handles provided by this service are borrowed. Handles in callback contexts are valid + * only for the duration of the callback; views in GfxResolvedTargets are valid for the current + * frame only. GPU objects a mod creates through raw wgpu calls are its own responsibility and + * should be released in mod_shutdown. The device outlives all mods. + */ + +#define GFX_SERVICE_ID "dev.twilitrealm.dusklight.gfx" +#define GFX_SERVICE_MAJOR 1u +#define GFX_SERVICE_MINOR 0u + +/* Maximum size for push_draw payload */ +#define GFX_INLINE_DRAW_PAYLOAD_SIZE 128u + +/* 0 is never a valid handle. */ +typedef uint64_t GfxDrawTypeHandle; +typedef uint64_t GfxStageHookHandle; +typedef uint64_t GfxComputeTypeHandle; + +/* A suballocation in one of the shared per-frame streaming buffers. */ +typedef struct GfxRange { + uint32_t offset; + uint32_t size; +} GfxRange; + +/* + * Device and scene pass configuration. Valid from mod_initialize onward and stable for the + * session. Offscreen passes from create_pass are always single-sample. + */ +typedef struct GfxDeviceInfo { + uint32_t struct_size; + WGPUDevice device; /* borrowed */ + WGPUQueue queue; /* borrowed */ + WGPUTextureFormat color_format; /* scene color target format */ + WGPUTextureFormat depth_format; /* scene depth target format */ + uint32_t sample_count; /* scene pass MSAA sample count */ + bool uses_reversed_z; /* true means depth 1.0 is near */ +} GfxDeviceInfo; + +#define GFX_DEVICE_INFO_INIT \ + {sizeof(GfxDeviceInfo), NULL, NULL, WGPUTextureFormat_Undefined, WGPUTextureFormat_Undefined, \ + 1u, false} + +/* + * Passed to GfxDrawFn on the render worker thread; valid only during the call. The pass pipeline, + * bind group, viewport, and scissor state is restored by the host after the callback returns. + */ +typedef struct GfxDrawContext { + uint32_t struct_size; + WGPUDevice device; + WGPUQueue queue; + WGPURenderPassEncoder pass; + WGPUBuffer vertex_buffer; + WGPUBuffer index_buffer; + WGPUBuffer uniform_buffer; + WGPUBuffer storage_buffer; + WGPUTextureFormat color_format; + WGPUTextureFormat depth_format; + uint32_t sample_count; + uint32_t target_width; + uint32_t target_height; + bool uses_reversed_z; +} GfxDrawContext; + +typedef void (*GfxDrawFn)(ModContext* ctx, const GfxDrawContext* draw_ctx, const void* payload, + size_t payload_size, void* user_data); + +typedef struct GfxDrawTypeDesc { + uint32_t struct_size; + const char* label; /* optional debug label */ + GfxDrawFn draw; /* required; called from the render worker thread */ + void* user_data; +} GfxDrawTypeDesc; + +#define GFX_DRAW_TYPE_DESC_INIT {sizeof(GfxDrawTypeDesc), NULL, NULL, NULL} + +typedef enum GfxStage { + GFX_STAGE_SCENE_AFTER_TERRAIN = 0, + GFX_STAGE_FRAME_BEFORE_HUD = 1, + GFX_STAGE_FRAME_AFTER_HUD = 2, + GFX_STAGE_SCENE_BEGIN = 3, + GFX_STAGE_SCENE_AFTER_OPAQUE = 4, +} GfxStage; + +typedef struct GfxStageContext { + uint32_t struct_size; + GfxStage stage; + const void* game_view; /* view_class* for world-camera stages; NULL otherwise */ + const void* game_viewport; /* view_port_class* for world-camera stages; NULL otherwise */ +} GfxStageContext; + +typedef void (*GfxStageFn)(ModContext* ctx, const GfxStageContext* stage_ctx, void* user_data); + +typedef struct GfxStageHookDesc { + uint32_t struct_size; + GfxStageFn callback; /* required */ + void* user_data; +} GfxStageHookDesc; + +#define GFX_STAGE_HOOK_DESC_INIT {sizeof(GfxStageHookDesc), NULL, NULL} + +typedef struct GfxResolveDesc { + uint32_t struct_size; + bool color; + bool depth; +} GfxResolveDesc; + +#define GFX_RESOLVE_DESC_INIT {sizeof(GfxResolveDesc), true, false} + +typedef struct GfxResolvedTargets { + uint32_t struct_size; + WGPUTextureView color; /* single-sample snapshot in color_format */ + WGPUTextureView depth; /* single-sample raw depth snapshot, R32Float when available */ + WGPUTextureFormat color_format; + uint32_t width; + uint32_t height; +} GfxResolvedTargets; + +#define GFX_RESOLVED_TARGETS_INIT \ + {sizeof(GfxResolvedTargets), NULL, NULL, WGPUTextureFormat_Undefined, 0u, 0u} + +/* + * Passed to GfxComputeFn on the render worker thread; valid only during the call. The encoder is + * the frame command encoder between scene render passes. Leave no pass open and never finish or + * release the encoder. + */ +typedef struct GfxComputeContext { + uint32_t struct_size; + WGPUDevice device; + WGPUQueue queue; + WGPUCommandEncoder encoder; + WGPUBuffer vertex_buffer; + WGPUBuffer index_buffer; + WGPUBuffer uniform_buffer; + WGPUBuffer storage_buffer; +} GfxComputeContext; + +typedef void (*GfxComputeFn)(ModContext* ctx, const GfxComputeContext* compute_ctx, + const void* payload, size_t payload_size, void* user_data); + +typedef struct GfxComputeTypeDesc { + uint32_t struct_size; + const char* label; /* optional debug label */ + GfxComputeFn callback; /* required; called from the render worker thread */ + void* user_data; +} GfxComputeTypeDesc; + +#define GFX_COMPUTE_TYPE_DESC_INIT {sizeof(GfxComputeTypeDesc), NULL, NULL, NULL} + +typedef struct GfxService { + ServiceHeader header; + + ModResult (*get_device_info)(ModContext* ctx, GfxDeviceInfo* out_info); + void* (*get_proc_address)(ModContext* ctx, const char* name); + + ModResult (*register_draw_type)( + ModContext* ctx, const GfxDrawTypeDesc* desc, GfxDrawTypeHandle* out_handle); + ModResult (*unregister_draw_type)(ModContext* ctx, GfxDrawTypeHandle handle); + ModResult (*push_draw)( + ModContext* ctx, GfxDrawTypeHandle handle, const void* payload, size_t payload_size); + + ModResult (*register_compute_type)( + ModContext* ctx, const GfxComputeTypeDesc* desc, GfxComputeTypeHandle* out_handle); + ModResult (*unregister_compute_type)(ModContext* ctx, GfxComputeTypeHandle handle); + ModResult (*push_compute)( + ModContext* ctx, GfxComputeTypeHandle handle, const void* payload, size_t payload_size); + + ModResult (*push_verts)( + ModContext* ctx, const void* data, size_t size, size_t alignment, GfxRange* out_range); + ModResult (*push_indices)( + ModContext* ctx, const void* data, size_t size, size_t alignment, GfxRange* out_range); + ModResult (*push_uniform)(ModContext* ctx, const void* data, size_t size, GfxRange* out_range); + ModResult (*push_storage)(ModContext* ctx, const void* data, size_t size, GfxRange* out_range); + + ModResult (*register_stage_hook)(ModContext* ctx, GfxStage stage, const GfxStageHookDesc* desc, + GfxStageHookHandle* out_handle); + ModResult (*unregister_stage_hook)(ModContext* ctx, GfxStageHookHandle handle); + + ModResult (*resolve_pass)( + ModContext* ctx, const GfxResolveDesc* desc, GfxResolvedTargets* out_targets); + ModResult (*create_pass)(ModContext* ctx, uint32_t width, uint32_t height); +} GfxService; + +#ifdef __cplusplus +#include "mods/service.hpp" + +template <> +struct dusk::mods::ServiceTraits { + static constexpr const char* id = GFX_SERVICE_ID; + static constexpr uint16_t major_version = GFX_SERVICE_MAJOR; +}; +#endif diff --git a/src/dusk/mods/svc/gfx.cpp b/src/dusk/mods/svc/gfx.cpp new file mode 100644 index 0000000000..7fa472454d --- /dev/null +++ b/src/dusk/mods/svc/gfx.cpp @@ -0,0 +1,846 @@ +#include "registry.hpp" + +#include "aurora/lib/logging.hpp" +#include "dusk/gfx.hpp" +#include "dusk/mods/loader/loader.hpp" +#include "mods/svc/gfx.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace dusk::mods { +namespace { + +aurora::Module Log("dusk::mods::gfx"); + +enum class GfxSlotKind : uint8_t { + DrawType, + StageHook, + ComputeType, +}; + +enum class GfxStreamBuffer : uint8_t { + Verts, + Indices, + Uniform, + Storage, +}; + +struct GfxSlot { + GfxSlotKind kind = GfxSlotKind::DrawType; + uint32_t generation = 1; + bool alive = false; + LoadedMod* owner = nullptr; + ModContext* ownerContext = nullptr; + std::string ownerId; + void* userData = nullptr; + + GfxDrawFn drawFn = nullptr; + aurora::gfx::DrawTypeId auroraDrawId = aurora::gfx::InvalidDrawType; + + GfxStageFn stageFn = nullptr; + GfxStage stage = GFX_STAGE_SCENE_AFTER_TERRAIN; + + GfxComputeFn computeFn = nullptr; + aurora::gfx::EncoderTaskId auroraTaskId = aurora::gfx::InvalidEncoderTask; +}; + +struct WorkerFailure { + std::string modId; + std::string message; + std::vector drawIds; + std::vector taskIds; +}; + +std::mutex s_mutex; +std::vector s_slots; +std::vector s_freeSlots; +std::vector s_workerFailures; +bool s_modOffscreenOpen = false; + +constexpr uint64_t make_handle(uint32_t index, uint32_t generation) { + return static_cast(generation) << 32 | index; +} + +GfxSlot* resolve_slot_locked(uint64_t handle, GfxSlotKind kind) { + const auto index = static_cast(handle & 0xFFFFFFFFu); + const auto generation = static_cast(handle >> 32); + if (handle == 0 || index >= s_slots.size()) { + return nullptr; + } + auto& slot = s_slots[index]; + if (!slot.alive || slot.generation != generation || slot.kind != kind) { + return nullptr; + } + return &slot; +} + +GfxSlot* resolve_owned_slot_locked(LoadedMod& mod, uint64_t handle, GfxSlotKind kind) { + auto* slot = resolve_slot_locked(handle, kind); + if (slot == nullptr || slot->owner != &mod) { + return nullptr; + } + return slot; +} + +uint32_t alloc_slot_locked() { + if (!s_freeSlots.empty()) { + const auto index = s_freeSlots.back(); + s_freeSlots.pop_back(); + return index; + } + const auto index = static_cast(s_slots.size()); + s_slots.emplace_back(); + return index; +} + +void free_slot_locked(uint32_t index) { + auto& slot = s_slots[index]; + slot.alive = false; + ++slot.generation; + slot.owner = nullptr; + slot.ownerContext = nullptr; + slot.ownerId.clear(); + slot.userData = nullptr; + slot.drawFn = nullptr; + slot.auroraDrawId = aurora::gfx::InvalidDrawType; + slot.stageFn = nullptr; + slot.stage = GFX_STAGE_SCENE_AFTER_TERRAIN; + slot.computeFn = nullptr; + slot.auroraTaskId = aurora::gfx::InvalidEncoderTask; + s_freeSlots.push_back(index); +} + +void collect_mod_slots_locked(LoadedMod* owner, std::vector& drawIds, + std::vector& taskIds) { + for (uint32_t i = 0; i < s_slots.size(); ++i) { + auto& slot = s_slots[i]; + if (!slot.alive || slot.owner != owner) { + continue; + } + if (slot.kind == GfxSlotKind::DrawType && slot.auroraDrawId != aurora::gfx::InvalidDrawType) + { + drawIds.push_back(slot.auroraDrawId); + } else if (slot.kind == GfxSlotKind::ComputeType && + slot.auroraTaskId != aurora::gfx::InvalidEncoderTask) + { + taskIds.push_back(slot.auroraTaskId); + } + free_slot_locked(i); + } +} + +void unregister_aurora_types(const std::vector& drawIds, + const std::vector& taskIds) { + for (const auto id : drawIds) { + aurora::gfx::unregister_draw_type(id); + } + for (const auto id : taskIds) { + aurora::gfx::unregister_encoder_task_type(id); + } +} + +void draw_trampoline(const aurora::gfx::DrawContext& ctx, const wgpu::RenderPassEncoder& pass, + const void* payload, size_t payloadSize, void* userdata) { + const auto handle = static_cast(reinterpret_cast(userdata)); + GfxDrawFn fn = nullptr; + void* userData = nullptr; + ModContext* modContext = nullptr; + LoadedMod* owner = nullptr; + std::string ownerId; + { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_slot_locked(handle, GfxSlotKind::DrawType); + if (slot == nullptr) { + return; + } + fn = slot->drawFn; + userData = slot->userData; + modContext = slot->ownerContext; + owner = slot->owner; + ownerId = slot->ownerId; + } + + GfxDrawContext drawContext{ + .struct_size = sizeof(GfxDrawContext), + .device = ctx.device.Get(), + .queue = ctx.queue.Get(), + .pass = pass.Get(), + .vertex_buffer = ctx.vertexBuffer.Get(), + .index_buffer = ctx.indexBuffer.Get(), + .uniform_buffer = ctx.uniformBuffer.Get(), + .storage_buffer = ctx.storageBuffer.Get(), + .color_format = static_cast(ctx.colorFormat), + .depth_format = static_cast(ctx.depthFormat), + .sample_count = ctx.sampleCount, + .target_width = ctx.targetWidth, + .target_height = ctx.targetHeight, + .uses_reversed_z = aurora::gfx::uses_reversed_z(), + }; + + std::string failure; + try { + fn(modContext, &drawContext, payload, payloadSize, userData); + return; + } catch (const std::exception& e) { + failure = fmt::format("exception in gfx draw callback: {}", e.what()); + } catch (...) { + failure = "unknown exception in gfx draw callback"; + } + + std::lock_guard lock{s_mutex}; + WorkerFailure record{ + .modId = std::move(ownerId), + .message = std::move(failure), + }; + collect_mod_slots_locked(owner, record.drawIds, record.taskIds); + s_workerFailures.push_back(std::move(record)); +} + +void compute_trampoline(const aurora::gfx::EncoderTaskContext& ctx, const wgpu::CommandEncoder& cmd, + const void* payload, size_t payloadSize, void* userdata) { + const auto handle = static_cast(reinterpret_cast(userdata)); + GfxComputeFn fn = nullptr; + void* userData = nullptr; + ModContext* modContext = nullptr; + LoadedMod* owner = nullptr; + std::string ownerId; + { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_slot_locked(handle, GfxSlotKind::ComputeType); + if (slot == nullptr) { + return; + } + fn = slot->computeFn; + userData = slot->userData; + modContext = slot->ownerContext; + owner = slot->owner; + ownerId = slot->ownerId; + } + + GfxComputeContext computeContext{ + .struct_size = sizeof(GfxComputeContext), + .device = ctx.device.Get(), + .queue = ctx.queue.Get(), + .encoder = cmd.Get(), + .vertex_buffer = ctx.vertexBuffer.Get(), + .index_buffer = ctx.indexBuffer.Get(), + .uniform_buffer = ctx.uniformBuffer.Get(), + .storage_buffer = ctx.storageBuffer.Get(), + }; + + std::string failure; + try { + fn(modContext, &computeContext, payload, payloadSize, userData); + return; + } catch (const std::exception& e) { + failure = fmt::format("exception in gfx compute callback: {}", e.what()); + } catch (...) { + failure = "unknown exception in gfx compute callback"; + } + + std::lock_guard lock{s_mutex}; + WorkerFailure record{ + .modId = std::move(ownerId), + .message = std::move(failure), + }; + collect_mod_slots_locked(owner, record.drawIds, record.taskIds); + s_workerFailures.push_back(std::move(record)); +} + +} // namespace + +ModResult gfx_register_draw_type( + LoadedMod& mod, const char* label, GfxDrawFn draw, void* userData, uint64_t& outHandle) { + outHandle = 0; + + uint64_t handle = 0; + { + std::lock_guard lock{s_mutex}; + const auto index = alloc_slot_locked(); + auto& slot = s_slots[index]; + slot.kind = GfxSlotKind::DrawType; + slot.alive = true; + slot.owner = &mod; + slot.ownerContext = mod.context.get(); + slot.ownerId = mod.metadata.id; + slot.userData = userData; + slot.drawFn = draw; + handle = make_handle(index, slot.generation); + } + + const auto auroraId = aurora::gfx::register_draw_type(aurora::gfx::DrawTypeDescriptor{ + .label = label, + .draw = draw_trampoline, + .userdata = reinterpret_cast(static_cast(handle)), + }); + if (auroraId == aurora::gfx::InvalidDrawType) { + std::lock_guard lock{s_mutex}; + if (resolve_owned_slot_locked(mod, handle, GfxSlotKind::DrawType) != nullptr) { + free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + } + return MOD_ERROR; + } + + { + std::lock_guard lock{s_mutex}; + if (auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::DrawType)) { + slot->auroraDrawId = auroraId; + } + } + outHandle = handle; + return MOD_OK; +} + +ModResult gfx_unregister_draw_type(LoadedMod& mod, uint64_t handle) { + aurora::gfx::DrawTypeId auroraId = aurora::gfx::InvalidDrawType; + { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::DrawType); + if (slot == nullptr) { + return MOD_INVALID_ARGUMENT; + } + auroraId = slot->auroraDrawId; + free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + } + aurora::gfx::unregister_draw_type(auroraId); + return MOD_OK; +} + +ModResult gfx_push_draw(LoadedMod& mod, uint64_t handle, const void* payload, size_t payloadSize) { + aurora::gfx::DrawTypeId auroraId = aurora::gfx::InvalidDrawType; + { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::DrawType); + if (slot == nullptr) { + return MOD_INVALID_ARGUMENT; + } + auroraId = slot->auroraDrawId; + } + if (!aurora::gfx::push_custom_draw(auroraId, payload, payloadSize)) { + return MOD_UNAVAILABLE; + } + return MOD_OK; +} + +ModResult gfx_push_stream( + GfxStreamBuffer buffer, const void* data, size_t size, size_t alignment, GfxRange& outRange) { + aurora::gfx::Range range; + const auto* bytes = static_cast(data); + switch (buffer) { + case GfxStreamBuffer::Verts: + range = aurora::gfx::push_verts(bytes, size, alignment); + break; + case GfxStreamBuffer::Indices: + range = aurora::gfx::push_indices(bytes, size, alignment); + break; + case GfxStreamBuffer::Uniform: + range = aurora::gfx::push_uniform(bytes, size); + break; + case GfxStreamBuffer::Storage: + range = aurora::gfx::push_storage(bytes, size); + break; + } + if (range.size == 0) { + return MOD_UNAVAILABLE; + } + outRange = GfxRange{.offset = range.offset, .size = range.size}; + return MOD_OK; +} + +ModResult gfx_register_stage_hook( + LoadedMod& mod, GfxStage stage, GfxStageFn callback, void* userData, uint64_t& outHandle) { + outHandle = 0; + std::lock_guard lock{s_mutex}; + const auto index = alloc_slot_locked(); + auto& slot = s_slots[index]; + slot.kind = GfxSlotKind::StageHook; + slot.alive = true; + slot.owner = &mod; + slot.ownerContext = mod.context.get(); + slot.ownerId = mod.metadata.id; + slot.userData = userData; + slot.stageFn = callback; + slot.stage = stage; + outHandle = make_handle(index, slot.generation); + return MOD_OK; +} + +ModResult gfx_unregister_stage_hook(LoadedMod& mod, uint64_t handle) { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::StageHook); + if (slot == nullptr) { + return MOD_INVALID_ARGUMENT; + } + free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + return MOD_OK; +} + +ModResult gfx_resolve_pass(LoadedMod& mod, const GfxResolveDesc& desc, GfxResolvedTargets& out) { + out = GfxResolvedTargets{.struct_size = sizeof(GfxResolvedTargets)}; + if (aurora::gfx::is_offscreen() && !s_modOffscreenOpen) { + Log.error( + "[{}] resolve_pass: the active offscreen pass belongs to the game", mod.metadata.id); + return MOD_UNAVAILABLE; + } + const bool closesModOffscreen = s_modOffscreenOpen; + + aurora::gfx::ResolvedTargets resolved; + if (!aurora::gfx::resolve_pass( + aurora::gfx::ResolveDesc{.color = desc.color, .depth = desc.depth}, resolved)) + { + return MOD_UNAVAILABLE; + } + if (closesModOffscreen) { + s_modOffscreenOpen = false; + } + + out.color = resolved.color.Get(); + out.depth = resolved.depth.Get(); + out.color_format = static_cast(resolved.colorFormat); + out.width = resolved.width; + out.height = resolved.height; + return MOD_OK; +} + +ModResult gfx_create_pass(LoadedMod& mod, uint32_t width, uint32_t height) { + if (aurora::gfx::is_offscreen()) { + Log.error("[{}] create_pass: an offscreen pass is already active", mod.metadata.id); + return MOD_UNAVAILABLE; + } + if (!aurora::gfx::create_pass(width, height)) { + return MOD_UNAVAILABLE; + } + s_modOffscreenOpen = true; + return MOD_OK; +} + +ModResult gfx_register_compute_type( + LoadedMod& mod, const char* label, GfxComputeFn callback, void* userData, uint64_t& outHandle) { + outHandle = 0; + + uint64_t handle = 0; + { + std::lock_guard lock{s_mutex}; + const auto index = alloc_slot_locked(); + auto& slot = s_slots[index]; + slot.kind = GfxSlotKind::ComputeType; + slot.alive = true; + slot.owner = &mod; + slot.ownerContext = mod.context.get(); + slot.ownerId = mod.metadata.id; + slot.userData = userData; + slot.computeFn = callback; + handle = make_handle(index, slot.generation); + } + + const auto auroraId = + aurora::gfx::register_encoder_task_type(aurora::gfx::EncoderTaskDescriptor{ + .label = label, + .callback = compute_trampoline, + .userdata = reinterpret_cast(static_cast(handle)), + }); + if (auroraId == aurora::gfx::InvalidEncoderTask) { + std::lock_guard lock{s_mutex}; + if (resolve_owned_slot_locked(mod, handle, GfxSlotKind::ComputeType) != nullptr) { + free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + } + return MOD_ERROR; + } + + { + std::lock_guard lock{s_mutex}; + if (auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::ComputeType)) { + slot->auroraTaskId = auroraId; + } + } + outHandle = handle; + return MOD_OK; +} + +ModResult gfx_unregister_compute_type(LoadedMod& mod, uint64_t handle) { + aurora::gfx::EncoderTaskId auroraId = aurora::gfx::InvalidEncoderTask; + { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::ComputeType); + if (slot == nullptr) { + return MOD_INVALID_ARGUMENT; + } + auroraId = slot->auroraTaskId; + free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + } + aurora::gfx::unregister_encoder_task_type(auroraId); + return MOD_OK; +} + +ModResult gfx_push_compute( + LoadedMod& mod, uint64_t handle, const void* payload, size_t payloadSize) { + aurora::gfx::EncoderTaskId auroraId = aurora::gfx::InvalidEncoderTask; + { + std::lock_guard lock{s_mutex}; + auto* slot = resolve_owned_slot_locked(mod, handle, GfxSlotKind::ComputeType); + if (slot == nullptr) { + return MOD_INVALID_ARGUMENT; + } + auroraId = slot->auroraTaskId; + } + if (!aurora::gfx::push_encoder_task(auroraId, payload, payloadSize)) { + return MOD_UNAVAILABLE; + } + return MOD_OK; +} + +void gfx_run_stage( + GfxStage stage, const view_class* gameView, const view_port_class* gameViewport) { + struct StageEntry { + uint64_t handle; + GfxStageFn fn; + void* userData; + ModContext* context; + LoadedMod* owner; + }; + + std::vector entries; + { + std::lock_guard lock{s_mutex}; + for (uint32_t i = 0; i < s_slots.size(); ++i) { + const auto& slot = s_slots[i]; + if (slot.alive && slot.kind == GfxSlotKind::StageHook && slot.stage == stage) { + entries.push_back(StageEntry{ + .handle = make_handle(i, slot.generation), + .fn = slot.stageFn, + .userData = slot.userData, + .context = slot.ownerContext, + .owner = slot.owner, + }); + } + } + } + if (entries.empty()) { + return; + } + + const GfxStageContext stageContext{ + .struct_size = sizeof(GfxStageContext), + .stage = stage, + .game_view = gameView, + .game_viewport = gameViewport, + }; + + for (const auto& entry : entries) { + { + std::lock_guard lock{s_mutex}; + if (resolve_slot_locked(entry.handle, GfxSlotKind::StageHook) == nullptr) { + continue; + } + } + if (!entry.owner->active) { + continue; + } + + const bool wasOffscreen = aurora::gfx::is_offscreen(); + try { + entry.fn(entry.context, &stageContext, entry.userData); + } catch (const std::exception& e) { + fail_mod(*entry.owner, MOD_ERROR, + fmt::format("exception in gfx stage callback: {}", e.what())); + } catch (...) { + fail_mod(*entry.owner, MOD_ERROR, "unknown exception in gfx stage callback"); + } + + if (aurora::gfx::is_offscreen() != wasOffscreen) { + aurora::gfx::ResolvedTargets discarded; + aurora::gfx::resolve_pass( + aurora::gfx::ResolveDesc{.color = false, .depth = false}, discarded); + s_modOffscreenOpen = false; + fail_mod(*entry.owner, MOD_ERROR, + "gfx stage callback returned with its offscreen pass still open"); + } + } +} + +void gfx_drain_worker_failures() { + std::vector failures; + { + std::lock_guard lock{s_mutex}; + failures.swap(s_workerFailures); + } + if (failures.empty()) { + return; + } + + bool needsSynchronize = false; + for (const auto& failure : failures) { + unregister_aurora_types(failure.drawIds, failure.taskIds); + needsSynchronize = needsSynchronize || !failure.drawIds.empty() || !failure.taskIds.empty(); + } + if (needsSynchronize) { + aurora::gfx::synchronize(); + } + + for (const auto& failure : failures) { + for (auto& mod : ModLoader::instance().mods()) { + if (mod.metadata.id == failure.modId && mod.active) { + fail_mod(mod, MOD_ERROR, failure.message); + break; + } + } + } +} + +void gfx_remove_mod(LoadedMod& mod) { + std::vector drawIds; + std::vector taskIds; + { + std::lock_guard lock{s_mutex}; + collect_mod_slots_locked(&mod, drawIds, taskIds); + } + if (drawIds.empty() && taskIds.empty()) { + return; + } + unregister_aurora_types(drawIds, taskIds); + aurora::gfx::synchronize(); +} + +} // namespace dusk::mods + +namespace dusk::mods::svc { +namespace { + +ModResult gfx_get_device_info(ModContext* context, GfxDeviceInfo* outInfo) { + if (outInfo == nullptr || outInfo->struct_size < sizeof(GfxDeviceInfo)) { + return MOD_INVALID_ARGUMENT; + } + const uint32_t structSize = outInfo->struct_size; + *outInfo = GfxDeviceInfo{.struct_size = structSize}; + + auto* mod = mod_from_context(context); + if (mod == nullptr) { + return MOD_INVALID_ARGUMENT; + } + + outInfo->device = aurora::gfx::device().Get(); + outInfo->queue = aurora::gfx::queue().Get(); + outInfo->color_format = static_cast(aurora::gfx::color_format()); + outInfo->depth_format = static_cast(aurora::gfx::depth_format()); + outInfo->sample_count = aurora::gfx::sample_count(); + outInfo->uses_reversed_z = aurora::gfx::uses_reversed_z(); + return MOD_OK; +} + +void* gfx_get_proc_address(ModContext* context, const char* name) { + if (mod_from_context(context) == nullptr || name == nullptr) { + return nullptr; + } + return reinterpret_cast(wgpuGetProcAddress(WGPUStringView{name, WGPU_STRLEN})); +} + +ModResult gfx_register_draw_type_impl( + ModContext* context, const GfxDrawTypeDesc* desc, GfxDrawTypeHandle* outHandle) { + if (outHandle != nullptr) { + *outHandle = 0; + } + auto* mod = mod_from_context(context); + if (mod == nullptr || desc == nullptr || desc->struct_size < sizeof(GfxDrawTypeDesc) || + desc->draw == nullptr || outHandle == nullptr) + { + return MOD_INVALID_ARGUMENT; + } + uint64_t handle = 0; + const auto result = + gfx_register_draw_type(*mod, desc->label, desc->draw, desc->user_data, handle); + if (result != MOD_OK) { + return result; + } + *outHandle = handle; + return MOD_OK; +} + +ModResult gfx_unregister_draw_type_impl(ModContext* context, GfxDrawTypeHandle handle) { + auto* mod = mod_from_context(context); + if (mod == nullptr || handle == 0) { + return MOD_INVALID_ARGUMENT; + } + return gfx_unregister_draw_type(*mod, handle); +} + +ModResult gfx_push_draw_impl( + ModContext* context, GfxDrawTypeHandle handle, const void* payload, size_t payloadSize) { + auto* mod = mod_from_context(context); + if (mod == nullptr || handle == 0 || payloadSize > GFX_INLINE_DRAW_PAYLOAD_SIZE || + (payloadSize > 0 && payload == nullptr)) + { + return MOD_INVALID_ARGUMENT; + } + return gfx_push_draw(*mod, handle, payload, payloadSize); +} + +ModResult gfx_push_stream_impl(ModContext* context, GfxStreamBuffer buffer, const void* data, + size_t size, size_t alignment, GfxRange* outRange) { + if (outRange != nullptr) { + *outRange = GfxRange{0, 0}; + } + if (mod_from_context(context) == nullptr || data == nullptr || size == 0 || outRange == nullptr) + { + return MOD_INVALID_ARGUMENT; + } + return gfx_push_stream(buffer, data, size, alignment, *outRange); +} + +ModResult gfx_push_verts_impl( + ModContext* context, const void* data, size_t size, size_t alignment, GfxRange* outRange) { + return gfx_push_stream_impl(context, GfxStreamBuffer::Verts, data, size, alignment, outRange); +} + +ModResult gfx_push_indices_impl( + ModContext* context, const void* data, size_t size, size_t alignment, GfxRange* outRange) { + return gfx_push_stream_impl(context, GfxStreamBuffer::Indices, data, size, alignment, outRange); +} + +ModResult gfx_push_uniform_impl( + ModContext* context, const void* data, size_t size, GfxRange* outRange) { + return gfx_push_stream_impl(context, GfxStreamBuffer::Uniform, data, size, 0, outRange); +} + +ModResult gfx_push_storage_impl( + ModContext* context, const void* data, size_t size, GfxRange* outRange) { + return gfx_push_stream_impl(context, GfxStreamBuffer::Storage, data, size, 0, outRange); +} + +bool valid_stage(GfxStage stage) { + return stage == GFX_STAGE_SCENE_AFTER_TERRAIN || stage == GFX_STAGE_FRAME_BEFORE_HUD || + stage == GFX_STAGE_FRAME_AFTER_HUD || stage == GFX_STAGE_SCENE_BEGIN || + stage == GFX_STAGE_SCENE_AFTER_OPAQUE; +} + +ModResult gfx_register_stage_hook_impl(ModContext* context, GfxStage stage, + const GfxStageHookDesc* desc, GfxStageHookHandle* outHandle) { + if (outHandle != nullptr) { + *outHandle = 0; + } + auto* mod = mod_from_context(context); + if (mod == nullptr || desc == nullptr || desc->struct_size < sizeof(GfxStageHookDesc) || + desc->callback == nullptr || outHandle == nullptr || !valid_stage(stage)) + { + return MOD_INVALID_ARGUMENT; + } + uint64_t handle = 0; + const auto result = + gfx_register_stage_hook(*mod, stage, desc->callback, desc->user_data, handle); + if (result != MOD_OK) { + return result; + } + *outHandle = handle; + return MOD_OK; +} + +ModResult gfx_unregister_stage_hook_impl(ModContext* context, GfxStageHookHandle handle) { + auto* mod = mod_from_context(context); + if (mod == nullptr || handle == 0) { + return MOD_INVALID_ARGUMENT; + } + return gfx_unregister_stage_hook(*mod, handle); +} + +ModResult gfx_resolve_pass_impl( + ModContext* context, const GfxResolveDesc* desc, GfxResolvedTargets* outTargets) { + if (outTargets != nullptr && outTargets->struct_size >= sizeof(GfxResolvedTargets)) { + *outTargets = GfxResolvedTargets{.struct_size = sizeof(GfxResolvedTargets)}; + } + auto* mod = mod_from_context(context); + if (mod == nullptr || desc == nullptr || desc->struct_size < sizeof(GfxResolveDesc) || + outTargets == nullptr || outTargets->struct_size < sizeof(GfxResolvedTargets) || + (!desc->color && !desc->depth)) + { + return MOD_INVALID_ARGUMENT; + } + return gfx_resolve_pass(*mod, *desc, *outTargets); +} + +ModResult gfx_create_pass_impl(ModContext* context, uint32_t width, uint32_t height) { + auto* mod = mod_from_context(context); + if (mod == nullptr || width == 0 || height == 0) { + return MOD_INVALID_ARGUMENT; + } + return gfx_create_pass(*mod, width, height); +} + +ModResult gfx_register_compute_type_impl( + ModContext* context, const GfxComputeTypeDesc* desc, GfxComputeTypeHandle* outHandle) { + if (outHandle != nullptr) { + *outHandle = 0; + } + auto* mod = mod_from_context(context); + if (mod == nullptr || desc == nullptr || desc->struct_size < sizeof(GfxComputeTypeDesc) || + desc->callback == nullptr || outHandle == nullptr) + { + return MOD_INVALID_ARGUMENT; + } + uint64_t handle = 0; + const auto result = + gfx_register_compute_type(*mod, desc->label, desc->callback, desc->user_data, handle); + if (result != MOD_OK) { + return result; + } + *outHandle = handle; + return MOD_OK; +} + +ModResult gfx_unregister_compute_type_impl(ModContext* context, GfxComputeTypeHandle handle) { + auto* mod = mod_from_context(context); + if (mod == nullptr || handle == 0) { + return MOD_INVALID_ARGUMENT; + } + return gfx_unregister_compute_type(*mod, handle); +} + +ModResult gfx_push_compute_impl( + ModContext* context, GfxComputeTypeHandle handle, const void* payload, size_t payloadSize) { + auto* mod = mod_from_context(context); + if (mod == nullptr || handle == 0 || payloadSize > GFX_INLINE_DRAW_PAYLOAD_SIZE || + (payloadSize > 0 && payload == nullptr)) + { + return MOD_INVALID_ARGUMENT; + } + return gfx_push_compute(*mod, handle, payload, payloadSize); +} + +constexpr GfxService s_gfxService{ + .header = SERVICE_HEADER(GfxService, GFX_SERVICE_MAJOR, GFX_SERVICE_MINOR), + .get_device_info = gfx_get_device_info, + .get_proc_address = gfx_get_proc_address, + .register_draw_type = gfx_register_draw_type_impl, + .unregister_draw_type = gfx_unregister_draw_type_impl, + .push_draw = gfx_push_draw_impl, + .register_compute_type = gfx_register_compute_type_impl, + .unregister_compute_type = gfx_unregister_compute_type_impl, + .push_compute = gfx_push_compute_impl, + .push_verts = gfx_push_verts_impl, + .push_indices = gfx_push_indices_impl, + .push_uniform = gfx_push_uniform_impl, + .push_storage = gfx_push_storage_impl, + .register_stage_hook = gfx_register_stage_hook_impl, + .unregister_stage_hook = gfx_unregister_stage_hook_impl, + .resolve_pass = gfx_resolve_pass_impl, + .create_pass = gfx_create_pass_impl, +}; + +} // namespace + +constinit const ServiceModule g_gfxModule{ + .id = GFX_SERVICE_ID, + .majorVersion = GFX_SERVICE_MAJOR, + .minorVersion = GFX_SERVICE_MINOR, + .service = &s_gfxService, + .modDetached = gfx_remove_mod, + .frameBegin = gfx_drain_worker_failures, +}; + +} // namespace dusk::mods::svc diff --git a/src/dusk/mods/svc/registry.cpp b/src/dusk/mods/svc/registry.cpp index f9e7f96476..338625230a 100644 --- a/src/dusk/mods/svc/registry.cpp +++ b/src/dusk/mods/svc/registry.cpp @@ -209,6 +209,7 @@ void ModLoader::init_services() { &svc::g_uiModule, &svc::g_gameModule, &svc::g_cameraModule, + &svc::g_gfxModule, }) { svc::register_module(*module); diff --git a/src/dusk/mods/svc/registry.hpp b/src/dusk/mods/svc/registry.hpp index b4b76cd510..191626e0ef 100644 --- a/src/dusk/mods/svc/registry.hpp +++ b/src/dusk/mods/svc/registry.hpp @@ -71,5 +71,6 @@ extern const ServiceModule g_configModule; extern const ServiceModule g_uiModule; extern const ServiceModule g_gameModule; extern const ServiceModule g_cameraModule; +extern const ServiceModule g_gfxModule; } // namespace dusk::mods::svc diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index caf823b065..e7a5bf9b54 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -53,6 +53,7 @@ #include "dusk/dusk.h" #include "dusk/endian.h" #include "dusk/frame_interpolation.h" +#include "dusk/gfx.hpp" #include "dusk/gx_helper.h" #include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/logging.h" @@ -2356,6 +2357,10 @@ int mDoGph_Painter() { GXSetClipMode(GX_CLIP_ENABLE); +#if TARGET_PC + dusk::mods::gfx_run_stage(GFX_STAGE_SCENE_BEGIN, &camera_p->view, view_port); +#endif + #if DEBUG // "drawing up to Background (Translucent) (Rendering)" fapGm_HIO_c::stopCpuTimer("背景(半透明)描画まで(レンダリング)"); @@ -2384,6 +2389,10 @@ int mDoGph_Painter() { GX_DEBUG_GROUP(dComIfGd_drawShadow, camera_p->view.viewMtx); +#if TARGET_PC + dusk::mods::gfx_run_stage(GFX_STAGE_SCENE_AFTER_TERRAIN, &camera_p->view, view_port); +#endif + #if DEBUG // "shadow drawing (Rendering)" fapGm_HIO_c::stopCpuTimer("影描画(レンダリング)"); @@ -2413,6 +2422,10 @@ int mDoGph_Painter() { GX_DEBUG_GROUP(dComIfGd_drawOpaListPacket); +#if TARGET_PC + dusk::mods::gfx_run_stage(GFX_STAGE_SCENE_AFTER_OPAQUE, &camera_p->view, view_port); +#endif + #if DEBUG // "drawing up to special-use drawing (Opaque) except J3D (Rendering)" fapGm_HIO_c::stopCpuTimer("J3D以外などの特殊用(不透明)描画まで(レンダリング)"); @@ -2778,6 +2791,10 @@ int mDoGph_Painter() { captureScreenSetPort(); #endif +#if TARGET_PC + dusk::mods::gfx_run_stage(GFX_STAGE_FRAME_BEFORE_HUD); +#endif + if (fapGmHIO_get2Ddraw()) { Mtx m4; cMtx_copy(j3dSys.getViewMtx(), m4); @@ -2835,6 +2852,10 @@ int mDoGph_Painter() { dComIfGd_draw2DXlu(); } +#if TARGET_PC + dusk::mods::gfx_run_stage(GFX_STAGE_FRAME_AFTER_HUD); +#endif + #if DEBUG if (dJcame_c::get()) { dJcame_c::get()->show2D(); From 75a249f3e13858f6c70133763ff7c075c46a34bb Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 00:40:18 -0600 Subject: [PATCH 012/223] GTAO demo mod --- CMakeLists.txt | 3 +- cmake/GameABIConfig.cmake | 5 + docs/modding.md | 2 +- extern/aurora | 2 +- mods/ao_mod/CMakeLists.txt | 20 + mods/ao_mod/mod.json | 7 + mods/ao_mod/res/composite.wgsl | 161 +++ mods/ao_mod/res/denoise.wgsl | 108 ++ mods/ao_mod/res/gtao.wgsl | 247 +++++ mods/ao_mod/res/licenses/BEVY-APACHE-2.0.txt | 176 ++++ mods/ao_mod/res/licenses/BEVY-MIT.txt | 19 + mods/ao_mod/res/licenses/XEGTAO-MIT.txt | 21 + mods/ao_mod/res/preprocess_depth.wgsl | 138 +++ mods/ao_mod/src/mod.cpp | 931 ++++++++++++++++++ .../template_mod}/CMakeLists.txt | 0 mods/template_mod/mod.json | 7 + .../template_mod}/res/.gitkeep | 0 .../template_mod}/src/mod.cpp | 0 sdk/CMakeLists.txt | 9 +- tools/mod_template/mod.json | 7 - 20 files changed, 1851 insertions(+), 12 deletions(-) create mode 100644 mods/ao_mod/CMakeLists.txt create mode 100644 mods/ao_mod/mod.json create mode 100644 mods/ao_mod/res/composite.wgsl create mode 100644 mods/ao_mod/res/denoise.wgsl create mode 100644 mods/ao_mod/res/gtao.wgsl create mode 100644 mods/ao_mod/res/licenses/BEVY-APACHE-2.0.txt create mode 100644 mods/ao_mod/res/licenses/BEVY-MIT.txt create mode 100644 mods/ao_mod/res/licenses/XEGTAO-MIT.txt create mode 100644 mods/ao_mod/res/preprocess_depth.wgsl create mode 100644 mods/ao_mod/src/mod.cpp rename {tools/mod_template => mods/template_mod}/CMakeLists.txt (100%) create mode 100644 mods/template_mod/mod.json rename {tools/mod_template => mods/template_mod}/res/.gitkeep (100%) rename {tools/mod_template => mods/template_mod}/src/mod.cpp (100%) delete mode 100644 tools/mod_template/mod.json diff --git a/CMakeLists.txt b/CMakeLists.txt index e62704fe1c..abf30f6863 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -559,7 +559,8 @@ include(cmake/ModSDK.cmake) if (DUSK_ENABLE_CODE_MODS AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) add_custom_target(dusklight_mods) # Aggregate target for all in-tree mods - add_subdirectory(tools/mod_template) + add_subdirectory(mods/template_mod) + add_subdirectory(mods/ao_mod) endif () if (APPLE) diff --git a/cmake/GameABIConfig.cmake b/cmake/GameABIConfig.cmake index 030f1181a0..d48be445a2 100644 --- a/cmake/GameABIConfig.cmake +++ b/cmake/GameABIConfig.cmake @@ -25,3 +25,8 @@ set(_game_include_dirs add_library(dusklight_game_headers INTERFACE) target_include_directories(dusklight_game_headers INTERFACE ${_game_include_dirs}) target_compile_definitions(dusklight_game_headers INTERFACE ${_game_compile_defs}) +if (TARGET dawn::dawncpp_headers) + target_link_libraries(dusklight_game_headers INTERFACE dawn::dawncpp_headers) +elseif (TARGET dawn::webgpu_dawn) + target_link_libraries(dusklight_game_headers INTERFACE dawn::webgpu_dawn) +endif () diff --git a/docs/modding.md b/docs/modding.md index b2e7ba2e26..6f2d1a8580 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -28,7 +28,7 @@ function, read and write data fields, and hook the vast majority of game functio ## Getting Started -Fork the [mod template](../tools/mod_template/), a self-contained CMake project that uses the Dusklight mod SDK. +Fork the [mod template](../mods/template_mod/), a self-contained CMake project that uses the Dusklight mod SDK. ``` my_mod/ diff --git a/extern/aurora b/extern/aurora index 0a5a5d90ef..1dde08fa0d 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit 0a5a5d90efd2dbc7b402ab61f1021922dbf7496f +Subproject commit 1dde08fa0d0030133788a6250a81c8b9c44f246f diff --git a/mods/ao_mod/CMakeLists.txt b/mods/ao_mod/CMakeLists.txt new file mode 100644 index 0000000000..13590923f0 --- /dev/null +++ b/mods/ao_mod/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.25) +project(ao_mod CXX) + +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + set(DUSK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." CACHE PATH "Path to dusk source root") + option(DUSK_MOD_USE_FULL_TREE "Use full build instead of the minimal mod SDK" OFF) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if (DUSK_MOD_USE_FULL_TREE) + add_subdirectory("${DUSK_DIR}" dusk EXCLUDE_FROM_ALL) + else () + add_subdirectory("${DUSK_DIR}/sdk" dusk-sdk EXCLUDE_FROM_ALL) + endif () +endif () + +add_mod(ao_mod + SOURCES src/mod.cpp + MOD_JSON mod.json + RES_DIR res + BUNDLE +) diff --git a/mods/ao_mod/mod.json b/mods/ao_mod/mod.json new file mode 100644 index 0000000000..9019cf335d --- /dev/null +++ b/mods/ao_mod/mod.json @@ -0,0 +1,7 @@ +{ + "id": "dev.twilitrealm.ao_mod", + "name": "[Demo] Ambient Occlusion", + "version": "1.0.0", + "author": "Twilit Realm", + "description": "Ground-truth ambient occlusion (GTAO) computed from the scene depth buffer and composited over the game. Ported from Bevy Engine's SSAO and Intel XeGTAO." +} diff --git a/mods/ao_mod/res/composite.wgsl b/mods/ao_mod/res/composite.wgsl new file mode 100644 index 0000000000..fa3a0101b8 --- /dev/null +++ b/mods/ao_mod/res/composite.wgsl @@ -0,0 +1,161 @@ +// Fullscreen composite: multiplies the denoised ambient-occlusion visibility over the scene. +// +// Debug views: +// 1 = raw AO visibility as grayscale +// 2 = view-space normals reconstructed from depth (keep in sync with gtao.wgsl) +// 3 = the preprocessed depth input +// 4 = depth staircase detector + +struct Uniforms { + projection: mat4x4f, + inverse_projection: mat4x4f, + size: vec2f, // AO texture size in pixels (may be half the render size) + inv_size: vec2f, + depth_scale: vec2f, + effect_radius: f32, + intensity: f32, + slice_count: f32, + samples_per_slice_side: f32, + debug_view: u32, + _pad: f32, +} + +@group(0) @binding(0) var ambient_occlusion: texture_2d; +@group(0) @binding(1) var preprocessed_depth: texture_2d; +@group(0) @binding(2) var scene_depth_raw: texture_2d; +@group(0) @binding(3) var uniforms: Uniforms; + +struct VertexOutput { + @builtin(position) position: vec4f, + @location(0) uv: vec2f, +} + +@vertex +fn vs_main(@builtin(vertex_index) index: u32) -> VertexOutput { + // Fullscreen triangle + var out: VertexOutput; + let uv = vec2f(f32((index << 1u) & 2u), f32(index & 2u)); + out.position = vec4f(uv * vec2f(2.0, -2.0) + vec2f(-1.0, 1.0), 0.0, 1.0); + out.uv = uv; + return out; +} + +// Manual bilinear sample (r32float is unfilterable without optional device features) +fn sample_visibility(uv: vec2f) -> f32 { + let coordinates = uv * uniforms.size - 0.5; + let base = floor(coordinates); + let fraction = coordinates - base; + let max_coordinates = vec2i(uniforms.size) - 1i; + let p00 = clamp(vec2i(base), vec2i(0i), max_coordinates); + let p11 = clamp(vec2i(base) + 1i, vec2i(0i), max_coordinates); + let v00 = textureLoad(ambient_occlusion, vec2i(p00.x, p00.y), 0i).r; + let v10 = textureLoad(ambient_occlusion, vec2i(p11.x, p00.y), 0i).r; + let v01 = textureLoad(ambient_occlusion, vec2i(p00.x, p11.y), 0i).r; + let v11 = textureLoad(ambient_occlusion, vec2i(p11.x, p11.y), 0i).r; + let top = mix(v00, v10, fraction.x); + let bottom = mix(v01, v11, fraction.x); + return mix(top, bottom, fraction.y); +} + +fn load_depth(pixel_coordinates: vec2) -> f32 { + let coordinates = clamp(pixel_coordinates, vec2(0i), vec2(uniforms.size) - 1i); + return textureLoad(preprocessed_depth, coordinates, 0i).r; +} + +fn reconstruct_view_space_position(depth: f32, uv: vec2f) -> vec3f { + let clip_xy = vec2f(uv.x * 2.0 - 1.0, 1.0 - 2.0 * uv.y); + let t = uniforms.inverse_projection * vec4f(clip_xy, depth, 1.0); + return t.xyz / t.w; +} + +fn view_position_at(pixel_coordinates: vec2) -> vec3f { + let depth = load_depth(pixel_coordinates); + let uv = (vec2f(pixel_coordinates) + 0.5) * uniforms.inv_size; + return reconstruct_view_space_position(depth, uv); +} + +fn reconstruct_normal(pixel_coordinates: vec2, pixel_position: vec3f, depth_center: f32) -> vec3f { + let depth_left1 = load_depth(pixel_coordinates + vec2(-1i, 0i)); + let depth_left2 = load_depth(pixel_coordinates + vec2(-2i, 0i)); + let depth_right1 = load_depth(pixel_coordinates + vec2(1i, 0i)); + let depth_right2 = load_depth(pixel_coordinates + vec2(2i, 0i)); + let depth_top1 = load_depth(pixel_coordinates + vec2(0i, -1i)); + let depth_top2 = load_depth(pixel_coordinates + vec2(0i, -2i)); + let depth_bottom1 = load_depth(pixel_coordinates + vec2(0i, 1i)); + let depth_bottom2 = load_depth(pixel_coordinates + vec2(0i, 2i)); + + let use_left = abs(2.0 * depth_left1 - depth_left2 - depth_center) < + abs(2.0 * depth_right1 - depth_right2 - depth_center); + let use_top = abs(2.0 * depth_top1 - depth_top2 - depth_center) < + abs(2.0 * depth_bottom1 - depth_bottom2 - depth_center); + + var ddx: vec3f; + if use_left { + ddx = pixel_position - view_position_at(pixel_coordinates + vec2(-1i, 0i)); + } else { + ddx = view_position_at(pixel_coordinates + vec2(1i, 0i)) - pixel_position; + } + var ddy: vec3f; + if use_top { + ddy = pixel_position - view_position_at(pixel_coordinates + vec2(0i, -1i)); + } else { + ddy = view_position_at(pixel_coordinates + vec2(0i, 1i)) - pixel_position; + } + + var normal = normalize(cross(ddy, ddx)); + if dot(normal, pixel_position) > 0.0 { + normal = -normal; + } + return normal; +} + +// Raw-snapshot variant of load_depth for the staircase view +fn load_raw_depth(pixel_coordinates: vec2) -> f32 { + let size = vec2(textureDimensions(scene_depth_raw)); + let coordinates = clamp(pixel_coordinates, vec2(0i), size - 1i); + return textureLoad(scene_depth_raw, coordinates, 0i).r; +} + +@fragment +fn fs_main(in: VertexOutput) -> @location(0) vec4f { + if uniforms.debug_view == 2u { + // Reconstructed view-space normals, [-1,1] -> RGB + let pixel = vec2(in.uv * uniforms.size); + let depth = load_depth(pixel); + let uv = (vec2f(pixel) + 0.5) * uniforms.inv_size; + let position = reconstruct_view_space_position(depth, uv); + let normal = reconstruct_normal(pixel, position, depth); + return vec4f(normal * 0.5 + 0.5, 1.0); + } + if uniforms.debug_view == 3u { + // Preprocessed depth as an exponential distance gradient (white = near, black = far) + let pixel = vec2(in.uv * uniforms.size); + let position = view_position_at(pixel); + let value = exp(-max(-position.z, 0.0) * 0.0003); + return vec4f(value, value, value, 1.0); + } + if uniforms.debug_view == 4u { + // Staircase detector on the raw snapshot depth + let size = vec2f(textureDimensions(scene_depth_raw)); + let pixel = vec2(in.uv * size); + let d_center = load_raw_depth(pixel); + let d_left = load_raw_depth(pixel + vec2(-1i, 0i)); + let d_right = load_raw_depth(pixel + vec2(1i, 0i)); + let d_top = load_raw_depth(pixel + vec2(0i, -1i)); + let d_bottom = load_raw_depth(pixel + vec2(0i, 1i)); + let gradient_x = abs(d_right - d_left) * 0.5; + let curvature_x = abs(d_right - 2.0 * d_center + d_left); + let gradient_y = abs(d_bottom - d_top) * 0.5; + let curvature_y = abs(d_bottom - 2.0 * d_center + d_top); + let ratio_x = curvature_x / max(gradient_x, 1e-12); + let ratio_y = curvature_y / max(gradient_y, 1e-12); + return vec4f(saturate(ratio_x), saturate(ratio_y), 0.0, 1.0); + } + + let visibility = sample_visibility(in.uv); + if uniforms.debug_view == 1u { + return vec4f(visibility, visibility, visibility, 1.0); + } + let value = mix(1.0, visibility, uniforms.intensity); + return vec4f(value, value, value, 1.0); +} diff --git a/mods/ao_mod/res/denoise.wgsl b/mods/ao_mod/res/denoise.wgsl new file mode 100644 index 0000000000..b947b1bd04 --- /dev/null +++ b/mods/ao_mod/res/denoise.wgsl @@ -0,0 +1,108 @@ +// 3x3 bilaterial filter (edge-preserving blur) +// https://people.csail.mit.edu/sparis/bf_course/course_notes.pdf +// +// Note: Does not use the Gaussian kernel part of a typical bilateral blur +// From the paper: "use the information gathered on a neighborhood of 4 x 4 using a bilateral filter for +// reconstruction, using _uniform_ convolution weights" +// +// Note: The paper does a 4x4 (not quite centered) filter, offset by +/- 1 pixel every other frame +// XeGTAO does a 3x3 filter, on two pixels at a time per compute thread, applied twice +// We do a 3x3 filter, on 1 pixel per compute thread, applied once +// +// Ported from Bevy Engine, crates/bevy_pbr/src/ssao/spatial_denoise.wgsl (v0.13.2), licensed +// MIT OR Apache-2.0 (see res/licenses/), itself derived from Intel XeGTAO (MIT). +// +// PORT: the textureGather calls are rewritten as explicit per-neighbor textureLoads (r32float +// and r32uint are unfilterable); Bevy view uniforms -> the mod's uniform block; r16float -> r32float. + +struct Uniforms { + projection: mat4x4f, + inverse_projection: mat4x4f, + size: vec2f, + inv_size: vec2f, + depth_scale: vec2f, + effect_radius: f32, + intensity: f32, + slice_count: f32, + samples_per_slice_side: f32, + debug_view: u32, + _pad: f32, +} + +@group(0) @binding(0) var ambient_occlusion_noisy: texture_2d; +@group(0) @binding(1) var depth_differences: texture_2d; +@group(0) @binding(2) var ambient_occlusion: texture_storage_2d; +@group(0) @binding(3) var uniforms: Uniforms; + +fn clamp_coordinates(pixel_coordinates: vec2) -> vec2 { + return clamp(pixel_coordinates, vec2(0i), vec2(uniforms.size) - 1i); +} + +// Each pixel's packed edge info is (left, right, top, bottom) weights, packed by the GTAO pass. +fn load_edges(pixel_coordinates: vec2) -> vec4 { + return unpack4x8unorm(textureLoad(depth_differences, clamp_coordinates(pixel_coordinates), 0i).r); +} + +fn load_visibility(pixel_coordinates: vec2) -> f32 { + return textureLoad(ambient_occlusion_noisy, clamp_coordinates(pixel_coordinates), 0i).r; +} + +@compute +@workgroup_size(8, 8, 1) +fn spatial_denoise(@builtin(global_invocation_id) global_id: vec3) { + let pixel_coordinates = vec2(global_id.xy); + + let left_edges = load_edges(pixel_coordinates + vec2(-1i, 0i)); + let right_edges = load_edges(pixel_coordinates + vec2(1i, 0i)); + let top_edges = load_edges(pixel_coordinates + vec2(0i, -1i)); + let bottom_edges = load_edges(pixel_coordinates + vec2(0i, 1i)); + var center_edges = load_edges(pixel_coordinates); + // Cross-check each edge against the neighbor's opposing edge weight. + center_edges *= vec4(left_edges.y, right_edges.x, top_edges.w, bottom_edges.z); + + let center_weight = 1.2; + let left_weight = center_edges.x; + let right_weight = center_edges.y; + let top_weight = center_edges.z; + let bottom_weight = center_edges.w; + let top_left_weight = 0.425 * (top_weight * top_edges.x + left_weight * left_edges.z); + let top_right_weight = 0.425 * (top_weight * top_edges.y + right_weight * right_edges.z); + let bottom_left_weight = 0.425 * (bottom_weight * bottom_edges.x + left_weight * left_edges.w); + let bottom_right_weight = 0.425 * (bottom_weight * bottom_edges.y + right_weight * right_edges.w); + + let center_visibility = load_visibility(pixel_coordinates); + let left_visibility = load_visibility(pixel_coordinates + vec2(-1i, 0i)); + let right_visibility = load_visibility(pixel_coordinates + vec2(1i, 0i)); + let top_visibility = load_visibility(pixel_coordinates + vec2(0i, -1i)); + let bottom_visibility = load_visibility(pixel_coordinates + vec2(0i, 1i)); + let top_left_visibility = load_visibility(pixel_coordinates + vec2(-1i, -1i)); + let top_right_visibility = load_visibility(pixel_coordinates + vec2(1i, -1i)); + let bottom_left_visibility = load_visibility(pixel_coordinates + vec2(-1i, 1i)); + let bottom_right_visibility = load_visibility(pixel_coordinates + vec2(1i, 1i)); + + // PORT: Bevy sums the center sample unweighted while still counting center_weight in the + // denominator; XeGTAO's original weights the value too, which is what we do here. + var sum = center_visibility * center_weight; + sum += left_visibility * left_weight; + sum += right_visibility * right_weight; + sum += top_visibility * top_weight; + sum += bottom_visibility * bottom_weight; + sum += top_left_visibility * top_left_weight; + sum += top_right_visibility * top_right_weight; + sum += bottom_left_visibility * bottom_left_weight; + sum += bottom_right_visibility * bottom_right_weight; + + var sum_weight = center_weight; + sum_weight += left_weight; + sum_weight += right_weight; + sum_weight += top_weight; + sum_weight += bottom_weight; + sum_weight += top_left_weight; + sum_weight += top_right_weight; + sum_weight += bottom_left_weight; + sum_weight += bottom_right_weight; + + let denoised_visibility = sum / sum_weight; + + textureStore(ambient_occlusion, pixel_coordinates, vec4(denoised_visibility, 0.0, 0.0, 0.0)); +} diff --git a/mods/ao_mod/res/gtao.wgsl b/mods/ao_mod/res/gtao.wgsl new file mode 100644 index 0000000000..ee23774681 --- /dev/null +++ b/mods/ao_mod/res/gtao.wgsl @@ -0,0 +1,247 @@ +// Ground Truth-based Ambient Occlusion (GTAO) +// Paper: https://www.activision.com/cdn/research/Practical_Real_Time_Strategies_for_Accurate_Indirect_Occlusion_NEW%20VERSION_COLOR.pdf +// Presentation: https://blog.selfshadow.com/publications/s2016-shading-course/activision/s2016_pbs_activision_occlusion.pdf +// +// Ported from Bevy Engine, crates/bevy_pbr/src/ssao/gtao.wgsl (v0.13.2), licensed +// MIT OR Apache-2.0 (see res/licenses/), itself heavily based on XeGTAO v1.30 from Intel (MIT): +// https://github.com/GameTechDev/XeGTAO/blob/0d177ce06bfa642f64d8af4de1197ad1bcb862d4/Source/Rendering/Shaders/XeGTAO.hlsli +// +// PORT: +// - Bevy view/globals bindings -> the mod's own uniform block (matrices from Dusklight's +// CameraService, WebGPU clip convention, reversed-Z - the same convention Bevy uses). +// - Prepass normals -> normals reconstructed from depth (atyuwen's accurate 5-tap method, +// https://atyuwen.github.io/posts/normal-reconstruction/). +// - Sampler-based reads -> textureLoad (r32float is unfilterable without optional features); +// the mip level for the XeGTAO bandwidth optimization is selected explicitly per load. +// - effect_radius and slice/sample counts come from uniforms instead of constants/shader defs +// (game world units are ~100x larger than Bevy's meters, and quality is a live setting). +// - No TEMPORAL_JITTER: the noise index is pinned (no TAA; the spatial denoiser is the only +// filter, a configuration XeGTAO supports). +// - Storage format r16float -> r32float (core WebGPU storage format). + +struct Uniforms { + projection: mat4x4f, + inverse_projection: mat4x4f, + size: vec2f, + inv_size: vec2f, + depth_scale: vec2f, + effect_radius: f32, + intensity: f32, + slice_count: f32, + samples_per_slice_side: f32, + debug_view: u32, + _pad: f32, +} + +@group(0) @binding(0) var preprocessed_depth: texture_2d; +@group(0) @binding(1) var hilbert_index_lut: texture_2d; +@group(0) @binding(2) var ambient_occlusion: texture_storage_2d; +@group(0) @binding(3) var depth_differences: texture_storage_2d; +@group(0) @binding(4) var uniforms: Uniforms; + +const PI: f32 = 3.141592653589793; +const HALF_PI: f32 = 1.5707963267948966; + +fn fast_sqrt(x: f32) -> f32 { + return bitcast(0x1fbd1df5 + (bitcast(x) >> 1u)); +} + +fn fast_acos(in_x: f32) -> f32 { + let x = abs(in_x); + var res = -0.156583 * x + HALF_PI; + res *= fast_sqrt(1.0 - x); + return select(PI - res, res, in_x >= 0.0); +} + +fn load_noise(pixel_coordinates: vec2) -> vec2 { + let index = textureLoad(hilbert_index_lut, pixel_coordinates % 64, 0).r; + // R2 sequence - http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences + return fract(0.5 + f32(index) * vec2(0.75487766624669276005, 0.5698402909980532659114)); +} + +fn load_depth(pixel_coordinates: vec2, mip_level: i32) -> f32 { + let mip_size = max(vec2(uniforms.size) >> vec2(u32(mip_level)), vec2(1i)); + let coordinates = clamp(pixel_coordinates, vec2(0i), mip_size - 1i); + return textureLoad(preprocessed_depth, coordinates, mip_level).r; +} + +// Calculate differences in depth between neighbor pixels (later used by the spatial denoiser pass to preserve object edges) +fn calculate_neighboring_depth_differences(pixel_coordinates: vec2) -> f32 { + // Sample the pixel's depth and 4 depths around it + // PORT: explicit loads instead of two textureGathers. + let depth_center = load_depth(pixel_coordinates, 0i); + let depth_left = load_depth(pixel_coordinates + vec2(-1i, 0i), 0i); + let depth_top = load_depth(pixel_coordinates + vec2(0i, -1i), 0i); + let depth_bottom = load_depth(pixel_coordinates + vec2(0i, 1i), 0i); + let depth_right = load_depth(pixel_coordinates + vec2(1i, 0i), 0i); + + // Calculate the depth differences (large differences represent object edges) + var edge_info = vec4(depth_left, depth_right, depth_top, depth_bottom) - depth_center; + let slope_left_right = (edge_info.y - edge_info.x) * 0.5; + let slope_top_bottom = (edge_info.w - edge_info.z) * 0.5; + let edge_info_slope_adjusted = edge_info + vec4(slope_left_right, -slope_left_right, slope_top_bottom, -slope_top_bottom); + edge_info = min(abs(edge_info), abs(edge_info_slope_adjusted)); + let bias = 0.25; // Using the bias and then saturating nudges the values a bit + let scale = depth_center * 0.011; // Weight the edges by their distance from the camera + edge_info = saturate((1.0 + bias) - edge_info / scale); // Apply the bias and scale, and invert edge_info so that small values become large, and vice versa + + // Pack the edge info into the texture + let edge_info_packed = vec4(pack4x8unorm(edge_info), 0u, 0u, 0u); + textureStore(depth_differences, pixel_coordinates, edge_info_packed); + + return depth_center; +} + +fn reconstruct_view_space_position(depth: f32, uv: vec2) -> vec3 { + let clip_xy = vec2(uv.x * 2.0 - 1.0, 1.0 - 2.0 * uv.y); + let t = uniforms.inverse_projection * vec4(clip_xy, depth, 1.0); + let view_xyz = t.xyz / t.w; + return view_xyz; +} + +fn view_position_at(pixel_coordinates: vec2) -> vec3 { + let depth = load_depth(pixel_coordinates, 0i); + let uv = (vec2(pixel_coordinates) + 0.5) * uniforms.inv_size; + return reconstruct_view_space_position(depth, uv); +} + +// PORT: replaces Bevy's load_normal_view_space (which reads a prepass normal texture we do +// not have). Accurate view-space normal reconstruction from depth, atyuwen's 5-tap method: +// for each axis, extrapolate the center depth from the two taps on each side and derive the +// tangent from whichever side predicts it better. This keeps normals stable across depth +// discontinuities where naive derivatives smear. +fn reconstruct_normal(pixel_coordinates: vec2, pixel_position: vec3, depth_center: f32) -> vec3 { + let depth_left1 = load_depth(pixel_coordinates + vec2(-1i, 0i), 0i); + let depth_left2 = load_depth(pixel_coordinates + vec2(-2i, 0i), 0i); + let depth_right1 = load_depth(pixel_coordinates + vec2(1i, 0i), 0i); + let depth_right2 = load_depth(pixel_coordinates + vec2(2i, 0i), 0i); + let depth_top1 = load_depth(pixel_coordinates + vec2(0i, -1i), 0i); + let depth_top2 = load_depth(pixel_coordinates + vec2(0i, -2i), 0i); + let depth_bottom1 = load_depth(pixel_coordinates + vec2(0i, 1i), 0i); + let depth_bottom2 = load_depth(pixel_coordinates + vec2(0i, 2i), 0i); + + let use_left = abs(2.0 * depth_left1 - depth_left2 - depth_center) < + abs(2.0 * depth_right1 - depth_right2 - depth_center); + let use_top = abs(2.0 * depth_top1 - depth_top2 - depth_center) < + abs(2.0 * depth_bottom1 - depth_bottom2 - depth_center); + + var ddx: vec3; + if use_left { + ddx = pixel_position - view_position_at(pixel_coordinates + vec2(-1i, 0i)); + } else { + ddx = view_position_at(pixel_coordinates + vec2(1i, 0i)) - pixel_position; + } + var ddy: vec3; + if use_top { + ddy = pixel_position - view_position_at(pixel_coordinates + vec2(0i, -1i)); + } else { + ddy = view_position_at(pixel_coordinates + vec2(0i, 1i)) - pixel_position; + } + + var normal = normalize(cross(ddy, ddx)); + // Guard the orientation: the normal must face the camera. + if dot(normal, pixel_position) > 0.0 { + normal = -normal; + } + return normal; +} + +fn load_and_reconstruct_view_space_position(uv: vec2, sample_mip_level: f32) -> vec3 { + // PORT: point-sample the selected mip explicitly instead of textureSampleLevel. + let mip_level = i32(sample_mip_level + 0.5); + let mip_size = max(vec2(uniforms.size) >> vec2(u32(mip_level)), vec2(1i)); + let depth = load_depth(vec2(uv * vec2(mip_size)), mip_level); + return reconstruct_view_space_position(depth, uv); +} + +@compute +@workgroup_size(8, 8, 1) +fn gtao(@builtin(global_invocation_id) global_id: vec3) { + let slice_count = uniforms.slice_count; + let samples_per_slice_side = uniforms.samples_per_slice_side; + let effect_radius = uniforms.effect_radius; + let falloff_range = 0.615 * effect_radius; + let falloff_from = effect_radius * (1.0 - 0.615); + let falloff_mul = -1.0 / falloff_range; + let falloff_add = falloff_from / falloff_range + 1.0; + + let pixel_coordinates = vec2(global_id.xy); + let uv = (vec2(pixel_coordinates) + 0.5) * uniforms.inv_size; + + var pixel_depth = calculate_neighboring_depth_differences(pixel_coordinates); + let raw_depth = pixel_depth; + pixel_depth += 0.00001; // Avoid depth precision issues + + let pixel_position = reconstruct_view_space_position(pixel_depth, uv); + // PORT: the reconstruction differences the center position against neighbor positions + // built from unbiased depths, so its center must use the raw depth too: at this game's + // depth scale (far plane 200000 -> depth ~5e-3) Bevy's +0.00001 bias is comparable to a + // one-pixel depth step, and a biased center corrupts both tangents. + let pixel_normal = reconstruct_normal( + pixel_coordinates, reconstruct_view_space_position(raw_depth, uv), raw_depth); + let view_vec = normalize(-pixel_position); + + let noise = load_noise(pixel_coordinates); + let sample_scale = (-0.5 * effect_radius * uniforms.projection[0][0]) / pixel_position.z; + + var visibility = 0.0; + for (var slice_t = 0.0; slice_t < slice_count; slice_t += 1.0) { + let slice = slice_t + noise.x; + let phi = (PI / slice_count) * slice; + let omega = vec2(cos(phi), sin(phi)); + + let direction = vec3(omega.xy, 0.0); + let orthographic_direction = direction - (dot(direction, view_vec) * view_vec); + let axis = cross(direction, view_vec); + let projected_normal = pixel_normal - axis * dot(pixel_normal, axis); + let projected_normal_length = length(projected_normal); + + let sign_norm = sign(dot(orthographic_direction, projected_normal)); + let cos_norm = saturate(dot(projected_normal, view_vec) / projected_normal_length); + let n = sign_norm * fast_acos(cos_norm); + + let min_cos_horizon_1 = cos(n + HALF_PI); + let min_cos_horizon_2 = cos(n - HALF_PI); + var cos_horizon_1 = min_cos_horizon_1; + var cos_horizon_2 = min_cos_horizon_2; + let sample_mul = vec2(omega.x, -omega.y) * sample_scale; + for (var sample_t = 0.0; sample_t < samples_per_slice_side; sample_t += 1.0) { + var sample_noise = (slice_t + sample_t * samples_per_slice_side) * 0.6180339887498948482; + sample_noise = fract(noise.y + sample_noise); + + var s = (sample_t + sample_noise) / samples_per_slice_side; + s *= s; // https://github.com/GameTechDev/XeGTAO#sample-distribution + let sample = s * sample_mul; + + // * uniforms.size gets us from [0, 1] to [0, viewport_size], which is needed for this to get the correct mip levels + let sample_mip_level = clamp(log2(length(sample * uniforms.size)) - 3.3, 0.0, 4.0); // https://github.com/GameTechDev/XeGTAO#memory-bandwidth-bottleneck + let sample_position_1 = load_and_reconstruct_view_space_position(uv + sample, sample_mip_level); + let sample_position_2 = load_and_reconstruct_view_space_position(uv - sample, sample_mip_level); + + let sample_difference_1 = sample_position_1 - pixel_position; + let sample_difference_2 = sample_position_2 - pixel_position; + let sample_distance_1 = length(sample_difference_1); + let sample_distance_2 = length(sample_difference_2); + var sample_cos_horizon_1 = dot(sample_difference_1 / sample_distance_1, view_vec); + var sample_cos_horizon_2 = dot(sample_difference_2 / sample_distance_2, view_vec); + + let weight_1 = saturate(sample_distance_1 * falloff_mul + falloff_add); + let weight_2 = saturate(sample_distance_2 * falloff_mul + falloff_add); + sample_cos_horizon_1 = mix(min_cos_horizon_1, sample_cos_horizon_1, weight_1); + sample_cos_horizon_2 = mix(min_cos_horizon_2, sample_cos_horizon_2, weight_2); + + cos_horizon_1 = max(cos_horizon_1, sample_cos_horizon_1); + cos_horizon_2 = max(cos_horizon_2, sample_cos_horizon_2); + } + + let horizon_1 = fast_acos(cos_horizon_1); + let horizon_2 = -fast_acos(cos_horizon_2); + let v1 = (cos_norm + 2.0 * horizon_1 * sin(n) - cos(2.0 * horizon_1 - n)) / 4.0; + let v2 = (cos_norm + 2.0 * horizon_2 * sin(n) - cos(2.0 * horizon_2 - n)) / 4.0; + visibility += projected_normal_length * (v1 + v2); + } + visibility /= slice_count; + visibility = clamp(visibility, 0.03, 1.0); + + textureStore(ambient_occlusion, pixel_coordinates, vec4(visibility, 0.0, 0.0, 0.0)); +} diff --git a/mods/ao_mod/res/licenses/BEVY-APACHE-2.0.txt b/mods/ao_mod/res/licenses/BEVY-APACHE-2.0.txt new file mode 100644 index 0000000000..d9a10c0d8e --- /dev/null +++ b/mods/ao_mod/res/licenses/BEVY-APACHE-2.0.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/mods/ao_mod/res/licenses/BEVY-MIT.txt b/mods/ao_mod/res/licenses/BEVY-MIT.txt new file mode 100644 index 0000000000..9cf106272a --- /dev/null +++ b/mods/ao_mod/res/licenses/BEVY-MIT.txt @@ -0,0 +1,19 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/ao_mod/res/licenses/XEGTAO-MIT.txt b/mods/ao_mod/res/licenses/XEGTAO-MIT.txt new file mode 100644 index 0000000000..2b1bd1561b --- /dev/null +++ b/mods/ao_mod/res/licenses/XEGTAO-MIT.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2016-2021, Intel Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/ao_mod/res/preprocess_depth.wgsl b/mods/ao_mod/res/preprocess_depth.wgsl new file mode 100644 index 0000000000..98fe1d5400 --- /dev/null +++ b/mods/ao_mod/res/preprocess_depth.wgsl @@ -0,0 +1,138 @@ +// Inputs a depth texture and outputs a MIP-chain of depths. +// +// Because SSAO's performance is bound by texture reads, this increases +// performance over using the full resolution depth for every sample. +// +// Reference: https://research.nvidia.com/sites/default/files/pubs/2012-06_Scalable-Ambient-Obscurance/McGuire12SAO.pdf, section 2.2 +// +// Ported from Bevy Engine, crates/bevy_pbr/src/ssao/preprocess_depth.wgsl (v0.13.2), +// licensed MIT OR Apache-2.0 (see res/licenses/), itself derived from Intel XeGTAO (MIT). +// +// PORT: sampler-based gathers replaced with textureLoad (r32float is not filterable without +// optional device features), Bevy view uniforms replaced with the mod's own uniform block, +// storage format r16float -> r32float (core WebGPU storage format). MIP 4 moved into its own +// entry point (core WebGPU limit is 4 storage textures per stage). + +struct Uniforms { + projection: mat4x4f, + inverse_projection: mat4x4f, + size: vec2f, // AO chain size in pixels (MIP 0 of the preprocessed depth) + inv_size: vec2f, + depth_scale: vec2f, // input depth snapshot pixels per chain pixel (1 or 2) + effect_radius: f32, // view-space units + intensity: f32, + slice_count: f32, + samples_per_slice_side: f32, + debug_view: u32, + _pad: f32, +} + +@group(0) @binding(0) var input_depth: texture_2d; +@group(0) @binding(1) var preprocessed_depth_mip0: texture_storage_2d; +@group(0) @binding(2) var preprocessed_depth_mip1: texture_storage_2d; +@group(0) @binding(3) var preprocessed_depth_mip2: texture_storage_2d; +@group(0) @binding(4) var preprocessed_depth_mip3: texture_storage_2d; +@group(0) @binding(5) var uniforms: Uniforms; +// downsample_mip4 entry point only (disjoint subresources of the same texture). +@group(0) @binding(6) var preprocessed_depth_mip3_in: texture_2d; +@group(0) @binding(7) var preprocessed_depth_mip4: texture_storage_2d; + +// PORT: replaces the textureGather of the input depth with explicit loads (also handles the +// half-resolution case, where one chain texel covers depth_scale snapshot texels). +fn load_input_depth(pixel_coordinates: vec2) -> f32 { + let input_size = vec2(uniforms.size * uniforms.depth_scale); + let coordinates = clamp(vec2(vec2(pixel_coordinates) * uniforms.depth_scale), + vec2(0i), input_size - 1i); + return textureLoad(input_depth, coordinates, 0i).r; +} + +// Using 4 depths from the previous MIP, compute a weighted average for the depth of the current MIP +fn weighted_average(depth0: f32, depth1: f32, depth2: f32, depth3: f32) -> f32 { + let depth_range_scale_factor = 0.75; + let effect_radius = depth_range_scale_factor * 0.5 * 1.457; + let falloff_range = 0.615 * effect_radius; + let falloff_from = effect_radius * (1.0 - 0.615); + let falloff_mul = -1.0 / falloff_range; + let falloff_add = falloff_from / falloff_range + 1.0; + + let min_depth = min(min(depth0, depth1), min(depth2, depth3)); + let weight0 = saturate((depth0 - min_depth) * falloff_mul + falloff_add); + let weight1 = saturate((depth1 - min_depth) * falloff_mul + falloff_add); + let weight2 = saturate((depth2 - min_depth) * falloff_mul + falloff_add); + let weight3 = saturate((depth3 - min_depth) * falloff_mul + falloff_add); + let weight_total = weight0 + weight1 + weight2 + weight3; + + return ((weight0 * depth0) + (weight1 * depth1) + (weight2 * depth2) + (weight3 * depth3)) / weight_total; +} + +// Used to share the depths from the previous MIP level between all invocations in a workgroup +var previous_mip_depth: array, 8>; + +@compute +@workgroup_size(8, 8, 1) +fn preprocess_depth(@builtin(global_invocation_id) global_id: vec3, @builtin(local_invocation_id) local_id: vec3) { + let base_coordinates = vec2(global_id.xy); + + // MIP 0 - Copy 4 texels from the input depth (per invocation, 8x8 invocations per workgroup) + let pixel_coordinates0 = base_coordinates * 2i; + let pixel_coordinates1 = pixel_coordinates0 + vec2(1i, 0i); + let pixel_coordinates2 = pixel_coordinates0 + vec2(0i, 1i); + let pixel_coordinates3 = pixel_coordinates0 + vec2(1i, 1i); + let depth0 = load_input_depth(pixel_coordinates0); + let depth1 = load_input_depth(pixel_coordinates1); + let depth2 = load_input_depth(pixel_coordinates2); + let depth3 = load_input_depth(pixel_coordinates3); + textureStore(preprocessed_depth_mip0, pixel_coordinates0, vec4(depth0, 0.0, 0.0, 0.0)); + textureStore(preprocessed_depth_mip0, pixel_coordinates1, vec4(depth1, 0.0, 0.0, 0.0)); + textureStore(preprocessed_depth_mip0, pixel_coordinates2, vec4(depth2, 0.0, 0.0, 0.0)); + textureStore(preprocessed_depth_mip0, pixel_coordinates3, vec4(depth3, 0.0, 0.0, 0.0)); + + // MIP 1 - Weighted average of MIP 0's depth values (per invocation, 8x8 invocations per workgroup) + let depth_mip1 = weighted_average(depth0, depth1, depth2, depth3); + textureStore(preprocessed_depth_mip1, base_coordinates, vec4(depth_mip1, 0.0, 0.0, 0.0)); + previous_mip_depth[local_id.x][local_id.y] = depth_mip1; + + workgroupBarrier(); + + // MIP 2 - Weighted average of MIP 1's depth values (per invocation, 4x4 invocations per workgroup) + if all(local_id.xy % vec2(2u) == vec2(0u)) { + let mip2_depth0 = previous_mip_depth[local_id.x + 0u][local_id.y + 0u]; + let mip2_depth1 = previous_mip_depth[local_id.x + 1u][local_id.y + 0u]; + let mip2_depth2 = previous_mip_depth[local_id.x + 0u][local_id.y + 1u]; + let mip2_depth3 = previous_mip_depth[local_id.x + 1u][local_id.y + 1u]; + let depth_mip2 = weighted_average(mip2_depth0, mip2_depth1, mip2_depth2, mip2_depth3); + textureStore(preprocessed_depth_mip2, base_coordinates / 2i, vec4(depth_mip2, 0.0, 0.0, 0.0)); + previous_mip_depth[local_id.x][local_id.y] = depth_mip2; + } + + workgroupBarrier(); + + // MIP 3 - Weighted average of MIP 2's depth values (per invocation, 2x2 invocations per workgroup) + if all(local_id.xy % vec2(4u) == vec2(0u)) { + let mip3_depth0 = previous_mip_depth[local_id.x + 0u][local_id.y + 0u]; + let mip3_depth1 = previous_mip_depth[local_id.x + 2u][local_id.y + 0u]; + let mip3_depth2 = previous_mip_depth[local_id.x + 0u][local_id.y + 2u]; + let mip3_depth3 = previous_mip_depth[local_id.x + 2u][local_id.y + 2u]; + let depth_mip3 = weighted_average(mip3_depth0, mip3_depth1, mip3_depth2, mip3_depth3); + textureStore(preprocessed_depth_mip3, base_coordinates / 4i, vec4(depth_mip3, 0.0, 0.0, 0.0)); + previous_mip_depth[local_id.x][local_id.y] = depth_mip3; + } +} + +// MIP 4: weighted average of MIP 3's depth values, as a second (tiny) dispatch. +@compute +@workgroup_size(8, 8, 1) +fn downsample_mip4(@builtin(global_invocation_id) global_id: vec3) { + let base_coordinates = vec2(global_id.xy); + let mip3_size = max(vec2(textureDimensions(preprocessed_depth_mip3_in)), vec2(1i)); + let coordinates0 = clamp(base_coordinates * 2i, vec2(0i), mip3_size - 1i); + let coordinates1 = clamp(base_coordinates * 2i + vec2(1i, 0i), vec2(0i), mip3_size - 1i); + let coordinates2 = clamp(base_coordinates * 2i + vec2(0i, 1i), vec2(0i), mip3_size - 1i); + let coordinates3 = clamp(base_coordinates * 2i + vec2(1i, 1i), vec2(0i), mip3_size - 1i); + let depth0 = textureLoad(preprocessed_depth_mip3_in, coordinates0, 0i).r; + let depth1 = textureLoad(preprocessed_depth_mip3_in, coordinates1, 0i).r; + let depth2 = textureLoad(preprocessed_depth_mip3_in, coordinates2, 0i).r; + let depth3 = textureLoad(preprocessed_depth_mip3_in, coordinates3, 0i).r; + let depth_mip4 = weighted_average(depth0, depth1, depth2, depth3); + textureStore(preprocessed_depth_mip4, base_coordinates, vec4(depth_mip4, 0.0, 0.0, 0.0)); +} diff --git a/mods/ao_mod/src/mod.cpp b/mods/ao_mod/src/mod.cpp new file mode 100644 index 0000000000..a7eb4f4028 --- /dev/null +++ b/mods/ao_mod/src/mod.cpp @@ -0,0 +1,931 @@ +// Ambient occlusion (GTAO) example mod. +// +// Showcases the gfx service's compute tasks and the camera service: after opaque scene draws, +// before translucent/fog overlays, the scene depth is resolved and a three-dispatch compute +// chain (depth MIP prefilter, GTAO, spatial denoise) produces a visibility texture that a +// fullscreen draw multiplies over the world. +// +// The WGSL in res/ is ported from Bevy Engine's SSAO implementation (MIT OR Apache-2.0), +// itself based on Intel XeGTAO (MIT); see res/licenses/ and the `PORT:` notes in the shaders. + +#include "mods/service.hpp" +#include "mods/svc/camera.h" +#include "mods/svc/config.h" +#include "mods/svc/gfx.h" +#include "mods/svc/log.h" +#include "mods/svc/resource.h" +#include "mods/svc/ui.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +DEFINE_MOD(); +IMPORT_SERVICE(LogService, svc_log); +IMPORT_SERVICE(ConfigService, svc_config); +IMPORT_SERVICE(ResourceService, svc_resource); +IMPORT_SERVICE(UiService, svc_ui); +IMPORT_SERVICE(GfxService, svc_gfx); +IMPORT_SERVICE(CameraService, svc_camera); + +namespace { + +ConfigVarHandle g_cvarEnabled = 0; +ConfigVarHandle g_cvarQuality = 0; +ConfigVarHandle g_cvarRadius = 0; +ConfigVarHandle g_cvarIntensity = 0; +ConfigVarHandle g_cvarHalfRes = 0; +ConfigVarHandle g_cvarDebugView = 0; + +GfxComputeTypeHandle g_computeType = 0; +GfxDrawTypeHandle g_drawType = 0; +GfxStageHookHandle g_afterOpaqueHook = 0; +UiWindowHandle g_controlsWindow = 0; + +ResourceBuffer g_preprocessSource = RESOURCE_BUFFER_INIT; +ResourceBuffer g_gtaoSource = RESOURCE_BUFFER_INIT; +ResourceBuffer g_denoiseSource = RESOURCE_BUFFER_INIT; +ResourceBuffer g_compositeSource = RESOURCE_BUFFER_INIT; + +GfxDeviceInfo g_deviceInfo = GFX_DEVICE_INFO_INIT; +WGPUComputePipeline g_preprocessPipeline = nullptr; +WGPUComputePipeline g_mip4Pipeline = nullptr; +WGPUComputePipeline g_gtaoPipeline = nullptr; +WGPUComputePipeline g_denoisePipeline = nullptr; +WGPUBindGroupLayout g_preprocessLayout = nullptr; +WGPUBindGroupLayout g_mip4Layout = nullptr; +WGPUBindGroupLayout g_gtaoLayout = nullptr; +WGPUBindGroupLayout g_denoiseLayout = nullptr; +WGPURenderPipeline g_compositePipeline = nullptr; +WGPURenderPipeline g_compositeDebugPipeline = nullptr; +WGPUBindGroupLayout g_compositeLayout = nullptr; +WGPUBindGroupLayout g_compositeDebugLayout = nullptr; +WGPUTexture g_hilbertLut = nullptr; +WGPUTextureView g_hilbertLutView = nullptr; + +// AO chain targets, recreated when the render size (or halfRes) changes. Old sets are retired +// for a few frames instead of released immediately: payloads embedding their views may still +// be in flight on the render worker. +struct AoTargets { + uint32_t width = 0; + uint32_t height = 0; + WGPUTexture preprocessedDepth = nullptr; + WGPUTextureView preprocessedDepthMips[5] = {}; + WGPUTextureView preprocessedDepthAll = nullptr; + WGPUTexture aoNoisy = nullptr; + WGPUTextureView aoNoisyView = nullptr; + WGPUTexture depthDifferences = nullptr; + WGPUTextureView depthDifferencesView = nullptr; + WGPUTexture aoFinal = nullptr; + WGPUTextureView aoFinalView = nullptr; +}; +AoTargets g_targets; +struct RetiredTargets { + AoTargets targets; + int framesLeft = 0; +}; +std::vector g_retiredTargets; + +bool g_warnedNoDepth = false; +bool g_loggedChain = false; +std::atomic g_chainExecuted{false}; + +// Mirror of the WGSL Uniforms struct (keep in sync with res/*.wgsl). +struct AoUniforms { + float projection[16]; + float inverse_projection[16]; + float size[2]; + float inv_size[2]; + float depth_scale[2]; + float effect_radius; + float intensity; + float slice_count; + float samples_per_slice_side; + uint32_t debug_view; + float _pad; +}; +static_assert(sizeof(AoUniforms) % 16 == 0); + +struct ComputePayload { + WGPUTextureView depth; // frame-pooled scene depth snapshot + WGPUTextureView preprocessedDepthMips[5]; + WGPUTextureView preprocessedDepthAll; + WGPUTextureView aoNoisy; + WGPUTextureView depthDifferences; + WGPUTextureView aoFinal; + uint32_t uniform_offset; + uint32_t uniform_size; + uint32_t width; + uint32_t height; +}; +static_assert(sizeof(ComputePayload) <= GFX_INLINE_DRAW_PAYLOAD_SIZE); +static_assert(std::is_trivially_copyable_v); + +struct CompositePayload { + WGPUTextureView aoFinal; + WGPUTextureView preprocessedDepth; // debug views reconstruct normals/depth from it + WGPUTextureView sceneDepth; // raw snapshot, for the bypass debug views + uint32_t uniform_offset; + uint32_t uniform_size; + uint32_t debug_view; +}; +static_assert(sizeof(CompositePayload) <= GFX_INLINE_DRAW_PAYLOAD_SIZE); +static_assert(std::is_trivially_copyable_v); + +int64_t get_int_option(ConfigVarHandle handle, int64_t fallback) { + int64_t value = fallback; + if (handle == 0 || svc_config->get_int(mod_ctx, handle, &value) != MOD_OK) { + return fallback; + } + return value; +} + +bool get_bool_option(ConfigVarHandle handle, bool fallback) { + bool value = fallback; + if (handle == 0 || svc_config->get_bool(mod_ctx, handle, &value) != MOD_OK) { + return fallback; + } + return value; +} + +// XeGTAO/Bevy quality presets: slices x (samples per slice side * 2). +void quality_counts(int64_t quality, float& sliceCount, float& samplesPerSliceSide) { + switch (std::clamp(quality, 0, 3)) { + case 0: + sliceCount = 1.0f; + samplesPerSliceSide = 2.0f; + break; + case 1: + sliceCount = 2.0f; + samplesPerSliceSide = 2.0f; + break; + default: + case 2: + sliceCount = 3.0f; + samplesPerSliceSide = 3.0f; + break; + case 3: + sliceCount = 9.0f; + samplesPerSliceSide = 3.0f; + break; + } +} + +WGPUShaderModule create_shader_module(const char* label, const ResourceBuffer& source) { + WGPUShaderSourceWGSL wgsl = WGPU_SHADER_SOURCE_WGSL_INIT; + wgsl.code = {static_cast(source.data), source.size}; + WGPUShaderModuleDescriptor moduleDesc = WGPU_SHADER_MODULE_DESCRIPTOR_INIT; + moduleDesc.nextInChain = &wgsl.chain; + moduleDesc.label = {label, WGPU_STRLEN}; + return wgpuDeviceCreateShaderModule(g_deviceInfo.device, &moduleDesc); +} + +bool build_compute_pipeline(const char* label, const ResourceBuffer& source, const char* entry, + WGPUComputePipeline& outPipeline, WGPUBindGroupLayout& outLayout) { + WGPUShaderModule module = create_shader_module(label, source); + if (module == nullptr) { + return false; + } + WGPUComputePipelineDescriptor pipelineDesc = WGPU_COMPUTE_PIPELINE_DESCRIPTOR_INIT; + pipelineDesc.label = {label, WGPU_STRLEN}; + pipelineDesc.compute.module = module; + pipelineDesc.compute.entryPoint = {entry, WGPU_STRLEN}; + outPipeline = wgpuDeviceCreateComputePipeline(g_deviceInfo.device, &pipelineDesc); + wgpuShaderModuleRelease(module); + if (outPipeline == nullptr) { + return false; + } + outLayout = wgpuComputePipelineGetBindGroupLayout(outPipeline, 0); + return outLayout != nullptr; +} + +bool build_composite_pipeline( + bool blend, WGPURenderPipeline& outPipeline, WGPUBindGroupLayout& outLayout) { + WGPUShaderModule module = create_shader_module("AO composite", g_compositeSource); + if (module == nullptr) { + return false; + } + + // Multiply blend + WGPUBlendState blendState{ + .color = + { + .operation = WGPUBlendOperation_Add, + .srcFactor = WGPUBlendFactor_Dst, + .dstFactor = WGPUBlendFactor_Zero, + }, + .alpha = + { + .operation = WGPUBlendOperation_Add, + .srcFactor = WGPUBlendFactor_Zero, + .dstFactor = WGPUBlendFactor_One, + }, + }; + WGPUColorTargetState colorTarget = WGPU_COLOR_TARGET_STATE_INIT; + colorTarget.format = g_deviceInfo.color_format; + if (blend) { + colorTarget.blend = &blendState; + } + WGPUFragmentState fragment = WGPU_FRAGMENT_STATE_INIT; + fragment.module = module; + fragment.entryPoint = {"fs_main", WGPU_STRLEN}; + fragment.targetCount = 1; + fragment.targets = &colorTarget; + // Depth state must match the EFB pass despite never touching depth. + WGPUDepthStencilState depthStencil = WGPU_DEPTH_STENCIL_STATE_INIT; + depthStencil.format = g_deviceInfo.depth_format; + depthStencil.depthWriteEnabled = WGPUOptionalBool_False; + depthStencil.depthCompare = WGPUCompareFunction_Always; + + WGPURenderPipelineDescriptor pipelineDesc = WGPU_RENDER_PIPELINE_DESCRIPTOR_INIT; + pipelineDesc.label = {blend ? "AO composite" : "AO composite (debug)", WGPU_STRLEN}; + pipelineDesc.vertex.module = module; + pipelineDesc.vertex.entryPoint = {"vs_main", WGPU_STRLEN}; + pipelineDesc.primitive.topology = WGPUPrimitiveTopology_TriangleList; + pipelineDesc.depthStencil = &depthStencil; + pipelineDesc.multisample.count = g_deviceInfo.sample_count; + pipelineDesc.fragment = &fragment; + outPipeline = wgpuDeviceCreateRenderPipeline(g_deviceInfo.device, &pipelineDesc); + wgpuShaderModuleRelease(module); + if (outPipeline == nullptr) { + return false; + } + outLayout = wgpuRenderPipelineGetBindGroupLayout(outPipeline, 0); + return outLayout != nullptr; +} + +// Hilbert curve index LUT for the R2 noise sequence, generated once at init. +// Ported from Bevy's generate_hilbert_index_lut (https://www.shadertoy.com/view/3tB3z3). +uint16_t hilbert_index(uint16_t x, uint16_t y) { + uint16_t index = 0; + for (uint16_t level = 32; level > 0; level /= 2) { + const uint16_t regionX = (x & level) > 0 ? 1 : 0; + const uint16_t regionY = (y & level) > 0 ? 1 : 0; + index += level * level * ((3 * regionX) ^ regionY); + if (regionY == 0) { + if (regionX == 1) { + x = 63 - x; + y = 63 - y; + } + std::swap(x, y); + } + } + return index; +} + +bool build_hilbert_lut() { + WGPUTextureDescriptor texDesc = WGPU_TEXTURE_DESCRIPTOR_INIT; + texDesc.label = {"AO hilbert LUT", WGPU_STRLEN}; + texDesc.usage = WGPUTextureUsage_TextureBinding | WGPUTextureUsage_CopyDst; + texDesc.size = {64, 64, 1}; + texDesc.format = WGPUTextureFormat_R16Uint; + g_hilbertLut = wgpuDeviceCreateTexture(g_deviceInfo.device, &texDesc); + if (g_hilbertLut == nullptr) { + return false; + } + g_hilbertLutView = wgpuTextureCreateView(g_hilbertLut, nullptr); + if (g_hilbertLutView == nullptr) { + return false; + } + + uint16_t lut[64 * 64]; + for (uint16_t y = 0; y < 64; ++y) { + for (uint16_t x = 0; x < 64; ++x) { + lut[y * 64 + x] = hilbert_index(x, y); + } + } + WGPUTexelCopyTextureInfo dst = WGPU_TEXEL_COPY_TEXTURE_INFO_INIT; + dst.texture = g_hilbertLut; + WGPUTexelCopyBufferLayout layout{.offset = 0, .bytesPerRow = 64 * 2, .rowsPerImage = 64}; + WGPUExtent3D extent{64, 64, 1}; + wgpuQueueWriteTexture(g_deviceInfo.queue, &dst, lut, sizeof(lut), &layout, &extent); + return true; +} + +void release_targets(AoTargets& targets) { + for (auto*& view : targets.preprocessedDepthMips) { + if (view != nullptr) { + wgpuTextureViewRelease(view); + view = nullptr; + } + } + const auto releaseView = [](WGPUTextureView& view) { + if (view != nullptr) { + wgpuTextureViewRelease(view); + view = nullptr; + } + }; + const auto releaseTexture = [](WGPUTexture& texture) { + if (texture != nullptr) { + wgpuTextureRelease(texture); + texture = nullptr; + } + }; + releaseView(targets.preprocessedDepthAll); + releaseView(targets.aoNoisyView); + releaseView(targets.depthDifferencesView); + releaseView(targets.aoFinalView); + releaseTexture(targets.preprocessedDepth); + releaseTexture(targets.aoNoisy); + releaseTexture(targets.depthDifferences); + releaseTexture(targets.aoFinal); + targets.width = targets.height = 0; +} + +void tick_retired_targets() { + for (auto it = g_retiredTargets.begin(); it != g_retiredTargets.end();) { + if (--it->framesLeft <= 0) { + release_targets(it->targets); + it = g_retiredTargets.erase(it); + } else { + ++it; + } + } +} + +bool ensure_targets(uint32_t width, uint32_t height) { + if (g_targets.width == width && g_targets.height == height) { + return true; + } + if (g_targets.width != 0) { + g_retiredTargets.push_back(RetiredTargets{std::exchange(g_targets, AoTargets{}), 4}); + } + + const auto createStorageTexture = [&](const char* label, WGPUTextureFormat format, + uint32_t mipCount, WGPUTexture& outTexture) { + WGPUTextureDescriptor texDesc = WGPU_TEXTURE_DESCRIPTOR_INIT; + texDesc.label = {label, WGPU_STRLEN}; + texDesc.usage = WGPUTextureUsage_StorageBinding | WGPUTextureUsage_TextureBinding; + texDesc.size = {width, height, 1}; + texDesc.format = format; + texDesc.mipLevelCount = mipCount; + outTexture = wgpuDeviceCreateTexture(g_deviceInfo.device, &texDesc); + return outTexture != nullptr; + }; + + bool ok = createStorageTexture("AO preprocessed depth", WGPUTextureFormat_R32Float, 5, + g_targets.preprocessedDepth) && + createStorageTexture("AO noisy", WGPUTextureFormat_R32Float, 1, g_targets.aoNoisy) && + createStorageTexture("AO depth differences", WGPUTextureFormat_R32Uint, 1, + g_targets.depthDifferences) && + createStorageTexture("AO final", WGPUTextureFormat_R32Float, 1, g_targets.aoFinal); + if (ok) { + for (uint32_t mip = 0; mip < 5 && ok; ++mip) { + WGPUTextureViewDescriptor viewDesc = WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT; + viewDesc.baseMipLevel = mip; + viewDesc.mipLevelCount = 1; + g_targets.preprocessedDepthMips[mip] = + wgpuTextureCreateView(g_targets.preprocessedDepth, &viewDesc); + ok = g_targets.preprocessedDepthMips[mip] != nullptr; + } + } + if (ok) { + g_targets.preprocessedDepthAll = + wgpuTextureCreateView(g_targets.preprocessedDepth, nullptr); + g_targets.aoNoisyView = wgpuTextureCreateView(g_targets.aoNoisy, nullptr); + g_targets.depthDifferencesView = wgpuTextureCreateView(g_targets.depthDifferences, nullptr); + g_targets.aoFinalView = wgpuTextureCreateView(g_targets.aoFinal, nullptr); + ok = g_targets.preprocessedDepthAll != nullptr && g_targets.aoNoisyView != nullptr && + g_targets.depthDifferencesView != nullptr && g_targets.aoFinalView != nullptr; + } + if (!ok) { + release_targets(g_targets); + return false; + } + g_targets.width = width; + g_targets.height = height; + return true; +} + +constexpr uint32_t div_ceil(uint32_t numerator, uint32_t denominator) { + return (numerator + denominator - 1) / denominator; +} + +// Render worker thread: the AO chain as one compute pass with three dispatches. +void on_compute( + ModContext*, const GfxComputeContext* ctx, const void* payload, size_t payloadSize, void*) { + if (payloadSize != sizeof(ComputePayload)) { + return; + } + ComputePayload data; + std::memcpy(&data, payload, sizeof(data)); + if (data.depth == nullptr || g_preprocessPipeline == nullptr) { + return; + } + + const auto makeBindGroup = [&](WGPUBindGroupLayout layout, + std::initializer_list entries) { + WGPUBindGroupDescriptor bindGroupDesc = WGPU_BIND_GROUP_DESCRIPTOR_INIT; + bindGroupDesc.layout = layout; + bindGroupDesc.entryCount = entries.size(); + bindGroupDesc.entries = entries.begin(); + return wgpuDeviceCreateBindGroup(ctx->device, &bindGroupDesc); + }; + const auto textureEntry = [](uint32_t binding, WGPUTextureView view) { + WGPUBindGroupEntry entry = WGPU_BIND_GROUP_ENTRY_INIT; + entry.binding = binding; + entry.textureView = view; + return entry; + }; + const auto uniformEntry = [&](uint32_t binding) { + WGPUBindGroupEntry entry = WGPU_BIND_GROUP_ENTRY_INIT; + entry.binding = binding; + entry.buffer = ctx->uniform_buffer; + entry.offset = data.uniform_offset; + entry.size = data.uniform_size; + return entry; + }; + + WGPUBindGroup preprocessGroup = makeBindGroup(g_preprocessLayout, + {textureEntry(0, data.depth), textureEntry(1, data.preprocessedDepthMips[0]), + textureEntry(2, data.preprocessedDepthMips[1]), + textureEntry(3, data.preprocessedDepthMips[2]), + textureEntry(4, data.preprocessedDepthMips[3]), uniformEntry(5)}); + WGPUBindGroup mip4Group = + makeBindGroup(g_mip4Layout, {textureEntry(6, data.preprocessedDepthMips[3]), + textureEntry(7, data.preprocessedDepthMips[4])}); + WGPUBindGroup gtaoGroup = makeBindGroup( + g_gtaoLayout, {textureEntry(0, data.preprocessedDepthAll), + textureEntry(1, g_hilbertLutView), textureEntry(2, data.aoNoisy), + textureEntry(3, data.depthDifferences), uniformEntry(4)}); + WGPUBindGroup denoiseGroup = makeBindGroup( + g_denoiseLayout, {textureEntry(0, data.aoNoisy), textureEntry(1, data.depthDifferences), + textureEntry(2, data.aoFinal), uniformEntry(3)}); + if (preprocessGroup == nullptr || mip4Group == nullptr || gtaoGroup == nullptr || + denoiseGroup == nullptr) + { + const auto release = [](WGPUBindGroup group) { + if (group != nullptr) { + wgpuBindGroupRelease(group); + } + }; + release(preprocessGroup); + release(mip4Group); + release(gtaoGroup); + release(denoiseGroup); + return; + } + + WGPUComputePassDescriptor passDesc = WGPU_COMPUTE_PASS_DESCRIPTOR_INIT; + passDesc.label = {"AO chain", WGPU_STRLEN}; + WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass(ctx->encoder, &passDesc); + // Each preprocess workgroup covers 16x16 MIP-0 texels (8x8 invocations, 2x2 texels each). + wgpuComputePassEncoderSetPipeline(pass, g_preprocessPipeline); + wgpuComputePassEncoderSetBindGroup(pass, 0, preprocessGroup, 0, nullptr); + wgpuComputePassEncoderDispatchWorkgroups( + pass, div_ceil(data.width, 16), div_ceil(data.height, 16), 1); + wgpuComputePassEncoderSetPipeline(pass, g_mip4Pipeline); + wgpuComputePassEncoderSetBindGroup(pass, 0, mip4Group, 0, nullptr); + wgpuComputePassEncoderDispatchWorkgroups(pass, div_ceil(std::max(data.width >> 4, 1u), 8), + div_ceil(std::max(data.height >> 4, 1u), 8), 1); + wgpuComputePassEncoderSetPipeline(pass, g_gtaoPipeline); + wgpuComputePassEncoderSetBindGroup(pass, 0, gtaoGroup, 0, nullptr); + wgpuComputePassEncoderDispatchWorkgroups( + pass, div_ceil(data.width, 8), div_ceil(data.height, 8), 1); + wgpuComputePassEncoderSetPipeline(pass, g_denoisePipeline); + wgpuComputePassEncoderSetBindGroup(pass, 0, denoiseGroup, 0, nullptr); + wgpuComputePassEncoderDispatchWorkgroups( + pass, div_ceil(data.width, 8), div_ceil(data.height, 8), 1); + wgpuComputePassEncoderEnd(pass); + wgpuComputePassEncoderRelease(pass); + + wgpuBindGroupRelease(preprocessGroup); + wgpuBindGroupRelease(mip4Group); + wgpuBindGroupRelease(gtaoGroup); + wgpuBindGroupRelease(denoiseGroup); + g_chainExecuted.store(true, std::memory_order_release); +} + +// Render worker thread: composite the AO over the scene (or show it, in debug view). +void on_draw( + ModContext*, const GfxDrawContext* ctx, const void* payload, size_t payloadSize, void*) { + if (payloadSize != sizeof(CompositePayload)) { + return; + } + CompositePayload data; + std::memcpy(&data, payload, sizeof(data)); + WGPURenderPipeline pipeline = + data.debug_view != 0 ? g_compositeDebugPipeline : g_compositePipeline; + WGPUBindGroupLayout layout = data.debug_view != 0 ? g_compositeDebugLayout : g_compositeLayout; + if (data.aoFinal == nullptr || data.preprocessedDepth == nullptr || + data.sceneDepth == nullptr || pipeline == nullptr) + { + return; + } + + WGPUBindGroupEntry entries[4] = {WGPU_BIND_GROUP_ENTRY_INIT, WGPU_BIND_GROUP_ENTRY_INIT, + WGPU_BIND_GROUP_ENTRY_INIT, WGPU_BIND_GROUP_ENTRY_INIT}; + entries[0].binding = 0; + entries[0].textureView = data.aoFinal; + entries[1].binding = 1; + entries[1].textureView = data.preprocessedDepth; + entries[2].binding = 2; + entries[2].textureView = data.sceneDepth; + entries[3].binding = 3; + entries[3].buffer = ctx->uniform_buffer; + entries[3].offset = data.uniform_offset; + entries[3].size = data.uniform_size; + WGPUBindGroupDescriptor bindGroupDesc = WGPU_BIND_GROUP_DESCRIPTOR_INIT; + bindGroupDesc.layout = layout; + bindGroupDesc.entryCount = 4; + bindGroupDesc.entries = entries; + WGPUBindGroup bindGroup = wgpuDeviceCreateBindGroup(ctx->device, &bindGroupDesc); + if (bindGroup == nullptr) { + return; + } + + wgpuRenderPassEncoderSetPipeline(ctx->pass, pipeline); + wgpuRenderPassEncoderSetBindGroup(ctx->pass, 0, bindGroup, 0, nullptr); + wgpuRenderPassEncoderDraw(ctx->pass, 3, 1, 0, 0); + wgpuBindGroupRelease(bindGroup); +} + +// Game thread, after opaque scene draws and before translucent/fog overlay lists. +void on_scene_after_opaque(ModContext*, const GfxStageContext* stageCtx, void*) { + tick_retired_targets(); + if (!get_bool_option(g_cvarEnabled, true)) { + return; + } + if (stageCtx == nullptr || stageCtx->struct_size < sizeof(GfxStageContext) || + stageCtx->game_view == nullptr) + { + return; + } + + CameraInfo camera = CAMERA_INFO_INIT; + if (svc_camera->get_camera(mod_ctx, stageCtx->game_view, &camera) != MOD_OK) { + return; + } + + GfxResolveDesc resolveDesc = GFX_RESOLVE_DESC_INIT; + resolveDesc.color = false; + resolveDesc.depth = true; + GfxResolvedTargets resolved = GFX_RESOLVED_TARGETS_INIT; + if (svc_gfx->resolve_pass(mod_ctx, &resolveDesc, &resolved) != MOD_OK || + resolved.depth == nullptr) + { + if (!g_warnedNoDepth) { + g_warnedNoDepth = true; + svc_log->warn(mod_ctx, "depth snapshots unavailable; AO disabled"); + } + return; + } + + const bool halfRes = get_bool_option(g_cvarHalfRes, false); + const uint32_t divisor = halfRes ? 2 : 1; + const uint32_t width = resolved.width / divisor; + const uint32_t height = resolved.height / divisor; + if (width < 32 || height < 32 || !ensure_targets(width, height)) { + return; + } + + AoUniforms uniforms{}; + std::memcpy(uniforms.projection, camera.proj_from_view, sizeof(uniforms.projection)); + std::memcpy( + uniforms.inverse_projection, camera.view_from_proj, sizeof(uniforms.inverse_projection)); + uniforms.size[0] = static_cast(width); + uniforms.size[1] = static_cast(height); + uniforms.inv_size[0] = 1.0f / uniforms.size[0]; + uniforms.inv_size[1] = 1.0f / uniforms.size[1]; + uniforms.depth_scale[0] = static_cast(resolved.width) / uniforms.size[0]; + uniforms.depth_scale[1] = static_cast(resolved.height) / uniforms.size[1]; + uniforms.effect_radius = + static_cast(std::clamp(get_int_option(g_cvarRadius, 70), 10, 500)); + uniforms.intensity = + static_cast(std::clamp(get_int_option(g_cvarIntensity, 100), 0, 100)) / + 100.0f; + quality_counts( + get_int_option(g_cvarQuality, 2), uniforms.slice_count, uniforms.samples_per_slice_side); + const uint32_t debugMode = + static_cast(std::clamp(get_int_option(g_cvarDebugView, 0), 0, 4)); + uniforms.debug_view = debugMode; + + GfxRange uniformRange{0, 0}; + if (svc_gfx->push_uniform(mod_ctx, &uniforms, sizeof(uniforms), &uniformRange) != MOD_OK) { + return; + } + + ComputePayload computePayload{}; + computePayload.depth = resolved.depth; + for (int mip = 0; mip < 5; ++mip) { + computePayload.preprocessedDepthMips[mip] = g_targets.preprocessedDepthMips[mip]; + } + computePayload.preprocessedDepthAll = g_targets.preprocessedDepthAll; + computePayload.aoNoisy = g_targets.aoNoisyView; + computePayload.depthDifferences = g_targets.depthDifferencesView; + computePayload.aoFinal = g_targets.aoFinalView; + computePayload.uniform_offset = uniformRange.offset; + computePayload.uniform_size = uniformRange.size; + computePayload.width = width; + computePayload.height = height; + if (svc_gfx->push_compute(mod_ctx, g_computeType, &computePayload, sizeof(computePayload)) != + MOD_OK) + { + return; + } + + const CompositePayload drawPayload{g_targets.aoFinalView, g_targets.preprocessedDepthAll, + resolved.depth, uniformRange.offset, uniformRange.size, debugMode}; + svc_gfx->push_draw(mod_ctx, g_drawType, &drawPayload, sizeof(drawPayload)); +} + +void add_control(UiElementHandle pane, const UiControlDesc& desc) { + svc_ui->pane_add_control(mod_ctx, pane, &desc, nullptr); +} + +void add_toggle(UiElementHandle pane, const char* label, ConfigVarHandle cvar, const char* help) { + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_TOGGLE; + control.label = label; + control.help_rml = help; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = cvar; + add_control(pane, control); +} + +ModResult build_controls_tab( + ModContext*, UiWindowHandle, UiElementHandle left, UiElementHandle right, void*, ModError*) { + (void)right; + + svc_ui->pane_add_section(mod_ctx, left, "Ambient Occlusion"); + add_toggle(left, "Enabled", g_cvarEnabled, "Enables the GTAO pass."); + + static const char* kQualityOptions[] = {"Low", "Medium", "High", "Ultra"}; + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_SELECT; + control.label = "Quality"; + control.help_rml = "Horizon slices and samples per pixel (XeGTAO presets: 4/8/18/54 spp)."; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = g_cvarQuality; + control.options = kQualityOptions; + control.option_count = 4; + add_control(left, control); + + control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_NUMBER; + control.label = "Radius"; + control.help_rml = "Occlusion sampling radius in world units."; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = g_cvarRadius; + control.min = 10; + control.max = 500; + control.step = 10; + add_control(left, control); + + control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_NUMBER; + control.label = "Intensity"; + control.help_rml = "How strongly occlusion darkens the scene."; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = g_cvarIntensity; + control.min = 0; + control.max = 100; + control.step = 5; + control.suffix = "%"; + add_control(left, control); + + add_toggle(left, "Half Resolution", g_cvarHalfRes, + "Computes AO at half resolution and upscales; faster, slightly softer."); + + static const char* kDebugOptions[] = {"Off", "AO", "Normals", "Depth", "Staircase"}; + control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_SELECT; + control.label = "Debug View"; + control.help_rml = "AO: raw visibility as grayscale.
Normals: the view-space " + "normals the GTAO pass consumes.
Depth: the preprocessed depth " + "as a distance gradient.
Staircase: detects quantized depth - smooth " + "depth is near-black with thin triangle edges, quantized depth lights " + "up across surfaces."; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = g_cvarDebugView; + control.options = kDebugOptions; + control.option_count = 5; + add_control(left, control); + return MOD_OK; +} + +void on_controls_window_closed(ModContext*, UiWindowHandle, void*) { + g_controlsWindow = 0; +} + +void on_open_controls(ModContext*, void*) { + if (g_controlsWindow != 0) { + return; + } + UiTabDesc tabs[1] = {UI_TAB_DESC_INIT}; + tabs[0].title = "Controls"; + tabs[0].build = build_controls_tab; + UiWindowDesc desc = UI_WINDOW_DESC_INIT; + desc.tabs = tabs; + desc.tab_count = 1; + desc.on_closed = on_controls_window_closed; + if (svc_ui->window_push(mod_ctx, &desc, &g_controlsWindow) != MOD_OK) { + svc_log->error(mod_ctx, "failed to open AO controls window"); + } +} + +ModResult build_panel(ModContext*, UiElementHandle panel, void*, ModError*) { + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_TOGGLE; + control.label = "Enabled"; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = g_cvarEnabled; + add_control(panel, control); + + control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_BUTTON; + control.label = "Open Controls"; + control.on_pressed = on_open_controls; + add_control(panel, control); + return MOD_OK; +} + +ModResult register_bool_option( + const char* name, bool defaultValue, ConfigVarHandle& outHandle, ModError* error) { + ConfigVarDesc cvarDesc = CONFIG_VAR_DESC_INIT; + cvarDesc.name = name; + cvarDesc.type = CONFIG_VAR_BOOL; + cvarDesc.default_bool = defaultValue; + if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register AO option"); + } + return MOD_OK; +} + +ModResult register_int_option( + const char* name, int64_t defaultValue, ConfigVarHandle& outHandle, ModError* error) { + ConfigVarDesc cvarDesc = CONFIG_VAR_DESC_INIT; + cvarDesc.name = name; + cvarDesc.type = CONFIG_VAR_INT; + cvarDesc.default_int = defaultValue; + if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register AO option"); + } + return MOD_OK; +} + +} // namespace + +extern "C" { + +MOD_EXPORT ModResult mod_initialize(ModError* error) { + ModResult result = svc_resource->load(mod_ctx, "preprocess_depth.wgsl", &g_preprocessSource); + if (result == MOD_OK) { + result = svc_resource->load(mod_ctx, "gtao.wgsl", &g_gtaoSource); + } + if (result == MOD_OK) { + result = svc_resource->load(mod_ctx, "denoise.wgsl", &g_denoiseSource); + } + if (result == MOD_OK) { + result = svc_resource->load(mod_ctx, "composite.wgsl", &g_compositeSource); + } + if (result != MOD_OK) { + return dusk::mods::set_error(error, result, "failed to load AO shaders"); + } + + result = register_bool_option("effectEnabled", false, g_cvarEnabled, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("quality", 2, g_cvarQuality, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("radius", 70, g_cvarRadius, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("intensity", 100, g_cvarIntensity, error); + if (result != MOD_OK) { + return result; + } + result = register_bool_option("halfRes", false, g_cvarHalfRes, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("debugMode", 0, g_cvarDebugView, error); + if (result != MOD_OK) { + return result; + } + + if (svc_gfx->get_device_info(mod_ctx, &g_deviceInfo) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to query device info"); + } + if (!build_compute_pipeline("AO preprocess depth", g_preprocessSource, "preprocess_depth", + g_preprocessPipeline, g_preprocessLayout) || + !build_compute_pipeline("AO downsample mip4", g_preprocessSource, "downsample_mip4", + g_mip4Pipeline, g_mip4Layout) || + !build_compute_pipeline("AO gtao", g_gtaoSource, "gtao", g_gtaoPipeline, g_gtaoLayout) || + !build_compute_pipeline( + "AO denoise", g_denoiseSource, "spatial_denoise", g_denoisePipeline, g_denoiseLayout)) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to create AO compute pipelines"); + } + if (!build_composite_pipeline(true, g_compositePipeline, g_compositeLayout) || + !build_composite_pipeline(false, g_compositeDebugPipeline, g_compositeDebugLayout)) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to create AO composite pipeline"); + } + if (!build_hilbert_lut()) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to create AO noise LUT"); + } + + GfxComputeTypeDesc computeDesc = GFX_COMPUTE_TYPE_DESC_INIT; + computeDesc.label = "AO chain"; + computeDesc.callback = on_compute; + if (svc_gfx->register_compute_type(mod_ctx, &computeDesc, &g_computeType) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register compute type"); + } + GfxDrawTypeDesc drawDesc = GFX_DRAW_TYPE_DESC_INIT; + drawDesc.label = "AO composite"; + drawDesc.draw = on_draw; + if (svc_gfx->register_draw_type(mod_ctx, &drawDesc, &g_drawType) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register draw type"); + } + GfxStageHookDesc stageDesc = GFX_STAGE_HOOK_DESC_INIT; + stageDesc.callback = on_scene_after_opaque; + if (svc_gfx->register_stage_hook( + mod_ctx, GFX_STAGE_SCENE_AFTER_OPAQUE, &stageDesc, &g_afterOpaqueHook) != MOD_OK) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + } + + UiModsPanelDesc panelDesc = UI_MODS_PANEL_DESC_INIT; + panelDesc.build = build_panel; + svc_ui->register_mods_panel(mod_ctx, &panelDesc); + + svc_log->info(mod_ctx, "ao_mod ready"); + return MOD_OK; +} + +MOD_EXPORT ModResult mod_update(ModError*) { + if (!g_loggedChain && g_chainExecuted.load(std::memory_order_acquire)) { + g_loggedChain = true; + svc_log->info(mod_ctx, "AO chain executed OK"); + } + return MOD_OK; +} + +MOD_EXPORT ModResult mod_shutdown(ModError*) { + svc_resource->free(mod_ctx, &g_preprocessSource); + svc_resource->free(mod_ctx, &g_gtaoSource); + svc_resource->free(mod_ctx, &g_denoiseSource); + svc_resource->free(mod_ctx, &g_compositeSource); + + release_targets(g_targets); + for (auto& retired : g_retiredTargets) { + release_targets(retired.targets); + } + g_retiredTargets.clear(); + + const auto releasePipeline = [](WGPUComputePipeline& pipeline) { + if (pipeline != nullptr) { + wgpuComputePipelineRelease(pipeline); + pipeline = nullptr; + } + }; + const auto releaseLayout = [](WGPUBindGroupLayout& layout) { + if (layout != nullptr) { + wgpuBindGroupLayoutRelease(layout); + layout = nullptr; + } + }; + releasePipeline(g_preprocessPipeline); + releasePipeline(g_mip4Pipeline); + releasePipeline(g_gtaoPipeline); + releasePipeline(g_denoisePipeline); + releaseLayout(g_preprocessLayout); + releaseLayout(g_mip4Layout); + releaseLayout(g_gtaoLayout); + releaseLayout(g_denoiseLayout); + if (g_compositePipeline != nullptr) { + wgpuRenderPipelineRelease(g_compositePipeline); + g_compositePipeline = nullptr; + } + if (g_compositeDebugPipeline != nullptr) { + wgpuRenderPipelineRelease(g_compositeDebugPipeline); + g_compositeDebugPipeline = nullptr; + } + releaseLayout(g_compositeLayout); + releaseLayout(g_compositeDebugLayout); + if (g_hilbertLutView != nullptr) { + wgpuTextureViewRelease(g_hilbertLutView); + g_hilbertLutView = nullptr; + } + if (g_hilbertLut != nullptr) { + wgpuTextureRelease(g_hilbertLut); + g_hilbertLut = nullptr; + } + g_cvarEnabled = g_cvarQuality = g_cvarRadius = g_cvarIntensity = 0; + g_cvarHalfRes = g_cvarDebugView = 0; + g_computeType = g_drawType = 0; + g_afterOpaqueHook = 0; + g_controlsWindow = 0; + return MOD_OK; +} +} diff --git a/tools/mod_template/CMakeLists.txt b/mods/template_mod/CMakeLists.txt similarity index 100% rename from tools/mod_template/CMakeLists.txt rename to mods/template_mod/CMakeLists.txt diff --git a/mods/template_mod/mod.json b/mods/template_mod/mod.json new file mode 100644 index 0000000000..e60714edf5 --- /dev/null +++ b/mods/template_mod/mod.json @@ -0,0 +1,7 @@ +{ + "id": "com.example.mod", + "name": "Template Mod", + "version": "1.0.0", + "author": "You", + "description": "An example Dusklight mod" +} diff --git a/tools/mod_template/res/.gitkeep b/mods/template_mod/res/.gitkeep similarity index 100% rename from tools/mod_template/res/.gitkeep rename to mods/template_mod/res/.gitkeep diff --git a/tools/mod_template/src/mod.cpp b/mods/template_mod/src/mod.cpp similarity index 100% rename from tools/mod_template/src/mod.cpp rename to mods/template_mod/src/mod.cpp diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt index 533bcc22c1..8670603866 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt @@ -1,7 +1,7 @@ # Dusklight Mod SDK entry point # -# Provides game/service headers, compile definitions and version.h without -# configuring the full game tree. +# Provides game/service headers, compile definitions, version.h and WebGPU +# headers without configuring the full game tree. # # Usage (from a mod project): # add_subdirectory(/sdk dusk-sdk EXCLUDE_FROM_ALL) @@ -30,6 +30,11 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectVersion.cmake") detect_version() configure_version_header() +# Provides dawn::webgpu_dawn and dawn::dawncpp_headers for public gfx service headers. +include("${CMAKE_CURRENT_SOURCE_DIR}/../extern/aurora/cmake/AuroraDependencyVersions.cmake") +set(AURORA_DAWN_PROVIDER "package" CACHE STRING "How to provide Dawn for the mod SDK") +include("${CMAKE_CURRENT_SOURCE_DIR}/../extern/aurora/cmake/AuroraDawnProvider.cmake") + # Game ABI headers & compile definitions include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GameABIConfig.cmake") diff --git a/tools/mod_template/mod.json b/tools/mod_template/mod.json deleted file mode 100644 index 46507a87ee..0000000000 --- a/tools/mod_template/mod.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id": "com.example.mod", - "name": "Template Mod", - "version": "1.0.0", - "author": "You", - "description": "An example Dusklight mod" -} From 409b60836bff61697f767f88d6230461e635015b Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 00:41:04 -0600 Subject: [PATCH 013/223] Add dusk::ui::append_text --- res/rml/mods.rcss | 1 + src/dusk/ui/logs_window.cpp | 21 ++++++++------------- src/dusk/ui/pane.cpp | 4 ++-- src/dusk/ui/ui.cpp | 25 +++++++++++++++++++------ src/dusk/ui/ui.hpp | 1 + 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/res/rml/mods.rcss b/res/rml/mods.rcss index 99aa33d236..6042e35c0f 100644 --- a/res/rml/mods.rcss +++ b/res/rml/mods.rcss @@ -121,6 +121,7 @@ mod-entry .mod-entry-desc { color: rgba(224, 219, 200, 65%); max-height: 2.6em; overflow: hidden; + white-space: pre-wrap; } mod-entry .mod-entry-sub { diff --git a/src/dusk/ui/logs_window.cpp b/src/dusk/ui/logs_window.cpp index 9fdd89e50d..fc9dad96ca 100644 --- a/src/dusk/ui/logs_window.cpp +++ b/src/dusk/ui/logs_window.cpp @@ -72,15 +72,10 @@ std::string format_time(int64_t timeMs) { return fmt::format("{}.{:03}", buffer.data(), timeMs % 1000); } -void append_text(Rml::ElementDocument* doc, Rml::Element* parent, const Rml::String& text) { - parent->AppendChild(doc->CreateTextNode(text)); -} - -Rml::Element* append_span(Rml::ElementDocument* doc, Rml::Element* parent, const char* className, - const Rml::String& text) { - auto span = doc->CreateElement("span"); +Rml::Element* append_span(Rml::Element* parent, const char* className, const Rml::String& text) { + auto span = parent->GetOwnerDocument()->CreateElement("span"); span->SetClass(className, true); - append_text(doc, span.get(), text); + append_text(span.get(), text); return parent->AppendChild(std::move(span)); } @@ -270,11 +265,11 @@ Rml::Element* LogsWindow::append_log_line(const mods::log::Line& line) { elem->SetClass(level_class(line.level), true); constexpr const char* kNbsp = "\xc2\xa0"; - append_span(mDocument, elem.get(), "log-time", format_time(line.timeMs)); - append_text(mDocument, elem.get(), kNbsp); - append_span(mDocument, elem.get(), "log-mod", fmt::format("[{}]", modId)); - append_text(mDocument, elem.get(), kNbsp); - append_span(mDocument, elem.get(), "log-msg", line.message); + append_span(elem.get(), "log-time", format_time(line.timeMs)); + append_text(elem.get(), kNbsp); + append_span(elem.get(), "log-mod", fmt::format("[{}]", modId)); + append_text(elem.get(), kNbsp); + append_span(elem.get(), "log-msg", line.message); return mLinesElem->AppendChild(std::move(elem)); } diff --git a/src/dusk/ui/pane.cpp b/src/dusk/ui/pane.cpp index 01eaf1194b..2a6f2a62c3 100644 --- a/src/dusk/ui/pane.cpp +++ b/src/dusk/ui/pane.cpp @@ -166,13 +166,13 @@ bool Pane::focus() { Rml::Element* Pane::add_section(const Rml::String& text) { auto* elem = append(mRoot, "div"); elem->SetClass("section-heading", true); - elem->SetInnerRML(escape(text)); + append_text(elem, text); return elem; } Rml::Element* Pane::add_text(const Rml::String& text) { auto* elem = append(mRoot, "div"); - elem->SetInnerRML(escape(text)); + append_text(elem, text); return elem; } diff --git a/src/dusk/ui/ui.cpp b/src/dusk/ui/ui.cpp index 032937a832..0777553681 100644 --- a/src/dusk/ui/ui.cpp +++ b/src/dusk/ui/ui.cpp @@ -31,9 +31,9 @@ void load_font(const char* filename, bool fallback = false) { } bool sInitialized = false; -std::vector > sDocumentStack; +std::vector> sDocumentStack; // Documents that don't participate in the focus stack -std::vector > sPassiveDocuments; +std::vector> sPassiveDocuments; struct ScopedStyles { DocumentScope scope; @@ -173,10 +173,12 @@ void handle_event(const SDL_Event& event) noexcept { const char* name = SDL_GetGamepadName(gamepad); Rml::String content = fmt::format("{}", name ? name : "[Unknown]"); Rml::String title = "Device Connected"; - if (const char* icon = connection_state_icon(SDL_GetGamepadConnectionState(gamepad))) { + if (const char* icon = + connection_state_icon(SDL_GetGamepadConnectionState(gamepad))) + { title = fmt::format( - "{} &#x{};", title, - icon); + "{} &#x{};", + title, icon); } int batteryLevel = -1; const auto powerState = SDL_GetGamepadPowerInfo(gamepad, &batteryLevel); @@ -382,6 +384,17 @@ Rml::Element* append(Rml::Element* parent, const Rml::String& tag) noexcept { return parent->AppendChild(doc->CreateElement(tag)); } +Rml::Element* append_text(Rml::Element* parent, const Rml::String& text) noexcept { + if (parent == nullptr) { + return nullptr; + } + auto* doc = parent->GetOwnerDocument(); + if (doc == nullptr) { + return nullptr; + } + return parent->AppendChild(doc->CreateTextNode(text)); +} + NavCommand map_nav_event(const Rml::Event& event) noexcept { const auto key = static_cast( event.GetParameter("key_identifier", Rml::Input::KI_UNKNOWN)); @@ -448,7 +461,7 @@ void push_toast(Toast toast) noexcept { sToasts.push_back(std::move(toast)); } -std::vector >& get_document_stack() noexcept { +std::vector>& get_document_stack() noexcept { return sDocumentStack; } diff --git a/src/dusk/ui/ui.hpp b/src/dusk/ui/ui.hpp index daf3c3ff03..bd993ea34d 100644 --- a/src/dusk/ui/ui.hpp +++ b/src/dusk/ui/ui.hpp @@ -96,6 +96,7 @@ Document* top_document() noexcept; std::filesystem::path resource_path(const std::filesystem::path& filename) noexcept; std::string escape(std::string_view str) noexcept; Rml::Element* append(Rml::Element* parent, const Rml::String& tag) noexcept; +Rml::Element* append_text(Rml::Element* parent, const Rml::String& text) noexcept; NavCommand map_nav_event(const Rml::Event& event) noexcept; Insets safe_area_insets(Rml::Context* context) noexcept; From 84e7394d5bdfab8c3830094e017d81f15d37e175 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 01:08:49 -0600 Subject: [PATCH 014/223] Dynamic shadows demo mod --- CMakeLists.txt | 1 + .../include/JSystem/J3DGraphBase/J3DShape.h | 1 + mods/shadow_mod/CMakeLists.txt | 20 + mods/shadow_mod/mod.json | 7 + mods/shadow_mod/res/shadow.wgsl | 262 ++++ mods/shadow_mod/src/mod.cpp | 1098 +++++++++++++++++ 6 files changed, 1389 insertions(+) create mode 100644 mods/shadow_mod/CMakeLists.txt create mode 100644 mods/shadow_mod/mod.json create mode 100644 mods/shadow_mod/res/shadow.wgsl create mode 100644 mods/shadow_mod/src/mod.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index abf30f6863..2af48dbcb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,6 +561,7 @@ if (DUSK_ENABLE_CODE_MODS AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR add_custom_target(dusklight_mods) # Aggregate target for all in-tree mods add_subdirectory(mods/template_mod) add_subdirectory(mods/ao_mod) + add_subdirectory(mods/shadow_mod) endif () if (APPLE) diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h index 5477868596..28cb9f7fe6 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h @@ -4,6 +4,7 @@ #include "JSystem/J3DGraphBase/J3DShapeDraw.h" #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DFifo.h" +#include "JSystem/JMath/JMath.h" #include #include "dusk/endian_gx.hpp" diff --git a/mods/shadow_mod/CMakeLists.txt b/mods/shadow_mod/CMakeLists.txt new file mode 100644 index 0000000000..4479d0fcc4 --- /dev/null +++ b/mods/shadow_mod/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.25) +project(shadow_mod CXX) + +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + set(DUSK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." CACHE PATH "Path to dusk source root") + option(DUSK_MOD_USE_FULL_TREE "Use full build instead of the minimal mod SDK" OFF) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if (DUSK_MOD_USE_FULL_TREE) + add_subdirectory("${DUSK_DIR}" dusk EXCLUDE_FROM_ALL) + else () + add_subdirectory("${DUSK_DIR}/sdk" dusk-sdk EXCLUDE_FROM_ALL) + endif () +endif () + +add_mod(shadow_mod + SOURCES src/mod.cpp + MOD_JSON mod.json + RES_DIR res + BUNDLE +) diff --git a/mods/shadow_mod/mod.json b/mods/shadow_mod/mod.json new file mode 100644 index 0000000000..09fe8a3a84 --- /dev/null +++ b/mods/shadow_mod/mod.json @@ -0,0 +1,7 @@ +{ + "id": "dev.twilitrealm.shadow_mod", + "name": "[Demo] Dynamic Shadows", + "version": "1.0.0", + "author": "encounter", + "description": "Demo showcasing dynamic shadow maps: re-renders geometry from the sun (or moon) point of view and composites real-time shadows over the world, with screen-space contact shadows for fine detail." +} diff --git a/mods/shadow_mod/res/shadow.wgsl b/mods/shadow_mod/res/shadow.wgsl new file mode 100644 index 0000000000..83065b1257 --- /dev/null +++ b/mods/shadow_mod/res/shadow.wgsl @@ -0,0 +1,262 @@ +// Deferred shadow composite: reconstructs the world position of every scene pixel from the +// depth snapshot (CameraService matrices), transforms it into the light's clip space, and +// PCF-compares against the shadow map rendered earlier this frame. Drawn as a fullscreen +// triangle with multiply blending (srcFactor = Dst, dstFactor = Zero) before the HUD. +// +// Depth conventions (both reversed-Z): the scene snapshot has 1.0 at the camera near plane; +// the shadow map, rendered through the game's GX pipeline with a GC-convention light matrix, +// stores clip.z, i.e. 1.0 nearest to the light and 0.0 at the light frustum far plane. +// +// The optional contact-shadow raymarch follows Panos Karabelas' screen-space shadows +// (https://panoskarabelas.com/blog/posts/screen_space_shadows/, MIT via Spartan Engine): +// march from the pixel toward the light in view space and mark occlusion when the ray dips +// behind the depth buffer within a thickness threshold. + +struct Uniforms { + world_from_proj: mat4x4f, // scene depth unproject (camera) + view_from_proj: mat4x4f, // scene depth -> view space (contact shadows) + proj_from_view: mat4x4f, // view -> clip (contact shadows re-projection) + light_vp: mat4x4f, // world -> light receiver projection (UV/depth basis) + light_dir_view: vec3f, // direction *toward* the light, view space, normalized + bias: f32, // shadow-map depth bias (reversed-depth units) + size: vec2f, // shadow map size in texels + inv_size: vec2f, + strength: f32, // final darkening amount, horizon fade baked in + pcf_taps: f32, // 0 = single tap, 1 = 3x3, 2 = 5x5 + contact_enabled: f32, + contact_thickness: f32, // view-space thickness threshold + contact_length: f32, // view-space march distance + debug_mode: u32, // 0 = composite; nonzero modes are diagnostic views + _pad0: f32, + _pad1: f32, +} + +@group(0) @binding(0) var scene_depth: texture_2d; +@group(0) @binding(1) var shadow_map: texture_2d; +@group(0) @binding(2) var uniforms: Uniforms; +@group(0) @binding(3) var light_color: texture_2d; + +struct VertexOutput { + @builtin(position) position: vec4f, + @location(0) uv: vec2f, +} + +@vertex +fn vs_main(@builtin(vertex_index) index: u32) -> VertexOutput { + var out: VertexOutput; + let uv = vec2f(f32((index << 1u) & 2u), f32(index & 2u)); + out.position = vec4f(uv * vec2f(2.0, -2.0) + vec2f(-1.0, 1.0), 0.0, 1.0); + out.uv = uv; + return out; +} + +fn load_shadow(texel: vec2) -> f32 { + let clamped = clamp(texel, vec2(0i), vec2(uniforms.size) - 1i); + return textureLoad(shadow_map, clamped, 0i).r; +} + +// Returns 1.0 when the pixel at light-space depth `receiver` is shadowed by the map texel. +fn shadow_test(texel: vec2, receiver: f32) -> f32 { + // Reversed depth: a larger stored value is closer to the light, i.e. an occluder. + return select(0.0, 1.0, load_shadow(texel) > receiver + uniforms.bias); +} + +// Bilinearly weighted comparison (what a hardware comparison sampler would do): filter the +// four *comparison results*, never the depths themselves. This is what turns per-texel +// staircases into smooth penumbra edges. +fn shadow_compare_bilinear(light_uv: vec2f, receiver: f32) -> f32 { + let coordinates = light_uv * uniforms.size - 0.5; + let base = floor(coordinates); + let fraction = coordinates - base; + let texel = vec2(base); + let s00 = shadow_test(texel, receiver); + let s10 = shadow_test(texel + vec2(1i, 0i), receiver); + let s01 = shadow_test(texel + vec2(0i, 1i), receiver); + let s11 = shadow_test(texel + vec2(1i, 1i), receiver); + let top = mix(s00, s10, fraction.x); + let bottom = mix(s01, s11, fraction.x); + return mix(top, bottom, fraction.y); +} + +fn sample_shadow_pcf(light_uv: vec2f, receiver: f32) -> f32 { + let radius = i32(uniforms.pcf_taps); + var sum = 0.0; + var count = 0.0; + for (var y = -radius; y <= radius; y += 1i) { + for (var x = -radius; x <= radius; x += 1i) { + let offset = vec2f(f32(x), f32(y)) * uniforms.inv_size; + sum += shadow_compare_bilinear(light_uv + offset, receiver); + count += 1.0; + } + } + return sum / count; +} + +fn scene_depth_at(uv: vec2f) -> f32 { + let size = vec2(textureDimensions(scene_depth)); + let texel = clamp(vec2(uv * vec2f(size)), vec2(0i), size - 1i); + return textureLoad(scene_depth, texel, 0i).r; +} + +fn light_color_at(uv: vec2f) -> vec4f { + let size = vec2(textureDimensions(light_color)); + let texel = clamp(vec2(uv * vec2f(size)), vec2(0i), size - 1i); + return textureLoad(light_color, texel, 0i); +} + +fn light_depth_debug_at(uv: vec2f) -> vec3f { + let texel = vec2(uv * uniforms.size); + let depth = load_shadow(texel); + if depth <= 0.0 { + return vec3f(0.0); + } + + let dx = abs(depth - load_shadow(texel + vec2(1i, 0i))); + let dy = abs(depth - load_shadow(texel + vec2(0i, 1i))); + let edge = saturate((dx + dy) * 500.0); + let shade = saturate(depth * 1.5); + let bands = 0.08 * (0.5 + 0.5 * cos(depth * 96.0)); + return vec3f(saturate(shade + bands + edge)); +} + +fn view_position(uv: vec2f, depth: f32) -> vec3f { + let ndc = vec4f(uv.x * 2.0 - 1.0, 1.0 - 2.0 * uv.y, depth, 1.0); + let position = uniforms.view_from_proj * ndc; + return position.xyz / position.w; +} + +// Interleaved gradient noise (Jimenez); fixed per-pixel dither, no temporal rotation. +fn ign(pixel: vec2f) -> f32 { + return fract(52.9829189 * fract(dot(pixel, vec2f(0.06711056, 0.00583715)))); +} + +// Screen-space contact shadows: march toward the light in view space; occluded when the ray +// passes behind the depth buffer by less than the thickness threshold. Faded out with view +// distance: position reconstruction error grows with distance while the thickness threshold +// is fixed, so far surfaces (and anything translucent composited over them - clouds, fog) +// would otherwise pick up dithered false occlusion. Contact shadows are a near-field effect. +fn contact_shadow_fade(view_distance: f32) -> f32 { + return saturate(1.0 - (view_distance - 3000.0) / 5000.0); +} + +fn contact_shadow(origin: vec3f, pixel: vec2f) -> f32 { + let steps = 24; + let step_vec = uniforms.light_dir_view * (uniforms.contact_length / f32(steps)); + var ray = origin + step_vec * ign(pixel); + for (var i = 0; i < steps; i += 1) { + ray += step_vec; + // Project the ray position back to screen space. + let clip = uniforms.proj_from_view * vec4f(ray, 1.0); + if clip.w <= 0.0 { + break; + } + let ray_ndc = clip.xyz / clip.w; + let ray_uv = vec2f(0.5 + 0.5 * ray_ndc.x, 0.5 - 0.5 * ray_ndc.y); + if any(ray_uv < vec2f(0.0)) || any(ray_uv > vec2f(1.0)) { + break; + } + let scene = scene_depth_at(ray_uv); + if scene <= 0.0 { + continue; + } + // Compare in view space: positive delta = the ray is behind the scene surface. + let scene_z = view_position(ray_uv, scene).z; + let delta = scene_z - ray.z; // view space looks down -z; larger z = closer + if delta > 0.0 && delta < uniforms.contact_thickness { + return 1.0; + } + } + return 0.0; +} + +@fragment +fn fs_main(in: VertexOutput) -> @location(0) vec4f { + let depth = scene_depth_at(in.uv); + if uniforms.debug_mode == 1u { + let value = load_shadow(vec2(in.uv * uniforms.size)); + return vec4f(value, value, value, 1.0); + } + if uniforms.debug_mode == 9u || uniforms.debug_mode == 10u { + let color = light_color_at(in.uv); + let color_luma = max(color.r, max(color.g, color.b)); + let depth_color = light_depth_debug_at(in.uv); + let rgb = select(depth_color, color.rgb, color_luma > (1.0 / 255.0)); + return vec4f(rgb, 1.0); + } + + if depth <= 0.0 { + // Sky / cleared pixels receive no shadow. + if uniforms.debug_mode >= 3u { + return vec4f(0.0, 0.0, 0.0, 1.0); + } + return vec4f(1.0); + } + + let ndc = vec4f(in.uv.x * 2.0 - 1.0, 1.0 - 2.0 * in.uv.y, depth, 1.0); + let world4 = uniforms.world_from_proj * ndc; + let world = world4.xyz / world4.w; + + let light_clip = uniforms.light_vp * vec4f(world, 1.0); + let light_ndc = light_clip.xyz / light_clip.w; + let receiver = light_ndc.z; // reversed light depth, 1 = nearest to the light + let light_uv = vec2f(0.5 + 0.5 * light_ndc.x, 0.5 - 0.5 * light_ndc.y); + let in_shadow_bounds = all(light_uv >= vec2f(0.0)) && all(light_uv <= vec2f(1.0)) && + receiver > 0.0 && receiver <= 1.0; + let shadow_depth = load_shadow(vec2(light_uv * uniforms.size)); + + if uniforms.debug_mode == 4u { + let valid = select(0.0, 1.0, in_shadow_bounds); + return vec4f(saturate(light_uv.x), saturate(light_uv.y), valid, 1.0); + } + + if uniforms.debug_mode == 5u { + if !in_shadow_bounds { + return vec4f(0.0, 0.0, 0.0, 1.0); + } + let current_compare = select(0.0, 1.0, shadow_depth > receiver + uniforms.bias); + let opposite_compare = select(0.0, 1.0, shadow_depth < receiver - uniforms.bias); + return vec4f(current_compare, 0.0, opposite_compare, 1.0); + } + + if uniforms.debug_mode == 6u { + let valid = select(0.0, 1.0, in_shadow_bounds); + return vec4f(saturate(receiver), shadow_depth, valid, 1.0); + } + + if uniforms.debug_mode == 7u { + let beyond_far = select(0.0, 1.0, receiver <= 0.0); + let valid_depth = select(0.0, 1.0, receiver > 0.0 && receiver <= 1.0); + let before_near = select(0.0, 1.0, receiver > 1.0); + return vec4f(beyond_far, valid_depth, before_near, 1.0); + } + + if uniforms.debug_mode == 8u { + let valid_x = select(0.0, 1.0, light_uv.x >= 0.0 && light_uv.x <= 1.0); + let valid_y = select(0.0, 1.0, light_uv.y >= 0.0 && light_uv.y <= 1.0); + let valid_depth = select(0.0, 1.0, receiver > 0.0 && receiver <= 1.0); + return vec4f(valid_x, valid_y, valid_depth, 1.0); + } + + var occlusion = 0.0; + if in_shadow_bounds { + occlusion = sample_shadow_pcf(light_uv, receiver); + } + + if uniforms.debug_mode == 3u { + return vec4f(occlusion, occlusion, occlusion, 1.0); + } + + if uniforms.contact_enabled != 0.0 && occlusion < 1.0 { + let origin = view_position(in.uv, depth); + let fade = contact_shadow_fade(-origin.z); + if fade > 0.0 { + occlusion = max(occlusion, fade * contact_shadow(origin, in.position.xy)); + } + } + + let value = 1.0 - uniforms.strength * occlusion; + if uniforms.debug_mode == 2u { + return vec4f(value, value, value, 1.0); + } + return vec4f(value, value, value, 1.0); +} diff --git a/mods/shadow_mod/src/mod.cpp b/mods/shadow_mod/src/mod.cpp new file mode 100644 index 0000000000..df57eadcbd --- /dev/null +++ b/mods/shadow_mod/src/mod.cpp @@ -0,0 +1,1098 @@ +// Dynamic shadows example mod. +// +// Replays the game's populated opaque scene draw lists into an offscreen pass with a light-space +// projection to produce a shadow map of the live scene, then composites deferred shadows over the +// world (scene depth + CameraService unproject + PCF against the map). +// +// The optional contact-shadow raymarch in the composite is reimplemented from Panos Karabelas' +// screen-space shadows (MIT, via Spartan Engine); see res/shadow.wgsl. + +#include "global.h" + +#include "JSystem/J3DGraphBase/J3DShape.h" +#include "JSystem/J3DU/J3DUClipper.h" +#include "JSystem/JMath/JMath.h" +#include "d/d_com_inf_game.h" +#include "d/d_kankyo.h" +#include "d/d_kankyo_rain.h" +#include "dolphin/gx/GXAurora.h" +#include "dolphin/gx/GXGet.h" +#include "dolphin/gx/GXPixel.h" +#include "dolphin/gx/GXTransform.h" +#include "m_Do/m_Do_mtx.h" +#include "mods/hook.hpp" +#include "mods/service.hpp" +#include "mods/svc/camera.h" +#include "mods/svc/config.h" +#include "mods/svc/game.h" +#include "mods/svc/gfx.h" +#include "mods/svc/hook.h" +#include "mods/svc/log.h" +#include "mods/svc/resource.h" +#include "mods/svc/ui.h" + +#include +#include +#include +#include +#include +#include + +DEFINE_MOD(); +IMPORT_SERVICE(ConfigService, svc_config); +IMPORT_SERVICE(ResourceService, svc_resource); +IMPORT_SERVICE(UiService, svc_ui); +IMPORT_SERVICE(GfxService, svc_gfx); +IMPORT_SERVICE(CameraService, svc_camera); +IMPORT_SERVICE(HookService, svc_hook); +IMPORT_SERVICE(GameService, svc_game); +IMPORT_SERVICE(LogService, svc_log); + +namespace { + +ConfigVarHandle g_cvarEnabled = 0; +ConfigVarHandle g_cvarMapSize = 0; +ConfigVarHandle g_cvarNoFrustumClipping = 0; +ConfigVarHandle g_cvarStrength = 0; +ConfigVarHandle g_cvarPcf = 0; +ConfigVarHandle g_cvarBias = 0; +ConfigVarHandle g_cvarBoxRadius = 0; +ConfigVarHandle g_cvarContactShadows = 0; +ConfigVarHandle g_cvarDebugView = 0; + +GfxDrawTypeHandle g_drawType = 0; +GfxStageHookHandle g_sceneBeginHook = 0; +GfxStageHookHandle g_sceneAfterTerrainHook = 0; +GfxStageHookHandle g_frameBeforeHudHook = 0; +UiWindowHandle g_controlsWindow = 0; +ResourceBuffer g_shaderSource = RESOURCE_BUFFER_INIT; +GfxDeviceInfo g_deviceInfo = GFX_DEVICE_INFO_INIT; +WGPURenderPipeline g_compositePipeline = nullptr; // multiply blend +WGPURenderPipeline g_compositeDebugPipeline = nullptr; // no blend (debug views) +WGPUBindGroupLayout g_compositeLayout = nullptr; +WGPUBindGroupLayout g_compositeDebugLayout = nullptr; + +struct MapPassOutput { + bool ready = false; + WGPUTextureView shadowMap = nullptr; // frame-pooled + WGPUTextureView lightColor = nullptr; // frame-pooled + uint32_t mapSize = 0; + Mtx44 lightVp; // world -> light receiver projection, row-major game convention + float dirToLightWorld[3]; // toward the light, normalized + float fade = 0.0f; +}; + +MapPassOutput g_mapPass; +bool g_replayingSceneLists = false; + +constexpr float kLightDistance = 30000.0f; +constexpr float kLightNear = 100.0f; +constexpr float kLightFar = 60000.0f; +constexpr float kMaxLightLookahead = 10000.0f; +constexpr float kSunMoonDistance = 80000.0f; +constexpr float kSunMoonZDistance = -48000.0f; + +using ClipperSphereClip = int (J3DUClipper::*)(f32 const (*)[4], Vec, f32) const; +using ClipperBoxClip = int (J3DUClipper::*)(f32 const (*)[4], Vec*, Vec*) const; +constexpr ClipperSphereClip kClipperSphereClip = static_cast(&J3DUClipper::clip); +constexpr ClipperBoxClip kClipperBoxClip = static_cast(&J3DUClipper::clip); + +// Mirror of the WGSL Uniforms struct (keep in sync with res/shadow.wgsl). +struct ShadowUniforms { + float world_from_proj[16]; + float view_from_proj[16]; + float proj_from_view[16]; + float light_vp[16]; + float light_dir_view[3]; + float bias; + float size[2]; + float inv_size[2]; + float strength; + float pcf_taps; + float contact_enabled; + float contact_thickness; + float contact_length; + uint32_t debug_mode; + float _pad0; + float _pad1; +}; +static_assert(sizeof(ShadowUniforms) % 16 == 0); + +struct DrawPayload { + WGPUTextureView sceneDepth; // frame-pooled + WGPUTextureView shadowMap; // frame-pooled + WGPUTextureView lightColor; // frame-pooled + uint32_t uniform_offset; + uint32_t uniform_size; + uint32_t debug_mode; +}; +static_assert(sizeof(DrawPayload) <= GFX_INLINE_DRAW_PAYLOAD_SIZE); +static_assert(std::is_trivially_copyable_v); + +struct LightCamera { + Mtx view; + Mtx44 ortho; + Mtx44 vp; + float dirToLight[3]; + float fade = 0.0f; +}; + +struct SceneCamera { + bool valid = false; + bool raw_valid = false; + CameraInfo info = CAMERA_INFO_INIT; + Mtx raw_view; + f32 raw_projection[7]{}; + Mtx44 raw_projection_mtx; +}; + +SceneCamera g_sceneCamera; + +struct ActualLightDebugState { + bool active = false; + Mtx savedView; + f32 savedProjection[7]; + f32 savedViewport[6]; + u32 savedScissor[4]; +}; + +ActualLightDebugState g_actualLightDebug; + +struct replay_scope { + replay_scope() { g_replayingSceneLists = true; } + ~replay_scope() { g_replayingSceneLists = false; } +}; + +int64_t get_int_option(ConfigVarHandle handle, int64_t fallback) { + int64_t value = fallback; + if (handle == 0 || svc_config->get_int(mod_ctx, handle, &value) != MOD_OK) { + return fallback; + } + return value; +} + +bool get_bool_option(ConfigVarHandle handle, bool fallback) { + bool value = fallback; + if (handle == 0 || svc_config->get_bool(mod_ctx, handle, &value) != MOD_OK) { + return fallback; + } + return value; +} + +int64_t get_debug_mode() { + return std::clamp(get_int_option(g_cvarDebugView, 0), 0, 10); +} + +bool matrix_ready(const Mtx m) { + float basis = 0.0f; + for (int r = 0; r < 3; ++r) { + for (int c = 0; c < 4; ++c) { + if (!std::isfinite(m[r][c])) { + return false; + } + if (c < 3) { + basis += std::fabs(m[r][c]); + } + } + } + return basis > 0.001f; +} + +bool projection_vector_ready(const f32 projection[7]) { + if (projection[0] != 0.0f) { + return false; + } + for (int i = 1; i < 7; ++i) { + if (!std::isfinite(projection[i])) { + return false; + } + } + return std::fabs(projection[1]) > 0.001f && std::fabs(projection[3]) > 0.001f && + std::fabs(projection[6]) > 0.001f; +} + +// Row-major game matrix -> column-major WGSL layout (matching CameraService). +void store_column_major(const Mtx44 in, float out[16]) { + for (int c = 0; c < 4; ++c) { + for (int r = 0; r < 4; ++r) { + out[c * 4 + r] = in[r][c]; + } + } +} + +void copy_projection(const Mtx44 in, Mtx44 out) { + std::memcpy(out, in, sizeof(Mtx44)); + // TODO: check GfxDeviceInfo.uses_reversed_z + for (int c = 0; c < 4; ++c) { + out[2][c] = -out[2][c]; + } +} + +void projection_vector_from_perspective(const Mtx44 projection, f32 out[7]) { + out[0] = 0.0f; + out[1] = projection[0][0]; + out[2] = projection[0][2]; + out[3] = projection[1][1]; + out[4] = projection[1][2]; + out[5] = projection[2][2]; + out[6] = projection[2][3]; +} + +const view_class* stage_game_view(const GfxStageContext* stageCtx) { + if (stageCtx == nullptr || stageCtx->struct_size < sizeof(GfxStageContext) || + stageCtx->game_view == nullptr) + { + return nullptr; + } + return static_cast(stageCtx->game_view); +} + +bool capture_raw_camera( + const view_class* gameView, Mtx outView, Mtx44 outProjectionMtx, f32 outProjection[7]) { + if (gameView == nullptr || !matrix_ready(gameView->viewMtx)) { + return false; + } + std::memcpy(outProjectionMtx, gameView->projMtx, sizeof(Mtx44)); + projection_vector_from_perspective(outProjectionMtx, outProjection); + if (!projection_vector_ready(outProjection)) { + return false; + } + cMtx_copy(gameView->viewMtx, outView); + return true; +} + +bool capture_scene_camera(const GfxStageContext* stageCtx) { + g_sceneCamera.valid = false; + g_sceneCamera.raw_valid = false; + const view_class* gameView = stage_game_view(stageCtx); + if (gameView == nullptr) { + return false; + } + CameraInfo info = CAMERA_INFO_INIT; + if (svc_camera->get_camera(mod_ctx, stageCtx->game_view, &info) != MOD_OK) { + return false; + } + g_sceneCamera.info = info; + g_sceneCamera.valid = true; + g_sceneCamera.raw_valid = capture_raw_camera(gameView, g_sceneCamera.raw_view, + g_sceneCamera.raw_projection_mtx, g_sceneCamera.raw_projection); + return true; +} + +bool get_replay_camera(Mtx outView, Mtx44 outProjectionMtx, f32 outProjection[7]) { + if (g_sceneCamera.raw_valid && matrix_ready(g_sceneCamera.raw_view)) { + cMtx_copy(g_sceneCamera.raw_view, outView); + std::memcpy(outProjectionMtx, g_sceneCamera.raw_projection_mtx, + sizeof(g_sceneCamera.raw_projection_mtx)); + std::memcpy( + outProjection, g_sceneCamera.raw_projection, sizeof(g_sceneCamera.raw_projection)); + return projection_vector_ready(outProjection); + } + + return false; +} + +float wrap_daytime(float daytime) { + if (!std::isfinite(daytime)) { + return 180.0f; + } + float wrapped = std::fmod(daytime, 360.0f); + if (wrapped < 0.0f) { + wrapped += 360.0f; + } + return wrapped; +} + +float daytime_percent(float max, float min, float value) { + const float range = max - min; + if (range == 0.0f) { + return 1.0f; + } + const float percent = 1.0f - ((max - value) / range); + return percent < 1.0f ? percent : 1.0f; +} + +float sun_moon_angle(float daytime) { + daytime = wrap_daytime(daytime); + if (daytime >= 90.0f && daytime <= 270.0f) { + return daytime_percent(270.0f, 90.0f, daytime) * 150.0f + 105.0f; + } + + float angle = daytime; + if (angle < 90.0f) { + angle += 360.0f; + } + + angle = daytime_percent(450.0f, 270.0f, angle) * 210.0f + 255.0f; + if (angle > 360.0f) { + angle -= 360.0f; + } + return angle; +} + +cXyz sun_moon_offset(float daytime) { + const float angle = DEG_TO_RAD(sun_moon_angle(daytime)); + const float angleSin = sinf(angle); + const float angleCos = cosf(angle); + return cXyz{ + angleSin * kSunMoonDistance, -angleCos * kSunMoonDistance, angleCos * kSunMoonZDistance}; +} + +bool build_composite_pipeline( + bool blend, WGPURenderPipeline& outPipeline, WGPUBindGroupLayout& outLayout) { + WGPUShaderSourceWGSL wgsl = WGPU_SHADER_SOURCE_WGSL_INIT; + wgsl.code = {static_cast(g_shaderSource.data), g_shaderSource.size}; + WGPUShaderModuleDescriptor moduleDesc = WGPU_SHADER_MODULE_DESCRIPTOR_INIT; + moduleDesc.nextInChain = &wgsl.chain; + moduleDesc.label = {"shadow composite", WGPU_STRLEN}; + WGPUShaderModule module = wgpuDeviceCreateShaderModule(g_deviceInfo.device, &moduleDesc); + if (module == nullptr) { + return false; + } + + // Multiply blend: fragment output is the darkening multiplier (result = dst * src). + WGPUBlendState blendState{ + .color = {.operation = WGPUBlendOperation_Add, + .srcFactor = WGPUBlendFactor_Dst, + .dstFactor = WGPUBlendFactor_Zero}, + .alpha = {.operation = WGPUBlendOperation_Add, + .srcFactor = WGPUBlendFactor_Zero, + .dstFactor = WGPUBlendFactor_One}, + }; + WGPUColorTargetState colorTarget = WGPU_COLOR_TARGET_STATE_INIT; + colorTarget.format = g_deviceInfo.color_format; + if (blend) { + colorTarget.blend = &blendState; + } + WGPUFragmentState fragment = WGPU_FRAGMENT_STATE_INIT; + fragment.module = module; + fragment.entryPoint = {"fs_main", WGPU_STRLEN}; + fragment.targetCount = 1; + fragment.targets = &colorTarget; + WGPUDepthStencilState depthStencil = WGPU_DEPTH_STENCIL_STATE_INIT; + depthStencil.format = g_deviceInfo.depth_format; + depthStencil.depthWriteEnabled = WGPUOptionalBool_False; + depthStencil.depthCompare = WGPUCompareFunction_Always; + + WGPURenderPipelineDescriptor pipelineDesc = WGPU_RENDER_PIPELINE_DESCRIPTOR_INIT; + pipelineDesc.label = {blend ? "shadow composite" : "shadow composite (debug)", WGPU_STRLEN}; + pipelineDesc.vertex.module = module; + pipelineDesc.vertex.entryPoint = {"vs_main", WGPU_STRLEN}; + pipelineDesc.primitive.topology = WGPUPrimitiveTopology_TriangleList; + pipelineDesc.depthStencil = &depthStencil; + pipelineDesc.multisample.count = g_deviceInfo.sample_count; + pipelineDesc.fragment = &fragment; + outPipeline = wgpuDeviceCreateRenderPipeline(g_deviceInfo.device, &pipelineDesc); + wgpuShaderModuleRelease(module); + if (outPipeline == nullptr) { + return false; + } + outLayout = wgpuRenderPipelineGetBindGroupLayout(outPipeline, 0); + return outLayout != nullptr; +} + +// Render worker thread: fullscreen deferred-shadow composite. +void on_draw( + ModContext*, const GfxDrawContext* ctx, const void* payload, size_t payloadSize, void*) { + if (payloadSize != sizeof(DrawPayload)) { + return; + } + DrawPayload data; + std::memcpy(&data, payload, sizeof(data)); + + WGPURenderPipeline pipeline = + data.debug_mode != 0 ? g_compositeDebugPipeline : g_compositePipeline; + WGPUBindGroupLayout layout = data.debug_mode != 0 ? g_compositeDebugLayout : g_compositeLayout; + if (data.sceneDepth == nullptr || data.shadowMap == nullptr || data.lightColor == nullptr || + pipeline == nullptr) + { + return; + } + + WGPUBindGroupEntry entries[4] = {WGPU_BIND_GROUP_ENTRY_INIT, WGPU_BIND_GROUP_ENTRY_INIT, + WGPU_BIND_GROUP_ENTRY_INIT, WGPU_BIND_GROUP_ENTRY_INIT}; + entries[0].binding = 0; + entries[0].textureView = data.sceneDepth; + entries[1].binding = 1; + entries[1].textureView = data.shadowMap; + entries[2].binding = 2; + entries[2].buffer = ctx->uniform_buffer; + entries[2].offset = data.uniform_offset; + entries[2].size = data.uniform_size; + entries[3].binding = 3; + entries[3].textureView = data.lightColor; + WGPUBindGroupDescriptor bindGroupDesc = WGPU_BIND_GROUP_DESCRIPTOR_INIT; + bindGroupDesc.layout = layout; + bindGroupDesc.entryCount = 4; + bindGroupDesc.entries = entries; + WGPUBindGroup bindGroup = wgpuDeviceCreateBindGroup(ctx->device, &bindGroupDesc); + if (bindGroup == nullptr) { + return; + } + + wgpuRenderPassEncoderSetPipeline(ctx->pass, pipeline); + wgpuRenderPassEncoderSetBindGroup(ctx->pass, 0, bindGroup, 0, nullptr); + wgpuRenderPassEncoderDraw(ctx->pass, 3, 1, 0, 0); + wgpuBindGroupRelease(bindGroup); +} + +// Picks the sun or moon (whichever is above the horizon) and returns the normalized +// world-space direction *toward* the light plus a horizon fade factor. False = no light. +bool compute_light(float outDirToLight[3], float& outFade) { + dScnKy_env_light_c* envLight = dKy_getEnvlight(); + if (envLight == nullptr) { + return false; + } + + // The packet positions can be stale when this runs before the world lists are consumed. + // Mirror dScnKy_env_light_c::setSunpos() so --time-of-day directly moves the debug light. + const float daytime = wrap_daytime(dComIfGs_getTime()); + cXyz offset = sun_moon_offset(daytime); + if (offset.y <= 0.0f) { + offset = sun_moon_offset(daytime + 180.0f); + } + const float length = std::sqrt(offset.x * offset.x + offset.y * offset.y + offset.z * offset.z); + if (length < 1.0f) { + return false; + } + outDirToLight[0] = offset.x / length; + outDirToLight[1] = offset.y / length; + outDirToLight[2] = offset.z / length; + // Fade shadows out as the light approaches the horizon (elevation below ~11 degrees). + outFade = std::clamp((outDirToLight[1] - 0.05f) / 0.15f, 0.0f, 1.0f); + return outFade > 0.0f; +} + +bool build_light_camera(const Mtx cameraView, uint32_t mapSize, float radius, LightCamera& out) { + Mtx cameraInvView; + cMtx_inverse(cameraView, cameraInvView); + if (!matrix_ready(cameraInvView)) { + return false; + } + if (!compute_light(out.dirToLight, out.fade)) { + return false; + } + + // Fit a fixed-radius ortho box around the visible play space. The camera target alone can sit + // behind the receiver field, while a far-horizon center drops foreground receivers. + const cXyz eye{cameraInvView[0][3], cameraInvView[1][3], cameraInvView[2][3]}; + cXyz forward{-cameraInvView[0][2], -cameraInvView[1][2], -cameraInvView[2][2]}; + const float forwardLength = + std::sqrt(forward.x * forward.x + forward.y * forward.y + forward.z * forward.z); + if (forwardLength > 0.001f) { + forward = forward / forwardLength; + } else { + forward = cXyz{0.0f, 0.0f, -1.0f}; + } + const float lookahead = std::min(radius * 0.75f, kMaxLightLookahead); + const cXyz center = eye + forward * lookahead; + const cXyz lightEye{center.x + out.dirToLight[0] * kLightDistance, + center.y + out.dirToLight[1] * kLightDistance, + center.z + out.dirToLight[2] * kLightDistance}; + const bool nearlyVertical = std::fabs(out.dirToLight[1]) > 0.99f; + cXyz up = nearlyVertical ? cXyz{0.0f, 0.0f, 1.0f} : cXyz{0.0f, 1.0f, 0.0f}; + + cMtx_lookAt(out.view, &lightEye, ¢er, &up, 0); + const float unitsPerTexel = (2.0f * radius) / static_cast(mapSize); + out.view[0][3] = std::round(out.view[0][3] / unitsPerTexel) * unitsPerTexel; + out.view[1][3] = std::round(out.view[1][3] / unitsPerTexel) * unitsPerTexel; + + C_MTXOrtho(out.ortho, radius, -radius, -radius, radius, kLightNear, kLightFar); + cMtx_concatProjView(out.ortho, out.view, out.vp); + return true; +} + +bool build_light_replay_projection( + const LightCamera& lightCamera, const Mtx cameraView, Mtx44 out) { + Mtx cameraInvView; + cMtx_inverse(cameraView, cameraInvView); + if (!matrix_ready(cameraInvView)) { + return false; + } + + Mtx lightFromCamera; + cMtx_concat(lightCamera.view, cameraInvView, lightFromCamera); + cMtx_concatProjView(lightCamera.ortho, lightFromCamera, out); + return true; +} + +// True when the dynamic shadow pass will run this frame: enabled, a camera exists, and the +// sun or moon is above the horizon. Also gates the game-shadow skip hooks, which fire earlier +// in the painter than our SCENE_AFTER_TERRAIN hook. +bool dynamic_shadows_wanted() { + if (!get_bool_option(g_cvarEnabled, true)) { + return false; + } + if (!g_sceneCamera.raw_valid) { + return false; + } + float dirToLight[3]; + float fade = 0.0f; + return compute_light(dirToLight, fade); +} + +HookAction on_game_shadow_pre(ModContext*, void*, void*, void*) { + if (!dynamic_shadows_wanted()) { + return HOOK_CONTINUE; + } + return HOOK_SKIP_ORIGINAL; +} + +HookAction on_frustum_clip_pre(ModContext*, void*, void* retval, void*) { + if (!get_bool_option(g_cvarNoFrustumClipping, false) || !dynamic_shadows_wanted()) { + return HOOK_CONTINUE; + } + if (retval != nullptr) { + *static_cast(retval) = 0; + } + return HOOK_SKIP_ORIGINAL; +} + +HookAction on_copy_tex_pre(ModContext*, void*, void*, void*) { + return g_replayingSceneLists ? HOOK_SKIP_ORIGINAL : HOOK_CONTINUE; +} + +void draw_opaque_scene_lists() { + dComIfGd_drawOpaListBG(); + dComIfGd_drawOpaListDarkBG(); + dComIfGd_drawOpaListMiddle(); + dComIfGd_drawOpaList(); + dComIfGd_drawOpaListDark(); + dComIfGd_drawOpaListPacket(); +} + +bool draw_lists_ready() { + return dComIfGd_getOpaListBG() != nullptr && dComIfGd_getOpaList() != nullptr && + dComIfGd_getOpaListDark() != nullptr && dComIfGd_getXluListBG() != nullptr && + dComIfGd_getListPacket() != nullptr; +} + +void render_shadow_map( + const Mtx replayView, const Mtx44 replayProjectionMtx, const f32 replayProjection[7]); + +void restore_actual_light_debug() { + if (!g_actualLightDebug.active) { + return; + } + + j3dSys.setViewMtx(g_actualLightDebug.savedView); + GXSetProjectionv(g_actualLightDebug.savedProjection); + GXSetViewport(g_actualLightDebug.savedViewport[0], g_actualLightDebug.savedViewport[1], + g_actualLightDebug.savedViewport[2], g_actualLightDebug.savedViewport[3], + g_actualLightDebug.savedViewport[4], g_actualLightDebug.savedViewport[5]); + GXSetScissor(g_actualLightDebug.savedScissor[0], g_actualLightDebug.savedScissor[1], + g_actualLightDebug.savedScissor[2], g_actualLightDebug.savedScissor[3]); + dKy_setLight(); + J3DShape::resetVcdVatCache(); + + g_actualLightDebug.active = false; +} + +void on_scene_begin(ModContext*, const GfxStageContext* stageCtx, void*) { + restore_actual_light_debug(); + capture_scene_camera(stageCtx); + if (!get_bool_option(g_cvarEnabled, true) || get_debug_mode() != 9) { + return; + } + + Mtx cameraView; + if (!g_sceneCamera.raw_valid || !matrix_ready(g_sceneCamera.raw_view)) { + return; + } + cMtx_copy(g_sceneCamera.raw_view, cameraView); + + const uint32_t mapSize = 1024u << std::clamp(get_int_option(g_cvarMapSize, 1), 0, 2); + const float radius = + static_cast(std::clamp(get_int_option(g_cvarBoxRadius, 6000), 1000, 20000)); + LightCamera lightCamera{}; + if (!build_light_camera(cameraView, mapSize, radius, lightCamera)) { + return; + } + Mtx44 lightProjection; + if (!build_light_replay_projection(lightCamera, cameraView, lightProjection)) { + return; + } + + cMtx_copy(cameraView, g_actualLightDebug.savedView); + GXGetProjectionv(g_actualLightDebug.savedProjection); + GXGetViewportv(g_actualLightDebug.savedViewport); + GXGetScissor(&g_actualLightDebug.savedScissor[0], &g_actualLightDebug.savedScissor[1], + &g_actualLightDebug.savedScissor[2], &g_actualLightDebug.savedScissor[3]); + g_actualLightDebug.active = true; + + j3dSys.setViewMtx(g_actualLightDebug.savedView); + GXSetProjectionFull(lightProjection); + dKy_setLight(); + J3DShape::resetVcdVatCache(); +} + +void on_scene_after_terrain(ModContext*, const GfxStageContext* stageCtx, void*) { + if (g_mapPass.ready) { + return; + } + + const view_class* gameView = stage_game_view(stageCtx); + Mtx replayView; + Mtx44 replayProjectionMtx; + f32 replayProjection[7]; + if (!capture_raw_camera(gameView, replayView, replayProjectionMtx, replayProjection)) { + return; + } + render_shadow_map(replayView, replayProjectionMtx, replayProjection); +} + +// Game thread, after the draw handlers have populated next frame's scene lists: replay opaque scene +// geometry from the light's point of view. +void render_shadow_map( + const Mtx replayView, const Mtx44 replayProjectionMtx, const f32 replayProjection[7]) { + if (g_mapPass.ready || !get_bool_option(g_cvarEnabled, true)) { + return; + } + const int64_t debugMode = get_debug_mode(); + if (debugMode == 9) { + return; + } + if (!matrix_ready(replayView)) { + return; + } + Mtx replayViewMtx; + cMtx_copy(replayView, replayViewMtx); + + const uint32_t mapSize = 1024u << std::clamp(get_int_option(g_cvarMapSize, 1), 0, 2); + const bool cameraReplayDebug = debugMode == 10; + const float radius = + static_cast(std::clamp(get_int_option(g_cvarBoxRadius, 6000), 1000, 20000)); + LightCamera lightCamera{}; + if (!build_light_camera(replayViewMtx, mapSize, radius, lightCamera)) { + return; + } + Mtx44 lightReplayProjection; + if (!build_light_replay_projection(lightCamera, replayViewMtx, lightReplayProjection)) { + return; + } + f32 savedProjection[7]; + GXGetProjectionv(savedProjection); + f32 savedViewport[6]; + GXGetViewportv(savedViewport); + u32 savedScissor[4]; + GXGetScissor(&savedScissor[0], &savedScissor[1], &savedScissor[2], &savedScissor[3]); + Mtx savedView; + cMtx_copy(j3dSys.getViewMtx(), savedView); + + auto restore_game_camera = [&]() { + j3dSys.setViewMtx(savedView); + GXSetProjectionv(savedProjection); + GXSetViewport(savedViewport[0], savedViewport[1], savedViewport[2], savedViewport[3], + savedViewport[4], savedViewport[5]); + GXSetScissor(savedScissor[0], savedScissor[1], savedScissor[2], savedScissor[3]); + dKy_setLight(); + }; + auto set_replay_camera = [&]() { + j3dSys.setViewMtx(replayViewMtx); + if (cameraReplayDebug) { + GXSetProjectionv(replayProjection); + } else { + GXSetProjectionFull(lightReplayProjection); + } + dKy_setLight(); + }; + if (!draw_lists_ready()) { + return; + } + if (svc_gfx->create_pass(mod_ctx, mapSize, mapSize) != MOD_OK) { + return; + } + J3DShape::resetVcdVatCache(); + + set_replay_camera(); + GXSetViewport(0.0f, 0.0f, static_cast(mapSize), static_cast(mapSize), 0.0f, 1.0f); + GXSetViewportRender( + 0.0f, 0.0f, static_cast(mapSize), static_cast(mapSize), 0.0f, 1.0f); + GXSetScissorRender(0, 0, mapSize, mapSize); + dKy_setLight(); + GXSetColorUpdate(GX_TRUE); + GXSetAlphaUpdate(GX_TRUE); + GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); + { + replay_scope replay; + draw_opaque_scene_lists(); + } + j3dSys.reinitGX(); + J3DShape::resetVcdVatCache(); + restore_game_camera(); + + GfxResolveDesc resolveDesc = GFX_RESOLVE_DESC_INIT; + resolveDesc.color = true; + resolveDesc.depth = true; + GfxResolvedTargets resolved = GFX_RESOLVED_TARGETS_INIT; + if (svc_gfx->resolve_pass(mod_ctx, &resolveDesc, &resolved) != MOD_OK || + resolved.color == nullptr || resolved.depth == nullptr) + { + return; + } + + j3dSys.reinitGX(); + J3DShape::resetVcdVatCache(); + restore_game_camera(); + + g_mapPass.lightColor = resolved.color; + g_mapPass.shadowMap = resolved.depth; + g_mapPass.mapSize = mapSize; + copy_projection(lightCamera.vp, g_mapPass.lightVp); + std::memcpy( + g_mapPass.dirToLightWorld, lightCamera.dirToLight, sizeof(g_mapPass.dirToLightWorld)); + g_mapPass.fade = lightCamera.fade; + g_mapPass.ready = true; +} + +// Game thread, after the full 3D scene: deferred composite. +void on_frame_before_hud(ModContext*, const GfxStageContext*, void*) { + const int64_t debugMode = get_debug_mode(); + restore_actual_light_debug(); + + const MapPassOutput mapPass = std::exchange(g_mapPass, {}); + if (debugMode == 9) { + return; + } + if (!mapPass.ready || mapPass.shadowMap == nullptr || mapPass.lightColor == nullptr) { + return; + } + if (!g_sceneCamera.valid) { + return; + } + const CameraInfo& camera = g_sceneCamera.info; + + GfxResolveDesc resolveDesc = GFX_RESOLVE_DESC_INIT; + resolveDesc.color = false; + resolveDesc.depth = true; + GfxResolvedTargets resolved = GFX_RESOLVED_TARGETS_INIT; + if (svc_gfx->resolve_pass(mod_ctx, &resolveDesc, &resolved) != MOD_OK || + resolved.depth == nullptr) + { + return; + } + + ShadowUniforms uniforms{}; + std::memcpy(uniforms.world_from_proj, camera.world_from_proj, sizeof(uniforms.world_from_proj)); + std::memcpy(uniforms.view_from_proj, camera.view_from_proj, sizeof(uniforms.view_from_proj)); + std::memcpy(uniforms.proj_from_view, camera.proj_from_view, sizeof(uniforms.proj_from_view)); + store_column_major(mapPass.lightVp, uniforms.light_vp); + // Rotate the world-space light direction into view space (w = 0). + for (int r = 0; r < 3; ++r) { + uniforms.light_dir_view[r] = + camera.view_from_world[0 * 4 + r] * mapPass.dirToLightWorld[0] + + camera.view_from_world[1 * 4 + r] * mapPass.dirToLightWorld[1] + + camera.view_from_world[2 * 4 + r] * mapPass.dirToLightWorld[2]; + } + // Bias is configured in world units along the light direction. + uniforms.bias = + static_cast(std::clamp(get_int_option(g_cvarBias, 15), 0, 200)) / + (kLightFar - kLightNear); + uniforms.size[0] = static_cast(mapPass.mapSize); + uniforms.size[1] = static_cast(mapPass.mapSize); + uniforms.inv_size[0] = 1.0f / uniforms.size[0]; + uniforms.inv_size[1] = 1.0f / uniforms.size[1]; + uniforms.strength = + mapPass.fade * + static_cast(std::clamp(get_int_option(g_cvarStrength, 45), 0, 100)) / + 100.0f; + uniforms.pcf_taps = static_cast(std::clamp(get_int_option(g_cvarPcf, 1), 0, 2)); + uniforms.contact_enabled = get_bool_option(g_cvarContactShadows, false) ? 1.0f : 0.0f; + uniforms.contact_thickness = 25.0f; + uniforms.contact_length = 60.0f; + uniforms.debug_mode = static_cast(debugMode); + + GfxRange uniformRange{0, 0}; + if (svc_gfx->push_uniform(mod_ctx, &uniforms, sizeof(uniforms), &uniformRange) != MOD_OK) { + return; + } + const DrawPayload payload{resolved.depth, mapPass.shadowMap, mapPass.lightColor, + uniformRange.offset, uniformRange.size, static_cast(debugMode)}; + svc_gfx->push_draw(mod_ctx, g_drawType, &payload, sizeof(payload)); +} + +void add_control(UiElementHandle pane, const UiControlDesc& desc) { + svc_ui->pane_add_control(mod_ctx, pane, &desc, nullptr); +} + +void add_toggle(UiElementHandle pane, const char* label, ConfigVarHandle cvar, const char* help) { + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_TOGGLE; + control.label = label; + control.help_rml = help; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = cvar; + add_control(pane, control); +} + +void add_select(UiElementHandle pane, const char* label, ConfigVarHandle cvar, const char** options, + uint32_t optionCount, const char* help) { + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_SELECT; + control.label = label; + control.help_rml = help; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = cvar; + control.options = options; + control.option_count = optionCount; + add_control(pane, control); +} + +void add_number(UiElementHandle pane, const char* label, ConfigVarHandle cvar, int64_t min, + int64_t max, int64_t step, const char* suffix, const char* help) { + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_NUMBER; + control.label = label; + control.help_rml = help; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = cvar; + control.min = min; + control.max = max; + control.step = step; + control.suffix = suffix; + add_control(pane, control); +} + +ModResult build_controls_tab( + ModContext*, UiWindowHandle, UiElementHandle left, UiElementHandle right, void*, ModError*) { + (void)right; + + svc_ui->pane_add_section(mod_ctx, left, "Shadow Map"); + add_toggle(left, "Enabled", g_cvarEnabled, "Enables dynamic shadows."); + static const char* kMapSizes[] = {"1024", "2048", "4096"}; + add_select(left, "Map Size", g_cvarMapSize, kMapSizes, 3, + "Shadow map resolution. Larger is sharper and slower."); + add_toggle(left, "No Frustum Clipping", g_cvarNoFrustumClipping, + "Keeps camera-frustum-culled objects in draw lists so off-screen objects can cast " + "dynamic shadows. This can be expensive."); + add_number(left, "Coverage", g_cvarBoxRadius, 1000, 20000, 500, nullptr, + "Radius of the shadowed area around the camera, in world units. Smaller is sharper."); + + svc_ui->pane_add_section(mod_ctx, left, "Appearance"); + add_number(left, "Strength", g_cvarStrength, 0, 100, 5, "%", "How dark shadowed areas become."); + static const char* kPcfOptions[] = {"Off", "3x3", "5x5"}; + add_select(left, "Soft Shadows", g_cvarPcf, kPcfOptions, 3, + "Percentage-closer filtering tap pattern; softens shadow edges."); + add_number(left, "Bias", g_cvarBias, 0, 200, 5, nullptr, + "Depth bias in world units. Raise to remove shadow acne; lower to reduce peter-panning."); + add_toggle(left, "Contact Shadows", g_cvarContactShadows, + "Adds a screen-space raymarch for small-scale contact darkening the map misses."); + + svc_ui->pane_add_section(mod_ctx, left, "Debug"); + static const char* kDebugOptions[] = {"Off", "Shadow Map", "Shadow Factor", "Occlusion", + "Light UV", "Compare Sign", "Depth Values", "Receiver Range", "Bounds", "Light View", + "Camera Replay"}; + add_select(left, "Debug View", g_cvarDebugView, kDebugOptions, 11, + "Shadow Map: light-space depth buffer
Shadow Factor: final " + "darkening term
Occlusion: map comparison result
Light UV: receiver " + "projection coverage
Compare Sign: current comparison in red and opposite " + "comparison in blue
Depth Values: receiver depth in red and map depth in green
" + "Receiver Range: beyond-far in red, valid depth in green, and before-near in blue
" + "Bounds: valid X in red, valid Y in green, and valid depth in blue
Light View: " + "renders the game world directly from the light camera
Camera Replay: " + "captures the same draw-list replay from the gameplay camera"); + return MOD_OK; +} + +void on_controls_window_closed(ModContext*, UiWindowHandle, void*) { + g_controlsWindow = 0; +} + +void on_open_controls(ModContext*, void*) { + if (g_controlsWindow != 0) { + return; + } + UiTabDesc tabs[1] = {UI_TAB_DESC_INIT}; + tabs[0].title = "Controls"; + tabs[0].build = build_controls_tab; + UiWindowDesc desc = UI_WINDOW_DESC_INIT; + desc.tabs = tabs; + desc.tab_count = 1; + desc.on_closed = on_controls_window_closed; + if (svc_ui->window_push(mod_ctx, &desc, &g_controlsWindow) != MOD_OK) { + svc_log->error(mod_ctx, "failed to open shadow controls window"); + } +} + +ModResult build_panel(ModContext*, UiElementHandle panel, void*, ModError*) { + UiControlDesc control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_TOGGLE; + control.label = "Enabled"; + control.binding = UI_BINDING_CONFIG_VAR; + control.config_var = g_cvarEnabled; + add_control(panel, control); + + control = UI_CONTROL_DESC_INIT; + control.kind = UI_CONTROL_BUTTON; + control.label = "Open Controls"; + control.on_pressed = on_open_controls; + add_control(panel, control); + return MOD_OK; +} + +ModResult register_bool_option( + const char* name, bool defaultValue, ConfigVarHandle& outHandle, ModError* error) { + ConfigVarDesc cvarDesc = CONFIG_VAR_DESC_INIT; + cvarDesc.name = name; + cvarDesc.type = CONFIG_VAR_BOOL; + cvarDesc.default_bool = defaultValue; + if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register shadow option"); + } + return MOD_OK; +} + +ModResult register_int_option( + const char* name, int64_t defaultValue, ConfigVarHandle& outHandle, ModError* error) { + ConfigVarDesc cvarDesc = CONFIG_VAR_DESC_INIT; + cvarDesc.name = name; + cvarDesc.type = CONFIG_VAR_INT; + cvarDesc.default_int = defaultValue; + if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register shadow option"); + } + return MOD_OK; +} + +} // namespace + +extern "C" { + +MOD_EXPORT ModResult mod_initialize(ModError* error) { + ModResult result = svc_resource->load(mod_ctx, "shadow.wgsl", &g_shaderSource); + if (result != MOD_OK || g_shaderSource.data == nullptr) { + return dusk::mods::set_error(error, result, "failed to load shadow.wgsl"); + } + + result = register_bool_option("effectEnabled", false, g_cvarEnabled, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("mapSize", 2, g_cvarMapSize, error); + if (result != MOD_OK) { + return result; + } + result = register_bool_option("noFrustumClipping", true, g_cvarNoFrustumClipping, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("strength", 45, g_cvarStrength, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("pcf", 2, g_cvarPcf, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("bias", 55, g_cvarBias, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("boxRadius", 6000, g_cvarBoxRadius, error); + if (result != MOD_OK) { + return result; + } + result = register_bool_option("contactShadows", true, g_cvarContactShadows, error); + if (result != MOD_OK) { + return result; + } + result = register_int_option("debugView", 0, g_cvarDebugView, error); + if (result != MOD_OK) { + return result; + } + + if (svc_gfx->get_device_info(mod_ctx, &g_deviceInfo) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to query device info"); + } + if (!build_composite_pipeline(true, g_compositePipeline, g_compositeLayout) || + !build_composite_pipeline(false, g_compositeDebugPipeline, g_compositeDebugLayout)) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to create composite pipeline"); + } + + GfxDrawTypeDesc drawDesc = GFX_DRAW_TYPE_DESC_INIT; + drawDesc.label = "shadow composite"; + drawDesc.draw = on_draw; + if (svc_gfx->register_draw_type(mod_ctx, &drawDesc, &g_drawType) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register draw type"); + } + GfxStageHookDesc stageDesc = GFX_STAGE_HOOK_DESC_INIT; + stageDesc.callback = on_scene_begin; + if (svc_gfx->register_stage_hook( + mod_ctx, GFX_STAGE_SCENE_BEGIN, &stageDesc, &g_sceneBeginHook) != MOD_OK) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + } + stageDesc.callback = on_scene_after_terrain; + if (svc_gfx->register_stage_hook( + mod_ctx, GFX_STAGE_SCENE_AFTER_TERRAIN, &stageDesc, &g_sceneAfterTerrainHook) != MOD_OK) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + } + stageDesc.callback = on_frame_before_hud; + if (svc_gfx->register_stage_hook( + mod_ctx, GFX_STAGE_FRAME_BEFORE_HUD, &stageDesc, &g_frameBeforeHudHook) != MOD_OK) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + } + + // Skip the game's own shadow rendering while the dynamic pass is active: the + // shadowControl pair covers the actor real/blob shadows, drawCloudShadow the weather + // cloud shadows. + if (dusk::mods::hook_add_pre<&dDlst_shadowControl_c::imageDraw>(svc_hook, on_game_shadow_pre) != + MOD_OK || + dusk::mods::hook_add_pre<&dDlst_shadowControl_c::draw>(svc_hook, on_game_shadow_pre) != + MOD_OK || + dusk::mods::hook_add_pre<&drawCloudShadow>(svc_hook, on_game_shadow_pre) != MOD_OK) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to hook game shadow rendering"); + } + if (dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK || + dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK) + { + return dusk::mods::set_error(error, MOD_ERROR, "failed to hook frustum clipping"); + } + if (dusk::mods::hook_add_pre(svc_hook, on_copy_tex_pre) != MOD_OK) { + return dusk::mods::set_error(error, MOD_ERROR, "failed to hook GXCopyTex"); + } + UiModsPanelDesc panelDesc = UI_MODS_PANEL_DESC_INIT; + panelDesc.build = build_panel; + svc_ui->register_mods_panel(mod_ctx, &panelDesc); + + return MOD_OK; +} + +MOD_EXPORT ModResult mod_update(ModError*) { + return MOD_OK; +} + +MOD_EXPORT ModResult mod_shutdown(ModError*) { + restore_actual_light_debug(); + svc_resource->free(mod_ctx, &g_shaderSource); + if (g_compositePipeline != nullptr) { + wgpuRenderPipelineRelease(g_compositePipeline); + g_compositePipeline = nullptr; + } + if (g_compositeDebugPipeline != nullptr) { + wgpuRenderPipelineRelease(g_compositeDebugPipeline); + g_compositeDebugPipeline = nullptr; + } + if (g_compositeLayout != nullptr) { + wgpuBindGroupLayoutRelease(g_compositeLayout); + g_compositeLayout = nullptr; + } + if (g_compositeDebugLayout != nullptr) { + wgpuBindGroupLayoutRelease(g_compositeDebugLayout); + g_compositeDebugLayout = nullptr; + } + g_cvarEnabled = g_cvarMapSize = g_cvarNoFrustumClipping = 0; + g_cvarStrength = 0; + g_cvarPcf = g_cvarBias = g_cvarBoxRadius = g_cvarContactShadows = g_cvarDebugView = 0; + g_drawType = g_sceneBeginHook = g_sceneAfterTerrainHook = g_frameBeforeHudHook = 0; + g_controlsWindow = 0; + g_mapPass = {}; + g_sceneCamera.valid = false; + g_sceneCamera.raw_valid = false; + return MOD_OK; +} +} From 50565b37fc3240ca152cab4c77b64f0b8d37b817 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 01:45:05 -0600 Subject: [PATCH 015/223] Fix mod demo CI linkage and signing --- cmake/ModSDK.cmake | 6 ++++++ include/d/d_com_inf_game.h | 2 +- include/d/d_kankyo.h | 2 +- libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h | 3 ++- libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h | 3 ++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index c320dcb5f4..c4fc1f560d 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -64,6 +64,9 @@ function(add_mod target_name) WINDOWS_EXPORT_ALL_SYMBOLS OFF) target_compile_features(${target_name} PRIVATE cxx_std_20) target_link_libraries(${target_name} PRIVATE dusklight_game_headers) + if (TARGET dawn::webgpu_dawn) + target_link_libraries(${target_name} PRIVATE dawn::webgpu_dawn) + endif () if (NOT TARGET dusklight) # Apply global compile options for out-of-tree mod builds @@ -255,6 +258,9 @@ function(install_bundled_mods) install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/Contents/Resources/mods/${_id}") install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/Resources/mods/${_id}/${_lib_name}\" COMMAND_ERROR_IS_FATAL ANY)") endforeach () + if (TARGET crashpad_handler) + install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/MacOS/$\" COMMAND_ERROR_IS_FATAL ANY)") + endif () install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - --entitlements \"${DUSK_ENTITLEMENTS}\" \"${_bundle_dir}\" COMMAND_ERROR_IS_FATAL ANY)") endif () return () diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index b66c1ee8e8..562b4ce33e 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1049,7 +1049,7 @@ public: STATIC_ASSERT(122384 == sizeof(dComIfG_inf_c)); -extern dComIfG_inf_c g_dComIfG_gameInfo; +DUSK_GAME_EXTERN dComIfG_inf_c g_dComIfG_gameInfo; extern GXColor g_blackColor; extern GXColor g_clearColor; extern GXColor g_whiteColor; diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h index 06c8f0eb56..fb3d0435b0 100644 --- a/include/d/d_kankyo.h +++ b/include/d/d_kankyo.h @@ -471,7 +471,7 @@ public: /* 0x130C */ u8 staffroll_next_timer; }; // Size: 0x1310 -extern dScnKy_env_light_c g_env_light; +DUSK_GAME_EXTERN dScnKy_env_light_c g_env_light; STATIC_ASSERT(sizeof(dScnKy_env_light_c) == 4880); diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h index 28cb9f7fe6..ea13c0600c 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h @@ -5,6 +5,7 @@ #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DFifo.h" #include "JSystem/JMath/JMath.h" +#include "global.h" #include #include "dusk/endian_gx.hpp" @@ -203,7 +204,7 @@ public: static void resetVcdVatCache() { sOldVcdVatCmd = NULL; } - static void* sOldVcdVatCmd; + static DUSK_GAME_DATA void* sOldVcdVatCmd; static bool sEnvelopeFlag; private: diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h index 8c4bbd06e3..ddc961f73f 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h @@ -8,6 +8,7 @@ #include "JSystem/JMath/JMath.h" #include "dusk/frame_interpolation.h" #include "dusk/endian.h" +#include "global.h" enum J3DSysDrawBuf { /* 0x0 */ J3DSysDrawBuf_Opa, @@ -208,6 +209,6 @@ struct J3DSys { }; extern u32 j3dDefaultViewNo; -extern J3DSys j3dSys; +DUSK_GAME_EXTERN J3DSys j3dSys; #endif /* J3DSYS_H */ From 2fcbebcd51fa05b753e78048f666f62aa03bedfb Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 01:52:17 -0600 Subject: [PATCH 016/223] Limit Dawn mod linkage to Windows --- cmake/ModSDK.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index c4fc1f560d..b7241e1e22 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -64,7 +64,7 @@ function(add_mod target_name) WINDOWS_EXPORT_ALL_SYMBOLS OFF) target_compile_features(${target_name} PRIVATE cxx_std_20) target_link_libraries(${target_name} PRIVATE dusklight_game_headers) - if (TARGET dawn::webgpu_dawn) + if (WIN32 AND TARGET dawn::webgpu_dawn) target_link_libraries(${target_name} PRIVATE dawn::webgpu_dawn) endif () From 157bbfb4c9354588bd8092e2e88a941e1372b63b Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 02:04:59 -0600 Subject: [PATCH 017/223] Mark full game targets as ABI exporters --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2af48dbcb0..f0f80651ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,6 +304,7 @@ source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES}) include(cmake/GameABIConfig.cmake) find_package(Threads REQUIRED) +set(GAME_COMPILE_DEFS DUSK_BUILDING_GAME=1) set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt Threads::Threads zstd::libzstd dusklight_game_headers) From 867ec7fbab9d36c8eb0c11ba633bce37a325a13a Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 09:42:25 -0600 Subject: [PATCH 018/223] Forward WebGPU exports through Dusklight --- cmake/ModSDK.cmake | 3 --- cmake/SymbolManifest.cmake | 2 +- cmake/WindowsExports.cmake | 11 +++++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index b7241e1e22..d08a2ae221 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -64,9 +64,6 @@ function(add_mod target_name) WINDOWS_EXPORT_ALL_SYMBOLS OFF) target_compile_features(${target_name} PRIVATE cxx_std_20) target_link_libraries(${target_name} PRIVATE dusklight_game_headers) - if (WIN32 AND TARGET dawn::webgpu_dawn) - target_link_libraries(${target_name} PRIVATE dawn::webgpu_dawn) - endif () if (NOT TARGET dusklight) # Apply global compile options for out-of-tree mod builds diff --git a/cmake/SymbolManifest.cmake b/cmake/SymbolManifest.cmake index ffaae9177e..927040a47f 100644 --- a/cmake/SymbolManifest.cmake +++ b/cmake/SymbolManifest.cmake @@ -2,7 +2,7 @@ include_guard(GLOBAL) get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) -set(_SYMGEN_VERSION "1.1.0") +set(_SYMGEN_VERSION "1.1.1") set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}") set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release") mark_as_advanced(SYMGEN_PATH) diff --git a/cmake/WindowsExports.cmake b/cmake/WindowsExports.cmake index 86dc9414f2..3010c82f25 100644 --- a/cmake/WindowsExports.cmake +++ b/cmake/WindowsExports.cmake @@ -37,6 +37,16 @@ function(setup_windows_exports target) endif () endforeach () + set(_forward_args) + if (TARGET dawn::webgpu_dawn) + get_target_property(_dawn_type dawn::webgpu_dawn TYPE) + if (_dawn_type STREQUAL "SHARED_LIBRARY") + list(APPEND _forward_args + --forward-dll "$" + --forward-sym-prefix wgpu) + endif () + endif () + # Generate curated exports list from the main binary set(_def "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.def") add_custom_command(TARGET ${target} PRE_LINK @@ -50,6 +60,7 @@ function(setup_windows_exports target) --exclude asan_options --max-exports 58000 ${_sdk_args} + ${_forward_args} COMMENT "Generating dusklight exports" VERBATIM) target_link_options(${target} PRIVATE "/DEF:${_def}") From 7113584632878a358d0bfae308776bf17f67a1b3 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Jul 2026 17:42:24 -0600 Subject: [PATCH 019/223] SlotMap abstraction & log fix --- src/dusk/mods/svc/config.cpp | 158 ++++++++++++--------------- src/dusk/mods/svc/gfx.cpp | 188 ++++++++++++--------------------- src/dusk/mods/svc/host.cpp | 49 +++++---- src/dusk/mods/svc/overlay.cpp | 79 +++++++------- src/dusk/mods/svc/slot_map.hpp | 188 +++++++++++++++++++++++++++++++++ src/dusk/mods/svc/ui.cpp | 144 +++++++------------------ src/dusk/ui/logs_window.cpp | 20 ++-- 7 files changed, 445 insertions(+), 381 deletions(-) create mode 100644 src/dusk/mods/svc/slot_map.hpp diff --git a/src/dusk/mods/svc/config.cpp b/src/dusk/mods/svc/config.cpp index d919c0ab1f..bf943d61b8 100644 --- a/src/dusk/mods/svc/config.cpp +++ b/src/dusk/mods/svc/config.cpp @@ -1,6 +1,7 @@ #include "config.hpp" #include "registry.hpp" +#include "slot_map.hpp" #include "aurora/lib/logging.hpp" #include "dusk/config.hpp" @@ -15,7 +16,6 @@ #include #include #include -#include #include namespace dusk::mods::svc { @@ -23,25 +23,22 @@ namespace { aurora::Module Log("dusk::mods::config"); -struct ModConfigVarEntry { - uint64_t handle = 0; - ConfigVarType type = CONFIG_VAR_BOOL; - std::unique_ptr var; +enum class ConfigSlotKind : uint8_t { + Var, + Subscription, }; -struct ModConfigSubscription { - uint64_t handle = 0; +struct ConfigSlot { + ConfigSlotKind kind = ConfigSlotKind::Var; + // Var payload + ConfigVarType type = CONFIG_VAR_BOOL; + std::unique_ptr var; + // Subscription payload uint64_t varHandle = 0; config::Subscription coreSubscription = 0; }; -struct ModConfigRecord { - std::vector vars; - std::vector subscriptions; -}; - -std::unordered_map s_modConfig; -uint64_t s_nextHandle = 1; +SlotMap s_slots; bool s_dirty = false; std::chrono::steady_clock::time_point s_lastSave{}; constexpr std::chrono::seconds kSaveDebounce{2}; @@ -130,17 +127,13 @@ bool valid_var_fragment(const char* name) { } config::ConfigVarBase* find_var(LoadedMod& mod, const uint64_t handle, uint32_t expectedType) { - const auto recordIt = s_modConfig.find(&mod); - if (recordIt == s_modConfig.end()) { + const auto* entry = s_slots.find_owned(handle, mod); + if (entry == nullptr || entry->value.kind != ConfigSlotKind::Var || + entry->value.type != expectedType) + { return nullptr; } - const auto& vars = recordIt->second.vars; - const auto entry = - std::ranges::find_if(vars, [&](const auto& e) { return e.handle == handle; }); - if (entry == vars.end() || entry->type != expectedType) { - return nullptr; - } - return entry->var.get(); + return entry->value.var.get(); } template @@ -154,17 +147,17 @@ ConfigVar* find_typed_var(ModContext* context, ConfigVarHandle handle, uint32 } void config_remove_mod(LoadedMod& mod) { - const auto it = s_modConfig.find(&mod); - if (it == s_modConfig.end()) { - return; + const auto entries = s_slots.take_all(mod); + for (const auto& entry : entries) { + if (entry.value.kind == ConfigSlotKind::Subscription) { + config::unsubscribe(entry.value.coreSubscription); + } } - for (const auto& sub : it->second.subscriptions) { - config::unsubscribe(sub.coreSubscription); + for (const auto& entry : entries) { + if (entry.value.kind == ConfigSlotKind::Var) { + config::unregister(*entry.value.var); + } } - for (const auto& entry : it->second.vars) { - config::unregister(*entry.var); - } - s_modConfig.erase(it); } ModResult config_register_var( @@ -190,16 +183,16 @@ ModResult config_register_var( std::unique_ptr var; switch (desc->type) { case CONFIG_VAR_BOOL: - var = std::make_unique >(fullName, desc->default_bool); + var = std::make_unique>(fullName, desc->default_bool); break; case CONFIG_VAR_INT: - var = std::make_unique >(fullName, desc->default_int); + var = std::make_unique>(fullName, desc->default_int); break; case CONFIG_VAR_FLOAT: - var = std::make_unique >(fullName, desc->default_float); + var = std::make_unique>(fullName, desc->default_float); break; case CONFIG_VAR_STRING: - var = std::make_unique >( + var = std::make_unique>( fullName, desc->default_string != nullptr ? desc->default_string : ""); break; default: @@ -211,13 +204,10 @@ ModResult config_register_var( // reads the value right after registration anyway. config::Register(*var); - auto& record = s_modConfig[mod]; - auto& entry = record.vars.emplace_back(); - entry.handle = s_nextHandle++; - entry.type = desc->type; - entry.var = std::move(var); + const auto handle = s_slots.emplace( + *mod, ConfigSlot{.kind = ConfigSlotKind::Var, .type = desc->type, .var = std::move(var)}); if (outHandle != nullptr) { - *outHandle = entry.handle; + *outHandle = handle; } return MOD_OK; } @@ -227,29 +217,26 @@ ModResult config_unregister_var(ModContext* context, ConfigVarHandle var) { if (mod == nullptr || var == 0) { return MOD_INVALID_ARGUMENT; } - const auto recordIt = s_modConfig.find(mod); - if (recordIt != s_modConfig.end()) { - auto& record = recordIt->second; - const auto entry = - std::ranges::find_if(record.vars, [&](const auto& e) { return e.handle == var; }); - if (entry != record.vars.end()) { - std::erase_if(record.subscriptions, [&](const ModConfigSubscription& sub) { - if (sub.varHandle != var) { - return false; - } - config::unsubscribe(sub.coreSubscription); - return true; - }); - - // The persisted value is stashed and restored by a future registration of the - // same name. - config::unregister(*entry->var); - record.vars.erase(entry); - return MOD_OK; - } + const auto* entry = s_slots.find_owned(var, *mod); + if (entry == nullptr || entry->value.kind != ConfigSlotKind::Var) { + Log.error("[{}] config unregister failed: unknown handle {}", mod->metadata.id, var); + return MOD_INVALID_ARGUMENT; } - Log.error("[{}] config unregister failed: unknown handle {}", mod->metadata.id, var); - return MOD_INVALID_ARGUMENT; + + // Only the owning mod can (currently) subscribe to a var + std::vector bound; + s_slots.for_each([&](const uint64_t handle, const auto& e) { + if (e.value.kind == ConfigSlotKind::Subscription && e.value.varHandle == var) { + bound.push_back(handle); + } + }); + for (const auto handle : bound) { + config::unsubscribe(s_slots.take(handle)->value.coreSubscription); + } + + // The persisted value is stashed and restored by a future registration of the same name. + config::unregister(*s_slots.take(var)->value.var); + return MOD_OK; } ModResult config_get_bool(ModContext* context, ConfigVarHandle var, bool* outValue) { @@ -361,22 +348,13 @@ ModResult config_subscribe(ModContext* context, ConfigVarHandle var, ConfigChang if (mod == nullptr || var == 0 || callback == nullptr) { return MOD_INVALID_ARGUMENT; } - const auto recordIt = s_modConfig.find(mod); - if (recordIt == s_modConfig.end()) { - return MOD_INVALID_ARGUMENT; - } - auto& record = recordIt->second; - const auto entry = - std::ranges::find_if(record.vars, [&](const auto& e) { return e.handle == var; }); - if (entry == record.vars.end()) { + const auto* entry = s_slots.find_owned(var, *mod); + if (entry == nullptr || entry->value.kind != ConfigSlotKind::Var) { return MOD_INVALID_ARGUMENT; } - auto& sub = record.subscriptions.emplace_back(); - sub.handle = s_nextHandle++; - sub.varHandle = var; - sub.coreSubscription = config::subscribe(entry->var->getName(), - [modPtr = mod, callback, userData, varHandle = var, type = entry->type]( + const auto coreSubscription = config::subscribe(entry->value.var->getName(), + [modPtr = mod, callback, userData, varHandle = var, type = entry->value.type]( config::ConfigVarBase& varBase, const void* previous) { const ConfigVarValue previousValue = translate_previous(type, previous); std::string stringStorage; @@ -390,8 +368,13 @@ ModResult config_subscribe(ModContext* context, ConfigVarHandle var, ConfigChang fail_mod(*modPtr, MOD_ERROR, "Unknown exception in config change callback"); } }); + const auto handle = s_slots.emplace(*mod, ConfigSlot{ + .kind = ConfigSlotKind::Subscription, + .varHandle = var, + .coreSubscription = coreSubscription, + }); if (outHandle != nullptr) { - *outHandle = sub.handle; + *outHandle = handle; } return MOD_OK; } @@ -401,19 +384,14 @@ ModResult config_unsubscribe(ModContext* context, ConfigSubscriptionHandle handl if (mod == nullptr || handle == 0) { return MOD_INVALID_ARGUMENT; } - const auto recordIt = s_modConfig.find(mod); - if (recordIt != s_modConfig.end()) { - auto& subscriptions = recordIt->second.subscriptions; - const auto sub = - std::ranges::find_if(subscriptions, [&](const auto& s) { return s.handle == handle; }); - if (sub != subscriptions.end()) { - config::unsubscribe(sub->coreSubscription); - subscriptions.erase(sub); - return MOD_OK; - } + const auto* entry = s_slots.find_owned(handle, *mod); + if (entry == nullptr || entry->value.kind != ConfigSlotKind::Subscription) { + Log.error("[{}] config unsubscribe failed: unknown handle {}", mod->metadata.id, handle); + return MOD_INVALID_ARGUMENT; } - Log.error("[{}] config unsubscribe failed: unknown handle {}", mod->metadata.id, handle); - return MOD_INVALID_ARGUMENT; + config::unsubscribe(entry->value.coreSubscription); + s_slots.erase(handle); + return MOD_OK; } constexpr ConfigService s_configService{ diff --git a/src/dusk/mods/svc/gfx.cpp b/src/dusk/mods/svc/gfx.cpp index 7fa472454d..e14b587f5e 100644 --- a/src/dusk/mods/svc/gfx.cpp +++ b/src/dusk/mods/svc/gfx.cpp @@ -1,4 +1,5 @@ #include "registry.hpp" +#include "slot_map.hpp" #include "aurora/lib/logging.hpp" #include "dusk/gfx.hpp" @@ -35,9 +36,6 @@ enum class GfxStreamBuffer : uint8_t { struct GfxSlot { GfxSlotKind kind = GfxSlotKind::DrawType; - uint32_t generation = 1; - bool alive = false; - LoadedMod* owner = nullptr; ModContext* ownerContext = nullptr; std::string ownerId; void* userData = nullptr; @@ -60,71 +58,37 @@ struct WorkerFailure { }; std::mutex s_mutex; -std::vector s_slots; -std::vector s_freeSlots; +using GfxSlotMap = svc::SlotMap; +GfxSlotMap s_slots; std::vector s_workerFailures; bool s_modOffscreenOpen = false; -constexpr uint64_t make_handle(uint32_t index, uint32_t generation) { - return static_cast(generation) << 32 | index; +GfxSlotMap::Entry* resolve_entry_locked(uint64_t handle, GfxSlotKind kind) { + auto* entry = s_slots.find(handle); + if (entry == nullptr || entry->value.kind != kind) { + return nullptr; + } + return entry; } GfxSlot* resolve_slot_locked(uint64_t handle, GfxSlotKind kind) { - const auto index = static_cast(handle & 0xFFFFFFFFu); - const auto generation = static_cast(handle >> 32); - if (handle == 0 || index >= s_slots.size()) { - return nullptr; - } - auto& slot = s_slots[index]; - if (!slot.alive || slot.generation != generation || slot.kind != kind) { - return nullptr; - } - return &slot; + auto* entry = resolve_entry_locked(handle, kind); + return entry != nullptr ? &entry->value : nullptr; } GfxSlot* resolve_owned_slot_locked(LoadedMod& mod, uint64_t handle, GfxSlotKind kind) { - auto* slot = resolve_slot_locked(handle, kind); - if (slot == nullptr || slot->owner != &mod) { + auto* entry = s_slots.find_owned(handle, mod); + if (entry == nullptr || entry->value.kind != kind) { return nullptr; } - return slot; + return &entry->value; } -uint32_t alloc_slot_locked() { - if (!s_freeSlots.empty()) { - const auto index = s_freeSlots.back(); - s_freeSlots.pop_back(); - return index; - } - const auto index = static_cast(s_slots.size()); - s_slots.emplace_back(); - return index; -} - -void free_slot_locked(uint32_t index) { - auto& slot = s_slots[index]; - slot.alive = false; - ++slot.generation; - slot.owner = nullptr; - slot.ownerContext = nullptr; - slot.ownerId.clear(); - slot.userData = nullptr; - slot.drawFn = nullptr; - slot.auroraDrawId = aurora::gfx::InvalidDrawType; - slot.stageFn = nullptr; - slot.stage = GFX_STAGE_SCENE_AFTER_TERRAIN; - slot.computeFn = nullptr; - slot.auroraTaskId = aurora::gfx::InvalidEncoderTask; - s_freeSlots.push_back(index); -} - -void collect_mod_slots_locked(LoadedMod* owner, std::vector& drawIds, +void collect_mod_slots_locked(LoadedMod& owner, std::vector& drawIds, std::vector& taskIds) { - for (uint32_t i = 0; i < s_slots.size(); ++i) { - auto& slot = s_slots[i]; - if (!slot.alive || slot.owner != owner) { - continue; - } + auto entries = s_slots.take_all(owner); + for (auto& entry : entries) { + const auto& slot = entry.value; if (slot.kind == GfxSlotKind::DrawType && slot.auroraDrawId != aurora::gfx::InvalidDrawType) { drawIds.push_back(slot.auroraDrawId); @@ -133,7 +97,6 @@ void collect_mod_slots_locked(LoadedMod* owner, std::vectordrawFn; - userData = slot->userData; - modContext = slot->ownerContext; - owner = slot->owner; - ownerId = slot->ownerId; + const auto& slot = entry->value; + fn = slot.drawFn; + userData = slot.userData; + modContext = slot.ownerContext; + owner = entry->owner; + ownerId = slot.ownerId; } GfxDrawContext drawContext{ @@ -200,7 +164,7 @@ void draw_trampoline(const aurora::gfx::DrawContext& ctx, const wgpu::RenderPass .modId = std::move(ownerId), .message = std::move(failure), }; - collect_mod_slots_locked(owner, record.drawIds, record.taskIds); + collect_mod_slots_locked(*owner, record.drawIds, record.taskIds); s_workerFailures.push_back(std::move(record)); } @@ -214,15 +178,16 @@ void compute_trampoline(const aurora::gfx::EncoderTaskContext& ctx, const wgpu:: std::string ownerId; { std::lock_guard lock{s_mutex}; - auto* slot = resolve_slot_locked(handle, GfxSlotKind::ComputeType); - if (slot == nullptr) { + auto* entry = resolve_entry_locked(handle, GfxSlotKind::ComputeType); + if (entry == nullptr) { return; } - fn = slot->computeFn; - userData = slot->userData; - modContext = slot->ownerContext; - owner = slot->owner; - ownerId = slot->ownerId; + const auto& slot = entry->value; + fn = slot.computeFn; + userData = slot.userData; + modContext = slot.ownerContext; + owner = entry->owner; + ownerId = slot.ownerId; } GfxComputeContext computeContext{ @@ -251,7 +216,7 @@ void compute_trampoline(const aurora::gfx::EncoderTaskContext& ctx, const wgpu:: .modId = std::move(ownerId), .message = std::move(failure), }; - collect_mod_slots_locked(owner, record.drawIds, record.taskIds); + collect_mod_slots_locked(*owner, record.drawIds, record.taskIds); s_workerFailures.push_back(std::move(record)); } @@ -264,16 +229,13 @@ ModResult gfx_register_draw_type( uint64_t handle = 0; { std::lock_guard lock{s_mutex}; - const auto index = alloc_slot_locked(); - auto& slot = s_slots[index]; - slot.kind = GfxSlotKind::DrawType; - slot.alive = true; - slot.owner = &mod; - slot.ownerContext = mod.context.get(); - slot.ownerId = mod.metadata.id; - slot.userData = userData; - slot.drawFn = draw; - handle = make_handle(index, slot.generation); + handle = s_slots.emplace(mod, GfxSlot{ + .kind = GfxSlotKind::DrawType, + .ownerContext = mod.context.get(), + .ownerId = mod.metadata.id, + .userData = userData, + .drawFn = draw, + }); } const auto auroraId = aurora::gfx::register_draw_type(aurora::gfx::DrawTypeDescriptor{ @@ -283,9 +245,7 @@ ModResult gfx_register_draw_type( }); if (auroraId == aurora::gfx::InvalidDrawType) { std::lock_guard lock{s_mutex}; - if (resolve_owned_slot_locked(mod, handle, GfxSlotKind::DrawType) != nullptr) { - free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); - } + s_slots.erase_owned(handle, mod); return MOD_ERROR; } @@ -308,7 +268,7 @@ ModResult gfx_unregister_draw_type(LoadedMod& mod, uint64_t handle) { return MOD_INVALID_ARGUMENT; } auroraId = slot->auroraDrawId; - free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + s_slots.erase_owned(handle, mod); } aurora::gfx::unregister_draw_type(auroraId); return MOD_OK; @@ -359,17 +319,14 @@ ModResult gfx_register_stage_hook( LoadedMod& mod, GfxStage stage, GfxStageFn callback, void* userData, uint64_t& outHandle) { outHandle = 0; std::lock_guard lock{s_mutex}; - const auto index = alloc_slot_locked(); - auto& slot = s_slots[index]; - slot.kind = GfxSlotKind::StageHook; - slot.alive = true; - slot.owner = &mod; - slot.ownerContext = mod.context.get(); - slot.ownerId = mod.metadata.id; - slot.userData = userData; - slot.stageFn = callback; - slot.stage = stage; - outHandle = make_handle(index, slot.generation); + outHandle = s_slots.emplace(mod, GfxSlot{ + .kind = GfxSlotKind::StageHook, + .ownerContext = mod.context.get(), + .ownerId = mod.metadata.id, + .userData = userData, + .stageFn = callback, + .stage = stage, + }); return MOD_OK; } @@ -379,7 +336,7 @@ ModResult gfx_unregister_stage_hook(LoadedMod& mod, uint64_t handle) { if (slot == nullptr) { return MOD_INVALID_ARGUMENT; } - free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + s_slots.erase_owned(handle, mod); return MOD_OK; } @@ -429,16 +386,13 @@ ModResult gfx_register_compute_type( uint64_t handle = 0; { std::lock_guard lock{s_mutex}; - const auto index = alloc_slot_locked(); - auto& slot = s_slots[index]; - slot.kind = GfxSlotKind::ComputeType; - slot.alive = true; - slot.owner = &mod; - slot.ownerContext = mod.context.get(); - slot.ownerId = mod.metadata.id; - slot.userData = userData; - slot.computeFn = callback; - handle = make_handle(index, slot.generation); + handle = s_slots.emplace(mod, GfxSlot{ + .kind = GfxSlotKind::ComputeType, + .ownerContext = mod.context.get(), + .ownerId = mod.metadata.id, + .userData = userData, + .computeFn = callback, + }); } const auto auroraId = @@ -449,9 +403,7 @@ ModResult gfx_register_compute_type( }); if (auroraId == aurora::gfx::InvalidEncoderTask) { std::lock_guard lock{s_mutex}; - if (resolve_owned_slot_locked(mod, handle, GfxSlotKind::ComputeType) != nullptr) { - free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); - } + s_slots.erase_owned(handle, mod); return MOD_ERROR; } @@ -474,7 +426,7 @@ ModResult gfx_unregister_compute_type(LoadedMod& mod, uint64_t handle) { return MOD_INVALID_ARGUMENT; } auroraId = slot->auroraTaskId; - free_slot_locked(static_cast(handle & 0xFFFFFFFFu)); + s_slots.erase_owned(handle, mod); } aurora::gfx::unregister_encoder_task_type(auroraId); return MOD_OK; @@ -510,18 +462,18 @@ void gfx_run_stage( std::vector entries; { std::lock_guard lock{s_mutex}; - for (uint32_t i = 0; i < s_slots.size(); ++i) { - const auto& slot = s_slots[i]; - if (slot.alive && slot.kind == GfxSlotKind::StageHook && slot.stage == stage) { + s_slots.for_each([&](uint64_t handle, const auto& slotEntry) { + const auto& slot = slotEntry.value; + if (slot.kind == GfxSlotKind::StageHook && slot.stage == stage) { entries.push_back(StageEntry{ - .handle = make_handle(i, slot.generation), + .handle = handle, .fn = slot.stageFn, .userData = slot.userData, .context = slot.ownerContext, - .owner = slot.owner, + .owner = slotEntry.owner, }); } - } + }); } if (entries.empty()) { return; @@ -600,7 +552,7 @@ void gfx_remove_mod(LoadedMod& mod) { std::vector taskIds; { std::lock_guard lock{s_mutex}; - collect_mod_slots_locked(&mod, drawIds, taskIds); + collect_mod_slots_locked(mod, drawIds, taskIds); } if (drawIds.empty() && taskIds.empty()) { return; diff --git a/src/dusk/mods/svc/host.cpp b/src/dusk/mods/svc/host.cpp index 5904903ee7..0199a7865a 100644 --- a/src/dusk/mods/svc/host.cpp +++ b/src/dusk/mods/svc/host.cpp @@ -1,4 +1,5 @@ #include "registry.hpp" +#include "slot_map.hpp" #include "dusk/mods/loader/loader.hpp" #include "dusk/mods/manifest.hpp" @@ -63,14 +64,13 @@ const char* host_mod_dir(ModContext* context) { } struct LifecycleWatcher { - uint64_t handle = 0; - LoadedMod* owner = nullptr; ModLifecycleFn fn = nullptr; void* userData = nullptr; + uint64_t order = 0; }; -std::vector s_watchers; -uint64_t s_nextWatchHandle = 1; +SlotMap s_watchers; +uint64_t s_nextWatchOrder = 0; ModResult host_watch_mod_lifecycle( ModContext* context, ModLifecycleFn fn, void* userData, uint64_t* outHandle) { @@ -78,8 +78,8 @@ ModResult host_watch_mod_lifecycle( if (mod == nullptr || fn == nullptr || outHandle == nullptr) { return MOD_INVALID_ARGUMENT; } - const auto handle = s_nextWatchHandle++; - s_watchers.push_back({handle, mod, fn, userData}); + const auto handle = s_watchers.emplace( + *mod, LifecycleWatcher{.fn = fn, .userData = userData, .order = s_nextWatchOrder++}); *outHandle = handle; return MOD_OK; } @@ -89,32 +89,41 @@ ModResult host_unwatch_mod_lifecycle(ModContext* context, const uint64_t handle) if (mod == nullptr) { return MOD_INVALID_ARGUMENT; } - const auto erased = std::erase_if(s_watchers, - [&](const LifecycleWatcher& w) { return w.handle == handle && w.owner == mod; }); - return erased != 0 ? MOD_OK : MOD_INVALID_ARGUMENT; + return s_watchers.erase_owned(handle, *mod) ? MOD_OK : MOD_INVALID_ARGUMENT; } void host_mod_detached(LoadedMod& mod) { // The subject's own watches go first: a mod is never notified about its own teardown. - std::erase_if(s_watchers, [&](const LifecycleWatcher& w) { return w.owner == &mod; }); + s_watchers.erase_all(mod); - // Iterate a snapshot: callbacks may watch/unwatch, and a failing callback erases the - // failing mod's services. - const auto snapshot = s_watchers; - for (const auto& watcher : snapshot) { - const bool alive = std::ranges::any_of( - s_watchers, [&](const LifecycleWatcher& w) { return w.handle == watcher.handle; }); - if (!alive) { + // Iterate a snapshot in registration order: callbacks may watch/unwatch, and a failing + // callback erases the failing mod's services. + struct PendingNotify { + uint64_t order; + uint64_t handle; + }; + std::vector snapshot; + s_watchers.for_each([&](const uint64_t handle, const auto& entry) { + snapshot.push_back({.order = entry.value.order, .handle = handle}); + }); + std::ranges::sort(snapshot, {}, &PendingNotify::order); + + for (const auto& pending : snapshot) { + const auto* entry = s_watchers.find(pending.handle); + if (entry == nullptr) { continue; } + // Do not retain pointers into SlotMap across a callback that may mutate it. + auto* owner = entry->owner; + const auto watcher = entry->value; try { - watcher.fn(watcher.owner->context.get(), mod.context.get(), mod.metadata.id.c_str(), + watcher.fn(owner->context.get(), mod.context.get(), mod.metadata.id.c_str(), MOD_LIFECYCLE_DETACHED, watcher.userData); } catch (const std::exception& e) { - fail_mod(*watcher.owner, MOD_ERROR, + fail_mod(*owner, MOD_ERROR, fmt::format("Exception in mod lifecycle callback: {}", e.what())); } catch (...) { - fail_mod(*watcher.owner, MOD_ERROR, "Unknown exception in mod lifecycle callback"); + fail_mod(*owner, MOD_ERROR, "Unknown exception in mod lifecycle callback"); } } } diff --git a/src/dusk/mods/svc/overlay.cpp b/src/dusk/mods/svc/overlay.cpp index 13cab1ac0f..44eef6ab17 100644 --- a/src/dusk/mods/svc/overlay.cpp +++ b/src/dusk/mods/svc/overlay.cpp @@ -1,10 +1,12 @@ #include "registry.hpp" +#include "slot_map.hpp" #include "aurora/dvd.h" #include "aurora/lib/logging.hpp" #include "dusk/mods/loader/loader.hpp" #include "mods/svc/overlay.h" +#include #include #include #include @@ -33,15 +35,15 @@ std::unordered_map s_overlayFiles; uintptr_t s_nextOverlayId = 1; std::mutex s_overlayMutex; -struct RuntimeOverlayEntry { - uint64_t handle = 0; +struct RuntimeOverlaySlot { std::string discPath; std::string bundlePath; // bundle-backed if non-empty std::shared_ptr> buffer; // buffer-backed otherwise size_t size = 0; + uint64_t order = 0; }; -std::unordered_map> s_runtimeOverlays; -uint64_t s_nextRuntimeHandle = 1; +SlotMap s_runtimeOverlays; +uint64_t s_nextRuntimeOrder = 0; bool s_overlaysDirty = false; // Aurora matches overlay paths against the disc case-insensitively and later entries win, so @@ -84,20 +86,25 @@ void find_overlay_files(std::vector& files, LoadedMod& mod, void append_runtime_overlays(std::vector& files, LoadedMod& mod, std::unordered_map& claims) { - const auto it = s_runtimeOverlays.find(&mod); - if (it == s_runtimeOverlays.end()) { - return; - } - - for (const auto& entry : it->second) { - const auto id = s_nextOverlayId++; - if (entry.buffer != nullptr) { - s_overlayFiles.emplace(id, OverlayFileData{{}, nullptr, entry.buffer}); - } else { - s_overlayFiles.emplace(id, OverlayFileData{entry.bundlePath, mod.bundle, nullptr}); + // Aurora resolves duplicate paths later-entry-wins, so emit in registration order (SlotMap + // iteration is index order, and freed indices are reused). + std::vector slots; + s_runtimeOverlays.for_each([&](uint64_t, const auto& entry) { + if (entry.owner == &mod) { + slots.push_back(&entry.value); } - claim_overlay_path(claims, entry.discPath, mod); - files.emplace_back(strdup(entry.discPath.c_str()), reinterpret_cast(id), entry.size); + }); + std::ranges::sort(slots, {}, &RuntimeOverlaySlot::order); + + for (const auto* slot : slots) { + const auto id = s_nextOverlayId++; + if (slot->buffer != nullptr) { + s_overlayFiles.emplace(id, OverlayFileData{{}, nullptr, slot->buffer}); + } else { + s_overlayFiles.emplace(id, OverlayFileData{slot->bundlePath, mod.bundle, nullptr}); + } + claim_overlay_path(claims, slot->discPath, mod); + files.emplace_back(strdup(slot->discPath.c_str()), reinterpret_cast(id), slot->size); } } @@ -201,47 +208,39 @@ void overlay_sync_files() { uint64_t overlay_add_file( LoadedMod& mod, std::string discPath, std::string bundlePath, size_t size) { - const auto handle = s_nextRuntimeHandle++; - s_runtimeOverlays[&mod].push_back({ - .handle = handle, - .discPath = std::move(discPath), - .bundlePath = std::move(bundlePath), - .size = size, - }); + const auto handle = s_runtimeOverlays.emplace(mod, RuntimeOverlaySlot{ + .discPath = std::move(discPath), + .bundlePath = std::move(bundlePath), + .size = size, + .order = s_nextRuntimeOrder++, + }); s_overlaysDirty = true; return handle; } uint64_t overlay_add_buffer(LoadedMod& mod, std::string discPath, std::vector data) { - const auto handle = s_nextRuntimeHandle++; const auto size = data.size(); - s_runtimeOverlays[&mod].push_back({ - .handle = handle, - .discPath = std::move(discPath), - .buffer = std::make_shared>(std::move(data)), - .size = size, - }); + const auto handle = s_runtimeOverlays.emplace(mod, + RuntimeOverlaySlot{ + .discPath = std::move(discPath), + .buffer = std::make_shared>(std::move(data)), + .size = size, + .order = s_nextRuntimeOrder++, + }); s_overlaysDirty = true; return handle; } bool overlay_remove(LoadedMod& mod, uint64_t handle) { - const auto it = s_runtimeOverlays.find(&mod); - if (it == s_runtimeOverlays.end()) { + if (!s_runtimeOverlays.erase_owned(handle, mod)) { return false; } - if (std::erase_if(it->second, [&](const auto& entry) { return entry.handle == handle; }) == 0) { - return false; - } - if (it->second.empty()) { - s_runtimeOverlays.erase(it); - } s_overlaysDirty = true; return true; } void overlay_remove_mod(LoadedMod& mod) { - if (s_runtimeOverlays.erase(&mod) != 0) { + if (s_runtimeOverlays.erase_all(mod) != 0) { s_overlaysDirty = true; } } diff --git a/src/dusk/mods/svc/slot_map.hpp b/src/dusk/mods/svc/slot_map.hpp new file mode 100644 index 0000000000..3e45635d79 --- /dev/null +++ b/src/dusk/mods/svc/slot_map.hpp @@ -0,0 +1,188 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace dusk::mods { + +struct LoadedMod; + +namespace svc { + +template +class SlotMap { +public: + static_assert(std::is_nothrow_move_constructible_v); + + using Handle = uint64_t; + static constexpr Handle InvalidHandle = 0; + + struct Entry { + LoadedMod* owner = nullptr; + T value; + }; + + template + Handle emplace(LoadedMod& owner, Args&&... args) { + T value{std::forward(args)...}; + const auto index = allocate_index(); + auto& slot = m_slots[index]; + slot.entry.emplace(Entry{.owner = &owner, .value = std::move(value)}); + return make_handle(index, slot.generation); + } + + // Returned pointers remain valid only until the next mutating operation. + Entry* find(Handle handle) { + auto* slot = find_slot(handle); + return slot != nullptr ? &*slot->entry : nullptr; + } + + const Entry* find(Handle handle) const { + const auto* slot = find_slot(handle); + return slot != nullptr ? &*slot->entry : nullptr; + } + + Entry* find_owned(Handle handle, const LoadedMod& owner) { + auto* entry = find(handle); + return entry != nullptr && entry->owner == &owner ? entry : nullptr; + } + + const Entry* find_owned(Handle handle, const LoadedMod& owner) const { + const auto* entry = find(handle); + return entry != nullptr && entry->owner == &owner ? entry : nullptr; + } + + std::optional take(Handle handle) { + const auto index = handle_index(handle); + auto* slot = find_slot(handle); + if (slot == nullptr) { + return std::nullopt; + } + std::optional entry{std::move(slot->entry)}; + release_slot(index); + return entry; + } + + std::optional take_owned(Handle handle, const LoadedMod& owner) { + if (find_owned(handle, owner) == nullptr) { + return std::nullopt; + } + return take(handle); + } + + std::vector take_all(const LoadedMod& owner) { + std::vector entries; + for (size_t slotIndex = 0; slotIndex < m_slots.size(); ++slotIndex) { + const auto index = static_cast(slotIndex); + auto& slot = m_slots[index]; + if (!slot.entry.has_value() || slot.entry->owner != &owner) { + continue; + } + entries.push_back(std::move(*slot.entry)); + release_slot(index); + } + return entries; + } + + bool erase(Handle handle) { + const auto index = handle_index(handle); + if (find_slot(handle) == nullptr) { + return false; + } + release_slot(index); + return true; + } + + bool erase_owned(Handle handle, const LoadedMod& owner) { + if (find_owned(handle, owner) == nullptr) { + return false; + } + return erase(handle); + } + + size_t erase_all(const LoadedMod& owner) { + return take_all(owner).size(); + } + + template + void for_each(Fn&& fn) const { + // The visitor may inspect entries but must not mutate this SlotMap. + for (size_t slotIndex = 0; slotIndex < m_slots.size(); ++slotIndex) { + const auto index = static_cast(slotIndex); + const auto& slot = m_slots[index]; + if (slot.entry.has_value()) { + fn(make_handle(index, slot.generation), *slot.entry); + } + } + } + +private: + struct Slot { + uint32_t generation = 1; + std::optional entry; + }; + + static constexpr Handle make_handle(uint32_t index, uint32_t generation) { + return static_cast(generation) << 32 | index; + } + + static constexpr uint32_t handle_index(Handle handle) { + return static_cast(handle & std::numeric_limits::max()); + } + + static constexpr uint32_t handle_generation(Handle handle) { + return static_cast(handle >> 32); + } + + Slot* find_slot(Handle handle) { + return const_cast(std::as_const(*this).find_slot(handle)); + } + + const Slot* find_slot(Handle handle) const { + const auto index = handle_index(handle); + if (handle == InvalidHandle || index >= m_slots.size()) { + return nullptr; + } + const auto& slot = m_slots[index]; + if (!slot.entry.has_value() || slot.generation != handle_generation(handle)) { + return nullptr; + } + return &slot; + } + + uint32_t allocate_index() { + if (!m_freeSlots.empty()) { + const auto index = m_freeSlots.back(); + m_freeSlots.pop_back(); + return index; + } + if (m_slots.size() > std::numeric_limits::max()) { + throw std::length_error{"SlotMap handle space exhausted"}; + } + const auto index = static_cast(m_slots.size()); + m_slots.emplace_back(); + return index; + } + + void release_slot(uint32_t index) { + auto& slot = m_slots[index]; + slot.entry.reset(); + if (slot.generation == std::numeric_limits::max()) { + return; + } + ++slot.generation; + m_freeSlots.push_back(index); + } + + std::vector m_slots; + std::vector m_freeSlots; +}; + +} // namespace svc +} // namespace dusk::mods diff --git a/src/dusk/mods/svc/ui.cpp b/src/dusk/mods/svc/ui.cpp index 72366aaab7..cf4ea86808 100644 --- a/src/dusk/mods/svc/ui.cpp +++ b/src/dusk/mods/svc/ui.cpp @@ -2,6 +2,7 @@ #include "config.hpp" #include "registry.hpp" +#include "slot_map.hpp" #include "aurora/lib/logging.hpp" #include "dusk/mod_loader.hpp" @@ -33,7 +34,6 @@ namespace { aurora::Module Log("dusk::mods::ui"); enum class UiSlotKind : u8 { - Free, Window, Dialog, Pane, @@ -63,17 +63,14 @@ const char* slot_kind_name(UiSlotKind kind) { case UiSlotKind::MenuTab: return "menu tab"; default: - return "free"; + return "unknown"; } } -// Generation-checked handle slots. Game thread only: all mutations happen in service calls made -// from mod code, in UI callbacks (ui::update), or in the loader's deactivate paths. +// Game thread only: all mutations happen in service calls made from mod code, in UI callbacks +// (ui::update), or in the loader's deactivate paths. struct UiSlot { - // Bumped on free, which invalidates every outstanding handle to this slot. - uint32_t generation = 1; - UiSlotKind kind = UiSlotKind::Free; - LoadedMod* owner = nullptr; + UiSlotKind kind = UiSlotKind::Window; // Pane/Text/Progress/Control: freed automatically when the element is destroyed Rml::Element* element = nullptr; // Pane payload @@ -93,8 +90,7 @@ struct UiSlot { bool hasElementValue = false; }; -std::vector s_slots; -std::vector s_freeSlots; +SlotMap s_slots; struct ModUiPanel { UiPanelBuildFn build = nullptr; @@ -112,71 +108,26 @@ struct ModMenuTab { std::unordered_map> s_modMenuTabs; bool s_menuTabsDirty = false; -uint64_t handle_for(uint32_t index) { - return (uint64_t{s_slots[index].generation} << 32) | index; -} - -uint32_t slot_index(const UiSlot& slot) { - return static_cast(&slot - s_slots.data()); -} - UiSlot* slot_from_handle(uint64_t handle) { - const auto index = static_cast(handle & 0xFFFFFFFFu); - const auto generation = static_cast(handle >> 32); - if (index >= s_slots.size()) { - return nullptr; - } - auto& slot = s_slots[index]; - if (slot.kind == UiSlotKind::Free || slot.generation != generation) { - return nullptr; - } - return &slot; + auto* entry = s_slots.find(handle); + return entry != nullptr ? &entry->value : nullptr; } // Note: s_slots may reallocate on any later allocation, so callers must not hold the returned // slot reference across calls that can allocate (e.g. mod build callbacks); re-resolve instead. UiSlot& alloc_slot(LoadedMod& mod, UiSlotKind kind, uint64_t& outHandle) { - uint32_t index; - if (!s_freeSlots.empty()) { - index = s_freeSlots.back(); - s_freeSlots.pop_back(); - } else { - index = static_cast(s_slots.size()); - s_slots.emplace_back(); - } - auto& slot = s_slots[index]; - slot.kind = kind; - slot.owner = &mod; - outHandle = handle_for(index); - return slot; -} - -void free_slot(UiSlot& slot) { - slot.generation++; - slot.kind = UiSlotKind::Free; - slot.owner = nullptr; - slot.element = nullptr; - slot.pane = nullptr; - slot.helpPane = nullptr; - slot.document = nullptr; - slot.onClosed = nullptr; - slot.onClosedUserData = nullptr; - slot.styleScope = ui::DocumentScope::None; - slot.styleId.clear(); - slot.elementRml.clear(); - slot.elementFloat = 0.0f; - slot.hasElementValue = false; - s_freeSlots.push_back(slot_index(slot)); + outHandle = s_slots.emplace(mod, UiSlot{.kind = kind}); + return s_slots.find(outHandle)->value; } UiSlot* resolve(LoadedMod& mod, uint64_t handle, UiSlotKind kind, const char* what) { - auto* slot = slot_from_handle(handle); - if (slot == nullptr || slot->owner != &mod || slot->kind != kind) { + auto* entry = s_slots.find_owned(handle, mod); + if (entry == nullptr || entry->value.kind != kind) { Log.error("[{}] {}: stale or invalid {} handle {:#x}", mod.metadata.id, what, slot_kind_name(kind), handle); return nullptr; } - return slot; + return &entry->value; } // Whether the registration a callback was created under is still live. Callbacks captured by @@ -184,7 +135,7 @@ UiSlot* resolve(LoadedMod& mod, uint64_t handle, UiSlotKind kind, const char* wh // once a reload completes, but captured fn pointers still target the unloaded image. Teardown // frees the slots (ui_remove_mod), which invalidates every callback built under them. bool slot_live(uint64_t handle) { - return slot_from_handle(handle) != nullptr; + return s_slots.find(handle) != nullptr; } bool dialog_open(uint64_t handle) { @@ -197,30 +148,22 @@ bool dialog_open(uint64_t handle) { // The generation check makes a late detach of an already-recycled slot a no-op. class SlotDetachListener final : public Rml::EventListener { public: - SlotDetachListener(uint32_t index, uint32_t generation) - : m_index{index}, m_generation{generation} {} + explicit SlotDetachListener(uint64_t handle) : m_handle{handle} {} void ProcessEvent(Rml::Event&) override {} void OnDetach(Rml::Element*) override { - if (m_index < s_slots.size()) { - auto& slot = s_slots[m_index]; - if (slot.kind != UiSlotKind::Free && slot.generation == m_generation) { - free_slot(slot); - } - } + s_slots.erase(m_handle); delete this; } private: - uint32_t m_index; - uint32_t m_generation; + uint64_t m_handle; }; -void track_element(UiSlot& slot, Rml::Element& element) { +void track_element(uint64_t handle, UiSlot& slot, Rml::Element& element) { slot.element = &element; - element.AddEventListener( - Rml::EventId::Click, new SlotDetachListener(slot_index(slot), slot.generation)); + element.AddEventListener(Rml::EventId::Click, new SlotDetachListener{handle}); } template @@ -269,7 +212,7 @@ uint64_t wrap_pane(LoadedMod& mod, ui::Pane& pane, ui::Pane* helpPane) { auto& slot = alloc_slot(mod, UiSlotKind::Pane, handle); slot.pane = &pane; slot.helpPane = helpPane; - track_element(slot, *pane.root()); + track_element(handle, slot, *pane.root()); return handle; } @@ -446,14 +389,14 @@ bool wire_config_var_binding(LoadedMod& mod, const UiControlDesc& desc, ui::ModC } void on_mod_window_destroyed(uint64_t handle) { - auto* slot = slot_from_handle(handle); - if (slot == nullptr || slot->kind != UiSlotKind::Window) { + const auto* entry = s_slots.find(handle); + if (entry == nullptr || entry->value.kind != UiSlotKind::Window) { return; } - LoadedMod* mod = slot->owner; - const UiWindowClosedFn onClosed = slot->onClosed; - void* userData = slot->onClosedUserData; - free_slot(*slot); + auto released = s_slots.take(handle); + auto* mod = released->owner; + const UiWindowClosedFn onClosed = released->value.onClosed; + void* userData = released->value.onClosedUserData; if (mod != nullptr && onClosed != nullptr) { guarded_call(*mod, "window on_closed callback", [&] { onClosed(mod->context.get(), handle, userData); @@ -464,7 +407,7 @@ void on_mod_window_destroyed(uint64_t handle) { void on_mod_dialog_destroyed(uint64_t handle) { auto* slot = slot_from_handle(handle); if (slot != nullptr && slot->kind == UiSlotKind::Dialog) { - free_slot(*slot); + s_slots.erase(handle); } } @@ -573,7 +516,7 @@ ModResult ui_pane_add_text(LoadedMod& mod, uint64_t pane, const char* text, uint auto& elemSlot = alloc_slot(mod, UiSlotKind::Text, *outElem); elemSlot.elementRml = ui::escape(text); elemSlot.hasElementValue = true; - track_element(elemSlot, *elem); + track_element(*outElem, elemSlot, *elem); } return MOD_OK; } @@ -588,7 +531,7 @@ ModResult ui_pane_add_rml(LoadedMod& mod, uint64_t pane, const char* rml, uint64 auto& elemSlot = alloc_slot(mod, UiSlotKind::Text, *outElem); elemSlot.elementRml = rml; elemSlot.hasElementValue = true; - track_element(elemSlot, *elem); + track_element(*outElem, elemSlot, *elem); } return MOD_OK; } @@ -604,7 +547,7 @@ ModResult ui_pane_add_progress(LoadedMod& mod, uint64_t pane, float value, uint6 auto& elemSlot = alloc_slot(mod, UiSlotKind::Progress, *outElem); elemSlot.elementFloat = value; elemSlot.hasElementValue = true; - track_element(elemSlot, *elem); + track_element(*outElem, elemSlot, *elem); } return MOD_OK; } @@ -691,7 +634,7 @@ ModResult ui_pane_add_control( } if (outElem != nullptr) { auto& elemSlot = alloc_slot(mod, UiSlotKind::Control, *outElem); - track_element(elemSlot, *control->root()); + track_element(*outElem, elemSlot, *control->root()); } return MOD_OK; } @@ -740,13 +683,13 @@ ModResult ui_elem_set_progress(LoadedMod& mod, uint64_t elem, float value) { } ModResult ui_elem_set_class(LoadedMod& mod, uint64_t elem, const char* name, bool active) { - auto* slot = slot_from_handle(elem); - if (slot == nullptr || slot->owner != &mod || slot->element == nullptr) { + auto* entry = s_slots.find_owned(elem, mod); + if (entry == nullptr || entry->value.element == nullptr) { Log.error( "[{}] elem_set_class: stale or invalid element handle {:#x}", mod.metadata.id, elem); return MOD_INVALID_ARGUMENT; } - slot->element->SetClass(name, active); + entry->value.element->SetClass(name, active); return MOD_OK; } @@ -945,7 +888,7 @@ ModResult ui_unregister_menu_tab(LoadedMod& mod, uint64_t handle) { s_modMenuTabs.erase(it); } } - free_slot(*slot); + s_slots.erase_owned(handle, mod); s_menuTabsDirty = true; return MOD_OK; } @@ -1026,7 +969,7 @@ ModResult ui_register_styles( slot.styleId = fmt::format("{}:{:x}", mod.metadata.id, handle); if (!ui::register_scoped_styles(docScope, slot.styleId, rcss)) { Log.error("[{}] register_styles: failed to parse RCSS", mod.metadata.id); - free_slot(slot); + s_slots.erase(handle); return MOD_INVALID_ARGUMENT; } outHandle = handle; @@ -1056,8 +999,8 @@ ModResult ui_unregister_styles(LoadedMod& mod, uint64_t handle) { if (slot == nullptr) { return MOD_INVALID_ARGUMENT; } - ui::unregister_scoped_styles(slot->styleScope, slot->styleId); - free_slot(*slot); + auto released = s_slots.take_owned(handle, mod); + ui::unregister_scoped_styles(released->value.styleScope, released->value.styleId); return MOD_OK; } @@ -1066,14 +1009,12 @@ void ui_remove_mod(LoadedMod& mod) { if (s_modMenuTabs.erase(&mod) != 0) { s_menuTabsDirty = true; } - for (auto& slot : s_slots) { - if (slot.kind == UiSlotKind::Free || slot.owner != &mod) { - continue; - } + auto entries = s_slots.take_all(mod); + for (auto& entry : entries) { + auto& slot = entry.value; switch (slot.kind) { case UiSlotKind::Window: { auto* window = static_cast(slot.document); - free_slot(slot); if (window != nullptr) { window->force_close(); } @@ -1081,7 +1022,6 @@ void ui_remove_mod(LoadedMod& mod) { } case UiSlotKind::Dialog: { auto* dialog = static_cast(slot.document); - free_slot(slot); if (dialog != nullptr) { dialog->force_close(); } @@ -1089,10 +1029,8 @@ void ui_remove_mod(LoadedMod& mod) { } case UiSlotKind::Style: ui::unregister_scoped_styles(slot.styleScope, slot.styleId); - free_slot(slot); break; default: - free_slot(slot); break; } } diff --git a/src/dusk/ui/logs_window.cpp b/src/dusk/ui/logs_window.cpp index fc9dad96ca..0a6fc2402d 100644 --- a/src/dusk/ui/logs_window.cpp +++ b/src/dusk/ui/logs_window.cpp @@ -73,10 +73,10 @@ std::string format_time(int64_t timeMs) { } Rml::Element* append_span(Rml::Element* parent, const char* className, const Rml::String& text) { - auto span = parent->GetOwnerDocument()->CreateElement("span"); + auto* span = append(parent, "span"); span->SetClass(className, true); - append_text(span.get(), text); - return parent->AppendChild(std::move(span)); + append_text(span, text); + return span; } } // namespace @@ -260,18 +260,18 @@ Rml::Element* LogsWindow::append_log_line(const mods::log::Line& line) { modId = "?"; } - auto elem = mDocument->CreateElement("div"); + auto* elem = append(mLinesElem, "div"); elem->SetClass("log-line", true); elem->SetClass(level_class(line.level), true); constexpr const char* kNbsp = "\xc2\xa0"; - append_span(elem.get(), "log-time", format_time(line.timeMs)); - append_text(elem.get(), kNbsp); - append_span(elem.get(), "log-mod", fmt::format("[{}]", modId)); - append_text(elem.get(), kNbsp); - append_span(elem.get(), "log-msg", line.message); + append_span(elem, "log-time", format_time(line.timeMs)); + append_text(elem, kNbsp); + append_span(elem, "log-mod", fmt::format("[{}]", modId)); + append_text(elem, kNbsp); + append_span(elem, "log-msg", line.message); - return mLinesElem->AppendChild(std::move(elem)); + return elem; } void LogsWindow::copy_to_clipboard() { From 287ee6b2eeb2a6b24dbef0a5e5da038840b68aac Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:00:52 -0400 Subject: [PATCH 020/223] Small Speedrun Mode Cleanups (#2179) * Deduplicate Speedrun Overrides Avoids issues where only one is updated + makes sense organizationally * Move restore_from_speedrun_mode I think it makes more sense to have this in the same place the overrides are set * Camelcase nit --------- Co-authored-by: Irastris --- include/dusk/speedrun.h | 1 + src/dusk/speedrun.cpp | 12 ++++++++++ src/dusk/ui/settings.cpp | 51 +++------------------------------------- 3 files changed, 16 insertions(+), 48 deletions(-) diff --git a/include/dusk/speedrun.h b/include/dusk/speedrun.h index c1a92e4a50..d9e43c3ed7 100644 --- a/include/dusk/speedrun.h +++ b/include/dusk/speedrun.h @@ -37,5 +37,6 @@ struct SpeedrunInfo { extern SpeedrunInfo m_speedrunInfo; void resetForSpeedrunMode(); +void restoreFromSpeedrunMode(); } // namespace dusk diff --git a/src/dusk/speedrun.cpp b/src/dusk/speedrun.cpp index e396197040..275a8de900 100644 --- a/src/dusk/speedrun.cpp +++ b/src/dusk/speedrun.cpp @@ -1,5 +1,6 @@ #include "dusk/speedrun.h" #include "dusk/settings.h" +#include "dusk/config.hpp" #include "m_Do/m_Do_main.h" #include @@ -43,4 +44,15 @@ void resetForSpeedrunMode() { getSettings().game.debugFlyCam.setSpeedrunValue(false); } +static void clearSpeedrunOverrides() { + config::EnumerateRegistered([](config::ConfigVarBase& cvar) { + cvar.clearSpeedrunOverride(); + }); +} + +void restoreFromSpeedrunMode() { + clearSpeedrunOverrides(); + aurora_set_pause_on_focus_lost(getSettings().game.pauseOnFocusLost.getValue()); +} + } // namespace dusk diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index bcd0d3cfe4..e2ee60729a 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -15,6 +15,7 @@ #include "dusk/io.hpp" #include "dusk/livesplit.h" #include "dusk/discord_presence.hpp" +#include "dusk/speedrun.h" #include "graphics_tuner.hpp" #include "m_Do/m_Do_main.h" #include "menu_bar.hpp" @@ -218,52 +219,6 @@ AuroraBackend configured_backend() { return configuredBackend; } -void reset_for_speedrun_mode() { - mDoMain::developmentMode = -1; - - getSettings().game.enableTurboKeybind.setSpeedrunValue(false); - - getSettings().game.damageMultiplier.setSpeedrunValue(1); - getSettings().game.instantDeath.setSpeedrunValue(false); - getSettings().game.noHeartDrops.setSpeedrunValue(false); - getSettings().game.autoSave.setSpeedrunValue(false); - getSettings().game.sunsSong.setSpeedrunValue(false); - - getSettings().game.infiniteHearts.setSpeedrunValue(false); - getSettings().game.infiniteArrows.setSpeedrunValue(false); - getSettings().game.infiniteSeeds.setSpeedrunValue(false); - getSettings().game.infiniteBombs.setSpeedrunValue(false); - getSettings().game.infiniteOil.setSpeedrunValue(false); - getSettings().game.infiniteOxygen.setSpeedrunValue(false); - getSettings().game.infiniteRupees.setSpeedrunValue(false); - getSettings().game.enableIndefiniteItemDrops.setSpeedrunValue(false); - getSettings().game.moonJump.setSpeedrunValue(false); - getSettings().game.superClawshot.setSpeedrunValue(false); - getSettings().game.alwaysGreatspin.setSpeedrunValue(false); - getSettings().game.enableFastIronBoots.setSpeedrunValue(false); - getSettings().game.canTransformAnywhere.setSpeedrunValue(false); - getSettings().game.fastRoll.setSpeedrunValue(false); - getSettings().game.fastSpinner.setSpeedrunValue(false); - getSettings().game.armorRupeeDrain.setSpeedrunValue(MagicArmorMode::NORMAL); - getSettings().game.invincibleEnemies.setSpeedrunValue(false); - - getSettings().game.pauseOnFocusLost.setSpeedrunValue(false); - - getSettings().backend.enableAdvancedSettings.setSpeedrunValue(false); - getSettings().game.recordingMode.setSpeedrunValue(false); - getSettings().game.debugFlyCam.setSpeedrunValue(false); -} - -void clear_speedrun_overrides() { - config::EnumerateRegistered([](config::ConfigVarBase& cvar) { - cvar.clearSpeedrunOverride(); - }); -} - -void restore_from_speedrun_mode() { - clear_speedrun_overrides(); -} - std::filesystem::path normalized_display_path(const std::filesystem::path& path) { std::error_code ec; auto normalized = std::filesystem::weakly_canonical(path, ec); @@ -1318,9 +1273,9 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) { .onChange = [](bool enabled) { if (enabled) { - reset_for_speedrun_mode(); + resetForSpeedrunMode(); } else { - restore_from_speedrun_mode(); + restoreFromSpeedrunMode(); if (getSettings().game.liveSplitEnabled) { speedrun::disconnectLiveSplit(); } From b6e3c50d885385662d819f6032b8dbb7b6d2b412 Mon Sep 17 00:00:00 2001 From: jdflyer Date: Fri, 10 Jul 2026 20:02:28 -0700 Subject: [PATCH 021/223] Mod SDK: Allow building mods with no sources (#2195) --- cmake/ModSDK.cmake | 159 ++++++++++++++++++++++++--------------------- 1 file changed, 86 insertions(+), 73 deletions(-) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index c320dcb5f4..f5507c1695 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -54,79 +54,84 @@ function(add_mod target_name) message(FATAL_ERROR "add_mod: MOD_JSON does not exist: ${_mod_json}") endif () - add_library(${target_name} SHARED ${ARG_SOURCES}) - _mod_lib_name(_lib_name) - set_target_properties(${target_name} PROPERTIES - PREFIX "" - C_VISIBILITY_PRESET hidden - CXX_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN ON - WINDOWS_EXPORT_ALL_SYMBOLS OFF) - target_compile_features(${target_name} PRIVATE cxx_std_20) - target_link_libraries(${target_name} PRIVATE dusklight_game_headers) + set(_has_lib FALSE) + set(_lib_name "") + if (ARG_SOURCES) + set(_has_lib TRUE) + add_library(${target_name} SHARED ${ARG_SOURCES}) + _mod_lib_name(_lib_name) + set_target_properties(${target_name} PROPERTIES + PREFIX "" + C_VISIBILITY_PRESET hidden + CXX_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN ON + WINDOWS_EXPORT_ALL_SYMBOLS OFF) + target_compile_features(${target_name} PRIVATE cxx_std_20) + target_link_libraries(${target_name} PRIVATE dusklight_game_headers) - if (NOT TARGET dusklight) - # Apply global compile options for out-of-tree mod builds - if (CMAKE_SYSTEM_NAME STREQUAL Linux) - target_compile_options(${target_name} PRIVATE - -Wno-multichar -Wno-trigraphs -Wno-deprecated-declarations) - elseif (APPLE) - target_compile_options(${target_name} PRIVATE - -Wno-declaration-after-statement -Wno-non-pod-varargs) - elseif (MSVC) - target_compile_options(${target_name} PRIVATE - "$<$:/bigobj>" - "$<$:/utf-8>") - endif () - # Use signed char on ARM to match the original game (and x86) - string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _mod_arch) - if (_mod_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") - target_compile_options(${target_name} PRIVATE -fsigned-char) - endif () - endif () - - if (APPLE) - # Game symbols resolve against the host executable at dlopen time. - target_link_options(${target_name} PRIVATE -undefined dynamic_lookup) - elseif (ANDROID) - if (TARGET dusklight) - target_link_libraries(${target_name} PRIVATE dusklight) - elseif (DUSK_GAME_SOLIB) - target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_SOLIB}") - else () - message(FATAL_ERROR "add_mod: DUSK_GAME_SOLIB is not set (libmain.so)") - endif () - elseif (UNIX) - target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined) - elseif (WIN32) - # Link against the generated import library (game ABI surface). Function calls - # resolve through import thunks. Data is toolchain dependent: - # - clang-cl: lld's mingw mode auto-imports data references, fixed up at load by - # the mod SDK's pseudo-relocation runtime (pseudo_reloc.cpp). - # - cl (MSVC): only DUSK_GAME_DATA-annotated data is reachable. Un-annotated - # references fail to link. - if (NOT DUSK_GAME_IMPLIB) - message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set.") - endif () - target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_IMPLIB}") - set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") - target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0) - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - target_compile_options(${target_name} PRIVATE "$<$:/clang:-mcmodel=large>") - target_sources(${target_name} PRIVATE "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../sdk/pseudo_reloc.cpp") - # lld mingw mode rewrites /DEFAULTLIB directives to -l style and skips %LIB%, so - # the CRT libraries and search paths are spelled out explicitly. - target_link_options(${target_name} PRIVATE -lldmingw /nodefaultlib /INCREMENTAL:NO) - target_link_libraries(${target_name} PRIVATE - msvcrt.lib msvcprt.lib vcruntime.lib ucrt.lib - oldnames.lib uuid.lib kernel32.lib user32.lib) - set(_lib_dirs "$ENV{LIB}") - if ("${_lib_dirs}" STREQUAL "") - message(FATAL_ERROR "add_mod: %LIB% is empty; configure from a VS dev shell") + if (NOT TARGET dusklight) + # Apply global compile options for out-of-tree mod builds + if (CMAKE_SYSTEM_NAME STREQUAL Linux) + target_compile_options(${target_name} PRIVATE + -Wno-multichar -Wno-trigraphs -Wno-deprecated-declarations) + elseif (APPLE) + target_compile_options(${target_name} PRIVATE + -Wno-declaration-after-statement -Wno-non-pod-varargs) + elseif (MSVC) + target_compile_options(${target_name} PRIVATE + "$<$:/bigobj>" + "$<$:/utf-8>") + endif () + # Use signed char on ARM to match the original game (and x86) + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _mod_arch) + if (_mod_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") + target_compile_options(${target_name} PRIVATE -fsigned-char) + endif () + endif () + + if (APPLE) + # Game symbols resolve against the host executable at dlopen time. + target_link_options(${target_name} PRIVATE -undefined dynamic_lookup) + elseif (ANDROID) + if (TARGET dusklight) + target_link_libraries(${target_name} PRIVATE dusklight) + elseif (DUSK_GAME_SOLIB) + target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_SOLIB}") + else () + message(FATAL_ERROR "add_mod: DUSK_GAME_SOLIB is not set (libmain.so)") + endif () + elseif (UNIX) + target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined) + elseif (WIN32) + # Link against the generated import library (game ABI surface). Function calls + # resolve through import thunks. Data is toolchain dependent: + # - clang-cl: lld's mingw mode auto-imports data references, fixed up at load by + # the mod SDK's pseudo-relocation runtime (pseudo_reloc.cpp). + # - cl (MSVC): only DUSK_GAME_DATA-annotated data is reachable. Un-annotated + # references fail to link. + if (NOT DUSK_GAME_IMPLIB) + message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set.") + endif () + target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_IMPLIB}") + set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") + target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(${target_name} PRIVATE "$<$:/clang:-mcmodel=large>") + target_sources(${target_name} PRIVATE "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../sdk/pseudo_reloc.cpp") + # lld mingw mode rewrites /DEFAULTLIB directives to -l style and skips %LIB%, so + # the CRT libraries and search paths are spelled out explicitly. + target_link_options(${target_name} PRIVATE -lldmingw /nodefaultlib /INCREMENTAL:NO) + target_link_libraries(${target_name} PRIVATE + msvcrt.lib msvcprt.lib vcruntime.lib ucrt.lib + oldnames.lib uuid.lib kernel32.lib user32.lib) + set(_lib_dirs "$ENV{LIB}") + if ("${_lib_dirs}" STREQUAL "") + message(FATAL_ERROR "add_mod: %LIB% is empty; configure from a VS dev shell") + endif () + foreach (_libdir IN LISTS _lib_dirs) + target_link_options(${target_name} PRIVATE "/libpath:${_libdir}") + endforeach () endif () - foreach (_libdir IN LISTS _lib_dirs) - target_link_options(${target_name} PRIVATE "/libpath:${_libdir}") - endforeach () endif () endif () @@ -141,6 +146,14 @@ function(add_mod target_name) set(_package_deps "${_mod_json}") set(_package_inputs "${_mod_json}") set(_extra_cmds "") + set(_lib_copy_cmd "") + set(_target_depend "") + if (_has_lib) + list(APPEND _zip_args "${_lib_name}") + set(_lib_copy_cmd COMMAND ${CMAKE_COMMAND} -E copy_if_different + "$" "${_stage}/${_lib_name}") + set(_target_depend ${target_name}) + endif () if (ARG_RES_DIR) _mod_resolve_source_path(_res_dir "${ARG_RES_DIR}") _mod_collect_assets(_res_deps "${_res_dir}") @@ -194,12 +207,12 @@ function(add_mod target_name) add_custom_command(OUTPUT "${_out}" COMMAND ${CMAKE_COMMAND} -E rm -rf "${_stage}" COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}" "${_output_dir}" - COMMAND ${CMAKE_COMMAND} -E copy_if_different "$" "${_stage}/${_lib_name}" + ${_lib_copy_cmd} COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_mod_json}" "${_stage}/mod.json" ${_extra_cmds} COMMAND ${CMAKE_COMMAND} -E chdir "${_stage}" ${CMAKE_COMMAND} -E tar cvf "${_out}" --format=zip ${_zip_args} ${_bundle_cmds} - DEPENDS ${target_name} ${_package_deps} "${_package_inputs_file}" + DEPENDS ${_target_depend} ${_package_deps} "${_package_inputs_file}" COMMENT "Packaging ${target_name} -> ${_out}" COMMAND_EXPAND_LISTS VERBATIM From 4c2bb26df7eaa3618c62af1b09e252da8c9953d9 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Fri, 10 Jul 2026 23:36:40 -0400 Subject: [PATCH 022/223] Add missed mirror-mode message overrides (#2108) PR #1704 hand-curated mirrorMsgOverrides from in-game observation, which left gaps. Auditing the GC BMG data (res/Msgus, GZ2E01) for every message carrying a Wii redirect turned up 13 more that belong in the table: - Two Kakariko signposts (0x1f41, 0x1f42) whose arrow/name layout is mirrored on Wii but were never added. - Five dialogue/journal lines whose direction words flip GC vs Wii, including Midna's "Eldin Province to the east/west" line reported in the PR thread. - Six shop browse-arrow lines in the same class as entries the original pass already included. Each added id appears with a Wii redirect in exactly one BMG group, so the id-only lookup resolves unambiguously. 0x1b79 was deliberately left out: it maps to different Wii variants in zel_01 (shop) and zel_07 (fishing controls), which this table can't disambiguate without becoming group-aware. --- src/d/d_msg_object.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/d/d_msg_object.cpp b/src/d/d_msg_object.cpp index 6177ddc3ac..fded5622e4 100644 --- a/src/d/d_msg_object.cpp +++ b/src/d/d_msg_object.cpp @@ -644,8 +644,21 @@ static const MirrorMsgOverride mirrorMsgOverrides[] = { {0x17e2, 0x3ef2}, {0x1dae, 0x44be}, {0x14ca, 0x3bda}, - {0x470, 0x493}, + {0x470, 0x493}, {0x473, 0x492}, + {0x1f41, 0x4651}, + {0x1f42, 0x4652}, + {0x0847, 0x0870}, + {0x0d5c, 0x0d65}, + {0x0a97, 0x0a98}, + {0x0327, 0x12ba}, + {0x0328, 0x12bb}, + {0x1534, 0x3c44}, + {0x1536, 0x3c46}, + {0x1557, 0x3c67}, + {0x1b88, 0x4298}, + {0x14c8, 0x3bd8}, + {0x151b, 0x3c2b}, }; static u32 getMirrorMsgOverride(u32 msgId) { From 20f786a43e36c8733ecbe81dc4dc9b782e99c015 Mon Sep 17 00:00:00 2001 From: Irastris Date: Fri, 10 Jul 2026 23:41:36 -0400 Subject: [PATCH 023/223] HUD scaling fixes (#2192) * Immediately apply hudScale to the dpad and rupee panes * Translate the dpad to follow along with the minimap scale --- src/d/d_meter2.cpp | 40 +++++++++++++++++++++++++++++++--------- src/d/d_meter2_draw.cpp | 3 ++- src/d/d_meter_map.cpp | 14 +++++++++++--- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/src/d/d_meter2.cpp b/src/d/d_meter2.cpp index e0855461d4..8d396e0185 100644 --- a/src/d/d_meter2.cpp +++ b/src/d/d_meter2.cpp @@ -27,6 +27,15 @@ #if TARGET_PC #include "dusk/memory.h" #include "dusk/settings.h" + +namespace { + +// Reads the user HUD scale setting, clamped to a safe range. +f32 dGetUserHudScale() { + return std::clamp(dusk::getSettings().game.hudScale.getValue(), 0.5f, 2.0f); +} + +} // namespace #endif int dMeter2_c::_create() { @@ -669,9 +678,7 @@ void dMeter2_c::moveLife() { } #if TARGET_PC - const f32 lifeGaugeScale = - g_drawHIO.mLifeParentScale * - std::clamp(dusk::getSettings().game.hudScale.getValue(), 0.5f, 2.0f); + const f32 lifeGaugeScale = g_drawHIO.mLifeParentScale * dGetUserHudScale(); #else const f32 lifeGaugeScale = g_drawHIO.mLifeParentScale; #endif @@ -1108,8 +1115,13 @@ void dMeter2_c::moveRupee() { } } - if (mRupeeKeyScale != g_drawHIO.mRupeeKeyScale) { - mRupeeKeyScale = g_drawHIO.mRupeeKeyScale; +#if TARGET_PC + const f32 rupeeKeyScale = g_drawHIO.mRupeeKeyScale * dGetUserHudScale(); +#else + const f32 rupeeKeyScale = g_drawHIO.mRupeeKeyScale; +#endif + if (mRupeeKeyScale != rupeeKeyScale) { + mRupeeKeyScale = rupeeKeyScale; draw_rupee = true; } @@ -1207,8 +1219,13 @@ void dMeter2_c::moveKey() { } } - if (mKeyScale != g_drawHIO.mKeyScale) { - mKeyScale = g_drawHIO.mKeyScale; +#if TARGET_PC + const f32 keyScale = g_drawHIO.mKeyScale * dGetUserHudScale(); +#else + const f32 keyScale = g_drawHIO.mKeyScale; +#endif + if (mKeyScale != keyScale) { + mKeyScale = keyScale; draw_key = true; } @@ -2139,8 +2156,13 @@ void dMeter2_c::moveButtonCross() { draw_cross = true; } - if (mButtonCrossScale != g_drawHIO.mButtonCrossScale) { - mButtonCrossScale = g_drawHIO.mButtonCrossScale; +#if TARGET_PC + const f32 buttonCrossScale = g_drawHIO.mButtonCrossScale * dGetUserHudScale(); +#else + const f32 buttonCrossScale = g_drawHIO.mButtonCrossScale; +#endif + if (mButtonCrossScale != buttonCrossScale) { + mButtonCrossScale = buttonCrossScale; draw_cross = true; } diff --git a/src/d/d_meter2_draw.cpp b/src/d/d_meter2_draw.cpp index eeebe65924..7ce7bb29d4 100644 --- a/src/d/d_meter2_draw.cpp +++ b/src/d/d_meter2_draw.cpp @@ -57,6 +57,7 @@ void dAnchorHudScale(CPaneMgr* i_pane, HudCorner i_corner, f32* io_x, f32* io_y, } // namespace #endif + dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) { OS_REPORT("enter dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap *mp_heap)\n"); @@ -2781,7 +2782,7 @@ void dMeter2Draw_c::drawButtonCross(f32 i_posX, f32 i_posY) { #if TARGET_PC f32 buttonCrossPosX = i_posX; f32 buttonCrossPosY = i_posY; - dAnchorHudScale(mpButtonCrossParent, HudCorner::TopLeft, &buttonCrossPosX, &buttonCrossPosY); + dAnchorHudScale(mpButtonCrossParent, HudCorner::BottomLeft, &buttonCrossPosX, &buttonCrossPosY); mpButtonCrossParent->paneTrans(buttonCrossPosX, buttonCrossPosY); #else mpButtonCrossParent->paneTrans(i_posX, i_posY); diff --git a/src/d/d_meter_map.cpp b/src/d/d_meter_map.cpp index bffdbb8931..d526d7877f 100644 --- a/src/d/d_meter_map.cpp +++ b/src/d/d_meter_map.cpp @@ -24,6 +24,15 @@ #if TARGET_PC #include "dusk/action_bindings.h" + +namespace { + +// Reads the user HUD scale setting, clamped to a safe range. +f32 dGetUserHudScale() { + return std::clamp(dusk::getSettings().game.hudScale.getValue(), 0.5f, 2.0f); +} + +} // namespace #endif #if (PLATFORM_WII || PLATFORM_SHIELD) @@ -326,7 +335,7 @@ f32 dMeterMap_c::getMapDispEdgeTop() { mMap->getTexelPerCm() * (mMap->getPackZ() + -mMap->getPackPlusZ()) - mMap->getTopEdgePlus(); } - f32 rv = getMapDispEdgeBottomY_Layout() - tmp; + f32 rv = getMapDispEdgeBottomY_Layout() - tmp IF_DUSK(* dGetUserHudScale()); return rv; } @@ -637,8 +646,7 @@ void dMeterMap_c::draw() { #if TARGET_PC // Scale the minimap with the user HUD scale and shift down so its bottom-left // corner stays anchored to the same screen position as at scale 1.0. - const f32 userHudScale = - std::clamp(dusk::getSettings().game.hudScale.getValue(), 0.5f, 2.0f); + const f32 userHudScale = dGetUserHudScale(); const f32 scaledSizeX = sizeX * userHudScale; const f32 scaledSizeY = sizeY * userHudScale; const f32 mapBottomShift = sizeY - scaledSizeY; From 6a79bf1e7986f836e30e959eb2647803141c7c73 Mon Sep 17 00:00:00 2001 From: jdflyer Date: Sat, 11 Jul 2026 11:16:38 -0700 Subject: [PATCH 024/223] Add command line arguments for --develop, --load-save, and --stage (#2150) * Add command line arguments for --develop, --load-save, and --stage * Include sstream so clang stops crying :( * Put stage load parsing in main, better load logic --- include/dusk/main.h | 12 +++++++ src/d/d_s_logo.cpp | 62 +++++++++++++++++++++++++++++++- src/m_Do/m_Do_main.cpp | 82 +++++++++++++++++++++++++++++++++++++----- 3 files changed, 146 insertions(+), 10 deletions(-) diff --git a/include/dusk/main.h b/include/dusk/main.h index 0a2be8734d..a16291a8a7 100644 --- a/include/dusk/main.h +++ b/include/dusk/main.h @@ -12,6 +12,18 @@ extern bool RestartRequested; extern std::filesystem::path ConfigPath; extern std::filesystem::path CachePath; +extern uint8_t SaveRequested; +struct StageRequest { + std::string stage; + bool set; + s8 room; + s16 point; + s8 layer; +}; +extern StageRequest StageRequested; + + + #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS) || \ (defined(TARGET_OS_TV) && TARGET_OS_TV) inline constexpr bool SupportsProcessRestart = false; diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index 570dfac577..d338775182 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -23,8 +23,12 @@ #include "m_Do/m_Do_main.h" #include "JSystem/JUtility/JUTConsole.h" +#ifdef TARGET_PC #include "dusk/logging.h" #include "dusk/version.hpp" +#include "dusk/main.h" +#include "m_Do/m_Do_MemCard.h" +#endif #if !PLATFORM_GCN #include @@ -757,7 +761,63 @@ void dScnLogo_c::nextSceneChange() { if (!mDoRst::isReset()) { if (!isOpeningCut()) { - dComIfG_changeOpeningScene(this, fpcNm_OPENING_SCENE_e); +#ifdef TARGET_PC + // If we are requesting a save from the command line, load it here and set the scene to play instead of loading the LOGO SCENE + if (dusk::SaveRequested >= 1 && dusk::SaveRequested <= 3) { + u8 buf[SAVEDATA_SIZE * 3]; + mDoMemCd_Load(); + uint8_t status; + do { + status = mDoMemCd_LoadSync(buf, sizeof(buf), 0); + // Wait until the card is loaded + } while (status == 0); + + if (status == 1) { + dComIfGs_setCardToMemory(buf, dusk::SaveRequested - 1); + } else { + dComIfGs_init(); + } + + dComIfGs_setNoFile(dusk::SaveRequested); + dComIfGs_setDataNum(dusk::SaveRequested-1); + + dComIfGs_gameStart(); + + fopScnM_ChangeReq(this, fpcNm_PLAY_SCENE_e, 0, 30); + + dKy_clear_game_init(); + dComIfGs_resetDan(); + dComIfGs_setRestartRoomParam(0); + + DuskLog.info("Loaded Save From Slot {}",dusk::SaveRequested); + dusk::SaveRequested = 0xff; + } else if (dusk::SaveRequested == 0xff) { + // This indicates that the save has loaded, but we are waiting for the scene + // manager to change to play + } else if (dusk::StageRequested.set) { + // Do nothing if we need to request a stage to load later in the function + } else{ +#endif + dComIfG_changeOpeningScene(this, fpcNm_OPENING_SCENE_e); +#ifdef TARGET_PC + } + + if (dusk::StageRequested.set) { + // If we aren't loading a save, initialize a blank save file and request the correct scene to load + if (dusk::SaveRequested == 0) { + dComIfGs_init(); + + fopScnM_ChangeReq(this, fpcNm_PLAY_SCENE_e, 0, 30); + dusk::SaveRequested = 0xff; //Skip requesting the scene from above + } + + // Use both to force-set start stage + dComIfGp_setNextStage(dusk::StageRequested.stage.c_str(), dusk::StageRequested.point, dusk::StageRequested.room, dusk::StageRequested.layer); + g_dComIfG_gameInfo.play.mNextStage.getStartStage()->set(dusk::StageRequested.stage.c_str(), dusk::StageRequested.room, dusk::StageRequested.point, dusk::StageRequested.layer); + + dusk::StageRequested.set = false; // Setting the stage should only happen once + } +#endif } else { #if DEBUG fopScnM_ChangeReq(this, fpcNm_MENU_SCENE_e, 0, 30); diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index ce029035b1..881135fc51 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -42,6 +42,7 @@ #include "m_Do/m_Do_ext2.h" #include "SSystem/SComponent/c_counter.h" #include +#include #include #include @@ -125,6 +126,8 @@ bool dusk::IsRunning = true; bool dusk::IsShuttingDown = false; bool dusk::IsGameLaunched = false; bool dusk::RestartRequested = false; +uint8_t dusk::SaveRequested = 0; +dusk::StageRequest dusk::StageRequested = {"",false}; std::filesystem::path dusk::ConfigPath; std::filesystem::path dusk::CachePath; #endif @@ -502,8 +505,6 @@ int game_main(int argc, char* argv[]) { } mainCalled = true; - dusk::registerSettings(); - cxxopts::ParseResult parsed_arg_options; try { @@ -516,7 +517,10 @@ int game_main(int argc, char* argv[]) { ("dvd", "Path to DVD image file", cxxopts::value()) ("mods", "Path to mods directory", cxxopts::value()) ("backend", "Graphics API backend to use (auto, d3d12, d3d11, metal, vulkan, null)", cxxopts::value()) - ("cvar", "Override configuration variables without modifying config", cxxopts::value>()); + ("cvar", "Override configuration variables without modifying config", cxxopts::value>()) + ("develop", "Enable the game's developer mode and OSReport for debugging", cxxopts::value()->default_value("false")->implicit_value("true")) + ("load-save", "Skip the opening and load a save from slot 1-3", cxxopts::value()->default_value("0")) + ("stage", "Upon launching, load a stage, room, spawn point, and layer. When using --load-save, it uses the specified save on the loaded stage. Format (STAGE,ROOM,POINT,LAYER). Example: (STAGE) or (STAGE,0,0,-1)", cxxopts::value()); arg_options.parse_positional({"dvd"}); arg_options.positional_help(""); @@ -529,11 +533,52 @@ int game_main(int argc, char* argv[]) { printf("%s", (arg_options.help() + "\n").c_str()); exit(0); } + + if (parsed_arg_options.count("stage")) { + std::stringstream ss(parsed_arg_options["stage"].as()); + std::string token; + + std::getline(ss,token,','); + std::string stageName = token; + s8 room = 0; + s16 point = 0; + s8 layer = -1; + if (std::getline(ss,token,',')) { + room = std::stoi(token); + if (std::getline(ss,token,',')) { + point = std::stoi(token); + if (std::getline(ss,token,',')) { + layer = std::stoi(token); + } + } + } + + dusk::StageRequested = {stageName,true, room,point,layer}; + } } catch (const cxxopts::exceptions::exception& e) { fprintf(stderr, "Argument Error: %s\n", e.what()); exit(1); } + catch (const std::invalid_argument& e) { + // Handle parsing std::stoi when loading a stage + fprintf(stderr, "Fatal: Invalid Argument When Parsing Stage\n"); + exit(1); + } + catch (const std::out_of_range& e) { + // Handle parsing std::stoi when loading a stage + fprintf(stderr, "Fatal: Argument Out of Range In Parsing Stage\n"); + exit(1); + } + + if (parsed_arg_options.contains("load-save")){ + uint8_t slot = parsed_arg_options["load-save"].as(); + if (slot >= 1 && slot <= 3) { + dusk::SaveRequested = slot; + } + } + + dusk::registerSettings(); const auto startupLogLevel = static_cast(parsed_arg_options["log-level"].as()); @@ -542,6 +587,12 @@ int game_main(int argc, char* argv[]) { dusk::CachePath = dataPaths.cachePath; dusk::InitializeFileLogging(dusk::CachePath, startupLogLevel); + // Development Mode + if (parsed_arg_options.count("develop")) { + mDoMain::developmentMode = parsed_arg_options["develop"].as(); // Enable Dev Mode for Debugging + dusk::OSReportReallyForceEnable = parsed_arg_options["develop"].as(); // Print OSReport to console + } + log_build_info(); dusk::config::load_from_user_preferences(); @@ -682,7 +733,7 @@ int game_main(int argc, char* argv[]) { saveConfigBeforePrelaunch = true; } - std::string dvd_path; + std::string dvd_path = dusk::getSettings().backend.isoPath; bool dvd_opened = false; if (parsed_arg_options.count("dvd")) { dvd_path = parsed_arg_options["dvd"].as(); @@ -705,6 +756,22 @@ int game_main(int argc, char* argv[]) { } } + bool skipPreLaunchUI = dusk::getSettings().backend.skipPreLaunchUI.getValue(); + + // If we can't load right into the game, stop requesting to load a stage or save + if (forcePreLaunchUI || dvd_path.empty()) { + if (dusk::StageRequested.set) { + DuskLog.warn("Cannot load stage {} because no iso path is set, opening prelaunch UI",dusk::StageRequested.stage); + dusk::StageRequested = {}; + } + if (dusk::SaveRequested) { + DuskLog.warn("Cannot load save {} because no iso path is set, opening prelaunch UI",dusk::SaveRequested); + dusk::SaveRequested = 0; + } + }else if (dusk::StageRequested.set || dusk::SaveRequested) { + skipPreLaunchUI = true; + } + dusk::iso::log_verification_state( dusk::getSettings().backend.isoPath.getValue(), dusk::getSettings().backend.isoVerification.getValue()); @@ -713,7 +780,7 @@ int game_main(int argc, char* argv[]) { if (dusk::getSettings().backend.isoPath.getValue().empty()) { forcePreLaunchUI = true; } - if (forcePreLaunchUI && dusk::getSettings().backend.skipPreLaunchUI.getValue()) { + if (forcePreLaunchUI && skipPreLaunchUI) { DuskLog.warn("Prelaunch UI was disabled with no usable DVD image, enabling prelaunch UI"); dusk::getSettings().backend.skipPreLaunchUI.setValue(false); saveConfigBeforePrelaunch = true; @@ -722,7 +789,7 @@ int game_main(int argc, char* argv[]) { dusk::config::save(); } - if (!dusk::getSettings().backend.skipPreLaunchUI) { + if (!skipPreLaunchUI) { dusk::ui::push_document(std::make_unique(), true); // pre game launch ui main loop @@ -741,7 +808,6 @@ int game_main(int argc, char* argv[]) { } dvd_path = dusk::getSettings().backend.isoPath; - if (dvd_path.empty()) { DuskLog.fatal("No DVD image specified, unable to boot!"); } @@ -784,8 +850,6 @@ int game_main(int argc, char* argv[]) { // Global Context Init dComIfG_ct(); - // Development Mode - // mDoMain::developmentMode = 1; // Force Dev Mode for Debugging mDoDvdThd::SyncWidthSound = false; // Mod search directories, highest priority first: user dir (--mods replaces it), then From da38a1d2d398b6a7007a5a7d7b62aab362daa77a Mon Sep 17 00:00:00 2001 From: Giorgio Mendieta <31053658+GiorgioMendieta@users.noreply.github.com> Date: Mon, 13 Jul 2026 00:11:41 +0200 Subject: [PATCH 025/223] Smooth fadeout for dynamic shadows (#2203) * Implement smooth fadeout of dynamic shadows * Add edge fade out configuration for dynamic shadows --- mods/shadow_mod/res/shadow.wgsl | 13 ++++++++++++- mods/shadow_mod/src/mod.cpp | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/mods/shadow_mod/res/shadow.wgsl b/mods/shadow_mod/res/shadow.wgsl index 83065b1257..fe69b5bc3a 100644 --- a/mods/shadow_mod/res/shadow.wgsl +++ b/mods/shadow_mod/res/shadow.wgsl @@ -21,6 +21,7 @@ struct Uniforms { bias: f32, // shadow-map depth bias (reversed-depth units) size: vec2f, // shadow map size in texels inv_size: vec2f, + edge_fade_width: f32, strength: f32, // final darkening amount, horizon fade baked in pcf_taps: f32, // 0 = single tap, 1 = 3x3, 2 = 5x5 contact_enabled: f32, @@ -28,7 +29,6 @@ struct Uniforms { contact_length: f32, // view-space march distance debug_mode: u32, // 0 = composite; nonzero modes are diagnostic views _pad0: f32, - _pad1: f32, } @group(0) @binding(0) var scene_depth: texture_2d; @@ -92,6 +92,16 @@ fn sample_shadow_pcf(light_uv: vec2f, receiver: f32) -> f32 { return sum / count; } +// Softly fades shadows out over a small band near the shadow-map edge so receivers do not +// disappear abruptly when they leave the light's coverage area. +fn shadow_edge_fade(light_uv: vec2f) -> f32 { + let edge_texels = uniforms.edge_fade_width; + let edge_uv = edge_texels * max(uniforms.inv_size.x, uniforms.inv_size.y); + let distance_to_edge = min(min(light_uv.x, 1.0 - light_uv.x), min(light_uv.y, 1.0 - light_uv.y)); + // Avoid division by zero when the fade width is zero (no fade). + return select(1.0, saturate(distance_to_edge / edge_uv), edge_uv > 0.0); +} + fn scene_depth_at(uv: vec2f) -> f32 { let size = vec2(textureDimensions(scene_depth)); let texel = clamp(vec2(uv * vec2f(size)), vec2(0i), size - 1i); @@ -240,6 +250,7 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4f { var occlusion = 0.0; if in_shadow_bounds { occlusion = sample_shadow_pcf(light_uv, receiver); + occlusion *= shadow_edge_fade(light_uv); } if uniforms.debug_mode == 3u { diff --git a/mods/shadow_mod/src/mod.cpp b/mods/shadow_mod/src/mod.cpp index df57eadcbd..0eec4fecef 100644 --- a/mods/shadow_mod/src/mod.cpp +++ b/mods/shadow_mod/src/mod.cpp @@ -57,6 +57,7 @@ ConfigVarHandle g_cvarStrength = 0; ConfigVarHandle g_cvarPcf = 0; ConfigVarHandle g_cvarBias = 0; ConfigVarHandle g_cvarBoxRadius = 0; +ConfigVarHandle g_cvarEdgeFadeWidth = 0; ConfigVarHandle g_cvarContactShadows = 0; ConfigVarHandle g_cvarDebugView = 0; @@ -107,6 +108,7 @@ struct ShadowUniforms { float bias; float size[2]; float inv_size[2]; + float edge_fade_width; float strength; float pcf_taps; float contact_enabled; @@ -114,7 +116,6 @@ struct ShadowUniforms { float contact_length; uint32_t debug_mode; float _pad0; - float _pad1; }; static_assert(sizeof(ShadowUniforms) % 16 == 0); @@ -792,6 +793,8 @@ void on_frame_before_hud(ModContext*, const GfxStageContext*, void*) { uniforms.size[1] = static_cast(mapPass.mapSize); uniforms.inv_size[0] = 1.0f / uniforms.size[0]; uniforms.inv_size[1] = 1.0f / uniforms.size[1]; + uniforms.edge_fade_width = + static_cast(std::clamp(get_int_option(g_cvarEdgeFadeWidth, 32), 0, 128)); uniforms.strength = mapPass.fade * static_cast(std::clamp(get_int_option(g_cvarStrength, 45), 0, 100)) / @@ -867,6 +870,8 @@ ModResult build_controls_tab( "dynamic shadows. This can be expensive."); add_number(left, "Coverage", g_cvarBoxRadius, 1000, 20000, 500, nullptr, "Radius of the shadowed area around the camera, in world units. Smaller is sharper."); + add_number(left, "Fade Out", g_cvarEdgeFadeWidth, 0, 128, 32, " texels", + "Fade out shadows gradually near the edge of the coverage area."); svc_ui->pane_add_section(mod_ctx, left, "Appearance"); add_number(left, "Strength", g_cvarStrength, 0, 100, 5, "%", "How dark shadowed areas become."); @@ -992,6 +997,10 @@ MOD_EXPORT ModResult mod_initialize(ModError* error) { if (result != MOD_OK) { return result; } + result = register_int_option("edgeFadeWidth", 32, g_cvarEdgeFadeWidth, error); + if (result != MOD_OK) { + return result; + } result = register_bool_option("contactShadows", true, g_cvarContactShadows, error); if (result != MOD_OK) { return result; @@ -1087,7 +1096,8 @@ MOD_EXPORT ModResult mod_shutdown(ModError*) { } g_cvarEnabled = g_cvarMapSize = g_cvarNoFrustumClipping = 0; g_cvarStrength = 0; - g_cvarPcf = g_cvarBias = g_cvarBoxRadius = g_cvarContactShadows = g_cvarDebugView = 0; + g_cvarPcf = g_cvarBias = g_cvarBoxRadius = g_cvarEdgeFadeWidth = g_cvarContactShadows = + g_cvarDebugView = 0; g_drawType = g_sceneBeginHook = g_sceneAfterTerrainHook = g_frameBeforeHudHook = 0; g_controlsWindow = 0; g_mapPass = {}; From 641ac5877e478bbc69cf8c6bc080d6e317fb050a Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Sun, 12 Jul 2026 18:12:59 -0400 Subject: [PATCH 026/223] Fix Overlapping Overlays (#2198) Still overlaps while the pipeline building overlay is fading out --- src/dusk/ui/overlay.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/dusk/ui/overlay.cpp b/src/dusk/ui/overlay.cpp index c0e073dbc2..3b5b43299e 100644 --- a/src/dusk/ui/overlay.cpp +++ b/src/dusk/ui/overlay.cpp @@ -254,6 +254,15 @@ void Overlay::update() { mFpsCounter->SetAttribute("open", ""); mFpsCounter->SetAttribute("corner", kFpsCorners[idx]); + if(idx == 2 && mPipelineProgress && mPipelineProgress->GetAttribute("open")) { + // 12 (height of pipeline box off bottom) + height of pipeline box + 3 (padding space) + mFpsCounter->SetProperty(Rml::PropertyId::Bottom, Rml::Property(15 + mPipelineProgress->GetOffsetHeight(), Rml::Unit::PX)); + } + else { + // Return fps counter to default height off the bottom + mFpsCounter->SetProperty(Rml::PropertyId::Bottom, Rml::Property(12, Rml::Unit::PX)); + } + const Uint64 perfFreq = SDL_GetPerformanceFrequency(); float fps = aurora_get_fps(); From 8cc4ce94b83c2d1365088d0c73040d2751359012 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 12 Jul 2026 20:14:12 -0600 Subject: [PATCH 027/223] Mods: Don't use RTLD_DEEPBIND with ASAN --- src/dusk/mods/loader/native_module.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dusk/mods/loader/native_module.cpp b/src/dusk/mods/loader/native_module.cpp index aa4a369fb0..edd3addb4f 100644 --- a/src/dusk/mods/loader/native_module.cpp +++ b/src/dusk/mods/loader/native_module.cpp @@ -6,6 +6,14 @@ #include #endif +#if defined(__SANITIZE_ADDRESS__) +#define ADDRESS_SANITIZER 1 +#elif defined(__has_feature) +#if __has_feature(address_sanitizer) +#define ADDRESS_SANITIZER 1 +#endif +#endif + namespace { #if defined(_WIN32) void* pl_dlopen(const std::filesystem::path& p) { @@ -31,7 +39,7 @@ std::string pl_dlerror() { #include void* pl_dlopen(const std::filesystem::path& p) { int flags = RTLD_LAZY | RTLD_LOCAL; -#if defined(RTLD_DEEPBIND) +#if defined(RTLD_DEEPBIND) && !defined(ADDRESS_SANITIZER) flags |= RTLD_DEEPBIND; #endif return dlopen(p.c_str(), flags); From 9687a9d95ab5ded5d7f8df57f19ef4df8c3eded5 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 00:53:37 -0600 Subject: [PATCH 028/223] Mod API: Static import/export/hook metadata & resolution --- docs/modding.md | 66 +++--- include/dusk/mod_loader.hpp | 34 ++- include/mods/api.h | 138 +++++++++--- include/mods/hook.hpp | 357 +++++--------------------------- include/mods/meta.hpp | 276 ++++++++++++++++++++++++ include/mods/service.hpp | 99 ++------- mods/shadow_mod/src/mod.cpp | 27 +-- src/dusk/mods/loader/loader.cpp | 218 ++++++++++++++----- src/dusk/mods/svc/hook.cpp | 264 +++++++++++++++++++++++ src/dusk/mods/svc/hook.hpp | 11 + src/dusk/mods/svc/registry.cpp | 57 ++--- 11 files changed, 993 insertions(+), 554 deletions(-) create mode 100644 include/mods/meta.hpp create mode 100644 src/dusk/mods/svc/hook.hpp diff --git a/docs/modding.md b/docs/modding.md index 6f2d1a8580..3823bd05a4 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -469,8 +469,14 @@ Mods may hook the vast majority of game functions, including file-local static, #include "mods/svc/hook.h" IMPORT_SERVICE(HookService, svc_hook); + +DEFINE_HOOK(&daAlink_c::posMove, LinkPosMove); +DEFINE_HOOK(&daAlink_c::execute, LinkExecute); ``` +Every hook target must be **declared** at namespace scope with `DEFINE_HOOK` (a target you can name in C++) or +`DEFINE_HOOK_SYMBOL` (a symbol name). + ### Pre-hooks Run before the original. Return `HOOK_SKIP_ORIGINAL` to cancel it (post-hooks still run). @@ -484,7 +490,7 @@ HookAction on_pos_move_pre(ModContext*, void* args, void* retval, void* userdata return HOOK_CONTINUE; } -dusk::mods::hook_add_pre<&daAlink_c::posMove>(svc_hook, on_pos_move_pre); +dusk::mods::hook_add_pre(svc_hook, on_pos_move_pre); ``` ### Post-hooks @@ -495,24 +501,22 @@ if any. ```cpp void on_pos_move_post(ModContext*, void* args, void* retval, void* userdata) { ... } -dusk::mods::hook_add_post<&daAlink_c::posMove>(svc_hook, on_pos_move_post); +dusk::mods::hook_add_post(svc_hook, on_pos_move_post); ``` ### Replace-hooks -Substitute the original entirely. Call through to it via `Hook<...>::g_orig` if needed: +Substitute the original entirely. Call through to it via the declaration's `g_orig` if needed: ```cpp -using ExecuteEntry = dusk::mods::Hook<&daAlink_c::execute>; - void on_execute_replace(ModContext*, void* args, void* retval, void*) { - int result = ExecuteEntry::g_orig(dusk::mods::arg(args, 0)); + int result = LinkExecute::g_orig(dusk::mods::arg(args, 0)); if (retval != nullptr) { *static_cast(retval) = result; } } -dusk::mods::hook_replace<&daAlink_c::execute>(svc_hook, on_execute_replace); +dusk::mods::hook_replace(svc_hook, on_execute_replace); ``` By default a second replace-hook on the same function is a conflict; `HookOptions` (`replace_policy`, `priority`, @@ -525,10 +529,8 @@ Functions you can't name in C++ (file-local statics, private class members, anyt symbol name instead. You must supply the signature along with the name. ```cpp -// static callback used by Link's hookshot collider in d_a_alink_hook.inc -using HookshotHit = dusk::mods::NamedHook< - "daAlink_hookshotAtHitCallBack", - void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*)>; +DEFINE_HOOK_SYMBOL("daAlink_hookshotAtHitCallBack", + void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*), HookshotHit); dusk::mods::hook_add_pre(svc_hook, on_hookshot_hit_pre); ... @@ -537,9 +539,16 @@ HookshotHit::g_orig(link, atObjInf, target, tgObjInf); // call through to the o Class member functions must include `Class*` as the first argument. -The install fails with the resolve error when the name is missing (`MOD_UNAVAILABLE`), ambiguous (`MOD_CONFLICT`), -or the manifest is absent (`MOD_UNSUPPORTED`). Unlike `Hook<&Class::method>`, the signature is **not** -compiler-checked: a mismatched signature will corrupt the call. +Two spellings work on every platform: + +- **Display names** (`daAlink_c::posMove`, `fapGm_Before`): the qualified name with no parameter list. They carry no + signature, so overload sets (and file-local statics sharing a name) return `MOD_CONFLICT`. +- **Decorated names** (`_ZN9daAlink_c7posMoveEv` / `?posMove@daAlink_c@@...`): the platform's mangled spelling in + dlsym convention (no Mach-O leading underscore). The escape hatch for overloads. + +Installing fails with `MOD_UNAVAILABLE` when it didn't resolve (missing, ambiguous, or no symbol manifest). Unlike +`DEFINE_HOOK`, the signature is **not** compiler-checked: a mismatched signature will corrupt the +call. ### Reading and writing arguments @@ -552,6 +561,8 @@ T& ref = dusk::mods::arg_ref(args, n); // read/write reference ``` ```cpp +DEFINE_HOOK(fopAcM_createItem, CreateItem); + // fpc_ProcID fopAcM_createItem(..., int itemNo, ...): turn heart drops into green rupees HookAction on_create_item_pre(ModContext*, void* args, void*, void*) { int& itemNo = dusk::mods::arg_ref(args, 1); @@ -561,36 +572,11 @@ HookAction on_create_item_pre(ModContext*, void* args, void*, void*) { return HOOK_CONTINUE; } -dusk::mods::hook_add_pre<&fopAcM_createItem>(svc_hook, on_create_item_pre); +dusk::mods::hook_add_pre(svc_hook, on_create_item_pre); ``` For reference parameters (e.g. `const cXyz& pos`), `arg_ref` yields a direct reference. -### Resolving symbols by name - -`resolve` looks a symbol up in the **symbol manifest**: a name→address map generated alongside every game build and -keyed to that exact binary. It covers the whole image, including functions that aren't exported (file-local statics), -which makes them hookable: - -```cpp -IMPORT_SERVICE(HookService, svc_hook); - -void* addr = nullptr; -uint32_t flags = 0; -if (svc_hook->resolve(mod_ctx, "GXSetProjection", &addr, &flags) == MOD_OK) { - // addr is the function's real address in the running game; hook or call it. -} -``` - -Two spellings work on every platform: - -- **Display names** (`daAlink_c::posMove`, `fapGm_Before`): the qualified name with no parameter list. They carry no - signature, so overload sets (and file-local statics sharing a name) return `MOD_CONFLICT`. -- **Decorated names** (`_ZN9daAlink_c7posMoveEv` / `?posMove@daAlink_c@@...`): the platform's mangled spelling in - dlsym convention (no Mach-O leading underscore). The escape hatch for overloads. - -`MOD_UNSUPPORTED` means the manifest is missing or was built for a different game binary. - ### Game code ABI contract A primary consideration when letting mods link against the game is maintaining ABI stability across Dusklight diff --git a/include/dusk/mod_loader.hpp b/include/dusk/mod_loader.hpp index 9d77f6984a..a326c8d807 100644 --- a/include/dusk/mod_loader.hpp +++ b/include/dusk/mod_loader.hpp @@ -67,9 +67,32 @@ struct ModSearchDir { std::filesystem::path nativeLibDir; }; +struct ModMetaParsed { + uint32_t abiVersion = 0; + std::vector imports; + std::vector exports; + std::vector hookFns; + std::vector hookMems; + std::vector hookNames; +}; + +inline const char* hook_mem_vtable_symbol(const ModMetaHookMem& rec) { + return reinterpret_cast(&rec) + sizeof(ModMetaHookMem); +} + +inline const char* hook_mem_display_name(const ModMetaHookMem& rec) { + const char* vtable = hook_mem_vtable_symbol(rec); + return vtable + std::char_traits::length(vtable) + 1; +} + +inline const char* hook_name_symbol(const ModMetaHookName& rec) { + return reinterpret_cast(&rec) + sizeof(ModMetaHookName); +} + struct NativeMod { std::unique_ptr handle; - const ModManifest* manifest = nullptr; + const ModMeta* meta = nullptr; + ModMetaParsed parsed; ModContext** contextSymbol = nullptr; ModInitializeFn fn_initialize = nullptr; @@ -111,6 +134,11 @@ enum class NativeModStatus : u8 { */ MissingExport, + /** + * Mod's metadata record section is malformed. + */ + InvalidMetadata, + /** * Unknown error loading the native mod. */ @@ -126,7 +154,7 @@ struct LoadedMod { // Native lib is dlopen'd in place and stays resident for the session. Reload is unsupported. bool inPlace = false; - std::unique_ptr > cvarIsEnabled; + std::unique_ptr> cvarIsEnabled; config::Subscription enabledSubscription = 0; bool active = false; @@ -200,7 +228,7 @@ private: std::string path; }; - std::vector > m_mods; + std::vector> m_mods; std::vector m_searchDirs; std::filesystem::path m_cacheDir; std::vector m_pendingRequests; diff --git a/include/mods/api.h b/include/mods/api.h index 85e2f76545..b2999336eb 100644 --- a/include/mods/api.h +++ b/include/mods/api.h @@ -23,7 +23,7 @@ extern "C" { #define MOD_EXTERN_C #endif -#define MOD_ABI_VERSION 5u +#define MOD_ABI_VERSION 6u #define MOD_ERROR_MESSAGE_SIZE 512u typedef struct ModContext ModContext; @@ -37,7 +37,8 @@ typedef enum ModResult { MOD_INVALID_ARGUMENT = 5, } ModResult; -static_assert(sizeof(ModResult) == 4, "mod SDK enums must be int-sized; do not build mods with -fshort-enums"); +static_assert(sizeof(ModResult) == 4, + "mod SDK enums must be int-sized; do not build mods with -fshort-enums"); typedef struct ModError { uint32_t struct_size; @@ -108,41 +109,130 @@ typedef enum ServiceExportFlags { SERVICE_EXPORT_DEFERRED = 1u << 0u, } ServiceExportFlags; -typedef struct ServiceImport { - uint32_t struct_size; - const char* service_id; +/* + * Mod metadata records. + * + * A mod's manifest is a sequence of records in a dedicated section of the native library ("modmeta" + * on ELF, "__DATA,__modmeta" on Mach-O, "modmeta$a/$d/$z" on PE). + * + * The records are pure data. Every string is inline and NUL-terminated. Fields documented as + * runtime-only hold relocated pointers that are meaningless on disk; static parsers recover their + * targets from the file's relocation/bind entries instead. + * + * Layout rules: + * - Little-endian, 8-byte aligned; every record size is a multiple of 8. + * - Parsers must skip all-zero 8-byte units (linker padding) and records of unknown kind. + * - Exactly one MOD_META_HEADER record per library. + * + * The IMPORT_SERVICE/EXPORT_SERVICE/DEFINE_HOOK macros emit these records; mods do not construct + * them by hand. + */ + +#define MOD_META_SERVICE_ID_SIZE 64u + +/* Records are 8-byte aligned so the linker packs them without padding; most are naturally + * aligned by their pointer fields, the alignment below covers the rest. */ +#if defined(__cplusplus) +#define MOD_META_ALIGN alignas(8) +#elif defined(_MSC_VER) +#define MOD_META_ALIGN __declspec(align(8)) +#else +#define MOD_META_ALIGN __attribute__((aligned(8))) +#endif + +typedef enum ModMetaKind { + MOD_META_PAD = 0, + MOD_META_HEADER = 1, + MOD_META_IMPORT = 2, + MOD_META_EXPORT = 3, + MOD_META_HOOK_FN = 4, + MOD_META_HOOK_MEM = 5, + MOD_META_HOOK_NAME = 6, +} ModMetaKind; + +typedef struct ModMetaRecord { + uint16_t size; /* total record size in bytes, a multiple of 8 */ + uint8_t kind; /* ModMetaKind */ + uint8_t flags; /* ServiceImportFlags / ServiceExportFlags for imports/exports */ +} ModMetaRecord; + +typedef struct MOD_META_ALIGN ModMetaHeader { + ModMetaRecord rec; + uint32_t abi_version; +} ModMetaHeader; + +static_assert(sizeof(ModMetaHeader) == 8); + +typedef struct MOD_META_ALIGN ModMetaImport { + ModMetaRecord rec; uint16_t major_version; uint16_t min_minor_version; - uint32_t flags; - void* slot; -} ServiceImport; + void* slot; /* runtime only */ + char service_id[MOD_META_SERVICE_ID_SIZE]; +} ModMetaImport; -typedef struct ServiceExport { - uint32_t struct_size; - const char* service_id; +static_assert(sizeof(ModMetaImport) == 16 + MOD_META_SERVICE_ID_SIZE); + +typedef struct MOD_META_ALIGN ModMetaExport { + ModMetaRecord rec; uint16_t major_version; uint16_t minor_version; - uint32_t flags; - const void* service; -} ServiceExport; + const void* service; /* runtime only */ + char service_id[MOD_META_SERVICE_ID_SIZE]; +} ModMetaExport; -typedef struct ModManifest { +static_assert(sizeof(ModMetaExport) == 16 + MOD_META_SERVICE_ID_SIZE); + +/* Hook on a function named at link time: `target` carries the &fn relocation. */ +typedef struct MOD_META_ALIGN ModMetaHookFn { + ModMetaRecord rec; + uint32_t reserved; + void* target; /* runtime only */ + void* resolved; /* runtime only */ +} ModMetaHookFn; + +static_assert(sizeof(ModMetaHookFn) == 24); + +/* + * Hook on a member function: `pmf` holds the compiler's pointer-to-member representation + * (non-virtual: a function address relocation; virtual Itanium/AAPCS: literal slot words). Two + * NUL-terminated strings follow `resolved`: the class vtable symbol (empty if the class name is not + * representable), then the stringified target for tooling display. + */ +typedef struct MOD_META_ALIGN ModMetaHookMem { + ModMetaRecord rec; + uint32_t reserved; + unsigned char pmf[16]; + void* resolved; /* runtime only */ +} ModMetaHookMem; + +static_assert(sizeof(ModMetaHookMem) == 32); + +/* + * Hook on a function by symbol name, for targets that cannot be named in C++ (file-local statics, + * private members). One NUL-terminated string follows `resolved`; it may be either the platform + * mangled name or the demangled qualified display name. + */ +typedef struct MOD_META_ALIGN ModMetaHookName { + ModMetaRecord rec; + uint32_t reserved; + void* resolved; /* runtime only */ +} ModMetaHookName; + +static_assert(sizeof(ModMetaHookName) == 16); + +typedef struct ModMeta { uint32_t struct_size; - uint32_t abi_version; - const ServiceImport* imports; - size_t import_count; - const ServiceExport* exports; - size_t export_count; -} ModManifest; + const void* records_begin; + const void* records_end; +} ModMeta; -typedef const ModManifest* (*ModGetManifestFn)(void); +MOD_EXPORT extern const ModMeta mod_meta; typedef ModResult (*ModInitializeFn)(ModError* out_error); typedef ModResult (*ModUpdateFn)(ModError* out_error); typedef ModResult (*ModShutdownFn)(ModError* out_error); -MOD_EXPORT const ModManifest* mod_get_manifest(void); - MOD_EXPORT ModResult mod_initialize(ModError* out_error); MOD_EXPORT ModResult mod_update(ModError* out_error); MOD_EXPORT ModResult mod_shutdown(ModError* out_error); diff --git a/include/mods/hook.hpp b/include/mods/hook.hpp index c58bd719c9..0f74ce23a6 100644 --- a/include/mods/hook.hpp +++ b/include/mods/hook.hpp @@ -2,11 +2,7 @@ #include "mods/svc/hook.h" -#include -#include -#include #include -#include #include namespace dusk::mods { @@ -14,255 +10,20 @@ namespace dusk::mods { template T arg(void* argsRaw, int n) noexcept { void** args = static_cast(argsRaw); - return *static_cast > >(args[n]); + return *static_cast>>(args[n]); } template std::remove_reference_t& arg_ref(void* argsRaw, int n) noexcept { void** args = static_cast(argsRaw); - return *static_cast > >(args[n]); + return *static_cast>>(args[n]); } -template -void* mfp_addr(F fn) noexcept { - void* p = nullptr; - static_assert(sizeof(fn) >= sizeof(void*), "unexpected function pointer size"); - std::memcpy(&p, &fn, sizeof(void*)); - return p; -} - -/* A string usable as a template argument: carries the hook target's symbol name and - * makes each NamedHook instantiation's static state unique. */ -template -struct FixedString { - char chars[N]{}; - constexpr FixedString(const char (&s)[N]) noexcept { - for (size_t i = 0; i < N; ++i) { - chars[i] = s[i]; - } - } -}; - -namespace detail { - -template -constexpr std::string_view class_name() { -#if defined(__clang__) || defined(__GNUC__) - // "... class_name() [T = daAlink_c]" / "... [with T = daAlink_c; ...]" - constexpr std::string_view fn = __PRETTY_FUNCTION__; - constexpr size_t start = fn.find("T = ") + 4; - return fn.substr(start, fn.find_first_of(";]", start) - start); -#elif defined(_MSC_VER) - // "... class_name(void)" - constexpr std::string_view fn = __FUNCSIG__; - constexpr size_t start = fn.find("class_name<") + 11; - constexpr std::string_view name = fn.substr(start, fn.rfind(">(") - start); - if constexpr (name.starts_with("class ")) { - return name.substr(6); - } else if constexpr (name.starts_with("struct ")) { - return name.substr(7); - } else { - return name; - } -#else -#error "unsupported compiler" -#endif -} - -/* The manifest name of C's vtable. Only unscoped, non-template class names are - * supported (an empty result fails resolution and the install reports it). */ -template -constexpr auto vtable_symbol() { - constexpr std::string_view name = class_name(); - constexpr bool simple = name.find_first_of(":<> ") == std::string_view::npos; - // "_ZTV" + decimal length + name / "??_7" + name + "@@6B@", NUL-terminated - std::array out{}; - if constexpr (!simple) { - return out; - } - size_t n = 0; -#if defined(_WIN32) - for (char c : {'?', '?', '_', '7'}) { - out[n++] = c; - } - for (char c : name) { - out[n++] = c; - } - for (char c : {'@', '@', '6', 'B', '@'}) { - out[n++] = c; - } -#else - for (char c : {'_', 'Z', 'T', 'V'}) { - out[n++] = c; - } - size_t len = name.size(); - char digits[8]{}; - size_t d = 0; - while (len != 0) { - digits[d++] = static_cast('0' + len % 10); - len /= 10; - } - while (d != 0) { - out[n++] = digits[--d]; - } - for (char c : name) { - out[n++] = c; - } -#endif - return out; -} - -#if defined(_WIN32) -/* Follow jump stubs, then match the MSVC vcall thunk a virtual mfp points at. - * Returns the vtable slot's byte offset, or npos when fn is not a vcall thunk. */ -inline size_t vcall_slot_offset(const void*& fn) noexcept { - constexpr size_t npos = static_cast(-1); -#if defined(_M_X64) || defined(__x86_64__) - const auto* p = static_cast(fn); - for (int i = 0; i < 8 && p[0] == 0xE9; ++i) { // incremental-link stubs - int32_t rel; - std::memcpy(&rel, p + 1, 4); - p += 5 + rel; - } - fn = p; - // The vptr load. Unoptimized clang-cl thunks spill/reload rcx first - // (push rax; mov [rsp], rcx; mov rcx, [rsp]), so scan a short window. - const uint8_t* q = nullptr; - for (int i = 0; i <= 12; ++i) { - if (p[i] == 0x48 && p[i + 1] == 0x8B && p[i + 2] == 0x01) { // mov rax, [rcx] - q = p + i + 3; - break; - } - } - if (q == nullptr) { - return npos; - } - if (q[0] == 0xFF && q[1] == 0x20) { // jmp [rax] (MSVC) - return 0; - } - if (q[0] == 0xFF && q[1] == 0x60) { // jmp [rax + imm8] - return static_cast(q[2]); - } - if (q[0] == 0xFF && q[1] == 0xA0) { // jmp [rax + imm32] - int32_t off; - std::memcpy(&off, q + 2, 4); - return off; - } - // clang-cl: mov rax, [rax + off]; (pop r10;) jmp rax. Requiring the jmp rax - // distinguishes the thunk from an ordinary getter that begins the same way. - if (q[0] == 0x48 && q[1] == 0x8B && (q[2] == 0x00 || q[2] == 0x40 || q[2] == 0x80)) { - size_t off = 0; - const uint8_t* r = q + 3; - if (q[2] == 0x40) { - off = static_cast(q[3]); - r = q + 4; - } else if (q[2] == 0x80) { - int32_t off32; - std::memcpy(&off32, q + 3, 4); - off = off32; - r = q + 7; - } - for (int i = 0; i <= 8; ++i) { - if (r[i] == 0xFF && r[i + 1] == 0xE0) { // jmp rax (48 REX optional) - return off; - } - } - } - return npos; -#elif defined(_M_ARM64) || defined(__aarch64__) - const auto* p = static_cast(fn); - uint32_t insn[3]; - for (int i = 0; i < 8; ++i) { // incremental-link `b` stubs - std::memcpy(insn, p, 4); - if ((insn[0] & 0xFC000000u) != 0x14000000u) { - break; - } - const auto imm26 = static_cast(insn[0] << 6) >> 6; - p += static_cast(imm26) * 4; - } - fn = p; - std::memcpy(insn, p, 12); - // ldr Xt, [x0]; ldr Xs, [Xt, #imm12*8]; br Xs - if ((insn[0] & 0xFFFFFFE0u) != 0xF9400000u) { - return npos; - } - const uint32_t t = insn[0] & 0x1Fu; - if ((insn[1] & 0xFFC003E0u) != (0xF9400000u | (t << 5))) { - return npos; - } - const uint32_t s = insn[1] & 0x1Fu; - if (insn[2] != (0xD61F0000u | (s << 5))) { - return npos; - } - return ((insn[1] >> 10) & 0xFFFu) * 8; -#else - (void)fn; - return npos; -#endif -} -#endif - -/* Code address of the member function a mfp designates. Virtual mfps don't carry - * one; recover it from the class's vtable (resolved from the symbol manifest), so - * Hook works uniformly on virtual and non-virtual members. */ -template -ModResult member_target(const HookService* hooks, F mfp, void** out) { - *out = nullptr; - uintptr_t words[sizeof(F) > sizeof(uintptr_t) ? 2 : 1] = {}; - std::memcpy(words, &mfp, sizeof(words) < sizeof(F) ? sizeof(words) : sizeof(F)); - -#if defined(_WIN32) - const void* fn = reinterpret_cast(words[0]); - const size_t slot = vcall_slot_offset(fn); - if (slot == static_cast(-1)) { // not a vcall thunk: direct address - *out = const_cast(fn); - return MOD_OK; - } - void* vtable = nullptr; - const ModResult resolved = hooks->resolve(mod_ctx, vtable_symbol().data(), &vtable, nullptr); - if (resolved != MOD_OK) { - return resolved; - } - // ??_7 points at the first slot. - *out = *reinterpret_cast(static_cast(vtable) + slot); -#else -#if defined(__aarch64__) || defined(__arm__) - // AAPCS C++ ABI: the virtual flag is bit 0 of the adjustment word (function - // addresses can't spare their low bit), and ptr holds the slot offset directly. - const bool isVirtual = (words[1] & 1) != 0; - const uintptr_t thisAdjust = words[1] >> 1; - const uintptr_t slotOffset = words[0]; -#else - // Itanium C++ ABI: virtual mfps set bit 0 of ptr; the slot offset is ptr - 1. - const bool isVirtual = (words[0] & 1) != 0; - const uintptr_t thisAdjust = words[1]; - const uintptr_t slotOffset = words[0] - 1; -#endif - if (!isVirtual) { // non-virtual: the address itself - *out = reinterpret_cast(words[0]); - return MOD_OK; - } - if (thisAdjust != 0) { - // this-adjusting mfp (member of a secondary base): the slot offset is - // relative to a vtable we can't locate. Hook the overrider by name instead. - return MOD_UNSUPPORTED; - } - void* vtable = nullptr; - const ModResult resolved = hooks->resolve(mod_ctx, vtable_symbol().data(), &vtable, nullptr); - if (resolved != MOD_OK) { - return resolved; - } - // _ZTV points at the offset-to-top slot; the address point mfps index from is - // two pointers in (past offset-to-top and the typeinfo pointer). - *out = *reinterpret_cast(static_cast(vtable) + 2 * sizeof(void*) + slotOffset); -#endif - return *out != nullptr ? MOD_OK : MOD_UNAVAILABLE; -} - -} // namespace detail - -/* Trampoline generator + per-target state shared by Hook and NamedHook. Tag makes - * each hooked target's statics distinct; the target address is filled in at install. */ +/* + * Trampoline generator + per-target state. Tag makes each hooked target's statics distinct; the + * target address comes from the declaration's metadata record, resolved by the host at mod + * initialization. + */ template struct HookImpl { static inline R (*g_orig)(A...) = nullptr; @@ -333,60 +94,60 @@ struct NameTag {}; } // namespace detail /* - * Typed hook on a function named at compile time (&daAlink_c::execute, &free_fn). - * Member functions may be virtual: the install decodes the member function pointer and hooks the - * class's own overrider. + * Typed base for a hook on a function named at compile time (&daAlink_c::execute, &free_fn). + * Instantiate through DEFINE_HOOK, which pairs it with the metadata record the host resolves. */ template struct Hook; template -struct Hook : HookImpl, R, C*, A...> { - static ModResult resolve_target(const HookService* hooks, void** out) { - return detail::member_target(hooks, Target, out); - } -}; +struct Hook : HookImpl, R, C*, A...> {}; template -struct Hook : HookImpl, R, const C*, A...> { - static ModResult resolve_target(const HookService* hooks, void** out) { - return detail::member_target(hooks, Target, out); - } -}; +struct Hook : HookImpl, R, const C*, A...> {}; template -struct Hook : HookImpl, R, A...> { - static ModResult resolve_target(const HookService*, void** out) { - *out = mfp_addr(Target); - return MOD_OK; - } -}; +struct Hook : HookImpl, R, A...> {}; /* - * Typed hook on a function by its symbol name, for targets you can't name in C++: file-local - * statics, private members, or symbols without a header. The signature is written free-style with - * the receiver first and is *not* compiler-checked. - * - * using HookshotHit = dusk::mods::NamedHook< - * "daAlink_hookshotAtHitCallBack", - * void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*)>; - * dusk::mods::hook_add_pre(svc_hook, on_hookshot_hit); + * Typed base for a hook on a function by its symbol name, for targets you can't name in C++: + * file-local statics, private members, or symbols without a header. The signature is written + * free-style with the receiver first and is *not* compiler-checked. Instantiate through + * DEFINE_HOOK_SYMBOL. */ template struct NamedHook; template -struct NamedHook : HookImpl, R, A...> { - static ModResult resolve_target(const HookService* hooks, void** out) { - HookSymbolFlags flags{}; - const ModResult resolved = hooks->resolve(mod_ctx, Name.chars, out, &flags); - if (resolved == MOD_OK && (flags & HOOK_SYMBOL_CODE) == 0) { - *out = nullptr; - return MOD_INVALID_ARGUMENT; - } - return resolved; +struct NamedHook : HookImpl, R, A...> {}; + +/* + * Declare a hook target. The declaration emits a metadata record that the host resolves at mod + * initialization. Every hook target must be declared. + * + * DEFINE_HOOK(&daAlink_c::execute, LinkExecute); + * DEFINE_HOOK_SYMBOL("daAlink_hookshotAtHitCallBack", + * void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*), HookshotHit); + * + * dusk::mods::hook_add_pre(svc_hook, on_link_execute); + * + * DEFINE_HOOK_SYMBOL names may be the platform mangled name (dlopen convention, no Mach-O + * leading underscore) or the demangled qualified display name; overloaded display names are + * ambiguous and need the mangled form. + */ +#define DEFINE_HOOK(target, alias) \ + MOD_META_RECORD static constinit auto mod_meta_hook_##alias = \ + ::dusk::mods::detail::make_hook_record<(target), ::dusk::mods::FixedString{#target}>(); \ + struct alias : ::dusk::mods::Hook<(target)> { \ + static void* resolved_target() { return mod_meta_hook_##alias.resolved; } \ + } + +#define DEFINE_HOOK_SYMBOL(name, sig, alias) \ + MOD_META_RECORD static constinit auto mod_meta_hook_##alias = \ + ::dusk::mods::detail::make_hook_name_record<::dusk::mods::FixedString{name}>(); \ + struct alias : ::dusk::mods::NamedHook<::dusk::mods::FixedString{name}, sig> { \ + static void* resolved_target() { return mod_meta_hook_##alias.resolved; } \ } -}; template ModResult hook_install(const HookService* hooks) { @@ -396,20 +157,16 @@ ModResult hook_install(const HookService* hooks) { Entry::hooks = hooks; if (Entry::target == nullptr) { - const ModResult resolved = Entry::resolve_target(hooks, &Entry::target); - if (resolved != MOD_OK) { - return resolved; + void* resolved = Entry::resolved_target(); + if (resolved == nullptr) { + return MOD_UNAVAILABLE; } + Entry::target = resolved; } return hooks->install(mod_ctx, Entry::target, reinterpret_cast(Entry::trampoline), reinterpret_cast(&Entry::g_orig)); } -template -ModResult hook_install(const HookService* hooks) { - return hook_install >(hooks); -} - template ModResult hook_add_pre( const HookService* hooks, HookPreFn callback, const HookOptions* options = nullptr) { @@ -421,12 +178,6 @@ ModResult hook_add_pre( return hooks->add_pre(mod_ctx, Entry::target, callback, options); } -template -ModResult hook_add_pre( - const HookService* hooks, HookPreFn callback, const HookOptions* options = nullptr) { - return hook_add_pre >(hooks, callback, options); -} - template ModResult hook_add_post( const HookService* hooks, HookPostFn callback, const HookOptions* options = nullptr) { @@ -438,12 +189,6 @@ ModResult hook_add_post( return hooks->add_post(mod_ctx, Entry::target, callback, options); } -template -ModResult hook_add_post( - const HookService* hooks, HookPostFn callback, const HookOptions* options = nullptr) { - return hook_add_post >(hooks, callback, options); -} - template ModResult hook_replace( const HookService* hooks, HookReplaceFn callback, const HookOptions* options = nullptr) { @@ -455,10 +200,4 @@ ModResult hook_replace( return hooks->replace(mod_ctx, Entry::target, callback, options); } -template -ModResult hook_replace( - const HookService* hooks, HookReplaceFn callback, const HookOptions* options = nullptr) { - return hook_replace >(hooks, callback, options); -} - } // namespace dusk::mods diff --git a/include/mods/meta.hpp b/include/mods/meta.hpp new file mode 100644 index 0000000000..e99334cbb3 --- /dev/null +++ b/include/mods/meta.hpp @@ -0,0 +1,276 @@ +#pragma once + +#include "mods/api.h" + +#include +#include +#include +#include + +/* + * modmeta records. Each IMPORT_SERVICE/EXPORT_SERVICE/DEFINE_HOOK use places one + * constant-initialized record object in the metadata section. + */ +#if defined(_WIN32) +#pragma section("modmeta$a", read, write) +#pragma section("modmeta$d", read, write) +#pragma section("modmeta$z", read, write) +#define MOD_META_RECORD __declspec(allocate("modmeta$d")) +#elif defined(__APPLE__) +#define MOD_META_RECORD __attribute__((section("__DATA,__modmeta"), used)) +#elif defined(__has_attribute) && __has_attribute(retain) +#define MOD_META_RECORD __attribute__((section("modmeta"), used, retain)) +#else +#define MOD_META_RECORD __attribute__((section("modmeta"), used)) +#endif + +/* Section bounds for the mod_meta descriptor */ +#if defined(_WIN32) +#define MOD_META_BOUNDS_DEFN \ + extern "C" { \ + __declspec(allocate("modmeta$a")) constinit unsigned long long mod_meta_bounds_begin = 0; \ + __declspec(allocate("modmeta$z")) constinit unsigned long long mod_meta_bounds_end = 0; \ + } +#define MOD_META_BOUNDS_BEGIN (&mod_meta_bounds_begin) +#define MOD_META_BOUNDS_END (&mod_meta_bounds_end) +#elif defined(__APPLE__) +extern "C" const unsigned char mod_meta_bounds_begin[] __asm("section$start$__DATA$__modmeta"); +extern "C" const unsigned char mod_meta_bounds_end[] __asm("section$end$__DATA$__modmeta"); +#define MOD_META_BOUNDS_DEFN +#define MOD_META_BOUNDS_BEGIN (mod_meta_bounds_begin) +#define MOD_META_BOUNDS_END (mod_meta_bounds_end) +#else +extern "C" const unsigned char __start_modmeta[]; +extern "C" const unsigned char __stop_modmeta[]; +#define MOD_META_BOUNDS_DEFN +#define MOD_META_BOUNDS_BEGIN (__start_modmeta) +#define MOD_META_BOUNDS_END (__stop_modmeta) +#endif + +namespace dusk::mods { + +/* A string usable as a template argument: carries a symbol/target name into record builders + * and makes each hook declaration's static state unique. */ +template +struct FixedString { + char chars[N]{}; + constexpr FixedString(const char (&s)[N]) noexcept { + for (size_t i = 0; i < N; ++i) { + chars[i] = s[i]; + } + } +}; + +namespace detail { + +template +constexpr std::string_view class_name() { +#if defined(__clang__) || defined(__GNUC__) + // "... class_name() [T = daAlink_c]" / "... [with T = daAlink_c; ...]" + constexpr std::string_view fn = __PRETTY_FUNCTION__; + constexpr size_t start = fn.find("T = ") + 4; + return fn.substr(start, fn.find_first_of(";]", start) - start); +#elif defined(_MSC_VER) + // "... class_name(void)" + constexpr std::string_view fn = __FUNCSIG__; + constexpr size_t start = fn.find("class_name<") + 11; + constexpr std::string_view name = fn.substr(start, fn.rfind(">(") - start); + if constexpr (name.starts_with("class ")) { + return name.substr(6); + } else if constexpr (name.starts_with("struct ")) { + return name.substr(7); + } else { + return name; + } +#else +#error "unsupported compiler" +#endif +} + +/* The symbol name of C's vtable. Only unscoped, non-template class names are supported (an + * empty result makes hooks on virtual members of C fail resolution, which is reported). */ +template +constexpr auto vtable_symbol() { + constexpr std::string_view name = class_name(); + constexpr bool simple = name.find_first_of(":<> ") == std::string_view::npos; + // "_ZTV" + decimal length + name / "??_7" + name + "@@6B@", NUL-terminated + std::array out{}; + if constexpr (!simple) { + return out; + } + size_t n = 0; +#if defined(_WIN32) + for (char c : {'?', '?', '_', '7'}) { + out[n++] = c; + } + for (char c : name) { + out[n++] = c; + } + for (char c : {'@', '@', '6', 'B', '@'}) { + out[n++] = c; + } +#else + for (char c : {'_', 'Z', 'T', 'V'}) { + out[n++] = c; + } + size_t len = name.size(); + char digits[8]{}; + size_t d = 0; + while (len != 0) { + digits[d++] = static_cast('0' + len % 10); + len /= 10; + } + while (d != 0) { + out[n++] = digits[--d]; + } + for (char c : name) { + out[n++] = c; + } +#endif + return out; +} + +template +struct member_traits; +template +struct member_traits { + using Class = C; +}; +template +struct member_traits { + using Class = C; +}; + +consteval size_t cstr_len(const char* s) { + size_t n = 0; + while (s[n] != '\0') { + ++n; + } + return n; +} + +consteval void copy_service_id(char (&dst)[MOD_META_SERVICE_ID_SIZE], const char* id) { + size_t n = 0; + for (; id[n] != '\0'; ++n) { + if (n + 1 >= MOD_META_SERVICE_ID_SIZE) { + throw "service id exceeds MOD_META_SERVICE_ID_SIZE"; + } + dst[n] = id[n]; + } +} + +consteval ModMetaImport make_import( + const char* serviceId, uint16_t major, uint16_t minMinor, uint8_t flags, void* slot) { + ModMetaImport r{}; + r.rec = {sizeof(ModMetaImport), MOD_META_IMPORT, flags}; + r.major_version = major; + r.min_minor_version = minMinor; + r.slot = slot; + copy_service_id(r.service_id, serviceId); + return r; +} + +consteval ModMetaExport make_export( + const char* serviceId, uint16_t major, uint16_t minor, uint8_t flags, const void* service) { + ModMetaExport r{}; + r.rec = {sizeof(ModMetaExport), MOD_META_EXPORT, flags}; + r.major_version = major; + r.minor_version = minor; + r.service = service; + copy_service_id(r.service_id, serviceId); + return r; +} + +consteval ModMetaHeader make_header() { + ModMetaHeader r{}; + r.rec = {sizeof(ModMetaHeader), MOD_META_HEADER, 0}; + r.abi_version = MOD_ABI_VERSION; + return r; +} + +/* + * Typed record variants: embedding the target as its native type makes the compiler emit the + * on-disk representation (relocations, PMF slot words) that static parsers read; the layouts + * match the byte-view structs in api.h. + */ + +template +struct HookFnRecord { + ModMetaRecord rec; + uint32_t reserved; + F target; + void* resolved; +}; + +template +struct HookMemRecord { + ModMetaRecord rec; + uint32_t reserved; + union { + F fn; + unsigned char raw[16]; + } pmf; + void* resolved; + char names[N]; +}; + +template +struct HookNameRecord { + ModMetaRecord rec; + uint32_t reserved; + void* resolved; + char name[N]; +}; + +template +constexpr size_t align_up(size_t n) { + return (n + (N - 1)) & ~(N - 1); +} + +template +consteval auto make_hook_record() { + using F = decltype(Target); + // Strip the leading '&' of the stringified target expression for display. + constexpr size_t dispFrom = Disp.chars[0] == '&' ? 1 : 0; + constexpr size_t dispLen = sizeof(Disp.chars) - 1 - dispFrom; + if constexpr (std::is_member_function_pointer_v) { + using C = member_traits::Class; + static_assert(sizeof(F) <= 16, "unsupported pointer-to-member representation"); + constexpr auto vtbl = vtable_symbol(); + constexpr size_t vtblLen = std::string_view{vtbl.data()}.size(); + constexpr size_t n = align_up<8>(vtblLen + 1 + dispLen + 1); + HookMemRecord r{}; + r.rec = {sizeof(r), MOD_META_HOOK_MEM, 0}; + r.pmf.fn = Target; + size_t at = 0; + for (size_t i = 0; i < vtblLen; ++i) { + r.names[at++] = vtbl[i]; + } + r.names[at++] = '\0'; + for (size_t i = 0; i < dispLen; ++i) { + r.names[at++] = Disp.chars[dispFrom + i]; + } + return r; + } else { + static_assert(std::is_pointer_v && std::is_function_v>, + "hook target must be a function or member function"); + HookFnRecord r{}; + r.rec = {sizeof(r), MOD_META_HOOK_FN, 0}; + r.target = Target; + return r; + } +} + +template +consteval auto make_hook_name_record() { + constexpr size_t len = sizeof(Name.chars) - 1; + HookNameRecord(len + 1)> r{}; + r.rec = {sizeof(r), MOD_META_HOOK_NAME, 0}; + for (size_t i = 0; i < len; ++i) { + r.name[i] = Name.chars[i]; + } + return r; +} + +} // namespace detail +} // namespace dusk::mods diff --git a/include/mods/service.hpp b/include/mods/service.hpp index d79b53f24d..e6c5c395e1 100644 --- a/include/mods/service.hpp +++ b/include/mods/service.hpp @@ -1,60 +1,17 @@ #pragma once #include "mods/api.h" +#include "mods/meta.hpp" #include #include #include -#include namespace dusk::mods { template struct ServiceTraits; -namespace detail { - -inline std::vector& imports() { - static std::vector entries; - return entries; -} - -inline std::vector& exports() { - static std::vector entries; - return entries; -} - -inline int register_import(ServiceImport entry) { - imports().push_back(entry); - return 0; -} - -inline int register_export(ServiceExport entry) { - exports().push_back(entry); - return 0; -} - -inline const ModManifest* manifest() { - static ModManifest manifest{ - sizeof(ModManifest), - MOD_ABI_VERSION, - nullptr, - 0, - nullptr, - 0, - }; - - auto& importEntries = imports(); - auto& exportEntries = exports(); - manifest.imports = importEntries.data(); - manifest.import_count = importEntries.size(); - manifest.exports = exportEntries.data(); - manifest.export_count = exportEntries.size(); - return &manifest; -} - -} // namespace detail - inline ModResult set_error(ModError* outError, ModResult code, const char* message) { if (outError != nullptr && outError->struct_size >= sizeof(ModError)) { outError->code = code; @@ -71,9 +28,16 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa #define DEFINE_MOD() \ extern "C" { \ MOD_EXPORT ModContext* mod_ctx = nullptr; \ - MOD_EXPORT const ModManifest* mod_get_manifest(void) { \ - return ::dusk::mods::detail::manifest(); \ } \ + MOD_META_RECORD static constinit ModMetaHeader mod_meta_header_record = \ + ::dusk::mods::detail::make_header(); \ + MOD_META_BOUNDS_DEFN \ + extern "C" { \ + MOD_EXPORT constinit const ModMeta mod_meta = { \ + sizeof(ModMeta), \ + MOD_META_BOUNDS_BEGIN, \ + MOD_META_BOUNDS_END, \ + }; \ } // Declares `static const service_type* variable`, filled in by the host before mod_initialize. @@ -82,15 +46,10 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa #define IMPORT_SERVICE_EX( \ service_type, variable, service_id_value, major_value, min_minor_value, flags_value) \ static const service_type* variable = nullptr; \ - [[maybe_unused]] static const int mod_import_registration_##variable = \ - ::dusk::mods::detail::register_import(ServiceImport{ \ - sizeof(ServiceImport), \ - (service_id_value), \ - static_cast(major_value), \ - static_cast(min_minor_value), \ - static_cast(flags_value), \ - &(variable), \ - }) + MOD_META_RECORD static constinit ModMetaImport mod_meta_import_##variable = \ + ::dusk::mods::detail::make_import((service_id_value), static_cast(major_value), \ + static_cast(min_minor_value), static_cast(flags_value), \ + &(variable)) #define IMPORT_SERVICE_VERSION(service_type, variable, min_minor_value) \ IMPORT_SERVICE_EX(service_type, variable, ::dusk::mods::ServiceTraits::id, \ @@ -108,31 +67,15 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa IMPORT_OPTIONAL_SERVICE_VERSION(service_type, variable, 0) #define EXPORT_SERVICE_AS(instance, service_id_value) \ - namespace { \ - const int mod_export_registration_##instance = \ - ::dusk::mods::detail::register_export(ServiceExport{ \ - sizeof(ServiceExport), \ - (service_id_value), \ - (instance).header.major_version, \ - (instance).header.minor_version, \ - SERVICE_EXPORT_STATIC, \ - &(instance), \ - }); \ - } + MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##instance = \ + ::dusk::mods::detail::make_export((service_id_value), (instance).header.major_version, \ + (instance).header.minor_version, SERVICE_EXPORT_STATIC, &(instance)) #define EXPORT_SERVICE(instance) \ EXPORT_SERVICE_AS( \ - instance, ::dusk::mods::ServiceTraits >::id) + instance, ::dusk::mods::ServiceTraits>::id) #define EXPORT_DEFERRED_SERVICE(token, service_id_value, major_value, minor_value) \ - namespace { \ - const int mod_deferred_export_registration_##token = \ - ::dusk::mods::detail::register_export(ServiceExport{ \ - sizeof(ServiceExport), \ - (service_id_value), \ - static_cast(major_value), \ - static_cast(minor_value), \ - SERVICE_EXPORT_DEFERRED, \ - nullptr, \ - }); \ - } + MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##token = \ + ::dusk::mods::detail::make_export((service_id_value), static_cast(major_value), \ + static_cast(minor_value), SERVICE_EXPORT_DEFERRED, nullptr) diff --git a/mods/shadow_mod/src/mod.cpp b/mods/shadow_mod/src/mod.cpp index 0eec4fecef..4e3470c9be 100644 --- a/mods/shadow_mod/src/mod.cpp +++ b/mods/shadow_mod/src/mod.cpp @@ -93,10 +93,15 @@ constexpr float kMaxLightLookahead = 10000.0f; constexpr float kSunMoonDistance = 80000.0f; constexpr float kSunMoonZDistance = -48000.0f; -using ClipperSphereClip = int (J3DUClipper::*)(f32 const (*)[4], Vec, f32) const; -using ClipperBoxClip = int (J3DUClipper::*)(f32 const (*)[4], Vec*, Vec*) const; -constexpr ClipperSphereClip kClipperSphereClip = static_cast(&J3DUClipper::clip); -constexpr ClipperBoxClip kClipperBoxClip = static_cast(&J3DUClipper::clip); +DEFINE_HOOK(&dDlst_shadowControl_c::imageDraw, GameShadowImageDraw); +DEFINE_HOOK(&dDlst_shadowControl_c::draw, GameShadowDraw); +DEFINE_HOOK(&drawCloudShadow, CloudShadowDraw); +DEFINE_HOOK(static_cast(&J3DUClipper::clip), + ClipperSphereClip); +DEFINE_HOOK( + static_cast(&J3DUClipper::clip), + ClipperBoxClip); +DEFINE_HOOK(GXCopyTex, CopyTex); // Mirror of the WGSL Uniforms struct (keep in sync with res/shadow.wgsl). struct ShadowUniforms { @@ -1048,20 +1053,18 @@ MOD_EXPORT ModResult mod_initialize(ModError* error) { // Skip the game's own shadow rendering while the dynamic pass is active: the // shadowControl pair covers the actor real/blob shadows, drawCloudShadow the weather // cloud shadows. - if (dusk::mods::hook_add_pre<&dDlst_shadowControl_c::imageDraw>(svc_hook, on_game_shadow_pre) != - MOD_OK || - dusk::mods::hook_add_pre<&dDlst_shadowControl_c::draw>(svc_hook, on_game_shadow_pre) != - MOD_OK || - dusk::mods::hook_add_pre<&drawCloudShadow>(svc_hook, on_game_shadow_pre) != MOD_OK) + if (dusk::mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK || + dusk::mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK || + dusk::mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK) { return dusk::mods::set_error(error, MOD_ERROR, "failed to hook game shadow rendering"); } - if (dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK || - dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK) + if (dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK || + dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK) { return dusk::mods::set_error(error, MOD_ERROR, "failed to hook frustum clipping"); } - if (dusk::mods::hook_add_pre(svc_hook, on_copy_tex_pre) != MOD_OK) { + if (dusk::mods::hook_add_pre(svc_hook, on_copy_tex_pre) != MOD_OK) { return dusk::mods::set_error(error, MOD_ERROR, "failed to hook GXCopyTex"); } UiModsPanelDesc panelDesc = UI_MODS_PANEL_DESC_INIT; diff --git a/src/dusk/mods/loader/loader.cpp b/src/dusk/mods/loader/loader.cpp index e1bb2797c8..11077532fa 100644 --- a/src/dusk/mods/loader/loader.cpp +++ b/src/dusk/mods/loader/loader.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -16,6 +17,7 @@ #include "dusk/io.hpp" #include "dusk/mods/log_buffer.hpp" #include "dusk/mods/svc/config.hpp" +#include "dusk/mods/svc/hook.hpp" #include "dusk/mods/svc/registry.hpp" #include "dusk/ui/mods_window.hpp" #include "dusk/ui/ui.hpp" @@ -220,31 +222,149 @@ static ModMetadata load_metadata(const std::filesystem::path& modPath, ModBundle }; } -static bool validate_manifest(const ModManifest* manifest, LoadedMod& mod) { - if (manifest == nullptr) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "returned a null mod manifest"); - mod.nativeStatus = NativeModStatus::MissingExport; +// True if the first `capacity` bytes of `str` contain a NUL. +static bool terminated_within(const char* str, size_t capacity) { + return std::memchr(str, '\0', capacity) != nullptr; +} + +static bool parse_meta(NativeMod& native, LoadedMod& mod) { + const ModMeta* meta = native.meta; + if (meta->struct_size < sizeof(ModMeta)) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "mod_meta descriptor has invalid size {}", + meta->struct_size); + mod.nativeStatus = NativeModStatus::InvalidMetadata; return false; } - if (manifest->struct_size != sizeof(ModManifest)) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "manifest has invalid size {} (expected {})", - manifest->struct_size, sizeof(ModManifest)); - mod.nativeStatus = NativeModStatus::ApiVersionMismatch; - return false; - } - if (manifest->abi_version != MOD_ABI_VERSION) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "expects ABI v{} but engine is v{}, skipping", - manifest->abi_version, MOD_ABI_VERSION); - mod.nativeStatus = NativeModStatus::ApiVersionMismatch; - return false; - } - if ((manifest->import_count > 0 && manifest->imports == nullptr) || - (manifest->export_count > 0 && manifest->exports == nullptr)) + const auto* cursor = static_cast(meta->records_begin); + const auto* end = static_cast(meta->records_end); + if (cursor == nullptr || end == nullptr || cursor > end || + (reinterpret_cast(cursor) & 7) != 0) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "manifest has invalid import/export arrays"); - mod.nativeStatus = NativeModStatus::MissingExport; + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "mod_meta section bounds are invalid"); + mod.nativeStatus = NativeModStatus::InvalidMetadata; return false; } + + ModMetaParsed parsed; + size_t headerCount = 0; + const auto invalid = [&](std::string_view why) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "invalid metadata record at offset {}: {}", + cursor - static_cast(meta->records_begin), why); + mod.nativeStatus = NativeModStatus::InvalidMetadata; + return false; + }; + + while (cursor < end) { + if (end - cursor < 8) { + return invalid("trailing bytes"); + } + uint64_t first = 0; + std::memcpy(&first, cursor, sizeof(first)); + if (first == 0) { // linker padding / bounds sentinel + cursor += 8; + continue; + } + + const auto* rec = reinterpret_cast(cursor); + const size_t size = rec->size; + if (size < 8 || size % 8 != 0 || size > static_cast(end - cursor)) { + return invalid("bad record size"); + } + + switch (rec->kind) { + case MOD_META_PAD: + break; + case MOD_META_HEADER: { + if (size < sizeof(ModMetaHeader)) { + return invalid("truncated header record"); + } + const auto* header = reinterpret_cast(rec); + ++headerCount; + parsed.abiVersion = header->abi_version; + break; + } + case MOD_META_IMPORT: { + if (size < sizeof(ModMetaImport)) { + return invalid("truncated import record"); + } + auto* record = reinterpret_cast(const_cast(cursor)); + if (!terminated_within(record->service_id, sizeof(record->service_id))) { + return invalid("unterminated import service id"); + } + parsed.imports.push_back(record); + break; + } + case MOD_META_EXPORT: { + if (size < sizeof(ModMetaExport)) { + return invalid("truncated export record"); + } + auto* record = reinterpret_cast(const_cast(cursor)); + if (!terminated_within(record->service_id, sizeof(record->service_id))) { + return invalid("unterminated export service id"); + } + parsed.exports.push_back(record); + break; + } + case MOD_META_HOOK_FN: { + if (size < sizeof(ModMetaHookFn)) { + return invalid("truncated hook record"); + } + parsed.hookFns.push_back( + reinterpret_cast(const_cast(cursor))); + break; + } + case MOD_META_HOOK_MEM: { + if (size <= sizeof(ModMetaHookMem)) { + return invalid("truncated hook record"); + } + auto* record = reinterpret_cast(const_cast(cursor)); + const char* strings = reinterpret_cast(cursor) + sizeof(ModMetaHookMem); + const size_t capacity = size - sizeof(ModMetaHookMem); + if (!terminated_within(strings, capacity)) { + return invalid("unterminated hook vtable symbol"); + } + const size_t vtableLen = std::char_traits::length(strings); + if (!terminated_within(strings + vtableLen + 1, capacity - vtableLen - 1)) { + return invalid("unterminated hook display name"); + } + parsed.hookMems.push_back(record); + break; + } + case MOD_META_HOOK_NAME: { + if (size <= sizeof(ModMetaHookName)) { + return invalid("truncated hook record"); + } + auto* record = reinterpret_cast(const_cast(cursor)); + const char* name = reinterpret_cast(cursor) + sizeof(ModMetaHookName); + if (!terminated_within(name, size - sizeof(ModMetaHookName))) { + return invalid("unterminated hook symbol name"); + } + parsed.hookNames.push_back(record); + break; + } + default: + // Additive record kinds may appear within a format version; skip them. + log::write(mod.metadata.id, LOG_LEVEL_DEBUG, "skipping unknown metadata record kind {}", + rec->kind); + break; + } + cursor += size; + } + + if (headerCount != 1) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "expected 1 metadata header record, found {}", + headerCount); + mod.nativeStatus = NativeModStatus::InvalidMetadata; + return false; + } + if (parsed.abiVersion != MOD_ABI_VERSION) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "expects ABI v{} but engine is v{}, skipping", + parsed.abiVersion, MOD_ABI_VERSION); + mod.nativeStatus = NativeModStatus::ApiVersionMismatch; + return false; + } + + native.parsed = std::move(parsed); return true; } @@ -276,6 +396,8 @@ static std::string native_status_message(const NativeModStatus status) { return "Mod ABI version mismatch"; case NativeModStatus::MissingExport: return "Missing required mod API exports"; + case NativeModStatus::InvalidMetadata: + return "Invalid mod metadata records"; case NativeModStatus::Unknown: return "Unknown mod load failure"; case NativeModStatus::None: @@ -375,13 +497,13 @@ void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { return; } - const auto getManifest = nativeMod->handle->LookupSymbol("mod_get_manifest"); + nativeMod->meta = nativeMod->handle->LookupSymbol("mod_meta"); nativeMod->contextSymbol = nativeMod->handle->LookupSymbol("mod_ctx"); nativeMod->fn_initialize = nativeMod->handle->LookupSymbol("mod_initialize"); nativeMod->fn_update = nativeMod->handle->LookupSymbol("mod_update"); nativeMod->fn_shutdown = nativeMod->handle->LookupSymbol("mod_shutdown"); - if (!getManifest || !nativeMod->contextSymbol || !nativeMod->fn_initialize || + if (!nativeMod->meta || !nativeMod->contextSymbol || !nativeMod->fn_initialize || !nativeMod->fn_update || !nativeMod->fn_shutdown) { log::write(mod.metadata.id, LOG_LEVEL_ERROR, @@ -391,8 +513,7 @@ void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { return; } - nativeMod->manifest = getManifest(); - if (!validate_manifest(nativeMod->manifest, mod)) { + if (!parse_meta(*nativeMod, mod)) { return; } @@ -427,28 +548,22 @@ void ModLoader::drain_retired_natives() { m_retiredNatives.clear(); } -static ModManifestInfo build_manifest_info(const ModManifest& manifest) { +static ModManifestInfo build_manifest_info(const ModMetaParsed& parsed) { ModManifestInfo info; - info.imports.reserve(manifest.import_count); - for (size_t i = 0; i < manifest.import_count; ++i) { - const auto& serviceImport = manifest.imports[i]; - if (serviceImport.struct_size != sizeof(ServiceImport) || - !svc::valid_service_id(serviceImport.service_id)) - { + info.imports.reserve(parsed.imports.size()); + for (const auto* record : parsed.imports) { + if (!svc::valid_service_id(record->service_id)) { continue; } - info.imports.push_back({serviceImport.service_id, serviceImport.major_version, - (serviceImport.flags & SERVICE_IMPORT_OPTIONAL) == 0}); + info.imports.push_back({record->service_id, record->major_version, + (record->rec.flags & SERVICE_IMPORT_OPTIONAL) == 0}); } - info.exports.reserve(manifest.export_count); - for (size_t i = 0; i < manifest.export_count; ++i) { - const auto& serviceExport = manifest.exports[i]; - if (serviceExport.struct_size != sizeof(ServiceExport) || - !svc::valid_service_id(serviceExport.service_id)) - { + info.exports.reserve(parsed.exports.size()); + for (const auto* record : parsed.exports) { + if (!svc::valid_service_id(record->service_id)) { continue; } - info.exports.push_back({serviceExport.service_id, serviceExport.major_version}); + info.exports.push_back({record->service_id, record->major_version}); } return info; } @@ -484,24 +599,20 @@ static bool required_deps_active(const LoadedMod& mod) { // A deferred export that was not published by the end of the provider's initialization can // never resolve, which is almost certainly a bug in the provider. static void warn_unpublished_deferred_exports(const LoadedMod& mod) { - if (!mod.active || !mod.native || mod.native->manifest == nullptr) { + if (!mod.active || !mod.native) { return; } - const auto& manifest = *mod.native->manifest; - for (size_t i = 0; i < manifest.export_count; ++i) { - const auto& serviceExport = manifest.exports[i]; - if (serviceExport.struct_size != sizeof(ServiceExport) || - (serviceExport.flags & SERVICE_EXPORT_DEFERRED) == 0) - { + for (const auto* serviceExport : mod.native->parsed.exports) { + if ((serviceExport->rec.flags & SERVICE_EXPORT_DEFERRED) == 0) { continue; } const auto* record = - svc::find_service_record(serviceExport.service_id, serviceExport.major_version); + svc::find_service_record(serviceExport->service_id, serviceExport->major_version); if (record != nullptr && record->service == nullptr) { log::write(mod.metadata.id, LOG_LEVEL_WARN, "declared deferred service '{}@{}' but never published it during initialization", - serviceExport.service_id, serviceExport.major_version); + serviceExport->service_id, serviceExport->major_version); } } } @@ -560,7 +671,7 @@ void ModLoader::try_load_mod( Log.error("Native mod '{}' failed to load, disabling", mod.metadata.id); fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); } else { - mod.manifestInfo = build_manifest_info(*mod.native->manifest); + mod.manifestInfo = build_manifest_info(mod.native->parsed); } } @@ -593,6 +704,8 @@ bool ModLoader::activate_mod(LoadedMod& mod) { return false; } + svc::hook_resolve_mod_records(mod); + *mod.native->contextSymbol = mod.context.get(); log::write(mod.metadata.id, LOG_LEVEL_TRACE, "calling mod_initialize"); @@ -929,7 +1042,7 @@ bool ModLoader::reload_bundle(LoadedMod& mod) { fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); return false; } - newInfo = build_manifest_info(*mod.native->manifest); + newInfo = build_manifest_info(mod.native->parsed); } else { mod.nativeStatus = NativeModStatus::None; ++mod.cacheGeneration; @@ -998,8 +1111,7 @@ void ModLoader::apply_lifecycle_change(LoadedMod& target, const bool reload) { if (register_static_service_exports(*mod)) { mod->servicesRegistered = true; } else { - log::write( - mod->metadata.id, LOG_LEVEL_ERROR, "failed to register service exports"); + log::write(mod->metadata.id, LOG_LEVEL_ERROR, "failed to register service exports"); deactivate_mod(*mod); } } diff --git a/src/dusk/mods/svc/hook.cpp b/src/dusk/mods/svc/hook.cpp index 41399bf97d..35324185e6 100644 --- a/src/dusk/mods/svc/hook.cpp +++ b/src/dusk/mods/svc/hook.cpp @@ -6,6 +6,7 @@ #if DUSK_CODE_MODS #include "dusk/logging.h" +#include "dusk/mods/log_buffer.hpp" #include #include @@ -13,6 +14,7 @@ #include #include #include +#include #include #include #endif @@ -64,8 +66,29 @@ struct InstalledHook { std::unordered_map s_registry; std::unordered_map s_installed; +std::unordered_map> s_declaredTargets; uint64_t s_nextOrder = 0; +bool declared_target(const ModContext* context, void* fnAddr) { + if (context == nullptr) { + return false; + } + const auto it = s_declaredTargets.find(context); + if (it == s_declaredTargets.end()) { + return false; + } + const auto addr = reinterpret_cast(fnAddr); + return std::ranges::find(it->second, addr) != it->second.end(); +} + +ModResult reject_undeclared(ModContext* context, void* fnAddr) { + log::write(mod_id_from_context(context), LOG_LEVEL_ERROR, + "tried to hook undeclared target {:p}; hook targets must be declared with " + "DEFINE_HOOK/DEFINE_HOOK_SYMBOL", + fnAddr); + return MOD_INVALID_ARGUMENT; +} + HookOptions normalize_options(const HookOptions* options) { if (options == nullptr || options->struct_size < sizeof(HookOptions)) { return HOOK_OPTIONS_INIT; @@ -200,6 +223,9 @@ ModResult hook_install(ModContext* context, void* fnAddr, void* trampolineFn, vo } fnAddr = resolve_import_thunk(fnAddr); + if (!declared_target(context, fnAddr)) { + return reject_undeclared(context, fnAddr); + } const auto key = reinterpret_cast(fnAddr); if (const auto it = s_installed.find(key); it != s_installed.end()) { auto& entry = it->second; @@ -243,6 +269,9 @@ ModResult hook_add_pre( return MOD_INVALID_ARGUMENT; } fnAddr = resolve_import_thunk(fnAddr); + if (!declared_target(context, fnAddr)) { + return reject_undeclared(context, fnAddr); + } auto& hooks = s_registry[reinterpret_cast(fnAddr)].pre; hooks.push_back({context, callback, normalize_options(options), s_nextOrder++}); sort_hooks(hooks); @@ -255,6 +284,9 @@ ModResult hook_add_post( return MOD_INVALID_ARGUMENT; } fnAddr = resolve_import_thunk(fnAddr); + if (!declared_target(context, fnAddr)) { + return reject_undeclared(context, fnAddr); + } auto& hooks = s_registry[reinterpret_cast(fnAddr)].post; hooks.push_back({context, nullptr, callback, normalize_options(options), s_nextOrder++}); sort_hooks(hooks); @@ -269,6 +301,9 @@ ModResult hook_replace( const HookOptions normalized = normalize_options(options); fnAddr = resolve_import_thunk(fnAddr); + if (!declared_target(context, fnAddr)) { + return reject_undeclared(context, fnAddr); + } auto& slot = s_registry[reinterpret_cast(fnAddr)]; if (slot.replace.replaceCallback == nullptr) { slot.replace = {context, callback, nullptr, normalized, s_nextOrder++}; @@ -371,8 +406,187 @@ ModResult hook_dispatch_post(ModContext*, void* fnAddr, void* args, void* retval return MOD_OK; } +#if defined(_WIN32) +/* Follow jump stubs, then match the MSVC vcall thunk a virtual mfp points at. + * Returns the vtable slot's byte offset, or npos when fn is not a vcall thunk. */ +size_t vcall_slot_offset(const void*& fn) noexcept { + constexpr size_t npos = static_cast(-1); +#if defined(_M_X64) || defined(__x86_64__) + const auto* p = static_cast(fn); + for (int i = 0; i < 8 && p[0] == 0xE9; ++i) { // incremental-link stubs + int32_t rel; + std::memcpy(&rel, p + 1, 4); + p += 5 + rel; + } + fn = p; + // The vptr load. Unoptimized clang-cl thunks spill/reload rcx first + // (push rax; mov [rsp], rcx; mov rcx, [rsp]), so scan a short window. + const uint8_t* q = nullptr; + for (int i = 0; i <= 12; ++i) { + if (p[i] == 0x48 && p[i + 1] == 0x8B && p[i + 2] == 0x01) { // mov rax, [rcx] + q = p + i + 3; + break; + } + } + if (q == nullptr) { + return npos; + } + if (q[0] == 0xFF && q[1] == 0x20) { // jmp [rax] (MSVC) + return 0; + } + if (q[0] == 0xFF && q[1] == 0x60) { // jmp [rax + imm8] + return static_cast(q[2]); + } + if (q[0] == 0xFF && q[1] == 0xA0) { // jmp [rax + imm32] + int32_t off; + std::memcpy(&off, q + 2, 4); + return off; + } + // clang-cl: mov rax, [rax + off]; (pop r10;) jmp rax. Requiring the jmp rax + // distinguishes the thunk from an ordinary getter that begins the same way. + if (q[0] == 0x48 && q[1] == 0x8B && (q[2] == 0x00 || q[2] == 0x40 || q[2] == 0x80)) { + size_t off = 0; + const uint8_t* r = q + 3; + if (q[2] == 0x40) { + off = static_cast(q[3]); + r = q + 4; + } else if (q[2] == 0x80) { + int32_t off32; + std::memcpy(&off32, q + 3, 4); + off = off32; + r = q + 7; + } + for (int i = 0; i <= 8; ++i) { + if (r[i] == 0xFF && r[i + 1] == 0xE0) { // jmp rax (48 REX optional) + return off; + } + } + } + return npos; +#elif defined(_M_ARM64) || defined(__aarch64__) + const auto* p = static_cast(fn); + uint32_t insn[3]; + for (int i = 0; i < 8; ++i) { // incremental-link `b` stubs + std::memcpy(insn, p, 4); + if ((insn[0] & 0xFC000000u) != 0x14000000u) { + break; + } + const auto imm26 = static_cast(insn[0] << 6) >> 6; + p += static_cast(imm26) * 4; + } + fn = p; + std::memcpy(insn, p, 12); + // ldr Xt, [x0]; ldr Xs, [Xt, #imm12*8]; br Xs + if ((insn[0] & 0xFFFFFFE0u) != 0xF9400000u) { + return npos; + } + const uint32_t t = insn[0] & 0x1Fu; + if ((insn[1] & 0xFFC003E0u) != (0xF9400000u | (t << 5))) { + return npos; + } + const uint32_t s = insn[1] & 0x1Fu; + if (insn[2] != (0xD61F0000u | (s << 5))) { + return npos; + } + return ((insn[1] >> 10) & 0xFFFu) * 8; +#else + (void)fn; + return npos; +#endif +} +#endif // _WIN32 + +bool resolve_symbol_checked(const char* symbol, bool requireCode, void** out, std::string& why) { + HookSymbolFlags flags{}; + switch (manifest::resolve(symbol, out, &flags)) { + case manifest::ResolveStatus::Ok: + if (requireCode && (flags & HOOK_SYMBOL_CODE) == 0) { + why = fmt::format("'{}' is not a code symbol", symbol); + return false; + } + return true; + case manifest::ResolveStatus::Unavailable: + why = "no symbol manifest for this build"; + return false; + case manifest::ResolveStatus::NotFound: + why = fmt::format("symbol '{}' not found", symbol); + return false; + case manifest::ResolveStatus::Ambiguous: + why = fmt::format("'{}' maps to more than one address; use the mangled name", symbol); + return false; + } + why = "unexpected resolve failure"; + return false; +} + +/* Decode a HOOK_MEM record's pointer-to-member representation into the target code address, + * mirroring what calling through the mfp would invoke. Virtual members hook the class's own + * overrider, read from its vtable (resolved from the symbol manifest). */ +void* resolve_member_record( + const ModMetaHookMem& record, const char* vtableSymbol, std::string& why) { + uintptr_t words[2]; + std::memcpy(words, record.pmf, sizeof(words)); + +#if defined(_WIN32) + const void* fn = reinterpret_cast(words[0]); + const size_t slot = vcall_slot_offset(fn); + if (slot == static_cast(-1)) { // not a vcall thunk: direct address + return const_cast(fn); + } + if (vtableSymbol[0] == '\0') { + why = "class name is not representable as a vtable symbol"; + return nullptr; + } + void* vtable = nullptr; + if (!resolve_symbol_checked(vtableSymbol, false, &vtable, why)) { + return nullptr; + } + // ??_7 points at the first slot. + return *reinterpret_cast(static_cast(vtable) + slot); +#else +#if defined(__aarch64__) || defined(__arm__) + // AAPCS C++ ABI: the virtual flag is bit 0 of the adjustment word (function + // addresses can't spare their low bit), and ptr holds the slot offset directly. + const bool isVirtual = (words[1] & 1) != 0; + const uintptr_t thisAdjust = words[1] >> 1; + const uintptr_t slotOffset = words[0]; +#else + // Itanium C++ ABI: virtual mfps set bit 0 of ptr; the slot offset is ptr - 1. + const bool isVirtual = (words[0] & 1) != 0; + const uintptr_t thisAdjust = words[1]; + const uintptr_t slotOffset = words[0] - 1; +#endif + if (!isVirtual) { // non-virtual: the address itself + return reinterpret_cast(words[0]); + } + if (thisAdjust != 0) { + // this-adjusting mfp (member of a secondary base): the slot offset is relative to a + // vtable we can't locate. Hook the overrider by name instead. + why = "virtual member of a secondary base; hook the overrider by name"; + return nullptr; + } + if (vtableSymbol[0] == '\0') { + why = "class name is not representable as a vtable symbol"; + return nullptr; + } + void* vtable = nullptr; + if (!resolve_symbol_checked(vtableSymbol, false, &vtable, why)) { + return nullptr; + } + // _ZTV points at the offset-to-top slot; the address point mfps index from is + // two pointers in (past offset-to-top and the typeinfo pointer). + void* target = + *reinterpret_cast(static_cast(vtable) + 2 * sizeof(void*) + slotOffset); + if (target == nullptr) { + why = "vtable slot is empty"; + } + return target; +#endif +} + void hook_remove_mod(LoadedMod& mod) { ModContext* context = mod.context.get(); + s_declaredTargets.erase(context); for (auto it = s_registry.begin(); it != s_registry.end();) { auto& slot = it->second; @@ -508,6 +722,56 @@ constexpr HookService s_hookService{ } // namespace +#if DUSK_CODE_MODS +void hook_resolve_mod_records(LoadedMod& mod) { + auto& declared = s_declaredTargets[mod.context.get()]; + declared.clear(); + if (!mod.native) { + return; + } + + const auto resolved = [&](void* target, void** slot) { + target = resolve_import_thunk(target); + *slot = target; + declared.push_back(reinterpret_cast(target)); + }; + const auto unresolved = [&](const char* what, std::string_view why, void** slot) { + *slot = nullptr; + log::write(mod.metadata.id, LOG_LEVEL_WARN, + "hook target '{}' did not resolve ({}); installing this hook will fail", what, why); + }; + + for (auto* record : mod.native->parsed.hookFns) { + if (record->target != nullptr) { + resolved(record->target, &record->resolved); + } else { + unresolved("", "null link-time target", &record->resolved); + } + } + for (auto* record : mod.native->parsed.hookMems) { + std::string why; + void* target = resolve_member_record(*record, hook_mem_vtable_symbol(*record), why); + if (target != nullptr) { + resolved(target, &record->resolved); + } else { + unresolved(hook_mem_display_name(*record), why, &record->resolved); + } + } + for (auto* record : mod.native->parsed.hookNames) { + const char* name = hook_name_symbol(*record); + std::string why; + void* target = nullptr; + if (resolve_symbol_checked(name, true, &target, why)) { + resolved(target, &record->resolved); + } else { + unresolved(name, why, &record->resolved); + } + } +} +#else +void hook_resolve_mod_records(LoadedMod&) {} +#endif // DUSK_CODE_MODS + constinit const ServiceModule g_hookModule{ .id = HOOK_SERVICE_ID, .majorVersion = HOOK_SERVICE_MAJOR, diff --git a/src/dusk/mods/svc/hook.hpp b/src/dusk/mods/svc/hook.hpp new file mode 100644 index 0000000000..d712a8054a --- /dev/null +++ b/src/dusk/mods/svc/hook.hpp @@ -0,0 +1,11 @@ +#pragma once + +namespace dusk::mods { +struct LoadedMod; +} + +namespace dusk::mods::svc { + +void hook_resolve_mod_records(LoadedMod& mod); + +} // namespace dusk::mods::svc diff --git a/src/dusk/mods/svc/registry.cpp b/src/dusk/mods/svc/registry.cpp index 338625230a..2f51791af3 100644 --- a/src/dusk/mods/svc/registry.cpp +++ b/src/dusk/mods/svc/registry.cpp @@ -217,29 +217,25 @@ void ModLoader::init_services() { } bool ModLoader::register_static_service_exports(LoadedMod& mod) { - if (!mod.native || mod.native->manifest == nullptr) { + if (!mod.native) { return true; } - const auto& manifest = *mod.native->manifest; - for (size_t i = 0; i < manifest.export_count; ++i) { - const auto& serviceExport = manifest.exports[i]; - if (serviceExport.struct_size != sizeof(ServiceExport) || - !svc::valid_service_id(serviceExport.service_id)) - { + for (const auto* serviceExport : mod.native->parsed.exports) { + if (!svc::valid_service_id(serviceExport->service_id)) { fail_mod(mod, MOD_INVALID_ARGUMENT, "Invalid service export descriptor"); return false; } - const bool deferred = (serviceExport.flags & SERVICE_EXPORT_DEFERRED) != 0; - if (!deferred && serviceExport.service == nullptr) { + const bool deferred = (serviceExport->rec.flags & SERVICE_EXPORT_DEFERRED) != 0; + if (!deferred && serviceExport->service == nullptr) { fail_mod(mod, MOD_INVALID_ARGUMENT, "Static service export has null service pointer"); return false; } const auto result = - svc::register_service(serviceExport.service_id, serviceExport.major_version, - serviceExport.minor_version, serviceExport.service, &mod, deferred); + svc::register_service(serviceExport->service_id, serviceExport->major_version, + serviceExport->minor_version, serviceExport->service, &mod, deferred); if (result != MOD_OK) { fail_mod(mod, result, "Service export registration failed"); return false; @@ -262,18 +258,13 @@ std::string ModLoader::describe_missing_import( // No record can also mean the provider failed or is disabled and its services were removed. for (const auto& other : mods()) { - if ((other.active && !other.loadFailed) || !other.native || - other.native->manifest == nullptr) - { + if ((other.active && !other.loadFailed) || !other.native) { continue; } - const auto& manifest = *other.native->manifest; - for (size_t i = 0; i < manifest.export_count; ++i) { - const auto& serviceExport = manifest.exports[i]; - if (serviceExport.struct_size == sizeof(ServiceExport) && - svc::valid_service_id(serviceExport.service_id) && - std::string_view{serviceExport.service_id} == serviceId && - serviceExport.major_version == majorVersion) + for (const auto* serviceExport : other.native->parsed.exports) { + if (svc::valid_service_id(serviceExport->service_id) && + std::string_view{serviceExport->service_id} == serviceId && + serviceExport->major_version == majorVersion) { return fmt::format("Required service {}@{} unavailable: provider '{}' {}", serviceId, majorVersion, other.metadata.id, @@ -286,35 +277,31 @@ std::string ModLoader::describe_missing_import( } bool ModLoader::resolve_service_imports(LoadedMod& mod) { - if (!mod.native || mod.native->manifest == nullptr) { + if (!mod.native) { return true; } - const auto& manifest = *mod.native->manifest; - for (size_t i = 0; i < manifest.import_count; ++i) { - const auto& serviceImport = manifest.imports[i]; - if (serviceImport.struct_size != sizeof(ServiceImport) || - !svc::valid_service_id(serviceImport.service_id) || serviceImport.slot == nullptr) - { + for (const auto* serviceImport : mod.native->parsed.imports) { + if (!svc::valid_service_id(serviceImport->service_id) || serviceImport->slot == nullptr) { fail_mod(mod, MOD_INVALID_ARGUMENT, "Invalid service import descriptor"); return false; } - const auto* service = svc::find_service( - serviceImport.service_id, serviceImport.major_version, serviceImport.min_minor_version); + const auto* service = svc::find_service(serviceImport->service_id, + serviceImport->major_version, serviceImport->min_minor_version); if (service == nullptr) { - *static_cast(serviceImport.slot) = nullptr; - if ((serviceImport.flags & SERVICE_IMPORT_OPTIONAL) != 0) { + *static_cast(serviceImport->slot) = nullptr; + if ((serviceImport->rec.flags & SERVICE_IMPORT_OPTIONAL) != 0) { continue; } fail_mod(mod, MOD_UNAVAILABLE, - describe_missing_import(serviceImport.service_id, serviceImport.major_version, - serviceImport.min_minor_version)); + describe_missing_import(serviceImport->service_id, serviceImport->major_version, + serviceImport->min_minor_version)); return false; } - *static_cast(serviceImport.slot) = service->service; + *static_cast(serviceImport->slot) = service->service; } return true; From cca104584e85e6f9dc4ccacc3b022557bb25b610 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 01:07:30 -0600 Subject: [PATCH 029/223] Mod API: Aggregate-initialize import/export records Starting with VS 18 / cl 14.51, MSVC's constant evaluator rejects a pointer-to-member in a constant initializer that also contains any computed data, a consteval call or even a copy of a constexpr object (C2127). Hook records are now aggregate-initialized from literals only: the computed name bytes (vtable symbol + display name) are baked into char... template arguments and sizes/kinds are spelled inline. --- include/mods/api.h | 8 +- include/mods/hook.hpp | 10 ++- include/mods/meta.hpp | 125 +++++++++++++++++--------------- include/mods/service.hpp | 31 +++++--- src/dusk/mods/loader/loader.cpp | 16 ++-- src/dusk/mods/svc/registry.cpp | 18 +++-- 6 files changed, 118 insertions(+), 90 deletions(-) diff --git a/include/mods/api.h b/include/mods/api.h index b2999336eb..5a21127203 100644 --- a/include/mods/api.h +++ b/include/mods/api.h @@ -156,6 +156,10 @@ typedef struct ModMetaRecord { uint8_t flags; /* ServiceImportFlags / ServiceExportFlags for imports/exports */ } ModMetaRecord; +typedef struct ModMetaServiceId { + char chars[MOD_META_SERVICE_ID_SIZE]; /* NUL-terminated */ +} ModMetaServiceId; + typedef struct MOD_META_ALIGN ModMetaHeader { ModMetaRecord rec; uint32_t abi_version; @@ -168,7 +172,7 @@ typedef struct MOD_META_ALIGN ModMetaImport { uint16_t major_version; uint16_t min_minor_version; void* slot; /* runtime only */ - char service_id[MOD_META_SERVICE_ID_SIZE]; + ModMetaServiceId service_id; } ModMetaImport; static_assert(sizeof(ModMetaImport) == 16 + MOD_META_SERVICE_ID_SIZE); @@ -178,7 +182,7 @@ typedef struct MOD_META_ALIGN ModMetaExport { uint16_t major_version; uint16_t minor_version; const void* service; /* runtime only */ - char service_id[MOD_META_SERVICE_ID_SIZE]; + ModMetaServiceId service_id; } ModMetaExport; static_assert(sizeof(ModMetaExport) == 16 + MOD_META_SERVICE_ID_SIZE); diff --git a/include/mods/hook.hpp b/include/mods/hook.hpp index 0f74ce23a6..94d5bce797 100644 --- a/include/mods/hook.hpp +++ b/include/mods/hook.hpp @@ -136,10 +136,14 @@ struct NamedHook : HookImpl, R, A...> {}; * ambiguous and need the mangled form. */ #define DEFINE_HOOK(target, alias) \ - MOD_META_RECORD static constinit auto mod_meta_hook_##alias = \ - ::dusk::mods::detail::make_hook_record<(target), ::dusk::mods::FixedString{#target}>(); \ + [[maybe_unused]] static const void* const mod_meta_hook_##alias = \ + &::dusk::mods::detail::HookRecordFor<(target), \ + ::dusk::mods::FixedString{#target}>::Holder::record; \ struct alias : ::dusk::mods::Hook<(target)> { \ - static void* resolved_target() { return mod_meta_hook_##alias.resolved; } \ + static void* resolved_target() { \ + return ::dusk::mods::detail::HookRecordFor<(target), \ + ::dusk::mods::FixedString{#target}>::Holder::record.resolved; \ + } \ } #define DEFINE_HOOK_SYMBOL(name, sig, alias) \ diff --git a/include/mods/meta.hpp b/include/mods/meta.hpp index e99334cbb3..e3e9c236df 100644 --- a/include/mods/meta.hpp +++ b/include/mods/meta.hpp @@ -6,6 +6,7 @@ #include #include #include +#include /* * modmeta records. Each IMPORT_SERVICE/EXPORT_SERVICE/DEFINE_HOOK use places one @@ -141,44 +142,16 @@ struct member_traits { using Class = C; }; -consteval size_t cstr_len(const char* s) { - size_t n = 0; - while (s[n] != '\0') { - ++n; - } - return n; -} - -consteval void copy_service_id(char (&dst)[MOD_META_SERVICE_ID_SIZE], const char* id) { +consteval ModMetaServiceId make_service_id(const char* id) { + ModMetaServiceId out{}; size_t n = 0; for (; id[n] != '\0'; ++n) { if (n + 1 >= MOD_META_SERVICE_ID_SIZE) { throw "service id exceeds MOD_META_SERVICE_ID_SIZE"; } - dst[n] = id[n]; + out.chars[n] = id[n]; } -} - -consteval ModMetaImport make_import( - const char* serviceId, uint16_t major, uint16_t minMinor, uint8_t flags, void* slot) { - ModMetaImport r{}; - r.rec = {sizeof(ModMetaImport), MOD_META_IMPORT, flags}; - r.major_version = major; - r.min_minor_version = minMinor; - r.slot = slot; - copy_service_id(r.service_id, serviceId); - return r; -} - -consteval ModMetaExport make_export( - const char* serviceId, uint16_t major, uint16_t minor, uint8_t flags, const void* service) { - ModMetaExport r{}; - r.rec = {sizeof(ModMetaExport), MOD_META_EXPORT, flags}; - r.major_version = major; - r.minor_version = minor; - r.service = service; - copy_service_id(r.service_id, serviceId); - return r; + return out; } consteval ModMetaHeader make_header() { @@ -227,40 +200,74 @@ constexpr size_t align_up(size_t n) { return (n + (N - 1)) & ~(N - 1); } +template +struct HookMemNames { + char chars[N]{}; + size_t len{}; +}; + template -consteval auto make_hook_record() { - using F = decltype(Target); +consteval auto make_hook_mem_names() { + using C = member_traits::Class; // Strip the leading '&' of the stringified target expression for display. constexpr size_t dispFrom = Disp.chars[0] == '&' ? 1 : 0; constexpr size_t dispLen = sizeof(Disp.chars) - 1 - dispFrom; - if constexpr (std::is_member_function_pointer_v) { - using C = member_traits::Class; - static_assert(sizeof(F) <= 16, "unsupported pointer-to-member representation"); - constexpr auto vtbl = vtable_symbol(); - constexpr size_t vtblLen = std::string_view{vtbl.data()}.size(); - constexpr size_t n = align_up<8>(vtblLen + 1 + dispLen + 1); - HookMemRecord r{}; - r.rec = {sizeof(r), MOD_META_HOOK_MEM, 0}; - r.pmf.fn = Target; - size_t at = 0; - for (size_t i = 0; i < vtblLen; ++i) { - r.names[at++] = vtbl[i]; - } - r.names[at++] = '\0'; - for (size_t i = 0; i < dispLen; ++i) { - r.names[at++] = Disp.chars[dispFrom + i]; - } - return r; - } else { - static_assert(std::is_pointer_v && std::is_function_v>, - "hook target must be a function or member function"); - HookFnRecord r{}; - r.rec = {sizeof(r), MOD_META_HOOK_FN, 0}; - r.target = Target; - return r; + constexpr auto vtbl = vtable_symbol(); + constexpr size_t vtblLen = std::string_view{vtbl.data()}.size(); + HookMemNames(vtblLen + 1 + dispLen + 1)> r{}; + size_t at = 0; + for (size_t i = 0; i < vtblLen; ++i) { + r.chars[at++] = vtbl[i]; } + r.chars[at++] = '\0'; + for (size_t i = 0; i < dispLen; ++i) { + r.chars[at++] = Disp.chars[dispFrom + i]; + } + r.len = sizeof(r.chars); + return r; } +/* + * MSVC constant-evaluates a pointer-to-member only when every other operand in the + * initializer is a literal: no consteval calls, constexpr-object copies, or default + * member initializers. + */ +template +struct HookMemHolder { + using F = decltype(Target); + static_assert(sizeof(F) <= 16, "unsupported pointer-to-member representation"); + MOD_META_RECORD static constinit inline HookMemRecord record = { + {sizeof(HookMemRecord), MOD_META_HOOK_MEM, 0}, 0, {Target}, nullptr, + {Cs...}}; +}; + +template +struct HookFnHolder { + using F = decltype(Target); + static_assert(std::is_pointer_v && std::is_function_v>, + "hook target must be a function or member function"); + MOD_META_RECORD static constinit inline HookFnRecord record = { + {sizeof(HookFnRecord), MOD_META_HOOK_FN, 0}, 0, Target, nullptr}; +}; + +template > +struct HookRecordFor { + using Holder = HookFnHolder; +}; + +template +struct HookRecordFor { + template + struct Bind; + template + struct Bind> { + using Type = HookMemHolder().chars[Is]...>; + }; + using Holder = + Bind().len>>::Type; +}; + template consteval auto make_hook_name_record() { constexpr size_t len = sizeof(Name.chars) - 1; diff --git a/include/mods/service.hpp b/include/mods/service.hpp index e6c5c395e1..f54b3f2149 100644 --- a/include/mods/service.hpp +++ b/include/mods/service.hpp @@ -46,10 +46,13 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa #define IMPORT_SERVICE_EX( \ service_type, variable, service_id_value, major_value, min_minor_value, flags_value) \ static const service_type* variable = nullptr; \ - MOD_META_RECORD static constinit ModMetaImport mod_meta_import_##variable = \ - ::dusk::mods::detail::make_import((service_id_value), static_cast(major_value), \ - static_cast(min_minor_value), static_cast(flags_value), \ - &(variable)) + MOD_META_RECORD static constinit ModMetaImport mod_meta_import_##variable = { \ + {sizeof(ModMetaImport), MOD_META_IMPORT, static_cast(flags_value)}, \ + static_cast(major_value), \ + static_cast(min_minor_value), \ + &(variable), \ + ::dusk::mods::detail::make_service_id(service_id_value), \ + } #define IMPORT_SERVICE_VERSION(service_type, variable, min_minor_value) \ IMPORT_SERVICE_EX(service_type, variable, ::dusk::mods::ServiceTraits::id, \ @@ -67,15 +70,23 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa IMPORT_OPTIONAL_SERVICE_VERSION(service_type, variable, 0) #define EXPORT_SERVICE_AS(instance, service_id_value) \ - MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##instance = \ - ::dusk::mods::detail::make_export((service_id_value), (instance).header.major_version, \ - (instance).header.minor_version, SERVICE_EXPORT_STATIC, &(instance)) + MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##instance = { \ + {sizeof(ModMetaExport), MOD_META_EXPORT, SERVICE_EXPORT_STATIC}, \ + (instance).header.major_version, \ + (instance).header.minor_version, \ + &(instance), \ + ::dusk::mods::detail::make_service_id(service_id_value), \ + } #define EXPORT_SERVICE(instance) \ EXPORT_SERVICE_AS( \ instance, ::dusk::mods::ServiceTraits>::id) #define EXPORT_DEFERRED_SERVICE(token, service_id_value, major_value, minor_value) \ - MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##token = \ - ::dusk::mods::detail::make_export((service_id_value), static_cast(major_value), \ - static_cast(minor_value), SERVICE_EXPORT_DEFERRED, nullptr) + MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##token = { \ + {sizeof(ModMetaExport), MOD_META_EXPORT, SERVICE_EXPORT_DEFERRED}, \ + static_cast(major_value), \ + static_cast(minor_value), \ + nullptr, \ + ::dusk::mods::detail::make_service_id(service_id_value), \ + } diff --git a/src/dusk/mods/loader/loader.cpp b/src/dusk/mods/loader/loader.cpp index 11077532fa..9431160bd2 100644 --- a/src/dusk/mods/loader/loader.cpp +++ b/src/dusk/mods/loader/loader.cpp @@ -288,7 +288,7 @@ static bool parse_meta(NativeMod& native, LoadedMod& mod) { return invalid("truncated import record"); } auto* record = reinterpret_cast(const_cast(cursor)); - if (!terminated_within(record->service_id, sizeof(record->service_id))) { + if (!terminated_within(record->service_id.chars, sizeof(record->service_id.chars))) { return invalid("unterminated import service id"); } parsed.imports.push_back(record); @@ -299,7 +299,7 @@ static bool parse_meta(NativeMod& native, LoadedMod& mod) { return invalid("truncated export record"); } auto* record = reinterpret_cast(const_cast(cursor)); - if (!terminated_within(record->service_id, sizeof(record->service_id))) { + if (!terminated_within(record->service_id.chars, sizeof(record->service_id.chars))) { return invalid("unterminated export service id"); } parsed.exports.push_back(record); @@ -552,18 +552,18 @@ static ModManifestInfo build_manifest_info(const ModMetaParsed& parsed) { ModManifestInfo info; info.imports.reserve(parsed.imports.size()); for (const auto* record : parsed.imports) { - if (!svc::valid_service_id(record->service_id)) { + if (!svc::valid_service_id(record->service_id.chars)) { continue; } - info.imports.push_back({record->service_id, record->major_version, + info.imports.push_back({record->service_id.chars, record->major_version, (record->rec.flags & SERVICE_IMPORT_OPTIONAL) == 0}); } info.exports.reserve(parsed.exports.size()); for (const auto* record : parsed.exports) { - if (!svc::valid_service_id(record->service_id)) { + if (!svc::valid_service_id(record->service_id.chars)) { continue; } - info.exports.push_back({record->service_id, record->major_version}); + info.exports.push_back({record->service_id.chars, record->major_version}); } return info; } @@ -608,11 +608,11 @@ static void warn_unpublished_deferred_exports(const LoadedMod& mod) { continue; } const auto* record = - svc::find_service_record(serviceExport->service_id, serviceExport->major_version); + svc::find_service_record(serviceExport->service_id.chars, serviceExport->major_version); if (record != nullptr && record->service == nullptr) { log::write(mod.metadata.id, LOG_LEVEL_WARN, "declared deferred service '{}@{}' but never published it during initialization", - serviceExport->service_id, serviceExport->major_version); + serviceExport->service_id.chars, serviceExport->major_version); } } } diff --git a/src/dusk/mods/svc/registry.cpp b/src/dusk/mods/svc/registry.cpp index 2f51791af3..2033d47475 100644 --- a/src/dusk/mods/svc/registry.cpp +++ b/src/dusk/mods/svc/registry.cpp @@ -222,7 +222,7 @@ bool ModLoader::register_static_service_exports(LoadedMod& mod) { } for (const auto* serviceExport : mod.native->parsed.exports) { - if (!svc::valid_service_id(serviceExport->service_id)) { + if (!svc::valid_service_id(serviceExport->service_id.chars)) { fail_mod(mod, MOD_INVALID_ARGUMENT, "Invalid service export descriptor"); return false; } @@ -234,7 +234,7 @@ bool ModLoader::register_static_service_exports(LoadedMod& mod) { } const auto result = - svc::register_service(serviceExport->service_id, serviceExport->major_version, + svc::register_service(serviceExport->service_id.chars, serviceExport->major_version, serviceExport->minor_version, serviceExport->service, &mod, deferred); if (result != MOD_OK) { fail_mod(mod, result, "Service export registration failed"); @@ -262,8 +262,8 @@ std::string ModLoader::describe_missing_import( continue; } for (const auto* serviceExport : other.native->parsed.exports) { - if (svc::valid_service_id(serviceExport->service_id) && - std::string_view{serviceExport->service_id} == serviceId && + if (svc::valid_service_id(serviceExport->service_id.chars) && + std::string_view{serviceExport->service_id.chars} == serviceId && serviceExport->major_version == majorVersion) { return fmt::format("Required service {}@{} unavailable: provider '{}' {}", @@ -282,12 +282,14 @@ bool ModLoader::resolve_service_imports(LoadedMod& mod) { } for (const auto* serviceImport : mod.native->parsed.imports) { - if (!svc::valid_service_id(serviceImport->service_id) || serviceImport->slot == nullptr) { + if (!svc::valid_service_id(serviceImport->service_id.chars) || + serviceImport->slot == nullptr) + { fail_mod(mod, MOD_INVALID_ARGUMENT, "Invalid service import descriptor"); return false; } - const auto* service = svc::find_service(serviceImport->service_id, + const auto* service = svc::find_service(serviceImport->service_id.chars, serviceImport->major_version, serviceImport->min_minor_version); if (service == nullptr) { *static_cast(serviceImport->slot) = nullptr; @@ -296,8 +298,8 @@ bool ModLoader::resolve_service_imports(LoadedMod& mod) { } fail_mod(mod, MOD_UNAVAILABLE, - describe_missing_import(serviceImport->service_id, serviceImport->major_version, - serviceImport->min_minor_version)); + describe_missing_import(serviceImport->service_id.chars, + serviceImport->major_version, serviceImport->min_minor_version)); return false; } From cdb36e9c4277bab8a7c031135f83293ef6c24600 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 01:14:12 -0600 Subject: [PATCH 030/223] Mod API: __attribute__((used)) on clang-cl --- include/mods/meta.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mods/meta.hpp b/include/mods/meta.hpp index e3e9c236df..1f533feaa7 100644 --- a/include/mods/meta.hpp +++ b/include/mods/meta.hpp @@ -16,7 +16,11 @@ #pragma section("modmeta$a", read, write) #pragma section("modmeta$d", read, write) #pragma section("modmeta$z", read, write) +#if defined(__clang__) +#define MOD_META_RECORD __declspec(allocate("modmeta$d")) __attribute__((used)) +#else #define MOD_META_RECORD __declspec(allocate("modmeta$d")) +#endif #elif defined(__APPLE__) #define MOD_META_RECORD __attribute__((section("__DATA,__modmeta"), used)) #elif defined(__has_attribute) && __has_attribute(retain) From 700bbf0a5a9c515bf45cbe1d393524bba120142c Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 13:10:39 -0600 Subject: [PATCH 031/223] Mod API: Move dylibs to libs/{platform}; services import latest minor versions --- cmake/ModSDK.cmake | 75 +++++++-- docs/modding.md | 61 ++++++-- include/dusk/mod_loader.hpp | 7 +- include/mods/api.h | 2 +- include/mods/service.hpp | 10 +- include/mods/svc/camera.h | 1 + include/mods/svc/config.h | 1 + include/mods/svc/game.h | 1 + include/mods/svc/gfx.h | 1 + include/mods/svc/hook.h | 1 + include/mods/svc/host.h | 13 +- include/mods/svc/log.h | 1 + include/mods/svc/overlay.h | 1 + include/mods/svc/resource.h | 1 + include/mods/svc/texture.h | 1 + include/mods/svc/ui.h | 1 + src/dusk/mods/loader/loader.cpp | 205 ++++++++++++++++++------- src/dusk/mods/loader/native_module.cpp | 8 +- src/dusk/mods/svc/host.cpp | 6 + 19 files changed, 304 insertions(+), 93 deletions(-) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 833e433360..81d3c81509 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -1,8 +1,9 @@ -# add_mod( SOURCES ... MOD_JSON [RES_DIR ] [OVERLAY_DIR ] +# add_mod( SOURCES ... MOD_JSON +# [RUNTIME_LIBRARIES ...] [RES_DIR ] [OVERLAY_DIR ] # [TEXTURES_DIR ] [OUTPUT_DIR ] [BUNDLE]) set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into") -function(_mod_lib_name out_var) +function(_mod_lib_info out_platform_var out_name_var) set(_arch "${CMAKE_SYSTEM_PROCESSOR}") if (APPLE AND CMAKE_OSX_ARCHITECTURES) list(LENGTH CMAKE_OSX_ARCHITECTURES _count) @@ -23,7 +24,8 @@ function(_mod_lib_name out_var) else () set(_ext ".so") endif () - set(${out_var} "${_platform}-${_arch}${_ext}" PARENT_SCOPE) + set(${out_platform_var} "${_platform}-${_arch}" PARENT_SCOPE) + set(${out_name_var} "mod${_ext}" PARENT_SCOPE) endfunction() function(_mod_resolve_source_path out_var path) @@ -45,7 +47,8 @@ function(_mod_collect_assets out_var dir) endfunction() function(add_mod target_name) - cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR" "SOURCES" ${ARGN}) + cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR" + "SOURCES;RUNTIME_LIBRARIES" ${ARGN}) if (NOT ARG_MOD_JSON) message(FATAL_ERROR "add_mod: MOD_JSON is required") endif () @@ -55,11 +58,12 @@ function(add_mod target_name) endif () set(_has_lib FALSE) + set(_lib_platform "") set(_lib_name "") if (ARG_SOURCES) set(_has_lib TRUE) add_library(${target_name} SHARED ${ARG_SOURCES}) - _mod_lib_name(_lib_name) + _mod_lib_info(_lib_platform _lib_name) set_target_properties(${target_name} PROPERTIES PREFIX "" C_VISIBILITY_PRESET hidden @@ -92,6 +96,9 @@ function(add_mod target_name) if (APPLE) # Game symbols resolve against the host executable at dlopen time. target_link_options(${target_name} PRIVATE -undefined dynamic_lookup) + set_target_properties(${target_name} PROPERTIES + BUILD_RPATH "@loader_path" + INSTALL_RPATH "@loader_path") elseif (ANDROID) if (TARGET dusklight) target_link_libraries(${target_name} PRIVATE dusklight) @@ -100,8 +107,14 @@ function(add_mod target_name) else () message(FATAL_ERROR "add_mod: DUSK_GAME_SOLIB is not set (libmain.so)") endif () + set_target_properties(${target_name} PROPERTIES + BUILD_RPATH "$ORIGIN" + INSTALL_RPATH "$ORIGIN") elseif (UNIX) target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined) + set_target_properties(${target_name} PROPERTIES + BUILD_RPATH "$ORIGIN" + INSTALL_RPATH "$ORIGIN") elseif (WIN32) # Link against the generated import library (game ABI surface). Function calls # resolve through import thunks. Data is toolchain dependent: @@ -134,6 +147,9 @@ function(add_mod target_name) endif () endif () endif () + if (ARG_RUNTIME_LIBRARIES AND NOT _has_lib) + message(FATAL_ERROR "add_mod: RUNTIME_LIBRARIES requires SOURCES") + endif () set(_output_dir "${DUSK_MODS_OUTPUT_DIR}") if (ARG_OUTPUT_DIR) @@ -142,18 +158,39 @@ function(add_mod target_name) set(_stage "${CMAKE_CURRENT_BINARY_DIR}/${target_name}_stage") set(_out "${_output_dir}/${target_name}.dusk") - set(_zip_args "${_lib_name}" mod.json) + set(_zip_args mod.json) set(_package_deps "${_mod_json}") set(_package_inputs "${_mod_json}") set(_extra_cmds "") set(_lib_copy_cmd "") set(_target_depend "") if (_has_lib) - list(APPEND _zip_args "${_lib_name}") - set(_lib_copy_cmd COMMAND ${CMAKE_COMMAND} -E copy_if_different - "$" "${_stage}/${_lib_name}") + list(APPEND _zip_args lib) + set(_lib_copy_cmd + COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}/lib/${_lib_platform}" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "$" "${_stage}/lib/${_lib_platform}/${_lib_name}") set(_target_depend ${target_name}) endif () + string(TOLOWER "${_lib_name}" _lib_name_key) + set(_runtime_lib_name_keys "${_lib_name_key}") + foreach (_runtime_lib IN LISTS ARG_RUNTIME_LIBRARIES) + _mod_resolve_source_path(_runtime_lib_path "${_runtime_lib}") + if (NOT EXISTS "${_runtime_lib_path}" OR IS_DIRECTORY "${_runtime_lib_path}") + message(FATAL_ERROR "add_mod: runtime library does not exist or is not a file: ${_runtime_lib_path}") + endif () + get_filename_component(_runtime_lib_name "${_runtime_lib_path}" NAME) + string(TOLOWER "${_runtime_lib_name}" _runtime_lib_name_key) + list(FIND _runtime_lib_name_keys "${_runtime_lib_name_key}" _runtime_lib_name_index) + if (NOT _runtime_lib_name_index EQUAL -1) + message(FATAL_ERROR "add_mod: duplicate runtime library filename: ${_runtime_lib_name}") + endif () + list(APPEND _runtime_lib_name_keys "${_runtime_lib_name_key}") + list(APPEND _package_deps "${_runtime_lib_path}") + list(APPEND _package_inputs "${_runtime_lib_path}") + list(APPEND _lib_copy_cmd COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${_runtime_lib_path}" "${_stage}/lib/${_lib_platform}/${_runtime_lib_name}") + endforeach () if (ARG_RES_DIR) _mod_resolve_source_path(_res_dir "${ARG_RES_DIR}") _mod_collect_assets(_res_deps "${_res_dir}") @@ -190,6 +227,7 @@ function(add_mod target_name) set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_IDS "${_mod_id}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_STAGES "${_stage}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_PACKAGES "${_out}") + set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_PLATFORMS "${_lib_platform}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES "${_lib_name}") set(_bundle_cmds COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bundled_mods" @@ -230,7 +268,8 @@ endfunction() # read-only installs. # - macOS: pre-extracted stage dirs into the installed app's Contents/Resources/mods, dylibs # ad-hoc signed in place, then the whole bundle re-signed. -# - iOS/tvOS: assets into /mods/ and the dylib into Frameworks/.dylib. +# - iOS/tvOS: assets into /mods/, the mod dylib into Frameworks/.dylib, +# and runtime libraries alongside it. # - Android: nothing here; gradle packs ${CMAKE_BINARY_DIR}/bundled_mods into APK assets. function(install_bundled_mods) get_property(_targets GLOBAL PROPERTY DUSK_BUNDLED_MOD_TARGETS) @@ -239,6 +278,7 @@ function(install_bundled_mods) endif () get_property(_ids GLOBAL PROPERTY DUSK_BUNDLED_MOD_IDS) get_property(_stages GLOBAL PROPERTY DUSK_BUNDLED_MOD_STAGES) + get_property(_lib_platforms GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_PLATFORMS) get_property(_lib_names GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES) list(LENGTH _targets _count) math(EXPR _last "${_count} - 1") @@ -254,19 +294,30 @@ function(install_bundled_mods) list(GET _targets ${_i} _target) list(GET _ids ${_i} _id) list(GET _stages ${_i} _stage) + list(GET _lib_platforms ${_i} _lib_platform) list(GET _lib_names ${_i} _lib_name) install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/mods/${_id}" - PATTERN "${_lib_name}" EXCLUDE) + PATTERN "lib" EXCLUDE) install(PROGRAMS "$" DESTINATION "${_bundle_dir}/Frameworks" RENAME "${_id}.dylib") + install(DIRECTORY "${_stage}/lib/${_lib_platform}/" + DESTINATION "${_bundle_dir}/Frameworks" + PATTERN "${_lib_name}" EXCLUDE) endforeach () else () foreach (_i RANGE ${_last}) list(GET _ids ${_i} _id) list(GET _stages ${_i} _stage) + list(GET _lib_platforms ${_i} _lib_platform) list(GET _lib_names ${_i} _lib_name) install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/Contents/Resources/mods/${_id}") - install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/Resources/mods/${_id}/${_lib_name}\" COMMAND_ERROR_IS_FATAL ANY)") + install(CODE " + file(GLOB _mod_libs \"${_bundle_dir}/Contents/Resources/mods/${_id}/lib/${_lib_platform}/*\") + foreach (_mod_lib IN LISTS _mod_libs) + if (NOT IS_DIRECTORY \"\${_mod_lib}\") + execute_process(COMMAND /usr/bin/codesign --force --sign - \"\${_mod_lib}\" COMMAND_ERROR_IS_FATAL ANY) + endif () + endforeach ()") endforeach () if (TARGET crashpad_handler) install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/MacOS/$\" COMMAND_ERROR_IS_FATAL ANY)") diff --git a/docs/modding.md b/docs/modding.md index 3823bd05a4..4988f6a6e4 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -22,7 +22,7 @@ function, read and write data fields, and hook the vast majority of game functio 7. [Asset Overlays](#asset-overlays) 8. [Runtime Lifecycle](#runtime-lifecycle) 9. [Error Handling](#error-handling) -10. [Advanced: Exporting Services](#advanced-exporting-services) +10. [Advanced](#advanced) --- @@ -131,26 +131,30 @@ A service is a struct of C function pointers with a version header. You declare loader resolves it before your mod initializes: ```cpp -IMPORT_SERVICE(LogService, svc_log); // required, any minor version -IMPORT_SERVICE_VERSION(LogService, svc_log, 2); // required, minor version >= 2 +IMPORT_SERVICE(LogService, svc_log); // required, latest minor version +IMPORT_SERVICE_VERSION(LogService, svc_log, 0); // required, minimum minor version 0 (for backwards compatibility) IMPORT_OPTIONAL_SERVICE(SomeService, svc_maybe); // may be null ``` Each service is individually versioned, and there may be multiple major versions of a service provided at once, allowing backwards compatibility with older mods while still changing services fundamentally if necessary. A **major** bump is a breaking change, treated as a different service entirely. For **additive** changes, a service appends new -functions to the end of the struct without breaking existing callers and simply bumps the minor version. Mods that -want the newer functions may use `IMPORT_SERVICE_VERSION` to require that minor at **load time**, or `SERVICE_HAS` to -check at **runtime** whether a specific function is available. +functions to the end of the struct without breaking existing callers and simply bumps the minor version. + +`IMPORT_SERVICE` and `IMPORT_OPTIONAL_SERVICE` require the latest minor version compiled against, making every field in +the service safe to call. A mod can use `IMPORT_SERVICE_VERSION` (or its optional counterpart) with an older minor +version to remain compatible with older Dusklight versions, then use `SERVICE_HAS` to check at runtime for fields added +after that explicitly requested version. The contract (see `include/mods/api.h` for the full version): - **A required import is guaranteed valid.** If the service is missing or too old, the mod fails to load with a clear error. No need to null check at call sites. -- **Anything at or below the minor version you imported can be called unconditionally.** +- **Anything at or below the minor version you imported can be called unconditionally.** The default macros import + the service type's current minor version; the versioned macros explicitly override that minimum. - Optional imports may be null; check once in `mod_initialize`. -- Fields newer than your imported minor must be gated behind `SERVICE_HAS(service, ServiceType, field)` plus a null - check. +- Fields newer than your imported minor version must be gated behind `SERVICE_HAS(service, ServiceType, field)` plus a + null check. --- @@ -200,13 +204,13 @@ const char* dir = svc_host->mod_dir(mod_ctx); // writable per-mod directory svc_host->fail(mod_ctx, MOD_ERROR, "something unrecoverable happened"); // disables the mod ``` -`get_service`/`publish_service` provide dynamic service lookup; see [Advanced](#advanced-exporting-services). +`get_service`/`publish_service` provide dynamic service lookup; see [Exporting Services](#exporting-services). **Lifecycle watches.** If your mod provides a service that hands out per-caller state (registrations, callbacks, handles), watch other mods' lifecycle and drop what you hold for a mod when it detaches. ```cpp -IMPORT_SERVICE_VERSION(HostService, svc_host, 1); +IMPORT_SERVICE(HostService, svc_host); void on_mod_lifecycle(ModContext* ctx, ModContext* subject, const char* subject_id, ModLifecycleEvent event, void* user_data) { @@ -666,7 +670,9 @@ explicit results. --- -## Advanced: Exporting Services +## Advanced + +### Exporting Services Mods may export services of their own, permitting framework mods and cross-mod integration. Define the interface in a header both mods share: @@ -690,6 +696,7 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = MY_MOD_SERVICE_ID; static constexpr uint16_t major_version = MY_MOD_SERVICE_MAJOR; + static constexpr uint16_t minor_version = MY_MOD_SERVICE_MINOR; }; #endif ``` @@ -718,7 +725,7 @@ svc_my_mod->do_thing(mod_ctx, 42); The loader registers all exports before resolving any imports, so declaration order between mods doesn't matter. Note that the `ctx` a provider receives identifies the *calling* mod. -### Dependencies between mods +#### Dependencies between mods Service imports are also dependency declarations: the loader initializes mods in dependency order, so by the time your `mod_initialize` runs, every mod you import services from (required *or* optional) has already finished its own @@ -748,3 +755,31 @@ For services whose construction can't happen at static-init time, declare the ex and publish the pointer later via `svc_host->publish_service(...)`. Consumers can fetch services dynamically with `svc_host->get_service(...)`; prefer manifest imports whenever possible, since they give the loader dependency information and fail fast with good errors. + +### Native Runtime Libraries + +`RUNTIME_LIBRARIES` passed to `add_mod` are packaged beside the mod's native module in `lib//`. Dusklight +extracts the whole directory before loading the mod, so libraries linked by the mod resolve normally. The SDK links the +mod itself with `$ORIGIN` on Linux and `@loader_path` on Apple platforms; runtime libraries with their own non-system +dependencies must also be built with origin-relative lookup paths. On Windows, Dusklight uses an isolated DLL search +rooted at this directory. + +```cmake +add_mod(my_mod + SOURCES src/mod.cpp + MOD_JSON mod.json + RUNTIME_LIBRARIES "${VENDOR_RUNTIME_LIBRARY}") +``` + +SDKs that load plugins by directory can pass them the absolute runtime path from the current HostService: + +```cpp +IMPORT_SERVICE(HostService, svc_host); + +const char* nativeDir = svc_host->native_dir(mod_ctx); // read-only +``` + +Libraries loaded explicitly by the mod remain its responsibility: stop their threads and unload them during +`mod_shutdown`. Do not write into `native_dir`; use `mod_dir` for writable state. Native library namespaces are +process-wide on some platforms, so two mods cannot safely assume that incompatible libraries with the same filename +will remain isolated. diff --git a/include/dusk/mod_loader.hpp b/include/dusk/mod_loader.hpp index a326c8d807..74e01a0fdd 100644 --- a/include/dusk/mod_loader.hpp +++ b/include/dusk/mod_loader.hpp @@ -176,6 +176,8 @@ struct LoadedMod { uint32_t cacheGeneration = 0; // Currently extracted native library, empty if none. std::string nativePath; + // Read-only directory containing the current platform's main module and runtime libraries. + std::string nativeDir; NativeModStatus nativeStatus = NativeModStatus::None; std::unique_ptr native; @@ -225,7 +227,7 @@ private: // the next tick, by which point every per-frame entry into the mod should have returned. struct RetiredNative { std::unique_ptr native; - std::string path; + std::string directory; }; std::vector> m_mods; @@ -238,7 +240,8 @@ private: bool m_startupComplete = false; void try_load_mod(const std::filesystem::path& modPath, bool fromDir, uint32_t searchDirIndex); - void load_native(LoadedMod& mod, const std::string& dllEntry); + void load_native(LoadedMod& mod, const std::string& dllEntry, + const std::vector& runtimeEntries); // Resolved / if it exists on disk, empty otherwise. [[nodiscard]] std::filesystem::path external_native_lib_path(const LoadedMod& mod) const; void unload_native(LoadedMod& mod); diff --git a/include/mods/api.h b/include/mods/api.h index 5a21127203..c63d08cfe2 100644 --- a/include/mods/api.h +++ b/include/mods/api.h @@ -23,7 +23,7 @@ extern "C" { #define MOD_EXTERN_C #endif -#define MOD_ABI_VERSION 6u +#define MOD_ABI_VERSION 1u #define MOD_ERROR_MESSAGE_SIZE 512u typedef struct ModContext ModContext; diff --git a/include/mods/service.hpp b/include/mods/service.hpp index f54b3f2149..f5ba322c45 100644 --- a/include/mods/service.hpp +++ b/include/mods/service.hpp @@ -42,7 +42,8 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa // Declares `static const service_type* variable`, filled in by the host before mod_initialize. // Required imports are guaranteed non-null (the mod fails to load otherwise); optional imports -// must be checked against nullptr before use. +// must be checked against nullptr before use. The unversioned macros use the latest minor version; +// set an explicit version to target an older minor version for backwards compatibility. #define IMPORT_SERVICE_EX( \ service_type, variable, service_id_value, major_value, min_minor_value, flags_value) \ static const service_type* variable = nullptr; \ @@ -59,7 +60,9 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa ::dusk::mods::ServiceTraits::major_version, min_minor_value, \ SERVICE_IMPORT_REQUIRED) -#define IMPORT_SERVICE(service_type, variable) IMPORT_SERVICE_VERSION(service_type, variable, 0) +#define IMPORT_SERVICE(service_type, variable) \ + IMPORT_SERVICE_VERSION( \ + service_type, variable, ::dusk::mods::ServiceTraits::minor_version) #define IMPORT_OPTIONAL_SERVICE_VERSION(service_type, variable, min_minor_value) \ IMPORT_SERVICE_EX(service_type, variable, ::dusk::mods::ServiceTraits::id, \ @@ -67,7 +70,8 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa SERVICE_IMPORT_OPTIONAL) #define IMPORT_OPTIONAL_SERVICE(service_type, variable) \ - IMPORT_OPTIONAL_SERVICE_VERSION(service_type, variable, 0) + IMPORT_OPTIONAL_SERVICE_VERSION( \ + service_type, variable, ::dusk::mods::ServiceTraits::minor_version) #define EXPORT_SERVICE_AS(instance, service_id_value) \ MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##instance = { \ diff --git a/include/mods/svc/camera.h b/include/mods/svc/camera.h index f974cec152..884aadef1e 100644 --- a/include/mods/svc/camera.h +++ b/include/mods/svc/camera.h @@ -60,5 +60,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = CAMERA_SERVICE_ID; static constexpr uint16_t major_version = CAMERA_SERVICE_MAJOR; + static constexpr uint16_t minor_version = CAMERA_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/config.h b/include/mods/svc/config.h index 2a26210295..4275312201 100644 --- a/include/mods/svc/config.h +++ b/include/mods/svc/config.h @@ -103,5 +103,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = CONFIG_SERVICE_ID; static constexpr uint16_t major_version = CONFIG_SERVICE_MAJOR; + static constexpr uint16_t minor_version = CONFIG_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/game.h b/include/mods/svc/game.h index fbd914d4bc..116d6fc316 100644 --- a/include/mods/svc/game.h +++ b/include/mods/svc/game.h @@ -26,5 +26,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = GAME_SERVICE_ID; static constexpr uint16_t major_version = GAME_SERVICE_MAJOR; + static constexpr uint16_t minor_version = GAME_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/gfx.h b/include/mods/svc/gfx.h index a9812fd044..d87255e978 100644 --- a/include/mods/svc/gfx.h +++ b/include/mods/svc/gfx.h @@ -205,5 +205,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = GFX_SERVICE_ID; static constexpr uint16_t major_version = GFX_SERVICE_MAJOR; + static constexpr uint16_t minor_version = GFX_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/hook.h b/include/mods/svc/hook.h index d1a75fa6cc..00760d2945 100644 --- a/include/mods/svc/hook.h +++ b/include/mods/svc/hook.h @@ -121,5 +121,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = HOOK_SERVICE_ID; static constexpr uint16_t major_version = HOOK_SERVICE_MAJOR; + static constexpr uint16_t minor_version = HOOK_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/host.h b/include/mods/svc/host.h index 43c19cadfb..b0b278612c 100644 --- a/include/mods/svc/host.h +++ b/include/mods/svc/host.h @@ -9,7 +9,7 @@ #define HOST_SERVICE_ID "dev.twilitrealm.dusklight.host" #define HOST_SERVICE_MAJOR 2u -#define HOST_SERVICE_MINOR 0u +#define HOST_SERVICE_MINOR 1u /* * Ignore unknown values: later service minors may add events. @@ -91,6 +91,16 @@ typedef struct HostService { ModResult (*watch_mod_lifecycle)( ModContext* ctx, ModLifecycleFn fn, void* user_data, uint64_t* out_handle); ModResult (*unwatch_mod_lifecycle)(ModContext* ctx, uint64_t handle); + + /* + * Read-only directory containing this platform's packaged native runtime: the mod module + * and any RUNTIME_LIBRARIES. The path is absolute and remains valid until mod_shutdown + * returns. Libraries loaded dynamically from here are owned by the mod and must be unloaded + * during mod_shutdown. + * + * Added in minor version 1. + */ + const char* (*native_dir)(ModContext* ctx); } HostService; #ifdef __cplusplus @@ -100,5 +110,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = HOST_SERVICE_ID; static constexpr uint16_t major_version = HOST_SERVICE_MAJOR; + static constexpr uint16_t minor_version = HOST_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/log.h b/include/mods/svc/log.h index bad94f9503..b25780ed4a 100644 --- a/include/mods/svc/log.h +++ b/include/mods/svc/log.h @@ -43,5 +43,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = LOG_SERVICE_ID; static constexpr uint16_t major_version = LOG_SERVICE_MAJOR; + static constexpr uint16_t minor_version = LOG_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/overlay.h b/include/mods/svc/overlay.h index 9fc86fc850..bf6fd7b975 100644 --- a/include/mods/svc/overlay.h +++ b/include/mods/svc/overlay.h @@ -53,5 +53,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = OVERLAY_SERVICE_ID; static constexpr uint16_t major_version = OVERLAY_SERVICE_MAJOR; + static constexpr uint16_t minor_version = OVERLAY_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/resource.h b/include/mods/svc/resource.h index 1173b2ab1d..602ab1a25f 100644 --- a/include/mods/svc/resource.h +++ b/include/mods/svc/resource.h @@ -48,5 +48,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = RESOURCE_SERVICE_ID; static constexpr uint16_t major_version = RESOURCE_SERVICE_MAJOR; + static constexpr uint16_t minor_version = RESOURCE_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/texture.h b/include/mods/svc/texture.h index d664c5f99d..1c7a944cba 100644 --- a/include/mods/svc/texture.h +++ b/include/mods/svc/texture.h @@ -84,5 +84,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = TEXTURE_SERVICE_ID; static constexpr uint16_t major_version = TEXTURE_SERVICE_MAJOR; + static constexpr uint16_t minor_version = TEXTURE_SERVICE_MINOR; }; #endif diff --git a/include/mods/svc/ui.h b/include/mods/svc/ui.h index d9f2ac669e..676706a739 100644 --- a/include/mods/svc/ui.h +++ b/include/mods/svc/ui.h @@ -280,5 +280,6 @@ template <> struct dusk::mods::ServiceTraits { static constexpr const char* id = UI_SERVICE_ID; static constexpr uint16_t major_version = UI_SERVICE_MAJOR; + static constexpr uint16_t minor_version = UI_SERVICE_MINOR; }; #endif diff --git a/src/dusk/mods/loader/loader.cpp b/src/dusk/mods/loader/loader.cpp index 9431160bd2..008ace157d 100644 --- a/src/dusk/mods/loader/loader.cpp +++ b/src/dusk/mods/loader/loader.cpp @@ -30,46 +30,51 @@ using namespace std::string_view_literals; #if defined(_WIN32) #if defined(_M_ARM64) -static constexpr std::string_view k_nativeLibName = "windows-arm64.dll"sv; +static constexpr std::string_view k_nativePlatform = "windows-arm64"sv; #elif defined(_M_X64) -static constexpr std::string_view k_nativeLibName = "windows-amd64.dll"sv; +static constexpr std::string_view k_nativePlatform = "windows-amd64"sv; #elif defined(_M_IX86) -static constexpr std::string_view k_nativeLibName = "windows-x86.dll"sv; +static constexpr std::string_view k_nativePlatform = "windows-x86"sv; #else -static constexpr std::string_view k_nativeLibName = ""sv; +static constexpr std::string_view k_nativePlatform = ""sv; #endif +static constexpr std::string_view k_nativeLibName = "mod.dll"sv; #elif defined(__ANDROID__) #if defined(__aarch64__) -static constexpr std::string_view k_nativeLibName = "android-aarch64.so"sv; +static constexpr std::string_view k_nativePlatform = "android-aarch64"sv; #elif defined(__x86_64__) -static constexpr std::string_view k_nativeLibName = "android-x86_64.so"sv; +static constexpr std::string_view k_nativePlatform = "android-x86_64"sv; #else -static constexpr std::string_view k_nativeLibName = ""sv; +static constexpr std::string_view k_nativePlatform = ""sv; #endif +static constexpr std::string_view k_nativeLibName = "mod.so"sv; #elif defined(__APPLE__) #include #if TARGET_OS_IOS -static constexpr std::string_view k_nativeLibName = "ios-arm64.dylib"sv; +static constexpr std::string_view k_nativePlatform = "ios-arm64"sv; #elif TARGET_OS_TV -static constexpr std::string_view k_nativeLibName = "tvos-arm64.dylib"sv; +static constexpr std::string_view k_nativePlatform = "tvos-arm64"sv; #elif defined(__aarch64__) -static constexpr std::string_view k_nativeLibName = "darwin-arm64.dylib"sv; +static constexpr std::string_view k_nativePlatform = "darwin-arm64"sv; #elif defined(__x86_64__) -static constexpr std::string_view k_nativeLibName = "darwin-x86_64.dylib"sv; +static constexpr std::string_view k_nativePlatform = "darwin-x86_64"sv; #else -static constexpr std::string_view k_nativeLibName = ""sv; +static constexpr std::string_view k_nativePlatform = ""sv; #endif +static constexpr std::string_view k_nativeLibName = "mod.dylib"sv; #elif defined(__linux__) #if defined(__aarch64__) -static constexpr std::string_view k_nativeLibName = "linux-aarch64.so"sv; +static constexpr std::string_view k_nativePlatform = "linux-aarch64"sv; #elif defined(__x86_64__) -static constexpr std::string_view k_nativeLibName = "linux-x86_64.so"sv; +static constexpr std::string_view k_nativePlatform = "linux-x86_64"sv; #elif defined(__i386__) -static constexpr std::string_view k_nativeLibName = "linux-x86.so"sv; +static constexpr std::string_view k_nativePlatform = "linux-x86"sv; #else -static constexpr std::string_view k_nativeLibName = ""sv; +static constexpr std::string_view k_nativePlatform = ""sv; #endif +static constexpr std::string_view k_nativeLibName = "mod.so"sv; #else +static constexpr std::string_view k_nativePlatform = ""sv; static constexpr std::string_view k_nativeLibName = ""sv; #endif @@ -77,6 +82,23 @@ namespace dusk::mods { namespace { aurora::Module Log{"dusk::mods::loader"}; ModLoader g_modLoader; +constexpr std::string_view k_nativeLibDir = "lib/"sv; + +class DirectoryRollback { +public: + ~DirectoryRollback() { + if (!mPath.empty()) { + std::error_code ec; + std::filesystem::remove_all(mPath, ec); + } + } + + void set_path(std::filesystem::path path) { mPath = std::move(path); } + void release() { mPath.clear(); } + +private: + std::filesystem::path mPath; +}; std::unique_ptr load_bundle(const std::filesystem::path& modPath, bool fromDir) { if (fromDir) { @@ -87,24 +109,49 @@ std::unique_ptr load_bundle(const std::filesystem::path& modPath, boo } } -struct DllLocateResult { +struct NativeLocateResult { std::string entry; + std::vector runtimeEntries; bool anyLibs = false; }; -DllLocateResult locate_dll_in_bundle(ModBundle& bundle) { - DllLocateResult result; +NativeLocateResult locate_native_runtime(ModBundle& bundle) { + NativeLocateResult result; + const std::string platformPrefix = fmt::format("{}{}/", k_nativeLibDir, k_nativePlatform); + const std::string nativeEntry = platformPrefix + std::string{k_nativeLibName}; for (const auto& name : bundle.getFileNames()) { - if (name.find('/') != std::string::npos || - (!name.ends_with(".dll"sv) && !name.ends_with(".dylib"sv) && !name.ends_with(".so"sv))) - { + if (!name.starts_with(k_nativeLibDir)) { continue; } - result.anyLibs = true; - if (name == k_nativeLibName) { + + const std::string_view libPath{ + name.data() + k_nativeLibDir.size(), name.size() - k_nativeLibDir.size()}; + const auto platformEnd = libPath.find('/'); + if (platformEnd != std::string_view::npos) { + const auto entryName = libPath.substr(platformEnd + 1); + if (entryName.find('/') == std::string_view::npos && + (entryName == "mod.dll"sv || entryName == "mod.dylib"sv || entryName == "mod.so"sv)) + { + result.anyLibs = true; + } + } + + if (!k_nativePlatform.empty() && name.starts_with(platformPrefix)) { + const std::string_view relativeName{ + name.data() + platformPrefix.size(), name.size() - platformPrefix.size()}; + if (!is_safe_resource_path(relativeName)) { + continue; + } + result.runtimeEntries.push_back(name); + } + if (name == nativeEntry) { result.entry = name; } } + std::ranges::sort(result.runtimeEntries); + result.runtimeEntries.erase( + std::unique(result.runtimeEntries.begin(), result.runtimeEntries.end()), + result.runtimeEntries.end()); return result; } } // namespace @@ -390,7 +437,7 @@ static std::string native_status_message(const NativeModStatus status) { case NativeModStatus::BuildDisabled: return "Code mods are disabled on this Dusklight build"; case NativeModStatus::ModMissingPlatform: - return fmt::format("Mod not supported on this platform ({})", k_nativeLibName); + return fmt::format("Mod not supported on this platform ({})", k_nativePlatform); case NativeModStatus::ApiVersionMismatch: // TODO: differentiate whether mod or Dusklight is out of date return "Mod ABI version mismatch"; @@ -425,7 +472,8 @@ std::filesystem::path ModLoader::external_native_lib_path(const LoadedMod& mod) return path; } -void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { +void ModLoader::load_native( + LoadedMod& mod, const std::string& dllEntry, const std::vector& runtimeEntries) { if (!EnableCodeMods) { log::write(mod.metadata.id, LOG_LEVEL_ERROR, "Code mods are not available in this build"); mod.nativeStatus = NativeModStatus::BuildDisabled; @@ -435,10 +483,19 @@ void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { namespace fs = std::filesystem; const fs::path cacheDir = m_cacheDir / mod.metadata.id; + const fs::path scratchDir = cacheDir / "data"; std::error_code ec; - fs::create_directories(cacheDir, ec); + fs::create_directories(scratchDir, ec); + if (ec) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to create mod directory {}: {}", + io::fs_path_to_string(scratchDir), ec.message()); + return; + } + mod.dir = io::fs_path_to_string(fs::absolute(scratchDir)); fs::path libPath; + fs::path runtimeDir; + DirectoryRollback runtimeDirRollback; if (mod.inPlace) { if (!dllEntry.empty()) { libPath = fs::path(mod.modPath) / dllEntry; @@ -450,6 +507,7 @@ void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { mod.nativeStatus = NativeModStatus::ModMissingPlatform; return; } + runtimeDir = libPath.parent_path(); } else { if (dllEntry.empty()) { log::write(mod.metadata.id, LOG_LEVEL_ERROR, @@ -458,34 +516,63 @@ void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { return; } - // Generation-versioned filename: every dlopen gets a path it has never seen, so a reload - // always yields a fresh image with fresh statics even if the previous dlclose did not - // fully unmap the old one (TLS/ObjC pinning). The .cache dir is wiped on startup. - const fs::path dllCachePath = - cacheDir / fmt::format("{}.g{}{}", mod.metadata.id, ++mod.cacheGeneration, - io::fs_path_to_string(fs::path(dllEntry).extension())); - - std::vector dllData; - try { - dllData = mod.bundle->readFile(dllEntry); - } catch (const std::exception& e) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to extract {}", dllEntry); + // Every generation gets a new directory. The main module and all of its runtime + // libraries therefore have fresh paths and can coexist with a previous generation + // that is still unwinding after a reload. + runtimeDir = cacheDir / fmt::format("g{}", ++mod.cacheGeneration); + runtimeDirRollback.set_path(runtimeDir); + fs::create_directories(runtimeDir, ec); + if (ec) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, + "failed to create native runtime directory {}: {}", + io::fs_path_to_string(runtimeDir), ec.message()); return; } - { - std::ofstream out(dllCachePath, std::ios::binary | std::ios::out); - if (!out) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to write {}", - io::fs_path_to_string(dllCachePath)); + const std::string platformPrefix = fmt::format("{}{}/", k_nativeLibDir, k_nativePlatform); + for (const auto& entry : runtimeEntries) { + if (!entry.starts_with(platformPrefix)) { + continue; + } + const std::string_view relativeName{ + entry.data() + platformPrefix.size(), entry.size() - platformPrefix.size()}; + if (!is_safe_resource_path(relativeName)) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, + "unsafe native runtime path '{}'; skipping", entry); return; } - out.write(reinterpret_cast(dllData.data()), - static_cast(dllData.size())); + const fs::path outputPath = runtimeDir / fs::path{relativeName}; + fs::create_directories(outputPath.parent_path(), ec); + if (ec) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, + "failed to create directory for {}: {}", entry, ec.message()); + return; + } + + std::vector data; + try { + data = mod.bundle->readFile(entry); + } catch (const std::exception& e) { + log::write( + mod.metadata.id, LOG_LEVEL_ERROR, "failed to extract {}: {}", entry, e.what()); + return; + } + + std::ofstream out(outputPath, std::ios::binary | std::ios::out); + if (!out) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to write {}", entry); + return; + } + out.write(reinterpret_cast(data.data()), + static_cast(data.size())); + if (!out) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to write {}", entry); + return; + } } - libPath = dllCachePath; + libPath = runtimeDir / fs::path{dllEntry}.filename(); } auto nativeMod = std::make_unique(); @@ -522,10 +609,11 @@ void ModLoader::load_native(LoadedMod& mod, const std::string& dllEntry) { } *nativeMod->contextSymbol = mod.context.get(); - mod.dir = io::fs_path_to_string(fs::absolute(cacheDir)); mod.nativePath = io::fs_path_to_string(fs::absolute(libPath)); + mod.nativeDir = io::fs_path_to_string(fs::absolute(runtimeDir)); mod.native = std::move(nativeMod); mod.nativeStatus = NativeModStatus::Loaded; + runtimeDirRollback.release(); } void ModLoader::unload_native(LoadedMod& mod) { @@ -533,16 +621,17 @@ void ModLoader::unload_native(LoadedMod& mod) { return; } // Deferred dlclose: this mod's code may still be on the stack below the current tick - m_retiredNatives.push_back({std::move(mod.native), std::move(mod.nativePath)}); + m_retiredNatives.push_back({std::move(mod.native), std::move(mod.nativeDir)}); mod.nativePath.clear(); + mod.nativeDir.clear(); } void ModLoader::drain_retired_natives() { for (auto& retired : m_retiredNatives) { retired.native.reset(); - if (!retired.path.empty()) { + if (!retired.directory.empty()) { std::error_code ec; - std::filesystem::remove(retired.path, ec); + std::filesystem::remove_all(retired.directory, ec); } } m_retiredNatives.clear(); @@ -663,10 +752,10 @@ void ModLoader::try_load_mod( mod.cvarIsEnabled = std::make_unique>(mod_enabled_cvar_name(mod.metadata.id), true); - const auto [dllEntry, anyLibs] = locate_dll_in_bundle(*mod.bundle); + const auto [dllEntry, runtimeEntries, anyLibs] = locate_native_runtime(*mod.bundle); if (anyLibs || (mod.inPlace && !external_native_lib_path(mod).empty())) { mod.nativeStatus = NativeModStatus::Unknown; - load_native(mod, dllEntry); + load_native(mod, dllEntry, runtimeEntries); if (mod.nativeStatus != NativeModStatus::Loaded) { Log.error("Native mod '{}' failed to load, disabling", mod.metadata.id); fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); @@ -992,14 +1081,14 @@ bool ModLoader::ensure_native_loaded(LoadedMod& mod) { return true; } - const auto [dllEntry, anyLibs] = locate_dll_in_bundle(*mod.bundle); + const auto [dllEntry, runtimeEntries, anyLibs] = locate_native_runtime(*mod.bundle); if (!anyLibs && !(mod.inPlace && !external_native_lib_path(mod).empty())) { mod.nativeStatus = NativeModStatus::None; return true; } mod.nativeStatus = NativeModStatus::Unknown; - load_native(mod, dllEntry); + load_native(mod, dllEntry, runtimeEntries); if (mod.nativeStatus != NativeModStatus::Loaded) { fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); return false; @@ -1035,9 +1124,11 @@ bool ModLoader::reload_bundle(LoadedMod& mod) { mod.failureReason.clear(); ModManifestInfo newInfo; - if (const auto [dllEntry, anyLibs] = locate_dll_in_bundle(*mod.bundle); anyLibs) { + if (const auto [dllEntry, runtimeEntries, anyLibs] = locate_native_runtime(*mod.bundle); + anyLibs) + { mod.nativeStatus = NativeModStatus::Unknown; - load_native(mod, dllEntry); + load_native(mod, dllEntry, runtimeEntries); if (mod.nativeStatus != NativeModStatus::Loaded) { fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); return false; diff --git a/src/dusk/mods/loader/native_module.cpp b/src/dusk/mods/loader/native_module.cpp index edd3addb4f..f6adf20c60 100644 --- a/src/dusk/mods/loader/native_module.cpp +++ b/src/dusk/mods/loader/native_module.cpp @@ -17,7 +17,8 @@ namespace { #if defined(_WIN32) void* pl_dlopen(const std::filesystem::path& p) { - return LoadLibraryW(p.wstring().c_str()); + return LoadLibraryExW(p.wstring().c_str(), nullptr, + LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); } void* pl_dlsym(void* h, const char* name) { return reinterpret_cast(GetProcAddress(static_cast(h), name)); @@ -55,11 +56,10 @@ std::string pl_dlerror() { return e ? e : "(unknown error)"; } #endif -} +} // namespace namespace dusk::mods::loader { -NativeModule::NativeModule() noexcept : handle(nullptr) { -} +NativeModule::NativeModule() noexcept : handle(nullptr) {} NativeModule::NativeModule(NativeModule&& other) noexcept { handle = other.handle; diff --git a/src/dusk/mods/svc/host.cpp b/src/dusk/mods/svc/host.cpp index 0199a7865a..f5d409f797 100644 --- a/src/dusk/mods/svc/host.cpp +++ b/src/dusk/mods/svc/host.cpp @@ -63,6 +63,11 @@ const char* host_mod_dir(ModContext* context) { return mod != nullptr ? mod->dir.c_str() : ""; } +const char* host_native_dir(ModContext* context) { + const auto* mod = mod_from_context(context); + return mod != nullptr ? mod->nativeDir.c_str() : ""; +} + struct LifecycleWatcher { ModLifecycleFn fn = nullptr; void* userData = nullptr; @@ -142,6 +147,7 @@ constinit HostService s_hostService{ .mod_dir = host_mod_dir, .watch_mod_lifecycle = host_watch_mod_lifecycle, .unwatch_mod_lifecycle = host_unwatch_mod_lifecycle, + .native_dir = host_native_dir, }; } // namespace From d2cdbf0a83a1febed171335b5af0d16ff0f8288f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 18:14:09 -0600 Subject: [PATCH 032/223] Mods: Rework mod linking Apple: mods are now MH_BUNDLE (.so) linked with -bundle_loader, replacing the deprecated (on iOS) -undefined dynamic_lookup. Windows: clang-cl mods link dusklight.exe directly; lld's mingw driver synthesizes imports from the export table. cl still requires the import library. --- cmake/AndroidExports.cmake | 70 ++++++++++++++++++++ cmake/AppleExports.cmake | 91 ++++++++++++++++++++++++++ cmake/ModSDK.cmake | 68 +++++++++++++------ sdk/CMakeLists.txt | 11 ++-- src/dusk/mods/loader/loader.cpp | 8 +-- src/dusk/mods/loader/native_module.hpp | 2 - 6 files changed, 218 insertions(+), 32 deletions(-) create mode 100644 cmake/AndroidExports.cmake create mode 100644 cmake/AppleExports.cmake diff --git a/cmake/AndroidExports.cmake b/cmake/AndroidExports.cmake new file mode 100644 index 0000000000..6bc94b61dc --- /dev/null +++ b/cmake/AndroidExports.cmake @@ -0,0 +1,70 @@ +include_guard(GLOBAL) + +get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) + +# Android mod linking: symgen scans and filters the game's exports, generating a version script used for the executable +# link step, and generates a shared object stub that mods can link against without having to build the whole game. +function(setup_android_exports target) + include("${_dir}/SymbolManifest.cmake") + ensure_symgen(TRUE) + add_dependencies(${target} symgen) + + set(_rsp_lines "$") + foreach (_lib IN LISTS JSYSTEM_LIBRARIES) + list(APPEND _rsp_lines "$") + endforeach () + list(JOIN _rsp_lines "\n" _rsp_content) + set(_rsp "${CMAKE_BINARY_DIR}/dusklight_exports_input.rsp") + file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}") + + set(_sdk_args) + foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx + aurora_os aurora_pad aurora_si aurora_vi) + if (TARGET ${_lib}) + list(APPEND _sdk_args --sdk-lib "$") + endif () + endforeach () + if (TARGET dawn::webgpu_dawn) + get_target_property(_dawn_type dawn::webgpu_dawn TYPE) + if (_dawn_type STREQUAL "STATIC_LIBRARY") + list(APPEND _sdk_args --sdk-lib "$") + endif () + endif () + + set(_vscript "${CMAKE_BINARY_DIR}/dusklight_exports.ver") + add_custom_command(TARGET ${target} PRE_LINK + # TODO: src/dusk/ is NOT excluded: inline code in game headers + # currently call into it (e.g. dusk::frame_interp::lookup_replacement). + COMMAND "${SYMGEN_EXE}" exports + --rsp "${_rsp}" + --out "${_vscript}" + --format version-script + --exclude cmake_pch + --exclude miniz + --exclude asan_options + # Resolved from the Java side; the SDL ones live in the statically-linked + # SDL archive, outside the provenance scan. + --extra-sym JNI_OnLoad + --extra-sym SDL_main + --extra-sym "Java_*" + ${_sdk_args} + COMMENT "Generating dusklight exports" + VERBATIM) + target_link_options(${target} PRIVATE "-Wl,--version-script=${_vscript}") + + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _arch) + if (_arch STREQUAL "aarch64") + set(_machine "arm64") + else () + set(_machine "amd64") + endif () + + set(_stub "${CMAKE_BINARY_DIR}/stub-android-${_arch}.so") + add_custom_command(TARGET ${target} POST_BUILD + COMMAND "${SYMGEN_EXE}" stub -f elf "$" -o "${_stub}" + --soname "$" --machine "${_machine}" + BYPRODUCTS "${_stub}" + COMMENT "Generating dusklight link stub" + VERBATIM) + install(FILES "${_stub}" DESTINATION sdk) +endfunction() diff --git a/cmake/AppleExports.cmake b/cmake/AppleExports.cmake new file mode 100644 index 0000000000..47f45a9718 --- /dev/null +++ b/cmake/AppleExports.cmake @@ -0,0 +1,91 @@ +include_guard(GLOBAL) + +get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) + +# Apple mod linking: symgen scans and filters the game's exports, generating an exports list used for the executable +# link step, and generates a MH_EXECUTE Mach-O stub that mods can link against without having to build the whole game. +function(setup_apple_exports target) + include("${_dir}/SymbolManifest.cmake") + ensure_symgen(TRUE) + set(_symgen "${SYMGEN_EXE}") + add_dependencies(${target} symgen) + + set(_config_subdir "") + if (CMAKE_CONFIGURATION_TYPES) + set(_config_subdir "$/") + endif () + + set(_rsp_lines "$") + foreach (_lib IN LISTS JSYSTEM_LIBRARIES) + list(APPEND _rsp_lines "$") + endforeach () + list(JOIN _rsp_lines "\n" _rsp_content) + set(_rsp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports_input.rsp") + file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}") + + set(_sdk_args) + foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx + aurora_os aurora_pad aurora_si aurora_vi) + if (TARGET ${_lib}) + list(APPEND _sdk_args --sdk-lib "$") + endif () + endforeach () + + # Dawn is linked statically on Apple; mods reach wgpu* through the executable. + if (TARGET dawn::webgpu_dawn) + get_target_property(_dawn_type dawn::webgpu_dawn TYPE) + if (_dawn_type STREQUAL "STATIC_LIBRARY") + list(APPEND _sdk_args --sdk-lib "$") + endif () + endif () + + set(_exp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.exp") + add_custom_command(TARGET ${target} PRE_LINK + # TODO: src/dusk/ is NOT excluded: inline code in game headers + # currently call into it (e.g. dusk::frame_interp::lookup_replacement). + COMMAND "${_symgen}" exports + --rsp "${_rsp}" + --out "${_exp}" + --exclude cmake_pch + --exclude miniz + --exclude asan_options + ${_sdk_args} + COMMENT "Generating dusklight exports" + VERBATIM) + target_link_options(${target} PRIVATE -Xlinker -exported_symbols_list -Xlinker "${_exp}") + + # Generate the stub executable mods link against via -bundle_loader. + set(_stub_args) + if (IOS) + set(_stub_platform "ios") + list(APPEND _stub_args --platform ios) + elseif (TVOS) + set(_stub_platform "tvos") + list(APPEND _stub_args --platform tvos) + else () + set(_stub_platform "macos") + endif () + if (CMAKE_OSX_DEPLOYMENT_TARGET) + list(APPEND _stub_args --min-os "${CMAKE_OSX_DEPLOYMENT_TARGET}") + endif () + if (CMAKE_OSX_ARCHITECTURES) + set(_archs "${CMAKE_OSX_ARCHITECTURES}") + else () + set(_archs "${CMAKE_SYSTEM_PROCESSOR}") + endif () + set(_arch_names "") + foreach (_arch IN LISTS _archs) + string(TOLOWER "${_arch}" _arch) + list(APPEND _stub_args --arch "${_arch}") + list(APPEND _arch_names "${_arch}") + endforeach () + list(JOIN _arch_names "_" _arch_name) + + set(_stub "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight-stub") + add_custom_command(TARGET ${target} POST_BUILD + COMMAND "${_symgen}" stub -f macho "${_exp}" -o "${_stub}" ${_stub_args} + BYPRODUCTS "${_stub}" + COMMENT "Generating dusklight link stub" + VERBATIM) + install(FILES "${_stub}" DESTINATION sdk RENAME "stub-${_stub_platform}-${_arch_name}") +endfunction() diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 81d3c81509..3bf80035e6 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -13,14 +13,15 @@ function(_mod_lib_info out_platform_var out_name_var) set(_arch "${CMAKE_OSX_ARCHITECTURES}") endif () string(TOLOWER "${CMAKE_SYSTEM_NAME}" _platform) + if (_platform STREQUAL "darwin") + set(_platform "macos") + endif () string(TOLOWER "${_arch}" _arch) if (_arch MATCHES "^(i[3-6]86|x86)$") set(_arch "x86") endif () if (WIN32) set(_ext ".dll") - elseif (APPLE) - set(_ext ".dylib") else () set(_ext ".so") endif () @@ -62,7 +63,7 @@ function(add_mod target_name) set(_lib_name "") if (ARG_SOURCES) set(_has_lib TRUE) - add_library(${target_name} SHARED ${ARG_SOURCES}) + add_library(${target_name} MODULE ${ARG_SOURCES}) _mod_lib_info(_lib_platform _lib_name) set_target_properties(${target_name} PROPERTIES PREFIX "" @@ -94,18 +95,28 @@ function(add_mod target_name) endif () if (APPLE) - # Game symbols resolve against the host executable at dlopen time. - target_link_options(${target_name} PRIVATE -undefined dynamic_lookup) + if (TARGET dusklight) + set(_game_exe "$") + add_dependencies(${target_name} dusklight) + elseif (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_exe "${DUSK_GAME_EXE}") + else () + message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (game executable)") + endif () + target_link_options(${target_name} PRIVATE + -Xlinker -bundle_loader -Xlinker "${_game_exe}") + set_property(TARGET ${target_name} APPEND PROPERTY LINK_DEPENDS "${_game_exe}") set_target_properties(${target_name} PROPERTIES BUILD_RPATH "@loader_path" INSTALL_RPATH "@loader_path") elseif (ANDROID) if (TARGET dusklight) target_link_libraries(${target_name} PRIVATE dusklight) - elseif (DUSK_GAME_SOLIB) - target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_SOLIB}") + elseif (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") + target_link_libraries(${target_name} PRIVATE "${_game_lib}") else () - message(FATAL_ERROR "add_mod: DUSK_GAME_SOLIB is not set (libmain.so)") + message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (libmain.so or stub)") endif () set_target_properties(${target_name} PROPERTIES BUILD_RPATH "$ORIGIN" @@ -116,16 +127,33 @@ function(add_mod target_name) BUILD_RPATH "$ORIGIN" INSTALL_RPATH "$ORIGIN") elseif (WIN32) - # Link against the generated import library (game ABI surface). Function calls - # resolve through import thunks. Data is toolchain dependent: - # - clang-cl: lld's mingw mode auto-imports data references, fixed up at load by - # the mod SDK's pseudo-relocation runtime (pseudo_reloc.cpp). - # - cl (MSVC): only DUSK_GAME_DATA-annotated data is reachable. Un-annotated + # Function calls resolve through import thunks. Data is toolchain dependent: + # - clang-cl: lld's mingw driver synthesizes imports straight from the game + # executable's export table (no import library needed) and auto-imports data + # references, fixed up at load by the mod SDK's pseudo-relocation runtime + # (pseudo_reloc.cpp). + # - cl (MSVC): link.exe only imports through an import library, so + # DUSK_GAME_EXE must point at one (sdk/windows-.lib or `symgen stub` + # output); only DUSK_GAME_DATA-annotated data is reachable. Un-annotated # references fail to link. - if (NOT DUSK_GAME_IMPLIB) - message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set.") + if (TARGET dusklight) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(_game_lib "$") + add_dependencies(${target_name} dusklight) + elseif (DUSK_GAME_IMPLIB) + set(_game_lib "${DUSK_GAME_IMPLIB}") + else () + message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set (see setup_windows_exports)") + endif () + elseif (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") + if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT _game_lib MATCHES "\\.lib$") + message(FATAL_ERROR "add_mod: cl must use an import library for DUSK_GAME_EXE") + endif () + else () + message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (game executable or import library)") endif () - target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_IMPLIB}") + target_link_libraries(${target_name} PRIVATE "${_game_lib}") set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0) if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -266,9 +294,9 @@ endfunction() # user cache). # - Linux: pre-extracted stage dirs into /mods so native libs dlopen in place from # read-only installs. -# - macOS: pre-extracted stage dirs into the installed app's Contents/Resources/mods, dylibs -# ad-hoc signed in place, then the whole bundle re-signed. -# - iOS/tvOS: assets into /mods/, the mod dylib into Frameworks/.dylib, +# - macOS: pre-extracted stage dirs into the installed app's Contents/Resources/mods, native +# libs ad-hoc signed in place, then the whole bundle re-signed. +# - iOS/tvOS: assets into /mods/, the mod library into Frameworks/.so, # and runtime libraries alongside it. # - Android: nothing here; gradle packs ${CMAKE_BINARY_DIR}/bundled_mods into APK assets. function(install_bundled_mods) @@ -299,7 +327,7 @@ function(install_bundled_mods) install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/mods/${_id}" PATTERN "lib" EXCLUDE) install(PROGRAMS "$" - DESTINATION "${_bundle_dir}/Frameworks" RENAME "${_id}.dylib") + DESTINATION "${_bundle_dir}/Frameworks" RENAME "${_id}.so") install(DIRECTORY "${_stage}/lib/${_lib_platform}/" DESTINATION "${_bundle_dir}/Frameworks" PATTERN "${_lib_name}" EXCLUDE) diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt index 8670603866..7d1d17a8c2 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt @@ -7,8 +7,7 @@ # add_subdirectory(/sdk dusk-sdk EXCLUDE_FROM_ALL) # add_mod(my_mod SOURCES ... MOD_JSON mod.json) # -# On Windows, pass -DDUSK_GAME_IMPLIB= from the -# matching game release. TODO: auto-download from tag +# TODO: auto-download link targets from tag cmake_minimum_required(VERSION 3.25) @@ -38,10 +37,10 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/../extern/aurora/cmake/AuroraDawnProvider.c # Game ABI headers & compile definitions include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GameABIConfig.cmake") -if (WIN32) - set(DUSK_GAME_IMPLIB "" CACHE FILEPATH "Path to the dusklight import library (sdk/dusklight.lib)") - if (DUSK_GAME_IMPLIB AND NOT EXISTS "${DUSK_GAME_IMPLIB}") - message(FATAL_ERROR "Mod SDK: DUSK_GAME_IMPLIB does not exist: ${DUSK_GAME_IMPLIB}") +if (WIN32 OR APPLE OR ANDROID) + set(DUSK_GAME_EXE "" CACHE FILEPATH "Game binary or link stub mods link against") + if (DUSK_GAME_EXE AND NOT EXISTS "${DUSK_GAME_EXE}") + message(FATAL_ERROR "Mod SDK: DUSK_GAME_EXE does not exist: ${DUSK_GAME_EXE}") endif () endif () diff --git a/src/dusk/mods/loader/loader.cpp b/src/dusk/mods/loader/loader.cpp index 008ace157d..adf465e367 100644 --- a/src/dusk/mods/loader/loader.cpp +++ b/src/dusk/mods/loader/loader.cpp @@ -55,13 +55,13 @@ static constexpr std::string_view k_nativePlatform = "ios-arm64"sv; #elif TARGET_OS_TV static constexpr std::string_view k_nativePlatform = "tvos-arm64"sv; #elif defined(__aarch64__) -static constexpr std::string_view k_nativePlatform = "darwin-arm64"sv; +static constexpr std::string_view k_nativePlatform = "macos-arm64"sv; #elif defined(__x86_64__) -static constexpr std::string_view k_nativePlatform = "darwin-x86_64"sv; +static constexpr std::string_view k_nativePlatform = "macos-x86_64"sv; #else static constexpr std::string_view k_nativePlatform = ""sv; #endif -static constexpr std::string_view k_nativeLibName = "mod.dylib"sv; +static constexpr std::string_view k_nativeLibName = "mod.so"sv; #elif defined(__linux__) #if defined(__aarch64__) static constexpr std::string_view k_nativePlatform = "linux-aarch64"sv; @@ -130,7 +130,7 @@ NativeLocateResult locate_native_runtime(ModBundle& bundle) { if (platformEnd != std::string_view::npos) { const auto entryName = libPath.substr(platformEnd + 1); if (entryName.find('/') == std::string_view::npos && - (entryName == "mod.dll"sv || entryName == "mod.dylib"sv || entryName == "mod.so"sv)) + (entryName == "mod.dll"sv || entryName == "mod.so"sv)) { result.anyLibs = true; } diff --git a/src/dusk/mods/loader/native_module.hpp b/src/dusk/mods/loader/native_module.hpp index ff2acf9632..2632496f96 100644 --- a/src/dusk/mods/loader/native_module.hpp +++ b/src/dusk/mods/loader/native_module.hpp @@ -22,8 +22,6 @@ public: #if defined(_WIN32) static constexpr auto LibraryExtension = ".dll"; -#elif defined(__APPLE__) - static constexpr auto LibraryExtension = ".dylib"; #else static constexpr auto LibraryExtension = ".so"; #endif From 1bd86828556b4d124e4a924ec0812530a10a3535 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 18:14:09 -0600 Subject: [PATCH 033/223] Mods: Curate exports and generate link stubs `symgen exports` replaces -export_dynamic on Apple and curates Android's dynamic symbols with a version script. `symgen stub` then emits sdk/stub-{macos,ios,tvos}-, sdk/stub-android-.so, and sdk/windows-.lib. --- CMakeLists.txt | 9 ++++++--- cmake/AndroidExports.cmake | 10 ++-------- cmake/AppleExports.cmake | 2 +- cmake/SymbolManifest.cmake | 2 +- cmake/WindowsExports.cmake | 8 +++----- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0f80651ac..bf35cb2e45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -491,9 +491,12 @@ if (WIN32) target_link_libraries(dusklight PRIVATE Psapi) endif () if (APPLE) - # Mods resolve game symbols from the executable at dlopen time. - target_link_options(dusklight PRIVATE -Wl,-export_dynamic) -elseif (UNIX AND NOT ANDROID) + include(cmake/AppleExports.cmake) + setup_apple_exports(dusklight) +elseif (ANDROID) + include(cmake/AndroidExports.cmake) + setup_android_exports(dusklight) +elseif (UNIX) target_link_options(dusklight PRIVATE -rdynamic) endif () diff --git a/cmake/AndroidExports.cmake b/cmake/AndroidExports.cmake index 6bc94b61dc..23e14898e0 100644 --- a/cmake/AndroidExports.cmake +++ b/cmake/AndroidExports.cmake @@ -36,7 +36,7 @@ function(setup_android_exports target) # TODO: src/dusk/ is NOT excluded: inline code in game headers # currently call into it (e.g. dusk::frame_interp::lookup_replacement). COMMAND "${SYMGEN_EXE}" exports - --rsp "${_rsp}" + "@${_rsp}" --out "${_vscript}" --format version-script --exclude cmake_pch @@ -53,16 +53,10 @@ function(setup_android_exports target) target_link_options(${target} PRIVATE "-Wl,--version-script=${_vscript}") string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _arch) - if (_arch STREQUAL "aarch64") - set(_machine "arm64") - else () - set(_machine "amd64") - endif () - set(_stub "${CMAKE_BINARY_DIR}/stub-android-${_arch}.so") add_custom_command(TARGET ${target} POST_BUILD COMMAND "${SYMGEN_EXE}" stub -f elf "$" -o "${_stub}" - --soname "$" --machine "${_machine}" + --soname "$" --arch "${_arch}" BYPRODUCTS "${_stub}" COMMENT "Generating dusklight link stub" VERBATIM) diff --git a/cmake/AppleExports.cmake b/cmake/AppleExports.cmake index 47f45a9718..0b43fdb6ee 100644 --- a/cmake/AppleExports.cmake +++ b/cmake/AppleExports.cmake @@ -44,7 +44,7 @@ function(setup_apple_exports target) # TODO: src/dusk/ is NOT excluded: inline code in game headers # currently call into it (e.g. dusk::frame_interp::lookup_replacement). COMMAND "${_symgen}" exports - --rsp "${_rsp}" + "@${_rsp}" --out "${_exp}" --exclude cmake_pch --exclude miniz diff --git a/cmake/SymbolManifest.cmake b/cmake/SymbolManifest.cmake index 927040a47f..6d9b86de19 100644 --- a/cmake/SymbolManifest.cmake +++ b/cmake/SymbolManifest.cmake @@ -2,7 +2,7 @@ include_guard(GLOBAL) get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) -set(_SYMGEN_VERSION "1.1.1") +set(_SYMGEN_VERSION "1.2.0") set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}") set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release") mark_as_advanced(SYMGEN_PATH) diff --git a/cmake/WindowsExports.cmake b/cmake/WindowsExports.cmake index 3010c82f25..e9cea7074e 100644 --- a/cmake/WindowsExports.cmake +++ b/cmake/WindowsExports.cmake @@ -53,7 +53,7 @@ function(setup_windows_exports target) # TODO: src/dusk/ is NOT excluded: inline code in game headers # currently call into it (e.g. dusk::frame_interp::lookup_replacement). COMMAND "${_symgen}" def - --rsp "${_rsp}" + "@${_rsp}" --out "${_def}" --exclude cmake_pch --exclude miniz @@ -82,9 +82,7 @@ function(setup_windows_exports target) COMMENT "Generating dusklight import library" VERBATIM) set(DUSK_GAME_IMPLIB "${_implib}" CACHE INTERNAL "Import library for Windows mod linking") - set(DUSK_GAME_DEF "${_def}" CACHE INTERNAL "Curated export .def for the game executable") - # Ship the import library as sdk/dusklight.lib in the install tree: mods may use it to - # compile against Dusklight without having to build the whole game. (See DUSK_GAME_IMPLIB) - install(FILES "${_implib}" DESTINATION sdk RENAME dusklight.lib) + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _implib_arch) + install(FILES "${_implib}" DESTINATION sdk RENAME "windows-${_implib_arch}.lib") endfunction() From dfc3077333022171d263e15ec4465019046bf4b5 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 18:14:09 -0600 Subject: [PATCH 034/223] CI: Add sdk/ link stubs in build artifacts --- .github/workflows/build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80257624c5..3fe534cae8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,6 +80,7 @@ jobs: path: | build/install/Dusklight-*.AppImage build/install/debug.tar.* + build/install/sdk/ build-apple: name: Build Apple (${{matrix.name}}) @@ -148,6 +149,7 @@ jobs: path: | build/install/Dusklight.app build/install/debug.tar.* + build/install/sdk/ build-android: name: Build Android (${{matrix.name}}) @@ -210,11 +212,17 @@ jobs: working-directory: platforms/android run: ./gradlew :app:assembleRelease --rerun-tasks + - name: Stage artifacts + run: | + mkdir -p upload/sdk + cp build/*/stub-android-*.so upload/sdk/ + cp platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk upload/ + - name: Upload artifacts uses: actions/upload-artifact@v7 with: name: dusklight-${{env.DUSK_VERSION}}-android-${{matrix.artifact_arch}} - path: platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk + path: upload/ build-windows: name: Build Windows (${{matrix.name}}) @@ -281,3 +289,4 @@ jobs: build/install/*.dll build/install/res/ build/install/debug.7z + build/install/sdk/ From f5d30a886d9f9e4d6d98c4f5d375c9e2ce9e0930 Mon Sep 17 00:00:00 2001 From: SuperDude88 <82904174+SuperDude88@users.noreply.github.com> Date: Tue, 14 Jul 2026 01:07:02 -0400 Subject: [PATCH 035/223] FPS Counter Fix (#2207) * FPS Counter Fix I broke it in #2198 oops * Run clang-format --- src/dusk/ui/overlay.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/dusk/ui/overlay.cpp b/src/dusk/ui/overlay.cpp index 3b5b43299e..d2bd3fe6c1 100644 --- a/src/dusk/ui/overlay.cpp +++ b/src/dusk/ui/overlay.cpp @@ -252,15 +252,20 @@ void Overlay::update() { if (getSettings().video.enableFpsOverlay.getValue()) { const int idx = getSettings().video.fpsOverlayCorner.getValue(); mFpsCounter->SetAttribute("open", ""); + mFpsCounter->RemoveProperty(Rml::PropertyId::Bottom); mFpsCounter->SetAttribute("corner", kFpsCorners[idx]); - if(idx == 2 && mPipelineProgress && mPipelineProgress->GetAttribute("open")) { - // 12 (height of pipeline box off bottom) + height of pipeline box + 3 (padding space) - mFpsCounter->SetProperty(Rml::PropertyId::Bottom, Rml::Property(15 + mPipelineProgress->GetOffsetHeight(), Rml::Unit::PX)); - } - else { - // Return fps counter to default height off the bottom - mFpsCounter->SetProperty(Rml::PropertyId::Bottom, Rml::Property(12, Rml::Unit::PX)); + if (idx == 2) { + if (mPipelineProgress && mPipelineProgress->GetAttribute("open")) { + // 12 (height of pipeline box off bottom) + height of pipeline box + 3 (padding + // space) + mFpsCounter->SetProperty(Rml::PropertyId::Bottom, + Rml::Property(15 + mPipelineProgress->GetOffsetHeight(), Rml::Unit::PX)); + } else { + // Return fps counter to default height off the bottom + mFpsCounter->SetProperty( + Rml::PropertyId::Bottom, Rml::Property(12, Rml::Unit::PX)); + } } const Uint64 perfFreq = SDL_GetPerformanceFrequency(); From f14278cec80fb8565abfbafff96ed3f56ca85e82 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jul 2026 19:05:18 -0600 Subject: [PATCH 036/223] CMake: Remove release preset No longer supporting LTO with modding. --- CMakePresets.json | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 394a1ddef5..68790bf945 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -22,18 +22,6 @@ "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL" } }, - { - "name": "release", - "hidden": true, - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL", - "CMAKE_INTERPROCEDURAL_OPTIMIZATION": { - "type": "BOOL", - "value": true - } - } - }, { "name": "ci", "hidden": true, @@ -445,8 +433,7 @@ "hidden": true, "inherits": [ "android-base", - "ci", - "release" + "ci" ], "cacheVariables": { "DUSK_ENABLE_SENTRY_NATIVE": { From 26d22d414af956babf88959ebf6b89583501f800 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 08:33:45 -0600 Subject: [PATCH 037/223] Mods: Enable Windows ARM64 mod linking --- CMakePresets.json | 10 +++------- cmake/WindowsExports.cmake | 22 ++++++++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 68790bf945..e6485ddac1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -196,17 +196,13 @@ { "name": "windows-arm64-msvc", "displayName": "Windows ARM64 (MSVC)", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build/${presetName}", + "inherits": [ + "windows-msvc" + ], "architecture": { "value": "arm64", "strategy": "external" }, - "cacheVariables": { - "CMAKE_C_COMPILER": "cl", - "CMAKE_CXX_COMPILER": "cl", - "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install" - }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ diff --git a/cmake/WindowsExports.cmake b/cmake/WindowsExports.cmake index e9cea7074e..a82f7756af 100644 --- a/cmake/WindowsExports.cmake +++ b/cmake/WindowsExports.cmake @@ -6,9 +6,16 @@ get_filename_component(_DUSK_WINDOWS_EXPORTS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FIL # import library mods link against. symgen scans the built objects, filters by source, and # writes a .def used by the main link and import library generation. function(setup_windows_exports target) - if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - message(WARNING "dusklight: Windows code-mod exports are x64-only for now; skipping") - return() + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _implib_arch) + if (_implib_arch STREQUAL "arm64") + set(_dlltool_machine "arm64") + set(_lib_machine "arm64") + elseif (_implib_arch MATCHES "^(amd64|x86_64)$") + set(_dlltool_machine "i386:x86-64") + set(_lib_machine "x64") + else () + message(FATAL_ERROR + "dusklight: no Windows mod linking support for ${CMAKE_SYSTEM_PROCESSOR}") endif () include("${_DUSK_WINDOWS_EXPORTS_CMAKE_DIR}/SymbolManifest.cmake") @@ -70,11 +77,11 @@ function(setup_windows_exports target) get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY) find_program(DUSK_LLVM_DLLTOOL llvm-dlltool HINTS "${_compiler_dir}") if (DUSK_LLVM_DLLTOOL) - set(_implib_cmd "${DUSK_LLVM_DLLTOOL}" -d "${_def}" -D dusklight.exe -m i386:x86-64 - -l "${_implib}") + set(_implib_cmd "${DUSK_LLVM_DLLTOOL}" -d "${_def}" -D dusklight.exe + -m "${_dlltool_machine}" -l "${_implib}") else () - set(_implib_cmd "${CMAKE_AR}" /nologo "/def:${_def}" /machine:x64 /name:dusklight.exe - "/out:${_implib}") + set(_implib_cmd "${CMAKE_AR}" /nologo "/def:${_def}" "/machine:${_lib_machine}" + /name:dusklight.exe "/out:${_implib}") endif () add_custom_command(TARGET ${target} POST_BUILD COMMAND ${_implib_cmd} @@ -83,6 +90,5 @@ function(setup_windows_exports target) VERBATIM) set(DUSK_GAME_IMPLIB "${_implib}" CACHE INTERNAL "Import library for Windows mod linking") - string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _implib_arch) install(FILES "${_implib}" DESTINATION sdk RENAME "windows-${_implib_arch}.lib") endfunction() From d5fcd793068bba5e6c027f3a55ab522eb3e85471 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 09:04:34 -0600 Subject: [PATCH 038/223] CI: Install & package the symbol manifest on Windows/Linux --- .github/workflows/build.yml | 1 + ci/build-appimage.sh | 3 +++ cmake/SymbolManifest.cmake | 3 +++ 3 files changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fe534cae8..5a8c505c52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -287,6 +287,7 @@ jobs: path: | build/install/*.exe build/install/*.dll + build/install/*.symdb build/install/res/ build/install/debug.7z build/install/sdk/ diff --git a/ci/build-appimage.sh b/ci/build-appimage.sh index e12f1163b9..ec7d6b410e 100755 --- a/ci/build-appimage.sh +++ b/ci/build-appimage.sh @@ -19,6 +19,9 @@ for install_path in build/install/*; do [[ "$(basename "$install_path")" == *.* ]] && continue cp -r "$install_path" build/appdir/usr/bin done +if [[ -f build/install/dusklight.symdb ]]; then + cp build/install/dusklight.symdb build/appdir/usr/bin +fi cp -r platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} build/appdir/usr/share/icons/hicolor cp platforms/freedesktop/dev.twilitrealm.dusk.desktop build/appdir/usr/share/applications diff --git a/cmake/SymbolManifest.cmake b/cmake/SymbolManifest.cmake index 6d9b86de19..1cb78b6bb8 100644 --- a/cmake/SymbolManifest.cmake +++ b/cmake/SymbolManifest.cmake @@ -122,4 +122,7 @@ function(setup_symbol_manifest target) COMMAND "${SYMGEN_EXE}" manifest ${_input} --out "${_out}" COMMENT "Generating symbol manifest" VERBATIM) + if (NOT APPLE) + install(FILES "${_out}" DESTINATION .) + endif () endfunction() From 8471fa01070dfe80311630f22490c2ca749cb42a Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 09:22:50 -0600 Subject: [PATCH 039/223] Android: Bundle in-tree mods into the APK --- .github/workflows/build.yml | 4 ++ platforms/android/.gitignore | 1 + platforms/android/app/build.gradle | 5 ++ .../com/twilitrealm/dusk/DuskActivity.java | 49 +++++++++++++++++++ platforms/android/scripts/stage-jni-libs.sh | 24 +++++++++ 5 files changed, 83 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a8c505c52..2f9f666700 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -205,6 +205,9 @@ jobs: - name: Build native library run: cmake --build --preset ${{matrix.preset}} --target dusklight + - name: Build bundled mods + run: cmake --build --preset ${{matrix.preset}} --target dusklight_mods + - name: Stage stripped JNI library run: ANDROID_STAGE_ABIS="${{matrix.abi}}" platforms/android/scripts/stage-jni-libs.sh @@ -289,5 +292,6 @@ jobs: build/install/*.dll build/install/*.symdb build/install/res/ + build/install/mods/ build/install/debug.7z build/install/sdk/ diff --git a/platforms/android/.gitignore b/platforms/android/.gitignore index 7775e3c7f4..002aaa86aa 100644 --- a/platforms/android/.gitignore +++ b/platforms/android/.gitignore @@ -3,3 +3,4 @@ build/ app/build/ local.properties app/src/main/jniLibs/*/*.so +app/src/main/bundled_mods/ diff --git a/platforms/android/app/build.gradle b/platforms/android/app/build.gradle index 8527cd1f4d..c7a25e732b 100644 --- a/platforms/android/app/build.gradle +++ b/platforms/android/app/build.gradle @@ -12,6 +12,11 @@ def syncDuskAssets = tasks.register('syncDuskAssets', Sync) { into 'res' exclude '**/.DS_Store' } + // Staged by platforms/android/scripts/stage-jni-libs.sh + from(new File(projectDir, 'src/main/bundled_mods')) { + into 'mods' + include '*.dusk' + } into duskGeneratedAssetsDir } diff --git a/platforms/android/app/src/main/java/com/twilitrealm/dusk/DuskActivity.java b/platforms/android/app/src/main/java/com/twilitrealm/dusk/DuskActivity.java index 96fc302d9e..2fa6cbacb3 100644 --- a/platforms/android/app/src/main/java/com/twilitrealm/dusk/DuskActivity.java +++ b/platforms/android/app/src/main/java/com/twilitrealm/dusk/DuskActivity.java @@ -27,6 +27,10 @@ import org.libsdl.app.SDLActivity; import org.libsdl.app.SDLSurface; import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.util.ArrayList; import java.util.List; @@ -90,10 +94,55 @@ public class DuskActivity extends SDLActivity { @Override protected void onCreate(Bundle savedInstanceState) { + extractBundledMods(); super.onCreate(savedInstanceState); hideSystemBars(); } + // Bundled mod packages ship as APK assets, which the native loader cannot read directly; + // mirror them into internal storage (the loader's CachePath/bundled_mods search dir) + // before SDL_main starts. + private void extractBundledMods() { + File outDir = new File(getFilesDir(), "bundled_mods"); + try { + deleteRecursively(outDir); // drop packages removed by an app update + String[] names = getAssets().list("mods"); + if (names == null || names.length == 0) { + return; + } + if (!outDir.mkdirs()) { + Log.w(TAG, "Unable to create " + outDir); + return; + } + byte[] buffer = new byte[65536]; + for (String name : names) { + if (!name.endsWith(".dusk")) { + continue; + } + try (InputStream in = getAssets().open("mods/" + name); + OutputStream out = new FileOutputStream(new File(outDir, name))) + { + int count; + while ((count = in.read(buffer)) > 0) { + out.write(buffer, 0, count); + } + } + } + } catch (IOException e) { + Log.w(TAG, "Failed to extract bundled mods", e); + } + } + + private static void deleteRecursively(File file) { + File[] children = file.listFiles(); + if (children != null) { + for (File child : children) { + deleteRecursively(child); + } + } + file.delete(); + } + @Override protected SDLSurface createSDLSurface(Context context) { return new DuskSurface(context); diff --git a/platforms/android/scripts/stage-jni-libs.sh b/platforms/android/scripts/stage-jni-libs.sh index 42b08c13e6..a30d961156 100755 --- a/platforms/android/scripts/stage-jni-libs.sh +++ b/platforms/android/scripts/stage-jni-libs.sh @@ -70,3 +70,27 @@ for abi in $ANDROID_STAGE_ABIS; do esac copy_lib "$abi" "$src" done + +# Stage bundled mod packages into the app's assets source dir. +MODS_STAGING_DIR="$ROOT_DIR/platforms/android/app/src/main/bundled_mods" +rm -rf "$MODS_STAGING_DIR" +mkdir -p "$MODS_STAGING_DIR" +for abi in $ANDROID_STAGE_ABIS; do + case "$abi" in + arm64-v8a) build_dir="$ROOT_DIR/build/android-arm64" ;; + x86_64) build_dir="$ROOT_DIR/build/android-x86_64" ;; + esac + [[ -d "$build_dir/bundled_mods" ]] || continue + for pkg in "$build_dir/bundled_mods"/*.dusk; do + [[ -f "$pkg" ]] || continue + name="$(basename "$pkg")" + if [[ ! -f "$MODS_STAGING_DIR/$name" ]]; then + cp -f "$pkg" "$MODS_STAGING_DIR/$name" + echo "Staged bundled mod $pkg" + else + stage_dir="$build_dir/mods/${name%.dusk}/${name%.dusk}_stage" + (cd "$stage_dir" && zip -q -r "$MODS_STAGING_DIR/$name" lib) + echo "Appended $abi libraries to bundled mod $name" + fi + done +done From f000ccce0b5272f2e743b5b1946415483c03c210 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 10:58:11 -0600 Subject: [PATCH 040/223] Mod API: Resolve thunks recursively (Windows ARM64 fix) --- src/dusk/mods/svc/hook.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/dusk/mods/svc/hook.cpp b/src/dusk/mods/svc/hook.cpp index 35324185e6..b5eb60c216 100644 --- a/src/dusk/mods/svc/hook.cpp +++ b/src/dusk/mods/svc/hook.cpp @@ -181,6 +181,18 @@ void* resolve_import_thunk(void* addr) { return addr; } +// Resolve thunks recursively (max of 8 steps) until we find our target. +void* resolve_target(void* addr) { + for (int i = 0; i < 8; ++i) { + void* next = resolve_import_thunk(addr); + if (next == addr) { + break; + } + addr = next; + } + return addr; +} + funchook_t* install_trampoline(void* fnAddr, void* trampoline, void** outOriginal) { funchook_t* fh = funchook_create(); if (fh == nullptr) { @@ -222,7 +234,7 @@ ModResult hook_install(ModContext* context, void* fnAddr, void* trampolineFn, vo return MOD_INVALID_ARGUMENT; } - fnAddr = resolve_import_thunk(fnAddr); + fnAddr = resolve_target(fnAddr); if (!declared_target(context, fnAddr)) { return reject_undeclared(context, fnAddr); } @@ -268,7 +280,7 @@ ModResult hook_add_pre( if (fnAddr == nullptr || context == nullptr || callback == nullptr) { return MOD_INVALID_ARGUMENT; } - fnAddr = resolve_import_thunk(fnAddr); + fnAddr = resolve_target(fnAddr); if (!declared_target(context, fnAddr)) { return reject_undeclared(context, fnAddr); } @@ -283,7 +295,7 @@ ModResult hook_add_post( if (fnAddr == nullptr || context == nullptr || callback == nullptr) { return MOD_INVALID_ARGUMENT; } - fnAddr = resolve_import_thunk(fnAddr); + fnAddr = resolve_target(fnAddr); if (!declared_target(context, fnAddr)) { return reject_undeclared(context, fnAddr); } @@ -300,7 +312,7 @@ ModResult hook_replace( } const HookOptions normalized = normalize_options(options); - fnAddr = resolve_import_thunk(fnAddr); + fnAddr = resolve_target(fnAddr); if (!declared_target(context, fnAddr)) { return reject_undeclared(context, fnAddr); } @@ -337,7 +349,7 @@ ModResult hook_dispatch_pre( return MOD_INVALID_ARGUMENT; } - fnAddr = resolve_import_thunk(fnAddr); + fnAddr = resolve_target(fnAddr); const auto it = s_registry.find(reinterpret_cast(fnAddr)); if (it == s_registry.end()) { return MOD_OK; @@ -387,7 +399,7 @@ ModResult hook_dispatch_post(ModContext*, void* fnAddr, void* args, void* retval return MOD_INVALID_ARGUMENT; } - fnAddr = resolve_import_thunk(fnAddr); + fnAddr = resolve_target(fnAddr); const auto it = s_registry.find(reinterpret_cast(fnAddr)); if (it == s_registry.end()) { return MOD_OK; @@ -731,7 +743,7 @@ void hook_resolve_mod_records(LoadedMod& mod) { } const auto resolved = [&](void* target, void** slot) { - target = resolve_import_thunk(target); + target = resolve_target(target); *slot = target; declared.push_back(reinterpret_cast(target)); }; From a95bc76237eccb59898b2753a628864f62b87478 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 11:04:15 -0600 Subject: [PATCH 041/223] Mods: Remove -lldmingw + pseudo_reloc It turns out this approach can't work on ARM64 Windows due to the relocation model, so we can simplify and just remove it entirely. Separately, I will make a commit tagging all game data as DUSK_GAME_DATA, so things work uniformly across cl/clang-cl and x64/ arm64. --- cmake/ModSDK.cmake | 46 ++++---------- sdk/pseudo_reloc.cpp | 139 ------------------------------------------- 2 files changed, 11 insertions(+), 174 deletions(-) delete mode 100644 sdk/pseudo_reloc.cpp diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 3bf80035e6..0e8d72a0a0 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -127,52 +127,28 @@ function(add_mod target_name) BUILD_RPATH "$ORIGIN" INSTALL_RPATH "$ORIGIN") elseif (WIN32) - # Function calls resolve through import thunks. Data is toolchain dependent: - # - clang-cl: lld's mingw driver synthesizes imports straight from the game - # executable's export table (no import library needed) and auto-imports data - # references, fixed up at load by the mod SDK's pseudo-relocation runtime - # (pseudo_reloc.cpp). - # - cl (MSVC): link.exe only imports through an import library, so - # DUSK_GAME_EXE must point at one (sdk/windows-.lib or `symgen stub` - # output); only DUSK_GAME_DATA-annotated data is reachable. Un-annotated - # references fail to link. + # Mods link against the game's import library (sdk/windows-.lib, generated by + # setup_windows_exports); cl and clang-cl both consume it in MSVC mode. Function + # calls resolve through import thunks; game data is reachable only through + # __declspec(dllimport), i.e. DUSK_GAME_DATA-annotated declarations. if (TARGET dusklight) - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(_game_lib "$") - add_dependencies(${target_name} dusklight) - elseif (DUSK_GAME_IMPLIB) - set(_game_lib "${DUSK_GAME_IMPLIB}") - else () + if (NOT DUSK_GAME_IMPLIB) message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set (see setup_windows_exports)") endif () + set(_game_lib "${DUSK_GAME_IMPLIB}") elseif (DUSK_GAME_EXE) _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") - if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT _game_lib MATCHES "\\.lib$") - message(FATAL_ERROR "add_mod: cl must use an import library for DUSK_GAME_EXE") + if (NOT _game_lib MATCHES "\\.lib$") + message(FATAL_ERROR + "add_mod: DUSK_GAME_EXE must be an import library on Windows " + "(sdk/windows-.lib)") endif () else () - message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (game executable or import library)") + message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (import library)") endif () target_link_libraries(${target_name} PRIVATE "${_game_lib}") set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0) - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - target_compile_options(${target_name} PRIVATE "$<$:/clang:-mcmodel=large>") - target_sources(${target_name} PRIVATE "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../sdk/pseudo_reloc.cpp") - # lld mingw mode rewrites /DEFAULTLIB directives to -l style and skips %LIB%, so - # the CRT libraries and search paths are spelled out explicitly. - target_link_options(${target_name} PRIVATE -lldmingw /nodefaultlib /INCREMENTAL:NO) - target_link_libraries(${target_name} PRIVATE - msvcrt.lib msvcprt.lib vcruntime.lib ucrt.lib - oldnames.lib uuid.lib kernel32.lib user32.lib) - set(_lib_dirs "$ENV{LIB}") - if ("${_lib_dirs}" STREQUAL "") - message(FATAL_ERROR "add_mod: %LIB% is empty; configure from a VS dev shell") - endif () - foreach (_libdir IN LISTS _lib_dirs) - target_link_options(${target_name} PRIVATE "/libpath:${_libdir}") - endforeach () - endif () endif () endif () if (ARG_RUNTIME_LIBRARIES AND NOT _has_lib) diff --git a/sdk/pseudo_reloc.cpp b/sdk/pseudo_reloc.cpp deleted file mode 100644 index f86d783f2d..0000000000 --- a/sdk/pseudo_reloc.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// Mod SDK runtime (Windows): applies lld's MinGW-style runtime pseudo-relocations on -// the plain MSVC CRT. This is what lets mods reference game data (`extern` globals) with no -// __declspec(dllimport) annotations: `lld-link -lldmingw` auto-imports the data through IAT -// slots and records fixups, and this module applies them at load time. -// -// The fixup pass runs as an early CRT initializer, and the IAT slots it reads were already -// bound by the OS loader, so even mod static initializers observe patched references. - -#include - -#include -#include -#include - -extern "C" char __RUNTIME_PSEUDO_RELOC_LIST__; -extern "C" char __RUNTIME_PSEUDO_RELOC_LIST_END__; -extern "C" IMAGE_DOS_HEADER __ImageBase; - -namespace { - -struct HdrV2 { - uint32_t magic1; - uint32_t magic2; - uint32_t version; -}; -struct ItemV2 { - uint32_t sym; // RVA of the __imp_ slot (OS-bound IAT entry) - uint32_t target; // RVA of the reference to patch - uint32_t flags; // low 8 bits: bit width of the reference -}; - -bool g_relocsFailed = false; - -void report(const char* fmt, ...) { - char buf[512]; - va_list args; - va_start(args, fmt); - vsnprintf(buf, sizeof(buf), fmt, args); - va_end(args); - fprintf(stderr, "%s\n", buf); - OutputDebugStringA(buf); -} - -bool compute_fixup(const ItemV2& item, char* base, intptr_t* out) { - char* impSlot = base + item.sym; - const intptr_t real = *reinterpret_cast(impSlot); - char* target = base + item.target; - const int bits = static_cast(item.flags & 0xff); - - intptr_t reldata; - switch (bits) { - case 8: - reldata = *reinterpret_cast(target); - break; - case 16: - reldata = *reinterpret_cast(target); - break; - case 32: - reldata = *reinterpret_cast(target); - break; - case 64: - reldata = *reinterpret_cast(target); - break; - default: - report("unsupported %d-bit pseudo-relocation at RVA 0x%x", bits, item.target); - return false; - } - reldata -= reinterpret_cast(impSlot); - reldata += real; - - if (bits < 64) { - const intptr_t maxUnsigned = (intptr_t{1} << bits) - 1; - const intptr_t minSigned = -(intptr_t{1} << (bits - 1)); - if (reldata > maxUnsigned || reldata < minSigned) { - report("%d-bit data fixup at RVA 0x%x is out of range (delta %+lld)", bits, item.target, - static_cast(reldata)); - return false; - } - } - *out = reldata; - return true; -} - -} // namespace - -// lld refuses to emit runtime pseudo-relocs unless a function with exactly this (mingw CRT) -// name exists in the image. It is also our actual entry point. -extern "C" void _pei386_runtime_relocator() { - char* base = reinterpret_cast(&__ImageBase); - char* start = &__RUNTIME_PSEUDO_RELOC_LIST__; - char* end = &__RUNTIME_PSEUDO_RELOC_LIST_END__; - if (end - start < static_cast(sizeof(HdrV2))) { - return; // no data auto-imports in this mod - } - const HdrV2* hdr = reinterpret_cast(start); - if (hdr->magic1 != 0 || hdr->magic2 != 0 || hdr->version != 1) { - report("unexpected pseudo-relocation list format"); - g_relocsFailed = true; - return; - } - const ItemV2* items = reinterpret_cast(hdr + 1); - const ItemV2* itemsEnd = reinterpret_cast(end); - - // Validate everything before writing anything, so a bad fixup can't leave the image - // half-patched. - intptr_t scratch; - for (const ItemV2* it = items; it < itemsEnd; ++it) { - if (!compute_fixup(*it, base, &scratch)) { - g_relocsFailed = true; - return; - } - } - for (const ItemV2* it = items; it < itemsEnd; ++it) { - intptr_t reldata; - compute_fixup(*it, base, &reldata); - char* target = base + it->target; - const size_t len = static_cast(it->flags & 0xff) / 8; - DWORD old = 0; - if (!VirtualProtect(target, len, PAGE_EXECUTE_READWRITE, &old)) { - report("VirtualProtect failed at RVA 0x%x", it->target); - g_relocsFailed = true; - return; - } - std::memcpy(target, &reldata, len); - VirtualProtect(target, len, old, &old); - } -} - -using PVFV = void (*)(); -#pragma section(".CRT$XCB", read) -extern "C" __declspec(allocate(".CRT$XCB")) PVFV dusk_mod_pseudo_reloc_init = - _pei386_runtime_relocator; - -BOOL WINAPI DllMain(HINSTANCE, DWORD reason, LPVOID) { - if (reason == DLL_PROCESS_ATTACH && g_relocsFailed) { - return FALSE; - } - return TRUE; -} From eed14acdc6b5391b9dc2ef8bed0ed3a6b8ed0371 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 13:49:21 -0600 Subject: [PATCH 042/223] Annotate all data with DUSK_GAME_DATA (#2214) The hope of auto-importing data via lld MinGW + pseudo_reloc is now dead thanks to ARM64, so I just wrote a script to go annotate every exported data symbol in the game instead. --- include/DynamicLink.h | 6 +- include/SSystem/SComponent/c_API.h | 2 +- include/SSystem/SComponent/c_angle.h | 10 +- include/SSystem/SComponent/c_cc_d.h | 2 +- include/SSystem/SComponent/c_counter.h | 2 +- include/SSystem/SComponent/c_lib.h | 2 +- include/SSystem/SComponent/c_m3d.h | 2 +- include/SSystem/SComponent/c_malloc.h | 2 +- include/SSystem/SComponent/c_sxyz.h | 2 +- include/SSystem/SComponent/c_xyz.h | 16 +- include/Z2AudioLib/Z2Audience.h | 4 +- include/Z2AudioLib/Z2AudioMgr.h | 2 +- include/Z2AudioLib/Z2Calc.h | 4 +- include/Z2AudioLib/Z2EnvSeMgr.h | 2 +- include/Z2AudioLib/Z2LinkMgr.h | 2 +- include/Z2AudioLib/Z2Param.h | 104 +- include/c/c_damagereaction.h | 20 +- include/d/actor/d_a_alink.h | 254 +- include/d/actor/d_a_arrow.h | 2 +- include/d/actor/d_a_balloon_2D.h | 2 +- include/d/actor/d_a_bg_obj.h | 8 +- include/d/actor/d_a_boomerang.h | 12 +- include/d/actor/d_a_bullet.h | 6 +- include/d/actor/d_a_coach_fire.h | 2 +- include/d/actor/d_a_cstaF.h | 2 +- include/d/actor/d_a_cstatue.h | 2 +- include/d/actor/d_a_dshutter.h | 18 +- include/d/actor/d_a_e_dt.h | 16 +- include/d/actor/d_a_e_ge.h | 2 +- include/d/actor/d_a_e_oc.h | 16 +- include/d/actor/d_a_e_ym.h | 2 +- include/d/actor/d_a_formation_mng.h | 4 +- include/d/actor/d_a_grass.h | 6 +- include/d/actor/d_a_horse.h | 6 +- include/d/actor/d_a_hozelda.h | 6 +- include/d/actor/d_a_itembase.h | 2 +- include/d/actor/d_a_midna.h | 10 +- include/d/actor/d_a_mirror.h | 4 +- include/d/actor/d_a_movie_player.h | 2 +- include/d/actor/d_a_myna.h | 4 +- include/d/actor/d_a_nbomb.h | 2 +- include/d/actor/d_a_npc.h | 12 +- include/d/actor/d_a_npc2.h | 12 +- include/d/actor/d_a_npc4.h | 14 +- include/d/actor/d_a_npc_aru.h | 6 +- include/d/actor/d_a_npc_ash.h | 4 +- include/d/actor/d_a_npc_ashB.h | 4 +- include/d/actor/d_a_npc_bans.h | 6 +- include/d/actor/d_a_npc_besu.h | 6 +- include/d/actor/d_a_npc_blue_ns.h | 4 +- include/d/actor/d_a_npc_bou.h | 6 +- include/d/actor/d_a_npc_bouS.h | 4 +- include/d/actor/d_a_npc_cd.h | 4 +- include/d/actor/d_a_npc_cd2.h | 4 +- include/d/actor/d_a_npc_cdn3.h | 92 +- include/d/actor/d_a_npc_chat.h | 4 +- include/d/actor/d_a_npc_chin.h | 4 +- include/d/actor/d_a_npc_clerka.h | 6 +- include/d/actor/d_a_npc_clerkb.h | 6 +- include/d/actor/d_a_npc_clerkt.h | 6 +- include/d/actor/d_a_npc_coach.h | 2 +- include/d/actor/d_a_npc_doc.h | 6 +- include/d/actor/d_a_npc_doorboy.h | 4 +- include/d/actor/d_a_npc_drainSol.h | 2 +- include/d/actor/d_a_npc_fairy.h | 6 +- include/d/actor/d_a_npc_fairy_seirei.h | 6 +- include/d/actor/d_a_npc_gnd.h | 6 +- include/d/actor/d_a_npc_gra.h | 6 +- include/d/actor/d_a_npc_grc.h | 6 +- include/d/actor/d_a_npc_grd.h | 6 +- include/d/actor/d_a_npc_grm.h | 6 +- include/d/actor/d_a_npc_grmc.h | 6 +- include/d/actor/d_a_npc_gro.h | 6 +- include/d/actor/d_a_npc_grr.h | 6 +- include/d/actor/d_a_npc_grs.h | 6 +- include/d/actor/d_a_npc_grz.h | 6 +- include/d/actor/d_a_npc_guard.h | 2 +- include/d/actor/d_a_npc_gwolf.h | 6 +- include/d/actor/d_a_npc_hanjo.h | 10 +- include/d/actor/d_a_npc_hoz.h | 6 +- include/d/actor/d_a_npc_impal.h | 4 +- include/d/actor/d_a_npc_ins.h | 4 +- include/d/actor/d_a_npc_jagar.h | 6 +- include/d/actor/d_a_npc_kakashi.h | 6 +- include/d/actor/d_a_npc_kasi_hana.h | 10 +- include/d/actor/d_a_npc_kasi_kyu.h | 10 +- include/d/actor/d_a_npc_kasi_mich.h | 10 +- include/d/actor/d_a_npc_kkri.h | 6 +- include/d/actor/d_a_npc_kn.h | 18 +- include/d/actor/d_a_npc_knj.h | 6 +- include/d/actor/d_a_npc_kolin.h | 6 +- include/d/actor/d_a_npc_kolinb.h | 6 +- include/d/actor/d_a_npc_kyury.h | 6 +- include/d/actor/d_a_npc_len.h | 6 +- include/d/actor/d_a_npc_lud.h | 6 +- include/d/actor/d_a_npc_maro.h | 6 +- include/d/actor/d_a_npc_midp.h | 6 +- include/d/actor/d_a_npc_moi.h | 6 +- include/d/actor/d_a_npc_moir.h | 4 +- include/d/actor/d_a_npc_myna2.h | 6 +- include/d/actor/d_a_npc_pachi_besu.h | 6 +- include/d/actor/d_a_npc_pachi_maro.h | 6 +- include/d/actor/d_a_npc_pachi_taro.h | 6 +- include/d/actor/d_a_npc_passer.h | 60 +- include/d/actor/d_a_npc_passer2.h | 2 +- include/d/actor/d_a_npc_post.h | 6 +- include/d/actor/d_a_npc_pouya.h | 6 +- include/d/actor/d_a_npc_prayer.h | 4 +- include/d/actor/d_a_npc_raca.h | 6 +- include/d/actor/d_a_npc_rafrel.h | 4 +- include/d/actor/d_a_npc_saru.h | 6 +- include/d/actor/d_a_npc_seib.h | 6 +- include/d/actor/d_a_npc_seic.h | 6 +- include/d/actor/d_a_npc_seid.h | 6 +- include/d/actor/d_a_npc_seira.h | 6 +- include/d/actor/d_a_npc_seira2.h | 6 +- include/d/actor/d_a_npc_seirei.h | 6 +- include/d/actor/d_a_npc_shad.h | 4 +- include/d/actor/d_a_npc_shaman.h | 14 +- include/d/actor/d_a_npc_shoe.h | 4 +- include/d/actor/d_a_npc_shop0.h | 4 +- include/d/actor/d_a_npc_sola.h | 6 +- include/d/actor/d_a_npc_soldierA.h | 6 +- include/d/actor/d_a_npc_soldierB.h | 6 +- include/d/actor/d_a_npc_taro.h | 6 +- include/d/actor/d_a_npc_the.h | 6 +- include/d/actor/d_a_npc_theB.h | 4 +- include/d/actor/d_a_npc_tkc.h | 4 +- include/d/actor/d_a_npc_tkj.h | 6 +- include/d/actor/d_a_npc_tks.h | 2 +- include/d/actor/d_a_npc_toby.h | 6 +- include/d/actor/d_a_npc_uri.h | 6 +- include/d/actor/d_a_npc_wrestler.h | 4 +- include/d/actor/d_a_npc_yamid.h | 6 +- include/d/actor/d_a_npc_yamis.h | 6 +- include/d/actor/d_a_npc_yamit.h | 6 +- include/d/actor/d_a_npc_yelia.h | 6 +- include/d/actor/d_a_npc_ykm.h | 6 +- include/d/actor/d_a_npc_ykw.h | 6 +- include/d/actor/d_a_npc_zanb.h | 6 +- include/d/actor/d_a_npc_zant.h | 6 +- include/d/actor/d_a_npc_zelR.h | 6 +- include/d/actor/d_a_npc_zelRo.h | 6 +- include/d/actor/d_a_npc_zelda.h | 6 +- include/d/actor/d_a_npc_zra.h | 6 +- include/d/actor/d_a_npc_zrc.h | 6 +- include/d/actor/d_a_npc_zrz.h | 6 +- include/d/actor/d_a_obj_Turara.h | 4 +- include/d/actor/d_a_obj_TvCdlst.h | 4 +- include/d/actor/d_a_obj_automata.h | 2 +- include/d/actor/d_a_obj_barDesk.h | 4 +- include/d/actor/d_a_obj_bed.h | 2 +- include/d/actor/d_a_obj_bemos.h | 12 +- include/d/actor/d_a_obj_bky_rock.h | 4 +- include/d/actor/d_a_obj_bmWindow.h | 4 +- include/d/actor/d_a_obj_boumato.h | 2 +- include/d/actor/d_a_obj_bubblePilar.h | 4 +- include/d/actor/d_a_obj_carry.h | 10 +- include/d/actor/d_a_obj_catdoor.h | 2 +- include/d/actor/d_a_obj_chandelier.h | 2 +- include/d/actor/d_a_obj_fireWood.h | 4 +- include/d/actor/d_a_obj_fireWood2.h | 4 +- include/d/actor/d_a_obj_flag.h | 2 +- include/d/actor/d_a_obj_flag2.h | 2 +- include/d/actor/d_a_obj_flag3.h | 2 +- include/d/actor/d_a_obj_gadget.h | 2 +- include/d/actor/d_a_obj_glowSphere.h | 10 +- include/d/actor/d_a_obj_gpTaru.h | 4 +- include/d/actor/d_a_obj_gra2.h | 4 +- include/d/actor/d_a_obj_gra_rock.h | 2 +- include/d/actor/d_a_obj_grave_stone.h | 4 +- include/d/actor/d_a_obj_hakai_brl.h | 2 +- include/d/actor/d_a_obj_hakai_ftr.h | 2 +- include/d/actor/d_a_obj_itamato.h | 2 +- include/d/actor/d_a_obj_kago.h | 2 +- include/d/actor/d_a_obj_kazeneko.h | 2 +- include/d/actor/d_a_obj_kbacket.h | 2 +- include/d/actor/d_a_obj_ktOnFire.h | 4 +- include/d/actor/d_a_obj_kznkarm.h | 4 +- include/d/actor/d_a_obj_ladder.h | 4 +- include/d/actor/d_a_obj_laundry.h | 2 +- include/d/actor/d_a_obj_laundry_rope.h | 2 +- include/d/actor/d_a_obj_lv1Candle00.h | 4 +- include/d/actor/d_a_obj_lv1Candle01.h | 4 +- include/d/actor/d_a_obj_lv2Candle.h | 4 +- include/d/actor/d_a_obj_lv3Candle.h | 4 +- include/d/actor/d_a_obj_lv5FloorBoard.h | 4 +- include/d/actor/d_a_obj_lv5IceWall.h | 4 +- include/d/actor/d_a_obj_lv5SwIce.h | 4 +- include/d/actor/d_a_obj_lv6ChangeGate.h | 4 +- include/d/actor/d_a_obj_lv6FurikoTrap.h | 4 +- include/d/actor/d_a_obj_lv6SwGate.h | 4 +- include/d/actor/d_a_obj_lv6TogeRoll.h | 10 +- include/d/actor/d_a_obj_lv6TogeTrap.h | 10 +- include/d/actor/d_a_obj_lv8Lift.h | 2 +- include/d/actor/d_a_obj_lv8OptiLift.h | 2 +- include/d/actor/d_a_obj_magLift.h | 2 +- include/d/actor/d_a_obj_master_sword.h | 4 +- include/d/actor/d_a_obj_mie.h | 2 +- include/d/actor/d_a_obj_mirror_6pole.h | 2 +- include/d/actor/d_a_obj_mirror_screw.h | 4 +- include/d/actor/d_a_obj_movebox.h | 18 +- include/d/actor/d_a_obj_nagaisu.h | 4 +- include/d/actor/d_a_obj_nameplate.h | 4 +- include/d/actor/d_a_obj_nougu.h | 4 +- include/d/actor/d_a_obj_oiltubo.h | 4 +- include/d/actor/d_a_obj_onsenTaru.h | 4 +- include/d/actor/d_a_obj_ornament_cloth.h | 2 +- include/d/actor/d_a_obj_picture.h | 4 +- include/d/actor/d_a_obj_pleaf.h | 2 +- include/d/actor/d_a_obj_pumpkin.h | 2 +- include/d/actor/d_a_obj_rotTrap.h | 4 +- include/d/actor/d_a_obj_sakuita.h | 2 +- include/d/actor/d_a_obj_sakuita_rope.h | 2 +- include/d/actor/d_a_obj_scannon.h | 12 +- include/d/actor/d_a_obj_scannon_crs.h | 2 +- include/d/actor/d_a_obj_scannon_ten.h | 4 +- include/d/actor/d_a_obj_sekidoor.h | 2 +- include/d/actor/d_a_obj_sekizo.h | 2 +- include/d/actor/d_a_obj_sekizoa.h | 6 +- include/d/actor/d_a_obj_smtile.h | 2 +- include/d/actor/d_a_obj_ss_drink.h | 4 +- include/d/actor/d_a_obj_ss_item.h | 4 +- include/d/actor/d_a_obj_stairBlock.h | 4 +- include/d/actor/d_a_obj_stick.h | 4 +- include/d/actor/d_a_obj_swpush.h | 12 +- include/d/actor/d_a_obj_swpush2.h | 4 +- include/d/actor/d_a_obj_syRock.h | 4 +- include/d/actor/d_a_obj_taFence.h | 4 +- include/d/actor/d_a_obj_tks.h | 2 +- include/d/actor/d_a_obj_togeTrap.h | 4 +- include/d/actor/d_a_obj_waterPillar.h | 8 +- include/d/actor/d_a_obj_wdStick.h | 4 +- include/d/actor/d_a_obj_yel_bag.h | 6 +- include/d/actor/d_a_obj_yobikusa.h | 4 +- include/d/actor/d_a_obj_zrTurara.h | 4 +- include/d/actor/d_a_obj_zrTuraraRock.h | 4 +- include/d/actor/d_a_passer_mng.h | 2 +- include/d/actor/d_a_peru.h | 6 +- include/d/actor/d_a_player.h | 6 +- include/d/actor/d_a_suspend.h | 6 +- include/d/actor/d_a_tag_TWgate.h | 4 +- include/d/actor/d_a_tag_evt.h | 2 +- include/d/actor/d_a_tag_evtmsg.h | 4 +- include/d/actor/d_a_tag_hstop.h | 4 +- include/d/actor/d_a_tag_lantern.h | 2 +- include/d/actor/d_a_tag_magne.h | 2 +- include/d/actor/d_a_tag_mist.h | 2 +- include/d/actor/d_a_tag_msg.h | 4 +- include/d/actor/d_a_tag_stream.h | 2 +- include/d/actor/d_a_ykgr.h | 12 +- include/d/actor/d_flower.h | 2 +- include/d/actor/d_grass.h | 2 +- include/d/d_a_item_static.h | 6 +- include/d/d_a_shop_item_static.h | 4 +- include/d/d_attention.h | 14 +- include/d/d_bg_parts.h | 4 +- include/d/d_bg_s_movebg_actor.h | 6 +- include/d/d_camera.h | 2 +- include/d/d_cc_d.h | 2 +- include/d/d_cc_s.h | 2 +- include/d/d_com_inf_actor.h | 4 +- include/d/d_com_inf_game.h | 8 +- include/d/d_debug_pad.h | 2 +- include/d/d_demo.h | 38 +- include/d/d_drawlist.h | 12 +- include/d/d_eye_hl.h | 2 +- include/d/d_item.h | 2 +- include/d/d_item_data.h | 6 +- include/d/d_k_wmark.h | 2 +- include/d/d_kankyo.h | 2 +- include/d/d_lib.h | 8 +- include/d/d_map.h | 2 +- include/d/d_map_path.h | 2 +- include/d/d_map_path_dmap.h | 30 +- include/d/d_menu_collect.h | 2 +- include/d/d_menu_dmap.h | 2 +- include/d/d_menu_dmap_map.h | 8 +- include/d/d_menu_fmap.h | 4 +- include/d/d_menu_fmap_map.h | 2 +- include/d/d_menu_window_HIO.h | 4 +- include/d/d_meter2_info.h | 4 +- include/d/d_meter_HIO.h | 10 +- include/d/d_model.h | 2 +- include/d/d_msg_flow.h | 4 +- include/d/d_msg_object.h | 2 +- include/d/d_msg_unit.h | 2 +- include/d/d_particle.h | 34 +- include/d/d_particle_copoly.h | 8 +- include/d/d_particle_name.h | 6 +- include/d/d_s_play.h | 8 +- include/d/d_save.h | 4 +- include/d/d_save_HIO.h | 2 +- include/d/d_stage.h | 28 +- include/d/d_tresure.h | 8 +- include/d/d_vibration.h | 12 +- include/f_ap/f_ap_game.h | 4 +- include/f_op/f_op_actor.h | 4 +- include/f_op/f_op_actor_mng.h | 34 +- include/f_op/f_op_actor_tag.h | 2 +- include/f_op/f_op_camera.h | 2 +- include/f_op/f_op_draw_tag.h | 2 +- include/f_op/f_op_kankyo.h | 2 +- include/f_op/f_op_msg.h | 2 +- include/f_op/f_op_overlap.h | 2 +- include/f_op/f_op_scene.h | 2 +- include/f_op/f_op_scene_tag.h | 2 +- include/f_op/f_op_view.h | 2 +- include/f_pc/f_pc_base.h | 2 +- include/f_pc/f_pc_create_tag.h | 2 +- include/f_pc/f_pc_delete_tag.h | 2 +- include/f_pc/f_pc_leaf.h | 4 +- include/f_pc/f_pc_line.h | 2 +- include/f_pc/f_pc_node.h | 4 +- include/f_pc/f_pc_profile.h | 4 +- include/f_pc/f_pc_profile_lst.h | 3170 ++++++++--------- include/global.h | 10 +- include/m_Do/m_Do_MemCard.h | 2 +- include/m_Do/m_Do_Reset.h | 4 +- include/m_Do/m_Do_audio.h | 8 +- include/m_Do/m_Do_controller_pad.h | 6 +- include/m_Do/m_Do_dvd_thread.h | 10 +- include/m_Do/m_Do_ext.h | 18 +- include/m_Do/m_Do_graphic.h | 90 +- include/m_Do/m_Do_lib.h | 6 +- include/m_Do/m_Do_machine.h | 6 +- include/m_Do/m_Do_main.h | 14 +- include/m_Do/m_Do_mtx.h | 12 +- include/os_report.h | 4 +- .../include/JSystem/J2DGraph/J2DMatBlock.h | 2 +- .../include/JSystem/J2DGraph/J2DPane.h | 2 +- .../include/JSystem/J2DGraph/J2DPrint.h | 4 +- .../include/JSystem/J2DGraph/J2DScreen.h | 2 +- .../include/JSystem/J2DGraph/J2DTevs.h | 38 +- .../JSystem/J3DGraphAnimator/J3DJoint.h | 6 +- .../JSystem/J3DGraphAnimator/J3DMtxBuffer.h | 8 +- .../JSystem/J3DGraphAnimator/J3DSkinDeform.h | 6 +- .../JSystem/J3DGraphBase/J3DDrawBuffer.h | 6 +- .../JSystem/J3DGraphBase/J3DMatBlock.h | 2 +- .../include/JSystem/J3DGraphBase/J3DPacket.h | 4 +- .../include/JSystem/J3DGraphBase/J3DShape.h | 16 +- .../JSystem/J3DGraphBase/J3DShapeMtx.h | 10 +- .../include/JSystem/J3DGraphBase/J3DSys.h | 10 +- .../include/JSystem/J3DGraphBase/J3DTevs.h | 66 +- .../include/JSystem/J3DGraphBase/J3DTexture.h | 4 +- .../JSystem/J3DGraphBase/J3DTransform.h | 8 +- .../include/JSystem/JAHostIO/JAHUpdate.h | 4 +- .../include/JSystem/JAHostIO/JAHVirtualNode.h | 2 +- .../include/JSystem/JAHostIO/JAHioMessage.h | 22 +- .../include/JSystem/JAHostIO/JAHioNode.h | 2 +- .../include/JSystem/JAHostIO/JAHioUtil.h | 2 +- .../include/JSystem/JAudio2/JASAiCtrl.h | 30 +- .../include/JSystem/JAudio2/JASAramStream.h | 8 +- .../include/JSystem/JAudio2/JASAudioThread.h | 2 +- .../include/JSystem/JAudio2/JASBNKParser.h | 2 +- .../JSystem/JAudio2/JASBasicWaveBank.h | 2 +- .../JSystem/include/JSystem/JAudio2/JASCalc.h | 2 +- .../include/JSystem/JAudio2/JASChannel.h | 8 +- .../include/JSystem/JAudio2/JASCmdStack.h | 4 +- .../include/JSystem/JAudio2/JASDSPChannel.h | 2 +- .../include/JSystem/JAudio2/JASDSPInterface.h | 14 +- .../include/JSystem/JAudio2/JASDriverIF.h | 10 +- .../include/JSystem/JAudio2/JASDvdThread.h | 2 +- .../include/JSystem/JAudio2/JASHeapCtrl.h | 10 +- libs/JSystem/include/JSystem/JAudio2/JASLfo.h | 2 +- .../include/JSystem/JAudio2/JASOscillator.h | 8 +- .../include/JSystem/JAudio2/JASProbe.h | 2 +- .../include/JSystem/JAudio2/JASSeqCtrl.h | 2 +- .../include/JSystem/JAudio2/JASSeqParser.h | 6 +- .../include/JSystem/JAudio2/JASTrack.h | 12 +- .../include/JSystem/JAudio2/JASVoiceBank.h | 4 +- .../include/JSystem/JAudio2/JASWSParser.h | 2 +- .../JSystem/JAudio2/JASWaveArcLoader.h | 4 +- .../include/JSystem/JAudio2/JASWaveInfo.h | 2 +- .../include/JSystem/JFramework/JFWDisplay.h | 4 +- .../include/JSystem/JFramework/JFWSystem.h | 38 +- .../include/JSystem/JHostIO/JHIMccBuf.h | 4 +- .../include/JSystem/JHostIO/JORServer.h | 2 +- .../JSystem/include/JSystem/JKernel/JKRAram.h | 10 +- .../include/JSystem/JKernel/JKRAramHeap.h | 2 +- .../include/JSystem/JKernel/JKRAramPiece.h | 4 +- .../include/JSystem/JKernel/JKRAramStream.h | 12 +- .../include/JSystem/JKernel/JKRArchive.h | 2 +- .../include/JSystem/JKernel/JKRDecomp.h | 6 +- .../JSystem/JKernel/JKRDvdAramRipper.h | 6 +- .../include/JSystem/JKernel/JKRDvdFile.h | 2 +- .../include/JSystem/JKernel/JKRDvdRipper.h | 8 +- .../include/JSystem/JKernel/JKRFileLoader.h | 4 +- .../JSystem/include/JSystem/JKernel/JKRHeap.h | 34 +- .../include/JSystem/JKernel/JKRThread.h | 18 +- .../include/JSystem/JMath/JMATrigonometric.h | 6 +- libs/JSystem/include/JSystem/JMessage/data.h | 4 +- .../include/JSystem/JMessage/resource.h | 2 +- .../include/JSystem/JParticle/JPABaseShape.h | 14 +- .../include/JSystem/JStudio/JStudio/ctb.h | 2 +- .../JSystem/JStudio/JStudio/fvb-data.h | 2 +- .../JSystem/JStudio/JStudio/jstudio-data.h | 2 +- .../JSystem/JStudio/JStudio/jstudio-object.h | 50 +- .../JSystem/JStudio/JStudio/stb-data.h | 4 +- .../JSystem/JStudio/JStudio_JAudio2/control.h | 2 +- .../JSystem/JStudio/JStudio_JStage/control.h | 10 +- .../include/JSystem/JUtility/JUTConsole.h | 2 +- .../include/JSystem/JUtility/JUTDbPrint.h | 2 +- .../include/JSystem/JUtility/JUTDirectPrint.h | 8 +- .../include/JSystem/JUtility/JUTException.h | 24 +- .../include/JSystem/JUtility/JUTGamePad.h | 52 +- .../include/JSystem/JUtility/JUTGraphFifo.h | 4 +- .../include/JSystem/JUtility/JUTProcBar.h | 2 +- .../include/JSystem/JUtility/JUTResFont.h | 4 +- .../include/JSystem/JUtility/JUTVideo.h | 6 +- .../JSystem/include/JSystem/JUtility/JUTXfb.h | 2 +- libs/JSystem/src/J2DGraph/J2DPane.cpp | 2 +- libs/JSystem/src/J2DGraph/J2DPrint.cpp | 4 +- libs/JSystem/src/J2DGraph/J2DScreen.cpp | 2 +- libs/JSystem/src/J2DGraph/J2DTevs.cpp | 36 +- .../JSystem/src/J3DGraphAnimator/J3DJoint.cpp | 6 +- .../src/J3DGraphAnimator/J3DMtxBuffer.cpp | 8 +- .../src/J3DGraphAnimator/J3DSkinDeform.cpp | 6 +- .../src/J3DGraphBase/J3DDrawBuffer.cpp | 6 +- libs/JSystem/src/J3DGraphBase/J3DPacket.cpp | 4 +- libs/JSystem/src/J3DGraphBase/J3DShape.cpp | 4 +- libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp | 24 +- libs/JSystem/src/J3DGraphBase/J3DSys.cpp | 12 +- libs/JSystem/src/J3DGraphBase/J3DTevs.cpp | 52 +- .../JSystem/src/J3DGraphBase/J3DTransform.cpp | 8 +- libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp | 2 +- libs/JSystem/src/JAHostIO/JAHioMessage.cpp | 22 +- libs/JSystem/src/JAHostIO/JAHioMgr.cpp | 2 +- libs/JSystem/src/JAHostIO/JAHioNode.cpp | 2 +- libs/JSystem/src/JAHostIO/JAHioUtil.cpp | 6 +- libs/JSystem/src/JAudio2/JASAiCtrl.cpp | 32 +- libs/JSystem/src/JAudio2/JASAramStream.cpp | 12 +- libs/JSystem/src/JAudio2/JASAudioThread.cpp | 2 +- libs/JSystem/src/JAudio2/JASBNKParser.cpp | 2 +- libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp | 2 +- libs/JSystem/src/JAudio2/JASCalc.cpp | 2 +- libs/JSystem/src/JAudio2/JASChannel.cpp | 8 +- libs/JSystem/src/JAudio2/JASCmdStack.cpp | 4 +- libs/JSystem/src/JAudio2/JASDSPChannel.cpp | 2 +- libs/JSystem/src/JAudio2/JASDSPInterface.cpp | 16 +- libs/JSystem/src/JAudio2/JASDriverIF.cpp | 10 +- libs/JSystem/src/JAudio2/JASDvdThread.cpp | 2 +- libs/JSystem/src/JAudio2/JASHeapCtrl.cpp | 10 +- libs/JSystem/src/JAudio2/JASLfo.cpp | 2 +- libs/JSystem/src/JAudio2/JASOscillator.cpp | 8 +- libs/JSystem/src/JAudio2/JASProbe.cpp | 2 +- libs/JSystem/src/JAudio2/JASSeqCtrl.cpp | 2 +- libs/JSystem/src/JAudio2/JASSeqParser.cpp | 6 +- libs/JSystem/src/JAudio2/JASTrack.cpp | 12 +- libs/JSystem/src/JAudio2/JASVoiceBank.cpp | 4 +- libs/JSystem/src/JAudio2/JASWSParser.cpp | 2 +- libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp | 4 +- libs/JSystem/src/JAudio2/osdsp_task.cpp | 4 +- libs/JSystem/src/JFramework/JFWDisplay.cpp | 4 +- libs/JSystem/src/JFramework/JFWSystem.cpp | 38 +- libs/JSystem/src/JHostIO/JHIMccBuf.cpp | 4 +- libs/JSystem/src/JHostIO/JHIRMcc.cpp | 14 +- libs/JSystem/src/JHostIO/JHIhioASync.cpp | 16 +- libs/JSystem/src/JHostIO/JORServer.cpp | 2 +- libs/JSystem/src/JKernel/JKRAram.cpp | 10 +- libs/JSystem/src/JKernel/JKRAramHeap.cpp | 2 +- libs/JSystem/src/JKernel/JKRAramPiece.cpp | 6 +- libs/JSystem/src/JKernel/JKRAramStream.cpp | 12 +- libs/JSystem/src/JKernel/JKRArchivePri.cpp | 2 +- libs/JSystem/src/JKernel/JKRDecomp.cpp | 6 +- libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp | 6 +- libs/JSystem/src/JKernel/JKRDvdFile.cpp | 2 +- libs/JSystem/src/JKernel/JKRDvdRipper.cpp | 8 +- libs/JSystem/src/JKernel/JKRFileLoader.cpp | 4 +- libs/JSystem/src/JKernel/JKRHeap.cpp | 34 +- libs/JSystem/src/JKernel/JKRThread.cpp | 18 +- libs/JSystem/src/JMath/JMATrigonometric.cpp | 6 +- libs/JSystem/src/JMessage/data.cpp | 4 +- libs/JSystem/src/JMessage/resource.cpp | 2 +- libs/JSystem/src/JParticle/JPABaseShape.cpp | 14 +- libs/JSystem/src/JStudio/JStudio/ctb-data.cpp | 2 +- libs/JSystem/src/JStudio/JStudio/fvb-data.cpp | 2 +- .../src/JStudio/JStudio/jstudio-data.cpp | 2 +- .../src/JStudio/JStudio/jstudio-object.cpp | 50 +- libs/JSystem/src/JStudio/JStudio/stb-data.cpp | 4 +- .../JStudio/JStudio_JAudio2/object-sound.cpp | 2 +- .../JStudio/JStudio_JStage/object-actor.cpp | 4 +- .../JStudio/JStudio_JStage/object-camera.cpp | 2 +- .../src/JStudio/JStudio_JStage/object-fog.cpp | 2 +- .../JStudio/JStudio_JStage/object-light.cpp | 2 +- libs/JSystem/src/JUtility/JUTConsole.cpp | 2 +- libs/JSystem/src/JUtility/JUTDbPrint.cpp | 2 +- libs/JSystem/src/JUtility/JUTDirectPrint.cpp | 8 +- libs/JSystem/src/JUtility/JUTException.cpp | 24 +- .../JUtility/JUTFontData_Ascfont_fix12.cpp | 2 +- libs/JSystem/src/JUtility/JUTGamePad.cpp | 54 +- libs/JSystem/src/JUtility/JUTGraphFifo.cpp | 4 +- libs/JSystem/src/JUtility/JUTProcBar.cpp | 2 +- libs/JSystem/src/JUtility/JUTResFont.cpp | 2 +- libs/JSystem/src/JUtility/JUTVideo.cpp | 6 +- libs/JSystem/src/JUtility/JUTXfb.cpp | 2 +- src/DynamicLink.cpp | 6 +- src/SSystem/SComponent/c_API.cpp | 2 +- src/SSystem/SComponent/c_angle.cpp | 10 +- src/SSystem/SComponent/c_cc_d.cpp | 2 +- src/SSystem/SComponent/c_counter.cpp | 2 +- src/SSystem/SComponent/c_lib.cpp | 2 +- src/SSystem/SComponent/c_m3d.cpp | 2 +- src/SSystem/SComponent/c_malloc.cpp | 2 +- src/SSystem/SComponent/c_sxyz.cpp | 2 +- src/SSystem/SComponent/c_xyz.cpp | 16 +- src/Z2AudioLib/Z2AudioMgr.cpp | 4 +- src/Z2AudioLib/Z2Calc.cpp | 4 +- src/Z2AudioLib/Z2Creature.cpp | 4 +- src/Z2AudioLib/Z2DebugSys.cpp | 2 +- src/Z2AudioLib/Z2LinkMgr.cpp | 2 +- src/Z2AudioLib/Z2Param.cpp | 104 +- src/Z2AudioLib/Z2SoundInfo.cpp | 4 +- src/Z2AudioLib/Z2SpeechMgr2.cpp | 140 +- src/c/c_damagereaction.cpp | 20 +- src/d/actor/d_a_alink.cpp | 20 +- src/d/actor/d_a_alink_HIO_data.inc | 224 +- src/d/actor/d_a_alink_effect.inc | 2 +- src/d/actor/d_a_alink_horse.inc | 8 +- src/d/actor/d_a_balloon_2D.cpp | 4 +- src/d/actor/d_a_bg_obj.cpp | 8 +- src/d/actor/d_a_boomerang.cpp | 12 +- src/d/actor/d_a_bullet.cpp | 6 +- src/d/actor/d_a_coach_fire.cpp | 2 +- src/d/actor/d_a_cstaF.cpp | 2 +- src/d/actor/d_a_cstatue.cpp | 2 +- src/d/actor/d_a_e_dd.cpp | 2 +- src/d/actor/d_a_e_dn.cpp | 2 +- src/d/actor/d_a_e_dt.cpp | 16 +- src/d/actor/d_a_e_ge.cpp | 2 +- src/d/actor/d_a_e_mf.cpp | 2 +- src/d/actor/d_a_e_oc.cpp | 16 +- src/d/actor/d_a_e_oct_bg.cpp | 8 +- src/d/actor/d_a_e_ym.cpp | 2 +- src/d/actor/d_a_econt.cpp | 2 +- src/d/actor/d_a_formation_mng.cpp | 4 +- src/d/actor/d_a_horse.cpp | 6 +- src/d/actor/d_a_hozelda.cpp | 6 +- src/d/actor/d_a_midna.cpp | 10 +- src/d/actor/d_a_myna.cpp | 4 +- src/d/actor/d_a_nbomb.cpp | 2 +- src/d/actor/d_a_npc.cpp | 14 +- src/d/actor/d_a_npc2.cpp | 10 +- src/d/actor/d_a_npc4.cpp | 16 +- src/d/actor/d_a_npc_aru.cpp | 6 +- src/d/actor/d_a_npc_ash.cpp | 4 +- src/d/actor/d_a_npc_ashB.cpp | 4 +- src/d/actor/d_a_npc_bans.cpp | 6 +- src/d/actor/d_a_npc_besu.cpp | 6 +- src/d/actor/d_a_npc_blue_ns.cpp | 4 +- src/d/actor/d_a_npc_bou.cpp | 6 +- src/d/actor/d_a_npc_bouS.cpp | 4 +- src/d/actor/d_a_npc_cd.cpp | 4 +- src/d/actor/d_a_npc_cd2.cpp | 4 +- src/d/actor/d_a_npc_cdn3.cpp | 92 +- src/d/actor/d_a_npc_chat.cpp | 4 +- src/d/actor/d_a_npc_chin.cpp | 4 +- src/d/actor/d_a_npc_clerka.cpp | 6 +- src/d/actor/d_a_npc_clerkb.cpp | 6 +- src/d/actor/d_a_npc_clerkt.cpp | 6 +- src/d/actor/d_a_npc_coach.cpp | 2 +- src/d/actor/d_a_npc_doc.cpp | 6 +- src/d/actor/d_a_npc_doorboy.cpp | 4 +- src/d/actor/d_a_npc_drainSol.cpp | 2 +- src/d/actor/d_a_npc_fairy.cpp | 6 +- src/d/actor/d_a_npc_fairy_seirei.cpp | 6 +- src/d/actor/d_a_npc_gnd.cpp | 6 +- src/d/actor/d_a_npc_gra.cpp | 6 +- src/d/actor/d_a_npc_grc.cpp | 6 +- src/d/actor/d_a_npc_grd.cpp | 6 +- src/d/actor/d_a_npc_grm.cpp | 6 +- src/d/actor/d_a_npc_grmc.cpp | 6 +- src/d/actor/d_a_npc_gro.cpp | 6 +- src/d/actor/d_a_npc_grr.cpp | 6 +- src/d/actor/d_a_npc_grs.cpp | 6 +- src/d/actor/d_a_npc_grz.cpp | 6 +- src/d/actor/d_a_npc_guard.cpp | 2 +- src/d/actor/d_a_npc_gwolf.cpp | 6 +- src/d/actor/d_a_npc_hanjo.cpp | 10 +- src/d/actor/d_a_npc_hoz.cpp | 6 +- src/d/actor/d_a_npc_impal.cpp | 4 +- src/d/actor/d_a_npc_ins.cpp | 4 +- src/d/actor/d_a_npc_jagar.cpp | 6 +- src/d/actor/d_a_npc_kakashi.cpp | 6 +- src/d/actor/d_a_npc_kasi_hana.cpp | 10 +- src/d/actor/d_a_npc_kasi_kyu.cpp | 10 +- src/d/actor/d_a_npc_kasi_mich.cpp | 10 +- src/d/actor/d_a_npc_kkri.cpp | 6 +- src/d/actor/d_a_npc_kn.cpp | 18 +- src/d/actor/d_a_npc_knj.cpp | 6 +- src/d/actor/d_a_npc_kolin.cpp | 6 +- src/d/actor/d_a_npc_kolinb.cpp | 6 +- src/d/actor/d_a_npc_kyury.cpp | 6 +- src/d/actor/d_a_npc_len.cpp | 6 +- src/d/actor/d_a_npc_lud.cpp | 6 +- src/d/actor/d_a_npc_maro.cpp | 6 +- src/d/actor/d_a_npc_midp.cpp | 6 +- src/d/actor/d_a_npc_moi.cpp | 6 +- src/d/actor/d_a_npc_moir.cpp | 4 +- src/d/actor/d_a_npc_myna2.cpp | 6 +- src/d/actor/d_a_npc_pachi_besu.cpp | 6 +- src/d/actor/d_a_npc_pachi_maro.cpp | 6 +- src/d/actor/d_a_npc_pachi_taro.cpp | 6 +- src/d/actor/d_a_npc_passer.cpp | 60 +- src/d/actor/d_a_npc_passer2.cpp | 2 +- src/d/actor/d_a_npc_post.cpp | 6 +- src/d/actor/d_a_npc_pouya.cpp | 6 +- src/d/actor/d_a_npc_prayer.cpp | 4 +- src/d/actor/d_a_npc_raca.cpp | 6 +- src/d/actor/d_a_npc_rafrel.cpp | 4 +- src/d/actor/d_a_npc_saru.cpp | 6 +- src/d/actor/d_a_npc_seib.cpp | 6 +- src/d/actor/d_a_npc_seic.cpp | 6 +- src/d/actor/d_a_npc_seid.cpp | 6 +- src/d/actor/d_a_npc_seira.cpp | 6 +- src/d/actor/d_a_npc_seira2.cpp | 6 +- src/d/actor/d_a_npc_seirei.cpp | 6 +- src/d/actor/d_a_npc_shad.cpp | 4 +- src/d/actor/d_a_npc_shaman.cpp | 14 +- src/d/actor/d_a_npc_shoe.cpp | 4 +- src/d/actor/d_a_npc_shop0.cpp | 4 +- src/d/actor/d_a_npc_sola.cpp | 6 +- src/d/actor/d_a_npc_soldierA.cpp | 6 +- src/d/actor/d_a_npc_soldierB.cpp | 6 +- src/d/actor/d_a_npc_taro.cpp | 6 +- src/d/actor/d_a_npc_the.cpp | 6 +- src/d/actor/d_a_npc_theB.cpp | 4 +- src/d/actor/d_a_npc_tkc.cpp | 4 +- src/d/actor/d_a_npc_tkj.cpp | 6 +- src/d/actor/d_a_npc_tks.cpp | 2 +- src/d/actor/d_a_npc_toby.cpp | 6 +- src/d/actor/d_a_npc_uri.cpp | 6 +- src/d/actor/d_a_npc_wrestler.cpp | 4 +- src/d/actor/d_a_npc_yamid.cpp | 6 +- src/d/actor/d_a_npc_yamis.cpp | 6 +- src/d/actor/d_a_npc_yamit.cpp | 6 +- src/d/actor/d_a_npc_yelia.cpp | 6 +- src/d/actor/d_a_npc_ykm.cpp | 6 +- src/d/actor/d_a_npc_ykw.cpp | 6 +- src/d/actor/d_a_npc_zanb.cpp | 6 +- src/d/actor/d_a_npc_zant.cpp | 6 +- src/d/actor/d_a_npc_zelR.cpp | 6 +- src/d/actor/d_a_npc_zelRo.cpp | 6 +- src/d/actor/d_a_npc_zelda.cpp | 6 +- src/d/actor/d_a_npc_zra.cpp | 6 +- src/d/actor/d_a_npc_zrc.cpp | 6 +- src/d/actor/d_a_npc_zrz.cpp | 6 +- src/d/actor/d_a_obj_Turara.cpp | 4 +- src/d/actor/d_a_obj_TvCdlst.cpp | 4 +- src/d/actor/d_a_obj_amiShutter.cpp | 2 +- src/d/actor/d_a_obj_automata.cpp | 2 +- src/d/actor/d_a_obj_barDesk.cpp | 4 +- src/d/actor/d_a_obj_bed.cpp | 2 +- src/d/actor/d_a_obj_bemos.cpp | 12 +- src/d/actor/d_a_obj_bky_rock.cpp | 4 +- src/d/actor/d_a_obj_bmWindow.cpp | 4 +- src/d/actor/d_a_obj_boumato.cpp | 2 +- src/d/actor/d_a_obj_brakeeff.cpp | 8 +- src/d/actor/d_a_obj_bubblePilar.cpp | 4 +- src/d/actor/d_a_obj_burnbox.cpp | 2 +- src/d/actor/d_a_obj_carry.cpp | 2 +- src/d/actor/d_a_obj_catdoor.cpp | 2 +- src/d/actor/d_a_obj_chandelier.cpp | 2 +- src/d/actor/d_a_obj_fireWood.cpp | 4 +- src/d/actor/d_a_obj_fireWood2.cpp | 4 +- src/d/actor/d_a_obj_flag.cpp | 2 +- src/d/actor/d_a_obj_flag2.cpp | 2 +- src/d/actor/d_a_obj_flag3.cpp | 2 +- src/d/actor/d_a_obj_gadget.cpp | 2 +- src/d/actor/d_a_obj_glowSphere.cpp | 10 +- src/d/actor/d_a_obj_gpTaru.cpp | 4 +- src/d/actor/d_a_obj_gra2.cpp | 8 +- src/d/actor/d_a_obj_gra_rock.cpp | 2 +- src/d/actor/d_a_obj_grave_stone.cpp | 4 +- src/d/actor/d_a_obj_hakai_brl.cpp | 2 +- src/d/actor/d_a_obj_hakai_ftr.cpp | 2 +- src/d/actor/d_a_obj_hasu2.cpp | 2 +- src/d/actor/d_a_obj_itamato.cpp | 2 +- src/d/actor/d_a_obj_item.cpp | 6 +- src/d/actor/d_a_obj_kago.cpp | 2 +- src/d/actor/d_a_obj_kazeneko.cpp | 2 +- src/d/actor/d_a_obj_kbacket.cpp | 2 +- src/d/actor/d_a_obj_ktOnFire.cpp | 4 +- src/d/actor/d_a_obj_kwheel00.cpp | 2 +- src/d/actor/d_a_obj_kznkarm.cpp | 4 +- src/d/actor/d_a_obj_ladder.cpp | 4 +- src/d/actor/d_a_obj_laundry.cpp | 2 +- src/d/actor/d_a_obj_laundry_rope.cpp | 2 +- src/d/actor/d_a_obj_lv1Candle00.cpp | 4 +- src/d/actor/d_a_obj_lv1Candle01.cpp | 4 +- src/d/actor/d_a_obj_lv2Candle.cpp | 4 +- src/d/actor/d_a_obj_lv3Candle.cpp | 4 +- src/d/actor/d_a_obj_lv5FloorBoard.cpp | 4 +- src/d/actor/d_a_obj_lv5IceWall.cpp | 4 +- src/d/actor/d_a_obj_lv5SwIce.cpp | 4 +- src/d/actor/d_a_obj_lv6ChangeGate.cpp | 4 +- src/d/actor/d_a_obj_lv6FurikoTrap.cpp | 4 +- src/d/actor/d_a_obj_lv6SwGate.cpp | 4 +- src/d/actor/d_a_obj_lv6TogeRoll.cpp | 10 +- src/d/actor/d_a_obj_lv6TogeTrap.cpp | 10 +- src/d/actor/d_a_obj_lv8Lift.cpp | 2 +- src/d/actor/d_a_obj_lv8OptiLift.cpp | 2 +- src/d/actor/d_a_obj_magLift.cpp | 2 +- src/d/actor/d_a_obj_maki.cpp | 4 +- src/d/actor/d_a_obj_master_sword.cpp | 4 +- src/d/actor/d_a_obj_mhole.cpp | 2 +- src/d/actor/d_a_obj_mie.cpp | 2 +- src/d/actor/d_a_obj_mirror_6pole.cpp | 2 +- src/d/actor/d_a_obj_mirror_screw.cpp | 4 +- src/d/actor/d_a_obj_movebox.cpp | 16 +- src/d/actor/d_a_obj_nagaisu.cpp | 4 +- src/d/actor/d_a_obj_nameplate.cpp | 4 +- src/d/actor/d_a_obj_nougu.cpp | 4 +- src/d/actor/d_a_obj_oiltubo.cpp | 4 +- src/d/actor/d_a_obj_onsenTaru.cpp | 4 +- src/d/actor/d_a_obj_ornament_cloth.cpp | 2 +- src/d/actor/d_a_obj_picture.cpp | 4 +- src/d/actor/d_a_obj_pleaf.cpp | 2 +- src/d/actor/d_a_obj_pumpkin.cpp | 2 +- src/d/actor/d_a_obj_rotTrap.cpp | 4 +- src/d/actor/d_a_obj_sakuita.cpp | 2 +- src/d/actor/d_a_obj_sakuita_rope.cpp | 2 +- src/d/actor/d_a_obj_scannon.cpp | 12 +- src/d/actor/d_a_obj_scannon_crs.cpp | 2 +- src/d/actor/d_a_obj_scannon_ten.cpp | 4 +- src/d/actor/d_a_obj_sekidoor.cpp | 2 +- src/d/actor/d_a_obj_sekizo.cpp | 2 +- src/d/actor/d_a_obj_sekizoa.cpp | 6 +- src/d/actor/d_a_obj_smtile.cpp | 2 +- src/d/actor/d_a_obj_ss_drink.cpp | 4 +- src/d/actor/d_a_obj_ss_item.cpp | 4 +- src/d/actor/d_a_obj_stairBlock.cpp | 4 +- src/d/actor/d_a_obj_stick.cpp | 4 +- src/d/actor/d_a_obj_swpush.cpp | 12 +- src/d/actor/d_a_obj_swpush2.cpp | 4 +- src/d/actor/d_a_obj_syRock.cpp | 4 +- src/d/actor/d_a_obj_taFence.cpp | 4 +- src/d/actor/d_a_obj_tks.cpp | 2 +- src/d/actor/d_a_obj_togeTrap.cpp | 4 +- src/d/actor/d_a_obj_waterPillar.cpp | 12 +- src/d/actor/d_a_obj_waterfall.cpp | 2 +- src/d/actor/d_a_obj_wdStick.cpp | 4 +- src/d/actor/d_a_obj_yel_bag.cpp | 6 +- src/d/actor/d_a_obj_yobikusa.cpp | 4 +- src/d/actor/d_a_obj_zrTurara.cpp | 4 +- src/d/actor/d_a_obj_zrTuraraRock.cpp | 4 +- src/d/actor/d_a_passer_mng.cpp | 2 +- src/d/actor/d_a_peru.cpp | 6 +- src/d/actor/d_a_player.cpp | 6 +- src/d/actor/d_a_shop_item.cpp | 2 +- src/d/actor/d_a_tag_TWgate.cpp | 4 +- src/d/actor/d_a_tag_evt.cpp | 2 +- src/d/actor/d_a_tag_evtmsg.cpp | 4 +- src/d/actor/d_a_tag_firewall.cpp | 8 +- src/d/actor/d_a_tag_hstop.cpp | 2 +- src/d/actor/d_a_tag_lantern.cpp | 2 +- src/d/actor/d_a_tag_msg.cpp | 4 +- src/d/d_a_horse_static.cpp | 2 +- src/d/d_a_itembase_static.cpp | 2 +- src/d/d_a_shop_item_static.cpp | 2 +- src/d/d_att_dist.cpp | 2 +- src/d/d_attention.cpp | 14 +- src/d/d_bg_parts.cpp | 4 +- src/d/d_bg_s_movebg_actor.cpp | 6 +- src/d/d_bg_w.cpp | 4 +- src/d/d_camera.cpp | 2 +- src/d/d_cc_d.cpp | 2 +- src/d/d_cc_s.cpp | 2 +- src/d/d_com_inf_actor.cpp | 4 +- src/d/d_com_inf_game.cpp | 10 +- src/d/d_com_static.cpp | 70 +- src/d/d_debug_viewer.cpp | 4 +- src/d/d_demo.cpp | 38 +- src/d/d_drawlist.cpp | 12 +- src/d/d_eye_hl.cpp | 2 +- src/d/d_item.cpp | 2 +- src/d/d_item_data.cpp | 6 +- src/d/d_k_wmark.cpp | 2 +- src/d/d_kankyo.cpp | 4 +- src/d/d_lib.cpp | 8 +- src/d/d_map.cpp | 2 +- src/d/d_map_path.cpp | 2 +- src/d/d_map_path_dmap.cpp | 30 +- src/d/d_menu_collect.cpp | 2 +- src/d/d_menu_dmap.cpp | 2 +- src/d/d_menu_dmap_map.cpp | 12 +- src/d/d_menu_fishing.cpp | 4 +- src/d/d_menu_fmap.cpp | 4 +- src/d/d_menu_fmap_map.cpp | 2 +- src/d/d_menu_save.cpp | 2 +- src/d/d_menu_window.cpp | 4 +- src/d/d_menu_window_HIO.cpp | 4 +- src/d/d_meter2_info.cpp | 4 +- src/d/d_meter_HIO.cpp | 10 +- src/d/d_model.cpp | 2 +- src/d/d_msg_flow.cpp | 4 +- src/d/d_msg_object.cpp | 2 +- src/d/d_msg_scrn_3select.cpp | 2 +- src/d/d_msg_unit.cpp | 2 +- src/d/d_particle.cpp | 36 +- src/d/d_particle_copoly.cpp | 8 +- src/d/d_particle_name.cpp | 6 +- src/d/d_resorce.cpp | 2 +- src/d/d_s_play.cpp | 8 +- src/d/d_save.cpp | 4 +- src/d/d_save_HIO.cpp | 2 +- src/d/d_scope.cpp | 4 +- src/d/d_stage.cpp | 38 +- src/d/d_tresure.cpp | 8 +- src/d/d_vib_pattern.cpp | 12 +- src/f_ap/f_ap_game.cpp | 4 +- src/f_op/f_op_actor.cpp | 6 +- src/f_op/f_op_actor_mng.cpp | 34 +- src/f_op/f_op_actor_tag.cpp | 2 +- src/f_op/f_op_camera.cpp | 2 +- src/f_op/f_op_draw_tag.cpp | 2 +- src/f_op/f_op_kankyo.cpp | 2 +- src/f_op/f_op_msg.cpp | 2 +- src/f_op/f_op_overlap.cpp | 2 +- src/f_op/f_op_scene.cpp | 2 +- src/f_op/f_op_scene_tag.cpp | 2 +- src/f_op/f_op_view.cpp | 2 +- src/f_pc/f_pc_base.cpp | 2 +- src/f_pc/f_pc_create_tag.cpp | 2 +- src/f_pc/f_pc_delete_tag.cpp | 2 +- src/f_pc/f_pc_layer.cpp | 2 +- src/f_pc/f_pc_leaf.cpp | 4 +- src/f_pc/f_pc_line.cpp | 2 +- src/f_pc/f_pc_node.cpp | 6 +- src/f_pc/f_pc_profile.cpp | 4 +- src/f_pc/f_pc_profile_lst.cpp | 2 +- src/m_Do/m_Do_DVDError.cpp | 2 +- src/m_Do/m_Do_MemCard.cpp | 2 +- src/m_Do/m_Do_Reset.cpp | 2 +- src/m_Do/m_Do_audio.cpp | 8 +- src/m_Do/m_Do_controller_pad.cpp | 6 +- src/m_Do/m_Do_dvd_thread.cpp | 10 +- src/m_Do/m_Do_ext.cpp | 26 +- src/m_Do/m_Do_graphic.cpp | 92 +- src/m_Do/m_Do_lib.cpp | 6 +- src/m_Do/m_Do_machine.cpp | 8 +- src/m_Do/m_Do_main.cpp | 32 +- src/m_Do/m_Do_mtx.cpp | 10 +- 843 files changed, 4817 insertions(+), 4821 deletions(-) diff --git a/include/DynamicLink.h b/include/DynamicLink.h index 7f6d8568eb..1f9a1c8eeb 100644 --- a/include/DynamicLink.h +++ b/include/DynamicLink.h @@ -88,9 +88,9 @@ struct DynamicModuleControl : DynamicModuleControlBase { /* 0x24 */ s32 mSize; /* 0x28 */ mDoDvdThd_callback_c* mAsyncLoadCallback; - static u32 sAllocBytes; - static JKRArchive* sArchive; - static JKRFileCache* sFileCache; + static DUSK_GAME_DATA u32 sAllocBytes; + static DUSK_GAME_DATA JKRArchive* sArchive; + static DUSK_GAME_DATA JKRFileCache* sFileCache; }; #endif /* DYNAMICLINK_H */ diff --git a/include/SSystem/SComponent/c_API.h b/include/SSystem/SComponent/c_API.h index 8fcd246b2d..2bb68e5cdd 100644 --- a/include/SSystem/SComponent/c_API.h +++ b/include/SSystem/SComponent/c_API.h @@ -12,6 +12,6 @@ struct cAPI_Interface { /* 0x14 */ cAPIGph_Mthd blankingOffMtd; }; -extern cAPI_Interface g_cAPI_Interface; +DUSK_GAME_EXTERN cAPI_Interface g_cAPI_Interface; #endif /* C_API_H */ diff --git a/include/SSystem/SComponent/c_angle.h b/include/SSystem/SComponent/c_angle.h index f851033eab..f5788f75d2 100644 --- a/include/SSystem/SComponent/c_angle.h +++ b/include/SSystem/SComponent/c_angle.h @@ -24,11 +24,11 @@ private: s16 mAngle; public: - const static cSAngle _0; - const static cSAngle _1; - const static cSAngle _90; - const static cSAngle _180; - const static cSAngle _270; + const static DUSK_GAME_DATA cSAngle _0; + const static DUSK_GAME_DATA cSAngle _1; + const static DUSK_GAME_DATA cSAngle _90; + const static DUSK_GAME_DATA cSAngle _180; + const static DUSK_GAME_DATA cSAngle _270; #ifdef __MWERKS__ cSAngle() {} ~cSAngle() {} diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index 66c71a4ead..7a8400a55a 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -435,7 +435,7 @@ public: cM3dGAab& GetWorkAab() { return mAab; } - static cXyz m_virtual_center; + static DUSK_GAME_DATA cXyz m_virtual_center; }; STATIC_ASSERT(0x20 == sizeof(cCcD_ShapeAttr)); diff --git a/include/SSystem/SComponent/c_counter.h b/include/SSystem/SComponent/c_counter.h index 864554b1a7..c67524fb73 100644 --- a/include/SSystem/SComponent/c_counter.h +++ b/include/SSystem/SComponent/c_counter.h @@ -9,7 +9,7 @@ struct counter_class { u32 mTimer; }; -extern counter_class g_Counter; +DUSK_GAME_EXTERN counter_class g_Counter; void cCt_Counter(int resetCounter1); diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h index 75d4544341..4be9645bc4 100644 --- a/include/SSystem/SComponent/c_lib.h +++ b/include/SSystem/SComponent/c_lib.h @@ -102,6 +102,6 @@ void MtxPosition(cXyz DUSK_CONST*, cXyz*); void MtxPush(void); void MtxPull(void); -extern Mtx* calc_mtx; +DUSK_GAME_EXTERN Mtx* calc_mtx; #endif diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 94762d5a29..50c92a2934 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -20,7 +20,7 @@ struct cM3d_Range { }; #define G_CM3D_F_INF (1000000000.0f) -extern const f32 G_CM3D_F_ABS_MIN; +DUSK_GAME_EXTERN const f32 G_CM3D_F_ABS_MIN; static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*); void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*); diff --git a/include/SSystem/SComponent/c_malloc.h b/include/SSystem/SComponent/c_malloc.h index 95b2d8f298..5eb775e033 100644 --- a/include/SSystem/SComponent/c_malloc.h +++ b/include/SSystem/SComponent/c_malloc.h @@ -6,7 +6,7 @@ class JKRHeap; struct cMl { - static JKRHeap* Heap; + static DUSK_GAME_DATA JKRHeap* Heap; static void init(JKRHeap*); static void* memalignB(int, u32); static void free(void*); diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h index bfaa035de9..4b2ea4dd45 100644 --- a/include/SSystem/SComponent/c_sxyz.h +++ b/include/SSystem/SComponent/c_sxyz.h @@ -9,7 +9,7 @@ struct SVec { class csXyz : public SVec { public: - static const csXyz Zero; + static DUSK_GAME_DATA const csXyz Zero; ~csXyz() {} csXyz() {} csXyz(s16, s16, s16); diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h index 66dff18fd2..87cd6648d1 100644 --- a/include/SSystem/SComponent/c_xyz.h +++ b/include/SSystem/SComponent/c_xyz.h @@ -14,14 +14,14 @@ struct cXy { }; struct cXyz : Vec { - static const cXyz Zero; - static const cXyz BaseX; - static const cXyz BaseY; - static const cXyz BaseZ; - static const cXyz BaseXY; - static const cXyz BaseXZ; - static const cXyz BaseYZ; - static const cXyz BaseXYZ; + static DUSK_GAME_DATA const cXyz Zero; + static DUSK_GAME_DATA const cXyz BaseX; + static DUSK_GAME_DATA const cXyz BaseY; + static DUSK_GAME_DATA const cXyz BaseZ; + static DUSK_GAME_DATA const cXyz BaseXY; + static DUSK_GAME_DATA const cXyz BaseXZ; + static DUSK_GAME_DATA const cXyz BaseYZ; + static DUSK_GAME_DATA const cXyz BaseXYZ; #ifdef __MWERKS__ cXyz() {} ~cXyz() {} diff --git a/include/Z2AudioLib/Z2Audience.h b/include/Z2AudioLib/Z2Audience.h index 75998e878b..e6d2f7da3a 100644 --- a/include/Z2AudioLib/Z2Audience.h +++ b/include/Z2AudioLib/Z2Audience.h @@ -256,7 +256,7 @@ inline Z2Audience* Z2GetAudience() { return JASGlobalInstance::getInstance(); } -extern s8 data_80451358; -extern s8 data_80451359; +DUSK_GAME_EXTERN s8 data_80451358; +DUSK_GAME_EXTERN s8 data_80451359; #endif /* Z2AUDIENCE_H */ diff --git a/include/Z2AudioLib/Z2AudioMgr.h b/include/Z2AudioLib/Z2AudioMgr.h index 0f8e5a17ea..82fbdee7e4 100644 --- a/include/Z2AudioLib/Z2AudioMgr.h +++ b/include/Z2AudioLib/Z2AudioMgr.h @@ -34,7 +34,7 @@ public: bool isResetting() { return mResettingFlag; } static Z2AudioMgr* getInterface() { return mAudioMgrPtr; } - static Z2AudioMgr* mAudioMgrPtr; + static DUSK_GAME_DATA Z2AudioMgr* mAudioMgrPtr; /* 0x0514 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3* posPtr); /* 0x0518 */ bool mResettingFlag; diff --git a/include/Z2AudioLib/Z2Calc.h b/include/Z2AudioLib/Z2Calc.h index e8eee29571..ded419e9f4 100644 --- a/include/Z2AudioLib/Z2Calc.h +++ b/include/Z2AudioLib/Z2Calc.h @@ -42,8 +42,8 @@ f32 getParamByExp(f32 value, f32 inMin, f32 inMax, f32 exponent, f32 outMin, f32 f32 getRandom(f32 magnitude, f32 exponent, f32 bias); f32 getRandom_0_1(); -extern const f32 cEqualCSlope; -extern const f32 cEqualPSlope; +DUSK_GAME_EXTERN const f32 cEqualCSlope; +DUSK_GAME_EXTERN const f32 cEqualPSlope; } // namespace Z2Calc #endif /* Z2CALC_H */ diff --git a/include/Z2AudioLib/Z2EnvSeMgr.h b/include/Z2AudioLib/Z2EnvSeMgr.h index 464da590de..f2f4dc175a 100644 --- a/include/Z2AudioLib/Z2EnvSeMgr.h +++ b/include/Z2AudioLib/Z2EnvSeMgr.h @@ -175,7 +175,7 @@ struct Z2EnvSeMgr : public JASGlobalInstance { STATIC_ASSERT(sizeof(Z2EnvSeMgr) == 0x30C); -extern Z2EnvSeMgr g_mEnvSeMgr; +DUSK_GAME_EXTERN Z2EnvSeMgr g_mEnvSeMgr; inline Z2EnvSeMgr* Z2GetEnvSeMgr() { return JASGlobalInstance::getInstance(); diff --git a/include/Z2AudioLib/Z2LinkMgr.h b/include/Z2AudioLib/Z2LinkMgr.h index cf05ed14d9..705394df5e 100644 --- a/include/Z2AudioLib/Z2LinkMgr.h +++ b/include/Z2AudioLib/Z2LinkMgr.h @@ -57,7 +57,7 @@ public: void setUsingIronBall(bool isUsingIronBall) { mUsingIronBall = isUsingIronBall; } void setMarkState(u8 state) { mMarkState = state; } - static Z2CreatureLink* mLinkPtr; + static DUSK_GAME_DATA Z2CreatureLink* mLinkPtr; static Z2CreatureLink* getLink() { return mLinkPtr; } friend class Z2LinkSoundStarter; diff --git a/include/Z2AudioLib/Z2Param.h b/include/Z2AudioLib/Z2Param.h index e6c8aac993..73e8b01256 100644 --- a/include/Z2AudioLib/Z2Param.h +++ b/include/Z2AudioLib/Z2Param.h @@ -4,72 +4,72 @@ #include struct Z2Param { - static f32 DISTANCE_MAX; - static f32 MAX_VOLUME_DISTANCE; - static f32 DOLBY_CENTER_VALUE; - static f32 DOLBY_FLONT_DISTANCE_MAX; - static f32 DOLBY_BEHIND_DISTANCE_MAX; - static f32 DISTANCE_FX_PARAM; - static f32 SONIC_SPEED; - static f32 VOL_BGM_DEFAULT; - static f32 VOL_SE_SYSTEM_DEFAULT; - static f32 VOL_SE_LINK_VOICE_DEFAULT; - static f32 VOL_SE_LINK_MOTION_DEFAULT; - static f32 VOL_SE_LINK_FOOTNOTE_DEFAULT; - static f32 VOL_SE_CHAR_VOICE_DEFAULT; - static f32 VOL_SE_CHAR_MOVE_DEFAULT; - static f32 VOL_SE_OBJECT_DEFAULT; - static f32 VOL_SE_ATMOSPHERE_DEFAULT; - static f32 VOL_BGM_TALKING; - static f32 VOL_SE_SYSTEM_TALKING; - static f32 VOL_SE_LINK_VOICE_TALKING; - static f32 VOL_SE_LINK_MOTION_TALKING; - static f32 VOL_SE_LINK_FOOTNOTE_TALKING; - static f32 VOL_SE_CHAR_VOICE_TALKING; - static f32 VOL_SE_CHAR_MOVE_TALKING; - static f32 VOL_SE_OBJECT_TALKING; - static f32 VOL_SE_ATMOSPHERE_TALKING; - static f32 VOL_BGM_PAUSING; - static f32 VOL_SE_SYSTEM_PAUSING; - static f32 VOL_SE_LINK_VOICE_PAUSING; - static f32 VOL_SE_LINK_MOTION_PAUSING; - static f32 VOL_SE_LINK_FOOTNOTE_PAUSING; - static f32 VOL_SE_CHAR_VOICE_PAUSING; - static f32 VOL_SE_CHAR_MOVE_PAUSING; - static f32 VOL_SE_OBJECT_PAUSING; - static f32 VOL_SE_ATMOSPHERE_PAUSING; - static f32 MIN_DISTANCE_VOLUME; - static f32 ENEMY_LASTHIT_MUTE_VOLUME; + static DUSK_GAME_DATA f32 DISTANCE_MAX; + static DUSK_GAME_DATA f32 MAX_VOLUME_DISTANCE; + static DUSK_GAME_DATA f32 DOLBY_CENTER_VALUE; + static DUSK_GAME_DATA f32 DOLBY_FLONT_DISTANCE_MAX; + static DUSK_GAME_DATA f32 DOLBY_BEHIND_DISTANCE_MAX; + static DUSK_GAME_DATA f32 DISTANCE_FX_PARAM; + static DUSK_GAME_DATA f32 SONIC_SPEED; + static DUSK_GAME_DATA f32 VOL_BGM_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_OBJECT_DEFAULT; + static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_DEFAULT; + static DUSK_GAME_DATA f32 VOL_BGM_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_OBJECT_TALKING; + static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_TALKING; + static DUSK_GAME_DATA f32 VOL_BGM_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_OBJECT_PAUSING; + static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_PAUSING; + static DUSK_GAME_DATA f32 MIN_DISTANCE_VOLUME; + static DUSK_GAME_DATA f32 ENEMY_LASTHIT_MUTE_VOLUME; // made up names based on HIO labels - static u8 SCENE_CHANGE_BGM_FADEOUT_TIME; - static u8 BGM_CROSS_FADEIN_TIME; - static u8 BGM_CROSS_FADEOUT_TIME; - static u8 BATTLE_BGM_WAIT_TIME; + static DUSK_GAME_DATA u8 SCENE_CHANGE_BGM_FADEOUT_TIME; + static DUSK_GAME_DATA u8 BGM_CROSS_FADEIN_TIME; + static DUSK_GAME_DATA u8 BGM_CROSS_FADEOUT_TIME; + static DUSK_GAME_DATA u8 BATTLE_BGM_WAIT_TIME; static f32 ENEMY_NEARBY_DIST; static f32 BATTLE_FADEIN_DIST; static f32 BATTLE_FADEOUT_DIST; - static u8 FOUND_TRACK_FI_TIME; - static u8 FOUND_TRACK_FO_TIME; - static u8 CLOSE_BATTLE_TRACK_FI_TIME; - static u8 CLOSE_BATTLE_TRACK_FO_TIME; + static DUSK_GAME_DATA u8 FOUND_TRACK_FI_TIME; + static DUSK_GAME_DATA u8 FOUND_TRACK_FO_TIME; + static DUSK_GAME_DATA u8 CLOSE_BATTLE_TRACK_FI_TIME; + static DUSK_GAME_DATA u8 CLOSE_BATTLE_TRACK_FO_TIME; - static u8 ENDING_BLOW_VOL_DOWN_TIME; - static u8 ENDING_BLOW_VOL_LOWER_TIME; - static u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME; - static u8 ENDING_BLOW_MIN_FINISH_TIME; + static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_DOWN_TIME; + static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_LOWER_TIME; + static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME; + static DUSK_GAME_DATA u8 ENDING_BLOW_MIN_FINISH_TIME; - static u8 DARK_SE_FILTER_ON; - static u8 DARK_SE_LOW_PASS_FILTER_SETTING; - static u8 SYSTEM_SE_USE_DARK_SE_SETTING; + static DUSK_GAME_DATA u8 DARK_SE_FILTER_ON; + static DUSK_GAME_DATA u8 DARK_SE_LOW_PASS_FILTER_SETTING; + static DUSK_GAME_DATA u8 SYSTEM_SE_USE_DARK_SE_SETTING; static f32 AUDIBLE_DELTA_RANGE_VOLUME; static f32 AUDIBLE_DELTA_RANGE_PAN; static f32 AUDIBLE_DELTA_RANGE_DOLBY; }; -extern u8 data_8045086C; +DUSK_GAME_EXTERN u8 data_8045086C; #endif /* Z2PARAM_H */ diff --git a/include/c/c_damagereaction.h b/include/c/c_damagereaction.h index e2c8bfe051..56b54825b7 100644 --- a/include/c/c_damagereaction.h +++ b/include/c/c_damagereaction.h @@ -12,18 +12,18 @@ public: BOOL cDmrNowMidnaTalk(); -extern u8 cDmr_SkipInfo; -extern u8 data_80450C99; -extern u8 data_80450C9A; -extern u8 data_80450C9B; -extern u8 data_80450C9C; -extern u8 data_80450C9D; -extern u8 data_80450C9E; -extern u8 cDmr_FishingWether; -extern u8 data_80450CA0; +DUSK_GAME_EXTERN u8 cDmr_SkipInfo; +DUSK_GAME_EXTERN u8 data_80450C99; +DUSK_GAME_EXTERN u8 data_80450C9A; +DUSK_GAME_EXTERN u8 data_80450C9B; +DUSK_GAME_EXTERN u8 data_80450C9C; +DUSK_GAME_EXTERN u8 data_80450C9D; +DUSK_GAME_EXTERN u8 data_80450C9E; +DUSK_GAME_EXTERN u8 cDmr_FishingWether; +DUSK_GAME_EXTERN u8 data_80450CA0; extern "C" { - extern JPTraceParticleCallBack4 JPTracePCB4; + DUSK_GAME_EXTERN JPTraceParticleCallBack4 JPTracePCB4; } void debug_actor_create(); diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index a1d78c6116..8728bc16a8 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -57,8 +57,8 @@ public: void setNowOffsetX(f32 i_offset) { mNowOffsetX = i_offset; } void setNowOffsetY(f32 i_offset) { mNowOffsetY = i_offset; } - static bool m_eye_move_flg; - static u8 m_morf_frame; + static DUSK_GAME_DATA bool m_eye_move_flg; + static DUSK_GAME_DATA u8 m_morf_frame; /* 0x0F4 */ mutable f32 field_0xf4; /* 0x0F8 */ mutable f32 field_0xf8; @@ -3913,20 +3913,20 @@ public: static u32 getOtherHeapSize() { return 0xF0A60; } - static daAlink_BckData const m_mainBckShield[20]; - static daAlink_BckData const m_mainBckSword[5]; - static daAlink_BckData const m_mainBckFishing[28]; - static daAlink_AnmData const m_anmDataTable[ANM_MAX]; - static daAlink_WlAnmData const m_wlAnmDataTable[WANM_MAX]; - static daAlink_FaceTexData const m_faceTexDataTable[]; - static Vec const m_handLeftOutSidePos; - static Vec const m_handRightOutSidePos; - static Vec const m_handLeftInSidePos; - static Vec const m_handRightInSidePos; + static DUSK_GAME_DATA daAlink_BckData const m_mainBckShield[20]; + static DUSK_GAME_DATA daAlink_BckData const m_mainBckSword[5]; + static DUSK_GAME_DATA daAlink_BckData const m_mainBckFishing[28]; + static DUSK_GAME_DATA daAlink_AnmData const m_anmDataTable[ANM_MAX]; + static DUSK_GAME_DATA daAlink_WlAnmData const m_wlAnmDataTable[WANM_MAX]; + static DUSK_GAME_DATA daAlink_FaceTexData const m_faceTexDataTable[]; + static DUSK_GAME_DATA Vec const m_handLeftOutSidePos; + static DUSK_GAME_DATA Vec const m_handRightOutSidePos; + static DUSK_GAME_DATA Vec const m_handLeftInSidePos; + static DUSK_GAME_DATA Vec const m_handRightInSidePos; - static const daAlink_procInitTable m_procInitTable[]; - static daAlink_procFunc m_demoInitTable[]; - static const EffParamProc m_fEffParamProc[]; + static DUSK_GAME_DATA const daAlink_procInitTable m_procInitTable[]; + static DUSK_GAME_DATA daAlink_procFunc m_demoInitTable[]; + static DUSK_GAME_DATA const EffParamProc m_fEffParamProc[]; /* 0x0062C */ request_of_phase_process_class mPhaseReq; /* 0x00634 */ const char* mArcName; @@ -4649,7 +4649,7 @@ struct daAlinkHIO_basic_c1 { class daAlinkHIO_basic_c0 { public: - static daAlinkHIO_basic_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_basic_c1 const m; }; class daAlinkHIO_basic_c : public daAlinkHIO_data_c { @@ -4700,7 +4700,7 @@ public: class daAlinkHIO_move_c0 { public: - static daAlinkHIO_move_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_move_c1 const m; }; class daAlinkHIO_move_c : public daAlinkHIO_data_c { @@ -4746,7 +4746,7 @@ public: class daAlinkHIO_atnMove_c0 { public: - static daAlinkHIO_atnMove_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_atnMove_c1 const m; }; class daAlinkHIO_atnMove_c : public daAlinkHIO_data_c { @@ -4792,7 +4792,7 @@ public: class daAlinkHIO_noActAtnMove_c0 { public: - static daAlinkHIO_noActAtnMove_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_noActAtnMove_c1 const m; }; class daAlinkHIO_noActAtnMove_c : public daAlinkHIO_data_c { @@ -4834,7 +4834,7 @@ public: class daAlinkHIO_frontRoll_c0 { public: - static daAlinkHIO_frontRoll_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_frontRoll_c1 const m; }; class daAlinkHIO_frontRoll_c : public daAlinkHIO_data_c { @@ -4864,7 +4864,7 @@ public: class daAlinkHIO_backJump_c0 { public: - static daAlinkHIO_backJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_backJump_c1 const m; }; class daAlinkHIO_backJump_c : public daAlinkHIO_data_c { @@ -4898,7 +4898,7 @@ public: class daAlinkHIO_sideStep_c0 { public: - static daAlinkHIO_sideStep_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_sideStep_c1 const m; }; class daAlinkHIO_sideStep_c : public daAlinkHIO_data_c { @@ -4936,7 +4936,7 @@ public: class daAlinkHIO_slide_c0 { public: - static daAlinkHIO_slide_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_slide_c1 const m; }; class daAlinkHIO_slide_c : public daAlinkHIO_data_c { @@ -4964,27 +4964,27 @@ public: class daAlinkHIO_cutNmV_c0 { public: - static daAlinkHIO_cutNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m; }; class daAlinkHIO_cutNmL_c0 { public: - static daAlinkHIO_cutNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m; }; class daAlinkHIO_cutNmR_c0 { public: - static daAlinkHIO_cutNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m; }; class daAlinkHIO_cutNmSL_c0 { public: - static daAlinkHIO_cutNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m; }; class daAlinkHIO_cutNmSR_c0 { public: - static daAlinkHIO_cutNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m; }; class daAlinkHIO_cutNormal_c : public daAlinkHIO_data_c { @@ -5015,32 +5015,32 @@ public: class daAlinkHIO_cutFnL_c0 { public: - static daAlinkHIO_cutFinish_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m; }; class daAlinkHIO_cutFnV_c0 { public: - static daAlinkHIO_cutFinish_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m; }; class daAlinkHIO_cutFnS_c0 { public: - static daAlinkHIO_cutFinish_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m; }; class daAlinkHIO_cutFnSl_c0 { public: - static daAlinkHIO_cutFinish_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m; }; class daAlinkHIO_cutFnSm_c0 { public: - static daAlinkHIO_cutFinish_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m; }; class daAlinkHIO_cutFnR_c0 { public: - static daAlinkHIO_cutFinish_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m; }; class daAlinkHIO_cutFinish_c : public daAlinkHIO_data_c { @@ -5077,7 +5077,7 @@ public: class daAlinkHIO_cutFnJU_c0 { public: - static daAlinkHIO_cutFnJU_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutFnJU_c1 const m; }; class daAlinkHIO_cutFnJU_c : public daAlinkHIO_data_c { @@ -5104,17 +5104,17 @@ public: class daAlinkHIO_cutDaL_c0 { public: - static daAlinkHIO_cutDash_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m; }; class daAlinkHIO_cutDaR_c0 { public: - static daAlinkHIO_cutDash_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m; }; class daAlinkHIO_cutDaCharge_c0 { public: - static daAlinkHIO_cutDash_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m; }; class daAlinkHIO_cutDash_c : public daAlinkHIO_data_c { @@ -5146,7 +5146,7 @@ public: class daAlinkHIO_cutJump_c0 { public: - static daAlinkHIO_cutJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutJump_c1 const m; }; class daAlinkHIO_cutJump_c : public daAlinkHIO_data_c { @@ -5197,7 +5197,7 @@ public: class daAlinkHIO_cutTurn_c0 { public: - static daAlinkHIO_cutTurn_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutTurn_c1 const m; }; class daAlinkHIO_cutTurn_c : public daAlinkHIO_data_c { @@ -5225,22 +5225,22 @@ public: class daAlinkHIO_hoCutLA_c0 { public: - static daAlinkHIO_hoCut_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m; }; class daAlinkHIO_hoCutLB_c0 { public: - static daAlinkHIO_hoCut_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m; }; class daAlinkHIO_hoCutRA_c0 { public: - static daAlinkHIO_hoCut_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m; }; class daAlinkHIO_hoCutRB_c0 { public: - static daAlinkHIO_hoCut_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m; }; class daAlinkHIO_hoCut_c : public daAlinkHIO_data_c { @@ -5273,7 +5273,7 @@ public: class daAlinkHIO_hoCutCharge_c0 { public: - static daAlinkHIO_hoCutCharge_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_hoCutCharge_c1 const m; }; class daAlinkHIO_hoCutCharge_c : public daAlinkHIO_data_c { @@ -5307,7 +5307,7 @@ public: class daAlinkHIO_cutDown_c0 { public: - static daAlinkHIO_cutDown_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutDown_c1 const m; }; class daAlinkHIO_cutDown_c : public daAlinkHIO_data_c { @@ -5343,7 +5343,7 @@ public: class daAlinkHIO_cutHead_c0 { public: - static daAlinkHIO_cutHead_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutHead_c1 const m; }; class daAlinkHIO_cutHead_c : public daAlinkHIO_data_c { @@ -5380,7 +5380,7 @@ public: class daAlinkHIO_cutLargeJump_c0 { public: - static daAlinkHIO_cutLargeJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cutLargeJump_c1 const m; }; class daAlinkHIO_cutLargeJump_c : public daAlinkHIO_data_c { @@ -5457,7 +5457,7 @@ public: static daAlinkHIO_cutDown_c0 const mCutDown; static daAlinkHIO_cutHead_c0 const mCutHead; static daAlinkHIO_cutLargeJump_c0 const mCutLargeJump; - static daAlinkHIO_cut_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_cut_c1 const m; }; class daAlinkHIO_cut_c : public daAlinkHIO_data_c { @@ -5513,12 +5513,12 @@ public: class daAlinkHIO_gAtPush_c0 { public: - static daAlinkHIO_guardAttack_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_guardAttack_c1 const m; }; class daAlinkHIO_gAtKick_c0 { public: - static daAlinkHIO_guardAttack_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_guardAttack_c1 const m; }; class daAlinkHIO_guardAttack_c : public daAlinkHIO_data_c { @@ -5550,7 +5550,7 @@ public: class daAlinkHIO_turnMove_c0 { public: - static daAlinkHIO_turnMove_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_turnMove_c1 const m; }; class daAlinkHIO_turnMove_c : public daAlinkHIO_data_c { @@ -5595,7 +5595,7 @@ public: static daAlinkHIO_gAtPush_c0 const mAtPush; static daAlinkHIO_gAtKick_c0 const mAtKick; static daAlinkHIO_turnMove_c0 const mTurnMove; - static daAlinkHIO_guard_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_guard_c1 const m; }; class daAlinkHIO_guard_c : public daAlinkHIO_data_c { @@ -5634,7 +5634,7 @@ public: class daAlinkHIO_crouch_c0 { public: - static daAlinkHIO_crouch_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_crouch_c1 const m; }; class daAlinkHIO_crouch_c : public daAlinkHIO_data_c { @@ -5689,7 +5689,7 @@ public: class daAlinkHIO_autoJump_c0 { public: - static daAlinkHIO_autoJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_autoJump_c1 const m; }; class daAlinkHIO_autoJump_c : public daAlinkHIO_data_c { @@ -5719,7 +5719,7 @@ public: class daAlinkHIO_smallJump_c0 { public: - static daAlinkHIO_smallJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_smallJump_c1 const m; }; class daAlinkHIO_smallJump_c : public daAlinkHIO_data_c { @@ -5748,7 +5748,7 @@ public: class daAlinkHIO_wallCatch_c0 { public: - static daAlinkHIO_wallCatch_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wallCatch_c1 const m; }; class daAlinkHIO_wallCatch_c : public daAlinkHIO_data_c { @@ -5774,7 +5774,7 @@ public: class daAlinkHIO_wallFall_c0 { public: - static daAlinkHIO_wallFall_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wallFall_c1 const m; }; class daAlinkHIO_wallFall_c : public daAlinkHIO_data_c { @@ -5803,7 +5803,7 @@ public: class daAlinkHIO_wallMove_c0 { public: - static daAlinkHIO_wallMove_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wallMove_c1 const m; }; class daAlinkHIO_wallMove_c : public daAlinkHIO_data_c { @@ -5839,7 +5839,7 @@ public: static daAlinkHIO_wallCatch_c0 const mWallCatch; static daAlinkHIO_wallFall_c0 const mWallFall; static daAlinkHIO_wallMove_c0 const mWallMove; - static daAlinkHIO_wallHang_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wallHang_c1 const m; }; class daAlinkHIO_wallHang_c : public daAlinkHIO_data_c { @@ -5886,7 +5886,7 @@ public: class daAlinkHIO_pushpull_c0 { public: - static daAlinkHIO_pushpull_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_pushpull_c1 const m; }; class daAlinkHIO_pushpull_c : public daAlinkHIO_data_c { @@ -5920,7 +5920,7 @@ public: class daAlinkHIO_damNormal_c0 { public: - static daAlinkHIO_damNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damNormal_c1 const m; }; class daAlinkHIO_damNormal_c : public daAlinkHIO_data_c { @@ -5959,12 +5959,12 @@ public: class daAlinkHIO_damLarge_c0 { public: - static daAlinkHIO_damLaHu_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damLaHu_c1 const m; }; class daAlinkHIO_damHuge_c0 { public: - static daAlinkHIO_damLaHu_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damLaHu_c1 const m; }; class daAlinkHIO_damLaHu_c : public daAlinkHIO_data_c { @@ -5992,7 +5992,7 @@ public: class daAlinkHIO_damHorse_c0 { public: - static daAlinkHIO_damHorse_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damHorse_c1 const m; }; class daAlinkHIO_damHorse_c : public daAlinkHIO_data_c { @@ -6027,7 +6027,7 @@ public: class daAlinkHIO_damFall_c0 { public: - static daAlinkHIO_damFall_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damFall_c1 const m; }; class daAlinkHIO_damFall_c : public daAlinkHIO_data_c { @@ -6057,7 +6057,7 @@ public: class daAlinkHIO_damCaught_c0 { public: - static daAlinkHIO_damCaught_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damCaught_c1 const m; }; class daAlinkHIO_damCaught_c : public daAlinkHIO_data_c { @@ -6093,7 +6093,7 @@ public: class daAlinkHIO_damSwim_c0 { public: - static daAlinkHIO_damSwim_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damSwim_c1 const m; }; class daAlinkHIO_damSwim_c : public daAlinkHIO_data_c { @@ -6140,7 +6140,7 @@ public: class daAlinkHIO_damage_c0 { public: - static daAlinkHIO_damage_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_damage_c1 const m; static daAlinkHIO_damNormal_c0 const mDamNormal; static daAlinkHIO_damLarge_c0 const mDamLarge; static daAlinkHIO_damHuge_c0 const mDamHuge; @@ -6192,7 +6192,7 @@ public: class daAlinkHIO_horse_c0 { public: - static daAlinkHIO_horse_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_horse_c1 const m; }; class daAlinkHIO_horse_c : public daAlinkHIO_data_c { @@ -6231,7 +6231,7 @@ public: class daAlinkHIO_canoe_c0 { public: - static daAlinkHIO_canoe_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_canoe_c1 const m; }; class daAlinkHIO_canoe_c : public daAlinkHIO_data_c { @@ -6276,7 +6276,7 @@ public: class daAlinkHIO_bow_c0 { public: - static daAlinkHIO_bow_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_bow_c1 const m; }; class daAlinkHIO_bow_c : public daAlinkHIO_data_c { @@ -6312,7 +6312,7 @@ public: class daAlinkHIO_boom_c0 { public: - static daAlinkHIO_boom_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_boom_c1 const m; }; class daAlinkHIO_boom_c : public daAlinkHIO_data_c { @@ -6356,7 +6356,7 @@ public: class daAlinkHIO_bomb_c0 { public: - static daAlinkHIO_bomb_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_bomb_c1 const m; }; class daAlinkHIO_bomb_c : public daAlinkHIO_data_c { @@ -6391,7 +6391,7 @@ public: class daAlinkHIO_huLight_c0 { public: - static daAlinkHIO_huLight_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_huLight_c1 const m; }; class daAlinkHIO_wlLight_c1 { @@ -6410,7 +6410,7 @@ public: class daAlinkHIO_wlLight_c0 { public: - static daAlinkHIO_wlLight_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlLight_c1 const m; }; class daAlinkHIO_zwLight_c1 { // may be wrong @@ -6429,7 +6429,7 @@ public: class daAlinkHIO_zwLight_c0 { public: - static daAlinkHIO_zwLight_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_zwLight_c1 const m; }; class daAlinkHIO_light_c : public daAlinkHIO_data_c { @@ -6465,7 +6465,7 @@ public: class daAlinkHIO_kandelaar_c0 { public: - static daAlinkHIO_kandelaar_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_kandelaar_c1 const m; }; class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c { @@ -6504,7 +6504,7 @@ public: class daAlinkHIO_magneBoots_c0 { public: - static daAlinkHIO_magneBoots_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_magneBoots_c1 const m; }; class daAlinkHIO_magneBoots_c : public daAlinkHIO_data_c { @@ -6530,7 +6530,7 @@ public: class daAlinkHIO_fmChain_c0 { public: - static daAlinkHIO_fmChain_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_fmChain_c1 const m; }; class daAlinkHIO_fmChain_c : public daAlinkHIO_data_c { @@ -6570,7 +6570,7 @@ public: class daAlinkHIO_hookshot_c0 { public: - static daAlinkHIO_hookshot_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_hookshot_c1 const m; }; class daAlinkHIO_hookshot_c : public daAlinkHIO_data_c { @@ -6608,7 +6608,7 @@ public: class daAlinkHIO_spinner_c0 { public: - static daAlinkHIO_spinner_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_spinner_c1 const m; }; class daAlinkHIO_spinner_c : public daAlinkHIO_data_c { @@ -6664,7 +6664,7 @@ public: class daAlinkHIO_ironBall_c0 { public: - static daAlinkHIO_ironBall_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_ironBall_c1 const m; }; class daAlinkHIO_ironBall_c : public daAlinkHIO_data_c { @@ -6694,7 +6694,7 @@ public: class daAlinkHIO_copyRod_c0 { public: - static daAlinkHIO_copyRod_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_copyRod_c1 const m; }; class daAlinkHIO_copyRod_c : public daAlinkHIO_data_c { @@ -6722,7 +6722,7 @@ public: class daAlinkHIO_pickUp_c0 { public: - static daAlinkHIO_pickUp_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_pickUp_c1 const m; }; class daAlinkHIO_pickUp_c : public daAlinkHIO_data_c { @@ -6769,7 +6769,7 @@ public: class daAlinkHIO_board_c0 { public: - static daAlinkHIO_board_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_board_c1 const m; }; class daAlinkHIO_board_c : public daAlinkHIO_data_c { @@ -6802,7 +6802,7 @@ public: class daAlinkHIO_bottle_c0 { public: - static daAlinkHIO_bottle_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_bottle_c1 const m; }; class daAlinkHIO_bottle_c : public daAlinkHIO_data_c { @@ -6850,7 +6850,7 @@ public: static daAlinkHIO_ironBall_c0 const mIronBall; static daAlinkHIO_copyRod_c0 const mCopyRod; static daAlinkHIO_zwLight_c0 const mZoraArmorPL; - static daAlinkHIO_item_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_item_c1 const m; }; class daAlinkHIO_item_c : public daAlinkHIO_data_c { @@ -6909,7 +6909,7 @@ public: class daAlinkHIO_ladder_c0 { public: - static daAlinkHIO_ladder_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_ladder_c1 const m; }; class daAlinkHIO_ladder_c : public daAlinkHIO_data_c { @@ -6949,7 +6949,7 @@ public: class daAlinkHIO_roofHang_c0 { public: - static daAlinkHIO_roofHang_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_roofHang_c1 const m; }; class daAlinkHIO_roofHang_c : public daAlinkHIO_data_c { @@ -6987,7 +6987,7 @@ public: class daAlinkHIO_grab_c0 { public: - static daAlinkHIO_grab_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_grab_c1 const m; }; class daAlinkHIO_grab_c : public daAlinkHIO_data_c { @@ -7062,7 +7062,7 @@ public: class daAlinkHIO_swim_c0 { public: - static daAlinkHIO_swim_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_swim_c1 const m; }; class daAlinkHIO_swim_c : public daAlinkHIO_data_c { @@ -7138,7 +7138,7 @@ public: class daAlinkHIO_wlMove_c0 { public: - static daAlinkHIO_wlMove_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlMove_c1 const m; }; class daAlinkHIO_wlMove_c : public daAlinkHIO_data_c { @@ -7181,7 +7181,7 @@ public: class daAlinkHIO_wlMoveNoP_c0 { public: - static daAlinkHIO_wlMoveNoP_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlMoveNoP_c1 const m; }; class daAlinkHIO_wlMoveNoP_c : public daAlinkHIO_data_c { @@ -7220,7 +7220,7 @@ public: class daAlinkHIO_wlAtnMove_c0 { public: - static daAlinkHIO_wlAtnMove_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtnMove_c1 const m; }; class daAlinkHIO_wlAtnMove_c : public daAlinkHIO_data_c { @@ -7252,7 +7252,7 @@ public: class daAlinkHIO_wlHowl_c0 { public: - static daAlinkHIO_wlHowl_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlHowl_c1 const m; }; class daAlinkHIO_wlHowl_c : public daAlinkHIO_data_c { @@ -7286,7 +7286,7 @@ public: class daAlinkHIO_wlSideStep_c0 { public: - static daAlinkHIO_wlSideStep_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlSideStep_c1 const m; }; class daAlinkHIO_wlSideStep_c : public daAlinkHIO_data_c { @@ -7316,7 +7316,7 @@ public: class daAlinkHIO_wlBackJump_c0 { public: - static daAlinkHIO_wlBackJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlBackJump_c1 const m; }; class daAlinkHIO_wlBackJump_c : public daAlinkHIO_data_c { @@ -7361,7 +7361,7 @@ public: class daAlinkHIO_wlAutoJump_c0 { public: - static daAlinkHIO_wlAutoJump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAutoJump_c1 const m; }; class daAlinkHIO_wlAutoJump_c : public daAlinkHIO_data_c { @@ -7390,7 +7390,7 @@ public: class daAlinkHIO_wlPush_c0 { public: - static daAlinkHIO_wlPush_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlPush_c1 const m; }; class daAlinkHIO_wlPush_c : public daAlinkHIO_data_c { @@ -7426,7 +7426,7 @@ public: class daAlinkHIO_wlLie_c0 { public: - static daAlinkHIO_wlLie_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlLie_c1 const m; }; class daAlinkHIO_wlLie_c : public daAlinkHIO_data_c { @@ -7465,7 +7465,7 @@ public: class daAlinkHIO_wlWallHang_c0 { public: - static daAlinkHIO_wlWallHang_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlWallHang_c1 const m; }; class daAlinkHIO_wlWallHang_c : public daAlinkHIO_data_c { @@ -7497,7 +7497,7 @@ public: class daAlinkHIO_wlDamNormal_c0 { public: - static daAlinkHIO_wlDamNormal_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlDamNormal_c1 const m; }; class daAlinkHIO_wlDamNormal_c : public daAlinkHIO_data_c { @@ -7532,12 +7532,12 @@ public: class daAlinkHIO_wlDamLarge_c0 { public: - static daAlinkHIO_wlDamLaHu_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlDamLaHu_c1 const m; }; class daAlinkHIO_wlDamHuge_c0 { public: - static daAlinkHIO_wlDamLaHu_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlDamLaHu_c1 const m; }; class daAlinkHIO_wlDamLaHu_c : public daAlinkHIO_data_c { @@ -7566,7 +7566,7 @@ public: class daAlinkHIO_wlDamCaught_c0 { public: - static daAlinkHIO_wlDamCaught_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlDamCaught_c1 const m; }; class daAlinkHIO_wlDamCaught_c : public daAlinkHIO_data_c { @@ -7599,7 +7599,7 @@ public: class daAlinkHIO_wlDamFall_c0 { public: - static daAlinkHIO_wlDamFall_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlDamFall_c1 const m; }; class daAlinkHIO_wlDamFall_c : public daAlinkHIO_data_c { @@ -7626,7 +7626,7 @@ public: class daAlinkHIO_wlDamage_c0 { public: - static daAlinkHIO_wlDamage_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlDamage_c1 const m; static daAlinkHIO_wlDamNormal_c0 const mNormal; static daAlinkHIO_wlDamLarge_c0 const mLarge; static daAlinkHIO_wlDamHuge_c0 const mHuge; @@ -7676,7 +7676,7 @@ public: class daAlinkHIO_wlSlide_c0 { public: - static daAlinkHIO_wlSlide_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlSlide_c1 const m; }; class daAlinkHIO_wlSlide_c : public daAlinkHIO_data_c { @@ -7711,7 +7711,7 @@ public: class daAlinkHIO_wlRope_c0 { public: - static daAlinkHIO_wlRope_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlRope_c1 const m; }; class daAlinkHIO_wlRope_c : public daAlinkHIO_data_c { @@ -7747,17 +7747,17 @@ public: class daAlinkHIO_wlAtWaTl_c0 { public: - static daAlinkHIO_wlAtWait_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m; }; class daAlinkHIO_wlAtWaSc_c0 { public: - static daAlinkHIO_wlAtWait_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m; }; class daAlinkHIO_wlAtWaLr_c0 { public: - static daAlinkHIO_wlAtWait_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m; }; class daAlinkHIO_wlAtWait_c : public daAlinkHIO_data_c { @@ -7784,7 +7784,7 @@ public: class daAlinkHIO_wlAtRoll_c0 { public: - static daAlinkHIO_wlAtRoll_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtRoll_c1 const m; }; class daAlinkHIO_wlAtRoll_c : public daAlinkHIO_data_c { @@ -7819,7 +7819,7 @@ public: class daAlinkHIO_wlAtNjump_c0 { public: - static daAlinkHIO_wlAtNjump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtNjump_c1 const m; }; class daAlinkHIO_wlAtNjump_c : public daAlinkHIO_data_c { @@ -7860,7 +7860,7 @@ public: class daAlinkHIO_wlAtCjump_c0 { public: - static daAlinkHIO_wlAtCjump_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtCjump_c1 const m; }; class daAlinkHIO_wlAtCjump_c : public daAlinkHIO_data_c { @@ -7888,7 +7888,7 @@ public: class daAlinkHIO_wlAtLand_c0 { public: - static daAlinkHIO_wlAtLand_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtLand_c1 const m; }; class daAlinkHIO_wlAtLand_c : public daAlinkHIO_data_c { @@ -7924,7 +7924,7 @@ public: class daAlinkHIO_wlAtDown_c0 { public: - static daAlinkHIO_wlAtDown_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtDown_c1 const m; }; class daAlinkHIO_wlAtDown_c : public daAlinkHIO_data_c { @@ -7961,7 +7961,7 @@ public: class daAlinkHIO_wlAtLock_c0 { public: - static daAlinkHIO_wlAtLock_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtLock_c1 const m; }; class daAlinkHIO_wlAtLock_c : public daAlinkHIO_data_c { @@ -8001,7 +8001,7 @@ public: class daAlinkHIO_wlAtBite_c0 { public: - static daAlinkHIO_wlAtBite_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAtBite_c1 const m; }; class daAlinkHIO_wlAtBite_c : public daAlinkHIO_data_c { @@ -8046,7 +8046,7 @@ public: static daAlinkHIO_wlAtDown_c0 const mWlAtDown; static daAlinkHIO_wlAtLock_c0 const mWlAtLock; static daAlinkHIO_wlAtBite_c0 const mWlAtBite; - static daAlinkHIO_wlAttack_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlAttack_c1 const m; }; class daAlinkHIO_wlAttack_c : public daAlinkHIO_data_c { @@ -8093,7 +8093,7 @@ public: class daAlinkHIO_wlPoint_c0 { public: - static daAlinkHIO_wlPoint_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlPoint_c1 const m; }; class daAlinkHIO_wlPoint_c : public daAlinkHIO_data_c { @@ -8129,7 +8129,7 @@ public: class daAlinkHIO_wlChain_c0 { public: - static daAlinkHIO_wlChain_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlChain_c1 const m; }; class daAlinkHIO_wlChain_c : public daAlinkHIO_data_c { @@ -8186,7 +8186,7 @@ public: class daAlinkHIO_wlSwim_c0 { public: - static daAlinkHIO_wlSwim_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlSwim_c1 const m; }; class daAlinkHIO_wlSwim_c : public daAlinkHIO_data_c { @@ -8215,7 +8215,7 @@ public: class daAlinkHIO_wlGrab_c0 { public: - static daAlinkHIO_wlGrab_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlGrab_c1 const m; }; class daAlinkHIO_wlGrab_c : public daAlinkHIO_data_c { @@ -8245,7 +8245,7 @@ public: class daAlinkHIO_wlBall_c0 { public: - static daAlinkHIO_wlBall_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wlBall_c1 const m; }; class daAlinkHIO_wlBall_c : public daAlinkHIO_data_c { @@ -8300,7 +8300,7 @@ public: static daAlinkHIO_wlSwim_c0 const mWlSwim; static daAlinkHIO_wlGrab_c0 const mWlGrab; static daAlinkHIO_wlBall_c0 const mWlBall; - static daAlinkHIO_wolf_c1 const m; + static DUSK_GAME_DATA daAlinkHIO_wolf_c1 const m; }; class daAlinkHIO_wolf_c : public daAlinkHIO_data_c { diff --git a/include/d/actor/d_a_arrow.h b/include/d/actor/d_a_arrow.h index 682ffd43d7..47f86eeb50 100644 --- a/include/d/actor/d_a_arrow.h +++ b/include/d/actor/d_a_arrow.h @@ -161,7 +161,7 @@ private: /* 0xA10 */ dPa_hermiteEcallBack_c field_0xa10; /* 0xA28 */ int (daArrow_c::*mProcFunc)(); - static s16 m_count; + static DUSK_GAME_DATA s16 m_count; }; STATIC_ASSERT(sizeof(daArrow_c) == 0xA34); diff --git a/include/d/actor/d_a_balloon_2D.h b/include/d/actor/d_a_balloon_2D.h index 193ecadbaa..80aa3e3b02 100644 --- a/include/d/actor/d_a_balloon_2D.h +++ b/include/d/actor/d_a_balloon_2D.h @@ -67,7 +67,7 @@ public: void hide() { mIsVisible = 0; } u8 isVisible() { return mIsVisible; } - static daBalloon2D_c* myclass; + static DUSK_GAME_DATA daBalloon2D_c* myclass; struct ScoreCount { cXyz field_0x0; diff --git a/include/d/actor/d_a_bg_obj.h b/include/d/actor/d_a_bg_obj.h index fc4df6ab4e..aab9572183 100644 --- a/include/d/actor/d_a_bg_obj.h +++ b/include/d/actor/d_a_bg_obj.h @@ -89,10 +89,10 @@ public: void setAction(u8 i_action) { mAction = i_action; } - static createHeapFunc mCreateHeapFunc[]; - static createInitFunc mCreateInitFunc[]; - static executeFunc mExecuteFunc[]; - static tgSetFunc mTgSetFunc[]; + static DUSK_GAME_DATA createHeapFunc mCreateHeapFunc[]; + static DUSK_GAME_DATA createInitFunc mCreateInitFunc[]; + static DUSK_GAME_DATA executeFunc mExecuteFunc[]; + static DUSK_GAME_DATA tgSetFunc mTgSetFunc[]; /* 0x5A0 */ request_of_phase_process_class mPhase; /* 0x5A8 */ J3DModel* field_0x5a8[2][2]; diff --git a/include/d/actor/d_a_boomerang.h b/include/d/actor/d_a_boomerang.h index 6dcff6ef9f..fe39f226b7 100644 --- a/include/d/actor/d_a_boomerang.h +++ b/include/d/actor/d_a_boomerang.h @@ -190,12 +190,12 @@ STATIC_ASSERT(sizeof(daBoomerang_c) == 0xDE4); class daBoomerang_HIO_c0 { public: - static u16 const m_lockWaitTime; - static f32 const m_minCircleR; - static f32 const m_middleCircleR; - static f32 const m_maxCircleR; - static f32 const m_scale; - static f32 const m_lockWindScale; + static DUSK_GAME_DATA u16 const m_lockWaitTime; + static DUSK_GAME_DATA f32 const m_minCircleR; + static DUSK_GAME_DATA f32 const m_middleCircleR; + static DUSK_GAME_DATA f32 const m_maxCircleR; + static DUSK_GAME_DATA f32 const m_scale; + static DUSK_GAME_DATA f32 const m_lockWindScale; }; #endif /* D_A_BOOMERANG_H */ diff --git a/include/d/actor/d_a_bullet.h b/include/d/actor/d_a_bullet.h index d6f9135654..d925502779 100644 --- a/include/d/actor/d_a_bullet.h +++ b/include/d/actor/d_a_bullet.h @@ -18,7 +18,7 @@ class daBullet_Param_c { public: virtual ~daBullet_Param_c() {} - static daBullet_HIOParam const m; + static DUSK_GAME_DATA daBullet_HIOParam const m; }; #if DEBUG @@ -80,8 +80,8 @@ public: int wait(void*); int move(void*); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; }; STATIC_ASSERT(sizeof(daBullet_c) == 0x95c); diff --git a/include/d/actor/d_a_coach_fire.h b/include/d/actor/d_a_coach_fire.h index c5f890dc3d..f669525e9c 100644 --- a/include/d/actor/d_a_coach_fire.h +++ b/include/d/actor/d_a_coach_fire.h @@ -33,7 +33,7 @@ public: const CoachFireAttr& attr() { return M_attr; } - static CoachFireAttr const M_attr; + static DUSK_GAME_DATA CoachFireAttr const M_attr; inline ~daCoachFire_c(); diff --git a/include/d/actor/d_a_cstaF.h b/include/d/actor/d_a_cstaF.h index 0e8b5c1ca7..9cb9e06ff7 100644 --- a/include/d/actor/d_a_cstaF.h +++ b/include/d/actor/d_a_cstaF.h @@ -38,7 +38,7 @@ public: struct BckTbl { u16 idx[4]; }; - static const BckTbl m_bckIdxTable[]; + static DUSK_GAME_DATA const BckTbl m_bckIdxTable[]; private: /* 0x5A0 */ const char* m_arcName; diff --git a/include/d/actor/d_a_cstatue.h b/include/d/actor/d_a_cstatue.h index e20e683398..ca0b3ca616 100644 --- a/include/d/actor/d_a_cstatue.h +++ b/include/d/actor/d_a_cstatue.h @@ -99,7 +99,7 @@ public: mWarpMode = daCstatueWarpMode_Active; } - static u16 const m_bckIdxTable[daCstatueType_N][7]; + static DUSK_GAME_DATA u16 const m_bckIdxTable[daCstatueType_N][7]; private: /* 0x568 */ const char* mResName; diff --git a/include/d/actor/d_a_dshutter.h b/include/d/actor/d_a_dshutter.h index 479349c072..fb6d56ba97 100644 --- a/include/d/actor/d_a_dshutter.h +++ b/include/d/actor/d_a_dshutter.h @@ -65,15 +65,15 @@ public: f32 getCloseBoundSpeed() { return CLOSE_BOUND_SPEED; } f32 getCloseBoundRatio() { return CLOSE_BOUND_RATIO; } - static f32 const OPEN_SIZE; - static f32 const OPEN_ACCEL; - static f32 const OPEN_SPEED; - static f32 const OPEN_BOUND_SPEED; - static f32 const OPEN_BOUND_RATIO; - static f32 const CLOSE_ACCEL; - static f32 const CLOSE_SPEED; - static f32 const CLOSE_BOUND_SPEED; - static f32 const CLOSE_BOUND_RATIO; + static DUSK_GAME_DATA f32 const OPEN_SIZE; + static DUSK_GAME_DATA f32 const OPEN_ACCEL; + static DUSK_GAME_DATA f32 const OPEN_SPEED; + static DUSK_GAME_DATA f32 const OPEN_BOUND_SPEED; + static DUSK_GAME_DATA f32 const OPEN_BOUND_RATIO; + static DUSK_GAME_DATA f32 const CLOSE_ACCEL; + static DUSK_GAME_DATA f32 const CLOSE_SPEED; + static DUSK_GAME_DATA f32 const CLOSE_BOUND_SPEED; + static DUSK_GAME_DATA f32 const CLOSE_BOUND_RATIO; /* 0x5A0 */ dComIfG_resLoader_c mResLoader; /* 0x5B0 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_e_dt.h b/include/d/actor/d_a_e_dt.h index 1296a78e5b..c5c83c76e0 100644 --- a/include/d/actor/d_a_e_dt.h +++ b/include/d/actor/d_a_e_dt.h @@ -175,14 +175,14 @@ private: STATIC_ASSERT(sizeof(daE_DT_c) == 0x1174); struct E_DT_n { - static f32 eDt_ShakeFrame[10]; - static f32 eDt_ShakeFrameDemo[10]; - static dCcD_SrcSph cc_dt_body_src; - static dCcD_SrcSph cc_dt_tongue_src; - static int mDt_OtamaNum; - static int mDt_OtamaNo[20]; - static int m_fall_no; - static cXyz m_tongue_pos; + static DUSK_GAME_DATA f32 eDt_ShakeFrame[10]; + static DUSK_GAME_DATA f32 eDt_ShakeFrameDemo[10]; + static DUSK_GAME_DATA dCcD_SrcSph cc_dt_body_src; + static DUSK_GAME_DATA dCcD_SrcSph cc_dt_tongue_src; + static DUSK_GAME_DATA int mDt_OtamaNum; + static DUSK_GAME_DATA int mDt_OtamaNo[20]; + static DUSK_GAME_DATA int m_fall_no; + static DUSK_GAME_DATA cXyz m_tongue_pos; }; diff --git a/include/d/actor/d_a_e_ge.h b/include/d/actor/d_a_e_ge.h index c202e75231..527e5bb5fa 100644 --- a/include/d/actor/d_a_e_ge.h +++ b/include/d/actor/d_a_e_ge.h @@ -101,7 +101,7 @@ private: /* 0xB9E */ u8 field_0xb9e; /* 0xB9F */ u8 mHIOInit; - static actionFunc l_actionmenu[9]; + static DUSK_GAME_DATA actionFunc l_actionmenu[9]; }; STATIC_ASSERT(sizeof(daE_GE_c) == 0xBA0); diff --git a/include/d/actor/d_a_e_oc.h b/include/d/actor/d_a_e_oc.h index ada1b5310b..7f60afa878 100644 --- a/include/d/actor/d_a_e_oc.h +++ b/include/d/actor/d_a_e_oc.h @@ -159,14 +159,14 @@ private: STATIC_ASSERT(sizeof(daE_OC_c) == 0xe88); struct E_OC_n { - static f32 const oc_attackb_trans[10]; - static f32 const oc_attackc_trans[10]; - static dCcD_SrcSph cc_sph_src; - static dCcD_SrcSph at_sph_src; - static daE_OC_c* m_battle_oc; - static daE_OC_c* m_damage_oc; - static daE_OC_c* m_death_oc; - static daE_OC_c* m_talk_oc; + static DUSK_GAME_DATA f32 const oc_attackb_trans[10]; + static DUSK_GAME_DATA f32 const oc_attackc_trans[10]; + static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src; + static DUSK_GAME_DATA dCcD_SrcSph at_sph_src; + static DUSK_GAME_DATA daE_OC_c* m_battle_oc; + static DUSK_GAME_DATA daE_OC_c* m_damage_oc; + static DUSK_GAME_DATA daE_OC_c* m_death_oc; + static DUSK_GAME_DATA daE_OC_c* m_talk_oc; }; #endif /* D_A_E_OC_H */ diff --git a/include/d/actor/d_a_e_ym.h b/include/d/actor/d_a_e_ym.h index 3217592e13..9638736b46 100644 --- a/include/d/actor/d_a_e_ym.h +++ b/include/d/actor/d_a_e_ym.h @@ -215,7 +215,7 @@ private: STATIC_ASSERT(sizeof(daE_YM_c) == 0xAF8); struct E_YM_n { - static dCcD_SrcSph cc_sph_src; + static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src; }; diff --git a/include/d/actor/d_a_formation_mng.h b/include/d/actor/d_a_formation_mng.h index 79163f9cec..c308eb5352 100644 --- a/include/d/actor/d_a_formation_mng.h +++ b/include/d/actor/d_a_formation_mng.h @@ -311,10 +311,10 @@ struct daFmtMng_c : public fopAc_ac_c { } static FmtMngAttributes const& attr() { return M_attr; } - static FmtMngAttributes const M_attr; + static DUSK_GAME_DATA FmtMngAttributes const M_attr; typedef void (daFmtMng_c::*ActionFunc)(); - static daFmtMng_c::ActionFunc ActionTable[10]; + static DUSK_GAME_DATA daFmtMng_c::ActionFunc ActionTable[10]; /* 0x568 */ FmtPos_c* mPos; /* 0x56C */ FmtMember_c* mMember; diff --git a/include/d/actor/d_a_grass.h b/include/d/actor/d_a_grass.h index 4b07bea1d5..fa887b546a 100644 --- a/include/d/actor/d_a_grass.h +++ b/include/d/actor/d_a_grass.h @@ -41,9 +41,9 @@ public: static void deleteRoomGrass(int); static void deleteRoomFlower(int); - static daGrass_c* m_myObj; - static dGrass_packet_c* m_grass; - static dFlower_packet_c* m_flower; + static DUSK_GAME_DATA daGrass_c* m_myObj; + static DUSK_GAME_DATA dGrass_packet_c* m_grass; + static DUSK_GAME_DATA dFlower_packet_c* m_flower; /* 0x568 */ u8 unk_0x568[0x570 - 0x568]; }; diff --git a/include/d/actor/d_a_horse.h b/include/d/actor/d_a_horse.h index 7e8ef8c343..bb7ce7ccb1 100644 --- a/include/d/actor/d_a_horse.h +++ b/include/d/actor/d_a_horse.h @@ -351,8 +351,8 @@ public: m_modelData->getMaterialNodePointer(5)->getShape()->hide(); } - static u16 const m_footJointTable[]; - static f32 const m_callLimitDistance2; + static DUSK_GAME_DATA u16 const m_footJointTable[]; + static DUSK_GAME_DATA f32 const m_callLimitDistance2; /* 0x0568 */ request_of_phase_process_class m_phase; /* 0x0570 */ J3DModel* m_model; @@ -567,7 +567,7 @@ public: class daHorse_hio_c0 { public: - static const daHorse_hio_c1 m; + static DUSK_GAME_DATA const daHorse_hio_c1 m; }; class daHorse_hio_c : public JORReflexible { diff --git a/include/d/actor/d_a_hozelda.h b/include/d/actor/d_a_hozelda.h index 0c640e779c..d87542ccbc 100644 --- a/include/d/actor/d_a_hozelda.h +++ b/include/d/actor/d_a_hozelda.h @@ -29,8 +29,8 @@ public: static void setMorfFrame(u8 i_frame) { mMorfFrame = i_frame; } static void decMorfFrame() { cLib_calcTimer(&mMorfFrame); } - static u8 mEyeMoveFlg; - static u8 mMorfFrame; + static DUSK_GAME_DATA u8 mEyeMoveFlg; + static DUSK_GAME_DATA u8 mMorfFrame; /* 0x0F4 */ f32 field_0xf4; /* 0x0F8 */ f32 field_0xf8; @@ -50,7 +50,7 @@ struct daHoZelda_hio_c1 { struct daHoZelda_hio_c0 { daHoZelda_hio_c0() {} - static daHoZelda_hio_c1 const m; + static DUSK_GAME_DATA daHoZelda_hio_c1 const m; }; class daHoZelda_hio_c : public JORReflexible { diff --git a/include/d/actor/d_a_itembase.h b/include/d/actor/d_a_itembase.h index fa4d246062..da1f541cd7 100644 --- a/include/d/actor/d_a_itembase.h +++ b/include/d/actor/d_a_itembase.h @@ -60,7 +60,7 @@ public: virtual u8 getCollisionH(); virtual u8 getCollisionR(); - static daItemBase_data const m_data; + static DUSK_GAME_DATA daItemBase_data const m_data; /* 0x56C */ request_of_phase_process_class mPhase; /* 0x574 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_midna.h b/include/d/actor/d_a_midna.h index c9e84ee9d4..7793179066 100644 --- a/include/d/actor/d_a_midna.h +++ b/include/d/actor/d_a_midna.h @@ -32,7 +32,7 @@ public: class daMidna_hio_c0 { public: - static daMidna_hio_c1 const m; + static DUSK_GAME_DATA daMidna_hio_c1 const m; }; STATIC_ASSERT(sizeof(daMidna_hio_c0::m) == 0x20); @@ -87,8 +87,8 @@ public: /* 0x0FC */ f32 mNowOffsetX; /* 0x100 */ f32 mNowOffsetY; - static bool sEyeMoveFlg; - static u8 sMorfFrame; + static DUSK_GAME_DATA bool sEyeMoveFlg; + static DUSK_GAME_DATA u8 sMorfFrame; }; STATIC_ASSERT(sizeof(daMidna_matAnm_c) == 0x104); @@ -420,8 +420,8 @@ public: static u32 getOtherHeapSize() { return 0x1D0; } - static daMidna_texData_s const m_texDataTable[21]; - static daMidna_anmData_s const m_anmDataTable[53]; + static DUSK_GAME_DATA daMidna_texData_s const m_texDataTable[21]; + static DUSK_GAME_DATA daMidna_anmData_s const m_anmDataTable[53]; private: /* 0x568 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_mirror.h b/include/d/actor/d_a_mirror.h index e2f9a51e30..ecf1c127be 100644 --- a/include/d/actor/d_a_mirror.h +++ b/include/d/actor/d_a_mirror.h @@ -58,8 +58,8 @@ public: static u32 getMirrorRoomPrm() { return 0xFF03; } typedef int (daMirror_c::*entryModelFunc)(J3DModel*); - static entryModelFunc m_entryModel; - static daMirror_c* m_myObj; + static DUSK_GAME_DATA entryModelFunc m_entryModel; + static DUSK_GAME_DATA daMirror_c* m_myObj; /* 0x570 */ dMirror_packet_c mPacket; /* 0x6f8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_movie_player.h b/include/d/actor/d_a_movie_player.h index c382e0d1f7..9280c849d3 100644 --- a/include/d/actor/d_a_movie_player.h +++ b/include/d/actor/d_a_movie_player.h @@ -170,7 +170,7 @@ public: static int daMP_c_Callback_Main(daMP_c*); static int daMP_c_Callback_Draw(daMP_c*); - static daMP_c* m_myObj; + static DUSK_GAME_DATA daMP_c* m_myObj; private: /* 0x568 */ u32 (*mpGetMovieRestFrame)(void); diff --git a/include/d/actor/d_a_myna.h b/include/d/actor/d_a_myna.h index 0ef55d11ad..511f7b11e6 100644 --- a/include/d/actor/d_a_myna.h +++ b/include/d/actor/d_a_myna.h @@ -131,8 +131,8 @@ public: typedef void (daMyna_c::*ProcFunc)(); typedef int (daMyna_c::*BaseMotionFunc)(int); - static dCcD_SrcSph const mCcDSph; - static daMyna_c::BaseMotionFunc mBaseMotionTBL[7]; + static DUSK_GAME_DATA dCcD_SrcSph const mCcDSph; + static DUSK_GAME_DATA daMyna_c::BaseMotionFunc mBaseMotionTBL[7]; /* 0x56C */ request_of_phase_process_class mPhase; /* 0x574 */ mDoExt_McaMorfSO* mpMorf; diff --git a/include/d/actor/d_a_nbomb.h b/include/d/actor/d_a_nbomb.h index 4c5eb820ff..15c91043ff 100644 --- a/include/d/actor/d_a_nbomb.h +++ b/include/d/actor/d_a_nbomb.h @@ -91,7 +91,7 @@ public: s16 getExTime() { return mExTime; } - static const char* m_arcNameList[6]; + static DUSK_GAME_DATA const char* m_arcNameList[6]; /* 0x56C */ request_of_phase_process_class mPhase; /* 0x574 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index 70e3e01270..7b99f1e2fe 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -776,12 +776,12 @@ public: return chkFindActor(daPy_getPlayerActorClass(), param_0, param_1); } - static dCcD_SrcGObjInf const mCcDObjData; - static dCcD_SrcCyl mCcDCyl; - static dCcD_SrcSph mCcDSph; - static fopAc_ac_c* mFindActorPtrs[50]; - static s16 mSrchName; - static int mFindCount; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjData; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA fopAc_ac_c* mFindActorPtrs[50]; + static DUSK_GAME_DATA s16 mSrchName; + static DUSK_GAME_DATA int mFindCount; enum Mode { /* 0 */ MODE_ENTER, diff --git a/include/d/actor/d_a_npc2.h b/include/d/actor/d_a_npc2.h index 58343a47b0..0f8ab6ba20 100644 --- a/include/d/actor/d_a_npc2.h +++ b/include/d/actor/d_a_npc2.h @@ -113,9 +113,9 @@ public: virtual void drawOtherMdls(); virtual bool dbgDraw(); - static dCcD_SrcGObjInf const mCcDObj; - static dCcD_SrcCyl mCcDCyl; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObj; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; public: /* 0x56C */ dBgS_ObjAcch mAcch; @@ -173,9 +173,9 @@ public: virtual int ToFore() { return 1; } virtual int ToBack() { return 1; } - static const char* m_name; - static int m_dzb_id; - static MoveBGActor_SetFunc m_set_func; + static DUSK_GAME_DATA const char* m_name; + static DUSK_GAME_DATA int m_dzb_id; + static DUSK_GAME_DATA MoveBGActor_SetFunc m_set_func; public: /* 0xA14 */ dBgW* mpBgw; diff --git a/include/d/actor/d_a_npc4.h b/include/d/actor/d_a_npc4.h index 6532d92842..d195eb9669 100644 --- a/include/d/actor/d_a_npc4.h +++ b/include/d/actor/d_a_npc4.h @@ -394,13 +394,13 @@ public: void onHide() { mHide = true; } void offHide() { mHide = false; } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; - static dCcD_SrcSph mCcDSph; - static fopAc_ac_c* mFindActorPList[100]; - static s32 mFindCount; - static s16 mSrchActorName; - static char mFileNameBuf[0x15]; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA fopAc_ac_c* mFindActorPList[100]; + static DUSK_GAME_DATA s32 mFindCount; + static DUSK_GAME_DATA s16 mSrchActorName; + static DUSK_GAME_DATA char mFileNameBuf[0x15]; }; STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48); diff --git a/include/d/actor/d_a_npc_aru.h b/include/d/actor/d_a_npc_aru.h index a0a30a676f..e822850a7e 100644 --- a/include/d/actor/d_a_npc_aru.h +++ b/include/d/actor/d_a_npc_aru.h @@ -17,7 +17,7 @@ class daNpc_Aru_Param_c { public: virtual ~daNpc_Aru_Param_c() {} - static daNpc_Aru_HIOParam const m; + static DUSK_GAME_DATA daNpc_Aru_HIOParam const m; }; #if DEBUG @@ -171,8 +171,8 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } void setLastIn() { mLastGoatIn = true; } - static char DUSK_CONST* DUSK_CONST mCutNameList[7]; - static cutFunc DUSK_CONST mCutList[7]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[7]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7]; private: /* 0xE40 */ NPC_ARU_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_ash.h b/include/d/actor/d_a_npc_ash.h index 084569a66e..46c850a372 100644 --- a/include/d/actor/d_a_npc_ash.h +++ b/include/d/actor/d_a_npc_ash.h @@ -12,7 +12,7 @@ public: daNpcAsh_Param_c() {} virtual ~daNpcAsh_Param_c() {} - static const daNpcAsh_HIOParam m; + static DUSK_GAME_DATA const daNpcAsh_HIOParam m; }; #if DEBUG @@ -143,7 +143,7 @@ public: inline bool step(s16, bool); inline void playExpression(); - static EventFn mEvtSeqList[6]; + static DUSK_GAME_DATA EventFn mEvtSeqList[6]; private: /* 0xB48 */ Z2Creature mCreatureSound; diff --git a/include/d/actor/d_a_npc_ashB.h b/include/d/actor/d_a_npc_ashB.h index 12037188c6..e257db2402 100644 --- a/include/d/actor/d_a_npc_ashB.h +++ b/include/d/actor/d_a_npc_ashB.h @@ -12,7 +12,7 @@ class daNpcAshB_Param_c { public: virtual ~daNpcAshB_Param_c() {} - static const daNpcAshB_HIOParam m; + static DUSK_GAME_DATA const daNpcAshB_HIOParam m; }; #if DEBUG @@ -135,7 +135,7 @@ public: inline bool step(s16, int, f32); inline void playExpression(); - static EventFn DUSK_CONST mEvtSeqList[2]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[2]; private: /* 0xB48 */ Z2Creature mCreatureSound; diff --git a/include/d/actor/d_a_npc_bans.h b/include/d/actor/d_a_npc_bans.h index b09143caa7..0da1a71b92 100644 --- a/include/d/actor/d_a_npc_bans.h +++ b/include/d/actor/d_a_npc_bans.h @@ -22,7 +22,7 @@ class daNpc_Bans_Param_c { public: virtual ~daNpc_Bans_Param_c() {} - static daNpc_Bans_HIOParam const m; + static DUSK_GAME_DATA daNpc_Bans_HIOParam const m; }; #if DEBUG @@ -117,8 +117,8 @@ public: return rv; } - static char DUSK_CONST* DUSK_CONST mCutNameList[4]; - static cutFunc DUSK_CONST mCutList[4]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[4]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[4]; /* 0x0F7C */ mDoExt_McaMorfSO* mpScoopMorf; /* 0x0F80 */ NPC_BANS_HIO_CLASS* mHIO; diff --git a/include/d/actor/d_a_npc_besu.h b/include/d/actor/d_a_npc_besu.h index f0e26e1538..646c4860bd 100644 --- a/include/d/actor/d_a_npc_besu.h +++ b/include/d/actor/d_a_npc_besu.h @@ -15,7 +15,7 @@ class daNpc_Besu_Param_c { public: virtual ~daNpc_Besu_Param_c() {} - static const daNpc_Besu_HIOParam m; + static DUSK_GAME_DATA const daNpc_Besu_HIOParam m; }; #if DEBUG @@ -140,8 +140,8 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } - static char DUSK_CONST* DUSK_CONST mCutNameList[15]; - static cutFunc DUSK_CONST mCutList[15]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[15]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[15]; private: /* 0x0E40 */ mDoExt_McaMorfSO* mpCupModelMorf; diff --git a/include/d/actor/d_a_npc_blue_ns.h b/include/d/actor/d_a_npc_blue_ns.h index 8920bc1be5..8235ad7b25 100644 --- a/include/d/actor/d_a_npc_blue_ns.h +++ b/include/d/actor/d_a_npc_blue_ns.h @@ -14,7 +14,7 @@ class daNpcBlueNS_Param_c { public: virtual ~daNpcBlueNS_Param_c() {} - static const daNpcBlueNS_HIOParam m; + static DUSK_GAME_DATA const daNpcBlueNS_HIOParam m; }; #if DEBUG @@ -124,7 +124,7 @@ public: return var_r30; } - static EventFn DUSK_CONST mEvtSeqList[]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[]; /* 0xB48 */ Z2Creature mSound; /* 0xBD8 */ u8 field_0xBD8[0xBDC - 0xBD8]; diff --git a/include/d/actor/d_a_npc_bou.h b/include/d/actor/d_a_npc_bou.h index 25dd490fd9..d2c1c0ef2f 100644 --- a/include/d/actor/d_a_npc_bou.h +++ b/include/d/actor/d_a_npc_bou.h @@ -16,7 +16,7 @@ struct daNpc_Bou_HIOParam { public: virtual ~daNpc_Bou_Param_c() {} - static const daNpc_Bou_HIOParam m; + static DUSK_GAME_DATA const daNpc_Bou_HIOParam m; }; #if DEBUG @@ -114,8 +114,8 @@ public: virtual int drawDbgInfo(); virtual void changeAnm(int*, int*); - static char DUSK_CONST* DUSK_CONST mCutNameList[9]; - static cutFunc DUSK_CONST mCutList[9]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[9]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[9]; int getFlowNodeNo() { u16 nodeNo = home.angle.x; diff --git a/include/d/actor/d_a_npc_bouS.h b/include/d/actor/d_a_npc_bouS.h index 27eafb48fd..a3431cfec7 100644 --- a/include/d/actor/d_a_npc_bouS.h +++ b/include/d/actor/d_a_npc_bouS.h @@ -29,7 +29,7 @@ class daNpcBouS_Param_c { public: virtual ~daNpcBouS_Param_c() {} - static daNpcBouS_HIOParam const m; + static DUSK_GAME_DATA daNpcBouS_HIOParam const m; }; #if DEBUG @@ -128,7 +128,7 @@ public: mForcibleTalk = 1; } - static eventFunc mEvtSeqList[4]; + static DUSK_GAME_DATA eventFunc mEvtSeqList[4]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_cd.h b/include/d/actor/d_a_npc_cd.h index 3f942a5988..21483c29c1 100644 --- a/include/d/actor/d_a_npc_cd.h +++ b/include/d/actor/d_a_npc_cd.h @@ -25,7 +25,7 @@ public: J3DModelData* getObjMdlDataP(int); virtual ~daNpcCd_c() {} - static dCcD_SrcCyl const m_cylDat; + static DUSK_GAME_DATA dCcD_SrcCyl const m_cylDat; /* 0x56C */ request_of_phase_process_class mPhase1; /* 0x574 */ request_of_phase_process_class mPhase2; @@ -101,7 +101,7 @@ public: STATIC_ASSERT(sizeof(daNpcCd_HIO_c) == 0x29BC); -extern daNpcCd_HIO_c l_Cd_HIO; +DUSK_GAME_EXTERN daNpcCd_HIO_c l_Cd_HIO; inline f32 HIO_atnOfs(int param_1) { s16 rv; if (param_1 < 16) { diff --git a/include/d/actor/d_a_npc_cd2.h b/include/d/actor/d_a_npc_cd2.h index 3d2eaa87c5..d37a09f99e 100644 --- a/include/d/actor/d_a_npc_cd2.h +++ b/include/d/actor/d_a_npc_cd2.h @@ -87,7 +87,7 @@ struct daNpcCd2_HIO_c : public fOpAcm_HIO_entry_c { /* 0x20C4 */ daNpcCd2_HIO_WChild_c field_0x20c4[14]; }; -extern daNpcCd2_HIO_c l_Cd2_HIO; +DUSK_GAME_EXTERN daNpcCd2_HIO_c l_Cd2_HIO; inline s16 Cd2_HIO_atnOfs(int param_1) { s16 rv; @@ -269,7 +269,7 @@ public: J3DAnmTexPattern* getTexAnmP(int); virtual ~daNpcCd2_c() {} - static dCcD_SrcCyl const m_cylDat; + static DUSK_GAME_DATA dCcD_SrcCyl const m_cylDat; /* 0x56C */ request_of_phase_process_class mPhase1; /* 0x574 */ request_of_phase_process_class mPhase2; diff --git a/include/d/actor/d_a_npc_cdn3.h b/include/d/actor/d_a_npc_cdn3.h index 84a98ebd74..f3b920c81c 100644 --- a/include/d/actor/d_a_npc_cdn3.h +++ b/include/d/actor/d_a_npc_cdn3.h @@ -334,52 +334,52 @@ public: actionFunc mExecFn; }; - static const ActionPair ActionTable[8]; - static seqFunc* m_funcTbl[44]; - static seqFunc m_seq00_funcTbl[2]; - static seqFunc m_seq01_funcTbl[2]; - static seqFunc m_seq02_funcTbl[2]; - static seqFunc m_seq03_funcTbl[2]; - static seqFunc m_seq04_funcTbl[2]; - static seqFunc m_seq05_funcTbl[4]; - static seqFunc m_seq06_funcTbl[4]; - static seqFunc m_seq07_funcTbl[2]; - static seqFunc m_seq08_funcTbl[7]; - static seqFunc m_seq09_funcTbl[2]; - static seqFunc m_seq10_funcTbl[2]; - static seqFunc m_seq11_funcTbl[6]; - static seqFunc m_seq12_funcTbl[2]; - static seqFunc m_seq13_funcTbl[6]; - static seqFunc m_seq14_funcTbl[2]; - static seqFunc m_seq15_funcTbl[2]; - static seqFunc m_seq16_funcTbl[7]; - static seqFunc m_seq17_funcTbl[2]; - static seqFunc m_seq18_funcTbl[2]; - static seqFunc m_seq19_funcTbl[7]; - static seqFunc m_seq20_funcTbl[2]; - static seqFunc m_seq21_funcTbl[2]; - static seqFunc m_seq22_funcTbl[4]; - static seqFunc m_seq23_funcTbl[7]; - static seqFunc m_seq24_funcTbl[5]; - static seqFunc m_seq25_funcTbl[7]; - static seqFunc m_seq26_funcTbl[3]; - static seqFunc m_seq27_funcTbl[2]; - static seqFunc m_seq28_funcTbl[3]; - static seqFunc m_seq29_funcTbl[3]; - static seqFunc m_seq30_funcTbl[6]; - static seqFunc m_seq31_funcTbl[6]; - static seqFunc m_seq32_funcTbl[7]; - static seqFunc m_seq33_funcTbl[7]; - static seqFunc m_seq34_funcTbl[9]; - static seqFunc m_seq35_funcTbl[2]; - static seqFunc m_seq36_funcTbl[4]; - static seqFunc m_seq37_funcTbl[2]; - static seqFunc m_seq38_funcTbl[2]; - static seqFunc m_seq39_funcTbl[2]; - static seqFunc m_seq40_funcTbl[3]; - static seqFunc m_seq41_funcTbl[2]; - static seqFunc m_seq42_funcTbl[2]; - static seqFunc m_seq43_funcTbl[3]; + static DUSK_GAME_DATA const ActionPair ActionTable[8]; + static DUSK_GAME_DATA seqFunc* m_funcTbl[44]; + static DUSK_GAME_DATA seqFunc m_seq00_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq01_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq02_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq03_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq04_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq05_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq06_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq07_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq08_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq09_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq10_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq11_funcTbl[6]; + static DUSK_GAME_DATA seqFunc m_seq12_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq13_funcTbl[6]; + static DUSK_GAME_DATA seqFunc m_seq14_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq15_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq16_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq17_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq18_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq19_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq20_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq21_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq22_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq23_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq24_funcTbl[5]; + static DUSK_GAME_DATA seqFunc m_seq25_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq26_funcTbl[3]; + static DUSK_GAME_DATA seqFunc m_seq27_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq28_funcTbl[3]; + static DUSK_GAME_DATA seqFunc m_seq29_funcTbl[3]; + static DUSK_GAME_DATA seqFunc m_seq30_funcTbl[6]; + static DUSK_GAME_DATA seqFunc m_seq31_funcTbl[6]; + static DUSK_GAME_DATA seqFunc m_seq32_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq33_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq34_funcTbl[9]; + static DUSK_GAME_DATA seqFunc m_seq35_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq36_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq37_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq38_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq39_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq40_funcTbl[3]; + static DUSK_GAME_DATA seqFunc m_seq41_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq42_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq43_funcTbl[3]; /* 0xAC8 */ J3DModel* field_0xac8; /* 0xACC */ J3DModel* field_0xacc; diff --git a/include/d/actor/d_a_npc_chat.h b/include/d/actor/d_a_npc_chat.h index a835a4c49d..5bdbee8869 100644 --- a/include/d/actor/d_a_npc_chat.h +++ b/include/d/actor/d_a_npc_chat.h @@ -11,7 +11,7 @@ class daNpcChat_Param_c { public: virtual ~daNpcChat_Param_c() {} - static daNpcChat_HIOParam const m; + static DUSK_GAME_DATA daNpcChat_HIOParam const m; }; #if DEBUG @@ -102,7 +102,7 @@ public: void setFear() { mFear = true; } void setTalkFlag() { mTalkFlag = true; } - static eventFunc DUSK_CONST mEvtSeqList[1]; + static DUSK_GAME_DATA eventFunc DUSK_CONST mEvtSeqList[1]; private: /* 0xB48 */ Z2CreatureCitizen mSound; diff --git a/include/d/actor/d_a_npc_chin.h b/include/d/actor/d_a_npc_chin.h index e4bfdb6a61..1e87de4e9f 100644 --- a/include/d/actor/d_a_npc_chin.h +++ b/include/d/actor/d_a_npc_chin.h @@ -12,7 +12,7 @@ class daNpcChin_Param_c { public: virtual ~daNpcChin_Param_c() {} - static daNpcChin_HIOParam const m; + static DUSK_GAME_DATA daNpcChin_HIOParam const m; }; #if DEBUG @@ -183,7 +183,7 @@ public: inline void ForcibleTalk_Off() { field_0xe06 = 0; } inline u8 getForcibleTalk2() { return field_0xe06; } - static eventFunc mEvtSeqList[8]; + static DUSK_GAME_DATA eventFunc mEvtSeqList[8]; /* 0xB48 */ Z2Creature mSound; /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm; diff --git a/include/d/actor/d_a_npc_clerka.h b/include/d/actor/d_a_npc_clerka.h index 92236edb03..12ef5a3b97 100644 --- a/include/d/actor/d_a_npc_clerka.h +++ b/include/d/actor/d_a_npc_clerka.h @@ -14,7 +14,7 @@ class daNpc_clerkA_Param_c { public: virtual ~daNpc_clerkA_Param_c() {} - static const daNpc_clerkA_HIOParam m; + static DUSK_GAME_DATA const daNpc_clerkA_HIOParam m; }; #if DEBUG @@ -124,8 +124,8 @@ public: u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0x0F7C */ NPC_CLERKA_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_clerkb.h b/include/d/actor/d_a_npc_clerkb.h index 79e13f3a0e..c6c2ef83fb 100644 --- a/include/d/actor/d_a_npc_clerkb.h +++ b/include/d/actor/d_a_npc_clerkb.h @@ -15,7 +15,7 @@ class daNpc_clerkB_Param_c { public: virtual ~daNpc_clerkB_Param_c() {} - static const daNpc_clerkB_HIOParam m; + static DUSK_GAME_DATA const daNpc_clerkB_HIOParam m; }; #if DEBUG @@ -137,8 +137,8 @@ public: u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0x0F7C */ mDoExt_bpkAnm mBpkAnm2; diff --git a/include/d/actor/d_a_npc_clerkt.h b/include/d/actor/d_a_npc_clerkt.h index e21f000c32..6acfb8970f 100644 --- a/include/d/actor/d_a_npc_clerkt.h +++ b/include/d/actor/d_a_npc_clerkt.h @@ -12,7 +12,7 @@ class daNpcClerkt_Param_c { public: virtual ~daNpcClerkt_Param_c() {} - static const daNpcClerkt_HIOParam m; + static DUSK_GAME_DATA const daNpcClerkt_HIOParam m; }; #if DEBUG @@ -125,8 +125,8 @@ public: } } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0x0F7C */ NPC_CLERKT_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_coach.h b/include/d/actor/d_a_npc_coach.h index 3917d6f11c..f50cbd87a5 100644 --- a/include/d/actor/d_a_npc_coach.h +++ b/include/d/actor/d_a_npc_coach.h @@ -295,7 +295,7 @@ public: const daNpcCoach_Attr_c& attr() const { return M_attr; } - static daNpcCoach_Attr_c const M_attr; + static DUSK_GAME_DATA daNpcCoach_Attr_c const M_attr; static u16 const ParticleName[10]; private: /* 0x0568 */ daNpcChHorse_c mChHorse; diff --git a/include/d/actor/d_a_npc_doc.h b/include/d/actor/d_a_npc_doc.h index 7d9c6dabfe..417251e10b 100644 --- a/include/d/actor/d_a_npc_doc.h +++ b/include/d/actor/d_a_npc_doc.h @@ -12,7 +12,7 @@ class daNpc_Doc_Param_c { public: virtual ~daNpc_Doc_Param_c() {} - static const daNpc_Doc_HIOParam m; + static DUSK_GAME_DATA const daNpc_Doc_HIOParam m; }; #if DEBUG @@ -133,8 +133,8 @@ public: return (fopAcM_GetParam(this) & 0xFF00) >> 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_DOC_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_doorboy.h b/include/d/actor/d_a_npc_doorboy.h index 7d6cb47436..31568dd2f6 100644 --- a/include/d/actor/d_a_npc_doorboy.h +++ b/include/d/actor/d_a_npc_doorboy.h @@ -12,7 +12,7 @@ class daNpcDoorBoy_Param_c { public: virtual ~daNpcDoorBoy_Param_c() {} - static daNpcDoorBoy_HIOParam const m; + static DUSK_GAME_DATA daNpcDoorBoy_HIOParam const m; }; #if DEBUG @@ -78,7 +78,7 @@ public: inline int getTimeHour(); inline bool isDummyTalk(); - static EventFn DUSK_CONST mEvtSeqList[1]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[1]; private: /* 0xB48 */ Z2CreatureCitizen mSound; diff --git a/include/d/actor/d_a_npc_drainSol.h b/include/d/actor/d_a_npc_drainSol.h index d61fb243b3..7a197a8a1f 100644 --- a/include/d/actor/d_a_npc_drainSol.h +++ b/include/d/actor/d_a_npc_drainSol.h @@ -11,7 +11,7 @@ class daNpcDrSol_Param_c { public: virtual ~daNpcDrSol_Param_c() {} - static const daNpcDrSol_HIOParam m; + static DUSK_GAME_DATA const daNpcDrSol_HIOParam m; }; #if DEBUG diff --git a/include/d/actor/d_a_npc_fairy.h b/include/d/actor/d_a_npc_fairy.h index d5c1d2fa0e..efa9d760c1 100644 --- a/include/d/actor/d_a_npc_fairy.h +++ b/include/d/actor/d_a_npc_fairy.h @@ -94,7 +94,7 @@ class daNpc_Fairy_Param_c { public: virtual ~daNpc_Fairy_Param_c() {} - static daNpc_Fairy_HIOParam const m; + static DUSK_GAME_DATA daNpc_Fairy_HIOParam const m; }; #if DEBUG @@ -294,8 +294,8 @@ public: u8 getSceneNo1() { return (fopAcM_GetParam(this) >> 8) & 0xFF; } u8 getSceneNo2() { return (fopAcM_GetParam(this) >> 16) & 0xFF; } - static char DUSK_CONST* DUSK_CONST mCutNameList[18]; - static cutFunc DUSK_CONST mCutList[18]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[18]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[18]; private: /* 0x0E40 */ NPC_FAIRY_HIO_CLASS* mHIO; /* 0x0E44 */ dCcD_Cyl mCyl; diff --git a/include/d/actor/d_a_npc_fairy_seirei.h b/include/d/actor/d_a_npc_fairy_seirei.h index 62b3cbcc6c..a0ad9342ed 100644 --- a/include/d/actor/d_a_npc_fairy_seirei.h +++ b/include/d/actor/d_a_npc_fairy_seirei.h @@ -13,7 +13,7 @@ class daNpc_FairySeirei_Param_c { public: virtual ~daNpc_FairySeirei_Param_c() {} - static daNpc_FairySeirei_HIOParam const m; + static DUSK_GAME_DATA daNpc_FairySeirei_HIOParam const m; }; #if DEBUG @@ -90,8 +90,8 @@ public: int getSeneNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; } - static DUSK_CONST char* mCutNameList[1]; - static DUSK_CONST cutFunc mCutList[1]; + static DUSK_GAME_DATA DUSK_CONST char* mCutNameList[1]; + static DUSK_GAME_DATA DUSK_CONST cutFunc mCutList[1]; private: /* 0xE40 */ NPC_FAIRY_SEIREI_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_gnd.h b/include/d/actor/d_a_npc_gnd.h index d76fae5d61..f61d7e0214 100644 --- a/include/d/actor/d_a_npc_gnd.h +++ b/include/d/actor/d_a_npc_gnd.h @@ -11,7 +11,7 @@ class daNpc_Gnd_Param_c { public: virtual ~daNpc_Gnd_Param_c() {} - static const daNpc_Gnd_HIOParam m; + static DUSK_GAME_DATA const daNpc_Gnd_HIOParam m; }; #if DEBUG @@ -96,8 +96,8 @@ public: s32 getNeckJointNo() { return 3; } s32 getBackboneJointNo() { return 1; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_GND_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_gra.h b/include/d/actor/d_a_npc_gra.h index 117aa9ade0..333cf5d299 100644 --- a/include/d/actor/d_a_npc_gra.h +++ b/include/d/actor/d_a_npc_gra.h @@ -21,7 +21,7 @@ class daNpc_grA_Param_c { public: virtual ~daNpc_grA_Param_c() {} - static daNpc_grA_HIOParam const m; + static DUSK_GAME_DATA daNpc_grA_HIOParam const m; }; #if DEBUG @@ -138,9 +138,9 @@ public: void addCarryNum() { field_0x1692++; } u8 getPathNoFromParam() { return home.angle.z; } void setGateWalk() { field_0x14D0 = 1; } - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[12]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[12]; typedef BOOL (daNpc_grA_c::*cut_type)(int); - static cut_type DUSK_CONST mEvtCutList[]; + static DUSK_GAME_DATA cut_type DUSK_CONST mEvtCutList[]; private: typedef BOOL (daNpc_grA_c::*daNpc_grA_c_Action)(void*); diff --git a/include/d/actor/d_a_npc_grc.h b/include/d/actor/d_a_npc_grc.h index 072a4f9fd2..ac7dfa9869 100644 --- a/include/d/actor/d_a_npc_grc.h +++ b/include/d/actor/d_a_npc_grc.h @@ -12,7 +12,7 @@ class daNpc_grC_Param_c { public: virtual ~daNpc_grC_Param_c() {} - static daNpc_grC_HIOParam const m; + static DUSK_GAME_DATA daNpc_grC_HIOParam const m; }; #if DEBUG @@ -89,8 +89,8 @@ public: void setPrtcl(); void adjustShapeAngle() {} - static char DUSK_CONST* DUSK_CONST mEvtCutNameList; - static EventFn DUSK_CONST mEvtCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[1]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_grd.h b/include/d/actor/d_a_npc_grd.h index e8a9e19baf..24871ab24c 100644 --- a/include/d/actor/d_a_npc_grd.h +++ b/include/d/actor/d_a_npc_grd.h @@ -11,7 +11,7 @@ class daNpc_Grd_Param_c { public: virtual ~daNpc_Grd_Param_c() {} - static daNpc_Grd_HIOParam const m; + static DUSK_GAME_DATA daNpc_Grd_HIOParam const m; }; #if DEBUG @@ -81,8 +81,8 @@ public: BOOL ECut_nodToGrz(int); void adjustShapeAngle() {} - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; - static cutFunc DUSK_CONST mEvtCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[2]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_grm.h b/include/d/actor/d_a_npc_grm.h index addd5485be..d7c30ba90f 100644 --- a/include/d/actor/d_a_npc_grm.h +++ b/include/d/actor/d_a_npc_grm.h @@ -12,7 +12,7 @@ class daNpc_grM_Param_c { public: virtual ~daNpc_grM_Param_c() {} - static daNpc_grM_HIOParam const m; + static DUSK_GAME_DATA daNpc_grM_HIOParam const m; }; #if DEBUG @@ -131,8 +131,8 @@ public: BOOL checkChangeJoint(int param_0) { return param_0 == JNT_HEAD; } BOOL checkRemoveJoint(int param_0) { return param_0 == JNT_MOUTH; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0x0F7C */ NPC_GRM_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_grmc.h b/include/d/actor/d_a_npc_grmc.h index 4d1752c266..1761c82869 100644 --- a/include/d/actor/d_a_npc_grmc.h +++ b/include/d/actor/d_a_npc_grmc.h @@ -38,7 +38,7 @@ class daNpc_grMC_Param_c { public: virtual ~daNpc_grMC_Param_c() {} - static daNpc_grMC_HIOParam const m; + static DUSK_GAME_DATA daNpc_grMC_HIOParam const m; }; class daNpc_grMC_c : public dShopSystem_c { @@ -124,8 +124,8 @@ public: BOOL checkRemoveJoint(int param_1) { return param_1 == JNT_MOUTH; } u16 getEyeballMaterialNo() { return 1; }; - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0x0F7C */ NPC_GRMC_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_gro.h b/include/d/actor/d_a_npc_gro.h index 0881270516..b2a5595bd9 100644 --- a/include/d/actor/d_a_npc_gro.h +++ b/include/d/actor/d_a_npc_gro.h @@ -20,7 +20,7 @@ class daNpc_grO_Param_c { public: virtual ~daNpc_grO_Param_c() {} - static daNpc_grO_HIOParam const m; + static DUSK_GAME_DATA daNpc_grO_HIOParam const m; }; #if DEBUG @@ -85,8 +85,8 @@ public: int test(void*); void adjustShapeAngle() {} - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[3]; - static cutFunc DUSK_CONST mEvtCutList[3]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[3]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[3]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_grr.h b/include/d/actor/d_a_npc_grr.h index 280df27a48..6dfa8512bc 100644 --- a/include/d/actor/d_a_npc_grr.h +++ b/include/d/actor/d_a_npc_grr.h @@ -11,7 +11,7 @@ class daNpc_grR_Param_c { public: virtual ~daNpc_grR_Param_c() {} - static daNpc_grR_HIOParam const m; + static DUSK_GAME_DATA daNpc_grR_HIOParam const m; }; #if DEBUG @@ -83,8 +83,8 @@ public: int test(void*); void adjustShapeAngle() {} - static char DUSK_CONST* DUSK_CONST mEvtCutNameList; - static cutFunc DUSK_CONST mEvtCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[1]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_grs.h b/include/d/actor/d_a_npc_grs.h index d08b4ec008..5ec4354dd1 100644 --- a/include/d/actor/d_a_npc_grs.h +++ b/include/d/actor/d_a_npc_grs.h @@ -11,7 +11,7 @@ class daNpc_grS_Param_c { public: virtual ~daNpc_grS_Param_c() {} - static const daNpc_grS_HIOParam m; + static DUSK_GAME_DATA const daNpc_grS_HIOParam m; }; #if DEBUG @@ -84,8 +84,8 @@ public: void setPrtcl(); void adjustShapeAngle() {} - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; - static cutFunc DUSK_CONST mEvtCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[2]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_grz.h b/include/d/actor/d_a_npc_grz.h index 555b1f09e2..f49c878ff7 100644 --- a/include/d/actor/d_a_npc_grz.h +++ b/include/d/actor/d_a_npc_grz.h @@ -28,7 +28,7 @@ class daNpc_Grz_Param_c { public: virtual ~daNpc_Grz_Param_c() {} - static daNpc_Grz_HIOParam const m; + static DUSK_GAME_DATA daNpc_Grz_HIOParam const m; }; #if DEBUG @@ -116,8 +116,8 @@ public: u8 getPathNoFromParam() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[7]; - static cutFunc DUSK_CONST mEvtCutList[7]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[7]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[7]; private: /* 0x0B48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_guard.h b/include/d/actor/d_a_npc_guard.h index bae98e223c..bceab108e5 100644 --- a/include/d/actor/d_a_npc_guard.h +++ b/include/d/actor/d_a_npc_guard.h @@ -60,7 +60,7 @@ public: u32 getPathID() { return fopAcM_GetParam(this) >> 0x10 & 0xFF; } - static actionFunc ActionTable[7][2]; + static DUSK_GAME_DATA actionFunc ActionTable[7][2]; private: /* 0xAC8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_npc_gwolf.h b/include/d/actor/d_a_npc_gwolf.h index e9c37a38bb..bd577e18e7 100644 --- a/include/d/actor/d_a_npc_gwolf.h +++ b/include/d/actor/d_a_npc_gwolf.h @@ -19,7 +19,7 @@ class daNpc_GWolf_Param_c { public: virtual ~daNpc_GWolf_Param_c() {} - static daNpc_GWolf_HIOParam const m; + static DUSK_GAME_DATA daNpc_GWolf_HIOParam const m; }; #if DEBUG @@ -104,8 +104,8 @@ public: void setHowlingEndFlag() { field_0xe1c = 2; } void setHowlingFlag() { field_0xe1c = 1; } - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[5]; - static cutFunc DUSK_CONST mEvtCutList[5]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[5]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[5]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_hanjo.h b/include/d/actor/d_a_npc_hanjo.h index 6e912cb638..e9daf3bb0e 100644 --- a/include/d/actor/d_a_npc_hanjo.h +++ b/include/d/actor/d_a_npc_hanjo.h @@ -23,7 +23,7 @@ class daNpc_Hanjo_Param_c { public: virtual ~daNpc_Hanjo_Param_c() {} - static const daNpc_Hanjo_HIOParam m; + static DUSK_GAME_DATA const daNpc_Hanjo_HIOParam m; }; #if DEBUG @@ -217,10 +217,10 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } - static dCcD_SrcGObjInf const mStoneCcDObjInfo; - static char DUSK_CONST* DUSK_CONST mCutNameList[6]; - static cutFunc DUSK_CONST mCutList[6]; - static dCcD_SrcSph DUSK_CONST mStoneCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mStoneCcDObjInfo; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[6]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[6]; + static DUSK_GAME_DATA dCcD_SrcSph DUSK_CONST mStoneCcDSph; private: /* 0x0E40 */ NPC_HANJO_HIO_CLASS* mpHIO; /* 0x0E44 */ J3DModel* mModel1; diff --git a/include/d/actor/d_a_npc_hoz.h b/include/d/actor/d_a_npc_hoz.h index 72ec648696..aec84cf761 100644 --- a/include/d/actor/d_a_npc_hoz.h +++ b/include/d/actor/d_a_npc_hoz.h @@ -13,7 +13,7 @@ class daNpc_Hoz_Param_c { public: virtual ~daNpc_Hoz_Param_c() {} - static const daNpc_Hoz_HIOParam m; + static DUSK_GAME_DATA const daNpc_Hoz_HIOParam m; }; #if DEBUG @@ -125,8 +125,8 @@ public: bool getGameStartFlag() { return mGameStartFlag; } void setPotBreakFlag() { mPotBreakFlag = true; } - static char DUSK_CONST* DUSK_CONST mCutNameList[8]; - static cutFunc DUSK_CONST mCutList[]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[8]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[]; private: /* 0xE40 */ NPC_HOZ_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_impal.h b/include/d/actor/d_a_npc_impal.h index 7b8234717a..f0102ab698 100644 --- a/include/d/actor/d_a_npc_impal.h +++ b/include/d/actor/d_a_npc_impal.h @@ -12,7 +12,7 @@ class daNpcImpal_Param_c { public: virtual ~daNpcImpal_Param_c() {} - static const daNpcImpal_HIOParam m; + static DUSK_GAME_DATA const daNpcImpal_HIOParam m; }; #if DEBUG @@ -121,7 +121,7 @@ public: inline void setLookMode(int i_lookMode); inline void deleteObstacle(); - static EventFn mEvtSeqList[4]; + static DUSK_GAME_DATA EventFn mEvtSeqList[4]; private: /* 0xB48 */ Z2Creature mCreatureSound; diff --git a/include/d/actor/d_a_npc_ins.h b/include/d/actor/d_a_npc_ins.h index 3f8b40a9a0..620358a297 100644 --- a/include/d/actor/d_a_npc_ins.h +++ b/include/d/actor/d_a_npc_ins.h @@ -12,7 +12,7 @@ class daNpcIns_Param_c { public: virtual ~daNpcIns_Param_c() {} - static daNpcIns_HIOParam const m; + static DUSK_GAME_DATA daNpcIns_HIOParam const m; }; #if DEBUG @@ -119,7 +119,7 @@ public: inline void playExpression(); BOOL chkAction(actionFunc action) { return action == mAction; } - static eventFunc mEvtSeqList[1]; + static DUSK_GAME_DATA eventFunc mEvtSeqList[1]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 3c4a4ac723..13147762dd 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -25,7 +25,7 @@ class daNpc_Jagar_Param_c { public: virtual ~daNpc_Jagar_Param_c() {} - static const daNpc_Jagar_HIOParam m; + static DUSK_GAME_DATA const daNpc_Jagar_HIOParam m; }; #if DEBUG @@ -223,8 +223,8 @@ public: return 0; } - static char DUSK_CONST* DUSK_CONST mCutNameList[7]; - static cutFunc DUSK_CONST mCutList[7]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[7]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7]; private: /* 0x0E40 */ NPC_JAGAR_HIO_CLASS* mpHIO; /* 0x0E44 */ dCcD_Cyl mCyl1; diff --git a/include/d/actor/d_a_npc_kakashi.h b/include/d/actor/d_a_npc_kakashi.h index 7a5cca61f3..c3f57b383a 100644 --- a/include/d/actor/d_a_npc_kakashi.h +++ b/include/d/actor/d_a_npc_kakashi.h @@ -14,7 +14,7 @@ class daNpc_Kakashi_Param_c { public: virtual ~daNpc_Kakashi_Param_c() {} - static const daNpc_Kakashi_HIOParam m; + static DUSK_GAME_DATA const daNpc_Kakashi_HIOParam m; }; #if DEBUG @@ -113,8 +113,8 @@ public: u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } u8 getBitSW2() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; } - static char DUSK_CONST* DUSK_CONST mCutNameList[4]; - static int (daNpc_Kakashi_c::* DUSK_CONST mCutList[])(int); + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[4]; + static DUSK_GAME_DATA int (daNpc_Kakashi_c::* DUSK_CONST mCutList[])(int); private: /* 0x0E40 */ NPC_KAKASHI_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_kasi_hana.h b/include/d/actor/d_a_npc_kasi_hana.h index e355ed8c55..625cb31845 100644 --- a/include/d/actor/d_a_npc_kasi_hana.h +++ b/include/d/actor/d_a_npc_kasi_hana.h @@ -25,7 +25,7 @@ class daNpcKasiHana_Param_c { public: virtual ~daNpcKasiHana_Param_c() {} - static daNpcKasiHana_HIOParam const m; + static DUSK_GAME_DATA daNpcKasiHana_HIOParam const m; }; #if DEBUG @@ -201,10 +201,10 @@ public: BOOL pl_front_check() { return actor_front_check(daPy_getPlayerActorClass()); } void setEscapePathDir() { if (pl_front_check()) mPath.reverse(); } - static EventFn mEvtSeqList[6]; - static daTagEscape_c* mTargetTag; - static f32 mTargetTagDist; - static s16 mWolfAngle; + static DUSK_GAME_DATA EventFn mEvtSeqList[6]; + static DUSK_GAME_DATA daTagEscape_c* mTargetTag; + static DUSK_GAME_DATA f32 mTargetTagDist; + static DUSK_GAME_DATA s16 mWolfAngle; private: /* 0x0B48 */ Z2CreatureCitizen mSound; diff --git a/include/d/actor/d_a_npc_kasi_kyu.h b/include/d/actor/d_a_npc_kasi_kyu.h index 8353648675..962a2e04cc 100644 --- a/include/d/actor/d_a_npc_kasi_kyu.h +++ b/include/d/actor/d_a_npc_kasi_kyu.h @@ -14,7 +14,7 @@ class daNpcKasiKyu_Param_c { public: virtual ~daNpcKasiKyu_Param_c() {} - static daNpcKasiKyu_HIOParam const m; + static DUSK_GAME_DATA daNpcKasiKyu_HIOParam const m; }; #if DEBUG @@ -120,10 +120,10 @@ public: void chgWeightLight() { mCcStts.SetWeight(0xD8); } BOOL pl_front_check() { return actor_front_check(daPy_getPlayerActorClass()); } - static EventFn DUSK_CONST mEvtSeqList[1]; - static daTagEscape_c* mTargetTag; - static f32 mTargetTagDist; - static s16 mWolfAngle; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[1]; + static DUSK_GAME_DATA daTagEscape_c* mTargetTag; + static DUSK_GAME_DATA f32 mTargetTagDist; + static DUSK_GAME_DATA s16 mWolfAngle; private: /* 0x0B48 */ Z2CreatureCitizen mSound; diff --git a/include/d/actor/d_a_npc_kasi_mich.h b/include/d/actor/d_a_npc_kasi_mich.h index 460c5c191a..efa1a221c6 100644 --- a/include/d/actor/d_a_npc_kasi_mich.h +++ b/include/d/actor/d_a_npc_kasi_mich.h @@ -23,7 +23,7 @@ class daNpcKasiMich_Param_c { public: virtual ~daNpcKasiMich_Param_c() {} - static daNpcKasiMich_HIOParam const m; + static DUSK_GAME_DATA daNpcKasiMich_HIOParam const m; }; #if DEBUG @@ -121,10 +121,10 @@ public: void chgWeightLight() { mCcStts.SetWeight(0xD8); } BOOL pl_front_check() { return actor_front_check(daPy_getPlayerActorClass()); } - static EventFn DUSK_CONST mEvtSeqList[1]; - static daTagEscape_c* mTargetTag; - static f32 mTargetTagDist; - static s16 mWolfAngle; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[1]; + static DUSK_GAME_DATA daTagEscape_c* mTargetTag; + static DUSK_GAME_DATA f32 mTargetTagDist; + static DUSK_GAME_DATA s16 mWolfAngle; private: /* 0x0B48 */ Z2CreatureCitizen mSound; diff --git a/include/d/actor/d_a_npc_kkri.h b/include/d/actor/d_a_npc_kkri.h index a5e74880a9..c6e173480d 100644 --- a/include/d/actor/d_a_npc_kkri.h +++ b/include/d/actor/d_a_npc_kkri.h @@ -11,7 +11,7 @@ class daNpc_Kkri_Param_c { public: virtual ~daNpc_Kkri_Param_c() {} - static const daNpc_Kkri_HIOParam m; + static DUSK_GAME_DATA const daNpc_Kkri_HIOParam m; }; #if DEBUG @@ -118,8 +118,8 @@ public: return mpMorf[0]->getModel()->getAnmMtx(5); } - static char DUSK_CONST* DUSK_CONST mCutNameList[3]; - static int (daNpc_Kkri_c::* DUSK_CONST mCutList[])(int); + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[3]; + static DUSK_GAME_DATA int (daNpc_Kkri_c::* DUSK_CONST mCutList[])(int); private: /* 0xE40 */ NPC_KKRI_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_kn.h b/include/d/actor/d_a_npc_kn.h index 37b248fbe5..9e1794db97 100644 --- a/include/d/actor/d_a_npc_kn.h +++ b/include/d/actor/d_a_npc_kn.h @@ -25,7 +25,7 @@ class daNpc_Kn_Param_c { public: virtual ~daNpc_Kn_Param_c() {} - static const daNpc_Kn_HIOParam m; + static DUSK_GAME_DATA const daNpc_Kn_HIOParam m; }; #if DEBUG @@ -412,14 +412,14 @@ public: virtual ~daNpc_Kn_c(); virtual bool afterSetMotionAnm(int, int, f32, int); - static const dCcD_SrcGObjInf mCcDObjData; - static char DUSK_CONST* DUSK_CONST mCutNameList[21]; - static cutFunc DUSK_CONST mCutList[21]; - static dCcD_SrcCyl mCcDCyl; - static dCcD_SrcSph mCcDSph; - static s16 mSrchName; - static fopAc_ac_c* mFindActorPtrs[50]; - static int mFindCount; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjData; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[21]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[21]; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA s16 mSrchName; + static DUSK_GAME_DATA fopAc_ac_c* mFindActorPtrs[50]; + static DUSK_GAME_DATA int mFindCount; private: /* 0x0E44 */ J3DModel* mpPodModel; diff --git a/include/d/actor/d_a_npc_knj.h b/include/d/actor/d_a_npc_knj.h index 8aa5ff860a..f8db1cdedb 100644 --- a/include/d/actor/d_a_npc_knj.h +++ b/include/d/actor/d_a_npc_knj.h @@ -11,7 +11,7 @@ class daNpc_Knj_Param_c { public: virtual ~daNpc_Knj_Param_c() {} - static const daNpc_Knj_HIOParam m; + static DUSK_GAME_DATA const daNpc_Knj_HIOParam m; }; #if DEBUG @@ -80,8 +80,8 @@ public: i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData, i_arcNames) {} - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_KNJ_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_kolin.h b/include/d/actor/d_a_npc_kolin.h index 819eb81078..28f455be35 100644 --- a/include/d/actor/d_a_npc_kolin.h +++ b/include/d/actor/d_a_npc_kolin.h @@ -18,7 +18,7 @@ class daNpc_Kolin_Param_c { public: virtual ~daNpc_Kolin_Param_c() {} - static daNpc_Kolin_HIOParam const m; + static DUSK_GAME_DATA daNpc_Kolin_HIOParam const m; }; #if DEBUG @@ -120,8 +120,8 @@ public: virtual void changeAnm(int*, int*); virtual void changeBck(int*, int*); - static char DUSK_CONST* DUSK_CONST mCutNameList[11]; - static cutFunc DUSK_CONST mCutList[11]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[11]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[11]; u32 getFlowNodeNo() { u16 nodeNo = home.angle.x; diff --git a/include/d/actor/d_a_npc_kolinb.h b/include/d/actor/d_a_npc_kolinb.h index b3858a908e..bf4392a697 100644 --- a/include/d/actor/d_a_npc_kolinb.h +++ b/include/d/actor/d_a_npc_kolinb.h @@ -12,7 +12,7 @@ class daNpc_Kolinb_Param_c { public: virtual ~daNpc_Kolinb_Param_c() {} - static daNpc_Kolinb_HIOParam const m; + static DUSK_GAME_DATA daNpc_Kolinb_HIOParam const m; }; #if DEBUG @@ -150,8 +150,8 @@ public: s32 getBackboneJointNo() { return mType == 2 ? ZRCB_JNT_BACKBONE1 : KOLINB_JNT_BACKBONE1; } s32 getNeckJointNo() { return mType == 2 ? ZRCB_JNT_NECK : KOLINB_JNT_NECK; } - static char DUSK_CONST* DUSK_CONST mCutNameList[7]; - static cutFunc DUSK_CONST mCutList[7]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[7]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7]; u32 getFlowNodeNo() { u16 nodeNo = home.angle.x; diff --git a/include/d/actor/d_a_npc_kyury.h b/include/d/actor/d_a_npc_kyury.h index 62ba0433cf..8469dd3528 100644 --- a/include/d/actor/d_a_npc_kyury.h +++ b/include/d/actor/d_a_npc_kyury.h @@ -11,7 +11,7 @@ class daNpc_Kyury_Param_c { public: virtual ~daNpc_Kyury_Param_c() {} - static const daNpc_Kyury_HIOParam m; + static DUSK_GAME_DATA const daNpc_Kyury_HIOParam m; }; #if DEBUG @@ -123,8 +123,8 @@ public: return nodeNo; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0xE40 */ NPC_KYURY_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_len.h b/include/d/actor/d_a_npc_len.h index da5a0e0777..13b959c3b7 100644 --- a/include/d/actor/d_a_npc_len.h +++ b/include/d/actor/d_a_npc_len.h @@ -14,7 +14,7 @@ class daNpc_Len_Param_c { public: virtual ~daNpc_Len_Param_c() {} - static const daNpc_Len_HIOParam m; + static DUSK_GAME_DATA const daNpc_Len_HIOParam m; }; #if DEBUG @@ -100,8 +100,8 @@ public: s32 getFootRJointNo() { return 32; } BOOL chkXYItems() { return TRUE; } - static char DUSK_CONST* DUSK_CONST mCutNameList[4]; - static cutFunc DUSK_CONST mCutList[4]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[4]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[4]; int getFlowNodeNo() { u16 nodeNo = home.angle.x; diff --git a/include/d/actor/d_a_npc_lud.h b/include/d/actor/d_a_npc_lud.h index b84e6aafac..afecfdc0c7 100644 --- a/include/d/actor/d_a_npc_lud.h +++ b/include/d/actor/d_a_npc_lud.h @@ -12,7 +12,7 @@ class daNpc_Lud_Param_c { public: virtual ~daNpc_Lud_Param_c() {} - static const daNpc_Lud_HIOParam m; + static DUSK_GAME_DATA const daNpc_Lud_HIOParam m; }; #if DEBUG @@ -111,8 +111,8 @@ public: } u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } - static char DUSK_CONST* DUSK_CONST mCutNameList[8]; - static cutFunc DUSK_CONST mCutList[8]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[8]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[8]; private: /* 0xE40 */ mDoExt_McaMorfSO* mpBowlMorf; diff --git a/include/d/actor/d_a_npc_maro.h b/include/d/actor/d_a_npc_maro.h index b8ec85b9fb..1c51a63b44 100644 --- a/include/d/actor/d_a_npc_maro.h +++ b/include/d/actor/d_a_npc_maro.h @@ -14,7 +14,7 @@ class daNpc_Maro_Param_c { public: virtual ~daNpc_Maro_Param_c() {} - static const daNpc_Maro_HIOParam m; + static DUSK_GAME_DATA const daNpc_Maro_HIOParam m; }; #if DEBUG @@ -167,8 +167,8 @@ public: void startChoccai() { field_0x1134 = 1; } void endChoccai() { field_0x1134 = 0; } - static char DUSK_CONST* DUSK_CONST mCutNameList[17]; - static cutFunc DUSK_CONST mCutList[17]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[17]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[17]; u8 getGroupId() { return (fopAcM_GetParam(this) & 0xF0000000) >> 28; diff --git a/include/d/actor/d_a_npc_midp.h b/include/d/actor/d_a_npc_midp.h index 810f9eca45..60efbbac80 100644 --- a/include/d/actor/d_a_npc_midp.h +++ b/include/d/actor/d_a_npc_midp.h @@ -20,7 +20,7 @@ class daNpc_midP_Param_c { public: virtual ~daNpc_midP_Param_c() {} - static const daNpc_midP_HIOParam m; + static DUSK_GAME_DATA const daNpc_midP_HIOParam m; }; #if DEBUG @@ -148,8 +148,8 @@ public: return nodeNo; } - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_MIDP_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_moi.h b/include/d/actor/d_a_npc_moi.h index eb00654fd9..547c3a1dcd 100644 --- a/include/d/actor/d_a_npc_moi.h +++ b/include/d/actor/d_a_npc_moi.h @@ -26,7 +26,7 @@ class daNpc_Moi_Param_c { public: virtual ~daNpc_Moi_Param_c() {} - static const daNpc_Moi_HIOParam m; + static DUSK_GAME_DATA const daNpc_Moi_HIOParam m; }; #if DEBUG @@ -158,8 +158,8 @@ public: bool chkSFight() { return field_0x166b == 1; } u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[5]; - static cutFunc DUSK_CONST mCutList[5]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[5]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[5]; private: /* 0x0E40 */ NPC_MOI_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_moir.h b/include/d/actor/d_a_npc_moir.h index 0cc8be336a..f9aa841a60 100644 --- a/include/d/actor/d_a_npc_moir.h +++ b/include/d/actor/d_a_npc_moir.h @@ -23,7 +23,7 @@ class daNpcMoiR_Param_c { public: virtual ~daNpcMoiR_Param_c() {} - static daNpcMoiR_HIOParam const m; + static DUSK_GAME_DATA daNpcMoiR_HIOParam const m; }; #if DEBUG @@ -212,7 +212,7 @@ public: inline void setLookMode(int i_lookMode); inline void searchActors(); - static EventFn mEvtSeqList[4]; + static DUSK_GAME_DATA EventFn mEvtSeqList[4]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_myna2.h b/include/d/actor/d_a_npc_myna2.h index 4cb0356832..e2172eb4cd 100644 --- a/include/d/actor/d_a_npc_myna2.h +++ b/include/d/actor/d_a_npc_myna2.h @@ -13,7 +13,7 @@ class daNpc_myna2_Param_c { public: virtual ~daNpc_myna2_Param_c() {} - static const daNpc_myna2_HIOParam m; + static DUSK_GAME_DATA const daNpc_myna2_HIOParam m; }; #if DEBUG @@ -87,8 +87,8 @@ public: int getType() { return mType; } - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[5]; - static EventFn DUSK_CONST mEvtCutList[]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[5]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[]; /* 0xB48 */ u8 field_0xB48[0xB4C - 0xB48]; /* 0xB4C */ daNpcF_Lookat_c mLookat; diff --git a/include/d/actor/d_a_npc_pachi_besu.h b/include/d/actor/d_a_npc_pachi_besu.h index be623faf38..7fa17d8b2d 100644 --- a/include/d/actor/d_a_npc_pachi_besu.h +++ b/include/d/actor/d_a_npc_pachi_besu.h @@ -11,7 +11,7 @@ class daNpc_Pachi_Besu_Param_c { public: virtual ~daNpc_Pachi_Besu_Param_c() {} - static daNpc_Pachi_Besu_HIOParam const m; + static DUSK_GAME_DATA daNpc_Pachi_Besu_HIOParam const m; }; #if DEBUG @@ -144,8 +144,8 @@ public: void setTagPos(cXyz const& i_pos) { mTagPos = i_pos; } void setLookPos(cXyz const& i_pos) { mLookPos = i_pos; } - static char DUSK_CONST* DUSK_CONST mCutNameList[11]; - static cutFunc DUSK_CONST mCutList[11]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[11]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[11]; private: /* 0xE40 */ NPC_PACHI_BESU_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_pachi_maro.h b/include/d/actor/d_a_npc_pachi_maro.h index ffb33d1fbc..379c2c204b 100644 --- a/include/d/actor/d_a_npc_pachi_maro.h +++ b/include/d/actor/d_a_npc_pachi_maro.h @@ -21,7 +21,7 @@ class daNpc_Pachi_Maro_Param_c { public: virtual ~daNpc_Pachi_Maro_Param_c() {} - static daNpc_Pachi_Maro_HIOParam const m; + static DUSK_GAME_DATA daNpc_Pachi_Maro_HIOParam const m; }; #if DEBUG @@ -184,8 +184,8 @@ public: void setFMotion_Niramu_to_Besu() { mFMotion = 1; } void setFMotion_LookNone() { mFMotion = 2; } - static char DUSK_CONST* DUSK_CONST mCutNameList[11]; - static cutFunc DUSK_CONST mCutList[11]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[11]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[11]; private: /* 0xE40 */ NPC_PACHI_MARO_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_pachi_taro.h b/include/d/actor/d_a_npc_pachi_taro.h index 9faee13c23..12de6aedf4 100644 --- a/include/d/actor/d_a_npc_pachi_taro.h +++ b/include/d/actor/d_a_npc_pachi_taro.h @@ -20,7 +20,7 @@ class daNpc_Pachi_Taro_Param_c { public: virtual ~daNpc_Pachi_Taro_Param_c() {} - static daNpc_Pachi_Taro_HIOParam const m; + static DUSK_GAME_DATA daNpc_Pachi_Taro_HIOParam const m; }; #if DEBUG @@ -196,8 +196,8 @@ public: void setTagPos(cXyz const& i_pos) { mTagPos = i_pos; } void setLookPos(cXyz const& i_pos) { mLookPos = i_pos; } - static char DUSK_CONST* DUSK_CONST mCutNameList[11]; - static cutFunc DUSK_CONST mCutList[11]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[11]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[11]; private: /* 0x0E40 */ NPC_PACHI_TARO_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_passer.h b/include/d/actor/d_a_npc_passer.h index f6c05ae7a5..d2f6f0b764 100644 --- a/include/d/actor/d_a_npc_passer.h +++ b/include/d/actor/d_a_npc_passer.h @@ -92,36 +92,36 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) >> 16) & 0xFF; } BOOL isStop() { return TRUE; } - static actionFunc ActionTable[5][2]; - static seqFunc* m_funcTbl[28]; - static seqFunc m_seq00_funcTbl[2]; - static seqFunc m_seq01_funcTbl[2]; - static seqFunc m_seq02_funcTbl[2]; - static seqFunc m_seq03_funcTbl[2]; - static seqFunc m_seq04_funcTbl[2]; - static seqFunc m_seq05_funcTbl[4]; - static seqFunc m_seq06_funcTbl[4]; - static seqFunc m_seq07_funcTbl[2]; - static seqFunc m_seq08_funcTbl[7]; - static seqFunc m_seq09_funcTbl[2]; - static seqFunc m_seq10_funcTbl[2]; - static seqFunc m_seq11_funcTbl[6]; - static seqFunc m_seq12_funcTbl[2]; - static seqFunc m_seq13_funcTbl[6]; - static seqFunc m_seq14_funcTbl[2]; - static seqFunc m_seq15_funcTbl[2]; - static seqFunc m_seq16_funcTbl[7]; - static seqFunc m_seq17_funcTbl[2]; - static seqFunc m_seq18_funcTbl[2]; - static seqFunc m_seq19_funcTbl[7]; - static seqFunc m_seq20_funcTbl[2]; - static seqFunc m_seq21_funcTbl[2]; - static seqFunc m_seq22_funcTbl[4]; - static seqFunc m_seq23_funcTbl[7]; - static seqFunc m_seq24_funcTbl[5]; - static seqFunc m_seq25_funcTbl[7]; - static seqFunc m_seq26_funcTbl[3]; - static seqFunc m_seq27_funcTbl[1]; + static DUSK_GAME_DATA actionFunc ActionTable[5][2]; + static DUSK_GAME_DATA seqFunc* m_funcTbl[28]; + static DUSK_GAME_DATA seqFunc m_seq00_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq01_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq02_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq03_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq04_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq05_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq06_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq07_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq08_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq09_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq10_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq11_funcTbl[6]; + static DUSK_GAME_DATA seqFunc m_seq12_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq13_funcTbl[6]; + static DUSK_GAME_DATA seqFunc m_seq14_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq15_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq16_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq17_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq18_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq19_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq20_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq21_funcTbl[2]; + static DUSK_GAME_DATA seqFunc m_seq22_funcTbl[4]; + static DUSK_GAME_DATA seqFunc m_seq23_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq24_funcTbl[5]; + static DUSK_GAME_DATA seqFunc m_seq25_funcTbl[7]; + static DUSK_GAME_DATA seqFunc m_seq26_funcTbl[3]; + static DUSK_GAME_DATA seqFunc m_seq27_funcTbl[1]; private: /* 0xAC8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_npc_passer2.h b/include/d/actor/d_a_npc_passer2.h index 529b99fc35..792bbfd329 100644 --- a/include/d/actor/d_a_npc_passer2.h +++ b/include/d/actor/d_a_npc_passer2.h @@ -51,7 +51,7 @@ public: u8 getRunMotionType() { return fopAcM_GetParam(this) >> 30; } u8 getPathID() { return (fopAcM_GetParam(this) >> 16) & 0xFF; } - static actionFunc ActionTable[1][2]; + static DUSK_GAME_DATA actionFunc ActionTable[1][2]; private: /* 0x9EC */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_npc_post.h b/include/d/actor/d_a_npc_post.h index 5450dbfe68..7b31506513 100644 --- a/include/d/actor/d_a_npc_post.h +++ b/include/d/actor/d_a_npc_post.h @@ -22,7 +22,7 @@ class daNpc_Post_Param_c { public: virtual ~daNpc_Post_Param_c() {} - static daNpc_Post_HIOParam const m; + static DUSK_GAME_DATA daNpc_Post_HIOParam const m; }; #if DEBUG @@ -153,8 +153,8 @@ public: u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0x0E40 */ mDoExt_McaMorfSO* mpFlagModelMorf; diff --git a/include/d/actor/d_a_npc_pouya.h b/include/d/actor/d_a_npc_pouya.h index c94f777d87..c30b0e0199 100644 --- a/include/d/actor/d_a_npc_pouya.h +++ b/include/d/actor/d_a_npc_pouya.h @@ -11,7 +11,7 @@ class daNpc_Pouya_Param_c { public: virtual ~daNpc_Pouya_Param_c() {} - static const daNpc_Pouya_HIOParam m; + static DUSK_GAME_DATA const daNpc_Pouya_HIOParam m; }; #if DEBUG @@ -146,8 +146,8 @@ public: MtxP getHeadMtx() { return mpMorf[0]->getModel()->getAnmMtx(4); } - static char DUSK_CONST* DUSK_CONST mCutNameList[3]; - static cutFunc DUSK_CONST mCutList[3]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[3]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[3]; private: /* 0xE40 */ NPC_POUYA_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_prayer.h b/include/d/actor/d_a_npc_prayer.h index fd1afa2ddf..bc2735a43f 100644 --- a/include/d/actor/d_a_npc_prayer.h +++ b/include/d/actor/d_a_npc_prayer.h @@ -11,7 +11,7 @@ class daNpcPray_Param_c { public: virtual ~daNpcPray_Param_c() {} - static const daNpcPray_HIOParam m; + static DUSK_GAME_DATA const daNpcPray_HIOParam m; }; #if DEBUG @@ -77,7 +77,7 @@ public: s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF; } - static EvtSeq DUSK_CONST mEvtSeqList[]; + static DUSK_GAME_DATA EvtSeq DUSK_CONST mEvtSeqList[]; private: /* 0xB48 */ Z2CreatureCitizen mSound; diff --git a/include/d/actor/d_a_npc_raca.h b/include/d/actor/d_a_npc_raca.h index 985f370dbb..9cd1849880 100644 --- a/include/d/actor/d_a_npc_raca.h +++ b/include/d/actor/d_a_npc_raca.h @@ -20,7 +20,7 @@ class daNpc_Raca_Param_c { public: virtual ~daNpc_Raca_Param_c() {} - static daNpc_Raca_HIOParam const m; + static DUSK_GAME_DATA daNpc_Raca_HIOParam const m; }; #if DEBUG @@ -145,8 +145,8 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; } - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_RACA_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_rafrel.h b/include/d/actor/d_a_npc_rafrel.h index ae804cf15a..3b3ac191bd 100644 --- a/include/d/actor/d_a_npc_rafrel.h +++ b/include/d/actor/d_a_npc_rafrel.h @@ -22,7 +22,7 @@ class daNpcRafrel_Param_c { public: virtual ~daNpcRafrel_Param_c() {} - static const daNpcRafrel_HIOParam m; + static DUSK_GAME_DATA const daNpcRafrel_HIOParam m; }; class daNpcRafrel_HIO_c : public mDoHIO_entry_c { @@ -105,7 +105,7 @@ public: s16 getMessageNo() { return (fopAcM_GetParam(this) >> 8) & 0xFFFF; } - static int (daNpcRafrel_c::*mEvtSeqList[])(int); + static DUSK_GAME_DATA int (daNpcRafrel_c::*mEvtSeqList[])(int); private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_saru.h b/include/d/actor/d_a_npc_saru.h index 05535786fe..7f04c509e2 100644 --- a/include/d/actor/d_a_npc_saru.h +++ b/include/d/actor/d_a_npc_saru.h @@ -21,7 +21,7 @@ class daNpc_Saru_Param_c { public: virtual ~daNpc_Saru_Param_c() {} - static const daNpc_Saru_HIOParam m; + static DUSK_GAME_DATA const daNpc_Saru_HIOParam m; }; #if DEBUG @@ -133,8 +133,8 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[4]; - static cutFunc DUSK_CONST mCutList[4]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[4]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[4]; private: /* 0xE40 */ NPC_SARU_HIO_CLASS* mpHIO; /* 0xE44 */ J3DModel* mpRoseModels[2]; diff --git a/include/d/actor/d_a_npc_seib.h b/include/d/actor/d_a_npc_seib.h index b7af300cee..f2d0e04820 100644 --- a/include/d/actor/d_a_npc_seib.h +++ b/include/d/actor/d_a_npc_seib.h @@ -13,7 +13,7 @@ class daNpc_seiB_Param_c { public: virtual ~daNpc_seiB_Param_c() {}; - static const daNpc_seiB_HIOParam m; + static DUSK_GAME_DATA const daNpc_seiB_HIOParam m; }; #if DEBUG @@ -84,8 +84,8 @@ public: daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {} - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_SEIB_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_seic.h b/include/d/actor/d_a_npc_seic.h index bbdaf19431..526331f05e 100644 --- a/include/d/actor/d_a_npc_seic.h +++ b/include/d/actor/d_a_npc_seic.h @@ -22,7 +22,7 @@ class daNpc_seiC_Param_c { public: virtual ~daNpc_seiC_Param_c() {} - static const daNpc_seiC_HIOParam m; + static DUSK_GAME_DATA const daNpc_seiC_HIOParam m; }; #if DEBUG @@ -87,8 +87,8 @@ public: i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData, i_arcNames) {}; - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_SEIC_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_seid.h b/include/d/actor/d_a_npc_seid.h index f83d8a2909..37cc6302d6 100644 --- a/include/d/actor/d_a_npc_seid.h +++ b/include/d/actor/d_a_npc_seid.h @@ -22,7 +22,7 @@ class daNpc_seiD_Param_c { public: virtual ~daNpc_seiD_Param_c() {} - static const daNpc_seiD_HIOParam m; + static DUSK_GAME_DATA const daNpc_seiD_HIOParam m; }; #if DEBUG @@ -86,8 +86,8 @@ public: i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData, i_arcNames) {}; - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_SEID_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_seira.h b/include/d/actor/d_a_npc_seira.h index 0528dd5c01..d750c70711 100644 --- a/include/d/actor/d_a_npc_seira.h +++ b/include/d/actor/d_a_npc_seira.h @@ -12,7 +12,7 @@ class daNpc_Seira_Param_c { public: virtual ~daNpc_Seira_Param_c() {} - static const daNpc_Seira_HIOParam m; + static DUSK_GAME_DATA const daNpc_Seira_HIOParam m; }; #if DEBUG @@ -114,8 +114,8 @@ public: BOOL checkChangeJoint(int val) { return val == 4; } BOOL checkRemoveJoint(int val) { return val == 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0x0F7C */ mDoExt_McaMorfSO* mpSeiraMorf; diff --git a/include/d/actor/d_a_npc_seira2.h b/include/d/actor/d_a_npc_seira2.h index b3157b2924..496357af4e 100644 --- a/include/d/actor/d_a_npc_seira2.h +++ b/include/d/actor/d_a_npc_seira2.h @@ -12,7 +12,7 @@ class daNpc_Seira2_Param_c { public: virtual ~daNpc_Seira2_Param_c() {} - static const daNpc_Seira2_HIOParam m; + static DUSK_GAME_DATA const daNpc_Seira2_HIOParam m; }; #if DEBUG @@ -106,8 +106,8 @@ public: BOOL checkChangeJoint(int val) { return val == 4; } BOOL checkRemoveJoint(int val) { return val == 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0x0F7C */ mDoExt_McaMorfSO* mpSeiraMorf; diff --git a/include/d/actor/d_a_npc_seirei.h b/include/d/actor/d_a_npc_seirei.h index ca0c7f9985..a25c9671ae 100644 --- a/include/d/actor/d_a_npc_seirei.h +++ b/include/d/actor/d_a_npc_seirei.h @@ -13,7 +13,7 @@ class daNpc_Seirei_Param_c { public: virtual ~daNpc_Seirei_Param_c() {} - static daNpc_Seirei_HIOParam const m; + static DUSK_GAME_DATA daNpc_Seirei_HIOParam const m; }; #if DEBUG @@ -99,8 +99,8 @@ public: u32 getBitSW() { return (fopAcM_GetParam(this) & 0xFF000) >> 12; } bool getDoBtnChkFlag() { return (fopAcM_GetParam(this) & 0x100) == 0; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0xE40 */ NPC_SEIREI_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_shad.h b/include/d/actor/d_a_npc_shad.h index d33a6af350..7f4490c183 100644 --- a/include/d/actor/d_a_npc_shad.h +++ b/include/d/actor/d_a_npc_shad.h @@ -12,7 +12,7 @@ class daNpcShad_Param_c : public JORReflexible { public: virtual ~daNpcShad_Param_c() {} - static const daNpcShad_HIOParam m; + static DUSK_GAME_DATA const daNpcShad_HIOParam m; }; #if DEBUG @@ -184,7 +184,7 @@ public: void lookat(); BOOL drawDbgInfo(); - static EventFn DUSK_CONST mEvtSeqList[14]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[14]; u8 getPathID() { return (fopAcM_GetParam(this) >> 8) & 0xFF; } s16 getMessageNo() { return shape_angle.x; } diff --git a/include/d/actor/d_a_npc_shaman.h b/include/d/actor/d_a_npc_shaman.h index 76231f2756..cdb7f7d7e9 100644 --- a/include/d/actor/d_a_npc_shaman.h +++ b/include/d/actor/d_a_npc_shaman.h @@ -20,7 +20,7 @@ class daNpc_Sha_Param_c { public: virtual ~daNpc_Sha_Param_c() {} - static daNpc_Sha_HIOParam const m; + static DUSK_GAME_DATA daNpc_Sha_HIOParam const m; }; #if DEBUG @@ -110,12 +110,12 @@ public: return nodeNo == 0xFFFF ? -1 : nodeNo; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; - static const u16 mEvtBitLabels[6]; - static const u16 mTmpBitLabels[6]; - static const int mSceneChangeNoTable[48]; - static queryFunc mQueries[48]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA const u16 mEvtBitLabels[6]; + static DUSK_GAME_DATA const u16 mTmpBitLabels[6]; + static DUSK_GAME_DATA const int mSceneChangeNoTable[48]; + static DUSK_GAME_DATA queryFunc mQueries[48]; private: /* 0xE40 */ NPC_SHA_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_shoe.h b/include/d/actor/d_a_npc_shoe.h index 67b746546b..f9bee53132 100644 --- a/include/d/actor/d_a_npc_shoe.h +++ b/include/d/actor/d_a_npc_shoe.h @@ -11,7 +11,7 @@ class daNpcShoe_Param_c { public: virtual ~daNpcShoe_Param_c() {} - static const daNpcShoe_HIOParam m; + static DUSK_GAME_DATA const daNpcShoe_HIOParam m; }; STATIC_ASSERT(sizeof(daNpcShoe_Param_c::m) == 0x6C); @@ -110,7 +110,7 @@ public: inline bool chkFindPlayer(); inline void playMotion(); - static EventFn DUSK_CONST mEvtSeqList[1]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[1]; private: /* 0xB48 */ J3DModel* mpModel1; diff --git a/include/d/actor/d_a_npc_shop0.h b/include/d/actor/d_a_npc_shop0.h index 21e6916ac1..aa6d9cdf33 100644 --- a/include/d/actor/d_a_npc_shop0.h +++ b/include/d/actor/d_a_npc_shop0.h @@ -22,7 +22,7 @@ public: /* 0x8 */ u32 mParam3; }; - static param const mParam; + static DUSK_GAME_DATA param const mParam; }; @@ -52,7 +52,7 @@ public: int wait(void*); int talk(void*); - static dCcD_SrcCyl const mCylDat; + static DUSK_GAME_DATA dCcD_SrcCyl const mCylDat; /* 0x56c */ u8 mParam; /* 0x570 */ mDoExt_bckAnm mBckAnm; diff --git a/include/d/actor/d_a_npc_sola.h b/include/d/actor/d_a_npc_sola.h index 7b622d121c..bfeb993cc7 100644 --- a/include/d/actor/d_a_npc_sola.h +++ b/include/d/actor/d_a_npc_sola.h @@ -11,7 +11,7 @@ class daNpc_solA_Param_c { public: virtual ~daNpc_solA_Param_c() {} - static daNpc_solA_HIOParam const m; + static DUSK_GAME_DATA daNpc_solA_HIOParam const m; }; #if DEBUG @@ -111,8 +111,8 @@ public: s32 getNeckJointNo() { return JNT_NECK; } s32 getBackboneJointNo() { return JNT_BACKBONE1; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_SOLA_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_soldierA.h b/include/d/actor/d_a_npc_soldierA.h index f7c9153dd9..dfc114d97e 100644 --- a/include/d/actor/d_a_npc_soldierA.h +++ b/include/d/actor/d_a_npc_soldierA.h @@ -20,7 +20,7 @@ class daNpc_SoldierA_Param_c { public: virtual ~daNpc_SoldierA_Param_c() {} - static daNpc_SoldierA_HIOParam const m; + static DUSK_GAME_DATA daNpc_SoldierA_HIOParam const m; }; #if DEBUG @@ -79,8 +79,8 @@ public: u8 getType() { return mType; } - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[3]; - static cutFunc DUSK_CONST mEvtCutList[3]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[3]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[3]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_soldierB.h b/include/d/actor/d_a_npc_soldierB.h index a99e10a813..66813628f9 100644 --- a/include/d/actor/d_a_npc_soldierB.h +++ b/include/d/actor/d_a_npc_soldierB.h @@ -11,7 +11,7 @@ class daNpc_SoldierB_Param_c { public: virtual ~daNpc_SoldierB_Param_c() {} - static daNpc_SoldierB_HIOParam const m; + static DUSK_GAME_DATA daNpc_SoldierB_HIOParam const m; }; #if DEBUG @@ -75,8 +75,8 @@ public: int ECut_listenLake(int); int test(void*); - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; - static cutFunc DUSK_CONST mEvtCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[2]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_taro.h b/include/d/actor/d_a_npc_taro.h index 6e7e394406..1d0fa6274b 100644 --- a/include/d/actor/d_a_npc_taro.h +++ b/include/d/actor/d_a_npc_taro.h @@ -14,7 +14,7 @@ class daNpc_Taro_Param_c { public: virtual ~daNpc_Taro_Param_c() {} - static daNpc_Taro_HIOParam const m; + static DUSK_GAME_DATA daNpc_Taro_HIOParam const m; }; #if DEBUG @@ -156,8 +156,8 @@ public: u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } u8 getBitSW2() { return (fopAcM_GetParam(this) & 0xff000000) >> 24; } - static char DUSK_CONST* DUSK_CONST mCutNameList[17]; - static cutFunc DUSK_CONST mCutList[17]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[17]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[17]; private: /* 0x0E40 */ NPC_TARO_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_the.h b/include/d/actor/d_a_npc_the.h index c131d442f6..fba5678e01 100644 --- a/include/d/actor/d_a_npc_the.h +++ b/include/d/actor/d_a_npc_the.h @@ -12,7 +12,7 @@ class daNpcThe_Param_c { public: virtual ~daNpcThe_Param_c() {} - static const daNpcThe_HIOParam m; + static DUSK_GAME_DATA const daNpcThe_HIOParam m; }; STATIC_ASSERT(sizeof(daNpcThe_Param_c::m) == 0x6C); @@ -231,8 +231,8 @@ private: /* 0xE1D */ bool field_0xe1d; /* 0xE1E */ u8 mType; - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[4]; - static EventFn DUSK_CONST mEvtCutList[4]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[4]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[4]; }; STATIC_ASSERT(sizeof(daNpcThe_c) == 0xE20); diff --git a/include/d/actor/d_a_npc_theB.h b/include/d/actor/d_a_npc_theB.h index 9179ddd652..92e0b0b3f0 100644 --- a/include/d/actor/d_a_npc_theB.h +++ b/include/d/actor/d_a_npc_theB.h @@ -19,7 +19,7 @@ struct daNpcTheB_HIOParam { struct daNpcTheB_Param_c { virtual ~daNpcTheB_Param_c() {} - static daNpcTheB_HIOParam const m; + static DUSK_GAME_DATA daNpcTheB_HIOParam const m; }; #if DEBUG @@ -149,7 +149,7 @@ public: } } - static cutFunc mEvtSeqList[6]; + static DUSK_GAME_DATA cutFunc mEvtSeqList[6]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_tkc.h b/include/d/actor/d_a_npc_tkc.h index ab2c871be2..3148354b36 100644 --- a/include/d/actor/d_a_npc_tkc.h +++ b/include/d/actor/d_a_npc_tkc.h @@ -36,7 +36,7 @@ class daNpcTkc_Param_c { public: virtual ~daNpcTkc_Param_c() {} - static daNpcTkc_HIOParam const m; + static DUSK_GAME_DATA daNpcTkc_HIOParam const m; }; #if DEBUG @@ -106,7 +106,7 @@ public: BOOL chkAction(actionFunc action) { return action == mAction; } void lookat(); - static evtFunc mEvtSeqList[4]; + static DUSK_GAME_DATA evtFunc mEvtSeqList[4]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_tkj.h b/include/d/actor/d_a_npc_tkj.h index dc0e595cb7..8e7e2567b1 100644 --- a/include/d/actor/d_a_npc_tkj.h +++ b/include/d/actor/d_a_npc_tkj.h @@ -11,7 +11,7 @@ class daNpc_Tkj_Param_c { public: virtual ~daNpc_Tkj_Param_c() {} - static const daNpc_Tkj_HIOParam m; + static DUSK_GAME_DATA const daNpc_Tkj_HIOParam m; }; #if DEBUG @@ -94,8 +94,8 @@ public: int getPath() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static int (daNpcTkj_c::* DUSK_CONST mCutList[])(int); + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA int (daNpcTkj_c::* DUSK_CONST mCutList[])(int); private: /* 0xE40 */ NPC_TKJ_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_tks.h b/include/d/actor/d_a_npc_tks.h index c2f7e6ff53..0342a378fe 100644 --- a/include/d/actor/d_a_npc_tks.h +++ b/include/d/actor/d_a_npc_tks.h @@ -31,7 +31,7 @@ class daNpcTks_Param_c { public: virtual ~daNpcTks_Param_c() {} - static daNpcTks_HIOParam const m; + static DUSK_GAME_DATA daNpcTks_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_npc_toby.h b/include/d/actor/d_a_npc_toby.h index 7cce8adf7e..4f53117112 100644 --- a/include/d/actor/d_a_npc_toby.h +++ b/include/d/actor/d_a_npc_toby.h @@ -16,7 +16,7 @@ class daNpc_Toby_Param_c { public: virtual ~daNpc_Toby_Param_c() {} - static const daNpc_Toby_HIOParam m; + static DUSK_GAME_DATA const daNpc_Toby_HIOParam m; }; #if DEBUG @@ -129,8 +129,8 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; } - static char DUSK_CONST* DUSK_CONST mCutNameList[7]; - static cutFunc DUSK_CONST mCutList[7]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[7]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7]; private: /* 0x0E40 */ NPC_TOBY_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_uri.h b/include/d/actor/d_a_npc_uri.h index 0c29bd56ee..78a327592a 100644 --- a/include/d/actor/d_a_npc_uri.h +++ b/include/d/actor/d_a_npc_uri.h @@ -22,7 +22,7 @@ class daNpc_Uri_Param_c { public: virtual ~daNpc_Uri_Param_c() {} - static const daNpc_Uri_HIOParam m; + static DUSK_GAME_DATA const daNpc_Uri_HIOParam m; }; #if DEBUG @@ -136,8 +136,8 @@ public: u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } - static const char* mCutNameList[7]; - static cutFunc DUSK_CONST mCutList[7]; + static DUSK_GAME_DATA const char* mCutNameList[7]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7]; private: /* 0x0E40 */ NPC_URI_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_wrestler.h b/include/d/actor/d_a_npc_wrestler.h index e4c98c8abb..b910ed50f9 100644 --- a/include/d/actor/d_a_npc_wrestler.h +++ b/include/d/actor/d_a_npc_wrestler.h @@ -77,7 +77,7 @@ class daNpcWrestler_Param_c { public: virtual ~daNpcWrestler_Param_c() {} - static daNpcWrestler_HIOParam const m; + static DUSK_GAME_DATA daNpcWrestler_HIOParam const m; }; class daNpcWrestler_HIO_Node_c: public JORReflexible { @@ -230,7 +230,7 @@ public: inline void initDemoCamera_ReadyWrestler(); inline void playExpression(); - static EventFn DUSK_CONST mEvtSeqList[7]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[7]; private: /* 0xB48 */ Z2Creature mSound; diff --git a/include/d/actor/d_a_npc_yamid.h b/include/d/actor/d_a_npc_yamid.h index 3133cbd84f..b175aa7a53 100644 --- a/include/d/actor/d_a_npc_yamid.h +++ b/include/d/actor/d_a_npc_yamid.h @@ -20,7 +20,7 @@ class daNpc_yamiD_Param_c { public: virtual ~daNpc_yamiD_Param_c() {} - static daNpc_yamiD_HIOParam const m; + static DUSK_GAME_DATA daNpc_yamiD_HIOParam const m; }; #if DEBUG @@ -129,8 +129,8 @@ public: field_0xe44.OffTgSetBit(); } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0xE40 */ NPC_YAMID_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_yamis.h b/include/d/actor/d_a_npc_yamis.h index edf87ee174..4c23311c5e 100644 --- a/include/d/actor/d_a_npc_yamis.h +++ b/include/d/actor/d_a_npc_yamis.h @@ -11,7 +11,7 @@ class daNpc_yamiS_Param_c { public: virtual ~daNpc_yamiS_Param_c() {} - static const daNpc_yamiS_HIOParam m; + static DUSK_GAME_DATA const daNpc_yamiS_HIOParam m; }; #if DEBUG @@ -124,8 +124,8 @@ public: field_0xe44.OffTgSetBit(); } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0xE40 */ NPC_YAMIS_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_yamit.h b/include/d/actor/d_a_npc_yamit.h index 4f7a5393f8..a59b6a841f 100644 --- a/include/d/actor/d_a_npc_yamit.h +++ b/include/d/actor/d_a_npc_yamit.h @@ -12,7 +12,7 @@ class daNpc_yamiT_Param_c { public: virtual ~daNpc_yamiT_Param_c() {} - static const daNpc_yamiT_HIOParam m; + static DUSK_GAME_DATA const daNpc_yamiT_HIOParam m; }; #if DEBUG @@ -123,8 +123,8 @@ public: } u8 _is_stopper_off() { return fopAcM_isSwitch(this, 0x3D) && fopAcM_isSwitch(this, 0x3E); } - static char DUSK_CONST* DUSK_CONST mCutNameList[2]; - static cutFunc DUSK_CONST mCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2]; private: /* 0xE40 */ NPC_YAMIT_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_yelia.h b/include/d/actor/d_a_npc_yelia.h index fb934a25c5..737a3b4e28 100644 --- a/include/d/actor/d_a_npc_yelia.h +++ b/include/d/actor/d_a_npc_yelia.h @@ -11,7 +11,7 @@ class daNpc_Yelia_Param_c { public: virtual ~daNpc_Yelia_Param_c() {} - static daNpc_Yelia_HIOParam const m; + static DUSK_GAME_DATA daNpc_Yelia_HIOParam const m; }; #if DEBUG @@ -102,8 +102,8 @@ public: return no; } - static char DUSK_CONST* DUSK_CONST mCutNameList[6]; - static int (daNpc_Yelia_c::*mCutList[6])(int); + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[6]; + static DUSK_GAME_DATA int (daNpc_Yelia_c::*mCutList[6])(int); private: /* 0xE40 */ NPC_YELIA_HIO_CLASS* mpHIO; /* 0xE44 */ dCcD_Cyl mCcCyl; diff --git a/include/d/actor/d_a_npc_ykm.h b/include/d/actor/d_a_npc_ykm.h index 391203948d..d486d6fe6a 100644 --- a/include/d/actor/d_a_npc_ykm.h +++ b/include/d/actor/d_a_npc_ykm.h @@ -38,7 +38,7 @@ class daNpc_ykM_Param_c { public: virtual ~daNpc_ykM_Param_c() {} - static daNpc_ykM_HIOParam const m; + static DUSK_GAME_DATA daNpc_ykM_HIOParam const m; }; #if DEBUG @@ -285,8 +285,8 @@ public: int getBitTRB() { return (u8)((fopAcM_GetParam(this) & 0x3F0000) >> 16); } u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } - static char DUSK_CONST* DUSK_CONST mCutNameList[10]; - static cutFunc DUSK_CONST mCutList[10]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[10]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[10]; private: /* 0x0E40 */ mDoExt_McaMorfSO* mFishModelMorf; /* 0x0E44 */ mDoExt_McaMorfSO* mLeafModelMorf; diff --git a/include/d/actor/d_a_npc_ykw.h b/include/d/actor/d_a_npc_ykw.h index 91517d4e17..43b3bca276 100644 --- a/include/d/actor/d_a_npc_ykw.h +++ b/include/d/actor/d_a_npc_ykw.h @@ -131,8 +131,8 @@ public: return (fopAcM_GetParam(this) & 0xf0) >> 4; } - static const char* mCutNameList[8]; - static cutFunc DUSK_CONST mCutList[8]; + static DUSK_GAME_DATA const char* mCutNameList[8]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[8]; void setDialogueTmr1(int param_1) { field_0x1024 = param_1; @@ -216,7 +216,7 @@ class daNpc_ykW_Param_c { public: virtual ~daNpc_ykW_Param_c() {} - static const daNpc_ykW_HIOParam m; + static DUSK_GAME_DATA const daNpc_ykW_HIOParam m; }; #endif /* D_A_NPC_YKW_H */ diff --git a/include/d/actor/d_a_npc_zanb.h b/include/d/actor/d_a_npc_zanb.h index 6feaf3fc72..51d99c8253 100644 --- a/include/d/actor/d_a_npc_zanb.h +++ b/include/d/actor/d_a_npc_zanb.h @@ -20,7 +20,7 @@ class daNpc_zanB_Param_c { public: virtual ~daNpc_zanB_Param_c() {} - static daNpc_zanB_HIOParam const m; + static DUSK_GAME_DATA daNpc_zanB_HIOParam const m; }; #if DEBUG @@ -99,8 +99,8 @@ public: return nodeNo; } - static char DUSK_CONST* DUSK_CONST mCutNameList[1]; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_ZANB_HIO_CLASS* mHIO; diff --git a/include/d/actor/d_a_npc_zant.h b/include/d/actor/d_a_npc_zant.h index d2d1949bda..cbd33863d2 100644 --- a/include/d/actor/d_a_npc_zant.h +++ b/include/d/actor/d_a_npc_zant.h @@ -11,7 +11,7 @@ class daNpc_Zant_Param_c { public: virtual ~daNpc_Zant_Param_c() {} - static const daNpc_Zant_HIOParam m; + static DUSK_GAME_DATA const daNpc_Zant_HIOParam m; }; #if DEBUG @@ -83,8 +83,8 @@ public: daNpcT_evtData_c const* param_7, char DUSK_CONST* DUSK_CONST* param_8) : daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {} - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_ZANT_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_zelR.h b/include/d/actor/d_a_npc_zelR.h index ce3314c694..e7810c850c 100644 --- a/include/d/actor/d_a_npc_zelR.h +++ b/include/d/actor/d_a_npc_zelR.h @@ -20,7 +20,7 @@ class daNpc_ZelR_Param_c { public: virtual ~daNpc_ZelR_Param_c() {}; - static const daNpc_ZelR_HIOParam m; + static DUSK_GAME_DATA const daNpc_ZelR_HIOParam m; }; #if DEBUG @@ -93,8 +93,8 @@ public: BOOL checkChangeJoint(int param_1) { return param_1 == 3; }; BOOL checkRemoveJoint(int param_1) { return param_1 == 13; }; - static char DUSK_CONST* DUSK_CONST mCutNameList; - static EventFn mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA EventFn mCutList[1]; private: /* 0xE40 */ NPC_ZELR_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_zelRo.h b/include/d/actor/d_a_npc_zelRo.h index 40e0b3e391..b3e2533999 100644 --- a/include/d/actor/d_a_npc_zelRo.h +++ b/include/d/actor/d_a_npc_zelRo.h @@ -20,7 +20,7 @@ class daNpc_ZelRo_Param_c { public: virtual ~daNpc_ZelRo_Param_c() {} - static daNpc_ZelRo_HIOParam const m; + static DUSK_GAME_DATA daNpc_ZelRo_HIOParam const m; }; #if DEBUG @@ -147,8 +147,8 @@ public: BOOL checkChangeJoint(int i_joint) { return i_joint == JNT_HEAD; } BOOL checkRemoveJoint(int i_joint) { return i_joint == JNT_MOUTH; } - static char DUSK_CONST* DUSK_CONST mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_ZELRO_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_zelda.h b/include/d/actor/d_a_npc_zelda.h index 5a2d70b658..6c3da5a2b3 100644 --- a/include/d/actor/d_a_npc_zelda.h +++ b/include/d/actor/d_a_npc_zelda.h @@ -14,7 +14,7 @@ class daNpc_Zelda_Param_c { public: virtual ~daNpc_Zelda_Param_c() {} - static const daNpc_Zelda_HIOParam m; + static DUSK_GAME_DATA const daNpc_Zelda_HIOParam m; }; #if DEBUG @@ -100,8 +100,8 @@ public: int checkChangeJoint(int param_0) { return param_0 == 4; } int checkRemoveJoint(int param_0) { return param_0 == 17; } - static const char* mCutNameList; - static cutFunc DUSK_CONST mCutList[1]; + static DUSK_GAME_DATA const char* mCutNameList; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1]; private: /* 0xE40 */ NPC_ZELDA_HIO_CLASS* mpHIO; diff --git a/include/d/actor/d_a_npc_zra.h b/include/d/actor/d_a_npc_zra.h index 31ea1431b7..ee786522f9 100644 --- a/include/d/actor/d_a_npc_zra.h +++ b/include/d/actor/d_a_npc_zra.h @@ -32,7 +32,7 @@ class daNpc_zrA_Param_c { public: virtual ~daNpc_zrA_Param_c() {} - static daNpc_zrA_HIOParam const m; + static DUSK_GAME_DATA daNpc_zrA_HIOParam const m; }; #if DEBUG @@ -443,8 +443,8 @@ public: /* 0x15C0 */ u8 field_0x15c0; /* 0x15C1 */ bool mBlastFlag; - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[11]; - static EventFn DUSK_CONST mEvtCutList[11]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[11]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[11]; }; STATIC_ASSERT(sizeof(daNpc_zrA_c) == 0x15C4); diff --git a/include/d/actor/d_a_npc_zrc.h b/include/d/actor/d_a_npc_zrc.h index 184a4e31c0..f4aeee6ac9 100644 --- a/include/d/actor/d_a_npc_zrc.h +++ b/include/d/actor/d_a_npc_zrc.h @@ -16,7 +16,7 @@ class daNpc_zrC_Param_c { public: virtual ~daNpc_zrC_Param_c() {} - static daNpc_zrC_HIOParam const m; + static DUSK_GAME_DATA daNpc_zrC_HIOParam const m; }; #if DEBUG @@ -93,8 +93,8 @@ public: BOOL ECut_earringGet(int); void adjustShapeAngle() {} - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; - static EventFn DUSK_CONST mEvtCutList[2]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[2]; private: /* 0xB48 */ Z2Creature mCreatureSound; diff --git a/include/d/actor/d_a_npc_zrz.h b/include/d/actor/d_a_npc_zrz.h index a9a294b97f..76c782b7d3 100644 --- a/include/d/actor/d_a_npc_zrz.h +++ b/include/d/actor/d_a_npc_zrz.h @@ -20,7 +20,7 @@ class daNpc_zrZ_Param_c { public: virtual ~daNpc_zrZ_Param_c() {} - static daNpc_zrZ_HIOParam const m; + static DUSK_GAME_DATA daNpc_zrZ_HIOParam const m; }; STATIC_ASSERT(sizeof(daNpc_zrZ_HIOParam) == 0x84); @@ -160,8 +160,8 @@ private: /* 0x14C0 */ BOOL mMusicSet; /* 0x14C4 */ bool mSealReleased; - static char DUSK_CONST* DUSK_CONST mEvtCutNameList[8]; - static EventFn DUSK_CONST mEvtCutList[8]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[8]; + static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[8]; enum Animation { /* 0x0 */ ANM_NONE, diff --git a/include/d/actor/d_a_obj_Turara.h b/include/d/actor/d_a_obj_Turara.h index d8a45097d9..99d5a3a245 100644 --- a/include/d/actor/d_a_obj_Turara.h +++ b/include/d/actor/d_a_obj_Turara.h @@ -53,8 +53,8 @@ public: int getItemTbleNum() { return shape_angle.x >> 8 & 0xff; } int getState() { return shape_angle.x; } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5b8 */ request_of_phase_process_class mPhaseReq; diff --git a/include/d/actor/d_a_obj_TvCdlst.h b/include/d/actor/d_a_obj_TvCdlst.h index 7d94a35676..afe204bc03 100644 --- a/include/d/actor/d_a_obj_TvCdlst.h +++ b/include/d/actor/d_a_obj_TvCdlst.h @@ -26,8 +26,8 @@ public: int Draw(); int Delete(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; u8 getLightType() { return fopAcM_GetParamBit(this,8,8); } u8 getOnSw() { return fopAcM_GetParamBit(this,0,8); } diff --git a/include/d/actor/d_a_obj_automata.h b/include/d/actor/d_a_obj_automata.h index 3468ccc3e8..95fec65cff 100644 --- a/include/d/actor/d_a_obj_automata.h +++ b/include/d/actor/d_a_obj_automata.h @@ -15,7 +15,7 @@ class daObj_AutoMata_Param_c { public: virtual ~daObj_AutoMata_Param_c() {} - static daObj_AutoMata_HIOParam const m; + static DUSK_GAME_DATA daObj_AutoMata_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_barDesk.h b/include/d/actor/d_a_obj_barDesk.h index 427e18ebdb..fc4c1cf4df 100644 --- a/include/d/actor/d_a_obj_barDesk.h +++ b/include/d/actor/d_a_obj_barDesk.h @@ -36,8 +36,8 @@ public: /* 0x5EC */ dCcD_Cyl mColCyl; /* 0x728 */ u8 field_0x728[8]; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daBarDesk_c) == 0x730); diff --git a/include/d/actor/d_a_obj_bed.h b/include/d/actor/d_a_obj_bed.h index 883dd64f73..c6d76f0005 100644 --- a/include/d/actor/d_a_obj_bed.h +++ b/include/d/actor/d_a_obj_bed.h @@ -19,7 +19,7 @@ class daObj_Bed_Param_c { public: virtual ~daObj_Bed_Param_c() {} - static daObj_Bed_HIOParam const m; + static DUSK_GAME_DATA daObj_Bed_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_bemos.h b/include/d/actor/d_a_obj_bemos.h index 713794c3b1..38501b708b 100644 --- a/include/d/actor/d_a_obj_bemos.h +++ b/include/d/actor/d_a_obj_bemos.h @@ -50,12 +50,12 @@ public: void wall_pos(fopAc_ac_c const*, daObjBm_c::BgcSrc_c const*, int, s16, f32); bool chk_wall_pre(fopAc_ac_c const*, daObjBm_c::BgcSrc_c const*, int, s16); - static const daObjBm_c::BgcSrc_c M_lin5[]; - static const daObjBm_c::BgcSrc_c M_lin20[]; + static DUSK_GAME_DATA const daObjBm_c::BgcSrc_c M_lin5[]; + static DUSK_GAME_DATA const daObjBm_c::BgcSrc_c M_lin20[]; - static dBgS_ObjGndChk M_gnd_work[23]; - static dBgS_WtrChk M_wrt_work; - static dBgS_ObjLinChk M_wall_work[23]; + static DUSK_GAME_DATA dBgS_ObjGndChk M_gnd_work[23]; + static DUSK_GAME_DATA dBgS_WtrChk M_wrt_work; + static DUSK_GAME_DATA dBgS_ObjLinChk M_wall_work[23]; /* 0x000 */ f32 field_0x0[23]; /* 0x05C */ int field_0x5c; @@ -130,7 +130,7 @@ public: #endif int Delete(); - static s16 const M_dir_base[4]; + static DUSK_GAME_DATA s16 const M_dir_base[4]; // private: /* 0x05A0 */ request_of_phase_process_class mPhase; /* 0x05A8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_bky_rock.h b/include/d/actor/d_a_obj_bky_rock.h index 99f23557e4..1f5952c35e 100644 --- a/include/d/actor/d_a_obj_bky_rock.h +++ b/include/d/actor/d_a_obj_bky_rock.h @@ -60,8 +60,8 @@ public: u8 getSwBit1() { return fopAcM_GetParamBit(this, 12, 8); } s8 getNameNo() { return fopAcM_GetParamBit(this, 0, 4); } - static dCcD_SrcCyl const s_CcDCyl; - static exeProc s_exeProc[3]; + static DUSK_GAME_DATA dCcD_SrcCyl const s_CcDCyl; + static DUSK_GAME_DATA exeProc s_exeProc[3]; private: /* 0x568 */ int mVibrationTimer; diff --git a/include/d/actor/d_a_obj_bmWindow.h b/include/d/actor/d_a_obj_bmWindow.h index 85b5ab8f86..161f4768a9 100644 --- a/include/d/actor/d_a_obj_bmWindow.h +++ b/include/d/actor/d_a_obj_bmWindow.h @@ -66,8 +66,8 @@ private: /* 0xEDE */ u8 field_0xede; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daBmWindow_c) == 0xEE0); diff --git a/include/d/actor/d_a_obj_boumato.h b/include/d/actor/d_a_obj_boumato.h index 3a988d9b4b..4852aee6f9 100644 --- a/include/d/actor/d_a_obj_boumato.h +++ b/include/d/actor/d_a_obj_boumato.h @@ -21,7 +21,7 @@ class daObj_BouMato_Param_c { public: virtual ~daObj_BouMato_Param_c() {} - static daObj_BouMato_HIOParam const m; + static DUSK_GAME_DATA daObj_BouMato_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_bubblePilar.h b/include/d/actor/d_a_obj_bubblePilar.h index b9abdd1fdd..7fb8009564 100644 --- a/include/d/actor/d_a_obj_bubblePilar.h +++ b/include/d/actor/d_a_obj_bubblePilar.h @@ -36,8 +36,8 @@ public: u8 getArg0() { return fopAcM_GetParamBit(this, 8, 4); } u8 getSw() { return fopAcM_GetParamBit(this, 0, 8); } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5A0 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_carry.h b/include/d/actor/d_a_obj_carry.h index 621b8efabb..8147cbfb60 100644 --- a/include/d/actor/d_a_obj_carry.h +++ b/include/d/actor/d_a_obj_carry.h @@ -304,11 +304,11 @@ public: make_prm(o_params, o_paramsEx, 6, i_itemNo, i_itemBit, i_itemType, param_5); } - static const daObjCarry_dt_t mData[]; - static cXyz mPos[5]; - static u8 mSttsFlag[5]; - static s8 mRoomNo[5]; - static bool mSaveFlag; + static DUSK_GAME_DATA const daObjCarry_dt_t mData[]; + static DUSK_GAME_DATA cXyz mPos[5]; + static DUSK_GAME_DATA u8 mSttsFlag[5]; + static DUSK_GAME_DATA s8 mRoomNo[5]; + static DUSK_GAME_DATA bool mSaveFlag; public: /* 0x568 */ request_of_phase_process_class mPhaseReq; diff --git a/include/d/actor/d_a_obj_catdoor.h b/include/d/actor/d_a_obj_catdoor.h index dd7141d920..b7ed95bd14 100644 --- a/include/d/actor/d_a_obj_catdoor.h +++ b/include/d/actor/d_a_obj_catdoor.h @@ -88,7 +88,7 @@ private: /* 0x790 */ s16 mRotSpeed; public: - static const daObjCatDoor_Attr_c M_attr; + static DUSK_GAME_DATA const daObjCatDoor_Attr_c M_attr; }; #endif /* D_A_OBJ_CATDOOR_H */ diff --git a/include/d/actor/d_a_obj_chandelier.h b/include/d/actor/d_a_obj_chandelier.h index 4aae0160d8..45158dea34 100644 --- a/include/d/actor/d_a_obj_chandelier.h +++ b/include/d/actor/d_a_obj_chandelier.h @@ -67,7 +67,7 @@ private: /* 0x60A */ u8 field_0x60a; /* 0x60B */ u8 field_0x60b; - static daObjChandelier_proc s_exeProc[5]; + static DUSK_GAME_DATA daObjChandelier_proc s_exeProc[5]; }; STATIC_ASSERT(sizeof(daObjChandelier_c) == 0x60C); diff --git a/include/d/actor/d_a_obj_fireWood.h b/include/d/actor/d_a_obj_fireWood.h index 116af1203c..07a5d5334b 100644 --- a/include/d/actor/d_a_obj_fireWood.h +++ b/include/d/actor/d_a_obj_fireWood.h @@ -24,8 +24,8 @@ public: int Draw(); int Delete(); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x568 */ u8 field_0x568[0x574 - 0x568]; diff --git a/include/d/actor/d_a_obj_fireWood2.h b/include/d/actor/d_a_obj_fireWood2.h index 3b288edeeb..bcb1bee95d 100644 --- a/include/d/actor/d_a_obj_fireWood2.h +++ b/include/d/actor/d_a_obj_fireWood2.h @@ -25,8 +25,8 @@ public: int Draw(); int Delete(); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x568 */ u8 field_0x568[0x574 - 0x568]; diff --git a/include/d/actor/d_a_obj_flag.h b/include/d/actor/d_a_obj_flag.h index eee36b0842..8187fe33b2 100644 --- a/include/d/actor/d_a_obj_flag.h +++ b/include/d/actor/d_a_obj_flag.h @@ -86,7 +86,7 @@ public: /* 0x30 */ f32 field_0x30; }; - static M_attrs const M_attr; + static DUSK_GAME_DATA M_attrs const M_attr; M_attrs const& attr() const { return M_attr; } }; diff --git a/include/d/actor/d_a_obj_flag2.h b/include/d/actor/d_a_obj_flag2.h index 54b3777ac6..c9ef033190 100644 --- a/include/d/actor/d_a_obj_flag2.h +++ b/include/d/actor/d_a_obj_flag2.h @@ -81,7 +81,7 @@ public: const daObjFlag2_Attr_c& attr() const { return M_attr; } - static daObjFlag2_Attr_c const M_attr; + static DUSK_GAME_DATA daObjFlag2_Attr_c const M_attr; private: /* 0x0568 */ J3DModel* mModel; diff --git a/include/d/actor/d_a_obj_flag3.h b/include/d/actor/d_a_obj_flag3.h index c6a94f6538..b93394ce15 100644 --- a/include/d/actor/d_a_obj_flag3.h +++ b/include/d/actor/d_a_obj_flag3.h @@ -93,7 +93,7 @@ public: inline int draw(); inline void initBaseMtx(); - static daObjFlag3_Attr_c const M_attr; + static DUSK_GAME_DATA daObjFlag3_Attr_c const M_attr; const daObjFlag3_Attr_c& attr() const { return M_attr; } private: diff --git a/include/d/actor/d_a_obj_gadget.h b/include/d/actor/d_a_obj_gadget.h index db7f5a53f7..cb2c99af97 100644 --- a/include/d/actor/d_a_obj_gadget.h +++ b/include/d/actor/d_a_obj_gadget.h @@ -117,7 +117,7 @@ class daObj_Gadget_Param_c { public: virtual ~daObj_Gadget_Param_c() {} - static daObj_Gadget_HIOParam const m; + static DUSK_GAME_DATA daObj_Gadget_HIOParam const m; }; diff --git a/include/d/actor/d_a_obj_glowSphere.h b/include/d/actor/d_a_obj_glowSphere.h index f620306408..c6c2ee220e 100644 --- a/include/d/actor/d_a_obj_glowSphere.h +++ b/include/d/actor/d_a_obj_glowSphere.h @@ -68,8 +68,8 @@ public: _clrLstBuf(); } - static u16 mSphSe; - static s16 mSeClrTmr; + static DUSK_GAME_DATA u16 mSphSe; + static DUSK_GAME_DATA s16 mSeClrTmr; /* 0x0 */ int field_0x0; /* 0x4 */ _GlSph_LstInfo_c mListBuf[120]; @@ -135,9 +135,9 @@ public: saveGetFlag(); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcSph mCcDSph; - static _GlSph_Mng_c mSphMng; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA _GlSph_Mng_c mSphMng; /* 0x568 */ request_of_phase_process_class mPhase; /* 0x570 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_gpTaru.h b/include/d/actor/d_a_obj_gpTaru.h index 79ed31b3ae..b3b31a5c9d 100644 --- a/include/d/actor/d_a_obj_gpTaru.h +++ b/include/d/actor/d_a_obj_gpTaru.h @@ -43,8 +43,8 @@ public: virtual int Draw(); virtual int Delete(); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x56C */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_gra2.h b/include/d/actor/d_a_obj_gra2.h index 59fd35343b..3cf17e090c 100644 --- a/include/d/actor/d_a_obj_gra2.h +++ b/include/d/actor/d_a_obj_gra2.h @@ -234,8 +234,8 @@ public: void setCrazyThrowLeft() { field_0xa48 |= (u16)8; } void setCrazyThrowRight() { field_0xa48 |= (u16)0x10; } - static MotionFunc mBaseMotionList[22]; - static MotionFunc mFaceMotionList[14]; + static DUSK_GAME_DATA MotionFunc mBaseMotionList[22]; + static DUSK_GAME_DATA MotionFunc mFaceMotionList[14]; bool isFirstGra() { return isFisrtGra(); } bool isFisrtGra() { return field_0x1fe8 == 0; } diff --git a/include/d/actor/d_a_obj_gra_rock.h b/include/d/actor/d_a_obj_gra_rock.h index e3cf568871..24e816a829 100644 --- a/include/d/actor/d_a_obj_gra_rock.h +++ b/include/d/actor/d_a_obj_gra_rock.h @@ -31,7 +31,7 @@ public: int Draw(); int Delete(); - static dCcD_SrcCyl const mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcCyl const mCcDCyl; private: /* 0x5A0 */ request_of_phase_process_class mPhases[5]; diff --git a/include/d/actor/d_a_obj_grave_stone.h b/include/d/actor/d_a_obj_grave_stone.h index dee38757a3..d41d58348a 100644 --- a/include/d/actor/d_a_obj_grave_stone.h +++ b/include/d/actor/d_a_obj_grave_stone.h @@ -49,8 +49,8 @@ private: /* 0x978 */ daObj_GrvStn_prtclMngr_c mPrtclMngr[4]; /* 0xAE8 */ s16 mTimer; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl const mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl const mCcDCyl; }; STATIC_ASSERT(sizeof(daGraveStone_c) == 0xAEC); diff --git a/include/d/actor/d_a_obj_hakai_brl.h b/include/d/actor/d_a_obj_hakai_brl.h index 394cab0366..dba4b3cd3f 100644 --- a/include/d/actor/d_a_obj_hakai_brl.h +++ b/include/d/actor/d_a_obj_hakai_brl.h @@ -32,7 +32,7 @@ public: } void callEmt(); - static dCcD_SrcCyl const s_CcDCyl; + static DUSK_GAME_DATA dCcD_SrcCyl const s_CcDCyl; private: /* 0x574 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_hakai_ftr.h b/include/d/actor/d_a_obj_hakai_ftr.h index cc94ba6021..45c815c5f9 100644 --- a/include/d/actor/d_a_obj_hakai_ftr.h +++ b/include/d/actor/d_a_obj_hakai_ftr.h @@ -29,7 +29,7 @@ public: bool chkHit(); void callEmt(); - static dCcD_SrcCyl const s_CcDCyl; + static DUSK_GAME_DATA dCcD_SrcCyl const s_CcDCyl; private: /* 0x574 */ Mtx mMtx; diff --git a/include/d/actor/d_a_obj_itamato.h b/include/d/actor/d_a_obj_itamato.h index 0aece512cd..10c6459887 100644 --- a/include/d/actor/d_a_obj_itamato.h +++ b/include/d/actor/d_a_obj_itamato.h @@ -27,7 +27,7 @@ class daObj_ItaMato_Param_c { public: virtual ~daObj_ItaMato_Param_c() {} - static daObj_ItaMato_HIOParam const m; + static DUSK_GAME_DATA daObj_ItaMato_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_kago.h b/include/d/actor/d_a_obj_kago.h index c2ea85d8f2..265db41c57 100644 --- a/include/d/actor/d_a_obj_kago.h +++ b/include/d/actor/d_a_obj_kago.h @@ -24,7 +24,7 @@ class daObj_Kago_Param_c { public: virtual ~daObj_Kago_Param_c() {} - static const daObj_Kago_HIOParam m; + static DUSK_GAME_DATA const daObj_Kago_HIOParam m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_kazeneko.h b/include/d/actor/d_a_obj_kazeneko.h index 3ac12b40f3..73147b6fbe 100644 --- a/include/d/actor/d_a_obj_kazeneko.h +++ b/include/d/actor/d_a_obj_kazeneko.h @@ -45,7 +45,7 @@ public: const KazoNekoAttr& attr() { return M_attr; } - static KazoNekoAttr const M_attr; + static DUSK_GAME_DATA KazoNekoAttr const M_attr; private: /* 0x568 */ J3DModel* mModel; /* 0x56C */ J3DModel* mArmModels[4]; diff --git a/include/d/actor/d_a_obj_kbacket.h b/include/d/actor/d_a_obj_kbacket.h index f3855fc8ca..214c4dcc7c 100644 --- a/include/d/actor/d_a_obj_kbacket.h +++ b/include/d/actor/d_a_obj_kbacket.h @@ -25,7 +25,7 @@ class daObj_KBacket_Param_c { public: virtual ~daObj_KBacket_Param_c() {} - static const daObj_KBacket_HIOParam m; + static DUSK_GAME_DATA const daObj_KBacket_HIOParam m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_ktOnFire.h b/include/d/actor/d_a_obj_ktOnFire.h index bd0e23a82d..39875e122e 100644 --- a/include/d/actor/d_a_obj_ktOnFire.h +++ b/include/d/actor/d_a_obj_ktOnFire.h @@ -23,8 +23,8 @@ public: int Draw(); int Delete(); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x568 */ dCcD_Stts mCcStts; diff --git a/include/d/actor/d_a_obj_kznkarm.h b/include/d/actor/d_a_obj_kznkarm.h index 343285f8f8..c70908fcb8 100644 --- a/include/d/actor/d_a_obj_kznkarm.h +++ b/include/d/actor/d_a_obj_kznkarm.h @@ -60,8 +60,8 @@ public: inline ~daObjKznkarm_c(); inline daObjKznkarm_Attr_c* attr() const; - static daObjKznkarm_Attr_c const M_attr; - static actionFunc ActionTable[4][2]; + static DUSK_GAME_DATA daObjKznkarm_Attr_c const M_attr; + static DUSK_GAME_DATA actionFunc ActionTable[4][2]; private: /* 0x568 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_ladder.h b/include/d/actor/d_a_obj_ladder.h index eb48cf0f16..72f6fce4d2 100644 --- a/include/d/actor/d_a_obj_ladder.h +++ b/include/d/actor/d_a_obj_ladder.h @@ -74,8 +74,8 @@ namespace daObjLadder { return(Type_e)daObj::PrmAbstract(this,PRM_3, PRM_0); } - static char const M_arcname[5]; - static Mtx M_tmp_mtx; + static DUSK_GAME_DATA char const M_arcname[5]; + static DUSK_GAME_DATA Mtx M_tmp_mtx; private: /* 0x5A0 */ request_of_phase_process_class mPhase; /* 0x5A8 */ J3DModel* mModel; diff --git a/include/d/actor/d_a_obj_laundry.h b/include/d/actor/d_a_obj_laundry.h index 7d50dfa28e..cc79bc4e05 100644 --- a/include/d/actor/d_a_obj_laundry.h +++ b/include/d/actor/d_a_obj_laundry.h @@ -57,7 +57,7 @@ public: inline int daObjLdy_Execute(); private: - static const daObjLdy_Attr_c mAttr; + static DUSK_GAME_DATA const daObjLdy_Attr_c mAttr; /* 0x568 */ J3DModel* mpModel; /* 0x56C */ mDoExt_btkAnm* mpBtkAnm; diff --git a/include/d/actor/d_a_obj_laundry_rope.h b/include/d/actor/d_a_obj_laundry_rope.h index 4dba2250dc..3ecab164b2 100644 --- a/include/d/actor/d_a_obj_laundry_rope.h +++ b/include/d/actor/d_a_obj_laundry_rope.h @@ -55,7 +55,7 @@ public: }; #endif - static const daObjLndRope_Attr_c mAttr; + static DUSK_GAME_DATA const daObjLndRope_Attr_c mAttr; static const daObjLndRope_Hio_c M_Hio; private: diff --git a/include/d/actor/d_a_obj_lv1Candle00.h b/include/d/actor/d_a_obj_lv1Candle00.h index 48fca4acb6..e9e62da388 100644 --- a/include/d/actor/d_a_obj_lv1Candle00.h +++ b/include/d/actor/d_a_obj_lv1Candle00.h @@ -46,8 +46,8 @@ private: /* 0x730 */ u8 mTgHit; /* 0x734 */ Z2SoundObjSimple mSound; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daLv1Cdl00_c) == 0x754); diff --git a/include/d/actor/d_a_obj_lv1Candle01.h b/include/d/actor/d_a_obj_lv1Candle01.h index 66524cc4dc..632c117f10 100644 --- a/include/d/actor/d_a_obj_lv1Candle01.h +++ b/include/d/actor/d_a_obj_lv1Candle01.h @@ -42,8 +42,8 @@ private: /* 0x768 */ u8 mTgHit; /* 0x76C */ Z2SoundObjSimple mSound; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daLv1Cdl01_c) == 0x78C); diff --git a/include/d/actor/d_a_obj_lv2Candle.h b/include/d/actor/d_a_obj_lv2Candle.h index 767480d550..19be29a16e 100644 --- a/include/d/actor/d_a_obj_lv2Candle.h +++ b/include/d/actor/d_a_obj_lv2Candle.h @@ -60,8 +60,8 @@ private: /* 0x738 */ u8 mTgHit; /* 0x73C */ Z2SoundObjSimple mSound; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daLv2Candle_c) == 0x75C); diff --git a/include/d/actor/d_a_obj_lv3Candle.h b/include/d/actor/d_a_obj_lv3Candle.h index b82ad0b8c4..7b9765136d 100644 --- a/include/d/actor/d_a_obj_lv3Candle.h +++ b/include/d/actor/d_a_obj_lv3Candle.h @@ -44,8 +44,8 @@ private: /* 0x730 */ u8 mTgHit; /* 0x734 */ Z2SoundObjSimple mSound; - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; }; // Size: 0x754 diff --git a/include/d/actor/d_a_obj_lv5FloorBoard.h b/include/d/actor/d_a_obj_lv5FloorBoard.h index f4f5c50582..1dcba0ade2 100644 --- a/include/d/actor/d_a_obj_lv5FloorBoard.h +++ b/include/d/actor/d_a_obj_lv5FloorBoard.h @@ -35,8 +35,8 @@ public: int getSwBit1() { return fopAcM_GetParamBit(this, 0, 8); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5A0 */ dCcD_Stts mCcStts; diff --git a/include/d/actor/d_a_obj_lv5IceWall.h b/include/d/actor/d_a_obj_lv5IceWall.h index 737aaf9318..c9f459e75d 100644 --- a/include/d/actor/d_a_obj_lv5IceWall.h +++ b/include/d/actor/d_a_obj_lv5IceWall.h @@ -39,8 +39,8 @@ public: int getScaleY() { return fopAcM_GetParamBit(this, 0x15, 5); } int getScaleZ() { return fopAcM_GetParamBit(this, 0x1A, 5); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5A0 */ dCcD_Stts mCcStts; diff --git a/include/d/actor/d_a_obj_lv5SwIce.h b/include/d/actor/d_a_obj_lv5SwIce.h index 7c61e04d3b..8adc14f2af 100644 --- a/include/d/actor/d_a_obj_lv5SwIce.h +++ b/include/d/actor/d_a_obj_lv5SwIce.h @@ -35,8 +35,8 @@ public: int getSwBit1() { return fopAcM_GetParamBit(this, 0, 8); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5A0 */ dCcD_Stts mCcStts; diff --git a/include/d/actor/d_a_obj_lv6ChangeGate.h b/include/d/actor/d_a_obj_lv6ChangeGate.h index b918037950..48f532da3f 100644 --- a/include/d/actor/d_a_obj_lv6ChangeGate.h +++ b/include/d/actor/d_a_obj_lv6ChangeGate.h @@ -45,8 +45,8 @@ public: int getSw() { return fopAcM_GetParamBit(this, 0, 8); } int getSw2() { return shape_angle.x & 0xFF; } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; /* 0x05B8 */ request_of_phase_process_class mPhase; /* 0x05C0 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_lv6FurikoTrap.h b/include/d/actor/d_a_obj_lv6FurikoTrap.h index b09952df78..8a5f17336d 100644 --- a/include/d/actor/d_a_obj_lv6FurikoTrap.h +++ b/include/d/actor/d_a_obj_lv6FurikoTrap.h @@ -25,8 +25,8 @@ public: int Draw(); int Delete(); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; private: /* 0x5A0 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_lv6SwGate.h b/include/d/actor/d_a_obj_lv6SwGate.h index 964c073c1d..331e7ae07d 100644 --- a/include/d/actor/d_a_obj_lv6SwGate.h +++ b/include/d/actor/d_a_obj_lv6SwGate.h @@ -36,8 +36,8 @@ public: int getSwState() { return fopAcM_GetParamBit(this, 12, 4); } int getSw2() { return fopAcM_GetParamBit(this, 16, 8); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5A0 */ dCcD_Stts mCcStts; /* 0x5DC */ dCcD_Cyl mCcDCyls[12]; diff --git a/include/d/actor/d_a_obj_lv6TogeRoll.h b/include/d/actor/d_a_obj_lv6TogeRoll.h index 6e6357d552..9fedcd5932 100644 --- a/include/d/actor/d_a_obj_lv6TogeRoll.h +++ b/include/d/actor/d_a_obj_lv6TogeRoll.h @@ -60,11 +60,11 @@ public: u32 getPathID() { return fopAcM_GetParamBit(this, 0, 8); } u32 getSpeed() { return fopAcM_GetParamBit(this, 8, 4); } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcGObjInf const mCcDObjInfo2; - static f32 const mSpeed[]; - static dCcD_SrcSph mCcDSph; - static dCcD_SrcCps mCcDCps; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo2; + static DUSK_GAME_DATA f32 const mSpeed[]; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcCps mCcDCps; private: /* 0x05A0 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_lv6TogeTrap.h b/include/d/actor/d_a_obj_lv6TogeTrap.h index 29e68aad24..e0f0a2102d 100644 --- a/include/d/actor/d_a_obj_lv6TogeTrap.h +++ b/include/d/actor/d_a_obj_lv6TogeTrap.h @@ -62,11 +62,11 @@ public: int getModelType() { return fopAcM_GetParamBit(this, 20, 4); } int getHankei2() { return fopAcM_GetParamBit(this, 24, 8); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static const dCcD_SrcGObjInf mCcDObjInfo2; - static const f32 mSpeed[16]; - static dCcD_SrcSph mCcDSph; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo2; + static DUSK_GAME_DATA const f32 mSpeed[16]; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; /* 0x5A0 */ request_of_phase_process_class mPhase; /* 0x5A8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_lv8Lift.h b/include/d/actor/d_a_obj_lv8Lift.h index c327f4cf3c..0b39e25e89 100644 --- a/include/d/actor/d_a_obj_lv8Lift.h +++ b/include/d/actor/d_a_obj_lv8Lift.h @@ -66,7 +66,7 @@ public: u8 getMoveSpeed() { return fopAcM_GetParamBit(this, 8, 4); } int getSw() { return fopAcM_GetParamBit(this, 12, 8); } - static f32 const mSpeed[16]; + static DUSK_GAME_DATA f32 const mSpeed[16]; private: /* 0x5A0 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_lv8OptiLift.h b/include/d/actor/d_a_obj_lv8OptiLift.h index 5a437079c7..cd33551685 100644 --- a/include/d/actor/d_a_obj_lv8OptiLift.h +++ b/include/d/actor/d_a_obj_lv8OptiLift.h @@ -62,7 +62,7 @@ public: int getSw() { return fopAcM_GetParamBit(this, 0, 8); } int getArg1() { return fopAcM_GetParamBit(this, 0x14, 4); } - static f32 const mSpeed[]; + static DUSK_GAME_DATA f32 const mSpeed[]; /* 0x5A0 */ request_of_phase_process_class mPhase; /* 0x5A8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_magLift.h b/include/d/actor/d_a_obj_magLift.h index e9b4e8bcf3..a8f597bfef 100644 --- a/include/d/actor/d_a_obj_magLift.h +++ b/include/d/actor/d_a_obj_magLift.h @@ -47,7 +47,7 @@ public: int getMoveSpeed() { return fopAcM_GetParamBit(this, 0x8, 4); } - static f32 const mSpeed[16]; + static DUSK_GAME_DATA f32 const mSpeed[16]; private: /* 0x5a0 */ request_of_phase_process_class mPhaseReq; diff --git a/include/d/actor/d_a_obj_master_sword.h b/include/d/actor/d_a_obj_master_sword.h index e99b8832d7..a971aa335c 100644 --- a/include/d/actor/d_a_obj_master_sword.h +++ b/include/d/actor/d_a_obj_master_sword.h @@ -48,8 +48,8 @@ public: u8 getEventID() { return (fopAcM_GetParam(this) >> 0x10) & 0xFF; } u16 getFlagNo() { return fopAcM_GetParam(this) & 0xFFFF; } - static daObjMasterSword_Attr_c const mAttr; - static actionFunc ActionTable[]; + static DUSK_GAME_DATA daObjMasterSword_Attr_c const mAttr; + static DUSK_GAME_DATA actionFunc ActionTable[]; private: /* 0x568 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_mie.h b/include/d/actor/d_a_obj_mie.h index 0f1df429be..6c95ed7f84 100644 --- a/include/d/actor/d_a_obj_mie.h +++ b/include/d/actor/d_a_obj_mie.h @@ -24,7 +24,7 @@ class daObj_Mie_Param_c { public: virtual ~daObj_Mie_Param_c() {} - static const daObj_Mie_HIOParam m; + static DUSK_GAME_DATA const daObj_Mie_HIOParam m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_mirror_6pole.h b/include/d/actor/d_a_obj_mirror_6pole.h index 702b1cb66b..17cf211be3 100644 --- a/include/d/actor/d_a_obj_mirror_6pole.h +++ b/include/d/actor/d_a_obj_mirror_6pole.h @@ -54,7 +54,7 @@ public: inline void callInit(); inline void callExecute(); - static const actionFunc ActionTable[][2]; + static DUSK_GAME_DATA const actionFunc ActionTable[][2]; private: /* 0x568 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_mirror_screw.h b/include/d/actor/d_a_obj_mirror_screw.h index feeb6bf294..482506ffc0 100644 --- a/include/d/actor/d_a_obj_mirror_screw.h +++ b/include/d/actor/d_a_obj_mirror_screw.h @@ -80,8 +80,8 @@ private: /* 0x5D0 */ u8 field_0x5d0[8]; /* 0x5D8 */ cBgS_PolyInfo field_0x5d8; - static attr const M_attr; - static daObjMirrorScrew_actionFunc ActionTable[2][2]; + static DUSK_GAME_DATA attr const M_attr; + static DUSK_GAME_DATA daObjMirrorScrew_actionFunc ActionTable[2][2]; }; STATIC_ASSERT(sizeof(daObjMirrorScrew_c) == 0x5E8); diff --git a/include/d/actor/d_a_obj_movebox.h b/include/d/actor/d_a_obj_movebox.h index 0e8bf4e87a..4007a46ecc 100644 --- a/include/d/actor/d_a_obj_movebox.h +++ b/include/d/actor/d_a_obj_movebox.h @@ -122,12 +122,12 @@ struct Bgc_c { bool chk_wall_touch(daObjMovebox::Act_c const*, daObjMovebox::BgcSrc_c const*, s16); bool chk_wall_touch2(daObjMovebox::Act_c const*, daObjMovebox::BgcSrc_c const*, int, s16); - static const daObjMovebox::BgcSrc_c M_lin5[]; - static const daObjMovebox::BgcSrc_c M_lin20[]; + static DUSK_GAME_DATA const daObjMovebox::BgcSrc_c M_lin5[]; + static DUSK_GAME_DATA const daObjMovebox::BgcSrc_c M_lin20[]; - static dBgS_ObjGndChk M_gnd_work[23]; - static dBgS_WtrChk M_wrt_work; - static dBgS_ObjLinChk M_wall_work[23]; + static DUSK_GAME_DATA dBgS_ObjGndChk M_gnd_work[23]; + static DUSK_GAME_DATA dBgS_WtrChk M_wrt_work; + static DUSK_GAME_DATA dBgS_ObjLinChk M_wall_work[23]; /* 0x000 */ f32 field_0x0[23]; /* 0x05C */ int field_0x5c; @@ -213,11 +213,11 @@ struct Act_c : public dBgS_MoveBgActor { int getType() { return prm_get_type(); } - static const s16 M_dir_base[4]; - static const char* const M_arcname[8]; - static const dCcD_SrcCyl M_cyl_src; + static DUSK_GAME_DATA const s16 M_dir_base[4]; + static DUSK_GAME_DATA const char* const M_arcname[8]; + static DUSK_GAME_DATA const dCcD_SrcCyl M_cyl_src; - static const daObjMovebox::Attr_c M_attr[8]; + static DUSK_GAME_DATA const daObjMovebox::Attr_c M_attr[8]; /* 0x5A0 */ request_of_phase_process_class mPhase; /* 0x5A8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_nagaisu.h b/include/d/actor/d_a_obj_nagaisu.h index 107691d338..2d1e97dd17 100644 --- a/include/d/actor/d_a_obj_nagaisu.h +++ b/include/d/actor/d_a_obj_nagaisu.h @@ -29,7 +29,7 @@ public: mPos.z = i_pos.z; } - static const dCcD_SrcCyl s_CcDCyl; + static DUSK_GAME_DATA const dCcD_SrcCyl s_CcDCyl; /* 0x004 */ dMdl_obj_c mMdlObj; /* 0x038 */ Vec mPos; @@ -59,7 +59,7 @@ public: void init(); void setIsu(); - static const int REMOVE_ISU_IDX[]; + static DUSK_GAME_DATA const int REMOVE_ISU_IDX[]; /* 0x574 */ J3DModel* mpModel; /* 0x578 */ dCcD_Stts mCcStts; diff --git a/include/d/actor/d_a_obj_nameplate.h b/include/d/actor/d_a_obj_nameplate.h index 97b313099c..d6aa6356bb 100644 --- a/include/d/actor/d_a_obj_nameplate.h +++ b/include/d/actor/d_a_obj_nameplate.h @@ -40,10 +40,10 @@ public: /* 0x1F */ u8 field_0x1F; }; - static M_attrs const M_attr; + static DUSK_GAME_DATA M_attrs const M_attr; static M_attrs const& attr() { return M_attr; } - static char DUSK_CONST* DUSK_CONST l_arcName; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST l_arcName; ~daObjNameplate_c() { dComIfG_resDelete(&this->mPhase, l_arcName); } diff --git a/include/d/actor/d_a_obj_nougu.h b/include/d/actor/d_a_obj_nougu.h index 3e8e004e36..b8ea5aff06 100644 --- a/include/d/actor/d_a_obj_nougu.h +++ b/include/d/actor/d_a_obj_nougu.h @@ -16,7 +16,7 @@ class daObj_Nougu_Param_c { public: virtual ~daObj_Nougu_Param_c() {} - static const daObj_Nougu_HIOParam m; + static DUSK_GAME_DATA const daObj_Nougu_HIOParam m; }; #if DEBUG @@ -73,7 +73,7 @@ public: int getType() { return 0; } - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; }; STATIC_ASSERT(sizeof(daObj_Nougu_c) == 0xe30); diff --git a/include/d/actor/d_a_obj_oiltubo.h b/include/d/actor/d_a_obj_oiltubo.h index fa1dc47fd9..b4ee8612bc 100644 --- a/include/d/actor/d_a_obj_oiltubo.h +++ b/include/d/actor/d_a_obj_oiltubo.h @@ -33,8 +33,8 @@ public: BOOL chkEvent(); int wait(void*); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl DUSK_CONST mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl DUSK_CONST mCcDCyl; private: /* 0x568 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_onsenTaru.h b/include/d/actor/d_a_obj_onsenTaru.h index c7e992bb11..98c6d40aee 100644 --- a/include/d/actor/d_a_obj_onsenTaru.h +++ b/include/d/actor/d_a_obj_onsenTaru.h @@ -52,8 +52,8 @@ public: bool getTempStat() { return mTempStat; } void startTimer() { mStartTimer = true; } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; /* 0x56C */ request_of_phase_process_class mPhase; /* 0x574 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_ornament_cloth.h b/include/d/actor/d_a_obj_ornament_cloth.h index e0ea54b63d..69f509ebb3 100644 --- a/include/d/actor/d_a_obj_ornament_cloth.h +++ b/include/d/actor/d_a_obj_ornament_cloth.h @@ -61,7 +61,7 @@ public: const daObjOnCloth_Attr_c& attr() const { return M_attr; } - static daObjOnCloth_Attr_c const M_attr; + static DUSK_GAME_DATA daObjOnCloth_Attr_c const M_attr; /* 0x568 */ J3DModel* mpModel; /* 0x56C */ mDoExt_btkAnm* mBtkAnm; diff --git a/include/d/actor/d_a_obj_picture.h b/include/d/actor/d_a_obj_picture.h index 3460b60077..50d44d808b 100644 --- a/include/d/actor/d_a_obj_picture.h +++ b/include/d/actor/d_a_obj_picture.h @@ -39,11 +39,11 @@ public: #if DEBUG const #endif - static dCcD_SrcCps s_CcDCps; + static DUSK_GAME_DATA dCcD_SrcCps s_CcDCps; #if DEBUG const #endif - static dCcD_SrcCyl s_CcDCyl_pic_at; + static DUSK_GAME_DATA dCcD_SrcCyl s_CcDCyl_pic_at; private: /* 0x574 */ dCcD_Stts field_0x574; diff --git a/include/d/actor/d_a_obj_pleaf.h b/include/d/actor/d_a_obj_pleaf.h index 3571bb4026..5e7a5cde1c 100644 --- a/include/d/actor/d_a_obj_pleaf.h +++ b/include/d/actor/d_a_obj_pleaf.h @@ -15,7 +15,7 @@ class daObj_Pleaf_Param_c { public: virtual ~daObj_Pleaf_Param_c() {} - static daObj_Pleaf_HIOParam const m; + static DUSK_GAME_DATA daObj_Pleaf_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_pumpkin.h b/include/d/actor/d_a_obj_pumpkin.h index b1b36bfa1f..9dd015c00e 100644 --- a/include/d/actor/d_a_obj_pumpkin.h +++ b/include/d/actor/d_a_obj_pumpkin.h @@ -28,7 +28,7 @@ class daObj_Pumpkin_Param_c { public: virtual ~daObj_Pumpkin_Param_c() {} - static const daObj_Pumpkin_HIOParam m; + static DUSK_GAME_DATA const daObj_Pumpkin_HIOParam m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_rotTrap.h b/include/d/actor/d_a_obj_rotTrap.h index 4b7b669afc..9534358f4a 100644 --- a/include/d/actor/d_a_obj_rotTrap.h +++ b/include/d/actor/d_a_obj_rotTrap.h @@ -34,8 +34,8 @@ public: int getSw() { return fopAcM_GetParamBit(this, 0, 8); } - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x05A0 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_sakuita.h b/include/d/actor/d_a_obj_sakuita.h index 29b101586d..e9e4e82120 100644 --- a/include/d/actor/d_a_obj_sakuita.h +++ b/include/d/actor/d_a_obj_sakuita.h @@ -43,7 +43,7 @@ public: const daObjSakuita_Attr_c& attr() const { return M_attr; } - static daObjSakuita_Attr_c const M_attr; + static DUSK_GAME_DATA daObjSakuita_Attr_c const M_attr; private: /* 0x568 */ J3DModel* mModel; diff --git a/include/d/actor/d_a_obj_sakuita_rope.h b/include/d/actor/d_a_obj_sakuita_rope.h index 9567b7f25f..dfbed5af0e 100644 --- a/include/d/actor/d_a_obj_sakuita_rope.h +++ b/include/d/actor/d_a_obj_sakuita_rope.h @@ -80,7 +80,7 @@ public: return field_0x62c * (pos->z - getRopeStartPos()->z); } - static daObjItaRope_Attr_c const M_attr; + static DUSK_GAME_DATA daObjItaRope_Attr_c const M_attr; private: /* 0x570 */ mDoExt_3DlineMat1_c mLineMat; diff --git a/include/d/actor/d_a_obj_scannon.h b/include/d/actor/d_a_obj_scannon.h index 9aa871bd77..0b1a79e18f 100644 --- a/include/d/actor/d_a_obj_scannon.h +++ b/include/d/actor/d_a_obj_scannon.h @@ -76,12 +76,12 @@ public: int getSw1() { return fopAcM_GetParamBit(this, 0, 8); } int getSw2() { return fopAcM_GetParamBit(this, 8, 8); } - static const demoTable_s s_demoTable[]; - static void (daSCannon_c::*DUSK_CONST s_exeProc[])(); - static void (daSCannon_c::*DUSK_CONST s_demoExeProc_WarpEnd[][2])(); - static void (daSCannon_c::*DUSK_CONST s_demoExeProc_FireTks[][2])(); - static void (daSCannon_c::*DUSK_CONST s_demoExeProc_FireFirst[][2])(); - static void (daSCannon_c::*DUSK_CONST s_demoExeProc_FireSecond[][2])(); + static DUSK_GAME_DATA const demoTable_s s_demoTable[]; + static DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST s_exeProc[])(); + static DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST s_demoExeProc_WarpEnd[][2])(); + static DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST s_demoExeProc_FireTks[][2])(); + static DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST s_demoExeProc_FireFirst[][2])(); + static DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST s_demoExeProc_FireSecond[][2])(); private: /* 0x574 */ request_of_phase_process_class mZevPhase; diff --git a/include/d/actor/d_a_obj_scannon_crs.h b/include/d/actor/d_a_obj_scannon_crs.h index e390c60128..d7eb7c8121 100644 --- a/include/d/actor/d_a_obj_scannon_crs.h +++ b/include/d/actor/d_a_obj_scannon_crs.h @@ -49,7 +49,7 @@ public: int getWarpId() { return fopAcM_GetParamBit(this, 8, 8); } u16 getMsgId() { return home.angle.x; } - static void (daSCannonCrs_c::*s_exeProc[])(daMidna_c*); + static DUSK_GAME_DATA void (daSCannonCrs_c::*s_exeProc[])(daMidna_c*); private: /* 0x574 */ cXyz mPortalWaitPos; diff --git a/include/d/actor/d_a_obj_scannon_ten.h b/include/d/actor/d_a_obj_scannon_ten.h index 503a1e0522..7bc5b24ed8 100644 --- a/include/d/actor/d_a_obj_scannon_ten.h +++ b/include/d/actor/d_a_obj_scannon_ten.h @@ -57,8 +57,8 @@ public: void exeEmtLine(); void delEmtAll(); - static const ExeProc s_exeProc[]; - static const ExeProc s_demoExeProc[][2]; + static DUSK_GAME_DATA const ExeProc s_exeProc[]; + static DUSK_GAME_DATA const ExeProc s_demoExeProc[][2]; private: /* 0x574 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_sekidoor.h b/include/d/actor/d_a_obj_sekidoor.h index ae4ff9acd4..46da5cb8a9 100644 --- a/include/d/actor/d_a_obj_sekidoor.h +++ b/include/d/actor/d_a_obj_sekidoor.h @@ -14,7 +14,7 @@ class daObj_SekiDoor_Param_c { public: virtual ~daObj_SekiDoor_Param_c() {}; - static daObj_SekiDoor_HIOParam const m; + static DUSK_GAME_DATA daObj_SekiDoor_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_sekizo.h b/include/d/actor/d_a_obj_sekizo.h index 54fa84f5df..0f0847dc24 100644 --- a/include/d/actor/d_a_obj_sekizo.h +++ b/include/d/actor/d_a_obj_sekizo.h @@ -10,7 +10,7 @@ struct daObj_Sekizo_HIOParam { class daObj_Sekizo_Param_c { public: virtual ~daObj_Sekizo_Param_c() {} - static daObj_Sekizo_HIOParam const m; + static DUSK_GAME_DATA daObj_Sekizo_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_sekizoa.h b/include/d/actor/d_a_obj_sekizoa.h index ce924915e1..b5c6abd9c3 100644 --- a/include/d/actor/d_a_obj_sekizoa.h +++ b/include/d/actor/d_a_obj_sekizoa.h @@ -57,7 +57,7 @@ class daObj_Sekizoa_Param_c { public: virtual ~daObj_Sekizoa_Param_c() {} - static daObj_Sekizoa_HIOParam const m; + static DUSK_GAME_DATA daObj_Sekizoa_HIOParam const m; }; #if DEBUG @@ -268,8 +268,8 @@ public: -300.0f, 0); } - static char DUSK_CONST* DUSK_CONST mCutNameList[9]; - static cutFunc DUSK_CONST mCutList[9]; + static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[9]; + static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[9]; /* 0x0E40 */ mDoExt_McaMorfSO* mpMcaMorf; /* 0x0E44 */ mDoExt_invisibleModel mInvModel; diff --git a/include/d/actor/d_a_obj_smtile.h b/include/d/actor/d_a_obj_smtile.h index 1832a7c4b8..735914f0a0 100644 --- a/include/d/actor/d_a_obj_smtile.h +++ b/include/d/actor/d_a_obj_smtile.h @@ -12,7 +12,7 @@ class daObj_SMTile_Param_c { public: virtual ~daObj_SMTile_Param_c() {} - static daObj_SMTile_HIOParam const m; + static DUSK_GAME_DATA daObj_SMTile_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_ss_drink.h b/include/d/actor/d_a_obj_ss_drink.h index c20992163b..e49644f6b6 100644 --- a/include/d/actor/d_a_obj_ss_drink.h +++ b/include/d/actor/d_a_obj_ss_drink.h @@ -47,8 +47,8 @@ public: virtual ~daObj_SSDrink_c(); virtual void setSoldOut(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl DUSK_CONST mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl DUSK_CONST mCcDCyl; private: /* 0x578 */ mDoExt_btpAnm* mpBtpAnm; diff --git a/include/d/actor/d_a_obj_ss_item.h b/include/d/actor/d_a_obj_ss_item.h index 2b05046e28..cd219a1832 100644 --- a/include/d/actor/d_a_obj_ss_item.h +++ b/include/d/actor/d_a_obj_ss_item.h @@ -46,8 +46,8 @@ public: int buy(void* param_0); int cancel(void* param_0); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl DUSK_CONST mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl DUSK_CONST mCcDCyl; private: /* 0x578 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_stairBlock.h b/include/d/actor/d_a_obj_stairBlock.h index 63a0c5b178..3d3b8d5283 100644 --- a/include/d/actor/d_a_obj_stairBlock.h +++ b/include/d/actor/d_a_obj_stairBlock.h @@ -23,8 +23,8 @@ public: virtual int Draw(); virtual int Delete(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; private: /* 0x056C */ request_of_phase_process_class mPhaseReq; diff --git a/include/d/actor/d_a_obj_stick.h b/include/d/actor/d_a_obj_stick.h index fe43aabd15..ebc08e08b8 100644 --- a/include/d/actor/d_a_obj_stick.h +++ b/include/d/actor/d_a_obj_stick.h @@ -16,7 +16,7 @@ class daObj_Stick_Param_c { public: virtual ~daObj_Stick_Param_c() {} - static const daObj_Stick_HIOParam m; + static DUSK_GAME_DATA const daObj_Stick_HIOParam m; }; #if DEBUG @@ -73,7 +73,7 @@ public: u32 getType() { return 0; } - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; }; STATIC_ASSERT(sizeof(daObj_Stick_c) == 0x950); diff --git a/include/d/actor/d_a_obj_swpush.h b/include/d/actor/d_a_obj_swpush.h index 5c73d2b310..77b7557d69 100644 --- a/include/d/actor/d_a_obj_swpush.h +++ b/include/d/actor/d_a_obj_swpush.h @@ -142,12 +142,12 @@ namespace daObjSwpush { int Mthd_Execute(); int Mthd_Draw(); - static s16 const M_bmd[3]; - static s16 const M_dzb[3]; - static u32 const M_heap_size[3]; - static Hio_c::Attr_c const M_attr[5]; - static u8 const M_op_vtx[4]; - static DUSK_CONST char* M_arcname[3]; + static DUSK_GAME_DATA s16 const M_bmd[3]; + static DUSK_GAME_DATA s16 const M_dzb[3]; + static DUSK_GAME_DATA u32 const M_heap_size[3]; + static DUSK_GAME_DATA Hio_c::Attr_c const M_attr[5]; + static DUSK_GAME_DATA u8 const M_op_vtx[4]; + static DUSK_GAME_DATA DUSK_CONST char* M_arcname[3]; /* 0x568 */ request_of_phase_process_class mPhase; /* 0x570 */ dBgWSv* mpBgW; diff --git a/include/d/actor/d_a_obj_swpush2.h b/include/d/actor/d_a_obj_swpush2.h index a99800e4c4..751c35abf6 100644 --- a/include/d/actor/d_a_obj_swpush2.h +++ b/include/d/actor/d_a_obj_swpush2.h @@ -128,8 +128,8 @@ namespace daObjSwpush2 { void off_switch() const { fopAcM_offSwitch(this, prm_get_swSave()); } void rev_switch() const { fopAcM_revSwitch(this, prm_get_swSave()); } - static const char M_arcname[]; - static const Attr_c M_attr[4]; + static DUSK_GAME_DATA const char M_arcname[]; + static DUSK_GAME_DATA const Attr_c M_attr[4]; #if DEBUG static Hio_c M_hio; diff --git a/include/d/actor/d_a_obj_syRock.h b/include/d/actor/d_a_obj_syRock.h index 0af85cbaa6..2c881585ed 100644 --- a/include/d/actor/d_a_obj_syRock.h +++ b/include/d/actor/d_a_obj_syRock.h @@ -43,8 +43,8 @@ public: int Draw(); int Delete(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5B8 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_taFence.h b/include/d/actor/d_a_obj_taFence.h index 5d18cf5cc0..6ab2e31f0a 100644 --- a/include/d/actor/d_a_obj_taFence.h +++ b/include/d/actor/d_a_obj_taFence.h @@ -32,8 +32,8 @@ public: virtual int Draw(); virtual int Delete(); - static const dCcD_SrcGObjInf mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA const dCcD_SrcGObjInf mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; /* 0x05A0 */ request_of_phase_process_class mPhase; /* 0x05A8 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_tks.h b/include/d/actor/d_a_obj_tks.h index 9d98f8cd0b..2180e99494 100644 --- a/include/d/actor/d_a_obj_tks.h +++ b/include/d/actor/d_a_obj_tks.h @@ -17,7 +17,7 @@ class daObjTks_Param_c { public: virtual ~daObjTks_Param_c() {} - static const daObjTks_HIOParam m; + static DUSK_GAME_DATA const daObjTks_HIOParam m; }; #if DEBUG diff --git a/include/d/actor/d_a_obj_togeTrap.h b/include/d/actor/d_a_obj_togeTrap.h index 161c958ce0..4055d6a42e 100644 --- a/include/d/actor/d_a_obj_togeTrap.h +++ b/include/d/actor/d_a_obj_togeTrap.h @@ -44,8 +44,8 @@ public: u8 getSwBit() { return fopAcM_GetParamBit(this, 0, 8); } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; private: /* 0x5A0 */ dCcD_Stts mStts; diff --git a/include/d/actor/d_a_obj_waterPillar.h b/include/d/actor/d_a_obj_waterPillar.h index 6bcad283da..19b55971e8 100644 --- a/include/d/actor/d_a_obj_waterPillar.h +++ b/include/d/actor/d_a_obj_waterPillar.h @@ -55,10 +55,10 @@ public: int draw(); int _delete(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcGObjInf const mCcDObjCoInfo; - static dCcD_SrcCps mCcDCps; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjCoInfo; + static DUSK_GAME_DATA dCcD_SrcCps mCcDCps; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; void onRockFlag() { mCarryingStalactite = true; diff --git a/include/d/actor/d_a_obj_wdStick.h b/include/d/actor/d_a_obj_wdStick.h index c82b115b84..08bc2a1faf 100644 --- a/include/d/actor/d_a_obj_wdStick.h +++ b/include/d/actor/d_a_obj_wdStick.h @@ -50,8 +50,8 @@ public: virtual int Draw(); virtual int Delete(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; private: /* 0x56C */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_obj_yel_bag.h b/include/d/actor/d_a_obj_yel_bag.h index 69b428da49..caeba24ae5 100644 --- a/include/d/actor/d_a_obj_yel_bag.h +++ b/include/d/actor/d_a_obj_yel_bag.h @@ -24,7 +24,7 @@ class daObj_YBag_Param_c { public: virtual ~daObj_YBag_Param_c() {} - static daObj_YBag_HIOParam const m; + static DUSK_GAME_DATA daObj_YBag_HIOParam const m; }; #if DEBUG @@ -109,8 +109,8 @@ public: void setWaterPrtcl(); void setHamonPrtcl(); - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daObj_YBag_c) == 0xa3c); diff --git a/include/d/actor/d_a_obj_yobikusa.h b/include/d/actor/d_a_obj_yobikusa.h index 9c1ee2a746..a3dfa944fa 100644 --- a/include/d/actor/d_a_obj_yobikusa.h +++ b/include/d/actor/d_a_obj_yobikusa.h @@ -76,8 +76,8 @@ public: inline cPhs_Step create(); inline ~daObjYobikusa_c(); - static attributes const M_attr; - static actionFuncEntry ActionTable[3]; + static DUSK_GAME_DATA attributes const M_attr; + static DUSK_GAME_DATA actionFuncEntry ActionTable[3]; const attributes* attr() const { return &M_attr; } int getType() { return argument & 0x7F; } diff --git a/include/d/actor/d_a_obj_zrTurara.h b/include/d/actor/d_a_obj_zrTurara.h index 9f48464cf9..679ae20635 100644 --- a/include/d/actor/d_a_obj_zrTurara.h +++ b/include/d/actor/d_a_obj_zrTurara.h @@ -50,8 +50,8 @@ public: int getSwBit2() { return fopAcM_GetParamBit(this, 8, 8); } int getScale() { return fopAcM_GetParamBit(this, 0x10, 8); } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcCyl mCcDCyl; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl; }; STATIC_ASSERT(sizeof(daZrTurara_c) == 0x76C); diff --git a/include/d/actor/d_a_obj_zrTuraraRock.h b/include/d/actor/d_a_obj_zrTuraraRock.h index 4590cff2cf..1f92de6e82 100644 --- a/include/d/actor/d_a_obj_zrTuraraRock.h +++ b/include/d/actor/d_a_obj_zrTuraraRock.h @@ -45,8 +45,8 @@ private: public: u8 getScale() { return fopAcM_GetParamBit(this, 0, 8); } - static dCcD_SrcGObjInf const mCcDObjInfo; - static dCcD_SrcSph mCcDSph; + static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo; + static DUSK_GAME_DATA dCcD_SrcSph mCcDSph; }; STATIC_ASSERT(sizeof(daZrTuraRc_c) == 0x938); diff --git a/include/d/actor/d_a_passer_mng.h b/include/d/actor/d_a_passer_mng.h index 230432336c..ced02d9d1d 100644 --- a/include/d/actor/d_a_passer_mng.h +++ b/include/d/actor/d_a_passer_mng.h @@ -257,7 +257,7 @@ public: int field_0x04[0]; }; - static const Group* mGroupTbl[4]; + static DUSK_GAME_DATA const Group* mGroupTbl[4]; private: /* 0x568 */ fpc_ProcID* childProcIds; diff --git a/include/d/actor/d_a_peru.h b/include/d/actor/d_a_peru.h index 9ea1ce80c1..771e879b10 100644 --- a/include/d/actor/d_a_peru.h +++ b/include/d/actor/d_a_peru.h @@ -59,7 +59,7 @@ class daPeru_Param_c { public: virtual ~daPeru_Param_c() {} - static daPeru_HIOParam const m; + static DUSK_GAME_DATA daPeru_HIOParam const m; }; #if DEBUG @@ -186,8 +186,8 @@ public: void setCnt(int cnt) { field_0xe6a = cnt; } int getCnt() { return field_0xe6a; } - static const char* mCutNameList[3]; - static cutAppearFunc mCutList[3]; + static DUSK_GAME_DATA const char* mCutNameList[3]; + static DUSK_GAME_DATA cutAppearFunc mCutList[3]; private: /* 0x0E40 */ daNpcT_ActorMngr_c mActors[3]; diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 1dfbec8783..66139b54cf 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -67,8 +67,8 @@ public: static void offEventKeepFlg() { m_eventKeepFlg = 0; } static void onEventKeepFlg() { m_eventKeepFlg = 1; } - static s16 m_dropAngleY; - static s16 m_eventKeepFlg; + static DUSK_GAME_DATA s16 m_dropAngleY; + static DUSK_GAME_DATA s16 m_eventKeepFlg; private: /* 0x0 */ u8 field_0x0; @@ -1213,7 +1213,7 @@ public: onEndResetFlg0(ERFLG0_FISHING_RELEASE); } - static daMidna_c* m_midnaActor; + static DUSK_GAME_DATA daMidna_c* m_midnaActor; void setGiantPuzzle() { mMode = SMODE_WOLF_PUZZLE; } void setGiantPuzzleEnd() { mMode = 0; } diff --git a/include/d/actor/d_a_suspend.h b/include/d/actor/d_a_suspend.h index 32cdf76864..9475aae38e 100644 --- a/include/d/actor/d_a_suspend.h +++ b/include/d/actor/d_a_suspend.h @@ -69,9 +69,9 @@ public: u8 getSw() { return fopAcM_GetParam(this) & 0xFF; } u8 getRoom() { return fopAcM_GetParam(this) >> 10; } - static data_c mData[0x20]; - static room_c mRoom[0x40]; - static s16 mSetTop; + static DUSK_GAME_DATA data_c mData[0x20]; + static DUSK_GAME_DATA room_c mRoom[0x40]; + static DUSK_GAME_DATA s16 mSetTop; }; #endif /* D_A_SUSPEND_H */ diff --git a/include/d/actor/d_a_tag_TWgate.h b/include/d/actor/d_a_tag_TWgate.h index e5952da286..1886690db2 100644 --- a/include/d/actor/d_a_tag_TWgate.h +++ b/include/d/actor/d_a_tag_TWgate.h @@ -112,11 +112,11 @@ public: inline void setAction(Mode_e i_action); - static daTagTWGate_Attr_c const mAttr; + static DUSK_GAME_DATA daTagTWGate_Attr_c const mAttr; #if DEBUG static daTagTWGate_Hio_c mHio; #endif - static const actionFunc ActionTable[][2]; + static DUSK_GAME_DATA const actionFunc ActionTable[][2]; private: /* 0x568 */ mDoExt_McaMorfSO* mpMorf; diff --git a/include/d/actor/d_a_tag_evt.h b/include/d/actor/d_a_tag_evt.h index fda3192704..6d9b85221b 100644 --- a/include/d/actor/d_a_tag_evt.h +++ b/include/d/actor/d_a_tag_evt.h @@ -17,7 +17,7 @@ public: int doEvtCutTalk(int); int doEvtCutNext(int); - static DUSK_CONST char* mEvtCutList[3]; + static DUSK_GAME_DATA DUSK_CONST char* mEvtCutList[3]; /* 0x568 */ char field_0x568[8]; /* 0x570 */ u16 field_0x570; diff --git a/include/d/actor/d_a_tag_evtmsg.h b/include/d/actor/d_a_tag_evtmsg.h index 33a8d41f49..a1011ee8e4 100644 --- a/include/d/actor/d_a_tag_evtmsg.h +++ b/include/d/actor/d_a_tag_evtmsg.h @@ -32,8 +32,8 @@ public: virtual ~daTag_EvtMsg_c(); - static DUSK_CONST char* mEvtCutNameList[]; - static EvtCutFunc mEvtCutList[]; + static DUSK_GAME_DATA DUSK_CONST char* mEvtCutNameList[]; + static DUSK_GAME_DATA EvtCutFunc mEvtCutList[]; }; #endif /* D_A_TAG_EVTMSG_H */ diff --git a/include/d/actor/d_a_tag_hstop.h b/include/d/actor/d_a_tag_hstop.h index 6a5ae38beb..97b0a68f7b 100644 --- a/include/d/actor/d_a_tag_hstop.h +++ b/include/d/actor/d_a_tag_hstop.h @@ -22,8 +22,8 @@ public: } } - static daTagHstop_c* m_top; - static dMsgFlow_c m_msgFlow; + static DUSK_GAME_DATA daTagHstop_c* m_top; + static DUSK_GAME_DATA dMsgFlow_c m_msgFlow; /* 0x568 */ daTagHstop_c* mNext; /* 0x568 */ daTagHstop_c* mPrev; diff --git a/include/d/actor/d_a_tag_lantern.h b/include/d/actor/d_a_tag_lantern.h index c0e0c0d152..ed9cbef3e3 100644 --- a/include/d/actor/d_a_tag_lantern.h +++ b/include/d/actor/d_a_tag_lantern.h @@ -12,7 +12,7 @@ class daTag_Lantern_Param_c { public: inline virtual ~daTag_Lantern_Param_c() {} - static daTag_Lantern_HIOParam const m; + static DUSK_GAME_DATA daTag_Lantern_HIOParam const m; }; #if DEBUG diff --git a/include/d/actor/d_a_tag_magne.h b/include/d/actor/d_a_tag_magne.h index 2b2db66517..bfdc788e37 100644 --- a/include/d/actor/d_a_tag_magne.h +++ b/include/d/actor/d_a_tag_magne.h @@ -19,7 +19,7 @@ public: u8 getSwNo2() { return fopAcM_GetParamBit(this, 8, 8); } u8 getSwNo3() { return fopAcM_GetParamBit(this, 16, 8); } - static daTagMagne_c* mTagMagne; + static DUSK_GAME_DATA daTagMagne_c* mTagMagne; /* 0x568 */ u8 mSwNo1; /* 0x569 */ u8 mSwNo2; diff --git a/include/d/actor/d_a_tag_mist.h b/include/d/actor/d_a_tag_mist.h index 9579ff62d5..3c4973075a 100644 --- a/include/d/actor/d_a_tag_mist.h +++ b/include/d/actor/d_a_tag_mist.h @@ -17,7 +17,7 @@ public: static u8 getPlayerNo(); static void setPlayerNo(u8 i_playerNo) { mPlayerNo = i_playerNo; } - static u8 mPlayerNo; + static DUSK_GAME_DATA u8 mPlayerNo; /* 0x568 */ u8 unused_0x568[0x570 - 0x568]; /* 0x570 */ cXyz mVertices[4]; diff --git a/include/d/actor/d_a_tag_msg.h b/include/d/actor/d_a_tag_msg.h index b1104d6846..b0b65e2795 100644 --- a/include/d/actor/d_a_tag_msg.h +++ b/include/d/actor/d_a_tag_msg.h @@ -13,7 +13,7 @@ class daTag_Msg_Param_c { public: virtual ~daTag_Msg_Param_c() {} - static const daTag_Msg_HIO_Param_c m; + static DUSK_GAME_DATA const daTag_Msg_HIO_Param_c m; }; #if DEBUG @@ -47,7 +47,7 @@ public: void getParam(); BOOL cut_speak(int, BOOL); - static DUSK_CONST char* mEvtCutTBL[2]; + static DUSK_GAME_DATA DUSK_CONST char* mEvtCutTBL[2]; /* 0x56C */ char mStaffName[8]; /* 0x574 */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_tag_stream.h b/include/d/actor/d_a_tag_stream.h index 7c3b3eb4ac..f30abfec15 100644 --- a/include/d/actor/d_a_tag_stream.h +++ b/include/d/actor/d_a_tag_stream.h @@ -42,7 +42,7 @@ public: /* 0x570 */ daTagStream_c* field_0x570; /* 0x574 */ daTagStream_c* mNext; - static daTagStream_c* m_top; + static DUSK_GAME_DATA daTagStream_c* m_top; }; #endif /* D_A_TAG_STREAM_H */ diff --git a/include/d/actor/d_a_ykgr.h b/include/d/actor/d_a_ykgr.h index 472ceefc4a..c23f530c67 100644 --- a/include/d/actor/d_a_ykgr.h +++ b/include/d/actor/d_a_ykgr.h @@ -57,12 +57,12 @@ public: int _execute(); bool _draw(); - static JPABaseEmitter* m_emitter; - static bool m_flag; - static bool m_alpha_flag; - static u8 m_alpha; - static f32 m_aim_rate; - static dPath* m_path; + static DUSK_GAME_DATA JPABaseEmitter* m_emitter; + static DUSK_GAME_DATA bool m_flag; + static DUSK_GAME_DATA bool m_alpha_flag; + static DUSK_GAME_DATA u8 m_alpha; + static DUSK_GAME_DATA f32 m_aim_rate; + static DUSK_GAME_DATA dPath* m_path; /* 0x568 */ u8 field_0x568[0x570 - 0x568]; /* 0x570 */ Mtx field_0x570; diff --git a/include/d/actor/d_flower.h b/include/d/actor/d_flower.h index f63847956a..cda0845867 100644 --- a/include/d/actor/d_flower.h +++ b/include/d/actor/d_flower.h @@ -74,7 +74,7 @@ public: return m_deleteRoom; } - static deleteFunc m_deleteRoom; + static DUSK_GAME_DATA deleteFunc m_deleteRoom; dFlower_anm_c* getAnm(int i_idx) { return &m_anm[i_idx]; } dFlower_anm_c* getAnm() { return &m_anm[0]; } diff --git a/include/d/actor/d_grass.h b/include/d/actor/d_grass.h index b7cc3d7d95..a7ed081198 100644 --- a/include/d/actor/d_grass.h +++ b/include/d/actor/d_grass.h @@ -84,7 +84,7 @@ public: return m_deleteRoom; } - static deleteFunc m_deleteRoom; + static DUSK_GAME_DATA deleteFunc m_deleteRoom; dGrass_anm_c* getAnm() { return m_anm; } dGrass_anm_c* getAnm(int i_no) { return &m_anm[i_no]; } diff --git a/include/d/d_a_item_static.h b/include/d/d_a_item_static.h index 10869c5733..36c445d511 100644 --- a/include/d/d_a_item_static.h +++ b/include/d/d_a_item_static.h @@ -114,9 +114,9 @@ public: bool checkBoomWindTgTimer() { return mBoomWindTgTimer == 0; } - static procFunc mFuncPtr[]; - static const dCcD_SrcCyl m_cyl_src; - static s32 m_timer_max; + static DUSK_GAME_DATA procFunc mFuncPtr[]; + static DUSK_GAME_DATA const dCcD_SrcCyl m_cyl_src; + static DUSK_GAME_DATA s32 m_timer_max; /* 0x92C */ s16 field_0x92c; /* 0x92E */ u16 field_0x92e; diff --git a/include/d/d_a_shop_item_static.h b/include/d/d_a_shop_item_static.h index 0091c0b83c..eeda9185da 100644 --- a/include/d/d_a_shop_item_static.h +++ b/include/d/d_a_shop_item_static.h @@ -74,8 +74,8 @@ public: s16 getAngleY() const { return mAngleY; } void setAngleY(s16 angle) { mAngleY = angle;} - static ResourceData const mData[23]; - static f32 const m_cullfar_max; + static DUSK_GAME_DATA ResourceData const mData[23]; + static DUSK_GAME_DATA f32 const m_cullfar_max; enum { SHOP_ITEMNO_SOLD, diff --git a/include/d/d_attention.h b/include/d/d_attention.h index 5b8930b5dd..8e3b8be1f5 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -286,13 +286,13 @@ public: void keepLock(int timer) { mAttnBlockTimer = timer; } bool Lockon() { return LockonTruth() || chkFlag(0x20000000); } // only matches with -O2? - static type_tbl_entry loc_type_tbl[3]; - static type_tbl_entry act_type_tbl[5]; - static dist_entry dist_table[234]; - static int loc_type_num; - static int act_type_num; - static type_tbl_entry chk_type_tbl[1]; - static int chk_type_num; + static DUSK_GAME_DATA type_tbl_entry loc_type_tbl[3]; + static DUSK_GAME_DATA type_tbl_entry act_type_tbl[5]; + static DUSK_GAME_DATA dist_entry dist_table[234]; + static DUSK_GAME_DATA int loc_type_num; + static DUSK_GAME_DATA int act_type_num; + static DUSK_GAME_DATA type_tbl_entry chk_type_tbl[1]; + static DUSK_GAME_DATA int chk_type_num; public: /* 0x000 */ fopAc_ac_c* mpPlayer; diff --git a/include/d/d_bg_parts.h b/include/d/d_bg_parts.h index a8dba41165..b77199182f 100644 --- a/include/d/d_bg_parts.h +++ b/include/d/d_bg_parts.h @@ -237,8 +237,8 @@ public: static void drawShare(); static void entryShare(packet_c*); - static JKRSolidHeap* mShareHeap; - static share_c* mShare; + static DUSK_GAME_DATA JKRSolidHeap* mShareHeap; + static DUSK_GAME_DATA share_c* mShare; /* 0x000 */ void* mPointer; /* 0x004 */ char mArcName[8]; diff --git a/include/d/d_bg_s_movebg_actor.h b/include/d/d_bg_s_movebg_actor.h index be09052ee5..bd9e5351b6 100644 --- a/include/d/d_bg_s_movebg_actor.h +++ b/include/d/d_bg_s_movebg_actor.h @@ -35,9 +35,9 @@ public: virtual int ToFore(); virtual int ToBack(); - static const char* m_name; - static int m_dzb_id; - static MoveBGActor_SetFunc m_set_func; + static DUSK_GAME_DATA const char* m_name; + static DUSK_GAME_DATA int m_dzb_id; + static DUSK_GAME_DATA MoveBGActor_SetFunc m_set_func; }; STATIC_ASSERT(sizeof(dBgS_MoveBgActor) == 0x5a0); diff --git a/include/d/d_camera.h b/include/d/d_camera.h index f98667d988..6c95d1ce51 100644 --- a/include/d/d_camera.h +++ b/include/d/d_camera.h @@ -1169,7 +1169,7 @@ public: return mCamSetup.Far(); } - static engine_fn engine_tbl[]; + static DUSK_GAME_DATA engine_fn engine_tbl[]; /* 0x000 */ camera_class* field_0x0; #if PARTIAL_DEBUG || DEBUG // Ensure struct layout consistent in all TUs. diff --git a/include/d/d_cc_d.h b/include/d/d_cc_d.h index 19f0430498..40ffae33da 100644 --- a/include/d/d_cc_d.h +++ b/include/d/d_cc_d.h @@ -424,7 +424,7 @@ public: bool ChkTgShieldHit() { return mGObjTg.ChkRPrm(2); } bool ChkTgSpinnerReflect() { return mGObjTg.ChkSPrm(0x200); } - static const Z2SoundID m_hitSeID[24]; + static DUSK_GAME_DATA const Z2SoundID m_hitSeID[24]; protected: /* 0x058 */ dCcD_GObjAt mGObjAt; diff --git a/include/d/d_cc_s.h b/include/d/d_cc_s.h index d156867cce..0ebf4a5265 100644 --- a/include/d/d_cc_s.h +++ b/include/d/d_cc_s.h @@ -75,7 +75,7 @@ public: BOOL ChkLine(cXyz&, cXyz&, f32, fopAc_ac_c**); #endif - static bool m_mtrl_hit_tbl[64]; + static DUSK_GAME_DATA bool m_mtrl_hit_tbl[64]; // /* 0x0000 */ cCcS mCCcS; /* 0x284C */ dCcMassS_Mng mMass_Mng; diff --git a/include/d/d_com_inf_actor.h b/include/d/d_com_inf_actor.h index da5e5fc62f..5ebd30c33c 100644 --- a/include/d/d_com_inf_actor.h +++ b/include/d/d_com_inf_actor.h @@ -14,8 +14,8 @@ public: /* 0x4 */ bool mPause; }; -extern dComIfGoat_info_c g_dComIfGoat_gameInfo; -extern dComIfAc_info_c g_dComIfAc_gameInfo; +DUSK_GAME_EXTERN dComIfGoat_info_c g_dComIfGoat_gameInfo; +DUSK_GAME_EXTERN dComIfAc_info_c g_dComIfAc_gameInfo; inline bool dComIfA_PauseCheck() { return g_dComIfAc_gameInfo.mPause; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 562b4ce33e..98b6dbe81d 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1050,10 +1050,10 @@ public: STATIC_ASSERT(122384 == sizeof(dComIfG_inf_c)); DUSK_GAME_EXTERN dComIfG_inf_c g_dComIfG_gameInfo; -extern GXColor g_blackColor; -extern GXColor g_clearColor; -extern GXColor g_whiteColor; -extern GXColor g_saftyWhiteColor; +DUSK_GAME_EXTERN GXColor g_blackColor; +DUSK_GAME_EXTERN GXColor g_clearColor; +DUSK_GAME_EXTERN GXColor g_whiteColor; +DUSK_GAME_EXTERN GXColor g_saftyWhiteColor; int dComLbG_PhaseHandler(request_of_phase_process_class*, request_of_phase_process_fn*, void*); diff --git a/include/d/d_debug_pad.h b/include/d/d_debug_pad.h index 4c5658adf4..b68e8f8b9b 100644 --- a/include/d/d_debug_pad.h +++ b/include/d/d_debug_pad.h @@ -29,6 +29,6 @@ public: /* 0x4 */ s32 mMode; }; -extern dDebugPad_c dDebugPad; +DUSK_GAME_EXTERN dDebugPad_c dDebugPad; #endif diff --git a/include/d/d_demo.h b/include/d/d_demo.h index e72698ed9a..8eef24d7e3 100644 --- a/include/d/d_demo.h +++ b/include/d/d_demo.h @@ -381,26 +381,26 @@ public: return m_object->getActiveCamera(); } - static s16 m_branchId; + static DUSK_GAME_DATA s16 m_branchId; static u16 m_branchNum; - static dDemo_system_c* m_system; - static JStudio::TControl* m_control; - static JStudio_JStage::TCreateObject* m_stage; - static JStudio_JAudio2::TCreateObject* m_audio; - static dDemo_particle_c* m_particle; - static JStudio::TCreateObject* m_message; - static JStudio::TFactory* m_factory; - static jmessage_tControl* m_mesgControl; - static dDemo_object_c* m_object; - static const u8* m_data; - static int m_frame; - static cXyz* m_translation; - static f32 m_rotationY; - static u32 m_frameNoMsg; - static s32 m_mode; - static u32 m_status; - static u16 m_branchType; - static const u8* m_branchData; + static DUSK_GAME_DATA dDemo_system_c* m_system; + static DUSK_GAME_DATA JStudio::TControl* m_control; + static DUSK_GAME_DATA JStudio_JStage::TCreateObject* m_stage; + static DUSK_GAME_DATA JStudio_JAudio2::TCreateObject* m_audio; + static DUSK_GAME_DATA dDemo_particle_c* m_particle; + static DUSK_GAME_DATA JStudio::TCreateObject* m_message; + static DUSK_GAME_DATA JStudio::TFactory* m_factory; + static DUSK_GAME_DATA jmessage_tControl* m_mesgControl; + static DUSK_GAME_DATA dDemo_object_c* m_object; + static DUSK_GAME_DATA const u8* m_data; + static DUSK_GAME_DATA int m_frame; + static DUSK_GAME_DATA cXyz* m_translation; + static DUSK_GAME_DATA f32 m_rotationY; + static DUSK_GAME_DATA u32 m_frameNoMsg; + static DUSK_GAME_DATA s32 m_mode; + static DUSK_GAME_DATA u32 m_status; + static DUSK_GAME_DATA u16 m_branchType; + static DUSK_GAME_DATA const u8* m_branchData; }; #endif /* D_D_DEMO_H */ diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index 8368c9e92e..907cf7b178 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -301,7 +301,7 @@ public: static TGXTexObj* getSimpleTex() { return &mSimpleTexObj; } - static TGXTexObj mSimpleTexObj; + static DUSK_GAME_DATA TGXTexObj mSimpleTexObj; private: /* 0x00000 */ u8 field_0x0; @@ -512,11 +512,11 @@ public: static void offWipe() { mWipe = 0; } static f32 getWipeRate() { return mWipeRate; } - static dDlst_2DT2_c mWipeDlst; - static GXColor mWipeColor; - static f32 mWipeRate; - static f32 mWipeSpeed; - static u8 mWipe; + static DUSK_GAME_DATA dDlst_2DT2_c mWipeDlst; + static DUSK_GAME_DATA GXColor mWipeColor; + static DUSK_GAME_DATA f32 mWipeRate; + static DUSK_GAME_DATA f32 mWipeSpeed; + static DUSK_GAME_DATA u8 mWipe; private: /* 0x00000 */ J3DDrawBuffer* mDrawBuffers[DB_LIST_MAX]; diff --git a/include/d/d_eye_hl.h b/include/d/d_eye_hl.h index e7a4d82d3c..23f93cf83d 100644 --- a/include/d/d_eye_hl.h +++ b/include/d/d_eye_hl.h @@ -17,7 +17,7 @@ public: JUT_ASSERT(51, m_obj == NULL); } - static dEyeHL_c* m_obj; + static DUSK_GAME_DATA dEyeHL_c* m_obj; }; class dEyeHL_c { diff --git a/include/d/d_item.h b/include/d/d_item.h index 0d379c0578..d9bdfd18c9 100644 --- a/include/d/d_item.h +++ b/include/d/d_item.h @@ -8,7 +8,7 @@ public: static void setItemData(u8* data) { mData = data; } static u8* getItemData() { return mData; } - static u8* mData; + static DUSK_GAME_DATA u8* mData; }; void execItemGet(u8 item_id); diff --git a/include/d/d_item_data.h b/include/d/d_item_data.h index a1770be241..0044573976 100644 --- a/include/d/d_item_data.h +++ b/include/d/d_item_data.h @@ -86,9 +86,9 @@ struct dItem_data { static u16 getFieldHeapSize(u8 index) { return field_item_res[index].mHeapSize; } - static dItem_itemResource item_resource[255]; - static dItem_fieldItemResource field_item_res[255]; - static dItem_itemInfo item_info[255]; + static DUSK_GAME_DATA dItem_itemResource item_resource[255]; + static DUSK_GAME_DATA dItem_fieldItemResource field_item_res[255]; + static DUSK_GAME_DATA dItem_itemInfo item_info[255]; }; enum { diff --git a/include/d/d_k_wmark.h b/include/d/d_k_wmark.h index 0190c94467..b4f28d1263 100644 --- a/include/d/d_k_wmark.h +++ b/include/d/d_k_wmark.h @@ -13,7 +13,7 @@ public: inline int execute(); inline int draw(); - static int m_nowID; + static DUSK_GAME_DATA int m_nowID; static void setFootMark(cXyz* i_pos, s16 param_1, int param_2) { fopKyM_create(fpcNm_WMARK_e, param_2 | (param_1 << 0x10), i_pos, NULL, NULL); diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h index fb3d0435b0..1a43d811f7 100644 --- a/include/d/d_kankyo.h +++ b/include/d/d_kankyo.h @@ -967,7 +967,7 @@ public: /* 0x7A0 */ dKankyo_ParticlelightHIO_c particleLight; }; -extern dKankyo_HIO_c g_kankyoHIO; +DUSK_GAME_EXTERN dKankyo_HIO_c g_kankyoHIO; enum dKy_dice_wether_mode { DICE_MODE_SUNNY_e, diff --git a/include/d/d_lib.h b/include/d/d_lib.h index 1d3103ce96..c4f8fed7bb 100644 --- a/include/d/d_lib.h +++ b/include/d/d_lib.h @@ -85,11 +85,11 @@ struct dLib_time_c { static void stopTime(); static void startTime(); - static OSTime m_diffTime; - static OSTime m_stopTime; - static bool m_timeStopped; + static DUSK_GAME_DATA OSTime m_diffTime; + static DUSK_GAME_DATA OSTime m_stopTime; + static DUSK_GAME_DATA bool m_timeStopped; }; -extern Quaternion ZeroQuat; +DUSK_GAME_EXTERN Quaternion ZeroQuat; #endif /* D_D_LIB_H */ diff --git a/include/d/d_map.h b/include/d/d_map.h index 1cddbf3944..b42def27c7 100644 --- a/include/d/d_map.h +++ b/include/d/d_map.h @@ -87,7 +87,7 @@ struct dMap_HIO_prm_res_src_s { }; struct dMap_HIO_prm_res_dst_s { - static dMap_prm_res_s* m_res; + static DUSK_GAME_DATA dMap_prm_res_s* m_res; static dMap_HIO_prm_other_s m_other; }; diff --git a/include/d/d_map_path.h b/include/d/d_map_path.h index 495fdf396a..885c7ade87 100644 --- a/include/d/d_map_path.h +++ b/include/d/d_map_path.h @@ -260,7 +260,7 @@ struct dMpath_n { /* 0x0 */ TGXTexObj* mp_texObj[TEX_OBJ_NUMBER]; }; - static dTexObjAggregate_c m_texObjAgg; + static DUSK_GAME_DATA dTexObjAggregate_c m_texObjAgg; }; STATIC_ASSERT(sizeof(dMpath_n::dTexObjAggregate_c) == 28); diff --git a/include/d/d_map_path_dmap.h b/include/d/d_map_path_dmap.h index bbffcd7809..7d23be73c9 100644 --- a/include/d/d_map_path_dmap.h +++ b/include/d/d_map_path_dmap.h @@ -33,17 +33,17 @@ public: static f32 getCenterX() { return mAllCenterX; } static f32 getCenterZ() { return mAllCenterZ; } - static dDrawPath_c::layer_data* mLayerList; // this doesn't seem right, but can't figure it out atm - static f32 mMinX; - static f32 mMaxX; - static f32 mMinZ; - static f32 mMaxZ; - static f32 mAllCenterX; - static f32 mAllCenterZ; - static f32 mAllSizeX; - static f32 mAllSizeZ; - static s8 mBottomFloorNo; - static s8 mTopFloorNo; + static DUSK_GAME_DATA dDrawPath_c::layer_data* mLayerList; // this doesn't seem right, but can't figure it out atm + static DUSK_GAME_DATA f32 mMinX; + static DUSK_GAME_DATA f32 mMaxX; + static DUSK_GAME_DATA f32 mMinZ; + static DUSK_GAME_DATA f32 mMaxZ; + static DUSK_GAME_DATA f32 mAllCenterX; + static DUSK_GAME_DATA f32 mAllCenterZ; + static DUSK_GAME_DATA f32 mAllSizeX; + static DUSK_GAME_DATA f32 mAllSizeZ; + static DUSK_GAME_DATA s8 mBottomFloorNo; + static DUSK_GAME_DATA s8 mTopFloorNo; }; struct dMapInfo_n { @@ -90,10 +90,10 @@ public: static void setNextRoomNoForMapPat0(int i_roomNo) { mNextRoomNo = i_roomNo; } static int getNextRoomNoForMapPat0() { return mNextRoomNo; } - static int mNextRoomNo; - static int mNowStayRoomNo; - static s8 mNowStayFloorNo; - static u8 mNowStayFloorNoDecisionFlg; + static DUSK_GAME_DATA int mNextRoomNo; + static DUSK_GAME_DATA int mNowStayRoomNo; + static DUSK_GAME_DATA s8 mNowStayFloorNo; + static DUSK_GAME_DATA u8 mNowStayFloorNoDecisionFlg; }; class renderingDAmap_c : public dRenderingFDAmap_c { diff --git a/include/d/d_menu_collect.h b/include/d/d_menu_collect.h index d99b8f17cb..b7d5ec2976 100644 --- a/include/d/d_menu_collect.h +++ b/include/d/d_menu_collect.h @@ -266,7 +266,7 @@ public: mViewOffsetY = i_offset; } - static f32 mViewOffsetY; + static DUSK_GAME_DATA f32 mViewOffsetY; private: /* 0x004 */ JKRExpHeap* mpHeap; diff --git a/include/d/d_menu_dmap.h b/include/d/d_menu_dmap.h index 7740927f4e..4d1341cc67 100644 --- a/include/d/d_menu_dmap.h +++ b/include/d/d_menu_dmap.h @@ -253,7 +253,7 @@ public: s8 getFloorPos(s8 param_0) { return param_0 - mBottomFloor; } u16 getCMessageNum() { return mCMessageNum; } - static dMenu_Dmap_c* myclass; + static DUSK_GAME_DATA dMenu_Dmap_c* myclass; private: /* 0x004 */ dMenu_DmapMapCtrl_c* mMapCtrl; diff --git a/include/d/d_menu_dmap_map.h b/include/d/d_menu_dmap_map.h index f1a5432391..3f3eb37a0f 100644 --- a/include/d/d_menu_dmap_map.h +++ b/include/d/d_menu_dmap_map.h @@ -151,10 +151,10 @@ public: ResTIMG* getResTIMGPointer(int i_no) const { return dMenu_DmapMap_c::getResTIMGPointer(i_no); } - static f32 m_zoomCenterMinX; - static f32 m_zoomCenterMaxX; - static f32 m_zoomCenterMinZ; - static f32 m_zoomCenterMaxZ; + static DUSK_GAME_DATA f32 m_zoomCenterMinX; + static DUSK_GAME_DATA f32 m_zoomCenterMaxX; + static DUSK_GAME_DATA f32 m_zoomCenterMinZ; + static DUSK_GAME_DATA f32 m_zoomCenterMaxZ; /* 0x88 */ u8 field_0x88[0x8C - 0x88]; /* 0x8C */ dTres_c::typeGroupData_c* field_0x8c; diff --git a/include/d/d_menu_fmap.h b/include/d/d_menu_fmap.h index 48db37fef3..110298798a 100644 --- a/include/d/d_menu_fmap.h +++ b/include/d/d_menu_fmap.h @@ -268,7 +268,7 @@ public: /* 0x1D */ PROC_HOWL_DEMO3, }; - static dMenu_Fmap_c* MyClass; + static DUSK_GAME_DATA dMenu_Fmap_c* MyClass; private: /* 0x004 */ JKRExpHeap* mpHeap; @@ -356,7 +356,7 @@ public: /* 0x10 */ u8 mBaseBackAlpha; /* 0x11 */ u8 mMoyaAlpha; - static dMf_HIO_c* mMySelfPointer; + static DUSK_GAME_DATA dMf_HIO_c* mMySelfPointer; }; const char* dMenuFmap_getStartStageName(void* param_0); diff --git a/include/d/d_menu_fmap_map.h b/include/d/d_menu_fmap_map.h index 95294ffb35..b0d1063d18 100644 --- a/include/d/d_menu_fmap_map.h +++ b/include/d/d_menu_fmap_map.h @@ -28,7 +28,7 @@ struct dMfm_prm_res_s { struct dMfm_HIO_prm_res_src_s { /* 0x0 */ u8 mFlashDuration; - static const dMfm_HIO_prm_res_src_s m_other; + static DUSK_GAME_DATA const dMfm_HIO_prm_res_src_s m_other; }; struct dMfm_HIO_prm_res_dst_s { diff --git a/include/d/d_menu_window_HIO.h b/include/d/d_menu_window_HIO.h index b5d5c81fb4..7ac32267c8 100644 --- a/include/d/d_menu_window_HIO.h +++ b/include/d/d_menu_window_HIO.h @@ -31,7 +31,7 @@ public: /* 0x1E5 */ u8 mMidBossClearCopy[32]; }; -extern dMw_DHIO_c g_mwDHIO; +DUSK_GAME_EXTERN dMw_DHIO_c g_mwDHIO; class dMw_HIO_c : public JORReflexible { public: @@ -131,6 +131,6 @@ public: /* 0x12A */ u8 mMirrorShardCopy[4]; }; // Size: 0x130 -extern dMw_HIO_c g_mwHIO; +DUSK_GAME_EXTERN dMw_HIO_c g_mwHIO; #endif /* D_MENU_D_MENU_WINDOW_HIO_H */ diff --git a/include/d/d_meter2_info.h b/include/d/d_meter2_info.h index 683e555386..410cf642b1 100644 --- a/include/d/d_meter2_info.h +++ b/include/d/d_meter2_info.h @@ -21,7 +21,7 @@ struct dMenu_Letter { static u16 getLetterText(int idx) { return letter_data[idx].mText; } static u16 getLetterEventFlag(int idx) { return letter_data[idx].mEventFlag; } - static dMenu_LetterData letter_data[64]; + static DUSK_GAME_DATA dMenu_LetterData letter_data[64]; }; class dMw_c; @@ -301,7 +301,7 @@ public: /* 0xF3 */ u8 unk_0xf3[5]; }; -extern dMeter2Info_c g_meter2_info; +DUSK_GAME_EXTERN dMeter2Info_c g_meter2_info; void dMeter2Info_setSword(u8 i_itemId, bool i_offItemBit); void dMeter2Info_setCloth(u8 i_clothId, bool i_offItemBit); diff --git a/include/d/d_meter_HIO.h b/include/d/d_meter_HIO.h index e52051095f..037b17779b 100644 --- a/include/d/d_meter_HIO.h +++ b/include/d/d_meter_HIO.h @@ -1332,10 +1332,10 @@ public: STATIC_ASSERT(sizeof(dMeter_cursorHIO_c) == 68); -extern dMeter_menuHIO_c g_menuHIO; -extern dMeter_drawHIO_c g_drawHIO; -extern dMeter_ringHIO_c g_ringHIO; -extern dMeter_fmapHIO_c g_fmapHIO; -extern dMeter_cursorHIO_c g_cursorHIO; +DUSK_GAME_EXTERN dMeter_menuHIO_c g_menuHIO; +DUSK_GAME_EXTERN dMeter_drawHIO_c g_drawHIO; +DUSK_GAME_EXTERN dMeter_ringHIO_c g_ringHIO; +DUSK_GAME_EXTERN dMeter_fmapHIO_c g_fmapHIO; +DUSK_GAME_EXTERN dMeter_cursorHIO_c g_cursorHIO; #endif /* D_METER_D_METER_HIO_H */ diff --git a/include/d/d_model.h b/include/d/d_model.h index 2dd1abaabf..72949f5f03 100644 --- a/include/d/d_model.h +++ b/include/d/d_model.h @@ -53,7 +53,7 @@ public: static void remove(); static void reset(); - static dMdl_mng_c* m_myObj; + static DUSK_GAME_DATA dMdl_mng_c* m_myObj; private: /* 0x00 */ dMdl_c field_0x0[4]; diff --git a/include/d/d_msg_flow.h b/include/d/d_msg_flow.h index cd9a7c4e5f..51ce72033c 100644 --- a/include/d/d_msg_flow.h +++ b/include/d/d_msg_flow.h @@ -185,8 +185,8 @@ public: void setMsg(u32 msg) { mMsg = msg; } bool checkEndFlow() { return (u32)field_0x26 == 1; } - static queryFunc mQueryList[53]; - static eventFunc mEventList[43]; + static DUSK_GAME_DATA queryFunc mQueryList[53]; + static DUSK_GAME_DATA eventFunc mEventList[43]; private: /* 0x04 */ u8* mFlow_p; diff --git a/include/d/d_msg_object.h b/include/d/d_msg_object.h index d4d8bb7f47..7ca53064a7 100644 --- a/include/d/d_msg_object.h +++ b/include/d/d_msg_object.h @@ -771,6 +771,6 @@ public: /* 0x35C */ dMsgObject_HowlHIO_c mHowlHIO; }; -extern dMsgObject_HIO_c g_MsgObject_HIO_c; +DUSK_GAME_EXTERN dMsgObject_HIO_c g_MsgObject_HIO_c; #endif /* D_MSG_D_MSG_OBJECT_H */ diff --git a/include/d/d_msg_unit.h b/include/d/d_msg_unit.h index 47e40e31cf..c48d89d0e0 100644 --- a/include/d/d_msg_unit.h +++ b/include/d/d_msg_unit.h @@ -11,7 +11,7 @@ public: virtual ~dMsgUnit_c(); }; -extern dMsgUnit_c g_msg_unit; +DUSK_GAME_EXTERN dMsgUnit_c g_msg_unit; inline void dMsgUnit_setTag(int param_0, int param_1, TEXT_SPAN param_2) { g_msg_unit.setTag(param_0, param_1, param_2, true); diff --git a/include/d/d_particle.h b/include/d/d_particle.h index 3098dbd521..7ae4d12c07 100644 --- a/include/d/d_particle.h +++ b/include/d/d_particle.h @@ -116,10 +116,10 @@ public: } static dPa_modelEcallBack& getEcallback() { return mEcallback; } - static dPa_modelEcallBack mEcallback; + static DUSK_GAME_DATA dPa_modelEcallBack mEcallback; - static dPa_modelPcallBack mPcallback; - static model_c* mModel; + static DUSK_GAME_DATA dPa_modelPcallBack mPcallback; + static DUSK_GAME_DATA model_c* mModel; #if DEBUG static u8 mNum; #endif @@ -495,20 +495,20 @@ public: return &mWaterBubblePcallBack; } - static dPa_selectTexEcallBack mTsubo[8]; - static dPa_setColorEcallBack mLifeBall[3]; - static Mtx mWindViewMatrix; - static JPAEmitterManager* mEmitterMng; - static dPa_wbPcallBack_c mWaterBubblePcallBack; - static dPa_fsenthPcallBack mFsenthPcallBack; - static dPa_light8EcallBack mLight8EcallBack; - static dPa_light8PcallBack mLight8PcallBack; - static dPa_gen_b_light8EcallBack m_b_Light8EcallBack; - static dPa_gen_b_light8PcallBack m_b_Light8PcallBack; - static dPa_gen_d_light8EcallBack m_d_Light8EcallBack; - static dPa_gen_d_light8PcallBack m_d_Light8PcallBack; - static dPa_particleTracePcallBack_c mParticleTracePCB; - static u8 mStatus; + static DUSK_GAME_DATA dPa_selectTexEcallBack mTsubo[8]; + static DUSK_GAME_DATA dPa_setColorEcallBack mLifeBall[3]; + static DUSK_GAME_DATA Mtx mWindViewMatrix; + static DUSK_GAME_DATA JPAEmitterManager* mEmitterMng; + static DUSK_GAME_DATA dPa_wbPcallBack_c mWaterBubblePcallBack; + static DUSK_GAME_DATA dPa_fsenthPcallBack mFsenthPcallBack; + static DUSK_GAME_DATA dPa_light8EcallBack mLight8EcallBack; + static DUSK_GAME_DATA dPa_light8PcallBack mLight8PcallBack; + static DUSK_GAME_DATA dPa_gen_b_light8EcallBack m_b_Light8EcallBack; + static DUSK_GAME_DATA dPa_gen_b_light8PcallBack m_b_Light8PcallBack; + static DUSK_GAME_DATA dPa_gen_d_light8EcallBack m_d_Light8EcallBack; + static DUSK_GAME_DATA dPa_gen_d_light8PcallBack m_d_Light8PcallBack; + static DUSK_GAME_DATA dPa_particleTracePcallBack_c mParticleTracePCB; + static DUSK_GAME_DATA u8 mStatus; private: /* 0x000 */ JKRSolidHeap* mHeap; diff --git a/include/d/d_particle_copoly.h b/include/d/d_particle_copoly.h index c50b71387e..7bc8621546 100644 --- a/include/d/d_particle_copoly.h +++ b/include/d/d_particle_copoly.h @@ -78,8 +78,8 @@ public: return (this->*m_emitterTwoData[param_0])(param_1, param_2); } - static const effTypeFunc m_typeTwoData[]; - static const emitterFunc m_emitterTwoData[]; + static DUSK_GAME_DATA const effTypeFunc m_typeTwoData[]; + static DUSK_GAME_DATA const emitterFunc m_emitterTwoData[]; /* 0x38 */ u32 mLeftEmitter[2][4]; /* 0x58 */ u32 mRightEmitter[2][4]; @@ -117,8 +117,8 @@ public: return (this->*m_emitterFourData[param_0])(param_1, param_2); } - static const effTypeFunc m_typeFourData[]; - static const emitterFunc m_emitterFourData[]; + static DUSK_GAME_DATA const effTypeFunc m_typeFourData[]; + static DUSK_GAME_DATA const emitterFunc m_emitterFourData[]; /* 0x80 */ u32 mBackLeftEmitter[2][4]; /* 0xA0 */ u32 mBackRightEmitter[2][4]; diff --git a/include/d/d_particle_name.h b/include/d/d_particle_name.h index 193cd9c96d..b5df5421a7 100644 --- a/include/d/d_particle_name.h +++ b/include/d/d_particle_name.h @@ -10,9 +10,9 @@ struct dPa_name { static DUSK_CONST char* getName(u32 i_id); - static u16 j_o_id[5]; - static u16 s_o_id[14]; - static DUSK_CONST char* jpaName[]; + static DUSK_GAME_DATA u16 j_o_id[5]; + static DUSK_GAME_DATA u16 s_o_id[14]; + static DUSK_GAME_DATA DUSK_CONST char* jpaName[]; }; // enum names made up based on debug strings diff --git a/include/d/d_s_play.h b/include/d/d_s_play.h index 45b60220b0..936f29b277 100644 --- a/include/d/d_s_play.h +++ b/include/d/d_s_play.h @@ -83,8 +83,8 @@ public: #endif static void setPauseTimer(s8 time) { nextPauseTimer = time; } - static s8 pauseTimer; - static s8 nextPauseTimer; + static DUSK_GAME_DATA s8 pauseTimer; + static DUSK_GAME_DATA s8 nextPauseTimer; #if DEBUG void onDebugPause() { @@ -104,8 +104,8 @@ public: /* 0x1D4 */ u8 field_0x1d4; }; -extern dScnPly_env_HIO_c g_envHIO; -extern dScnPly_reg_HIO_c g_regHIO; +DUSK_GAME_EXTERN dScnPly_env_HIO_c g_envHIO; +DUSK_GAME_EXTERN dScnPly_reg_HIO_c g_regHIO; #if DEBUG extern dScnPly_preset_HIO_c g_presetHIO; diff --git a/include/d/d_save.h b/include/d/d_save.h index fc54e541f4..ec5a9ee9ef 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -1049,7 +1049,7 @@ public: #else u16 #endif - static saveBitLabels[822]; + static DUSK_GAME_DATA saveBitLabels[822]; }; class dSv_event_tmp_flag_c { @@ -1058,7 +1058,7 @@ public: #include "d/d_save_temp_bit_labels.inc" }; - static u16 const tempBitLabels[185]; + static DUSK_GAME_DATA u16 const tempBitLabels[185]; }; #endif /* D_SAVE_D_SAVE_H */ diff --git a/include/d/d_save_HIO.h b/include/d/d_save_HIO.h index e149f7fcb9..2ee6e4570b 100644 --- a/include/d/d_save_HIO.h +++ b/include/d/d_save_HIO.h @@ -229,6 +229,6 @@ public: STATIC_ASSERT(sizeof(dSvBit_HIO_c) == 0x4A0); -extern dSvBit_HIO_c g_save_bit_HIO; +DUSK_GAME_EXTERN dSvBit_HIO_c g_save_bit_HIO; #endif /* D_SAVE_D_SAVE_HIO_H */ diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 83a1c808fd..1fd884e4a6 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1237,20 +1237,20 @@ public: static const int MEMORY_BLOCK_MAX = 19; - static JKRExpHeap* mMemoryBlock[MEMORY_BLOCK_MAX]; - static char mArcBank[32][10]; - static dStage_roomStatus_c mStatus[0x40]; - static char mDemoArcName[10]; - static fpc_ProcID mProcID; - static dStage_bankName* mArcBankName; - static dStage_bankData* mArcBankData; - static roomDzs_c m_roomDzs; - static s8 mStayNo; - static s8 mOldStayNo; - static s8 mNextStayNo; - static u8 m_time_pass; - static u8 mNoChangeRoom; - static s8 mRoomReadId; + static DUSK_GAME_DATA JKRExpHeap* mMemoryBlock[MEMORY_BLOCK_MAX]; + static DUSK_GAME_DATA char mArcBank[32][10]; + static DUSK_GAME_DATA dStage_roomStatus_c mStatus[0x40]; + static DUSK_GAME_DATA char mDemoArcName[10]; + static DUSK_GAME_DATA fpc_ProcID mProcID; + static DUSK_GAME_DATA dStage_bankName* mArcBankName; + static DUSK_GAME_DATA dStage_bankData* mArcBankData; + static DUSK_GAME_DATA roomDzs_c m_roomDzs; + static DUSK_GAME_DATA s8 mStayNo; + static DUSK_GAME_DATA s8 mOldStayNo; + static DUSK_GAME_DATA s8 mNextStayNo; + static DUSK_GAME_DATA u8 m_time_pass; + static DUSK_GAME_DATA u8 mNoChangeRoom; + static DUSK_GAME_DATA s8 mRoomReadId; #if DEBUG static void onNoArcBank() { diff --git a/include/d/d_tresure.h b/include/d/d_tresure.h index 236e2690c6..37ff4d84b9 100644 --- a/include/d/d_tresure.h +++ b/include/d/d_tresure.h @@ -113,10 +113,10 @@ public: return mTypeGroupData; } - static u8 const typeToTypeGroup[17][2]; - static type_group_list mTypeGroupListAll[17]; - static typeGroupData_c* mTypeGroupData; - static u16 mNum; + static DUSK_GAME_DATA u8 const typeToTypeGroup[17][2]; + static DUSK_GAME_DATA type_group_list mTypeGroupListAll[17]; + static DUSK_GAME_DATA typeGroupData_c* mTypeGroupData; + static DUSK_GAME_DATA u16 mNum; static void setNpcYkmPosition(int param_1, Vec* param_2) { setPosition(param_1, 13, param_2, -1); diff --git a/include/d/d_vibration.h b/include/d/d_vibration.h index ee87f7dcc4..b61d0099b4 100644 --- a/include/d/d_vibration.h +++ b/include/d/d_vibration.h @@ -89,10 +89,10 @@ public: int testShake(); #endif - static const vib_pattern MS_patt[VIBMODE_S_MAX]; - static const vib_pattern CS_patt[VIBMODE_S_MAX]; - static const vib_pattern MQ_patt[VIBMODE_Q_MAX]; - static const vib_pattern CQ_patt[VIBMODE_Q_MAX]; + static DUSK_GAME_DATA const vib_pattern MS_patt[VIBMODE_S_MAX]; + static DUSK_GAME_DATA const vib_pattern CS_patt[VIBMODE_S_MAX]; + static DUSK_GAME_DATA const vib_pattern MQ_patt[VIBMODE_Q_MAX]; + static DUSK_GAME_DATA const vib_pattern CQ_patt[VIBMODE_Q_MAX]; private: #if DEBUG @@ -133,7 +133,7 @@ private: /* 0x8C */ s32 mMode; }; // Size: 0x90 -extern const char* shock_names[VIBMODE_S_MAX]; -extern const char* quake_names[VIBMODE_Q_MAX]; +DUSK_GAME_EXTERN const char* shock_names[VIBMODE_S_MAX]; +DUSK_GAME_EXTERN const char* quake_names[VIBMODE_Q_MAX]; #endif /* D_D_VIBRATION_H */ diff --git a/include/f_ap/f_ap_game.h b/include/f_ap/f_ap_game.h index fca2e70705..aa2c9dbd9d 100644 --- a/include/f_ap/f_ap_game.h +++ b/include/f_ap/f_ap_game.h @@ -75,7 +75,7 @@ public: static u8 mCaptureMagnification; - static u8 mCaptureScreenDivH; + static DUSK_GAME_DATA u8 mCaptureScreenDivH; static u8 mCaptureScreenDivV; static u8 mPackArchiveMode; @@ -115,7 +115,7 @@ public: /* 0x3E */ u8 mBackgroundAlpha; }; // Size: 0x40 -extern fapGm_HIO_c g_HIO; +DUSK_GAME_EXTERN fapGm_HIO_c g_HIO; inline void fapGmHIO_offMenu() { g_HIO.mDisplayPrint &= (u8)~2; diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index ed0126eefa..1dce990866 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -332,7 +332,7 @@ public: static u32 getStopStatus() { return stopStatus; } static void setStopStatus(u32 status) { stopStatus = status; } - static u32 stopStatus; + static DUSK_GAME_DATA u32 stopStatus; }; // Size: 0x568 STATIC_ASSERT(sizeof(fopAc_ac_c) == 0x568); @@ -431,6 +431,6 @@ public: BOOL fopAc_IsActor(void* i_actor); -extern actor_method_class g_fopAc_Method; +DUSK_GAME_EXTERN actor_method_class g_fopAc_Method; #endif diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 76a9f8517c..5d51b74aa2 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -50,14 +50,14 @@ class cM3dGPla; s8 dComIfGp_getReverb(int roomNo); namespace fopAcM { -extern u8 HeapAdjustEntry; -extern u8 HeapAdjustUnk; -extern u8 HeapAdjustVerbose; -extern u8 HeapAdjustQuiet; -extern u8 HeapDummyCreate; -extern u8 HeapDummyCheck; -extern u8 HeapSkipMargin; -extern int HeapAdjustMargin; +DUSK_GAME_EXTERN u8 HeapAdjustEntry; +DUSK_GAME_EXTERN u8 HeapAdjustUnk; +DUSK_GAME_EXTERN u8 HeapAdjustVerbose; +DUSK_GAME_EXTERN u8 HeapAdjustQuiet; +DUSK_GAME_EXTERN u8 HeapDummyCreate; +DUSK_GAME_EXTERN u8 HeapDummyCheck; +DUSK_GAME_EXTERN u8 HeapSkipMargin; +DUSK_GAME_EXTERN int HeapAdjustMargin; } // namespace fopAcM struct fopAcM_prmBase_class { @@ -826,8 +826,8 @@ BOOL fopAcM_getNameString(const fopAc_ac_c*, char*); inline void fopAcM_SetStatusMap(fopAc_ac_c*, u32) {} -extern cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e]; -extern cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e]; +DUSK_GAME_EXTERN cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e]; +DUSK_GAME_EXTERN cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e]; class fopAcM_lc_c { public: @@ -854,7 +854,7 @@ public: return cBgW_CheckBGround(poly.mNormal.y); } - static dBgS_ObjLinChk mLineCheck; + static DUSK_GAME_DATA dBgS_ObjLinChk mLineCheck; }; class dBgS_RoofChk; @@ -864,16 +864,16 @@ public: static f32 getRoofY() { return mRoofY; } static bool roofCheck(const cXyz*); - static dBgS_ObjRoofChk mRoofCheck; - static f32 mRoofY; + static DUSK_GAME_DATA dBgS_ObjRoofChk mRoofCheck; + static DUSK_GAME_DATA f32 mRoofY; }; class dBgS_GndChk; class fopAcM_gc_c { public: static bool gndCheck(const cXyz*); - static dBgS_ObjGndChk mGndCheck; - static f32 mGroundY; + static DUSK_GAME_DATA dBgS_ObjGndChk mGndCheck; + static DUSK_GAME_DATA f32 mGroundY; static bool getTriPla(cM3dGPla* i_plane) { return dComIfG_Bgsp().GetTriPla(mGndCheck, i_plane); @@ -900,8 +900,8 @@ public: static int getPolyAtt0() { return dComIfG_Bgsp().GetPolyAtt0(mWaterCheck); } static bool waterCheck(const cXyz*); - static dBgS_WtrChk mWaterCheck; - static f32 mWaterY; + static DUSK_GAME_DATA dBgS_WtrChk mWaterCheck; + static DUSK_GAME_DATA f32 mWaterY; }; #endif diff --git a/include/f_op/f_op_actor_tag.h b/include/f_op/f_op_actor_tag.h index a354178a8b..dfad5b5b83 100644 --- a/include/f_op/f_op_actor_tag.h +++ b/include/f_op/f_op_actor_tag.h @@ -7,6 +7,6 @@ void fopAcTg_ActorQTo(create_tag_class* i_createTag); int fopAcTg_Init(create_tag_class* i_createTag, void* i_data); int fopAcTg_ToActorQ(create_tag_class* i_createTag); -extern node_list_class g_fopAcTg_Queue; +DUSK_GAME_EXTERN node_list_class g_fopAcTg_Queue; #endif diff --git a/include/f_op/f_op_camera.h b/include/f_op/f_op_camera.h index 584bff29d4..30bcd3fe60 100644 --- a/include/f_op/f_op_camera.h +++ b/include/f_op/f_op_camera.h @@ -15,6 +15,6 @@ static s32 fopCam_Draw(camera_class* i_this); static int fopCam_Execute(camera_class* i_this); int fopCam_IsDelete(camera_class* i_this); -extern leafdraw_method_class g_fopCam_Method; +DUSK_GAME_EXTERN leafdraw_method_class g_fopCam_Method; #endif diff --git a/include/f_op/f_op_draw_tag.h b/include/f_op/f_op_draw_tag.h index 317cad1baf..1071616988 100644 --- a/include/f_op/f_op_draw_tag.h +++ b/include/f_op/f_op_draw_tag.h @@ -5,7 +5,7 @@ typedef struct create_tag_class create_tag_class; -extern node_lists_tree_class g_fopDwTg_Queue; +DUSK_GAME_EXTERN node_lists_tree_class g_fopDwTg_Queue; void fopDwTg_DrawQTo(create_tag_class* i_createTag); void fopDwTg_CreateQueue(); diff --git a/include/f_op/f_op_kankyo.h b/include/f_op/f_op_kankyo.h index 7741d6c09d..75833fe5ad 100644 --- a/include/f_op/f_op_kankyo.h +++ b/include/f_op/f_op_kankyo.h @@ -21,6 +21,6 @@ struct kankyo_process_profile_definition { BOOL fopKy_IsKankyo(void* i_this); -extern leafdraw_method_class g_fopKy_Method; +DUSK_GAME_EXTERN leafdraw_method_class g_fopKy_Method; #endif /* F_OP_F_OP_KANKYO_H */ diff --git a/include/f_op/f_op_msg.h b/include/f_op/f_op_msg.h index 72a57b594f..21694f0af1 100644 --- a/include/f_op/f_op_msg.h +++ b/include/f_op/f_op_msg.h @@ -36,7 +36,7 @@ struct msg_class { /* 0xFA */ u8 select_idx; }; // Size: 0xFC -extern leafdraw_method_class g_fopMsg_Method; +DUSK_GAME_EXTERN leafdraw_method_class g_fopMsg_Method; namespace fopMsg { extern u8 MemCheck; diff --git a/include/f_op/f_op_overlap.h b/include/f_op/f_op_overlap.h index c639ff38e0..275b86fc40 100644 --- a/include/f_op/f_op_overlap.h +++ b/include/f_op/f_op_overlap.h @@ -18,6 +18,6 @@ struct overlap_process_profile_definition { static s32 fopOvlp_Draw(void* param_1); -extern leafdraw_method_class g_fopOvlp_Method; +DUSK_GAME_EXTERN leafdraw_method_class g_fopOvlp_Method; #endif diff --git a/include/f_op/f_op_scene.h b/include/f_op/f_op_scene.h index 0e736093f1..b7e182e890 100644 --- a/include/f_op/f_op_scene.h +++ b/include/f_op/f_op_scene.h @@ -24,6 +24,6 @@ public: /* 0x1B0 */ scene_tag_class scene_tag; }; -extern leafdraw_method_class g_fopScn_Method; +DUSK_GAME_EXTERN leafdraw_method_class g_fopScn_Method; #endif diff --git a/include/f_op/f_op_scene_tag.h b/include/f_op/f_op_scene_tag.h index ad26ab3564..f4bb4ebad6 100644 --- a/include/f_op/f_op_scene_tag.h +++ b/include/f_op/f_op_scene_tag.h @@ -12,6 +12,6 @@ void fopScnTg_QueueTo(scene_tag_class* i_sceneTag); void fopScnTg_ToQueue(scene_tag_class* i_sceneTag); void fopScnTg_Init(scene_tag_class* i_sceneTag, void* i_data); -extern node_list_class g_fopScnTg_SceneList; +DUSK_GAME_EXTERN node_list_class g_fopScnTg_SceneList; #endif diff --git a/include/f_op/f_op_view.h b/include/f_op/f_op_view.h index a605923b2f..62c135fb68 100644 --- a/include/f_op/f_op_view.h +++ b/include/f_op/f_op_view.h @@ -56,6 +56,6 @@ struct view_class { /* 0x1E0 */ Mtx viewMtxNoTrans; }; -extern leafdraw_method_class g_fopVw_Method; +DUSK_GAME_EXTERN leafdraw_method_class g_fopVw_Method; #endif diff --git a/include/f_pc/f_pc_base.h b/include/f_pc/f_pc_base.h index 23c7893b91..63c629e624 100644 --- a/include/f_pc/f_pc_base.h +++ b/include/f_pc/f_pc_base.h @@ -57,6 +57,6 @@ int fpcBs_Delete(base_process_class* i_proc); base_process_class* fpcBs_Create(s16 i_profname, fpc_ProcID i_procID, void* i_append); int fpcBs_SubCreate(base_process_class* i_proc); -extern int g_fpcBs_type; +DUSK_GAME_EXTERN int g_fpcBs_type; #endif diff --git a/include/f_pc/f_pc_create_tag.h b/include/f_pc/f_pc_create_tag.h index 45b1f2ea8b..4706b3862a 100644 --- a/include/f_pc/f_pc_create_tag.h +++ b/include/f_pc/f_pc_create_tag.h @@ -13,6 +13,6 @@ void fpcCtTg_ToCreateQ(create_tag* i_createTag); void fpcCtTg_CreateQTo(create_tag* i_createTag); int fpcCtTg_Init(create_tag* i_createTag, void* i_data); -extern node_list_class g_fpcCtTg_Queue; +DUSK_GAME_EXTERN node_list_class g_fpcCtTg_Queue; #endif diff --git a/include/f_pc/f_pc_delete_tag.h b/include/f_pc/f_pc_delete_tag.h index 57b049c2f2..1dd0cd728a 100644 --- a/include/f_pc/f_pc_delete_tag.h +++ b/include/f_pc/f_pc_delete_tag.h @@ -25,6 +25,6 @@ void fpcDtTg_DeleteQTo(delete_tag_class* i_deleteTag); int fpcDtTg_Do(delete_tag_class* i_deleteTag, delete_tag_func i_func); int fpcDtTg_Init(delete_tag_class* i_deleteTag, void* i_data); -extern node_list_class g_fpcDtTg_Queue; +DUSK_GAME_EXTERN node_list_class g_fpcDtTg_Queue; #endif diff --git a/include/f_pc/f_pc_leaf.h b/include/f_pc/f_pc_leaf.h index 2234fa87a5..99b176e73c 100644 --- a/include/f_pc/f_pc_leaf.h +++ b/include/f_pc/f_pc_leaf.h @@ -43,7 +43,7 @@ int fpcLf_IsDelete(leafdraw_class* i_leaf); int fpcLf_Delete(leafdraw_class* i_leaf); int fpcLf_Create(leafdraw_class* i_leaf); -extern int g_fpcLf_type; -extern leafdraw_method_class DUSK_CONST g_fpcLf_Method; +DUSK_GAME_EXTERN int g_fpcLf_type; +DUSK_GAME_EXTERN leafdraw_method_class DUSK_CONST g_fpcLf_Method; #endif diff --git a/include/f_pc/f_pc_line.h b/include/f_pc/f_pc_line.h index 47a8018792..4527653a90 100644 --- a/include/f_pc/f_pc_line.h +++ b/include/f_pc/f_pc_line.h @@ -5,6 +5,6 @@ void fpcLn_Create(); -extern node_lists_tree_class g_fpcLn_Queue; +DUSK_GAME_EXTERN node_lists_tree_class g_fpcLn_Queue; #endif diff --git a/include/f_pc/f_pc_node.h b/include/f_pc/f_pc_node.h index 0d96fd2de5..a519393b1c 100644 --- a/include/f_pc/f_pc_node.h +++ b/include/f_pc/f_pc_node.h @@ -35,7 +35,7 @@ int fpcNd_IsDelete(process_node_class* pProcNode); int fpcNd_Delete(process_node_class* pProcNode); int fpcNd_Create(process_node_class* pProcNode); -extern int g_fpcNd_type; -extern nodedraw_method_class g_fpcNd_Method; +DUSK_GAME_EXTERN int g_fpcNd_type; +DUSK_GAME_EXTERN nodedraw_method_class g_fpcNd_Method; #endif diff --git a/include/f_pc/f_pc_profile.h b/include/f_pc/f_pc_profile.h index bccbfda215..f1ebfa144e 100644 --- a/include/f_pc/f_pc_profile.h +++ b/include/f_pc/f_pc_profile.h @@ -6,7 +6,7 @@ #include "global.h" // Putting const on these profiles make them have internal linkage. Make sure they're extern! -#define DUSK_PROFILE IF_DUSK(extern) +#define DUSK_PROFILE IF_DUSK(extern) DUSK_GAME_DATA typedef struct nodedraw_method_class nodedraw_method_class; typedef struct leafdraw_method_class leafdraw_method_class; @@ -27,6 +27,6 @@ typedef struct process_profile_definition { struct leaf_process_profile_definition; process_profile_definition DUSK_CONST* fpcPf_Get(s16 i_profname); -extern process_profile_definition DUSK_CONST* DUSK_CONST* DUSK_CONST g_fpcPf_ProfileList_p; +DUSK_GAME_EXTERN process_profile_definition DUSK_CONST* DUSK_CONST* DUSK_CONST g_fpcPf_ProfileList_p; #endif diff --git a/include/f_pc/f_pc_profile_lst.h b/include/f_pc/f_pc_profile_lst.h index e4e2e7c95f..b5d6e461b5 100644 --- a/include/f_pc/f_pc_profile_lst.h +++ b/include/f_pc/f_pc_profile_lst.h @@ -13,1594 +13,1594 @@ #endif #ifdef __MWERKS__ -extern process_profile_definition g_profile_ALINK; -extern process_profile_definition g_profile_NO_CHG_ROOM; -extern process_profile_definition g_profile_ITEM; -extern process_profile_definition g_profile_CAMERA; -extern process_profile_definition g_profile_CAMERA2; -extern process_profile_definition g_profile_ENVSE; -extern process_profile_definition g_profile_GAMEOVER; -extern process_profile_definition g_profile_KANKYO; -extern process_profile_definition g_profile_KYEFF; -extern process_profile_definition g_profile_KYEFF2; -extern process_profile_definition g_profile_KY_THUNDER; -extern process_profile_definition g_profile_MENUWINDOW; -extern process_profile_definition g_profile_METER2; -extern process_profile_definition g_profile_MSG_OBJECT; -extern process_profile_definition g_profile_OVERLAP0; -extern process_profile_definition g_profile_OVERLAP1; -extern process_profile_definition g_profile_OVERLAP6; -extern process_profile_definition g_profile_OVERLAP7; -extern process_profile_definition g_profile_OVERLAP8; -extern process_profile_definition g_profile_OVERLAP9; -extern process_profile_definition g_profile_OVERLAP10; -extern process_profile_definition g_profile_OVERLAP11; -extern process_profile_definition g_profile_OVERLAP2; -extern process_profile_definition g_profile_OVERLAP3; -extern process_profile_definition g_profile_LOGO_SCENE; -extern process_profile_definition g_profile_MENU_SCENE; -extern process_profile_definition g_profile_NAME_SCENE; -extern process_profile_definition g_profile_NAMEEX_SCENE; -extern process_profile_definition g_profile_PLAY_SCENE; -extern process_profile_definition g_profile_OPENING_SCENE; -extern process_profile_definition g_profile_ROOM_SCENE; -extern process_profile_definition g_profile_WARNING_SCENE; -extern process_profile_definition g_profile_WARNING2_SCENE; -extern process_profile_definition g_profile_TIMER; -extern process_profile_definition g_profile_WMARK; -extern process_profile_definition g_profile_WPILLAR; -extern process_profile_definition g_profile_ANDSW; -extern process_profile_definition g_profile_BG; -extern process_profile_definition g_profile_BG_OBJ; -extern process_profile_definition g_profile_DMIDNA; -extern process_profile_definition g_profile_DBDOOR; -extern process_profile_definition g_profile_KNOB20; -extern process_profile_definition g_profile_DOOR20; -extern process_profile_definition g_profile_SPIRAL_DOOR; -extern process_profile_definition g_profile_DSHUTTER; -extern process_profile_definition g_profile_EP; -extern process_profile_definition g_profile_HITOBJ; -extern process_profile_definition g_profile_KYTAG00; -extern process_profile_definition g_profile_KYTAG04; -extern process_profile_definition g_profile_KYTAG17; -extern process_profile_definition g_profile_OBJ_BEF; -extern process_profile_definition g_profile_Obj_BurnBox; -extern process_profile_definition g_profile_Obj_Carry; -extern process_profile_definition g_profile_OBJ_ITO; -extern process_profile_definition g_profile_Obj_Movebox; -extern process_profile_definition g_profile_Obj_Swpush; -extern process_profile_definition g_profile_Obj_Timer; -extern process_profile_definition g_profile_PATH_LINE; -extern process_profile_definition g_profile_SCENE_EXIT; -extern process_profile_definition g_profile_SET_BG_OBJ; -extern process_profile_definition g_profile_SWHIT0; -extern process_profile_definition g_profile_TAG_ALLMATO; -extern process_profile_definition g_profile_TAG_CAMERA; -extern process_profile_definition g_profile_TAG_CHKPOINT; -extern process_profile_definition g_profile_TAG_EVENT; -extern process_profile_definition g_profile_TAG_EVT; -extern process_profile_definition g_profile_TAG_EVTAREA; -extern process_profile_definition g_profile_TAG_EVTMSG; -extern process_profile_definition g_profile_TAG_HOWL; -extern process_profile_definition g_profile_TAG_KMSG; -extern process_profile_definition g_profile_TAG_LANTERN; -extern process_profile_definition g_profile_Tag_Mist; -extern process_profile_definition g_profile_TAG_MSG; -extern process_profile_definition g_profile_TAG_PUSH; -extern process_profile_definition g_profile_TAG_TELOP; -extern process_profile_definition g_profile_TBOX; -extern process_profile_definition g_profile_TBOX2; -extern process_profile_definition g_profile_VRBOX; -extern process_profile_definition g_profile_VRBOX2; -extern process_profile_definition g_profile_ARROW; -extern process_profile_definition g_profile_BOOMERANG; -extern process_profile_definition g_profile_CROD; -extern process_profile_definition g_profile_DEMO00; -extern process_profile_definition g_profile_DISAPPEAR; -extern process_profile_definition g_profile_MG_ROD; -extern process_profile_definition g_profile_MIDNA; -extern process_profile_definition g_profile_NBOMB; -extern process_profile_definition g_profile_Obj_LifeContainer; -extern process_profile_definition g_profile_Obj_Yousei; -extern process_profile_definition g_profile_SPINNER; -extern process_profile_definition g_profile_SUSPEND; -extern process_profile_definition g_profile_Tag_Attp; -extern process_profile_definition g_profile_ALLDIE; -extern process_profile_definition g_profile_ANDSW2; -extern process_profile_definition g_profile_BD; -extern process_profile_definition g_profile_CANOE; -extern process_profile_definition g_profile_CSTAF; -extern process_profile_definition g_profile_Demo_Item; -extern process_profile_definition g_profile_L1BOSS_DOOR; -extern process_profile_definition g_profile_E_DN; -extern process_profile_definition g_profile_E_FM; -extern process_profile_definition g_profile_E_GA; -extern process_profile_definition g_profile_E_HB; -extern process_profile_definition g_profile_E_NEST; -extern process_profile_definition g_profile_E_RD; -extern process_profile_definition g_profile_ECONT; -extern process_profile_definition g_profile_FR; -extern process_profile_definition g_profile_GRASS; -extern process_profile_definition g_profile_KYTAG05; -extern process_profile_definition g_profile_KYTAG10; -extern process_profile_definition g_profile_KYTAG11; -extern process_profile_definition g_profile_KYTAG14; -extern process_profile_definition g_profile_MG_FISH; -extern process_profile_definition g_profile_NPC_BESU; -extern process_profile_definition g_profile_NPC_FAIRY_SEIREI; -extern process_profile_definition g_profile_NPC_FISH; -extern process_profile_definition g_profile_NPC_HENNA; -extern process_profile_definition g_profile_NPC_KAKASHI; -extern process_profile_definition g_profile_NPC_KKRI; -extern process_profile_definition g_profile_NPC_KOLIN; -extern process_profile_definition g_profile_NPC_MARO; -extern process_profile_definition g_profile_NPC_TARO; -extern process_profile_definition g_profile_NPC_TKJ; -extern process_profile_definition g_profile_Obj_BHASHI; -extern process_profile_definition g_profile_Obj_BkDoor; -extern process_profile_definition g_profile_Obj_BossWarp; -extern process_profile_definition g_profile_Obj_Cboard; -extern process_profile_definition g_profile_Obj_Digpl; -extern process_profile_definition g_profile_Obj_Eff; -extern process_profile_definition g_profile_OBJ_FMOBJ; -extern process_profile_definition g_profile_Obj_GpTaru; -extern process_profile_definition g_profile_Obj_HHASHI; -extern process_profile_definition g_profile_OBJ_KANBAN2; -extern process_profile_definition g_profile_OBJ_KBACKET; -extern process_profile_definition g_profile_Obj_KkrGate; -extern process_profile_definition g_profile_Obj_KLift00; -extern process_profile_definition g_profile_Tag_KtOnFire; -extern process_profile_definition g_profile_Obj_Ladder; -extern process_profile_definition g_profile_Obj_Lv2Candle; -extern process_profile_definition g_profile_Obj_MagneArm; -extern process_profile_definition g_profile_Obj_MetalBox; -extern process_profile_definition g_profile_Obj_MGate; -extern process_profile_definition g_profile_Obj_NamePlate; -extern process_profile_definition g_profile_Obj_OnCloth; -extern process_profile_definition g_profile_Obj_RopeBridge; -extern process_profile_definition g_profile_Obj_SwallShutter; -extern process_profile_definition g_profile_OBJ_STICK; -extern process_profile_definition g_profile_Obj_StoneMark; -extern process_profile_definition g_profile_Obj_Swpropeller; -extern process_profile_definition g_profile_Obj_Swpush5; -extern process_profile_definition g_profile_Obj_Yobikusa; -extern process_profile_definition g_profile_SCENE_EXIT2; -extern process_profile_definition g_profile_ShopItem; -extern process_profile_definition g_profile_SQ; -extern process_profile_definition g_profile_SWC00; -extern process_profile_definition g_profile_Tag_CstaSw; -extern process_profile_definition g_profile_Tag_AJnot; -extern process_profile_definition g_profile_Tag_AttackItem; -extern process_profile_definition g_profile_Tag_Gstart; -extern process_profile_definition g_profile_Tag_Hinit; -extern process_profile_definition g_profile_Tag_Hjump; -extern process_profile_definition g_profile_Tag_Hstop; -extern process_profile_definition g_profile_Tag_Lv2PrChk; -extern process_profile_definition g_profile_Tag_Magne; -extern process_profile_definition g_profile_Tag_Mhint; -extern process_profile_definition g_profile_Tag_Mstop; -extern process_profile_definition g_profile_Tag_Spring; -extern process_profile_definition g_profile_Tag_Statue; -extern process_profile_definition g_profile_Ykgr; -extern process_profile_definition g_profile_DR; -extern process_profile_definition g_profile_L7lowDr; -extern process_profile_definition g_profile_L7ODR; -extern process_profile_definition g_profile_B_BH; -extern process_profile_definition g_profile_B_BQ; -extern process_profile_definition g_profile_B_DR; -extern process_profile_definition g_profile_B_DRE; -extern process_profile_definition g_profile_B_DS; -extern process_profile_definition g_profile_B_GG; -extern process_profile_definition g_profile_B_GM; -extern process_profile_definition g_profile_B_GND; -extern process_profile_definition g_profile_B_GO; -extern process_profile_definition g_profile_B_GOS; -extern process_profile_definition g_profile_B_MGN; -extern process_profile_definition g_profile_B_OB; -extern process_profile_definition g_profile_B_OH; -extern process_profile_definition g_profile_B_OH2; -extern process_profile_definition g_profile_B_TN; -extern process_profile_definition g_profile_B_YO; -extern process_profile_definition g_profile_B_YOI; -extern process_profile_definition g_profile_B_ZANT; -extern process_profile_definition g_profile_B_ZANTM; -extern process_profile_definition g_profile_B_ZANTZ; -extern process_profile_definition g_profile_B_ZANTS; -extern process_profile_definition g_profile_BALLOON2D; -extern process_profile_definition g_profile_BULLET; -extern process_profile_definition g_profile_COACH2D; -extern process_profile_definition g_profile_COACH_FIRE; -extern process_profile_definition g_profile_COW; -extern process_profile_definition g_profile_CSTATUE; -extern process_profile_definition g_profile_DO; -extern process_profile_definition g_profile_BOSS_DOOR; -extern process_profile_definition g_profile_L5BOSS_DOOR; -extern process_profile_definition g_profile_L1MBOSS_DOOR; -extern process_profile_definition g_profile_PushDoor; -extern process_profile_definition g_profile_E_AI; -extern process_profile_definition g_profile_E_ARROW; -extern process_profile_definition g_profile_E_BA; -extern process_profile_definition g_profile_E_BEE; -extern process_profile_definition g_profile_E_BG; -extern process_profile_definition g_profile_E_BI; -extern process_profile_definition g_profile_E_BI_LEAF; -extern process_profile_definition g_profile_E_BS; -extern process_profile_definition g_profile_E_BU; -extern process_profile_definition g_profile_E_BUG; -extern process_profile_definition g_profile_E_CR; -extern process_profile_definition g_profile_E_CR_EGG; -extern process_profile_definition g_profile_E_DB; -extern process_profile_definition g_profile_E_DB_LEAF; -extern process_profile_definition g_profile_E_DD; -extern process_profile_definition g_profile_E_DF; -extern process_profile_definition g_profile_E_DK; -extern process_profile_definition g_profile_E_DT; -extern process_profile_definition g_profile_E_FB; -extern process_profile_definition g_profile_E_FK; -extern process_profile_definition g_profile_E_FS; -extern process_profile_definition g_profile_E_FZ; -extern process_profile_definition g_profile_E_GB; -extern process_profile_definition g_profile_E_GE; -extern process_profile_definition g_profile_E_GI; -extern process_profile_definition g_profile_E_GM; -extern process_profile_definition g_profile_E_GOB; -extern process_profile_definition g_profile_E_GS; -extern process_profile_definition g_profile_E_HB_LEAF; -extern process_profile_definition g_profile_E_HM; -extern process_profile_definition g_profile_E_HP; -extern process_profile_definition g_profile_E_HZ; -extern process_profile_definition g_profile_E_HZELDA; -extern process_profile_definition g_profile_E_IS; -extern process_profile_definition g_profile_E_KG; -extern process_profile_definition g_profile_E_KK; -extern process_profile_definition g_profile_E_KR; -extern process_profile_definition g_profile_E_MB; -extern process_profile_definition g_profile_E_MD; -extern process_profile_definition g_profile_E_MF; -extern process_profile_definition g_profile_E_MK; -extern process_profile_definition g_profile_E_MK_BO; -extern process_profile_definition g_profile_E_MM; -extern process_profile_definition g_profile_E_MM_MT; -extern process_profile_definition g_profile_E_MS; -extern process_profile_definition g_profile_E_NZ; -extern process_profile_definition g_profile_E_OC; -extern process_profile_definition g_profile_E_OctBg; -extern process_profile_definition g_profile_E_OT; -extern process_profile_definition g_profile_E_PH; -extern process_profile_definition g_profile_E_PM; -extern process_profile_definition g_profile_E_PO; -extern process_profile_definition g_profile_E_PZ; -extern process_profile_definition g_profile_E_RB; -extern process_profile_definition g_profile_E_RDB; -extern process_profile_definition g_profile_E_RDY; -extern process_profile_definition g_profile_E_S1; -extern process_profile_definition g_profile_E_SB; -extern process_profile_definition g_profile_E_SF; -extern process_profile_definition g_profile_E_SG; -extern process_profile_definition g_profile_E_SH; -extern process_profile_definition g_profile_E_SM; -extern process_profile_definition g_profile_E_SM2; -extern process_profile_definition g_profile_E_ST; -extern process_profile_definition g_profile_E_ST_LINE; -extern process_profile_definition g_profile_E_SW; -extern process_profile_definition g_profile_E_TH; -extern process_profile_definition g_profile_E_TH_BALL; -extern process_profile_definition g_profile_E_TK; -extern process_profile_definition g_profile_E_TK2; -extern process_profile_definition g_profile_E_TK_BALL; -extern process_profile_definition g_profile_E_TT; -extern process_profile_definition g_profile_E_VT; -extern process_profile_definition g_profile_E_WAP; -extern process_profile_definition g_profile_E_WB; -extern process_profile_definition g_profile_E_WS; -extern process_profile_definition g_profile_E_WW; -extern process_profile_definition g_profile_E_YC; -extern process_profile_definition g_profile_E_YD; -extern process_profile_definition g_profile_E_YD_LEAF; -extern process_profile_definition g_profile_E_YG; -extern process_profile_definition g_profile_E_YH; -extern process_profile_definition g_profile_E_YK; -extern process_profile_definition g_profile_E_YM; -extern process_profile_definition g_profile_E_YM_TAG; -extern process_profile_definition g_profile_E_YMB; -extern process_profile_definition g_profile_E_YR; -extern process_profile_definition g_profile_E_ZH; -extern process_profile_definition g_profile_E_ZM; -extern process_profile_definition g_profile_E_ZS; -extern process_profile_definition g_profile_FORMATION_MNG; -extern process_profile_definition g_profile_GUARD_MNG; -extern process_profile_definition g_profile_HORSE; -extern process_profile_definition g_profile_HOZELDA; -extern process_profile_definition g_profile_Izumi_Gate; -extern process_profile_definition g_profile_KAGO; -extern process_profile_definition g_profile_KYTAG01; -extern process_profile_definition g_profile_KYTAG02; -extern process_profile_definition g_profile_KYTAG03; -extern process_profile_definition g_profile_KYTAG06; -extern process_profile_definition g_profile_KYTAG07; -extern process_profile_definition g_profile_KYTAG08; -extern process_profile_definition g_profile_KYTAG09; -extern process_profile_definition g_profile_KYTAG12; -extern process_profile_definition g_profile_KYTAG13; -extern process_profile_definition g_profile_KYTAG15; -extern process_profile_definition g_profile_KYTAG16; -extern process_profile_definition g_profile_MANT; -extern process_profile_definition g_profile_FSHOP; -extern process_profile_definition g_profile_MIRROR; -extern process_profile_definition g_profile_MOVIE_PLAYER; -extern process_profile_definition g_profile_MYNA; -extern process_profile_definition g_profile_NI; -extern process_profile_definition g_profile_NPC_ARU; -extern process_profile_definition g_profile_NPC_ASH; -extern process_profile_definition g_profile_NPC_ASHB; -extern process_profile_definition g_profile_NPC_BANS; -extern process_profile_definition g_profile_NPC_BLUENS; -extern process_profile_definition g_profile_NPC_BOU; -extern process_profile_definition g_profile_NPC_BOU_S; -extern process_profile_definition g_profile_NPC_CD3; -extern process_profile_definition g_profile_NPC_CHAT; -extern process_profile_definition g_profile_NPC_CHIN; -extern process_profile_definition g_profile_NPC_CLERKA; -extern process_profile_definition g_profile_NPC_CLERKB; -extern process_profile_definition g_profile_NPC_CLERKT; -extern process_profile_definition g_profile_NPC_COACH; -extern process_profile_definition g_profile_NPC_DF; -extern process_profile_definition g_profile_NPC_DOC; -extern process_profile_definition g_profile_NPC_DOORBOY; -extern process_profile_definition g_profile_NPC_DRSOL; -extern process_profile_definition g_profile_NPC_DU; -extern process_profile_definition g_profile_NPC_FAIRY; -extern process_profile_definition g_profile_NPC_FGUARD; -extern process_profile_definition g_profile_NPC_GND; -extern process_profile_definition g_profile_NPC_GRA; -extern process_profile_definition g_profile_NPC_GRC; -extern process_profile_definition g_profile_NPC_GRD; -extern process_profile_definition g_profile_NPC_GRM; -extern process_profile_definition g_profile_NPC_GRMC; -extern process_profile_definition g_profile_NPC_GRO; -extern process_profile_definition g_profile_NPC_GRR; -extern process_profile_definition g_profile_NPC_GRS; -extern process_profile_definition g_profile_NPC_GRZ; -extern process_profile_definition g_profile_NPC_GUARD; -extern process_profile_definition g_profile_NPC_GWOLF; -extern process_profile_definition g_profile_NPC_HANJO; -extern process_profile_definition g_profile_NPC_HENNA0; -extern process_profile_definition g_profile_NPC_HOZ; -extern process_profile_definition g_profile_NPC_IMPAL; -extern process_profile_definition g_profile_NPC_INKO; -extern process_profile_definition g_profile_NPC_INS; -extern process_profile_definition g_profile_NPC_JAGAR; -extern process_profile_definition g_profile_NPC_KASIHANA; -extern process_profile_definition g_profile_NPC_KASIKYU; -extern process_profile_definition g_profile_NPC_KASIMICH; -extern process_profile_definition g_profile_NPC_KDK; -extern process_profile_definition g_profile_NPC_KN; -extern process_profile_definition g_profile_NPC_KNJ; -extern process_profile_definition g_profile_NPC_KOLINB; -extern process_profile_definition g_profile_NPC_KS; -extern process_profile_definition g_profile_NPC_KYURY; -extern process_profile_definition g_profile_NPC_LEN; -extern process_profile_definition g_profile_NPC_LF; -extern process_profile_definition g_profile_NPC_LUD; -extern process_profile_definition g_profile_NPC_MIDP; -extern process_profile_definition g_profile_NPC_MK; -extern process_profile_definition g_profile_NPC_MOI; -extern process_profile_definition g_profile_NPC_MOIR; -extern process_profile_definition g_profile_MYNA2; -extern process_profile_definition g_profile_NPC_NE; -extern process_profile_definition g_profile_NPC_P2; -extern process_profile_definition g_profile_NPC_PACHI_BESU; -extern process_profile_definition g_profile_NPC_PACHI_MARO; -extern process_profile_definition g_profile_NPC_PACHI_TARO; -extern process_profile_definition g_profile_NPC_PASSER; -extern process_profile_definition g_profile_NPC_PASSER2; -extern process_profile_definition g_profile_NPC_POST; -extern process_profile_definition g_profile_NPC_POUYA; -extern process_profile_definition g_profile_NPC_PRAYER; -extern process_profile_definition g_profile_NPC_RACA; -extern process_profile_definition g_profile_NPC_RAFREL; -extern process_profile_definition g_profile_NPC_SARU; -extern process_profile_definition g_profile_NPC_SEIB; -extern process_profile_definition g_profile_NPC_SEIC; -extern process_profile_definition g_profile_NPC_SEID; -extern process_profile_definition g_profile_NPC_SEIRA; -extern process_profile_definition g_profile_NPC_SERA2; -extern process_profile_definition g_profile_NPC_SEIREI; -extern process_profile_definition g_profile_NPC_SHAD; -extern process_profile_definition g_profile_NPC_SHAMAN; -extern process_profile_definition g_profile_NPC_SHOE; -extern process_profile_definition g_profile_NPC_SHOP0; -extern process_profile_definition g_profile_NPC_SMARO; -extern process_profile_definition g_profile_NPC_SOLA; -extern process_profile_definition g_profile_NPC_SOLDIERa; -extern process_profile_definition g_profile_NPC_SOLDIERb; -extern process_profile_definition g_profile_NPC_SQ; -extern process_profile_definition g_profile_NPC_THE; -extern process_profile_definition g_profile_NPC_THEB; -extern process_profile_definition g_profile_NPC_TK; -extern process_profile_definition g_profile_NPC_TKC; -extern process_profile_definition g_profile_NPC_TKJ2; -extern process_profile_definition g_profile_NPC_TKS; -extern process_profile_definition g_profile_NPC_TOBY; -extern process_profile_definition g_profile_NPC_TR; -extern process_profile_definition g_profile_NPC_URI; -extern process_profile_definition g_profile_NPC_WORM; -extern process_profile_definition g_profile_NPC_WRESTLER; -extern process_profile_definition g_profile_NPC_YAMID; -extern process_profile_definition g_profile_NPC_YAMIS; -extern process_profile_definition g_profile_NPC_YAMIT; -extern process_profile_definition g_profile_NPC_YELIA; -extern process_profile_definition g_profile_NPC_YKM; -extern process_profile_definition g_profile_NPC_YKW; -extern process_profile_definition g_profile_NPC_ZANB; -extern process_profile_definition g_profile_NPC_ZANT; -extern process_profile_definition g_profile_NPC_ZELR; -extern process_profile_definition g_profile_NPC_ZELRO; -extern process_profile_definition g_profile_NPC_ZELDA; -extern process_profile_definition g_profile_NPC_ZRA; -extern process_profile_definition g_profile_NPC_ZRC; -extern process_profile_definition g_profile_NPC_ZRZ; -extern process_profile_definition g_profile_Obj_Lv5Key; -extern process_profile_definition g_profile_Obj_Turara; -extern process_profile_definition g_profile_Obj_TvCdlst; -extern process_profile_definition g_profile_Obj_Ytaihou; -extern process_profile_definition g_profile_Obj_AmiShutter; -extern process_profile_definition g_profile_Obj_Ari; -extern process_profile_definition g_profile_OBJ_AUTOMATA; -extern process_profile_definition g_profile_Obj_Avalanche; -extern process_profile_definition g_profile_OBJ_BALLOON; -extern process_profile_definition g_profile_Obj_BarDesk; -extern process_profile_definition g_profile_Obj_Batta; -extern process_profile_definition g_profile_Obj_BBox; -extern process_profile_definition g_profile_OBJ_BED; -extern process_profile_definition g_profile_Obj_Bemos; -extern process_profile_definition g_profile_Obj_Bhbridge; -extern process_profile_definition g_profile_Obj_BkLeaf; -extern process_profile_definition g_profile_BkyRock; -extern process_profile_definition g_profile_Obj_BmWindow; -extern process_profile_definition g_profile_Obj_BoomShutter; -extern process_profile_definition g_profile_Obj_Bombf; -extern process_profile_definition g_profile_OBJ_BOUMATO; -extern process_profile_definition g_profile_OBJ_BRG; -extern process_profile_definition g_profile_Obj_BsGate; -extern process_profile_definition g_profile_Obj_awaPlar; -extern process_profile_definition g_profile_Obj_CatDoor; -extern process_profile_definition g_profile_OBJ_CB; -extern process_profile_definition g_profile_Obj_ChainBlock; -extern process_profile_definition g_profile_Obj_Cdoor; -extern process_profile_definition g_profile_Obj_Chandelier; -extern process_profile_definition g_profile_Obj_Chest; -extern process_profile_definition g_profile_Obj_Cho; -extern process_profile_definition g_profile_Obj_Cowdoor; -extern process_profile_definition g_profile_Obj_Crope; -extern process_profile_definition g_profile_Obj_CRVFENCE; -extern process_profile_definition g_profile_Obj_CRVGATE; -extern process_profile_definition g_profile_Obj_CRVHAHEN; -extern process_profile_definition g_profile_Obj_CRVLH_DW; -extern process_profile_definition g_profile_Obj_CRVLH_UP; -extern process_profile_definition g_profile_Obj_CRVSTEEL; -extern process_profile_definition g_profile_Obj_Crystal; -extern process_profile_definition g_profile_Obj_ChainWall; -extern process_profile_definition g_profile_Obj_DamCps; -extern process_profile_definition g_profile_Obj_Dan; -extern process_profile_definition g_profile_Obj_Digholl; -extern process_profile_definition g_profile_Obj_DigSnow; -extern process_profile_definition g_profile_Obj_Elevator; -extern process_profile_definition g_profile_Obj_Drop; -extern process_profile_definition g_profile_Obj_DUST; -extern process_profile_definition g_profile_Obj_E_CREATE; -extern process_profile_definition g_profile_Obj_FallObj; -extern process_profile_definition g_profile_Obj_Fan; -extern process_profile_definition g_profile_Obj_Fchain; -extern process_profile_definition g_profile_Obj_FireWood; -extern process_profile_definition g_profile_Obj_FireWood2; -extern process_profile_definition g_profile_Obj_FirePillar; -extern process_profile_definition g_profile_Obj_FirePillar2; -extern process_profile_definition g_profile_Obj_Flag; -extern process_profile_definition g_profile_Obj_Flag2; -extern process_profile_definition g_profile_Obj_Flag3; -extern process_profile_definition g_profile_OBJ_FOOD; -extern process_profile_definition g_profile_OBJ_FW; -extern process_profile_definition g_profile_OBJ_GADGET; -extern process_profile_definition g_profile_Obj_GanonWall; -extern process_profile_definition g_profile_Obj_GanonWall2; -extern process_profile_definition g_profile_OBJ_GB; -extern process_profile_definition g_profile_Obj_Geyser; -extern process_profile_definition g_profile_Obj_glowSphere; -extern process_profile_definition g_profile_OBJ_GM; -extern process_profile_definition g_profile_Obj_GoGate; -extern process_profile_definition g_profile_Obj_GOMIKABE; -extern process_profile_definition g_profile_OBJ_GRA; -extern process_profile_definition g_profile_GRA_WALL; -extern process_profile_definition g_profile_Obj_GraRock; -extern process_profile_definition g_profile_Obj_GraveStone; -extern process_profile_definition g_profile_GRDWATER; -extern process_profile_definition g_profile_Obj_GrzRock; -extern process_profile_definition g_profile_Obj_H_Saku; -extern process_profile_definition g_profile_Obj_HBarrel; -extern process_profile_definition g_profile_Obj_HFtr; -extern process_profile_definition g_profile_Obj_MHasu; -extern process_profile_definition g_profile_Obj_Hata; -extern process_profile_definition g_profile_OBJ_HB; -extern process_profile_definition g_profile_Obj_HBombkoya; -extern process_profile_definition g_profile_Obj_HeavySw; -extern process_profile_definition g_profile_Obj_Hfuta; -extern process_profile_definition g_profile_Obj_HsTarget; -extern process_profile_definition g_profile_Obj_Ice_l; -extern process_profile_definition g_profile_Obj_Ice_s; -extern process_profile_definition g_profile_Obj_IceBlock; -extern process_profile_definition g_profile_Obj_IceLeaf; -extern process_profile_definition g_profile_OBJ_IHASI; -extern process_profile_definition g_profile_Obj_Ikada; -extern process_profile_definition g_profile_Obj_InoBone; -extern process_profile_definition g_profile_Obj_ITA; -extern process_profile_definition g_profile_OBJ_ITAMATO; -extern process_profile_definition g_profile_Obj_Kabuto; -extern process_profile_definition g_profile_Obj_Kag; -extern process_profile_definition g_profile_OBJ_KAGE; -extern process_profile_definition g_profile_OBJ_KAGO; -extern process_profile_definition g_profile_Obj_Kaisou; -extern process_profile_definition g_profile_Obj_Kam; -extern process_profile_definition g_profile_Obj_Kantera; -extern process_profile_definition g_profile_Obj_Kat; -extern process_profile_definition g_profile_Obj_KazeNeko; -extern process_profile_definition g_profile_OBJ_KBOX; -extern process_profile_definition g_profile_OBJ_KEY; -extern process_profile_definition g_profile_OBJ_KEYHOLE; -extern process_profile_definition g_profile_OBJ_KI; -extern process_profile_definition g_profile_Obj_KiPot; -extern process_profile_definition g_profile_OBJ_KITA; -extern process_profile_definition g_profile_Obj_KJgjs; -extern process_profile_definition g_profile_Obj_KKanban; -extern process_profile_definition g_profile_KN_BULLET; -extern process_profile_definition g_profile_Obj_Kshutter; -extern process_profile_definition g_profile_Obj_Kuw; -extern process_profile_definition g_profile_Obj_KWheel00; -extern process_profile_definition g_profile_Obj_KWheel01; -extern process_profile_definition g_profile_Obj_KznkArm; -extern process_profile_definition g_profile_Obj_Laundry; -extern process_profile_definition g_profile_Obj_LndRope; -extern process_profile_definition g_profile_OBJ_LBOX; -extern process_profile_definition g_profile_OBJ_LP; -extern process_profile_definition g_profile_Obj_Lv1Cdl00; -extern process_profile_definition g_profile_Obj_Lv1Cdl01; -extern process_profile_definition g_profile_Obj_Lv3Candle; -extern process_profile_definition g_profile_Obj_Lv3Water; -extern process_profile_definition g_profile_Obj_Lv3Water2; -extern process_profile_definition g_profile_OBJ_LV3WATERB; -extern process_profile_definition g_profile_Obj_Lv3R10Saka; -extern process_profile_definition g_profile_Obj_WaterEff; -extern process_profile_definition g_profile_Tag_Lv4CandleDm; -extern process_profile_definition g_profile_Tag_Lv4Candle; -extern process_profile_definition g_profile_Obj_Lv4EdShutter; -extern process_profile_definition g_profile_Obj_Lv4Gate; -extern process_profile_definition g_profile_Obj_Lv4HsTarget; -extern process_profile_definition g_profile_Obj_Lv4PoGate; -extern process_profile_definition g_profile_Obj_Lv4RailWall; -extern process_profile_definition g_profile_Obj_Lv4SlideWall; -extern process_profile_definition g_profile_Obj_Lv4Bridge; -extern process_profile_definition g_profile_Obj_Lv4Chan; -extern process_profile_definition g_profile_Obj_Lv4DigSand; -extern process_profile_definition g_profile_Obj_Lv4Floor; -extern process_profile_definition g_profile_Obj_Lv4Gear; -extern process_profile_definition g_profile_Obj_PRElvtr; -extern process_profile_definition g_profile_Obj_Lv4PRwall; -extern process_profile_definition g_profile_Obj_Lv4Sand; -extern process_profile_definition g_profile_Obj_Lv5FBoard; -extern process_profile_definition g_profile_Obj_IceWall; -extern process_profile_definition g_profile_Obj_Lv5SwIce; -extern process_profile_definition g_profile_Obj_Ychndlr; -extern process_profile_definition g_profile_Obj_YIblltray; -extern process_profile_definition g_profile_Obj_Lv6ChgGate; -extern process_profile_definition g_profile_Obj_Lv6FuriTrap; -extern process_profile_definition g_profile_Obj_Lv6Lblock; -extern process_profile_definition g_profile_Obj_Lv6SwGate; -extern process_profile_definition g_profile_Obj_Lv6SzGate; -extern process_profile_definition g_profile_Obj_Lv6Tenbin; -extern process_profile_definition g_profile_Obj_Lv6TogeRoll; -extern process_profile_definition g_profile_Obj_Lv6TogeTrap; -extern process_profile_definition g_profile_Obj_Lv6bemos; -extern process_profile_definition g_profile_Obj_Lv6bemos2; -extern process_profile_definition g_profile_Obj_Lv6EGate; -extern process_profile_definition g_profile_Obj_Lv6ElevtA; -extern process_profile_definition g_profile_Obj_Lv6SwTurn; -extern process_profile_definition g_profile_Obj_Lv7BsGate; -extern process_profile_definition g_profile_Obj_Lv7PropY; -extern process_profile_definition g_profile_Obj_Lv7Bridge; -extern process_profile_definition g_profile_Obj_Lv8KekkaiTrap; -extern process_profile_definition g_profile_Obj_Lv8Lift; -extern process_profile_definition g_profile_Obj_Lv8OptiLift; -extern process_profile_definition g_profile_Obj_Lv8UdFloor; -extern process_profile_definition g_profile_Obj_Lv9SwShutter; -extern process_profile_definition g_profile_Obj_MagLift; -extern process_profile_definition g_profile_Obj_MagLiftRot; -extern process_profile_definition g_profile_OBJ_MAKI; -extern process_profile_definition g_profile_Obj_MasterSword; -extern process_profile_definition g_profile_Obj_Mato; -extern process_profile_definition g_profile_Obj_MHole; -extern process_profile_definition g_profile_OBJ_MIE; -extern process_profile_definition g_profile_Obj_Mirror6Pole; -extern process_profile_definition g_profile_Obj_MirrorChain; -extern process_profile_definition g_profile_Obj_MirrorSand; -extern process_profile_definition g_profile_Obj_MirrorScrew; -extern process_profile_definition g_profile_Obj_MirrorTable; -extern process_profile_definition g_profile_OBJ_MSIMA; -extern process_profile_definition g_profile_Obj_MvStair; -extern process_profile_definition g_profile_OBJ_MYOGAN; -extern process_profile_definition g_profile_Obj_Nagaisu; -extern process_profile_definition g_profile_Obj_Nan; -extern process_profile_definition g_profile_OBJ_NDOOR; -extern process_profile_definition g_profile_OBJ_NOUGU; -extern process_profile_definition g_profile_OCTHASHI; -extern process_profile_definition g_profile_OBJ_OILTUBO; -extern process_profile_definition g_profile_Obj_Onsen; -extern process_profile_definition g_profile_OBJ_ONSEN_FIRE; -extern process_profile_definition g_profile_Obj_OnsenTaru; -extern process_profile_definition g_profile_Obj_PushDoor; -extern process_profile_definition g_profile_Obj_PDtile; -extern process_profile_definition g_profile_Obj_PDwall; -extern process_profile_definition g_profile_Obj_Picture; -extern process_profile_definition g_profile_Obj_Pillar; -extern process_profile_definition g_profile_OBJ_PLEAF; -extern process_profile_definition g_profile_Obj_poCandle; -extern process_profile_definition g_profile_Obj_poFire; -extern process_profile_definition g_profile_Obj_poTbox; -extern process_profile_definition g_profile_Obj_Prop; -extern process_profile_definition g_profile_OBJ_PUMPKIN; -extern process_profile_definition g_profile_Obj_RCircle; -extern process_profile_definition g_profile_Obj_RfHole; -extern process_profile_definition g_profile_Obj_RiderGate; -extern process_profile_definition g_profile_Obj_RIVERROCK; -extern process_profile_definition g_profile_OBJ_ROCK; -extern process_profile_definition g_profile_Obj_RotBridge; -extern process_profile_definition g_profile_Obj_RotTrap; -extern process_profile_definition g_profile_OBJ_ROTEN; -extern process_profile_definition g_profile_Obj_RotStair; -extern process_profile_definition g_profile_OBJ_RW; -extern process_profile_definition g_profile_Obj_Saidan; -extern process_profile_definition g_profile_Obj_Sakuita; -extern process_profile_definition g_profile_Obj_ItaRope; -extern process_profile_definition g_profile_Obj_SCannon; -extern process_profile_definition g_profile_Obj_SCannonCrs; -extern process_profile_definition g_profile_Obj_SCannonTen; -extern process_profile_definition g_profile_OBJ_SEKIDOOR; -extern process_profile_definition g_profile_OBJ_SEKIZO; -extern process_profile_definition g_profile_OBJ_SEKIZOA; -extern process_profile_definition g_profile_Obj_Shield; -extern process_profile_definition g_profile_Obj_SM_DOOR; -extern process_profile_definition g_profile_Obj_SmallKey; -extern process_profile_definition g_profile_Obj_SmgDoor; -extern process_profile_definition g_profile_Obj_Smoke; -extern process_profile_definition g_profile_OBJ_SMTILE; -extern process_profile_definition g_profile_Obj_SmWStone; -extern process_profile_definition g_profile_Tag_SnowEff; -extern process_profile_definition g_profile_Obj_SnowSoup; -extern process_profile_definition g_profile_OBJ_SO; -extern process_profile_definition g_profile_Obj_SpinLift; -extern process_profile_definition g_profile_OBJ_SSDRINK; -extern process_profile_definition g_profile_OBJ_SSITEM; -extern process_profile_definition g_profile_Obj_StairBlock; -extern process_profile_definition g_profile_Obj_Stone; -extern process_profile_definition g_profile_Obj_Stopper; -extern process_profile_definition g_profile_Obj_Stopper2; -extern process_profile_definition g_profile_OBJ_SUISYA; -extern process_profile_definition g_profile_OBJ_SW; -extern process_profile_definition g_profile_Obj_SwBallA; -extern process_profile_definition g_profile_Obj_SwBallB; -extern process_profile_definition g_profile_Obj_SwBallC; -extern process_profile_definition g_profile_Obj_SwLight; -extern process_profile_definition g_profile_Obj_SwChain; -extern process_profile_definition g_profile_Obj_SwHang; -extern process_profile_definition g_profile_Obj_Sword; -extern process_profile_definition g_profile_Obj_Swpush2; -extern process_profile_definition g_profile_Obj_SwSpinner; -extern process_profile_definition g_profile_Obj_SwTurn; -extern process_profile_definition g_profile_Obj_SyRock; -extern process_profile_definition g_profile_Obj_SZbridge; -extern process_profile_definition g_profile_Obj_TaFence; -extern process_profile_definition g_profile_Obj_Table; -extern process_profile_definition g_profile_Obj_TakaraDai; -extern process_profile_definition g_profile_OBJ_TATIGI; -extern process_profile_definition g_profile_Obj_Ten; -extern process_profile_definition g_profile_Obj_TestCube; -extern process_profile_definition g_profile_Obj_Gake; -extern process_profile_definition g_profile_Obj_THASHI; -extern process_profile_definition g_profile_Obj_TDoor; -extern process_profile_definition g_profile_Obj_TimeFire; -extern process_profile_definition g_profile_OBJ_TKS; -extern process_profile_definition g_profile_Obj_TMoon; -extern process_profile_definition g_profile_Obj_ToaruMaki; -extern process_profile_definition g_profile_OBJ_TOBY; -extern process_profile_definition g_profile_Obj_TobyHouse; -extern process_profile_definition g_profile_Obj_TogeTrap; -extern process_profile_definition g_profile_Obj_Tombo; -extern process_profile_definition g_profile_Obj_Tornado; -extern process_profile_definition g_profile_Obj_Tornado2; -extern process_profile_definition g_profile_OBJ_TP; -extern process_profile_definition g_profile_TREESH; -extern process_profile_definition g_profile_Obj_TwGate; -extern process_profile_definition g_profile_OBJ_UDOOR; -extern process_profile_definition g_profile_OBJ_USAKU; -extern process_profile_definition g_profile_Obj_VolcGnd; -extern process_profile_definition g_profile_Obj_VolcanicBall; -extern process_profile_definition g_profile_Obj_VolcanicBomb; -extern process_profile_definition g_profile_Obj_KakarikoBrg; -extern process_profile_definition g_profile_Obj_OrdinBrg; -extern process_profile_definition g_profile_Obj_WtGate; -extern process_profile_definition g_profile_Obj_WaterPillar; -extern process_profile_definition g_profile_Obj_WaterFall; -extern process_profile_definition g_profile_Obj_Wchain; -extern process_profile_definition g_profile_Obj_WdStick; -extern process_profile_definition g_profile_OBJ_WEB0; -extern process_profile_definition g_profile_OBJ_WEB1; -extern process_profile_definition g_profile_Obj_WellCover; -extern process_profile_definition g_profile_OBJ_WFLAG; -extern process_profile_definition g_profile_Obj_WindStone; -extern process_profile_definition g_profile_Obj_Window; -extern process_profile_definition g_profile_Obj_WoodPendulum; -extern process_profile_definition g_profile_Obj_WoodStatue; -extern process_profile_definition g_profile_Obj_WoodenSword; -extern process_profile_definition g_profile_OBJ_YBAG; -extern process_profile_definition g_profile_OBJ_YSTONE; -extern process_profile_definition g_profile_Obj_ZoraCloth; -extern process_profile_definition g_profile_Obj_ZDoor; -extern process_profile_definition g_profile_Obj_zrTurara; -extern process_profile_definition g_profile_Obj_zrTuraraRc; -extern process_profile_definition g_profile_ZRA_MARK; -extern process_profile_definition g_profile_OBJ_ZRAFREEZE; -extern process_profile_definition g_profile_Obj_ZraRock; -extern process_profile_definition g_profile_PASSER_MNG; -extern process_profile_definition g_profile_PERU; -extern process_profile_definition g_profile_PPolamp; -extern process_profile_definition g_profile_SKIP2D; -extern process_profile_definition g_profile_START_AND_GOAL; -extern process_profile_definition g_profile_SwBall; -extern process_profile_definition g_profile_SwLBall; -extern process_profile_definition g_profile_SwTime; -extern process_profile_definition g_profile_Tag_Lv6Gate; -extern process_profile_definition g_profile_Tag_Lv7Gate; -extern process_profile_definition g_profile_Tag_Lv8Gate; -extern process_profile_definition g_profile_Tag_TWGate; -extern process_profile_definition g_profile_Tag_Arena; -extern process_profile_definition g_profile_Tag_Assist; -extern process_profile_definition g_profile_TAG_BTLITM; -extern process_profile_definition g_profile_Tag_ChgRestart; -extern process_profile_definition g_profile_TAG_CSW; -extern process_profile_definition g_profile_Tag_Escape; -extern process_profile_definition g_profile_Tag_FWall; -extern process_profile_definition g_profile_TAG_GRA; -extern process_profile_definition g_profile_TAG_GUARD; -extern process_profile_definition g_profile_Tag_Instruction; -extern process_profile_definition g_profile_Tag_KagoFall; -extern process_profile_definition g_profile_Tag_LightBall; -extern process_profile_definition g_profile_TAG_LV5SOUP; -extern process_profile_definition g_profile_Tag_Lv6CstaSw; -extern process_profile_definition g_profile_Tag_Mmsg; -extern process_profile_definition g_profile_Tag_Mwait; -extern process_profile_definition g_profile_TAG_MYNA2; -extern process_profile_definition g_profile_TAG_MNLIGHT; -extern process_profile_definition g_profile_TAG_PATI; -extern process_profile_definition g_profile_Tag_poFire; -extern process_profile_definition g_profile_TAG_QS; -extern process_profile_definition g_profile_Tag_RetRoom; -extern process_profile_definition g_profile_Tag_RiverBack; -extern process_profile_definition g_profile_Tag_RmbitSw; -extern process_profile_definition g_profile_Tag_Schedule; -extern process_profile_definition g_profile_Tag_SetBall; -extern process_profile_definition g_profile_Tag_Restart; -extern process_profile_definition g_profile_TAG_SHOPCAM; -extern process_profile_definition g_profile_TAG_SHOPITM; -extern process_profile_definition g_profile_Tag_SmkEmt; -extern process_profile_definition g_profile_Tag_Spinner; -extern process_profile_definition g_profile_Tag_Sppath; -extern process_profile_definition g_profile_TAG_SSDRINK; -extern process_profile_definition g_profile_Tag_Stream; -extern process_profile_definition g_profile_Tag_TheBHint; -extern process_profile_definition g_profile_Tag_WaraHowl; -extern process_profile_definition g_profile_Tag_WatchGe; -extern process_profile_definition g_profile_Tag_WaterFall; -extern process_profile_definition g_profile_Tag_Wljump; -extern process_profile_definition g_profile_TAG_YAMI; -extern process_profile_definition g_profile_TALK; -extern process_profile_definition g_profile_TBOX_SW; -extern process_profile_definition g_profile_TITLE; -extern process_profile_definition g_profile_WarpBug; +DUSK_GAME_EXTERN process_profile_definition g_profile_ALINK; +DUSK_GAME_EXTERN process_profile_definition g_profile_NO_CHG_ROOM; +DUSK_GAME_EXTERN process_profile_definition g_profile_ITEM; +DUSK_GAME_EXTERN process_profile_definition g_profile_CAMERA; +DUSK_GAME_EXTERN process_profile_definition g_profile_CAMERA2; +DUSK_GAME_EXTERN process_profile_definition g_profile_ENVSE; +DUSK_GAME_EXTERN process_profile_definition g_profile_GAMEOVER; +DUSK_GAME_EXTERN process_profile_definition g_profile_KANKYO; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYEFF; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYEFF2; +DUSK_GAME_EXTERN process_profile_definition g_profile_KY_THUNDER; +DUSK_GAME_EXTERN process_profile_definition g_profile_MENUWINDOW; +DUSK_GAME_EXTERN process_profile_definition g_profile_METER2; +DUSK_GAME_EXTERN process_profile_definition g_profile_MSG_OBJECT; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP0; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP1; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP6; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP7; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP8; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP9; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP10; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP11; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP2; +DUSK_GAME_EXTERN process_profile_definition g_profile_OVERLAP3; +DUSK_GAME_EXTERN process_profile_definition g_profile_LOGO_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_MENU_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_NAME_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_NAMEEX_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_PLAY_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_OPENING_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_ROOM_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_WARNING_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_WARNING2_SCENE; +DUSK_GAME_EXTERN process_profile_definition g_profile_TIMER; +DUSK_GAME_EXTERN process_profile_definition g_profile_WMARK; +DUSK_GAME_EXTERN process_profile_definition g_profile_WPILLAR; +DUSK_GAME_EXTERN process_profile_definition g_profile_ANDSW; +DUSK_GAME_EXTERN process_profile_definition g_profile_BG; +DUSK_GAME_EXTERN process_profile_definition g_profile_BG_OBJ; +DUSK_GAME_EXTERN process_profile_definition g_profile_DMIDNA; +DUSK_GAME_EXTERN process_profile_definition g_profile_DBDOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_KNOB20; +DUSK_GAME_EXTERN process_profile_definition g_profile_DOOR20; +DUSK_GAME_EXTERN process_profile_definition g_profile_SPIRAL_DOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_DSHUTTER; +DUSK_GAME_EXTERN process_profile_definition g_profile_EP; +DUSK_GAME_EXTERN process_profile_definition g_profile_HITOBJ; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG00; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG04; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG17; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_BEF; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BurnBox; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Carry; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_ITO; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Movebox; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Swpush; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Timer; +DUSK_GAME_EXTERN process_profile_definition g_profile_PATH_LINE; +DUSK_GAME_EXTERN process_profile_definition g_profile_SCENE_EXIT; +DUSK_GAME_EXTERN process_profile_definition g_profile_SET_BG_OBJ; +DUSK_GAME_EXTERN process_profile_definition g_profile_SWHIT0; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_ALLMATO; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_CAMERA; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_CHKPOINT; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_EVENT; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_EVT; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_EVTAREA; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_EVTMSG; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_HOWL; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_KMSG; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_LANTERN; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Mist; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_MSG; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_PUSH; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_TELOP; +DUSK_GAME_EXTERN process_profile_definition g_profile_TBOX; +DUSK_GAME_EXTERN process_profile_definition g_profile_TBOX2; +DUSK_GAME_EXTERN process_profile_definition g_profile_VRBOX; +DUSK_GAME_EXTERN process_profile_definition g_profile_VRBOX2; +DUSK_GAME_EXTERN process_profile_definition g_profile_ARROW; +DUSK_GAME_EXTERN process_profile_definition g_profile_BOOMERANG; +DUSK_GAME_EXTERN process_profile_definition g_profile_CROD; +DUSK_GAME_EXTERN process_profile_definition g_profile_DEMO00; +DUSK_GAME_EXTERN process_profile_definition g_profile_DISAPPEAR; +DUSK_GAME_EXTERN process_profile_definition g_profile_MG_ROD; +DUSK_GAME_EXTERN process_profile_definition g_profile_MIDNA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NBOMB; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_LifeContainer; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Yousei; +DUSK_GAME_EXTERN process_profile_definition g_profile_SPINNER; +DUSK_GAME_EXTERN process_profile_definition g_profile_SUSPEND; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Attp; +DUSK_GAME_EXTERN process_profile_definition g_profile_ALLDIE; +DUSK_GAME_EXTERN process_profile_definition g_profile_ANDSW2; +DUSK_GAME_EXTERN process_profile_definition g_profile_BD; +DUSK_GAME_EXTERN process_profile_definition g_profile_CANOE; +DUSK_GAME_EXTERN process_profile_definition g_profile_CSTAF; +DUSK_GAME_EXTERN process_profile_definition g_profile_Demo_Item; +DUSK_GAME_EXTERN process_profile_definition g_profile_L1BOSS_DOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DN; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_FM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GA; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_HB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_NEST; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_RD; +DUSK_GAME_EXTERN process_profile_definition g_profile_ECONT; +DUSK_GAME_EXTERN process_profile_definition g_profile_FR; +DUSK_GAME_EXTERN process_profile_definition g_profile_GRASS; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG05; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG10; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG11; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG14; +DUSK_GAME_EXTERN process_profile_definition g_profile_MG_FISH; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_BESU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_FAIRY_SEIREI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_FISH; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_HENNA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KAKASHI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KKRI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KOLIN; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_MARO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TARO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TKJ; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BHASHI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BkDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BossWarp; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Cboard; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Digpl; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Eff; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_FMOBJ; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GpTaru; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_HHASHI; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KANBAN2; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KBACKET; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KkrGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KLift00; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_KtOnFire; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ladder; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv2Candle; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MagneArm; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MetalBox; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_NamePlate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_OnCloth; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RopeBridge; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwallShutter; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_STICK; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_StoneMark; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Swpropeller; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Swpush5; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Yobikusa; +DUSK_GAME_EXTERN process_profile_definition g_profile_SCENE_EXIT2; +DUSK_GAME_EXTERN process_profile_definition g_profile_ShopItem; +DUSK_GAME_EXTERN process_profile_definition g_profile_SQ; +DUSK_GAME_EXTERN process_profile_definition g_profile_SWC00; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_CstaSw; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_AJnot; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_AttackItem; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Gstart; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Hinit; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Hjump; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Hstop; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv2PrChk; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Magne; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Mhint; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Mstop; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Spring; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Statue; +DUSK_GAME_EXTERN process_profile_definition g_profile_Ykgr; +DUSK_GAME_EXTERN process_profile_definition g_profile_DR; +DUSK_GAME_EXTERN process_profile_definition g_profile_L7lowDr; +DUSK_GAME_EXTERN process_profile_definition g_profile_L7ODR; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_BH; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_BQ; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_DR; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_DRE; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_DS; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_GG; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_GM; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_GND; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_GO; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_GOS; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_MGN; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_OB; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_OH; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_OH2; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_TN; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_YO; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_YOI; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_ZANT; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_ZANTM; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_ZANTZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_B_ZANTS; +DUSK_GAME_EXTERN process_profile_definition g_profile_BALLOON2D; +DUSK_GAME_EXTERN process_profile_definition g_profile_BULLET; +DUSK_GAME_EXTERN process_profile_definition g_profile_COACH2D; +DUSK_GAME_EXTERN process_profile_definition g_profile_COACH_FIRE; +DUSK_GAME_EXTERN process_profile_definition g_profile_COW; +DUSK_GAME_EXTERN process_profile_definition g_profile_CSTATUE; +DUSK_GAME_EXTERN process_profile_definition g_profile_DO; +DUSK_GAME_EXTERN process_profile_definition g_profile_BOSS_DOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_L5BOSS_DOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_L1MBOSS_DOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_PushDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_AI; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_ARROW; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BA; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BEE; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BI; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BI_LEAF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BS; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BU; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_BUG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_CR; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_CR_EGG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DB_LEAF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DD; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DK; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_DT; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_FB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_FK; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_FS; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_FZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GE; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GI; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GOB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_GS; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_HB_LEAF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_HM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_HP; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_HZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_HZELDA; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_IS; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_KG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_KK; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_KR; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MD; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MK; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MK_BO; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MM_MT; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_MS; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_NZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_OC; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_OctBg; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_OT; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_PH; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_PM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_PO; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_PZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_RB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_RDB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_RDY; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_S1; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SH; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SM2; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_ST; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_ST_LINE; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_SW; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_TH; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_TH_BALL; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_TK; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_TK2; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_TK_BALL; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_TT; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_VT; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_WAP; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_WB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_WS; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_WW; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YC; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YD; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YD_LEAF; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YH; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YK; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YM_TAG; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YMB; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_YR; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_ZH; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_ZM; +DUSK_GAME_EXTERN process_profile_definition g_profile_E_ZS; +DUSK_GAME_EXTERN process_profile_definition g_profile_FORMATION_MNG; +DUSK_GAME_EXTERN process_profile_definition g_profile_GUARD_MNG; +DUSK_GAME_EXTERN process_profile_definition g_profile_HORSE; +DUSK_GAME_EXTERN process_profile_definition g_profile_HOZELDA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Izumi_Gate; +DUSK_GAME_EXTERN process_profile_definition g_profile_KAGO; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG01; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG02; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG03; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG06; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG07; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG08; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG09; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG12; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG13; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG15; +DUSK_GAME_EXTERN process_profile_definition g_profile_KYTAG16; +DUSK_GAME_EXTERN process_profile_definition g_profile_MANT; +DUSK_GAME_EXTERN process_profile_definition g_profile_FSHOP; +DUSK_GAME_EXTERN process_profile_definition g_profile_MIRROR; +DUSK_GAME_EXTERN process_profile_definition g_profile_MOVIE_PLAYER; +DUSK_GAME_EXTERN process_profile_definition g_profile_MYNA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ARU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ASH; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ASHB; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_BANS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_BLUENS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_BOU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_BOU_S; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_CD3; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_CHAT; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_CHIN; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_CLERKA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_CLERKB; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_CLERKT; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_COACH; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_DF; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_DOC; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_DOORBOY; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_DRSOL; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_DU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_FAIRY; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_FGUARD; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GND; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRC; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRD; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRM; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRMC; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRR; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GRZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GUARD; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_GWOLF; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_HANJO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_HENNA0; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_HOZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_IMPAL; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_INKO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_INS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_JAGAR; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KASIHANA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KASIKYU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KASIMICH; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KDK; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KN; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KNJ; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KOLINB; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_KYURY; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_LEN; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_LF; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_LUD; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_MIDP; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_MK; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_MOI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_MOIR; +DUSK_GAME_EXTERN process_profile_definition g_profile_MYNA2; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_NE; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_P2; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_PACHI_BESU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_PACHI_MARO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_PACHI_TARO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_PASSER; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_PASSER2; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_POST; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_POUYA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_PRAYER; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_RACA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_RAFREL; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SARU; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SEIB; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SEIC; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SEID; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SEIRA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SERA2; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SEIREI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SHAD; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SHAMAN; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SHOE; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SHOP0; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SMARO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SOLA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SOLDIERa; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SOLDIERb; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_SQ; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_THE; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_THEB; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TK; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TKC; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TKJ2; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TKS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TOBY; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_TR; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_URI; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_WORM; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_WRESTLER; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_YAMID; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_YAMIS; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_YAMIT; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_YELIA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_YKM; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_YKW; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZANB; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZANT; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZELR; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZELRO; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZELDA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZRA; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZRC; +DUSK_GAME_EXTERN process_profile_definition g_profile_NPC_ZRZ; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv5Key; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Turara; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TvCdlst; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ytaihou; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_AmiShutter; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ari; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_AUTOMATA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Avalanche; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_BALLOON; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BarDesk; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Batta; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BBox; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_BED; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Bemos; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Bhbridge; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BkLeaf; +DUSK_GAME_EXTERN process_profile_definition g_profile_BkyRock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BmWindow; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BoomShutter; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Bombf; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_BOUMATO; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_BRG; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_BsGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_awaPlar; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CatDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_CB; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ChainBlock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Cdoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Chandelier; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Chest; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Cho; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Cowdoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Crope; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CRVFENCE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CRVGATE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CRVHAHEN; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CRVLH_DW; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CRVLH_UP; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_CRVSTEEL; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Crystal; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ChainWall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_DamCps; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Dan; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Digholl; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_DigSnow; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Elevator; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Drop; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_DUST; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_E_CREATE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_FallObj; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Fan; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Fchain; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_FireWood; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_FireWood2; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_FirePillar; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_FirePillar2; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Flag; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Flag2; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Flag3; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_FOOD; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_FW; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_GADGET; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GanonWall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GanonWall2; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_GB; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Geyser; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_glowSphere; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_GM; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GoGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GOMIKABE; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_GRA; +DUSK_GAME_EXTERN process_profile_definition g_profile_GRA_WALL; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GraRock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GraveStone; +DUSK_GAME_EXTERN process_profile_definition g_profile_GRDWATER; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_GrzRock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_H_Saku; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_HBarrel; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_HFtr; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MHasu; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Hata; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_HB; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_HBombkoya; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_HeavySw; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Hfuta; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_HsTarget; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ice_l; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ice_s; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_IceBlock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_IceLeaf; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_IHASI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ikada; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_InoBone; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ITA; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_ITAMATO; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kabuto; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kag; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KAGE; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KAGO; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kaisou; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kam; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kantera; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kat; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KazeNeko; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KBOX; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KEY; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KEYHOLE; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KiPot; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_KITA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KJgjs; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KKanban; +DUSK_GAME_EXTERN process_profile_definition g_profile_KN_BULLET; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kshutter; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Kuw; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KWheel00; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KWheel01; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KznkArm; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Laundry; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_LndRope; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_LBOX; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_LP; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv1Cdl00; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv1Cdl01; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv3Candle; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv3Water; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv3Water2; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_LV3WATERB; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv3R10Saka; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WaterEff; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv4CandleDm; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv4Candle; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4EdShutter; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4Gate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4HsTarget; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4PoGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4RailWall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4SlideWall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4Bridge; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4Chan; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4DigSand; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4Floor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4Gear; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_PRElvtr; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4PRwall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv4Sand; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv5FBoard; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_IceWall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv5SwIce; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ychndlr; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_YIblltray; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6ChgGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6FuriTrap; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6Lblock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6SwGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6SzGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6Tenbin; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6TogeRoll; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6TogeTrap; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6bemos; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6bemos2; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6EGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6ElevtA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv6SwTurn; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv7BsGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv7PropY; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv7Bridge; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv8KekkaiTrap; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv8Lift; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv8OptiLift; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv8UdFloor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Lv9SwShutter; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MagLift; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MagLiftRot; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_MAKI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MasterSword; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Mato; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MHole; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_MIE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Mirror6Pole; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MirrorChain; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MirrorSand; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MirrorScrew; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MirrorTable; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_MSIMA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_MvStair; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_MYOGAN; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Nagaisu; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Nan; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_NDOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_NOUGU; +DUSK_GAME_EXTERN process_profile_definition g_profile_OCTHASHI; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_OILTUBO; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Onsen; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_ONSEN_FIRE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_OnsenTaru; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_PushDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_PDtile; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_PDwall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Picture; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Pillar; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_PLEAF; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_poCandle; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_poFire; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_poTbox; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Prop; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_PUMPKIN; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RCircle; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RfHole; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RiderGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RIVERROCK; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_ROCK; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RotBridge; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RotTrap; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_ROTEN; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_RotStair; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_RW; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Saidan; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Sakuita; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ItaRope; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SCannon; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SCannonCrs; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SCannonTen; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SEKIDOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SEKIZO; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SEKIZOA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Shield; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SM_DOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SmallKey; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SmgDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Smoke; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SMTILE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SmWStone; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_SnowEff; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SnowSoup; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SO; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SpinLift; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SSDRINK; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SSITEM; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_StairBlock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Stone; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Stopper; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Stopper2; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SUISYA; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_SW; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwBallA; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwBallB; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwBallC; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwLight; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwChain; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwHang; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Sword; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Swpush2; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwSpinner; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SwTurn; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SyRock; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_SZbridge; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TaFence; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Table; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TakaraDai; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_TATIGI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Ten; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TestCube; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Gake; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_THASHI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TimeFire; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_TKS; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TMoon; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ToaruMaki; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_TOBY; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TobyHouse; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TogeTrap; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Tombo; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Tornado; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Tornado2; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_TP; +DUSK_GAME_EXTERN process_profile_definition g_profile_TREESH; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_TwGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_UDOOR; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_USAKU; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_VolcGnd; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_VolcanicBall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_VolcanicBomb; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_KakarikoBrg; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_OrdinBrg; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WtGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WaterPillar; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WaterFall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Wchain; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WdStick; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_WEB0; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_WEB1; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WellCover; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_WFLAG; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WindStone; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_Window; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WoodPendulum; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WoodStatue; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_WoodenSword; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_YBAG; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_YSTONE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ZoraCloth; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ZDoor; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_zrTurara; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_zrTuraraRc; +DUSK_GAME_EXTERN process_profile_definition g_profile_ZRA_MARK; +DUSK_GAME_EXTERN process_profile_definition g_profile_OBJ_ZRAFREEZE; +DUSK_GAME_EXTERN process_profile_definition g_profile_Obj_ZraRock; +DUSK_GAME_EXTERN process_profile_definition g_profile_PASSER_MNG; +DUSK_GAME_EXTERN process_profile_definition g_profile_PERU; +DUSK_GAME_EXTERN process_profile_definition g_profile_PPolamp; +DUSK_GAME_EXTERN process_profile_definition g_profile_SKIP2D; +DUSK_GAME_EXTERN process_profile_definition g_profile_START_AND_GOAL; +DUSK_GAME_EXTERN process_profile_definition g_profile_SwBall; +DUSK_GAME_EXTERN process_profile_definition g_profile_SwLBall; +DUSK_GAME_EXTERN process_profile_definition g_profile_SwTime; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv6Gate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv7Gate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv8Gate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_TWGate; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Arena; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Assist; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_BTLITM; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_ChgRestart; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_CSW; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Escape; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_FWall; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_GRA; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_GUARD; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Instruction; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_KagoFall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_LightBall; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_LV5SOUP; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Lv6CstaSw; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Mmsg; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Mwait; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_MYNA2; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_MNLIGHT; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_PATI; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_poFire; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_QS; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_RetRoom; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_RiverBack; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_RmbitSw; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Schedule; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_SetBall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Restart; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_SHOPCAM; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_SHOPITM; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_SmkEmt; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Spinner; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Sppath; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_SSDRINK; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Stream; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_TheBHint; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_WaraHowl; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_WatchGe; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_WaterFall; +DUSK_GAME_EXTERN process_profile_definition g_profile_Tag_Wljump; +DUSK_GAME_EXTERN process_profile_definition g_profile_TAG_YAMI; +DUSK_GAME_EXTERN process_profile_definition g_profile_TALK; +DUSK_GAME_EXTERN process_profile_definition g_profile_TBOX_SW; +DUSK_GAME_EXTERN process_profile_definition g_profile_TITLE; +DUSK_GAME_EXTERN process_profile_definition g_profile_WarpBug; #else -extern actor_process_profile_definition DUSK_CONST g_profile_ALINK; -extern actor_process_profile_definition DUSK_CONST g_profile_NO_CHG_ROOM; -extern actor_process_profile_definition DUSK_CONST g_profile_ITEM; -extern camera_process_profile_definition DUSK_CONST g_profile_CAMERA; -extern camera_process_profile_definition DUSK_CONST g_profile_CAMERA2; -extern kankyo_process_profile_definition DUSK_CONST g_profile_ENVSE; -extern msg_process_profile_definition DUSK_CONST g_profile_GAMEOVER; -extern kankyo_process_profile_definition DUSK_CONST g_profile_KANKYO; -extern kankyo_process_profile_definition DUSK_CONST g_profile_KYEFF; -extern kankyo_process_profile_definition DUSK_CONST g_profile_KYEFF2; -extern kankyo_process_profile_definition DUSK_CONST g_profile_KY_THUNDER; -extern msg_process_profile_definition DUSK_CONST g_profile_MENUWINDOW; -extern msg_process_profile_definition DUSK_CONST g_profile_METER2; -extern msg_process_profile_definition DUSK_CONST g_profile_MSG_OBJECT; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP0; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP1; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP6; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP7; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP8; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP9; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP10; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP11; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP2; -extern overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP3; -extern scene_process_profile_definition DUSK_CONST g_profile_LOGO_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_MENU_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_NAME_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_NAMEEX_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_PLAY_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_OPENING_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_ROOM_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_WARNING_SCENE; -extern scene_process_profile_definition DUSK_CONST g_profile_WARNING2_SCENE; -extern msg_process_profile_definition DUSK_CONST g_profile_TIMER; -extern kankyo_process_profile_definition DUSK_CONST g_profile_WMARK; -extern kankyo_process_profile_definition DUSK_CONST g_profile_WPILLAR; -extern actor_process_profile_definition DUSK_CONST g_profile_ANDSW; -extern actor_process_profile_definition2 DUSK_CONST g_profile_BG; -extern actor_process_profile_definition DUSK_CONST g_profile_BG_OBJ; -extern actor_process_profile_definition DUSK_CONST g_profile_DMIDNA; -extern actor_process_profile_definition DUSK_CONST g_profile_DBDOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_KNOB20; -extern actor_process_profile_definition DUSK_CONST g_profile_DOOR20; -extern actor_process_profile_definition DUSK_CONST g_profile_SPIRAL_DOOR; -extern actor_process_profile_definition2 DUSK_CONST g_profile_DSHUTTER; -extern actor_process_profile_definition DUSK_CONST g_profile_EP; -extern actor_process_profile_definition DUSK_CONST g_profile_HITOBJ; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG00; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG04; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG17; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_BEF; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BurnBox; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Carry; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_ITO; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Movebox; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpush; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Timer; -extern actor_process_profile_definition2 DUSK_CONST g_profile_PATH_LINE; -extern actor_process_profile_definition2 DUSK_CONST g_profile_SCENE_EXIT; -extern actor_process_profile_definition DUSK_CONST g_profile_SET_BG_OBJ; -extern actor_process_profile_definition DUSK_CONST g_profile_SWHIT0; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_ALLMATO; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_CAMERA; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_CHKPOINT; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_EVENT; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_EVT; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_EVTAREA; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_EVTMSG; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_HOWL; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_KMSG; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_LANTERN; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Mist; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_MSG; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_PUSH; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_TELOP; -extern actor_process_profile_definition DUSK_CONST g_profile_TBOX; -extern actor_process_profile_definition DUSK_CONST g_profile_TBOX2; -extern actor_process_profile_definition DUSK_CONST g_profile_VRBOX; -extern actor_process_profile_definition DUSK_CONST g_profile_VRBOX2; -extern actor_process_profile_definition DUSK_CONST g_profile_ARROW; -extern actor_process_profile_definition DUSK_CONST g_profile_BOOMERANG; -extern actor_process_profile_definition DUSK_CONST g_profile_CROD; -extern actor_process_profile_definition DUSK_CONST g_profile_DEMO00; -extern actor_process_profile_definition DUSK_CONST g_profile_DISAPPEAR; -extern actor_process_profile_definition DUSK_CONST g_profile_MG_ROD; -extern actor_process_profile_definition DUSK_CONST g_profile_MIDNA; -extern actor_process_profile_definition DUSK_CONST g_profile_NBOMB; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_LifeContainer; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Yousei; -extern actor_process_profile_definition DUSK_CONST g_profile_SPINNER; -extern actor_process_profile_definition DUSK_CONST g_profile_SUSPEND; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Attp; -extern actor_process_profile_definition DUSK_CONST g_profile_ALLDIE; -extern actor_process_profile_definition DUSK_CONST g_profile_ANDSW2; -extern actor_process_profile_definition DUSK_CONST g_profile_BD; -extern actor_process_profile_definition DUSK_CONST g_profile_CANOE; -extern actor_process_profile_definition DUSK_CONST g_profile_CSTAF; -extern actor_process_profile_definition DUSK_CONST g_profile_Demo_Item; -extern actor_process_profile_definition DUSK_CONST g_profile_L1BOSS_DOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DN; -extern actor_process_profile_definition DUSK_CONST g_profile_E_FM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GA; -extern actor_process_profile_definition DUSK_CONST g_profile_E_HB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_NEST; -extern actor_process_profile_definition DUSK_CONST g_profile_E_RD; -extern actor_process_profile_definition DUSK_CONST g_profile_ECONT; -extern actor_process_profile_definition DUSK_CONST g_profile_FR; -extern actor_process_profile_definition DUSK_CONST g_profile_GRASS; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG05; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG10; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG11; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG14; -extern actor_process_profile_definition DUSK_CONST g_profile_MG_FISH; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_BESU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_FAIRY_SEIREI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_FISH; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_HENNA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KAKASHI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KKRI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KOLIN; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_MARO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TARO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TKJ; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BHASHI; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BkDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BossWarp; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Cboard; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Digpl; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Eff; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_FMOBJ; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GpTaru; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_HHASHI; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KANBAN2; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KBACKET; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KkrGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KLift00; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_KtOnFire; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ladder; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv2Candle; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MagneArm; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MetalBox; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_NamePlate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_OnCloth; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RopeBridge; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwallShutter; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_STICK; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_StoneMark; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpropeller; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpush5; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Yobikusa; -extern actor_process_profile_definition DUSK_CONST g_profile_SCENE_EXIT2; -extern actor_process_profile_definition DUSK_CONST g_profile_ShopItem; -extern actor_process_profile_definition DUSK_CONST g_profile_SQ; -extern actor_process_profile_definition DUSK_CONST g_profile_SWC00; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_CstaSw; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_AJnot; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_AttackItem; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Gstart; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Hinit; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Hjump; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Hstop; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv2PrChk; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Magne; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Mhint; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Mstop; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Spring; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Statue; -extern actor_process_profile_definition DUSK_CONST g_profile_Ykgr; -extern actor_process_profile_definition DUSK_CONST g_profile_DR; -extern actor_process_profile_definition DUSK_CONST g_profile_L7lowDr; -extern actor_process_profile_definition DUSK_CONST g_profile_L7ODR; -extern actor_process_profile_definition DUSK_CONST g_profile_B_BH; -extern actor_process_profile_definition DUSK_CONST g_profile_B_BQ; -extern actor_process_profile_definition DUSK_CONST g_profile_B_DR; -extern actor_process_profile_definition DUSK_CONST g_profile_B_DRE; -extern actor_process_profile_definition DUSK_CONST g_profile_B_DS; -extern actor_process_profile_definition DUSK_CONST g_profile_B_GG; -extern actor_process_profile_definition DUSK_CONST g_profile_B_GM; -extern actor_process_profile_definition DUSK_CONST g_profile_B_GND; -extern actor_process_profile_definition DUSK_CONST g_profile_B_GO; -extern actor_process_profile_definition DUSK_CONST g_profile_B_GOS; -extern actor_process_profile_definition DUSK_CONST g_profile_B_MGN; -extern actor_process_profile_definition DUSK_CONST g_profile_B_OB; -extern actor_process_profile_definition DUSK_CONST g_profile_B_OH; -extern actor_process_profile_definition DUSK_CONST g_profile_B_OH2; -extern actor_process_profile_definition DUSK_CONST g_profile_B_TN; -extern actor_process_profile_definition DUSK_CONST g_profile_B_YO; -extern actor_process_profile_definition DUSK_CONST g_profile_B_YOI; -extern actor_process_profile_definition DUSK_CONST g_profile_B_ZANT; -extern actor_process_profile_definition DUSK_CONST g_profile_B_ZANTM; -extern actor_process_profile_definition DUSK_CONST g_profile_B_ZANTZ; -extern actor_process_profile_definition DUSK_CONST g_profile_B_ZANTS; -extern actor_process_profile_definition DUSK_CONST g_profile_BALLOON2D; -extern actor_process_profile_definition DUSK_CONST g_profile_BULLET; -extern actor_process_profile_definition DUSK_CONST g_profile_COACH2D; -extern actor_process_profile_definition DUSK_CONST g_profile_COACH_FIRE; -extern actor_process_profile_definition DUSK_CONST g_profile_COW; -extern actor_process_profile_definition DUSK_CONST g_profile_CSTATUE; -extern actor_process_profile_definition DUSK_CONST g_profile_DO; -extern actor_process_profile_definition DUSK_CONST g_profile_BOSS_DOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_L5BOSS_DOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_L1MBOSS_DOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_PushDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_E_AI; -extern actor_process_profile_definition DUSK_CONST g_profile_E_ARROW; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BA; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BEE; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BI; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BI_LEAF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BS; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BU; -extern actor_process_profile_definition DUSK_CONST g_profile_E_BUG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_CR; -extern actor_process_profile_definition DUSK_CONST g_profile_E_CR_EGG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DB_LEAF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DD; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DK; -extern actor_process_profile_definition DUSK_CONST g_profile_E_DT; -extern actor_process_profile_definition DUSK_CONST g_profile_E_FB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_FK; -extern actor_process_profile_definition DUSK_CONST g_profile_E_FS; -extern actor_process_profile_definition DUSK_CONST g_profile_E_FZ; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GE; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GI; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GOB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_GS; -extern actor_process_profile_definition DUSK_CONST g_profile_E_HB_LEAF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_HM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_HP; -extern actor_process_profile_definition DUSK_CONST g_profile_E_HZ; -extern actor_process_profile_definition DUSK_CONST g_profile_E_HZELDA; -extern actor_process_profile_definition DUSK_CONST g_profile_E_IS; -extern actor_process_profile_definition DUSK_CONST g_profile_E_KG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_KK; -extern actor_process_profile_definition DUSK_CONST g_profile_E_KR; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MD; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MK; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MK_BO; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MM_MT; -extern actor_process_profile_definition DUSK_CONST g_profile_E_MS; -extern actor_process_profile_definition DUSK_CONST g_profile_E_NZ; -extern actor_process_profile_definition DUSK_CONST g_profile_E_OC; -extern actor_process_profile_definition DUSK_CONST g_profile_E_OctBg; -extern actor_process_profile_definition DUSK_CONST g_profile_E_OT; -extern actor_process_profile_definition DUSK_CONST g_profile_E_PH; -extern actor_process_profile_definition DUSK_CONST g_profile_E_PM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_PO; -extern actor_process_profile_definition DUSK_CONST g_profile_E_PZ; -extern actor_process_profile_definition DUSK_CONST g_profile_E_RB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_RDB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_RDY; -extern actor_process_profile_definition DUSK_CONST g_profile_E_S1; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SH; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SM2; -extern actor_process_profile_definition DUSK_CONST g_profile_E_ST; -extern actor_process_profile_definition DUSK_CONST g_profile_E_ST_LINE; -extern actor_process_profile_definition DUSK_CONST g_profile_E_SW; -extern actor_process_profile_definition DUSK_CONST g_profile_E_TH; -extern actor_process_profile_definition DUSK_CONST g_profile_E_TH_BALL; -extern actor_process_profile_definition DUSK_CONST g_profile_E_TK; -extern actor_process_profile_definition DUSK_CONST g_profile_E_TK2; -extern actor_process_profile_definition DUSK_CONST g_profile_E_TK_BALL; -extern actor_process_profile_definition DUSK_CONST g_profile_E_TT; -extern actor_process_profile_definition DUSK_CONST g_profile_E_VT; -extern actor_process_profile_definition DUSK_CONST g_profile_E_WAP; -extern actor_process_profile_definition DUSK_CONST g_profile_E_WB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_WS; -extern actor_process_profile_definition DUSK_CONST g_profile_E_WW; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YC; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YD; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YD_LEAF; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YH; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YK; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YM_TAG; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YMB; -extern actor_process_profile_definition DUSK_CONST g_profile_E_YR; -extern actor_process_profile_definition DUSK_CONST g_profile_E_ZH; -extern actor_process_profile_definition DUSK_CONST g_profile_E_ZM; -extern actor_process_profile_definition DUSK_CONST g_profile_E_ZS; -extern actor_process_profile_definition DUSK_CONST g_profile_FORMATION_MNG; -extern actor_process_profile_definition DUSK_CONST g_profile_GUARD_MNG; -extern actor_process_profile_definition DUSK_CONST g_profile_HORSE; -extern actor_process_profile_definition DUSK_CONST g_profile_HOZELDA; -extern actor_process_profile_definition DUSK_CONST g_profile_Izumi_Gate; -extern actor_process_profile_definition DUSK_CONST g_profile_KAGO; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG01; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG02; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG03; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG06; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG07; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG08; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG09; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG12; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG13; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG15; -extern actor_process_profile_definition DUSK_CONST g_profile_KYTAG16; -extern actor_process_profile_definition DUSK_CONST g_profile_MANT; -extern actor_process_profile_definition DUSK_CONST g_profile_FSHOP; -extern actor_process_profile_definition DUSK_CONST g_profile_MIRROR; -extern actor_process_profile_definition DUSK_CONST g_profile_MOVIE_PLAYER; -extern actor_process_profile_definition DUSK_CONST g_profile_MYNA; -extern actor_process_profile_definition DUSK_CONST g_profile_NI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ARU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ASH; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ASHB; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_BANS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_BLUENS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_BOU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_BOU_S; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_CD3; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_CHAT; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_CHIN; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_CLERKA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_CLERKB; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_CLERKT; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_COACH; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_DF; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_DOC; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_DOORBOY; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_DRSOL; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_DU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_FAIRY; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_FGUARD; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GND; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRC; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRD; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRM; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRMC; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRR; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GRZ; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GUARD; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_GWOLF; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_HANJO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_HENNA0; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_HOZ; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_IMPAL; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_INKO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_INS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_JAGAR; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KASIHANA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KASIKYU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KASIMICH; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KDK; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KN; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KNJ; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KOLINB; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_KYURY; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_LEN; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_LF; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_LUD; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_MIDP; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_MK; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_MOI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_MOIR; -extern actor_process_profile_definition DUSK_CONST g_profile_MYNA2; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_NE; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_P2; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_PACHI_BESU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_PACHI_MARO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_PACHI_TARO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_PASSER; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_PASSER2; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_POST; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_POUYA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_PRAYER; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_RACA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_RAFREL; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SARU; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIB; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIC; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SEID; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIRA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SERA2; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIREI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SHAD; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SHAMAN; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SHOE; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SHOP0; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SMARO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SOLA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SOLDIERa; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SOLDIERb; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_SQ; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_THE; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_THEB; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TK; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TKC; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TKJ2; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TKS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TOBY; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_TR; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_URI; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_WORM; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_WRESTLER; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_YAMID; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_YAMIS; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_YAMIT; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_YELIA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_YKM; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_YKW; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZANB; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZANT; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZELR; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZELRO; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZELDA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZRA; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZRC; -extern actor_process_profile_definition DUSK_CONST g_profile_NPC_ZRZ; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv5Key; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Turara; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TvCdlst; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ytaihou; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_AmiShutter; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ari; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_AUTOMATA; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Avalanche; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_BALLOON; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BarDesk; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Batta; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BBox; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_BED; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Bemos; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Bhbridge; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BkLeaf; -extern actor_process_profile_definition DUSK_CONST g_profile_BkyRock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BmWindow; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BoomShutter; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Bombf; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_BOUMATO; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_BRG; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_BsGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_awaPlar; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CatDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_CB; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ChainBlock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Cdoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Chandelier; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Chest; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Cho; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Cowdoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Crope; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVFENCE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVGATE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVHAHEN; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVLH_DW; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVLH_UP; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVSTEEL; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Crystal; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ChainWall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_DamCps; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Dan; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Digholl; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_DigSnow; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Elevator; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Drop; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_DUST; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_E_CREATE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_FallObj; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Fan; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Fchain; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_FireWood; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_FireWood2; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_FirePillar; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_FirePillar2; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Flag; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Flag2; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Flag3; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_FOOD; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_FW; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_GADGET; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GanonWall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GanonWall2; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_GB; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Geyser; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_glowSphere; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_GM; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GoGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GOMIKABE; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_GRA; -extern actor_process_profile_definition DUSK_CONST g_profile_GRA_WALL; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GraRock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GraveStone; -extern actor_process_profile_definition DUSK_CONST g_profile_GRDWATER; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_GrzRock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_H_Saku; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_HBarrel; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_HFtr; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MHasu; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Hata; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_HB; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_HBombkoya; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_HeavySw; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Hfuta; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_HsTarget; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ice_l; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ice_s; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_IceBlock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_IceLeaf; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_IHASI; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ikada; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_InoBone; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ITA; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_ITAMATO; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kabuto; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kag; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KAGE; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KAGO; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kaisou; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kam; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kantera; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kat; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KazeNeko; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KBOX; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KEY; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KEYHOLE; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KI; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KiPot; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_KITA; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KJgjs; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KKanban; -extern actor_process_profile_definition DUSK_CONST g_profile_KN_BULLET; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kshutter; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Kuw; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KWheel00; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KWheel01; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KznkArm; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Laundry; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_LndRope; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_LBOX; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_LP; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv1Cdl00; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv1Cdl01; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3Candle; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3Water; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3Water2; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_LV3WATERB; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3R10Saka; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WaterEff; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv4CandleDm; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv4Candle; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4EdShutter; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Gate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4HsTarget; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4PoGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4RailWall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4SlideWall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Bridge; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Chan; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4DigSand; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Floor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Gear; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_PRElvtr; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4PRwall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Sand; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv5FBoard; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_IceWall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv5SwIce; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ychndlr; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_YIblltray; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6ChgGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6FuriTrap; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6Lblock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6SwGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6SzGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6Tenbin; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6TogeRoll; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6TogeTrap; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6bemos; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6bemos2; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6EGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6ElevtA; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6SwTurn; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv7BsGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv7PropY; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv7Bridge; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8KekkaiTrap; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8Lift; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8OptiLift; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8UdFloor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv9SwShutter; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MagLift; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MagLiftRot; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_MAKI; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MasterSword; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Mato; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MHole; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_MIE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Mirror6Pole; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorChain; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorSand; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorScrew; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorTable; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_MSIMA; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_MvStair; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_MYOGAN; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Nagaisu; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Nan; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_NDOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_NOUGU; -extern actor_process_profile_definition DUSK_CONST g_profile_OCTHASHI; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_OILTUBO; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Onsen; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_ONSEN_FIRE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_OnsenTaru; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_PushDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_PDtile; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_PDwall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Picture; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Pillar; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_PLEAF; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_poCandle; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_poFire; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_poTbox; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Prop; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_PUMPKIN; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RCircle; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RfHole; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RiderGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RIVERROCK; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_ROCK; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RotBridge; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RotTrap; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_ROTEN; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_RotStair; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_RW; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Saidan; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Sakuita; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ItaRope; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SCannon; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SCannonCrs; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SCannonTen; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SEKIDOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SEKIZO; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SEKIZOA; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Shield; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SM_DOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SmallKey; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SmgDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Smoke; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SMTILE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SmWStone; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_SnowEff; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SnowSoup; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SO; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SpinLift; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SSDRINK; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SSITEM; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_StairBlock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Stone; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Stopper; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Stopper2; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SUISYA; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_SW; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwBallA; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwBallB; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwBallC; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwLight; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwChain; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwHang; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Sword; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpush2; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwSpinner; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SwTurn; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SyRock; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_SZbridge; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TaFence; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Table; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TakaraDai; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_TATIGI; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Ten; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TestCube; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Gake; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ALINK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NO_CHG_ROOM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ITEM; +DUSK_GAME_EXTERN camera_process_profile_definition DUSK_CONST g_profile_CAMERA; +DUSK_GAME_EXTERN camera_process_profile_definition DUSK_CONST g_profile_CAMERA2; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_ENVSE; +DUSK_GAME_EXTERN msg_process_profile_definition DUSK_CONST g_profile_GAMEOVER; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_KANKYO; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_KYEFF; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_KYEFF2; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_KY_THUNDER; +DUSK_GAME_EXTERN msg_process_profile_definition DUSK_CONST g_profile_MENUWINDOW; +DUSK_GAME_EXTERN msg_process_profile_definition DUSK_CONST g_profile_METER2; +DUSK_GAME_EXTERN msg_process_profile_definition DUSK_CONST g_profile_MSG_OBJECT; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP0; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP1; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP6; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP7; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP8; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP9; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP10; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP11; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP2; +DUSK_GAME_EXTERN overlap_process_profile_definition DUSK_CONST g_profile_OVERLAP3; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_LOGO_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_MENU_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_NAME_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_NAMEEX_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_PLAY_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_OPENING_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_ROOM_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_WARNING_SCENE; +DUSK_GAME_EXTERN scene_process_profile_definition DUSK_CONST g_profile_WARNING2_SCENE; +DUSK_GAME_EXTERN msg_process_profile_definition DUSK_CONST g_profile_TIMER; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_WMARK; +DUSK_GAME_EXTERN kankyo_process_profile_definition DUSK_CONST g_profile_WPILLAR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ANDSW; +DUSK_GAME_EXTERN actor_process_profile_definition2 DUSK_CONST g_profile_BG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BG_OBJ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DMIDNA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DBDOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KNOB20; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DOOR20; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SPIRAL_DOOR; +DUSK_GAME_EXTERN actor_process_profile_definition2 DUSK_CONST g_profile_DSHUTTER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_EP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_HITOBJ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG00; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG04; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG17; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_BEF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BurnBox; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Carry; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_ITO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Movebox; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpush; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Timer; +DUSK_GAME_EXTERN actor_process_profile_definition2 DUSK_CONST g_profile_PATH_LINE; +DUSK_GAME_EXTERN actor_process_profile_definition2 DUSK_CONST g_profile_SCENE_EXIT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SET_BG_OBJ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SWHIT0; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_ALLMATO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_CAMERA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_CHKPOINT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_EVENT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_EVT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_EVTAREA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_EVTMSG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_HOWL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_KMSG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_LANTERN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Mist; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_MSG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_PUSH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_TELOP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TBOX; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TBOX2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_VRBOX; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_VRBOX2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ARROW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BOOMERANG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_CROD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DEMO00; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DISAPPEAR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MG_ROD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MIDNA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NBOMB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_LifeContainer; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Yousei; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SPINNER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SUSPEND; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Attp; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ALLDIE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ANDSW2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_CANOE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_CSTAF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Demo_Item; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_L1BOSS_DOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_FM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_HB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_NEST; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_RD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ECONT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_FR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_GRASS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG05; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG10; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG11; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG14; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MG_FISH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_BESU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_FAIRY_SEIREI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_FISH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_HENNA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KAKASHI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KKRI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KOLIN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_MARO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TARO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TKJ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BHASHI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BkDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BossWarp; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Cboard; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Digpl; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Eff; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_FMOBJ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GpTaru; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_HHASHI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KANBAN2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KBACKET; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KkrGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KLift00; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_KtOnFire; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ladder; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv2Candle; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MagneArm; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MetalBox; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_NamePlate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_OnCloth; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RopeBridge; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwallShutter; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_STICK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_StoneMark; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpropeller; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpush5; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Yobikusa; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SCENE_EXIT2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ShopItem; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SQ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SWC00; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_CstaSw; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_AJnot; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_AttackItem; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Gstart; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Hinit; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Hjump; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Hstop; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv2PrChk; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Magne; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Mhint; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Mstop; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Spring; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Statue; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Ykgr; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_L7lowDr; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_L7ODR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_BH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_BQ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_DR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_DRE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_DS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_GG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_GM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_GND; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_GO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_GOS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_MGN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_OB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_OH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_OH2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_TN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_YO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_YOI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_ZANT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_ZANTM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_ZANTZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_B_ZANTS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BALLOON2D; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BULLET; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_COACH2D; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_COACH_FIRE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_COW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_CSTATUE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_DO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BOSS_DOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_L5BOSS_DOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_L1MBOSS_DOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_PushDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_AI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_ARROW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BEE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BI_LEAF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_BUG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_CR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_CR_EGG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DB_LEAF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_DT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_FB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_FK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_FS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_FZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GOB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_GS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_HB_LEAF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_HM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_HP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_HZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_HZELDA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_IS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_KG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_KK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_KR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MK_BO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MM_MT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_MS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_NZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_OC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_OctBg; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_OT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_PH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_PM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_PO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_PZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_RB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_RDB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_RDY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_S1; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SM2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_ST; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_ST_LINE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_SW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_TH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_TH_BALL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_TK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_TK2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_TK_BALL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_TT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_VT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_WAP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_WB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_WS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_WW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YD_LEAF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YM_TAG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YMB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_YR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_ZH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_ZM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_E_ZS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_FORMATION_MNG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_GUARD_MNG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_HORSE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_HOZELDA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Izumi_Gate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KAGO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG01; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG02; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG03; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG06; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG07; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG08; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG09; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG12; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG13; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG15; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KYTAG16; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MANT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_FSHOP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MIRROR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MOVIE_PLAYER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MYNA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ARU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ASH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ASHB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_BANS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_BLUENS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_BOU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_BOU_S; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_CD3; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_CHAT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_CHIN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_CLERKA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_CLERKB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_CLERKT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_COACH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_DF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_DOC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_DOORBOY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_DRSOL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_DU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_FAIRY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_FGUARD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GND; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRMC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GRZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GUARD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_GWOLF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_HANJO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_HENNA0; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_HOZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_IMPAL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_INKO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_INS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_JAGAR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KASIHANA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KASIKYU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KASIMICH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KDK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KNJ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KOLINB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_KYURY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_LEN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_LF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_LUD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_MIDP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_MK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_MOI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_MOIR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_MYNA2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_NE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_P2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_PACHI_BESU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_PACHI_MARO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_PACHI_TARO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_PASSER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_PASSER2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_POST; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_POUYA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_PRAYER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_RACA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_RAFREL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SARU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SEID; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIRA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SERA2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SEIREI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SHAD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SHAMAN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SHOE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SHOP0; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SMARO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SOLA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SOLDIERa; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SOLDIERb; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_SQ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_THE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_THEB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TKC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TKJ2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TKS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TOBY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_TR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_URI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_WORM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_WRESTLER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_YAMID; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_YAMIS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_YAMIT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_YELIA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_YKM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_YKW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZANB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZANT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZELR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZELRO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZELDA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZRA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZRC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_NPC_ZRZ; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv5Key; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Turara; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TvCdlst; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ytaihou; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_AmiShutter; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ari; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_AUTOMATA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Avalanche; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_BALLOON; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BarDesk; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Batta; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BBox; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_BED; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Bemos; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Bhbridge; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BkLeaf; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_BkyRock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BmWindow; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BoomShutter; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Bombf; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_BOUMATO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_BRG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_BsGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_awaPlar; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CatDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_CB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ChainBlock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Cdoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Chandelier; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Chest; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Cho; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Cowdoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Crope; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVFENCE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVGATE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVHAHEN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVLH_DW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVLH_UP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_CRVSTEEL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Crystal; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ChainWall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_DamCps; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Dan; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Digholl; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_DigSnow; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Elevator; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Drop; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_DUST; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_E_CREATE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_FallObj; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Fan; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Fchain; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_FireWood; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_FireWood2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_FirePillar; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_FirePillar2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Flag; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Flag2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Flag3; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_FOOD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_FW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_GADGET; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GanonWall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GanonWall2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_GB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Geyser; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_glowSphere; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_GM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GoGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GOMIKABE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_GRA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_GRA_WALL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GraRock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GraveStone; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_GRDWATER; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_GrzRock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_H_Saku; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_HBarrel; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_HFtr; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MHasu; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Hata; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_HB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_HBombkoya; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_HeavySw; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Hfuta; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_HsTarget; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ice_l; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ice_s; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_IceBlock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_IceLeaf; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_IHASI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ikada; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_InoBone; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ITA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_ITAMATO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kabuto; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kag; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KAGE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KAGO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kaisou; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kam; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kantera; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kat; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KazeNeko; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KBOX; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KEY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KEYHOLE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KiPot; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_KITA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KJgjs; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KKanban; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_KN_BULLET; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kshutter; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Kuw; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KWheel00; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KWheel01; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KznkArm; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Laundry; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_LndRope; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_LBOX; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_LP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv1Cdl00; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv1Cdl01; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3Candle; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3Water; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3Water2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_LV3WATERB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv3R10Saka; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WaterEff; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv4CandleDm; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv4Candle; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4EdShutter; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Gate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4HsTarget; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4PoGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4RailWall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4SlideWall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Bridge; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Chan; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4DigSand; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Floor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Gear; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_PRElvtr; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4PRwall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv4Sand; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv5FBoard; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_IceWall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv5SwIce; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ychndlr; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_YIblltray; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6ChgGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6FuriTrap; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6Lblock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6SwGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6SzGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6Tenbin; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6TogeRoll; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6TogeTrap; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6bemos; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6bemos2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6EGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6ElevtA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv6SwTurn; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv7BsGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv7PropY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv7Bridge; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8KekkaiTrap; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8Lift; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8OptiLift; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv8UdFloor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Lv9SwShutter; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MagLift; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MagLiftRot; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_MAKI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MasterSword; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Mato; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MHole; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_MIE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Mirror6Pole; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorChain; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorSand; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorScrew; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MirrorTable; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_MSIMA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_MvStair; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_MYOGAN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Nagaisu; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Nan; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_NDOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_NOUGU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OCTHASHI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_OILTUBO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Onsen; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_ONSEN_FIRE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_OnsenTaru; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_PushDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_PDtile; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_PDwall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Picture; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Pillar; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_PLEAF; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_poCandle; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_poFire; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_poTbox; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Prop; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_PUMPKIN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RCircle; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RfHole; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RiderGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RIVERROCK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_ROCK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RotBridge; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RotTrap; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_ROTEN; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_RotStair; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_RW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Saidan; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Sakuita; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ItaRope; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SCannon; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SCannonCrs; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SCannonTen; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SEKIDOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SEKIZO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SEKIZOA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Shield; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SM_DOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SmallKey; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SmgDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Smoke; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SMTILE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SmWStone; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_SnowEff; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SnowSoup; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SO; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SpinLift; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SSDRINK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SSITEM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_StairBlock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Stone; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Stopper; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Stopper2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SUISYA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_SW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwBallA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwBallB; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwBallC; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwLight; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwChain; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwHang; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Sword; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Swpush2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwSpinner; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SwTurn; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SyRock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_SZbridge; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TaFence; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Table; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TakaraDai; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_TATIGI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Ten; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TestCube; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Gake; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_THASHI; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TimeFire; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_TKS; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TMoon; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ToaruMaki; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_TOBY; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TobyHouse; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TogeTrap; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Tombo; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Tornado; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Tornado2; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_TP; -extern actor_process_profile_definition DUSK_CONST g_profile_TREESH; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_TwGate; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_UDOOR; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_USAKU; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_VolcGnd; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_VolcanicBall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_VolcanicBomb; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_KakarikoBrg; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_OrdinBrg; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WtGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WaterPillar; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WaterFall; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Wchain; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WdStick; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_WEB0; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_WEB1; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WellCover; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_WFLAG; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WindStone; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_Window; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WoodPendulum; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WoodStatue; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_WoodenSword; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_YBAG; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_YSTONE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ZoraCloth; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ZDoor; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_zrTurara; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_zrTuraraRc; -extern actor_process_profile_definition DUSK_CONST g_profile_ZRA_MARK; -extern actor_process_profile_definition DUSK_CONST g_profile_OBJ_ZRAFREEZE; -extern actor_process_profile_definition DUSK_CONST g_profile_Obj_ZraRock; -extern actor_process_profile_definition DUSK_CONST g_profile_PASSER_MNG; -extern actor_process_profile_definition DUSK_CONST g_profile_PERU; -extern actor_process_profile_definition DUSK_CONST g_profile_PPolamp; -extern actor_process_profile_definition DUSK_CONST g_profile_SKIP2D; -extern actor_process_profile_definition DUSK_CONST g_profile_START_AND_GOAL; -extern actor_process_profile_definition DUSK_CONST g_profile_SwBall; -extern actor_process_profile_definition DUSK_CONST g_profile_SwLBall; -extern actor_process_profile_definition DUSK_CONST g_profile_SwTime; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv6Gate; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv7Gate; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv8Gate; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_TWGate; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Arena; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Assist; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_BTLITM; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_ChgRestart; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_CSW; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Escape; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_FWall; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_GRA; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_GUARD; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Instruction; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_KagoFall; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_LightBall; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_LV5SOUP; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv6CstaSw; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Mmsg; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Mwait; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_MYNA2; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_MNLIGHT; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_PATI; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_poFire; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_QS; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_RetRoom; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_RiverBack; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_RmbitSw; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Schedule; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_SetBall; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Restart; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_SHOPCAM; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_SHOPITM; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_SmkEmt; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Spinner; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Sppath; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_SSDRINK; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Stream; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_TheBHint; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_WaraHowl; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_WatchGe; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_WaterFall; -extern actor_process_profile_definition DUSK_CONST g_profile_Tag_Wljump; -extern actor_process_profile_definition DUSK_CONST g_profile_TAG_YAMI; -extern actor_process_profile_definition DUSK_CONST g_profile_TALK; -extern actor_process_profile_definition DUSK_CONST g_profile_TBOX_SW; -extern actor_process_profile_definition DUSK_CONST g_profile_TITLE; -extern actor_process_profile_definition DUSK_CONST g_profile_WarpBug; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_THASHI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TimeFire; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_TKS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TMoon; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ToaruMaki; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_TOBY; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TobyHouse; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TogeTrap; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Tombo; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Tornado; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Tornado2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_TP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TREESH; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_TwGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_UDOOR; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_USAKU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_VolcGnd; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_VolcanicBall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_VolcanicBomb; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_KakarikoBrg; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_OrdinBrg; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WtGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WaterPillar; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WaterFall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Wchain; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WdStick; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_WEB0; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_WEB1; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WellCover; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_WFLAG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WindStone; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_Window; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WoodPendulum; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WoodStatue; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_WoodenSword; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_YBAG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_YSTONE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ZoraCloth; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ZDoor; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_zrTurara; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_zrTuraraRc; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_ZRA_MARK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_OBJ_ZRAFREEZE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Obj_ZraRock; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_PASSER_MNG; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_PERU; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_PPolamp; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SKIP2D; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_START_AND_GOAL; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SwBall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SwLBall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_SwTime; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv6Gate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv7Gate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv8Gate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_TWGate; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Arena; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Assist; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_BTLITM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_ChgRestart; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_CSW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Escape; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_FWall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_GRA; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_GUARD; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Instruction; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_KagoFall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_LightBall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_LV5SOUP; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Lv6CstaSw; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Mmsg; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Mwait; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_MYNA2; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_MNLIGHT; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_PATI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_poFire; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_QS; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_RetRoom; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_RiverBack; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_RmbitSw; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Schedule; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_SetBall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Restart; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_SHOPCAM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_SHOPITM; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_SmkEmt; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Spinner; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Sppath; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_SSDRINK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Stream; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_TheBHint; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_WaraHowl; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_WatchGe; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_WaterFall; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_Tag_Wljump; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TAG_YAMI; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TALK; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TBOX_SW; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_TITLE; +DUSK_GAME_EXTERN actor_process_profile_definition DUSK_CONST g_profile_WarpBug; #endif -extern process_profile_definition DUSK_CONST* DUSK_CONST g_fpcPfLst_ProfileList[]; +DUSK_GAME_EXTERN process_profile_definition DUSK_CONST* DUSK_CONST g_fpcPfLst_ProfileList[]; #endif /* F_PC_PROFILE_LST_H_ */ diff --git a/include/global.h b/include/global.h index 5add912748..f77694c133 100644 --- a/include/global.h +++ b/include/global.h @@ -114,18 +114,14 @@ inline int __builtin_clz(unsigned int v) { #endif -// Data symbols exported from the main exe need dllimport on the mod side. -// DUSK_BUILDING_GAME is defined for the game build so the same headers work in both. +// Data symbols exported from the main exe need dllimport on the mod side. The game itself +// exports them through its generated .def, so the annotation is otherwise intentionally empty. #if defined(TARGET_PC) && defined(_WIN32) && !defined(DUSK_BUILDING_GAME) -#define DUSK_GAME_EXTERN extern __declspec(dllimport) #define DUSK_GAME_DATA __declspec(dllimport) -#elif defined(TARGET_PC) && defined(_WIN32) && defined(DUSK_BUILDING_GAME) -#define DUSK_GAME_EXTERN extern __declspec(dllexport) -#define DUSK_GAME_DATA __declspec(dllexport) #else -#define DUSK_GAME_EXTERN extern #define DUSK_GAME_DATA #endif +#define DUSK_GAME_EXTERN extern DUSK_GAME_DATA #define FAST_DIV(x, n) (x >> (n / 2)) diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h index f369bf2f2f..555d7a6a9f 100644 --- a/include/m_Do/m_Do_MemCard.h +++ b/include/m_Do/m_Do_MemCard.h @@ -130,7 +130,7 @@ STATIC_ASSERT(sizeof(mDoMemCd_Ctrl_c) == 8192); static int mDoMemCd_main(void*); -extern mDoMemCd_Ctrl_c g_mDoMemCd_control; +DUSK_GAME_EXTERN mDoMemCd_Ctrl_c g_mDoMemCd_control; inline bool mDoMemCd_isCardCommNone() { return g_mDoMemCd_control.isCardCommNone(); diff --git a/include/m_Do/m_Do_Reset.h b/include/m_Do/m_Do_Reset.h index a426460ba9..85a986263a 100644 --- a/include/m_Do/m_Do_Reset.h +++ b/include/m_Do/m_Do_Reset.h @@ -54,9 +54,9 @@ public: static mDoRstData* getResetData() { return mResetData; } static void setResetData(mDoRstData* rstData) { mResetData = rstData; } - static mDoRstData* mResetData; + static DUSK_GAME_DATA mDoRstData* mResetData; }; -extern bool mDoDvdErr_initialized; +DUSK_GAME_EXTERN bool mDoDvdErr_initialized; #endif /* M_DO_M_DO_RESET_H */ diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index e1e15c1ef1..0758298aef 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -33,12 +33,12 @@ public: static void onBgmSet() { mBgmSet = true; } static void offBgmSet() { mBgmSet = false; } - static u8 mInitFlag; - static u8 mResetFlag; - static u8 mBgmSet; + static DUSK_GAME_DATA u8 mInitFlag; + static DUSK_GAME_DATA u8 mResetFlag; + static DUSK_GAME_DATA u8 mBgmSet; }; -extern JKRSolidHeap* g_mDoAud_audioHeap; +DUSK_GAME_EXTERN JKRSolidHeap* g_mDoAud_audioHeap; void mDoAud_Execute(); void mDoAud_resetProcess(); diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h index e187efd17d..3ee09cc728 100644 --- a/include/m_Do/m_Do_controller_pad.h +++ b/include/m_Do/m_Do_controller_pad.h @@ -93,9 +93,9 @@ public: static void stopMotorHard(u32 pad) { return m_gamePad[pad]->stopMotorHard(); } static void stopMotorWaveHard(u32 pad) { return m_gamePad[pad]->stopMotorWaveHard(); } - static JUTGamePad* m_gamePad[4]; - static interface_of_controller_pad m_cpadInfo[4]; - static interface_of_controller_pad m_debugCpadInfo[4]; + static DUSK_GAME_DATA JUTGamePad* m_gamePad[4]; + static DUSK_GAME_DATA interface_of_controller_pad m_cpadInfo[4]; + static DUSK_GAME_DATA interface_of_controller_pad m_debugCpadInfo[4]; }; inline void mDoCPd_ANALOG_CONV(u8 analog, f32& param_1) { diff --git a/include/m_Do/m_Do_dvd_thread.h b/include/m_Do/m_Do_dvd_thread.h index 8af8c520b5..83dd4dec1e 100644 --- a/include/m_Do/m_Do_dvd_thread.h +++ b/include/m_Do/m_Do_dvd_thread.h @@ -138,13 +138,13 @@ struct mDoDvdThd { static void create(s32); static void suspend(); - static OSThread l_thread; - static mDoDvdThdStack l_threadStack; - static mDoDvdThd_param_c l_param; + static DUSK_GAME_DATA OSThread l_thread; + static DUSK_GAME_DATA mDoDvdThdStack l_threadStack; + static DUSK_GAME_DATA mDoDvdThd_param_c l_param; static u8 verbose; - static u8 DVDLogoMode; - static bool SyncWidthSound; + static DUSK_GAME_DATA u8 DVDLogoMode; + static DUSK_GAME_DATA bool SyncWidthSound; static u8 Report_DVDRead; }; diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 77d046f0de..bd1baac2df 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -19,9 +19,9 @@ class Z2Creature; struct cXy; namespace mDoExt { - extern u8 CurrentHeapAdjustVerbose; - extern u8 HeapAdjustVerbose; - extern u8 HeapAdjustQuiet; + DUSK_GAME_EXTERN u8 CurrentHeapAdjustVerbose; + DUSK_GAME_EXTERN u8 HeapAdjustVerbose; + DUSK_GAME_EXTERN u8 HeapAdjustQuiet; }; class mDoExt_baseAnm { @@ -840,7 +840,7 @@ void mDoExt_modelUpdateDL(J3DModel* i_model); J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 i_modelFlag, u32 i_differedDlistFlag); -extern u32 aram_cache_size; +DUSK_GAME_EXTERN u32 aram_cache_size; u32 mDoExt_getAraCacheSize(); void mDoExt_setAraCacheSize(u32 size); @@ -889,10 +889,10 @@ int DummyCheckHeap_isVirgin(); void DummyCheckHeap_check(); -extern JKRExpHeap* zeldaHeap; -extern JKRExpHeap* gameHeap; -extern JKRExpHeap* archiveHeap; -extern JKRExpHeap* commandHeap; -extern DummyCheckHeap* dch; +DUSK_GAME_EXTERN JKRExpHeap* zeldaHeap; +DUSK_GAME_EXTERN JKRExpHeap* gameHeap; +DUSK_GAME_EXTERN JKRExpHeap* archiveHeap; +DUSK_GAME_EXTERN JKRExpHeap* commandHeap; +DUSK_GAME_EXTERN DummyCheckHeap* dch; #endif /* M_DO_M_DO_EXT_H */ diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h index 5d29049520..dbda35d9c2 100644 --- a/include/m_Do/m_Do_graphic.h +++ b/include/m_Do/m_Do_graphic.h @@ -123,8 +123,8 @@ public: static void waitBlanking(int wait) { JFWDisplay::getManager()->waitBlanking(wait); } #if TARGET_PC - static f32 hudAspectScaleDown; - static f32 hudAspectScaleUp; + static DUSK_GAME_DATA f32 hudAspectScaleDown; + static DUSK_GAME_DATA f32 hudAspectScaleUp; static void updateSafeAreaBounds(); static f32 getSafeMinXF() { return m_safeMinXF; } static f32 getSafeMinYF() { return m_safeMinYF; } @@ -302,23 +302,23 @@ public: static void updateRenderSize(); #endif - static TGXTexObj mFrameBufferTexObj; - static TGXTexObj mZbufferTexObj; - static bloom_c m_bloom; - static Mtx mBlureMtx; - static GXColor mBackColor; - static GXColor mFadeColor; - static JUTFader* mFader; - static ResTIMG* mFrameBufferTimg; - static void* mFrameBufferTex; - static ResTIMG* mZbufferTimg; - static void* mZbufferTex; - static f32 mFadeRate; - static f32 mFadeSpeed; - static u8 mBlureFlag; - static u8 mBlureRate; - static u8 mFade; - static bool mAutoForcus; + static DUSK_GAME_DATA TGXTexObj mFrameBufferTexObj; + static DUSK_GAME_DATA TGXTexObj mZbufferTexObj; + static DUSK_GAME_DATA bloom_c m_bloom; + static DUSK_GAME_DATA Mtx mBlureMtx; + static DUSK_GAME_DATA GXColor mBackColor; + static DUSK_GAME_DATA GXColor mFadeColor; + static DUSK_GAME_DATA JUTFader* mFader; + static DUSK_GAME_DATA ResTIMG* mFrameBufferTimg; + static DUSK_GAME_DATA void* mFrameBufferTex; + static DUSK_GAME_DATA ResTIMG* mZbufferTimg; + static DUSK_GAME_DATA void* mZbufferTex; + static DUSK_GAME_DATA f32 mFadeRate; + static DUSK_GAME_DATA f32 mFadeSpeed; + static DUSK_GAME_DATA u8 mBlureFlag; + static DUSK_GAME_DATA u8 mBlureRate; + static DUSK_GAME_DATA u8 mFade; + static DUSK_GAME_DATA bool mAutoForcus; #if PLATFORM_SHIELD static JKRHeap* getHeap() { @@ -333,9 +333,9 @@ public: #endif #if PLATFORM_WII || PLATFORM_SHIELD || TARGET_PC - static ResTIMG* m_fullFrameBufferTimg; - static void* m_fullFrameBufferTex; - static TGXTexObj m_fullFrameBufferTexObj; + static DUSK_GAME_DATA ResTIMG* m_fullFrameBufferTimg; + static DUSK_GAME_DATA void* m_fullFrameBufferTex; + static DUSK_GAME_DATA TGXTexObj m_fullFrameBufferTexObj; #endif #if PLATFORM_WII || PLATFORM_SHIELD @@ -350,35 +350,35 @@ public: #endif #if WIDESCREEN_SUPPORT - static u8 mWide; - static u8 mWideZoom; + static DUSK_GAME_DATA u8 mWide; + static DUSK_GAME_DATA u8 mWideZoom; - static f32 m_aspect; - static f32 m_scale; - static f32 m_invScale; + static DUSK_GAME_DATA f32 m_aspect; + static DUSK_GAME_DATA f32 m_scale; + static DUSK_GAME_DATA f32 m_invScale; - static f32 m_minXF; - static f32 m_minYF; - static int m_minX; - static int m_minY; + static DUSK_GAME_DATA f32 m_minXF; + static DUSK_GAME_DATA f32 m_minYF; + static DUSK_GAME_DATA int m_minX; + static DUSK_GAME_DATA int m_minY; - static f32 m_maxXF; - static f32 m_maxYF; - static int m_maxX; - static int m_maxY; + static DUSK_GAME_DATA f32 m_maxXF; + static DUSK_GAME_DATA f32 m_maxYF; + static DUSK_GAME_DATA int m_maxX; + static DUSK_GAME_DATA int m_maxY; - static int m_width; - static int m_height; - static f32 m_heightF; - static f32 m_widthF; + static DUSK_GAME_DATA int m_width; + static DUSK_GAME_DATA int m_height; + static DUSK_GAME_DATA f32 m_heightF; + static DUSK_GAME_DATA f32 m_widthF; #if TARGET_PC - static f32 m_safeMinXF; - static f32 m_safeMinYF; - static f32 m_safeMaxXF; - static f32 m_safeMaxYF; - static f32 m_safeWidthF; - static f32 m_safeHeightF; + static DUSK_GAME_DATA f32 m_safeMinXF; + static DUSK_GAME_DATA f32 m_safeMinYF; + static DUSK_GAME_DATA f32 m_safeMaxXF; + static DUSK_GAME_DATA f32 m_safeMaxYF; + static DUSK_GAME_DATA f32 m_safeWidthF; + static DUSK_GAME_DATA f32 m_safeHeightF; #endif #endif }; diff --git a/include/m_Do/m_Do_lib.h b/include/m_Do/m_Do_lib.h index f194a4591b..db3a1dbea4 100644 --- a/include/m_Do/m_Do_lib.h +++ b/include/m_Do/m_Do_lib.h @@ -37,9 +37,9 @@ struct mDoLib_clipper { mClipper.calcViewFrustum(); } - static J3DUClipper mClipper; - static f32 mSystemFar; - static f32 mFovyRate; + static DUSK_GAME_DATA J3DUClipper mClipper; + static DUSK_GAME_DATA f32 mSystemFar; + static DUSK_GAME_DATA f32 mFovyRate; }; void mDoLib_project(Vec* src, Vec* dst); diff --git a/include/m_Do/m_Do_machine.h b/include/m_Do/m_Do_machine.h index eeea7e77ce..5469a29b5b 100644 --- a/include/m_Do/m_Do_machine.h +++ b/include/m_Do/m_Do_machine.h @@ -19,7 +19,7 @@ int mDoMch_Create(); void mDoMch_Destroy(); #endif -extern GXRenderModeObj g_ntscZeldaProg; +DUSK_GAME_EXTERN GXRenderModeObj g_ntscZeldaProg; class mDoMch_render_c { public: @@ -30,11 +30,11 @@ public: static GXRenderModeObj* getRenderModeObj() { return mRenderModeObj; } - static GXRenderModeObj* mRenderModeObj; + static DUSK_GAME_DATA GXRenderModeObj* mRenderModeObj; }; namespace mDoMch { - extern u8 mDebugFill; + DUSK_GAME_EXTERN u8 mDebugFill; extern u8 mDebugFillNotUse; extern u8 mDebugFillNew; extern u8 mDebugFillDelete; diff --git a/include/m_Do/m_Do_main.h b/include/m_Do/m_Do_main.h index 9bedc21a39..e3b8f1acf7 100644 --- a/include/m_Do/m_Do_main.h +++ b/include/m_Do/m_Do_main.h @@ -6,12 +6,12 @@ class JKRExpHeap; -extern OSThread mainThread; +DUSK_GAME_EXTERN OSThread mainThread; void version_check(); s32 LOAD_COPYDATE(void*); -extern OSThread mainThread; +DUSK_GAME_EXTERN OSThread mainThread; const int HeapCheckTableNum = 8; class HeapCheck { @@ -70,11 +70,11 @@ struct mDoMain { static u32 archiveHeapSize; static u32 gameHeapSize; - static char COPYDATE_STRING[18]; - static u32 memMargin; - static OSTime sPowerOnTime; - static OSTime sHungUpTime; - static s8 developmentMode; + static DUSK_GAME_DATA char COPYDATE_STRING[18]; + static DUSK_GAME_DATA u32 memMargin; + static DUSK_GAME_DATA OSTime sPowerOnTime; + static DUSK_GAME_DATA OSTime sHungUpTime; + static DUSK_GAME_DATA s8 developmentMode; }; #endif /* M_DO_M_DO_MAIN_H */ diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h index 23db8b6d94..dcd5cd10c7 100644 --- a/include/m_Do/m_Do_mtx.h +++ b/include/m_Do/m_Do_mtx.h @@ -9,7 +9,7 @@ #include "dusk/endian.h" extern u8 g_printCurrentHeapDebug; -extern u8 g_printOtherHeapDebug; +DUSK_GAME_EXTERN u8 g_printOtherHeapDebug; void mDoMtx_XYZrotS(Mtx, s16, s16, s16); void mDoMtx_XYZrotM(Mtx, s16, s16, s16); @@ -373,13 +373,13 @@ public: PSMTXIdentity(now); } - static Mtx now; - static Mtx buffer[16]; - static Mtx* next; - static Mtx* end; + static DUSK_GAME_DATA Mtx now; + static DUSK_GAME_DATA Mtx buffer[16]; + static DUSK_GAME_DATA Mtx* next; + static DUSK_GAME_DATA Mtx* end; }; -extern Mtx g_mDoMtx_identity; +DUSK_GAME_EXTERN Mtx g_mDoMtx_identity; inline MtxP mDoMtx_getIdentity() { return g_mDoMtx_identity; diff --git a/include/os_report.h b/include/os_report.h index 78177a199d..c622b172b3 100644 --- a/include/os_report.h +++ b/include/os_report.h @@ -25,7 +25,7 @@ DECL_WEAK void OSReportForceEnableOn(void); #define OS_PANIC(...) #endif -extern u8 __OSReport_disable; +DUSK_GAME_EXTERN u8 __OSReport_disable; extern u8 __OSReport_Error_disable; extern u8 __OSReport_Warning_disable; extern u8 __OSReport_System_disable; @@ -33,7 +33,7 @@ extern u8 __OSReport_enable; #if TARGET_PC namespace dusk { - extern bool OSReportReallyForceEnable; + DUSK_GAME_EXTERN bool OSReportReallyForceEnable; } #endif diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h b/libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h index 7a5a3e594a..340f4014ed 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h @@ -892,7 +892,7 @@ struct J2DBlendInfo { /* 0x3 */ u8 mOp; }; -extern const J2DBlendInfo j2dDefaultBlendInfo; +DUSK_GAME_EXTERN const J2DBlendInfo j2dDefaultBlendInfo; /** * @ingroup jsystem-j2d diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h index 60f382f064..510381ae10 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h @@ -201,7 +201,7 @@ public: static s16 J2DCast_F32_to_S16(f32 value, u8 arg2); - static JGeometry::TBox2 static_mBounds; + static DUSK_GAME_DATA JGeometry::TBox2 static_mBounds; public: /* 0x04 */ u16 field_0x4; diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DPrint.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPrint.h index aa0ffbdcf1..64e1b25139 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DPrint.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPrint.h @@ -67,8 +67,8 @@ public: mFontSizeY = y; } - static char* mStrBuff; - static size_t mStrBuffSize; + static DUSK_GAME_DATA char* mStrBuff; + static DUSK_GAME_DATA size_t mStrBuffSize; private: void private_initiate(JUTFont*, f32, f32, JUtility::TColor, JUtility::TColor, diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h b/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h index ef83eee36e..9244198475 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h @@ -90,7 +90,7 @@ public: static J2DDataManage* getDataManage() { return mDataManage; } - static J2DDataManage* mDataManage; + static DUSK_GAME_DATA J2DDataManage* mDataManage; /* 0x100 */ bool mScissor; /* 0x102 */ u16 mMaterialNum; diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h b/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h index ea81bc869f..368325ff81 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h @@ -46,7 +46,7 @@ struct J2DTexMtxInfo { }; // Size: 0x24 -extern J2DTexMtxInfo const j2dDefaultTexMtxInfo; +DUSK_GAME_EXTERN J2DTexMtxInfo const j2dDefaultTexMtxInfo; /** * @ingroup jsystem-j2d @@ -86,7 +86,7 @@ struct J2DIndTexOrderInfo { GXTexMapID getTexMapID() const { return (GXTexMapID)mTexMapID; } }; -extern const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull; +DUSK_GAME_EXTERN const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull; /** * @ingroup jsystem-j2d @@ -130,7 +130,7 @@ struct J2DIndTexMtxInfo { } }; -extern J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo; +DUSK_GAME_EXTERN J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo; /** * @ingroup jsystem-j2d @@ -175,7 +175,7 @@ struct J2DIndTexCoordScaleInfo { GXIndTexScale getScaleT() const { return (GXIndTexScale)mScaleT; } }; -extern const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo; +DUSK_GAME_EXTERN const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo; /** * @ingroup jsystem-j2d @@ -239,7 +239,7 @@ inline u32 J2DCalcIndTevStage(J2DIndTevStageInfo info) { (info.mBiasSel << 4) | (info.mIndFormat << 2) | (info.mIndStage); } -extern const J2DIndTevStageInfo j2dDefaultIndTevStageInfo; +DUSK_GAME_EXTERN const J2DIndTevStageInfo j2dDefaultIndTevStageInfo; /** * @ingroup jsystem-j2d @@ -289,7 +289,7 @@ struct J2DTexCoordInfo { } }; -extern J2DTexCoordInfo const j2dDefaultTexCoordInfo[8]; +DUSK_GAME_EXTERN J2DTexCoordInfo const j2dDefaultTexCoordInfo[8]; /** * @ingroup jsystem-j2d @@ -332,7 +332,7 @@ struct J2DTevOrderInfo { } }; -extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; +DUSK_GAME_EXTERN const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; /** * @ingroup jsystem-j2d @@ -383,7 +383,7 @@ struct J2DTevStageInfo { /* 0x13 */ u8 field_0x13; }; -extern J2DTevStageInfo const j2dDefaultTevStageInfo; +DUSK_GAME_EXTERN J2DTevStageInfo const j2dDefaultTevStageInfo; /** * @ingroup jsystem-j2d @@ -396,7 +396,7 @@ struct J2DTevSwapModeInfo { /* 0x3 */ u8 field_0x3; }; -extern const J2DTevSwapModeInfo j2dDefaultTevSwapMode; +DUSK_GAME_EXTERN const J2DTevSwapModeInfo j2dDefaultTevSwapMode; /** * @ingroup jsystem-j2d @@ -565,8 +565,8 @@ inline u8 J2DCalcTevSwapTable(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { return (param_0 << 6) + (param_1 << 4) + (param_2 << 2) + param_3; } -extern const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable; -extern const u8 j2dDefaultTevSwapTableID; +DUSK_GAME_EXTERN const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable; +DUSK_GAME_EXTERN const u8 j2dDefaultTevSwapTableID; /** * @ingroup jsystem-j2d @@ -615,7 +615,7 @@ struct J2DColorChanInfo { }; inline u16 J2DCalcColorChanID(u8 param_0) { return param_0; } -extern const J2DColorChanInfo j2dDefaultColorChanInfo; +DUSK_GAME_EXTERN const J2DColorChanInfo j2dDefaultColorChanInfo; /** * @ingroup jsystem-j2d @@ -644,12 +644,12 @@ private: /* 0x0 */ u16 mColorChan; }; -extern const GXColor j2dDefaultColInfo; -extern const GXColorS10 j2dDefaultTevColor; -extern const GXColor j2dDefaultTevKColor; -extern const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; -extern const u8 j2dDefaultPEBlockDither; -extern const u8 j2dDefaultTevSwapTableID; -extern const u16 j2dDefaultAlphaCmp; +DUSK_GAME_EXTERN const GXColor j2dDefaultColInfo; +DUSK_GAME_EXTERN const GXColorS10 j2dDefaultTevColor; +DUSK_GAME_EXTERN const GXColor j2dDefaultTevKColor; +DUSK_GAME_EXTERN const J2DTevOrderInfo j2dDefaultTevOrderInfoNull; +DUSK_GAME_EXTERN const u8 j2dDefaultPEBlockDither; +DUSK_GAME_EXTERN const u8 j2dDefaultTevSwapTableID; +DUSK_GAME_EXTERN const u16 j2dDefaultAlphaCmp; #endif /* J2DTEVS_H */ diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJoint.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJoint.h index 0a10f035be..7f57ed877b 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -53,8 +53,8 @@ public: } static void setJoint(J3DJoint* joint) { mJoint = joint; } - static J3DMtxBuffer* mMtxBuffer; - static J3DJoint* mJoint; + static DUSK_GAME_DATA J3DMtxBuffer* mMtxBuffer; + static DUSK_GAME_DATA J3DJoint* mJoint; }; // Size: 0x4 typedef int (*J3DJointCallBack)(J3DJoint*, int); @@ -100,7 +100,7 @@ public: void setMtxType(u8 type) { mKind = (mKind & ~0xf0) | (type << 4); } f32 getRadius() const { return mBoundingSphereRadius; } - static J3DMtxCalc* mCurrentMtxCalc; + static DUSK_GAME_DATA J3DMtxCalc* mCurrentMtxCalc; u8 getKind() const { return mKind & 15; } diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h index e61bbbe231..3a9538a58d 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h @@ -62,10 +62,10 @@ public: mpNrmMtxArr[1][mCurrentViewNo] = tmp; } - static Mtx sNoUseDrawMtx; - static Mtx33 sNoUseNrmMtx; - static Mtx* sNoUseDrawMtxPtr; - static Mtx33* sNoUseNrmMtxPtr; + static DUSK_GAME_DATA Mtx sNoUseDrawMtx; + static DUSK_GAME_DATA Mtx33 sNoUseNrmMtx; + static DUSK_GAME_DATA Mtx* sNoUseDrawMtxPtr; + static DUSK_GAME_DATA Mtx33* sNoUseNrmMtxPtr; /* 0x00 */ J3DJointTree* mJointTree; /* 0x04 */ u8* mpScaleFlagArr; diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h index e68b3ab02c..3799687f93 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h @@ -59,9 +59,9 @@ public: virtual void deform(J3DVertexBuffer*, J3DMtxBuffer*); virtual ~J3DSkinDeform(); - static BE(u16)* sWorkArea_WEvlpMixMtx[1024]; - static BE(f32)* sWorkArea_WEvlpMixWeight[1024]; - static u16 sWorkArea_MtxReg[1024]; + static DUSK_GAME_DATA BE(u16)* sWorkArea_WEvlpMixMtx[1024]; + static DUSK_GAME_DATA BE(f32)* sWorkArea_WEvlpMixWeight[1024]; + static DUSK_GAME_DATA u16 sWorkArea_MtxReg[1024]; private: /* 0x04 */ u16* mPosData; diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DDrawBuffer.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DDrawBuffer.h index 68be132081..a55f9ebcf1 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DDrawBuffer.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DDrawBuffer.h @@ -99,9 +99,9 @@ public: /* 0x1C */ MtxP mpZMtx; /* 0x20 */ J3DPacket* mpCallBackPacket; - static sortFunc sortFuncTable[6]; - static drawFunc drawFuncTable[2]; - static int entryNum; + static DUSK_GAME_DATA sortFunc sortFuncTable[6]; + static DUSK_GAME_DATA drawFunc drawFuncTable[2]; + static DUSK_GAME_DATA int entryNum; }; #endif /* J3DDRAWBUFFER_H */ diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DMatBlock.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DMatBlock.h index 859bd6943e..dbb3877dc3 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -1437,7 +1437,7 @@ inline u16 calcZModeID(u8 param_0, u8 param_1, u8 param_2) { return param_1 * 2 + param_0 * 0x10 + param_2; } -extern u8 j3dZModeTable[96]; +DUSK_GAME_EXTERN u8 j3dZModeTable[96]; /** * @ingroup jsystem-j3d diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h index 4be9fe1f17..992d96b255 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h @@ -125,8 +125,8 @@ public: u8* getDisplayList(int idx) { return (u8*)mpDisplayList[idx]; } u32 getDisplayListSize() { return mSize; } - static GDLObj sGDLObj; - static s32 sInterruptFlag; + static DUSK_GAME_DATA GDLObj sGDLObj; + static DUSK_GAME_DATA s32 sInterruptFlag; /* 0x0 */ void* mpDisplayList[2]; /* 0x8 */ u32 mSize; diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h index ea13c0600c..ac9d4558bc 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h @@ -80,13 +80,13 @@ public: virtual void load() const; virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); - static J3DShapeMtx_LoadFunc sMtxLoadPipeline[4]; - static u16 sMtxLoadCache[10]; - static u32 sCurrentPipeline; - static u8* sCurrentScaleFlag; - static bool sNBTFlag; - static bool sLODFlag; - static u32 sTexMtxLoadType; + static DUSK_GAME_DATA J3DShapeMtx_LoadFunc sMtxLoadPipeline[4]; + static DUSK_GAME_DATA u16 sMtxLoadCache[10]; + static DUSK_GAME_DATA u32 sCurrentPipeline; + static DUSK_GAME_DATA u8* sCurrentScaleFlag; + static DUSK_GAME_DATA bool sNBTFlag; + static DUSK_GAME_DATA bool sLODFlag; + static DUSK_GAME_DATA u32 sTexMtxLoadType; static void setCurrentPipeline(u32 pipeline) { J3D_ASSERT_RANGE(91, pipeline < 4); @@ -205,7 +205,7 @@ public: static void resetVcdVatCache() { sOldVcdVatCmd = NULL; } static DUSK_GAME_DATA void* sOldVcdVatCmd; - static bool sEnvelopeFlag; + static DUSK_GAME_DATA bool sEnvelopeFlag; private: friend struct J3DShapeFactory; diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h index 313fa1ef30..9edd5e6898 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -22,8 +22,8 @@ public: loadExecute(m); } - static J3DTexGenBlock* sTexGenBlock; - static J3DTexMtxObj* sTexMtxObj; + static DUSK_GAME_DATA J3DTexGenBlock* sTexGenBlock; + static DUSK_GAME_DATA J3DTexMtxObj* sTexMtxObj; }; class J3DShapeMtxConcatView; @@ -75,9 +75,9 @@ public: void loadMtxConcatView_PNCPU(int, u16) const; void loadMtxConcatView_PNGP_LOD(int, u16) const; - static J3DShapeMtxConcatView_LoadFunc sMtxLoadPipeline[4]; - static J3DShapeMtxConcatView_LoadFunc sMtxLoadLODPipeline[4]; - static MtxP sMtxPtrTbl[2]; + static DUSK_GAME_DATA J3DShapeMtxConcatView_LoadFunc sMtxLoadPipeline[4]; + static DUSK_GAME_DATA J3DShapeMtxConcatView_LoadFunc sMtxLoadLODPipeline[4]; + static DUSK_GAME_DATA MtxP sMtxPtrTbl[2]; }; /** diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h index ddc961f73f..b97be2ec03 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h @@ -202,13 +202,13 @@ struct J3DSys { J3DModel* getModel() { return mModel; } - static Mtx mCurrentMtx; - static Vec mCurrentS; - static Vec mParentS; - static J3DTexCoordScaleInfo sTexCoordScaleTable[8]; + static DUSK_GAME_DATA Mtx mCurrentMtx; + static DUSK_GAME_DATA Vec mCurrentS; + static DUSK_GAME_DATA Vec mParentS; + static DUSK_GAME_DATA J3DTexCoordScaleInfo sTexCoordScaleTable[8]; }; -extern u32 j3dDefaultViewNo; +DUSK_GAME_EXTERN u32 j3dDefaultViewNo; DUSK_GAME_EXTERN J3DSys j3dSys; #endif /* J3DSYS_H */ diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h index b0e2abfaae..c3d8dde2a4 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h @@ -6,32 +6,32 @@ #include "JSystem/J3DGraphBase/J3DGD.h" #include "JSystem/J3DGraphBase/J3DStruct.h" -extern u8 j3dTevSwapTableTable[1024]; +DUSK_GAME_EXTERN u8 j3dTevSwapTableTable[1024]; -extern const J3DLightInfo j3dDefaultLightInfo; -extern const J3DTexCoordInfo j3dDefaultTexCoordInfo[8]; -extern const J3DTexMtxInfo j3dDefaultTexMtxInfo; -extern const J3DIndTexMtxInfo j3dDefaultIndTexMtxInfo; -extern const J3DTevStageInfo j3dDefaultTevStageInfo; -extern const J3DIndTevStageInfo j3dDefaultIndTevStageInfo; -extern const J3DFogInfo j3dDefaultFogInfo; -extern const J3DNBTScaleInfo j3dDefaultNBTScaleInfo; +DUSK_GAME_EXTERN const J3DLightInfo j3dDefaultLightInfo; +DUSK_GAME_EXTERN const J3DTexCoordInfo j3dDefaultTexCoordInfo[8]; +DUSK_GAME_EXTERN const J3DTexMtxInfo j3dDefaultTexMtxInfo; +DUSK_GAME_EXTERN const J3DIndTexMtxInfo j3dDefaultIndTexMtxInfo; +DUSK_GAME_EXTERN const J3DTevStageInfo j3dDefaultTevStageInfo; +DUSK_GAME_EXTERN const J3DIndTevStageInfo j3dDefaultIndTevStageInfo; +DUSK_GAME_EXTERN const J3DFogInfo j3dDefaultFogInfo; +DUSK_GAME_EXTERN const J3DNBTScaleInfo j3dDefaultNBTScaleInfo; -extern const GXColor j3dDefaultColInfo; -extern const GXColor j3dDefaultAmbInfo; +DUSK_GAME_EXTERN const GXColor j3dDefaultColInfo; +DUSK_GAME_EXTERN const GXColor j3dDefaultAmbInfo; extern const u8 j3dDefaultColorChanNum; -extern const J3DTevOrderInfo j3dDefaultTevOrderInfoNull; -extern const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull; -extern const GXColorS10 j3dDefaultTevColor; -extern const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo; -extern const GXColor j3dDefaultTevKColor; -extern const J3DTevSwapModeInfo j3dDefaultTevSwapMode; -extern const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable; -extern const J3DBlendInfo j3dDefaultBlendInfo; -extern const J3DColorChanInfo j3dDefaultColorChanInfo; -extern const u8 j3dDefaultTevSwapTableID; -extern const u16 j3dDefaultAlphaCmpID; -extern const u16 j3dDefaultZModeID; +DUSK_GAME_EXTERN const J3DTevOrderInfo j3dDefaultTevOrderInfoNull; +DUSK_GAME_EXTERN const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull; +DUSK_GAME_EXTERN const GXColorS10 j3dDefaultTevColor; +DUSK_GAME_EXTERN const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo; +DUSK_GAME_EXTERN const GXColor j3dDefaultTevKColor; +DUSK_GAME_EXTERN const J3DTevSwapModeInfo j3dDefaultTevSwapMode; +DUSK_GAME_EXTERN const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable; +DUSK_GAME_EXTERN const J3DBlendInfo j3dDefaultBlendInfo; +DUSK_GAME_EXTERN const J3DColorChanInfo j3dDefaultColorChanInfo; +DUSK_GAME_EXTERN const u8 j3dDefaultTevSwapTableID; +DUSK_GAME_EXTERN const u16 j3dDefaultAlphaCmpID; +DUSK_GAME_EXTERN const u16 j3dDefaultZModeID; /** * @ingroup jsystem-j3d @@ -191,7 +191,7 @@ struct J3DIndTevStage { /* 0x0 */ u32 mInfo; }; -extern const J3DTevOrderInfo j3dDefaultTevOrderInfoNull; +DUSK_GAME_EXTERN const J3DTevOrderInfo j3dDefaultTevOrderInfoNull; /** * @ingroup jsystem-j3d @@ -209,8 +209,8 @@ struct J3DTevOrder : public J3DTevOrderInfo { u8 getTexMap() const { return mTexMap; } }; -extern u8 j3dTevSwapTableTable[1024]; -extern u8 const j3dDefaultTevSwapTableID; +DUSK_GAME_EXTERN u8 j3dTevSwapTableTable[1024]; +DUSK_GAME_EXTERN u8 const j3dDefaultTevSwapTableID; inline u8 calcTevSwapTableID(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { return 0x40 * (u8)param_0 + 0x10 * (u8)param_1 + 4 * (u8)param_2 + param_3; @@ -263,7 +263,7 @@ public: /* 0x34 */ GXLightObj mLightObj; }; // Size = 0x74 -extern const J3DNBTScaleInfo j3dDefaultNBTScaleInfo; +DUSK_GAME_EXTERN const J3DNBTScaleInfo j3dDefaultNBTScaleInfo; /** * @ingroup jsystem-j3d @@ -287,12 +287,12 @@ struct J3DNBTScale : public J3DNBTScaleInfo { BE(Vec)* getScale() { return &mScale; } }; -extern const GXColor j3dDefaultColInfo; -extern const GXColor j3dDefaultAmbInfo; -extern const GXColorS10 j3dDefaultTevColor; -extern const GXColor j3dDefaultTevKColor; -extern u8 j3dAlphaCmpTable[768]; -extern const u8 j3dDefaultNumChans; +DUSK_GAME_EXTERN const GXColor j3dDefaultColInfo; +DUSK_GAME_EXTERN const GXColor j3dDefaultAmbInfo; +DUSK_GAME_EXTERN const GXColorS10 j3dDefaultTevColor; +DUSK_GAME_EXTERN const GXColor j3dDefaultTevKColor; +DUSK_GAME_EXTERN u8 j3dAlphaCmpTable[768]; +DUSK_GAME_EXTERN const u8 j3dDefaultNumChans; struct J3DNBTScale; struct J3DTexCoord; diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h index e407db84b4..6e95222b6d 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h @@ -85,7 +85,7 @@ public: } }; -extern J3DTexMtxInfo const j3dDefaultTexMtxInfo; +DUSK_GAME_EXTERN J3DTexMtxInfo const j3dDefaultTexMtxInfo; /** * @ingroup jsystem-j3d @@ -117,7 +117,7 @@ private: /* 0x64 */ Mtx mMtx; }; // Size: 0x94 -extern J3DTexCoordInfo const j3dDefaultTexCoordInfo[8]; +DUSK_GAME_EXTERN J3DTexCoordInfo const j3dDefaultTexCoordInfo[8]; /** * @ingroup jsystem-j3d diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h index f8f27b26d9..dfe439fbfb 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h @@ -45,10 +45,10 @@ struct J3DTransformInfo { #endif }; // Size: 0x20 -extern J3DTransformInfo const j3dDefaultTransformInfo; -extern Vec const j3dDefaultScale; -extern Mtx const j3dDefaultMtx; -extern f32 const PSMulUnit01[]; +DUSK_GAME_EXTERN J3DTransformInfo const j3dDefaultTransformInfo; +DUSK_GAME_EXTERN Vec const j3dDefaultScale; +DUSK_GAME_EXTERN Mtx const j3dDefaultMtx; +DUSK_GAME_EXTERN f32 const PSMulUnit01[]; void J3DGQRSetup7(u32 param_0, u32 param_1, u32 param_2, u32 param_3); void J3DCalcBBoardMtx(f32 (*)[4]); diff --git a/libs/JSystem/include/JSystem/JAHostIO/JAHUpdate.h b/libs/JSystem/include/JSystem/JAHostIO/JAHUpdate.h index 84efd7e539..8ef1c84577 100644 --- a/libs/JSystem/include/JSystem/JAHostIO/JAHUpdate.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHUpdate.h @@ -8,8 +8,8 @@ namespace JAHUpdate { -extern JAHioNode* spNode; -extern JORMContext* spMc; +DUSK_GAME_EXTERN JAHioNode* spNode; +DUSK_GAME_EXTERN JORMContext* spMc; inline void startUpdateNode(JAHioNode* param_1) { spMc = attachJORMContext(8); diff --git a/libs/JSystem/include/JSystem/JAHostIO/JAHVirtualNode.h b/libs/JSystem/include/JSystem/JAHostIO/JAHVirtualNode.h index eee0ed94c0..535c01f881 100644 --- a/libs/JSystem/include/JSystem/JAHostIO/JAHVirtualNode.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHVirtualNode.h @@ -29,7 +29,7 @@ public: JSUTree* getVirTree() { return &mTree; } static u32 getVirNodeNum() { return smVirNodeNum; } - static u32 smVirNodeNum; + static DUSK_GAME_DATA u32 smVirNodeNum; /* 0x04 */ JSUTree mTree; /* 0x20 */ char mName[32]; diff --git a/libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h index 5a323dacd0..1b27be95b4 100644 --- a/libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h @@ -38,17 +38,17 @@ public: static u32 getIntervalX() { return smIntX; } static u32 getNameWidth() { return smNameWidth; } - static u16 smButtonWidth[]; - static u16 smCommentWidth[]; - static u16 smComboWidth[]; - static u16 smYTop; - static u16 smXLeft; - static u16 smIndentSize; - static u16 smLineHeight; - static u16 smContWidth; - static u16 smIntX; - static u16 smIntY; - static u16 smNameWidth; + static DUSK_GAME_DATA u16 smButtonWidth[]; + static DUSK_GAME_DATA u16 smCommentWidth[]; + static DUSK_GAME_DATA u16 smComboWidth[]; + static DUSK_GAME_DATA u16 smYTop; + static DUSK_GAME_DATA u16 smXLeft; + static DUSK_GAME_DATA u16 smIndentSize; + static DUSK_GAME_DATA u16 smLineHeight; + static DUSK_GAME_DATA u16 smContWidth; + static DUSK_GAME_DATA u16 smIntX; + static DUSK_GAME_DATA u16 smIntY; + static DUSK_GAME_DATA u16 smNameWidth; u16 getX() { return mX; } u16 getY() { return mY; } diff --git a/libs/JSystem/include/JSystem/JAHostIO/JAHioNode.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioNode.h index 70fb1d07b5..d0e294a959 100644 --- a/libs/JSystem/include/JSystem/JAHostIO/JAHioNode.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHioNode.h @@ -41,7 +41,7 @@ public: static JAHioNode* getCurrentNode() { return smCurrentNode; } - static JAHioNode* smCurrentNode; + static DUSK_GAME_DATA JAHioNode* smCurrentNode; JSUTree* getTree() { return &mTree; } char* getNodeName() { return mName; } diff --git a/libs/JSystem/include/JSystem/JAHostIO/JAHioUtil.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioUtil.h index 08522c8ba1..2342f030ec 100644 --- a/libs/JSystem/include/JSystem/JAHostIO/JAHioUtil.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHioUtil.h @@ -4,7 +4,7 @@ namespace JAHioUtil { char* getString(const char* msg, ...); - extern char mStringBuffer[]; + DUSK_GAME_EXTERN char mStringBuffer[]; } #endif /* JAHIOUTIL_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h b/libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h index 5bba1b94ee..2ae0f82c0a 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h @@ -41,21 +41,21 @@ namespace JASDriver { void subframeCallback(); void DSPSyncCallback(); - extern const MixFunc sMixFuncs[4]; - extern s16* sDmaDacBuffer[3]; - extern JASMixMode sMixMode; - extern f32 sDacRate; - extern u32 sSubFrames; - extern s16** sDspDacBuffer; - extern s32 sDspDacWriteBuffer; - extern s32 sDspDacReadBuffer; - extern s32 sDspStatus; - extern DSPBufCallback sDspDacCallback; - extern s16* lastRspMadep; - extern void (*dacCallbackFunc)(s16*, u32); - extern MixCallback extMixCallback; - extern u32 sOutputRate; - extern u32 sSubFrameCounter; + DUSK_GAME_EXTERN const MixFunc sMixFuncs[4]; + DUSK_GAME_EXTERN s16* sDmaDacBuffer[3]; + DUSK_GAME_EXTERN JASMixMode sMixMode; + DUSK_GAME_EXTERN f32 sDacRate; + DUSK_GAME_EXTERN u32 sSubFrames; + DUSK_GAME_EXTERN s16** sDspDacBuffer; + DUSK_GAME_EXTERN s32 sDspDacWriteBuffer; + DUSK_GAME_EXTERN s32 sDspDacReadBuffer; + DUSK_GAME_EXTERN s32 sDspStatus; + DUSK_GAME_EXTERN DSPBufCallback sDspDacCallback; + DUSK_GAME_EXTERN s16* lastRspMadep; + DUSK_GAME_EXTERN void (*dacCallbackFunc)(s16*, u32); + DUSK_GAME_EXTERN MixCallback extMixCallback; + DUSK_GAME_EXTERN u32 sOutputRate; + DUSK_GAME_EXTERN u32 sSubFrameCounter; }; #endif /* JASAICTRL_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h b/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h index dcfcebd30a..5128b9186a 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h @@ -256,24 +256,24 @@ public: * Thread that will be sent DVD load commands. * This is the JASDvd thread in practice. */ - static JASTaskThread* sLoadThread; + static DUSK_GAME_DATA JASTaskThread* sLoadThread; /** * Buffer used to read DVD data. Can store the size of an entire streamed audio block. */ - static u8* sReadBuffer; + static DUSK_GAME_DATA u8* sReadBuffer; /** * Block size used by all streamed music in the game. * This is 0x2760 for TP. */ - static u32 sBlockSize; + static DUSK_GAME_DATA u32 sBlockSize; /** * Maximum amount of output channels for all streamed music in the game. * This is 2 for TP (stereo). */ - static u32 sChannelMax; + static DUSK_GAME_DATA u32 sChannelMax; }; #endif /* JASARAMSTREAM_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h b/libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h index dd9fed2183..f633d58708 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h @@ -30,7 +30,7 @@ struct JASAudioThread : public JKRThread, public JASGlobalInstance { Command mFunc; JASPortArgs* mArgs; - static TPortHead sCommandListOnce; - static TPortHead sCommandListStay; + static DUSK_GAME_DATA TPortHead sCommandListOnce; + static DUSK_GAME_DATA TPortHead sCommandListStay; }; #endif /* JASCMDSTACK_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASDSPChannel.h b/libs/JSystem/include/JSystem/JAudio2/JASDSPChannel.h index 8204ab0838..f2ee2c3e49 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASDSPChannel.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASDSPChannel.h @@ -63,7 +63,7 @@ struct JASDSPChannel { static u32 getNumFree(); static u32 getNumBreak(); - static JASDSPChannel* sDspChannels; + static DUSK_GAME_DATA JASDSPChannel* sDspChannels; /* 0x00 */ s32 mStatus; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h b/libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h index a9a9b2d11e..b413052da7 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h @@ -196,15 +196,15 @@ namespace JASDsp { int setFXLine(u8, s16*, JASDsp::FxlineConfig_*); BOOL changeFXLineParam(u8, u8, uintptr_t); - extern u8 const DSPADPCM_FILTER[64]; - extern u32 const DSPRES_FILTER[320]; - extern u16 SEND_TABLE[]; - extern TChannel* CH_BUF; - extern FxBuf* FX_BUF; - extern f32 sDSPVolume; + DUSK_GAME_EXTERN u8 const DSPADPCM_FILTER[64]; + DUSK_GAME_EXTERN u32 const DSPRES_FILTER[320]; + DUSK_GAME_EXTERN u16 SEND_TABLE[]; + DUSK_GAME_EXTERN TChannel* CH_BUF; + DUSK_GAME_EXTERN FxBuf* FX_BUF; + DUSK_GAME_EXTERN f32 sDSPVolume; #if DEBUG - extern s32 dspMutex; + DUSK_GAME_EXTERN s32 dspMutex; #endif }; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASDriverIF.h b/libs/JSystem/include/JSystem/JAudio2/JASDriverIF.h index 5cddc38596..6401c0783a 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASDriverIF.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASDriverIF.h @@ -24,11 +24,11 @@ namespace JASDriver { void DSPSyncCallback(); void updateDacCallback(); - extern JASCallbackMgr sDspSyncCallback; - extern JASCallbackMgr sSubFrameCallback; - extern JASCallbackMgr sUpdateDacCallback; - extern u16 MAX_MIXERLEVEL; - extern u32 JAS_SYSTEM_OUTPUT_MODE; + DUSK_GAME_EXTERN JASCallbackMgr sDspSyncCallback; + DUSK_GAME_EXTERN JASCallbackMgr sSubFrameCallback; + DUSK_GAME_EXTERN JASCallbackMgr sUpdateDacCallback; + DUSK_GAME_EXTERN u16 MAX_MIXERLEVEL; + DUSK_GAME_EXTERN u32 JAS_SYSTEM_OUTPUT_MODE; }; inline void JAISetOutputMode(u32 mode) { diff --git a/libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h b/libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h index 553dffb7ca..c238413f8d 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h @@ -14,7 +14,7 @@ public: static JASTaskThread* getThreadPointer(); static bool createThread(s32 priority, int msgCount, u32 stackSize); - static JASTaskThread* sThread; + static DUSK_GAME_DATA JASTaskThread* sThread; }; #endif /* JASDVDTHREAD_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h b/libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h index 996fef6fef..353e0c4315 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h @@ -273,10 +273,10 @@ namespace JASKernel { u32 getAramFreeSize(); u32 getAramSize(); - extern JASHeap audioAramHeap; - extern uintptr_t sAramBase; - extern JKRHeap* sSystemHeap; - extern JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* sCommandHeap; + DUSK_GAME_EXTERN JASHeap audioAramHeap; + DUSK_GAME_EXTERN uintptr_t sAramBase; + DUSK_GAME_EXTERN JKRHeap* sSystemHeap; + DUSK_GAME_EXTERN JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* sCommandHeap; }; /** @@ -452,6 +452,6 @@ private: template JASMemPool_MultiThreaded JASPoolAllocObject_MultiThreaded::memPool_; #endif -extern JKRSolidHeap* JASDram; +DUSK_GAME_EXTERN JKRSolidHeap* JASDram; #endif /* JASHEAPCTRL_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASLfo.h b/libs/JSystem/include/JSystem/JAudio2/JASLfo.h index adc27a8325..5177a40f97 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASLfo.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASLfo.h @@ -19,7 +19,7 @@ struct JASLfo { static void updateFreeRun(f32 param_0) { sFreeRunLfo.incCounter(param_0); } - static JASLfo sFreeRunLfo; + static DUSK_GAME_DATA JASLfo sFreeRunLfo; /* 0x00 */ u32 field_0x0; /* 0x04 */ u32 field_0x4; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h b/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h index e811e890ab..438bf9c70f 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h @@ -92,10 +92,10 @@ struct JASOscillator { /* 0x1A */ u16 _1A; /* 0x1C */ int _1C; - static const f32 sCurveTableLinear[17]; - static const f32 sCurveTableSampleCell[17]; - static const f32 sCurveTableSqRoot[17]; - static const f32 sCurveTableSquare[17]; + static DUSK_GAME_DATA const f32 sCurveTableLinear[17]; + static DUSK_GAME_DATA const f32 sCurveTableSampleCell[17]; + static DUSK_GAME_DATA const f32 sCurveTableSqRoot[17]; + static DUSK_GAME_DATA const f32 sCurveTableSquare[17]; }; #endif /* JASOSCILLATOR_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASProbe.h b/libs/JSystem/include/JSystem/JAudio2/JASProbe.h index 03337adce7..1aacf96b4a 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASProbe.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASProbe.h @@ -13,7 +13,7 @@ struct JASProbe { void stop(); static void stop(s32); - static JASProbe* sProbeTable[16]; + static DUSK_GAME_DATA JASProbe* sProbeTable[16]; /* 0x000 */ char const* mName; /* 0x004 */ s32 mStartTime; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASSeqCtrl.h b/libs/JSystem/include/JSystem/JAudio2/JASSeqCtrl.h index d481192d6f..ce184e400d 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASSeqCtrl.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASSeqCtrl.h @@ -73,7 +73,7 @@ public: /* 0x52 */ u16 field_0x52; /* 0x54 */ u32 field_0x54; /* 0x58 */ u32 field_0x58; - static JASSeqParser sDefaultParser; + static DUSK_GAME_DATA JASSeqParser sDefaultParser; }; #endif /* JASSEQCTRL_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h b/libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h index 51db04ba26..8040e07228 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h @@ -92,9 +92,9 @@ public: static void registerSeqCallback(u16 (*param_0)(JASTrack*, u16)) { sCallBackFunc = param_0; } - static CmdInfo sCmdInfo[96]; - static CmdInfo sExtCmdInfo[255]; - static u16 (*sCallBackFunc)(JASTrack*, u16); + static DUSK_GAME_DATA CmdInfo sCmdInfo[96]; + static DUSK_GAME_DATA CmdInfo sExtCmdInfo[255]; + static DUSK_GAME_DATA u16 (*sCallBackFunc)(JASTrack*, u16); }; #endif /* JASSEQPARSER_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASTrack.h b/libs/JSystem/include/JSystem/JAudio2/JASTrack.h index b54a98aa77..eb8010be52 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASTrack.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASTrack.h @@ -14,7 +14,7 @@ struct JASSoundParams; namespace JASDsp { struct TChannel; - extern const u32 FILTER_MODE_IIR; + DUSK_GAME_EXTERN const u32 FILTER_MODE_IIR; }; #if !BIT_64 @@ -136,12 +136,12 @@ struct JASTrack : public JASPoolAllocObject_MultiThreaded { static void channelUpdateCallback(u32, JASChannel*, JASDsp::TChannel*, void*); - static JASOscillator::Point const sAdsTable[4]; - static JASOscillator::Data const sEnvOsc; - static JASOscillator::Data const sPitchEnvOsc; + static DUSK_GAME_DATA JASOscillator::Point const sAdsTable[4]; + static DUSK_GAME_DATA JASOscillator::Data const sEnvOsc; + static DUSK_GAME_DATA JASOscillator::Data const sPitchEnvOsc; - static JASDefaultBankTable sDefaultBankTable; - static TList sTrackList; + static DUSK_GAME_DATA JASDefaultBankTable sDefaultBankTable; + static DUSK_GAME_DATA TList sTrackList; static const int MAX_CHILDREN = 16; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASVoiceBank.h b/libs/JSystem/include/JSystem/JAudio2/JASVoiceBank.h index f54273e962..ee40ea1074 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASVoiceBank.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASVoiceBank.h @@ -14,8 +14,8 @@ public: virtual ~JASVoiceBank(); virtual u32 getType() const; - static const JASOscillator::Data sOscData; - static JASOscillator::Data* sOscTable; + static DUSK_GAME_DATA const JASOscillator::Data sOscData; + static DUSK_GAME_DATA JASOscillator::Data* sOscTable; }; #endif /* JASVOICEBANK_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASWSParser.h b/libs/JSystem/include/JSystem/JAudio2/JASWSParser.h index 68d91006ba..9fe201308c 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASWSParser.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASWSParser.h @@ -89,7 +89,7 @@ public: static JASBasicWaveBank* createBasicWaveBank(void const*, JKRHeap*); static JASSimpleWaveBank* createSimpleWaveBank(void const*, JKRHeap*); - static u32 sUsedHeapSize; + static DUSK_GAME_DATA u32 sUsedHeapSize; }; #endif /* JASWSPARSER_H */ diff --git a/libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h b/libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h index eea3eddac3..0ad4e044c8 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h @@ -28,8 +28,8 @@ struct JASWaveArcLoader { static void setCurrentDir(char const*); static char* getCurrentDir(); - static char sCurrentDir[DIR_MAX]; - static JASHeap* sAramHeap; + static DUSK_GAME_DATA char sCurrentDir[DIR_MAX]; + static DUSK_GAME_DATA JASHeap* sAramHeap; }; /** diff --git a/libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h b/libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h index cac518836e..04bd541204 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h @@ -33,7 +33,7 @@ struct JASWaveInfo { /* 0x1E */ s16 mpPenult; /* 0x20 */ const u32* field_0x20; - static u32 one; + static DUSK_GAME_DATA u32 one; }; /** diff --git a/libs/JSystem/include/JSystem/JFramework/JFWDisplay.h b/libs/JSystem/include/JSystem/JFramework/JFWDisplay.h index 28967cc0a2..c9fc602b29 100644 --- a/libs/JSystem/include/JSystem/JFramework/JFWDisplay.h +++ b/libs/JSystem/include/JSystem/JFramework/JFWDisplay.h @@ -27,7 +27,7 @@ public: OSThread* getThread() const { return mThread; } void setThread(OSThread* thread) { mThread = thread; } - static JSUList sList; + static DUSK_GAME_DATA JSUList sList; public: /* 0x28 */ OSThread* mThread; @@ -108,7 +108,7 @@ public: int getEfbHeight() const { return JUTVideo::getManager()->getEfbHeight(); } JUTXfb* getXfbManager() const { return mXfbManager; } - static JFWDisplay* sManager; + static DUSK_GAME_DATA JFWDisplay* sManager; private: /* 0x04 */ JUTFader* mFader; diff --git a/libs/JSystem/include/JSystem/JFramework/JFWSystem.h b/libs/JSystem/include/JSystem/JFramework/JFWSystem.h index 288b5f03d8..c8d3940331 100644 --- a/libs/JSystem/include/JSystem/JFramework/JFWSystem.h +++ b/libs/JSystem/include/JSystem/JFramework/JFWSystem.h @@ -18,17 +18,17 @@ struct ResFONT; */ struct JFWSystem { struct CSetUpParam { - static s32 maxStdHeaps; - static u32 sysHeapSize; - static u32 fifoBufSize; - static u32 aramAudioBufSize; - static u32 aramGraphBufSize; - static s32 streamPriority; - static s32 decompPriority; - static s32 aPiecePriority; - static ResFONT* systemFontRes; - static const GXRenderModeObj* renderMode; - static u32 exConsoleBufferSize; + static DUSK_GAME_DATA s32 maxStdHeaps; + static DUSK_GAME_DATA u32 sysHeapSize; + static DUSK_GAME_DATA u32 fifoBufSize; + static DUSK_GAME_DATA u32 aramAudioBufSize; + static DUSK_GAME_DATA u32 aramGraphBufSize; + static DUSK_GAME_DATA s32 streamPriority; + static DUSK_GAME_DATA s32 decompPriority; + static DUSK_GAME_DATA s32 aPiecePriority; + static DUSK_GAME_DATA ResFONT* systemFontRes; + static DUSK_GAME_DATA const GXRenderModeObj* renderMode; + static DUSK_GAME_DATA u32 exConsoleBufferSize; }; static void firstInit(); @@ -67,14 +67,14 @@ struct JFWSystem { CSetUpParam::renderMode = p_modeObj; } - static JKRExpHeap* rootHeap; - static JKRExpHeap* systemHeap; - static JKRThread* mainThread; - static JUTDbPrint* debugPrint; - static JUTResFont* systemFont; - static JUTConsoleManager* systemConsoleManager; - static JUTConsole* systemConsole; - static bool sInitCalled; + static DUSK_GAME_DATA JKRExpHeap* rootHeap; + static DUSK_GAME_DATA JKRExpHeap* systemHeap; + static DUSK_GAME_DATA JKRThread* mainThread; + static DUSK_GAME_DATA JUTDbPrint* debugPrint; + static DUSK_GAME_DATA JUTResFont* systemFont; + static DUSK_GAME_DATA JUTConsoleManager* systemConsoleManager; + static DUSK_GAME_DATA JUTConsole* systemConsole; + static DUSK_GAME_DATA bool sInitCalled; }; #endif /* JFWSYSTEM_H */ diff --git a/libs/JSystem/include/JSystem/JHostIO/JHIMccBuf.h b/libs/JSystem/include/JSystem/JHostIO/JHIMccBuf.h index 7343b88376..a7b4544980 100644 --- a/libs/JSystem/include/JSystem/JHostIO/JHIMccBuf.h +++ b/libs/JSystem/include/JSystem/JHostIO/JHIMccBuf.h @@ -27,8 +27,8 @@ public: virtual void disablePort() { mPortEnabled = false; } virtual bool isPort() { return mPortEnabled; } - static u8* mTempBuf; - static u16 mRefCount; + static DUSK_GAME_DATA u8* mTempBuf; + static DUSK_GAME_DATA u16 mRefCount; /* 0x04 */ u32 mTag; /* 0x08 */ u16 field_0x8; diff --git a/libs/JSystem/include/JSystem/JHostIO/JORServer.h b/libs/JSystem/include/JSystem/JHostIO/JORServer.h index 53f3283f6c..ecb6225650 100644 --- a/libs/JSystem/include/JSystem/JHostIO/JORServer.h +++ b/libs/JSystem/include/JSystem/JHostIO/JORServer.h @@ -120,7 +120,7 @@ public: CallbackLinkList* referEventCallbackList() { return &m_eventCallbackList; } static JORServer* getInstance() { return instance; } - static JORServer* instance; + static DUSK_GAME_DATA JORServer* instance; /* 0x0000C */ JORMContext m_context; /* 0x10020 */ JORReflexible* mp_rootObj; diff --git a/libs/JSystem/include/JSystem/JKernel/JKRAram.h b/libs/JSystem/include/JSystem/JKernel/JKRAram.h index dd3bf54f9c..c934820b13 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRAram.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRAram.h @@ -65,13 +65,13 @@ public: static u32 getSZSBufferSize() { return sSZSBufferSize; } static void setSZSBufferSize(u32 size) { sSZSBufferSize = size; } - static OSMessageQueue sMessageQueue; + static DUSK_GAME_DATA OSMessageQueue sMessageQueue; private: - static JKRAram* sAramObject; - static u32 sSZSBufferSize; - static OSMessage sMessageBuffer[4]; - static JSUList sAramCommandList; + static DUSK_GAME_DATA JKRAram* sAramObject; + static DUSK_GAME_DATA u32 sSZSBufferSize; + static DUSK_GAME_DATA OSMessage sMessageBuffer[4]; + static DUSK_GAME_DATA JSUList sAramCommandList; }; inline JKRAramBlock* JKRAllocFromAram(u32 size, JKRAramHeap::EAllocMode allocMode) { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h index 0d7734f6f4..b502e21aa7 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h @@ -19,7 +19,7 @@ public: }; public: - static JSUList sAramList; + static DUSK_GAME_DATA JSUList sAramList; JKRAramHeap(u32, u32); virtual ~JKRAramHeap(); diff --git a/libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h b/libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h index 51eeef27e9..f701afd08f 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h @@ -62,9 +62,9 @@ struct JKRAramCommand { */ class JKRAramPiece { public: - static OSMutex mMutex; + static DUSK_GAME_DATA OSMutex mMutex; // TODO: fix type - static JSUList sAramPieceCommandList; + static DUSK_GAME_DATA JSUList sAramPieceCommandList; public: static JKRAMCommand* prepareCommand(int, uintptr_t, uintptr_t, u32, JKRAramBlock*, diff --git a/libs/JSystem/include/JSystem/JKernel/JKRAramStream.h b/libs/JSystem/include/JSystem/JKernel/JKRAramStream.h index 47d9257229..9ea3fb4eb6 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRAramStream.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRAramStream.h @@ -60,13 +60,13 @@ public: static void setTransBuffer(u8*, u32, JKRHeap*); private: - static JKRAramStream* sAramStreamObject; - static OSMessage sMessageBuffer[4]; - static OSMessageQueue sMessageQueue; + static DUSK_GAME_DATA JKRAramStream* sAramStreamObject; + static DUSK_GAME_DATA OSMessage sMessageBuffer[4]; + static DUSK_GAME_DATA OSMessageQueue sMessageQueue; - static u8* transBuffer; - static u32 transSize; - static JKRHeap* transHeap; + static DUSK_GAME_DATA u8* transBuffer; + static DUSK_GAME_DATA u32 transSize; + static DUSK_GAME_DATA JKRHeap* transHeap; }; inline JKRAramStream* JKRCreateAramStreamManager(s32 priority) { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRArchive.h index 89f3835364..40fff2dd6d 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRArchive.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRArchive.h @@ -242,7 +242,7 @@ public: static void setCurrentDirID(u32 dirID) { sCurrentDirID = dirID; } protected: - static u32 sCurrentDirID; + static DUSK_GAME_DATA u32 sCurrentDirID; }; inline JKRCompression JKRConvertAttrToCompressionType(int attr) { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRDecomp.h b/libs/JSystem/include/JSystem/JKernel/JKRDecomp.h index 2e7ce0ef1c..f7b4581993 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRDecomp.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRDecomp.h @@ -61,9 +61,9 @@ public: static void decodeSZS(u8*, u8*, u32, u32); static JKRCompression checkCompressed(u8*); - static JKRDecomp* sDecompObject; - static OSMessage sMessageBuffer[8]; - static OSMessageQueue sMessageQueue; + static DUSK_GAME_DATA JKRDecomp* sDecompObject; + static DUSK_GAME_DATA OSMessage sMessageBuffer[8]; + static DUSK_GAME_DATA OSMessageQueue sMessageQueue; }; inline void JKRDecompress(u8* srcBuffer, u8* dstBuffer, u32 srcLength, u32 dstLength) { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRDvdAramRipper.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdAramRipper.h index 110827dc0b..20e8001e50 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRDvdAramRipper.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRDvdAramRipper.h @@ -55,9 +55,9 @@ public: static bool isErrorRetry() { return errorRetry; } // TODO: fix type - static JSUList sDvdAramAsyncList; - static u32 sSZSBufferSize; - static bool errorRetry; + static DUSK_GAME_DATA JSUList sDvdAramAsyncList; + static DUSK_GAME_DATA u32 sSZSBufferSize; + static DUSK_GAME_DATA bool errorRetry; }; inline JKRAramBlock *JKRDvdToAram(s32 entrynum, u32 p2, JKRExpandSwitch expSwitch, u32 p4, u32 p5, u32 *p6) { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h index f32c8c6778..d5d439d363 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h @@ -62,7 +62,7 @@ public: static JSUList& getDvdList() { return sDvdList; } private: - static JSUList sDvdList; + static DUSK_GAME_DATA JSUList sDvdList; }; #endif /* JKRDVDFILE_H */ diff --git a/libs/JSystem/include/JSystem/JKernel/JKRDvdRipper.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdRipper.h index 0720605efb..aafecf063b 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRDvdRipper.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRDvdRipper.h @@ -33,11 +33,11 @@ class JKRDvdFile; */ class JKRDvdRipper { public: - static JSUList sDvdAsyncList; - static u32 sSZSBufferSize; - static bool errorRetry; + static DUSK_GAME_DATA JSUList sDvdAsyncList; + static DUSK_GAME_DATA u32 sSZSBufferSize; + static DUSK_GAME_DATA bool errorRetry; #if TARGET_PC - static JKRHeap* sHeap; + static DUSK_GAME_DATA JKRHeap* sHeap; #endif enum EAllocDirection { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRFileLoader.h b/libs/JSystem/include/JSystem/JKernel/JKRFileLoader.h index 7e3e4cd1c5..cd1483ed1f 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRFileLoader.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRFileLoader.h @@ -53,8 +53,8 @@ public: static void setCurrentVolume(JKRFileLoader* fileLoader) { sCurrentVolume = fileLoader; } static JSUList& getVolumeList() { return sVolumeList; } - static JKRFileLoader* sCurrentVolume; - static JSUList sVolumeList; + static DUSK_GAME_DATA JKRFileLoader* sCurrentVolume; + static DUSK_GAME_DATA JSUList sVolumeList; }; inline bool JKRDetachResource(void* resource, JKRFileLoader* fileLoader) { diff --git a/libs/JSystem/include/JSystem/JKernel/JKRHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRHeap.h index d1b27a0fd0..ace28de6e3 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRHeap.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRHeap.h @@ -11,12 +11,12 @@ class JKRHeap; typedef void (*JKRErrorHandler)(void*, u32, int); -extern u8 JKRValue_DEBUGFILL_NOTUSE; -extern u8 JKRValue_DEBUGFILL_NEW; -extern u8 JKRValue_DEBUGFILL_DELETE; +DUSK_GAME_EXTERN u8 JKRValue_DEBUGFILL_NOTUSE; +DUSK_GAME_EXTERN u8 JKRValue_DEBUGFILL_NEW; +DUSK_GAME_EXTERN u8 JKRValue_DEBUGFILL_DELETE; -extern s32 fillcheck_dispcount; -extern bool data_8074A8D0_debug; +DUSK_GAME_EXTERN s32 fillcheck_dispcount; +DUSK_GAME_EXTERN bool data_8074A8D0_debug; #if BIT_64 #define MEM_BLOCK_SIZE 0x20 @@ -194,26 +194,26 @@ public: } static void* getState_buf_(TState* state) { return &state->mBuf; } - static void* mCodeStart; - static void* mCodeEnd; - static void* mUserRamStart; - static void* mUserRamEnd; - static u32 mMemorySize; - static JKRAllocCallback sAllocCallback; - static JKRFreeCallback sFreeCallback; + static DUSK_GAME_DATA void* mCodeStart; + static DUSK_GAME_DATA void* mCodeEnd; + static DUSK_GAME_DATA void* mUserRamStart; + static DUSK_GAME_DATA void* mUserRamEnd; + static DUSK_GAME_DATA u32 mMemorySize; + static DUSK_GAME_DATA JKRAllocCallback sAllocCallback; + static DUSK_GAME_DATA JKRFreeCallback sFreeCallback; - static bool sDefaultFillFlag; + static DUSK_GAME_DATA bool sDefaultFillFlag; - static JKRHeap* sRootHeap; + static DUSK_GAME_DATA JKRHeap* sRootHeap; - static JKRHeap* sRootHeap2; + static DUSK_GAME_DATA JKRHeap* sRootHeap2; - static JKRHeap* sSystemHeap; + static DUSK_GAME_DATA JKRHeap* sSystemHeap; #if !TARGET_PC // Hide sCurrentHeap, we need to make it thread local. static JKRHeap* sCurrentHeap; #endif - static JKRErrorHandler mErrorHandler; + static DUSK_GAME_DATA JKRErrorHandler mErrorHandler; #if TARGET_PC void setName(const char* name); diff --git a/libs/JSystem/include/JSystem/JKernel/JKRThread.h b/libs/JSystem/include/JSystem/JKernel/JKRThread.h index 79217f3675..b77b40c74e 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRThread.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRThread.h @@ -141,7 +141,7 @@ public: static JKRThread* searchThread(OSThread* thread); static JSUList& getList() { return (JSUList&)sThreadList; } - static JSUList sThreadList; + static DUSK_GAME_DATA JSUList sThreadList; // static u8 sThreadList[12]; #if TARGET_PC @@ -155,7 +155,7 @@ public: virtual ~JKRIdleThread() { sThread = NULL; } virtual void* run() { while (true); } - static void* sThread; + static DUSK_GAME_DATA void* sThread; }; typedef void (*JKRThreadSwitch_PreCallback)(OSThread* current, OSThread* next); @@ -181,11 +181,11 @@ public: static u32 getTotalCount() { return sTotalCount; } private: - static JKRThreadSwitch* sManager; - static u32 sTotalCount; - static u64 sTotalStart; - static JKRThreadSwitch_PreCallback mUserPreCallback; - static JKRThreadSwitch_PostCallback mUserPostCallback; + static DUSK_GAME_DATA JKRThreadSwitch* sManager; + static DUSK_GAME_DATA u32 sTotalCount; + static DUSK_GAME_DATA u64 sTotalStart; + static DUSK_GAME_DATA JKRThreadSwitch_PreCallback mUserPreCallback; + static DUSK_GAME_DATA JKRThreadSwitch_PostCallback mUserPostCallback; private: /* 0x00 */ // vtable @@ -207,8 +207,8 @@ public: int check(); - static JSUList sTaskList; - static u8 sEndMesgQueue[32]; + static DUSK_GAME_DATA JSUList sTaskList; + static DUSK_GAME_DATA u8 sEndMesgQueue[32]; /* 0x7C */ JSULink mTaskLink; /* 0x8C */ u8 field_0x8c[0x94 - 0x8C]; diff --git a/libs/JSystem/include/JSystem/JMath/JMATrigonometric.h b/libs/JSystem/include/JSystem/JMath/JMATrigonometric.h index e51296ba3b..520f18810d 100644 --- a/libs/JSystem/include/JSystem/JMath/JMATrigonometric.h +++ b/libs/JSystem/include/JSystem/JMath/JMATrigonometric.h @@ -141,9 +141,9 @@ struct TAsinAcosTable { } }; -extern TSinCosTable<13, f32> sincosTable_; -extern TAtanTable<1024, f32> atanTable_; -extern TAsinAcosTable<1024, f32> asinAcosTable_; +DUSK_GAME_EXTERN TSinCosTable<13, f32> sincosTable_; +DUSK_GAME_EXTERN TAtanTable<1024, f32> atanTable_; +DUSK_GAME_EXTERN TAsinAcosTable<1024, f32> asinAcosTable_; inline f32 acosDegree(f32 x) { return asinAcosTable_.acosDegree(x); diff --git a/libs/JSystem/include/JSystem/JMessage/data.h b/libs/JSystem/include/JSystem/JMessage/data.h index 0f7e4fda95..bfb3303056 100644 --- a/libs/JSystem/include/JSystem/JMessage/data.h +++ b/libs/JSystem/include/JSystem/JMessage/data.h @@ -81,8 +81,8 @@ struct data { static unsigned int getTagCode(u32 tag) { return tag & 0xFFFF; } static u8 getTagGroup(u32 tag) { return tag >> 0x10; } - static const BE(u32) ga4cSignature; - static const BE(u32) ga4cSignature_color; + static DUSK_GAME_DATA const BE(u32) ga4cSignature; + static DUSK_GAME_DATA const BE(u32) ga4cSignature_color; static const int gcTagBegin = '\x1A'; // All text Control Tags will begin with this character diff --git a/libs/JSystem/include/JSystem/JMessage/resource.h b/libs/JSystem/include/JSystem/JMessage/resource.h index 6e4acdd6a7..cecfe9dbbb 100644 --- a/libs/JSystem/include/JSystem/JMessage/resource.h +++ b/libs/JSystem/include/JSystem/JMessage/resource.h @@ -144,7 +144,7 @@ struct TResourceContainer { destroyResource_color(); } - static JMessage::locale::parseCharacter_function sapfnParseCharacter_[5]; + static DUSK_GAME_DATA JMessage::locale::parseCharacter_function sapfnParseCharacter_[5]; /* 0x00 */ u8 encodingType_; /* 0x04 */ JMessage::locale::parseCharacter_function pfnParseCharacter_; diff --git a/libs/JSystem/include/JSystem/JParticle/JPABaseShape.h b/libs/JSystem/include/JSystem/JParticle/JPABaseShape.h index ec15c0430a..84fc657387 100644 --- a/libs/JSystem/include/JSystem/JParticle/JPABaseShape.h +++ b/libs/JSystem/include/JSystem/JParticle/JPABaseShape.h @@ -63,13 +63,13 @@ public: JPABaseShape(u8 const*, JKRHeap*); void setGX(JPAEmitterWorkData*) const; - static GXBlendMode st_bm[3]; - static GXBlendFactor st_bf[10]; - static GXLogicOp st_lo[16]; - static GXCompare st_c[8]; - static GXAlphaOp st_ao[4]; - static GXTevColorArg st_ca[6][4]; - static GXTevAlphaArg st_aa[2][4]; + static DUSK_GAME_DATA GXBlendMode st_bm[3]; + static DUSK_GAME_DATA GXBlendFactor st_bf[10]; + static DUSK_GAME_DATA GXLogicOp st_lo[16]; + static DUSK_GAME_DATA GXCompare st_c[8]; + static DUSK_GAME_DATA GXAlphaOp st_ao[4]; + static DUSK_GAME_DATA GXTevColorArg st_ca[6][4]; + static DUSK_GAME_DATA GXTevAlphaArg st_aa[2][4]; GXBlendMode getBlendMode() const { return st_bm[pBsd->mBlendModeCfg & 0x03]; } GXBlendFactor getBlendSrc() const { return st_bf[(pBsd->mBlendModeCfg >> 2) & 0x0F]; } diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h b/libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h index da03389c25..f01a170bde 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h @@ -109,7 +109,7 @@ struct data { } }; - static const u32 ga4cSignature; + static DUSK_GAME_DATA const u32 ga4cSignature; }; struct TObject_TxyzRy : public TObject { diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data.h index 8e82a0c031..e0a337a51a 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data.h @@ -10,7 +10,7 @@ namespace JStudio { namespace fvb { namespace data { -extern const char ga4cSignature[4]; +DUSK_GAME_EXTERN const char ga4cSignature[4]; const int PARAGRAPH_DATA = 1; diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-data.h index 9dc95fae97..4956d1c150 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-data.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-data.h @@ -4,7 +4,7 @@ namespace JStudio { namespace data { - extern const char ga8cSignature[8]; + DUSK_GAME_EXTERN const char ga8cSignature[8]; } // namespace data } // namespace JStudio diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h index 2fe984853f..914ce66397 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h @@ -91,7 +91,7 @@ struct TVariableValue { pOutput_ = (param_1 != NULL) ? param_1 : &soOutput_none_; } - static TOutput_none_ soOutput_none_; + static DUSK_GAME_DATA TOutput_none_ soOutput_none_; /* 0x00 */ f32 mValue; /* 0x04 */ u32 field_0x4; @@ -249,9 +249,9 @@ struct TAdaptor_actor : public TAdaptor { /* 0x10 */ TVariableValue mValue[14]; - static u32 const sauVariableValue_3_TRANSLATION_XYZ[3]; - static u32 const sauVariableValue_3_ROTATION_XYZ[3]; - static u32 const sauVariableValue_3_SCALING_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_TRANSLATION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_ROTATION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_SCALING_XYZ[3]; }; // Size: 0x128 struct TObject_actor : public TObject { @@ -267,8 +267,8 @@ struct TAdaptor_ambientLight : public TAdaptor { /* 0x10 */ TVariableValue mValue[4]; - static u32 const sauVariableValue_3_COLOR_RGB[3]; - static u32 const sauVariableValue_4_COLOR_RGBA[4]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4]; }; struct TObject_ambientLight : public TObject { @@ -299,9 +299,9 @@ struct TAdaptor_camera : public TAdaptor { /* 0x10 */ TVariableValue mValue[12]; - static u32 const sauVariableValue_3_POSITION_XYZ[3]; - static u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3]; - static u32 const sauVariableValue_2_DISTANCE_NEAR_FAR[2]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_POSITION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_2_DISTANCE_NEAR_FAR[2]; }; struct TObject_camera : public TObject { @@ -322,9 +322,9 @@ struct TAdaptor_fog : public TAdaptor { /* 0x10 */ TVariableValue mValue[6]; - static u32 const sauVariableValue_3_COLOR_RGB[3]; - static u32 const sauVariableValue_4_COLOR_RGBA[4]; - static u32 const sauVariableValue_2_RANGE_BEGIN_END[2]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4]; + static DUSK_GAME_DATA u32 const sauVariableValue_2_RANGE_BEGIN_END[2]; }; struct TObject_fog : public TObject { @@ -351,11 +351,11 @@ struct TAdaptor_light : public TAdaptor { /* 0x10 */ TVariableValue mValue[13]; - static u32 const sauVariableValue_3_COLOR_RGB[3]; - static u32 const sauVariableValue_4_COLOR_RGBA[4]; - static u32 const sauVariableValue_3_POSITION_XYZ[3]; - static u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3]; - static u32 const sauVariableValue_2_DIRECTION_THETA_PHI[2]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_POSITION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_TARGET_POSITION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_2_DIRECTION_THETA_PHI[2]; }; struct TObject_light : public TObject { @@ -396,13 +396,13 @@ struct TAdaptor_particle : public TAdaptor { /* 0x10 */ TVariableValue mValue[20]; - static u32 const sauVariableValue_3_TRANSLATION_XYZ[3]; - static u32 const sauVariableValue_3_ROTATION_XYZ[3]; - static u32 const sauVariableValue_3_SCALING_XYZ[3]; - static u32 const sauVariableValue_3_COLOR_RGB[3]; - static u32 const sauVariableValue_4_COLOR_RGBA[4]; - static u32 const sauVariableValue_3_COLOR1_RGB[3]; - static u32 const sauVariableValue_4_COLOR1_RGBA[4]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_TRANSLATION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_ROTATION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_SCALING_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR_RGB[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR_RGBA[4]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_COLOR1_RGB[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_4_COLOR1_RGBA[4]; }; struct TObject_particle : public TObject { @@ -440,7 +440,7 @@ struct TAdaptor_sound : public TAdaptor { /* 0x10 */ TVariableValue mValue[13]; - static u32 const sauVariableValue_3_POSITION_XYZ[3]; + static DUSK_GAME_DATA u32 const sauVariableValue_3_POSITION_XYZ[3]; }; // Size: 0x114 struct TObject_sound : public TObject { diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h index b7e3cd0f7b..5da61e1575 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h @@ -21,8 +21,8 @@ const int BLOCK_NONE = -1; // Used to expand a signed 24 int to a signed 32 int const u32 gu32Mask_TSequence_value_signExpansion = 0xFF000000; -extern const BE(u32) ga4cSignature; // 'STB/0' -extern const s32 gauDataSize_TEParagraph_data[8]; +DUSK_GAME_EXTERN const BE(u32) ga4cSignature; // 'STB/0' +DUSK_GAME_EXTERN const s32 gauDataSize_TEParagraph_data[8]; inline void toString_block(char* a5c, u32 arg1) { // from debug, todo diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/control.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/control.h index effefaef18..884aeb9da5 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/control.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/control.h @@ -94,7 +94,7 @@ struct TAdaptor_sound : public JStudio::TAdaptor_sound { void set_bPermit_onExit_notEnd_(bool param_1) { field_0x11c = param_1; } - static TVVOSetValue_ saoVVOSetValue_[6]; + static DUSK_GAME_DATA TVVOSetValue_ saoVVOSetValue_[6]; /* 0x114 */ TCreateObject* pCreateObject_; /* 0x118 */ JAISoundHandle opJAISoundHandle_; diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/control.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/control.h index 1e8331206b..050088722e 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/control.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/control.h @@ -131,8 +131,8 @@ struct TAdaptor_actor : public JStudio::TAdaptor_actor, public JStudio_JStage::T JStage::TActor* get_pJSG_() { return (JStage::TActor*) pJSGObject_; } - static const TVVOutputObject saoVVOutput_[]; - static const TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[]; + static DUSK_GAME_DATA const TVVOutputObject saoVVOutput_[]; + static DUSK_GAME_DATA const TVVOutput_ANIMATION_FRAME_ saoVVOutput_ANIMATION_FRAME_[]; /* 0x130 */ u32 field_0x130; /* 0x134 */ u32 field_0x134; @@ -187,7 +187,7 @@ struct TAdaptor_camera : public JStudio::TAdaptor_camera, public TAdaptor_object JStage::TCamera* get_pJSG_() { return (JStage::TCamera*)pJSGObject_; } - static TVVOutput saoVVOutput_[]; + static DUSK_GAME_DATA TVVOutput saoVVOutput_[]; /* 0x108 */ int field_0x108; /* 0x10C */ JStage::TObject* field_0x10c; @@ -211,7 +211,7 @@ struct TAdaptor_fog : public JStudio::TAdaptor_fog, public TAdaptor_object_ { JStage::TFog* get_pJSG_() { return (JStage::TFog*)pJSGObject_; } - static TVariableValueOutput_object_ saoVVOutput_[]; + static DUSK_GAME_DATA TVariableValueOutput_object_ saoVVOutput_[]; }; template @@ -285,7 +285,7 @@ struct TAdaptor_light : public JStudio::TAdaptor_light, public TAdaptor_object_ int field_0x11c; - static TVVOutput_direction_ saoVVOutput_direction_[6]; + static DUSK_GAME_DATA TVVOutput_direction_ saoVVOutput_direction_[6]; }; bool diff --git a/libs/JSystem/include/JSystem/JUtility/JUTConsole.h b/libs/JSystem/include/JSystem/JUtility/JUTConsole.h index 0f95feb2a1..1bc56f0d6d 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTConsole.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTConsole.h @@ -152,7 +152,7 @@ public: static JUTConsoleManager* const getManager() { return sManager; } - static JUTConsoleManager* sManager; + static DUSK_GAME_DATA JUTConsoleManager* sManager; #ifdef __MWERKS__ typedef JGadget::TLinkList ConsoleList; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTDbPrint.h b/libs/JSystem/include/JSystem/JUtility/JUTDbPrint.h index 14714df16e..67c7f8e89c 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTDbPrint.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTDbPrint.h @@ -40,7 +40,7 @@ public: void setCharColor(JUtility::TColor color) { mColor = color; }; - static JUTDbPrint* sDebugPrint; + static DUSK_GAME_DATA JUTDbPrint* sDebugPrint; private: /* 0x00 */ unk_print* mFirst; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTDirectPrint.h b/libs/JSystem/include/JSystem/JUtility/JUTDirectPrint.h index 14ed2c28b8..a1dd45efe2 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTDirectPrint.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTDirectPrint.h @@ -33,10 +33,10 @@ public: static JUTDirectPrint* getManager() { return sDirectPrint; } private: - static u8 sAsciiTable[128]; - static u32 sFontData[64]; - static u32 sFontData2[77]; - static JUTDirectPrint* sDirectPrint; + static DUSK_GAME_DATA u8 sAsciiTable[128]; + static DUSK_GAME_DATA u32 sFontData[64]; + static DUSK_GAME_DATA u32 sFontData2[77]; + static DUSK_GAME_DATA JUTDirectPrint* sDirectPrint; static u8 sDirectPrint_padding[4 /* padding */]; private: diff --git a/libs/JSystem/include/JSystem/JUtility/JUTException.h b/libs/JSystem/include/JSystem/JUtility/JUTException.h index 698a02ed44..b4504e68c0 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTException.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTException.h @@ -117,18 +117,18 @@ public: } private: - static OSMessageQueue sMessageQueue; - static const char* sCpuExpName[17]; - static JSUList sMapFileList; - static OSMessage sMessageBuffer[1]; - static JUTException* sErrorManager; - static JUTExceptionUserCallback sPreUserCallback; - static JUTExceptionUserCallback sPostUserCallback; - static void* sConsoleBuffer; - static u32 sConsoleBufferSize; - static JUTConsole* sConsole; - static u32 msr; - static u32 fpscr; + static DUSK_GAME_DATA OSMessageQueue sMessageQueue; + static DUSK_GAME_DATA const char* sCpuExpName[17]; + static DUSK_GAME_DATA JSUList sMapFileList; + static DUSK_GAME_DATA OSMessage sMessageBuffer[1]; + static DUSK_GAME_DATA JUTException* sErrorManager; + static DUSK_GAME_DATA JUTExceptionUserCallback sPreUserCallback; + static DUSK_GAME_DATA JUTExceptionUserCallback sPostUserCallback; + static DUSK_GAME_DATA void* sConsoleBuffer; + static DUSK_GAME_DATA u32 sConsoleBufferSize; + static DUSK_GAME_DATA JUTConsole* sConsole; + static DUSK_GAME_DATA u32 msr; + static DUSK_GAME_DATA u32 fpscr; private: /* 0x7C */ JUTExternalFB* mFrameMemory; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTGamePad.h b/libs/JSystem/include/JSystem/JUtility/JUTGamePad.h index 45e7227fe3..76e0780d9b 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTGamePad.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTGamePad.h @@ -151,21 +151,21 @@ public: struct C3ButtonReset { C3ButtonReset() { mReset = false; } - static u32 sResetPattern; - static u32 sResetMaskPattern; - static callbackFn sCallback; - static void* sCallbackArg; - static OSTime sThreshold; - static s32 sResetOccurredPort; - static bool sResetOccurred; - static bool sResetSwitchPushing; + static DUSK_GAME_DATA u32 sResetPattern; + static DUSK_GAME_DATA u32 sResetMaskPattern; + static DUSK_GAME_DATA callbackFn sCallback; + static DUSK_GAME_DATA void* sCallbackArg; + static DUSK_GAME_DATA OSTime sThreshold; + static DUSK_GAME_DATA s32 sResetOccurredPort; + static DUSK_GAME_DATA bool sResetOccurred; + static DUSK_GAME_DATA bool sResetSwitchPushing; /* 0x0 */ bool mReset; }; // Size: 0x4 struct CStick { - static f32 sPressPoint; - static f32 sReleasePoint; + static DUSK_GAME_DATA f32 sPressPoint; + static DUSK_GAME_DATA f32 sReleasePoint; CStick() { clear(); } void clear(); @@ -187,9 +187,9 @@ public: struct CRumble { CRumble(JUTGamePad* pad) { clear(pad); } - static u32 sChannelMask[4]; - static u8 mStatus[4]; - static u32 mEnabled; + static DUSK_GAME_DATA u32 sChannelMask[4]; + static DUSK_GAME_DATA u8 mStatus[4]; + static DUSK_GAME_DATA u32 mEnabled; enum ERumble { VAL_0 = 0, @@ -237,18 +237,18 @@ public: mRumble.startPatternedRumble(data, rumble, length); } - static JSUList mPadList; - static bool mListInitialized; - static PADStatus mPadStatus[4]; - static CButton mPadButton[4]; - static CStick mPadMStick[4]; - static CStick mPadSStick[4]; - static EStickMode sStickMode; - static int sClampMode; - static u8 mPadAssign[4]; - static u32 sSuppressPadReset; - static s32 sAnalogMode; - static u32 sRumbleSupported; + static DUSK_GAME_DATA JSUList mPadList; + static DUSK_GAME_DATA bool mListInitialized; + static DUSK_GAME_DATA PADStatus mPadStatus[4]; + static DUSK_GAME_DATA CButton mPadButton[4]; + static DUSK_GAME_DATA CStick mPadMStick[4]; + static DUSK_GAME_DATA CStick mPadSStick[4]; + static DUSK_GAME_DATA EStickMode sStickMode; + static DUSK_GAME_DATA int sClampMode; + static DUSK_GAME_DATA u8 mPadAssign[4]; + static DUSK_GAME_DATA u32 sSuppressPadReset; + static DUSK_GAME_DATA s32 sAnalogMode; + static DUSK_GAME_DATA u32 sRumbleSupported; /* 0x18 */ CButton mButton; /* 0x48 */ CStick mMainStick; @@ -273,7 +273,7 @@ public: * */ struct JUTGamePadLongPress { - static JSUList sPatternList; + static DUSK_GAME_DATA JSUList sPatternList; void checkCallback(int port, u32 hold_time); u32 getMaskPattern() const { return mMaskPattern; } diff --git a/libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h b/libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h index 3ea6d2ec97..ababb1b83d 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h @@ -32,8 +32,8 @@ public: #endif } - static JUTGraphFifo* sCurrentFifo; - static bool mGpStatus[5]; + static DUSK_GAME_DATA JUTGraphFifo* sCurrentFifo; + static DUSK_GAME_DATA bool mGpStatus[5]; private: /* 0x04 */ GXFifoObj* mFifo; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTProcBar.h b/libs/JSystem/include/JSystem/JUtility/JUTProcBar.h index c491641218..13f249213a 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTProcBar.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTProcBar.h @@ -102,7 +102,7 @@ public: static JUTProcBar* getManager() { return sManager; } - static JUTProcBar* sManager; + static DUSK_GAME_DATA JUTProcBar* sManager; private: /* 0x000 */ CTime mIdle; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTResFont.h b/libs/JSystem/include/JSystem/JUtility/JUTResFont.h index 29d8a77b92..a333cb9939 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTResFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTResFont.h @@ -64,7 +64,7 @@ public: } static const int suAboutEncoding_ = 3; - static IsLeadByte_func const saoAboutEncoding_[suAboutEncoding_]; + static DUSK_GAME_DATA IsLeadByte_func const saoAboutEncoding_[suAboutEncoding_]; // some types uncertain, may need to be fixed /* 0x1C */ int mWidth; @@ -95,7 +95,7 @@ public: #endif }; -extern u8 const JUTResFONT_Ascfont_fix12[]; +DUSK_GAME_EXTERN u8 const JUTResFONT_Ascfont_fix12[]; extern u8 const JUTResFONT_Ascfont_fix16[]; #endif /* JUTRESFONT_H */ diff --git a/libs/JSystem/include/JSystem/JUtility/JUTVideo.h b/libs/JSystem/include/JSystem/JUtility/JUTVideo.h index dfc6fd0b6c..6e6edecd19 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTVideo.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTVideo.h @@ -59,9 +59,9 @@ public: #endif private: - static JUTVideo* sManager; - static OSTick sVideoLastTick; - static OSTick sVideoInterval; + static DUSK_GAME_DATA JUTVideo* sManager; + static DUSK_GAME_DATA OSTick sVideoLastTick; + static DUSK_GAME_DATA OSTick sVideoInterval; private: /* 0x04 */ GXRenderModeObj* mRenderObj; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTXfb.h b/libs/JSystem/include/JSystem/JUtility/JUTXfb.h index acc48739fc..358f559b73 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTXfb.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTXfb.h @@ -71,7 +71,7 @@ public: static JUTXfb* getManager() { return sManager; } private: - static JUTXfb* sManager; + static DUSK_GAME_DATA JUTXfb* sManager; private: /* 0x00 */ u8* mBuffer[3]; diff --git a/libs/JSystem/src/J2DGraph/J2DPane.cpp b/libs/JSystem/src/J2DGraph/J2DPane.cpp index 3ba9b6e85c..55a1b27ae1 100644 --- a/libs/JSystem/src/J2DGraph/J2DPane.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPane.cpp @@ -424,7 +424,7 @@ void J2DPane::resize(f32 x, f32 y) { place(box); } -JGeometry::TBox2 J2DPane::static_mBounds(0, 0, 0, 0); +DUSK_GAME_DATA JGeometry::TBox2 J2DPane::static_mBounds(0, 0, 0, 0); JGeometry::TBox2& J2DPane::getBounds() { static_mBounds = mBounds; diff --git a/libs/JSystem/src/J2DGraph/J2DPrint.cpp b/libs/JSystem/src/J2DGraph/J2DPrint.cpp index 69d71aa6c5..ac6bfb7099 100644 --- a/libs/JSystem/src/J2DGraph/J2DPrint.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPrint.cpp @@ -7,11 +7,11 @@ #include #include -char* J2DPrint::mStrBuff; +DUSK_GAME_DATA char* J2DPrint::mStrBuff; static bool sStrBufInitialized; -size_t J2DPrint::mStrBuffSize; +DUSK_GAME_DATA size_t J2DPrint::mStrBuffSize; static u8 data_8045158C[4]; diff --git a/libs/JSystem/src/J2DGraph/J2DScreen.cpp b/libs/JSystem/src/J2DGraph/J2DScreen.cpp index c44859046d..603ab512f7 100644 --- a/libs/JSystem/src/J2DGraph/J2DScreen.cpp +++ b/libs/JSystem/src/J2DGraph/J2DScreen.cpp @@ -408,7 +408,7 @@ bool J2DScreen::isUsed(ResFONT const* p_font) { return J2DPane::isUsed(p_font); } -J2DDataManage* J2DScreen::mDataManage; +DUSK_GAME_DATA J2DDataManage* J2DScreen::mDataManage; void* J2DScreen::getNameResource(char const* resName) { void* res = JKRGetNameResource(resName, NULL); diff --git a/libs/JSystem/src/J2DGraph/J2DTevs.cpp b/libs/JSystem/src/J2DGraph/J2DTevs.cpp index 33a65dd273..bb49596d85 100644 --- a/libs/JSystem/src/J2DGraph/J2DTevs.cpp +++ b/libs/JSystem/src/J2DGraph/J2DTevs.cpp @@ -117,60 +117,60 @@ static void dummyVirtual(J2DMaterial* material) { block->getTevSwapModeTable(0); } -J2DTexCoordInfo const j2dDefaultTexCoordInfo[8] = { +DUSK_GAME_DATA J2DTexCoordInfo const j2dDefaultTexCoordInfo[8] = { {GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX1, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX2, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX3, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX4, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX5, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX6, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX7, GX_IDENTITY, 0}, }; -J2DTexMtxInfo const j2dDefaultTexMtxInfo = {1, 1, 255, 255, {0.5f, 0.5f, +DUSK_GAME_DATA J2DTexMtxInfo const j2dDefaultTexMtxInfo = {1, 1, 255, 255, {0.5f, 0.5f, 0.0f}, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f}; -J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo = {{0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, 1}; +DUSK_GAME_DATA J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo = {{0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, 1}; -J2DTevStageInfo const j2dDefaultTevStageInfo = { +DUSK_GAME_DATA J2DTevStageInfo const j2dDefaultTevStageInfo = { 4, GX_CC_RASC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_CPREV, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV, GX_CA_RASA, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV}; -const J2DIndTevStageInfo j2dDefaultIndTevStageInfo = { +DUSK_GAME_DATA const J2DIndTevStageInfo j2dDefaultIndTevStageInfo = { GX_INDTEXSTAGE0, GX_ITB_NONE, GX_ITB_NONE, GX_ITM_OFF, GX_ITW_OFF, GX_ITW_OFF, 0, 0, GX_ITBA_OFF, }; -const GXColor j2dDefaultColInfo = {255, 255, 255, 255}; +DUSK_GAME_DATA const GXColor j2dDefaultColInfo = {255, 255, 255, 255}; -const J2DTevOrderInfo j2dDefaultTevOrderInfoNull = { +DUSK_GAME_DATA const J2DTevOrderInfo j2dDefaultTevOrderInfoNull = { GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL, 0}; -const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull = { +DUSK_GAME_DATA const J2DIndTexOrderInfo j2dDefaultIndTexOrderNull = { GX_TEXCOORD_NULL, GX_TEXMAP_NULL, }; -const GXColorS10 j2dDefaultTevColor = {255, 255, 255, 255}; +DUSK_GAME_DATA const GXColorS10 j2dDefaultTevColor = {255, 255, 255, 255}; -const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo = { +DUSK_GAME_DATA const J2DIndTexCoordScaleInfo j2dDefaultIndTexCoordScaleInfo = { GX_ITS_1, GX_ITS_1, }; -const GXColor j2dDefaultTevKColor = {255, 255, 255, 255}; +DUSK_GAME_DATA const GXColor j2dDefaultTevKColor = {255, 255, 255, 255}; -const J2DTevSwapModeInfo j2dDefaultTevSwapMode = {GX_TEV_SWAP0, GX_TEV_SWAP0, 0, 0}; +DUSK_GAME_DATA const J2DTevSwapModeInfo j2dDefaultTevSwapMode = {GX_TEV_SWAP0, GX_TEV_SWAP0, 0, 0}; -const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable = { +DUSK_GAME_DATA const J2DTevSwapModeTableInfo j2dDefaultTevSwapModeTable = { GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA}; -const J2DBlendInfo j2dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, +DUSK_GAME_DATA const J2DBlendInfo j2dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP}; -const u8 j2dDefaultPEBlockDither = 0; +DUSK_GAME_DATA const u8 j2dDefaultPEBlockDither = 0; -const J2DColorChanInfo j2dDefaultColorChanInfo = {0, 3, 0, 0}; +DUSK_GAME_DATA const J2DColorChanInfo j2dDefaultColorChanInfo = {0, 3, 0, 0}; -const u8 j2dDefaultTevSwapTableID = 0x1B; +DUSK_GAME_DATA const u8 j2dDefaultTevSwapTableID = 0x1B; -const u16 j2dDefaultAlphaCmp = 0x00E7; +DUSK_GAME_DATA const u16 j2dDefaultAlphaCmp = 0x00E7; diff --git a/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp index 4091a3b7a1..a943940d84 100644 --- a/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp +++ b/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp @@ -22,9 +22,9 @@ void J3DMtxCalcJ3DSysInitMaya::init(Vec const& scale, Mtx const& mtx) { JMAMTXApplyScale(mtx, J3DSys::mCurrentMtx, scale.x, scale.y, scale.z); } -J3DMtxBuffer* J3DMtxCalc::mMtxBuffer; +DUSK_GAME_DATA J3DMtxBuffer* J3DMtxCalc::mMtxBuffer; -J3DJoint* J3DMtxCalc::mJoint; +DUSK_GAME_DATA J3DJoint* J3DMtxCalc::mJoint; void J3DMtxCalcCalcTransformBasic::calcTransform(J3DTransformInfo const& transInfo) { J3DJoint* joint = J3DMtxCalc::getJoint(); @@ -189,7 +189,7 @@ void J3DJoint::entryIn() { } } -J3DMtxCalc* J3DJoint::mCurrentMtxCalc; +DUSK_GAME_DATA J3DMtxCalc* J3DJoint::mCurrentMtxCalc; void J3DJoint::recursiveCalc() { J3DMtxCalc* prevMtxCalc = NULL; diff --git a/libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp index a1765acce4..a2c0a7f2d6 100644 --- a/libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp +++ b/libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp @@ -6,13 +6,13 @@ #include "JSystem/J3DGraphLoader/J3DModelLoader.h" #include "JSystem/JKernel/JKRHeap.h" -Mtx J3DMtxBuffer::sNoUseDrawMtx; +DUSK_GAME_DATA Mtx J3DMtxBuffer::sNoUseDrawMtx; -Mtx33 J3DMtxBuffer::sNoUseNrmMtx; +DUSK_GAME_DATA Mtx33 J3DMtxBuffer::sNoUseNrmMtx; -Mtx* J3DMtxBuffer::sNoUseDrawMtxPtr = &J3DMtxBuffer::sNoUseDrawMtx; +DUSK_GAME_DATA Mtx* J3DMtxBuffer::sNoUseDrawMtxPtr = &J3DMtxBuffer::sNoUseDrawMtx; -Mtx33* J3DMtxBuffer::sNoUseNrmMtxPtr = &J3DMtxBuffer::sNoUseNrmMtx; +DUSK_GAME_DATA Mtx33* J3DMtxBuffer::sNoUseNrmMtxPtr = &J3DMtxBuffer::sNoUseNrmMtx; // force .sdata2 order static f32 dummy1() { diff --git a/libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp index 76002c0a38..e262797a25 100644 --- a/libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp +++ b/libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp @@ -79,9 +79,9 @@ J3DSkinDeform::J3DSkinDeform() { mSkinNList = NULL; } -BE(u16)* J3DSkinDeform::sWorkArea_WEvlpMixMtx[1024]; +DUSK_GAME_DATA BE(u16)* J3DSkinDeform::sWorkArea_WEvlpMixMtx[1024]; -BE(f32)* J3DSkinDeform::sWorkArea_WEvlpMixWeight[1024]; +DUSK_GAME_DATA BE(f32)* J3DSkinDeform::sWorkArea_WEvlpMixWeight[1024]; void J3DSkinDeform::initSkinInfo(J3DModelData* pModelData) { J3D_ASSERT_NULLPTR(322, pModelData != NULL); @@ -194,7 +194,7 @@ void J3DSkinDeform::initSkinInfo(J3DModelData* pModelData) { } } -u16 J3DSkinDeform::sWorkArea_MtxReg[1024]; +DUSK_GAME_DATA u16 J3DSkinDeform::sWorkArea_MtxReg[1024]; int J3DSkinDeform::initMtxIndexArray(J3DModelData* pModelData) { J3D_ASSERT_NULLPTR(507, pModelData != NULL); diff --git a/libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp b/libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp index c533face96..40c523643e 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp @@ -205,17 +205,17 @@ int J3DDrawBuffer::entryImm(J3DPacket* pPacket, u16 index) { return 1; } -J3DDrawBuffer::sortFunc J3DDrawBuffer::sortFuncTable[6] = { +DUSK_GAME_DATA J3DDrawBuffer::sortFunc J3DDrawBuffer::sortFuncTable[6] = { &J3DDrawBuffer::entryMatSort, &J3DDrawBuffer::entryMatAnmSort, &J3DDrawBuffer::entryZSort, &J3DDrawBuffer::entryModelSort, &J3DDrawBuffer::entryInvalidSort, &J3DDrawBuffer::entryNonSort, }; -J3DDrawBuffer::drawFunc J3DDrawBuffer::drawFuncTable[2] = { +DUSK_GAME_DATA J3DDrawBuffer::drawFunc J3DDrawBuffer::drawFuncTable[2] = { &J3DDrawBuffer::drawHead, &J3DDrawBuffer::drawTail, }; -int J3DDrawBuffer::entryNum; +DUSK_GAME_DATA int J3DDrawBuffer::entryNum; void J3DDrawBuffer::draw() const { J3D_ASSERT_RANGE(411, mDrawMode < J3DDrawBufDrawMode_MAX); diff --git a/libs/JSystem/src/J3DGraphBase/J3DPacket.cpp b/libs/JSystem/src/J3DGraphBase/J3DPacket.cpp index 9e28a7f7cb..f87283df47 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DPacket.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DPacket.cpp @@ -68,9 +68,9 @@ void J3DDisplayListObj::callDL() const { GXCallDisplayList(mpDisplayList[0], mSize); } -GDLObj J3DDisplayListObj::sGDLObj; +DUSK_GAME_DATA GDLObj J3DDisplayListObj::sGDLObj; -s32 J3DDisplayListObj::sInterruptFlag; +DUSK_GAME_DATA s32 J3DDisplayListObj::sInterruptFlag; void J3DDisplayListObj::beginDL() { swapBuffer(); diff --git a/libs/JSystem/src/J3DGraphBase/J3DShape.cpp b/libs/JSystem/src/J3DGraphBase/J3DShape.cpp index 4b407d1e05..22eb76a533 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DShape.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DShape.cpp @@ -289,7 +289,7 @@ void J3DShape::makeVcdVatCmd() { OSRestoreInterrupts(sInterruptFlag); } -void* J3DShape::sOldVcdVatCmd; +DUSK_GAME_DATA void* J3DShape::sOldVcdVatCmd; void J3DShape::loadCurrentMtx() const { mCurrentMtx.load(); @@ -304,7 +304,7 @@ void J3DShape::loadPreDrawSetting() const { mCurrentMtx.load(); } -bool J3DShape::sEnvelopeFlag; +DUSK_GAME_DATA bool J3DShape::sEnvelopeFlag; void J3DShape::setArrayAndBindPipeline() const { J3DShapeMtx::setCurrentPipeline((mFlags & 0x1C) >> 2); diff --git a/libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp b/libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp index d9af135999..41d2e96ef0 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphBase/J3DTexture.h" #include "dusk/frame_interpolation.h" -u16 J3DShapeMtx::sMtxLoadCache[10]; +DUSK_GAME_DATA u16 J3DShapeMtx::sMtxLoadCache[10]; #ifdef TARGET_PC static void J3DFrameInterpConcat(MtxP lhs, MtxP rhs, Mtx out) { @@ -54,42 +54,42 @@ void J3DShapeMtx::loadMtxIndx_PNCPU(int slot, u16 indx) const { J3DFifoLoadNrmMtxImm(*j3dSys.getShapePacket()->getBaseMtxPtr(), slot * 3); } -J3DShapeMtx_LoadFunc J3DShapeMtx::sMtxLoadPipeline[4] = { +DUSK_GAME_DATA J3DShapeMtx_LoadFunc J3DShapeMtx::sMtxLoadPipeline[4] = { &J3DShapeMtx::loadMtxIndx_PNGP, &J3DShapeMtx::loadMtxIndx_PCPU, &J3DShapeMtx::loadMtxIndx_NCPU, &J3DShapeMtx::loadMtxIndx_PNCPU, }; -J3DShapeMtxConcatView_LoadFunc J3DShapeMtxConcatView::sMtxLoadPipeline[4] = { +DUSK_GAME_DATA J3DShapeMtxConcatView_LoadFunc J3DShapeMtxConcatView::sMtxLoadPipeline[4] = { &J3DShapeMtxConcatView::loadMtxConcatView_PNGP, &J3DShapeMtxConcatView::loadMtxConcatView_PCPU, &J3DShapeMtxConcatView::loadMtxConcatView_NCPU, &J3DShapeMtxConcatView::loadMtxConcatView_PNCPU, }; -J3DShapeMtxConcatView_LoadFunc J3DShapeMtxConcatView::sMtxLoadLODPipeline[4] = { +DUSK_GAME_DATA J3DShapeMtxConcatView_LoadFunc J3DShapeMtxConcatView::sMtxLoadLODPipeline[4] = { &J3DShapeMtxConcatView::loadMtxConcatView_PNGP_LOD, &J3DShapeMtxConcatView::loadMtxConcatView_PCPU, &J3DShapeMtxConcatView::loadMtxConcatView_NCPU, &J3DShapeMtxConcatView::loadMtxConcatView_PNCPU, }; -u32 J3DShapeMtx::sCurrentPipeline; +DUSK_GAME_DATA u32 J3DShapeMtx::sCurrentPipeline; -u8* J3DShapeMtx::sCurrentScaleFlag; +DUSK_GAME_DATA u8* J3DShapeMtx::sCurrentScaleFlag; -bool J3DShapeMtx::sNBTFlag; +DUSK_GAME_DATA bool J3DShapeMtx::sNBTFlag; -bool J3DShapeMtx::sLODFlag; +DUSK_GAME_DATA bool J3DShapeMtx::sLODFlag; -u32 J3DShapeMtx::sTexMtxLoadType; +DUSK_GAME_DATA u32 J3DShapeMtx::sTexMtxLoadType; -MtxP J3DShapeMtxConcatView::sMtxPtrTbl[2]; +DUSK_GAME_DATA MtxP J3DShapeMtxConcatView::sMtxPtrTbl[2]; -J3DTexGenBlock* J3DDifferedTexMtx::sTexGenBlock; +DUSK_GAME_DATA J3DTexGenBlock* J3DDifferedTexMtx::sTexGenBlock; -J3DTexMtxObj* J3DDifferedTexMtx::sTexMtxObj; +DUSK_GAME_DATA J3DTexMtxObj* J3DDifferedTexMtx::sTexMtxObj; void J3DDifferedTexMtx::loadExecute(f32 const (*param_0)[4]) { static Mtx qMtx = { diff --git a/libs/JSystem/src/J3DGraphBase/J3DSys.cpp b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp index b4598bfa7a..653b6e08f1 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DSys.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp @@ -8,15 +8,15 @@ #include "global.h" #include "tracy/Tracy.hpp" -J3DSys j3dSys; +DUSK_GAME_DATA J3DSys j3dSys; -Mtx J3DSys::mCurrentMtx; +DUSK_GAME_DATA Mtx J3DSys::mCurrentMtx; -Vec J3DSys::mCurrentS; +DUSK_GAME_DATA Vec J3DSys::mCurrentS; -Vec J3DSys::mParentS; +DUSK_GAME_DATA Vec J3DSys::mParentS; -J3DTexCoordScaleInfo J3DSys::sTexCoordScaleTable[8]; +DUSK_GAME_DATA J3DTexCoordScaleInfo J3DSys::sTexCoordScaleTable[8]; #if TARGET_PC // Original game bug, array is too small. static u8 NullTexData[0x20] ATTRIBUTE_ALIGN(32) = {0}; @@ -35,7 +35,7 @@ static Mtx23 IndMtx = { 0.0f, 0.5f, 0.0f, }; -u32 j3dDefaultViewNo; +DUSK_GAME_DATA u32 j3dDefaultViewNo; static GXColor ColorBlack = {0x00, 0x00, 0x00, 0x00}; diff --git a/libs/JSystem/src/J3DGraphBase/J3DTevs.cpp b/libs/JSystem/src/J3DGraphBase/J3DTevs.cpp index 719976770b..1bfb22e73e 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DTevs.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DTevs.cpp @@ -315,7 +315,7 @@ void loadNBTScale(J3DNBTScale& NBTScale) { } } -const J3DLightInfo j3dDefaultLightInfo = { +DUSK_GAME_DATA const J3DLightInfo j3dDefaultLightInfo = { 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0xff, 0xff, 0xff, 0xff, @@ -323,14 +323,14 @@ const J3DLightInfo j3dDefaultLightInfo = { 1.0f, 0.0f, 0.0f, }; -J3DTexCoordInfo const j3dDefaultTexCoordInfo[8] = { +DUSK_GAME_DATA J3DTexCoordInfo const j3dDefaultTexCoordInfo[8] = { {GX_MTX2x4, GX_TG_TEX0, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX1, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX2, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX3, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX4, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX5, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX6, GX_IDENTITY, 0}, {GX_MTX2x4, GX_TG_TEX7, GX_IDENTITY, 0}, }; -J3DTexMtxInfo const j3dDefaultTexMtxInfo = { +DUSK_GAME_DATA J3DTexMtxInfo const j3dDefaultTexMtxInfo = { 0x01, 0x00, 0xFF, @@ -341,27 +341,27 @@ J3DTexMtxInfo const j3dDefaultTexMtxInfo = { 1.0f}, }; -J3DIndTexMtxInfo const j3dDefaultIndTexMtxInfo = { +DUSK_GAME_DATA J3DIndTexMtxInfo const j3dDefaultIndTexMtxInfo = { 0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f, 1 }; -J3DTevStageInfo const j3dDefaultTevStageInfo = { +DUSK_GAME_DATA J3DTevStageInfo const j3dDefaultTevStageInfo = { 0x04, 0x0A, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, }; -J3DIndTevStageInfo const j3dDefaultIndTevStageInfo = { +DUSK_GAME_DATA J3DIndTevStageInfo const j3dDefaultIndTevStageInfo = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -J3DFogInfo const j3dDefaultFogInfo = { +DUSK_GAME_DATA J3DFogInfo const j3dDefaultFogInfo = { 0x00, 0x00, 0x0140, 0.0f, 0.0f, 0.1f, 10000.0f, 0xFF, 0xFF, 0xFF, 0x00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }; -J3DNBTScaleInfo const j3dDefaultNBTScaleInfo = { +DUSK_GAME_DATA J3DNBTScaleInfo const j3dDefaultNBTScaleInfo = { #if TARGET_PC 0x00, {1.0f, 1.0f, 1.0f}, #else @@ -399,9 +399,9 @@ void makeTexCoordTable() { } } -u8 j3dTevSwapTableTable[1024]; +DUSK_GAME_DATA u8 j3dTevSwapTableTable[1024]; -u8 j3dAlphaCmpTable[768]; +DUSK_GAME_DATA u8 j3dAlphaCmpTable[768]; void makeAlphaCmpTable() { u8* table = j3dAlphaCmpTable; @@ -417,7 +417,7 @@ void makeAlphaCmpTable() { } } -u8 j3dZModeTable[96]; +DUSK_GAME_DATA u8 j3dZModeTable[96]; void makeZModeTable() { u8* table = j3dZModeTable; @@ -495,44 +495,44 @@ static void J3DGDLoadPostTexMtxImm(f32 (*param_1)[4], u32 param_2) { J3DGDWrite_f32(param_1[2][3]); } -const GXColor j3dDefaultColInfo = {0xFF, 0xFF, 0xFF, 0xFF}; +DUSK_GAME_DATA const GXColor j3dDefaultColInfo = {0xFF, 0xFF, 0xFF, 0xFF}; -const GXColor j3dDefaultAmbInfo = {0x32, 0x32, 0x32, 0x32}; +DUSK_GAME_DATA const GXColor j3dDefaultAmbInfo = {0x32, 0x32, 0x32, 0x32}; -const u8 j3dDefaultNumChans = 1; +DUSK_GAME_DATA const u8 j3dDefaultNumChans = 1; -const J3DTevOrderInfo j3dDefaultTevOrderInfoNull = {0xFF, 0xFF, 0xFF, 0x00}; +DUSK_GAME_DATA const J3DTevOrderInfo j3dDefaultTevOrderInfoNull = {0xFF, 0xFF, 0xFF, 0x00}; -const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull = {0xFF, 0xFF, 0x00, 0x00}; +DUSK_GAME_DATA const J3DIndTexOrderInfo j3dDefaultIndTexOrderNull = {0xFF, 0xFF, 0x00, 0x00}; -const GXColorS10 j3dDefaultTevColor = {0xFF, 0xFF, 0xFF, 0xFF}; +DUSK_GAME_DATA const GXColorS10 j3dDefaultTevColor = {0xFF, 0xFF, 0xFF, 0xFF}; -const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo = { +DUSK_GAME_DATA const J3DIndTexCoordScaleInfo j3dDefaultIndTexCoordScaleInfo = { 0x00, 0x00, 0x00, 0x00, }; -const GXColor j3dDefaultTevKColor = {0xFF, 0xFF, 0xFF, 0xFF}; +DUSK_GAME_DATA const GXColor j3dDefaultTevKColor = {0xFF, 0xFF, 0xFF, 0xFF}; -J3DTevSwapModeInfo const j3dDefaultTevSwapMode = { +DUSK_GAME_DATA J3DTevSwapModeInfo const j3dDefaultTevSwapMode = { 0x00, 0x00, 0x00, 0x00, }; -const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable = {0x00, 0x01, 0x02, 0x03}; +DUSK_GAME_DATA const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable = {0x00, 0x01, 0x02, 0x03}; -const J3DBlendInfo j3dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP}; +DUSK_GAME_DATA const J3DBlendInfo j3dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP}; -const J3DColorChanInfo j3dDefaultColorChanInfo = { +DUSK_GAME_DATA const J3DColorChanInfo j3dDefaultColorChanInfo = { 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0xFF, 0xFF, }; -const u8 j3dDefaultTevSwapTableID = 0x1B; +DUSK_GAME_DATA const u8 j3dDefaultTevSwapTableID = 0x1B; -const u16 j3dDefaultAlphaCmpID = 0x00E7; +DUSK_GAME_DATA const u16 j3dDefaultAlphaCmpID = 0x00E7; -const u16 j3dDefaultZModeID = 0x0017; +DUSK_GAME_DATA const u16 j3dDefaultZModeID = 0x0017; diff --git a/libs/JSystem/src/J3DGraphBase/J3DTransform.cpp b/libs/JSystem/src/J3DGraphBase/J3DTransform.cpp index 44e0711337..5a7099e6dc 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DTransform.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DTransform.cpp @@ -74,12 +74,12 @@ void J3DCalcBBoardMtx(__REGISTER Mtx mtx) { mtx[2][2] = z; } -J3DTransformInfo const j3dDefaultTransformInfo = { +DUSK_GAME_DATA J3DTransformInfo const j3dDefaultTransformInfo = { {1.0f, 1.0f, 1.0f}, {0, 0, 0}, {0.0f, 0.0f, 0.0f}}; -Vec const j3dDefaultScale = {1.0f, 1.0f, 1.0f}; +DUSK_GAME_DATA Vec const j3dDefaultScale = {1.0f, 1.0f, 1.0f}; -Mtx const j3dDefaultMtx = { +DUSK_GAME_DATA Mtx const j3dDefaultMtx = { {1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}}; void J3DCalcYBBoardMtx(Mtx mtx) { @@ -610,7 +610,7 @@ void J3DPSMtxArrayConcat(Mtx mA, Mtx mB, Mtx mAB, u32 count) { } #endif // clang-format on -f32 const PSMulUnit01[] = { +DUSK_GAME_DATA f32 const PSMulUnit01[] = { 0.0f, -1.0f, }; diff --git a/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp b/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp index 71068a3591..6bd9bf225a 100644 --- a/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp +++ b/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp @@ -4,7 +4,7 @@ #include "dusk/string.hpp" -u32 JAHVirtualNode::smVirNodeNum; +DUSK_GAME_DATA u32 JAHVirtualNode::smVirNodeNum; void JAHVirtualNode::virtualMessage(JAHControl& control) { message(control); diff --git a/libs/JSystem/src/JAHostIO/JAHioMessage.cpp b/libs/JSystem/src/JAHostIO/JAHioMessage.cpp index bc0e26e211..a32c20962e 100644 --- a/libs/JSystem/src/JAHostIO/JAHioMessage.cpp +++ b/libs/JSystem/src/JAHostIO/JAHioMessage.cpp @@ -5,17 +5,17 @@ #include "JSystem/JAHostIO/JAHioUtil.h" #include "JSystem/JHostIO/JORMContext.h" -u16 JAHControl::smButtonWidth[] = {20, 50, 100, 150, 300, 600}; -u16 JAHControl::smCommentWidth[] = {20, 50, 100, 200, 400, 800}; -u16 JAHControl::smComboWidth[] = {50, 100, 150, 200, 300, 600}; -u16 JAHControl::smYTop = 5; -u16 JAHControl::smXLeft = 5; -u16 JAHControl::smIndentSize = 30; -u16 JAHControl::smLineHeight = 23; -u16 JAHControl::smContWidth = 450; -u16 JAHControl::smIntX = 2; -u16 JAHControl::smIntY = 5; -u16 JAHControl::smNameWidth = 150; +DUSK_GAME_DATA u16 JAHControl::smButtonWidth[] = {20, 50, 100, 150, 300, 600}; +DUSK_GAME_DATA u16 JAHControl::smCommentWidth[] = {20, 50, 100, 200, 400, 800}; +DUSK_GAME_DATA u16 JAHControl::smComboWidth[] = {50, 100, 150, 200, 300, 600}; +DUSK_GAME_DATA u16 JAHControl::smYTop = 5; +DUSK_GAME_DATA u16 JAHControl::smXLeft = 5; +DUSK_GAME_DATA u16 JAHControl::smIndentSize = 30; +DUSK_GAME_DATA u16 JAHControl::smLineHeight = 23; +DUSK_GAME_DATA u16 JAHControl::smContWidth = 450; +DUSK_GAME_DATA u16 JAHControl::smIntX = 2; +DUSK_GAME_DATA u16 JAHControl::smIntY = 5; +DUSK_GAME_DATA u16 JAHControl::smNameWidth = 150; void JAHControl::returnY(u16 param_1) { mY += u16(smIntY + smLineHeight * param_1); diff --git a/libs/JSystem/src/JAHostIO/JAHioMgr.cpp b/libs/JSystem/src/JAHostIO/JAHioMgr.cpp index 91b0a030e6..9b404b6bef 100644 --- a/libs/JSystem/src/JAHostIO/JAHioMgr.cpp +++ b/libs/JSystem/src/JAHostIO/JAHioMgr.cpp @@ -5,7 +5,7 @@ #include "JSystem/JHostIO/JORServer.h" template <> -JAHioMgr* JAHSingletonBase::sInstance = NULL; +DUSK_GAME_DATA JAHioMgr* JAHSingletonBase::sInstance = NULL; JAHioMgr::JAHioMgr() : field_0x4(0), field_0x8(0) {} diff --git a/libs/JSystem/src/JAHostIO/JAHioNode.cpp b/libs/JSystem/src/JAHostIO/JAHioNode.cpp index e6c342eeeb..d3b45a4b5d 100644 --- a/libs/JSystem/src/JAHostIO/JAHioNode.cpp +++ b/libs/JSystem/src/JAHostIO/JAHioNode.cpp @@ -8,7 +8,7 @@ #include "JSystem/JHostIO/JORServer.h" #include "dusk/string.hpp" -JAHioNode* JAHioNode::smCurrentNode; +DUSK_GAME_DATA JAHioNode* JAHioNode::smCurrentNode; JAHioNode::JAHioNode(const char* name) : mTree(this) { mLastChild = NULL; diff --git a/libs/JSystem/src/JAHostIO/JAHioUtil.cpp b/libs/JSystem/src/JAHostIO/JAHioUtil.cpp index 9a0fdf027a..6f1935744d 100644 --- a/libs/JSystem/src/JAHostIO/JAHioUtil.cpp +++ b/libs/JSystem/src/JAHostIO/JAHioUtil.cpp @@ -6,10 +6,10 @@ #include "JSystem/JAHostIO/JAHioUtil.h" #include "JSystem/JHostIO/JORFile.h" -char JAHioUtil::mStringBuffer[256]; +DUSK_GAME_DATA char JAHioUtil::mStringBuffer[256]; -JAHioNode* JAHUpdate::spNode; -JORMContext* JAHUpdate::spMc; +DUSK_GAME_DATA JAHioNode* JAHUpdate::spNode; +DUSK_GAME_DATA JORMContext* JAHUpdate::spMc; static char* dummy(JORDir* dir) { return std::strrchr(dir->getFilename(), '\n'); diff --git a/libs/JSystem/src/JAudio2/JASAiCtrl.cpp b/libs/JSystem/src/JAudio2/JASAiCtrl.cpp index 3764700149..545b0d41dc 100644 --- a/libs/JSystem/src/JAudio2/JASAiCtrl.cpp +++ b/libs/JSystem/src/JAudio2/JASAiCtrl.cpp @@ -20,33 +20,33 @@ #include "tracy/Tracy.hpp" -s16* JASDriver::sDmaDacBuffer[3]; +DUSK_GAME_DATA s16* JASDriver::sDmaDacBuffer[3]; static u8 data_804507A8 = 3; -s16** JASDriver::sDspDacBuffer; +DUSK_GAME_DATA s16** JASDriver::sDspDacBuffer; -s32 JASDriver::sDspDacWriteBuffer; +DUSK_GAME_DATA s32 JASDriver::sDspDacWriteBuffer; -s32 JASDriver::sDspDacReadBuffer; +DUSK_GAME_DATA s32 JASDriver::sDspDacReadBuffer; -s32 JASDriver::sDspStatus; +DUSK_GAME_DATA s32 JASDriver::sDspStatus; -JASDriver::DSPBufCallback JASDriver::sDspDacCallback; +DUSK_GAME_DATA JASDriver::DSPBufCallback JASDriver::sDspDacCallback; -s16* JASDriver::lastRspMadep; +DUSK_GAME_DATA s16* JASDriver::lastRspMadep; -void (*JASDriver::dacCallbackFunc)(s16*, u32); +DUSK_GAME_DATA void (*JASDriver::dacCallbackFunc)(s16*, u32); -JASDriver::MixCallback JASDriver::extMixCallback; +DUSK_GAME_DATA JASDriver::MixCallback JASDriver::extMixCallback; -u32 JASDriver::sOutputRate; +DUSK_GAME_DATA u32 JASDriver::sOutputRate; -JASMixMode JASDriver::sMixMode = MIX_MODE_EXTRA; +DUSK_GAME_DATA JASMixMode JASDriver::sMixMode = MIX_MODE_EXTRA; -f32 JASDriver::sDacRate = 32028.5f; +DUSK_GAME_DATA f32 JASDriver::sDacRate = 32028.5f; -u32 JASDriver::sSubFrames = 0x00000007; +DUSK_GAME_DATA u32 JASDriver::sSubFrames = 0x00000007; void JASDriver::initAI(void (*param_0)(void)) { setOutputRate(OUTPUT_RATE_0); @@ -114,14 +114,14 @@ void JASDriver::setOutputRate(JASOutputRate param_0) { #endif } -const JASDriver::MixFunc JASDriver::sMixFuncs[4] = { +DUSK_GAME_DATA const JASDriver::MixFunc JASDriver::sMixFuncs[4] = { mixMonoTrack, mixMonoTrackWide, mixExtraTrack, mixInterleaveTrack, }; -u32 JASDriver::sSubFrameCounter; +DUSK_GAME_DATA u32 JASDriver::sSubFrameCounter; void JASDriver::updateDac() { static u32 dacp = 0; @@ -227,7 +227,7 @@ void JASDriver::readDspBuffer(s16* param_0, u32 param_1) { JASCalc::imixcopy(endDacBuffer, dacBuffer, param_0, param_1); } -u32 sDspUpCount; +DUSK_GAME_DATA u32 sDspUpCount; void JASDriver::finishDSPFrame() { static u32 waitcount; diff --git a/libs/JSystem/src/JAudio2/JASAramStream.cpp b/libs/JSystem/src/JAudio2/JASAramStream.cpp index 64ddfc467e..6a15869a7c 100644 --- a/libs/JSystem/src/JAudio2/JASAramStream.cpp +++ b/libs/JSystem/src/JAudio2/JASAramStream.cpp @@ -12,16 +12,16 @@ #include "JSystem/JKernel/JKRSolidHeap.h" #include "JSystem/JSupport/JSupport.h" -JASTaskThread* JASAramStream::sLoadThread; +DUSK_GAME_DATA JASTaskThread* JASAramStream::sLoadThread; -u8* JASAramStream::sReadBuffer; +DUSK_GAME_DATA u8* JASAramStream::sReadBuffer; -u32 JASAramStream::sBlockSize; +DUSK_GAME_DATA u32 JASAramStream::sBlockSize; -u32 JASAramStream::sChannelMax; +DUSK_GAME_DATA u32 JASAramStream::sChannelMax; -bool dvdHasErrored; -bool hasErrored; +DUSK_GAME_DATA bool dvdHasErrored; +DUSK_GAME_DATA bool hasErrored; #define PAUSE_REQUESTED 1 #define PAUSE_DVD_ERROR 2 diff --git a/libs/JSystem/src/JAudio2/JASAudioThread.cpp b/libs/JSystem/src/JAudio2/JASAudioThread.cpp index fa476d1cb4..bd95337c44 100644 --- a/libs/JSystem/src/JAudio2/JASAudioThread.cpp +++ b/libs/JSystem/src/JAudio2/JASAudioThread.cpp @@ -41,7 +41,7 @@ void JASAudioThread::stop() { jamMessageBlock((void*)2); } -volatile int JASAudioThread::snIntCount; +DUSK_GAME_DATA volatile int JASAudioThread::snIntCount; class Lock { public: diff --git a/libs/JSystem/src/JAudio2/JASBNKParser.cpp b/libs/JSystem/src/JAudio2/JASBNKParser.cpp index 7898eedd48..ad8aa1ee46 100644 --- a/libs/JSystem/src/JAudio2/JASBNKParser.cpp +++ b/libs/JSystem/src/JAudio2/JASBNKParser.cpp @@ -13,7 +13,7 @@ JASBank* JASBNKParser::createBank(void const* stream, JKRHeap* heap) { return createBasicBank(stream, heap); } -u32 JASBNKParser::sUsedHeapSize; +DUSK_GAME_DATA u32 JASBNKParser::sUsedHeapSize; JASBasicBank* JASBNKParser::createBasicBank(void const* stream, JKRHeap* heap) { if (heap == NULL) { diff --git a/libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp b/libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp index 9170e59ed1..ac11742e6b 100644 --- a/libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp +++ b/libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp @@ -55,7 +55,7 @@ void JASBasicWaveBank::incWaveTable(JASBasicWaveBank::TWaveGroup const* param_0) } } -u32 JASBasicWaveBank::mNoLoad; +DUSK_GAME_DATA u32 JASBasicWaveBank::mNoLoad; void JASBasicWaveBank::decWaveTable(JASBasicWaveBank::TWaveGroup const* param_0) { JASMutexLock lock(&field_0x4); diff --git a/libs/JSystem/src/JAudio2/JASCalc.cpp b/libs/JSystem/src/JAudio2/JASCalc.cpp index 69369192fe..ba13c983e6 100644 --- a/libs/JSystem/src/JAudio2/JASCalc.cpp +++ b/libs/JSystem/src/JAudio2/JASCalc.cpp @@ -141,7 +141,7 @@ void JASCalc::bzero(void* dest, u32 size) { } #if AVOID_UB -s16 const JASCalc::CUTOFF_TO_IIR_TABLE[129][4] = { +DUSK_GAME_DATA s16 const JASCalc::CUTOFF_TO_IIR_TABLE[129][4] = { #else s16 const JASCalc::CUTOFF_TO_IIR_TABLE[128][4] = { #endif diff --git a/libs/JSystem/src/JAudio2/JASChannel.cpp b/libs/JSystem/src/JAudio2/JASChannel.cpp index 758167cc5c..a99c13ce63 100644 --- a/libs/JSystem/src/JAudio2/JASChannel.cpp +++ b/libs/JSystem/src/JAudio2/JASChannel.cpp @@ -12,13 +12,13 @@ #include "JSystem/JMath/JMATrigonometric.h" #include "JSystem/JGeometry.h" -OSMessageQueue JASChannel::sBankDisposeMsgQ; +DUSK_GAME_DATA OSMessageQueue JASChannel::sBankDisposeMsgQ; -OSMessage JASChannel::sBankDisposeMsg[16]; +DUSK_GAME_DATA OSMessage JASChannel::sBankDisposeMsg[16]; -OSMessage JASChannel::sBankDisposeList[16]; +DUSK_GAME_DATA OSMessage JASChannel::sBankDisposeList[16]; -int JASChannel::sBankDisposeListSize; +DUSK_GAME_DATA int JASChannel::sBankDisposeListSize; JASChannel::JASChannel(Callback i_callback, void* i_callbackData) : mStatus(STATUS_STOP), diff --git a/libs/JSystem/src/JAudio2/JASCmdStack.cpp b/libs/JSystem/src/JAudio2/JASCmdStack.cpp index beaeee492e..90c56150ce 100644 --- a/libs/JSystem/src/JAudio2/JASCmdStack.cpp +++ b/libs/JSystem/src/JAudio2/JASCmdStack.cpp @@ -8,9 +8,9 @@ #include "JSystem/JAudio2/JASCriticalSection.h" #include -JASPortCmd::TPortHead JASPortCmd::sCommandListOnce; +DUSK_GAME_DATA JASPortCmd::TPortHead JASPortCmd::sCommandListOnce; -JASPortCmd::TPortHead JASPortCmd::sCommandListStay; +DUSK_GAME_DATA JASPortCmd::TPortHead JASPortCmd::sCommandListStay; bool JASPortCmd::addPortCmdOnce() { JASCriticalSection cs; diff --git a/libs/JSystem/src/JAudio2/JASDSPChannel.cpp b/libs/JSystem/src/JAudio2/JASDSPChannel.cpp index 62c983248c..7c35ce8e94 100644 --- a/libs/JSystem/src/JAudio2/JASDSPChannel.cpp +++ b/libs/JSystem/src/JAudio2/JASDSPChannel.cpp @@ -4,7 +4,7 @@ #include "JSystem/JAudio2/JASHeapCtrl.h" #include "JSystem/JKernel/JKRSolidHeap.h" -JASDSPChannel* JASDSPChannel::sDspChannels; +DUSK_GAME_DATA JASDSPChannel* JASDSPChannel::sDspChannels; JASDSPChannel::JASDSPChannel() : mStatus(STATUS_INACTIVE), diff --git a/libs/JSystem/src/JAudio2/JASDSPInterface.cpp b/libs/JSystem/src/JAudio2/JASDSPInterface.cpp index 14a723e27d..554660f6dc 100644 --- a/libs/JSystem/src/JAudio2/JASDSPInterface.cpp +++ b/libs/JSystem/src/JAudio2/JASDSPInterface.cpp @@ -11,13 +11,13 @@ #include "JSystem/JKernel/JKRSolidHeap.h" #include -JASDsp::TChannel* JASDsp::CH_BUF; +DUSK_GAME_DATA JASDsp::TChannel* JASDsp::CH_BUF; -JASDsp::FxBuf* JASDsp::FX_BUF; +DUSK_GAME_DATA JASDsp::FxBuf* JASDsp::FX_BUF; -f32 JASDsp::sDSPVolume; +DUSK_GAME_DATA f32 JASDsp::sDSPVolume; -u16 JASDsp::SEND_TABLE[] = { +DUSK_GAME_DATA u16 JASDsp::SEND_TABLE[] = { 0x0D00, 0x0D60, 0x0DC8, @@ -32,10 +32,10 @@ u16 JASDsp::SEND_TABLE[] = { 0x0000, }; -u32 JASWaveInfo::one = 1; +DUSK_GAME_DATA u32 JASWaveInfo::one = 1; #if DEBUG -s32 JASDsp::dspMutex = 1; +DUSK_GAME_DATA s32 JASDsp::dspMutex = 1; #endif void JASDsp::boot(void (*param_0)(void*)) { @@ -99,14 +99,14 @@ void JASDsp::invalChannelAll() { DCInvalidateRange(CH_BUF, sizeof(TChannel) * DSP_CHANNELS); } -u8 const ATTRIBUTE_ALIGN(32) JASDsp::DSPADPCM_FILTER[64] = { +DUSK_GAME_DATA u8 const ATTRIBUTE_ALIGN(32) JASDsp::DSPADPCM_FILTER[64] = { 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x04, 0x00, 0x10, 0x00, 0xF8, 0x00, 0x0E, 0x00, 0xFA, 0x00, 0x0C, 0x00, 0xFC, 0x00, 0x12, 0x00, 0xF6, 0x00, 0x10, 0x68, 0xF7, 0x38, 0x12, 0xC0, 0xF7, 0x04, 0x14, 0x00, 0xF4, 0x00, 0x08, 0x00, 0xF8, 0x00, 0x04, 0x00, 0xFC, 0x00, 0xFC, 0x00, 0x04, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, }; -u32 const ATTRIBUTE_ALIGN(32) JASDsp::DSPRES_FILTER[320] = { +DUSK_GAME_DATA u32 const ATTRIBUTE_ALIGN(32) JASDsp::DSPRES_FILTER[320] = { 0x0C3966AD, 0x0D46FFDF, 0x0B396696, diff --git a/libs/JSystem/src/JAudio2/JASDriverIF.cpp b/libs/JSystem/src/JAudio2/JASDriverIF.cpp index 7d602a8856..87a88adca0 100644 --- a/libs/JSystem/src/JAudio2/JASDriverIF.cpp +++ b/libs/JSystem/src/JAudio2/JASDriverIF.cpp @@ -9,7 +9,7 @@ void JASDriver::setDSPLevel(f32 param_0) { JASDsp::setDSPMixerLevel(param_0); } -u16 JASDriver::MAX_MIXERLEVEL = 0x2EE0; +DUSK_GAME_DATA u16 JASDriver::MAX_MIXERLEVEL = 0x2EE0; u16 JASDriver::getChannelLevel_dsp() { return JASDriver::MAX_MIXERLEVEL; @@ -23,7 +23,7 @@ f32 JASDriver::getDSPLevel() { return JASDsp::getDSPMixerLevel(); } -u32 JASDriver::JAS_SYSTEM_OUTPUT_MODE = JAS_OUTPUT_STEREO; +DUSK_GAME_DATA u32 JASDriver::JAS_SYSTEM_OUTPUT_MODE = JAS_OUTPUT_STEREO; void JASDriver::setOutputMode(u32 mode) { JAS_SYSTEM_OUTPUT_MODE = mode; @@ -40,11 +40,11 @@ void JASDriver::waitSubFrame() { } while (r31 == getSubFrameCounter()); } -JASCallbackMgr JASDriver::sDspSyncCallback; +DUSK_GAME_DATA JASCallbackMgr JASDriver::sDspSyncCallback; -JASCallbackMgr JASDriver::sSubFrameCallback; +DUSK_GAME_DATA JASCallbackMgr JASDriver::sSubFrameCallback; -JASCallbackMgr JASDriver::sUpdateDacCallback; +DUSK_GAME_DATA JASCallbackMgr JASDriver::sUpdateDacCallback; int JASDriver::rejectCallback(DriverCallback callback, void* param_1) { int r31 = sDspSyncCallback.reject(callback, param_1); diff --git a/libs/JSystem/src/JAudio2/JASDvdThread.cpp b/libs/JSystem/src/JAudio2/JASDvdThread.cpp index 31a313a8b1..dfa85d3166 100644 --- a/libs/JSystem/src/JAudio2/JASDvdThread.cpp +++ b/libs/JSystem/src/JAudio2/JASDvdThread.cpp @@ -4,7 +4,7 @@ #include "JSystem/JAudio2/JASTaskThread.h" #include "JSystem/JKernel/JKRSolidHeap.h" -JASTaskThread* JASDvd::sThread; +DUSK_GAME_DATA JASTaskThread* JASDvd::sThread; JASTaskThread* JASDvd::getThreadPointer() { return JASDvd::sThread; diff --git a/libs/JSystem/src/JAudio2/JASHeapCtrl.cpp b/libs/JSystem/src/JAudio2/JASHeapCtrl.cpp index e3722e3726..ef2d26256a 100644 --- a/libs/JSystem/src/JAudio2/JASHeapCtrl.cpp +++ b/libs/JSystem/src/JAudio2/JASHeapCtrl.cpp @@ -247,7 +247,7 @@ JASGenericMemPool::~JASGenericMemPool() { } } -JKRSolidHeap* JASDram; +DUSK_GAME_DATA JKRSolidHeap* JASDram; // TODO: What is this and Where does it go? struct TNextOnFreeList { @@ -290,11 +290,11 @@ void JASGenericMemPool::free(void* ptr, u32 param_1) { freeMemCount++; } -uintptr_t JASKernel::sAramBase; +DUSK_GAME_DATA uintptr_t JASKernel::sAramBase; -JKRHeap* JASKernel::sSystemHeap; +DUSK_GAME_DATA JKRHeap* JASKernel::sSystemHeap; -JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* JASKernel::sCommandHeap; +DUSK_GAME_DATA JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* JASKernel::sCommandHeap; void JASKernel::setupRootHeap(JKRSolidHeap* heap, u32 size) { JUT_ASSERT(784, heap); @@ -314,7 +314,7 @@ JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* JASKernel::getCom return JASKernel::sCommandHeap; } -JASHeap JASKernel::audioAramHeap; +DUSK_GAME_DATA JASHeap JASKernel::audioAramHeap; void JASKernel::setupAramHeap(uintptr_t param_0, u32 param_1) { #if !PLATFORM_GCN diff --git a/libs/JSystem/src/JAudio2/JASLfo.cpp b/libs/JSystem/src/JAudio2/JASLfo.cpp index d369072a15..4a9af0c3c9 100644 --- a/libs/JSystem/src/JAudio2/JASLfo.cpp +++ b/libs/JSystem/src/JAudio2/JASLfo.cpp @@ -40,7 +40,7 @@ void JASLfo::incCounter(f32 param_0) { } } -JASLfo JASLfo::sFreeRunLfo; +DUSK_GAME_DATA JASLfo JASLfo::sFreeRunLfo; void JASLfo::resetCounter() { field_0x16 = mDelay; diff --git a/libs/JSystem/src/JAudio2/JASOscillator.cpp b/libs/JSystem/src/JAudio2/JASOscillator.cpp index f4bf2ade6f..666b2dd439 100644 --- a/libs/JSystem/src/JAudio2/JASOscillator.cpp +++ b/libs/JSystem/src/JAudio2/JASOscillator.cpp @@ -131,25 +131,25 @@ void JASOscillator::update() { updateCurrentValue(psVar1[mCurPoint].mTime); } -f32 const JASOscillator::sCurveTableLinear[17] = { +DUSK_GAME_DATA f32 const JASOscillator::sCurveTableLinear[17] = { 1.0, 0.9375, 0.875, 0.8125, 0.75, 0.6875, 0.625, 0.5625, 0.5, 0.4375, 0.375, 0.3125, 0.25, 0.1875, 0.125, 0.0625, 0.0, }; -f32 const JASOscillator::sCurveTableSampleCell[17] = { +DUSK_GAME_DATA f32 const JASOscillator::sCurveTableSampleCell[17] = { 1.0, 0.9704890251159668, 0.7812740206718445, 0.5462809801101685, 0.39979198575019836, 0.28931498527526855, 0.21210399270057678, 0.15747599303722382, 0.1126129999756813, 0.08178959786891937, 0.057985201478004456, 0.04364150017499924, 0.03082370012998581, 0.023712899535894394, 0.015259300358593464, 0.00915555004030466, 0.0 }; -f32 const JASOscillator::sCurveTableSqRoot[17] = { +DUSK_GAME_DATA f32 const JASOscillator::sCurveTableSqRoot[17] = { 1.0, 0.8789060115814209, 0.765625, 0.6601560115814209, 0.5625, 0.4726560115814209, 0.390625, 0.3164060115814209, 0.25, 0.1914059966802597, 0.140625, 0.09765619784593582, 0.0625, 0.03515620157122612, 0.015625, 0.00390625, 0.0 }; -f32 const JASOscillator::sCurveTableSquare[17] = { +DUSK_GAME_DATA f32 const JASOscillator::sCurveTableSquare[17] = { 1.0, 0.9682459831237793, 0.9354140162467957, 0.9013879895210266, 0.8660249710083008, 0.8291559815406799, 0.790569007396698, 0.75, 0.7071070075035095, 0.66143798828125, 0.6123719811439514, 0.55901700258255, 0.5, 0.433012992143631, 0.35355299711227417, 0.25, 0.0, diff --git a/libs/JSystem/src/JAudio2/JASProbe.cpp b/libs/JSystem/src/JAudio2/JASProbe.cpp index 55a63e67c8..70e930c2bb 100644 --- a/libs/JSystem/src/JAudio2/JASProbe.cpp +++ b/libs/JSystem/src/JAudio2/JASProbe.cpp @@ -26,7 +26,7 @@ void JASProbe::stop() { _1A8++; } -JASProbe* JASProbe::sProbeTable[16]; +DUSK_GAME_DATA JASProbe* JASProbe::sProbeTable[16]; void JASProbe::start(s32 index, char const* name) { JASProbe* probe; diff --git a/libs/JSystem/src/JAudio2/JASSeqCtrl.cpp b/libs/JSystem/src/JAudio2/JASSeqCtrl.cpp index a4e4a4b441..d9fe9d6698 100644 --- a/libs/JSystem/src/JAudio2/JASSeqCtrl.cpp +++ b/libs/JSystem/src/JAudio2/JASSeqCtrl.cpp @@ -4,7 +4,7 @@ #include "JSystem/JAudio2/JASSeqParser.h" #include "JSystem/JAudio2/JASTrack.h" -JASSeqParser JASSeqCtrl::sDefaultParser; +DUSK_GAME_DATA JASSeqParser JASSeqCtrl::sDefaultParser; JASSeqCtrl::JASSeqCtrl() { field_0x3c = &sDefaultParser; diff --git a/libs/JSystem/src/JAudio2/JASSeqParser.cpp b/libs/JSystem/src/JAudio2/JASSeqParser.cpp index b2077ce499..92288cbc4e 100644 --- a/libs/JSystem/src/JAudio2/JASSeqParser.cpp +++ b/libs/JSystem/src/JAudio2/JASSeqParser.cpp @@ -9,7 +9,7 @@ #include "JSystem/JUtility/JUTAssert.h" -JASSeqParser::CmdInfo JASSeqParser::sCmdInfo[96] = { +DUSK_GAME_DATA JASSeqParser::CmdInfo JASSeqParser::sCmdInfo[96] = { NULL, 0x0000, 0x0000, NULL, 0x0000, 0x0000, NULL, 0x0000, 0x0000, @@ -108,7 +108,7 @@ JASSeqParser::CmdInfo JASSeqParser::sCmdInfo[96] = { &JASSeqParser::cmdFinish, 0x0000, 0x0000, }; -JASSeqParser::CmdInfo JASSeqParser::sExtCmdInfo[255] = { +DUSK_GAME_DATA JASSeqParser::CmdInfo JASSeqParser::sExtCmdInfo[255] = { NULL, 0x0000, 0x0000, &JASSeqParser::cmdDump, 0x0000, 0x0000, NULL, 0x0000, 0x0000, @@ -589,7 +589,7 @@ s32 JASSeqParser::cmdIntTimer(JASTrack* param_0, u32* param_1) { return 0; } -u16 (*JASSeqParser::sCallBackFunc)(JASTrack*, u16); +DUSK_GAME_DATA u16 (*JASSeqParser::sCallBackFunc)(JASTrack*, u16); s32 JASSeqParser::cmdSyncCPU(JASTrack* param_0, u32* param_1) { u16 r31 = 0xffff; diff --git a/libs/JSystem/src/JAudio2/JASTrack.cpp b/libs/JSystem/src/JAudio2/JASTrack.cpp index 68fbee63e5..4b1a7ba7aa 100644 --- a/libs/JSystem/src/JAudio2/JASTrack.cpp +++ b/libs/JSystem/src/JAudio2/JASTrack.cpp @@ -15,9 +15,9 @@ JASTrack::JASTrack() : mDefaultChannelMgr(this), mChannelMgrCount(1), mStatus(0) init(); } -JASDefaultBankTable JASTrack::sDefaultBankTable; +DUSK_GAME_DATA JASDefaultBankTable JASTrack::sDefaultBankTable; -JASTrack::TList JASTrack::sTrackList; +DUSK_GAME_DATA JASTrack::TList JASTrack::sTrackList; // NONMATCHING JASPoolAllocObject_MultiThreaded<_> locations JASTrack::~JASTrack() { @@ -50,16 +50,16 @@ void JASTrack::setChannelMgrCount(u32 count) { } } -JASOscillator::Point const JASTrack::sAdsTable[4] = { +DUSK_GAME_DATA JASOscillator::Point const JASTrack::sAdsTable[4] = { {0, 0, 0x7fff}, {0, 0, 0x7fff}, {0, 0, 0}, {0xe, 0, 0}, }; -JASOscillator::Data const JASTrack::sEnvOsc = {0, 1.0f, NULL, NULL, 1.0f, 0.0f}; +DUSK_GAME_DATA JASOscillator::Data const JASTrack::sEnvOsc = {0, 1.0f, NULL, NULL, 1.0f, 0.0f}; -JASOscillator::Data const JASTrack::sPitchEnvOsc = {1, 1.0f, NULL, NULL, 1.0f, 0.0f}; +DUSK_GAME_DATA JASOscillator::Data const JASTrack::sPitchEnvOsc = {1, 1.0f, NULL, NULL, 1.0f, 0.0f}; // NONMATCHING JASPoolAllocObject_MultiThreaded<_> locations void JASTrack::init() { @@ -552,7 +552,7 @@ void JASTrack::setOscAdsr(s16 param_0, s16 param_1, s16 param_2, s16 param_3, u1 mDirectRelease = i_directRelease; } -const u32 JASDsp::FILTER_MODE_IIR = 0x00000020; +DUSK_GAME_DATA const u32 JASDsp::FILTER_MODE_IIR = 0x00000020; void JASTrack::setFIR(s16 const* i_FIR) { for (int i = 0; i < 8; i++) { diff --git a/libs/JSystem/src/JAudio2/JASVoiceBank.cpp b/libs/JSystem/src/JAudio2/JASVoiceBank.cpp index f69616a3af..0d3cd3adb2 100644 --- a/libs/JSystem/src/JAudio2/JASVoiceBank.cpp +++ b/libs/JSystem/src/JAudio2/JASVoiceBank.cpp @@ -3,11 +3,11 @@ #include "JSystem/JAudio2/JASVoiceBank.h" #include "JSystem/JAudio2/JASBasicInst.h" -const JASOscillator::Data JASVoiceBank::sOscData = { +DUSK_GAME_DATA const JASOscillator::Data JASVoiceBank::sOscData = { 0, 1.0f, NULL, NULL, 1.0f, 0.0f, }; -JASOscillator::Data* JASVoiceBank::sOscTable; +DUSK_GAME_DATA JASOscillator::Data* JASVoiceBank::sOscTable; bool JASVoiceBank::getInstParam(int param_0, int param_1, int param_2, JASInstParam* param_3) const { diff --git a/libs/JSystem/src/JAudio2/JASWSParser.cpp b/libs/JSystem/src/JAudio2/JASWSParser.cpp index 4288377548..519eaa3307 100644 --- a/libs/JSystem/src/JAudio2/JASWSParser.cpp +++ b/libs/JSystem/src/JAudio2/JASWSParser.cpp @@ -21,7 +21,7 @@ JASWaveBank* JASWSParser::createWaveBank(void const* stream, JKRHeap* heap) { } } -u32 JASWSParser::sUsedHeapSize; +DUSK_GAME_DATA u32 JASWSParser::sUsedHeapSize; JASBasicWaveBank* JASWSParser::createBasicWaveBank(void const* stream, JKRHeap* heap) { if (heap == NULL) { diff --git a/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp b/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp index 41ad35380d..3848a64d3c 100644 --- a/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp +++ b/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp @@ -11,7 +11,7 @@ #include "dusk/string.hpp" -JASHeap* JASWaveArcLoader::sAramHeap; +DUSK_GAME_DATA JASHeap* JASWaveArcLoader::sAramHeap; JASHeap* JASWaveArcLoader::getRootHeap() { if (JASWaveArcLoader::sAramHeap) { @@ -20,7 +20,7 @@ JASHeap* JASWaveArcLoader::getRootHeap() { return JASKernel::getAramHeap(); } -char JASWaveArcLoader::sCurrentDir[DIR_MAX] = "/AudioRes/Waves/"; +DUSK_GAME_DATA char JASWaveArcLoader::sCurrentDir[DIR_MAX] = "/AudioRes/Waves/"; void JASWaveArcLoader::setCurrentDir(char const* dir) { JUT_ASSERT(40, std::strlen(dir) < DIR_MAX - 1); diff --git a/libs/JSystem/src/JAudio2/osdsp_task.cpp b/libs/JSystem/src/JAudio2/osdsp_task.cpp index 7ec8f3f855..c7d24eaca8 100644 --- a/libs/JSystem/src/JAudio2/osdsp_task.cpp +++ b/libs/JSystem/src/JAudio2/osdsp_task.cpp @@ -5,8 +5,8 @@ #include #include -extern DSPTaskInfo* __DSP_first_task; -extern DSPTaskInfo* __DSP_curr_task; +DUSK_GAME_EXTERN DSPTaskInfo* __DSP_first_task; +DUSK_GAME_EXTERN DSPTaskInfo* __DSP_curr_task; extern "C" void __DSP_exec_task(DSPTaskInfo*, DSPTaskInfo*); extern "C" void __DSP_remove_task(DSPTaskInfo* task); diff --git a/libs/JSystem/src/JFramework/JFWDisplay.cpp b/libs/JSystem/src/JFramework/JFWDisplay.cpp index 2d4c9c7126..aef89f309b 100644 --- a/libs/JSystem/src/JFramework/JFWDisplay.cpp +++ b/libs/JSystem/src/JFramework/JFWDisplay.cpp @@ -65,7 +65,7 @@ JFWDisplay::~JFWDisplay() { mXfbManager = NULL; } -JFWDisplay* JFWDisplay::sManager; +DUSK_GAME_DATA JFWDisplay* JFWDisplay::sManager; JFWDisplay* JFWDisplay::createManager(GXRenderModeObj const* p_rObj, JKRHeap* p_heap, JUTXfb::EXfbNumber xfb_num, bool enableAlpha) { @@ -428,7 +428,7 @@ static void waitForTick(u32 p1, u16 p2) { } } -JSUList JFWAlarm::sList(false); +DUSK_GAME_DATA JSUList JFWAlarm::sList(false); static void JFWThreadAlarmHandler(OSAlarm* p_alarm, OSContext* p_ctx) { JFWAlarm* alarm = static_cast(p_alarm); alarm->removeLink(); diff --git a/libs/JSystem/src/JFramework/JFWSystem.cpp b/libs/JSystem/src/JFramework/JFWSystem.cpp index d6322f34c9..e0f9f58ef6 100644 --- a/libs/JSystem/src/JFramework/JFWSystem.cpp +++ b/libs/JSystem/src/JFramework/JFWSystem.cpp @@ -13,32 +13,32 @@ #include "JSystem/JUtility/JUTResFont.h" #include "JSystem/JUtility/JUTDbPrint.h" -s32 JFWSystem::CSetUpParam::maxStdHeaps = 2; +DUSK_GAME_DATA s32 JFWSystem::CSetUpParam::maxStdHeaps = 2; -u32 JFWSystem::CSetUpParam::sysHeapSize = 0x400000; +DUSK_GAME_DATA u32 JFWSystem::CSetUpParam::sysHeapSize = 0x400000; -JKRExpHeap* JFWSystem::rootHeap; +DUSK_GAME_DATA JKRExpHeap* JFWSystem::rootHeap; -JKRExpHeap* JFWSystem::systemHeap; +DUSK_GAME_DATA JKRExpHeap* JFWSystem::systemHeap; -u32 JFWSystem::CSetUpParam::fifoBufSize = 0x40000; +DUSK_GAME_DATA u32 JFWSystem::CSetUpParam::fifoBufSize = 0x40000; -u32 JFWSystem::CSetUpParam::aramAudioBufSize = 0x800000; +DUSK_GAME_DATA u32 JFWSystem::CSetUpParam::aramAudioBufSize = 0x800000; -u32 JFWSystem::CSetUpParam::aramGraphBufSize = 0x600000; +DUSK_GAME_DATA u32 JFWSystem::CSetUpParam::aramGraphBufSize = 0x600000; -s32 JFWSystem::CSetUpParam::streamPriority = 8; +DUSK_GAME_DATA s32 JFWSystem::CSetUpParam::streamPriority = 8; -s32 JFWSystem::CSetUpParam::decompPriority = 7; +DUSK_GAME_DATA s32 JFWSystem::CSetUpParam::decompPriority = 7; -s32 JFWSystem::CSetUpParam::aPiecePriority = 6; +DUSK_GAME_DATA s32 JFWSystem::CSetUpParam::aPiecePriority = 6; -ResFONT* JFWSystem::CSetUpParam::systemFontRes = (ResFONT*)&JUTResFONT_Ascfont_fix12; +DUSK_GAME_DATA ResFONT* JFWSystem::CSetUpParam::systemFontRes = (ResFONT*)&JUTResFONT_Ascfont_fix12; -const GXRenderModeObj* JFWSystem::CSetUpParam::renderMode = &GXNtsc480IntDf; +DUSK_GAME_DATA const GXRenderModeObj* JFWSystem::CSetUpParam::renderMode = &GXNtsc480IntDf; -u32 JFWSystem::CSetUpParam::exConsoleBufferSize = 0x24FC; +DUSK_GAME_DATA u32 JFWSystem::CSetUpParam::exConsoleBufferSize = 0x24FC; void JFWSystem::firstInit() { JUT_ASSERT(80, rootHeap == NULL); @@ -49,17 +49,17 @@ void JFWSystem::firstInit() { JKRHEAP_NAME(systemHeap, "System"); } -JKRThread* JFWSystem::mainThread; +DUSK_GAME_DATA JKRThread* JFWSystem::mainThread; -JUTDbPrint* JFWSystem::debugPrint; +DUSK_GAME_DATA JUTDbPrint* JFWSystem::debugPrint; -JUTResFont* JFWSystem::systemFont; +DUSK_GAME_DATA JUTResFont* JFWSystem::systemFont; -JUTConsoleManager* JFWSystem::systemConsoleManager; +DUSK_GAME_DATA JUTConsoleManager* JFWSystem::systemConsoleManager; -JUTConsole* JFWSystem::systemConsole; +DUSK_GAME_DATA JUTConsole* JFWSystem::systemConsole; -bool JFWSystem::sInitCalled = false; +DUSK_GAME_DATA bool JFWSystem::sInitCalled = false; void JFWSystem::init() { JUT_ASSERT(101, sInitCalled == false); diff --git a/libs/JSystem/src/JHostIO/JHIMccBuf.cpp b/libs/JSystem/src/JHostIO/JHIMccBuf.cpp index 363eb23dd8..1f9df6be7b 100644 --- a/libs/JSystem/src/JHostIO/JHIMccBuf.cpp +++ b/libs/JSystem/src/JHostIO/JHIMccBuf.cpp @@ -14,8 +14,8 @@ void JHIReport(const char* fmt, ...) {} void JHIHalt(const char* fmt, ...) {} -u8* JHIMccBuf::mTempBuf; -u16 JHIMccBuf::mRefCount; +DUSK_GAME_DATA u8* JHIMccBuf::mTempBuf; +DUSK_GAME_DATA u16 JHIMccBuf::mRefCount; JHIMccBuf::JHIMccBuf(u16 channel, u16 param_1, u32 param_2) { initInstance(channel, param_1, param_2); diff --git a/libs/JSystem/src/JHostIO/JHIRMcc.cpp b/libs/JSystem/src/JHostIO/JHIRMcc.cpp index fc1b295181..f3892f6520 100644 --- a/libs/JSystem/src/JHostIO/JHIRMcc.cpp +++ b/libs/JSystem/src/JHostIO/JHIRMcc.cpp @@ -7,14 +7,14 @@ #include #endif -HIO2DeviceType gExiDevice = HIO2_DEVICE_INVALID; -u8 data_8074bd04 = 1; +DUSK_GAME_DATA HIO2DeviceType gExiDevice = HIO2_DEVICE_INVALID; +DUSK_GAME_DATA u8 data_8074bd04 = 1; -s32 ghHIO2; -JHIMccContext tContext_old; -JHIMccContext tContext_new; -bool data_8074d138; -u8 data_8074d139; +DUSK_GAME_DATA s32 ghHIO2; +DUSK_GAME_DATA JHIMccContext tContext_old; +DUSK_GAME_DATA JHIMccContext tContext_new; +DUSK_GAME_DATA bool data_8074d138; +DUSK_GAME_DATA u8 data_8074d139; BOOL JHIhio2CallbackEnum(HIO2DeviceType type) { gExiDevice = type; diff --git a/libs/JSystem/src/JHostIO/JHIhioASync.cpp b/libs/JSystem/src/JHostIO/JHIhioASync.cpp index b423c366fe..a25e5bd136 100644 --- a/libs/JSystem/src/JHostIO/JHIhioASync.cpp +++ b/libs/JSystem/src/JHostIO/JHIhioASync.cpp @@ -9,16 +9,16 @@ #endif #include "global.h" -u32 gsEnableHostio; -u32 gsEnableInterface; -u32 gsDataToRead; +DUSK_GAME_DATA u32 gsEnableHostio; +DUSK_GAME_DATA u32 gsEnableInterface; +DUSK_GAME_DATA u32 gsDataToRead; -u8* gsReadBuf; -u8* gsWriteBuf; -JHICommBufReader* gsJHIrecvBuf; -JHICommBufWriter* gsJHIsendBuf; +DUSK_GAME_DATA u8* gsReadBuf; +DUSK_GAME_DATA u8* gsWriteBuf; +DUSK_GAME_DATA JHICommBufReader* gsJHIrecvBuf; +DUSK_GAME_DATA JHICommBufWriter* gsJHIsendBuf; -JHIMccContext gMccContext; +DUSK_GAME_DATA JHIMccContext gMccContext; BOOL JHIInit(u32 enabled) { gsEnableHostio = enabled; diff --git a/libs/JSystem/src/JHostIO/JORServer.cpp b/libs/JSystem/src/JHostIO/JORServer.cpp index 62086b259c..cabcf10bb3 100644 --- a/libs/JSystem/src/JHostIO/JORServer.cpp +++ b/libs/JSystem/src/JHostIO/JORServer.cpp @@ -113,7 +113,7 @@ void JORReflexible::listenPropertyEvent(const JORPropertyEvent* pEvent) { } #endif -JORServer* JORServer::instance; +DUSK_GAME_DATA JORServer* JORServer::instance; JORServer* JORServer::create() { if (instance == NULL) { diff --git a/libs/JSystem/src/JKernel/JKRAram.cpp b/libs/JSystem/src/JKernel/JKRAram.cpp index 2770328afa..98829765bc 100644 --- a/libs/JSystem/src/JKernel/JKRAram.cpp +++ b/libs/JSystem/src/JKernel/JKRAram.cpp @@ -27,7 +27,7 @@ static int JKRDecompressFromAramToMainRam(u32 src, void* dst, u32 srcLength, u32 u32 offset, u32* resourceSize); int decompSZS_subroutine(u8* src, u8* dest); -JKRAram* JKRAram::sAramObject; +DUSK_GAME_DATA JKRAram* JKRAram::sAramObject; JKRAram* JKRAram::create(u32 aram_audio_buffer_size, u32 aram_audio_graph_size, s32 stream_priority, s32 decomp_priority, s32 piece_priority) { @@ -48,14 +48,14 @@ void JKRAram::destroy() { } #endif -OSMessage JKRAram::sMessageBuffer[4] = { +DUSK_GAME_DATA OSMessage JKRAram::sMessageBuffer[4] = { NULL, NULL, NULL, NULL, }; -OSMessageQueue JKRAram::sMessageQueue = {0}; +DUSK_GAME_DATA OSMessageQueue JKRAram::sMessageQueue = {0}; JKRAram::JKRAram(u32 audio_buffer_size, u32 audio_graph_size, s32 priority) : JKRThread(stack_size, 0x10, priority) { @@ -279,11 +279,11 @@ u8* JKRAram::aramToMainRam(u32 address, u8* buf, u32 p3, JKRExpandSwitch expandS } } -JSUList JKRAram::sAramCommandList; +DUSK_GAME_DATA JSUList JKRAram::sAramCommandList; static OSMutex decompMutex; -u32 JKRAram::sSZSBufferSize = 0x00000400; +DUSK_GAME_DATA u32 JKRAram::sSZSBufferSize = 0x00000400; static u8* szpBuf; diff --git a/libs/JSystem/src/JKernel/JKRAramHeap.cpp b/libs/JSystem/src/JKernel/JKRAramHeap.cpp index 83e5cc9ac7..7b3406383b 100644 --- a/libs/JSystem/src/JKernel/JKRAramHeap.cpp +++ b/libs/JSystem/src/JKernel/JKRAramHeap.cpp @@ -6,7 +6,7 @@ #include #include "os_report.h" -JSUList JKRAramHeap::sAramList; +DUSK_GAME_DATA JSUList JKRAramHeap::sAramList; JKRAramHeap::JKRAramHeap(u32 startAddress, u32 size) { OSInitMutex(&mMutex); diff --git a/libs/JSystem/src/JKernel/JKRAramPiece.cpp b/libs/JSystem/src/JKernel/JKRAramPiece.cpp index 0946275b83..bfbabfd478 100644 --- a/libs/JSystem/src/JKernel/JKRAramPiece.cpp +++ b/libs/JSystem/src/JKernel/JKRAramPiece.cpp @@ -23,12 +23,12 @@ void JKRAramPiece::sendCommand(JKRAMCommand* command) { startDMA(command); } -JSUList JKRAramPiece::sAramPieceCommandList; +DUSK_GAME_DATA JSUList JKRAramPiece::sAramPieceCommandList; -OSMutex JKRAramPiece::mMutex; +DUSK_GAME_DATA OSMutex JKRAramPiece::mMutex; #if DEBUG && TARGET_PC -volatile u8 forceRead; +DUSK_GAME_DATA volatile u8 forceRead; #endif JKRAMCommand* JKRAramPiece::orderAsync(int direction, uintptr_t source, uintptr_t destination, u32 length, diff --git a/libs/JSystem/src/JKernel/JKRAramStream.cpp b/libs/JSystem/src/JKernel/JKRAramStream.cpp index a30f23dfaa..548a044571 100644 --- a/libs/JSystem/src/JKernel/JKRAramStream.cpp +++ b/libs/JSystem/src/JKernel/JKRAramStream.cpp @@ -12,7 +12,7 @@ const u32 stack_size = 0xc00; const u32 stack_size = 0x4000; #endif -JKRAramStream* JKRAramStream::sAramStreamObject; +DUSK_GAME_DATA JKRAramStream* JKRAramStream::sAramStreamObject; JKRAramStream* JKRAramStream::create(s32 priority) { if (!sAramStreamObject) { @@ -23,14 +23,14 @@ JKRAramStream* JKRAramStream::create(s32 priority) { return sAramStreamObject; } -void* JKRAramStream::sMessageBuffer[4] = { +DUSK_GAME_DATA void* JKRAramStream::sMessageBuffer[4] = { NULL, NULL, NULL, NULL, }; -OSMessageQueue JKRAramStream::sMessageQueue = {0}; +DUSK_GAME_DATA OSMessageQueue JKRAramStream::sMessageQueue = {0}; JKRAramStream::JKRAramStream(s32 priority) : JKRThread(stack_size, 0x10, priority) { resume(); @@ -141,11 +141,11 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) { return writtenLength; } -u8* JKRAramStream::transBuffer; +DUSK_GAME_DATA u8* JKRAramStream::transBuffer; -u32 JKRAramStream::transSize; +DUSK_GAME_DATA u32 JKRAramStream::transSize; -JKRHeap* JKRAramStream::transHeap; +DUSK_GAME_DATA JKRHeap* JKRAramStream::transHeap; JKRAramStreamCommand* JKRAramStream::write_StreamToAram_Async(JSUFileInputStream* stream, u32 addr, u32 size, u32 offset, diff --git a/libs/JSystem/src/JKernel/JKRArchivePri.cpp b/libs/JSystem/src/JKernel/JKRArchivePri.cpp index 9da4c2d1aa..a14ab763b0 100644 --- a/libs/JSystem/src/JKernel/JKRArchivePri.cpp +++ b/libs/JSystem/src/JKernel/JKRArchivePri.cpp @@ -9,7 +9,7 @@ #include #endif -u32 JKRArchive::sCurrentDirID; +DUSK_GAME_DATA u32 JKRArchive::sCurrentDirID; JKRArchive::JKRArchive() { mIsMounted = false; diff --git a/libs/JSystem/src/JKernel/JKRDecomp.cpp b/libs/JSystem/src/JKernel/JKRDecomp.cpp index a97edea0a3..2f8b9a68d7 100644 --- a/libs/JSystem/src/JKernel/JKRDecomp.cpp +++ b/libs/JSystem/src/JKernel/JKRDecomp.cpp @@ -10,7 +10,7 @@ const u32 stack_size = 0x800; const u32 stack_size = 0x4000; #endif -JKRDecomp* JKRDecomp::sDecompObject; +DUSK_GAME_DATA JKRDecomp* JKRDecomp::sDecompObject; JKRDecomp* JKRDecomp::create(s32 priority) { if (!sDecompObject) { @@ -29,9 +29,9 @@ void JKRDecomp::destroy() { } #endif -OSMessage JKRDecomp::sMessageBuffer[8] = {0}; +DUSK_GAME_DATA OSMessage JKRDecomp::sMessageBuffer[8] = {0}; -OSMessageQueue JKRDecomp::sMessageQueue = {0}; +DUSK_GAME_DATA OSMessageQueue JKRDecomp::sMessageQueue = {0}; JKRDecomp::JKRDecomp(s32 priority) : JKRThread(stack_size, 0x10, priority) { resume(); diff --git a/libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp b/libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp index 9472539e24..22f040b360 100644 --- a/libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp +++ b/libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp @@ -75,9 +75,9 @@ JKRADCommand* JKRDvdAramRipper::loadToAram_Async(JKRDvdFile* dvdFile, u32 addres return command; } -JSUList JKRDvdAramRipper::sDvdAramAsyncList; +DUSK_GAME_DATA JSUList JKRDvdAramRipper::sDvdAramAsyncList; -bool JKRDvdAramRipper::errorRetry = true; +DUSK_GAME_DATA bool JKRDvdAramRipper::errorRetry = true; JKRADCommand* JKRDvdAramRipper::callCommand_Async(JKRADCommand* command) { s32 compression; @@ -228,7 +228,7 @@ JKRADCommand::~JKRADCommand() { static OSMutex decompMutex; -u32 JKRDvdAramRipper::sSZSBufferSize = 0x00000400; +DUSK_GAME_DATA u32 JKRDvdAramRipper::sSZSBufferSize = 0x00000400; static u8* szpBuf; diff --git a/libs/JSystem/src/JKernel/JKRDvdFile.cpp b/libs/JSystem/src/JKernel/JKRDvdFile.cpp index face6c824b..83f7d4d333 100644 --- a/libs/JSystem/src/JKernel/JKRDvdFile.cpp +++ b/libs/JSystem/src/JKernel/JKRDvdFile.cpp @@ -5,7 +5,7 @@ #include "JSystem/JUtility/JUTException.h" #include -JSUList JKRDvdFile::sDvdList; +DUSK_GAME_DATA JSUList JKRDvdFile::sDvdList; JKRDvdFile::JKRDvdFile() : mDvdLink(this) { initiate(); diff --git a/libs/JSystem/src/JKernel/JKRDvdRipper.cpp b/libs/JSystem/src/JKernel/JKRDvdRipper.cpp index ae65f42ba3..2c2d521b3a 100644 --- a/libs/JSystem/src/JKernel/JKRDvdRipper.cpp +++ b/libs/JSystem/src/JKernel/JKRDvdRipper.cpp @@ -44,7 +44,7 @@ void* JKRDvdRipper::loadToMainRAM(s32 entryNumber, u8* dst, JKRExpandSwitch expa pCompression, param_8); } -bool JKRDvdRipper::errorRetry = true; +DUSK_GAME_DATA bool JKRDvdRipper::errorRetry = true; void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch expandSwitch, u32 dstLength, JKRHeap* heap, @@ -236,13 +236,13 @@ void* JKRDvdRipper::loadToMainRAM(JKRDvdFile* dvdFile, u8* dst, JKRExpandSwitch static u8 lit_491[12]; -JSUList JKRDvdRipper::sDvdAsyncList; +DUSK_GAME_DATA JSUList JKRDvdRipper::sDvdAsyncList; static OSMutex decompMutex; -u32 JKRDvdRipper::sSZSBufferSize = 0x00000400; +DUSK_GAME_DATA u32 JKRDvdRipper::sSZSBufferSize = 0x00000400; -JKRHeap* JKRDvdRipper::sHeap = NULL; +DUSK_GAME_DATA JKRHeap* JKRDvdRipper::sHeap = NULL; static u8* szpBuf; diff --git a/libs/JSystem/src/JKernel/JKRFileLoader.cpp b/libs/JSystem/src/JKernel/JKRFileLoader.cpp index 4a7fa00d10..c3c5ac1903 100644 --- a/libs/JSystem/src/JKernel/JKRFileLoader.cpp +++ b/libs/JSystem/src/JKernel/JKRFileLoader.cpp @@ -11,8 +11,8 @@ #include "dusk/string.hpp" #include "global.h" -JKRFileLoader* JKRFileLoader::sCurrentVolume; -JSUList JKRFileLoader::sVolumeList; +DUSK_GAME_DATA JKRFileLoader* JKRFileLoader::sCurrentVolume; +DUSK_GAME_DATA JSUList JKRFileLoader::sVolumeList; JKRFileLoader::JKRFileLoader(void) : mFileLoaderLink(this), mVolumeName(NULL), mVolumeType(0), mMountCount(0) {} diff --git a/libs/JSystem/src/JKernel/JKRHeap.cpp b/libs/JSystem/src/JKernel/JKRHeap.cpp index c4849437ac..34b3e7c619 100644 --- a/libs/JSystem/src/JKernel/JKRHeap.cpp +++ b/libs/JSystem/src/JKernel/JKRHeap.cpp @@ -28,14 +28,14 @@ #include "os_report.h" #if DEBUG -u8 JKRValue_DEBUGFILL_NOTUSE = 0xFD; -u8 JKRValue_DEBUGFILL_NEW = 0xCD; -u8 JKRValue_DEBUGFILL_DELETE = 0xDD; +DUSK_GAME_DATA u8 JKRValue_DEBUGFILL_NOTUSE = 0xFD; +DUSK_GAME_DATA u8 JKRValue_DEBUGFILL_NEW = 0xCD; +DUSK_GAME_DATA u8 JKRValue_DEBUGFILL_DELETE = 0xDD; #endif -bool JKRHeap::sDefaultFillFlag = true; +DUSK_GAME_DATA bool JKRHeap::sDefaultFillFlag = true; -JKRHeap* JKRHeap::sSystemHeap; +DUSK_GAME_DATA JKRHeap* JKRHeap::sSystemHeap; #if TARGET_PC // JSystem normally has a thread switch callback to track the correct heap. @@ -52,13 +52,13 @@ static thread_local TLS_GLOBAL_DYNAMIC JKRHeap* sCurrentHeap; JKRHeap* JKRHeap::sCurrentHeap; #endif -JKRHeap* JKRHeap::sRootHeap; +DUSK_GAME_DATA JKRHeap* JKRHeap::sRootHeap; #if PLATFORM_WII || PLATFORM_SHIELD JKRHeap* JKRHeap::sRootHeap2; #endif -JKRErrorHandler JKRHeap::mErrorHandler; +DUSK_GAME_DATA JKRErrorHandler JKRHeap::mErrorHandler; static bool data_80451380; @@ -111,19 +111,19 @@ JKRHeap::~JKRHeap() { } } -void* JKRHeap::mCodeStart; +DUSK_GAME_DATA void* JKRHeap::mCodeStart; -void* JKRHeap::mCodeEnd; +DUSK_GAME_DATA void* JKRHeap::mCodeEnd; -void* JKRHeap::mUserRamStart; +DUSK_GAME_DATA void* JKRHeap::mUserRamStart; -void* JKRHeap::mUserRamEnd; +DUSK_GAME_DATA void* JKRHeap::mUserRamEnd; -u32 JKRHeap::mMemorySize; +DUSK_GAME_DATA u32 JKRHeap::mMemorySize; -JKRHeap::JKRAllocCallback JKRHeap::sAllocCallback; +DUSK_GAME_DATA JKRHeap::JKRAllocCallback JKRHeap::sAllocCallback; -JKRHeap::JKRFreeCallback JKRHeap::sFreeCallback; +DUSK_GAME_DATA JKRHeap::JKRFreeCallback JKRHeap::sFreeCallback; bool JKRHeap::initArena(char** memory, u32* size, int maxHeaps) { void* arenaLo = OSGetArenaLo(); @@ -661,8 +661,8 @@ void operator delete[](void* ptr JKR_HEAP_TOKEN_PARAM) IF_DUSK(noexcept) { } #endif -s32 fillcheck_dispcount = 100; -bool data_8074A8D0_debug = true; +DUSK_GAME_DATA s32 fillcheck_dispcount = 100; +DUSK_GAME_DATA bool data_8074A8D0_debug = true; void JKRHeap::state_register(JKRHeap::TState* p, u32 id) const { JUT_ASSERT(1213, p != NULL); @@ -680,7 +680,7 @@ void JKRHeap::state_dump(const JKRHeap::TState& p) const { JUT_LOG(1248, "used size : %u", p.getUsedSize()); } -void* ARALT_AramStartAdr = (void*)0x90000000; +DUSK_GAME_DATA void* ARALT_AramStartAdr = (void*)0x90000000; void* JKRHeap::getAltAramStartAdr() { return ARALT_AramStartAdr; } diff --git a/libs/JSystem/src/JKernel/JKRThread.cpp b/libs/JSystem/src/JKernel/JKRThread.cpp index 8c945aba32..8203248339 100644 --- a/libs/JSystem/src/JKernel/JKRThread.cpp +++ b/libs/JSystem/src/JKernel/JKRThread.cpp @@ -13,19 +13,19 @@ #include "dusk/os.h" #endif -JSUList JKRThread::sThreadList(0); +DUSK_GAME_DATA JSUList JKRThread::sThreadList(0); -void* JKRIdleThread::sThread; +DUSK_GAME_DATA void* JKRIdleThread::sThread; -JKRThreadSwitch* JKRThreadSwitch::sManager; +DUSK_GAME_DATA JKRThreadSwitch* JKRThreadSwitch::sManager; -u32 JKRThreadSwitch::sTotalCount; +DUSK_GAME_DATA u32 JKRThreadSwitch::sTotalCount; -u64 JKRThreadSwitch::sTotalStart; +DUSK_GAME_DATA u64 JKRThreadSwitch::sTotalStart; -JKRThreadSwitch_PreCallback JKRThreadSwitch::mUserPreCallback; +DUSK_GAME_DATA JKRThreadSwitch_PreCallback JKRThreadSwitch::mUserPreCallback; -JKRThreadSwitch_PostCallback JKRThreadSwitch::mUserPostCallback; +DUSK_GAME_DATA JKRThreadSwitch_PostCallback JKRThreadSwitch::mUserPostCallback; JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadListLink(this) { JKRHeap* heap = JKRHeap::findFromRoot(this); @@ -358,10 +358,10 @@ static void dummy(JKRIdleThread* thread) { #pragma push #pragma force_active on -JSUList JKRTask::sTaskList; +DUSK_GAME_DATA JSUList JKRTask::sTaskList; #pragma pop #pragma push #pragma force_active on -u8 JKRTask::sEndMesgQueue[32]; +DUSK_GAME_DATA u8 JKRTask::sEndMesgQueue[32]; #pragma pop diff --git a/libs/JSystem/src/JMath/JMATrigonometric.cpp b/libs/JSystem/src/JMath/JMATrigonometric.cpp index 5d394ac9c2..8ebdb57ebc 100644 --- a/libs/JSystem/src/JMath/JMATrigonometric.cpp +++ b/libs/JSystem/src/JMath/JMATrigonometric.cpp @@ -16,10 +16,10 @@ inline f64 getConst2() { return 9.765625E-4; } -TSinCosTable<13, f32> sincosTable_ ATTRIBUTE_ALIGN(32); +DUSK_GAME_DATA TSinCosTable<13, f32> sincosTable_ ATTRIBUTE_ALIGN(32); -TAtanTable<1024, f32> atanTable_ ATTRIBUTE_ALIGN(32); +DUSK_GAME_DATA TAtanTable<1024, f32> atanTable_ ATTRIBUTE_ALIGN(32); -TAsinAcosTable<1024, f32> asinAcosTable_ ATTRIBUTE_ALIGN(32); +DUSK_GAME_DATA TAsinAcosTable<1024, f32> asinAcosTable_ ATTRIBUTE_ALIGN(32); } // namespace JMath diff --git a/libs/JSystem/src/JMessage/data.cpp b/libs/JSystem/src/JMessage/data.cpp index 29c96c18c7..4ff9919594 100644 --- a/libs/JSystem/src/JMessage/data.cpp +++ b/libs/JSystem/src/JMessage/data.cpp @@ -2,6 +2,6 @@ #include "JSystem/JMessage/data.h" -const BE(u32) JMessage::data::ga4cSignature = 'MESG'; +DUSK_GAME_DATA const BE(u32) JMessage::data::ga4cSignature = 'MESG'; -const BE(u32) JMessage::data::ga4cSignature_color = 'MGCL'; +DUSK_GAME_DATA const BE(u32) JMessage::data::ga4cSignature_color = 'MGCL'; diff --git a/libs/JSystem/src/JMessage/resource.cpp b/libs/JSystem/src/JMessage/resource.cpp index 4e48701c11..fc8d011af7 100644 --- a/libs/JSystem/src/JMessage/resource.cpp +++ b/libs/JSystem/src/JMessage/resource.cpp @@ -89,7 +89,7 @@ u16 JMessage::TResource::toMessageIndex_messageID(u32 uMsgID, u32 upperHalf, boo return nIndex; } -JMessage::locale::parseCharacter_function JMessage::TResourceContainer::sapfnParseCharacter_[5] = { +DUSK_GAME_DATA JMessage::locale::parseCharacter_function JMessage::TResourceContainer::sapfnParseCharacter_[5] = { NULL, JMessage::locale::parseCharacter_1Byte, JMessage::locale::parseCharacter_2Byte, diff --git a/libs/JSystem/src/JParticle/JPABaseShape.cpp b/libs/JSystem/src/JParticle/JPABaseShape.cpp index a569d96842..c47d978b00 100644 --- a/libs/JSystem/src/JParticle/JPABaseShape.cpp +++ b/libs/JSystem/src/JParticle/JPABaseShape.cpp @@ -1580,36 +1580,36 @@ static void makeColorTable(GXColor** o_color_table, JPAClrAnmKeyData const* i_da *o_color_table = p_clr_tbl; } -GXBlendMode JPABaseShape::st_bm[3] = { +DUSK_GAME_DATA GXBlendMode JPABaseShape::st_bm[3] = { GX_BM_NONE, GX_BM_BLEND, GX_BM_LOGIC, }; -GXBlendFactor JPABaseShape::st_bf[10] = { +DUSK_GAME_DATA GXBlendFactor JPABaseShape::st_bf[10] = { GX_BL_ZERO, GX_BL_ONE, GX_BL_SRCCLR, GX_BL_INVSRCCLR, GX_BL_DSTCLR, GX_BL_INVDSTCLR, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_BL_DSTALPHA, GX_BL_INVDSTALPHA, }; -GXLogicOp JPABaseShape::st_lo[16] = { +DUSK_GAME_DATA GXLogicOp JPABaseShape::st_lo[16] = { GX_LO_CLEAR, GX_LO_SET, GX_LO_COPY, GX_LO_INVCOPY, GX_LO_NOOP, GX_LO_INV, GX_LO_AND, GX_LO_NAND, GX_LO_OR, GX_LO_NOR, GX_LO_XOR, GX_LO_EQUIV, GX_LO_REVAND, GX_LO_INVAND, GX_LO_REVOR, GX_LO_INVOR, }; -GXCompare JPABaseShape::st_c[8] = { +DUSK_GAME_DATA GXCompare JPABaseShape::st_c[8] = { GX_NEVER, GX_LESS, GX_LEQUAL, GX_EQUAL, GX_NEQUAL, GX_GEQUAL, GX_GREATER, GX_ALWAYS, }; -GXAlphaOp JPABaseShape::st_ao[4] = { +DUSK_GAME_DATA GXAlphaOp JPABaseShape::st_ao[4] = { GX_AOP_AND, GX_AOP_OR, GX_AOP_XOR, GX_AOP_XNOR, }; -GXTevColorArg JPABaseShape::st_ca[6][4] = { +DUSK_GAME_DATA GXTevColorArg JPABaseShape::st_ca[6][4] = { { GX_CC_ZERO, GX_CC_TEXC, @@ -1648,7 +1648,7 @@ GXTevColorArg JPABaseShape::st_ca[6][4] = { }, }; -GXTevAlphaArg JPABaseShape::st_aa[2][4] = { +DUSK_GAME_DATA GXTevAlphaArg JPABaseShape::st_aa[2][4] = { { GX_CA_ZERO, GX_CA_TEXA, diff --git a/libs/JSystem/src/JStudio/JStudio/ctb-data.cpp b/libs/JSystem/src/JStudio/JStudio/ctb-data.cpp index 629d542457..8f7fa348ba 100644 --- a/libs/JSystem/src/JStudio/JStudio/ctb-data.cpp +++ b/libs/JSystem/src/JStudio/JStudio/ctb-data.cpp @@ -2,4 +2,4 @@ #include "JSystem/JStudio/JStudio/ctb.h" -const u32 JStudio::ctb::data::ga4cSignature = BSWAP32('CTB\0'); +DUSK_GAME_DATA const u32 JStudio::ctb::data::ga4cSignature = BSWAP32('CTB\0'); diff --git a/libs/JSystem/src/JStudio/JStudio/fvb-data.cpp b/libs/JSystem/src/JStudio/JStudio/fvb-data.cpp index deee81198e..ef9f785165 100644 --- a/libs/JSystem/src/JStudio/JStudio/fvb-data.cpp +++ b/libs/JSystem/src/JStudio/JStudio/fvb-data.cpp @@ -2,4 +2,4 @@ #include "JSystem/JStudio/JStudio/fvb-data.h" -const char JStudio::fvb::data::ga4cSignature[4] = "FVB"; +DUSK_GAME_DATA const char JStudio::fvb::data::ga4cSignature[4] = "FVB"; diff --git a/libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp b/libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp index c6f90bc45f..2d361f5acd 100644 --- a/libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp +++ b/libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp @@ -2,4 +2,4 @@ #include "JSystem/JStudio/JStudio/jstudio-data.h" -const char JStudio::data::ga8cSignature[8] = "jstudio"; +DUSK_GAME_DATA const char JStudio::data::ga8cSignature[8] = "jstudio"; diff --git a/libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp b/libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp index 864dec39fc..2f408d6184 100644 --- a/libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp +++ b/libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp @@ -326,19 +326,19 @@ JStudio::TObject_actor::TObject_actor(JStudio::stb::data::TParse_TBlock_object c } -u32 const JStudio::TAdaptor_actor::sauVariableValue_3_TRANSLATION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_actor::sauVariableValue_3_TRANSLATION_XYZ[3] = { 3, 4, 5, }; - u32 const JStudio::TAdaptor_actor::sauVariableValue_3_ROTATION_XYZ[3] = { + DUSK_GAME_DATA u32 const JStudio::TAdaptor_actor::sauVariableValue_3_ROTATION_XYZ[3] = { 6, 7, 8, }; -u32 const JStudio::TAdaptor_actor::sauVariableValue_3_SCALING_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_actor::sauVariableValue_3_SCALING_XYZ[3] = { 9, 10, 11, }; - JStudio::TVariableValue::TOutput_none_ JStudio::TVariableValue::soOutput_none_; + DUSK_GAME_DATA JStudio::TVariableValue::TOutput_none_ JStudio::TVariableValue::soOutput_none_; void JStudio::TObject_actor::do_paragraph(u32 param_1, void const* param_2, u32 param_3) { TAdaptor* adaptor = getAdaptor(); @@ -479,11 +479,11 @@ JStudio::TObject_ambientLight::TObject_ambientLight( JStudio::TAdaptor_ambientLight* param_1) : TObject(param_0, param_1) { } -u32 const JStudio::TAdaptor_ambientLight::sauVariableValue_3_COLOR_RGB[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_ambientLight::sauVariableValue_3_COLOR_RGB[3] = { 0, 1, 2, }; -u32 const JStudio::TAdaptor_ambientLight::sauVariableValue_4_COLOR_RGBA[4] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_ambientLight::sauVariableValue_4_COLOR_RGBA[4] = { 0, 1, 2, 3, }; @@ -540,15 +540,15 @@ JStudio::TObject_camera::TObject_camera(JStudio::stb::data::TParse_TBlock_object JStudio::TAdaptor_camera* param_1) : TObject(param_0, param_1) {} -u32 const JStudio::TAdaptor_camera::sauVariableValue_3_POSITION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_camera::sauVariableValue_3_POSITION_XYZ[3] = { 0, 1, 2, }; -u32 const JStudio::TAdaptor_camera::sauVariableValue_3_TARGET_POSITION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_camera::sauVariableValue_3_TARGET_POSITION_XYZ[3] = { 3, 4, 5, }; -u32 const JStudio::TAdaptor_camera::sauVariableValue_2_DISTANCE_NEAR_FAR[2] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_camera::sauVariableValue_2_DISTANCE_NEAR_FAR[2] = { 8, 9, }; @@ -686,15 +686,15 @@ JStudio::TAdaptor_fog::~TAdaptor_fog() {} JStudio::TObject_fog::TObject_fog(JStudio::stb::data::TParse_TBlock_object const& param_0, JStudio::TAdaptor_fog* param_1) : TObject(param_0, param_1) {} -u32 const JStudio::TAdaptor_fog::sauVariableValue_3_COLOR_RGB[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_fog::sauVariableValue_3_COLOR_RGB[3] = { 0, 1, 2, }; -u32 const JStudio::TAdaptor_fog::sauVariableValue_4_COLOR_RGBA[4] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_fog::sauVariableValue_4_COLOR_RGBA[4] = { 0, 1, 2, 3, }; -u32 const JStudio::TAdaptor_fog::sauVariableValue_2_RANGE_BEGIN_END[2] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_fog::sauVariableValue_2_RANGE_BEGIN_END[2] = { 4, 5, }; @@ -759,23 +759,23 @@ JStudio::TAdaptor_light::~TAdaptor_light() {} JStudio::TObject_light::TObject_light(JStudio::stb::data::TParse_TBlock_object const& param_0, JStudio::TAdaptor_light* param_1) : TObject(param_0, param_1) {} -u32 const JStudio::TAdaptor_light::sauVariableValue_2_DIRECTION_THETA_PHI[2] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_light::sauVariableValue_2_DIRECTION_THETA_PHI[2] = { 10, 11, }; - u32 const JStudio::TAdaptor_light::sauVariableValue_3_COLOR_RGB[3] = { + DUSK_GAME_DATA u32 const JStudio::TAdaptor_light::sauVariableValue_3_COLOR_RGB[3] = { 0, 1, 2, }; -u32 const JStudio::TAdaptor_light::sauVariableValue_4_COLOR_RGBA[4] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_light::sauVariableValue_4_COLOR_RGBA[4] = { 0, 1, 2, 3, }; -u32 const JStudio::TAdaptor_light::sauVariableValue_3_POSITION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_light::sauVariableValue_3_POSITION_XYZ[3] = { 4, 5, 6, }; -u32 const JStudio::TAdaptor_light::sauVariableValue_3_TARGET_POSITION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_light::sauVariableValue_3_TARGET_POSITION_XYZ[3] = { 7, 8, 9, }; @@ -921,31 +921,31 @@ JStudio::TAdaptor_particle::~TAdaptor_particle() {} JStudio::TObject_particle::TObject_particle( JStudio::stb::data::TParse_TBlock_object const& param_0, JStudio::TAdaptor_particle* param_1) : TObject(param_0, param_1) {} - u32 const JStudio::TAdaptor_particle::sauVariableValue_3_TRANSLATION_XYZ[3] = { + DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_3_TRANSLATION_XYZ[3] = { 0, 1, 2, }; -u32 const JStudio::TAdaptor_particle::sauVariableValue_3_ROTATION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_3_ROTATION_XYZ[3] = { 3, 4, 5, }; -u32 const JStudio::TAdaptor_particle::sauVariableValue_3_SCALING_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_3_SCALING_XYZ[3] = { 6, 7, 8, }; -u32 const JStudio::TAdaptor_particle::sauVariableValue_3_COLOR_RGB[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_3_COLOR_RGB[3] = { 9, 10, 11, }; -u32 const JStudio::TAdaptor_particle::sauVariableValue_4_COLOR_RGBA[4] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_4_COLOR_RGBA[4] = { 9, 10, 11, 12, }; -u32 const JStudio::TAdaptor_particle::sauVariableValue_3_COLOR1_RGB[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_3_COLOR1_RGB[3] = { 9, 10, 11, }; -u32 const JStudio::TAdaptor_particle::sauVariableValue_4_COLOR1_RGBA[4] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_particle::sauVariableValue_4_COLOR1_RGBA[4] = { 9, 10, 11, 12, }; @@ -1119,7 +1119,7 @@ JStudio::TAdaptor_sound::~TAdaptor_sound() {} JStudio::TObject_sound::TObject_sound(JStudio::stb::data::TParse_TBlock_object const& param_0, JStudio::TAdaptor_sound* param_1) : TObject(param_0, param_1) {} -u32 const JStudio::TAdaptor_sound::sauVariableValue_3_POSITION_XYZ[3] = { +DUSK_GAME_DATA u32 const JStudio::TAdaptor_sound::sauVariableValue_3_POSITION_XYZ[3] = { 0, 1, 2, }; diff --git a/libs/JSystem/src/JStudio/JStudio/stb-data.cpp b/libs/JSystem/src/JStudio/JStudio/stb-data.cpp index 79df1744d9..95b8d7dafd 100644 --- a/libs/JSystem/src/JStudio/JStudio/stb-data.cpp +++ b/libs/JSystem/src/JStudio/JStudio/stb-data.cpp @@ -2,5 +2,5 @@ #include "dusk/endian.h" #include "JSystem/JStudio/JStudio/stb-data.h" -const s32 JStudio::stb::data::gauDataSize_TEParagraph_data[8] = {0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40}; -const BE(u32) JStudio::stb::data::ga4cSignature = 'STB\0'; +DUSK_GAME_DATA const s32 JStudio::stb::data::gauDataSize_TEParagraph_data[8] = {0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40}; +DUSK_GAME_DATA const BE(u32) JStudio::stb::data::ga4cSignature = 'STB\0'; diff --git a/libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp b/libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp index 9bdde8b5cc..14eb3a74a4 100644 --- a/libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp +++ b/libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp @@ -80,7 +80,7 @@ void JStudio_JAudio2::TAdaptor_sound::adaptor_do_prepare() { } } -JStudio_JAudio2::TAdaptor_sound::TVVOSetValue_ JStudio_JAudio2::TAdaptor_sound::saoVVOSetValue_[6] = { +DUSK_GAME_DATA JStudio_JAudio2::TAdaptor_sound::TVVOSetValue_ JStudio_JAudio2::TAdaptor_sound::saoVVOSetValue_[6] = { JStudio_JAudio2::TAdaptor_sound::TVVOSetValue_( JStudio_JAudio2::TAdaptor_sound::UNK_7, setValue_VOLUME_ ), diff --git a/libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp index 0ee7d53fb7..603cf30319 100644 --- a/libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp +++ b/libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp @@ -348,12 +348,12 @@ JStudio_JStage::TAdaptor_actor::TVVOutput_ANIMATION_FRAME_::~TVVOutput_ANIMATION namespace JStudio_JStage { -const TAdaptor_actor::TVVOutputObject TAdaptor_actor::saoVVOutput_[] = { +DUSK_GAME_DATA const TAdaptor_actor::TVVOutputObject TAdaptor_actor::saoVVOutput_[] = { TVVOutputObject(TAdaptor_actor::TEACTOR_1, &JStage::TActor::JSGSetAnimationTransition, &JStage::TActor::JSGGetAnimationTransition), TVVOutputObject() }; -const TAdaptor_actor::TVVOutput_ANIMATION_FRAME_ TAdaptor_actor::saoVVOutput_ANIMATION_FRAME_[] = { +DUSK_GAME_DATA const TAdaptor_actor::TVVOutput_ANIMATION_FRAME_ TAdaptor_actor::saoVVOutput_ANIMATION_FRAME_[] = { TVVOutput_ANIMATION_FRAME_(0, 305, &JStage::TActor::JSGSetAnimationFrame, &JStage::TActor::JSGGetAnimationFrame, &JStage::TActor::JSGGetAnimationFrameMax), TVVOutput_ANIMATION_FRAME_(2, 309, &JStage::TActor::JSGSetTextureAnimationFrame, &JStage::TActor::JSGGetTextureAnimationFrame, &JStage::TActor::JSGGetTextureAnimationFrameMax), TVVOutput_ANIMATION_FRAME_() diff --git a/libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp index afa1fb8ab4..c29aea47fa 100644 --- a/libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp +++ b/libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp @@ -22,7 +22,7 @@ JStudio_JStage::TAdaptor_camera::~TAdaptor_camera() { adaptor_do_end(); } -JStudio_JStage::TAdaptor_camera::TVVOutput JStudio_JStage::TAdaptor_camera::saoVVOutput_[5] = { +DUSK_GAME_DATA JStudio_JStage::TAdaptor_camera::TVVOutput JStudio_JStage::TAdaptor_camera::saoVVOutput_[5] = { TVVOutput(JStudio_JStage::TAdaptor_camera::TECAMERA_7, &JStage::TCamera::JSGSetViewRoll, &JStage::TCamera::JSGGetViewRoll), TVVOutput(JStudio_JStage::TAdaptor_camera::TECAMERA_6, &JStage::TCamera::JSGSetProjectionFovy, diff --git a/libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp index ba1f2391e3..43cd94229a 100644 --- a/libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp +++ b/libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp @@ -13,7 +13,7 @@ JStudio_JStage::TAdaptor_fog::~TAdaptor_fog() { adaptor_do_end(); } -JStudio_JStage::TVariableValueOutput_object_ JStudio_JStage::TAdaptor_fog::saoVVOutput_[3] = { +DUSK_GAME_DATA JStudio_JStage::TVariableValueOutput_object_ JStudio_JStage::TAdaptor_fog::saoVVOutput_[3] = { JStudio_JStage::TVariableValueOutput_object_(JStudio_JStage::TAdaptor_fog::TEFOG_4, &JStage::TFog::JSGSetStartZ, &JStage::TFog::JSGGetStartZ), JStudio_JStage::TVariableValueOutput_object_(JStudio_JStage::TAdaptor_fog::TEFOG_5, &JStage::TFog::JSGSetEndZ, &JStage::TFog::JSGGetEndZ), JStudio_JStage::TVariableValueOutput_object_(), diff --git a/libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp index 19a02f09df..9b3b2e608d 100644 --- a/libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp +++ b/libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp @@ -12,7 +12,7 @@ JStudio_JStage::TAdaptor_light::~TAdaptor_light() { adaptor_do_end(); } -JStudio_JStage::TAdaptor_light::TVVOutput_direction_ +DUSK_GAME_DATA JStudio_JStage::TAdaptor_light::TVVOutput_direction_ JStudio_JStage::TAdaptor_light::saoVVOutput_direction_[6] = { JStudio_JStage::TAdaptor_light::TVVOutput_direction_( JStudio_JStage::TAdaptor_light::TE_VALUE_10, diff --git a/libs/JSystem/src/JUtility/JUTConsole.cpp b/libs/JSystem/src/JUtility/JUTConsole.cpp index c2c023a2d8..2899e3f0e4 100644 --- a/libs/JSystem/src/JUtility/JUTConsole.cpp +++ b/libs/JSystem/src/JUtility/JUTConsole.cpp @@ -11,7 +11,7 @@ #include "dusk/string.hpp" #include "global.h" -JUTConsoleManager* JUTConsoleManager::sManager; +DUSK_GAME_DATA JUTConsoleManager* JUTConsoleManager::sManager; JUTConsole* JUTConsole::create(unsigned int param_0, unsigned int maxLines, JKRHeap* pHeap) { JUTConsoleManager* pManager = JUTConsoleManager::getManager(); diff --git a/libs/JSystem/src/JUtility/JUTDbPrint.cpp b/libs/JSystem/src/JUtility/JUTDbPrint.cpp index cdf4c08d29..03535f2d15 100644 --- a/libs/JSystem/src/JUtility/JUTDbPrint.cpp +++ b/libs/JSystem/src/JUtility/JUTDbPrint.cpp @@ -16,7 +16,7 @@ JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) { mVisible = true; } -JUTDbPrint* JUTDbPrint::sDebugPrint; +DUSK_GAME_DATA JUTDbPrint* JUTDbPrint::sDebugPrint; JUTDbPrint* JUTDbPrint::start(JUTFont* pFont, JKRHeap* pHeap) { if (sDebugPrint == NULL) { diff --git a/libs/JSystem/src/JUtility/JUTDirectPrint.cpp b/libs/JSystem/src/JUtility/JUTDirectPrint.cpp index 1b5993c5bd..745862dfbc 100644 --- a/libs/JSystem/src/JUtility/JUTDirectPrint.cpp +++ b/libs/JSystem/src/JUtility/JUTDirectPrint.cpp @@ -7,7 +7,7 @@ #include "global.h" #include "angle_utils.h" -JUTDirectPrint* JUTDirectPrint::sDirectPrint; +DUSK_GAME_DATA JUTDirectPrint* JUTDirectPrint::sDirectPrint; JUTDirectPrint::JUTDirectPrint() { changeFrameBuffer(NULL, 0, 0); @@ -48,7 +48,7 @@ void JUTDirectPrint::erase(int x, int y, int width, int height) { } } -u8 JUTDirectPrint::sAsciiTable[128] = { +DUSK_GAME_DATA u8 JUTDirectPrint::sAsciiTable[128] = { 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0xFD, 0xFE, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x29, 0x64, 0x65, 0x66, 0x2B, 0x67, 0x68, 0x25, 0x26, 0x69, 0x2A, 0x6A, 0x27, 0x2C, 0x6B, @@ -59,7 +59,7 @@ u8 JUTDirectPrint::sAsciiTable[128] = { 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x76, 0x77, 0x78, 0x79, 0x7A, }; -u32 JUTDirectPrint::sFontData[64] = { +DUSK_GAME_DATA u32 JUTDirectPrint::sFontData[64] = { 0x70871C30, 0x8988A250, 0x88808290, 0x88830C90, 0x888402F8, 0x88882210, 0x71CF9C10, 0xF9CF9C70, 0x8208A288, 0xF200A288, 0x0BC11C78, 0x0A222208, 0x8A222208, 0x71C21C70, 0x23C738F8, 0x5228A480, 0x8A282280, 0x8BC822F0, 0xFA282280, 0x8A28A480, 0x8BC738F8, 0xF9C89C08, 0x82288808, 0x82088808, @@ -70,7 +70,7 @@ u32 JUTDirectPrint::sFontData[64] = { 0x70800000, 0x88822200, 0x08820400, 0x108F8800, 0x20821000, 0x00022200, 0x20800020, 0x00000000, }; -u32 JUTDirectPrint::sFontData2[77] = { +DUSK_GAME_DATA u32 JUTDirectPrint::sFontData2[77] = { 0x51421820, 0x53E7A420, 0x014A2C40, 0x01471000, 0x0142AA00, 0x03EAA400, 0x01471A78, 0x00000000, 0x50008010, 0x20010820, 0xF8020040, 0x20420820, 0x50441010, 0x00880000, 0x00070E00, 0x01088840, 0x78898820, 0x004A8810, 0x788A8810, 0x01098808, 0x00040E04, 0x70800620, 0x11400820, 0x12200820, diff --git a/libs/JSystem/src/JUtility/JUTException.cpp b/libs/JSystem/src/JUtility/JUTException.cpp index 54b234118c..4b87dd50f8 100644 --- a/libs/JSystem/src/JUtility/JUTException.cpp +++ b/libs/JSystem/src/JUtility/JUTException.cpp @@ -27,16 +27,16 @@ struct CallbackObject { /* 0x10 */ int param_4; }; -OSMessageQueue JUTException::sMessageQueue = {0}; +DUSK_GAME_DATA OSMessageQueue JUTException::sMessageQueue = {0}; STATIC_ASSERT(sizeof(CallbackObject) == 0x14); static CallbackObject exCallbackObject; -JSUList JUTException::sMapFileList(false); +DUSK_GAME_DATA JSUList JUTException::sMapFileList(false); static OSTime c3bcnt[4] = {0, 0, 0, 0}; -const char* JUTException::sCpuExpName[17] = { +DUSK_GAME_DATA const char* JUTException::sCpuExpName[17] = { "SYSTEM RESET", "MACHINE CHECK", "DSI", @@ -56,11 +56,11 @@ const char* JUTException::sCpuExpName[17] = { "FLOATING POINT", }; -JUTException* JUTException::sErrorManager; +DUSK_GAME_DATA JUTException* JUTException::sErrorManager; -JUTExceptionUserCallback JUTException::sPreUserCallback; +DUSK_GAME_DATA JUTExceptionUserCallback JUTException::sPreUserCallback; -JUTExceptionUserCallback JUTException::sPostUserCallback; +DUSK_GAME_DATA JUTExceptionUserCallback JUTException::sPostUserCallback; #if PLATFORM_GCN const int stack_size = 0x1C00; @@ -100,7 +100,7 @@ JUTException* JUTException::create(JUTDirectPrint* directPrint) { return sErrorManager; } -OSMessage JUTException::sMessageBuffer[1] = {0}; +DUSK_GAME_DATA OSMessage JUTException::sMessageBuffer[1] = {0}; void* JUTException::run() { #ifdef TARGET_PC @@ -140,15 +140,15 @@ void* JUTException::run() { #endif } -void* JUTException::sConsoleBuffer; +DUSK_GAME_DATA void* JUTException::sConsoleBuffer; -u32 JUTException::sConsoleBufferSize; +DUSK_GAME_DATA u32 JUTException::sConsoleBufferSize; -JUTConsole* JUTException::sConsole; +DUSK_GAME_DATA JUTConsole* JUTException::sConsole; -u32 JUTException::msr; +DUSK_GAME_DATA u32 JUTException::msr; -u32 JUTException::fpscr; +DUSK_GAME_DATA u32 JUTException::fpscr; void JUTException::errorHandler(OSError error, OSContext* context, u32 param_3, u32 param_4) { #ifndef TARGET_PC diff --git a/libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp b/libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp index 35979ebc9f..64ee2c61d8 100644 --- a/libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp +++ b/libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp @@ -8,7 +8,7 @@ #endif #include "global.h" -u8 const JUTResFONT_Ascfont_fix12[] ATTRIBUTE_ALIGN(32) = { +DUSK_GAME_DATA u8 const JUTResFONT_Ascfont_fix12[] ATTRIBUTE_ALIGN(32) = { 0x46, 0x4F, 0x4E, 0x54, 0x62, 0x66, 0x6E, 0x31, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4E, 0x46, 0x31, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, diff --git a/libs/JSystem/src/JUtility/JUTGamePad.cpp b/libs/JSystem/src/JUtility/JUTGamePad.cpp index 48ed5f130e..c7e078b893 100644 --- a/libs/JSystem/src/JUtility/JUTGamePad.cpp +++ b/libs/JSystem/src/JUtility/JUTGamePad.cpp @@ -8,7 +8,7 @@ #include "dusk/action_bindings.h" #endif -u32 JUTGamePad::CRumble::sChannelMask[4] = { +DUSK_GAME_DATA u32 JUTGamePad::CRumble::sChannelMask[4] = { PAD_CHAN0_BIT, PAD_CHAN1_BIT, PAD_CHAN2_BIT, @@ -17,11 +17,11 @@ u32 JUTGamePad::CRumble::sChannelMask[4] = { static u32 channel_mask[4] = {PAD_CHAN0_BIT, PAD_CHAN1_BIT, PAD_CHAN2_BIT, PAD_CHAN3_BIT}; -JSUList JUTGamePad::mPadList(false); +DUSK_GAME_DATA JSUList JUTGamePad::mPadList(false); -bool JUTGamePad::mListInitialized; +DUSK_GAME_DATA bool JUTGamePad::mListInitialized; -u8 JUTGamePad::mPadAssign[4]; +DUSK_GAME_DATA u8 JUTGamePad::mPadAssign[4]; JUTGamePad::JUTGamePad(EPadPort port) : mRumble(this), mLink(this) { mPortNum = port; @@ -53,11 +53,11 @@ void JUTGamePad::initList() { } } -u32 JUTGamePad::sSuppressPadReset; +DUSK_GAME_DATA u32 JUTGamePad::sSuppressPadReset; -u8 data_8074CFA4_debug; +DUSK_GAME_DATA u8 data_8074CFA4_debug; -s32 JUTGamePad::sAnalogMode; +DUSK_GAME_DATA s32 JUTGamePad::sAnalogMode; BOOL JUTGamePad::init() { PADSetSpec(PAD_SPEC_5); @@ -73,19 +73,19 @@ void JUTGamePad::clear() { #endif } -PADStatus JUTGamePad::mPadStatus[4]; +DUSK_GAME_DATA PADStatus JUTGamePad::mPadStatus[4]; -JUTGamePad::CButton JUTGamePad::mPadButton[4]; +DUSK_GAME_DATA JUTGamePad::CButton JUTGamePad::mPadButton[4]; -JUTGamePad::CStick JUTGamePad::mPadMStick[4]; +DUSK_GAME_DATA JUTGamePad::CStick JUTGamePad::mPadMStick[4]; -JUTGamePad::CStick JUTGamePad::mPadSStick[4]; +DUSK_GAME_DATA JUTGamePad::CStick JUTGamePad::mPadSStick[4]; -JUTGamePad::EStickMode JUTGamePad::sStickMode = EStickMode1; +DUSK_GAME_DATA JUTGamePad::EStickMode JUTGamePad::sStickMode = EStickMode1; -int JUTGamePad::sClampMode = EClampStick; +DUSK_GAME_DATA int JUTGamePad::sClampMode = EClampStick; -u32 JUTGamePad::sRumbleSupported; +DUSK_GAME_DATA u32 JUTGamePad::sRumbleSupported; u32 JUTGamePad::read() { sRumbleSupported = PADRead(mPadStatus); @@ -181,21 +181,21 @@ void JUTGamePad::assign() { } } -u8 JUTGamePad::CRumble::mStatus[4]; +DUSK_GAME_DATA u8 JUTGamePad::CRumble::mStatus[4]; -u32 JUTGamePad::CRumble::mEnabled; +DUSK_GAME_DATA u32 JUTGamePad::CRumble::mEnabled; -callbackFn JUTGamePad::C3ButtonReset::sCallback; +DUSK_GAME_DATA callbackFn JUTGamePad::C3ButtonReset::sCallback; -void* JUTGamePad::C3ButtonReset::sCallbackArg; +DUSK_GAME_DATA void* JUTGamePad::C3ButtonReset::sCallbackArg; -OSTime JUTGamePad::C3ButtonReset::sThreshold = (OSTime)(OS_TIMER_CLOCK / 60) * 30; +DUSK_GAME_DATA OSTime JUTGamePad::C3ButtonReset::sThreshold = (OSTime)(OS_TIMER_CLOCK / 60) * 30; -bool JUTGamePad::C3ButtonReset::sResetSwitchPushing; +DUSK_GAME_DATA bool JUTGamePad::C3ButtonReset::sResetSwitchPushing; -bool JUTGamePad::C3ButtonReset::sResetOccurred; +DUSK_GAME_DATA bool JUTGamePad::C3ButtonReset::sResetOccurred; -s32 JUTGamePad::C3ButtonReset::sResetOccurredPort; +DUSK_GAME_DATA s32 JUTGamePad::C3ButtonReset::sResetOccurredPort; void JUTGamePad::checkResetCallback(OSTime holdTime) { if (holdTime >= JUTGamePad::C3ButtonReset::sThreshold) { @@ -208,13 +208,13 @@ void JUTGamePad::checkResetCallback(OSTime holdTime) { } } -f32 JUTGamePad::CStick::sPressPoint = 0.5f; +DUSK_GAME_DATA f32 JUTGamePad::CStick::sPressPoint = 0.5f; -f32 JUTGamePad::CStick::sReleasePoint = 0.25f; +DUSK_GAME_DATA f32 JUTGamePad::CStick::sReleasePoint = 0.25f; -u32 JUTGamePad::C3ButtonReset::sResetPattern = PAD_BUTTON_START | PAD_BUTTON_X | PAD_BUTTON_B; +DUSK_GAME_DATA u32 JUTGamePad::C3ButtonReset::sResetPattern = PAD_BUTTON_START | PAD_BUTTON_X | PAD_BUTTON_B; -u32 JUTGamePad::C3ButtonReset::sResetMaskPattern = 0x0000FFFF; +DUSK_GAME_DATA u32 JUTGamePad::C3ButtonReset::sResetMaskPattern = 0x0000FFFF; void JUTGamePad::update() { if (mPortNum != EPortInvalid) { @@ -269,7 +269,7 @@ void JUTGamePad::update() { } } -JSUList JUTGamePadLongPress::sPatternList(false); +DUSK_GAME_DATA JSUList JUTGamePadLongPress::sPatternList(false); void JUTGamePad::checkResetSwitch() { if (!JUTGamePad::C3ButtonReset::sResetOccurred) { diff --git a/libs/JSystem/src/JUtility/JUTGraphFifo.cpp b/libs/JSystem/src/JUtility/JUTGraphFifo.cpp index 1ffc0da27d..99bbfe7156 100644 --- a/libs/JSystem/src/JUtility/JUTGraphFifo.cpp +++ b/libs/JSystem/src/JUtility/JUTGraphFifo.cpp @@ -6,7 +6,7 @@ static bool data_804514B8; -JUTGraphFifo* JUTGraphFifo::sCurrentFifo; +DUSK_GAME_DATA JUTGraphFifo* JUTGraphFifo::sCurrentFifo; JUTGraphFifo::JUTGraphFifo(u32 size) { mSize = ROUND(size, 0x20); @@ -26,7 +26,7 @@ JUTGraphFifo::JUTGraphFifo(u32 size) { } } -bool JUTGraphFifo::mGpStatus[5]; +DUSK_GAME_DATA bool JUTGraphFifo::mGpStatus[5]; JUTGraphFifo::~JUTGraphFifo() { sCurrentFifo->save(); diff --git a/libs/JSystem/src/JUtility/JUTProcBar.cpp b/libs/JSystem/src/JUtility/JUTProcBar.cpp index 81d55ed3f1..cfcf58fb5c 100644 --- a/libs/JSystem/src/JUtility/JUTProcBar.cpp +++ b/libs/JSystem/src/JUtility/JUTProcBar.cpp @@ -27,7 +27,7 @@ JUTProcBar::JUTProcBar() { mWatchHeap = NULL; } -JUTProcBar* JUTProcBar::sManager; +DUSK_GAME_DATA JUTProcBar* JUTProcBar::sManager; JUTProcBar::~JUTProcBar() { sManager = NULL; diff --git a/libs/JSystem/src/JUtility/JUTResFont.cpp b/libs/JSystem/src/JUtility/JUTResFont.cpp index 63afbc29aa..02b59aa739 100644 --- a/libs/JSystem/src/JUtility/JUTResFont.cpp +++ b/libs/JSystem/src/JUtility/JUTResFont.cpp @@ -143,7 +143,7 @@ void JUTResFont::countBlock() { } } -IsLeadByte_func const JUTResFont::saoAboutEncoding_[3] = { +DUSK_GAME_DATA IsLeadByte_func const JUTResFont::saoAboutEncoding_[3] = { JUTFont::isLeadByte_1Byte, JUTFont::isLeadByte_2Byte, JUTFont::isLeadByte_ShiftJIS, diff --git a/libs/JSystem/src/JUtility/JUTVideo.cpp b/libs/JSystem/src/JUtility/JUTVideo.cpp index 5586342f0e..2135c8fc22 100644 --- a/libs/JSystem/src/JUtility/JUTVideo.cpp +++ b/libs/JSystem/src/JUtility/JUTVideo.cpp @@ -8,11 +8,11 @@ #include "JSystem/JKernel/JKRHeap.h" -JUTVideo* JUTVideo::sManager; +DUSK_GAME_DATA JUTVideo* JUTVideo::sManager; -OSTick JUTVideo::sVideoLastTick; +DUSK_GAME_DATA OSTick JUTVideo::sVideoLastTick; -OSTick JUTVideo::sVideoInterval; +DUSK_GAME_DATA OSTick JUTVideo::sVideoInterval; static bool data_80451544; diff --git a/libs/JSystem/src/JUtility/JUTXfb.cpp b/libs/JSystem/src/JUtility/JUTXfb.cpp index f04a5e93fc..ac66621243 100644 --- a/libs/JSystem/src/JUtility/JUTXfb.cpp +++ b/libs/JSystem/src/JUtility/JUTXfb.cpp @@ -33,7 +33,7 @@ JUTXfb::JUTXfb(GXRenderModeObj const* pObj, JKRHeap* pHeap, JUTXfb::EXfbNumber x } } -JUTXfb* JUTXfb::sManager; +DUSK_GAME_DATA JUTXfb* JUTXfb::sManager; JUTXfb::~JUTXfb() { for (int i = 0; i < 3; i++) { diff --git a/src/DynamicLink.cpp b/src/DynamicLink.cpp index dae7da52de..c1ca5b1775 100644 --- a/src/DynamicLink.cpp +++ b/src/DynamicLink.cpp @@ -142,11 +142,11 @@ DynamicModuleControl::DynamicModuleControl(char const* name) { } #endif -u32 DynamicModuleControl::sAllocBytes; +DUSK_GAME_DATA u32 DynamicModuleControl::sAllocBytes; -JKRArchive* DynamicModuleControl::sArchive; +DUSK_GAME_DATA JKRArchive* DynamicModuleControl::sArchive; -JKRFileCache* DynamicModuleControl::sFileCache; +DUSK_GAME_DATA JKRFileCache* DynamicModuleControl::sFileCache; static const char* baseString = "Base"; diff --git a/src/SSystem/SComponent/c_API.cpp b/src/SSystem/SComponent/c_API.cpp index a6ecf42d75..0db032bb8a 100644 --- a/src/SSystem/SComponent/c_API.cpp +++ b/src/SSystem/SComponent/c_API.cpp @@ -12,7 +12,7 @@ extern int mDoGph_AfterOfDraw(); extern int mDoGph_Painter(); extern int mDoGph_Create(); -cAPI_Interface g_cAPI_Interface = { +DUSK_GAME_DATA cAPI_Interface g_cAPI_Interface = { (cAPIGph_Mthd)mDoGph_Create, (cAPIGph_Mthd)mDoGph_BeforeOfDraw, (cAPIGph_Mthd)mDoGph_AfterOfDraw, diff --git a/src/SSystem/SComponent/c_angle.cpp b/src/SSystem/SComponent/c_angle.cpp index 4d04f980b2..90179b9050 100644 --- a/src/SSystem/SComponent/c_angle.cpp +++ b/src/SSystem/SComponent/c_angle.cpp @@ -7,11 +7,11 @@ extern f32 cM_atan2f(f32, f32); -const cSAngle cSAngle::_0(static_cast(0)); -const cSAngle cSAngle::_1(static_cast(0xb6)); -const cSAngle cSAngle::_90(static_cast(0x4000)); -const cSAngle cSAngle::_180(static_cast(-0x8000)); -const cSAngle cSAngle::_270(static_cast(-0x4000)); +DUSK_GAME_DATA const cSAngle cSAngle::_0(static_cast(0)); +DUSK_GAME_DATA const cSAngle cSAngle::_1(static_cast(0xb6)); +DUSK_GAME_DATA const cSAngle cSAngle::_90(static_cast(0x4000)); +DUSK_GAME_DATA const cSAngle cSAngle::_180(static_cast(-0x8000)); +DUSK_GAME_DATA const cSAngle cSAngle::_270(static_cast(-0x4000)); #ifdef __MWERKS__ cSAngle::cSAngle(const cSAngle& angle) { diff --git a/src/SSystem/SComponent/c_cc_d.cpp b/src/SSystem/SComponent/c_cc_d.cpp index 76c4920b8f..df6fa5b39c 100644 --- a/src/SSystem/SComponent/c_cc_d.cpp +++ b/src/SSystem/SComponent/c_cc_d.cpp @@ -10,7 +10,7 @@ #define CHECK_FLOAT_RANGE(line, x) JUT_ASSERT(line, -1.0e32f < x && x < 1.0e32f); -cXyz cCcD_ShapeAttr::m_virtual_center = cXyz::Zero; +DUSK_GAME_DATA cXyz cCcD_ShapeAttr::m_virtual_center = cXyz::Zero; void cCcD_DivideInfo::Set(u32 xDivInfo, u32 yDivInfo, u32 zDivInfo) { mXDivInfo = xDivInfo; diff --git a/src/SSystem/SComponent/c_counter.cpp b/src/SSystem/SComponent/c_counter.cpp index 7da967f25f..e8ec9b2aeb 100644 --- a/src/SSystem/SComponent/c_counter.cpp +++ b/src/SSystem/SComponent/c_counter.cpp @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_counter.h" -counter_class g_Counter; +DUSK_GAME_DATA counter_class g_Counter; void cCt_Counter(int resetCounter1) { if (resetCounter1 == 1) { diff --git a/src/SSystem/SComponent/c_lib.cpp b/src/SSystem/SComponent/c_lib.cpp index 0f1404642f..2b5bb6e0d8 100644 --- a/src/SSystem/SComponent/c_lib.cpp +++ b/src/SSystem/SComponent/c_lib.cpp @@ -496,7 +496,7 @@ s32 cLib_distanceAngleS(s16 x, s16 y) { static Mtx mtx[10]; -Mtx* calc_mtx = mtx; +DUSK_GAME_DATA Mtx* calc_mtx = mtx; /** * Initializes calc_mtx to mtx stack diff --git a/src/SSystem/SComponent/c_m3d.cpp b/src/SSystem/SComponent/c_m3d.cpp index c44ea66bf8..ae11a5268b 100644 --- a/src/SSystem/SComponent/c_m3d.cpp +++ b/src/SSystem/SComponent/c_m3d.cpp @@ -17,7 +17,7 @@ #define FLT_EPSILON std::numeric_limits::epsilon() #endif -const f32 G_CM3D_F_ABS_MIN = 32 * FLT_EPSILON; +DUSK_GAME_DATA const f32 G_CM3D_F_ABS_MIN = 32 * FLT_EPSILON; void cM3d_InDivPos1(const Vec* pVecA, const Vec* pVecB, f32 pF, Vec* pOut) { Vec tmp; diff --git a/src/SSystem/SComponent/c_malloc.cpp b/src/SSystem/SComponent/c_malloc.cpp index 3de7fcbf62..83956c3a79 100644 --- a/src/SSystem/SComponent/c_malloc.cpp +++ b/src/SSystem/SComponent/c_malloc.cpp @@ -6,7 +6,7 @@ #include "SSystem/SComponent/c_malloc.h" #include "JSystem/JKernel/JKRHeap.h" -JKRHeap* cMl::Heap; +DUSK_GAME_DATA JKRHeap* cMl::Heap; void cMl::init(JKRHeap* heap) { Heap = heap; diff --git a/src/SSystem/SComponent/c_sxyz.cpp b/src/SSystem/SComponent/c_sxyz.cpp index 1679155a20..6204f5f272 100644 --- a/src/SSystem/SComponent/c_sxyz.cpp +++ b/src/SSystem/SComponent/c_sxyz.cpp @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_sxyz.h" -const csXyz csXyz::Zero = csXyz(0, 0, 0); +DUSK_GAME_DATA const csXyz csXyz::Zero = csXyz(0, 0, 0); csXyz::csXyz(s16 x, s16 y, s16 z) { this->x = x; diff --git a/src/SSystem/SComponent/c_xyz.cpp b/src/SSystem/SComponent/c_xyz.cpp index be4214a874..f5b6480e62 100644 --- a/src/SSystem/SComponent/c_xyz.cpp +++ b/src/SSystem/SComponent/c_xyz.cpp @@ -137,11 +137,11 @@ s16 cXyz::atan2sY_XZ() const { return cM_atan2s(-this->y, absXZ()); } -const cXyz cXyz::Zero(0, 0, 0); -const cXyz cXyz::BaseX(1, 0, 0); -const cXyz cXyz::BaseY(0, 1, 0); -const cXyz cXyz::BaseZ(0, 0, 1); -const cXyz cXyz::BaseXY(1, 1, 0); -const cXyz cXyz::BaseXZ(1, 0, 1); -const cXyz cXyz::BaseYZ(0, 1, 1); -const cXyz cXyz::BaseXYZ(1, 1, 1); +DUSK_GAME_DATA const cXyz cXyz::Zero(0, 0, 0); +DUSK_GAME_DATA const cXyz cXyz::BaseX(1, 0, 0); +DUSK_GAME_DATA const cXyz cXyz::BaseY(0, 1, 0); +DUSK_GAME_DATA const cXyz cXyz::BaseZ(0, 0, 1); +DUSK_GAME_DATA const cXyz cXyz::BaseXY(1, 1, 0); +DUSK_GAME_DATA const cXyz cXyz::BaseXZ(1, 0, 1); +DUSK_GAME_DATA const cXyz cXyz::BaseYZ(0, 1, 1); +DUSK_GAME_DATA const cXyz cXyz::BaseXYZ(1, 1, 1); diff --git a/src/Z2AudioLib/Z2AudioMgr.cpp b/src/Z2AudioLib/Z2AudioMgr.cpp index d6d78fb4b7..96d49af096 100644 --- a/src/Z2AudioLib/Z2AudioMgr.cpp +++ b/src/Z2AudioLib/Z2AudioMgr.cpp @@ -19,8 +19,8 @@ #include "Z2AudioCS/Z2AudioCS.h" #endif -Z2AudioMgr* Z2AudioMgr::mAudioMgrPtr; -u8 gMuffleOutOfRangeMic = false; +DUSK_GAME_DATA Z2AudioMgr* Z2AudioMgr::mAudioMgrPtr; +DUSK_GAME_DATA u8 gMuffleOutOfRangeMic = false; Z2AudioMgr::Z2AudioMgr() : mSoundStarter(true) { mAudioMgrPtr = this; diff --git a/src/Z2AudioLib/Z2Calc.cpp b/src/Z2AudioLib/Z2Calc.cpp index 0082ca0e9b..529bd7afd0 100644 --- a/src/Z2AudioLib/Z2Calc.cpp +++ b/src/Z2AudioLib/Z2Calc.cpp @@ -19,9 +19,9 @@ f32 Z2Calc::linearTransform(f32 inValue, f32 inMin, f32 inMax, f32 outMin, f32 o } } -const f32 Z2Calc::cEqualCSlope = 1.0f; +DUSK_GAME_DATA const f32 Z2Calc::cEqualCSlope = 1.0f; -const f32 Z2Calc::cEqualPSlope = 0.5f; +DUSK_GAME_DATA const f32 Z2Calc::cEqualPSlope = 0.5f; f32 Z2Calc::getParamByExp(f32 value, f32 inMin, f32 inMax, f32 exponent, f32 outMin, f32 outMax, Z2Calc::CurveSign curveSign) { if (curveSign == Z2Calc::CURVE_POSITIVE) { diff --git a/src/Z2AudioLib/Z2Creature.cpp b/src/Z2AudioLib/Z2Creature.cpp index 7a27e9e9c4..f7d7a2924a 100644 --- a/src/Z2AudioLib/Z2Creature.cpp +++ b/src/Z2AudioLib/Z2Creature.cpp @@ -10,8 +10,8 @@ static void Z2_E_ms_modVol(Z2SoundHandlePool*, u32); static void Z2_E_mm_modPitch(Z2SoundHandlePool*, u32); static void Z2_B_zan_modPitch(Z2SoundHandlePool*, u32); -s8 data_80451358; -s8 data_80451359; +DUSK_GAME_DATA s8 data_80451358; +DUSK_GAME_DATA s8 data_80451359; static Z2EnemyArea const sAreaDefault = {true, 700, 1100, 1500}; diff --git a/src/Z2AudioLib/Z2DebugSys.cpp b/src/Z2AudioLib/Z2DebugSys.cpp index 2764365bc4..5082ff1b3a 100644 --- a/src/Z2AudioLib/Z2DebugSys.cpp +++ b/src/Z2AudioLib/Z2DebugSys.cpp @@ -121,7 +121,7 @@ JAISeqDataMgr* Z2DebugSys::initSeSeqDataMgr(const void* param_1) { u8 gMicOn = true; u8 gMicOffWhenOutOfSight = true; -extern u8 gMuffleOutOfRangeMic; +DUSK_GAME_EXTERN u8 gMuffleOutOfRangeMic; void Z2ParamNode::message(JAHControl& ctrl) { ctrl.makeComment("**** 各種パラメータ編集用ノード ****", 0, 5, 0); diff --git a/src/Z2AudioLib/Z2LinkMgr.cpp b/src/Z2AudioLib/Z2LinkMgr.cpp index 818dfe099e..c759950f0d 100644 --- a/src/Z2AudioLib/Z2LinkMgr.cpp +++ b/src/Z2AudioLib/Z2LinkMgr.cpp @@ -47,7 +47,7 @@ void Z2CreatureLink::setLinkBootsType(s32 bootsType) { } } -Z2CreatureLink* Z2CreatureLink::mLinkPtr; +DUSK_GAME_DATA Z2CreatureLink* Z2CreatureLink::mLinkPtr; Z2CreatureLink::Z2CreatureLink() { mLinkState = 0; diff --git a/src/Z2AudioLib/Z2Param.cpp b/src/Z2AudioLib/Z2Param.cpp index d081c73b07..e1915eb426 100644 --- a/src/Z2AudioLib/Z2Param.cpp +++ b/src/Z2AudioLib/Z2Param.cpp @@ -5,81 +5,81 @@ #include "Z2AudioLib/Z2Param.h" -f32 Z2Param::DISTANCE_MAX = 2000.0f; +DUSK_GAME_DATA f32 Z2Param::DISTANCE_MAX = 2000.0f; -f32 Z2Param::MAX_VOLUME_DISTANCE = 300.0f; +DUSK_GAME_DATA f32 Z2Param::MAX_VOLUME_DISTANCE = 300.0f; -f32 Z2Param::DOLBY_CENTER_VALUE = 0.3f; +DUSK_GAME_DATA f32 Z2Param::DOLBY_CENTER_VALUE = 0.3f; -f32 Z2Param::DOLBY_FLONT_DISTANCE_MAX = -300.0f; +DUSK_GAME_DATA f32 Z2Param::DOLBY_FLONT_DISTANCE_MAX = -300.0f; -f32 Z2Param::DOLBY_BEHIND_DISTANCE_MAX = 600.0f; +DUSK_GAME_DATA f32 Z2Param::DOLBY_BEHIND_DISTANCE_MAX = 600.0f; -f32 Z2Param::DISTANCE_FX_PARAM = 10.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::DISTANCE_FX_PARAM = 10.0f / 127.0f; -f32 Z2Param::SONIC_SPEED = 360.0f; +DUSK_GAME_DATA f32 Z2Param::SONIC_SPEED = 360.0f; -f32 Z2Param::VOL_BGM_DEFAULT = 1.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_BGM_DEFAULT = 1.0f; -f32 Z2Param::VOL_SE_SYSTEM_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_SYSTEM_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_VOICE_DEFAULT = 1.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_VOICE_DEFAULT = 1.0f; -f32 Z2Param::VOL_SE_LINK_MOTION_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_MOTION_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_FOOTNOTE_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_FOOTNOTE_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_CHAR_VOICE_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_CHAR_VOICE_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_CHAR_MOVE_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_CHAR_MOVE_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_OBJECT_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_OBJECT_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_ATMOSPHERE_DEFAULT = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_ATMOSPHERE_DEFAULT = 120.0f / 127.0f; -f32 Z2Param::VOL_BGM_TALKING = 0.5f; +DUSK_GAME_DATA f32 Z2Param::VOL_BGM_TALKING = 0.5f; -f32 Z2Param::VOL_SE_SYSTEM_TALKING = 112.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_SYSTEM_TALKING = 112.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_VOICE_TALKING = 104.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_VOICE_TALKING = 104.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_MOTION_TALKING = 96.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_MOTION_TALKING = 96.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_FOOTNOTE_TALKING = 96.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_FOOTNOTE_TALKING = 96.0f / 127.0f; -f32 Z2Param::VOL_SE_CHAR_VOICE_TALKING = 120.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_CHAR_VOICE_TALKING = 120.0f / 127.0f; -f32 Z2Param::VOL_SE_CHAR_MOVE_TALKING = 119.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_CHAR_MOVE_TALKING = 119.0f / 127.0f; -f32 Z2Param::VOL_SE_OBJECT_TALKING = 96.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_OBJECT_TALKING = 96.0f / 127.0f; -f32 Z2Param::VOL_SE_ATMOSPHERE_TALKING = 96.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_ATMOSPHERE_TALKING = 96.0f / 127.0f; -f32 Z2Param::VOL_BGM_PAUSING = 0.3f; +DUSK_GAME_DATA f32 Z2Param::VOL_BGM_PAUSING = 0.3f; -f32 Z2Param::VOL_SE_SYSTEM_PAUSING = 112.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_SYSTEM_PAUSING = 112.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_VOICE_PAUSING = 80.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_VOICE_PAUSING = 80.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_MOTION_PAUSING = 72.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_MOTION_PAUSING = 72.0f / 127.0f; -f32 Z2Param::VOL_SE_LINK_FOOTNOTE_PAUSING = 72.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_LINK_FOOTNOTE_PAUSING = 72.0f / 127.0f; -f32 Z2Param::VOL_SE_CHAR_VOICE_PAUSING = 72.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_CHAR_VOICE_PAUSING = 72.0f / 127.0f; -f32 Z2Param::VOL_SE_CHAR_MOVE_PAUSING = 72.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_CHAR_MOVE_PAUSING = 72.0f / 127.0f; -f32 Z2Param::VOL_SE_OBJECT_PAUSING = 72.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_OBJECT_PAUSING = 72.0f / 127.0f; -f32 Z2Param::VOL_SE_ATMOSPHERE_PAUSING = 72.0f / 127.0f; +DUSK_GAME_DATA f32 Z2Param::VOL_SE_ATMOSPHERE_PAUSING = 72.0f / 127.0f; -u8 Z2Param::SCENE_CHANGE_BGM_FADEOUT_TIME = 33; +DUSK_GAME_DATA u8 Z2Param::SCENE_CHANGE_BGM_FADEOUT_TIME = 33; -u8 Z2Param::BGM_CROSS_FADEIN_TIME = 60; +DUSK_GAME_DATA u8 Z2Param::BGM_CROSS_FADEIN_TIME = 60; -u8 Z2Param::BGM_CROSS_FADEOUT_TIME = 60; +DUSK_GAME_DATA u8 Z2Param::BGM_CROSS_FADEOUT_TIME = 60; -u8 Z2Param::BATTLE_BGM_WAIT_TIME = 30; +DUSK_GAME_DATA u8 Z2Param::BATTLE_BGM_WAIT_TIME = 30; #if DEBUG f32 Z2Param::ENEMY_NEARBY_DIST = 700.0f; @@ -87,23 +87,23 @@ f32 Z2Param::BATTLE_FADEIN_DIST = 1100.0f; f32 Z2Param::BATTLE_FADEOUT_DIST = 1500.0f; #endif -u8 Z2Param::FOUND_TRACK_FI_TIME = 20; +DUSK_GAME_DATA u8 Z2Param::FOUND_TRACK_FI_TIME = 20; -u8 Z2Param::FOUND_TRACK_FO_TIME = 30; +DUSK_GAME_DATA u8 Z2Param::FOUND_TRACK_FO_TIME = 30; -u8 Z2Param::CLOSE_BATTLE_TRACK_FI_TIME = 10; +DUSK_GAME_DATA u8 Z2Param::CLOSE_BATTLE_TRACK_FI_TIME = 10; -u8 Z2Param::CLOSE_BATTLE_TRACK_FO_TIME = 30; +DUSK_GAME_DATA u8 Z2Param::CLOSE_BATTLE_TRACK_FO_TIME = 30; -u8 Z2Param::ENDING_BLOW_VOL_DOWN_TIME = 1; +DUSK_GAME_DATA u8 Z2Param::ENDING_BLOW_VOL_DOWN_TIME = 1; -u8 Z2Param::ENDING_BLOW_VOL_LOWER_TIME = 10; +DUSK_GAME_DATA u8 Z2Param::ENDING_BLOW_VOL_LOWER_TIME = 10; -u8 Z2Param::ENDING_BLOW_VOL_LOWER_RECOVER_TIME = 30; +DUSK_GAME_DATA u8 Z2Param::ENDING_BLOW_VOL_LOWER_RECOVER_TIME = 30; -u8 Z2Param::ENDING_BLOW_MIN_FINISH_TIME = 20; +DUSK_GAME_DATA u8 Z2Param::ENDING_BLOW_MIN_FINISH_TIME = 20; -u8 data_8045086C = 1; +DUSK_GAME_DATA u8 data_8045086C = 1; #if DEBUG f32 Z2Param::AUDIBLE_DELTA_RANGE_VOLUME = 0.25f; @@ -111,12 +111,12 @@ f32 Z2Param::AUDIBLE_DELTA_RANGE_PAN = 0.15f; f32 Z2Param::AUDIBLE_DELTA_RANGE_DOLBY = 0.15f; #endif -f32 Z2Param::MIN_DISTANCE_VOLUME; +DUSK_GAME_DATA f32 Z2Param::MIN_DISTANCE_VOLUME; -f32 Z2Param::ENEMY_LASTHIT_MUTE_VOLUME; +DUSK_GAME_DATA f32 Z2Param::ENEMY_LASTHIT_MUTE_VOLUME; -u8 Z2Param::DARK_SE_FILTER_ON; +DUSK_GAME_DATA u8 Z2Param::DARK_SE_FILTER_ON; -u8 Z2Param::DARK_SE_LOW_PASS_FILTER_SETTING; +DUSK_GAME_DATA u8 Z2Param::DARK_SE_LOW_PASS_FILTER_SETTING; -u8 Z2Param::SYSTEM_SE_USE_DARK_SE_SETTING; +DUSK_GAME_DATA u8 Z2Param::SYSTEM_SE_USE_DARK_SE_SETTING; diff --git a/src/Z2AudioLib/Z2SoundInfo.cpp b/src/Z2AudioLib/Z2SoundInfo.cpp index a298213dca..cb67b4c805 100644 --- a/src/Z2AudioLib/Z2SoundInfo.cpp +++ b/src/Z2AudioLib/Z2SoundInfo.cpp @@ -8,7 +8,7 @@ #include "Z2AudioLib/Z2Calc.h" struct JAUStdSoundTableType { - static const u32 STRM_CH_SHIFT; + static DUSK_GAME_DATA const u32 STRM_CH_SHIFT; struct StringOffset { static inline const char* getString(const void* addr, u32 offset) { return (const char*)addr + offset; @@ -230,7 +230,7 @@ void Z2SoundInfo::getSeqInfo(JAISoundID soundID, JAISeq* seqPtr) const { getSoundInfo_(soundID, seqPtr); } -const u32 JAUStdSoundTableType::STRM_CH_SHIFT = 2; +DUSK_GAME_DATA const u32 JAUStdSoundTableType::STRM_CH_SHIFT = 2; void Z2SoundInfo::getStreamInfo(JAISoundID soundID, JAIStream* streamPtr) const { int numChild; diff --git a/src/Z2AudioLib/Z2SpeechMgr2.cpp b/src/Z2AudioLib/Z2SpeechMgr2.cpp index 8b1402ff5b..914098fa36 100644 --- a/src/Z2AudioLib/Z2SpeechMgr2.cpp +++ b/src/Z2AudioLib/Z2SpeechMgr2.cpp @@ -19,61 +19,61 @@ struct Z2MdnPrm { u8 tailNum2; }; - static Unit const sReply[50]; - static u8 const sReplyTail[10]; + static DUSK_GAME_DATA Unit const sReply[50]; + static DUSK_GAME_DATA u8 const sReplyTail[10]; - static Unit const sJoke[50]; - static u8 const sJokeTail[10]; + static DUSK_GAME_DATA Unit const sJoke[50]; + static DUSK_GAME_DATA u8 const sJokeTail[10]; - static Unit const sSexy[50]; - static u8 const sSexyTail[10]; + static DUSK_GAME_DATA Unit const sSexy[50]; + static DUSK_GAME_DATA u8 const sSexyTail[10]; - static Unit const sRidicule[50]; - static u8 const sRidiculeTail[10]; + static DUSK_GAME_DATA Unit const sRidicule[50]; + static DUSK_GAME_DATA u8 const sRidiculeTail[10]; - static Unit const sBoring[54]; - static u8 const sBoringTail[6]; + static DUSK_GAME_DATA Unit const sBoring[54]; + static DUSK_GAME_DATA u8 const sBoringTail[6]; - static Unit const sIrritated[47]; - static u8 const sIrritatedTail[10]; + static DUSK_GAME_DATA Unit const sIrritated[47]; + static DUSK_GAME_DATA u8 const sIrritatedTail[10]; - static Unit const sOrder[57]; - static u8 const sOrderTail[6]; + static DUSK_GAME_DATA Unit const sOrder[57]; + static DUSK_GAME_DATA u8 const sOrderTail[6]; - static Unit const sResent[53]; - static u8 const sResentTail[5]; + static DUSK_GAME_DATA Unit const sResent[53]; + static DUSK_GAME_DATA u8 const sResentTail[5]; - static Unit const sCheerful[53]; - static u8 const sCheerfulTail[8]; + static DUSK_GAME_DATA Unit const sCheerful[53]; + static DUSK_GAME_DATA u8 const sCheerfulTail[8]; - static Unit const sConfused[53]; - static u8 const sConfusedTail[5]; + static DUSK_GAME_DATA Unit const sConfused[53]; + static DUSK_GAME_DATA u8 const sConfusedTail[5]; - static Unit const sHostility[52]; - static u8 const sHostilityTail[7]; + static DUSK_GAME_DATA Unit const sHostility[52]; + static DUSK_GAME_DATA u8 const sHostilityTail[7]; - static Unit const sTired[53]; - static u8 const sTiredTail[8]; + static DUSK_GAME_DATA Unit const sTired[53]; + static DUSK_GAME_DATA u8 const sTiredTail[8]; - static Unit const sSerious[53]; - static u8 const sSeriousTail[7]; + static DUSK_GAME_DATA Unit const sSerious[53]; + static DUSK_GAME_DATA u8 const sSeriousTail[7]; - static Unit const sReplyb[42]; - static u8 const sReplybTail[7]; + static DUSK_GAME_DATA Unit const sReplyb[42]; + static DUSK_GAME_DATA u8 const sReplybTail[7]; - static Unit const sApologize[50]; - static u8 const sApologizeTail[9]; + static DUSK_GAME_DATA Unit const sApologize[50]; + static DUSK_GAME_DATA u8 const sApologizeTail[9]; - static Unit const sDeside[50]; - static u8 const sDesideTail[8]; + static DUSK_GAME_DATA Unit const sDeside[50]; + static DUSK_GAME_DATA u8 const sDesideTail[8]; - static Unit const sAfford[52]; - static u8 const sAffordTail[12]; + static DUSK_GAME_DATA Unit const sAfford[52]; + static DUSK_GAME_DATA u8 const sAffordTail[12]; - static Prm const sPrm[17]; + static DUSK_GAME_DATA Prm const sPrm[17]; }; -Z2MdnPrm::Unit const Z2MdnPrm::sReply[50] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sReply[50] = { 0x6A, 0x8A, 0x50, 0x5F, 0x53, 0x37, 0x37, 0x4F, 0x4F, 0x5E, 0xAA, 0x46, 0x52, 0x5A, 0x5A, 0x4F, 0x4F, 0x45, 0x45, 0x56, 0x64, 0x79, 0x79, 0x79, 0x87, 0x95, 0x95, 0x89, 0x89, 0x4C, 0x4C, 0x4B, 0x52, 0x41, 0x41, 0x5B, 0x5F, 0x71, 0x53, 0x47, 0x89, 0x7D, 0x77, 0x88, 0x88, @@ -83,11 +83,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sReply[50] = { 0x71, 0x85, 0x85, 0xA2, 0xA2, 0x52, 0x52, 0x5C, 0x5C, 0x75, }; -u8 const Z2MdnPrm::sReplyTail[10] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sReplyTail[10] = { 0x5E, 0x7F, 0x68, 0x39, 0x56, 0x75, 0x47, 0x71, 0x7D, 0x33, }; -Z2MdnPrm::Unit const Z2MdnPrm::sJoke[50] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sJoke[50] = { 0x68, 0x57, 0x57, 0x55, 0x55, 0x51, 0x5B, 0x64, 0x6B, 0x7B, 0x7B, 0x5C, 0x77, 0x97, 0x8D, 0x97, 0x97, 0x8D, 0x66, 0x69, 0xA2, 0x5C, 0x87, 0x4F, 0x69, 0x5F, 0x5F, 0x83, 0x83, 0x82, 0x7F, 0x96, 0x96, 0xB0, 0x70, 0xA1, 0x6D, 0x6D, 0x6D, 0x59, 0x4C, 0x4B, 0x5A, 0x40, 0x4A, @@ -97,11 +97,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sJoke[50] = { 0x45, 0x45, 0x29, 0x4C, 0x4B, 0x64, 0x64, 0x60, 0x5C, 0xB1, }; -u8 const Z2MdnPrm::sJokeTail[10] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sJokeTail[10] = { 0x51, 0x97, 0x60, 0xB0, 0x6F, 0x5E, 0x5A, 0xA6, 0x4F, 0x4F, }; -Z2MdnPrm::Unit const Z2MdnPrm::sSexy[50] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sSexy[50] = { 0x5E, 0x60, 0x5F, 0x63, 0x63, 0x72, 0x72, 0x78, 0x4D, 0x7A, 0x6E, 0x6E, 0x6E, 0x6E, 0x6E, 0x59, 0x59, 0x7A, 0x7A, 0xA5, 0x90, 0x8D, 0x86, 0x62, 0x72, 0x79, 0x79, 0x86, 0x7F, 0x8B, 0x85, 0x7B, 0x7B, 0x5E, 0x5E, 0x6D, 0x6D, 0x88, 0x5F, 0xA3, 0xA3, 0x95, 0x95, 0x7F, 0x79, @@ -111,11 +111,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sSexy[50] = { 0x79, 0x65, 0x65, 0x4A, 0x5C, 0x78, 0x78, 0x8B, 0x8D, 0x7C, }; -u8 const Z2MdnPrm::sSexyTail[10] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sSexyTail[10] = { 0x52, 0x79, 0x82, 0xA5, 0x62, 0x86, 0x3F, 0x7D, 0x57, 0x7C, }; -Z2MdnPrm::Unit const Z2MdnPrm::sRidicule[50] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sRidicule[50] = { 0xA7, 0x5A, 0x5A, 0x52, 0x52, 0x85, 0x85, 0x8C, 0x63, 0x73, 0x73, 0x90, 0x50, 0x46, 0x74, 0x74, 0xA3, 0xA7, 0x41, 0x51, 0x58, 0x34, 0x34, 0x2A, 0x5A, 0x81, 0x5D, 0x42, 0x4B, 0x70, 0x70, 0xB1, 0xB1, 0xB1, 0xB1, 0x65, 0x6A, 0xB1, 0x54, 0xA8, 0xA8, 0x6B, 0x6C, 0x55, 0x55, @@ -125,11 +125,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sRidicule[50] = { 0x2D, 0x2D, 0x2D, 0x8C, 0x8C, 0x8B, 0x8B, 0x93, 0x93, 0x6E, }; -u8 const Z2MdnPrm::sRidiculeTail[10] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sRidiculeTail[10] = { 0x81, 0x67, 0x6D, 0x8C, 0x90, 0x85, 0xB1, 0x4D, 0x4F, 0x6E, }; -Z2MdnPrm::Unit const Z2MdnPrm::sBoring[54] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sBoring[54] = { 0x8E, 0x9C, 0x9C, 0x5A, 0x5A, 0x52, 0x52, 0x5B, 0x5C, 0x56, 0x5C, 0x52, 0x52, 0x2D, 0x2D, 0x5B, 0x59, 0x56, 0x56, 0x56, 0x56, 0x6B, 0x6B, 0x58, 0x4C, 0x8E, 0x8E, 0x59, 0x61, 0x54, 0xA0, 0x4D, 0x5D, 0x59, 0x48, 0x30, 0x30, 0x5B, 0x5B, 0x5B, 0x4A, 0x64, 0x64, 0x7A, 0x7A, 0x92, 0x62, 0x62, @@ -139,11 +139,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sBoring[54] = { 0x5B, 0x5E, 0x70, 0x56, 0x56, 0x4C, 0x4C, 0x59, 0x59, 0x5B, 0x5B, 0x71, }; -u8 const Z2MdnPrm::sBoringTail[6] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sBoringTail[6] = { 0x92, 0x58, 0x59, 0x5B, 0x70, 0x71, }; -Z2MdnPrm::Unit const Z2MdnPrm::sIrritated[47] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sIrritated[47] = { 0x6C, 0x91, 0x67, 0x8B, 0x8B, 0xA2, 0xA2, 0xAB, 0x48, 0x64, 0x73, 0x61, 0x61, 0x64, 0x64, 0x6D, 0x60, 0x7E, 0x4A, 0x55, 0x6A, 0x63, 0x66, 0x78, 0x5C, 0x5A, 0x6E, 0x79, 0x75, 0x62, 0x62, 0x57, 0x85, 0x3F, 0x3C, 0x83, 0x83, 0x9B, 0x78, 0x65, 0x65, 0x67, 0x65, 0x65, 0x87, 0x88, 0x88, 0x3D, @@ -152,11 +152,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sIrritated[47] = { 0xAD, 0x6E, 0x72, 0x82, 0x83, 0x87, 0x85, 0x85, 0x85, 0x8E, 0x60, 0x6D, 0x80, 0x80, }; -u8 const Z2MdnPrm::sIrritatedTail[10] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sIrritatedTail[10] = { 0x64, 0x61, 0x4E, 0x91, 0xA0, 0x85, 0x9B, 0x67, 0x6F, 0x64, }; -Z2MdnPrm::Unit const Z2MdnPrm::sOrder[57] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sOrder[57] = { 0x77, 0x5F, 0x5F, 0x73, 0x73, 0x66, 0x66, 0x6B, 0x6B, 0x7A, 0x7A, 0x60, 0x54, 0x5F, 0x5F, 0x69, 0x69, 0x5A, 0x86, 0x84, 0x84, 0x96, 0x96, 0x94, 0x94, 0x8A, 0x87, 0x84, 0x5A, 0x2C, 0x4E, 0x52, 0x52, 0x52, 0x52, 0x51, 0x51, 0x6E, 0x62, 0x5E, 0x6C, 0xA3, 0xA3, 0x5B, 0x62, @@ -167,11 +167,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sOrder[57] = { 0x48, 0x48, 0x69, 0x69, 0x6D, 0x6D, 0x94, 0x94, 0x97, }; -u8 const Z2MdnPrm::sOrderTail[6] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sOrderTail[6] = { 0x60, 0xA8, 0x5B, 0x4E, 0x5D, 0x87, }; -Z2MdnPrm::Unit const Z2MdnPrm::sResent[53] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sResent[53] = { 0x6F, 0x5F, 0x5F, 0x66, 0x66, 0x66, 0x66, 0x55, 0x55, 0x55, 0x55, 0x4B, 0x4B, 0x6B, 0x6B, 0x86, 0x86, 0x4A, 0x4A, 0x6D, 0x6D, 0x6D, 0x6D, 0x8C, 0x8C, 0x84, 0x84, 0x64, 0x64, 0x6C, 0x6C, 0x92, 0x92, 0x6A, 0x5F, 0x6F, 0x6F, 0x62, 0x62, 0x62, 0x75, 0x5A, 0x5A, 0x5A, 0x5A, 0x60, 0x60, 0x6A, @@ -181,11 +181,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sResent[53] = { 0x5E, 0xAA, 0xAA, 0x9E, 0x9E, 0x5A, 0x5A, 0x57, 0x57, 0x57, }; -u8 const Z2MdnPrm::sResentTail[5] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sResentTail[5] = { 0x4A, 0x98, 0x8A, 0x7E, 0x57, }; -Z2MdnPrm::Unit const Z2MdnPrm::sCheerful[53] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sCheerful[53] = { 0x64, 0x6D, 0x6D, 0x6D, 0x99, 0x6D, 0x40, 0x51, 0x51, 0x6F, 0x6F, 0x66, 0x66, 0x60, 0xA7, 0xAF, 0xB3, 0x61, 0x61, 0xA7, 0xA7, 0x5E, 0x8B, 0x75, 0x77, 0x72, 0x72, 0x93, 0x93, 0x8B, 0x8B, 0x88, 0x88, 0x77, 0x77, 0x80, 0x80, 0x80, 0x80, 0x67, 0x67, 0x4D, 0x4A, 0x69, 0x44, 0xA1, 0x64, 0xA8, @@ -195,11 +195,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sCheerful[53] = { 0x65, 0x70, 0x6B, 0x6B, 0x6B, 0x6D, 0x6D, 0x57, 0x57, 0x7B, }; -u8 const Z2MdnPrm::sCheerfulTail[8] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sCheerfulTail[8] = { 0x60, 0x6D, 0x4D, 0x44, 0x9C, 0x54, 0x70, 0x7B, }; -Z2MdnPrm::Unit const Z2MdnPrm::sConfused[53] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sConfused[53] = { 0x83, 0x80, 0x80, 0x82, 0x82, 0x82, 0x82, 0x5B, 0x75, 0x84, 0x84, 0x84, 0x84, 0x75, 0x75, 0x62, 0x62, 0x62, 0x4D, 0x56, 0x56, 0x59, 0x59, 0x59, 0x59, 0x74, 0x74, 0x85, 0x7D, 0x8D, 0x8D, 0x70, 0x70, 0x5A, 0x5A, 0x6B, 0x6B, 0x6B, 0x6B, 0x70, 0x79, 0x73, 0x73, 0x71, 0x71, 0x75, 0x75, 0x7B, @@ -209,11 +209,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sConfused[53] = { 0x38, 0x38, 0x38, 0x83, 0x83, 0x8E, 0x8E, 0x4C, 0x56, 0x56, }; -u8 const Z2MdnPrm::sConfusedTail[5] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sConfusedTail[5] = { 0x2C, 0x42, 0x4C, 0x7C, 0x49, }; -Z2MdnPrm::Unit const Z2MdnPrm::sHostility[52] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sHostility[52] = { 0x85, 0x71, 0x71, 0x73, 0x73, 0x3B, 0x62, 0x84, 0x94, 0x94, 0x94, 0xAF, 0x98, 0xAD, 0xAD, 0x5A, 0x5A, 0x63, 0x63, 0x97, 0x90, 0x90, 0x7B, 0x73, 0x73, 0x63, 0x63, 0x55, 0x55, 0x65, 0x66, 0x7F, 0x7F, 0x87, 0x87, 0x8A, 0x8A, 0x94, 0x5D, 0x5C, 0x5A, 0x67, 0x67, 0x68, 0x68, @@ -223,11 +223,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sHostility[52] = { 0x62, 0x6A, 0x5F, 0x72, 0x72, 0x62, 0x62, 0x65, 0x5E, 0x69, 0x69, 0x63, 0x63, 0x7F, }; -u8 const Z2MdnPrm::sHostilityTail[7] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sHostilityTail[7] = { 0x97, 0x67, 0x94, 0x6A, 0x66, 0x4F, 0x6A, }; -Z2MdnPrm::Unit const Z2MdnPrm::sTired[53] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sTired[53] = { 0x70, 0x70, 0x70, 0x5C, 0x5C, 0x5C, 0x6F, 0x6F, 0x6F, 0x93, 0x8C, 0x9A, 0x9D, 0x89, 0x99, 0x7A, 0x91, 0x8D, 0x8D, 0x8D, 0x8D, 0x69, 0x69, 0x72, 0x72, 0x65, 0x65, 0x65, 0x9E, 0x98, 0x98, 0x2A, 0x50, 0x54, 0x54, 0x49, 0x64, 0x59, 0x59, 0x62, 0x62, 0x62, 0x44, 0x5E, 0x9F, 0x91, 0x63, 0x63, @@ -237,11 +237,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sTired[53] = { 0x84, 0x6D, 0x6D, 0x6A, 0x6A, 0x8D, 0x8D, 0x8D, 0x8D, 0x3B, }; -u8 const Z2MdnPrm::sTiredTail[8] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sTiredTail[8] = { 0x66, 0x6F, 0x3B, 0x7A, 0x49, 0x91, 0x5C, 0x6A, }; -Z2MdnPrm::Unit const Z2MdnPrm::sSerious[53] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sSerious[53] = { 0x52, 0x65, 0x65, 0x72, 0x5A, 0x61, 0x61, 0x7B, 0x80, 0x92, 0x93, 0x9D, 0x9D, 0x70, 0x79, 0x76, 0x62, 0x57, 0x5A, 0x53, 0x53, 0x59, 0x59, 0x65, 0x63, 0x60, 0x60, 0x6A, 0x83, 0x80, 0x7F, 0x5D, 0x5C, 0x45, 0x5D, 0x71, 0x72, 0x65, 0x65, 0x65, 0x66, 0x4B, 0xB2, 0x60, 0x5C, 0x5C, 0x5C, 0x5B, @@ -251,11 +251,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sSerious[53] = { 0x70, 0x60, 0x3C, 0x81, 0x81, 0x92, 0x92, 0x8E, 0x98, 0x87, }; -u8 const Z2MdnPrm::sSeriousTail[7] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sSeriousTail[7] = { 0x7B, 0x69, 0x4B, 0x61, 0x52, 0x59, 0x87, }; -Z2MdnPrm::Unit const Z2MdnPrm::sReplyb[42] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sReplyb[42] = { 0x5C, 0x45, 0x45, 0x71, 0x9F, 0x57, 0xB4, 0xB4, 0x56, 0x62, 0x8E, 0x61, 0x61, 0xB0, 0xB0, 0x3C, 0x59, 0x4A, 0x64, 0xA4, 0xA4, 0x5A, 0x5A, 0x5A, 0x5A, 0x72, 0x72, 0x4B, 0x6B, 0x97, 0x97, 0x59, 0x60, 0x60, 0x60, 0x69, 0x3E, 0x3E, 0x57, 0x42, 0x5E, 0x76, @@ -264,11 +264,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sReplyb[42] = { 0x44, 0x4F, 0x52, 0x58, 0x5A, 0x6F, 0x6E, 0x8A, 0x8E, 0x8E, 0x8E, 0x8C, 0x8C, 0x9B, }; -u8 const Z2MdnPrm::sReplybTail[7] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sReplybTail[7] = { 0x4F, 0x4A, 0xA2, 0x4F, 0x65, 0x98, 0x5C, }; -Z2MdnPrm::Unit const Z2MdnPrm::sApologize[50] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sApologize[50] = { 0x6A, 0x6A, 0x6A, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x57, 0x57, 0x57, 0x63, 0x61, 0x54, 0x54, 0x54, 0x54, 0x58, 0x58, 0x58, 0x58, 0x45, 0x45, 0x56, 0x56, 0x5B, 0x5B, 0x37, 0x53, 0x53, 0x53, 0x59, 0x59, 0x59, 0x49, 0x58, 0x58, 0x55, 0x56, 0x56, 0x83, 0x7F, 0x7F, @@ -278,11 +278,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sApologize[50] = { 0x64, 0x60, 0x61, 0x63, 0x6A, 0x62, 0x62, 0x64, 0x65, 0x71, }; -u8 const Z2MdnPrm::sApologizeTail[9] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sApologizeTail[9] = { 0x7C, 0x6E, 0x63, 0x71, 0x51, 0x37, 0x75, 0x58, 0x5C, }; -Z2MdnPrm::Unit const Z2MdnPrm::sDeside[50] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sDeside[50] = { 0x77, 0x77, 0x77, 0x58, 0x58, 0x6F, 0x78, 0x5F, 0x66, 0x5E, 0x6E, 0x62, 0x62, 0x2E, 0x5A, 0x58, 0x54, 0x52, 0x52, 0x5C, 0x59, 0x56, 0x56, 0x4B, 0x4B, 0x63, 0x63, 0x4D, 0x4E, 0x4A, 0x69, 0x71, 0x71, 0x76, 0x80, 0x80, 0x80, 0x73, 0x73, 0x5C, 0x7C, 0x64, 0x83, 0x89, 0x89, @@ -292,11 +292,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sDeside[50] = { 0x75, 0x6A, 0x66, 0x76, 0x69, 0x69, 0x69, 0x60, 0x60, 0x5F, }; -u8 const Z2MdnPrm::sDesideTail[8] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sDesideTail[8] = { 0x64, 0x2E, 0x4A, 0x57, 0x80, 0x48, 0x7C, 0x5F, }; -Z2MdnPrm::Unit const Z2MdnPrm::sAfford[52] = { +DUSK_GAME_DATA Z2MdnPrm::Unit const Z2MdnPrm::sAfford[52] = { 0x4E, 0x45, 0x52, 0x5B, 0x56, 0x5B, 0x59, 0x52, 0x52, 0x57, 0x5C, 0x50, 0x50, 0x49, 0x80, 0x6E, 0x6E, 0x5A, 0x5C, 0x60, 0x6A, 0x62, 0x62, 0x6A, 0x71, 0x48, 0x4C, 0x5B, 0x5A, 0x40, 0x40, 0x49, 0x49, 0x50, 0x51, 0x51, 0x51, 0x3A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x57, 0x57, @@ -306,11 +306,11 @@ Z2MdnPrm::Unit const Z2MdnPrm::sAfford[52] = { 0x63, 0x5D, 0x69, 0x70, 0x56, 0x50, 0x4B, 0x92, 0x86, 0x8F, 0x4B, 0x4F, 0x57, 0x56, }; -u8 const Z2MdnPrm::sAffordTail[12] = { +DUSK_GAME_DATA u8 const Z2MdnPrm::sAffordTail[12] = { 0x63, 0x8E, 0x5B, 0x59, 0x4C, 0x3A, 0x69, 0x47, 0x41, 0x59, 0x50, 0x55, }; -const Z2MdnPrm::Prm Z2MdnPrm::sPrm[17] = { +DUSK_GAME_DATA const Z2MdnPrm::Prm Z2MdnPrm::sPrm[17] = { {Z2MdnPrm::sReply, Z2MdnPrm::sReplyTail, ARRAY_SIZE(Z2MdnPrm::sReply), 6, 4}, {Z2MdnPrm::sJoke, Z2MdnPrm::sJokeTail, ARRAY_SIZE(Z2MdnPrm::sJoke), 3, 7}, {Z2MdnPrm::sSexy, Z2MdnPrm::sSexyTail, ARRAY_SIZE(Z2MdnPrm::sSexy), 3, 7}, diff --git a/src/c/c_damagereaction.cpp b/src/c/c_damagereaction.cpp index b8da6e4535..7b6921ca3a 100644 --- a/src/c/c_damagereaction.cpp +++ b/src/c/c_damagereaction.cpp @@ -4,15 +4,15 @@ #include "f_op/f_op_actor_mng.h" #include "d/d_s_play.h" -u8 cDmr_SkipInfo; -u8 data_80450C99; -u8 data_80450C9A; -u8 data_80450C9B; +DUSK_GAME_DATA u8 cDmr_SkipInfo; +DUSK_GAME_DATA u8 data_80450C99; +DUSK_GAME_DATA u8 data_80450C9A; +DUSK_GAME_DATA u8 data_80450C9B; -u8 data_80450C9C; -u8 data_80450C9D; -u8 data_80450C9E; -u8 cDmr_FishingWether; +DUSK_GAME_DATA u8 data_80450C9C; +DUSK_GAME_DATA u8 data_80450C9D; +DUSK_GAME_DATA u8 data_80450C9E; +DUSK_GAME_DATA u8 cDmr_FishingWether; #if DEBUG void debug_actor_create() { @@ -60,8 +60,8 @@ BOOL cDmrNowMidnaTalk() { return 0; } -u8 data_80450CA0; +DUSK_GAME_DATA u8 data_80450CA0; extern "C" { - JPTraceParticleCallBack4 JPTracePCB4; + DUSK_GAME_DATA JPTraceParticleCallBack4 JPTracePCB4; } diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index e5e23600e5..e3d4c7252c 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -217,7 +217,7 @@ static s16 const l_insectNameList[12] = { f32 l_jumpTop; #endif -daAlink_BckData const daAlink_c::m_mainBckShield[20] = { +DUSK_GAME_DATA daAlink_BckData const daAlink_c::m_mainBckShield[20] = { {dRes_ID_ALANM_BCK_ATRFWS_e, dRes_ID_ALANM_BCK_ATRFWS_e}, {dRes_ID_ALANM_BCK_ATRFDS_e, dRes_ID_ALANM_BCK_ATRFDS_e}, {dRes_ID_ALANM_BCK_ATBW_e, dRes_ID_ALANM_BCK_ATLS_e}, @@ -240,7 +240,7 @@ daAlink_BckData const daAlink_c::m_mainBckShield[20] = { {dRes_ID_ALANM_BCK_DASHS_e, dRes_ID_ALANM_BCK_ATLS_e}, }; -daAlink_BckData const daAlink_c::m_mainBckSword[5] = { +DUSK_GAME_DATA daAlink_BckData const daAlink_c::m_mainBckSword[5] = { {dRes_ID_ALANM_BCK_ATL_e, dRes_ID_ALANM_BCK_ATL_e}, {dRes_ID_ALANM_BCK_ATR_e, dRes_ID_ALANM_BCK_ATR_e}, {dRes_ID_ALANM_BCK_WALKS_e, dRes_ID_ALANM_BCK_WALKS_e}, @@ -248,7 +248,7 @@ daAlink_BckData const daAlink_c::m_mainBckSword[5] = { {dRes_ID_ALANM_BCK_SWIMWAIT_e, dRes_ID_ALANM_BCK_SWIMWAITS_e}, }; -daAlink_BckData const daAlink_c::m_mainBckFishing[28] = { +DUSK_GAME_DATA daAlink_BckData const daAlink_c::m_mainBckFishing[28] = { {dRes_ID_ALANM_BCK_ATRFWS_e, dRes_ID_ALANM_BCK_WALKFISHR_e}, {dRes_ID_ALANM_BCK_ATRFDS_e, dRes_ID_ALANM_BCK_DASHFISHR_e}, {dRes_ID_ALANM_BCK_ATBW_e, dRes_ID_ALANM_BCK_WALKFISHR_e}, @@ -279,7 +279,7 @@ daAlink_BckData const daAlink_c::m_mainBckFishing[28] = { {dRes_ID_ALANM_BCK_WAITBTOA_e, dRes_ID_ALANM_BCK_WALKFISHR_e}, }; -daAlink_AnmData const daAlink_c::m_anmDataTable[daAlink_c::ANM_MAX] = { +DUSK_GAME_DATA daAlink_AnmData const daAlink_c::m_anmDataTable[daAlink_c::ANM_MAX] = { {dRes_ID_ALANM_BCK_ATRFWS_e, dRes_ID_ALANM_BCK_ATRFW_e, 0xFE, 0xFE, FTANM_0, dRes_ID_ALANM_BCK_FAT_e, 0x0}, {dRes_ID_ALANM_BCK_ATRFDS_e, dRes_ID_ALANM_BCK_ATRFD_e, 0xFE, 0xFE, FTANM_0, dRes_ID_ALANM_BCK_FAT_e, 0x0}, {dRes_ID_ALANM_BCK_ATBW_e, dRes_ID_ALANM_BCK_ATBW_e, 0xFE, 0xFE, FTANM_0, dRes_ID_ALANM_BCK_FAT_e, 0x0}, @@ -696,7 +696,7 @@ daAlink_AnmData const daAlink_c::m_anmDataTable[daAlink_c::ANM_MAX] = { {dRes_ID_ALANM_BCK_ASHIMOTO_e, dRes_ID_ALANM_BCK_ASHIMOTO_e, 0xFE, 0xFE, FTANM_ASHIMOTO, dRes_ID_ALANM_BCK_FASHIMOTO_e, 0x0}, }; -daAlink_WlAnmData const daAlink_c::m_wlAnmDataTable[daAlink_c::WANM_MAX] = { +DUSK_GAME_DATA daAlink_WlAnmData const daAlink_c::m_wlAnmDataTable[daAlink_c::WANM_MAX] = { {dRes_ID_ALANM_BCK_WL_WAITA_e, 0x0, 0x1, 10, 40, -1, -1}, {dRes_ID_ALANM_BCK_WL_WALKA_e, 0x0, 0x2, 1, 14, -1, -1}, {dRes_ID_ALANM_BCK_WL_WALKB_e, 0x0, 0x2, 1, 14, -1, -1}, @@ -846,7 +846,7 @@ daAlink_WlAnmData const daAlink_c::m_wlAnmDataTable[daAlink_c::WANM_MAX] = { {0x802B, 0xC, 0xC, -1, -1, -1, -1}, }; -daAlink_FaceTexData const daAlink_c::m_faceTexDataTable[] = { +DUSK_GAME_DATA daAlink_FaceTexData const daAlink_c::m_faceTexDataTable[] = { {dRes_ID_ALANM_BTP_FMABA01_e, dRes_ID_ALANM_BTK_FMABA01_e}, {dRes_ID_ALANM_BTP_FMABA02_e, dRes_ID_ALANM_BTK_FMABA02_e}, {dRes_ID_ALANM_BTP_FMABA03_e, dRes_ID_ALANM_BTK_FMABA03_e}, @@ -1012,7 +1012,7 @@ daAlink_FaceTexData const daAlink_c::m_faceTexDataTable[] = { {dRes_ID_ALANM_BTP_WL_FC_e, dRes_ID_ALANM_BTK_WL_FA_e}, }; -const daAlink_procInitTable daAlink_c::m_procInitTable[] = { +DUSK_GAME_DATA const daAlink_procInitTable daAlink_c::m_procInitTable[] = { { &daAlink_c::procPreActionUnequip, 0x21 }, { &daAlink_c::procServiceWait, 0x10000085 }, { &daAlink_c::procTiredWait, 0x10001185 }, @@ -1367,7 +1367,7 @@ const daAlink_procInitTable daAlink_c::m_procInitTable[] = { { &daAlink_c::procDemoCommon, 0x1 }, }; -daAlink_procFunc daAlink_c::m_demoInitTable[] = { +DUSK_GAME_DATA daAlink_procFunc daAlink_c::m_demoInitTable[] = { NULL, NULL, NULL, @@ -2003,9 +2003,9 @@ daAlinkHIO_cut_c::~daAlinkHIO_cut_c() {} daAlinkHIO_c::~daAlinkHIO_c() {} -bool daAlink_matAnm_c::m_eye_move_flg; +DUSK_GAME_DATA bool daAlink_matAnm_c::m_eye_move_flg; -u8 daAlink_matAnm_c::m_morf_frame; +DUSK_GAME_DATA u8 daAlink_matAnm_c::m_morf_frame; void daAlink_matAnm_c::init() { field_0xf4 = 0.0f; diff --git a/src/d/actor/d_a_alink_HIO_data.inc b/src/d/actor/d_a_alink_HIO_data.inc index feb49c6d3d..86b9519657 100644 --- a/src/d/actor/d_a_alink_HIO_data.inc +++ b/src/d/actor/d_a_alink_HIO_data.inc @@ -1,7 +1,7 @@ #include "d/actor/d_a_alink.h" // clang-format off -const daAlinkHIO_basic_c1 daAlinkHIO_basic_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_basic_c1 daAlinkHIO_basic_c0::m = { false, 20000, -10000, @@ -30,7 +30,7 @@ const daAlinkHIO_basic_c1 daAlinkHIO_basic_c0::m = { 5000.0f, }; -const daAlinkHIO_move_c1 daAlinkHIO_move_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_move_c1 daAlinkHIO_move_c0::m = { { 11, 0.7f, @@ -58,7 +58,7 @@ const daAlinkHIO_move_c1 daAlinkHIO_move_c0::m = { 0.4f, }; -const daAlinkHIO_atnMove_c1 daAlinkHIO_atnMove_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_atnMove_c1 daAlinkHIO_atnMove_c0::m = { 3000, 2000, 6, @@ -83,7 +83,7 @@ const daAlinkHIO_atnMove_c1 daAlinkHIO_atnMove_c0::m = { 1.3f, }; -const daAlinkHIO_noActAtnMove_c1 daAlinkHIO_noActAtnMove_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_noActAtnMove_c1 daAlinkHIO_noActAtnMove_c0::m = { 3000, 2000, 6, @@ -108,7 +108,7 @@ const daAlinkHIO_noActAtnMove_c1 daAlinkHIO_noActAtnMove_c0::m = { 2.3f, }; -const daAlinkHIO_frontRoll_c1 daAlinkHIO_frontRoll_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_frontRoll_c1 daAlinkHIO_frontRoll_c0::m = { { 29, 1.1f, @@ -147,7 +147,7 @@ const daAlinkHIO_frontRoll_c1 daAlinkHIO_frontRoll_c0::m = { 60.0f, }; -const daAlinkHIO_backJump_c1 daAlinkHIO_backJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_backJump_c1 daAlinkHIO_backJump_c0::m = { { 9, 0.7f, @@ -168,7 +168,7 @@ const daAlinkHIO_backJump_c1 daAlinkHIO_backJump_c0::m = { 10.0f, }; -const daAlinkHIO_sideStep_c1 daAlinkHIO_sideStep_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_sideStep_c1 daAlinkHIO_sideStep_c0::m = { { 5, 1.1f, @@ -205,7 +205,7 @@ const daAlinkHIO_sideStep_c1 daAlinkHIO_sideStep_c0::m = { 10.0f, }; -const daAlinkHIO_slide_c1 daAlinkHIO_slide_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_slide_c1 daAlinkHIO_slide_c0::m = { { 14, 0.75f, @@ -248,7 +248,7 @@ const daAlinkHIO_slide_c1 daAlinkHIO_slide_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = { { 27, 1.2f, @@ -264,7 +264,7 @@ const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = { { 27, 1.2f, @@ -280,7 +280,7 @@ const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = { { 27, 1.2f, @@ -296,7 +296,7 @@ const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = { { 31, 1.1f, @@ -312,7 +312,7 @@ const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = { { 27, 1.1f, @@ -328,7 +328,7 @@ const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = { { 29, 1.0f, @@ -348,7 +348,7 @@ const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = { { 33, 1.0f, @@ -368,7 +368,7 @@ const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = { { 31, 1.1f, @@ -388,7 +388,7 @@ const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = { { 33, 0.9f, @@ -408,7 +408,7 @@ const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = { { 31, 0.9f, @@ -427,7 +427,7 @@ const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = { #pragma pop #pragma push -const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = { { 34, 1.1f, @@ -445,7 +445,7 @@ const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = { }; #pragma pop -const daAlinkHIO_cutFnJU_c1 daAlinkHIO_cutFnJU_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutFnJU_c1 daAlinkHIO_cutFnJU_c0::m = { { 19, 1.0f, @@ -474,7 +474,7 @@ const daAlinkHIO_cutFnJU_c1 daAlinkHIO_cutFnJU_c0::m = { 80.0f, }; -const daAlinkHIO_cutJump_c1 daAlinkHIO_cutJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutJump_c1 daAlinkHIO_cutJump_c0::m = { { 17, 1.1f, @@ -498,7 +498,7 @@ const daAlinkHIO_cutJump_c1 daAlinkHIO_cutJump_c0::m = { 3.0f, }; -const daAlinkHIO_cutTurn_c1 daAlinkHIO_cutTurn_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutTurn_c1 daAlinkHIO_cutTurn_c0::m = { { 47, 1.0f, @@ -548,7 +548,7 @@ const daAlinkHIO_cutTurn_c1 daAlinkHIO_cutTurn_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = { { 21, 0.9f, @@ -564,7 +564,7 @@ const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = { { 24, 0.9f, @@ -580,7 +580,7 @@ const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = { { 24, 0.95f, @@ -596,7 +596,7 @@ const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = { { 11, 0.9f, @@ -610,7 +610,7 @@ const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = { }; #pragma pop -const daAlinkHIO_hoCutCharge_c1 daAlinkHIO_hoCutCharge_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_hoCutCharge_c1 daAlinkHIO_hoCutCharge_c0::m = { { 6, 0.45f, @@ -643,7 +643,7 @@ const daAlinkHIO_hoCutCharge_c1 daAlinkHIO_hoCutCharge_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = { { 12, 0.8f, @@ -658,7 +658,7 @@ const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = { { 14, 1.0f, @@ -673,7 +673,7 @@ const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = { { 14, 1.0f, @@ -686,7 +686,7 @@ const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = { }; #pragma pop -const daAlinkHIO_cutDown_c1 daAlinkHIO_cutDown_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutDown_c1 daAlinkHIO_cutDown_c0::m = { { 8, 1.0f, @@ -729,7 +729,7 @@ const daAlinkHIO_cutDown_c1 daAlinkHIO_cutDown_c0::m = { 10.0f, }; -const daAlinkHIO_cutHead_c1 daAlinkHIO_cutHead_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutHead_c1 daAlinkHIO_cutHead_c0::m = { { 8, 0.9f, @@ -762,7 +762,7 @@ const daAlinkHIO_cutHead_c1 daAlinkHIO_cutHead_c0::m = { 1.6f, }; -const daAlinkHIO_cutLargeJump_c1 daAlinkHIO_cutLargeJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cutLargeJump_c1 daAlinkHIO_cutLargeJump_c0::m = { { 29, 1.3f, @@ -802,7 +802,7 @@ const daAlinkHIO_cutLargeJump_c1 daAlinkHIO_cutLargeJump_c0::m = { 5.0f, }; -const daAlinkHIO_cut_c1 daAlinkHIO_cut_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_cut_c1 daAlinkHIO_cut_c0::m = { { 18, -1.100f, @@ -857,7 +857,7 @@ const daAlinkHIO_cut_c1 daAlinkHIO_cut_c0::m = { 0.0f, }; -const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = { { 14, 1.0f, @@ -873,7 +873,7 @@ const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = { { 21, 1.2f, @@ -888,7 +888,7 @@ const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = { }; #pragma pop -const daAlinkHIO_turnMove_c1 daAlinkHIO_turnMove_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_turnMove_c1 daAlinkHIO_turnMove_c0::m = { { 27, 1.0f, @@ -906,7 +906,7 @@ const daAlinkHIO_turnMove_c1 daAlinkHIO_turnMove_c0::m = { 25.0f, }; -const daAlinkHIO_guard_c1 daAlinkHIO_guard_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_guard_c1 daAlinkHIO_guard_c0::m = { { 11, 1.0f, @@ -951,7 +951,7 @@ const daAlinkHIO_guard_c1 daAlinkHIO_guard_c0::m = { 18.0f, }; -const daAlinkHIO_crouch_c1 daAlinkHIO_crouch_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_crouch_c1 daAlinkHIO_crouch_c0::m = { { 9, 1.0f, @@ -978,7 +978,7 @@ const daAlinkHIO_crouch_c1 daAlinkHIO_crouch_c0::m = { 5.0f, }; -const daAlinkHIO_autoJump_c1 daAlinkHIO_autoJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_autoJump_c1 daAlinkHIO_autoJump_c0::m = { { 6, 1.2f, @@ -1036,7 +1036,7 @@ const daAlinkHIO_autoJump_c1 daAlinkHIO_autoJump_c0::m = { 23.0f, }; -const daAlinkHIO_smallJump_c1 daAlinkHIO_smallJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_smallJump_c1 daAlinkHIO_smallJump_c0::m = { { 8, 0.6f, @@ -1063,7 +1063,7 @@ const daAlinkHIO_smallJump_c1 daAlinkHIO_smallJump_c0::m = { 7.0f, }; -const daAlinkHIO_wallCatch_c1 daAlinkHIO_wallCatch_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wallCatch_c1 daAlinkHIO_wallCatch_c0::m = { { 19, 1.0f, @@ -1095,7 +1095,7 @@ const daAlinkHIO_wallCatch_c1 daAlinkHIO_wallCatch_c0::m = { 4.0f, }; -const daAlinkHIO_wallFall_c1 daAlinkHIO_wallFall_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wallFall_c1 daAlinkHIO_wallFall_c0::m = { { 22, 0.8f, @@ -1112,7 +1112,7 @@ const daAlinkHIO_wallFall_c1 daAlinkHIO_wallFall_c0::m = { }, }; -const daAlinkHIO_wallMove_c1 daAlinkHIO_wallMove_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wallMove_c1 daAlinkHIO_wallMove_c0::m = { 0.8f, 1.1f, 3.0f, @@ -1120,7 +1120,7 @@ const daAlinkHIO_wallMove_c1 daAlinkHIO_wallMove_c0::m = { 3.0f, }; -const daAlinkHIO_wallHang_c1 daAlinkHIO_wallHang_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wallHang_c1 daAlinkHIO_wallHang_c0::m = { 2, 3, 50.0f, @@ -1131,7 +1131,7 @@ const daAlinkHIO_wallHang_c1 daAlinkHIO_wallHang_c0::m = { 200.0f, }; -const daAlinkHIO_pushpull_c1 daAlinkHIO_pushpull_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_pushpull_c1 daAlinkHIO_pushpull_c0::m = { 0, 120, 7, @@ -1153,7 +1153,7 @@ const daAlinkHIO_pushpull_c1 daAlinkHIO_pushpull_c0::m = { 0.75f, }; -const daAlinkHIO_damNormal_c1 daAlinkHIO_damNormal_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damNormal_c1 daAlinkHIO_damNormal_c0::m = { { 22, 2.3f, @@ -1190,7 +1190,7 @@ const daAlinkHIO_damNormal_c1 daAlinkHIO_damNormal_c0::m = { 0.5f, }; -const daAlinkHIO_damLaHu_c1 daAlinkHIO_damLarge_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damLaHu_c1 daAlinkHIO_damLarge_c0::m = { { 49, 0.8f, @@ -1256,7 +1256,7 @@ const daAlinkHIO_damLaHu_c1 daAlinkHIO_damLarge_c0::m = { 0.5f, }; -const daAlinkHIO_damLaHu_c1 daAlinkHIO_damHuge_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damLaHu_c1 daAlinkHIO_damHuge_c0::m = { { 49, 0.8f, @@ -1322,7 +1322,7 @@ const daAlinkHIO_damLaHu_c1 daAlinkHIO_damHuge_c0::m = { 0.5f, }; -const daAlinkHIO_damHorse_c1 daAlinkHIO_damHorse_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damHorse_c1 daAlinkHIO_damHorse_c0::m = { { 9, 2.0f, @@ -1341,7 +1341,7 @@ const daAlinkHIO_damHorse_c1 daAlinkHIO_damHorse_c0::m = { 5000, }; -const daAlinkHIO_damFall_c1 daAlinkHIO_damFall_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damFall_c1 daAlinkHIO_damFall_c0::m = { { 11, 1.2f, @@ -1367,7 +1367,7 @@ const daAlinkHIO_damFall_c1 daAlinkHIO_damFall_c0::m = { 15.0f, }; -const daAlinkHIO_damCaught_c1 daAlinkHIO_damCaught_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damCaught_c1 daAlinkHIO_damCaught_c0::m = { { 59, 1.5f, @@ -1382,7 +1382,7 @@ const daAlinkHIO_damCaught_c1 daAlinkHIO_damCaught_c0::m = { 1.3f, }; -const daAlinkHIO_damSwim_c1 daAlinkHIO_damSwim_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damSwim_c1 daAlinkHIO_damSwim_c0::m = { { 22, 1.2f, @@ -1433,7 +1433,7 @@ const daAlinkHIO_damSwim_c1 daAlinkHIO_damSwim_c0::m = { 15.0f, }; -const daAlinkHIO_damage_c1 daAlinkHIO_damage_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_damage_c1 daAlinkHIO_damage_c0::m = { { 14, 1.0f, @@ -1471,7 +1471,7 @@ const daAlinkHIO_damage_c1 daAlinkHIO_damage_c0::m = { 35.0f, }; -const daAlinkHIO_horse_c1 daAlinkHIO_horse_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_horse_c1 daAlinkHIO_horse_c0::m = { { 18, 1.2f, @@ -1512,7 +1512,7 @@ const daAlinkHIO_horse_c1 daAlinkHIO_horse_c0::m = { 5.0f, }; -const daAlinkHIO_canoe_c1 daAlinkHIO_canoe_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_canoe_c1 daAlinkHIO_canoe_c0::m = { { 23, 1.3f, @@ -1536,7 +1536,7 @@ const daAlinkHIO_canoe_c1 daAlinkHIO_canoe_c0::m = { 0.2f, }; -const daAlinkHIO_bow_c1 daAlinkHIO_bow_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_bow_c1 daAlinkHIO_bow_c0::m = { { 9, 1.0f, @@ -1572,7 +1572,7 @@ const daAlinkHIO_bow_c1 daAlinkHIO_bow_c0::m = { 800.0f, }; -const daAlinkHIO_boom_c1 daAlinkHIO_boom_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_boom_c1 daAlinkHIO_boom_c0::m = { { 21, 0.9f, @@ -1599,7 +1599,7 @@ const daAlinkHIO_boom_c1 daAlinkHIO_boom_c0::m = { 40.0f, }; -const daAlinkHIO_bomb_c1 daAlinkHIO_bomb_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_bomb_c1 daAlinkHIO_bomb_c0::m = { 160, 50, 50, @@ -1624,7 +1624,7 @@ const daAlinkHIO_bomb_c1 daAlinkHIO_bomb_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = { 0, 3, 0, @@ -1639,7 +1639,7 @@ const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = { }; #pragma pop -const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = { { 30, 1.1f, @@ -1672,7 +1672,7 @@ const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = { 0.5f, }; -const daAlinkHIO_fmChain_c1 daAlinkHIO_fmChain_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_fmChain_c1 daAlinkHIO_fmChain_c0::m = { { 20, 1.2f, @@ -1689,7 +1689,7 @@ const daAlinkHIO_fmChain_c1 daAlinkHIO_fmChain_c0::m = { }, }; -const daAlinkHIO_magneBoots_c1 daAlinkHIO_magneBoots_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_magneBoots_c1 daAlinkHIO_magneBoots_c0::m = { { 29, 1.1f, @@ -1713,7 +1713,7 @@ const daAlinkHIO_magneBoots_c1 daAlinkHIO_magneBoots_c0::m = { 0.7f, }; -const daAlinkHIO_pickUp_c1 daAlinkHIO_pickUp_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_pickUp_c1 daAlinkHIO_pickUp_c0::m = { { 18, 0.9f, @@ -1732,7 +1732,7 @@ const daAlinkHIO_pickUp_c1 daAlinkHIO_pickUp_c0::m = { 30.0f, }; -const daAlinkHIO_board_c1 daAlinkHIO_board_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_board_c1 daAlinkHIO_board_c0::m = { { 9, 2.5f, @@ -1782,7 +1782,7 @@ const daAlinkHIO_board_c1 daAlinkHIO_board_c0::m = { 50.0f, }; -const daAlinkHIO_bottle_c1 daAlinkHIO_bottle_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_bottle_c1 daAlinkHIO_bottle_c0::m = { { 56, 1.15f, @@ -1848,7 +1848,7 @@ const daAlinkHIO_bottle_c1 daAlinkHIO_bottle_c0::m = { }, }; -const daAlinkHIO_hookshot_c1 daAlinkHIO_hookshot_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_hookshot_c1 daAlinkHIO_hookshot_c0::m = { { 12, 1.0f, @@ -1885,7 +1885,7 @@ const daAlinkHIO_hookshot_c1 daAlinkHIO_hookshot_c0::m = { 90.0f, }; -const daAlinkHIO_spinner_c1 daAlinkHIO_spinner_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_spinner_c1 daAlinkHIO_spinner_c0::m = { { 21, 0.8f, @@ -1908,7 +1908,7 @@ const daAlinkHIO_spinner_c1 daAlinkHIO_spinner_c0::m = { 60.0f, }; -const daAlinkHIO_ironBall_c1 daAlinkHIO_ironBall_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_ironBall_c1 daAlinkHIO_ironBall_c0::m = { { 19, 1.1f, @@ -1949,7 +1949,7 @@ const daAlinkHIO_ironBall_c1 daAlinkHIO_ironBall_c0::m = { 0.5f, }; -const daAlinkHIO_copyRod_c1 daAlinkHIO_copyRod_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_copyRod_c1 daAlinkHIO_copyRod_c0::m = { 19, 1.0f, 0.0f, @@ -1966,7 +1966,7 @@ const daAlinkHIO_copyRod_c1 daAlinkHIO_copyRod_c0::m = { 2000.0f, }; -const daAlinkHIO_zwLight_c1 daAlinkHIO_zwLight_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_zwLight_c1 daAlinkHIO_zwLight_c0::m = { 771, 0, 182, @@ -1979,7 +1979,7 @@ const daAlinkHIO_zwLight_c1 daAlinkHIO_zwLight_c0::m = { 0.0f, }; -const daAlinkHIO_item_c1 daAlinkHIO_item_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_item_c1 daAlinkHIO_item_c0::m = { { 12, 1.0f, @@ -2003,7 +2003,7 @@ const daAlinkHIO_item_c1 daAlinkHIO_item_c0::m = { 1.3f, }; -const daAlinkHIO_ladder_c1 daAlinkHIO_ladder_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_ladder_c1 daAlinkHIO_ladder_c0::m = { { 13, 0.8f, @@ -2038,7 +2038,7 @@ const daAlinkHIO_ladder_c1 daAlinkHIO_ladder_c0::m = { 80.0f, }; -const daAlinkHIO_roofHang_c1 daAlinkHIO_roofHang_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_roofHang_c1 daAlinkHIO_roofHang_c0::m = { { 34, 1.0f, @@ -2063,7 +2063,7 @@ const daAlinkHIO_roofHang_c1 daAlinkHIO_roofHang_c0::m = { 3.0f, }; -const daAlinkHIO_grab_c1 daAlinkHIO_grab_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_grab_c1 daAlinkHIO_grab_c0::m = { { 4, 0.9f, @@ -2146,7 +2146,7 @@ const daAlinkHIO_grab_c1 daAlinkHIO_grab_c0::m = { 0.55f, }; -const daAlinkHIO_swim_c1 daAlinkHIO_swim_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_swim_c1 daAlinkHIO_swim_c0::m = { { 25, 1.0f, @@ -2224,7 +2224,7 @@ const daAlinkHIO_swim_c1 daAlinkHIO_swim_c0::m = { 1.3f, }; -const daAlinkHIO_wlMove_c1 daAlinkHIO_wlMove_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlMove_c1 daAlinkHIO_wlMove_c0::m = { { 14, 1.0f, @@ -2303,7 +2303,7 @@ const daAlinkHIO_wlMove_c1 daAlinkHIO_wlMove_c0::m = { 0.5f, }; -const daAlinkHIO_wlMoveNoP_c1 daAlinkHIO_wlMoveNoP_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlMoveNoP_c1 daAlinkHIO_wlMoveNoP_c0::m = { 9000, 100, 5, @@ -2325,7 +2325,7 @@ const daAlinkHIO_wlMoveNoP_c1 daAlinkHIO_wlMoveNoP_c0::m = { 30.0f, }; -const daAlinkHIO_wlAtnMove_c1 daAlinkHIO_wlAtnMove_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtnMove_c1 daAlinkHIO_wlAtnMove_c0::m = { 9000, 100, 3, @@ -2343,7 +2343,7 @@ const daAlinkHIO_wlAtnMove_c1 daAlinkHIO_wlAtnMove_c0::m = { 2.0f, }; -const daAlinkHIO_wlSideStep_c1 daAlinkHIO_wlSideStep_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlSideStep_c1 daAlinkHIO_wlSideStep_c0::m = { { 5, 1.0f, @@ -2380,7 +2380,7 @@ const daAlinkHIO_wlSideStep_c1 daAlinkHIO_wlSideStep_c0::m = { 10.0f, }; -const daAlinkHIO_wlBackJump_c1 daAlinkHIO_wlBackJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlBackJump_c1 daAlinkHIO_wlBackJump_c0::m = { { 11, 0.8f, @@ -2401,7 +2401,7 @@ const daAlinkHIO_wlBackJump_c1 daAlinkHIO_wlBackJump_c0::m = { 10.0f, }; -const daAlinkHIO_wlHowl_c1 daAlinkHIO_wlHowl_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlHowl_c1 daAlinkHIO_wlHowl_c0::m = { { 49, 1.0f, @@ -2436,7 +2436,7 @@ const daAlinkHIO_wlHowl_c1 daAlinkHIO_wlHowl_c0::m = { 0.7f, }; -const daAlinkHIO_wlAutoJump_c1 daAlinkHIO_wlAutoJump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAutoJump_c1 daAlinkHIO_wlAutoJump_c0::m = { { 3, 1.2f, @@ -2478,7 +2478,7 @@ const daAlinkHIO_wlAutoJump_c1 daAlinkHIO_wlAutoJump_c0::m = { 100.0f, }; -const daAlinkHIO_wlPush_c1 daAlinkHIO_wlPush_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlPush_c1 daAlinkHIO_wlPush_c0::m = { 1.0f, 3.0f, 1.0f, @@ -2486,7 +2486,7 @@ const daAlinkHIO_wlPush_c1 daAlinkHIO_wlPush_c0::m = { 0.75f, }; -const daAlinkHIO_wlLie_c1 daAlinkHIO_wlLie_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlLie_c1 daAlinkHIO_wlLie_c0::m = { { 14, 1.5f, @@ -2515,7 +2515,7 @@ const daAlinkHIO_wlLie_c1 daAlinkHIO_wlLie_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_wlLight_c1 daAlinkHIO_wlLight_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlLight_c1 daAlinkHIO_wlLight_c0::m = { 515, 0, 120, @@ -2529,7 +2529,7 @@ const daAlinkHIO_wlLight_c1 daAlinkHIO_wlLight_c0::m = { }; #pragma pop -const daAlinkHIO_wlWallHang_c1 daAlinkHIO_wlWallHang_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlWallHang_c1 daAlinkHIO_wlWallHang_c0::m = { { 13, 1.2f, @@ -2583,7 +2583,7 @@ const daAlinkHIO_wlWallHang_c1 daAlinkHIO_wlWallHang_c0::m = { 10.0f, }; -const daAlinkHIO_wlDamNormal_c1 daAlinkHIO_wlDamNormal_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlDamNormal_c1 daAlinkHIO_wlDamNormal_c0::m = { { 9, 1.0f, @@ -2618,7 +2618,7 @@ const daAlinkHIO_wlDamNormal_c1 daAlinkHIO_wlDamNormal_c0::m = { 0.25f, }; -const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = { { 49, 1.0f, @@ -2658,7 +2658,7 @@ const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = { { 49, 1.1f, @@ -2697,7 +2697,7 @@ const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = { }; #pragma pop -const daAlinkHIO_wlDamFall_c1 daAlinkHIO_wlDamFall_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlDamFall_c1 daAlinkHIO_wlDamFall_c0::m = { { 11, 1.0f, @@ -2721,7 +2721,7 @@ const daAlinkHIO_wlDamFall_c1 daAlinkHIO_wlDamFall_c0::m = { 15.0f, }; -const daAlinkHIO_wlDamCaught_c1 daAlinkHIO_wlDamCaught_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlDamCaught_c1 daAlinkHIO_wlDamCaught_c0::m = { 300, 5, 1.2f, @@ -2729,7 +2729,7 @@ const daAlinkHIO_wlDamCaught_c1 daAlinkHIO_wlDamCaught_c0::m = { 1.5f, }; -const daAlinkHIO_wlDamage_c1 daAlinkHIO_wlDamage_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlDamage_c1 daAlinkHIO_wlDamage_c0::m = { { 9, 1.1f, @@ -2747,7 +2747,7 @@ const daAlinkHIO_wlDamage_c1 daAlinkHIO_wlDamage_c0::m = { 0.7f, }; -const daAlinkHIO_wlSlide_c1 daAlinkHIO_wlSlide_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlSlide_c1 daAlinkHIO_wlSlide_c0::m = { { 20, 1.25f, @@ -2790,7 +2790,7 @@ const daAlinkHIO_wlSlide_c1 daAlinkHIO_wlSlide_c0::m = { 30.0f, }; -const daAlinkHIO_wlRope_c1 daAlinkHIO_wlRope_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlRope_c1 daAlinkHIO_wlRope_c0::m = { { 16, 1.0f, @@ -2812,7 +2812,7 @@ const daAlinkHIO_wlRope_c1 daAlinkHIO_wlRope_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaLr_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaLr_c0::m = { { 41, 0.9f, @@ -2836,7 +2836,7 @@ const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaLr_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaSc_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaSc_c0::m = { { 15, 0.9f, @@ -2860,7 +2860,7 @@ const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaSc_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaTl_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaTl_c0::m = { { 42, 1.05f, @@ -2882,7 +2882,7 @@ const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaTl_c0::m = { }; #pragma pop -const daAlinkHIO_wlAtRoll_c1 daAlinkHIO_wlAtRoll_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtRoll_c1 daAlinkHIO_wlAtRoll_c0::m = { { 40, 1.0f, @@ -2895,7 +2895,7 @@ const daAlinkHIO_wlAtRoll_c1 daAlinkHIO_wlAtRoll_c0::m = { 0.0f, }; -const daAlinkHIO_wlAtNjump_c1 daAlinkHIO_wlAtNjump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtNjump_c1 daAlinkHIO_wlAtNjump_c0::m = { { 6, 1.0f, @@ -2915,7 +2915,7 @@ const daAlinkHIO_wlAtNjump_c1 daAlinkHIO_wlAtNjump_c0::m = { 10.0f, }; -const daAlinkHIO_wlAtCjump_c1 daAlinkHIO_wlAtCjump_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtCjump_c1 daAlinkHIO_wlAtCjump_c0::m = { { 3, 2.0f, @@ -2947,7 +2947,7 @@ const daAlinkHIO_wlAtCjump_c1 daAlinkHIO_wlAtCjump_c0::m = { 0.1f, }; -const daAlinkHIO_wlAtLand_c1 daAlinkHIO_wlAtLand_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtLand_c1 daAlinkHIO_wlAtLand_c0::m = { { 19, 0.9f, @@ -2972,7 +2972,7 @@ const daAlinkHIO_wlAtLand_c1 daAlinkHIO_wlAtLand_c0::m = { 2.0f, }; -const daAlinkHIO_wlAtDown_c1 daAlinkHIO_wlAtDown_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtDown_c1 daAlinkHIO_wlAtDown_c0::m = { { 3, 1.0f, @@ -3029,7 +3029,7 @@ const daAlinkHIO_wlAtDown_c1 daAlinkHIO_wlAtDown_c0::m = { 13.0f, }; -const daAlinkHIO_wlAtLock_c1 daAlinkHIO_wlAtLock_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtLock_c1 daAlinkHIO_wlAtLock_c0::m = { { 6, 3.0f, @@ -3057,7 +3057,7 @@ const daAlinkHIO_wlAtLock_c1 daAlinkHIO_wlAtLock_c0::m = { 1000.0f, }; -const daAlinkHIO_wlAtBite_c1 daAlinkHIO_wlAtBite_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAtBite_c1 daAlinkHIO_wlAtBite_c0::m = { { 5, 1.0f, @@ -3088,7 +3088,7 @@ const daAlinkHIO_wlAtBite_c1 daAlinkHIO_wlAtBite_c0::m = { 0.02f, }; -const daAlinkHIO_wlAttack_c1 daAlinkHIO_wlAttack_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlAttack_c1 daAlinkHIO_wlAttack_c0::m = { { 59, 1.2f, @@ -3108,7 +3108,7 @@ const daAlinkHIO_wlAttack_c1 daAlinkHIO_wlAttack_c0::m = { 30.0f, }; -const daAlinkHIO_wlPoint_c1 daAlinkHIO_wlPoint_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlPoint_c1 daAlinkHIO_wlPoint_c0::m = { { 6, 0.9f, @@ -3150,7 +3150,7 @@ const daAlinkHIO_wlPoint_c1 daAlinkHIO_wlPoint_c0::m = { 0.2f, }; -const daAlinkHIO_wlChain_c1 daAlinkHIO_wlChain_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlChain_c1 daAlinkHIO_wlChain_c0::m = { { 39, 1.0f, @@ -3183,7 +3183,7 @@ const daAlinkHIO_wlChain_c1 daAlinkHIO_wlChain_c0::m = { 5.0f, }; -const daAlinkHIO_wlSwim_c1 daAlinkHIO_wlSwim_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlSwim_c1 daAlinkHIO_wlSwim_c0::m = { { 25, 0.9f, @@ -3237,7 +3237,7 @@ const daAlinkHIO_wlSwim_c1 daAlinkHIO_wlSwim_c0::m = { 7.0f, }; -const daAlinkHIO_wlGrab_c1 daAlinkHIO_wlGrab_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlGrab_c1 daAlinkHIO_wlGrab_c0::m = { { 20, 1.5f, @@ -3277,7 +3277,7 @@ const daAlinkHIO_wlGrab_c1 daAlinkHIO_wlGrab_c0::m = { #pragma push #pragma force_active on -const daAlinkHIO_wlBall_c1 daAlinkHIO_wlBall_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wlBall_c1 daAlinkHIO_wlBall_c0::m = { { 64, 1.0f, @@ -3299,7 +3299,7 @@ const daAlinkHIO_wlBall_c1 daAlinkHIO_wlBall_c0::m = { }; #pragma pop -const daAlinkHIO_wolf_c1 daAlinkHIO_wolf_c0::m = { +DUSK_GAME_DATA const daAlinkHIO_wolf_c1 daAlinkHIO_wolf_c0::m = { 13000, -10000, 8000, diff --git a/src/d/actor/d_a_alink_effect.inc b/src/d/actor/d_a_alink_effect.inc index 3461568f19..1e3c8460eb 100644 --- a/src/d/actor/d_a_alink_effect.inc +++ b/src/d/actor/d_a_alink_effect.inc @@ -10,7 +10,7 @@ #include "d/d_k_wmark.h" #include "dusk/gx_helper.h" -const EffParamProc daAlink_c::m_fEffParamProc[] = { +DUSK_GAME_DATA const EffParamProc daAlink_c::m_fEffParamProc[] = { &daAlink_c::setEffectFrontRollParam, &daAlink_c::setEffectSlipParam, &daAlink_c::setEffectSmallLandParam, diff --git a/src/d/actor/d_a_alink_horse.inc b/src/d/actor/d_a_alink_horse.inc index cc2bf54121..7389decb73 100644 --- a/src/d/actor/d_a_alink_horse.inc +++ b/src/d/actor/d_a_alink_horse.inc @@ -73,19 +73,19 @@ int daAlink_c::getReinRideDirection() { return DIR_RIGHT; } -Vec const daAlink_c::m_handLeftOutSidePos = { +DUSK_GAME_DATA Vec const daAlink_c::m_handLeftOutSidePos = { 9.0f, -5.0f, 3.0f }; -Vec const daAlink_c::m_handRightOutSidePos = { +DUSK_GAME_DATA Vec const daAlink_c::m_handRightOutSidePos = { 9.0f, -5.0f, -3.0f }; -Vec const daAlink_c::m_handLeftInSidePos = { +DUSK_GAME_DATA Vec const daAlink_c::m_handLeftInSidePos = { 9.0f, 5.0f, 3.0f }; -Vec const daAlink_c::m_handRightInSidePos = { +DUSK_GAME_DATA Vec const daAlink_c::m_handRightInSidePos = { 9.0f, 5.0f, -3.0f }; diff --git a/src/d/actor/d_a_balloon_2D.cpp b/src/d/actor/d_a_balloon_2D.cpp index ebd9396759..a9d6d0db4f 100644 --- a/src/d/actor/d_a_balloon_2D.cpp +++ b/src/d/actor/d_a_balloon_2D.cpp @@ -229,9 +229,9 @@ int daBalloon2D_c::createHeap() { return 1; } -daBalloon2D_HIO_c l_HOSTIO; +DUSK_GAME_DATA daBalloon2D_HIO_c l_HOSTIO; -daBalloon2D_c* daBalloon2D_c::myclass; +DUSK_GAME_DATA daBalloon2D_c* daBalloon2D_c::myclass; int daBalloon2D_c::create() { int rv = dComIfG_resLoad(this, l_arcName); diff --git a/src/d/actor/d_a_bg_obj.cpp b/src/d/actor/d_a_bg_obj.cpp index a2d4e3b1a6..85af9a406c 100644 --- a/src/d/actor/d_a_bg_obj.cpp +++ b/src/d/actor/d_a_bg_obj.cpp @@ -501,14 +501,14 @@ static dCcD_SrcTri l_tri_src = { static DUSK_CONST char* l_specName = "spec.dat"; -createHeapFunc daBgObj_c::mCreateHeapFunc[] = { +DUSK_GAME_DATA createHeapFunc daBgObj_c::mCreateHeapFunc[] = { &daBgObj_c::CreateHeapType0, &daBgObj_c::CreateHeapType1, &daBgObj_c::CreateHeapType1, &daBgObj_c::CreateHeapType1, }; -createInitFunc daBgObj_c::mCreateInitFunc[] = { +DUSK_GAME_DATA createInitFunc daBgObj_c::mCreateInitFunc[] = { &daBgObj_c::CreateInitType0, &daBgObj_c::CreateInitType1, &daBgObj_c::CreateInitType1, @@ -519,14 +519,14 @@ int daBgObj_c::Create() { return (this->*mCreateInitFunc[mSpecData.mSpecType])(); } -executeFunc daBgObj_c::mExecuteFunc[] = { +DUSK_GAME_DATA executeFunc daBgObj_c::mExecuteFunc[] = { &daBgObj_c::ExecuteType0, &daBgObj_c::ExecuteType1, &daBgObj_c::ExecuteType1, &daBgObj_c::ExecuteType1, }; -tgSetFunc daBgObj_c::mTgSetFunc[] = { +DUSK_GAME_DATA tgSetFunc daBgObj_c::mTgSetFunc[] = { &daBgObj_c::set_tri_0, &daBgObj_c::set_tri_1, &daBgObj_c::set_cyl_0, &daBgObj_c::set_tri_2, &daBgObj_c::set_tri_3, }; diff --git a/src/d/actor/d_a_boomerang.cpp b/src/d/actor/d_a_boomerang.cpp index a745807ce4..9deb7b46b8 100644 --- a/src/d/actor/d_a_boomerang.cpp +++ b/src/d/actor/d_a_boomerang.cpp @@ -137,17 +137,17 @@ static const u8 lbl_46_rodata_24[6] = { 0x1E, }; -const u16 daBoomerang_HIO_c0::m_lockWaitTime = 10; +DUSK_GAME_DATA const u16 daBoomerang_HIO_c0::m_lockWaitTime = 10; -const f32 daBoomerang_HIO_c0::m_minCircleR = 28.0f; +DUSK_GAME_DATA const f32 daBoomerang_HIO_c0::m_minCircleR = 28.0f; -const f32 daBoomerang_HIO_c0::m_middleCircleR = 35.0f; +DUSK_GAME_DATA const f32 daBoomerang_HIO_c0::m_middleCircleR = 35.0f; -const f32 daBoomerang_HIO_c0::m_maxCircleR = 80.0f; +DUSK_GAME_DATA const f32 daBoomerang_HIO_c0::m_maxCircleR = 80.0f; -const f32 daBoomerang_HIO_c0::m_scale = 3.0f / 5.0f; +DUSK_GAME_DATA const f32 daBoomerang_HIO_c0::m_scale = 3.0f / 5.0f; -const f32 daBoomerang_HIO_c0::m_lockWindScale = 2.0f; +DUSK_GAME_DATA const f32 daBoomerang_HIO_c0::m_lockWindScale = 2.0f; static const u32 l_lockSeFlg[BOOMERANG_LOCK_MAX] = { Z2SE_SY_BOOM_LOCK_ON_1, diff --git a/src/d/actor/d_a_bullet.cpp b/src/d/actor/d_a_bullet.cpp index 2bdd114436..f6b873a67f 100644 --- a/src/d/actor/d_a_bullet.cpp +++ b/src/d/actor/d_a_bullet.cpp @@ -14,14 +14,14 @@ static DUSK_CONST char* l_bmdFileNameList[] = {"hanjo_stone.bmd"}; static BULLET_HIO_CLASS l_HIO; -const dCcD_SrcGObjInf daBullet_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daBullet_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0x0, 0x0}, {0x79}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 0}, {0}, }; -dCcD_SrcSph daBullet_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daBullet_c::mCcDSph = { daBullet_c::mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph @@ -81,7 +81,7 @@ int daBullet_c::Delete() { return 1; } -daBullet_HIOParam const daBullet_Param_c::m = { +DUSK_GAME_DATA daBullet_HIOParam const daBullet_Param_c::m = { -3.0f, 255.0f, 3.0f, diff --git a/src/d/actor/d_a_coach_fire.cpp b/src/d/actor/d_a_coach_fire.cpp index d69fd63452..53e2e4de0f 100644 --- a/src/d/actor/d_a_coach_fire.cpp +++ b/src/d/actor/d_a_coach_fire.cpp @@ -7,7 +7,7 @@ #include "d/actor/d_a_coach_fire.h" -CoachFireAttr const daCoachFire_c::M_attr = { +DUSK_GAME_DATA CoachFireAttr const daCoachFire_c::M_attr = { 50.0f, // radius 4.0f, // field_0x04 36, // field_0x08 diff --git a/src/d/actor/d_a_cstaF.cpp b/src/d/actor/d_a_cstaF.cpp index d52f6c1389..e764d4c153 100644 --- a/src/d/actor/d_a_cstaF.cpp +++ b/src/d/actor/d_a_cstaF.cpp @@ -34,7 +34,7 @@ static const char l_arcNameFB[] = "CstaFB"; static const char l_spStageName[8] = "R_SP209"; -const daCstaF_c::BckTbl daCstaF_c::m_bckIdxTable[] = { +DUSK_GAME_DATA const daCstaF_c::BckTbl daCstaF_c::m_bckIdxTable[] = { {9, 9, 8, 7}, {9, 9, 8, 7} }; diff --git a/src/d/actor/d_a_cstatue.cpp b/src/d/actor/d_a_cstatue.cpp index d267d87611..906b1f7559 100644 --- a/src/d/actor/d_a_cstatue.cpp +++ b/src/d/actor/d_a_cstatue.cpp @@ -53,7 +53,7 @@ enum CStatueAnimIndex { CStatueAnimIndex_N, }; -u16 const daCstatue_c::m_bckIdxTable[daCstatueType_N][CStatueAnimIndex_N] = { +DUSK_GAME_DATA u16 const daCstatue_c::m_bckIdxTable[daCstatueType_N][CStatueAnimIndex_N] = { // daCstatueType_NORMAL {CStatueAnimSwing, CStatueAnimWalk, CStatueAnimSwing, CStatueAnimFall, CStatueAnimStop, CStatueAnimStart, CStatueAnimSwingre}, diff --git a/src/d/actor/d_a_e_dd.cpp b/src/d/actor/d_a_e_dd.cpp index 3c28489d36..76af1183b3 100644 --- a/src/d/actor/d_a_e_dd.cpp +++ b/src/d/actor/d_a_e_dd.cpp @@ -1775,7 +1775,7 @@ static cPhs_Step daE_DD_Create(fopAc_ac_c* a_this) { return phase; } -actor_method_class l_daE_DD_Method = { +DUSK_GAME_DATA actor_method_class l_daE_DD_Method = { (process_method_func)daE_DD_Create, (process_method_func)daE_DD_Delete, (process_method_func)daE_DD_Execute, diff --git a/src/d/actor/d_a_e_dn.cpp b/src/d/actor/d_a_e_dn.cpp index 954bf657eb..1386275ca0 100644 --- a/src/d/actor/d_a_e_dn.cpp +++ b/src/d/actor/d_a_e_dn.cpp @@ -1031,7 +1031,7 @@ static int way_check(e_dn_class* i_this) { return 2; } -int learn_check; +DUSK_GAME_DATA int learn_check; static void* shot_s_sub(void* i_actor, void* i_data) { UNUSED(i_data); diff --git a/src/d/actor/d_a_e_dt.cpp b/src/d/actor/d_a_e_dt.cpp index e52cadfd93..1078b89eb5 100644 --- a/src/d/actor/d_a_e_dt.cpp +++ b/src/d/actor/d_a_e_dt.cpp @@ -124,15 +124,15 @@ enum Joint { /* 0x2A */ JNT_TAIL_2, }; -f32 E_DT_n::eDt_ShakeFrame[10] = { +DUSK_GAME_DATA f32 E_DT_n::eDt_ShakeFrame[10] = { 20.0f, 22.0f, 24.0f, 26.0f, 28.0f, 30.0f, 32.0f, 34.0f, 36.0f, 38.0f, }; -f32 E_DT_n::eDt_ShakeFrameDemo[10] = { +DUSK_GAME_DATA f32 E_DT_n::eDt_ShakeFrameDemo[10] = { 310.0f, 312.0f, 314.0f, 316.0f, 318.0f, 320.0f, 322.0f, 324.0f, 326.0f, 328.0f, }; -dCcD_SrcSph E_DT_n::cc_dt_body_src = { +DUSK_GAME_DATA dCcD_SrcSph E_DT_n::cc_dt_body_src = { { {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {0xd8fbfdff, 0x43}, 0x75}}, // mObj {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -144,7 +144,7 @@ dCcD_SrcSph E_DT_n::cc_dt_body_src = { } // mSphAttr }; -dCcD_SrcSph E_DT_n::cc_dt_tongue_src = { +DUSK_GAME_DATA dCcD_SrcSph E_DT_n::cc_dt_tongue_src = { { {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {0xd8fbfdff, 0x43}, 0x75}}, // mObj {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -700,9 +700,9 @@ void daE_DT_c::setBoxTubaLandEffect() { } } -int E_DT_n::mDt_OtamaNum; +DUSK_GAME_DATA int E_DT_n::mDt_OtamaNum; -int E_DT_n::mDt_OtamaNo[20]; +DUSK_GAME_DATA int E_DT_n::mDt_OtamaNo[20]; static void* s_otama_todo(void* i_proc, void* i_this) { if (fopAcM_IsActor(i_proc) && !fpcM_IsCreating(fopAcM_GetID(i_proc)) @@ -726,7 +726,7 @@ int daE_DT_c::getNumberOfOtama() { return E_DT_n::mDt_OtamaNum; } -int E_DT_n::m_fall_no; +DUSK_GAME_DATA int E_DT_n::m_fall_no; static void* s_fall_otama(void* i_proc, void* i_this) { if (fopAcM_IsActor(i_proc) && !fpcM_IsCreating(fopAcM_GetID(i_proc)) @@ -772,7 +772,7 @@ static void* s_demo_otama(void* i_proc, void* i_this) { return NULL; } -cXyz E_DT_n::m_tongue_pos; +DUSK_GAME_DATA cXyz E_DT_n::m_tongue_pos; static void* s_bomb_search(void* i_proc, void* i_this) { if (fopAcM_IsActor(i_proc) && !fpcM_IsCreating(fopAcM_GetID(i_proc))) { diff --git a/src/d/actor/d_a_e_ge.cpp b/src/d/actor/d_a_e_ge.cpp index 20e7cd9cb2..cdf83bbed5 100644 --- a/src/d/actor/d_a_e_ge.cpp +++ b/src/d/actor/d_a_e_ge.cpp @@ -1081,7 +1081,7 @@ void daE_GE_c::executeShield() { } } -daE_GE_c::actionFunc daE_GE_c::l_actionmenu[9] = { +DUSK_GAME_DATA daE_GE_c::actionFunc daE_GE_c::l_actionmenu[9] = { (&daE_GE_c::executeWait), (&daE_GE_c::executeFly), (&daE_GE_c::executeAttack), (&daE_GE_c::executeBack), (&daE_GE_c::executeDown), (&daE_GE_c::executeSurprise), (&daE_GE_c::executeCaw), (&daE_GE_c::executeWind), (&daE_GE_c::executeShield), diff --git a/src/d/actor/d_a_e_mf.cpp b/src/d/actor/d_a_e_mf.cpp index dfc2363049..369c73b21e 100644 --- a/src/d/actor/d_a_e_mf.cpp +++ b/src/d/actor/d_a_e_mf.cpp @@ -3264,7 +3264,7 @@ e_mf_class::e_mf_class() {} AUDIO_INSTANCES; -actor_method_class l_daE_MF_Method = { +DUSK_GAME_DATA actor_method_class l_daE_MF_Method = { (process_method_func)daE_MF_Create, (process_method_func)daE_MF_Delete, (process_method_func)daE_MF_Execute, diff --git a/src/d/actor/d_a_e_oc.cpp b/src/d/actor/d_a_e_oc.cpp index fe7aa4c970..57828ccb7c 100644 --- a/src/d/actor/d_a_e_oc.cpp +++ b/src/d/actor/d_a_e_oc.cpp @@ -58,17 +58,17 @@ public: #endif }; -f32 const E_OC_n::oc_attackb_trans[10] = { +DUSK_GAME_DATA f32 const E_OC_n::oc_attackb_trans[10] = { 0.0f, 0.0f, 0.0f, 0.0f, 15.3f, 38.4f, 63.3f, 86.2f, 103.3f, 112.0f }; -f32 const E_OC_n::oc_attackc_trans[10] = { +DUSK_GAME_DATA f32 const E_OC_n::oc_attackc_trans[10] = { 0.0f, 31.3f, 72.7f, 91.5f, 91.5f, 91.5f, 91.5f, 91.5f, 91.5f, 91.5f }; -dCcD_SrcSph E_OC_n::cc_sph_src = { +DUSK_GAME_DATA dCcD_SrcSph E_OC_n::cc_sph_src = { { {0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x3}, 0x75}}, // mObj {0x9, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -80,7 +80,7 @@ dCcD_SrcSph E_OC_n::cc_sph_src = { } // mSphAttr }; -dCcD_SrcSph E_OC_n::at_sph_src = { +DUSK_GAME_DATA dCcD_SrcSph E_OC_n::at_sph_src = { { {0x0, {{0x1000, 0x1, 0xD}, {0x0, 0x0}, 0x0}}, // mObj {0x9, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -193,13 +193,13 @@ static int daE_OC_Draw(daE_OC_c* i_this) { return i_this->draw(); } -daE_OC_c* E_OC_n::m_battle_oc; +DUSK_GAME_DATA daE_OC_c* E_OC_n::m_battle_oc; -daE_OC_c* E_OC_n::m_damage_oc; +DUSK_GAME_DATA daE_OC_c* E_OC_n::m_damage_oc; -daE_OC_c* E_OC_n::m_death_oc; +DUSK_GAME_DATA daE_OC_c* E_OC_n::m_death_oc; -daE_OC_c* E_OC_n::m_talk_oc; +DUSK_GAME_DATA daE_OC_c* E_OC_n::m_talk_oc; static u8 lbl_216_bss_58; diff --git a/src/d/actor/d_a_e_oct_bg.cpp b/src/d/actor/d_a_e_oct_bg.cpp index 0a9cc280d4..df181dd23b 100644 --- a/src/d/actor/d_a_e_oct_bg.cpp +++ b/src/d/actor/d_a_e_oct_bg.cpp @@ -173,10 +173,10 @@ static int daE_OctBg_Delete(daE_OctBg_c* i_this) { static daE_OctBg_HIO_c l_HIO; -u8 unk_bss_78; -u8 unk_bss_79; -u8 unk_bss_7A; -u8 unk_bss_7B; +DUSK_GAME_DATA u8 unk_bss_78; +DUSK_GAME_DATA u8 unk_bss_79; +DUSK_GAME_DATA u8 unk_bss_7A; +DUSK_GAME_DATA u8 unk_bss_7B; void daE_OctBg_c::cc_set() { cXyz cStack_1c; diff --git a/src/d/actor/d_a_e_ym.cpp b/src/d/actor/d_a_e_ym.cpp index 39c1e0d360..7c96e289ee 100644 --- a/src/d/actor/d_a_e_ym.cpp +++ b/src/d/actor/d_a_e_ym.cpp @@ -35,7 +35,7 @@ public: /* 0x20 */ f32 mMoveRange; }; -dCcD_SrcSph E_YM_n::cc_sph_src = { +DUSK_GAME_DATA dCcD_SrcSph E_YM_n::cc_sph_src = { { {0, {{0x400, 1, 13}, {0xD8FBFDFF, 3}, 0x75}}, {dCcD_SE_METAL, 0, 0, 0, {0}}, diff --git a/src/d/actor/d_a_econt.cpp b/src/d/actor/d_a_econt.cpp index 2bd075c123..7a242add0f 100644 --- a/src/d/actor/d_a_econt.cpp +++ b/src/d/actor/d_a_econt.cpp @@ -10,7 +10,7 @@ #include "d/d_meter2_info.h" #include "f_pc/f_pc_executor.h" -u8 data_805197E0[4]; +DUSK_GAME_DATA u8 data_805197E0[4]; static int daEcont_Draw(econt_class* i_this) { return 1; diff --git a/src/d/actor/d_a_formation_mng.cpp b/src/d/actor/d_a_formation_mng.cpp index 3e625ebb07..4512826412 100644 --- a/src/d/actor/d_a_formation_mng.cpp +++ b/src/d/actor/d_a_formation_mng.cpp @@ -9,7 +9,7 @@ #include "d/d_save.h" #include "f_op/f_op_actor_mng.h" -FmtMngAttributes const daFmtMng_c::M_attr = { +DUSK_GAME_DATA FmtMngAttributes const daFmtMng_c::M_attr = { 0x14, 6.0f, 0.5f, 120.0f, 150.0f, 10, 0x4000, }; @@ -62,7 +62,7 @@ void daFmtMng_c::initMemberPos() { } } -daFmtMng_c::ActionFunc daFmtMng_c::ActionTable[10] = { +DUSK_GAME_DATA daFmtMng_c::ActionFunc daFmtMng_c::ActionTable[10] = { &daFmtMng_c::initWait, &daFmtMng_c::executeWait, &daFmtMng_c::initWalk, &daFmtMng_c::executeWalk, &daFmtMng_c::initReverse, &daFmtMng_c::executeReverse, diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index dbbd7f0fba..72b1fb1e7b 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -76,11 +76,11 @@ static void strippedFunc() { static char const l_arcName[] = "Horse"; -const u16 daHorse_c::m_footJointTable[] = { +DUSK_GAME_DATA const u16 daHorse_c::m_footJointTable[] = { 3, 7, 27, 31, }; -const f32 daHorse_c::m_callLimitDistance2 = 640000.0f; +DUSK_GAME_DATA const f32 daHorse_c::m_callLimitDistance2 = 640000.0f; static f32 l_autoUpHeight = 50.0f; @@ -170,7 +170,7 @@ void daHorse_hio_c::genMessage(JORMContext* ctx) { } #endif -const daHorse_hio_c1 daHorse_hio_c0::m = { +DUSK_GAME_DATA const daHorse_hio_c1 daHorse_hio_c0::m = { 600, 50, 45, diff --git a/src/d/actor/d_a_hozelda.cpp b/src/d/actor/d_a_hozelda.cpp index 34f8f3c9c9..dfc9ba038c 100644 --- a/src/d/actor/d_a_hozelda.cpp +++ b/src/d/actor/d_a_hozelda.cpp @@ -31,7 +31,7 @@ static void* daHoZelda_searchGanon(fopAc_ac_c* i_actor, void* i_data) { return NULL; } -const daHoZelda_hio_c1 daHoZelda_hio_c0::m = { +DUSK_GAME_DATA const daHoZelda_hio_c1 daHoZelda_hio_c0::m = { 0x38E, 0x2AAA, 0x4000, @@ -40,8 +40,8 @@ const daHoZelda_hio_c1 daHoZelda_hio_c0::m = { 4000.0f, }; -u8 daHoZelda_matAnm_c::mEyeMoveFlg; -u8 daHoZelda_matAnm_c::mMorfFrame; +DUSK_GAME_DATA u8 daHoZelda_matAnm_c::mEyeMoveFlg; +DUSK_GAME_DATA u8 daHoZelda_matAnm_c::mMorfFrame; void daHoZelda_matAnm_c::init() { field_0xf4 = 0.0f; diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index 3082fc6a71..1b96147957 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -109,7 +109,7 @@ void daMidna_hio_c::genMessage(JORMContext* ctx) { } #endif -daMidna_hio_c1 const daMidna_hio_c0::m = { +DUSK_GAME_DATA daMidna_hio_c1 const daMidna_hio_c0::m = { 0, 0, 0, @@ -126,8 +126,8 @@ daMidna_hio_c1 const daMidna_hio_c0::m = { 25.0f, }; -bool daMidna_matAnm_c::sEyeMoveFlg; -u8 daMidna_matAnm_c::sMorfFrame; +DUSK_GAME_DATA bool daMidna_matAnm_c::sEyeMoveFlg; +DUSK_GAME_DATA u8 daMidna_matAnm_c::sMorfFrame; void daMidna_matAnm_c::init() { mOldTransX = 0.0f; @@ -173,7 +173,7 @@ int daMidna_McaMorfCB1_c::execute(u16 i_jointNo, J3DTransformInfo* transform) { return 1; } -daMidna_texData_s const daMidna_c::m_texDataTable[21] = { +DUSK_GAME_DATA daMidna_texData_s const daMidna_c::m_texDataTable[21] = { 0x0405, 0x03A4, 0x03F5, 0x0399, 0x03F6, 0x0399, @@ -197,7 +197,7 @@ daMidna_texData_s const daMidna_c::m_texDataTable[21] = { 0x03FD, 0x0399, }; -daMidna_anmData_s const daMidna_c::m_anmDataTable[53] = { +DUSK_GAME_DATA daMidna_anmData_s const daMidna_c::m_anmDataTable[53] = { 0x01DC, 0x00, -1.0f, 0, 0x01B7, 0x01, -1.0f, 0, 0x01B8, 0x02, -1.0f, 0, diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index 4b25ead19c..93409fdb65 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -254,7 +254,7 @@ static void* daMyna_searchEvtTag(void* i_evtTagActor, void* param_1) { return 0; } -dCcD_SrcSph const daMyna_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph const daMyna_c::mCcDSph = { 0, 0x400, 1, 0x1F, 0, 0, 0x79, 0xA, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 15.0f, }; @@ -326,7 +326,7 @@ int daMyna_c::baseMotion06(int param_0) { return 1; } -daMyna_c::BaseMotionFunc daMyna_c::mBaseMotionTBL[] = { +DUSK_GAME_DATA daMyna_c::BaseMotionFunc daMyna_c::mBaseMotionTBL[] = { &daMyna_c::baseMotion00, &daMyna_c::baseMotion01, &daMyna_c::baseMotion02, &daMyna_c::baseMotion03, &daMyna_c::baseMotion04, &daMyna_c::baseMotion05, &daMyna_c::baseMotion06, diff --git a/src/d/actor/d_a_nbomb.cpp b/src/d/actor/d_a_nbomb.cpp index 00d27306f3..0626290433 100644 --- a/src/d/actor/d_a_nbomb.cpp +++ b/src/d/actor/d_a_nbomb.cpp @@ -117,7 +117,7 @@ static dCcD_SrcSph l_sphSrc = { } // mSphAttr }; -const char* daNbomb_c::m_arcNameList[6] = { +DUSK_GAME_DATA const char* daNbomb_c::m_arcNameList[6] = { daAlink_c::getAlinkArcName(), daAlink_c::getAlinkArcName(), daAlink_c::getAlinkArcName(), l_arcNameBombF, l_arcNameBombE, l_arcNameBombEW, }; diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 8fd99f2cb4..d093c51d70 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -1219,7 +1219,7 @@ void daNpcT_DmgStagger_c::calc(BOOL param_0) { } } -dCcD_SrcCyl daNpcT_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daNpcT_c::mCcDCyl = { daNpcT_c::mCcDObjData, { { @@ -1230,7 +1230,7 @@ dCcD_SrcCyl daNpcT_c::mCcDCyl = { } }; -dCcD_SrcSph daNpcT_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daNpcT_c::mCcDSph = { daNpcT_c::mCcDObjData, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph @@ -1252,13 +1252,13 @@ void daNpcT_c::tgHitCallBack(fopAc_ac_c* i_actor1, dCcD_GObjInf* i_obj1, fopAc_a static_cast(actor1)->setCutType(cut_type); } -fopAc_ac_c* daNpcT_c::mFindActorPtrs[50]; +DUSK_GAME_DATA fopAc_ac_c* daNpcT_c::mFindActorPtrs[50]; -char l_fileNameBuf[0x15]; +DUSK_GAME_DATA char l_fileNameBuf[0x15]; -s16 daNpcT_c::mSrchName; +DUSK_GAME_DATA s16 daNpcT_c::mSrchName; -int daNpcT_c::mFindCount; +DUSK_GAME_DATA int daNpcT_c::mFindCount; void* daNpcT_c::srchActor(void* i_actor1, void* i_actor2) { fopAc_ac_c* actor2 = (fopAc_ac_c*)i_actor2; @@ -2901,7 +2901,7 @@ BOOL daNpcT_chkTmpBit(u32 i_no) { return dComIfGs_isTmpBit((u16)dSv_event_tmp_flag_c::tempBitLabels[i_no]); } -const dCcD_SrcGObjInf daNpcT_c::mCcDObjData = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daNpcT_c::mCcDObjData = { {0, {{0, 0, 0}, {0, 0x00}, {0x79}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 0}, diff --git a/src/d/actor/d_a_npc2.cpp b/src/d/actor/d_a_npc2.cpp index 6bc5e7f08d..6bf14418ae 100644 --- a/src/d/actor/d_a_npc2.cpp +++ b/src/d/actor/d_a_npc2.cpp @@ -7,7 +7,7 @@ static s32 daBaseNpc_chkPnt(cXyz param_0, dPnt* param_1, u16 param_2, u16 param_ static u16 daBaseNpc_putNurbs(dPnt* i_CPnts, int i_CPntNum, int i_maxPntNum, dPnt* o_curve_p, BOOL i_isClosed); static s16 daBaseNpc_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1); -dCcD_SrcCyl daBaseNpc_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daBaseNpc_c::mCcDCyl = { daBaseNpc_c::mCcDObj, { { @@ -18,7 +18,7 @@ dCcD_SrcCyl daBaseNpc_c::mCcDCyl = { } }; -dCcD_SrcSph daBaseNpc_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daBaseNpc_c::mCcDSph = { daBaseNpc_c::mCcDObj, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph @@ -701,11 +701,11 @@ static int CheckCreateHeap(fopAc_ac_c* i_this) { return moveBgActor->MoveBGCreateHeap(); } -const char* daBaseNpc_moveBgActor_c::m_name; +DUSK_GAME_DATA const char* daBaseNpc_moveBgActor_c::m_name; -int daBaseNpc_moveBgActor_c::m_dzb_id; +DUSK_GAME_DATA int daBaseNpc_moveBgActor_c::m_dzb_id; -MoveBGActor_SetFunc daBaseNpc_moveBgActor_c::m_set_func; +DUSK_GAME_DATA MoveBGActor_SetFunc daBaseNpc_moveBgActor_c::m_set_func; int daBaseNpc_moveBgActor_c::MoveBGCreateHeap() { if (!CreateHeap()) { diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp index ef8b75fb19..b6e3092051 100644 --- a/src/d/actor/d_a_npc4.cpp +++ b/src/d/actor/d_a_npc4.cpp @@ -707,7 +707,7 @@ void daNpcF_c::tgHitCallBack(fopAc_ac_c* i_this, dCcD_GObjInf* param_1, fopAc_ac } } -dCcD_SrcCyl daNpcF_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daNpcF_c::mCcDCyl = { daNpcF_c::mCcDObjInfo, { { @@ -718,18 +718,18 @@ dCcD_SrcCyl daNpcF_c::mCcDCyl = { } }; -dCcD_SrcSph daNpcF_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daNpcF_c::mCcDSph = { daNpcF_c::mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph } // mSphAttr }; -char daNpcF_c::mFileNameBuf[0x15]; +DUSK_GAME_DATA char daNpcF_c::mFileNameBuf[0x15]; -fopAc_ac_c* daNpcF_c::mFindActorPList[100]; +DUSK_GAME_DATA fopAc_ac_c* daNpcF_c::mFindActorPList[100]; -s32 daNpcF_c::mFindCount; +DUSK_GAME_DATA s32 daNpcF_c::mFindCount; void* daNpcF_c::srchAttnActor1(void* i_proc, void* param_1) { void* param_1_copy = param_1; @@ -746,7 +746,7 @@ void* daNpcF_c::srchAttnActor1(void* i_proc, void* param_1) { return NULL; } -s16 daNpcF_c::mSrchActorName; +DUSK_GAME_DATA s16 daNpcF_c::mSrchActorName; void* daNpcF_c::srchActor(void* i_proc, void* i_this) { void* i_this_copy = i_this; @@ -2159,14 +2159,14 @@ int daNpcF_MoveBgActor_c::MoveBGDraw() { return Draw(); } -dCcD_SrcGObjInf const daBaseNpc_c::mCcDObj = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daBaseNpc_c::mCcDObj = { {0, {{0, 0, 0}, {0x0, 0x0}, {0x79}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 0}, {0} }; -dCcD_SrcGObjInf const daNpcF_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daNpcF_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0x0, 0x0}, {0x79}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 0}, diff --git a/src/d/actor/d_a_npc_aru.cpp b/src/d/actor/d_a_npc_aru.cpp index 8e6018873c..7e6558b877 100644 --- a/src/d/actor/d_a_npc_aru.cpp +++ b/src/d/actor/d_a_npc_aru.cpp @@ -141,7 +141,7 @@ enum Type { /* 0x4 */ TYPE_4, }; -const daNpc_Aru_HIOParam daNpc_Aru_Param_c::m = { +DUSK_GAME_DATA const daNpc_Aru_HIOParam daNpc_Aru_Param_c::m = { 220.0f, -3.0f, 1.0f, @@ -345,7 +345,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {11, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Aru_c::mCutNameList[7] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Aru_c::mCutNameList[7] = { "", "RIDEON_HORSE", "GOTO_BULLRUNNING_STAGE", @@ -355,7 +355,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Aru_c::mCutNameList[7] = { "NO_ENTRANCE", }; -daNpc_Aru_c::cutFunc DUSK_CONST daNpc_Aru_c::mCutList[7] = { +DUSK_GAME_DATA daNpc_Aru_c::cutFunc DUSK_CONST daNpc_Aru_c::mCutList[7] = { NULL, &daNpc_Aru_c::cutRideOnHorse, &daNpc_Aru_c::cutGotoBullRunningStage, diff --git a/src/d/actor/d_a_npc_ash.cpp b/src/d/actor/d_a_npc_ash.cpp index e209fbf4ce..7bfde34700 100644 --- a/src/d/actor/d_a_npc_ash.cpp +++ b/src/d/actor/d_a_npc_ash.cpp @@ -12,7 +12,7 @@ #include "SSystem/SComponent/c_math.h" #include -const daNpcAsh_HIOParam daNpcAsh_Param_c::m = { +DUSK_GAME_DATA const daNpcAsh_HIOParam daNpcAsh_Param_c::m = { 35.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -198,7 +198,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[6] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Ash"; -daNpcAsh_c::EventFn daNpcAsh_c::mEvtSeqList[6] = { +DUSK_GAME_DATA daNpcAsh_c::EventFn daNpcAsh_c::mEvtSeqList[6] = { NULL, &daNpcAsh_c::EvCut_Introduction, &daNpcAsh_c::EvCut_Meeting, diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 216f2c10cb..a4dd015906 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -10,7 +10,7 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include -const daNpcAshB_HIOParam daNpcAshB_Param_c::m = { +DUSK_GAME_DATA const daNpcAshB_HIOParam daNpcAshB_Param_c::m = { 205.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -93,7 +93,7 @@ void daNpcAshB_HIO_c::genMessage(JORMContext* ctext) { } #endif -daNpcAshB_c::EventFn DUSK_CONST daNpcAshB_c::mEvtSeqList[2] = { +DUSK_GAME_DATA daNpcAshB_c::EventFn DUSK_CONST daNpcAshB_c::mEvtSeqList[2] = { NULL, &daNpcAshB_c::EvCut_Appear, }; diff --git a/src/d/actor/d_a_npc_bans.cpp b/src/d/actor/d_a_npc_bans.cpp index 1755c46cfd..db08a19bde 100644 --- a/src/d/actor/d_a_npc_bans.cpp +++ b/src/d/actor/d_a_npc_bans.cpp @@ -138,7 +138,7 @@ enum Type { /* 0x5 */ TYPE_DEFAULT, }; -daNpc_Bans_HIOParam const daNpc_Bans_Param_c::m = { +DUSK_GAME_DATA daNpc_Bans_HIOParam const daNpc_Bans_Param_c::m = { 200.0f, -3.0f, 1.0f, @@ -335,14 +335,14 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {9, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Bans_c::mCutNameList[4] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Bans_c::mCutNameList[4] = { "", "ANGER", "PURCHASE", "GO_BACK", }; -daNpc_Bans_c::cutFunc DUSK_CONST daNpc_Bans_c::mCutList[4] = { +DUSK_GAME_DATA daNpc_Bans_c::cutFunc DUSK_CONST daNpc_Bans_c::mCutList[4] = { NULL, &daNpc_Bans_c::cutAnger, &daNpc_Bans_c::cutPurchase, diff --git a/src/d/actor/d_a_npc_besu.cpp b/src/d/actor/d_a_npc_besu.cpp index b3f5fef623..197f97dfb0 100644 --- a/src/d/actor/d_a_npc_besu.cpp +++ b/src/d/actor/d_a_npc_besu.cpp @@ -284,7 +284,7 @@ enum Event { /* 0xC */ EVENT_CONVERSATION_ABOUT_ZORA, }; -const daNpc_Besu_HIOParam daNpc_Besu_Param_c::m = { +DUSK_GAME_DATA const daNpc_Besu_HIOParam daNpc_Besu_Param_c::m = { 160.0f, -3.0f, 1.0f, @@ -577,7 +577,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {9, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Besu_c::mCutNameList[15] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Besu_c::mCutNameList[15] = { "", "CONVERSATION_ABOUT_SARU", "CONVERSATION_ABOUT_PACHINKO", @@ -595,7 +595,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Besu_c::mCutNameList[15] = { "THANK_YOU", }; -daNpc_Besu_c::cutFunc DUSK_CONST daNpc_Besu_c::mCutList[15] = { +DUSK_GAME_DATA daNpc_Besu_c::cutFunc DUSK_CONST daNpc_Besu_c::mCutList[15] = { NULL, &daNpc_Besu_c::cutConversationAboutSaru, &daNpc_Besu_c::cutConversationAboutPachinko, diff --git a/src/d/actor/d_a_npc_blue_ns.cpp b/src/d/actor/d_a_npc_blue_ns.cpp index c2f1e2563d..9b8ccf41dd 100644 --- a/src/d/actor/d_a_npc_blue_ns.cpp +++ b/src/d/actor/d_a_npc_blue_ns.cpp @@ -39,7 +39,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Blue_NS"; static NPC_BLUE_NS_HIO_CLASS l_HIO; -daNpcBlueNS_c::EventFn DUSK_CONST daNpcBlueNS_c::mEvtSeqList[] = { +DUSK_GAME_DATA daNpcBlueNS_c::EventFn DUSK_CONST daNpcBlueNS_c::mEvtSeqList[] = { NULL, &daNpcBlueNS_c::_Evt_ChgYami_Chibi, &daNpcBlueNS_c::_Evt_ChgYami_Debu, @@ -93,7 +93,7 @@ const static dCcD_SrcCyl l_cyl_src = { } }; -const daNpcBlueNS_HIOParam daNpcBlueNS_Param_c::m = { +DUSK_GAME_DATA const daNpcBlueNS_HIOParam daNpcBlueNS_Param_c::m = { 55.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_bou.cpp b/src/d/actor/d_a_npc_bou.cpp index 0d4d34b206..a8915773a7 100644 --- a/src/d/actor/d_a_npc_bou.cpp +++ b/src/d/actor/d_a_npc_bou.cpp @@ -119,7 +119,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {6, -1, 1}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Bou_c::mCutNameList[9] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Bou_c::mCutNameList[9] = { "", "WILDGOAT", "WILDGOAT_SUCCESS", @@ -131,7 +131,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Bou_c::mCutNameList[9] = { "MEETING_AGAIN" }; -daNpc_Bou_c::cutFunc DUSK_CONST daNpc_Bou_c::mCutList[9] = { +DUSK_GAME_DATA daNpc_Bou_c::cutFunc DUSK_CONST daNpc_Bou_c::mCutList[9] = { NULL, &daNpc_Bou_c::cutWildGoat, &daNpc_Bou_c::cutWildGoatSuccess, @@ -157,7 +157,7 @@ daNpc_Bou_c::~daNpc_Bou_c() { deleteRes(l_loadResPtrnList[mType], (char const**)l_resNameList); } -daNpc_Bou_HIOParam const daNpc_Bou_Param_c::m = { +DUSK_GAME_DATA daNpc_Bou_HIOParam const daNpc_Bou_Param_c::m = { { 210.0f, -3.0f, 1.0f, 600.0f, 255.0f, 200.0f, 35.0f, 40.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, diff --git a/src/d/actor/d_a_npc_bouS.cpp b/src/d/actor/d_a_npc_bouS.cpp index 0180b100cc..ffd0156f9b 100644 --- a/src/d/actor/d_a_npc_bouS.cpp +++ b/src/d/actor/d_a_npc_bouS.cpp @@ -261,7 +261,7 @@ void daNpcBouS_HIO_c::genMessage(JORMContext* ctx) { } #endif -daNpcBouS_c::eventFunc daNpcBouS_c::mEvtSeqList[4] = { +DUSK_GAME_DATA daNpcBouS_c::eventFunc daNpcBouS_c::mEvtSeqList[4] = { NULL, &daNpcBouS_c::EvCut_BousIntroSumo1, &daNpcBouS_c::EvCut_BousIntroSumo2, @@ -286,7 +286,7 @@ daNpcBouS_c::~daNpcBouS_c() { #endif } -daNpcBouS_HIOParam const daNpcBouS_Param_c::m = { +DUSK_GAME_DATA daNpcBouS_HIOParam const daNpcBouS_Param_c::m = { 220.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_cd.cpp b/src/d/actor/d_a_npc_cd.cpp index 29f5021fae..cc4ab6f967 100644 --- a/src/d/actor/d_a_npc_cd.cpp +++ b/src/d/actor/d_a_npc_cd.cpp @@ -160,7 +160,7 @@ static anmTblPrm const l_bckTbl_W[10] = { {"Wspcial_l", 7}, {"Wspcial_l", 8}, {"Wspcial_l", 3}, {"Wspcial_l", 4}, {"Wspcial_l", 5}, }; -dCcD_SrcCyl const daNpcCd_c::m_cylDat = { +DUSK_GAME_DATA dCcD_SrcCyl const daNpcCd_c::m_cylDat = { { {0x0, {{0x0, 0x0, 0x0}, {0, 0}, 0x79}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -346,7 +346,7 @@ static anmTblPrm const l_bmdTWTbl[30] = { {l_resWGNa2[1], 3}, {l_resWANb2[1], 3}, }; -daNpcCd_HIO_c l_Cd_HIO; +DUSK_GAME_DATA daNpcCd_HIO_c l_Cd_HIO; int daNpcCd_c::setAttention(int i_idx) { static cXyz const a_eyeOfsTbl[30] = { diff --git a/src/d/actor/d_a_npc_cd2.cpp b/src/d/actor/d_a_npc_cd2.cpp index 87e5258901..c42f5f947c 100644 --- a/src/d/actor/d_a_npc_cd2.cpp +++ b/src/d/actor/d_a_npc_cd2.cpp @@ -179,7 +179,7 @@ static anmTblPrm const l_bckTbl_W[54] = { {"Wgeneral", 5}, {"Wgeneral", 6}, {"Wgeneral", 9}, {"Wgeneral", 15}, }; -dCcD_SrcCyl const daNpcCd2_c::m_cylDat = { +DUSK_GAME_DATA dCcD_SrcCyl const daNpcCd2_c::m_cylDat = { { {0x0, {{0x0, 0x0, 0x0}, {0, 0}, 0x79}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -240,7 +240,7 @@ static anmTblPrm const l_btpTWTbl[30] = { #include "d/actor/d_a_npc_cd2_HIO.inc" -daNpcCd2_HIO_c l_Cd2_HIO; +DUSK_GAME_DATA daNpcCd2_HIO_c l_Cd2_HIO; int daNpcCd2_c::NpcCreate(int param_1) { J3DModelData* a_mdlData_p = getNpcMdlDataP(param_1); diff --git a/src/d/actor/d_a_npc_cdn3.cpp b/src/d/actor/d_a_npc_cdn3.cpp index e1767b1e50..1b9ee8c6f3 100644 --- a/src/d/actor/d_a_npc_cdn3.cpp +++ b/src/d/actor/d_a_npc_cdn3.cpp @@ -10,7 +10,7 @@ #include "d/d_s_play.h" #include -const daNpcCdn3_c::ActionPair daNpcCdn3_c::ActionTable[8] = { +DUSK_GAME_DATA const daNpcCdn3_c::ActionPair daNpcCdn3_c::ActionTable[8] = { {&daNpcCdn3_c::initWait, &daNpcCdn3_c::executeWait}, {&daNpcCdn3_c::initPath, &daNpcCdn3_c::executePath}, {&daNpcCdn3_c::initTalk, &daNpcCdn3_c::executeTalk}, @@ -1500,7 +1500,7 @@ inline int daNpcCdn3_c::draw() { return 1; } -daNpcCdn3_c::seqFunc* daNpcCdn3_c::m_funcTbl[44] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc* daNpcCdn3_c::m_funcTbl[44] = { m_seq00_funcTbl, m_seq01_funcTbl, m_seq02_funcTbl, m_seq03_funcTbl, m_seq04_funcTbl, m_seq05_funcTbl, @@ -1525,25 +1525,25 @@ daNpcCdn3_c::seqFunc* daNpcCdn3_c::m_funcTbl[44] = { m_seq42_funcTbl, m_seq43_funcTbl, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq00_funcTbl[2] = {&daNpcCdn3_c::walka, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq00_funcTbl[2] = {&daNpcCdn3_c::walka, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq01_funcTbl[2] = {&daNpcCdn3_c::runa, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq01_funcTbl[2] = {&daNpcCdn3_c::runa, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq02_funcTbl[2] = {&daNpcCdn3_c::waita, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq02_funcTbl[2] = {&daNpcCdn3_c::waita, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq03_funcTbl[2] = {&daNpcCdn3_c::talka, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq03_funcTbl[2] = {&daNpcCdn3_c::talka, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq04_funcTbl[2] = {&daNpcCdn3_c::runb, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq04_funcTbl[2] = {&daNpcCdn3_c::runb, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq05_funcTbl[4] = {&daNpcCdn3_c::turnr, &daNpcCdn3_c::waita, +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq05_funcTbl[4] = {&daNpcCdn3_c::turnr, &daNpcCdn3_c::waita, &daNpcCdn3_c::talka, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq06_funcTbl[4] = {&daNpcCdn3_c::turnl, &daNpcCdn3_c::waita, +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq06_funcTbl[4] = {&daNpcCdn3_c::turnl, &daNpcCdn3_c::waita, &daNpcCdn3_c::talka, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq07_funcTbl[2] = {&daNpcCdn3_c::waitwall, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq07_funcTbl[2] = {&daNpcCdn3_c::waitwall, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq08_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq08_funcTbl[7] = { &daNpcCdn3_c::talkwall, &daNpcCdn3_c::waitwall, &daNpcCdn3_c::talkbwall, @@ -1553,25 +1553,25 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq08_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq09_funcTbl[2] = {&daNpcCdn3_c::talkb, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq09_funcTbl[2] = {&daNpcCdn3_c::talkb, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq10_funcTbl[2] = {&daNpcCdn3_c::talkc, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq10_funcTbl[2] = {&daNpcCdn3_c::talkc, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq11_funcTbl[6] = {&daNpcCdn3_c::talka, &daNpcCdn3_c::waita, +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq11_funcTbl[6] = {&daNpcCdn3_c::talka, &daNpcCdn3_c::waita, &daNpcCdn3_c::talkb, &daNpcCdn3_c::waitb, &daNpcCdn3_c::talkc, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq12_funcTbl[2] = {&daNpcCdn3_c::waitb, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq12_funcTbl[2] = {&daNpcCdn3_c::waitb, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq13_funcTbl[6] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq13_funcTbl[6] = { &daNpcCdn3_c::browsea, &daNpcCdn3_c::browseb, &daNpcCdn3_c::talka, &daNpcCdn3_c::talkb, &daNpcCdn3_c::waita, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq14_funcTbl[2] = {&daNpcCdn3_c::walkb, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq14_funcTbl[2] = {&daNpcCdn3_c::walkb, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq15_funcTbl[2] = {&daNpcCdn3_c::sitwaita, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq15_funcTbl[2] = {&daNpcCdn3_c::sitwaita, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq16_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq16_funcTbl[7] = { &daNpcCdn3_c::sittalka, &daNpcCdn3_c::sitwaita, &daNpcCdn3_c::sittalkab, @@ -1581,14 +1581,14 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq16_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq17_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq17_funcTbl[2] = { &daNpcCdn3_c::playm, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq18_funcTbl[2] = {&daNpcCdn3_c::sitwaitb, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq18_funcTbl[2] = {&daNpcCdn3_c::sitwaitb, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq19_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq19_funcTbl[7] = { &daNpcCdn3_c::sittalkb, &daNpcCdn3_c::sitwaitb, &daNpcCdn3_c::sittalkbb, @@ -1598,14 +1598,14 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq19_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq20_funcTbl[2] = {&daNpcCdn3_c::looka, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq20_funcTbl[2] = {&daNpcCdn3_c::looka, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq21_funcTbl[2] = {&daNpcCdn3_c::lookb, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq21_funcTbl[2] = {&daNpcCdn3_c::lookb, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq22_funcTbl[4] = {&daNpcCdn3_c::looka, &daNpcCdn3_c::lookb, +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq22_funcTbl[4] = {&daNpcCdn3_c::looka, &daNpcCdn3_c::lookb, &daNpcCdn3_c::waita, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq23_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq23_funcTbl[7] = { &daNpcCdn3_c::talka, &daNpcCdn3_c::waita, &daNpcCdn3_c::talkb, @@ -1615,11 +1615,11 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq23_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq24_funcTbl[5] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq24_funcTbl[5] = { &daNpcCdn3_c::talkb, &daNpcCdn3_c::talka, &daNpcCdn3_c::talkc, &daNpcCdn3_c::waita, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq25_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq25_funcTbl[7] = { &daNpcCdn3_c::browsea, &daNpcCdn3_c::browseb, &daNpcCdn3_c::talka, @@ -1629,37 +1629,37 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq25_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq26_funcTbl[3] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq26_funcTbl[3] = { &daNpcCdn3_c::browsea, &daNpcCdn3_c::browseb, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq27_funcTbl[2] = {&daNpcCdn3_c::dance, NULL}; +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq27_funcTbl[2] = {&daNpcCdn3_c::dance, NULL}; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq28_funcTbl[3] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq28_funcTbl[3] = { &daNpcCdn3_c::ladytalka, &daNpcCdn3_c::normtalka, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq29_funcTbl[3] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq29_funcTbl[3] = { &daNpcCdn3_c::ladytalkb, &daNpcCdn3_c::normtalkb, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq30_funcTbl[6] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq30_funcTbl[6] = { &daNpcCdn3_c::talka, &daNpcCdn3_c::ladytalka, &daNpcCdn3_c::waita, &daNpcCdn3_c::talkb, &daNpcCdn3_c::waita, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq31_funcTbl[6] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq31_funcTbl[6] = { &daNpcCdn3_c::waita, &daNpcCdn3_c::ladytalkb, &daNpcCdn3_c::talka, &daNpcCdn3_c::waita, &daNpcCdn3_c::talkb, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq32_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq32_funcTbl[7] = { &daNpcCdn3_c::talka, &daNpcCdn3_c::ladytalka, &daNpcCdn3_c::waita, @@ -1669,7 +1669,7 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq32_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq33_funcTbl[7] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq33_funcTbl[7] = { &daNpcCdn3_c::waita, &daNpcCdn3_c::ladytalkb, &daNpcCdn3_c::talka, @@ -1679,50 +1679,50 @@ daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq33_funcTbl[7] = { NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq34_funcTbl[9] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq34_funcTbl[9] = { &daNpcCdn3_c::talka, &daNpcCdn3_c::ladytalka, &daNpcCdn3_c::ladytalkb, &daNpcCdn3_c::waita, &daNpcCdn3_c::talkb, &daNpcCdn3_c::waita, &daNpcCdn3_c::normtalka, &daNpcCdn3_c::normtalkb, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq35_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq35_funcTbl[2] = { &daNpcCdn3_c::sellme, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq36_funcTbl[4] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq36_funcTbl[4] = { &daNpcCdn3_c::ladytalkb, &daNpcCdn3_c::talka, &daNpcCdn3_c::waita, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq37_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq37_funcTbl[2] = { &daNpcCdn3_c::sing, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq38_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq38_funcTbl[2] = { &daNpcCdn3_c::sittalka, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq39_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq39_funcTbl[2] = { &daNpcCdn3_c::sittalkab, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq40_funcTbl[3] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq40_funcTbl[3] = { &daNpcCdn3_c::sittalka, &daNpcCdn3_c::sittalkab, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq41_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq41_funcTbl[2] = { &daNpcCdn3_c::sittalkb, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq42_funcTbl[2] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq42_funcTbl[2] = { &daNpcCdn3_c::sittalkbb, NULL, }; -daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq43_funcTbl[3] = { +DUSK_GAME_DATA daNpcCdn3_c::seqFunc daNpcCdn3_c::m_seq43_funcTbl[3] = { &daNpcCdn3_c::sittalkb, &daNpcCdn3_c::sittalkbb, NULL, }; diff --git a/src/d/actor/d_a_npc_chat.cpp b/src/d/actor/d_a_npc_chat.cpp index d39f139281..e9f4412b8c 100644 --- a/src/d/actor/d_a_npc_chat.cpp +++ b/src/d/actor/d_a_npc_chat.cpp @@ -2182,7 +2182,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Chat"; static NPC_CHAT_HIO_CLASS l_HIO; -daNpcChat_c::eventFunc DUSK_CONST daNpcChat_c::mEvtSeqList[1] = { +DUSK_GAME_DATA daNpcChat_c::eventFunc DUSK_CONST daNpcChat_c::mEvtSeqList[1] = { NULL, }; @@ -2218,7 +2218,7 @@ static DUSK_CONSTEXPR anmTblPrm const l_objTWTbl[13] = { {"objectTW", -1}, }; -daNpcChat_HIOParam const daNpcChat_Param_c::m = { +DUSK_GAME_DATA daNpcChat_HIOParam const daNpcChat_Param_c::m = { 55.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_chin.cpp b/src/d/actor/d_a_npc_chin.cpp index 463efb8c9d..f31cac9822 100644 --- a/src/d/actor/d_a_npc_chin.cpp +++ b/src/d/actor/d_a_npc_chin.cpp @@ -26,7 +26,7 @@ static s16 const sLoadResPat_Normal[6] = {0, 1, 2, 4, 5, -1}; static s16 const sLoadResPat_Tw[3] = {0, 3, -1}; -daNpcChin_HIOParam const daNpcChin_Param_c::m = { +DUSK_GAME_DATA daNpcChin_HIOParam const daNpcChin_Param_c::m = { 40.0f, -3.0f, 1.0f, 400.0f, 255.0f, 130.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, @@ -130,7 +130,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[8] = { static u8 lit_3861[12]; -daNpcChin_c::eventFunc daNpcChin_c::mEvtSeqList[8] = { +DUSK_GAME_DATA daNpcChin_c::eventFunc daNpcChin_c::mEvtSeqList[8] = { NULL, &daNpcChin_c::_Evt_GameStart, &daNpcChin_c::_Evt_GameFailed, diff --git a/src/d/actor/d_a_npc_clerka.cpp b/src/d/actor/d_a_npc_clerka.cpp index 3232afc7f7..16fb887636 100644 --- a/src/d/actor/d_a_npc_clerka.cpp +++ b/src/d/actor/d_a_npc_clerka.cpp @@ -9,7 +9,7 @@ #include "d/d_msg_object.h" #include -const daNpc_clerkA_HIOParam daNpc_clerkA_Param_c::m = { +DUSK_GAME_DATA const daNpc_clerkA_HIOParam daNpc_clerkA_Param_c::m = { 220.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -115,9 +115,9 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {6, -9, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_clerkA_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_clerkA_c::mCutNameList[1] = {""}; -daNpc_clerkA_c::cutFunc DUSK_CONST daNpc_clerkA_c::mCutList[1] = {NULL}; +DUSK_GAME_DATA daNpc_clerkA_c::cutFunc DUSK_CONST daNpc_clerkA_c::mCutList[1] = {NULL}; daNpc_clerkA_c::~daNpc_clerkA_c() { deleteObject(); diff --git a/src/d/actor/d_a_npc_clerkb.cpp b/src/d/actor/d_a_npc_clerkb.cpp index fdf4ec9ace..38c75135f6 100644 --- a/src/d/actor/d_a_npc_clerkb.cpp +++ b/src/d/actor/d_a_npc_clerkb.cpp @@ -9,7 +9,7 @@ #include "d/d_msg_object.h" #include -const daNpc_clerkB_HIOParam daNpc_clerkB_Param_c::m = { +DUSK_GAME_DATA const daNpc_clerkB_HIOParam daNpc_clerkB_Param_c::m = { 220.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -120,9 +120,9 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {8, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_clerkB_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_clerkB_c::mCutNameList[1] = {""}; -daNpc_clerkB_c::cutFunc DUSK_CONST daNpc_clerkB_c::mCutList[1] = {NULL}; +DUSK_GAME_DATA daNpc_clerkB_c::cutFunc DUSK_CONST daNpc_clerkB_c::mCutList[1] = {NULL}; daNpc_clerkB_c::~daNpc_clerkB_c() { deleteObject(); diff --git a/src/d/actor/d_a_npc_clerkt.cpp b/src/d/actor/d_a_npc_clerkt.cpp index 4d8d90aa29..f305a5f8a3 100644 --- a/src/d/actor/d_a_npc_clerkt.cpp +++ b/src/d/actor/d_a_npc_clerkt.cpp @@ -9,7 +9,7 @@ #include "d/d_msg_object.h" #include -const daNpcClerkt_HIOParam daNpcClerkt_Param_c::m = { +DUSK_GAME_DATA const daNpcClerkt_HIOParam daNpcClerkt_Param_c::m = { 120.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -108,9 +108,9 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpcClerkT_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpcClerkT_c::mCutNameList[1] = {""}; -daNpcClerkT_c::cutFunc DUSK_CONST daNpcClerkT_c::mCutList[1] = {NULL}; +DUSK_GAME_DATA daNpcClerkT_c::cutFunc DUSK_CONST daNpcClerkT_c::mCutList[1] = {NULL}; daNpcClerkT_c::~daNpcClerkT_c() { deleteObject(); diff --git a/src/d/actor/d_a_npc_coach.cpp b/src/d/actor/d_a_npc_coach.cpp index 30bab6e34b..5b395f38c8 100644 --- a/src/d/actor/d_a_npc_coach.cpp +++ b/src/d/actor/d_a_npc_coach.cpp @@ -200,7 +200,7 @@ static int jointRearWheelCallBack(J3DJoint* i_joint, int param_2) { return 1; } -daNpcCoach_Attr_c const daNpcCoach_c::M_attr = { +DUSK_GAME_DATA daNpcCoach_Attr_c const daNpcCoach_c::M_attr = { -3.0f, -200.0f, -0.25f, diff --git a/src/d/actor/d_a_npc_doc.cpp b/src/d/actor/d_a_npc_doc.cpp index cd05d05835..f75b4d4189 100644 --- a/src/d/actor/d_a_npc_doc.cpp +++ b/src/d/actor/d_a_npc_doc.cpp @@ -84,13 +84,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Doc_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Doc_c::mCutNameList[1] = {""}; -daNpc_Doc_c::cutFunc DUSK_CONST daNpc_Doc_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_Doc_c::cutFunc DUSK_CONST daNpc_Doc_c::mCutList[1] = { NULL, }; -const daNpc_Doc_HIOParam daNpc_Doc_Param_c::m = { +DUSK_GAME_DATA const daNpc_Doc_HIOParam daNpc_Doc_Param_c::m = { 140.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_doorboy.cpp b/src/d/actor/d_a_npc_doorboy.cpp index 4203faa054..ca2983aa0c 100644 --- a/src/d/actor/d_a_npc_doorboy.cpp +++ b/src/d/actor/d_a_npc_doorboy.cpp @@ -117,11 +117,11 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "DoorBoy"; static NPC_DOORBOY_HIO_CLASS l_HIO; -daNpcDoorBoy_c::EventFn DUSK_CONST daNpcDoorBoy_c::mEvtSeqList[1] = { +DUSK_GAME_DATA daNpcDoorBoy_c::EventFn DUSK_CONST daNpcDoorBoy_c::mEvtSeqList[1] = { NULL }; -daNpcDoorBoy_HIOParam const daNpcDoorBoy_Param_c::m = { +DUSK_GAME_DATA daNpcDoorBoy_HIOParam const daNpcDoorBoy_Param_c::m = { 55.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_drainSol.cpp b/src/d/actor/d_a_npc_drainSol.cpp index 9e1cb1d277..e8b3ca24b6 100644 --- a/src/d/actor/d_a_npc_drainSol.cpp +++ b/src/d/actor/d_a_npc_drainSol.cpp @@ -23,7 +23,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_arcNames[2] = { "DrainSol2", }; -const daNpcDrSol_HIOParam daNpcDrSol_Param_c::m = { +DUSK_GAME_DATA const daNpcDrSol_HIOParam daNpcDrSol_Param_c::m = { 40.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_fairy.cpp b/src/d/actor/d_a_npc_fairy.cpp index 9f4dbbfd1a..5de667f237 100644 --- a/src/d/actor/d_a_npc_fairy.cpp +++ b/src/d/actor/d_a_npc_fairy.cpp @@ -145,7 +145,7 @@ enum Type { /* 0x4 */ TYPE_50F, }; -const daNpc_Fairy_HIOParam daNpc_Fairy_Param_c::m = { +DUSK_GAME_DATA const daNpc_Fairy_HIOParam daNpc_Fairy_Param_c::m = { 190.0f, -3.0f, 1.0f, @@ -459,7 +459,7 @@ static DUSK_CONSTEXPR daNpcT_evtData_c l_evtList[18] = { {"RETURN_CANCEL", 1}, }; -char DUSK_CONST* DUSK_CONST daNpc_Fairy_c::mCutNameList[18] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Fairy_c::mCutNameList[18] = { "", "APPEAR_10F_01", "APPEAR_10F_02", @@ -480,7 +480,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Fairy_c::mCutNameList[18] = { "RETURN_CANCEL", }; -daNpc_Fairy_c::cutFunc DUSK_CONST daNpc_Fairy_c::mCutList[18] = { +DUSK_GAME_DATA daNpc_Fairy_c::cutFunc DUSK_CONST daNpc_Fairy_c::mCutList[18] = { NULL, &daNpc_Fairy_c::cutAppear_10F_01, &daNpc_Fairy_c::cutAppear_10F_02, diff --git a/src/d/actor/d_a_npc_fairy_seirei.cpp b/src/d/actor/d_a_npc_fairy_seirei.cpp index 4681234346..f1a40fae6d 100644 --- a/src/d/actor/d_a_npc_fairy_seirei.cpp +++ b/src/d/actor/d_a_npc_fairy_seirei.cpp @@ -53,16 +53,16 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -DUSK_CONST char* daNpc_FairySeirei_c::mCutNameList[1] = { +DUSK_GAME_DATA DUSK_CONST char* daNpc_FairySeirei_c::mCutNameList[1] = { "", }; -DUSK_CONST daNpc_FairySeirei_c::cutFunc daNpc_FairySeirei_c::mCutList[1] = { +DUSK_GAME_DATA DUSK_CONST daNpc_FairySeirei_c::cutFunc daNpc_FairySeirei_c::mCutList[1] = { NULL, }; -const daNpc_FairySeirei_HIOParam daNpc_FairySeirei_Param_c::m = { +DUSK_GAME_DATA const daNpc_FairySeirei_HIOParam daNpc_FairySeirei_Param_c::m = { 600.0f, 0.0f, 1.0f, 4000.0f, 255.0f, 200.0f, 0.0f, 60.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, diff --git a/src/d/actor/d_a_npc_gnd.cpp b/src/d/actor/d_a_npc_gnd.cpp index d4f0e84fc0..b88eb94fe9 100644 --- a/src/d/actor/d_a_npc_gnd.cpp +++ b/src/d/actor/d_a_npc_gnd.cpp @@ -49,11 +49,11 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0} }; -char DUSK_CONST* DUSK_CONST daNpc_Gnd_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Gnd_c::mCutNameList[1] = {""}; -daNpc_Gnd_c::cutFunc DUSK_CONST daNpc_Gnd_c::mCutList[1] = {NULL}; +DUSK_GAME_DATA daNpc_Gnd_c::cutFunc DUSK_CONST daNpc_Gnd_c::mCutList[1] = {NULL}; -const daNpc_Gnd_HIOParam daNpc_Gnd_Param_c::m = { +DUSK_GAME_DATA const daNpc_Gnd_HIOParam daNpc_Gnd_Param_c::m = { 280.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_gra.cpp b/src/d/actor/d_a_npc_gra.cpp index b1cf3a3d01..a43491a57a 100644 --- a/src/d/actor/d_a_npc_gra.cpp +++ b/src/d/actor/d_a_npc_gra.cpp @@ -14,7 +14,7 @@ #include "Z2AudioLib/Z2Instances.h" #include -const daNpc_grA_HIOParam daNpc_grA_Param_c::m = { +DUSK_GAME_DATA const daNpc_grA_HIOParam daNpc_grA_Param_c::m = { {90.0f, -4.0f, 1.0f, 850.0f, 255.0f, 280.0f, 40.0f, 100.0f, 0.0f, 0.0f, 20.0f, -20.0f, 40.0f, -30.0f, 40.0f, -40.0f, 0.4f, 12.0f, 4, 6, 6, 6, 60.0f, 500.0f, 300.0f, -300.0f, 0x3c, 8, 0, 0, 0, 0, 0}, @@ -288,7 +288,7 @@ void daNpc_grA_HIO_c::genMessage(JORMContext* context) { } #endif -char DUSK_CONST* DUSK_CONST daNpc_grA_c::mEvtCutNameList[12] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grA_c::mEvtCutNameList[12] = { "", "TALK_SPA", "GRDS_ROLL", @@ -303,7 +303,7 @@ char DUSK_CONST* DUSK_CONST daNpc_grA_c::mEvtCutNameList[12] = { "ROLL_ROCK_CRASH", }; -daNpc_grA_c::cut_type DUSK_CONST daNpc_grA_c::mEvtCutList[] = { +DUSK_GAME_DATA daNpc_grA_c::cut_type DUSK_CONST daNpc_grA_c::mEvtCutList[] = { NULL, &daNpc_grA_c::ECut_talkSpa, &daNpc_grA_c::ECut_grDSRoll, diff --git a/src/d/actor/d_a_npc_grc.cpp b/src/d/actor/d_a_npc_grc.cpp index d5b3bb4cc9..2435f13c77 100644 --- a/src/d/actor/d_a_npc_grc.cpp +++ b/src/d/actor/d_a_npc_grc.cpp @@ -230,11 +230,11 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "grC"; -char DUSK_CONST* DUSK_CONST daNpc_grC_c::mEvtCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grC_c::mEvtCutNameList = ""; -daNpc_grC_c::EventFn DUSK_CONST daNpc_grC_c::mEvtCutList[1] = {NULL}; +DUSK_GAME_DATA daNpc_grC_c::EventFn DUSK_CONST daNpc_grC_c::mEvtCutList[1] = {NULL}; -daNpc_grC_HIOParam const daNpc_grC_Param_c::m = { +DUSK_GAME_DATA daNpc_grC_HIOParam const daNpc_grC_Param_c::m = { 40.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_grd.cpp b/src/d/actor/d_a_npc_grd.cpp index 5278729e03..59be9c4e00 100644 --- a/src/d/actor/d_a_npc_grd.cpp +++ b/src/d/actor/d_a_npc_grd.cpp @@ -109,12 +109,12 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "grD"; -char DUSK_CONST* DUSK_CONST daNpc_Grd_c::mEvtCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Grd_c::mEvtCutNameList[2] = { "", "NOD_TO_GRZ", }; -daNpc_Grd_c::cutFunc DUSK_CONST daNpc_Grd_c::mEvtCutList[2] = { +DUSK_GAME_DATA daNpc_Grd_c::cutFunc DUSK_CONST daNpc_Grd_c::mEvtCutList[2] = { NULL, &daNpc_Grd_c::ECut_nodToGrz, }; @@ -131,7 +131,7 @@ daNpc_Grd_c::~daNpc_Grd_c() { } } -const daNpc_Grd_HIOParam daNpc_Grd_Param_c::m = { +DUSK_GAME_DATA const daNpc_Grd_HIOParam daNpc_Grd_Param_c::m = { 230.0f, // attention_offset -3.0f, // gravity 1.0f, // scale diff --git a/src/d/actor/d_a_npc_grm.cpp b/src/d/actor/d_a_npc_grm.cpp index 25182af4cb..8e124b035d 100644 --- a/src/d/actor/d_a_npc_grm.cpp +++ b/src/d/actor/d_a_npc_grm.cpp @@ -122,19 +122,19 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {2, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_grM_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grM_c::mCutNameList[2] = { "", "TALK_SPA", }; -daNpc_grM_c::cutFunc DUSK_CONST daNpc_grM_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_grM_c::cutFunc DUSK_CONST daNpc_grM_c::mCutList[2] = { NULL, &daNpc_grM_c::cutTalkSpa, }; static NPC_GRM_HIO_CLASS l_HIO; -daNpc_grM_HIOParam const daNpc_grM_Param_c::m = { +DUSK_GAME_DATA daNpc_grM_HIOParam const daNpc_grM_Param_c::m = { 300.0f, -3.0f, 1.0f, 600.0f, 255.0f, 260.0f, 35.0f, 70.0f, 0.0f, 0.0f, 30.0f, -30.0f, 30.0f, -10.0f, 20.0f, -20.0f, 0.6f, 12.0f, 8, 6, 8, 6, 0.0f, 0.0f, 0.0f, 0.0f, 60, 8, 0, 0, 0, false, false, diff --git a/src/d/actor/d_a_npc_grmc.cpp b/src/d/actor/d_a_npc_grmc.cpp index 1d5ed0d29a..4ac574b021 100644 --- a/src/d/actor/d_a_npc_grmc.cpp +++ b/src/d/actor/d_a_npc_grmc.cpp @@ -149,9 +149,9 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_grMC_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grMC_c::mCutNameList = ""; -daNpc_grMC_c::cutFunc DUSK_CONST daNpc_grMC_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_grMC_c::cutFunc DUSK_CONST daNpc_grMC_c::mCutList[1] = { NULL, }; @@ -171,7 +171,7 @@ daNpc_grMC_c::~daNpc_grMC_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -daNpc_grMC_HIOParam const daNpc_grMC_Param_c::m = { +DUSK_GAME_DATA daNpc_grMC_HIOParam const daNpc_grMC_Param_c::m = { 140.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_gro.cpp b/src/d/actor/d_a_npc_gro.cpp index e98fe7f8c0..bdf984f35f 100644 --- a/src/d/actor/d_a_npc_gro.cpp +++ b/src/d/actor/d_a_npc_gro.cpp @@ -325,13 +325,13 @@ void daNpc_grO_HIO_c::genMessage(JORMContext* ctx) { } #endif -char DUSK_CONST* DUSK_CONST daNpc_grO_c::mEvtCutNameList[3] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grO_c::mEvtCutNameList[3] = { "", "BOKIN_FINISH", "PUSHOUT", }; -daNpc_grO_c::cutFunc DUSK_CONST daNpc_grO_c::mEvtCutList[3] = { +DUSK_GAME_DATA daNpc_grO_c::cutFunc DUSK_CONST daNpc_grO_c::mEvtCutList[3] = { NULL, &daNpc_grO_c::ECut_bokinFinish, &daNpc_grO_c::cutPushOut, @@ -355,7 +355,7 @@ daNpc_grO_c::~daNpc_grO_c() { #endif } -daNpc_grO_HIOParam const daNpc_grO_Param_c::m = { +DUSK_GAME_DATA daNpc_grO_HIOParam const daNpc_grO_Param_c::m = { 160.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_grr.cpp b/src/d/actor/d_a_npc_grr.cpp index 4eac7a5930..ee0d50d858 100644 --- a/src/d/actor/d_a_npc_grr.cpp +++ b/src/d/actor/d_a_npc_grr.cpp @@ -199,13 +199,13 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = {NULL}; static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "grR"; -char DUSK_CONST* DUSK_CONST daNpc_grR_c::mEvtCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grR_c::mEvtCutNameList = ""; -daNpc_grR_c::cutFunc DUSK_CONST daNpc_grR_c::mEvtCutList[1] = { +DUSK_GAME_DATA daNpc_grR_c::cutFunc DUSK_CONST daNpc_grR_c::mEvtCutList[1] = { NULL, }; -daNpc_grR_HIOParam const daNpc_grR_Param_c::m = { +DUSK_GAME_DATA daNpc_grR_HIOParam const daNpc_grR_Param_c::m = { 60.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_grs.cpp b/src/d/actor/d_a_npc_grs.cpp index bdac5ebf1c..abab07d22b 100644 --- a/src/d/actor/d_a_npc_grs.cpp +++ b/src/d/actor/d_a_npc_grs.cpp @@ -93,12 +93,12 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "grS"; static NPC_GRS_HIO_CLASS l_HIO; -char DUSK_CONST* DUSK_CONST daNpc_grS_c::mEvtCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_grS_c::mEvtCutNameList[2] = { "", "PUSHOUT", }; -daNpc_grS_c::cutFunc DUSK_CONST daNpc_grS_c::mEvtCutList[2] = { +DUSK_GAME_DATA daNpc_grS_c::cutFunc DUSK_CONST daNpc_grS_c::mEvtCutList[2] = { NULL, &daNpc_grS_c::cutPushOut, }; @@ -122,7 +122,7 @@ daNpc_grS_c::~daNpc_grS_c() { #endif } -const daNpc_grS_HIOParam daNpc_grS_Param_c::m = { +DUSK_GAME_DATA const daNpc_grS_HIOParam daNpc_grS_Param_c::m = { 120.0f, -3.0f, 1.0f, 600.0f, 255.0f, 120.0f, 35.0f, 60.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -30.0f, 45.0f, -45.0f, 0.6f, 12.0f, diff --git a/src/d/actor/d_a_npc_grz.cpp b/src/d/actor/d_a_npc_grz.cpp index 3cbd23f9ac..bd376a84ce 100644 --- a/src/d/actor/d_a_npc_grz.cpp +++ b/src/d/actor/d_a_npc_grz.cpp @@ -354,7 +354,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNames[6] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "grZ"; -char DUSK_CONST* DUSK_CONST daNpc_Grz_c::mEvtCutNameList[7] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Grz_c::mEvtCutNameList[7] = { "", "WAIT", "REBIRTH", @@ -364,7 +364,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Grz_c::mEvtCutNameList[7] = { "STONE_SMASH_SKIP", }; -daNpc_Grz_c::cutFunc DUSK_CONST daNpc_Grz_c::mEvtCutList[7] = { +DUSK_GAME_DATA daNpc_Grz_c::cutFunc DUSK_CONST daNpc_Grz_c::mEvtCutList[7] = { NULL, &daNpc_Grz_c::doWaitCut, &daNpc_Grz_c::doRebirthCut, @@ -406,7 +406,7 @@ daNpc_Grz_c::~daNpc_Grz_c() { #endif } -daNpc_Grz_HIOParam const daNpc_Grz_Param_c::m = { +DUSK_GAME_DATA daNpc_Grz_HIOParam const daNpc_Grz_Param_c::m = { 130.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_guard.cpp b/src/d/actor/d_a_npc_guard.cpp index b0836bd6d1..8ad17ea9c8 100644 --- a/src/d/actor/d_a_npc_guard.cpp +++ b/src/d/actor/d_a_npc_guard.cpp @@ -35,7 +35,7 @@ static int createHeapCallBack(fopAc_ac_c* i_this) { return static_cast(i_this)->createHeap(); } -daNpcGuard_c::actionFunc daNpcGuard_c::ActionTable[7][2] = { +DUSK_GAME_DATA daNpcGuard_c::actionFunc daNpcGuard_c::ActionTable[7][2] = { {&daNpcGuard_c::initPath, &daNpcGuard_c::executePath}, {&daNpcGuard_c::initRun, &daNpcGuard_c::executeRun}, {&daNpcGuard_c::initFightWait, &daNpcGuard_c::executeFightWait}, diff --git a/src/d/actor/d_a_npc_gwolf.cpp b/src/d/actor/d_a_npc_gwolf.cpp index b0fd2d3838..fb4d1d8d17 100644 --- a/src/d/actor/d_a_npc_gwolf.cpp +++ b/src/d/actor/d_a_npc_gwolf.cpp @@ -191,7 +191,7 @@ static DUSK_CONSTEXPR s16 l_warpAppearFlag[7] = { 0x01DD, // dSv_event_flag_c::F_0477 - Secret techniques - Distant howling complete (for secret technique 7) }; -char DUSK_CONST* DUSK_CONST daNpc_GWolf_c::mEvtCutNameList[5] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_GWolf_c::mEvtCutNameList[5] = { "", "ATTACK_WARP", "ATTACK_WARP_HORSE", @@ -199,7 +199,7 @@ char DUSK_CONST* DUSK_CONST daNpc_GWolf_c::mEvtCutNameList[5] = { "MEET_GWOLFA", }; -daNpc_GWolf_c::cutFunc DUSK_CONST daNpc_GWolf_c::mEvtCutList[5] = { +DUSK_GAME_DATA daNpc_GWolf_c::cutFunc DUSK_CONST daNpc_GWolf_c::mEvtCutList[5] = { NULL, &daNpc_GWolf_c::ECut_attackWarp, &daNpc_GWolf_c::ECut_attackWarpHorse, @@ -207,7 +207,7 @@ daNpc_GWolf_c::cutFunc DUSK_CONST daNpc_GWolf_c::mEvtCutList[5] = { &daNpc_GWolf_c::ECut_meetGWolf, }; -daNpc_GWolf_HIOParam const daNpc_GWolf_Param_c::m = { +DUSK_GAME_DATA daNpc_GWolf_HIOParam const daNpc_GWolf_Param_c::m = { 30.0f, -4.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index c1bb5d72c1..ede59f65b5 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -121,7 +121,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {8, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}}; -char DUSK_CONST* DUSK_CONST daNpc_Hanjo_c::mCutNameList[6] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Hanjo_c::mCutNameList[6] = { "", "CONVERSATION_ABOUT_SARU", "CONVERSATION", @@ -130,7 +130,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Hanjo_c::mCutNameList[6] = { "DIVE", }; -daNpc_Hanjo_c::cutFunc DUSK_CONST daNpc_Hanjo_c::mCutList[6] = { +DUSK_GAME_DATA daNpc_Hanjo_c::cutFunc DUSK_CONST daNpc_Hanjo_c::mCutList[6] = { NULL, &daNpc_Hanjo_c::cutConversationAboutSaru, &daNpc_Hanjo_c::cutConversation, @@ -139,11 +139,11 @@ daNpc_Hanjo_c::cutFunc DUSK_CONST daNpc_Hanjo_c::mCutList[6] = { &daNpc_Hanjo_c::cutDive, }; -dCcD_SrcSph DUSK_CONST daNpc_Hanjo_c::mStoneCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph DUSK_CONST daNpc_Hanjo_c::mStoneCcDSph = { daNpc_Hanjo_c::mStoneCcDObjInfo, {} }; -daNpc_Hanjo_HIOParam const daNpc_Hanjo_Param_c::m = { +DUSK_GAME_DATA daNpc_Hanjo_HIOParam const daNpc_Hanjo_Param_c::m = { 160.0f, -3.0f, 1.0f, 400.0f, 255.0f, 160.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 500.0f, 300.0f, -300.0f, 60, 8, 0, 0, 0, 0, 0, @@ -152,7 +152,7 @@ daNpc_Hanjo_HIOParam const daNpc_Hanjo_Param_c::m = { 80.0f, 65.0f, 4.0f, 600.0f, 136.0f, 0x500, 90, 90, 2, }; -dCcD_SrcGObjInf const daNpc_Hanjo_c::mStoneCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daNpc_Hanjo_c::mStoneCcDObjInfo = { {0, {{0, 0, 0}, {0, 0}, {0x79}}}, {0, 0, 0, 0, {0}}, {0, 0, 0, 0, {0}}, diff --git a/src/d/actor/d_a_npc_hoz.cpp b/src/d/actor/d_a_npc_hoz.cpp index 012112f266..48e3fe4f5e 100644 --- a/src/d/actor/d_a_npc_hoz.cpp +++ b/src/d/actor/d_a_npc_hoz.cpp @@ -188,7 +188,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {29, -1, 1}, {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Hoz_c::mCutNameList[8] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Hoz_c::mCutNameList[8] = { "", "BOAT_RACE", "BEFORE_BATTLE", @@ -199,7 +199,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Hoz_c::mCutNameList[8] = { "TALK_BREAK", }; -daNpc_Hoz_c::cutFunc DUSK_CONST daNpc_Hoz_c::mCutList[] = { +DUSK_GAME_DATA daNpc_Hoz_c::cutFunc DUSK_CONST daNpc_Hoz_c::mCutList[] = { NULL, &daNpc_Hoz_c::ECut_boatRace, &daNpc_Hoz_c::ECut_beforeBattle, @@ -210,7 +210,7 @@ daNpc_Hoz_c::cutFunc DUSK_CONST daNpc_Hoz_c::mCutList[] = { &daNpc_Hoz_c::ECut_talkBreak, }; -const daNpc_Hoz_HIOParam daNpc_Hoz_Param_c::m = { +DUSK_GAME_DATA const daNpc_Hoz_HIOParam daNpc_Hoz_Param_c::m = { 60.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_impal.cpp b/src/d/actor/d_a_npc_impal.cpp index 9a736e5ea9..5ac057ce06 100644 --- a/src/d/actor/d_a_npc_impal.cpp +++ b/src/d/actor/d_a_npc_impal.cpp @@ -9,7 +9,7 @@ #include "d/actor/d_a_npc.h" #include -daNpcImpal_HIOParam const daNpcImpal_Param_c::m = { +DUSK_GAME_DATA daNpcImpal_HIOParam const daNpcImpal_Param_c::m = { 135.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -91,7 +91,7 @@ void daNpcImpal_HIO_c::genMessage(JORMContext* ctext) { } #endif -daNpcImpal_c::EventFn daNpcImpal_c::mEvtSeqList[4] = { +DUSK_GAME_DATA daNpcImpal_c::EventFn daNpcImpal_c::mEvtSeqList[4] = { NULL, &daNpcImpal_c::EvCut_ImpalAppear1, &daNpcImpal_c::EvCut_ImpalAppear2, diff --git a/src/d/actor/d_a_npc_ins.cpp b/src/d/actor/d_a_npc_ins.cpp index 0600e01222..0ce91ca914 100644 --- a/src/d/actor/d_a_npc_ins.cpp +++ b/src/d/actor/d_a_npc_ins.cpp @@ -288,7 +288,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "ins"; -daNpcIns_c::eventFunc daNpcIns_c::mEvtSeqList[1] = { +DUSK_GAME_DATA daNpcIns_c::eventFunc daNpcIns_c::mEvtSeqList[1] = { NULL, }; @@ -319,7 +319,7 @@ static insect_param_data const l_insectParams[24] = { {0x01A8, 0x714, 0, 0}, }; -daNpcIns_HIOParam const daNpcIns_Param_c::m = { +DUSK_GAME_DATA daNpcIns_HIOParam const daNpcIns_Param_c::m = { 35.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index a0782d8d30..fce6435a04 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -138,7 +138,7 @@ enum Event { /* 0x8 */ EVENT_FIND_WOLF_VER2, }; -daNpc_Jagar_HIOParam const daNpc_Jagar_Param_c::m = { +DUSK_GAME_DATA daNpc_Jagar_HIOParam const daNpc_Jagar_Param_c::m = { 170.0f, -3.0f, 1.0f, 400.0f, 255.0f, 160.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, @@ -315,7 +315,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {13, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Jagar_c::mCutNameList[7] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Jagar_c::mCutNameList[7] = { "", "CLIMBUP", "NEED_YOUR_HELP", @@ -325,7 +325,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Jagar_c::mCutNameList[7] = { "FIND_WOLF", }; -daNpc_Jagar_c::cutFunc DUSK_CONST daNpc_Jagar_c::mCutList[7] = { +DUSK_GAME_DATA daNpc_Jagar_c::cutFunc DUSK_CONST daNpc_Jagar_c::mCutList[7] = { NULL, &daNpc_Jagar_c::cutClimbUp, &daNpc_Jagar_c::cutNeedYourHelp, diff --git a/src/d/actor/d_a_npc_kakashi.cpp b/src/d/actor/d_a_npc_kakashi.cpp index 4a15be8dca..6a3f72241f 100644 --- a/src/d/actor/d_a_npc_kakashi.cpp +++ b/src/d/actor/d_a_npc_kakashi.cpp @@ -75,21 +75,21 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Kakashi_c::mCutNameList[4] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Kakashi_c::mCutNameList[4] = { "", "SWDTUTORIAL", "GET_WOODSWD", "MAROS_WHISPER", }; -int (daNpc_Kakashi_c::* DUSK_CONST daNpc_Kakashi_c::mCutList[])(int) = { +DUSK_GAME_DATA int (daNpc_Kakashi_c::* DUSK_CONST daNpc_Kakashi_c::mCutList[])(int) = { NULL, &daNpc_Kakashi_c::cutSwdTutorial, &daNpc_Kakashi_c::cutGetWoodSwd, &daNpc_Kakashi_c::cutMarosWhisper, }; -const daNpc_Kakashi_HIOParam daNpc_Kakashi_Param_c::m = { +DUSK_GAME_DATA const daNpc_Kakashi_HIOParam daNpc_Kakashi_Param_c::m = { 190.0f, -6.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_kasi_hana.cpp b/src/d/actor/d_a_npc_kasi_hana.cpp index a1c33ba3e1..e7191118a6 100644 --- a/src/d/actor/d_a_npc_kasi_hana.cpp +++ b/src/d/actor/d_a_npc_kasi_hana.cpp @@ -557,7 +557,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[6] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "kasi_hana"; -daNpcKasiHana_HIOParam const daNpcKasiHana_Param_c::m = { +DUSK_GAME_DATA daNpcKasiHana_HIOParam const daNpcKasiHana_Param_c::m = { 55.0f, -3.0f, 1.0f, @@ -611,7 +611,7 @@ void daNpcKasiHana_HIO_c::genMessage(JORMContext* ctext) { } #endif -daNpcKasiHana_c::EventFn daNpcKasiHana_c::mEvtSeqList[6] = { +DUSK_GAME_DATA daNpcKasiHana_c::EventFn daNpcKasiHana_c::mEvtSeqList[6] = { NULL, &daNpcKasiHana_c::_Evt_Kasi_Appear, &daNpcKasiHana_c::_Evt_Kasi_Talk, @@ -1469,11 +1469,11 @@ int daNpcKasiHana_c::fear(int param_1) { return 1; } -daTagEscape_c* daNpcKasiHana_c::mTargetTag; +DUSK_GAME_DATA daTagEscape_c* daNpcKasiHana_c::mTargetTag; -f32 daNpcKasiHana_c::mTargetTagDist; +DUSK_GAME_DATA f32 daNpcKasiHana_c::mTargetTagDist; -s16 daNpcKasiHana_c::mWolfAngle; +DUSK_GAME_DATA s16 daNpcKasiHana_c::mWolfAngle; daTagEscape_c* daNpcKasiHana_c::srchWolfTag() { mTargetTag = NULL; diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index 0d034155c5..86ef71380e 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -140,11 +140,11 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "kasi_kyu"; -daNpcKasiKyu_c::EventFn DUSK_CONST daNpcKasiKyu_c::mEvtSeqList[1] = { +DUSK_GAME_DATA daNpcKasiKyu_c::EventFn DUSK_CONST daNpcKasiKyu_c::mEvtSeqList[1] = { NULL }; -daNpcKasiKyu_HIOParam const daNpcKasiKyu_Param_c::m = { +DUSK_GAME_DATA daNpcKasiKyu_HIOParam const daNpcKasiKyu_Param_c::m = { 55.0f, -3.0f, 1.0f, @@ -366,11 +366,11 @@ void daNpcKasiKyu_c::setParam() { attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } -daTagEscape_c* daNpcKasiKyu_c::mTargetTag; +DUSK_GAME_DATA daTagEscape_c* daNpcKasiKyu_c::mTargetTag; -f32 daNpcKasiKyu_c::mTargetTagDist; +DUSK_GAME_DATA f32 daNpcKasiKyu_c::mTargetTagDist; -s16 daNpcKasiKyu_c::mWolfAngle; +DUSK_GAME_DATA s16 daNpcKasiKyu_c::mWolfAngle; BOOL daNpcKasiKyu_c::main() { if (mSygnal >= 0) { diff --git a/src/d/actor/d_a_npc_kasi_mich.cpp b/src/d/actor/d_a_npc_kasi_mich.cpp index a1565dac53..b5ffa90f47 100644 --- a/src/d/actor/d_a_npc_kasi_mich.cpp +++ b/src/d/actor/d_a_npc_kasi_mich.cpp @@ -140,11 +140,11 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "kasi_mich"; -daNpcKasiMich_c::EventFn DUSK_CONST daNpcKasiMich_c::mEvtSeqList[1] = { +DUSK_GAME_DATA daNpcKasiMich_c::EventFn DUSK_CONST daNpcKasiMich_c::mEvtSeqList[1] = { NULL }; -daNpcKasiMich_HIOParam const daNpcKasiMich_Param_c::m = { +DUSK_GAME_DATA daNpcKasiMich_HIOParam const daNpcKasiMich_Param_c::m = { 55.0f, -3.0f, 1.0f, @@ -366,11 +366,11 @@ void daNpcKasiMich_c::setParam() { attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e; } -daTagEscape_c* daNpcKasiMich_c::mTargetTag; +DUSK_GAME_DATA daTagEscape_c* daNpcKasiMich_c::mTargetTag; -f32 daNpcKasiMich_c::mTargetTagDist; +DUSK_GAME_DATA f32 daNpcKasiMich_c::mTargetTagDist; -s16 daNpcKasiMich_c::mWolfAngle; +DUSK_GAME_DATA s16 daNpcKasiMich_c::mWolfAngle; BOOL daNpcKasiMich_c::main() { if (mSygnal >= 0) { diff --git a/src/d/actor/d_a_npc_kkri.cpp b/src/d/actor/d_a_npc_kkri.cpp index 2b37ee81f1..9b6b17d2e9 100644 --- a/src/d/actor/d_a_npc_kkri.cpp +++ b/src/d/actor/d_a_npc_kkri.cpp @@ -222,13 +222,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Kkri_c::mCutNameList[3] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Kkri_c::mCutNameList[3] = { "", "CONVERSATION_ABOUT_SOUP", "YM_LOOK", }; -int (daNpc_Kkri_c::* DUSK_CONST daNpc_Kkri_c::mCutList[])(int) = { +DUSK_GAME_DATA int (daNpc_Kkri_c::* DUSK_CONST daNpc_Kkri_c::mCutList[])(int) = { NULL, &daNpc_Kkri_c::cutConversationAboutSoup, &daNpc_Kkri_c::cutYmLook, @@ -236,7 +236,7 @@ int (daNpc_Kkri_c::* DUSK_CONST daNpc_Kkri_c::mCutList[])(int) = { static NPC_KKRI_HIO_CLASS l_HIO; -const daNpc_Kkri_HIOParam daNpc_Kkri_Param_c::m = { +DUSK_GAME_DATA const daNpc_Kkri_HIOParam daNpc_Kkri_Param_c::m = { 180.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_kn.cpp b/src/d/actor/d_a_npc_kn.cpp index 3f221e55c4..1edecfe650 100644 --- a/src/d/actor/d_a_npc_kn.cpp +++ b/src/d/actor/d_a_npc_kn.cpp @@ -17,25 +17,25 @@ #include #endif -dCcD_SrcCyl daNpc_Kn_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daNpc_Kn_c::mCcDCyl = { mCcDObjData, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f}, } }; -dCcD_SrcSph daNpc_Kn_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daNpc_Kn_c::mCcDSph = { mCcDObjData, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSphCc }, }; -s16 daNpc_Kn_c::mSrchName; +DUSK_GAME_DATA s16 daNpc_Kn_c::mSrchName; -fopAc_ac_c* daNpc_Kn_c::mFindActorPtrs[50]; +DUSK_GAME_DATA fopAc_ac_c* daNpc_Kn_c::mFindActorPtrs[50]; -int daNpc_Kn_c::mFindCount; +DUSK_GAME_DATA int daNpc_Kn_c::mFindCount; void* dummy_srchActor(void* i_actor1, void* i_actor2) { // Fake function (though a similar one likely existed and got stripped out). @@ -59,7 +59,7 @@ void* dummy_srchActor(void* i_actor1, void* i_actor2) { return NULL; } -const dCcD_SrcGObjInf daNpc_Kn_c::mCcDObjData = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daNpc_Kn_c::mCcDObjData = { {0, {{0, 0, 0}, {0, 0}, {0x79}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 0}, @@ -68,7 +68,7 @@ const dCcD_SrcGObjInf daNpc_Kn_c::mCcDObjData = { #include "d/actor/d_a_npc_kn_base.inc" -const daNpc_Kn_HIOParam daNpc_Kn_Param_c::m = { +DUSK_GAME_DATA const daNpc_Kn_HIOParam daNpc_Kn_Param_c::m = { 50.0f, -5.0f, 1.0f, @@ -468,7 +468,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Kn_c::mCutNameList[21] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Kn_c::mCutNameList[21] = { "", "NONE_EQUIP_CHANGE_TALK", "NO_EQ_CHNGE_TLK_STD", @@ -492,7 +492,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Kn_c::mCutNameList[21] = { "SEVENTH_SKILL_GET", }; -daNpc_Kn_c::cutFunc DUSK_CONST daNpc_Kn_c::mCutList[21] = { +DUSK_GAME_DATA daNpc_Kn_c::cutFunc DUSK_CONST daNpc_Kn_c::mCutList[21] = { NULL, &daNpc_Kn_c::ECut_noneEquipChangeTalk, &daNpc_Kn_c::ECut_noneEquipChangeTalkStand, diff --git a/src/d/actor/d_a_npc_knj.cpp b/src/d/actor/d_a_npc_knj.cpp index 52b922955d..cf40a06221 100644 --- a/src/d/actor/d_a_npc_knj.cpp +++ b/src/d/actor/d_a_npc_knj.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc_knj.h" #include -const daNpc_Knj_HIOParam daNpc_Knj_Param_c::m = { +DUSK_GAME_DATA const daNpc_Knj_HIOParam daNpc_Knj_Param_c::m = { 0.0f, // attention_offset 0.0f, // gravity 1.0f, // scale @@ -125,9 +125,9 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Knj_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Knj_c::mCutNameList[1] = {""}; -daNpc_Knj_c::cutFunc DUSK_CONST daNpc_Knj_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_Knj_c::cutFunc DUSK_CONST daNpc_Knj_c::mCutList[1] = { NULL, }; diff --git a/src/d/actor/d_a_npc_kolin.cpp b/src/d/actor/d_a_npc_kolin.cpp index 09fc2d12ff..3440f551e4 100644 --- a/src/d/actor/d_a_npc_kolin.cpp +++ b/src/d/actor/d_a_npc_kolin.cpp @@ -308,7 +308,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {20, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Kolin_c::mCutNameList[11] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Kolin_c::mCutNameList[11] = { "", "NO_RIDE", "HAIL", @@ -322,7 +322,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Kolin_c::mCutNameList[11] = { "THANK_YOU", }; -daNpc_Kolin_c::cutFunc DUSK_CONST daNpc_Kolin_c::mCutList[11] = { +DUSK_GAME_DATA daNpc_Kolin_c::cutFunc DUSK_CONST daNpc_Kolin_c::mCutList[11] = { NULL, &daNpc_Kolin_c::cutNoRide, &daNpc_Kolin_c::cutHail, @@ -336,7 +336,7 @@ daNpc_Kolin_c::cutFunc DUSK_CONST daNpc_Kolin_c::mCutList[11] = { &daNpc_Kolin_c::cutThankYou }; -daNpc_Kolin_HIOParam const daNpc_Kolin_Param_c::m = { +DUSK_GAME_DATA daNpc_Kolin_HIOParam const daNpc_Kolin_Param_c::m = { 140.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_kolinb.cpp b/src/d/actor/d_a_npc_kolinb.cpp index bf0d78e0fa..caff7135a1 100644 --- a/src/d/actor/d_a_npc_kolinb.cpp +++ b/src/d/actor/d_a_npc_kolinb.cpp @@ -177,7 +177,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {8, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Kolinb_c::mCutNameList[7] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Kolinb_c::mCutNameList[7] = { "", "CONVERSATION_IN_HOTEL", "CONVERSATION_ABOUT_DEATHMT", @@ -187,7 +187,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Kolinb_c::mCutNameList[7] = { "THANK_YOU", }; -daNpc_Kolinb_c::cutFunc DUSK_CONST daNpc_Kolinb_c::mCutList[7] = { +DUSK_GAME_DATA daNpc_Kolinb_c::cutFunc DUSK_CONST daNpc_Kolinb_c::mCutList[7] = { NULL, &daNpc_Kolinb_c::cutConversationInHotel, &daNpc_Kolinb_c::cutConversationAboutDeathMt, @@ -199,7 +199,7 @@ daNpc_Kolinb_c::cutFunc DUSK_CONST daNpc_Kolinb_c::mCutList[7] = { static NPC_KOLINB_HIO_CLASS l_HIO; -daNpc_Kolinb_HIOParam const daNpc_Kolinb_Param_c::m = { +DUSK_GAME_DATA daNpc_Kolinb_HIOParam const daNpc_Kolinb_Param_c::m = { 100.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_kyury.cpp b/src/d/actor/d_a_npc_kyury.cpp index 429249bbfc..15913aaf49 100644 --- a/src/d/actor/d_a_npc_kyury.cpp +++ b/src/d/actor/d_a_npc_kyury.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc_kyury.h" #include -const daNpc_Kyury_HIOParam daNpc_Kyury_Param_c::m = { +DUSK_GAME_DATA const daNpc_Kyury_HIOParam daNpc_Kyury_Param_c::m = { 200.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -127,12 +127,12 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Kyury_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Kyury_c::mCutNameList[2] = { "", "CONVERSATION", }; -daNpc_Kyury_c::cutFunc DUSK_CONST daNpc_Kyury_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_Kyury_c::cutFunc DUSK_CONST daNpc_Kyury_c::mCutList[2] = { NULL, &daNpc_Kyury_c::cutConversation, }; diff --git a/src/d/actor/d_a_npc_len.cpp b/src/d/actor/d_a_npc_len.cpp index 35b8c33dd2..7b7acab6fd 100644 --- a/src/d/actor/d_a_npc_len.cpp +++ b/src/d/actor/d_a_npc_len.cpp @@ -44,7 +44,7 @@ enum Motion { /* 0x11 */ MOT_UNK_17 = 17, }; -const daNpc_Len_HIOParam daNpc_Len_Param_c::m = { +DUSK_GAME_DATA const daNpc_Len_HIOParam daNpc_Len_Param_c::m = { 230.0f, -3.0f, 1.0f, 450.0f, 255.0f, 210.0f, 35.0f, 40.0f, 0.0f, 0.0f, 15.0f, -15.0f, 30.0f, -10.0f, 30.0f, -30.0f, 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 0.0f, 0.0f, 0.0f, 60, 8, 0, 0, 0, 0, 0, @@ -144,14 +144,14 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {17, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Len_c::mCutNameList[4] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Len_c::mCutNameList[4] = { "", "HURRY", "CONVERSATION_IN_HOTEL", "TAKE_WOODSTATUE", }; -daNpc_Len_c::cutFunc DUSK_CONST daNpc_Len_c::mCutList[4] = { +DUSK_GAME_DATA daNpc_Len_c::cutFunc DUSK_CONST daNpc_Len_c::mCutList[4] = { NULL, &daNpc_Len_c::cutHurry, &daNpc_Len_c::cutConversationInHotel, diff --git a/src/d/actor/d_a_npc_lud.cpp b/src/d/actor/d_a_npc_lud.cpp index 38632d9a5d..3551b68db9 100644 --- a/src/d/actor/d_a_npc_lud.cpp +++ b/src/d/actor/d_a_npc_lud.cpp @@ -9,7 +9,7 @@ #include "d/actor/d_a_npc_lud.h" #include -const daNpc_Lud_HIOParam daNpc_Lud_Param_c::m = { +DUSK_GAME_DATA const daNpc_Lud_HIOParam daNpc_Lud_Param_c::m = { 160.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -212,7 +212,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Lud_c::mCutNameList[8] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Lud_c::mCutNameList[8] = { "", "HURRY", "CONVERSATION_IN_HOTEL", @@ -223,7 +223,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Lud_c::mCutNameList[8] = { "THANK_YOU", }; -daNpc_Lud_c::cutFunc DUSK_CONST daNpc_Lud_c::mCutList[8] = { +DUSK_GAME_DATA daNpc_Lud_c::cutFunc DUSK_CONST daNpc_Lud_c::mCutList[8] = { NULL, &daNpc_Lud_c::cutHurry, &daNpc_Lud_c::cutConversationInHotel, diff --git a/src/d/actor/d_a_npc_maro.cpp b/src/d/actor/d_a_npc_maro.cpp index 040849ec2e..4e2c3ad870 100644 --- a/src/d/actor/d_a_npc_maro.cpp +++ b/src/d/actor/d_a_npc_maro.cpp @@ -22,7 +22,7 @@ #include #endif -const daNpc_Maro_HIOParam daNpc_Maro_Param_c::m = { +DUSK_GAME_DATA const daNpc_Maro_HIOParam daNpc_Maro_Param_c::m = { 100.0f, -3.0f, 1.0f, @@ -206,7 +206,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Maro_c::mCutNameList[17] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Maro_c::mCutNameList[17] = { "", "CONVERSATION_ABOUT_PACHINKO", "CONVERSATION_ABOUT_WOODSWD", @@ -226,7 +226,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Maro_c::mCutNameList[17] = { "TALK_TO_KAKASHI", }; -daNpc_Maro_c::cutFunc DUSK_CONST daNpc_Maro_c::mCutList[17] = { +DUSK_GAME_DATA daNpc_Maro_c::cutFunc DUSK_CONST daNpc_Maro_c::mCutList[17] = { NULL, &daNpc_Maro_c::cutConversationAboutPachinko, &daNpc_Maro_c::cutConversationAboutWoodSwd, diff --git a/src/d/actor/d_a_npc_midp.cpp b/src/d/actor/d_a_npc_midp.cpp index 1500ca6963..4edfc74d27 100644 --- a/src/d/actor/d_a_npc_midp.cpp +++ b/src/d/actor/d_a_npc_midp.cpp @@ -62,11 +62,11 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0} }; -char DUSK_CONST* DUSK_CONST daNpc_midP_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_midP_c::mCutNameList = ""; -daNpc_midP_c::cutFunc DUSK_CONST daNpc_midP_c::mCutList[1] = { 0 }; +DUSK_GAME_DATA daNpc_midP_c::cutFunc DUSK_CONST daNpc_midP_c::mCutList[1] = { 0 }; -daNpc_midP_HIOParam const daNpc_midP_Param_c::m = { +DUSK_GAME_DATA daNpc_midP_HIOParam const daNpc_midP_Param_c::m = { 210.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_moi.cpp b/src/d/actor/d_a_npc_moi.cpp index 5a76e70c3a..58060909df 100644 --- a/src/d/actor/d_a_npc_moi.cpp +++ b/src/d/actor/d_a_npc_moi.cpp @@ -13,7 +13,7 @@ #include "d/actor/d_a_npc_uri.h" #include -const daNpc_Moi_HIOParam daNpc_Moi_Param_c::m = { +DUSK_GAME_DATA const daNpc_Moi_HIOParam daNpc_Moi_Param_c::m = { 200.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -207,11 +207,11 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {18, 4, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Moi_c::mCutNameList[5] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Moi_c::mCutNameList[5] = { "", "DELIVERED_SW", "APPEARANCE_MOI", "CONVERSATION_WITH_URI", "FIND_WOLF", }; -daNpc_Moi_c::cutFunc DUSK_CONST daNpc_Moi_c::mCutList[5] = { +DUSK_GAME_DATA daNpc_Moi_c::cutFunc DUSK_CONST daNpc_Moi_c::mCutList[5] = { NULL, &daNpc_Moi_c::cutDeliveredSw, &daNpc_Moi_c::cutAppearanceMoi, diff --git a/src/d/actor/d_a_npc_moir.cpp b/src/d/actor/d_a_npc_moir.cpp index f3a6d29ba1..48f58cc621 100644 --- a/src/d/actor/d_a_npc_moir.cpp +++ b/src/d/actor/d_a_npc_moir.cpp @@ -207,7 +207,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[4] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "MoiR"; -daNpcMoiR_HIOParam const daNpcMoiR_Param_c::m = { +DUSK_GAME_DATA daNpcMoiR_HIOParam const daNpcMoiR_Param_c::m = { 35.0f, -3.0f, 1.0f, @@ -261,7 +261,7 @@ void daNpcMoiR_HIO_c::genMessage(JORMContext* ctext) { static NPC_MOIR_HIO_CLASS l_HIO; -daNpcMoiR_c::EventFn daNpcMoiR_c::mEvtSeqList[4] = { +DUSK_GAME_DATA daNpcMoiR_c::EventFn daNpcMoiR_c::mEvtSeqList[4] = { NULL, &daNpcMoiR_c::EvCut_Introduction, &daNpcMoiR_c::EvCut_Appear, diff --git a/src/d/actor/d_a_npc_myna2.cpp b/src/d/actor/d_a_npc_myna2.cpp index 5a3cb09240..ede18be556 100644 --- a/src/d/actor/d_a_npc_myna2.cpp +++ b/src/d/actor/d_a_npc_myna2.cpp @@ -91,7 +91,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNames[3] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "myna2"; -char DUSK_CONST* DUSK_CONST daNpc_myna2_c::mEvtCutNameList[5] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_myna2_c::mEvtCutNameList[5] = { "", "FIRST_TALK", "GAME_FAILURE", @@ -99,7 +99,7 @@ char DUSK_CONST* DUSK_CONST daNpc_myna2_c::mEvtCutNameList[5] = { "GAME_GOAL_SUCCESS", }; -daNpc_myna2_c::EventFn DUSK_CONST daNpc_myna2_c::mEvtCutList[] = { +DUSK_GAME_DATA daNpc_myna2_c::EventFn DUSK_CONST daNpc_myna2_c::mEvtCutList[] = { NULL, &daNpc_myna2_c::ECut_firstTalk, &daNpc_myna2_c::ECut_gameFailure, @@ -107,7 +107,7 @@ daNpc_myna2_c::EventFn DUSK_CONST daNpc_myna2_c::mEvtCutList[] = { &daNpc_myna2_c::ECut_gameGoalSuccess, }; -const daNpc_myna2_HIOParam daNpc_myna2_Param_c::m = { +DUSK_GAME_DATA const daNpc_myna2_HIOParam daNpc_myna2_Param_c::m = { 60.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_pachi_besu.cpp b/src/d/actor/d_a_npc_pachi_besu.cpp index 096c745555..089d9b4acc 100644 --- a/src/d/actor/d_a_npc_pachi_besu.cpp +++ b/src/d/actor/d_a_npc_pachi_besu.cpp @@ -441,7 +441,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {9, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Pachi_Besu_c::mCutNameList[11] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Pachi_Besu_c::mCutNameList[11] = { "", "TUTRIAL_BEGIN", "TUTRIAL_BEGIN_SKIP", @@ -455,7 +455,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Pachi_Besu_c::mCutNameList[11] = { "TUTRIAL_CAUTION", }; -daNpc_Pachi_Besu_c::cutFunc DUSK_CONST daNpc_Pachi_Besu_c::mCutList[11] = { +DUSK_GAME_DATA daNpc_Pachi_Besu_c::cutFunc DUSK_CONST daNpc_Pachi_Besu_c::mCutList[11] = { NULL, &daNpc_Pachi_Besu_c::cutTutrialBegin, &daNpc_Pachi_Besu_c::cutTutrialBegin_Skip, @@ -469,7 +469,7 @@ daNpc_Pachi_Besu_c::cutFunc DUSK_CONST daNpc_Pachi_Besu_c::mCutList[11] = { &daNpc_Pachi_Besu_c::cutTutrialCaution, }; -daNpc_Pachi_Besu_HIOParam const daNpc_Pachi_Besu_Param_c::m = { +DUSK_GAME_DATA daNpc_Pachi_Besu_HIOParam const daNpc_Pachi_Besu_Param_c::m = { 160.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_pachi_maro.cpp b/src/d/actor/d_a_npc_pachi_maro.cpp index 9b469866f8..61cc4eabe1 100644 --- a/src/d/actor/d_a_npc_pachi_maro.cpp +++ b/src/d/actor/d_a_npc_pachi_maro.cpp @@ -460,7 +460,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {MOT_ANM_RUN, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Pachi_Maro_c::mCutNameList[11] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Pachi_Maro_c::mCutNameList[11] = { "", "TUTRIAL_BEGIN", "TUTRIAL_BEGIN_SKIP", @@ -474,7 +474,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Pachi_Maro_c::mCutNameList[11] = { "TUTRIAL_CAUTION", }; -daNpc_Pachi_Maro_c::cutFunc DUSK_CONST daNpc_Pachi_Maro_c::mCutList[11] = { +DUSK_GAME_DATA daNpc_Pachi_Maro_c::cutFunc DUSK_CONST daNpc_Pachi_Maro_c::mCutList[11] = { NULL, &daNpc_Pachi_Maro_c::cutTutrialBegin, &daNpc_Pachi_Maro_c::cutTutrialBegin_Skip, @@ -506,7 +506,7 @@ daNpc_Pachi_Maro_c::~daNpc_Pachi_Maro_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -daNpc_Pachi_Maro_HIOParam const daNpc_Pachi_Maro_Param_c::m = { +DUSK_GAME_DATA daNpc_Pachi_Maro_HIOParam const daNpc_Pachi_Maro_Param_c::m = { 100.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_pachi_taro.cpp b/src/d/actor/d_a_npc_pachi_taro.cpp index 647b954ed9..d0e905f900 100644 --- a/src/d/actor/d_a_npc_pachi_taro.cpp +++ b/src/d/actor/d_a_npc_pachi_taro.cpp @@ -688,7 +688,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {MOT_ANM_SAVED, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Pachi_Taro_c::mCutNameList[11] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Pachi_Taro_c::mCutNameList[11] = { "", "TUTRIAL_BEGIN", "TUTRIAL_BEGIN_SKIP", @@ -702,7 +702,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Pachi_Taro_c::mCutNameList[11] = { "TUTRIAL_CAUTION", }; -daNpc_Pachi_Taro_c::cutFunc DUSK_CONST daNpc_Pachi_Taro_c::mCutList[11] = { +DUSK_GAME_DATA daNpc_Pachi_Taro_c::cutFunc DUSK_CONST daNpc_Pachi_Taro_c::mCutList[11] = { NULL, &daNpc_Pachi_Taro_c::cutTutrialBegin, &daNpc_Pachi_Taro_c::cutTutrialBegin_Skip, @@ -734,7 +734,7 @@ daNpc_Pachi_Taro_c::~daNpc_Pachi_Taro_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -daNpc_Pachi_Taro_HIOParam const daNpc_Pachi_Taro_Param_c::m = { +DUSK_GAME_DATA daNpc_Pachi_Taro_HIOParam const daNpc_Pachi_Taro_Param_c::m = { 140.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_passer.cpp b/src/d/actor/d_a_npc_passer.cpp index 9fe0fcbd6a..11bd69e88c 100644 --- a/src/d/actor/d_a_npc_passer.cpp +++ b/src/d/actor/d_a_npc_passer.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc_passer.h" #include "d/d_s_play.h" -daNpcPasser_c::actionFunc daNpcPasser_c::ActionTable[5][2] = { +DUSK_GAME_DATA daNpcPasser_c::actionFunc daNpcPasser_c::ActionTable[5][2] = { {&daNpcPasser_c::initPath, &daNpcPasser_c::executePath}, {&daNpcPasser_c::initEscape, &daNpcPasser_c::executeEscape}, {&daNpcPasser_c::initFear, &daNpcPasser_c::executeFear}, @@ -481,7 +481,7 @@ void daNpcPasser_c::create_init() { setBaseMtx(); } -daNpcPasser_c::seqFunc* daNpcPasser_c::m_funcTbl[28] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc* daNpcPasser_c::m_funcTbl[28] = { daNpcPasser_c::m_seq00_funcTbl, daNpcPasser_c::m_seq01_funcTbl, daNpcPasser_c::m_seq02_funcTbl, daNpcPasser_c::m_seq03_funcTbl, daNpcPasser_c::m_seq04_funcTbl, daNpcPasser_c::m_seq05_funcTbl, @@ -498,51 +498,51 @@ daNpcPasser_c::seqFunc* daNpcPasser_c::m_funcTbl[28] = { daNpcPasser_c::m_seq26_funcTbl, daNpcPasser_c::m_seq27_funcTbl, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq00_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq00_funcTbl[2] = { &daNpcPasser_c::walka, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq01_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq01_funcTbl[2] = { &daNpcPasser_c::runa, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq02_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq02_funcTbl[2] = { &daNpcPasser_c::waita, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq03_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq03_funcTbl[2] = { &daNpcPasser_c::talka, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq04_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq04_funcTbl[2] = { &daNpcPasser_c::runb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq05_funcTbl[4] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq05_funcTbl[4] = { &daNpcPasser_c::turnr, &daNpcPasser_c::waita, &daNpcPasser_c::talka, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq06_funcTbl[4] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq06_funcTbl[4] = { &daNpcPasser_c::turnl, &daNpcPasser_c::waita, &daNpcPasser_c::talka, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq07_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq07_funcTbl[2] = { &daNpcPasser_c::waitwall, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq08_funcTbl[7] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq08_funcTbl[7] = { &daNpcPasser_c::talkwall, &daNpcPasser_c::waitwall, &daNpcPasser_c::talkbwall, @@ -552,17 +552,17 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq08_funcTbl[7] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq09_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq09_funcTbl[2] = { &daNpcPasser_c::talkb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq10_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq10_funcTbl[2] = { &daNpcPasser_c::talkc, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq11_funcTbl[6] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq11_funcTbl[6] = { &daNpcPasser_c::talka, &daNpcPasser_c::waita, &daNpcPasser_c::talkb, @@ -571,12 +571,12 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq11_funcTbl[6] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq12_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq12_funcTbl[2] = { &daNpcPasser_c::waitb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq13_funcTbl[6] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq13_funcTbl[6] = { &daNpcPasser_c::browsea, &daNpcPasser_c::browseb, &daNpcPasser_c::talka, @@ -585,17 +585,17 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq13_funcTbl[6] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq14_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq14_funcTbl[2] = { &daNpcPasser_c::walkb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq15_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq15_funcTbl[2] = { &daNpcPasser_c::sitwaita, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq16_funcTbl[7] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq16_funcTbl[7] = { &daNpcPasser_c::sittalka, &daNpcPasser_c::sitwaita, &daNpcPasser_c::sittalkab, @@ -605,17 +605,17 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq16_funcTbl[7] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq17_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq17_funcTbl[2] = { &daNpcPasser_c::playm, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq18_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq18_funcTbl[2] = { &daNpcPasser_c::sitwaitb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq19_funcTbl[7] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq19_funcTbl[7] = { &daNpcPasser_c::sittalkb, &daNpcPasser_c::sitwaitb, &daNpcPasser_c::sittalkbb, @@ -625,24 +625,24 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq19_funcTbl[7] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq20_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq20_funcTbl[2] = { &daNpcPasser_c::looka, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq21_funcTbl[2] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq21_funcTbl[2] = { &daNpcPasser_c::lookb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq22_funcTbl[4] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq22_funcTbl[4] = { &daNpcPasser_c::looka, &daNpcPasser_c::lookb, &daNpcPasser_c::waita, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq23_funcTbl[7] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq23_funcTbl[7] = { &daNpcPasser_c::talka, &daNpcPasser_c::waita, &daNpcPasser_c::talkb, @@ -652,7 +652,7 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq23_funcTbl[7] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq24_funcTbl[5] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq24_funcTbl[5] = { &daNpcPasser_c::talkb, &daNpcPasser_c::talka, &daNpcPasser_c::talkc, @@ -660,7 +660,7 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq24_funcTbl[5] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq25_funcTbl[7] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq25_funcTbl[7] = { &daNpcPasser_c::browsea, &daNpcPasser_c::browseb, &daNpcPasser_c::talka, @@ -670,13 +670,13 @@ daNpcPasser_c::seqFunc daNpcPasser_c::m_seq25_funcTbl[7] = { NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq26_funcTbl[3] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq26_funcTbl[3] = { &daNpcPasser_c::browsea, &daNpcPasser_c::browseb, NULL, }; -daNpcPasser_c::seqFunc daNpcPasser_c::m_seq27_funcTbl[1] = { +DUSK_GAME_DATA daNpcPasser_c::seqFunc daNpcPasser_c::m_seq27_funcTbl[1] = { &daNpcPasser_c::waitTime, }; diff --git a/src/d/actor/d_a_npc_passer2.cpp b/src/d/actor/d_a_npc_passer2.cpp index cc95c9e9a7..00656fb835 100644 --- a/src/d/actor/d_a_npc_passer2.cpp +++ b/src/d/actor/d_a_npc_passer2.cpp @@ -31,7 +31,7 @@ static int createHeapCallBack(fopAc_ac_c* i_this) { return actor->createHeap(); } -daNpcPasser2_c::actionFunc daNpcPasser2_c::ActionTable[1][2] = { +DUSK_GAME_DATA daNpcPasser2_c::actionFunc daNpcPasser2_c::ActionTable[1][2] = { {&daNpcPasser2_c::initPath, &daNpcPasser2_c::executePath}, }; diff --git a/src/d/actor/d_a_npc_post.cpp b/src/d/actor/d_a_npc_post.cpp index 747ccd34c7..b26e4da1c7 100644 --- a/src/d/actor/d_a_npc_post.cpp +++ b/src/d/actor/d_a_npc_post.cpp @@ -159,7 +159,7 @@ enum Type { /* 0x3 */ TYPE_DEFAULT, }; -daNpc_Post_HIOParam const daNpc_Post_Param_c::m = { +DUSK_GAME_DATA daNpc_Post_HIOParam const daNpc_Post_Param_c::m = { 190.0f, -3.0f, 1.0f, @@ -354,12 +354,12 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {2, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Post_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Post_c::mCutNameList[2] = { "", "DELIVER", }; -daNpc_Post_c::cutFunc DUSK_CONST daNpc_Post_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_Post_c::cutFunc DUSK_CONST daNpc_Post_c::mCutList[2] = { NULL, &daNpc_Post_c::cutDeliver, }; diff --git a/src/d/actor/d_a_npc_pouya.cpp b/src/d/actor/d_a_npc_pouya.cpp index 4d463bc91f..72bad48e4b 100644 --- a/src/d/actor/d_a_npc_pouya.cpp +++ b/src/d/actor/d_a_npc_pouya.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc_pouya.h" #include -const daNpc_Pouya_HIOParam daNpc_Pouya_Param_c::m = { +DUSK_GAME_DATA const daNpc_Pouya_HIOParam daNpc_Pouya_Param_c::m = { 120.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -147,13 +147,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {25, -1, 1}, {10, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Pouya_c::mCutNameList[3] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Pouya_c::mCutNameList[3] = { "", "HAVE_FAVORTO_ASK", "RETURN_FAVOR", }; -daNpc_Pouya_c::cutFunc DUSK_CONST daNpc_Pouya_c::mCutList[3] = { +DUSK_GAME_DATA daNpc_Pouya_c::cutFunc DUSK_CONST daNpc_Pouya_c::mCutList[3] = { NULL, &daNpc_Pouya_c::cutHaveFavorToAsk, &daNpc_Pouya_c::cutHaveFavorToAsk, diff --git a/src/d/actor/d_a_npc_prayer.cpp b/src/d/actor/d_a_npc_prayer.cpp index 146c73cef6..9191bc0315 100644 --- a/src/d/actor/d_a_npc_prayer.cpp +++ b/src/d/actor/d_a_npc_prayer.cpp @@ -42,12 +42,12 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[2] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Prayer"; -daNpcPray_c::EvtSeq DUSK_CONST daNpcPray_c::mEvtSeqList[] = { +DUSK_GAME_DATA daNpcPray_c::EvtSeq DUSK_CONST daNpcPray_c::mEvtSeqList[] = { NULL, &daNpcPray_c::_Evt_GetHeart, }; -const daNpcPray_HIOParam daNpcPray_Param_c::m = { +DUSK_GAME_DATA const daNpcPray_HIOParam daNpcPray_Param_c::m = { 55.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_raca.cpp b/src/d/actor/d_a_npc_raca.cpp index 71f367c693..42b01aeaff 100644 --- a/src/d/actor/d_a_npc_raca.cpp +++ b/src/d/actor/d_a_npc_raca.cpp @@ -150,13 +150,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {9, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Raca_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Raca_c::mCutNameList = ""; -daNpc_Raca_c::cutFunc DUSK_CONST daNpc_Raca_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_Raca_c::cutFunc DUSK_CONST daNpc_Raca_c::mCutList[1] = { NULL, }; -daNpc_Raca_HIOParam const daNpc_Raca_Param_c::m = { +DUSK_GAME_DATA daNpc_Raca_HIOParam const daNpc_Raca_Param_c::m = { 230.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_rafrel.cpp b/src/d/actor/d_a_npc_rafrel.cpp index 2ed3cd3a21..8a4e5d03ef 100644 --- a/src/d/actor/d_a_npc_rafrel.cpp +++ b/src/d/actor/d_a_npc_rafrel.cpp @@ -97,7 +97,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[7] = { "RESIST_WIRETAP_RAFREL", }; -const daNpcRafrel_HIOParam daNpcRafrel_Param_c::m = { +DUSK_GAME_DATA const daNpcRafrel_HIOParam daNpcRafrel_Param_c::m = { 35.0f, -3.0f, 1.0f, @@ -152,7 +152,7 @@ void daNpcRafrel_HIO_c::genMessage(JORMContext* ctx) { static NPC_RAFREL_HIO_CLASS l_HIO; typedef BOOL (daNpcRafrel_c::*EventFn)(int); -EventFn daNpcRafrel_c::mEvtSeqList[] = { +DUSK_GAME_DATA EventFn daNpcRafrel_c::mEvtSeqList[] = { NULL, &daNpcRafrel_c::EvCut_Introduction, &daNpcRafrel_c::EvCut_Meeting, diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index efd8bf097a..d3690b833a 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -216,21 +216,21 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Saru_c::mCutNameList[4] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Saru_c::mCutNameList[4] = { "", "FIND_MONKEY", "HELP_ME", "YM_LOOK", }; -daNpc_Saru_c::cutFunc DUSK_CONST daNpc_Saru_c::mCutList[4] = { +DUSK_GAME_DATA daNpc_Saru_c::cutFunc DUSK_CONST daNpc_Saru_c::mCutList[4] = { NULL, &daNpc_Saru_c::cutFindMonkey, &daNpc_Saru_c::cutHelpMe, &daNpc_Saru_c::cutYmLook, }; -daNpc_Saru_HIOParam const daNpc_Saru_Param_c::m = { +DUSK_GAME_DATA daNpc_Saru_HIOParam const daNpc_Saru_Param_c::m = { 140.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_seib.cpp b/src/d/actor/d_a_npc_seib.cpp index a022821d4b..e5ab22228b 100644 --- a/src/d/actor/d_a_npc_seib.cpp +++ b/src/d/actor/d_a_npc_seib.cpp @@ -46,13 +46,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, 0, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_seiB_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_seiB_c::mCutNameList = ""; -daNpc_seiB_c::cutFunc DUSK_CONST daNpc_seiB_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_seiB_c::cutFunc DUSK_CONST daNpc_seiB_c::mCutList[1] = { 0, }; -daNpc_seiB_HIOParam const daNpc_seiB_Param_c::m = { +DUSK_GAME_DATA daNpc_seiB_HIOParam const daNpc_seiB_Param_c::m = { 0.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_seic.cpp b/src/d/actor/d_a_npc_seic.cpp index 5525c52d57..bb94a59c39 100644 --- a/src/d/actor/d_a_npc_seic.cpp +++ b/src/d/actor/d_a_npc_seic.cpp @@ -49,13 +49,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_seiC_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_seiC_c::mCutNameList = ""; -daNpc_seiC_c::cutFunc DUSK_CONST daNpc_seiC_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_seiC_c::cutFunc DUSK_CONST daNpc_seiC_c::mCutList[1] = { 0 }; -daNpc_seiC_HIOParam const daNpc_seiC_Param_c::m = { +DUSK_GAME_DATA daNpc_seiC_HIOParam const daNpc_seiC_Param_c::m = { 0.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_seid.cpp b/src/d/actor/d_a_npc_seid.cpp index 4e71129e00..ed96e2ebe5 100644 --- a/src/d/actor/d_a_npc_seid.cpp +++ b/src/d/actor/d_a_npc_seid.cpp @@ -49,13 +49,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_seiD_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_seiD_c::mCutNameList = ""; -daNpc_seiD_c::cutFunc DUSK_CONST daNpc_seiD_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_seiD_c::cutFunc DUSK_CONST daNpc_seiD_c::mCutList[1] = { 0 }; -daNpc_seiD_HIOParam const daNpc_seiD_Param_c::m = { +DUSK_GAME_DATA daNpc_seiD_HIOParam const daNpc_seiD_Param_c::m = { 0.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_seira.cpp b/src/d/actor/d_a_npc_seira.cpp index e43eaad3bd..c8d0b52503 100644 --- a/src/d/actor/d_a_npc_seira.cpp +++ b/src/d/actor/d_a_npc_seira.cpp @@ -111,19 +111,19 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {25, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {2, -1, 1}, {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Seira_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Seira_c::mCutNameList[2] = { "", "CONVERSATION_ABOUT_SARU", }; -daNpc_Seira_c::cutFunc DUSK_CONST daNpc_Seira_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_Seira_c::cutFunc DUSK_CONST daNpc_Seira_c::mCutList[2] = { NULL, &daNpc_Seira_c::cutConversationAboutSaru, }; static NPC_SEIRA_HIO_CLASS l_HIO; -const daNpc_Seira_HIOParam daNpc_Seira_Param_c::m = { +DUSK_GAME_DATA const daNpc_Seira_HIOParam daNpc_Seira_Param_c::m = { 210.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_seira2.cpp b/src/d/actor/d_a_npc_seira2.cpp index 720b1d395b..fc5afa55bb 100644 --- a/src/d/actor/d_a_npc_seira2.cpp +++ b/src/d/actor/d_a_npc_seira2.cpp @@ -103,13 +103,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {24, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Seira2_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Seira2_c::mCutNameList[1] = {""}; -daNpc_Seira2_c::cutFunc DUSK_CONST daNpc_Seira2_c::mCutList[1] = { NULL }; +DUSK_GAME_DATA daNpc_Seira2_c::cutFunc DUSK_CONST daNpc_Seira2_c::mCutList[1] = { NULL }; static NPC_SEIRA2_HIO_CLASS l_HIO; -const daNpc_Seira2_HIOParam daNpc_Seira2_Param_c::m = { +DUSK_GAME_DATA const daNpc_Seira2_HIOParam daNpc_Seira2_Param_c::m = { 210.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_seirei.cpp b/src/d/actor/d_a_npc_seirei.cpp index a957d51e67..85d9e83476 100644 --- a/src/d/actor/d_a_npc_seirei.cpp +++ b/src/d/actor/d_a_npc_seirei.cpp @@ -141,17 +141,17 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Seirei_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Seirei_c::mCutNameList[2] = { "", "CONVERSATION", }; -daNpc_Seirei_c::cutFunc DUSK_CONST daNpc_Seirei_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_Seirei_c::cutFunc DUSK_CONST daNpc_Seirei_c::mCutList[2] = { NULL, &daNpc_Seirei_c::cutConversation, }; -daNpc_Seirei_HIOParam const daNpc_Seirei_Param_c::m = { +DUSK_GAME_DATA daNpc_Seirei_HIOParam const daNpc_Seirei_Param_c::m = { 600.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_shad.cpp b/src/d/actor/d_a_npc_shad.cpp index 99707fdf05..a93e02a94e 100644 --- a/src/d/actor/d_a_npc_shad.cpp +++ b/src/d/actor/d_a_npc_shad.cpp @@ -12,7 +12,7 @@ #include "d/d_msg_object.h" #include -const daNpcShad_HIOParam daNpcShad_Param_c::m = { +DUSK_GAME_DATA const daNpcShad_HIOParam daNpcShad_Param_c::m = { 35.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -310,7 +310,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Shad"; static NPC_SHAD_HIO_CLASS l_HIO; -daNpcShad_c::EventFn DUSK_CONST daNpcShad_c::mEvtSeqList[14] = { +DUSK_GAME_DATA daNpcShad_c::EventFn DUSK_CONST daNpcShad_c::mEvtSeqList[14] = { NULL, &daNpcShad_c::EvCut_Introduction, &daNpcShad_c::EvCut_Meeting, diff --git a/src/d/actor/d_a_npc_shaman.cpp b/src/d/actor/d_a_npc_shaman.cpp index f5b32b7184..bb1e070c92 100644 --- a/src/d/actor/d_a_npc_shaman.cpp +++ b/src/d/actor/d_a_npc_shaman.cpp @@ -165,12 +165,12 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {7, 0, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Sha_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Sha_c::mCutNameList[2] = { "", "PERFORM_AUGURY", }; -daNpc_Sha_c::cutFunc DUSK_CONST daNpc_Sha_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_Sha_c::cutFunc DUSK_CONST daNpc_Sha_c::mCutList[2] = { NULL, &daNpc_Sha_c::cutPerformAugury, }; @@ -193,7 +193,7 @@ daNpc_Sha_c::~daNpc_Sha_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -daNpc_Sha_HIOParam const daNpc_Sha_Param_c::m = { +DUSK_GAME_DATA daNpc_Sha_HIOParam const daNpc_Sha_Param_c::m = { 210.0f, -3.0f, 1.0f, @@ -1131,15 +1131,15 @@ int daNpc_Sha_c::test(void* param_1) { return 1; } -const u16 daNpc_Sha_c::mEvtBitLabels[6] = { +DUSK_GAME_DATA const u16 daNpc_Sha_c::mEvtBitLabels[6] = { 0xF0FF, 0xEFFF, 0xEEFF, 0xEDFF, 0xECFF, 0xEBFF, }; -const u16 daNpc_Sha_c::mTmpBitLabels[6] = { +DUSK_GAME_DATA const u16 daNpc_Sha_c::mTmpBitLabels[6] = { 0xFAFF, 0xF9FF, 0xF8FF, 0xF7FF, 0xF6FF, 0xF5FF, }; -const int daNpc_Sha_c::mSceneChangeNoTable[48] = { +DUSK_GAME_DATA const int daNpc_Sha_c::mSceneChangeNoTable[48] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC, @@ -1154,7 +1154,7 @@ const int daNpc_Sha_c::mSceneChangeNoTable[48] = { 0x2D, -1, -1, -1, }; -daNpc_Sha_c::queryFunc daNpc_Sha_c::mQueries[48] = { +DUSK_GAME_DATA daNpc_Sha_c::queryFunc daNpc_Sha_c::mQueries[48] = { &daNpc_Sha_c::query000, &daNpc_Sha_c::query265, &daNpc_Sha_c::query000, &daNpc_Sha_c::query267, &daNpc_Sha_c::query000, &daNpc_Sha_c::query000, &daNpc_Sha_c::query078, &daNpc_Sha_c::query268, &daNpc_Sha_c::query265, &daNpc_Sha_c::query265, &daNpc_Sha_c::query078, &daNpc_Sha_c::query000, diff --git a/src/d/actor/d_a_npc_shoe.cpp b/src/d/actor/d_a_npc_shoe.cpp index 1fef7437a0..b7fcc2e14c 100644 --- a/src/d/actor/d_a_npc_shoe.cpp +++ b/src/d/actor/d_a_npc_shoe.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc_shoe.h" #include "d/actor/d_a_npc.h" -const daNpcShoe_HIOParam daNpcShoe_Param_c::m = { +DUSK_GAME_DATA const daNpcShoe_HIOParam daNpcShoe_Param_c::m = { 55.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -104,7 +104,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[1] = {NULL}; static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Shoe"; -daNpcShoe_c::EventFn DUSK_CONST daNpcShoe_c::mEvtSeqList[1] = {NULL}; +DUSK_GAME_DATA daNpcShoe_c::EventFn DUSK_CONST daNpcShoe_c::mEvtSeqList[1] = {NULL}; daNpcShoe_c::daNpcShoe_c() {} diff --git a/src/d/actor/d_a_npc_shop0.cpp b/src/d/actor/d_a_npc_shop0.cpp index 3612cd846e..b24e372aaf 100644 --- a/src/d/actor/d_a_npc_shop0.cpp +++ b/src/d/actor/d_a_npc_shop0.cpp @@ -39,7 +39,7 @@ int daNpc_Shop0_c::create() { return phase_step; } -dCcD_SrcCyl const daNpc_Shop0_c::mCylDat = { +DUSK_GAME_DATA dCcD_SrcCyl const daNpc_Shop0_c::mCylDat = { { { 0x0, // mFlags @@ -62,7 +62,7 @@ dCcD_SrcCyl const daNpc_Shop0_c::mCylDat = { } }; -daNpc_Shop0_Param_c::param const daNpc_Shop0_Param_c::mParam = { +DUSK_GAME_DATA daNpc_Shop0_Param_c::param const daNpc_Shop0_Param_c::mParam = { 0x44480000, 0x44480000, 0x41F00000, diff --git a/src/d/actor/d_a_npc_sola.cpp b/src/d/actor/d_a_npc_sola.cpp index 093a1cbee6..cf0b21dd32 100644 --- a/src/d/actor/d_a_npc_sola.cpp +++ b/src/d/actor/d_a_npc_sola.cpp @@ -60,13 +60,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_solA_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_solA_c::mCutNameList[1] = {""}; -daNpc_solA_c::cutFunc DUSK_CONST daNpc_solA_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_solA_c::cutFunc DUSK_CONST daNpc_solA_c::mCutList[1] = { NULL, }; -daNpc_solA_HIOParam const daNpc_solA_Param_c::m = { +DUSK_GAME_DATA daNpc_solA_HIOParam const daNpc_solA_Param_c::m = { 220.0f, -3.0f, 1.0f, 400.0f, 255.0f, 200.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, 3, 6, 5, 6, 0.0f, 0.0f, 0.0f, 0.0f, 60, 8, 0, 0, 0, false, false, diff --git a/src/d/actor/d_a_npc_soldierA.cpp b/src/d/actor/d_a_npc_soldierA.cpp index d3baf97440..a6fd6e6abb 100644 --- a/src/d/actor/d_a_npc_soldierA.cpp +++ b/src/d/actor/d_a_npc_soldierA.cpp @@ -133,13 +133,13 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNames[1] = {"chtSolA"}; static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "chtSolA"; -char DUSK_CONST* DUSK_CONST daNpc_SoldierA_c::mEvtCutNameList[3] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_SoldierA_c::mEvtCutNameList[3] = { "", "TALK_LAKE", "LISTEN_LAKE", }; -daNpc_SoldierA_c::cutFunc DUSK_CONST daNpc_SoldierA_c::mEvtCutList[3] = { +DUSK_GAME_DATA daNpc_SoldierA_c::cutFunc DUSK_CONST daNpc_SoldierA_c::mEvtCutList[3] = { NULL, &daNpc_SoldierA_c::ECut_talkLake, &daNpc_SoldierA_c::ECut_listenLake, @@ -163,7 +163,7 @@ daNpc_SoldierA_c::~daNpc_SoldierA_c() { #endif } -daNpc_SoldierA_HIOParam const daNpc_SoldierA_Param_c::m = { +DUSK_GAME_DATA daNpc_SoldierA_HIOParam const daNpc_SoldierA_Param_c::m = { 30.0f, -4.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_soldierB.cpp b/src/d/actor/d_a_npc_soldierB.cpp index e867c2b660..b8289f479f 100644 --- a/src/d/actor/d_a_npc_soldierB.cpp +++ b/src/d/actor/d_a_npc_soldierB.cpp @@ -106,12 +106,12 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNames[1] = {"chtSolB"}; static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "chtSolB"; -char DUSK_CONST* DUSK_CONST daNpc_SoldierB_c::mEvtCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_SoldierB_c::mEvtCutNameList[2] = { "", "LISTEN_LAKE", }; -daNpc_SoldierB_c::cutFunc DUSK_CONST daNpc_SoldierB_c::mEvtCutList[2] = { +DUSK_GAME_DATA daNpc_SoldierB_c::cutFunc DUSK_CONST daNpc_SoldierB_c::mEvtCutList[2] = { NULL, &daNpc_SoldierB_c::ECut_listenLake, }; @@ -128,7 +128,7 @@ daNpc_SoldierB_c::~daNpc_SoldierB_c() { } } -daNpc_SoldierB_HIOParam const daNpc_SoldierB_Param_c::m = { +DUSK_GAME_DATA daNpc_SoldierB_HIOParam const daNpc_SoldierB_Param_c::m = { 30.0f, // attention_offset -4.0f, // gravity 1.0f, // scale diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index efb3cddf4b..1a6a3473e3 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -198,7 +198,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {40, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {40, -1, 1}, {41, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Taro_c::mCutNameList[17] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Taro_c::mCutNameList[17] = { "", "CONVERSATION_ABOUT_PACHINKO", "CONVERSATION_ABOUT_WOODSWD", @@ -218,7 +218,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Taro_c::mCutNameList[17] = { "TAG_PUSH4", }; -daNpc_Taro_c::cutFunc DUSK_CONST daNpc_Taro_c::mCutList[17] = { +DUSK_GAME_DATA daNpc_Taro_c::cutFunc DUSK_CONST daNpc_Taro_c::mCutList[17] = { NULL, &daNpc_Taro_c::cutConversationAboutPachinko, &daNpc_Taro_c::cutConversationAboutWoodSwd, @@ -240,7 +240,7 @@ daNpc_Taro_c::cutFunc DUSK_CONST daNpc_Taro_c::mCutList[17] = { static NPC_TARO_HIO_CLASS l_HIO; -daNpc_Taro_HIOParam const daNpc_Taro_Param_c::m = { +DUSK_GAME_DATA daNpc_Taro_HIOParam const daNpc_Taro_Param_c::m = { 140.0f, -3.0f, 1.0f, 400.0f, 255.0f, 120.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 0.0f, 0.0f, 0.0f, 60, 8, 0, 0, 0, 0, 0, diff --git a/src/d/actor/d_a_npc_the.cpp b/src/d/actor/d_a_npc_the.cpp index 8a1a23d122..01b7fbb66c 100644 --- a/src/d/actor/d_a_npc_the.cpp +++ b/src/d/actor/d_a_npc_the.cpp @@ -12,7 +12,7 @@ #include "SSystem/SComponent/c_math.h" #include -const daNpcThe_HIOParam daNpcThe_Param_c::m = { +DUSK_GAME_DATA const daNpcThe_HIOParam daNpcThe_Param_c::m = { 220.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -155,14 +155,14 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[4] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "The"; -char DUSK_CONST* DUSK_CONST daNpcThe_c::mEvtCutNameList[4] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpcThe_c::mEvtCutNameList[4] = { "", "TW_RESISTANCE", "TW_RESISTANCE", "THE_INTRODUCTION", }; -daNpcThe_c::EventFn DUSK_CONST daNpcThe_c::mEvtCutList[4] = { +DUSK_GAME_DATA daNpcThe_c::EventFn DUSK_CONST daNpcThe_c::mEvtCutList[4] = { NULL, &daNpcThe_c::EvCut_TwResistance, &daNpcThe_c::EvCut_TwResistance, diff --git a/src/d/actor/d_a_npc_theB.cpp b/src/d/actor/d_a_npc_theB.cpp index efee49d934..01e371277b 100644 --- a/src/d/actor/d_a_npc_theB.cpp +++ b/src/d/actor/d_a_npc_theB.cpp @@ -174,7 +174,7 @@ void daNpcTheB_HIO_c::genMessage(JORMContext* ctx) { } #endif -daNpcTheB_c::cutFunc daNpcTheB_c::mEvtSeqList[6] = { +DUSK_GAME_DATA daNpcTheB_c::cutFunc daNpcTheB_c::mEvtSeqList[6] = { NULL, &daNpcTheB_c::EvCut_PersonalCombatIntro, &daNpcTheB_c::EvCut_PersonalCombatRevenge, @@ -199,7 +199,7 @@ daNpcTheB_c::~daNpcTheB_c() { #endif } -daNpcTheB_HIOParam const daNpcTheB_Param_c::m = { +DUSK_GAME_DATA daNpcTheB_HIOParam const daNpcTheB_Param_c::m = { 115.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_tkc.cpp b/src/d/actor/d_a_npc_tkc.cpp index e05fb64024..94fa1538b3 100644 --- a/src/d/actor/d_a_npc_tkc.cpp +++ b/src/d/actor/d_a_npc_tkc.cpp @@ -126,7 +126,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Tkc"; static NPC_TKC_HIO_CLASS l_HIO; -daNpcTkc_c::evtFunc daNpcTkc_c::mEvtSeqList[4] = { +DUSK_GAME_DATA daNpcTkc_c::evtFunc daNpcTkc_c::mEvtSeqList[4] = { NULL, &daNpcTkc_c::EvCut_TksSecretChild, &daNpcTkc_c::EvCut_TksWarpExit, @@ -149,7 +149,7 @@ daNpcTkc_c::~daNpcTkc_c() { #endif } -daNpcTkc_HIOParam const daNpcTkc_Param_c::m = { +DUSK_GAME_DATA daNpcTkc_HIOParam const daNpcTkc_Param_c::m = { 10.0f, 0.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_tkj.cpp b/src/d/actor/d_a_npc_tkj.cpp index 4a798bcb4d..909b72b4b4 100644 --- a/src/d/actor/d_a_npc_tkj.cpp +++ b/src/d/actor/d_a_npc_tkj.cpp @@ -64,17 +64,17 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpcTkj_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpcTkj_c::mCutNameList[2] = { "", "LV7_FIRST_START", }; -int (daNpcTkj_c::* DUSK_CONST daNpcTkj_c::mCutList[])(int) = { +DUSK_GAME_DATA int (daNpcTkj_c::* DUSK_CONST daNpcTkj_c::mCutList[])(int) = { NULL, &daNpcTkj_c::cutLv7Start, }; -const daNpc_Tkj_HIOParam daNpc_Tkj_Param_c::m = { +DUSK_GAME_DATA const daNpc_Tkj_HIOParam daNpc_Tkj_Param_c::m = { 120.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_tks.cpp b/src/d/actor/d_a_npc_tks.cpp index 0399b36dd6..9990e4834b 100644 --- a/src/d/actor/d_a_npc_tks.cpp +++ b/src/d/actor/d_a_npc_tks.cpp @@ -202,7 +202,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_arcName = "TKS"; static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Tks"; -daNpcTks_HIOParam const daNpcTks_Param_c::m = { +DUSK_GAME_DATA daNpcTks_HIOParam const daNpcTks_Param_c::m = { 90.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_toby.cpp b/src/d/actor/d_a_npc_toby.cpp index 78b6b08dee..53a39a3e91 100644 --- a/src/d/actor/d_a_npc_toby.cpp +++ b/src/d/actor/d_a_npc_toby.cpp @@ -17,7 +17,7 @@ #include "dusk/frame_interpolation.h" #include -const daNpc_Toby_HIOParam daNpc_Toby_Param_c::m = { +DUSK_GAME_DATA const daNpc_Toby_HIOParam daNpc_Toby_Param_c::m = { 160.0f, -3.0f, 1.0f, @@ -247,7 +247,7 @@ enum NPC_TOBY_CUTS { CUT_CONVERSATION_ABOUT_ZRA = 6, }; -char DUSK_CONST* DUSK_CONST daNpc_Toby_c::mCutNameList[7] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Toby_c::mCutNameList[7] = { "", "TOBY_HOUSE_FIRE", "TALKTO_ONESELF", @@ -257,7 +257,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Toby_c::mCutNameList[7] = { "CONVERSATION_ABOUT_ZRA", }; -daNpc_Toby_c::cutFunc DUSK_CONST daNpc_Toby_c::mCutList[7] = { +DUSK_GAME_DATA daNpc_Toby_c::cutFunc DUSK_CONST daNpc_Toby_c::mCutList[7] = { NULL, &daNpc_Toby_c::cutTobyHouseFire, &daNpc_Toby_c::cutTalkToOneself, diff --git a/src/d/actor/d_a_npc_uri.cpp b/src/d/actor/d_a_npc_uri.cpp index f28ac6109e..44df1060d2 100644 --- a/src/d/actor/d_a_npc_uri.cpp +++ b/src/d/actor/d_a_npc_uri.cpp @@ -10,7 +10,7 @@ #include "m_Do/m_Do_graphic.h" #include -const daNpc_Uri_HIOParam daNpc_Uri_Param_c::m = { +DUSK_GAME_DATA const daNpc_Uri_HIOParam daNpc_Uri_Param_c::m = { 200.0f, // attention_offset -3.0f, // gravity 1.0f, // scale @@ -190,7 +190,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, }; -const char* daNpc_Uri_c::mCutNameList[7] = { +DUSK_GAME_DATA const char* daNpc_Uri_c::mCutNameList[7] = { "", "CONVERSATION", "START_CARRY_TUTORIAL", @@ -200,7 +200,7 @@ const char* daNpc_Uri_c::mCutNameList[7] = { "MEETING_AGAIN", }; -daNpc_Uri_c::cutFunc DUSK_CONST daNpc_Uri_c::mCutList[7] = { +DUSK_GAME_DATA daNpc_Uri_c::cutFunc DUSK_CONST daNpc_Uri_c::mCutList[7] = { NULL, &daNpc_Uri_c::cutConversation, &daNpc_Uri_c::cutStartCarryTutorial, diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index e31404e1da..a7e71f5902 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -388,7 +388,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "Wrestler"; static NPC_WRESTLER_HIO_CLASS l_HIO; -const daNpcWrestler_HIOParam daNpcWrestler_Param_c::m = { +DUSK_GAME_DATA const daNpcWrestler_HIOParam daNpcWrestler_Param_c::m = { 220.0f, -3.0f, 1.0f, @@ -646,7 +646,7 @@ void daNpcWrestler_HIO_c::genMessage(JORMContext* ctext) { } #endif -daNpcWrestler_c::EventFn DUSK_CONST daNpcWrestler_c::mEvtSeqList[7] = { +DUSK_GAME_DATA daNpcWrestler_c::EventFn DUSK_CONST daNpcWrestler_c::mEvtSeqList[7] = { NULL, &daNpcWrestler_c::EvCut_grDSEntry, &daNpcWrestler_c::EvCut_grDSEntry2, diff --git a/src/d/actor/d_a_npc_yamid.cpp b/src/d/actor/d_a_npc_yamid.cpp index 4593ee2946..d43458bd32 100644 --- a/src/d/actor/d_a_npc_yamid.cpp +++ b/src/d/actor/d_a_npc_yamid.cpp @@ -121,12 +121,12 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {1, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_yamiD_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_yamiD_c::mCutNameList[2] = { "", "STOPPER", }; -daNpc_yamiD_c::cutFunc DUSK_CONST daNpc_yamiD_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_yamiD_c::cutFunc DUSK_CONST daNpc_yamiD_c::mCutList[2] = { NULL, &daNpc_yamiD_c::cutStopper, }; @@ -145,7 +145,7 @@ daNpc_yamiD_c::~daNpc_yamiD_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -daNpc_yamiD_HIOParam const daNpc_yamiD_Param_c::m = { +DUSK_GAME_DATA daNpc_yamiD_HIOParam const daNpc_yamiD_Param_c::m = { 180.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_yamis.cpp b/src/d/actor/d_a_npc_yamis.cpp index 24272132fb..ca7e52f130 100644 --- a/src/d/actor/d_a_npc_yamis.cpp +++ b/src/d/actor/d_a_npc_yamis.cpp @@ -77,12 +77,12 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_yamiS_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_yamiS_c::mCutNameList[2] = { "", "STOPPER", }; -daNpc_yamiS_c::cutFunc DUSK_CONST daNpc_yamiS_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_yamiS_c::cutFunc DUSK_CONST daNpc_yamiS_c::mCutList[2] = { NULL, &daNpc_yamiS_c::cutStopper, }; @@ -94,7 +94,7 @@ daNpc_yamiS_c::~daNpc_yamiS_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -const daNpc_yamiS_HIOParam daNpc_yamiS_Param_c::m = { +DUSK_GAME_DATA const daNpc_yamiS_HIOParam daNpc_yamiS_Param_c::m = { 140.0f, // attention_offset -3.0f, // gravity 1.0f, // scale diff --git a/src/d/actor/d_a_npc_yamit.cpp b/src/d/actor/d_a_npc_yamit.cpp index 1c6b25740d..ac67845d70 100644 --- a/src/d/actor/d_a_npc_yamit.cpp +++ b/src/d/actor/d_a_npc_yamit.cpp @@ -80,12 +80,12 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0}, {2, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_yamiT_c::mCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_yamiT_c::mCutNameList[2] = { "", "STOPPER", }; -daNpc_yamiT_c::cutFunc DUSK_CONST daNpc_yamiT_c::mCutList[2] = { +DUSK_GAME_DATA daNpc_yamiT_c::cutFunc DUSK_CONST daNpc_yamiT_c::mCutList[2] = { NULL, &daNpc_yamiT_c::cutStopper, }; @@ -97,7 +97,7 @@ daNpc_yamiT_c::~daNpc_yamiT_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -const daNpc_yamiT_HIOParam daNpc_yamiT_Param_c::m = { +DUSK_GAME_DATA const daNpc_yamiT_HIOParam daNpc_yamiT_Param_c::m = { 230.0f, // attention_offset -3.0f, // gravity 1.0f, // scale diff --git a/src/d/actor/d_a_npc_yelia.cpp b/src/d/actor/d_a_npc_yelia.cpp index 25aa37d896..bcdff6b5da 100644 --- a/src/d/actor/d_a_npc_yelia.cpp +++ b/src/d/actor/d_a_npc_yelia.cpp @@ -192,7 +192,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {32, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_Yelia_c::mCutNameList[6] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Yelia_c::mCutNameList[6] = { "", "CONVERSATION_ABOUT_LOOPHOLE", "TW_RESISTANCE", @@ -201,7 +201,7 @@ char DUSK_CONST* DUSK_CONST daNpc_Yelia_c::mCutNameList[6] = { "THANK_YOU", }; -BOOL (daNpc_Yelia_c::*daNpc_Yelia_c::mCutList[6])(int) = { +DUSK_GAME_DATA BOOL (daNpc_Yelia_c::*daNpc_Yelia_c::mCutList[6])(int) = { NULL, &daNpc_Yelia_c::cutConversationAboutLoopHole, &daNpc_Yelia_c::cutTWResistance, @@ -298,7 +298,7 @@ enum Motion { /* 0x21 */ MOTION_KIZUKU_WAIT, }; -daNpc_Yelia_HIOParam const daNpc_Yelia_Param_c::m = { +DUSK_GAME_DATA daNpc_Yelia_HIOParam const daNpc_Yelia_Param_c::m = { 170.0f, // mAttnOffsetY -3.0f, // mGravity 1.0f, // mScale diff --git a/src/d/actor/d_a_npc_ykm.cpp b/src/d/actor/d_a_npc_ykm.cpp index 65beb46e4e..d4ac67b04c 100644 --- a/src/d/actor/d_a_npc_ykm.cpp +++ b/src/d/actor/d_a_npc_ykm.cpp @@ -175,7 +175,7 @@ enum RES_Name { /* 0x4 */ YKM3, }; -daNpc_ykM_HIOParam const daNpc_ykM_Param_c::m = { +DUSK_GAME_DATA daNpc_ykM_HIOParam const daNpc_ykM_Param_c::m = { 500.0f, -4.0f, 1.0f, @@ -511,7 +511,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0x27, -1, 1}, {0x28, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_ykM_c::mCutNameList[10] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_ykM_c::mCutNameList[10] = { "", "SLIDEDOWN", "MEETING_AGAIN", @@ -524,7 +524,7 @@ char DUSK_CONST* DUSK_CONST daNpc_ykM_c::mCutNameList[10] = { "HUG" }; -daNpc_ykM_c::cutFunc DUSK_CONST daNpc_ykM_c::mCutList[10] = { +DUSK_GAME_DATA daNpc_ykM_c::cutFunc DUSK_CONST daNpc_ykM_c::mCutList[10] = { NULL, &daNpc_ykM_c::cutSlideDown, &daNpc_ykM_c::cutMeetingAgain, diff --git a/src/d/actor/d_a_npc_ykw.cpp b/src/d/actor/d_a_npc_ykw.cpp index f2e195087d..e71a0e6b93 100644 --- a/src/d/actor/d_a_npc_ykw.cpp +++ b/src/d/actor/d_a_npc_ykw.cpp @@ -157,7 +157,7 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {23, 0, 1}, {24, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -const char* daNpc_ykW_c::mCutNameList[8] = { +DUSK_GAME_DATA const char* daNpc_ykW_c::mCutNameList[8] = { "", "SHOW_DOOR", "GO_INTO_BOSSROOM", @@ -168,7 +168,7 @@ const char* daNpc_ykW_c::mCutNameList[8] = { "HUG", }; -daNpc_ykW_c::cutFunc DUSK_CONST daNpc_ykW_c::mCutList[8] = { +DUSK_GAME_DATA daNpc_ykW_c::cutFunc DUSK_CONST daNpc_ykW_c::mCutList[8] = { NULL, &daNpc_ykW_c::cutShowDoor, &daNpc_ykW_c::cutGoIntoBossRoom, @@ -272,7 +272,7 @@ daNpc_ykW_c::~daNpc_ykW_c() { daNpcT_offTmpBit(0x55); } -const daNpc_ykW_HIOParam daNpc_ykW_Param_c::m = { +DUSK_GAME_DATA const daNpc_ykW_HIOParam daNpc_ykW_Param_c::m = { { 250.0f, -3.0f, 1.0f, 500.0f, 255.0f, 230.0f, 35.0f, 60.0f, 0.0f, 0.0f, 20.0f, -20.0f, 15.0f, -15.0f, 20.0f, -20.0f, diff --git a/src/d/actor/d_a_npc_zanb.cpp b/src/d/actor/d_a_npc_zanb.cpp index 9bbcb9d71b..69775de42e 100644 --- a/src/d/actor/d_a_npc_zanb.cpp +++ b/src/d/actor/d_a_npc_zanb.cpp @@ -73,9 +73,9 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_zanB_c::mCutNameList[1] = {""}; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_zanB_c::mCutNameList[1] = {""}; -daNpc_zanB_c::cutFunc DUSK_CONST daNpc_zanB_c::mCutList[1] = {NULL}; +DUSK_GAME_DATA daNpc_zanB_c::cutFunc DUSK_CONST daNpc_zanB_c::mCutList[1] = {NULL}; daNpc_zanB_c::~daNpc_zanB_c() { OS_REPORT("|%06d:%x|daNpc_zanB_c -> デストラクト\n", g_Counter.mCounter0, this); @@ -93,7 +93,7 @@ daNpc_zanB_c::~daNpc_zanB_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -daNpc_zanB_HIOParam const daNpc_zanB_Param_c::m = { +DUSK_GAME_DATA daNpc_zanB_HIOParam const daNpc_zanB_Param_c::m = { 270.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_zant.cpp b/src/d/actor/d_a_npc_zant.cpp index a63c13bf6c..ba13a93954 100644 --- a/src/d/actor/d_a_npc_zant.cpp +++ b/src/d/actor/d_a_npc_zant.cpp @@ -51,15 +51,15 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0} }; -char DUSK_CONST* DUSK_CONST daNpc_Zant_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_Zant_c::mCutNameList = ""; -daNpc_Zant_c::cutFunc DUSK_CONST daNpc_Zant_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_Zant_c::cutFunc DUSK_CONST daNpc_Zant_c::mCutList[1] = { NULL }; static NPC_ZANT_HIO_CLASS l_HIO; -daNpc_Zant_HIOParam const daNpc_Zant_Param_c::m = { +DUSK_GAME_DATA daNpc_Zant_HIOParam const daNpc_Zant_Param_c::m = { 270.0f, -3.0f, 1.0f, 500.0f, 255.0f, 250.0f, 35.0f, 50.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 0.0f, 0.0f, 0.0f, 60, 8, diff --git a/src/d/actor/d_a_npc_zelR.cpp b/src/d/actor/d_a_npc_zelR.cpp index 25c63aea38..3e1b8cb2cb 100644 --- a/src/d/actor/d_a_npc_zelR.cpp +++ b/src/d/actor/d_a_npc_zelR.cpp @@ -57,15 +57,15 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {-1, 0, 0}, {-1, 0, 0} }; -char DUSK_CONST* DUSK_CONST daNpc_ZelR_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_ZelR_c::mCutNameList = ""; -daNpc_ZelR_c::EventFn daNpc_ZelR_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_ZelR_c::EventFn daNpc_ZelR_c::mCutList[1] = { NULL }; static NPC_ZELR_HIO_CLASS l_HIO; -daNpc_ZelR_HIOParam const daNpc_ZelR_Param_c::m = { +DUSK_GAME_DATA daNpc_ZelR_HIOParam const daNpc_ZelR_Param_c::m = { 190.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_zelRo.cpp b/src/d/actor/d_a_npc_zelRo.cpp index 3cf7d29f2a..213de4d018 100644 --- a/src/d/actor/d_a_npc_zelRo.cpp +++ b/src/d/actor/d_a_npc_zelRo.cpp @@ -83,13 +83,13 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -char DUSK_CONST* DUSK_CONST daNpc_ZelRo_c::mCutNameList = ""; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_ZelRo_c::mCutNameList = ""; -daNpc_ZelRo_c::cutFunc DUSK_CONST daNpc_ZelRo_c::mCutList[1] = { +DUSK_GAME_DATA daNpc_ZelRo_c::cutFunc DUSK_CONST daNpc_ZelRo_c::mCutList[1] = { NULL }; -const daNpc_ZelRo_HIOParam daNpc_ZelRo_Param_c::m = { +DUSK_GAME_DATA const daNpc_ZelRo_HIOParam daNpc_ZelRo_Param_c::m = { 190.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_npc_zelda.cpp b/src/d/actor/d_a_npc_zelda.cpp index b40ff46be3..065ac236f9 100644 --- a/src/d/actor/d_a_npc_zelda.cpp +++ b/src/d/actor/d_a_npc_zelda.cpp @@ -53,8 +53,8 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -const char* daNpc_Zelda_c::mCutNameList = ""; -daNpc_Zelda_c::cutFunc DUSK_CONST daNpc_Zelda_c::mCutList[1] = { 0 }; +DUSK_GAME_DATA const char* daNpc_Zelda_c::mCutNameList = ""; +DUSK_GAME_DATA daNpc_Zelda_c::cutFunc DUSK_CONST daNpc_Zelda_c::mCutList[1] = { 0 }; static NPC_ZELDA_HIO_CLASS l_HIO; @@ -108,7 +108,7 @@ daNpc_Zelda_c::~daNpc_Zelda_c() { deleteRes(l_loadResPtrnList[field_0xf80], (const char**)l_resNameList); } -const daNpc_Zelda_HIOParam daNpc_Zelda_Param_c::m = {{ +DUSK_GAME_DATA const daNpc_Zelda_HIOParam daNpc_Zelda_Param_c::m = {{ 190.0f, // attention_offset -3.0f, // gravity 1.0f, // scale diff --git a/src/d/actor/d_a_npc_zra.cpp b/src/d/actor/d_a_npc_zra.cpp index a33e32feef..9d97a3ac2c 100644 --- a/src/d/actor/d_a_npc_zra.cpp +++ b/src/d/actor/d_a_npc_zra.cpp @@ -22,7 +22,7 @@ static NPC_ZRA_HIO_CLASS l_HIO; -daNpc_zrA_HIOParam const daNpc_zrA_Param_c::m = { +DUSK_GAME_DATA daNpc_zrA_HIOParam const daNpc_zrA_Param_c::m = { 230.0f, // mAttnOffsetY -3.0f, // mGravity 1.0f, // mScale @@ -410,7 +410,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_myName[4] = { "zrWF", }; -char DUSK_CONST* DUSK_CONST daNpc_zrA_c::mEvtCutNameList[11] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_zrA_c::mEvtCutNameList[11] = { "", "TALK_SWIM", "BEFORE_BLAST_ZRR", @@ -424,7 +424,7 @@ char DUSK_CONST* DUSK_CONST daNpc_zrA_c::mEvtCutNameList[11] = { "TALK_MULTI", }; -daNpc_zrA_c::EventFn DUSK_CONST daNpc_zrA_c::mEvtCutList[11] = { +DUSK_GAME_DATA daNpc_zrA_c::EventFn DUSK_CONST daNpc_zrA_c::mEvtCutList[11] = { NULL, &daNpc_zrA_c::ECut_talkSwim, &daNpc_zrA_c::ECut_beforeBlastzrR, diff --git a/src/d/actor/d_a_npc_zrc.cpp b/src/d/actor/d_a_npc_zrc.cpp index c049091428..60ae6713e5 100644 --- a/src/d/actor/d_a_npc_zrc.cpp +++ b/src/d/actor/d_a_npc_zrc.cpp @@ -17,7 +17,7 @@ enum Event_Cut_Nums { static NPC_ZRC_HIO_CLASS l_HIO; -daNpc_zrC_HIOParam const daNpc_zrC_Param_c::m = { +DUSK_GAME_DATA daNpc_zrC_HIOParam const daNpc_zrC_Param_c::m = { 50.0f, // mAttnOffsetY -3.0f, // mGravity 1.0f, // mScale @@ -171,12 +171,12 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNames[7] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "zrC"; -char DUSK_CONST* DUSK_CONST daNpc_zrC_c::mEvtCutNameList[2] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_zrC_c::mEvtCutNameList[2] = { "", "EARRING_GET", }; -daNpc_zrC_c::EventFn DUSK_CONST daNpc_zrC_c::mEvtCutList[2] = { +DUSK_GAME_DATA daNpc_zrC_c::EventFn DUSK_CONST daNpc_zrC_c::mEvtCutList[2] = { NULL, &daNpc_zrC_c::ECut_earringGet, }; diff --git a/src/d/actor/d_a_npc_zrz.cpp b/src/d/actor/d_a_npc_zrz.cpp index 2aace19adf..9e45b34f86 100644 --- a/src/d/actor/d_a_npc_zrz.cpp +++ b/src/d/actor/d_a_npc_zrz.cpp @@ -16,7 +16,7 @@ static NPC_ZRZ_HIO_CLASS l_HIO; -daNpc_zrZ_HIOParam const daNpc_zrZ_Param_c::m = { +DUSK_GAME_DATA daNpc_zrZ_HIOParam const daNpc_zrZ_Param_c::m = { 700.0f, // mAttnOffsetY 0.0f, // mGravity 1.0f, // mScale @@ -139,7 +139,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_evtNames[8] = { static DUSK_CONSTEXPR char DUSK_CONST* l_myName = "zrZ"; -char DUSK_CONST* DUSK_CONST daNpc_zrZ_c::mEvtCutNameList[8] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daNpc_zrZ_c::mEvtCutNameList[8] = { "", "HELP_PRINCE", "COME_HERE", @@ -150,7 +150,7 @@ char DUSK_CONST* DUSK_CONST daNpc_zrZ_c::mEvtCutNameList[8] = { "SR_SKIP", }; -daNpc_zrZ_c::EventFn DUSK_CONST daNpc_zrZ_c::mEvtCutList[8] = { +DUSK_GAME_DATA daNpc_zrZ_c::EventFn DUSK_CONST daNpc_zrZ_c::mEvtCutList[8] = { NULL, &daNpc_zrZ_c::ECut_helpPrince, &daNpc_zrZ_c::ECut_comeHere, diff --git a/src/d/actor/d_a_obj_Turara.cpp b/src/d/actor/d_a_obj_Turara.cpp index 2925712179..767129993c 100644 --- a/src/d/actor/d_a_obj_Turara.cpp +++ b/src/d/actor/d_a_obj_Turara.cpp @@ -50,7 +50,7 @@ void daTurara_c::setBaseMtx() { static daTurara_HIO_c l_HIO; -const dCcD_SrcGObjInf daTurara_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daTurara_c::mCcDObjInfo = { {0, // mFlags { {0x20, 0x1, 0x1f}, // mObjAt @@ -63,7 +63,7 @@ const dCcD_SrcGObjInf daTurara_c::mCcDObjInfo = { {0} // mGObjCo }; -dCcD_SrcCyl daTurara_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daTurara_c::mCcDCyl = { daTurara_c::mCcDObjInfo, // mObjInf { { diff --git a/src/d/actor/d_a_obj_TvCdlst.cpp b/src/d/actor/d_a_obj_TvCdlst.cpp index 2b734d2aab..1b7cbb44db 100644 --- a/src/d/actor/d_a_obj_TvCdlst.cpp +++ b/src/d/actor/d_a_obj_TvCdlst.cpp @@ -10,7 +10,7 @@ static daTvCdlst_HIO_c l_HIO; -dCcD_SrcCyl daTvCdlst_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daTvCdlst_c::mCcDCyl = { daTvCdlst_c::mCcDObjInfo, // mObjInf { { @@ -42,7 +42,7 @@ int daTvCdlst_c::CreateHeap() { return 1; } -const dCcD_SrcGObjInf daTvCdlst_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daTvCdlst_c::mCcDObjInfo = { {0, // mFlags { {0x0, 0x0, 0x0}, // mObjAt diff --git a/src/d/actor/d_a_obj_amiShutter.cpp b/src/d/actor/d_a_obj_amiShutter.cpp index 13004d68e3..8d193c8811 100644 --- a/src/d/actor/d_a_obj_amiShutter.cpp +++ b/src/d/actor/d_a_obj_amiShutter.cpp @@ -284,7 +284,7 @@ int daAmiShutter_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } -actor_method_class l_daAmiShutter_Method = { +DUSK_GAME_DATA actor_method_class l_daAmiShutter_Method = { (process_method_func)daAmiShutter_Create, (process_method_func)daAmiShutter_Delete, (process_method_func)daAmiShutter_Execute, diff --git a/src/d/actor/d_a_obj_automata.cpp b/src/d/actor/d_a_obj_automata.cpp index a0ee360518..3d6b5d804e 100644 --- a/src/d/actor/d_a_obj_automata.cpp +++ b/src/d/actor/d_a_obj_automata.cpp @@ -19,7 +19,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNameList[2] = { "AutoMata", }; -daObj_AutoMata_HIOParam const daObj_AutoMata_Param_c::m = { +DUSK_GAME_DATA daObj_AutoMata_HIOParam const daObj_AutoMata_Param_c::m = { 220.0f, 80.0f, 40.0f, }; diff --git a/src/d/actor/d_a_obj_barDesk.cpp b/src/d/actor/d_a_obj_barDesk.cpp index 768c233c61..a333cb1a3d 100644 --- a/src/d/actor/d_a_obj_barDesk.cpp +++ b/src/d/actor/d_a_obj_barDesk.cpp @@ -12,14 +12,14 @@ static daBarDesk_HIO_c l_HIO; -dCcD_SrcGObjInf const daBarDesk_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daBarDesk_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0xD8FAFDBF, 0x11}, {0}}}, {1, 0, 0, 0, 0}, {0xA, 0, 0, 0, 6}, {0} }; -dCcD_SrcCyl daBarDesk_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daBarDesk_c::mCcDCyl = { mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f} diff --git a/src/d/actor/d_a_obj_bed.cpp b/src/d/actor/d_a_obj_bed.cpp index a2b017082a..e4d11f5b29 100644 --- a/src/d/actor/d_a_obj_bed.cpp +++ b/src/d/actor/d_a_obj_bed.cpp @@ -30,7 +30,7 @@ void daObj_Bed_HIO_c::genMessage(JORMContext* ctx) { } #endif -daObj_Bed_HIOParam const daObj_Bed_Param_c::m = {0, -3.0f, 1.0f, 600.0f}; +DUSK_GAME_DATA daObj_Bed_HIOParam const daObj_Bed_Param_c::m = {0, -3.0f, 1.0f, 600.0f}; daObj_Bed_c::~daObj_Bed_c() { if (mpCollider != NULL) { diff --git a/src/d/actor/d_a_obj_bemos.cpp b/src/d/actor/d_a_obj_bemos.cpp index a232df06ec..2603294ed0 100644 --- a/src/d/actor/d_a_obj_bemos.cpp +++ b/src/d/actor/d_a_obj_bemos.cpp @@ -52,7 +52,7 @@ static Vec const l_craw_offset[4] = { {0.0f, 0.0f, 95.0f}, }; -s16 const daObjBm_c::M_dir_base[4] = { +DUSK_GAME_DATA s16 const daObjBm_c::M_dir_base[4] = { 0x0000, 0x4000, -0x8000, @@ -1037,12 +1037,12 @@ void daObjBm_c::mode_wait() { } } -const daObjBm_c::BgcSrc_c daObjBm_c::Bgc_c::M_lin5[] = { +DUSK_GAME_DATA const daObjBm_c::BgcSrc_c daObjBm_c::Bgc_c::M_lin5[] = { {0.0f, 0.0f, 0.0f, 0.0f}, {-0.5f, -0.5f, -1.0f, -1.0f}, {0.5f, -0.5f, 1.0f, -1.0f}, {0.5f, 0.5f, 1.0f, 1.0f}, {-0.5f, 0.5f, -1.0f, 1.0f}, }; -const daObjBm_c::BgcSrc_c daObjBm_c::Bgc_c::M_lin20[] = { +DUSK_GAME_DATA const daObjBm_c::BgcSrc_c daObjBm_c::Bgc_c::M_lin20[] = { {0.0f, 0.0f, 0.0f, 0.0f}, {-0.25f, -0.25f, 0.0f, 0.0f}, {-0.5f, -0.5f, -1.0f, -1.0f}, {0.0f, -0.5f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f, 1.0f}, {-0.5f, 0.0f, -1.0f, 1.0f}, {0.25f, -0.25f, 0.0f, 0.0f}, {0.0f, -0.5f, -1.0f, -1.0f}, {0.5f, -0.5f, 1.0f, -1.0f}, @@ -1148,11 +1148,11 @@ static f32 dummy_rodata_5157() { return -G_CM3D_F_INF; } -dBgS_ObjGndChk daObjBm_c::Bgc_c::M_gnd_work[23]; +DUSK_GAME_DATA dBgS_ObjGndChk daObjBm_c::Bgc_c::M_gnd_work[23]; -dBgS_WtrChk daObjBm_c::Bgc_c::M_wrt_work; +DUSK_GAME_DATA dBgS_WtrChk daObjBm_c::Bgc_c::M_wrt_work; -dBgS_ObjLinChk daObjBm_c::Bgc_c::M_wall_work[23]; +DUSK_GAME_DATA dBgS_ObjLinChk daObjBm_c::Bgc_c::M_wall_work[23]; void daObjBm_c::Bgc_c::chk_wall_touch(const fopAc_ac_c*, const daObjBm_c::BgcSrc_c*, short) { static dBgS_ObjLinChk touch_work; diff --git a/src/d/actor/d_a_obj_bky_rock.cpp b/src/d/actor/d_a_obj_bky_rock.cpp index 08ba68267f..d88e99c24c 100644 --- a/src/d/actor/d_a_obj_bky_rock.cpp +++ b/src/d/actor/d_a_obj_bky_rock.cpp @@ -18,7 +18,7 @@ static int daBkyRock_c_createHeap(fopAc_ac_c* i_this) { static DUSK_CONSTEXPR char DUSK_CONST* l_arcName = "BYRock"; -daBkyRock_c::exeProc daBkyRock_c::s_exeProc[3] = { +DUSK_GAME_DATA daBkyRock_c::exeProc daBkyRock_c::s_exeProc[3] = { &daBkyRock_c::exeModeNoDamage, &daBkyRock_c::exeModeDamage, &daBkyRock_c::exeModePiece, @@ -124,7 +124,7 @@ static u16 const SECOND_PARTICLE_NAME[6] = { 0x89C2, 0x89C3, 0x89C4, 0x89C5, 0x89C6, 0x89C7, }; -dCcD_SrcCyl const daBkyRock_c::s_CcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl const daBkyRock_c::s_CcDCyl = { { {0x0, {{0x0, 0x0, 0x0}, {0x20a0, 0x11}, 0x0}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt diff --git a/src/d/actor/d_a_obj_bmWindow.cpp b/src/d/actor/d_a_obj_bmWindow.cpp index b6a09b53dd..6148004948 100644 --- a/src/d/actor/d_a_obj_bmWindow.cpp +++ b/src/d/actor/d_a_obj_bmWindow.cpp @@ -45,7 +45,7 @@ int daBmWindow_c::CreateHeap() { return mModel != NULL ? 1 : 0; } -dCcD_SrcGObjInf const daBmWindow_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daBmWindow_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0xd8fafdbf, 0x11}, {0}}}, {1, 0, 0, 0, 0}, {0xa, 0, 0, 0, 0xa6}, @@ -122,7 +122,7 @@ int daBmWindow_c::Execute(Mtx** param_1) { static daBmWindow_HIO_c l_HIO; -dCcD_SrcCyl daBmWindow_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daBmWindow_c::mCcDCyl = { daBmWindow_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_boumato.cpp b/src/d/actor/d_a_obj_boumato.cpp index df3bc442b3..173b23fea6 100644 --- a/src/d/actor/d_a_obj_boumato.cpp +++ b/src/d/actor/d_a_obj_boumato.cpp @@ -14,7 +14,7 @@ static const char* dummyString() { return ""; } -daObj_BouMato_HIOParam const daObj_BouMato_Param_c::m = { +DUSK_GAME_DATA daObj_BouMato_HIOParam const daObj_BouMato_Param_c::m = { 0.0f, -3.0f, 1.0f, 400.0f, 300.0f, 4.0f, 20.0f, }; diff --git a/src/d/actor/d_a_obj_brakeeff.cpp b/src/d/actor/d_a_obj_brakeeff.cpp index 504c91dfa3..ae3032119c 100644 --- a/src/d/actor/d_a_obj_brakeeff.cpp +++ b/src/d/actor/d_a_obj_brakeeff.cpp @@ -28,7 +28,7 @@ int daObj_Brakeeff_Draw(obj_brakeeff_class* i_this) { } // Particle IDS -u16 e_name[5] = {0x00, 0x00, 0x00, 0x00, 0x00}; +DUSK_GAME_DATA u16 e_name[5] = {0x00, 0x00, 0x00, 0x00, 0x00}; void obj_brakeeff_1(obj_brakeeff_class* i_this) { fopAc_ac_c* a_this = static_cast(i_this); @@ -130,13 +130,13 @@ int daObj_Brakeeff_Delete(obj_brakeeff_class* i_this) { } // model data per effect type -u32 bef_bmd[2] = { +DUSK_GAME_DATA u32 bef_bmd[2] = { 5, 6, }; // J3DAnmTevRegKey per effect type -u32 bef_brk[2] = { +DUSK_GAME_DATA u32 bef_brk[2] = { 9, 10, }; @@ -229,7 +229,7 @@ int daObj_Brakeeff_Create(fopAc_ac_c* a_this) { return res_load_result; } -actor_method_class l_daObj_Brakeeff_Method = { +DUSK_GAME_DATA actor_method_class l_daObj_Brakeeff_Method = { (process_method_func)daObj_Brakeeff_Create, (process_method_func)daObj_Brakeeff_Delete, (process_method_func)daObj_Brakeeff_Execute, (process_method_func)daObj_Brakeeff_IsDelete, (process_method_func)daObj_Brakeeff_Draw, diff --git a/src/d/actor/d_a_obj_bubblePilar.cpp b/src/d/actor/d_a_obj_bubblePilar.cpp index 11e42355f2..c1393b919e 100644 --- a/src/d/actor/d_a_obj_bubblePilar.cpp +++ b/src/d/actor/d_a_obj_bubblePilar.cpp @@ -11,14 +11,14 @@ static daBubbPilar_HIO_c l_HIO; -const dCcD_SrcGObjInf daBubbPilar_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daBubbPilar_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0x20, 0x11}, {0}}}, {dCcD_SE_NONE, 0, 1, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 2}, {0}, }; -dCcD_SrcCyl daBubbPilar_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daBubbPilar_c::mCcDCyl = { daBubbPilar_c::mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f} diff --git a/src/d/actor/d_a_obj_burnbox.cpp b/src/d/actor/d_a_obj_burnbox.cpp index 3d379cebe5..36fa21275e 100644 --- a/src/d/actor/d_a_obj_burnbox.cpp +++ b/src/d/actor/d_a_obj_burnbox.cpp @@ -186,7 +186,7 @@ int daObjBurnBox_MoveBGDraw(daObjBurnBox_c* i_this) { return i_this->MoveBGDraw(); } -actor_method_class daObjBurnBox_METHODS = { +DUSK_GAME_DATA actor_method_class daObjBurnBox_METHODS = { (process_method_func) daObjBurnBox_create1st, (process_method_func)daObjBurnBox_MoveBGDelete, (process_method_func) daObjBurnBox_MoveBGExecute, NULL, (process_method_func) daObjBurnBox_MoveBGDraw, diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp index f27ec717e9..d00b06b10a 100644 --- a/src/d/actor/d_a_obj_carry.cpp +++ b/src/d/actor/d_a_obj_carry.cpp @@ -39,7 +39,7 @@ static const cM3dGCylS l_cyl_info[] = { { 0.0f, 0.0f, 0.0f, 50.0f, 100.0f }, }; -const daObjCarry_dt_t daObjCarry_c::mData[] = { +DUSK_GAME_DATA const daObjCarry_dt_t daObjCarry_c::mData[] = { // TYPE_TSUBO { 27.0f, diff --git a/src/d/actor/d_a_obj_catdoor.cpp b/src/d/actor/d_a_obj_catdoor.cpp index 4ca78ce4d0..21f4ed2bc9 100644 --- a/src/d/actor/d_a_obj_catdoor.cpp +++ b/src/d/actor/d_a_obj_catdoor.cpp @@ -10,7 +10,7 @@ static const char* l_arcName = "CatDoor"; -const daObjCatDoor_Attr_c daObjCatDoor_c::M_attr = { +DUSK_GAME_DATA const daObjCatDoor_Attr_c daObjCatDoor_c::M_attr = { 30, 1400, }; diff --git a/src/d/actor/d_a_obj_chandelier.cpp b/src/d/actor/d_a_obj_chandelier.cpp index 900edd75ca..27d1f7f7eb 100644 --- a/src/d/actor/d_a_obj_chandelier.cpp +++ b/src/d/actor/d_a_obj_chandelier.cpp @@ -12,7 +12,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_arcName = "L9Chand"; -daObjChandelier_proc daObjChandelier_c::s_exeProc[5] = { +DUSK_GAME_DATA daObjChandelier_proc daObjChandelier_c::s_exeProc[5] = { &daObjChandelier_c::exeModeWait, &daObjChandelier_c::exeModeStartSwg, &daObjChandelier_c::exeModeDown, diff --git a/src/d/actor/d_a_obj_fireWood.cpp b/src/d/actor/d_a_obj_fireWood.cpp index 621a15f7a3..b73a526b40 100644 --- a/src/d/actor/d_a_obj_fireWood.cpp +++ b/src/d/actor/d_a_obj_fireWood.cpp @@ -21,7 +21,7 @@ void daFireWood_c::setBaseMtx() { static daFireWood_HIO_c l_HIO; -dCcD_SrcCyl daFireWood_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daFireWood_c::mCcDCyl = { daFireWood_c::mCcDObjInfo, { { @@ -32,7 +32,7 @@ dCcD_SrcCyl daFireWood_c::mCcDCyl = { } }; -const dCcD_SrcGObjInf daFireWood_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daFireWood_c::mCcDObjInfo = { {0, {{AT_TYPE_LANTERN_SWING, 0, 0x13}, {0xD8FBFFFF, 0x1F}, {0x0}}}, {dCcD_SE_SWORD, 0, 0, dCcD_MTRL_NONE, 0}, {dCcD_SE_STONE, 0, 0, dCcD_MTRL_NONE, 0}, diff --git a/src/d/actor/d_a_obj_fireWood2.cpp b/src/d/actor/d_a_obj_fireWood2.cpp index d20ab61f5e..69ee25f6d1 100644 --- a/src/d/actor/d_a_obj_fireWood2.cpp +++ b/src/d/actor/d_a_obj_fireWood2.cpp @@ -21,14 +21,14 @@ void daFireWood2_c::setBaseMtx() { static daFireWood2_HIO_c l_HIO; -const dCcD_SrcGObjInf daFireWood2_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daFireWood2_c::mCcDObjInfo = { {0, {{AT_TYPE_LANTERN_SWING, 0, 0x13}, {0xD8FBFFFF, 0x1F}, {0x79}}}, {dCcD_SE_SWORD, 0, 0, dCcD_MTRL_NONE, 0}, {dCcD_SE_STONE, 0, 0, dCcD_MTRL_NONE, 0}, {0}, }; -dCcD_SrcCyl daFireWood2_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daFireWood2_c::mCcDCyl = { daFireWood2_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_flag.cpp b/src/d/actor/d_a_obj_flag.cpp index b474b05893..5edd11ff88 100644 --- a/src/d/actor/d_a_obj_flag.cpp +++ b/src/d/actor/d_a_obj_flag.cpp @@ -7,7 +7,7 @@ #include "d/actor/d_a_obj_flag.h" -daObjFlag_c::M_attrs const daObjFlag_c::M_attr = { +DUSK_GAME_DATA daObjFlag_c::M_attrs const daObjFlag_c::M_attr = { 4000.0f, 1.0f, 0.3f, 15, 2000, 1500, 4000, 1800, 0, 0, 1000, 400, diff --git a/src/d/actor/d_a_obj_flag2.cpp b/src/d/actor/d_a_obj_flag2.cpp index a11287480f..a22e1216d8 100644 --- a/src/d/actor/d_a_obj_flag2.cpp +++ b/src/d/actor/d_a_obj_flag2.cpp @@ -51,7 +51,7 @@ public: daObjFlag2_Hio_c M_hio; #endif -daObjFlag2_Attr_c const daObjFlag2_c::M_attr = { +DUSK_GAME_DATA daObjFlag2_Attr_c const daObjFlag2_c::M_attr = { -2.0f, 0.74f, 0.68f, 40.0f, 100.0f, }; diff --git a/src/d/actor/d_a_obj_flag3.cpp b/src/d/actor/d_a_obj_flag3.cpp index 094223ddfa..d053c045b9 100644 --- a/src/d/actor/d_a_obj_flag3.cpp +++ b/src/d/actor/d_a_obj_flag3.cpp @@ -49,7 +49,7 @@ public: daObjFlag3_Hio_c M_hio; #endif -daObjFlag3_Attr_c const daObjFlag3_c::M_attr = { +DUSK_GAME_DATA daObjFlag3_Attr_c const daObjFlag3_c::M_attr = { -2.0f, 0.6f, 0.68f, 40.0f, 100.0f, }; diff --git a/src/d/actor/d_a_obj_gadget.cpp b/src/d/actor/d_a_obj_gadget.cpp index 0f7927a243..cd401c9654 100644 --- a/src/d/actor/d_a_obj_gadget.cpp +++ b/src/d/actor/d_a_obj_gadget.cpp @@ -35,7 +35,7 @@ public: #endif -daObj_Gadget_HIOParam const daObj_Gadget_Param_c::m = { +DUSK_GAME_DATA daObj_Gadget_HIOParam const daObj_Gadget_Param_c::m = { 0.0f, -4.0f, 1.0f, 100.0f, 37.0f, 26.0f, 13.0f, 14.0f, 37.0f, 50.0f, 18.0f, }; diff --git a/src/d/actor/d_a_obj_glowSphere.cpp b/src/d/actor/d_a_obj_glowSphere.cpp index 77b0ae9e69..4f668fd53d 100644 --- a/src/d/actor/d_a_obj_glowSphere.cpp +++ b/src/d/actor/d_a_obj_glowSphere.cpp @@ -22,14 +22,14 @@ static DUSK_CONSTEXPR cull_box l_cull_box = { {30.0f, 60.0f, 30.0f} }; -const dCcD_SrcGObjInf daGlwSph_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daGlwSph_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0x10000, 0x11}, {0x19}}}, {dCcD_SE_SWORD, 0, 0, 0, 0x0}, {dCcD_SE_STONE, 0, 0, 0, 0x2}, {0}, }; -dCcD_SrcSph daGlwSph_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daGlwSph_c::mCcDSph = { daGlwSph_c::mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph @@ -45,7 +45,7 @@ static GXColor l_envColor[] = { /* Blue */ {0x00, 0x32, 0xFF, 0xFF}, }; -_GlSph_Mng_c daGlwSph_c::mSphMng; +DUSK_GAME_DATA _GlSph_Mng_c daGlwSph_c::mSphMng; _GlSph_Mng_c& daGlwSph_c::getSphMng() { return mSphMng; @@ -415,9 +415,9 @@ BOOL _GlSph_Mng_c::_chkAllGet_main() { return TRUE; } -u16 _GlSph_Mng_c::mSphSe; +DUSK_GAME_DATA u16 _GlSph_Mng_c::mSphSe; -s16 _GlSph_Mng_c::mSeClrTmr; +DUSK_GAME_DATA s16 _GlSph_Mng_c::mSeClrTmr; void _GlSph_Mng_c::SphSeProc() { if (mSeClrTmr > 0) { diff --git a/src/d/actor/d_a_obj_gpTaru.cpp b/src/d/actor/d_a_obj_gpTaru.cpp index e0668984c2..08185aebbe 100644 --- a/src/d/actor/d_a_obj_gpTaru.cpp +++ b/src/d/actor/d_a_obj_gpTaru.cpp @@ -59,7 +59,7 @@ int daGpTaru_c::CreateHeap() { return 1; } -dCcD_SrcCyl daGpTaru_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daGpTaru_c::mCcDCyl = { daGpTaru_c::mCcDObjInfo, { { @@ -70,7 +70,7 @@ dCcD_SrcCyl daGpTaru_c::mCcDCyl = { } // mCylAttr }; -const dCcD_SrcGObjInf daGpTaru_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daGpTaru_c::mCcDObjInfo = { {0, {{0, 0, 0x1F}, {0xD8FAFDBF, 0x11}, {0x79}}}, {dCcD_SE_NONE, 0, 1, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 2}, diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index c8ad09dda2..faef741c27 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -25,7 +25,7 @@ class daObj_GrA_Param_c { public: virtual ~daObj_GrA_Param_c() {} - static const daObj_GrA_HIO_Param_c m; + static DUSK_GAME_DATA const daObj_GrA_HIO_Param_c m; }; #if DEBUG @@ -308,7 +308,7 @@ cPhs_Step daObj_GrA_c::create() { return phase; } -daObj_GrA_HIO_Param_c const daObj_GrA_Param_c::m = { +DUSK_GAME_DATA daObj_GrA_HIO_Param_c const daObj_GrA_Param_c::m = { 85.0f, -4.0f, 1.0f, @@ -2083,7 +2083,7 @@ static int daObj_GrA_IsDelete(void* i_this) { AUDIO_INSTANCES; -daObj_GrA_c::MotionFunc daObj_GrA_c::mBaseMotionList[22] = { +DUSK_GAME_DATA daObj_GrA_c::MotionFunc daObj_GrA_c::mBaseMotionList[22] = { &daObj_GrA_c::base000, &daObj_GrA_c::base001, &daObj_GrA_c::base003, @@ -2108,7 +2108,7 @@ daObj_GrA_c::MotionFunc daObj_GrA_c::mBaseMotionList[22] = { &daObj_GrA_c::base026, }; -daObj_GrA_c::MotionFunc daObj_GrA_c::mFaceMotionList[14] = { +DUSK_GAME_DATA daObj_GrA_c::MotionFunc daObj_GrA_c::mFaceMotionList[14] = { &daObj_GrA_c::face000, &daObj_GrA_c::face003, &daObj_GrA_c::face004, diff --git a/src/d/actor/d_a_obj_gra_rock.cpp b/src/d/actor/d_a_obj_gra_rock.cpp index a2cfb0ad17..045d2fcc0e 100644 --- a/src/d/actor/d_a_obj_gra_rock.cpp +++ b/src/d/actor/d_a_obj_gra_rock.cpp @@ -16,7 +16,7 @@ static void dummy() { cLib_calcTimer(0); } -dCcD_SrcCyl const daObjGraRock_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl const daObjGraRock_c::mCcDCyl = { { {0x0, {{0x0, 0x0, 0x0}, {0x2020, 0x11}, 0x0}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt diff --git a/src/d/actor/d_a_obj_grave_stone.cpp b/src/d/actor/d_a_obj_grave_stone.cpp index 3e2daf2d30..7902e5361b 100644 --- a/src/d/actor/d_a_obj_grave_stone.cpp +++ b/src/d/actor/d_a_obj_grave_stone.cpp @@ -12,14 +12,14 @@ static char const* l_arcName = "H_Haka"; -dCcD_SrcGObjInf const daGraveStone_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daGraveStone_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0, 0}, {0x79}}}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0}, }; -dCcD_SrcCyl const daGraveStone_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl const daGraveStone_c::mCcDCyl = { { {0, {{0, 0, 0}, {0, 0}, {0x79}}}, {0, 0, 0, 0, 0}, diff --git a/src/d/actor/d_a_obj_hakai_brl.cpp b/src/d/actor/d_a_obj_hakai_brl.cpp index 618c4adb95..c4ac094354 100644 --- a/src/d/actor/d_a_obj_hakai_brl.cpp +++ b/src/d/actor/d_a_obj_hakai_brl.cpp @@ -82,7 +82,7 @@ int daObjHBarrel_c::execute() { return 1; } -dCcD_SrcCyl const daObjHBarrel_c::s_CcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl const daObjHBarrel_c::s_CcDCyl = { { {0x0, {{0x0, 0x0, 0xd}, {0xd8fafdff, 0x11}, 0x79}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt diff --git a/src/d/actor/d_a_obj_hakai_ftr.cpp b/src/d/actor/d_a_obj_hakai_ftr.cpp index c0efb5af88..0f03a00934 100644 --- a/src/d/actor/d_a_obj_hakai_ftr.cpp +++ b/src/d/actor/d_a_obj_hakai_ftr.cpp @@ -99,7 +99,7 @@ int daObjHFtr_c::draw() { return 1; } -dCcD_SrcCyl const daObjHFtr_c::s_CcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl const daObjHFtr_c::s_CcDCyl = { { {0x0, {{0x0, 0x0, 0x0}, {0x400020, 0x11}, 0x0}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt diff --git a/src/d/actor/d_a_obj_hasu2.cpp b/src/d/actor/d_a_obj_hasu2.cpp index 3ca19f9727..f10f5a7dab 100644 --- a/src/d/actor/d_a_obj_hasu2.cpp +++ b/src/d/actor/d_a_obj_hasu2.cpp @@ -176,7 +176,7 @@ static int daObjMHasu_MoveBGDraw(nObjMHasu::daObjMHasu_c* i_this) { return i_this->MoveBGDraw(); } -actor_method_class daObjMHasu_METHODS = { +DUSK_GAME_DATA actor_method_class daObjMHasu_METHODS = { (process_method_func)&daObjMHasu_create1st, (process_method_func)&daObjMHasu_MoveBGDelete, (process_method_func)&daObjMHasu_MoveBGExecute, diff --git a/src/d/actor/d_a_obj_itamato.cpp b/src/d/actor/d_a_obj_itamato.cpp index 5fdce10cf5..dd795e362b 100644 --- a/src/d/actor/d_a_obj_itamato.cpp +++ b/src/d/actor/d_a_obj_itamato.cpp @@ -11,7 +11,7 @@ #include "JSystem/JHostIO/JORFile.h" #include -daObj_ItaMato_HIOParam const daObj_ItaMato_Param_c::m = { +DUSK_GAME_DATA daObj_ItaMato_HIOParam const daObj_ItaMato_Param_c::m = { 110.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_obj_item.cpp b/src/d/actor/d_a_obj_item.cpp index c71111ba63..0dc9ff833b 100644 --- a/src/d/actor/d_a_obj_item.cpp +++ b/src/d/actor/d_a_obj_item.cpp @@ -1086,7 +1086,7 @@ void daItem_c::set_bound_se() { } } -s32 daItem_c::m_timer_max = 10000; +DUSK_GAME_DATA s32 daItem_c::m_timer_max = 10000; int daItem_c::CountTimer() { m_timer++; @@ -1198,7 +1198,7 @@ void daItem_c::initScale() { } } -procFunc daItem_c::mFuncPtr[] = { +DUSK_GAME_DATA procFunc daItem_c::mFuncPtr[] = { &daItem_c::procMainNormal, &daItem_c::procMainEnemyCarry, &daItem_c::procMainSimpleGetDemo, &daItem_c::procWaitGetDemoEvent, &daItem_c::procMainGetDemoEvent, &daItem_c::procMainBoomerangCarry, @@ -1206,7 +1206,7 @@ procFunc daItem_c::mFuncPtr[] = { &daItem_c::procMainForceGet, NULL, }; -const dCcD_SrcCyl daItem_c::m_cyl_src = { +DUSK_GAME_DATA const dCcD_SrcCyl daItem_c::m_cyl_src = { { {0, {{0, 0, 0}, {0xFFFFFFFF, 17}, 0x59}}, {dCcD_SE_NONE, 0, 0, 0, {0}}, diff --git a/src/d/actor/d_a_obj_kago.cpp b/src/d/actor/d_a_obj_kago.cpp index c8a68de52f..7335c4ac35 100644 --- a/src/d/actor/d_a_obj_kago.cpp +++ b/src/d/actor/d_a_obj_kago.cpp @@ -15,7 +15,7 @@ #include "f_op/f_op_actor_mng.h" #include -daObj_Kago_HIOParam const daObj_Kago_Param_c::m = { +DUSK_GAME_DATA daObj_Kago_HIOParam const daObj_Kago_Param_c::m = { 0.0f, -5.0f, 1.0f, diff --git a/src/d/actor/d_a_obj_kazeneko.cpp b/src/d/actor/d_a_obj_kazeneko.cpp index 3b1e8766ec..cee30e6d4f 100644 --- a/src/d/actor/d_a_obj_kazeneko.cpp +++ b/src/d/actor/d_a_obj_kazeneko.cpp @@ -12,7 +12,7 @@ #include "d/d_com_inf_game.h" #include "f_op/f_op_actor_mng.h" -KazoNekoAttr const daObjKazeNeko_c::M_attr = { +DUSK_GAME_DATA KazoNekoAttr const daObjKazeNeko_c::M_attr = { 30.0f, 120.0f, 3000.0f, 7000.0f, 90.0f, 1800.0f, 180.0f, 27.0f, 15.0f, 1, 0x70, 0x6400, 0x190000, diff --git a/src/d/actor/d_a_obj_kbacket.cpp b/src/d/actor/d_a_obj_kbacket.cpp index 65c60b74d3..371f03fbd4 100644 --- a/src/d/actor/d_a_obj_kbacket.cpp +++ b/src/d/actor/d_a_obj_kbacket.cpp @@ -17,7 +17,7 @@ static s32 l_bmdData[4] = { 8, 0, 9, 0 }; static DUSK_CONST char* l_resNameList[1] = {"Kakashi"}; -const daObj_KBacket_HIOParam daObj_KBacket_Param_c::m = { +DUSK_GAME_DATA const daObj_KBacket_HIOParam daObj_KBacket_Param_c::m = { 0.0f, -5.0f, 1.0f, 400.0f, 73.0f, 30.0f, 30.0f, 30.0f, 37.0f, 45.0f, 0.0f }; diff --git a/src/d/actor/d_a_obj_ktOnFire.cpp b/src/d/actor/d_a_obj_ktOnFire.cpp index e8c27304e7..000a185e64 100644 --- a/src/d/actor/d_a_obj_ktOnFire.cpp +++ b/src/d/actor/d_a_obj_ktOnFire.cpp @@ -25,14 +25,14 @@ static DUSK_CONSTEXPR cull_box l_cull_box = { {50.0f, 100.0f, 50.0f}, }; -const dCcD_SrcGObjInf daKtOnFire_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daKtOnFire_c::mCcDObjInfo = { {0x0, {{0x200, 0x0, 0x13}, {0xD8FBFFFF, 0x11}, 0x0}}, // mObj {dCcD_SE_SWORD, 0x0, 0x0, 0x0, 0x0}, // mGObjAt {dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg {0x0}, // mGObjCo }; -dCcD_SrcCyl daKtOnFire_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daKtOnFire_c::mCcDCyl = { mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_kwheel00.cpp b/src/d/actor/d_a_obj_kwheel00.cpp index b543bbb0cf..bc39975ebc 100644 --- a/src/d/actor/d_a_obj_kwheel00.cpp +++ b/src/d/actor/d_a_obj_kwheel00.cpp @@ -127,7 +127,7 @@ static dCcD_SrcSph l_sphSrc = { } // mSphAttr }; -u16 l_se_angle[4] = {0, 0x3FFF, 0x7FFF, 0xBFFF}; // {0°, 90°, 180°, 270°} +DUSK_GAME_DATA u16 l_se_angle[4] = {0, 0x3FFF, 0x7FFF, 0xBFFF}; // {0°, 90°, 180°, 270°} int daObjKWheel00_c::Create() { mpModel->setBaseTRMtx(mTransformMtx); diff --git a/src/d/actor/d_a_obj_kznkarm.cpp b/src/d/actor/d_a_obj_kznkarm.cpp index 9499b05226..fd026b14d1 100644 --- a/src/d/actor/d_a_obj_kznkarm.cpp +++ b/src/d/actor/d_a_obj_kznkarm.cpp @@ -73,7 +73,7 @@ void daObjKznkarm_Hio_c::genMessage(JORMContext* ctx) { #endif - daObjKznkarm_Attr_c const daObjKznkarm_c::M_attr = { + DUSK_GAME_DATA daObjKznkarm_Attr_c const daObjKznkarm_c::M_attr = { -5.0f, -30.0f, 0.6f, 0.94f, 40.0f, 40.0f, -60.0f, -6.0f, -6.0f, -60.0f, 0.0f, @@ -82,7 +82,7 @@ void daObjKznkarm_Hio_c::genMessage(JORMContext* ctx) { static DUSK_CONSTEXPR char DUSK_CONST* l_arcName = "J_Kazami"; -daObjKznkarm_c::actionFunc daObjKznkarm_c::ActionTable[4][2] = { +DUSK_GAME_DATA daObjKznkarm_c::actionFunc daObjKznkarm_c::ActionTable[4][2] = { &daObjKznkarm_c::initBroken, &daObjKznkarm_c::executeBroken, &daObjKznkarm_c::initCarry, diff --git a/src/d/actor/d_a_obj_ladder.cpp b/src/d/actor/d_a_obj_ladder.cpp index 8d95a53558..1bd7e54786 100644 --- a/src/d/actor/d_a_obj_ladder.cpp +++ b/src/d/actor/d_a_obj_ladder.cpp @@ -171,7 +171,7 @@ Hio_c L_hio; } -char const Act_c::M_arcname[5] = "Mhsg"; +DUSK_GAME_DATA char const Act_c::M_arcname[5] = "Mhsg"; int Act_c::CreateHeap() { J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(M_arcname, attr_type(mType).field_0x0); @@ -344,7 +344,7 @@ void Act_c::mode_fell_init() { void Act_c::mode_fell() { } -Mtx Act_c::M_tmp_mtx; +DUSK_GAME_DATA Mtx Act_c::M_tmp_mtx; void Act_c::set_mtx() { mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); diff --git a/src/d/actor/d_a_obj_laundry.cpp b/src/d/actor/d_a_obj_laundry.cpp index 85fc350e8e..355ca08ddd 100644 --- a/src/d/actor/d_a_obj_laundry.cpp +++ b/src/d/actor/d_a_obj_laundry.cpp @@ -11,7 +11,7 @@ #include "d/d_com_inf_game.h" #include "d/d_kankyo_wether.h" -daObjLdy_Attr_c const daObjLdy_c::mAttr = {5.0f, 30.0f, 130.0f, -50.0f, 0.15f, 0.45f, 0.3f, 1000.0f, +DUSK_GAME_DATA daObjLdy_Attr_c const daObjLdy_c::mAttr = {5.0f, 30.0f, 130.0f, -50.0f, 0.15f, 0.45f, 0.3f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 10, 0}; void daObjLdy_c::create_init() { diff --git a/src/d/actor/d_a_obj_laundry_rope.cpp b/src/d/actor/d_a_obj_laundry_rope.cpp index fd45526bae..5da01533e4 100644 --- a/src/d/actor/d_a_obj_laundry_rope.cpp +++ b/src/d/actor/d_a_obj_laundry_rope.cpp @@ -13,7 +13,7 @@ #include "d/d_kankyo_wether.h" #include "d/d_path.h" -daObjLndRope_Attr_c const daObjLndRope_c::mAttr = {-5.0f, 0.2f, 0.5f, 0.8f, 0.0f}; +DUSK_GAME_DATA daObjLndRope_Attr_c const daObjLndRope_c::mAttr = {-5.0f, 0.2f, 0.5f, 0.8f, 0.0f}; static const s8 l_laundryList[13] = {-1, -1, 3, 0, -1, 1, 1, -1, 2, 2, -1, 2, -1}; diff --git a/src/d/actor/d_a_obj_lv1Candle00.cpp b/src/d/actor/d_a_obj_lv1Candle00.cpp index aaa3a8ccc4..64a8f7c904 100644 --- a/src/d/actor/d_a_obj_lv1Candle00.cpp +++ b/src/d/actor/d_a_obj_lv1Candle00.cpp @@ -10,7 +10,7 @@ static daLv1Cdl00_HIO_c l_HIO; -dCcD_SrcGObjInf const daLv1Cdl00_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daLv1Cdl00_c::mCcDObjInfo = { { 0, { {0x200, 0, 0x13}, @@ -23,7 +23,7 @@ dCcD_SrcGObjInf const daLv1Cdl00_c::mCcDObjInfo = { {0}, }; -dCcD_SrcCyl daLv1Cdl00_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv1Cdl00_c::mCcDCyl = { daLv1Cdl00_c::mCcDObjInfo, { { {0.0f, 0.0f, 0.0f}, 0, 0} diff --git a/src/d/actor/d_a_obj_lv1Candle01.cpp b/src/d/actor/d_a_obj_lv1Candle01.cpp index 0d6fdaa337..a910141bb1 100644 --- a/src/d/actor/d_a_obj_lv1Candle01.cpp +++ b/src/d/actor/d_a_obj_lv1Candle01.cpp @@ -10,7 +10,7 @@ static daLv1Cdl01_HIO_c l_HIO; -dCcD_SrcGObjInf const daLv1Cdl01_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daLv1Cdl01_c::mCcDObjInfo = { { 0, { {0, 0, 0}, @@ -23,7 +23,7 @@ dCcD_SrcGObjInf const daLv1Cdl01_c::mCcDObjInfo = { {0}, }; -dCcD_SrcCyl daLv1Cdl01_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv1Cdl01_c::mCcDCyl = { daLv1Cdl01_c::mCcDObjInfo, { { {0.0f, 0.0f, 0.0f}, 0, 0} diff --git a/src/d/actor/d_a_obj_lv2Candle.cpp b/src/d/actor/d_a_obj_lv2Candle.cpp index 0abdc763b2..7b3a511d3b 100644 --- a/src/d/actor/d_a_obj_lv2Candle.cpp +++ b/src/d/actor/d_a_obj_lv2Candle.cpp @@ -35,7 +35,7 @@ daLv2Candle_HIO_c::daLv2Candle_HIO_c() { mColor2B = 0x42; } -dCcD_SrcGObjInf const daLv2Candle_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daLv2Candle_c::mCcDObjInfo = { { 0, { {0x200, 0, 0x13}, @@ -48,7 +48,7 @@ dCcD_SrcGObjInf const daLv2Candle_c::mCcDObjInfo = { {0}, }; -dCcD_SrcCyl daLv2Candle_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv2Candle_c::mCcDCyl = { daLv2Candle_c::mCcDObjInfo, { { {0.0f, 0.0f, 0.0f}, 0, 0} diff --git a/src/d/actor/d_a_obj_lv3Candle.cpp b/src/d/actor/d_a_obj_lv3Candle.cpp index 58e8cb3185..6f12a81bd3 100644 --- a/src/d/actor/d_a_obj_lv3Candle.cpp +++ b/src/d/actor/d_a_obj_lv3Candle.cpp @@ -34,14 +34,14 @@ void daLv3Candle_HIO_c::genMessage(JORMContext* mctx) { } #endif -dCcD_SrcGObjInf const daLv3Candle_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daLv3Candle_c::mCcDObjInfo = { {0, {{0x200, 0, 0x13}, {0xd8fbfdff, 0x1f}, {0x79}}}, {1, 0, 0, 0, 0}, {0xa, 0, 0, 0, 6}, {0}, }; -dCcD_SrcSph daLv3Candle_c::mCcDSph = {daLv3Candle_c::mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 0.0f}}}; +DUSK_GAME_DATA dCcD_SrcSph daLv3Candle_c::mCcDSph = {daLv3Candle_c::mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 0.0f}}}; static DUSK_CONSTEXPR char DUSK_CONST* l_resNameIdx[] = {"L3candl", "L3candl2"}; diff --git a/src/d/actor/d_a_obj_lv5FloorBoard.cpp b/src/d/actor/d_a_obj_lv5FloorBoard.cpp index db7416dc5a..4dbd3cfe5c 100644 --- a/src/d/actor/d_a_obj_lv5FloorBoard.cpp +++ b/src/d/actor/d_a_obj_lv5FloorBoard.cpp @@ -76,14 +76,14 @@ int daFlorBoad_c::Execute(Mtx** param_0) { static daFlorBoad_HIO_c l_HIO; -const dCcD_SrcGObjInf daFlorBoad_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daFlorBoad_c::mCcDObjInfo = { {0, {{0, 1, 0}, {0x400020, 0x11}, {0}}}, {dCcD_SE_SWORD, 0, 0, 2, 1}, {dCcD_SE_STONE, 0, 0, 0, 6}, {0}, }; -dCcD_SrcCyl daFlorBoad_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daFlorBoad_c::mCcDCyl = { daFlorBoad_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_lv5IceWall.cpp b/src/d/actor/d_a_obj_lv5IceWall.cpp index d1d2eb29a0..f514f80a98 100644 --- a/src/d/actor/d_a_obj_lv5IceWall.cpp +++ b/src/d/actor/d_a_obj_lv5IceWall.cpp @@ -50,14 +50,14 @@ int daIceWall_c::CreateHeap() { static daIceWall_HIO_c l_HIO; -const dCcD_SrcGObjInf daIceWall_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daIceWall_c::mCcDObjInfo = { {0, {{0x100, 1, 0}, {0x400000, 0x11}, {0}}}, {dCcD_SE_SWORD, 0, 0, 2, 1}, {dCcD_SE_STONE, 0, 0, 0, 0x2006}, {0}, }; -dCcD_SrcCyl daIceWall_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daIceWall_c::mCcDCyl = { daIceWall_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_lv5SwIce.cpp b/src/d/actor/d_a_obj_lv5SwIce.cpp index 62171dc2bb..8c474aa125 100644 --- a/src/d/actor/d_a_obj_lv5SwIce.cpp +++ b/src/d/actor/d_a_obj_lv5SwIce.cpp @@ -70,14 +70,14 @@ int daLv5SwIce_c::Execute(Mtx** param_0) { static daLv5SwIce_HIO_c l_HIO; -const dCcD_SrcGObjInf daLv5SwIce_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daLv5SwIce_c::mCcDObjInfo = { {0, {{0x100, 1, 0}, {0x400000, 0x11}, {0}}}, {dCcD_SE_SWORD, 0, 0, 2, 1}, {dCcD_SE_STONE, 0, 0, 0, 0x6}, {0}, }; -dCcD_SrcCyl daLv5SwIce_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv5SwIce_c::mCcDCyl = { daLv5SwIce_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_lv6ChangeGate.cpp b/src/d/actor/d_a_obj_lv6ChangeGate.cpp index 59638a4d45..3a3ae79af5 100644 --- a/src/d/actor/d_a_obj_lv6ChangeGate.cpp +++ b/src/d/actor/d_a_obj_lv6ChangeGate.cpp @@ -28,14 +28,14 @@ daLv6ChangeGate_HIO_c::daLv6ChangeGate_HIO_c() { static daLv6ChangeGate_HIO_c l_HIO; -const dCcD_SrcGObjInf daLv6ChangeGate_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daLv6ChangeGate_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0x400, 0x11}, {0x79}}}, {dCcD_SE_SWORD, 0, 0, 0, 0}, {dCcD_SE_STONE, 0, 0, 0, 0}, {0}, }; -dCcD_SrcCyl daLv6ChangeGate_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv6ChangeGate_c::mCcDCyl = { mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f} diff --git a/src/d/actor/d_a_obj_lv6FurikoTrap.cpp b/src/d/actor/d_a_obj_lv6FurikoTrap.cpp index 0aab579c51..bd31d398c6 100644 --- a/src/d/actor/d_a_obj_lv6FurikoTrap.cpp +++ b/src/d/actor/d_a_obj_lv6FurikoTrap.cpp @@ -24,13 +24,13 @@ void daLv6FurikoTrap_HIO_c::genMessage(JORMContext* context) { static daLv6FurikoTrap_HIO_c l_HIO; -const dCcD_SrcGObjInf daLv6FurikoTrap_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daLv6FurikoTrap_c::mCcDObjInfo = { {0, {{0x800, 1, 0x1f}, {0, 0}, {0x79}}}, {1, 0, 1, 0, 1}, {0xa, 5, 0, 0, 0}, {0}, }; -dCcD_SrcSph daLv6FurikoTrap_c::mCcDSph = {mCcDObjInfo}; +DUSK_GAME_DATA dCcD_SrcSph daLv6FurikoTrap_c::mCcDSph = {mCcDObjInfo}; void daLv6FurikoTrap_c::setBaseMtx() { mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); diff --git a/src/d/actor/d_a_obj_lv6SwGate.cpp b/src/d/actor/d_a_obj_lv6SwGate.cpp index 14e0bc4bb6..cdcc97efde 100644 --- a/src/d/actor/d_a_obj_lv6SwGate.cpp +++ b/src/d/actor/d_a_obj_lv6SwGate.cpp @@ -31,11 +31,11 @@ void daLv6SwGate_HIO_c::genMessage(JORMContext* context) static daLv6SwGate_HIO_c l_HIO; -const dCcD_SrcGObjInf daLv6SwGate_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daLv6SwGate_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0x400, 0x11}, {0x79}}}, {1, 0, 0, 0, 0}, {0xA, 0, 0, 0, 0}, {0} }; -dCcD_SrcCyl daLv6SwGate_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv6SwGate_c::mCcDCyl = { mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_lv6TogeRoll.cpp b/src/d/actor/d_a_obj_lv6TogeRoll.cpp index f4e4816f8d..694b3242cd 100644 --- a/src/d/actor/d_a_obj_lv6TogeRoll.cpp +++ b/src/d/actor/d_a_obj_lv6TogeRoll.cpp @@ -10,14 +10,14 @@ static daTogeRoll_HIO_c l_HIO; -dCcD_SrcSph daTogeRoll_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daTogeRoll_c::mCcDSph = { daTogeRoll_c::mCcDObjInfo, // mObjInf { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph } // mSphAttr }; -dCcD_SrcCps daTogeRoll_c::mCcDCps = { +DUSK_GAME_DATA dCcD_SrcCps daTogeRoll_c::mCcDCps = { daTogeRoll_c::mCcDObjInfo2, // mObjInf { {{0.0f, 0.0f, 0.0f}, {0.0f, 1100.0f, 0.0f}, 150.0f}, // mCps @@ -50,21 +50,21 @@ int daTogeRoll_c::CreateHeap() { return 1; } -dCcD_SrcGObjInf const daTogeRoll_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daTogeRoll_c::mCcDObjInfo = { {0, {{0x800, 0x1, 0x1f}, {0xdafbfdff, 0x1f}, {0x79}}}, {1, 0, 1, 0, 1}, {0xa, 5, 0, 0, 0}, {0}, }; -dCcD_SrcGObjInf const daTogeRoll_c::mCcDObjInfo2 = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daTogeRoll_c::mCcDObjInfo2 = { {0, {{0, 0, 0}, {0xdafbfdff, 0x1f}, {0}}}, {1, 0, 0, 0, 0}, {0xa, 1, 0, 0, 2}, {0}, }; -f32 const daTogeRoll_c::mSpeed[] = { +DUSK_GAME_DATA f32 const daTogeRoll_c::mSpeed[] = { 10.0f, 16.6666666f, 23.3333333f, 25.0f, 26.6666666f, 28.3333333f, 30.0f, 31.6666666f, 33.3333333f, 40.0f, 46.6666666f, 53.3333333f, 60.0f, 66.6666666f, 83.3333333f, 3.3333333f, diff --git a/src/d/actor/d_a_obj_lv6TogeTrap.cpp b/src/d/actor/d_a_obj_lv6TogeTrap.cpp index b5244139f2..16399a899b 100644 --- a/src/d/actor/d_a_obj_lv6TogeTrap.cpp +++ b/src/d/actor/d_a_obj_lv6TogeTrap.cpp @@ -51,28 +51,28 @@ daLv6TogeTrap_HIO_c::daLv6TogeTrap_HIO_c() { static daLv6TogeTrap_HIO_c l_HIO; -const dCcD_SrcGObjInf daLv6TogeTrap_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daLv6TogeTrap_c::mCcDObjInfo = { {0, {{0x800, 0x1, 0x1F}, {0xD8FBFDFF, 0x11}, {0x79}}}, {dCcD_SE_SWORD, 0, 1, 0, 1}, {dCcD_SE_STONE, 5, 0, 0, 0}, {0}, }; -const dCcD_SrcGObjInf daLv6TogeTrap_c::mCcDObjInfo2 = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daLv6TogeTrap_c::mCcDObjInfo2 = { {0, {{0x0, 0x0, 0}, {0xDAFBFDFF, 0x11}, {0x0}}}, {dCcD_SE_SWORD, 0, 0, 0, 0}, {dCcD_SE_STONE, 1, 0, 0, 2}, {0}, }; -dCcD_SrcSph daLv6TogeTrap_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daLv6TogeTrap_c::mCcDSph = { daLv6TogeTrap_c::mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph } // mSphAttr }; -dCcD_SrcCyl daLv6TogeTrap_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daLv6TogeTrap_c::mCcDCyl = { daLv6TogeTrap_c::mCcDObjInfo2, { { @@ -89,7 +89,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNameIdx[3] = { "L9Toge", }; -const f32 daLv6TogeTrap_c::mSpeed[16] = { +DUSK_GAME_DATA const f32 daLv6TogeTrap_c::mSpeed[16] = { 10.0f, 16.666666f, 23.333334f, diff --git a/src/d/actor/d_a_obj_lv8Lift.cpp b/src/d/actor/d_a_obj_lv8Lift.cpp index a598830e74..9ac8206f6b 100644 --- a/src/d/actor/d_a_obj_lv8Lift.cpp +++ b/src/d/actor/d_a_obj_lv8Lift.cpp @@ -37,7 +37,7 @@ void daL8Lift_c::setBaseMtx() { mpModel->setBaseTRMtx(mDoMtx_stack_c::now); } -f32 const daL8Lift_c::mSpeed[16] = { +DUSK_GAME_DATA f32 const daL8Lift_c::mSpeed[16] = { 5.0f, 6.6666665f, 8.333333f, 10.0f, 11.666667f, 13.333333f, 15.0f, 16.666666f, 18.333334f, 20.0f, 21.666666, 23.333334, 25.0f, 26.666666f, 28.333334f, 3.3333333f diff --git a/src/d/actor/d_a_obj_lv8OptiLift.cpp b/src/d/actor/d_a_obj_lv8OptiLift.cpp index 50b84ac981..e367b89b36 100644 --- a/src/d/actor/d_a_obj_lv8OptiLift.cpp +++ b/src/d/actor/d_a_obj_lv8OptiLift.cpp @@ -38,7 +38,7 @@ void daOptiLift_c::setBaseMtx() { mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); } -const f32 daOptiLift_c::mSpeed[] = { +DUSK_GAME_DATA const f32 daOptiLift_c::mSpeed[] = { 5.0f, 6.6666665f, 8.333333f, 10.0f, 11.666667f, 13.333333f, 15.0f, 16.666666f, 18.333334f, 20.0f, 21.666666f, 23.333334f, 25.0f, 26.666666f, 28.333334f, 3.3333333f, }; diff --git a/src/d/actor/d_a_obj_magLift.cpp b/src/d/actor/d_a_obj_magLift.cpp index f9ddc34be0..0ff6961815 100644 --- a/src/d/actor/d_a_obj_magLift.cpp +++ b/src/d/actor/d_a_obj_magLift.cpp @@ -37,7 +37,7 @@ int daMagLift_c::CreateHeap() { return 1; } -const f32 daMagLift_c::mSpeed[16] = { +DUSK_GAME_DATA const f32 daMagLift_c::mSpeed[16] = { 5.0f, 6.6666665f, 8.333333f, 10.0f, 11.666667f, 13.333333f, 15.0f, 16.666666f, 18.333334f, 20.0f, 21.666666f, 23.333334f, 25.0f, 26.666666f, 28.333334f, 3.3333333f, }; diff --git a/src/d/actor/d_a_obj_maki.cpp b/src/d/actor/d_a_obj_maki.cpp index 7d4ac8e32a..c5a8530405 100644 --- a/src/d/actor/d_a_obj_maki.cpp +++ b/src/d/actor/d_a_obj_maki.cpp @@ -132,7 +132,7 @@ int daObj_Maki_IsDelete(obj_maki_class* i_this) { return true; } -u8 lbl_567_bss_8; +DUSK_GAME_DATA u8 lbl_567_bss_8; int daObj_Maki_Delete(obj_maki_class* i_this) { dComIfG_resDelete(&i_this->mPhase, "Obj_maki"); @@ -237,7 +237,7 @@ cPhs_Step daObj_Maki_Create(fopAc_ac_c* i_this) { return phase; } -actor_method_class l_daObj_Maki_Method = { +DUSK_GAME_DATA actor_method_class l_daObj_Maki_Method = { (process_method_func)daObj_Maki_Create, (process_method_func)daObj_Maki_Delete, (process_method_func)daObj_Maki_Execute, (process_method_func)daObj_Maki_IsDelete, (process_method_func)daObj_Maki_Draw, diff --git a/src/d/actor/d_a_obj_master_sword.cpp b/src/d/actor/d_a_obj_master_sword.cpp index e0b741fe18..820f603363 100644 --- a/src/d/actor/d_a_obj_master_sword.cpp +++ b/src/d/actor/d_a_obj_master_sword.cpp @@ -10,7 +10,7 @@ #include "d/d_com_inf_game.h" #include "d/d_meter2_info.h" -daObjMasterSword_Attr_c const daObjMasterSword_c::mAttr = {1.0f}; +DUSK_GAME_DATA daObjMasterSword_Attr_c const daObjMasterSword_c::mAttr = {1.0f}; void daObjMasterSword_c::initBaseMtx() { fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); @@ -80,7 +80,7 @@ static int daObjMasterSword_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } -actionFunc daObjMasterSword_c::ActionTable[] = { +DUSK_GAME_DATA actionFunc daObjMasterSword_c::ActionTable[] = { &daObjMasterSword_c::initWait, &daObjMasterSword_c::executeWait, }; diff --git a/src/d/actor/d_a_obj_mhole.cpp b/src/d/actor/d_a_obj_mhole.cpp index 0667afd39e..239e935301 100644 --- a/src/d/actor/d_a_obj_mhole.cpp +++ b/src/d/actor/d_a_obj_mhole.cpp @@ -25,7 +25,7 @@ static f32 const l_size[2] = {150.0f, 370.0f}; static char const* l_arcName[2] = {"ef_MgnF_L", "ef_MgnF_S"}; -dCcD_SrcCps l_cps_src = { +DUSK_GAME_DATA dCcD_SrcCps l_cps_src = { { {0x0, {{AT_TYPE_40000, 0x0, 0x1d}, {0x0, 0x0}, 0x0}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x6}, // mGObjAt diff --git a/src/d/actor/d_a_obj_mie.cpp b/src/d/actor/d_a_obj_mie.cpp index d6790c3637..ab96679de6 100644 --- a/src/d/actor/d_a_obj_mie.cpp +++ b/src/d/actor/d_a_obj_mie.cpp @@ -23,7 +23,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNameList[2] = { "pouyaA", }; -daObj_Mie_HIOParam const daObj_Mie_Param_c::m = { +DUSK_GAME_DATA daObj_Mie_HIOParam const daObj_Mie_Param_c::m = { 0.0f, -4.0f, 1.0f, 100.0f, 255.0f, 20.0f, 10.0f, 14.0f, 37.0f, 50.0f, 18.0f, }; diff --git a/src/d/actor/d_a_obj_mirror_6pole.cpp b/src/d/actor/d_a_obj_mirror_6pole.cpp index 5887fffc22..41b755850f 100644 --- a/src/d/actor/d_a_obj_mirror_6pole.cpp +++ b/src/d/actor/d_a_obj_mirror_6pole.cpp @@ -11,7 +11,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_arcName = "MR-6Pole"; -const actionFunc daObjMirror6Pole_c::ActionTable[][2] = { +DUSK_GAME_DATA const actionFunc daObjMirror6Pole_c::ActionTable[][2] = { {&daObjMirror6Pole_c::initWait, &daObjMirror6Pole_c::executeWait}, {&daObjMirror6Pole_c::initDemo, &daObjMirror6Pole_c::executeDemo}, }; diff --git a/src/d/actor/d_a_obj_mirror_screw.cpp b/src/d/actor/d_a_obj_mirror_screw.cpp index a9948e8b75..ec5b698bd5 100644 --- a/src/d/actor/d_a_obj_mirror_screw.cpp +++ b/src/d/actor/d_a_obj_mirror_screw.cpp @@ -11,7 +11,7 @@ static char const* l_arcName = "MR-Screw"; -daObjMirrorScrew_c::attr const daObjMirrorScrew_c::M_attr = { +DUSK_GAME_DATA daObjMirrorScrew_c::attr const daObjMirrorScrew_c::M_attr = { -2710.0f, // mDownDist 0.6f, // mRotSpeedThreshold 45, // mSpinCount @@ -20,7 +20,7 @@ daObjMirrorScrew_c::attr const daObjMirrorScrew_c::M_attr = { -3.375f, // mDownSpeed }; -daObjMirrorScrew_actionFunc daObjMirrorScrew_c::ActionTable[2][2] = { +DUSK_GAME_DATA daObjMirrorScrew_actionFunc daObjMirrorScrew_c::ActionTable[2][2] = { { &daObjMirrorScrew_c::initWait, &daObjMirrorScrew_c::executeWait, diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index 7e685080c9..729ac8c702 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -99,12 +99,12 @@ void daObjMovebox::Hio_c::genMessage(JORMContext* context) { #endif -const daObjMovebox::BgcSrc_c daObjMovebox::Bgc_c::M_lin5[] = { +DUSK_GAME_DATA const daObjMovebox::BgcSrc_c daObjMovebox::Bgc_c::M_lin5[] = { {0.0f, 0.0f, 0.0f, 0.0f}, {-0.5f, -0.5f, 1.0f, 1.0f}, {0.5f, -0.5f, -1.0f, 1.0f}, {0.5f, 0.5f, -1.0f, -1.0f}, {-0.5f, 0.5f, 1.0f, -1.0f}, }; -const daObjMovebox::BgcSrc_c daObjMovebox::Bgc_c::M_lin20[] = { +DUSK_GAME_DATA const daObjMovebox::BgcSrc_c daObjMovebox::Bgc_c::M_lin20[] = { {0.0f, 0.0f, 0.0f, 0.0f}, {-0.25f, -0.25f, 0.0f, 0.0f}, {-0.5f, -0.5f, 1.0f, 1.0f}, {0.0f, -0.5f, -1.0f, 1.0f}, {0.0f, 0.0f, -1.0f, -1.0f}, {-0.5f, 0.0f, 1.0f, -1.0f}, {0.25f, -0.25f, 0.0f, 0.0f}, {0.0f, -0.5f, 1.0f, 1.0f}, {0.5f, -0.5f, -1.0f, 1.0f}, @@ -128,7 +128,7 @@ daObjMovebox::Bgc_c::Bgc_c() { mState = STATE_0_e; } -dBgS_ObjGndChk daObjMovebox::Bgc_c::M_gnd_work[23]; +DUSK_GAME_DATA dBgS_ObjGndChk daObjMovebox::Bgc_c::M_gnd_work[23]; void daObjMovebox::Bgc_c::gnd_pos(const daObjMovebox::Act_c* i_actor, const daObjMovebox::BgcSrc_c* i_bgcSrc, int i_checkNum, @@ -165,7 +165,7 @@ void daObjMovebox::Bgc_c::gnd_pos(const daObjMovebox::Act_c* i_actor, } } -dBgS_WtrChk daObjMovebox::Bgc_c::M_wrt_work; +DUSK_GAME_DATA dBgS_WtrChk daObjMovebox::Bgc_c::M_wrt_work; void daObjMovebox::Bgc_c::wrt_pos(cXyz const& param_0) { @@ -186,7 +186,7 @@ void daObjMovebox::Bgc_c::wrt_pos(cXyz const& param_0) { } } -dBgS_ObjLinChk daObjMovebox::Bgc_c::M_wall_work[23]; +DUSK_GAME_DATA dBgS_ObjLinChk daObjMovebox::Bgc_c::M_wall_work[23]; void daObjMovebox::Bgc_c::wall_pos(daObjMovebox::Act_c const* i_actor, @@ -409,11 +409,11 @@ void daObjMovebox::Act_c::prmX_init() { shape_angle.x = 0; } -const char* const daObjMovebox::Act_c::M_arcname[8] = { +DUSK_GAME_DATA const char* const daObjMovebox::Act_c::M_arcname[8] = { "Kkiba_00", "Osiblk", "H_Box20", "A_SMBlock", "P_Lv4blk", "P_Lv4blk2", "H_OsiHaka", "dummy4", }; -const dCcD_SrcCyl daObjMovebox::Act_c::M_cyl_src = { +DUSK_GAME_DATA const dCcD_SrcCyl daObjMovebox::Act_c::M_cyl_src = { { 0, {{0, 0, 0}, {0xD8FAFDBF, 0x11}, {0x78}}, // mObj @@ -430,7 +430,7 @@ const dCcD_SrcCyl daObjMovebox::Act_c::M_cyl_src = { } }; -const daObjMovebox::Attr_c daObjMovebox::Act_c::M_attr[8] = { +DUSK_GAME_DATA const daObjMovebox::Attr_c daObjMovebox::Act_c::M_attr[8] = { { // Timing 6, 14, 10, 6, 14, 10, diff --git a/src/d/actor/d_a_obj_nagaisu.cpp b/src/d/actor/d_a_obj_nagaisu.cpp index 6341843ae4..7465f7c928 100644 --- a/src/d/actor/d_a_obj_nagaisu.cpp +++ b/src/d/actor/d_a_obj_nagaisu.cpp @@ -40,7 +40,7 @@ int daObjNagaisu_c::createHeap() { return 1; } -const int daObjNagaisu_c::REMOVE_ISU_IDX[] = { +DUSK_GAME_DATA const int daObjNagaisu_c::REMOVE_ISU_IDX[] = { 6, 7, 11, @@ -50,7 +50,7 @@ const int daObjNagaisu_c::REMOVE_ISU_IDX[] = { 29, }; -const dCcD_SrcCyl daObjIsuChild_c::s_CcDCyl = { +DUSK_GAME_DATA const dCcD_SrcCyl daObjIsuChild_c::s_CcDCyl = { { {0, {{0, 0, 0}, {0x400020, 0x11}, 0}}, {dCcD_SE_NONE, 0, 0, 0, 0}, diff --git a/src/d/actor/d_a_obj_nameplate.cpp b/src/d/actor/d_a_obj_nameplate.cpp index 56bb13f9ec..50ee106c38 100644 --- a/src/d/actor/d_a_obj_nameplate.cpp +++ b/src/d/actor/d_a_obj_nameplate.cpp @@ -13,7 +13,7 @@ #include "SSystem/SComponent/c_math.h" // clang-format off -daObjNameplate_c::M_attrs const daObjNameplate_c::M_attr = { +DUSK_GAME_DATA daObjNameplate_c::M_attrs const daObjNameplate_c::M_attr = { 50.0f, 2500.0f, 400.0f, @@ -228,7 +228,7 @@ void daObjNameplate_c::messageProc() { } } -char DUSK_CONST* DUSK_CONST daObjNameplate_c::l_arcName = "J_Hyosatu"; +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daObjNameplate_c::l_arcName = "J_Hyosatu"; int daObjNameplate_c::createHeap() { J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "J_Hyousatu.bmd"); diff --git a/src/d/actor/d_a_obj_nougu.cpp b/src/d/actor/d_a_obj_nougu.cpp index 2a81bb3033..e7aeaeb17f 100644 --- a/src/d/actor/d_a_obj_nougu.cpp +++ b/src/d/actor/d_a_obj_nougu.cpp @@ -9,7 +9,7 @@ #include "d/actor/d_a_npc.h" #include "SSystem/SComponent/c_counter.h" -dCcD_SrcSph daObj_Nougu_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daObj_Nougu_c::mCcDSph = { daNpcT_c::mCcDObjData, { {{0.0f, 0.0f, 0.0f}, 0.0f} @@ -18,7 +18,7 @@ dCcD_SrcSph daObj_Nougu_c::mCcDSph = { static DUSK_CONSTEXPR char DUSK_CONST* l_resName = "Jagar4"; -const daObj_Nougu_HIOParam daObj_Nougu_Param_c::m = { +DUSK_GAME_DATA const daObj_Nougu_HIOParam daObj_Nougu_Param_c::m = { 0.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_obj_oiltubo.cpp b/src/d/actor/d_a_obj_oiltubo.cpp index 553eed640c..31573e59b1 100644 --- a/src/d/actor/d_a_obj_oiltubo.cpp +++ b/src/d/actor/d_a_obj_oiltubo.cpp @@ -15,7 +15,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_bbmdFileName = "x_oiltubo_00b.bmd"; static DUSK_CONSTEXPR char DUSK_CONST* l_bbtkFileName = "x_oiltubo_00b.btk"; -dCcD_SrcCyl DUSK_CONST daObj_Oiltubo_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl DUSK_CONST daObj_Oiltubo_c::mCcDCyl = { daObj_Oiltubo_c::mCcDObjInfo, { { @@ -41,7 +41,7 @@ int daObj_Oiltubo_c::create() { return phase_state; } -const dCcD_SrcGObjInf daObj_Oiltubo_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daObj_Oiltubo_c::mCcDObjInfo = { {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x1F}, 0x79}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt {dCcD_SE_NONE, 0x2, 0x0, 0x0, 0x1}, // mGObjTg diff --git a/src/d/actor/d_a_obj_onsenTaru.cpp b/src/d/actor/d_a_obj_onsenTaru.cpp index 62890f85b8..28175f54a0 100644 --- a/src/d/actor/d_a_obj_onsenTaru.cpp +++ b/src/d/actor/d_a_obj_onsenTaru.cpp @@ -20,14 +20,14 @@ daOnsTaru_HIO_c::daOnsTaru_HIO_c() { static daOnsTaru_HIO_c l_HIO; -const dCcD_SrcGObjInf daOnsTaru_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daOnsTaru_c::mCcDObjInfo = { {0, {{8, 0, 0x1F}, {0xD8FADDAF, 0x1F}, {0x79}}}, {dCcD_SE_NONE, 0, 1, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 2}, {0}, }; -dCcD_SrcCyl daOnsTaru_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daOnsTaru_c::mCcDCyl = { daOnsTaru_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_ornament_cloth.cpp b/src/d/actor/d_a_obj_ornament_cloth.cpp index f5931ebd43..f1181b2d0a 100644 --- a/src/d/actor/d_a_obj_ornament_cloth.cpp +++ b/src/d/actor/d_a_obj_ornament_cloth.cpp @@ -58,7 +58,7 @@ public: }; #endif -daObjOnCloth_Attr_c const daObjOnCloth_c::M_attr = { +DUSK_GAME_DATA daObjOnCloth_Attr_c const daObjOnCloth_c::M_attr = { 8.0f, -40.0f, 0.3f, diff --git a/src/d/actor/d_a_obj_picture.cpp b/src/d/actor/d_a_obj_picture.cpp index 3cf8765962..67b89627d2 100644 --- a/src/d/actor/d_a_obj_picture.cpp +++ b/src/d/actor/d_a_obj_picture.cpp @@ -517,7 +517,7 @@ static int daObjPicture_draw(daObjPicture_c* i_this) { #if DEBUG const #endif -dCcD_SrcCps daObjPicture_c::s_CcDCps = { +DUSK_GAME_DATA dCcD_SrcCps daObjPicture_c::s_CcDCps = { { {0x0, {{0x0, 0x0, 0x0}, {0x20A0, 0x11}, 0x0}}, // mObj {dCcD_SE_SWORD, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -532,7 +532,7 @@ dCcD_SrcCps daObjPicture_c::s_CcDCps = { #if DEBUG const #endif -dCcD_SrcCyl daObjPicture_c::s_CcDCyl_pic_at = { +DUSK_GAME_DATA dCcD_SrcCyl daObjPicture_c::s_CcDCyl_pic_at = { { {0x0, {{0x400, 0x1, 0x11}, {0x0, 0x11}, 0x79}}, // mObj {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt diff --git a/src/d/actor/d_a_obj_pleaf.cpp b/src/d/actor/d_a_obj_pleaf.cpp index 3510a08111..afc230dade 100644 --- a/src/d/actor/d_a_obj_pleaf.cpp +++ b/src/d/actor/d_a_obj_pleaf.cpp @@ -9,7 +9,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resName = "J_Hatake"; -daObj_Pleaf_HIOParam const daObj_Pleaf_Param_c::m = {0, -3.0f, 1.0f, 900.0f}; +DUSK_GAME_DATA daObj_Pleaf_HIOParam const daObj_Pleaf_Param_c::m = {0, -3.0f, 1.0f, 900.0f}; static OBJ_PLEAF_HIO_CLASS l_HIO; diff --git a/src/d/actor/d_a_obj_pumpkin.cpp b/src/d/actor/d_a_obj_pumpkin.cpp index 0ad30174ae..c5c3d01504 100644 --- a/src/d/actor/d_a_obj_pumpkin.cpp +++ b/src/d/actor/d_a_obj_pumpkin.cpp @@ -17,7 +17,7 @@ #include #endif -const daObj_Pumpkin_HIOParam daObj_Pumpkin_Param_c::m = { +DUSK_GAME_DATA const daObj_Pumpkin_HIOParam daObj_Pumpkin_Param_c::m = { 0.0f, -5.0f, 1.4f, diff --git a/src/d/actor/d_a_obj_rotTrap.cpp b/src/d/actor/d_a_obj_rotTrap.cpp index 1c8a711b49..d298db61be 100644 --- a/src/d/actor/d_a_obj_rotTrap.cpp +++ b/src/d/actor/d_a_obj_rotTrap.cpp @@ -19,14 +19,14 @@ daRotTrap_HIO_c::daRotTrap_HIO_c() { static daRotTrap_HIO_c l_HIO; -dCcD_SrcGObjInf const daRotTrap_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daRotTrap_c::mCcDObjInfo = { {0, {{AT_TYPE_800, 0x1, 0x1F}, {0x0, 0x0}, {0}}}, {dCcD_SE_SWORD, 0, 1, 0, 0}, {dCcD_SE_STONE, 0, 0, 0, 0}, {0} }; -dCcD_SrcCyl daRotTrap_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daRotTrap_c::mCcDCyl = { mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f} diff --git a/src/d/actor/d_a_obj_sakuita.cpp b/src/d/actor/d_a_obj_sakuita.cpp index f2f8d14348..8092f2d853 100644 --- a/src/d/actor/d_a_obj_sakuita.cpp +++ b/src/d/actor/d_a_obj_sakuita.cpp @@ -51,7 +51,7 @@ void daObjSakuita_Hio_c::dt() { static daObjSakuita_Hio_c M_hio; #endif -daObjSakuita_Attr_c const daObjSakuita_c::M_attr = { +DUSK_GAME_DATA daObjSakuita_Attr_c const daObjSakuita_c::M_attr = { 20.0f, 12.0f, 70.0f, -50.0f, 0.8f, 0.5f, -6.0f, 900.0f, 20000.0f, 100.0f, 0x1400, 0x14, }; diff --git a/src/d/actor/d_a_obj_sakuita_rope.cpp b/src/d/actor/d_a_obj_sakuita_rope.cpp index d0328440c0..40bfd7cfcf 100644 --- a/src/d/actor/d_a_obj_sakuita_rope.cpp +++ b/src/d/actor/d_a_obj_sakuita_rope.cpp @@ -61,7 +61,7 @@ int Sakuita_c::setModelData(J3DModelData* i_modelData) { return 1; } -daObjItaRope_Attr_c const daObjItaRope_c::M_attr = { +DUSK_GAME_DATA daObjItaRope_Attr_c const daObjItaRope_c::M_attr = { -5.0f, 0.2f, 0.5f, 0.8f, 0, }; diff --git a/src/d/actor/d_a_obj_scannon.cpp b/src/d/actor/d_a_obj_scannon.cpp index 7e93898a1d..ceb4399463 100644 --- a/src/d/actor/d_a_obj_scannon.cpp +++ b/src/d/actor/d_a_obj_scannon.cpp @@ -436,7 +436,7 @@ void daSCannon_c::exeModeOrderEvt() { eventInfo.onCondition(dEvtCnd_CANDEMO_e); } -void (daSCannon_c::*DUSK_CONST daSCannon_c::s_exeProc[])() = { +DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST daSCannon_c::s_exeProc[])() = { &daSCannon_c::exeModeWait, &daSCannon_c::exeModeOrderEvt, &daSCannon_c::exeModeActionEvt, @@ -465,22 +465,22 @@ DUSK_CONSTEXPR char DUSK_CONST* CUT_TYPE_TABLE_FIRE_SECOND[4] = { "FINISH", }; -void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_WarpEnd[][2])() = { +DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_WarpEnd[][2])() = { {&daSCannon_c::demoInitWarpEndWait, &daSCannon_c::demoExeWarpEndWait}, {&daSCannon_c::demoInitWarpEndMove, &daSCannon_c::demoExeWarpEndMove}, }; -void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_FireTks[][2])() = { +DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_FireTks[][2])() = { {NULL, NULL}, {NULL, NULL}, {NULL, NULL}, }; -void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_FireFirst[][2])() = { +DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_FireFirst[][2])() = { {&daSCannon_c::demoInitLinkIn, &daSCannon_c::demoExeLinkIn}, }; -void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_FireSecond[][2])() = { +DUSK_GAME_DATA void (daSCannon_c::*DUSK_CONST daSCannon_c::s_demoExeProc_FireSecond[][2])() = { {&daSCannon_c::demoInitSet, &daSCannon_c::demoExeSet}, {&daSCannon_c::demoInitMove, &daSCannon_c::demoExeMove}, {&daSCannon_c::demoInitFire, &daSCannon_c::demoExeFire}, @@ -525,7 +525,7 @@ void daSCannon_c::exeModeActionEvt() { void daSCannon_c::exeModeEnd() {} -const daSCannon_c::demoTable_s daSCannon_c::s_demoTable[] = { +DUSK_GAME_DATA const daSCannon_c::demoTable_s daSCannon_c::s_demoTable[] = { {s_demoExeProc_WarpEnd, CUT_TYPE_TABLE_WARP_END, 2}, {s_demoExeProc_FireFirst, CUT_TYPE_TABLE_FIRE_FIRST, 1}, {s_demoExeProc_FireTks, CUT_TYPE_TABLE_FIRE_TKS, 3}, diff --git a/src/d/actor/d_a_obj_scannon_crs.cpp b/src/d/actor/d_a_obj_scannon_crs.cpp index e422fd9a2c..033cf92dd4 100644 --- a/src/d/actor/d_a_obj_scannon_crs.cpp +++ b/src/d/actor/d_a_obj_scannon_crs.cpp @@ -267,7 +267,7 @@ void daSCannonCrs_c::exeModeWarpEvt(daMidna_c* i_midna_p) { void daSCannonCrs_c::exeModeEnd(daMidna_c* i_midna_p) {} -void (daSCannonCrs_c::*daSCannonCrs_c::s_exeProc[])(daMidna_c*) = { +DUSK_GAME_DATA void (daSCannonCrs_c::*daSCannonCrs_c::s_exeProc[])(daMidna_c*) = { &daSCannonCrs_c::exeModeWait, &daSCannonCrs_c::exeModePreWait, &daSCannonCrs_c::exeModeOrderEvt, diff --git a/src/d/actor/d_a_obj_scannon_ten.cpp b/src/d/actor/d_a_obj_scannon_ten.cpp index 63f8d370b2..4794b783e2 100644 --- a/src/d/actor/d_a_obj_scannon_ten.cpp +++ b/src/d/actor/d_a_obj_scannon_ten.cpp @@ -148,14 +148,14 @@ int daObjSCannonTen_c::execute() { return 1; } -const daObjSCannonTen_c::ExeProc daObjSCannonTen_c::s_exeProc[] = { +DUSK_GAME_DATA const daObjSCannonTen_c::ExeProc daObjSCannonTen_c::s_exeProc[] = { &daObjSCannonTen_c::exeModeWait, &daObjSCannonTen_c::exeModeOrderEvt, &daObjSCannonTen_c::exeModeActionEvt, &daObjSCannonTen_c::exeModeEnd, }; -const daObjSCannonTen_c::ExeProc daObjSCannonTen_c::s_demoExeProc[][2] = { +DUSK_GAME_DATA const daObjSCannonTen_c::ExeProc daObjSCannonTen_c::s_demoExeProc[][2] = { {&daObjSCannonTen_c::demoInitLinkIn, &daObjSCannonTen_c::demoExeLinkIn}, {&daObjSCannonTen_c::demoInitSet, &daObjSCannonTen_c::demoExeSet}, {&daObjSCannonTen_c::demoInitMove, &daObjSCannonTen_c::demoExeMove}, diff --git a/src/d/actor/d_a_obj_sekidoor.cpp b/src/d/actor/d_a_obj_sekidoor.cpp index 3431397a9f..52784fbc4e 100644 --- a/src/d/actor/d_a_obj_sekidoor.cpp +++ b/src/d/actor/d_a_obj_sekidoor.cpp @@ -22,7 +22,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNameList[2] = {"", "SekiDoor"}; static OBJ_SEKIDOOR_HIO_CLASS l_HIO; -const daObj_SekiDoor_HIOParam daObj_SekiDoor_Param_c::m = {0}; +DUSK_GAME_DATA const daObj_SekiDoor_HIOParam daObj_SekiDoor_Param_c::m = {0}; static const f32 reference_posy = 460.0f; diff --git a/src/d/actor/d_a_obj_sekizo.cpp b/src/d/actor/d_a_obj_sekizo.cpp index bf464b3fcc..9c1fe8abb2 100644 --- a/src/d/actor/d_a_obj_sekizo.cpp +++ b/src/d/actor/d_a_obj_sekizo.cpp @@ -23,7 +23,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resNameList[2] = {"", "Sekizo"}; static u8 lit_3800[12]; -daObj_Sekizo_HIOParam const daObj_Sekizo_Param_c::m = {}; +DUSK_GAME_DATA daObj_Sekizo_HIOParam const daObj_Sekizo_Param_c::m = {}; static OBJ_SEKIZO_HIO_CLASS l_HIO; diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index 7f34ca6fd1..5170fbca4e 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -98,11 +98,11 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {21, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {22, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {23, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}}; -char DUSK_CONST* DUSK_CONST daObj_Sekizoa_c::mCutNameList[9] = { +DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST daObj_Sekizoa_c::mCutNameList[9] = { "", "START", "START", "TURN", "JUMP", "GOAL", "EXIT", "FREE", "EXTINCTION", }; -daObj_Sekizoa_c::cutFunc DUSK_CONST daObj_Sekizoa_c::mCutList[9] = { +DUSK_GAME_DATA daObj_Sekizoa_c::cutFunc DUSK_CONST daObj_Sekizoa_c::mCutList[9] = { NULL, &daObj_Sekizoa_c::cutStart, &daObj_Sekizoa_c::cutStart, @@ -118,7 +118,7 @@ static DUSK_CONSTEXPR cXyz l_srcPosR(-600.0f, 1000.0f, 1800.0f); static DUSK_CONSTEXPR cXyz l_srcPosL(600.0f, 1000.0f, 1800.0f); -daObj_Sekizoa_HIOParam const daObj_Sekizoa_Param_c::m = { +DUSK_GAME_DATA daObj_Sekizoa_HIOParam const daObj_Sekizoa_Param_c::m = { 600.0f, -10.0f, 1.0f, 1100.0f, 255.0f, 550.0f, 100.0f, 70.0f, 0.0f, 0.0f, 30.0f, 0.0f, 30.0f, -30.0f, 45.0f, -45.0f, 0.6f, 8.0f, 0x3, 0x6, 0x5, 0x6, 0.0f, 0.0f, 0.0f, 0.0f, 0x3C0008, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, diff --git a/src/d/actor/d_a_obj_smtile.cpp b/src/d/actor/d_a_obj_smtile.cpp index 7b43dfe031..3a2346fde9 100644 --- a/src/d/actor/d_a_obj_smtile.cpp +++ b/src/d/actor/d_a_obj_smtile.cpp @@ -29,7 +29,7 @@ static s8 l_tileMoveData[21][4] = { static OBJ_SMTILE_HIO_CLASS l_HIO; -daObj_SMTile_HIOParam const daObj_SMTile_Param_c::m = {600.0f, 20.0f}; +DUSK_GAME_DATA daObj_SMTile_HIOParam const daObj_SMTile_Param_c::m = {600.0f, 20.0f}; #if DEBUG daObj_SMTile_HIO_c::daObj_SMTile_HIO_c() { diff --git a/src/d/actor/d_a_obj_ss_drink.cpp b/src/d/actor/d_a_obj_ss_drink.cpp index 7d3f02f6d3..6a44f3d786 100644 --- a/src/d/actor/d_a_obj_ss_drink.cpp +++ b/src/d/actor/d_a_obj_ss_drink.cpp @@ -15,14 +15,14 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_resFileName = "Obj_btl"; static DUSK_CONSTEXPR char DUSK_CONST* l_bmdName = "al_bottle.bmd"; -dCcD_SrcGObjInf const daObj_SSDrink_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daObj_SSDrink_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0, 0}, {0x79}}}, {0, 0, 0, 0, {0}}, {0, 0, 0, 0, {0}}, {{0}}, }; -dCcD_SrcCyl DUSK_CONST daObj_SSDrink_c::mCcDCyl = {mCcDObjInfo, {}}; +DUSK_GAME_DATA dCcD_SrcCyl DUSK_CONST daObj_SSDrink_c::mCcDCyl = {mCcDObjInfo, {}}; daObj_SSDrink_c::~daObj_SSDrink_c() { dComIfG_resDelete(&mPhase, getResName()); diff --git a/src/d/actor/d_a_obj_ss_item.cpp b/src/d/actor/d_a_obj_ss_item.cpp index 7a9664ae1f..102223c21b 100644 --- a/src/d/actor/d_a_obj_ss_item.cpp +++ b/src/d/actor/d_a_obj_ss_item.cpp @@ -25,14 +25,14 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_bmdFileName[] = { "pumpkin.bmd", }; -dCcD_SrcGObjInf const daObj_SSItem_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daObj_SSItem_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0, 0}, {0x79}}}, {0, 0, 0, 0, {0}}, {0, 0, 0, 0, {0}}, {{0}}, }; -dCcD_SrcCyl DUSK_CONST daObj_SSItem_c::mCcDCyl = {mCcDObjInfo, {}}; +DUSK_GAME_DATA dCcD_SrcCyl DUSK_CONST daObj_SSItem_c::mCcDCyl = {mCcDObjInfo, {}}; daObj_SSItem_c::~daObj_SSItem_c() { dComIfG_resDelete(&mPhase, getResName()); diff --git a/src/d/actor/d_a_obj_stairBlock.cpp b/src/d/actor/d_a_obj_stairBlock.cpp index d3f07e7992..1ea8fb75dd 100644 --- a/src/d/actor/d_a_obj_stairBlock.cpp +++ b/src/d/actor/d_a_obj_stairBlock.cpp @@ -22,7 +22,7 @@ void daStairBlock_c::setBaseMtx() { } } -const dCcD_SrcGObjInf daStairBlock_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daStairBlock_c::mCcDObjInfo = { {0, {0, 0, 0, {0x0, 0x0}, {0x19}}}, {dCcD_SE_NONE, 0, 0, 0, 0x0}, {dCcD_SE_NONE, 0, 0, 0, 0x0}, @@ -166,7 +166,7 @@ static int daStairBlock_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } -dCcD_SrcSph daStairBlock_c::mCcDSph = {daStairBlock_c::mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 4.0f}}}; +DUSK_GAME_DATA dCcD_SrcSph daStairBlock_c::mCcDSph = {daStairBlock_c::mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 4.0f}}}; static DUSK_CONST actor_method_class l_daStairBlock_Method = { (process_method_func)daStairBlock_Create, (process_method_func)daStairBlock_Delete, diff --git a/src/d/actor/d_a_obj_stick.cpp b/src/d/actor/d_a_obj_stick.cpp index 71f69e58a8..95bb4d95c5 100644 --- a/src/d/actor/d_a_obj_stick.cpp +++ b/src/d/actor/d_a_obj_stick.cpp @@ -11,11 +11,11 @@ #include "m_Do/m_Do_ext.h" #include "d/actor/d_a_npc.h" -const daObj_Stick_HIOParam daObj_Stick_Param_c::m = { +DUSK_GAME_DATA const daObj_Stick_HIOParam daObj_Stick_Param_c::m = { 0.0f, -3.0f, 1.0f, 100.0f }; -dCcD_SrcSph daObj_Stick_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daObj_Stick_c::mCcDSph = { daNpcT_c::mCcDObjData, // mObjInf { {{0.0f, 0.0f, 0.0f}, 0.0f} // mSph diff --git a/src/d/actor/d_a_obj_swpush.cpp b/src/d/actor/d_a_obj_swpush.cpp index 5cdf0f4372..c901a4ef98 100644 --- a/src/d/actor/d_a_obj_swpush.cpp +++ b/src/d/actor/d_a_obj_swpush.cpp @@ -54,11 +54,11 @@ BOOL daObjSwpush::Act_c::solidHeapCB(fopAc_ac_c* a_this) { return static_cast(a_this)->create_heap(); } -s16 const daObjSwpush::Act_c::M_bmd[3] = {BMDR_KBOTA_00, BMDR_S_LV3BOTA, BMDR_S_LV6BOTA}; +DUSK_GAME_DATA s16 const daObjSwpush::Act_c::M_bmd[3] = {BMDR_KBOTA_00, BMDR_S_LV3BOTA, BMDR_S_LV6BOTA}; -s16 const daObjSwpush::Act_c::M_dzb[3] = {DZB_KBOTA_00, DZB_KBOTA2_00, DZB_KBOTA3_00}; +DUSK_GAME_DATA s16 const daObjSwpush::Act_c::M_dzb[3] = {DZB_KBOTA_00, DZB_KBOTA2_00, DZB_KBOTA3_00}; -DUSK_CONST char* daObjSwpush::Act_c::M_arcname[3] = { +DUSK_GAME_DATA DUSK_CONST char* daObjSwpush::Act_c::M_arcname[3] = { "Kbota_00", "S_lv3bota", "S_lv6bota", @@ -117,9 +117,9 @@ cPhs_Step daObjSwpush::Act_c::create_res_load() { return cPhs_COMPLEATE_e; } -u32 const daObjSwpush::Act_c::M_heap_size[3] = {0x1000, 0x1000, 0x1000}; +DUSK_GAME_DATA u32 const daObjSwpush::Act_c::M_heap_size[3] = {0x1000, 0x1000, 0x1000}; -daObjSwpush::Hio_c::Attr_c const daObjSwpush::Act_c::M_attr[5] = { +DUSK_GAME_DATA daObjSwpush::Hio_c::Attr_c const daObjSwpush::Act_c::M_attr[5] = { { (AttrFlag_e)(FLAG_STAY_PRESSED | FLAG_OBEY_SAVE), 1.0f, @@ -198,7 +198,7 @@ daObjSwpush::Hio_c::Attr_c const daObjSwpush::Act_c::M_attr[5] = { }; -u8 const daObjSwpush::Act_c::M_op_vtx[4] = {0x0D, 0x0B, 0x0A, 0x0C}; +DUSK_GAME_DATA u8 const daObjSwpush::Act_c::M_op_vtx[4] = {0x0D, 0x0B, 0x0A, 0x0C}; cPhs_Step daObjSwpush::Act_c::Mthd_Create() { fopAcM_ct(this, daObjSwpush::Act_c); diff --git a/src/d/actor/d_a_obj_swpush2.cpp b/src/d/actor/d_a_obj_swpush2.cpp index bf13e741c0..10dce4e85b 100644 --- a/src/d/actor/d_a_obj_swpush2.cpp +++ b/src/d/actor/d_a_obj_swpush2.cpp @@ -71,9 +71,9 @@ int daObjSwpush2::Act_c::solidHeapCB(fopAc_ac_c* i_this) { return ((daObjSwpush2::Act_c*)i_this)->create_heap(); } -const char daObjSwpush2::Act_c::M_arcname[9] = "K_swmn00"; +DUSK_GAME_DATA const char daObjSwpush2::Act_c::M_arcname[9] = "K_swmn00"; -const daObjSwpush2::Attr_c daObjSwpush2::Act_c::M_attr[4] = { +DUSK_GAME_DATA const daObjSwpush2::Attr_c daObjSwpush2::Act_c::M_attr[4] = { { 0x2000, daObjSwpush2::AttrFlag_e(AttrFlag_UNK_0x1_e | AttrFlag_UNK_0x2_e), diff --git a/src/d/actor/d_a_obj_syRock.cpp b/src/d/actor/d_a_obj_syRock.cpp index 5cabf2f30a..44d8c42741 100644 --- a/src/d/actor/d_a_obj_syRock.cpp +++ b/src/d/actor/d_a_obj_syRock.cpp @@ -36,7 +36,7 @@ public: static daSyRock_HIO_c l_HIO; -dCcD_SrcCyl daSyRock_c::mCcDCyl = {mCcDObjInfo}; +DUSK_GAME_DATA dCcD_SrcCyl daSyRock_c::mCcDCyl = {mCcDObjInfo}; daSyRock_HIO_c::daSyRock_HIO_c() { mShakeAmplitude = 450.0f; @@ -151,7 +151,7 @@ int daSyRock_c::CreateHeap() { return 1; } -dCcD_SrcGObjInf const daSyRock_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daSyRock_c::mCcDObjInfo = { {0x0, {{AT_TYPE_BOMB, 0x1, 0x1F}, {AT_TYPE_IRON_BALL | AT_TYPE_BOMB, 0x11}, 0x79}}, // mObj {dCcD_SE_SWORD, 0x0, 0x1, dCcD_MTRL_NONE, 0x0}, // mGObjAt {dCcD_SE_STONE, 0x0, 0x0, dCcD_MTRL_NONE, 0x2}, // mGObjTg diff --git a/src/d/actor/d_a_obj_taFence.cpp b/src/d/actor/d_a_obj_taFence.cpp index 4958e8a52f..d298641a4f 100644 --- a/src/d/actor/d_a_obj_taFence.cpp +++ b/src/d/actor/d_a_obj_taFence.cpp @@ -106,14 +106,14 @@ int daTaFence_c::CreateHeap() { return 1; } -const dCcD_SrcGObjInf daTaFence_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daTaFence_c::mCcDObjInfo = { {0, {{0x0, 0x0, 0x0}, {0x400032, 0x11}, {0x0}}}, {dCcD_SE_SWORD, 0, 0, 0, 0}, {dCcD_SE_STONE, 0, 0, 0, 0}, {0}, }; -dCcD_SrcCyl daTaFence_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daTaFence_c::mCcDCyl = { daTaFence_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_tks.cpp b/src/d/actor/d_a_obj_tks.cpp index 505a1bd09c..df6a596804 100644 --- a/src/d/actor/d_a_obj_tks.cpp +++ b/src/d/actor/d_a_obj_tks.cpp @@ -59,7 +59,7 @@ daObjTks_c::~daObjTks_c() { #endif } -const daObjTks_HIOParam daObjTks_Param_c::m = { +DUSK_GAME_DATA const daObjTks_HIOParam daObjTks_Param_c::m = { 90.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_obj_togeTrap.cpp b/src/d/actor/d_a_obj_togeTrap.cpp index 2ea6767dfc..479bdece95 100644 --- a/src/d/actor/d_a_obj_togeTrap.cpp +++ b/src/d/actor/d_a_obj_togeTrap.cpp @@ -22,14 +22,14 @@ daTogeTrap_HIO_c::daTogeTrap_HIO_c() { static daTogeTrap_HIO_c l_HIO; -const dCcD_SrcGObjInf daTogeTrap_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daTogeTrap_c::mCcDObjInfo = { {0, {{2, 1, 0x1D}, {0x480028, 0x11}, {0}}}, {dCcD_SE_SWORD, 0, 0, 0, 0}, {dCcD_SE_STONE, 0, 0, 0, 0}, {0}, }; -dCcD_SrcCyl daTogeTrap_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daTogeTrap_c::mCcDCyl = { daTogeTrap_c::mCcDObjInfo, { { diff --git a/src/d/actor/d_a_obj_waterPillar.cpp b/src/d/actor/d_a_obj_waterPillar.cpp index 522b82a634..1e65f3adf9 100644 --- a/src/d/actor/d_a_obj_waterPillar.cpp +++ b/src/d/actor/d_a_obj_waterPillar.cpp @@ -130,13 +130,13 @@ int daWtPillar_c::createHeapCallBack(fopAc_ac_c* i_this) { return actor->CreateHeap(); } -const dCcD_SrcGObjInf daWtPillar_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daWtPillar_c::mCcDObjInfo = { {0x0, {{AT_TYPE_100, 0x0, 0x1D}, {AT_TYPE_0, 0x0}, 0x0}}, // mObj {dCcD_SE_SWORD, 0x0, 0x0, dCcD_MTRL_NONE, 0x0}, // mGObjAt {dCcD_SE_STONE, 0x0, 0x0, dCcD_MTRL_NONE, 0x0}, // mGObjTg {}, // mGObjCo }; -const dCcD_SrcGObjInf daWtPillar_c::mCcDObjCoInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daWtPillar_c::mCcDObjCoInfo = { {0x0, {{AT_TYPE_0, 0x0, 0x0}, {0x00, 0x0}, 0x79}}, // mObj {dCcD_SE_SWORD, 0x0, 0x0, dCcD_MTRL_NONE, 0x0}, // mGObjAt {dCcD_SE_STONE, 0x0, 0x0, dCcD_MTRL_NONE, 0x0}, // mGObjTg @@ -145,17 +145,17 @@ const dCcD_SrcGObjInf daWtPillar_c::mCcDObjCoInfo = { static daWtPillar_HIO_c l_HIO; -cull_box l_cull_box = { +DUSK_GAME_DATA cull_box l_cull_box = { {-30.0f, -10.0f, -30.0f}, {30.0f, 60.0f, 30.0f} }; -dCcD_SrcCps daWtPillar_c::mCcDCps = { +DUSK_GAME_DATA dCcD_SrcCps daWtPillar_c::mCcDCps = { daWtPillar_c::mCcDObjInfo, { { {0.0f, 0.0f, 0.0f}, {0.0f,1100.0f, 0.0f}, 150.0f }} }; -dCcD_SrcCyl daWtPillar_c::mCcDCyl = {daWtPillar_c::mCcDObjCoInfo}; +DUSK_GAME_DATA dCcD_SrcCyl daWtPillar_c::mCcDCyl = {daWtPillar_c::mCcDObjCoInfo}; int daWtPillar_c::CreateHeap() { J3DModelData* modelData = static_cast(dComIfG_getObjectRes("efWater", 8)); @@ -694,7 +694,7 @@ int daWtPillar_Create(fopAc_ac_c* i_this) { return actor->create(); } -actor_method_class l_daWtPillar_Method = { +DUSK_GAME_DATA actor_method_class l_daWtPillar_Method = { (process_method_func)daWtPillar_Create, (process_method_func)daWtPillar_Delete, (process_method_func)daWtPillar_Execute, diff --git a/src/d/actor/d_a_obj_waterfall.cpp b/src/d/actor/d_a_obj_waterfall.cpp index 0987eec4a1..a7707f36b9 100644 --- a/src/d/actor/d_a_obj_waterfall.cpp +++ b/src/d/actor/d_a_obj_waterfall.cpp @@ -27,7 +27,7 @@ static int daObjWaterFall_Create(fopAc_ac_c* i_this); static fopAc_ac_c* target_info[MAX_TARGET_INFO_COUNT]; // Mutually exclusive list of bomb/arrow actors to be potentially deleted static int target_info_count; -const char* l_arcName = "sample"; +DUSK_GAME_DATA const char* l_arcName = "sample"; #if DEBUG static DUSK_CONSTEXPR cull_box l_cull_box = { diff --git a/src/d/actor/d_a_obj_wdStick.cpp b/src/d/actor/d_a_obj_wdStick.cpp index d18cc67ee2..57a3f8b7b8 100644 --- a/src/d/actor/d_a_obj_wdStick.cpp +++ b/src/d/actor/d_a_obj_wdStick.cpp @@ -14,7 +14,7 @@ static daWdStick_HIO_c l_HIO; -dCcD_SrcSph daWdStick_c::mCcDSph = {daWdStick_c::mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 4.0f}}}; +DUSK_GAME_DATA dCcD_SrcSph daWdStick_c::mCcDSph = {daWdStick_c::mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 4.0f}}}; daWdStick_HIO_c::daWdStick_HIO_c() { field_0x04 = 60; @@ -37,7 +37,7 @@ int daWdStick_c::CreateHeap() { return mModel != 0 ? 1 : 0; } -dCcD_SrcGObjInf const daWdStick_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daWdStick_c::mCcDObjInfo = { {0, {{0x200, 0, 0x1f}, {0xd8fbffff, 0x1f}, {0x0}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 4}, diff --git a/src/d/actor/d_a_obj_yel_bag.cpp b/src/d/actor/d_a_obj_yel_bag.cpp index 1b7b7c8374..baacdbd934 100644 --- a/src/d/actor/d_a_obj_yel_bag.cpp +++ b/src/d/actor/d_a_obj_yel_bag.cpp @@ -27,7 +27,7 @@ static DUSK_CONSTEXPR int DUSK_CONST* l_loadRes_list[2] = { static DUSK_CONSTEXPR char DUSK_CONST* l_resNames[] = {"yel_bag"}; -dCcD_SrcCyl daObj_YBag_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daObj_YBag_c::mCcDCyl = { daNpcT_c::mCcDObjData, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f} @@ -69,14 +69,14 @@ daObj_YBag_c::~daObj_YBag_c() { #endif } -const dCcD_SrcGObjInf daObj_YBag_c::mCcDObjInfo = { +DUSK_GAME_DATA const dCcD_SrcGObjInf daObj_YBag_c::mCcDObjInfo = { {0, {{0, 0, 0}, {0, 0x00}, {0x79}}}, {dCcD_SE_NONE, 0, 0, 0, 0}, {dCcD_SE_NONE, 0, 0, 0, 0}, {0}, }; -daObj_YBag_HIOParam const daObj_YBag_Param_c::m = { +DUSK_GAME_DATA daObj_YBag_HIOParam const daObj_YBag_Param_c::m = { 0.0f, -4.0f, 1.0f, 400.0f, 255.0f, 10.0f, 4.0f, 10.0f, 41.0f, 32.0f, 3.0f, }; diff --git a/src/d/actor/d_a_obj_yobikusa.cpp b/src/d/actor/d_a_obj_yobikusa.cpp index fd2a53f24e..32e9ba4145 100644 --- a/src/d/actor/d_a_obj_yobikusa.cpp +++ b/src/d/actor/d_a_obj_yobikusa.cpp @@ -16,7 +16,7 @@ static const char* l_arcName1 = "J_Tobi"; static const char* l_arcName2 = "J_Umak"; -daObjYobikusa_c::actionFuncEntry daObjYobikusa_c::ActionTable[] = { +DUSK_GAME_DATA daObjYobikusa_c::actionFuncEntry daObjYobikusa_c::ActionTable[] = { {&daObjYobikusa_c::initSwingWind, &daObjYobikusa_c::executeSwingWind}, {&daObjYobikusa_c::initPushDown, &daObjYobikusa_c::executePushDown}, {&daObjYobikusa_c::initPickLeaf, &daObjYobikusa_c::executePickLeaf}, @@ -39,7 +39,7 @@ void daObjYobikusa_c::initSwingWind() { mMode = MODE_SWING_WIND; } -daObjYobikusa_c::attributes const daObjYobikusa_c::M_attr = { +DUSK_GAME_DATA daObjYobikusa_c::attributes const daObjYobikusa_c::M_attr = { 1000.0f, 4000.0f, 0.0f, 1500.0f, 500.0f, 1152.0f, 512.0f, 200.0f, 400.0f, 0.02f, 0.0f, 0.0f, 5000.0f, 150.0f, 1024, 64, 10000, 6582}; diff --git a/src/d/actor/d_a_obj_zrTurara.cpp b/src/d/actor/d_a_obj_zrTurara.cpp index f4a94de7ec..93feb1a70e 100644 --- a/src/d/actor/d_a_obj_zrTurara.cpp +++ b/src/d/actor/d_a_obj_zrTurara.cpp @@ -19,7 +19,7 @@ daZrTurara_HIO_c::daZrTurara_HIO_c() { static daZrTurara_HIO_c l_HIO; -dCcD_SrcGObjInf const daZrTurara_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daZrTurara_c::mCcDObjInfo = { {0, { {0, 0, 0}, {0x20, 0x11}, @@ -30,7 +30,7 @@ dCcD_SrcGObjInf const daZrTurara_c::mCcDObjInfo = { {0} }; -dCcD_SrcCyl daZrTurara_c::mCcDCyl = { +DUSK_GAME_DATA dCcD_SrcCyl daZrTurara_c::mCcDCyl = { mCcDObjInfo, { {{0.0f, 0.0f, 0.0f}, 0.0f, 0.0f} diff --git a/src/d/actor/d_a_obj_zrTuraraRock.cpp b/src/d/actor/d_a_obj_zrTuraraRock.cpp index 45f58dd543..8b3a2d6dd3 100644 --- a/src/d/actor/d_a_obj_zrTuraraRock.cpp +++ b/src/d/actor/d_a_obj_zrTuraraRock.cpp @@ -23,7 +23,7 @@ daZrTuraRc_HIO_c::daZrTuraRc_HIO_c() { field_0x1c = 5.0f; } -dCcD_SrcGObjInf const daZrTuraRc_c::mCcDObjInfo = { +DUSK_GAME_DATA dCcD_SrcGObjInf const daZrTuraRc_c::mCcDObjInfo = { {0, { {0x20, 1, 0x1F}, {0, 0}, @@ -34,7 +34,7 @@ dCcD_SrcGObjInf const daZrTuraRc_c::mCcDObjInfo = { {0} }; -dCcD_SrcSph daZrTuraRc_c::mCcDSph = { +DUSK_GAME_DATA dCcD_SrcSph daZrTuraRc_c::mCcDSph = { mCcDObjInfo, {{{0.0f, 0.0f, 0.0f}, 0.0f}} }; diff --git a/src/d/actor/d_a_passer_mng.cpp b/src/d/actor/d_a_passer_mng.cpp index aa7af1f5bb..ecdcd419ba 100644 --- a/src/d/actor/d_a_passer_mng.cpp +++ b/src/d/actor/d_a_passer_mng.cpp @@ -67,7 +67,7 @@ static SizedGroup<7> const groupD = { {0x01000014, 0x21000015, 0x00000016, 0x1100000C, 0x5000000E, 0x4000000F, 0x0100000D}, }; -const daPasserMng_c::Group* daPasserMng_c::mGroupTbl[4] = { +DUSK_GAME_DATA const daPasserMng_c::Group* daPasserMng_c::mGroupTbl[4] = { (const Group*)&groupA, (const Group*)&groupB, (const Group*)&groupC, diff --git a/src/d/actor/d_a_peru.cpp b/src/d/actor/d_a_peru.cpp index 6ef259209a..578e235601 100644 --- a/src/d/actor/d_a_peru.cpp +++ b/src/d/actor/d_a_peru.cpp @@ -70,19 +70,19 @@ static DUSK_CONSTEXPR daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenc {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {4, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -const char* daPeru_c::mCutNameList[3] = { +DUSK_GAME_DATA const char* daPeru_c::mCutNameList[3] = { "", "PERU_APPEAR", "PERU_APPEAR_SKIP", }; -daPeru_c::cutAppearFunc daPeru_c::mCutList[3] = { +DUSK_GAME_DATA daPeru_c::cutAppearFunc daPeru_c::mCutList[3] = { NULL, &daPeru_c::cutAppear, &daPeru_c::cutAppear_skip, }; -daPeru_HIOParam const daPeru_Param_c::m = { +DUSK_GAME_DATA daPeru_HIOParam const daPeru_Param_c::m = { 60.0f, -3.0f, 1.0f, diff --git a/src/d/actor/d_a_player.cpp b/src/d/actor/d_a_player.cpp index e2cb035811..8ab70d8907 100644 --- a/src/d/actor/d_a_player.cpp +++ b/src/d/actor/d_a_player.cpp @@ -64,11 +64,11 @@ void daPy_boomerangMove_c::initOffset(const cXyz* i_pos) { field_0x0 = 0; } -daMidna_c* daPy_py_c::m_midnaActor; +DUSK_GAME_DATA daMidna_c* daPy_py_c::m_midnaActor; -s16 daPy_boomerangMove_c::m_dropAngleY; +DUSK_GAME_DATA s16 daPy_boomerangMove_c::m_dropAngleY; -s16 daPy_boomerangMove_c::m_eventKeepFlg; +DUSK_GAME_DATA s16 daPy_boomerangMove_c::m_eventKeepFlg; int daPy_boomerangMove_c::posMove(cXyz* o_pos, s16* o_rotY, fopAc_ac_c* i_objActor, s16 i_rotStep) { daBoomerang_c* boomerang_p = daPy_py_c::getThrowBoomerangActor(); diff --git a/src/d/actor/d_a_shop_item.cpp b/src/d/actor/d_a_shop_item.cpp index 568128757f..e8fafd1012 100644 --- a/src/d/actor/d_a_shop_item.cpp +++ b/src/d/actor/d_a_shop_item.cpp @@ -91,7 +91,7 @@ const char* daShopItem_c::getShopArcname() { return mData[mShopItemID].get_arcName(); } -const f32 daShopItem_c::m_cullfar_max = 5000.0f; +DUSK_GAME_DATA const f32 daShopItem_c::m_cullfar_max = 5000.0f; u16 daShopItem_c::getHeapSize() { static const u16 HeapSizeTbl[] = { diff --git a/src/d/actor/d_a_tag_TWgate.cpp b/src/d/actor/d_a_tag_TWgate.cpp index 4f06c69899..642eab8a23 100644 --- a/src/d/actor/d_a_tag_TWgate.cpp +++ b/src/d/actor/d_a_tag_TWgate.cpp @@ -24,7 +24,7 @@ struct daTagTWGate_zevParam { /* 0x1B */ s8 mLayer; }; -daTagTWGate_Attr_c const daTagTWGate_c::mAttr = {}; +DUSK_GAME_DATA daTagTWGate_Attr_c const daTagTWGate_c::mAttr = {}; #if DEBUG daTagTWGate_Hio_c daTagTWGate_c::mHio; @@ -79,7 +79,7 @@ static daTagTWGate_zevParam const l_zevParamTbl[4] = { static DUSK_CONSTEXPR const char* l_myName = "Gate"; -const actionFunc daTagTWGate_c::ActionTable[][2] = { +DUSK_GAME_DATA const actionFunc daTagTWGate_c::ActionTable[][2] = { {&daTagTWGate_c::initWait, &daTagTWGate_c::executeWait}, {&daTagTWGate_c::initDemoFilone1, &daTagTWGate_c::executeDemoFilone1}, {&daTagTWGate_c::initDemoFilone2, &daTagTWGate_c::executeDemoFilone2}, diff --git a/src/d/actor/d_a_tag_evt.cpp b/src/d/actor/d_a_tag_evt.cpp index 7cf68b91b3..6f1de5a71c 100644 --- a/src/d/actor/d_a_tag_evt.cpp +++ b/src/d/actor/d_a_tag_evt.cpp @@ -17,7 +17,7 @@ static DUSK_CONST char* l_evtNameList[] = { static DUSK_CONST char* l_resFileName = "TAGEVT"; -DUSK_CONST char* daTag_Evt_c::mEvtCutList[] = { +DUSK_GAME_DATA DUSK_CONST char* daTag_Evt_c::mEvtCutList[] = { "WAIT", "TALK", "NEXT", diff --git a/src/d/actor/d_a_tag_evtmsg.cpp b/src/d/actor/d_a_tag_evtmsg.cpp index c63ec8b3ce..e106ed2006 100644 --- a/src/d/actor/d_a_tag_evtmsg.cpp +++ b/src/d/actor/d_a_tag_evtmsg.cpp @@ -17,9 +17,9 @@ enum evt_cut_e { NUM_EVT_CUTS_e, }; -DUSK_CONST char* daTag_EvtMsg_c::mEvtCutNameList[] = {"", "TALK", "WAIT"}; +DUSK_GAME_DATA DUSK_CONST char* daTag_EvtMsg_c::mEvtCutNameList[] = {"", "TALK", "WAIT"}; -EvtCutFunc daTag_EvtMsg_c::mEvtCutList[] = { +DUSK_GAME_DATA EvtCutFunc daTag_EvtMsg_c::mEvtCutList[] = { NULL, &daTag_EvtMsg_c::ECut_talk, &daTag_EvtMsg_c::ECut_wait, diff --git a/src/d/actor/d_a_tag_firewall.cpp b/src/d/actor/d_a_tag_firewall.cpp index 0f1a461ba2..9168899f76 100644 --- a/src/d/actor/d_a_tag_firewall.cpp +++ b/src/d/actor/d_a_tag_firewall.cpp @@ -14,15 +14,15 @@ #include "d/d_s_play.h" struct Tag_FWall_n { - static dCcD_SrcSph cc_sph_src; - static u16 game_over_eff_name[]; + static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src; + static DUSK_GAME_DATA u16 game_over_eff_name[]; }; static int daTag_FWall_Draw(daTag_FWall_c* i_this) { return 1; } -dCcD_SrcSph Tag_FWall_n::cc_sph_src = { +DUSK_GAME_DATA dCcD_SrcSph Tag_FWall_n::cc_sph_src = { { {0x0, {{0x400, 0x1, 0xC}, {0x0, 0x0}, 0x0}}, // mObj {dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt @@ -34,7 +34,7 @@ dCcD_SrcSph Tag_FWall_n::cc_sph_src = { } // mSphAttr }; -u16 Tag_FWall_n::game_over_eff_name[] = {0x84CC, 0x84CD, 0x84CE, 0x84CF}; +DUSK_GAME_DATA u16 Tag_FWall_n::game_over_eff_name[] = {0x84CC, 0x84CD, 0x84CE, 0x84CF}; static daTag_FWall_c* fire_leader; diff --git a/src/d/actor/d_a_tag_hstop.cpp b/src/d/actor/d_a_tag_hstop.cpp index 825ab6e647..2cb2426fca 100644 --- a/src/d/actor/d_a_tag_hstop.cpp +++ b/src/d/actor/d_a_tag_hstop.cpp @@ -102,7 +102,7 @@ void daTagHstop_c::setActive() { } } -dMsgFlow_c daTagHstop_c::m_msgFlow; +DUSK_GAME_DATA dMsgFlow_c daTagHstop_c::m_msgFlow; int daTagHstop_c::execute() { if (eventInfo.checkCommandTalk()) { diff --git a/src/d/actor/d_a_tag_lantern.cpp b/src/d/actor/d_a_tag_lantern.cpp index 00d4e49b95..861d80c66a 100644 --- a/src/d/actor/d_a_tag_lantern.cpp +++ b/src/d/actor/d_a_tag_lantern.cpp @@ -14,7 +14,7 @@ static TAG_LANTERN_HIO_CLASS l_HIO; -daTag_Lantern_HIOParam const daTag_Lantern_Param_c::m = {0}; +DUSK_GAME_DATA daTag_Lantern_HIOParam const daTag_Lantern_Param_c::m = {0}; #if DEBUG daTag_Lantern_HIO_c::daTag_Lantern_HIO_c() { diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index 08bd00b001..cf8db83f8f 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -79,7 +79,7 @@ int daTag_Msg_c::destroy() { return 1; } -const daTag_Msg_HIO_Param_c daTag_Msg_Param_c::m = {0}; +DUSK_GAME_DATA const daTag_Msg_HIO_Param_c daTag_Msg_Param_c::m = {0}; int daTag_Msg_c::execute() { bool set_event = true; @@ -224,7 +224,7 @@ void daTag_Msg_c::getParam() { SAFE_STRCPY(mStaffName, "Tag_ms"); } -DUSK_CONST char* daTag_Msg_c::mEvtCutTBL[2] = { +DUSK_GAME_DATA DUSK_CONST char* daTag_Msg_c::mEvtCutTBL[2] = { "SPEAK", "PAUSE", }; diff --git a/src/d/d_a_horse_static.cpp b/src/d/d_a_horse_static.cpp index 1c196043ed..e4db3519a9 100644 --- a/src/d/d_a_horse_static.cpp +++ b/src/d/d_a_horse_static.cpp @@ -50,4 +50,4 @@ void e_wb_class::setRunRideMode() { } } -daTagHstop_c* daTagHstop_c::m_top; +DUSK_GAME_DATA daTagHstop_c* daTagHstop_c::m_top; diff --git a/src/d/d_a_itembase_static.cpp b/src/d/d_a_itembase_static.cpp index 9099c5a147..5e98a20409 100644 --- a/src/d/d_a_itembase_static.cpp +++ b/src/d/d_a_itembase_static.cpp @@ -68,7 +68,7 @@ int CheckFieldItemCreateHeap(fopAc_ac_c* i_this) { dItem_data::getItemBrkName(item_no), dItem_data::getItemBtpName(item_no)); } -const daItemBase_data daItemBase_c::m_data = { +DUSK_GAME_DATA const daItemBase_data daItemBase_c::m_data = { -4.5f, // mGravity 0.62f, // mGroundReflect 45.0f, // mLaunchSpeed diff --git a/src/d/d_a_shop_item_static.cpp b/src/d/d_a_shop_item_static.cpp index 902e09a9c4..ece0a288c5 100644 --- a/src/d/d_a_shop_item_static.cpp +++ b/src/d/d_a_shop_item_static.cpp @@ -15,7 +15,7 @@ cXyz* daShopItem_c::getPosP() { return ¤t.pos; } -ResourceData const daShopItem_c::mData[23] = { +DUSK_GAME_DATA ResourceData const daShopItem_c::mData[23] = { {"B_mD_sold", 3, -1, -1, -1, -1, -1, -1, 0.0f, 1.0f, 0, {0, -0x8000, 0}, 0, 0, 0, 0, -1, -1}, {"B_mD_oil", 3, -1, -1, -1, -1, -1, -1, 0.0f, 1.0f, 0, {0, 0, 0}, 0, 0, 0, 0, -1, -1}, {"O_mD_red", 3, -1, -1, -1, -1, -1, -11, 0.0f, 1.0f, 0, {0, 0, 0}, 0, 0, 0, 0, -1, -1}, diff --git a/src/d/d_att_dist.cpp b/src/d/d_att_dist.cpp index d2b9ac2b1b..761eb1074c 100644 --- a/src/d/d_att_dist.cpp +++ b/src/d/d_att_dist.cpp @@ -3,7 +3,7 @@ #include "d/d_att_dist.h" #include "d/d_attention.h" -dist_entry dAttention_c::dist_table[234] = { +DUSK_GAME_DATA dist_entry dAttention_c::dist_table[234] = { {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.01f, 0}, {250.0f, 375.0f, 500.0f, 400.0f, -400.0f, 0.5f, 0}, {187.5f, 250.0f, 312.5f, 300.0f, -300.0f, 1.0f, 0}, diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index 1bb9e84f70..beea40e806 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -41,13 +41,13 @@ static bool padLockButton(s32 i_padNo) { } } // namespace -type_tbl_entry dAttention_c::loc_type_tbl[3] = { +DUSK_GAME_DATA type_tbl_entry dAttention_c::loc_type_tbl[3] = { {fopAc_attn_LOCK_e, fopAc_AttnFlag_LOCK_e}, {fopAc_attn_TALK_e, fopAc_AttnFlag_TALK_e}, {fopAc_attn_BATTLE_e, fopAc_AttnFlag_BATTLE_e}, }; -type_tbl_entry dAttention_c::act_type_tbl[5] = { +DUSK_GAME_DATA type_tbl_entry dAttention_c::act_type_tbl[5] = { {fopAc_attn_SPEAK_e, fopAc_AttnFlag_SPEAK_e}, {fopAc_attn_CARRY_e, fopAc_AttnFlag_CARRY_e}, {fopAc_attn_DOOR_e, fopAc_AttnFlag_DOOR_e}, @@ -157,7 +157,7 @@ int dAttDraw_CallBack_c::execute(u16 param_0, J3DTransformInfo* transform) { return 1; } -dAttDrawParam_c g_AttDwHIO; +DUSK_GAME_DATA dAttDrawParam_c g_AttDwHIO; dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) { mpPlayer = i_player; @@ -339,7 +339,7 @@ dAttList_c* dAttention_c::getActionBtnXY() { return NULL; } -int dAttention_c::loc_type_num = 3; +DUSK_GAME_DATA int dAttention_c::loc_type_num = 3; int dAttention_c::chkAttMask(u32 i_type, u32 i_mask) { int i; @@ -375,13 +375,13 @@ static int check_event_condition(u32 i_attnType, u16 i_condition) { return false; } -int dAttention_c::act_type_num = 5; +DUSK_GAME_DATA int dAttention_c::act_type_num = 5; -type_tbl_entry dAttention_c::chk_type_tbl[1] = { +DUSK_GAME_DATA type_tbl_entry dAttention_c::chk_type_tbl[1] = { {fopAc_attn_CHECK_e, fopAc_AttnFlag_CHECK_e}, }; -int dAttention_c::chk_type_num = 1; +DUSK_GAME_DATA int dAttention_c::chk_type_num = 1; static bool attn_opt_hold = true; diff --git a/src/d/d_bg_parts.cpp b/src/d/d_bg_parts.cpp index 9dc7be181d..c7d94551b9 100644 --- a/src/d/d_bg_parts.cpp +++ b/src/d/d_bg_parts.cpp @@ -222,8 +222,8 @@ dBgp_c::share_c::share_c() { mCount = 0; } -JKRSolidHeap* dBgp_c::mShareHeap; -dBgp_c::share_c* dBgp_c::mShare; +DUSK_GAME_DATA JKRSolidHeap* dBgp_c::mShareHeap; +DUSK_GAME_DATA dBgp_c::share_c* dBgp_c::mShare; void dBgp_c::share_c::set(u16 i_id) { JUT_ASSERT(441, mCount != static_cast(~0)); diff --git a/src/d/d_bg_s_movebg_actor.cpp b/src/d/d_bg_s_movebg_actor.cpp index 176beadb73..5d5aa13203 100644 --- a/src/d/d_bg_s_movebg_actor.cpp +++ b/src/d/d_bg_s_movebg_actor.cpp @@ -51,11 +51,11 @@ int dBgS_MoveBgActor::ToBack() { return 1; } -const char* dBgS_MoveBgActor::m_name; +DUSK_GAME_DATA const char* dBgS_MoveBgActor::m_name; -int dBgS_MoveBgActor::m_dzb_id; +DUSK_GAME_DATA int dBgS_MoveBgActor::m_dzb_id; -MoveBGActor_SetFunc dBgS_MoveBgActor::m_set_func; +DUSK_GAME_DATA MoveBGActor_SetFunc dBgS_MoveBgActor::m_set_func; int dBgS_MoveBgActor::MoveBGCreateHeap() { if (!CreateHeap()) { diff --git a/src/d/d_bg_w.cpp b/src/d/d_bg_w.cpp index ecbc7fa6d3..64a2df2afd 100644 --- a/src/d/d_bg_w.cpp +++ b/src/d/d_bg_w.cpp @@ -2485,5 +2485,5 @@ dBgW* dBgW_NewSet(cBgD_t* pbgd, u32 flags, Mtx* pbase_mtx) { return nw; } -extern u8 struct_80450F88[8]; -u8 struct_80450F88[8]; +DUSK_GAME_EXTERN u8 struct_80450F88[8]; +DUSK_GAME_DATA u8 struct_80450F88[8]; diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index ed0de09b63..888f9d9ccf 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -196,7 +196,7 @@ int dCamMapToolData::Set(s32 param_0, s32 roomNo, fopAc_ac_c* param_2, u16 param return 0; } -engine_fn dCamera_c::engine_tbl[] = { +DUSK_GAME_DATA engine_fn dCamera_c::engine_tbl[] = { &dCamera_c::letCamera, &dCamera_c::chaseCamera, &dCamera_c::lockonCamera, &dCamera_c::talktoCamera, &dCamera_c::subjectCamera, &dCamera_c::fixedPositionCamera, &dCamera_c::fixedFrameCamera, &dCamera_c::towerCamera, &dCamera_c::rideCamera, diff --git a/src/d/d_cc_d.cpp b/src/d/d_cc_d.cpp index 6cc5ab63e3..7edb0f9d07 100644 --- a/src/d/d_cc_d.cpp +++ b/src/d/d_cc_d.cpp @@ -259,7 +259,7 @@ u8 dCcD_GObjInf::GetTgHitObjSe() { } } -Z2SoundID const dCcD_GObjInf::m_hitSeID[24] = { +DUSK_GAME_DATA Z2SoundID const dCcD_GObjInf::m_hitSeID[24] = { Z2SE_HIT_DUMMY_CANCEL, Z2SE_HIT_SWORD, Z2SE_HIT_SHIELD_ATTACK, Z2SE_HIT_WOLFKICK, Z2SE_HIT_WOLFBITE, Z2SE_HIT_WOOD_WEAPON, Z2SE_HIT_HAMMER, Z2SE_HIT_ARROW_STICK, Z2SE_HIT_HOOKSHOT_STICK, diff --git a/src/d/d_cc_s.cpp b/src/d/d_cc_s.cpp index 2a19de3dda..6a1d0c332c 100644 --- a/src/d/d_cc_s.cpp +++ b/src/d/d_cc_s.cpp @@ -872,7 +872,7 @@ void dCcS::MassClear() { } // clang-format off -bool dCcS::m_mtrl_hit_tbl[64] = { +DUSK_GAME_DATA bool dCcS::m_mtrl_hit_tbl[64] = { true, true, true, true, true, true, true, true, false, true, false, false, false, false, false, false, false, false, true, false, false, false, false, false, diff --git a/src/d/d_com_inf_actor.cpp b/src/d/d_com_inf_actor.cpp index 772ad8542a..0c80f9b1ab 100644 --- a/src/d/d_com_inf_actor.cpp +++ b/src/d/d_com_inf_actor.cpp @@ -8,11 +8,11 @@ #include "d/d_com_inf_actor.h" #include -dComIfAc_info_c g_dComIfAc_gameInfo = { +DUSK_GAME_DATA dComIfAc_info_c g_dComIfAc_gameInfo = { 0, // field_0x0 false, // mPause }; -dComIfGoat_info_c g_dComIfGoat_gameInfo = { +DUSK_GAME_DATA dComIfGoat_info_c g_dComIfGoat_gameInfo = { NULL, // field_0x0 }; diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index 93fc15ca8f..0df7475116 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -1207,9 +1207,9 @@ void dComIfG_inf_c::createBaseCsr() { } #endif -GXColor g_clearColor = {0, 0, 0, 0}; +DUSK_GAME_DATA GXColor g_clearColor = {0, 0, 0, 0}; -GXColor g_blackColor = {0, 0, 0, 255}; +DUSK_GAME_DATA GXColor g_blackColor = {0, 0, 0, 255}; int dComIfG_changeOpeningScene(scene_class* i_scene, s16 i_procName) { dComIfGp_offEnableNextStage(); @@ -1228,7 +1228,7 @@ int dComIfG_changeOpeningScene(scene_class* i_scene, s16 i_procName) { return 1; } -dComIfG_inf_c g_dComIfG_gameInfo; +DUSK_GAME_DATA dComIfG_inf_c g_dComIfG_gameInfo; BOOL dComIfG_resetToOpening(scene_class* i_scene) { #if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG @@ -2987,6 +2987,6 @@ u8 dComIfGs_staffroll_next_go_check() { return envLight->staffroll_next_timer; } -GXColor g_whiteColor = {255, 255, 255, 255}; +DUSK_GAME_DATA GXColor g_whiteColor = {255, 255, 255, 255}; -GXColor g_saftyWhiteColor = {160, 160, 160, 255}; +DUSK_GAME_DATA GXColor g_saftyWhiteColor = {160, 160, 160, 255}; diff --git a/src/d/d_com_static.cpp b/src/d/d_com_static.cpp index 585d39869b..bc6f99afbf 100644 --- a/src/d/d_com_static.cpp +++ b/src/d/d_com_static.cpp @@ -19,7 +19,7 @@ #include #include -s16 const daObjMovebox::Act_c::M_dir_base[4] = { +DUSK_GAME_DATA s16 const daObjMovebox::Act_c::M_dir_base[4] = { 0x0000, 0x4000, -0x8000, @@ -132,17 +132,17 @@ void daSus_c::room_c::reset() { } } -daSus_c::data_c daSus_c::mData[0x20]; +DUSK_GAME_DATA daSus_c::data_c daSus_c::mData[0x20]; -daSus_c::room_c daSus_c::mRoom[0x40]; +DUSK_GAME_DATA daSus_c::room_c daSus_c::mRoom[0x40]; #if DEBUG daCanBall_c::Hio_c daCanBall_c::mHIO; #endif -s16 daArrow_c::m_count; +DUSK_GAME_DATA s16 daArrow_c::m_count; -s16 daSus_c::mSetTop; +DUSK_GAME_DATA s16 daSus_c::mSetTop; int daSus_c::newData(s8 i_roomNo, cXyz const& param_1, cXyz const& param_2, u8 param_3, u8 param_4, u8 i_type) { @@ -334,17 +334,17 @@ void daNpcKakashi_clrSuccessCount() { dComIfGs_setTmpReg(0xFEFF, 0); } -bool daYkgr_c::m_flag; +DUSK_GAME_DATA bool daYkgr_c::m_flag; -bool daYkgr_c::m_alpha_flag; +DUSK_GAME_DATA bool daYkgr_c::m_alpha_flag; -u8 daYkgr_c::m_alpha; +DUSK_GAME_DATA u8 daYkgr_c::m_alpha; -f32 daYkgr_c::m_aim_rate; +DUSK_GAME_DATA f32 daYkgr_c::m_aim_rate; -dPath* daYkgr_c::m_path; +DUSK_GAME_DATA dPath* daYkgr_c::m_path; -JPABaseEmitter* daYkgr_c::m_emitter; +DUSK_GAME_DATA JPABaseEmitter* daYkgr_c::m_emitter; const char* daSetBgObj_c::getArcName(fopAc_ac_c* i_this) { static char arcName[8]; @@ -362,23 +362,23 @@ const char* daSetBgObj_c::getArcName(fopAc_ac_c* i_this) { return arcName; } -f32 const daDsh_c::OPEN_SIZE = 270.1f; +DUSK_GAME_DATA f32 const daDsh_c::OPEN_SIZE = 270.1f; -f32 const daDsh_c::OPEN_ACCEL = 10.0f; +DUSK_GAME_DATA f32 const daDsh_c::OPEN_ACCEL = 10.0f; -f32 const daDsh_c::OPEN_SPEED = -40.0f; +DUSK_GAME_DATA f32 const daDsh_c::OPEN_SPEED = -40.0f; -f32 const daDsh_c::OPEN_BOUND_SPEED = -30.0f; +DUSK_GAME_DATA f32 const daDsh_c::OPEN_BOUND_SPEED = -30.0f; -f32 const daDsh_c::OPEN_BOUND_RATIO = -0.4f; +DUSK_GAME_DATA f32 const daDsh_c::OPEN_BOUND_RATIO = -0.4f; -f32 const daDsh_c::CLOSE_ACCEL = 10.0f; +DUSK_GAME_DATA f32 const daDsh_c::CLOSE_ACCEL = 10.0f; -f32 const daDsh_c::CLOSE_SPEED = 40.0f; +DUSK_GAME_DATA f32 const daDsh_c::CLOSE_SPEED = 40.0f; -f32 const daDsh_c::CLOSE_BOUND_SPEED = 30.0f; +DUSK_GAME_DATA f32 const daDsh_c::CLOSE_BOUND_SPEED = 30.0f; -f32 const daDsh_c::CLOSE_BOUND_RATIO = -0.4f; +DUSK_GAME_DATA f32 const daDsh_c::CLOSE_BOUND_RATIO = -0.4f; int daTagStream_c::checkArea(cXyz const* param_0) { cXyz relativePos; @@ -391,11 +391,11 @@ int daTagStream_c::checkArea(cXyz const* param_0) { return 0; } -daMirror_c::entryModelFunc daMirror_c::m_entryModel = NULL; +DUSK_GAME_DATA daMirror_c::entryModelFunc daMirror_c::m_entryModel = NULL; -daTagStream_c* daTagStream_c::m_top; +DUSK_GAME_DATA daTagStream_c* daTagStream_c::m_top; -daMirror_c* daMirror_c::m_myObj; +DUSK_GAME_DATA daMirror_c* daMirror_c::m_myObj; int daMirror_c::entry(J3DModel* param_0) { if (m_myObj == NULL) { @@ -413,11 +413,11 @@ bool daMirror_c::remove() { return true; } -dGrass_packet_c::deleteFunc dGrass_packet_c::m_deleteRoom = NULL; +DUSK_GAME_DATA dGrass_packet_c::deleteFunc dGrass_packet_c::m_deleteRoom = NULL; -daGrass_c* daGrass_c::m_myObj; +DUSK_GAME_DATA daGrass_c* daGrass_c::m_myObj; -dGrass_packet_c* daGrass_c::m_grass; +DUSK_GAME_DATA dGrass_packet_c* daGrass_c::m_grass; void daGrass_c::deleteRoomGrass(int param_0) { if (m_grass) { @@ -425,9 +425,9 @@ void daGrass_c::deleteRoomGrass(int param_0) { } } -dFlower_packet_c::deleteFunc dFlower_packet_c::m_deleteRoom = NULL; +DUSK_GAME_DATA dFlower_packet_c::deleteFunc dFlower_packet_c::m_deleteRoom = NULL; -dFlower_packet_c* daGrass_c::m_flower; +DUSK_GAME_DATA dFlower_packet_c* daGrass_c::m_flower; void daGrass_c::deleteRoomFlower(int param_0) { if (m_flower != NULL) { @@ -435,7 +435,7 @@ void daGrass_c::deleteRoomFlower(int param_0) { } } -daMP_c* daMP_c::m_myObj; +DUSK_GAME_DATA daMP_c* daMP_c::m_myObj; u32 daMP_c::daMP_c_Get_MovieRestFrame() { JUT_ASSERT(668, m_myObj != NULL); @@ -462,7 +462,7 @@ void daMP_c::daMP_c_THPPlayerPause() { m_myObj->mpTHPPause(); } -daTagMagne_c* daTagMagne_c::mTagMagne; +DUSK_GAME_DATA daTagMagne_c* daTagMagne_c::mTagMagne; int daTagMagne_c::checkMagnetCode(cBgS_PolyInfo& poly) { #if DEBUG @@ -508,9 +508,9 @@ int daTagMagne_c::checkMagneC() { return 0; } -u8 daTagMist_c::mPlayerNo; +DUSK_GAME_DATA u8 daTagMist_c::mPlayerNo; -bool daObjCarry_c::mSaveFlag; +DUSK_GAME_DATA bool daObjCarry_c::mSaveFlag; u8 daTagMist_c::getPlayerNo() { return mPlayerNo; @@ -528,7 +528,7 @@ bool daObjCarry_c::chkSaveFlag() { return mSaveFlag == true; } -cXyz daObjCarry_c::mPos[5]; +DUSK_GAME_DATA cXyz daObjCarry_c::mPos[5]; const cXyz& daObjCarry_c::getPos(int param_0) { #if DEBUG @@ -548,7 +548,7 @@ void daObjCarry_c::savePos(int param_0, cXyz param_1) { mPos[param_0] = param_1; } -u8 daObjCarry_c::mSttsFlag[5]; +DUSK_GAME_DATA u8 daObjCarry_c::mSttsFlag[5]; void daObjCarry_c::onSttsFlag(int idx, u8 flag) { #if DEBUG @@ -577,7 +577,7 @@ u8 daObjCarry_c::chkSttsFlag(int idx, u8 flag) { return cLib_checkBit(mSttsFlag[idx], flag) > 0; } -s8 daObjCarry_c::mRoomNo[5]; +DUSK_GAME_DATA s8 daObjCarry_c::mRoomNo[5]; void daObjCarry_c::setRoomNo(int idx, s8 roomNo) { #if DEBUG diff --git a/src/d/d_debug_viewer.cpp b/src/d/d_debug_viewer.cpp index 288e073259..b88f095ff9 100644 --- a/src/d/d_debug_viewer.cpp +++ b/src/d/d_debug_viewer.cpp @@ -8,8 +8,8 @@ #include "JSystem/JUtility/JUTDbPrint.h" #include "JSystem/JUtility/JUTReport.h" -J3DPacket* l_drawPacketList[1000]; -int l_drawPacketListNum; +DUSK_GAME_DATA J3DPacket* l_drawPacketList[1000]; +DUSK_GAME_DATA int l_drawPacketListNum; J3DPacket* dDbVw_setDrawPacketList(J3DPacket* i_packet, int i_bufferType) { if (i_packet == NULL) { diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index 2f099f2c2a..a45b681693 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -67,7 +67,7 @@ static void unpause_streams(bool require_prelaunch_hidden) { } // namespace #endif -s16 dDemo_c::m_branchId = -1; +DUSK_GAME_DATA s16 dDemo_c::m_branchId = -1; namespace { class jstudio_tAdaptor_message : public JStudio::TAdaptor_message { @@ -232,41 +232,41 @@ f32 dDemo_actor_c::getPrm_Morf() { } } -dDemo_system_c* dDemo_c::m_system; +DUSK_GAME_DATA dDemo_system_c* dDemo_c::m_system; -JStudio::TControl* dDemo_c::m_control; +DUSK_GAME_DATA JStudio::TControl* dDemo_c::m_control; -JStudio_JStage::TCreateObject* dDemo_c::m_stage; +DUSK_GAME_DATA JStudio_JStage::TCreateObject* dDemo_c::m_stage; -JStudio_JAudio2::TCreateObject* dDemo_c::m_audio; +DUSK_GAME_DATA JStudio_JAudio2::TCreateObject* dDemo_c::m_audio; -dDemo_particle_c* dDemo_c::m_particle; +DUSK_GAME_DATA dDemo_particle_c* dDemo_c::m_particle; -JStudio::TCreateObject* dDemo_c::m_message; +DUSK_GAME_DATA JStudio::TCreateObject* dDemo_c::m_message; -JStudio::TFactory* dDemo_c::m_factory; +DUSK_GAME_DATA JStudio::TFactory* dDemo_c::m_factory; -jmessage_tControl* dDemo_c::m_mesgControl; +DUSK_GAME_DATA jmessage_tControl* dDemo_c::m_mesgControl; -dDemo_object_c* dDemo_c::m_object; +DUSK_GAME_DATA dDemo_object_c* dDemo_c::m_object; -const u8* dDemo_c::m_data; +DUSK_GAME_DATA const u8* dDemo_c::m_data; -int dDemo_c::m_frame; +DUSK_GAME_DATA int dDemo_c::m_frame; -cXyz* dDemo_c::m_translation; +DUSK_GAME_DATA cXyz* dDemo_c::m_translation; -f32 dDemo_c::m_rotationY; +DUSK_GAME_DATA f32 dDemo_c::m_rotationY; -u32 dDemo_c::m_frameNoMsg; +DUSK_GAME_DATA u32 dDemo_c::m_frameNoMsg; -s32 dDemo_c::m_mode; +DUSK_GAME_DATA s32 dDemo_c::m_mode; -u32 dDemo_c::m_status; +DUSK_GAME_DATA u32 dDemo_c::m_status; -u16 dDemo_c::m_branchType; +DUSK_GAME_DATA u16 dDemo_c::m_branchType; -const u8* dDemo_c::m_branchData; +DUSK_GAME_DATA const u8* dDemo_c::m_branchData; #if DEBUG u16 dDemo_c::m_branchNum = 0; diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp index b3c685092f..438e910bff 100644 --- a/src/d/d_drawlist.cpp +++ b/src/d/d_drawlist.cpp @@ -1811,7 +1811,7 @@ int dDlst_shadowControl_c::setSimple(cXyz* param_0, f32 param_1, f32 param_2, cX return 1; } -TGXTexObj dDlst_shadowControl_c::mSimpleTexObj; +DUSK_GAME_DATA TGXTexObj dDlst_shadowControl_c::mSimpleTexObj; void dDlst_shadowControl_c::setSimpleTex(ResTIMG const* i_timg) { mDoLib_setResTimgObj(i_timg, &mSimpleTexObj, 0, NULL); @@ -2027,15 +2027,15 @@ void dDlst_list_c::draw(dDlst_base_c** p_start, dDlst_base_c** p_end) { } } -dDlst_2DT2_c dDlst_list_c::mWipeDlst; +DUSK_GAME_DATA dDlst_2DT2_c dDlst_list_c::mWipeDlst; -GXColor dDlst_list_c::mWipeColor = {0, 0, 0, 0}; +DUSK_GAME_DATA GXColor dDlst_list_c::mWipeColor = {0, 0, 0, 0}; -u8 dDlst_list_c::mWipe; +DUSK_GAME_DATA u8 dDlst_list_c::mWipe; -f32 dDlst_list_c::mWipeRate; +DUSK_GAME_DATA f32 dDlst_list_c::mWipeRate; -f32 dDlst_list_c::mWipeSpeed; +DUSK_GAME_DATA f32 dDlst_list_c::mWipeSpeed; void dDlst_list_c::wipeIn(f32 i_wipeSpeed, GXColor& i_wipeColor) { mWipe = true; diff --git a/src/d/d_eye_hl.cpp b/src/d/d_eye_hl.cpp index 16161b5ee7..80cc416f17 100644 --- a/src/d/d_eye_hl.cpp +++ b/src/d/d_eye_hl.cpp @@ -35,7 +35,7 @@ void dEyeHL_c::remove() { dEyeHL_mng_c::remove(this); } -dEyeHL_c* dEyeHL_mng_c::m_obj; +DUSK_GAME_DATA dEyeHL_c* dEyeHL_mng_c::m_obj; void dEyeHL_mng_c::update() { dEyeHL_c* obj = m_obj; diff --git a/src/d/d_item.cpp b/src/d/d_item.cpp index cb525139db..8ca950a52a 100644 --- a/src/d/d_item.cpp +++ b/src/d/d_item.cpp @@ -2187,4 +2187,4 @@ int addBombCount(u8 i_bombType, u8 i_addNum) { return i_addNum; } -u8* dEnemyItem_c::mData; +DUSK_GAME_DATA u8* dEnemyItem_c::mData; diff --git a/src/d/d_item_data.cpp b/src/d/d_item_data.cpp index 2a84fb615a..9ff4321aa5 100644 --- a/src/d/d_item_data.cpp +++ b/src/d/d_item_data.cpp @@ -2,7 +2,7 @@ #include "d/d_item_data.h" -dItem_itemResource dItem_data::item_resource[] = { +DUSK_GAME_DATA dItem_itemResource dItem_data::item_resource[] = { {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x64, 0x0000}, {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x0, -0x1, 0x002D, 0x3C, 0x0000}, {"F_gD_rupy", 0x0004,-0x0001,-0x0001, 0x0007,-0x0001, 0x1, -0x1, 0x002D, 0x3C, 0x0000}, @@ -260,7 +260,7 @@ dItem_itemResource dItem_data::item_resource[] = { {"T_gD_key", 0x0003,-0x0001,-0x0001,-0x0001,-0x0001, -0x1, -0x1, 0x006E, 0x64, 0x0000}, }; -dItem_fieldItemResource dItem_data::field_item_res[] = { +DUSK_GAME_DATA dItem_fieldItemResource dItem_data::field_item_res[] = { {"Always", 0x0014,-0x0001, 0x0030, 0xFF, 0x1000}, {"Always", 0x0017,-0x0001, 0x0031, 0x0, 0x1000}, {"Always", 0x0017,-0x0001, 0x0031, 0x1, 0x1000}, @@ -518,7 +518,7 @@ dItem_fieldItemResource dItem_data::field_item_res[] = { {"T_g_key", 0x0003,-0x0001,-0x0001, 0xFF, 0x1000}, }; -dItem_itemInfo dItem_data::item_info[] = { +DUSK_GAME_DATA dItem_itemInfo dItem_data::item_info[] = { {15, 40, 30, 4}, {20, 70, 30, 4}, {20, 70, 30, 4}, {20, 70, 30, 4}, {20, 70, 30, 4}, {20, 70, 30, 4}, {20, 70, 30, 4}, {20, 70, 30, 4}, {20, 40, 30, 4}, {20, 40, 30, 4}, {40, 60, 30, 0}, {40, 60, 30, 0}, {40, 60, 30, 0}, {40, 60, 30, 0}, {20, 80, 50, 0}, diff --git a/src/d/d_k_wmark.cpp b/src/d/d_k_wmark.cpp index f986808068..80c2523c8a 100644 --- a/src/d/d_k_wmark.cpp +++ b/src/d/d_k_wmark.cpp @@ -14,7 +14,7 @@ #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_lib.h" -int dkWmark_c::m_nowID; +DUSK_GAME_DATA int dkWmark_c::m_nowID; int dkWmark_c::create() { static cXyz wolfFootScale(1.1f, 1.0f, 0.6f); diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index 048b8b844d..e6f155a989 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -107,9 +107,9 @@ static u16 lightMaskData[8] = { GX_LIGHT0, GX_LIGHT1, GX_LIGHT2, GX_LIGHT3, GX_LIGHT4, GX_LIGHT5, GX_LIGHT6, GX_LIGHT7, }; -dScnKy_env_light_c g_env_light; +DUSK_GAME_DATA dScnKy_env_light_c g_env_light; -Z2EnvSeMgr g_mEnvSeMgr; +DUSK_GAME_DATA Z2EnvSeMgr g_mEnvSeMgr; #if DEBUG dKankyo_HIO_c g_kankyoHIO; diff --git a/src/d/d_lib.cpp b/src/d/d_lib.cpp index 80aa72ff3c..91b7726459 100644 --- a/src/d/d_lib.cpp +++ b/src/d/d_lib.cpp @@ -32,7 +32,7 @@ static void dummy1(mDoExt_btkAnm* btk, cXyz& pos) { dDbVw_drawLineOpa(pos, pos, color, 0, 0); } -Quaternion ZeroQuat = { +DUSK_GAME_DATA Quaternion ZeroQuat = { 0.0f, 0.0f, 0.0f, @@ -316,11 +316,11 @@ u32 dLib_getExpandSizeFromAramArchive(JKRAramArchive* i_aramArchive, char const* return uVar1 > uVar5 ? uVar1 : uVar5; } -OSTime dLib_time_c::m_diffTime; +DUSK_GAME_DATA OSTime dLib_time_c::m_diffTime; -OSTime dLib_time_c::m_stopTime; +DUSK_GAME_DATA OSTime dLib_time_c::m_stopTime; -bool dLib_time_c::m_timeStopped; +DUSK_GAME_DATA bool dLib_time_c::m_timeStopped; OSTime dLib_time_c::getTime() { if (!m_timeStopped) { diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index 404123f594..88cc1d19ba 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -337,7 +337,7 @@ f32 renderingAmap_c::getIconSize(u8 i_typeGroup) const { return iconSize; } -dMap_prm_res_s* dMap_HIO_prm_res_dst_s::m_res; +DUSK_GAME_DATA dMap_prm_res_s* dMap_HIO_prm_res_dst_s::m_res; inline u8 twoValueLineInterpolation(u8 param_0, u8 param_1, f32 param_2) { return ((f32)param_0 + (param_2 * ((f32)param_1 - (f32)param_0))); diff --git a/src/d/d_map_path.cpp b/src/d/d_map_path.cpp index cafbb93e38..08591007ec 100644 --- a/src/d/d_map_path.cpp +++ b/src/d/d_map_path.cpp @@ -659,7 +659,7 @@ void dRenderingFDAmap_c::postRenderingMap() { dComIfGp_getCurrentGrafPort()->setup2D(); } -dMpath_n::dTexObjAggregate_c dMpath_n::m_texObjAgg; +DUSK_GAME_DATA dMpath_n::dTexObjAggregate_c dMpath_n::m_texObjAgg; void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_line) { s32 width = getDecorationLineWidth(p_line->field_0x1); diff --git a/src/d/d_map_path_dmap.cpp b/src/d/d_map_path_dmap.cpp index f2a41e8fd3..f9d2f4d5f9 100644 --- a/src/d/d_map_path_dmap.cpp +++ b/src/d/d_map_path_dmap.cpp @@ -226,11 +226,11 @@ void dMapInfo_n::getFloorParameter(f32 param_0, s8* i_floorNo, f32* param_2, f32 } } -s8 dMapInfo_c::mNowStayFloorNo; +DUSK_GAME_DATA s8 dMapInfo_c::mNowStayFloorNo; -int dMapInfo_c::mNowStayRoomNo; +DUSK_GAME_DATA int dMapInfo_c::mNowStayRoomNo; -u8 dMapInfo_c::mNowStayFloorNoDecisionFlg; +DUSK_GAME_DATA u8 dMapInfo_c::mNowStayFloorNoDecisionFlg; s8 dMapInfo_c::calcFloorNo(f32 param_0, bool i_chkMinMax, int i_roomNo) { f32 sp10; @@ -330,24 +330,24 @@ void dMapInfo_c::create() { void dMapInfo_c::remove() {} -dDrawPath_c::layer_data* dMpath_c::mLayerList; +DUSK_GAME_DATA dDrawPath_c::layer_data* dMpath_c::mLayerList; // these are needed for sinit, but its got reversed reg alloc? -f32 dMpath_c::mMinX = FLT_MAX; +DUSK_GAME_DATA f32 dMpath_c::mMinX = FLT_MAX; -f32 dMpath_c::mMaxX = -FLT_MAX; +DUSK_GAME_DATA f32 dMpath_c::mMaxX = -FLT_MAX; -f32 dMpath_c::mMinZ = FLT_MAX; +DUSK_GAME_DATA f32 dMpath_c::mMinZ = FLT_MAX; -f32 dMpath_c::mMaxZ = -FLT_MAX; +DUSK_GAME_DATA f32 dMpath_c::mMaxZ = -FLT_MAX; -f32 dMpath_c::mAllCenterX; +DUSK_GAME_DATA f32 dMpath_c::mAllCenterX; -f32 dMpath_c::mAllCenterZ; +DUSK_GAME_DATA f32 dMpath_c::mAllCenterZ; -f32 dMpath_c::mAllSizeX; +DUSK_GAME_DATA f32 dMpath_c::mAllSizeX; -f32 dMpath_c::mAllSizeZ; +DUSK_GAME_DATA f32 dMpath_c::mAllSizeZ; static bool data_80450E88; @@ -355,11 +355,11 @@ bool dMpath_c::isExistMapPathData() { return data_80450E88; } -int dMapInfo_c::mNextRoomNo = -1; +DUSK_GAME_DATA int dMapInfo_c::mNextRoomNo = -1; -s8 dMpath_c::mBottomFloorNo = 127; +DUSK_GAME_DATA s8 dMpath_c::mBottomFloorNo = 127; -s8 dMpath_c::mTopFloorNo = -128; +DUSK_GAME_DATA s8 dMpath_c::mTopFloorNo = -128; int dMpath_c::getTopBottomFloorNo(s8* i_topFloorNo, s8* i_bottomFloorNo) { if (isExistMapPathData()) { diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 4e3ddf25f2..4de8b2c5a4 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -2862,7 +2862,7 @@ u8 dMenu_Collect3D_c::getMaskMdlVisible() { return 2; } -f32 dMenu_Collect3D_c::mViewOffsetY = -100.0f; +DUSK_GAME_DATA f32 dMenu_Collect3D_c::mViewOffsetY = -100.0f; void dMenu_Collect3D_c::setupItem3D(Mtx param_0) { GXSetViewport(0.0f, mViewOffsetY, FB_WIDTH, FB_HEIGHT, 0.0f, 1.0f); diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index ec046959d6..17d581eeab 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -422,7 +422,7 @@ static f32 player_px; static f32 player_py; -dMenu_Dmap_c* dMenu_Dmap_c::myclass; +DUSK_GAME_DATA dMenu_Dmap_c* dMenu_Dmap_c::myclass; void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) { static u64 const c_tag[2] = { diff --git a/src/d/d_menu_dmap_map.cpp b/src/d/d_menu_dmap_map.cpp index e3239d3678..825142bb3a 100644 --- a/src/d/d_menu_dmap_map.cpp +++ b/src/d/d_menu_dmap_map.cpp @@ -16,7 +16,7 @@ #endif struct dMdm_HIO_prm_res_dst_s { - static void* m_res; + static DUSK_GAME_DATA void* m_res; }; bool renderingDmap_c::hasMap() const { @@ -288,7 +288,7 @@ void renderingDmap_c::afterDrawPath() { renderingPlusDoor_c::afterDrawPath(); } -void* dMdm_HIO_prm_res_dst_s::m_res; +DUSK_GAME_DATA void* dMdm_HIO_prm_res_dst_s::m_res; void dMenu_DmapMap_c::_create(u16 param_0, u16 param_1, u16 param_2, u16 param_3, void* res) { @@ -939,13 +939,13 @@ void dMenu_StageMapCtrl_c::_create(u16 param_0, u16 param_1, u16 param_2, u16 pa _create(param_0, param_1, param_2, param_3, var_r31, param_4); } -f32 dMenu_StageMapCtrl_c::m_zoomCenterMinX; +DUSK_GAME_DATA f32 dMenu_StageMapCtrl_c::m_zoomCenterMinX; -f32 dMenu_StageMapCtrl_c::m_zoomCenterMaxX; +DUSK_GAME_DATA f32 dMenu_StageMapCtrl_c::m_zoomCenterMaxX; -f32 dMenu_StageMapCtrl_c::m_zoomCenterMinZ; +DUSK_GAME_DATA f32 dMenu_StageMapCtrl_c::m_zoomCenterMinZ; -f32 dMenu_StageMapCtrl_c::m_zoomCenterMaxZ; +DUSK_GAME_DATA f32 dMenu_StageMapCtrl_c::m_zoomCenterMaxZ; void dMenu_StageMapCtrl_c::_create(u16 width, u16 height, u16 param_2, u16 param_3, s8 param_4, void* param_5) { diff --git a/src/d/d_menu_fishing.cpp b/src/d/d_menu_fishing.cpp index 6a3d0aefe8..75ba679df7 100644 --- a/src/d/d_menu_fishing.cpp +++ b/src/d/d_menu_fishing.cpp @@ -20,12 +20,12 @@ #include "dusk/version.hpp" typedef void (dMenu_Fishing_c::*initFunc)(); -initFunc map_init_process[] = { +DUSK_GAME_DATA initFunc map_init_process[] = { &dMenu_Fishing_c::wait_init, }; typedef void (dMenu_Fishing_c::*moveFunc)(); -moveFunc map_move_process[] = { +DUSK_GAME_DATA moveFunc map_move_process[] = { &dMenu_Fishing_c::wait_move, }; diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp index 64cd70cc0f..7b9558c1ce 100644 --- a/src/d/d_menu_fmap.cpp +++ b/src/d/d_menu_fmap.cpp @@ -93,7 +93,7 @@ static dMenu_Fmap_c::process move_process[30] = { &dMenu_Fmap_c::howl_demo3_move, }; -dMf_HIO_c* dMf_HIO_c::mMySelfPointer; +DUSK_GAME_DATA dMf_HIO_c* dMf_HIO_c::mMySelfPointer; dMf_HIO_c::dMf_HIO_c() { mMySelfPointer = this; @@ -136,7 +136,7 @@ const char* dMenuFmap_getStartStageName(void* i_fieldData) { return dComIfGp_getStartStageName(); } -dMenu_Fmap_c* dMenu_Fmap_c::MyClass; +DUSK_GAME_DATA dMenu_Fmap_c* dMenu_Fmap_c::MyClass; dMenu_Fmap_c::dMenu_Fmap_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i_cstick, u8 i_process, u8 i_regionCursor, u8 i_stageCursor, f32 i_stageTransX, diff --git a/src/d/d_menu_fmap_map.cpp b/src/d/d_menu_fmap_map.cpp index c500aff0be..b2477b8b06 100644 --- a/src/d/d_menu_fmap_map.cpp +++ b/src/d/d_menu_fmap_map.cpp @@ -505,7 +505,7 @@ void dMenu_FmapMap_c::_delete() { } } -const dMfm_HIO_prm_res_src_s dMfm_HIO_prm_res_src_s::m_other = {30}; +DUSK_GAME_DATA const dMfm_HIO_prm_res_src_s dMfm_HIO_prm_res_src_s::m_other = {30}; void dMenu_FmapMap_c::draw() { { int unused; } diff --git a/src/d/d_menu_save.cpp b/src/d/d_menu_save.cpp index f97e50d331..78ebd3e064 100644 --- a/src/d/d_menu_save.cpp +++ b/src/d/d_menu_save.cpp @@ -656,7 +656,7 @@ void dMenu_save_c::_delete() { } typedef void (dMenu_save_c::*menuProcFunc)(); -menuProcFunc MenuSaveProc[62] = { +DUSK_GAME_DATA menuProcFunc MenuSaveProc[62] = { &dMenu_save_c::saveQuestion, &dMenu_save_c::saveQuestion2, &dMenu_save_c::saveQuestion21, diff --git a/src/d/d_menu_window.cpp b/src/d/d_menu_window.cpp index 2be79d053e..7873632265 100644 --- a/src/d/d_menu_window.cpp +++ b/src/d/d_menu_window.cpp @@ -219,7 +219,7 @@ static BOOL dMw_isMenuRing() { } typedef void (dMw_c::*initFunc)(u8); -initFunc init_proc[] = { +DUSK_GAME_DATA initFunc init_proc[] = { &dMw_c::key_wait_init, &dMw_c::ring_open_init, &dMw_c::ring_move_init, @@ -258,7 +258,7 @@ initFunc init_proc[] = { }; typedef void (dMw_c::*procFunc)(); -procFunc move_proc[] = { +DUSK_GAME_DATA procFunc move_proc[] = { &dMw_c::key_wait_proc, &dMw_c::ring_open_proc, &dMw_c::ring_move_proc, diff --git a/src/d/d_menu_window_HIO.cpp b/src/d/d_menu_window_HIO.cpp index 053aeaf837..6302b7b897 100644 --- a/src/d/d_menu_window_HIO.cpp +++ b/src/d/d_menu_window_HIO.cpp @@ -1321,6 +1321,6 @@ void dMw_DHIO_c::bitCheck() { } #endif -dMw_HIO_c g_mwHIO; +DUSK_GAME_DATA dMw_HIO_c g_mwHIO; -dMw_DHIO_c g_mwDHIO; +DUSK_GAME_DATA dMw_DHIO_c g_mwDHIO; diff --git a/src/d/d_meter2_info.cpp b/src/d/d_meter2_info.cpp index 63e22056f5..879ab5d386 100644 --- a/src/d/d_meter2_info.cpp +++ b/src/d/d_meter2_info.cpp @@ -594,7 +594,7 @@ BOOL dMeter2Info_c::isDirectUseItem(int param_0) { return (mDirectUseItem & (u8)(1 << param_0)) ? TRUE : FALSE; } -dMeter2Info_c g_meter2_info; +DUSK_GAME_DATA dMeter2Info_c g_meter2_info; int dMeter2Info_c::setMeterString(s32 i_string) { if (mMeterString != 0) { @@ -1742,7 +1742,7 @@ bool dMeter2Info_isItemOpenCheck() { return true; } -dMenu_LetterData dMenu_Letter::letter_data[64] = { +DUSK_GAME_DATA dMenu_LetterData dMenu_Letter::letter_data[64] = { {0x09C5, 0x0A29, 0x0A8D, 0x010B}, {0x09C6, 0x0A2A, 0x0A8E, 0x0237}, {0x09C7, 0x0A2B, 0x0A8F, 0x0236}, {0x09C8, 0x0A2C, 0x0A90, 0x0037}, {0x09C9, 0x0A2D, 0x0A91, 0x0039}, {0x09CA, 0x0A2E, 0x0A92, 0x0067}, diff --git a/src/d/d_meter_HIO.cpp b/src/d/d_meter_HIO.cpp index 584a2852f6..39b5b3b7ea 100644 --- a/src/d/d_meter_HIO.cpp +++ b/src/d/d_meter_HIO.cpp @@ -4310,12 +4310,12 @@ void dMeter_cursorHIO_c::genMessage(JORMContext* mctx) { } #endif -dMeter_menuHIO_c g_menuHIO; +DUSK_GAME_DATA dMeter_menuHIO_c g_menuHIO; -dMeter_drawHIO_c g_drawHIO; +DUSK_GAME_DATA dMeter_drawHIO_c g_drawHIO; -dMeter_ringHIO_c g_ringHIO; +DUSK_GAME_DATA dMeter_ringHIO_c g_ringHIO; -dMeter_fmapHIO_c g_fmapHIO; +DUSK_GAME_DATA dMeter_fmapHIO_c g_fmapHIO; -dMeter_cursorHIO_c g_cursorHIO; +DUSK_GAME_DATA dMeter_cursorHIO_c g_cursorHIO; diff --git a/src/d/d_model.cpp b/src/d/d_model.cpp index 36e77e55fa..f1e58f2961 100644 --- a/src/d/d_model.cpp +++ b/src/d/d_model.cpp @@ -97,7 +97,7 @@ dMdl_c* dMdl_mng_c::entry(J3DModelData* i_modelData, u16 i_materialId, dKy_tevst return model; } -dMdl_mng_c* dMdl_mng_c::m_myObj; +DUSK_GAME_DATA dMdl_mng_c* dMdl_mng_c::m_myObj; void dMdl_mng_c::create() { m_myObj = JKR_NEW dMdl_mng_c(); diff --git a/src/d/d_msg_flow.cpp b/src/d/d_msg_flow.cpp index c461b179e1..094189679c 100644 --- a/src/d/d_msg_flow.cpp +++ b/src/d/d_msg_flow.cpp @@ -745,7 +745,7 @@ int dMsgFlow_c::getParam(u8* params) { return *(BE(int)*)params; } -queryFunc dMsgFlow_c::mQueryList[53] = { +DUSK_GAME_DATA queryFunc dMsgFlow_c::mQueryList[53] = { &dMsgFlow_c::query005, &dMsgFlow_c::query001, &dMsgFlow_c::query002, &dMsgFlow_c::query003, &dMsgFlow_c::query006, &dMsgFlow_c::query007, &dMsgFlow_c::query004, &dMsgFlow_c::query008, &dMsgFlow_c::query009, &dMsgFlow_c::query010, &dMsgFlow_c::query011, &dMsgFlow_c::query012, @@ -1730,7 +1730,7 @@ u16 dMsgFlow_c::query053(mesg_flow_node_branch* i_flowNode_p, fopAc_ac_c* i_spea return ret; } -eventFunc dMsgFlow_c::mEventList[43] = { +DUSK_GAME_DATA eventFunc dMsgFlow_c::mEventList[43] = { &dMsgFlow_c::event000, &dMsgFlow_c::event001, &dMsgFlow_c::event002, &dMsgFlow_c::event003, &dMsgFlow_c::event004, &dMsgFlow_c::event005, &dMsgFlow_c::event006, &dMsgFlow_c::event007, &dMsgFlow_c::event008, &dMsgFlow_c::event009, &dMsgFlow_c::event010, &dMsgFlow_c::event011, diff --git a/src/d/d_msg_object.cpp b/src/d/d_msg_object.cpp index fded5622e4..712ee61584 100644 --- a/src/d/d_msg_object.cpp +++ b/src/d/d_msg_object.cpp @@ -425,7 +425,7 @@ static void dummyStrings() { DEAD_STRING(""); } -dMsgObject_HIO_c g_MsgObject_HIO_c; +DUSK_GAME_DATA dMsgObject_HIO_c g_MsgObject_HIO_c; int dMsgObject_c::_execute() { field_0x4c7 = 0; diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp index fd85da423f..2f19f23c83 100644 --- a/src/d/d_msg_scrn_3select.cpp +++ b/src/d/d_msg_scrn_3select.cpp @@ -28,7 +28,7 @@ bool hit_choice_pane(CPaneMgr* pane, f32 padding) { #endif typedef void (dMsgScrn3Select_c::*processFn)(); -processFn process[] = { +DUSK_GAME_DATA processFn process[] = { &dMsgScrn3Select_c::open1Proc, &dMsgScrn3Select_c::open2Proc, &dMsgScrn3Select_c::waitProc, &dMsgScrn3Select_c::selectProc, &dMsgScrn3Select_c::changeProc, &dMsgScrn3Select_c::closeProc, }; diff --git a/src/d/d_msg_unit.cpp b/src/d/d_msg_unit.cpp index 55fc588d4e..130b5da906 100644 --- a/src/d/d_msg_unit.cpp +++ b/src/d/d_msg_unit.cpp @@ -379,4 +379,4 @@ void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_ } #endif -dMsgUnit_c g_msg_unit; +DUSK_GAME_DATA dMsgUnit_c g_msg_unit; diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index c3f4e9067f..4bcdc7af5b 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -35,7 +35,7 @@ #endif extern "C" { - extern dPa_particleTracePcallBack_c JPTracePCB4; + DUSK_GAME_EXTERN dPa_particleTracePcallBack_c JPTracePCB4; } void dPa_cleanupGX() { @@ -125,11 +125,11 @@ u32 dummy(JPABaseEmitter* i_emitter) { return i_emitter->getAge(); } -dPa_modelEcallBack dPa_modelEcallBack::mEcallback; +DUSK_GAME_DATA dPa_modelEcallBack dPa_modelEcallBack::mEcallback; -dPa_modelPcallBack dPa_modelEcallBack::mPcallback; +DUSK_GAME_DATA dPa_modelPcallBack dPa_modelEcallBack::mPcallback; -dPa_modelEcallBack::model_c* dPa_modelEcallBack::mModel; +DUSK_GAME_DATA dPa_modelEcallBack::model_c* dPa_modelEcallBack::mModel; #if DEBUG u8 dPa_modelEcallBack::mNum; @@ -1120,7 +1120,7 @@ void dPa_control_c::level_c::cutTable(dPa_control_c::level_c::emitter_c* i_emitt i_emitter->cleanup(); } -dPa_selectTexEcallBack dPa_control_c::mTsubo[] = { +DUSK_GAME_DATA dPa_selectTexEcallBack dPa_control_c::mTsubo[] = { dPa_selectTexEcallBack(0), dPa_selectTexEcallBack(1), dPa_selectTexEcallBack(2), @@ -1137,35 +1137,35 @@ static GXColor l_lifeBallColor[3] = { {0xEB, 0xD7, 0x2F, 0xFF}, }; -dPa_setColorEcallBack dPa_control_c::mLifeBall[3] = { +DUSK_GAME_DATA dPa_setColorEcallBack dPa_control_c::mLifeBall[3] = { dPa_setColorEcallBack(l_lifeBallColor[0]), dPa_setColorEcallBack(l_lifeBallColor[1]), dPa_setColorEcallBack(l_lifeBallColor[2]), }; -JPAEmitterManager* dPa_control_c::mEmitterMng; +DUSK_GAME_DATA JPAEmitterManager* dPa_control_c::mEmitterMng; -dPa_wbPcallBack_c dPa_control_c::mWaterBubblePcallBack; +DUSK_GAME_DATA dPa_wbPcallBack_c dPa_control_c::mWaterBubblePcallBack; -dPa_fsenthPcallBack dPa_control_c::mFsenthPcallBack; +DUSK_GAME_DATA dPa_fsenthPcallBack dPa_control_c::mFsenthPcallBack; -dPa_light8EcallBack dPa_control_c::mLight8EcallBack; +DUSK_GAME_DATA dPa_light8EcallBack dPa_control_c::mLight8EcallBack; -dPa_light8PcallBack dPa_control_c::mLight8PcallBack; +DUSK_GAME_DATA dPa_light8PcallBack dPa_control_c::mLight8PcallBack; -dPa_gen_b_light8EcallBack dPa_control_c::m_b_Light8EcallBack; +DUSK_GAME_DATA dPa_gen_b_light8EcallBack dPa_control_c::m_b_Light8EcallBack; -dPa_gen_b_light8PcallBack dPa_control_c::m_b_Light8PcallBack; +DUSK_GAME_DATA dPa_gen_b_light8PcallBack dPa_control_c::m_b_Light8PcallBack; -dPa_gen_d_light8EcallBack dPa_control_c::m_d_Light8EcallBack; +DUSK_GAME_DATA dPa_gen_d_light8EcallBack dPa_control_c::m_d_Light8EcallBack; -dPa_gen_d_light8PcallBack dPa_control_c::m_d_Light8PcallBack; +DUSK_GAME_DATA dPa_gen_d_light8PcallBack dPa_control_c::m_d_Light8PcallBack; -u8 dPa_control_c::mStatus; +DUSK_GAME_DATA u8 dPa_control_c::mStatus; -Mtx dPa_control_c::mWindViewMatrix; +DUSK_GAME_DATA Mtx dPa_control_c::mWindViewMatrix; -dPa_particleTracePcallBack_c dPa_control_c::mParticleTracePCB; +DUSK_GAME_DATA dPa_particleTracePcallBack_c dPa_control_c::mParticleTracePCB; dPa_control_c::dPa_control_c() { #if DEBUG diff --git a/src/d/d_particle_copoly.cpp b/src/d/d_particle_copoly.cpp index f14e90e488..a6ce6e573e 100644 --- a/src/d/d_particle_copoly.cpp +++ b/src/d/d_particle_copoly.cpp @@ -214,24 +214,24 @@ void dPaPoF_c::clearFourAllID() { clearTwoAllID(); } -const dPaPoT_c::effTypeFunc dPaPoT_c::m_typeTwoData[] = { +DUSK_GAME_DATA const dPaPoT_c::effTypeFunc dPaPoT_c::m_typeTwoData[] = { &dPaPoT_c::getCenterEffType, &dPaPoT_c::getLeftEffType, &dPaPoT_c::getRightEffType, }; -const dPaPoT_c::emitterFunc dPaPoT_c::m_emitterTwoData[] = { +DUSK_GAME_DATA const dPaPoT_c::emitterFunc dPaPoT_c::m_emitterTwoData[] = { &dPaPoT_c::getCenterEmitter, &dPaPoT_c::getLeftEmitter, &dPaPoT_c::getRightEmitter, }; -const dPaPoF_c::effTypeFunc dPaPoF_c::m_typeFourData[] = { +DUSK_GAME_DATA const dPaPoF_c::effTypeFunc dPaPoF_c::m_typeFourData[] = { &dPaPoF_c::getCenterEffType, &dPaPoF_c::getLeftEffType, &dPaPoF_c::getRightEffType, &dPaPoF_c::getBackLeftEffType, &dPaPoF_c::getBackRightEffType, }; -const dPaPoF_c::emitterFunc dPaPoF_c::m_emitterFourData[] = { +DUSK_GAME_DATA const dPaPoF_c::emitterFunc dPaPoF_c::m_emitterFourData[] = { &dPaPoF_c::getCenterEmitter, &dPaPoF_c::getLeftEmitter, &dPaPoF_c::getRightEmitter, &dPaPoF_c::getBackLeftEmitter, &dPaPoF_c::getBackRightEmitter, }; diff --git a/src/d/d_particle_name.cpp b/src/d/d_particle_name.cpp index 68f4dd8d3a..b9a3cd9ea0 100644 --- a/src/d/d_particle_name.cpp +++ b/src/d/d_particle_name.cpp @@ -2,7 +2,7 @@ #include "d/d_particle_name.h" -u16 dPa_name::j_o_id[5] = { +DUSK_GAME_DATA u16 dPa_name::j_o_id[5] = { ID_ZI_J_O_DIGTGA_A, ID_ZI_J_O_DIGTGA_B, ID_ZI_J_O_FIRE_A, @@ -10,7 +10,7 @@ u16 dPa_name::j_o_id[5] = { ID_ZI_J_O_KAGEROU, }; -u16 dPa_name::s_o_id[14] = { +DUSK_GAME_DATA u16 dPa_name::s_o_id[14] = { dPa_RM(ID_ZI_S_O_FIRE2_A), dPa_RM(ID_ZI_S_O_FIRE2_B), dPa_RM(ID_ZI_S_O_KAGEROU2), @@ -35,7 +35,7 @@ DUSK_CONST char* dPa_name::getName(u32 i_id) { return jpaName[i_id]; } -DUSK_CONST char* dPa_name::jpaName[] = { +DUSK_GAME_DATA DUSK_CONST char* dPa_name::jpaName[] = { "AK_JN_M_breakFaceRock00.jpa", "AK_JN_M_breakGreatRock00.jpa", "AK_JN_M_breakLittleRock00.jpa", diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index bb982c4afb..b224343983 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -581,7 +581,7 @@ int dRes_info_c::setRes(JKRArchive* i_archive, JKRHeap* i_heap) { return rt >> 0x1F; } -bool data_8074C6C0_debug; +DUSK_GAME_DATA bool data_8074C6C0_debug; int dRes_info_c::setRes() { if (mArchive == NULL) { diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp index 0e84b060db..ab82ca1b9b 100644 --- a/src/d/d_s_play.cpp +++ b/src/d/d_s_play.cpp @@ -93,9 +93,9 @@ static OSTime resPreLoadTime1; static dScnPly_preLoad_HIO_c g_preLoadHIO; -s8 dScnPly_c::pauseTimer; +DUSK_GAME_DATA s8 dScnPly_c::pauseTimer; -s8 dScnPly_c::nextPauseTimer; +DUSK_GAME_DATA s8 dScnPly_c::nextPauseTimer; #if DEBUG u8 dScnPly_c::debugPause; @@ -1393,9 +1393,9 @@ static int phase_3(dScnPly_c* i_this) { return cPhs_NEXT_e; } -dScnPly_reg_HIO_c g_regHIO; +DUSK_GAME_DATA dScnPly_reg_HIO_c g_regHIO; -dScnPly_env_HIO_c g_envHIO; +DUSK_GAME_DATA dScnPly_env_HIO_c g_envHIO; #if DEBUG dScnPly_preset_HIO_c g_presetHIO; diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index af2a6db28a..cc0deb2213 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -2089,7 +2089,7 @@ const #if PLATFORM_SHIELD s16 #else -u16 +DUSK_GAME_DATA u16 #endif dSv_event_flag_c::saveBitLabels[822] = { UNUSED, TEST_001, TEST_002, TEST_003, TEST_004, F_0001, F_0002, F_0003, F_0004, F_0005, F_0006, @@ -2166,7 +2166,7 @@ dSv_event_flag_c::saveBitLabels[822] = { F_0816, F_0817, F_0818, F_0819, F_0820, KORO2_ALLCLEAR, }; -u16 const dSv_event_tmp_flag_c::tempBitLabels[185] = { +DUSK_GAME_DATA u16 const dSv_event_tmp_flag_c::tempBitLabels[185] = { UNUSED, UNUSED, T_0002, T_0003, T_0004, T_0005, T_0006, T_0007, T_0001, T_0008, T_0009, T_0010, T_0011, T_0012, T_0013, T_0014, T_0015, T_0016, T_0017, T_0018, T_0019, T_0020, T_0021, T_0022, T_0023, T_0024, T_0025, T_0026, T_0027, T_0028, T_0029, T_0030, T_0031, T_0032, TREG_000, diff --git a/src/d/d_save_HIO.cpp b/src/d/d_save_HIO.cpp index 013bc709bd..1f2d2bb212 100644 --- a/src/d/d_save_HIO.cpp +++ b/src/d/d_save_HIO.cpp @@ -186,4 +186,4 @@ void dSvBit_HIO_c::init() { mTransformFlag = field_0x49d = dComIfGs_isEventBit(dSv_event_flag_c::M_077); } -dSvBit_HIO_c g_save_bit_HIO; +DUSK_GAME_DATA dSvBit_HIO_c g_save_bit_HIO; diff --git a/src/d/d_scope.cpp b/src/d/d_scope.cpp index 2f68f534ed..cf58a8a6c2 100644 --- a/src/d/d_scope.cpp +++ b/src/d/d_scope.cpp @@ -10,14 +10,14 @@ #include "JSystem/J2DGraph/J2DOrthoGraph.h" typedef void (dScope_c::*initFunc)(); -initFunc init_process[] = { +DUSK_GAME_DATA initFunc init_process[] = { &dScope_c::open_init, &dScope_c::move_init, &dScope_c::close_init, }; typedef void (dScope_c::*moveFunc)(); -moveFunc move_process[] = { +DUSK_GAME_DATA moveFunc move_process[] = { &dScope_c::open_proc, &dScope_c::move_proc, &dScope_c::close_proc, diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index 5836feccd2..cd5c48b20f 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -167,7 +167,7 @@ void dStage_startStage_c::set(const char* i_Name, s8 i_RoomNo, s16 i_Point, s8 i mLayer = i_Layer; } -dStage_roomStatus_c dStage_roomControl_c::mStatus[0x40]; +DUSK_GAME_DATA dStage_roomStatus_c dStage_roomControl_c::mStatus[0x40]; void dStage_roomControl_c::init() { mStayNo = -1; @@ -1565,29 +1565,29 @@ const char* dStage_getName2(s16 procName, s8 argument) { return dStage_getName(procName, argument); } -u8 data_8074C568_debug; -u8 data_8074C569_debug; -u8 data_8074C56A_debug; -u8 data_8074C56B_debug; -u8 data_8074C56C_debug; +DUSK_GAME_DATA u8 data_8074C568_debug; +DUSK_GAME_DATA u8 data_8074C569_debug; +DUSK_GAME_DATA u8 data_8074C56A_debug; +DUSK_GAME_DATA u8 data_8074C56B_debug; +DUSK_GAME_DATA u8 data_8074C56C_debug; -fpc_ProcID dStage_roomControl_c::mProcID; +DUSK_GAME_DATA fpc_ProcID dStage_roomControl_c::mProcID; -s8 dStage_roomControl_c::mStayNo; +DUSK_GAME_DATA s8 dStage_roomControl_c::mStayNo; -s8 dStage_roomControl_c::mOldStayNo; +DUSK_GAME_DATA s8 dStage_roomControl_c::mOldStayNo; -s8 dStage_roomControl_c::mNextStayNo; +DUSK_GAME_DATA s8 dStage_roomControl_c::mNextStayNo; -u8 dStage_roomControl_c::m_time_pass; +DUSK_GAME_DATA u8 dStage_roomControl_c::m_time_pass; -u8 dStage_roomControl_c::mNoChangeRoom; +DUSK_GAME_DATA u8 dStage_roomControl_c::mNoChangeRoom; -dStage_roomControl_c::dStage_bankName* dStage_roomControl_c::mArcBankName; +DUSK_GAME_DATA dStage_roomControl_c::dStage_bankName* dStage_roomControl_c::mArcBankName; -dStage_roomControl_c::dStage_bankData* dStage_roomControl_c::mArcBankData; +DUSK_GAME_DATA dStage_roomControl_c::dStage_bankData* dStage_roomControl_c::mArcBankData; -dStage_roomControl_c::roomDzs_c dStage_roomControl_c::m_roomDzs; +DUSK_GAME_DATA dStage_roomControl_c::roomDzs_c dStage_roomControl_c::m_roomDzs; #if DEBUG u8 dStage_roomControl_c::mNoArcBank; #endif @@ -2723,12 +2723,12 @@ void dStage_dt_c_fieldMapLoader(void* i_data, dStage_dt_c* i_stage) { dStage_dt_c_decode(i_data, i_stage, l_funcTable, ARRAY_SIZEU(l_funcTable)); } -JKRExpHeap* dStage_roomControl_c::mMemoryBlock[MEMORY_BLOCK_MAX] = { +DUSK_GAME_DATA JKRExpHeap* dStage_roomControl_c::mMemoryBlock[MEMORY_BLOCK_MAX] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; -char dStage_roomControl_c::mArcBank[32][10] = {0}; +DUSK_GAME_DATA char dStage_roomControl_c::mArcBank[32][10] = {0}; void dStage_infoCreate() { OS_REPORT("dStage_Create\n"); @@ -2739,7 +2739,7 @@ void dStage_infoCreate() { dStage_dt_c_stageInitLoader(stageRsrc, dComIfGp_getStage()); } -char dStage_roomControl_c::mDemoArcName[10]; +DUSK_GAME_DATA char dStage_roomControl_c::mDemoArcName[10]; void dStage_Create() { void* stageRsrc = dComIfG_getStageRes("stage.dzs"); @@ -2807,7 +2807,7 @@ void dStage_Delete() { dComIfGp_getStage()->init(); } -s8 dStage_roomControl_c::mRoomReadId = -1; +DUSK_GAME_DATA s8 dStage_roomControl_c::mRoomReadId = -1; int dStage_RoomCheck(cBgS_GndChk* gndChk) { int roomReadId = dStage_roomControl_c::getRoomReadId(); diff --git a/src/d/d_tresure.cpp b/src/d/d_tresure.cpp index 90044360c8..54b416a69f 100644 --- a/src/d/d_tresure.cpp +++ b/src/d/d_tresure.cpp @@ -8,7 +8,7 @@ static bool data_80450680 = true; -dTres_c::typeGroupData_c* dTres_c::mTypeGroupData; +DUSK_GAME_DATA dTres_c::typeGroupData_c* dTres_c::mTypeGroupData; int dTres_c::createWork() { mTypeGroupData = JKR_NEW_ARRAY(dTres_c::typeGroupData_c, 0x40); @@ -25,9 +25,9 @@ void dTres_c::remove() { data_80450680 = true; } -dTres_c::type_group_list dTres_c::mTypeGroupListAll[17]; +DUSK_GAME_DATA dTres_c::type_group_list dTres_c::mTypeGroupListAll[17]; -u16 dTres_c::mNum; +DUSK_GAME_DATA u16 dTres_c::mNum; void dTres_c::reset() { if (data_80450680) { @@ -229,7 +229,7 @@ void dTres_c::setPosition(int dataNo, u8 listIdx, Vec const* i_pos, int i_roomNo } } -u8 const dTres_c::typeToTypeGroup[17][2] = { +DUSK_GAME_DATA u8 const dTres_c::typeToTypeGroup[17][2] = { {0xFF, 0x00}, {0x00, 0x01}, {0x01, 0x02}, {0x02, 0x03}, {0x03, 0x04}, {0x04, 0x05}, {0x05, 0x06}, {0x06, 0x07}, {0x07, 0x08}, {0x80, 0x09}, {0x81, 0x0A}, {0x82, 0x0B}, {0x83, 0x0C}, {0x84, 0x0D}, {0x85, 0x0E}, {0x87, 0x0F}, {0x88, 0x10}, diff --git a/src/d/d_vib_pattern.cpp b/src/d/d_vib_pattern.cpp index 6c06016cf5..774e16b3d9 100644 --- a/src/d/d_vib_pattern.cpp +++ b/src/d/d_vib_pattern.cpp @@ -3,7 +3,7 @@ #include "d/d_vibration.h" // Motor Shock patterns -const vib_pattern dVibration_c::MS_patt[VIBMODE_S_MAX] = { +DUSK_GAME_DATA const vib_pattern dVibration_c::MS_patt[VIBMODE_S_MAX] = { /* VIBMODE_S_CUSTOM */ {0, 0, 0x00000000}, /* VIBMODE_S_POWER1 */ {0, 3, 0xC0000000}, /* VIBMODE_S_POWER2 */ {0, 4, 0xE0000000}, @@ -18,7 +18,7 @@ const vib_pattern dVibration_c::MS_patt[VIBMODE_S_MAX] = { }; // Camera Shock patterns -const vib_pattern dVibration_c::CS_patt[VIBMODE_S_MAX] = { +DUSK_GAME_DATA const vib_pattern dVibration_c::CS_patt[VIBMODE_S_MAX] = { /* VIBMODE_S_CUSTOM */ {0, 0, 0x00000000}, /* VIBMODE_S_POWER1 */ {0, 3, 0xC0000000}, /* VIBMODE_S_POWER2 */ {0, 4, 0xE0000000}, @@ -33,7 +33,7 @@ const vib_pattern dVibration_c::CS_patt[VIBMODE_S_MAX] = { }; // Motor Quake patterns -const vib_pattern dVibration_c::MQ_patt[VIBMODE_Q_MAX] = { +DUSK_GAME_DATA const vib_pattern dVibration_c::MQ_patt[VIBMODE_Q_MAX] = { /* VIBMODE_Q_CUSTOM */ {0, 0, 0x00000000}, /* VIBMODE_Q_POWER1 */ {1, 32, 0x10202020}, /* VIBMODE_Q_POWER2 */ {1, 32, 0x42104208}, @@ -47,7 +47,7 @@ const vib_pattern dVibration_c::MQ_patt[VIBMODE_Q_MAX] = { }; // Camera Quake patterns -const vib_pattern dVibration_c::CQ_patt[VIBMODE_Q_MAX] = { +DUSK_GAME_DATA const vib_pattern dVibration_c::CQ_patt[VIBMODE_Q_MAX] = { /* VIBMODE_Q_CUSTOM */ {0, 0, 0x00000000}, /* VIBMODE_Q_POWER1 */ {1, 32, 0x10202020}, /* VIBMODE_Q_POWER2 */ {1, 32, 0x42104208}, @@ -60,7 +60,7 @@ const vib_pattern dVibration_c::CQ_patt[VIBMODE_Q_MAX] = { /* VIBMODE_Q_HORSE */ {0, 27, 0x20201000}, }; -const char* shock_names[VIBMODE_S_MAX] = { +DUSK_GAME_DATA const char* shock_names[VIBMODE_S_MAX] = { "VIBMODE_S_CUSTOM", "VIBMODE_S_POWER1", "VIBMODE_S_POWER2", @@ -74,7 +74,7 @@ const char* shock_names[VIBMODE_S_MAX] = { "VIBMODE_S_FOR2D", }; -const char* quake_names[VIBMODE_Q_MAX] = { +DUSK_GAME_DATA const char* quake_names[VIBMODE_Q_MAX] = { "VIBMODE_Q_CUSTOM", "VIBMODE_Q_POWER1", "VIBMODE_Q_POWER2", diff --git a/src/f_ap/f_ap_game.cpp b/src/f_ap/f_ap_game.cpp index f4ccc32da0..b3770ca4f0 100644 --- a/src/f_ap/f_ap_game.cpp +++ b/src/f_ap/f_ap_game.cpp @@ -742,7 +742,7 @@ static void fapGm_AfterRecord() { fapGm_After(); } -BOOL isRecording = false; +DUSK_GAME_DATA BOOL isRecording = false; static void duskExecute() { dusk::menu_pointer::begin_game_frame(); @@ -851,7 +851,7 @@ void fapGm_Execute() { #endif } -fapGm_HIO_c g_HIO; +DUSK_GAME_DATA fapGm_HIO_c g_HIO; void fapGm_Create() { // unused, unknown purpose diff --git a/src/f_op/f_op_actor.cpp b/src/f_op/f_op_actor.cpp index b628ebe9dd..9cf34de7ff 100644 --- a/src/f_op/f_op_actor.cpp +++ b/src/f_op/f_op_actor.cpp @@ -204,13 +204,13 @@ fopAc_ac_c::fopAc_ac_c() {} fopAc_ac_c::~fopAc_ac_c() {} -int g_fopAc_type; +DUSK_GAME_DATA int g_fopAc_type; BOOL fopAc_IsActor(void* i_actor) { return fpcM_IsJustType(g_fopAc_type, ((fopAc_ac_c*)i_actor)->actor_type); } -u32 fopAc_ac_c::stopStatus; +DUSK_GAME_DATA u32 fopAc_ac_c::stopStatus; static int fopAc_Draw(void* i_this) { fopAc_ac_c* actor = (fopAc_ac_c*)i_this; @@ -635,7 +635,7 @@ u8 fopAcM::HeapAdjustEntry; u8 fopAcM::HeapAdjustUnk; #endif -actor_method_class g_fopAc_Method = { +DUSK_GAME_DATA actor_method_class g_fopAc_Method = { (process_method_func)fopAc_Create, (process_method_func)fopAc_Delete, (process_method_func)fopAc_Execute, (process_method_func)fopAc_IsDelete, (process_method_func)fopAc_Draw, diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index c9223a4d14..6bd19762af 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -379,14 +379,14 @@ s32 fopAcM_callCallback(fopAc_ac_c* i_actor, heapCallbackFunc i_callback, JKRHea return ret; } -u8 fopAcM::HeapAdjustEntry; -u8 fopAcM::HeapAdjustUnk; -u8 fopAcM::HeapAdjustVerbose; -u8 fopAcM::HeapAdjustQuiet; -u8 fopAcM::HeapDummyCreate; -u8 fopAcM::HeapSkipMargin; -u8 fopAcM::HeapDummyCheck; -int fopAcM::HeapAdjustMargin = +DUSK_GAME_DATA u8 fopAcM::HeapAdjustEntry; +DUSK_GAME_DATA u8 fopAcM::HeapAdjustUnk; +DUSK_GAME_DATA u8 fopAcM::HeapAdjustVerbose; +DUSK_GAME_DATA u8 fopAcM::HeapAdjustQuiet; +DUSK_GAME_DATA u8 fopAcM::HeapDummyCreate; +DUSK_GAME_DATA u8 fopAcM::HeapSkipMargin; +DUSK_GAME_DATA u8 fopAcM::HeapDummyCheck; +DUSK_GAME_DATA int fopAcM::HeapAdjustMargin = #if VERSION == VERSION_SHIELD_DEBUG 0x1000; #else @@ -914,7 +914,7 @@ bool fopAcM_checkCullingBox(Mtx m, f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z return false; } -cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e] = { +DUSK_GAME_DATA cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e] = { { {-40.0f, 0.0f, -40.0f}, {40.0f, 125.0f, 40.0f}, @@ -979,7 +979,7 @@ cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e] = { #endif }; -cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e] = { +DUSK_GAME_DATA cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e] = { { {0.0f, 0.0f, 0.0f}, 80.0f, @@ -2097,11 +2097,11 @@ void fopAcM_GetRealMax(const fopAc_ac_c*) { static cXyz max; } -dBgS_ObjLinChk fopAcM_lc_c::mLineCheck; +DUSK_GAME_DATA dBgS_ObjLinChk fopAcM_lc_c::mLineCheck; -dBgS_ObjGndChk fopAcM_gc_c::mGndCheck; +DUSK_GAME_DATA dBgS_ObjGndChk fopAcM_gc_c::mGndCheck; -f32 fopAcM_gc_c::mGroundY; +DUSK_GAME_DATA f32 fopAcM_gc_c::mGroundY; void fopAcM_effSmokeSet1(u32* param_0, u32* param_1, cXyz const* param_2, csXyz const* param_3, f32 param_4, dKy_tevstr_c const* param_5, int param_6) { @@ -2316,13 +2316,13 @@ fopAc_ac_c* fopAcM_searchFromName4Event(char const* i_name, s16 i_eventID) { return fopAcM_Search((fopAcIt_JudgeFunc)fopAcM_findObject4EventCB, &prm); } -dBgS_ObjRoofChk fopAcM_rc_c::mRoofCheck; +DUSK_GAME_DATA dBgS_ObjRoofChk fopAcM_rc_c::mRoofCheck; -dBgS_WtrChk fopAcM_wt_c::mWaterCheck; +DUSK_GAME_DATA dBgS_WtrChk fopAcM_wt_c::mWaterCheck; -f32 fopAcM_rc_c::mRoofY; +DUSK_GAME_DATA f32 fopAcM_rc_c::mRoofY; -f32 fopAcM_wt_c::mWaterY; +DUSK_GAME_DATA f32 fopAcM_wt_c::mWaterY; s32 fopAcM_getWaterY(cXyz const* param_0, f32* o_waterY) { if (fopAcM_wt_c::waterCheck(param_0) && fopAcM_wt_c::getPolyAtt0() != 6) { diff --git a/src/f_op/f_op_actor_tag.cpp b/src/f_op/f_op_actor_tag.cpp index 2f0518b595..9b8b9fe9a9 100644 --- a/src/f_op/f_op_actor_tag.cpp +++ b/src/f_op/f_op_actor_tag.cpp @@ -6,7 +6,7 @@ #include "f_op/f_op_actor_tag.h" #include "SSystem/SComponent/c_list.h" -node_list_class g_fopAcTg_Queue = {NULL, NULL, 0}; +DUSK_GAME_DATA node_list_class g_fopAcTg_Queue = {NULL, NULL, 0}; int fopAcTg_ToActorQ(create_tag_class* i_createTag) { return cTg_Addition(&g_fopAcTg_Queue, i_createTag); diff --git a/src/f_op/f_op_camera.cpp b/src/f_op/f_op_camera.cpp index 567f80904f..42bf619d69 100644 --- a/src/f_op/f_op_camera.cpp +++ b/src/f_op/f_op_camera.cpp @@ -101,7 +101,7 @@ static int fopCam_Create(void* i_this) { return ret; } -leafdraw_method_class g_fopCam_Method = { +DUSK_GAME_DATA leafdraw_method_class g_fopCam_Method = { (process_method_func)fopCam_Create, (process_method_func)fopCam_Delete, (process_method_func)fopCam_Execute, (process_method_func)fopCam_IsDelete, (process_method_func)fopCam_Draw, diff --git a/src/f_op/f_op_draw_tag.cpp b/src/f_op/f_op_draw_tag.cpp index d158723fd2..7026d4d153 100644 --- a/src/f_op/f_op_draw_tag.cpp +++ b/src/f_op/f_op_draw_tag.cpp @@ -8,7 +8,7 @@ #include "SSystem/SComponent/c_tag.h" #include "global.h" -node_lists_tree_class g_fopDwTg_Queue = {NULL, 0}; +DUSK_GAME_DATA node_lists_tree_class g_fopDwTg_Queue = {NULL, 0}; void fopDwTg_ToDrawQ(create_tag_class* i_createTag, int i_priority) { cTg_AdditionToTree(&g_fopDwTg_Queue, i_priority, i_createTag); diff --git a/src/f_op/f_op_kankyo.cpp b/src/f_op/f_op_kankyo.cpp index 00e2eb838c..1c8a2dfb8b 100644 --- a/src/f_op/f_op_kankyo.cpp +++ b/src/f_op/f_op_kankyo.cpp @@ -107,7 +107,7 @@ static int fopKy_Create(void* i_this) { return ret; } -leafdraw_method_class g_fopKy_Method = { +DUSK_GAME_DATA leafdraw_method_class g_fopKy_Method = { (process_method_func)fopKy_Create, (process_method_func)fopKy_Delete, (process_method_func)fopKy_Execute, (process_method_func)fopKy_IsDelete, (process_method_func)fopKy_Draw, diff --git a/src/f_op/f_op_msg.cpp b/src/f_op/f_op_msg.cpp index f5cbf98b1c..eaa2770e4d 100644 --- a/src/f_op/f_op_msg.cpp +++ b/src/f_op/f_op_msg.cpp @@ -101,7 +101,7 @@ int fopMsg_Create(void* i_this) { return ret; } -leafdraw_method_class g_fopMsg_Method = { +DUSK_GAME_DATA leafdraw_method_class g_fopMsg_Method = { (process_method_func)fopMsg_Create, (process_method_func)fopMsg_Delete, (process_method_func)fopMsg_Execute, (process_method_func)fopMsg_IsDelete, (process_method_func)fopMsg_Draw, diff --git a/src/f_op/f_op_overlap.cpp b/src/f_op/f_op_overlap.cpp index 5cdaea666b..56a81b4a23 100644 --- a/src/f_op/f_op_overlap.cpp +++ b/src/f_op/f_op_overlap.cpp @@ -59,7 +59,7 @@ static s32 fopOvlp_Create(void* i_this) { return ret; } -leafdraw_method_class g_fopOvlp_Method = { +DUSK_GAME_DATA leafdraw_method_class g_fopOvlp_Method = { (process_method_func)fopOvlp_Create, (process_method_func)fopOvlp_Delete, (process_method_func)fopOvlp_Execute, (process_method_func)fopOvlp_IsDelete, (process_method_func)fopOvlp_Draw, diff --git a/src/f_op/f_op_scene.cpp b/src/f_op/f_op_scene.cpp index ba1a8e0175..17292ac03d 100644 --- a/src/f_op/f_op_scene.cpp +++ b/src/f_op/f_op_scene.cpp @@ -62,7 +62,7 @@ static int fopScn_Create(void* i_this) { return ret; } -leafdraw_method_class g_fopScn_Method = { +DUSK_GAME_DATA leafdraw_method_class g_fopScn_Method = { (process_method_func)fopScn_Create, (process_method_func)fopScn_Delete, (process_method_func)fopScn_Execute, diff --git a/src/f_op/f_op_scene_tag.cpp b/src/f_op/f_op_scene_tag.cpp index 632f9fd159..a093deb6e3 100644 --- a/src/f_op/f_op_scene_tag.cpp +++ b/src/f_op/f_op_scene_tag.cpp @@ -9,7 +9,7 @@ void fopScnTg_QueueTo(scene_tag_class* i_sceneTag) { cTg_SingleCut(&i_sceneTag->base); } -node_list_class g_fopScnTg_SceneList = {NULL, NULL, 0}; +DUSK_GAME_DATA node_list_class g_fopScnTg_SceneList = {NULL, NULL, 0}; void fopScnTg_ToQueue(scene_tag_class* i_sceneTag) { cTg_Addition(&g_fopScnTg_SceneList, &i_sceneTag->base); diff --git a/src/f_op/f_op_view.cpp b/src/f_op/f_op_view.cpp index c48f7eb0f7..39792a88a1 100644 --- a/src/f_op/f_op_view.cpp +++ b/src/f_op/f_op_view.cpp @@ -38,7 +38,7 @@ s32 fopVw_Create(void* i_this) { return ret; } -leafdraw_method_class g_fopVw_Method = { +DUSK_GAME_DATA leafdraw_method_class g_fopVw_Method = { (process_method_func)fopVw_Create, (process_method_func)fopVw_Delete, (process_method_func)fopVw_Execute, (process_method_func)fopVw_IsDelete, (process_method_func)fopVw_Draw, diff --git a/src/f_pc/f_pc_base.cpp b/src/f_pc/f_pc_base.cpp index 7bb53ae634..f876774214 100644 --- a/src/f_pc/f_pc_base.cpp +++ b/src/f_pc/f_pc_base.cpp @@ -41,7 +41,7 @@ BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB) { } } -int g_fpcBs_type; +DUSK_GAME_DATA int g_fpcBs_type; int fpcBs_MakeOfType(int* i_type) { static int t_type = 0x9130000; diff --git a/src/f_pc/f_pc_create_tag.cpp b/src/f_pc/f_pc_create_tag.cpp index 89578cd54b..bdafc280c0 100644 --- a/src/f_pc/f_pc_create_tag.cpp +++ b/src/f_pc/f_pc_create_tag.cpp @@ -5,7 +5,7 @@ #include "f_pc/f_pc_create_tag.h" -node_list_class g_fpcCtTg_Queue = {NULL, NULL, 0}; +DUSK_GAME_DATA node_list_class g_fpcCtTg_Queue = {NULL, NULL, 0}; void fpcCtTg_ToCreateQ(create_tag* i_createTag) { cTg_Addition(&g_fpcCtTg_Queue, &i_createTag->base); diff --git a/src/f_pc/f_pc_delete_tag.cpp b/src/f_pc/f_pc_delete_tag.cpp index e627f5ec8c..38c12ab1e2 100644 --- a/src/f_pc/f_pc_delete_tag.cpp +++ b/src/f_pc/f_pc_delete_tag.cpp @@ -7,7 +7,7 @@ #include "f_pc/f_pc_delete_tag.h" #include "f_pc/f_pc_debug_sv.h" -node_list_class g_fpcDtTg_Queue = {NULL, NULL, 0}; +DUSK_GAME_DATA node_list_class g_fpcDtTg_Queue = {NULL, NULL, 0}; BOOL fpcDtTg_IsEmpty() { if (g_fpcDtTg_Queue.mSize == 0) { diff --git a/src/f_pc/f_pc_layer.cpp b/src/f_pc/f_pc_layer.cpp index 2f5da47251..81cea8fd1c 100644 --- a/src/f_pc/f_pc_layer.cpp +++ b/src/f_pc/f_pc_layer.cpp @@ -82,7 +82,7 @@ void fpcLy_CreatedMesg(layer_class* i_layer) { } } -layer_class l_fpcLy_Crear = { +DUSK_GAME_DATA layer_class l_fpcLy_Crear = { NULL, NULL, 0, 0xFFFFFFFF, NULL, 0, NULL, NULL, NULL, 0, 0, 0, }; diff --git a/src/f_pc/f_pc_leaf.cpp b/src/f_pc/f_pc_leaf.cpp index 6737e58f67..d28067c7ff 100644 --- a/src/f_pc/f_pc_leaf.cpp +++ b/src/f_pc/f_pc_leaf.cpp @@ -56,7 +56,7 @@ int fpcLf_Delete(leafdraw_class* i_leaf) { return ret; } -int g_fpcLf_type; +DUSK_GAME_DATA int g_fpcLf_type; int fpcLf_Create(leafdraw_class* i_leaf) { if (LEAFDRAW_BASE(i_leaf).state.init_state == 0) { @@ -74,7 +74,7 @@ int fpcLf_Create(leafdraw_class* i_leaf) { return ret; } -leafdraw_method_class DUSK_CONST g_fpcLf_Method = { +DUSK_GAME_DATA leafdraw_method_class DUSK_CONST g_fpcLf_Method = { (process_method_func)fpcLf_Create, (process_method_func)fpcLf_Delete, (process_method_func)fpcLf_Execute, (process_method_func)fpcLf_IsDelete, (process_method_func)fpcLf_Draw, diff --git a/src/f_pc/f_pc_line.cpp b/src/f_pc/f_pc_line.cpp index 6473dfbee3..7cd392f7a2 100644 --- a/src/f_pc/f_pc_line.cpp +++ b/src/f_pc/f_pc_line.cpp @@ -16,7 +16,7 @@ void fpcLn_Create() { cLs_Create(line_node++); } -node_lists_tree_class g_fpcLn_Queue = { +DUSK_GAME_DATA node_lists_tree_class g_fpcLn_Queue = { l_fpcLn_Line, ARRAY_SIZEU(l_fpcLn_Line), }; diff --git a/src/f_pc/f_pc_node.cpp b/src/f_pc/f_pc_node.cpp index ca7bcc044b..d56cd6d4c6 100644 --- a/src/f_pc/f_pc_node.cpp +++ b/src/f_pc/f_pc_node.cpp @@ -61,7 +61,7 @@ int fpcNd_Execute(process_node_class* i_procNode) { return ret; } -int g_fpcNd_type; +DUSK_GAME_DATA int g_fpcNd_type; void* fpcNd_IsCreatingFromUnder(void* i_procNode) { if (i_procNode != NULL && fpcBs_Is_JustOfType(g_fpcNd_type, ((process_node_class*)i_procNode)->base.subtype) != FALSE) @@ -79,7 +79,7 @@ void* fpcNd_IsCreatingFromUnder(void* i_procNode) { return NULL; } -BOOL g_fpcNd_IsCheckOfDeleteTiming = TRUE; +DUSK_GAME_DATA BOOL g_fpcNd_IsCheckOfDeleteTiming = TRUE; int fpcNd_IsDeleteTiming(process_node_class* i_procNode) { if (g_fpcNd_IsCheckOfDeleteTiming == TRUE && fpcNd_IsCreatingFromUnder(i_procNode) != NULL) { @@ -124,7 +124,7 @@ int fpcNd_Create(process_node_class* i_procNode) { return ret; } -nodedraw_method_class g_fpcNd_Method = { +DUSK_GAME_DATA nodedraw_method_class g_fpcNd_Method = { (process_method_func)fpcNd_Create, (process_method_func)fpcNd_Delete, (process_method_func)fpcNd_Execute, (process_method_func)fpcNd_IsDelete, (process_method_func)fpcNd_Draw, diff --git a/src/f_pc/f_pc_profile.cpp b/src/f_pc/f_pc_profile.cpp index e248873a07..4828ca4433 100644 --- a/src/f_pc/f_pc_profile.cpp +++ b/src/f_pc/f_pc_profile.cpp @@ -8,9 +8,9 @@ #ifndef __MWERKS__ // Forward declare the static list from f_pc_profile_lst.cpp -extern process_profile_definition DUSK_CONST* DUSK_CONST g_fpcPfLst_ProfileList[]; +DUSK_GAME_EXTERN process_profile_definition DUSK_CONST* DUSK_CONST g_fpcPfLst_ProfileList[]; // On PC: Direct pointer to static array -process_profile_definition DUSK_CONST* DUSK_CONST* DUSK_CONST g_fpcPf_ProfileList_p = g_fpcPfLst_ProfileList; +DUSK_GAME_DATA process_profile_definition DUSK_CONST* DUSK_CONST* DUSK_CONST g_fpcPf_ProfileList_p = g_fpcPfLst_ProfileList; #else // On Console: Pointer initialized by REL module prolog process_profile_definition** g_fpcPf_ProfileList_p; diff --git a/src/f_pc/f_pc_profile_lst.cpp b/src/f_pc/f_pc_profile_lst.cpp index 39fbd2068e..06b9eb68a6 100644 --- a/src/f_pc/f_pc_profile_lst.cpp +++ b/src/f_pc/f_pc_profile_lst.cpp @@ -811,7 +811,7 @@ extern "C" void ModuleEpilog() { } #else -process_profile_definition DUSK_CONST* DUSK_CONST g_fpcPfLst_ProfileList[] = { +DUSK_GAME_DATA process_profile_definition DUSK_CONST* DUSK_CONST g_fpcPfLst_ProfileList[] = { &g_profile_OVERLAP0.base.base, &g_profile_OVERLAP1.base.base, &g_profile_OVERLAP3.base.base, diff --git a/src/m_Do/m_Do_DVDError.cpp b/src/m_Do/m_Do_DVDError.cpp index 2cfef5fbb4..0113ba35ae 100644 --- a/src/m_Do/m_Do_DVDError.cpp +++ b/src/m_Do/m_Do_DVDError.cpp @@ -16,7 +16,7 @@ const int stack_size = 3072; const int stack_size = 8192; #endif -bool mDoDvdErr_initialized; +DUSK_GAME_DATA bool mDoDvdErr_initialized; static OSThread DvdErr_thread; diff --git a/src/m_Do/m_Do_MemCard.cpp b/src/m_Do/m_Do_MemCard.cpp index dbf962b173..85b19c10c1 100644 --- a/src/m_Do/m_Do_MemCard.cpp +++ b/src/m_Do/m_Do_MemCard.cpp @@ -881,7 +881,7 @@ s32 mDoMemCd_Ctrl_c::checkspaceNAND() { } #endif -mDoMemCd_Ctrl_c g_mDoMemCd_control; +DUSK_GAME_DATA mDoMemCd_Ctrl_c g_mDoMemCd_control; static int mDoMemCd_main(void*) { JKRThread(OSGetCurrentThread(), 0); diff --git a/src/m_Do/m_Do_Reset.cpp b/src/m_Do/m_Do_Reset.cpp index c3a5fea739..e8906d1f85 100644 --- a/src/m_Do/m_Do_Reset.cpp +++ b/src/m_Do/m_Do_Reset.cpp @@ -30,7 +30,7 @@ static void destroyVideo() { return; } -mDoRstData* mDoRst::mResetData; +DUSK_GAME_DATA mDoRstData* mDoRst::mResetData; void mDoRst_reset(int reset, u32 resetCode, int forceMenu) { JUT_ASSERT(83, mDoExt_GetCurrentRunningThread() != 0); diff --git a/src/m_Do/m_Do_audio.cpp b/src/m_Do/m_Do_audio.cpp index fc44eb7fb6..b0427f065e 100644 --- a/src/m_Do/m_Do_audio.cpp +++ b/src/m_Do/m_Do_audio.cpp @@ -19,11 +19,11 @@ #include #endif -u8 mDoAud_zelAudio_c::mInitFlag; +DUSK_GAME_DATA u8 mDoAud_zelAudio_c::mInitFlag; -u8 mDoAud_zelAudio_c::mResetFlag; +DUSK_GAME_DATA u8 mDoAud_zelAudio_c::mResetFlag; -u8 mDoAud_zelAudio_c::mBgmSet; +DUSK_GAME_DATA u8 mDoAud_zelAudio_c::mBgmSet; void mDoAud_zelAudio_c::reset() { mBgmSet = false; @@ -31,7 +31,7 @@ void mDoAud_zelAudio_c::reset() { static mDoAud_zelAudio_c g_mDoAud_zelAudio; -JKRSolidHeap* g_mDoAud_audioHeap; +DUSK_GAME_DATA JKRSolidHeap* g_mDoAud_audioHeap; static mDoDvdThd_toMainRam_c* l_affCommand; diff --git a/src/m_Do/m_Do_controller_pad.cpp b/src/m_Do/m_Do_controller_pad.cpp index f7eaa92ca2..fc1ebf7b8c 100644 --- a/src/m_Do/m_Do_controller_pad.cpp +++ b/src/m_Do/m_Do_controller_pad.cpp @@ -17,10 +17,10 @@ #include "dusk/ui/touch_controls.hpp" #endif -JUTGamePad* mDoCPd_c::m_gamePad[4]; +DUSK_GAME_DATA JUTGamePad* mDoCPd_c::m_gamePad[4]; -interface_of_controller_pad mDoCPd_c::m_cpadInfo[4]; -interface_of_controller_pad mDoCPd_c::m_debugCpadInfo[4]; +DUSK_GAME_DATA interface_of_controller_pad mDoCPd_c::m_cpadInfo[4]; +DUSK_GAME_DATA interface_of_controller_pad mDoCPd_c::m_debugCpadInfo[4]; void mDoCPd_c::create() { #if PLATFORM_GCN || PLATFORM_SHIELD diff --git a/src/m_Do/m_Do_dvd_thread.cpp b/src/m_Do/m_Do_dvd_thread.cpp index 08197ed30b..35f918accf 100644 --- a/src/m_Do/m_Do_dvd_thread.cpp +++ b/src/m_Do/m_Do_dvd_thread.cpp @@ -27,11 +27,11 @@ s32 mDoDvdThd::main(void* param_0) { return 0; } -OSThread mDoDvdThd::l_thread; +DUSK_GAME_DATA OSThread mDoDvdThd::l_thread; -mDoDvdThdStack mDoDvdThd::l_threadStack; +DUSK_GAME_DATA mDoDvdThdStack mDoDvdThd::l_threadStack; -mDoDvdThd_param_c mDoDvdThd::l_param; +DUSK_GAME_DATA mDoDvdThd_param_c mDoDvdThd::l_param; #if DEBUG u8 mDoDvdThd::verbose; @@ -44,10 +44,10 @@ const char* mDoDvdHack::FstStringStart; u32 mDoDvdHack::MaxEntryNum; mDoDvdHack::Manager mDoDvdHack::Manager::sManager; #else -bool mDoDvdThd::SyncWidthSound; +DUSK_GAME_DATA bool mDoDvdThd::SyncWidthSound; #endif -u8 sDefaultDirection; +DUSK_GAME_DATA u8 sDefaultDirection; #pragma push #pragma force_active on diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index ac4e6c740e..95cf4aee0f 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -27,9 +27,9 @@ #include "dusk/logging.h" #include "dusk/frame_interpolation.h" -u8 mDoExt::CurrentHeapAdjustVerbose; -u8 mDoExt::HeapAdjustVerbose; -u8 mDoExt::HeapAdjustQuiet; +DUSK_GAME_DATA u8 mDoExt::CurrentHeapAdjustVerbose; +DUSK_GAME_DATA u8 mDoExt::HeapAdjustVerbose; +DUSK_GAME_DATA u8 mDoExt::HeapAdjustQuiet; static void mDoExt_setJ3DData(Mtx mtx, const J3DTransformInfo* transformInfo, u16 param_2) { bool local_28; @@ -691,7 +691,7 @@ JKRExpHeap* mDoExt_getDbPrintHeap() { return DbPrintHeap; } -JKRExpHeap* gameHeap; +DUSK_GAME_DATA JKRExpHeap* gameHeap; static intptr_t safeGameHeapSize = -1; JKRExpHeap* mDoExt_createGameHeap(u32 heapSize, JKRHeap* parentHeap) { @@ -724,8 +724,8 @@ size_t mDoExt_getSafeGameHeapSize() { return safeGameHeapSize; } -JKRExpHeap* zeldaHeap; -intptr_t safeZeldaHeapSize = -1; +DUSK_GAME_DATA JKRExpHeap* zeldaHeap; +DUSK_GAME_DATA intptr_t safeZeldaHeapSize = -1; JKRExpHeap* mDoExt_createZeldaHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1815, zeldaHeap == NULL || heapSize == 0); @@ -758,8 +758,8 @@ intptr_t mDoExt_getSafeZeldaHeapSize() { return safeZeldaHeapSize; } -JKRExpHeap* commandHeap; -intptr_t safeCommandHeapSize = -1; +DUSK_GAME_DATA JKRExpHeap* commandHeap; +DUSK_GAME_DATA intptr_t safeCommandHeapSize = -1; JKRExpHeap* mDoExt_createCommandHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1894, commandHeap == 0 || heapSize == 0); @@ -785,8 +785,8 @@ intptr_t mDoExt_getSafeCommandHeapSize() { return safeCommandHeapSize; } -JKRExpHeap* archiveHeap; -intptr_t safeArchiveHeapSize = -1; +DUSK_GAME_DATA JKRExpHeap* archiveHeap; +DUSK_GAME_DATA intptr_t safeArchiveHeapSize = -1; JKRExpHeap* mDoExt_createArchiveHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1966, archiveHeap == 0 || heapSize == 0); @@ -824,7 +824,7 @@ JKRExpHeap* mDoExt_getArchiveHeapPtr() { } static JKRExpHeap* j2dHeap; -intptr_t safeJ2dHeapSize = -1; +DUSK_GAME_DATA intptr_t safeJ2dHeapSize = -1; JKRExpHeap* mDoExt_createJ2dHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(2059, j2dHeap == 0 || heapSize == 0); @@ -3850,7 +3850,7 @@ J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 i_modelFlag, u3 return NULL; } -DummyCheckHeap* dch; +DUSK_GAME_DATA DummyCheckHeap* dch; DummyCheckHeap::DummyCheckHeap() { mAlloc = NULL; @@ -3958,7 +3958,7 @@ void DummyCheckHeap_check() { } } -u32 aram_cache_size; +DUSK_GAME_DATA u32 aram_cache_size; u32 mDoExt_getAraCacheSize() { return aram_cache_size; diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index e7a5bf9b54..1a4bc19098 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -266,36 +266,36 @@ static ResTIMG* createTimg(u16 width, u16 height, u32 format) { return timg; } -JUTFader* mDoGph_gInf_c::mFader; +DUSK_GAME_DATA JUTFader* mDoGph_gInf_c::mFader; #if PLATFORM_WII || PLATFORM_SHIELD || TARGET_PC -ResTIMG* mDoGph_gInf_c::m_fullFrameBufferTimg; -void* mDoGph_gInf_c::m_fullFrameBufferTex; +DUSK_GAME_DATA ResTIMG* mDoGph_gInf_c::m_fullFrameBufferTimg; +DUSK_GAME_DATA void* mDoGph_gInf_c::m_fullFrameBufferTex; #endif -ResTIMG* mDoGph_gInf_c::mFrameBufferTimg; +DUSK_GAME_DATA ResTIMG* mDoGph_gInf_c::mFrameBufferTimg; -void* mDoGph_gInf_c::mFrameBufferTex; +DUSK_GAME_DATA void* mDoGph_gInf_c::mFrameBufferTex; -ResTIMG* mDoGph_gInf_c::mZbufferTimg; +DUSK_GAME_DATA ResTIMG* mDoGph_gInf_c::mZbufferTimg; -void* mDoGph_gInf_c::mZbufferTex; +DUSK_GAME_DATA void* mDoGph_gInf_c::mZbufferTex; -f32 mDoGph_gInf_c::mFadeRate; +DUSK_GAME_DATA f32 mDoGph_gInf_c::mFadeRate; -f32 mDoGph_gInf_c::mFadeSpeed; +DUSK_GAME_DATA f32 mDoGph_gInf_c::mFadeSpeed; -GXColor mDoGph_gInf_c::mBackColor = {0, 0, 0, 0}; +DUSK_GAME_DATA GXColor mDoGph_gInf_c::mBackColor = {0, 0, 0, 0}; -GXColor mDoGph_gInf_c::mFadeColor = {0, 0, 0, 0}; +DUSK_GAME_DATA GXColor mDoGph_gInf_c::mFadeColor = {0, 0, 0, 0}; -u8 mDoGph_gInf_c::mBlureFlag; +DUSK_GAME_DATA u8 mDoGph_gInf_c::mBlureFlag; -u8 mDoGph_gInf_c::mBlureRate; +DUSK_GAME_DATA u8 mDoGph_gInf_c::mBlureRate; -u8 mDoGph_gInf_c::mFade; +DUSK_GAME_DATA u8 mDoGph_gInf_c::mFade; -bool mDoGph_gInf_c::mAutoForcus; +DUSK_GAME_DATA bool mDoGph_gInf_c::mAutoForcus; void mDoGph_gInf_c::create() { #if PLATFORM_WII || PLATFORM_SHIELD @@ -400,16 +400,16 @@ void mDoGph_gInf_c::onBlure() { } #if PLATFORM_WII || PLATFORM_SHIELD || TARGET_PC -TGXTexObj mDoGph_gInf_c::m_fullFrameBufferTexObj; +DUSK_GAME_DATA TGXTexObj mDoGph_gInf_c::m_fullFrameBufferTexObj; #endif -TGXTexObj mDoGph_gInf_c::mFrameBufferTexObj; +DUSK_GAME_DATA TGXTexObj mDoGph_gInf_c::mFrameBufferTexObj; -TGXTexObj mDoGph_gInf_c::mZbufferTexObj; +DUSK_GAME_DATA TGXTexObj mDoGph_gInf_c::mZbufferTexObj; -mDoGph_gInf_c::bloom_c mDoGph_gInf_c::m_bloom; +DUSK_GAME_DATA mDoGph_gInf_c::bloom_c mDoGph_gInf_c::m_bloom; -Mtx mDoGph_gInf_c::mBlureMtx; +DUSK_GAME_DATA Mtx mDoGph_gInf_c::mBlureMtx; #if !PLATFORM_GCN cXyz mDoGph_gInf_c::csr_c::m_nowEffPos(0.0f, 0.0f, 0.0f); @@ -524,15 +524,15 @@ void mDoGph_gInf_c::csr_c::particleExecute() { #endif #if WIDESCREEN_SUPPORT -u8 mDoGph_gInf_c::mWideZoom; +DUSK_GAME_DATA u8 mDoGph_gInf_c::mWideZoom; -int mDoGph_gInf_c::m_minX; +DUSK_GAME_DATA int mDoGph_gInf_c::m_minX; -int mDoGph_gInf_c::m_minY; +DUSK_GAME_DATA int mDoGph_gInf_c::m_minY; -f32 mDoGph_gInf_c::m_minXF; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_minXF; -f32 mDoGph_gInf_c::m_minYF; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_minYF; #if PLATFORM_WII || PLATFORM_SHIELD mDoGph_gInf_c::csr_c* mDoGph_gInf_c::m_baseCsr; @@ -544,29 +544,29 @@ mDoGph_gInf_c::csr_c* mDoGph_gInf_c::m_csr; JKRHeap* mDoGph_gInf_c::m_heap; #endif -u8 mDoGph_gInf_c::mWide = 1; +DUSK_GAME_DATA u8 mDoGph_gInf_c::mWide = 1; -f32 mDoGph_gInf_c::m_aspect = 1.3571428f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_aspect = 1.3571428f; -f32 mDoGph_gInf_c::m_scale = 1.0f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_scale = 1.0f; -f32 mDoGph_gInf_c::m_invScale = 1.0f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_invScale = 1.0f; -int mDoGph_gInf_c::m_maxX = FB_WIDTH_BASE - 1; +DUSK_GAME_DATA int mDoGph_gInf_c::m_maxX = FB_WIDTH_BASE - 1; -int mDoGph_gInf_c::m_maxY = FB_HEIGHT_BASE - 1; +DUSK_GAME_DATA int mDoGph_gInf_c::m_maxY = FB_HEIGHT_BASE - 1; -int mDoGph_gInf_c::m_width = FB_WIDTH_BASE; +DUSK_GAME_DATA int mDoGph_gInf_c::m_width = FB_WIDTH_BASE; -int mDoGph_gInf_c::m_height = FB_HEIGHT_BASE; +DUSK_GAME_DATA int mDoGph_gInf_c::m_height = FB_HEIGHT_BASE; -f32 mDoGph_gInf_c::m_maxXF = FB_WIDTH_BASE - 1; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_maxXF = FB_WIDTH_BASE - 1; -f32 mDoGph_gInf_c::m_maxYF = FB_HEIGHT_BASE - 1; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_maxYF = FB_HEIGHT_BASE - 1; -f32 mDoGph_gInf_c::m_widthF = FB_WIDTH_BASE; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_widthF = FB_WIDTH_BASE; -f32 mDoGph_gInf_c::m_heightF = FB_HEIGHT_BASE; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_heightF = FB_HEIGHT_BASE; struct tvSize { u16 width; @@ -575,7 +575,7 @@ struct tvSize { #ifndef TARGET_PC const #endif -tvSize l_tvSize[2] = { +DUSK_GAME_DATA tvSize l_tvSize[2] = { {FB_WIDTH_BASE, FB_HEIGHT_BASE}, {808, FB_HEIGHT_BASE}, }; @@ -720,14 +720,14 @@ void mDoGph_gInf_c::setWideZoomLightProjection(Mtx& m) { #endif #if TARGET_PC -f32 mDoGph_gInf_c::hudAspectScaleDown = 1.0f; -f32 mDoGph_gInf_c::hudAspectScaleUp = 1.0f; -f32 mDoGph_gInf_c::m_safeMinXF = 0.0f; -f32 mDoGph_gInf_c::m_safeMinYF = 0.0f; -f32 mDoGph_gInf_c::m_safeMaxXF = FB_WIDTH_BASE; -f32 mDoGph_gInf_c::m_safeMaxYF = FB_HEIGHT_BASE; -f32 mDoGph_gInf_c::m_safeWidthF = FB_WIDTH_BASE; -f32 mDoGph_gInf_c::m_safeHeightF = FB_HEIGHT_BASE; +DUSK_GAME_DATA f32 mDoGph_gInf_c::hudAspectScaleDown = 1.0f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::hudAspectScaleUp = 1.0f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_safeMinXF = 0.0f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_safeMinYF = 0.0f; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_safeMaxXF = FB_WIDTH_BASE; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_safeMaxYF = FB_HEIGHT_BASE; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_safeWidthF = FB_WIDTH_BASE; +DUSK_GAME_DATA f32 mDoGph_gInf_c::m_safeHeightF = FB_HEIGHT_BASE; void mDoGph_gInf_c::updateSafeAreaBounds() { m_safeMinXF = m_minXF; diff --git a/src/m_Do/m_Do_lib.cpp b/src/m_Do/m_Do_lib.cpp index b46527b11c..389826d44e 100644 --- a/src/m_Do/m_Do_lib.cpp +++ b/src/m_Do/m_Do_lib.cpp @@ -38,11 +38,11 @@ u32 mDoLib_setResTimgObj(ResTIMG const* i_img, TGXTexObj* o_texObj, u32 tlut_nam return i_img->indexTexture; } -J3DUClipper mDoLib_clipper::mClipper; +DUSK_GAME_DATA J3DUClipper mDoLib_clipper::mClipper; -f32 mDoLib_clipper::mSystemFar; +DUSK_GAME_DATA f32 mDoLib_clipper::mSystemFar; -f32 mDoLib_clipper::mFovyRate; +DUSK_GAME_DATA f32 mDoLib_clipper::mFovyRate; void mDoLib_clipper::setup(f32 fovy, f32 aspect, f32 near_, f32 far_) { mClipper.setFovy(fovy); diff --git a/src/m_Do/m_Do_machine.cpp b/src/m_Do/m_Do_machine.cpp index ae22c5dbe2..a18657a2ad 100644 --- a/src/m_Do/m_Do_machine.cpp +++ b/src/m_Do/m_Do_machine.cpp @@ -73,7 +73,7 @@ u8 mDoMch::FpscrEnableBits; u8 mDoMch::GXWarningLevel; u8 mDoMch::GXWarningExecuteFrame; #else -u8 mDoMch::mDebugFill; +DUSK_GAME_DATA u8 mDoMch::mDebugFill; #endif static int solidHeapErrors; @@ -91,7 +91,7 @@ static int unknownHeapErrors; static u32 heapErrors; #if VERSION == VERSION_GCN_USA || VERSION == VERSION_GCN_JPN -GXRenderModeObj g_ntscZeldaIntDf = { +DUSK_GAME_DATA GXRenderModeObj g_ntscZeldaIntDf = { VI_TVMODE_NTSC_INT, 608, 448, @@ -118,7 +118,7 @@ GXRenderModeObj g_ntscZeldaIntDf = { {8, 8, 10, 12, 10, 8, 8}, }; -GXRenderModeObj g_ntscZeldaProg = { +DUSK_GAME_DATA GXRenderModeObj g_ntscZeldaProg = { VI_TVMODE_NTSC_PROG, 608, 448, @@ -277,7 +277,7 @@ GXRenderModeObj g_palZeldaProg60 = { }; #endif -GXRenderModeObj* mDoMch_render_c::mRenderModeObj = &g_ntscZeldaIntDf; +DUSK_GAME_DATA GXRenderModeObj* mDoMch_render_c::mRenderModeObj = &g_ntscZeldaIntDf; static const char* myGetHeapTypeByString(JKRHeap* p_heap) { static char tmpString[5]; diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 881135fc51..70a32e5afc 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -105,11 +105,11 @@ #endif // --- GLOBALS --- -s8 mDoMain::developmentMode = -1; -OSTime mDoMain::sPowerOnTime; -OSTime mDoMain::sHungUpTime; -u32 mDoMain::memMargin = 0xFFFFFFFF; -char mDoMain::COPYDATE_STRING[18] = "??/??/?? ??:??:??"; +DUSK_GAME_DATA s8 mDoMain::developmentMode = -1; +DUSK_GAME_DATA OSTime mDoMain::sPowerOnTime; +DUSK_GAME_DATA OSTime mDoMain::sHungUpTime; +DUSK_GAME_DATA u32 mDoMain::memMargin = 0xFFFFFFFF; +DUSK_GAME_DATA char mDoMain::COPYDATE_STRING[18] = "??/??/?? ??:??:??"; #if TARGET_PC const int audioHeapSize = 0x14D800 * 2; #else @@ -122,14 +122,14 @@ const int audioHeapSize = 0x14D800; #define COPYDATE_PATH "/str/Final/Release/COPYDATE" #if TARGET_PC -bool dusk::IsRunning = true; -bool dusk::IsShuttingDown = false; -bool dusk::IsGameLaunched = false; -bool dusk::RestartRequested = false; -uint8_t dusk::SaveRequested = 0; -dusk::StageRequest dusk::StageRequested = {"",false}; -std::filesystem::path dusk::ConfigPath; -std::filesystem::path dusk::CachePath; +DUSK_GAME_DATA bool dusk::IsRunning = true; +DUSK_GAME_DATA bool dusk::IsShuttingDown = false; +DUSK_GAME_DATA bool dusk::IsGameLaunched = false; +DUSK_GAME_DATA bool dusk::RestartRequested = false; +DUSK_GAME_DATA uint8_t dusk::SaveRequested = 0; +DUSK_GAME_DATA dusk::StageRequest dusk::StageRequested = {"",false}; +DUSK_GAME_DATA std::filesystem::path dusk::ConfigPath; +DUSK_GAME_DATA std::filesystem::path dusk::CachePath; #endif void dusk::RequestRestart() noexcept { @@ -164,9 +164,9 @@ s32 LOAD_COPYDATE(void*) { return 1; } -AuroraInfo auroraInfo; -AuroraStats dusk::lastFrameAuroraStats; -float dusk::frameUsagePct = 0.0f; +DUSK_GAME_DATA AuroraInfo auroraInfo; +DUSK_GAME_DATA AuroraStats dusk::lastFrameAuroraStats; +DUSK_GAME_DATA float dusk::frameUsagePct = 0.0f; bool launchUILoop() { while (dusk::IsRunning && !dusk::IsGameLaunched) { diff --git a/src/m_Do/m_Do_mtx.cpp b/src/m_Do/m_Do_mtx.cpp index e0df166e8e..8b57abd3e4 100644 --- a/src/m_Do/m_Do_mtx.cpp +++ b/src/m_Do/m_Do_mtx.cpp @@ -12,19 +12,19 @@ #include "global.h" #include "os_report.h" -Mtx mDoMtx_stack_c::now; +DUSK_GAME_DATA Mtx mDoMtx_stack_c::now; -Mtx mDoMtx_stack_c::buffer[16]; +DUSK_GAME_DATA Mtx mDoMtx_stack_c::buffer[16]; -Mtx* mDoMtx_stack_c::next = mDoMtx_stack_c::buffer; +DUSK_GAME_DATA Mtx* mDoMtx_stack_c::next = mDoMtx_stack_c::buffer; -Mtx* mDoMtx_stack_c::end = mDoMtx_stack_c::buffer + 16; +DUSK_GAME_DATA Mtx* mDoMtx_stack_c::end = mDoMtx_stack_c::buffer + 16; static mDoMtx_stack_c mDoMtx_stack; static mDoMtx_quatStack_c mDoMtx_quatStack; -Mtx g_mDoMtx_identity = { +DUSK_GAME_DATA Mtx g_mDoMtx_identity = { {1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}, From a6f059827bf7568cdda6923c8926d9ed258faec5 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 19:24:08 -0600 Subject: [PATCH 043/223] Game ABI / headers refactoring (#2215) * Game ABI / headers refactoring * Delete dusk/imgui.h --- cmake/AndroidExports.cmake | 3 +- cmake/AppleExports.cmake | 3 +- cmake/GameABIConfig.cmake | 43 ++++- cmake/ModSDK.cmake | 128 +++++++++---- cmake/WindowsExports.cmake | 3 +- docs/modding.md | 31 ++-- files.cmake | 175 +++++++++--------- include/SSystem/SComponent/c_bg_s_chk.h | 2 +- include/SSystem/SComponent/c_m3d_g_tri.h | 2 +- include/d/actor/d_a_movie_player.h | 6 - include/d/actor/d_flower.h | 12 +- include/d/actor/d_grass.h | 8 +- include/d/d_bg_w.h | 6 +- include/d/d_bg_w_kcol.h | 2 +- include/d/d_com_inf_game.h | 34 ++-- include/d/d_drawlist.h | 2 +- include/d/d_event_data.h | 2 +- include/d/d_msg_class.h | 4 +- include/d/d_msg_flow.h | 2 +- include/d/d_save.h | 6 +- include/d/d_stage.h | 2 +- include/d/d_tresure.h | 2 +- include/d/dolzel.h | 2 +- include/dusk/imgui.h | 18 -- include/dusk/profiling.hpp | 12 -- include/f_op/f_op_actor_mng.h | 2 +- include/helpers/README.md | 12 ++ {src/dusk => include/helpers}/batch.hpp | 4 +- include/{dusk => helpers}/endian.h | 6 +- include/{dusk => helpers}/endian_gx.hpp | 0 include/{dusk => helpers}/endian_ssystem.h | 5 +- include/{dusk => helpers}/gx_helper.h | 13 +- include/{dusk => helpers}/math.h | 5 +- include/{dusk => helpers}/offset_ptr.h | 13 +- include/{dusk => helpers}/string.hpp | 22 +-- include/m_Do/m_Do_audio.h | 14 +- include/m_Do/m_Do_controller_pad.h | 27 ++- include/m_Do/m_Do_lib.h | 2 +- include/m_Do/m_Do_mtx.h | 2 +- include/m_Do/m_Do_printf.h | 2 +- include/os_report.h | 6 - .../JSystem/J2DGraph/J2DMaterialFactory.h | 2 +- .../include/JSystem/J2DGraph/J2DPane.h | 2 +- .../include/JSystem/J2DGraph/J2DPicture.h | 2 +- .../include/JSystem/J2DGraph/J2DScreen.h | 2 +- .../include/JSystem/J2DGraph/J2DTevs.h | 2 +- .../include/JSystem/J2DGraph/J2DTextBox.h | 6 +- .../JSystem/J3DGraphAnimator/J3DAnimation.h | 2 +- .../JSystem/J3DGraphAnimator/J3DCluster.h | 2 +- .../JSystem/J3DGraphAnimator/J3DJointTree.h | 2 +- .../JSystem/J3DGraphAnimator/J3DModel.h | 8 +- .../include/JSystem/J3DGraphBase/J3DShape.h | 2 +- .../JSystem/J3DGraphBase/J3DShapeMtx.h | 2 +- .../include/JSystem/J3DGraphBase/J3DStruct.h | 2 +- .../include/JSystem/J3DGraphBase/J3DSys.h | 13 +- .../include/JSystem/J3DGraphBase/J3DTexture.h | 2 +- .../include/JSystem/J3DGraphBase/J3DVertex.h | 2 +- .../JSystem/J3DGraphLoader/J3DClusterLoader.h | 2 +- .../JSystem/J3DGraphLoader/J3DModelLoader.h | 2 +- .../include/JSystem/JAudio2/JAISound.h | 2 +- .../include/JSystem/JAudio2/JASAramStream.h | 2 +- .../include/JSystem/JAudio2/JASOscillator.h | 2 +- .../include/JSystem/JAudio2/JAUAudibleParam.h | 2 +- .../JSystem/JAudio2/JAUAudioArcInterpreter.h | 2 +- .../JSystem/JAudio2/JAUSoundAnimator.h | 2 +- .../include/JSystem/JAudio2/JAUSoundTable.h | 2 +- libs/JSystem/include/JSystem/JGadget/binary.h | 2 +- .../include/JSystem/JHostIO/JHICommonMem.h | 2 +- .../include/JSystem/JKernel/JKRArchive.h | 2 +- libs/JSystem/include/JSystem/JMath/JMath.h | 2 +- .../include/JSystem/JMessage/JMessage.h | 2 +- .../JSystem/JParticle/JPADynamicsBlock.h | 2 +- .../include/JSystem/JParticle/JPAResource.h | 2 +- .../JSystem/JStudio/JStudio/jstudio-math.h | 2 +- .../include/JSystem/JSupport/JSUInputStream.h | 2 +- .../include/JSystem/JUtility/JUTFont.h | 2 +- .../include/JSystem/JUtility/JUTNameTab.h | 2 +- .../include/JSystem/JUtility/JUTPalette.h | 2 +- .../include/JSystem/JUtility/JUTResFont.h | 2 +- .../include/JSystem/JUtility/JUTTexture.h | 4 +- .../JSystem/include/JSystem/JUtility/TColor.h | 2 +- .../src/J2DGraph/J2DMaterialFactory.cpp | 2 +- libs/JSystem/src/J2DGraph/J2DPane.cpp | 2 +- libs/JSystem/src/J2DGraph/J2DTevs.cpp | 2 +- libs/JSystem/src/J2DGraph/J2DWindowEx.cpp | 2 +- .../JSystem/src/J3DGraphAnimator/J3DModel.cpp | 8 + libs/JSystem/src/J3DGraphBase/J3DSys.cpp | 16 +- libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp | 2 +- libs/JSystem/src/JAHostIO/JAHioNode.cpp | 2 +- libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp | 2 +- libs/JSystem/src/JFramework/JFWDisplay.cpp | 3 +- libs/JSystem/src/JKernel/JKRFileCache.cpp | 2 +- libs/JSystem/src/JKernel/JKRFileLoader.cpp | 2 +- libs/JSystem/src/JKernel/JKRHeap.cpp | 4 +- libs/JSystem/src/JKernel/JKRThread.cpp | 2 +- libs/JSystem/src/JParticle/JPAParticle.cpp | 4 + libs/JSystem/src/JParticle/JPAResource.cpp | 2 + libs/JSystem/src/JStudio/JStudio/stb-data.cpp | 2 +- libs/JSystem/src/JUtility/JUTConsole.cpp | 2 +- libs/JSystem/src/JUtility/JUTException.cpp | 2 +- libs/JSystem/src/JUtility/JUTFader.cpp | 1 + libs/freeverb/CMakeLists.txt | 2 + .../{ => include/freeverb}/allpass.hpp | 0 libs/freeverb/{ => include/freeverb}/comb.hpp | 0 .../{ => include/freeverb}/denormals.h | 0 .../{ => include/freeverb}/revmodel.hpp | 0 libs/freeverb/{ => include/freeverb}/tuning.h | 0 mods/ao_mod/CMakeLists.txt | 1 + mods/shadow_mod/CMakeLists.txt | 1 + mods/shadow_mod/src/mod.cpp | 2 - sdk/CMakeLists.txt | 15 +- {include => sdk/include}/mods/api.h | 0 {include => sdk/include}/mods/hook.hpp | 6 +- {include => sdk/include}/mods/meta.hpp | 2 +- {include => sdk/include}/mods/service.hpp | 4 +- {include => sdk/include}/mods/svc/camera.h | 2 +- {include => sdk/include}/mods/svc/config.h | 2 +- {include => sdk/include}/mods/svc/game.h | 8 +- {include => sdk/include}/mods/svc/gfx.h | 6 +- {include => sdk/include}/mods/svc/hook.h | 2 +- {include => sdk/include}/mods/svc/host.h | 2 +- {include => sdk/include}/mods/svc/log.h | 2 +- {include => sdk/include}/mods/svc/overlay.h | 2 +- {include => sdk/include}/mods/svc/resource.h | 2 +- {include => sdk/include}/mods/svc/texture.h | 2 +- {include => sdk/include}/mods/svc/ui.h | 4 +- sdk/src/game_feature.cpp | 5 + src/Z2AudioCS/SpkSystem.cpp | 1 - src/d/actor/d_a_alink.cpp | 2 +- src/d/actor/d_a_alink_effect.inc | 2 +- src/d/actor/d_a_bg_obj.cpp | 2 +- src/d/actor/d_a_mirror.cpp | 2 +- src/d/actor/d_a_movie_player.cpp | 11 +- src/d/actor/d_a_npc_hanjo.cpp | 2 +- src/d/actor/d_a_npc_saru.cpp | 2 +- src/d/actor/d_a_npc_shop0.cpp | 2 +- src/d/actor/d_a_npc_yelia.cpp | 2 +- src/d/actor/d_a_npc_ykw.cpp | 2 +- src/d/actor/d_a_obj_gra2.cpp | 2 +- src/d/actor/d_a_obj_lv4chandelier.cpp | 2 +- src/d/actor/d_a_obj_sekizoa.cpp | 2 +- src/d/actor/d_a_tag_evt.cpp | 2 +- src/d/actor/d_a_tag_msg.cpp | 2 +- src/d/actor/d_flower.inc | 22 +-- src/d/actor/d_grass.inc | 14 +- src/d/d_bg_parts.cpp | 2 +- src/d/d_bg_s.cpp | 2 +- src/d/d_com_inf_game.cpp | 22 ++- src/d/d_cursor_mng.cpp | 3 - src/d/d_drawlist.cpp | 2 +- src/d/d_ev_camera.cpp | 2 +- src/d/d_event.cpp | 2 +- src/d/d_event_manager.cpp | 2 +- src/d/d_file_sel_info.cpp | 2 +- src/d/d_file_select.cpp | 2 +- src/d/d_gameover.cpp | 2 +- src/d/d_menu_calibration.cpp | 2 +- src/d/d_menu_dmap.cpp | 6 +- src/d/d_menu_fishing.cpp | 2 +- src/d/d_menu_fmap.cpp | 8 +- src/d/d_menu_ring.cpp | 1 + src/d/d_meter2_info.cpp | 2 +- src/d/d_meter_button.cpp | 7 +- src/d/d_model.cpp | 4 + src/d/d_particle.cpp | 6 +- src/d/d_save.cpp | 4 +- src/d/d_stage.cpp | 4 +- src/dusk/OSReport.cpp | 3 +- {include => src}/dusk/achievements.h | 0 {include => src}/dusk/action_bindings.h | 0 {include => src}/dusk/app_info.hpp | 5 +- {include => src}/dusk/audio.h | 5 +- {include => src}/dusk/audio/DuskAudioSystem.h | 0 src/dusk/audio/DuskDsp.cpp | 4 +- {include => src}/dusk/autosave.h | 5 - {include => src}/dusk/config.hpp | 5 +- {include => src}/dusk/config_var.hpp | 5 +- {include => src}/dusk/crash_handler.h | 0 {include => src}/dusk/crash_reporting.h | 0 {include => src}/dusk/discord_presence.hpp | 0 {include => src}/dusk/dusk.h | 5 +- src/dusk/dvd_asset.cpp | 2 +- {include => src}/dusk/dvd_asset.hpp | 0 {include => src}/dusk/extras.h | 5 +- {include => src}/dusk/frame_interpolation.h | 0 {include => src}/dusk/game_clock.h | 0 {include => src}/dusk/gamepad_color.h | 5 - {include => src}/dusk/gfx.hpp | 0 src/dusk/globals.cpp | 19 ++ {include => src}/dusk/gyro.h | 0 {include => src}/dusk/hotkeys.h | 5 +- src/dusk/imgui/ImGuiMenuTools.cpp | 1 + {include => src}/dusk/io.hpp | 5 +- {include => src}/dusk/layout.hpp | 5 +- {include => src}/dusk/livesplit.h | 0 {include => src}/dusk/logging.h | 5 +- src/dusk/main.cpp | 1 + {include => src}/dusk/main.h | 5 +- .../dusk/map_loader_definitions.h | 0 {include => src}/dusk/memory.h | 5 +- {include => src}/dusk/menu_pointer.h | 0 {include => src}/dusk/mod_loader.hpp | 0 {include => src}/dusk/mouse.h | 0 {include => src}/dusk/os.h | 9 +- {include => src}/dusk/scope_guard.hpp | 5 +- {include => src}/dusk/settings.h | 0 {include => src}/dusk/speedrun.h | 0 .../dusk/texture_replacements.hpp | 5 +- {include => src}/dusk/time.h | 5 +- {include => src}/dusk/touch_camera.h | 0 {include => src}/dusk/version.hpp | 5 +- src/f_pc/f_pc_manager.cpp | 4 + src/{dusk => helpers}/batch.cpp | 6 +- src/{dusk => helpers}/endian.cpp | 4 +- src/{dusk => helpers}/offset_ptr.cpp | 4 +- src/{dusk => helpers}/string.cpp | 6 +- src/m_Do/m_Do_audio.cpp | 16 ++ src/m_Do/m_Do_controller_pad.cpp | 17 ++ src/m_Do/m_Do_graphic.cpp | 4 +- src/m_Do/m_Do_main.cpp | 26 +-- src/m_Do/m_Do_printf.cpp | 1 + 221 files changed, 665 insertions(+), 601 deletions(-) delete mode 100644 include/dusk/imgui.h delete mode 100644 include/dusk/profiling.hpp create mode 100644 include/helpers/README.md rename {src/dusk => include/helpers}/batch.hpp (90%) rename include/{dusk => helpers}/endian.h (98%) rename include/{dusk => helpers}/endian_gx.hpp (100%) rename include/{dusk => helpers}/endian_ssystem.h (93%) rename include/{dusk => helpers}/gx_helper.h (94%) rename include/{dusk => helpers}/math.h (84%) rename include/{dusk => helpers}/offset_ptr.h (89%) rename include/{dusk => helpers}/string.hpp (89%) rename libs/freeverb/{ => include/freeverb}/allpass.hpp (100%) rename libs/freeverb/{ => include/freeverb}/comb.hpp (100%) rename libs/freeverb/{ => include/freeverb}/denormals.h (100%) rename libs/freeverb/{ => include/freeverb}/revmodel.hpp (100%) rename libs/freeverb/{ => include/freeverb}/tuning.h (100%) rename {include => sdk/include}/mods/api.h (100%) rename {include => sdk/include}/mods/hook.hpp (98%) rename {include => sdk/include}/mods/meta.hpp (99%) rename {include => sdk/include}/mods/service.hpp (99%) rename {include => sdk/include}/mods/svc/camera.h (99%) rename {include => sdk/include}/mods/svc/config.h (99%) rename {include => sdk/include}/mods/svc/game.h (81%) rename {include => sdk/include}/mods/svc/gfx.h (98%) rename {include => sdk/include}/mods/svc/hook.h (99%) rename {include => sdk/include}/mods/svc/host.h (99%) rename {include => sdk/include}/mods/svc/log.h (98%) rename {include => sdk/include}/mods/svc/overlay.h (98%) rename {include => sdk/include}/mods/svc/resource.h (98%) rename {include => sdk/include}/mods/svc/texture.h (99%) rename {include => sdk/include}/mods/svc/ui.h (99%) create mode 100644 sdk/src/game_feature.cpp rename {include => src}/dusk/achievements.h (100%) rename {include => src}/dusk/action_bindings.h (100%) rename {include => src}/dusk/app_info.hpp (86%) rename {include => src}/dusk/audio.h (72%) rename {include => src}/dusk/audio/DuskAudioSystem.h (100%) rename {include => src}/dusk/autosave.h (86%) rename {include => src}/dusk/config.hpp (99%) rename {include => src}/dusk/config_var.hpp (99%) rename {include => src}/dusk/crash_handler.h (100%) rename {include => src}/dusk/crash_reporting.h (100%) rename {include => src}/dusk/discord_presence.hpp (100%) rename {include => src}/dusk/dusk.h (87%) rename {include => src}/dusk/dvd_asset.hpp (100%) rename {include => src}/dusk/extras.h (73%) rename {include => src}/dusk/frame_interpolation.h (100%) rename {include => src}/dusk/game_clock.h (100%) rename {include => src}/dusk/gamepad_color.h (66%) rename {include => src}/dusk/gfx.hpp (100%) rename {include => src}/dusk/gyro.h (100%) rename {include => src}/dusk/hotkeys.h (89%) rename {include => src}/dusk/io.hpp (97%) rename {include => src}/dusk/layout.hpp (90%) rename {include => src}/dusk/livesplit.h (100%) rename {include => src}/dusk/logging.h (93%) rename {include => src}/dusk/main.h (91%) rename {include => src}/dusk/map_loader_definitions.h (100%) rename {include => src}/dusk/memory.h (68%) rename {include => src}/dusk/menu_pointer.h (100%) rename {include => src}/dusk/mod_loader.hpp (100%) rename {include => src}/dusk/mouse.h (100%) rename {include => src}/dusk/os.h (62%) rename {include => src}/dusk/scope_guard.hpp (79%) rename {include => src}/dusk/settings.h (100%) rename {include => src}/dusk/speedrun.h (100%) rename {include => src}/dusk/texture_replacements.hpp (78%) rename {include => src}/dusk/time.h (98%) rename {include => src}/dusk/touch_camera.h (100%) rename {include => src}/dusk/version.hpp (95%) rename src/{dusk => helpers}/batch.cpp (97%) rename src/{dusk => helpers}/endian.cpp (94%) rename src/{dusk => helpers}/offset_ptr.cpp (92%) rename src/{dusk => helpers}/string.cpp (96%) diff --git a/cmake/AndroidExports.cmake b/cmake/AndroidExports.cmake index 23e14898e0..66e80d3f4a 100644 --- a/cmake/AndroidExports.cmake +++ b/cmake/AndroidExports.cmake @@ -33,8 +33,6 @@ function(setup_android_exports target) set(_vscript "${CMAKE_BINARY_DIR}/dusklight_exports.ver") add_custom_command(TARGET ${target} PRE_LINK - # TODO: src/dusk/ is NOT excluded: inline code in game headers - # currently call into it (e.g. dusk::frame_interp::lookup_replacement). COMMAND "${SYMGEN_EXE}" exports "@${_rsp}" --out "${_vscript}" @@ -42,6 +40,7 @@ function(setup_android_exports target) --exclude cmake_pch --exclude miniz --exclude asan_options + --exclude src/dusk # Resolved from the Java side; the SDL ones live in the statically-linked # SDL archive, outside the provenance scan. --extra-sym JNI_OnLoad diff --git a/cmake/AppleExports.cmake b/cmake/AppleExports.cmake index 0b43fdb6ee..2c78939811 100644 --- a/cmake/AppleExports.cmake +++ b/cmake/AppleExports.cmake @@ -41,14 +41,13 @@ function(setup_apple_exports target) set(_exp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.exp") add_custom_command(TARGET ${target} PRE_LINK - # TODO: src/dusk/ is NOT excluded: inline code in game headers - # currently call into it (e.g. dusk::frame_interp::lookup_replacement). COMMAND "${_symgen}" exports "@${_rsp}" --out "${_exp}" --exclude cmake_pch --exclude miniz --exclude asan_options + --exclude src/dusk ${_sdk_args} COMMENT "Generating dusklight exports" VERBATIM) diff --git a/cmake/GameABIConfig.cmake b/cmake/GameABIConfig.cmake index d48be445a2..8b95dcaf67 100644 --- a/cmake/GameABIConfig.cmake +++ b/cmake/GameABIConfig.cmake @@ -9,24 +9,47 @@ if (ANDROID) list(APPEND _game_compile_defs TARGET_ANDROID=1) endif () -set(_game_include_dirs +# Public game headers +set(_game_abi_include_dirs ${_game_root}/include - ${_game_root}/src - ${_game_root}/assets/GZ2E01 # TODO: make this dynamic if needed? + ${_game_root}/assets/GZ2E01 ${_game_root}/libs/JSystem/include - ${_game_root}/libs ${_game_root}/extern/aurora/include/dolphin ${_game_root}/extern/aurora/include + ${_game_root}/sdk/include +) + +# Internal game headers +set(_game_include_dirs + ${_game_abi_include_dirs} + ${_game_root}/src ${_game_root}/extern ${CMAKE_CURRENT_BINARY_DIR} ) -# Interface target for mods and sub-projects to inherit game headers/defines. +# Mod API, including services +add_library(dusklight_mod_api INTERFACE) +target_include_directories(dusklight_mod_api INTERFACE ${_game_root}/sdk/include) + +# Full internal headers used to build the game add_library(dusklight_game_headers INTERFACE) target_include_directories(dusklight_game_headers INTERFACE ${_game_include_dirs}) target_compile_definitions(dusklight_game_headers INTERFACE ${_game_compile_defs}) -if (TARGET dawn::dawncpp_headers) - target_link_libraries(dusklight_game_headers INTERFACE dawn::dawncpp_headers) -elseif (TARGET dawn::webgpu_dawn) - target_link_libraries(dusklight_game_headers INTERFACE dawn::webgpu_dawn) -endif () + +# Public game ABI for mods +add_library(dusklight_game_abi_headers INTERFACE) +target_include_directories(dusklight_game_abi_headers INTERFACE ${_game_abi_include_dirs}) +target_compile_definitions(dusklight_game_abi_headers INTERFACE ${_game_compile_defs}) + +# Mod feature targets +add_library(dusklight_mod_feature_game INTERFACE) +target_link_libraries(dusklight_mod_feature_game INTERFACE + dusklight_mod_api + dusklight_game_abi_headers) +target_compile_definitions(dusklight_mod_feature_game INTERFACE DUSK_MOD_FEATURE_GAME=1) +target_sources(dusklight_mod_feature_game INTERFACE + ${_game_root}/sdk/src/game_feature.cpp) + +add_library(dusklight_mod_feature_webgpu INTERFACE) +target_link_libraries(dusklight_mod_feature_webgpu INTERFACE dusklight_mod_api) +target_compile_definitions(dusklight_mod_feature_webgpu INTERFACE DUSK_MOD_FEATURE_WEBGPU=1) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 0e8d72a0a0..87125e12fd 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -1,4 +1,4 @@ -# add_mod( SOURCES ... MOD_JSON +# add_mod( [FEATURES ...] SOURCES ... MOD_JSON # [RUNTIME_LIBRARIES ...] [RES_DIR ] [OVERLAY_DIR ] # [TEXTURES_DIR ] [OUTPUT_DIR ] [BUNDLE]) set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into") @@ -47,9 +47,28 @@ function(_mod_collect_assets out_var dir) set(${out_var} ${_files} PARENT_SCOPE) endfunction() +function(_mod_add_webgpu_headers target_name) + if (NOT TARGET dawn::dawncpp_headers AND NOT TARGET dawn::webgpu_dawn) + include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../extern/aurora/cmake/AuroraDependencyVersions.cmake") + set(AURORA_DAWN_PROVIDER "package" CACHE STRING "How to provide Dawn for the mod SDK") + include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../extern/aurora/cmake/AuroraDawnProvider.cmake") + endif () + + if (TARGET dawn::dawncpp_headers) + target_link_libraries(${target_name} PRIVATE dawn::dawncpp_headers) + elseif (TARGET dawn::webgpu_dawn) + target_link_libraries(${target_name} PRIVATE dawn::webgpu_dawn) + else () + message(FATAL_ERROR "add_mod: FEATURES webgpu could not provide WebGPU headers") + endif () +endfunction() + function(add_mod target_name) cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR" - "SOURCES;RUNTIME_LIBRARIES" ${ARGN}) + "SOURCES;RUNTIME_LIBRARIES;FEATURES" ${ARGN}) + if (ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "add_mod: unknown arguments: ${ARG_UNPARSED_ARGUMENTS}") + endif () if (NOT ARG_MOD_JSON) message(FATAL_ERROR "add_mod: MOD_JSON is required") endif () @@ -58,7 +77,27 @@ function(add_mod target_name) message(FATAL_ERROR "add_mod: MOD_JSON does not exist: ${_mod_json}") endif () + set(_supported_features game webgpu) + set(_features "") + foreach (_feature IN LISTS ARG_FEATURES) + list(FIND _supported_features "${_feature}" _feature_index) + if (_feature_index EQUAL -1) + list(JOIN _supported_features ", " _supported_features_text) + message(FATAL_ERROR + "add_mod: unknown feature '${_feature}' (supported: ${_supported_features_text})") + endif () + list(FIND _features "${_feature}" _duplicate_index) + if (NOT _duplicate_index EQUAL -1) + message(FATAL_ERROR "add_mod: duplicate feature '${_feature}'") + endif () + list(APPEND _features "${_feature}") + endforeach () + if (_features AND NOT ARG_SOURCES) + message(FATAL_ERROR "add_mod: FEATURES requires SOURCES") + endif () + set(_has_lib FALSE) + set(_needs_host_link FALSE) set(_lib_platform "") set(_lib_name "") if (ARG_SOURCES) @@ -72,7 +111,16 @@ function(add_mod target_name) VISIBILITY_INLINES_HIDDEN ON WINDOWS_EXPORT_ALL_SYMBOLS OFF) target_compile_features(${target_name} PRIVATE cxx_std_20) - target_link_libraries(${target_name} PRIVATE dusklight_game_headers) + target_link_libraries(${target_name} PRIVATE dusklight_mod_api) + foreach (_feature IN LISTS _features) + target_link_libraries(${target_name} PRIVATE dusklight_mod_feature_${_feature}) + if (_feature STREQUAL "webgpu") + _mod_add_webgpu_headers(${target_name}) + endif () + if (_feature STREQUAL "game" OR _feature STREQUAL "webgpu") + set(_needs_host_link TRUE) + endif () + endforeach () if (NOT TARGET dusklight) # Apply global compile options for out-of-tree mod builds @@ -95,34 +143,42 @@ function(add_mod target_name) endif () if (APPLE) - if (TARGET dusklight) - set(_game_exe "$") - add_dependencies(${target_name} dusklight) - elseif (DUSK_GAME_EXE) - _mod_resolve_source_path(_game_exe "${DUSK_GAME_EXE}") - else () - message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (game executable)") + if (_needs_host_link) + if (TARGET dusklight) + set(_game_exe "$") + add_dependencies(${target_name} dusklight) + elseif (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_exe "${DUSK_GAME_EXE}") + else () + message(FATAL_ERROR + "add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (game executable)") + endif () + target_link_options(${target_name} PRIVATE + -Xlinker -bundle_loader -Xlinker "${_game_exe}") + set_property(TARGET ${target_name} APPEND PROPERTY LINK_DEPENDS "${_game_exe}") endif () - target_link_options(${target_name} PRIVATE - -Xlinker -bundle_loader -Xlinker "${_game_exe}") - set_property(TARGET ${target_name} APPEND PROPERTY LINK_DEPENDS "${_game_exe}") set_target_properties(${target_name} PROPERTIES BUILD_RPATH "@loader_path" INSTALL_RPATH "@loader_path") elseif (ANDROID) - if (TARGET dusklight) - target_link_libraries(${target_name} PRIVATE dusklight) - elseif (DUSK_GAME_EXE) - _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") - target_link_libraries(${target_name} PRIVATE "${_game_lib}") - else () - message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (libmain.so or stub)") + if (_needs_host_link) + if (TARGET dusklight) + target_link_libraries(${target_name} PRIVATE dusklight) + elseif (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") + target_link_libraries(${target_name} PRIVATE "${_game_lib}") + else () + message(FATAL_ERROR + "add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (libmain.so or stub)") + endif () endif () set_target_properties(${target_name} PROPERTIES BUILD_RPATH "$ORIGIN" INSTALL_RPATH "$ORIGIN") elseif (UNIX) - target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined) + if (_needs_host_link) + target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined) + endif () set_target_properties(${target_name} PROPERTIES BUILD_RPATH "$ORIGIN" INSTALL_RPATH "$ORIGIN") @@ -131,22 +187,26 @@ function(add_mod target_name) # setup_windows_exports); cl and clang-cl both consume it in MSVC mode. Function # calls resolve through import thunks; game data is reachable only through # __declspec(dllimport), i.e. DUSK_GAME_DATA-annotated declarations. - if (TARGET dusklight) - if (NOT DUSK_GAME_IMPLIB) - message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set (see setup_windows_exports)") - endif () - set(_game_lib "${DUSK_GAME_IMPLIB}") - elseif (DUSK_GAME_EXE) - _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") - if (NOT _game_lib MATCHES "\\.lib$") + if (_needs_host_link) + if (TARGET dusklight) + if (NOT DUSK_GAME_IMPLIB) + message(FATAL_ERROR + "add_mod: DUSK_GAME_IMPLIB is not set (see setup_windows_exports)") + endif () + set(_game_lib "${DUSK_GAME_IMPLIB}") + elseif (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") + if (NOT _game_lib MATCHES "\\.lib$") + message(FATAL_ERROR + "add_mod: DUSK_GAME_EXE must be an import library on Windows " + "(sdk/windows-.lib)") + endif () + else () message(FATAL_ERROR - "add_mod: DUSK_GAME_EXE must be an import library on Windows " - "(sdk/windows-.lib)") + "add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (import library)") endif () - else () - message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (import library)") + target_link_libraries(${target_name} PRIVATE "${_game_lib}") endif () - target_link_libraries(${target_name} PRIVATE "${_game_lib}") set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0) endif () diff --git a/cmake/WindowsExports.cmake b/cmake/WindowsExports.cmake index a82f7756af..4596ac7b69 100644 --- a/cmake/WindowsExports.cmake +++ b/cmake/WindowsExports.cmake @@ -57,14 +57,13 @@ function(setup_windows_exports target) # Generate curated exports list from the main binary set(_def "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.def") add_custom_command(TARGET ${target} PRE_LINK - # TODO: src/dusk/ is NOT excluded: inline code in game headers - # currently call into it (e.g. dusk::frame_interp::lookup_replacement). COMMAND "${_symgen}" def "@${_rsp}" --out "${_def}" --exclude cmake_pch --exclude miniz --exclude asan_options + --exclude src/dusk --max-exports 58000 ${_sdk_args} ${_forward_args} diff --git a/docs/modding.md b/docs/modding.md index 4988f6a6e4..8afe8701e5 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -50,6 +50,7 @@ set(DUSKLIGHT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dusklight" CACHE PATH "Path to du add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL) add_mod(my_mod + FEATURES game # optional SOURCES src/mod.cpp MOD_JSON mod.json RES_DIR res # optional @@ -58,6 +59,12 @@ add_mod(my_mod ) ``` +Available features: +- `game`: Allows calling into and hooking game code. Mods that **only** use services may omit it, providing a wider + range of compatibility with Dusklight versions and a slightly faster build process. +- `webgpu`: Allows importing the WebGPU API (`webgpu/webgpu.h`). Must be enabled when using + [GfxService](#gfxservice-modssvcgfxh). + Building produces `my_mod.dusk` in `build//mods/` (configurable via the `DUSK_MODS_OUTPUT_DIR` cache variable). Dusklight searches a `mods/` directory next to the app in addition to the user directory, so a dev build launched from `build//` picks these up automatically: rebuild, relaunch (or click Reload), done. @@ -146,7 +153,7 @@ the service safe to call. A mod can use `IMPORT_SERVICE_VERSION` (or its optiona version to remain compatible with older Dusklight versions, then use `SERVICE_HAS` to check at runtime for fields added after that explicitly requested version. -The contract (see `include/mods/api.h` for the full version): +The contract (see `sdk/include/mods/api.h` for the full version): - **A required import is guaranteed valid.** If the service is missing or too old, the mod fails to load with a clear error. No need to null check at call sites. @@ -415,6 +422,8 @@ unless changing host UI is intentional. ### GfxService (`mods/svc/gfx.h`) +**Requires `add_mod(... FEATURES webgpu)`** + Direct WebGPU access at various stages of the rendering pipeline. Mods use the `wgpu*` C API (via `webgpu/webgpu.h`) for custom draws and compute dispatches. Mods must manage their own WebGPU state, including pipelines and bind groups. @@ -465,6 +474,8 @@ first in-game frame. Projection matrices match the renderer's WebGPU clip conven ## Hooking Game Functions +**Requires `add_mod(... FEATURES game)`** + Mods may hook the vast majority of game functions, including file-local static, private and virtual functions. `mods/hook.hpp` provides typed helpers over the hook service: @@ -581,24 +592,6 @@ dusk::mods::hook_add_pre(svc_hook, on_create_item_pre); For reference parameters (e.g. `const cXyz& pos`), `arg_ref` yields a direct reference. -### Game code ABI contract - -A primary consideration when letting mods link against the game is maintaining ABI stability across Dusklight -versions. If your mod calls or hooks game code directly (anything beyond the service APIs), import `GameService` -(`mods/svc/game.h`): - -```cpp -IMPORT_SERVICE(GameService, svc_game); -``` - -Its major version is the game code ABI epoch: it's bumped when game struct or vtable layouts change incompatibly, and -the ordinary service version check then rejects your mod with a clear error instead of letting it corrupt memory in a -version it wasn't built for. Service-only and asset-only mods should *not* import it and will continue to work across -game ABI changes. - -The more you can do through services, the better: a mod that avoids touching game code directly sidesteps future ABI -breaks entirely and plays nicer with other enabled mods. - --- ## Asset Overlays diff --git a/files.cmake b/files.cmake index c1546f1db0..c8c92c9b75 100644 --- a/files.cmake +++ b/files.cmake @@ -1411,68 +1411,101 @@ set(DOLPHIN_FILES ) set(DUSK_FILES - include/dusk/action_bindings.h - include/dusk/endian_gx.hpp - include/dusk/config.hpp - include/dusk/dvd_asset.hpp - include/dusk/scope_guard.hpp - src/dusk/dvd_asset.cpp + include/helpers/batch.hpp + include/helpers/endian_gx.hpp src/d/actor/d_a_alink_dusk.cpp - src/dusk/android_frame_rate.hpp + src/dusk/OSContext.cpp + src/dusk/OSMutex.cpp + src/dusk/OSReport.cpp + src/dusk/OSThread.cpp + src/dusk/achievements.cpp + src/dusk/action_bindings.cpp + src/dusk/action_bindings.h src/dusk/android_frame_rate.cpp + src/dusk/android_frame_rate.hpp src/dusk/asserts.cpp - src/dusk/batch.cpp - src/dusk/batch.hpp + src/dusk/autosave.cpp src/dusk/config.cpp + src/dusk/config.hpp src/dusk/crash_handler.cpp src/dusk/crash_reporting.cpp src/dusk/data.cpp src/dusk/data.hpp - src/dusk/endian.cpp + src/dusk/discord.cpp + src/dusk/discord.hpp + src/dusk/discord_presence.cpp + src/dusk/dvd_asset.cpp + src/dusk/dvd_asset.hpp src/dusk/extras.c src/dusk/file_select.cpp src/dusk/file_select.hpp src/dusk/frame_interpolation.cpp src/dusk/game_clock.cpp + src/dusk/gamepad_color.cpp src/dusk/globals.cpp src/dusk/gyro.cpp - include/dusk/menu_pointer.h - src/dusk/menu_pointer.cpp - src/dusk/mouse.cpp - src/dusk/gamepad_color.cpp - src/dusk/autosave.cpp src/dusk/http/http.hpp - src/dusk/io.cpp - src/dusk/layout.cpp - src/dusk/logging.cpp - src/dusk/settings.cpp - src/dusk/speedrun.cpp - src/dusk/string.cpp - src/dusk/stubs.cpp - include/dusk/texture_replacements.hpp - src/dusk/texture_replacements.cpp - src/dusk/touch_camera.cpp - src/dusk/update_check.cpp - src/dusk/update_check.hpp - #src/dusk/m_Do_ext_dusk.cpp - src/dusk/imgui/ImGuiConfig.hpp - src/dusk/imgui/ImGuiConsole.hpp - src/dusk/imgui/ImGuiConsole.cpp - src/dusk/imgui/ImGuiEngine.cpp - src/dusk/imgui/ImGuiEngine.hpp + src/dusk/imgui/ImGuiActorSpawner.cpp src/dusk/imgui/ImGuiBloomWindow.cpp src/dusk/imgui/ImGuiBloomWindow.hpp + src/dusk/imgui/ImGuiCameraOverlay.cpp + src/dusk/imgui/ImGuiConfig.hpp + src/dusk/imgui/ImGuiConsole.cpp + src/dusk/imgui/ImGuiConsole.hpp + src/dusk/imgui/ImGuiControllerOverlay.cpp + src/dusk/imgui/ImGuiEngine.cpp + src/dusk/imgui/ImGuiEngine.hpp + src/dusk/imgui/ImGuiHeapOverlay.cpp src/dusk/imgui/ImGuiMenuTools.cpp src/dusk/imgui/ImGuiMenuTools.hpp - src/dusk/imgui/ImGuiActorSpawner.cpp src/dusk/imgui/ImGuiProcessOverlay.cpp - src/dusk/imgui/ImGuiCameraOverlay.cpp - src/dusk/imgui/ImGuiHeapOverlay.cpp - src/dusk/imgui/ImGuiControllerOverlay.cpp - src/dusk/imgui/ImGuiStubLog.cpp src/dusk/imgui/ImGuiSaveEditor.cpp - src/dusk/imgui/ImGuiStateShare.hpp src/dusk/imgui/ImGuiStateShare.cpp + src/dusk/imgui/ImGuiStateShare.hpp + src/dusk/imgui/ImGuiStubLog.cpp + src/dusk/io.cpp + src/dusk/iso_validate.cpp + src/dusk/layout.cpp + src/dusk/livesplit.cpp + src/dusk/logging.cpp + src/dusk/menu_pointer.cpp + src/dusk/menu_pointer.h + src/dusk/mods/loader/bundle_disk.cpp + src/dusk/mods/loader/bundle_zip.cpp + src/dusk/mods/loader/context.cpp + src/dusk/mods/loader/depgraph.cpp + src/dusk/mods/loader/depgraph.hpp + src/dusk/mods/loader/loader.cpp + src/dusk/mods/loader/loader.hpp + src/dusk/mods/loader/native_module.cpp + src/dusk/mods/loader/native_module.hpp + src/dusk/mods/log_buffer.cpp + src/dusk/mods/log_buffer.hpp + src/dusk/mods/manifest.cpp + src/dusk/mods/manifest.hpp + src/dusk/mods/svc/camera.cpp + src/dusk/mods/svc/config.cpp + src/dusk/mods/svc/config.hpp + src/dusk/mods/svc/game.cpp + src/dusk/mods/svc/gfx.cpp + src/dusk/mods/svc/hook.cpp + src/dusk/mods/svc/host.cpp + src/dusk/mods/svc/log.cpp + src/dusk/mods/svc/overlay.cpp + src/dusk/mods/svc/registry.cpp + src/dusk/mods/svc/registry.hpp + src/dusk/mods/svc/resource.cpp + src/dusk/mods/svc/texture.cpp + src/dusk/mods/svc/ui.cpp + src/dusk/mods/svc/ui.hpp + src/dusk/mouse.cpp + src/dusk/scope_guard.hpp + src/dusk/settings.cpp + src/dusk/speedrun.cpp + src/dusk/stubs.cpp + src/dusk/texture_replacements.cpp + src/dusk/texture_replacements.hpp + src/dusk/touch_camera.cpp src/dusk/ui/achievements.cpp src/dusk/ui/achievements.hpp src/dusk/ui/bool_button.cpp @@ -1481,9 +1514,9 @@ set(DUSK_FILES src/dusk/ui/button.hpp src/dusk/ui/component.cpp src/dusk/ui/component.hpp - src/dusk/ui/controls.hpp src/dusk/ui/controller_config.cpp src/dusk/ui/controller_config.hpp + src/dusk/ui/controls.hpp src/dusk/ui/document.cpp src/dusk/ui/document.hpp src/dusk/ui/editor.cpp @@ -1492,18 +1525,22 @@ set(DUSK_FILES src/dusk/ui/event.hpp src/dusk/ui/graphics_tuner.cpp src/dusk/ui/graphics_tuner.hpp - src/dusk/ui/input.cpp - src/dusk/ui/input.hpp src/dusk/ui/icon_provider.cpp src/dusk/ui/icon_provider.hpp + src/dusk/ui/input.cpp + src/dusk/ui/input.hpp src/dusk/ui/logs_window.cpp src/dusk/ui/logs_window.hpp + src/dusk/ui/menu_bar.cpp + src/dusk/ui/menu_bar.hpp src/dusk/ui/mod_texture_provider.cpp src/dusk/ui/mod_texture_provider.hpp src/dusk/ui/mod_window.cpp src/dusk/ui/mod_window.hpp src/dusk/ui/modal.cpp src/dusk/ui/modal.hpp + src/dusk/ui/mods_window.cpp + src/dusk/ui/mods_window.hpp src/dusk/ui/nav_types.hpp src/dusk/ui/number_button.cpp src/dusk/ui/number_button.hpp @@ -1511,10 +1548,6 @@ set(DUSK_FILES src/dusk/ui/overlay.hpp src/dusk/ui/pane.cpp src/dusk/ui/pane.hpp - src/dusk/ui/menu_bar.cpp - src/dusk/ui/menu_bar.hpp - src/dusk/ui/mods_window.cpp - src/dusk/ui/mods_window.hpp src/dusk/ui/prelaunch.cpp src/dusk/ui/prelaunch.hpp src/dusk/ui/preset.cpp @@ -1529,10 +1562,10 @@ set(DUSK_FILES src/dusk/ui/string_button.hpp src/dusk/ui/tab_bar.cpp src/dusk/ui/tab_bar.hpp - src/dusk/ui/touch_controls_common.cpp - src/dusk/ui/touch_controls_common.hpp src/dusk/ui/touch_controls.cpp src/dusk/ui/touch_controls.hpp + src/dusk/ui/touch_controls_common.cpp + src/dusk/ui/touch_controls_common.hpp src/dusk/ui/touch_controls_editor.cpp src/dusk/ui/touch_controls_editor.hpp src/dusk/ui/ui.cpp @@ -1541,47 +1574,13 @@ set(DUSK_FILES src/dusk/ui/warp.hpp src/dusk/ui/window.cpp src/dusk/ui/window.hpp - src/dusk/achievements.cpp - src/dusk/iso_validate.cpp - src/dusk/livesplit.cpp - src/dusk/offset_ptr.cpp - src/dusk/OSContext.cpp - src/dusk/OSReport.cpp - src/dusk/OSThread.cpp - src/dusk/OSMutex.cpp - src/dusk/mods/log_buffer.cpp - src/dusk/mods/log_buffer.hpp - src/dusk/mods/manifest.cpp - src/dusk/mods/manifest.hpp - src/dusk/mods/loader/bundle_disk.cpp - src/dusk/mods/loader/bundle_zip.cpp - src/dusk/mods/loader/context.cpp - src/dusk/mods/loader/depgraph.cpp - src/dusk/mods/loader/depgraph.hpp - src/dusk/mods/loader/loader.cpp - src/dusk/mods/loader/loader.hpp - src/dusk/mods/loader/native_module.cpp - src/dusk/mods/loader/native_module.hpp - src/dusk/mods/svc/camera.cpp - src/dusk/mods/svc/config.cpp - src/dusk/mods/svc/config.hpp - src/dusk/mods/svc/game.cpp - src/dusk/mods/svc/gfx.cpp - src/dusk/mods/svc/hook.cpp - src/dusk/mods/svc/host.cpp - src/dusk/mods/svc/log.cpp - src/dusk/mods/svc/overlay.cpp - src/dusk/mods/svc/resource.cpp - src/dusk/mods/svc/texture.cpp - src/dusk/mods/svc/ui.cpp - src/dusk/mods/svc/ui.hpp - src/dusk/mods/svc/registry.cpp - src/dusk/mods/svc/registry.hpp - src/dusk/discord.cpp - src/dusk/discord.hpp - src/dusk/discord_presence.cpp + src/dusk/update_check.cpp + src/dusk/update_check.hpp src/dusk/version.cpp - src/dusk/action_bindings.cpp + src/helpers/batch.cpp + src/helpers/endian.cpp + src/helpers/offset_ptr.cpp + src/helpers/string.cpp ) set(DUSK_HTTP_BACKEND_FILES diff --git a/include/SSystem/SComponent/c_bg_s_chk.h b/include/SSystem/SComponent/c_bg_s_chk.h index adbc0c1807..6908ef80ed 100644 --- a/include/SSystem/SComponent/c_bg_s_chk.h +++ b/include/SSystem/SComponent/c_bg_s_chk.h @@ -5,7 +5,7 @@ #include "f_pc/f_pc_base.h" #include "SSystem/SComponent/c_bg_s_grp_pass_chk.h" #include "SSystem/SComponent/c_bg_s_poly_pass_chk.h" -#include "dusk/endian.h" +#include "helpers/endian.h" struct cBgD_Vtx_t : public Vec {}; diff --git a/include/SSystem/SComponent/c_m3d_g_tri.h b/include/SSystem/SComponent/c_m3d_g_tri.h index cac178e064..9947616d54 100644 --- a/include/SSystem/SComponent/c_m3d_g_tri.h +++ b/include/SSystem/SComponent/c_m3d_g_tri.h @@ -2,7 +2,7 @@ #define C_M3D_G_TRI_H_ #include "SSystem/SComponent/c_m3d_g_pla.h" -#include "dusk/endian.h" +#include "helpers/endian.h" class cM3dGCyl; diff --git a/include/d/actor/d_a_movie_player.h b/include/d/actor/d_a_movie_player.h index 9280c849d3..fbd8784d40 100644 --- a/include/d/actor/d_a_movie_player.h +++ b/include/d/actor/d_a_movie_player.h @@ -95,12 +95,6 @@ static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr); #define THP_TEXTURE_SET_COUNT 3 #endif -#if TARGET_PC -namespace dusk { - void MoviePlayerShutdown(); -} -#endif - struct daMP_THPPlayer { /* 0x000 */ DVDFileInfo fileInfo; /* 0x03C */ THPHeader header; diff --git a/include/d/actor/d_flower.h b/include/d/actor/d_flower.h index cda0845867..db8661b92f 100644 --- a/include/d/actor/d_flower.h +++ b/include/d/actor/d_flower.h @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_xyz.h" #if TARGET_PC -#include "dusk/batch.hpp" +#include "helpers/batch.hpp" #endif class cCcD_Obj; @@ -112,11 +112,11 @@ public: TGXTexObj mTexObj_l_J_Ohana00_64TEX; TGXTexObj mTexObj_l_J_Ohana01_64128_0419TEX; - dusk::batch::LeafTemplate mTplHana00; // l_J_hana00DL - dusk::batch::LeafTemplate mTplHana00Cut; // l_J_hana00_cDL - dusk::batch::LeafTemplate mTplHana01; // l_J_hana01DL - dusk::batch::LeafTemplate mTplHana01Cut00; // l_J_hana01_c_00DL - dusk::batch::LeafTemplate mTplHana01Cut; // l_J_hana01_c_01DL + batch::LeafTemplate mTplHana00; // l_J_hana00DL + batch::LeafTemplate mTplHana00Cut; // l_J_hana00_cDL + batch::LeafTemplate mTplHana01; // l_J_hana01DL + batch::LeafTemplate mTplHana01Cut00; // l_J_hana01_c_00DL + batch::LeafTemplate mTplHana01Cut; // l_J_hana01_c_01DL #endif }; // Size: 0x12A54 diff --git a/include/d/actor/d_grass.h b/include/d/actor/d_grass.h index a7ed081198..4eee08c0e8 100644 --- a/include/d/actor/d_grass.h +++ b/include/d/actor/d_grass.h @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_xyz.h" #if TARGET_PC -#include "../../../src/dusk/batch.hpp" +#include #endif class cCcD_Obj; @@ -115,9 +115,9 @@ public: TGXTexObj mTexObj_l_M_Hijiki00TEX; TGXTexObj mTexObj_l_M_kusa05_RGBATEX; - dusk::batch::LeafTemplate mTplKusa9q; // l_M_Kusa_9qDL - dusk::batch::LeafTemplate mTplKusa9qCut; // l_M_Kusa_9q_cDL - dusk::batch::LeafTemplate mTplTengusa; // l_M_TenGusaDL + batch::LeafTemplate mTplKusa9q; // l_M_Kusa_9qDL + batch::LeafTemplate mTplKusa9qCut; // l_M_Kusa_9q_cDL + batch::LeafTemplate mTplTengusa; // l_M_TenGusaDL #endif }; // Size: 0x1D718 diff --git a/include/d/d_bg_w.h b/include/d/d_bg_w.h index 580e22d904..ae37d1c6d9 100644 --- a/include/d/d_bg_w.h +++ b/include/d/d_bg_w.h @@ -6,9 +6,9 @@ #include "d/d_bg_w_base.h" #include #include -#include "dusk/offset_ptr.h" -#include "dusk/endian.h" -#include "dusk/endian_ssystem.h" +#include "helpers/offset_ptr.h" +#include "helpers/endian.h" +#include "helpers/endian_ssystem.h" class cBgS_GrpPassChk; class cBgS_PolyPassChk; diff --git a/include/d/d_bg_w_kcol.h b/include/d/d_bg_w_kcol.h index 1fc812dd98..84b0da03f2 100644 --- a/include/d/d_bg_w_kcol.h +++ b/include/d/d_bg_w_kcol.h @@ -6,7 +6,7 @@ #include "d/d_bg_plc.h" #include "d/d_bg_s_sph_chk.h" #include "d/d_bg_w_base.h" -#include "dusk/offset_ptr.h" +#include "helpers/offset_ptr.h" class cBgS_GrpPassChk; class cBgS_PolyPassChk; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 98b6dbe81d..a598cbcc10 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -17,7 +17,15 @@ #include "m_Do/m_Do_graphic.h" #include -#include "dusk/profiling.hpp" +#if defined(DUSK_BUILDING_GAME) +#include +#include "dusk/settings.h" +#else +#ifndef ZoneScoped +#define ZoneScoped +#define ZoneScopedN(name) +#endif +#endif enum dComIfG_ButtonStatus { /* 0x00 */ BUTTON_STATUS_NONE, @@ -4837,27 +4845,23 @@ inline void dComIfGd_drawXluListDark() { g_dComIfG_gameInfo.drawlist.drawXluListDark(); } +#if TARGET_PC +void dComIfGd_drawXluListInvisible(); +#else inline void dComIfGd_drawXluListInvisible() { ZoneScoped; -#ifdef TARGET_PC - if (!dusk::getSettings().game.disableWaterRefraction) { -#endif - g_dComIfG_gameInfo.drawlist.drawXluListInvisible(); -#ifdef TARGET_PC - } -#endif + g_dComIfG_gameInfo.drawlist.drawXluListInvisible(); } +#endif +#if TARGET_PC +void dComIfGd_drawOpaListInvisible(); +#else inline void dComIfGd_drawOpaListInvisible() { ZoneScoped; -#ifdef TARGET_PC - if (!dusk::getSettings().game.disableWaterRefraction) { -#endif - g_dComIfG_gameInfo.drawlist.drawOpaListInvisible(); -#ifdef TARGET_PC - } -#endif + g_dComIfG_gameInfo.drawlist.drawOpaListInvisible(); } +#endif inline void dComIfGd_drawXluListZxlu() { ZoneScoped; diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index 907cf7b178..25d92aff54 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -5,7 +5,7 @@ #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/J3DGraphBase/J3DSys.h" #include "SSystem/SComponent/c_m3d_g_pla.h" -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" #include "f_op/f_op_view.h" #include "global.h" #include "m_Do/m_Do_ext.h" diff --git a/include/d/d_event_data.h b/include/d/d_event_data.h index ee9b868af4..eef55b1164 100644 --- a/include/d/d_event_data.h +++ b/include/d/d_event_data.h @@ -3,7 +3,7 @@ #include "global.h" #include "f_pc/f_pc_base.h" -#include "dusk/endian.h" +#include "helpers/endian.h" struct msg_class; diff --git a/include/d/d_msg_class.h b/include/d/d_msg_class.h index 307d48f291..5292eed5d3 100644 --- a/include/d/d_msg_class.h +++ b/include/d/d_msg_class.h @@ -4,8 +4,8 @@ #include "JSystem/JMessage/control.h" #include "JSystem/JMessage/JMessage.h" #include "SSystem/SComponent/c_xyz.h" -#include "dusk/endian.h" -#include "dusk/string.hpp" +#include "helpers/endian.h" +#include "helpers/string.hpp" #if REGION_JPN #define D_MSG_CLASS_PAGE_CNT_MAX 30 diff --git a/include/d/d_msg_flow.h b/include/d/d_msg_flow.h index 51ce72033c..233dad7170 100644 --- a/include/d/d_msg_flow.h +++ b/include/d/d_msg_flow.h @@ -2,7 +2,7 @@ #define D_MSG_D_MSG_FLOW_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" enum { NODETYPE_MESSAGE_e = 1, diff --git a/include/d/d_save.h b/include/d/d_save.h index ec5a9ee9ef..06458890e4 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -8,7 +8,7 @@ #include "d/d_item_data.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JHostIO/JORReflexible.h" -#include "dusk/endian.h" +#include "helpers/endian.h" static const int DEFAULT_SELECT_ITEM_INDEX = 0; static const int MAX_SELECT_ITEM = 4; @@ -494,7 +494,7 @@ public: #endif void setPlayerName(const char* i_name) { #if AVOID_UB - dusk::SafeStringCopyTruncate(mPlayerName, i_name); + SafeStringCopyTruncate(mPlayerName, i_name); #else strcpy(mPlayerName, i_name); #endif @@ -506,7 +506,7 @@ public: #endif void setHorseName(const char* i_name) { #if AVOID_UB - dusk::SafeStringCopyTruncate(mHorseName, i_name); + SafeStringCopyTruncate(mHorseName, i_name); #else strcpy(mHorseName, i_name); #endif diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 1fd884e4a6..53fbbac0d9 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -4,7 +4,7 @@ #include "SSystem/SComponent/c_lib.h" #include "d/d_kankyo.h" #include "d/d_kankyo_data.h" -#include "dusk/offset_ptr.h" +#include "helpers/offset_ptr.h" #include "f_op/f_op_actor_mng.h" #include "global.h" #include "os_report.h" diff --git a/include/d/d_tresure.h b/include/d/d_tresure.h index 37ff4d84b9..e043dd94fb 100644 --- a/include/d/d_tresure.h +++ b/include/d/d_tresure.h @@ -2,7 +2,7 @@ #define D_D_TRESURE_H #include -#include "dusk/offset_ptr.h" +#include "helpers/offset_ptr.h" class dTres_c { public: diff --git a/include/d/dolzel.h b/include/d/dolzel.h index d51eb22372..d4f53c842d 100644 --- a/include/d/dolzel.h +++ b/include/d/dolzel.h @@ -8,7 +8,7 @@ #endif #ifndef __MWERKS__ -#include "dusk/math.h" +#include "helpers/math.h" #endif #endif // dolzel.h diff --git a/include/dusk/imgui.h b/include/dusk/imgui.h deleted file mode 100644 index 5c761fb026..0000000000 --- a/include/dusk/imgui.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _SRC_IMGUI_H_ -#define _SRC_IMGUI_H_ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - - void imgui_main(const AuroraInfo* info); - void frame_limiter(); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/dusk/profiling.hpp b/include/dusk/profiling.hpp deleted file mode 100644 index 82dab45216..0000000000 --- a/include/dusk/profiling.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#if defined(__has_include) -#if __has_include() -#include -#endif -#endif - -#ifndef ZoneScoped -#define ZoneScoped -#define ZoneScopedN(name) -#endif diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 5d51b74aa2..6461c823d1 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -12,7 +12,7 @@ #include "f_pc/f_pc_manager.h" #include "m_Do/m_Do_hostIO.h" #include "SSystem/SComponent/c_phase.h" -#include "dusk/endian_ssystem.h" +#include "helpers/endian_ssystem.h" #if !__MWERKS__ // mwerks compiler makes value initialization act like default initialization so we need diff --git a/include/helpers/README.md b/include/helpers/README.md new file mode 100644 index 0000000000..d14f1e1b36 --- /dev/null +++ b/include/helpers/README.md @@ -0,0 +1,12 @@ +# Public game helpers + +Headers in this directory provide port-specific types and utilities used by ordinary game +headers. Their corresponding implementations live in `src/helpers/`. + +These helpers **must not** depend on internal `src/dusk/` declarations in their public interface. +Unlike the internal `dusk::` namespace, they are exposed to mods that use the `game` feature +and therefore must remain ABI stable within `GameService` major versions. + +APIs _specifically_ for mod use do not belong here; instead they belong in mod services, +which are individually versioned, can provide backwards compatibility, and are designed to +keep track of per-mod runtime state. diff --git a/src/dusk/batch.hpp b/include/helpers/batch.hpp similarity index 90% rename from src/dusk/batch.hpp rename to include/helpers/batch.hpp index 2569f27761..0eaeb17a2c 100644 --- a/src/dusk/batch.hpp +++ b/include/helpers/batch.hpp @@ -2,7 +2,7 @@ #include -namespace dusk::batch { +namespace batch { struct LeafTemplate { static constexpr u32 kMaxVtx = 192; @@ -22,4 +22,4 @@ struct LeafTemplate { void decode_leaf_template(const u8* dl, u32 size, LeafTemplate& out); -} // namespace dusk +} // namespace batch diff --git a/include/dusk/endian.h b/include/helpers/endian.h similarity index 98% rename from include/dusk/endian.h rename to include/helpers/endian.h index d16d0aa80c..689f9f0dab 100644 --- a/include/dusk/endian.h +++ b/include/helpers/endian.h @@ -1,5 +1,4 @@ -#ifndef DOLPHIN_ENDIAN_H -#define DOLPHIN_ENDIAN_H +#pragma once #include @@ -292,6 +291,3 @@ inline void be_swap(Mtx& val) { #define BE(T) T #define BE_HOST(T) (T) #endif - - -#endif // DOLPHIN_ENDIAN_H diff --git a/include/dusk/endian_gx.hpp b/include/helpers/endian_gx.hpp similarity index 100% rename from include/dusk/endian_gx.hpp rename to include/helpers/endian_gx.hpp diff --git a/include/dusk/endian_ssystem.h b/include/helpers/endian_ssystem.h similarity index 93% rename from include/dusk/endian_ssystem.h rename to include/helpers/endian_ssystem.h index fe9248ffa4..b383ef6e43 100644 --- a/include/dusk/endian_ssystem.h +++ b/include/helpers/endian_ssystem.h @@ -1,5 +1,4 @@ -#ifndef _DUSK_ENDIAN_SSYSTEM_H_ -#define _DUSK_ENDIAN_SSYSTEM_H_ +#pragma once #include "SSystem/SComponent/c_sxyz.h" #include "endian.h" @@ -61,5 +60,3 @@ struct BE { }; } }; - -#endif \ No newline at end of file diff --git a/include/dusk/gx_helper.h b/include/helpers/gx_helper.h similarity index 94% rename from include/dusk/gx_helper.h rename to include/helpers/gx_helper.h index 02a36fc6db..32cf340ed5 100644 --- a/include/dusk/gx_helper.h +++ b/include/helpers/gx_helper.h @@ -1,12 +1,17 @@ -#ifndef DUSK_GX_HELPER_H -#define DUSK_GX_HELPER_H +#pragma once #include #include #include -#include "profiling.hpp" +#if defined(DUSK_BUILDING_GAME) +#include +#else +#ifndef ZoneScopedN +#define ZoneScopedN(name) +#endif +#endif #if DUSK_GFX_DEBUG_GROUPS #define GX_DEBUG_GROUP(name, ...) \ @@ -79,5 +84,3 @@ struct GXScopedDebugGroup { }; #define GX_AND_TRACY_SCOPED(name) GXScopedDebugGroup scope(name); ZoneScopedN(name); - -#endif // DUSK_GX_HELPER_H diff --git a/include/dusk/math.h b/include/helpers/math.h similarity index 84% rename from include/dusk/math.h rename to include/helpers/math.h index 04f1087670..c1e966951a 100644 --- a/include/dusk/math.h +++ b/include/helpers/math.h @@ -1,5 +1,4 @@ -#ifndef _SRC_DUSK_MATH_H_ -#define _SRC_DUSK_MATH_H_ +#pragma once #include @@ -17,5 +16,3 @@ inline float i_tanf(float x) { return tan(x); } inline float i_acosf(float x) { return acos(x); } #include - -#endif // _SRC_DUSK_MATH_H_ diff --git a/include/dusk/offset_ptr.h b/include/helpers/offset_ptr.h similarity index 89% rename from include/dusk/offset_ptr.h rename to include/helpers/offset_ptr.h index 3a940804c2..924b840659 100644 --- a/include/dusk/offset_ptr.h +++ b/include/helpers/offset_ptr.h @@ -1,5 +1,4 @@ -#ifndef DUSK_OFFSET_PTR_H -#define DUSK_OFFSET_PTR_H +#pragma once #if TARGET_PC @@ -47,21 +46,17 @@ struct OffsetPtrT { } operator T*() const { - return (T*) value; - } + return (T*)value; } - template + template explicit operator TOther*() const { - return (TOther*) value; + return (TOther*)value; } }; - #define OFFSET_PTR(T) OffsetPtrT #define OFFSET_PTR_RAW OffsetPtr #else #define OFFSET_PTR(T) T* #define OFFSET_PTR_RAW u32 #endif - -#endif // DUSK_OFFSET_PTR_H diff --git a/include/dusk/string.hpp b/include/helpers/string.hpp similarity index 89% rename from include/dusk/string.hpp rename to include/helpers/string.hpp index af91ff8fe9..b7ba0ef3b7 100644 --- a/include/dusk/string.hpp +++ b/include/helpers/string.hpp @@ -1,8 +1,7 @@ -#ifndef DUSK_STRING_HPP -#define DUSK_STRING_HPP -#include +#pragma once -namespace dusk { +#include +#include struct TextSpan { char* buffer; @@ -44,7 +43,7 @@ private: }; #if TARGET_PC -#define TEXT_SPAN dusk::TextSpan +#define TEXT_SPAN TextSpan #else #define TEXT_SPAN char* #endif @@ -111,11 +110,11 @@ int SafeStringPrintf(char (&buffer)[BufSize], const char* format, ...) { } #if TARGET_PC -#define SAFE_STRCPY dusk::SafeStringCopy -#define SAFE_STRCAT dusk::SafeStringCat -#define SAFE_SPRINTF dusk::SafeStringPrintf -#define SAFE_STRCPY_BOUNDED dusk::SafeStringCopy -#define SAFE_STRCAT_BOUNDED dusk::SafeStringCat +#define SAFE_STRCPY SafeStringCopy +#define SAFE_STRCAT SafeStringCat +#define SAFE_SPRINTF SafeStringPrintf +#define SAFE_STRCPY_BOUNDED SafeStringCopy +#define SAFE_STRCAT_BOUNDED SafeStringCat #else #define SAFE_STRCPY strcpy #define SAFE_STRCAT strcat @@ -123,6 +122,3 @@ int SafeStringPrintf(char (&buffer)[BufSize], const char* format, ...) { #define SAFE_STRCPY_BOUNDED strcpy #define SAFE_STRCPY_BOUNDED strcat #endif -} - -#endif // DUSK_STRING_HPP diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index 0758298aef..43d0b81766 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -4,8 +4,12 @@ #include "Z2AudioLib/Z2AudioMgr.h" #include "Z2AudioLib/Z2EnvSeMgr.h" #include "Z2AudioLib/Z2LinkMgr.h" +#if defined(DUSK_BUILDING_GAME) #include "dusk/audio.h" #include "dusk/settings.h" +#else +#define DUSK_AUDIO_SKIP(...) +#endif class mDoAud_zelAudio_c : public Z2AudioMgr { public: @@ -134,15 +138,7 @@ inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_re } #if TARGET_PC -inline void mDoAud_seStartMenu(u32 i_sfxID) { - if (!mDoAud_zelAudio_c::isInitFlag()) { - return; - } - if (!dusk::getSettings().audio.menuSounds.getValue()) { - return; - } - mDoAud_seStart(i_sfxID, nullptr, 0, 0); -} +void mDoAud_seStartMenu(u32 i_sfxID); #endif inline void mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) { diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h index 3ee09cc728..f63c1c8d1c 100644 --- a/include/m_Do/m_Do_controller_pad.h +++ b/include/m_Do/m_Do_controller_pad.h @@ -3,7 +3,10 @@ #include "JSystem/JUtility/JUTGamePad.h" #include "SSystem/SComponent/c_API_controller_pad.h" + +#if defined(DUSK_BUILDING_GAME) #include "dusk/settings.h" +#endif // Controller Ports 1 - 4 enum { PAD_1, PAD_2, PAD_3, PAD_4 }; @@ -54,29 +57,21 @@ public: static f32 getStickValue(u32 pad) { return getCpadInfo(pad).mMainStickValue; } static s16 getStickAngle(u32 pad) { return getCpadInfo(pad).mMainStickAngle; } +#if TARGET_PC + static s16 getStickAngle3D(u32 pad); +#else static s16 getStickAngle3D(u32 pad) { - #if TARGET_PC - if (dusk::getSettings().game.enableMirrorMode) { - return -getCpadInfo(pad).mMainStickAngle; - } else { - return getCpadInfo(pad).mMainStickAngle; - } - #else return getCpadInfo(pad).mMainStickAngle; - #endif } +#endif +#if TARGET_PC + static f32 getSubStickX3D(u32 pad); +#else static f32 getSubStickX3D(u32 pad) { - #if TARGET_PC - if (dusk::getSettings().game.enableMirrorMode) { - return -getCpadInfo(pad).mCStickPosX; - } else { - return getCpadInfo(pad).mCStickPosX; - } - #else return getCpadInfo(pad).mCStickPosX; - #endif } +#endif static f32 getSubStickX(u32 pad) { return getCpadInfo(pad).mCStickPosX; } static f32 getSubStickY(u32 pad) { return getCpadInfo(pad).mCStickPosY; } diff --git a/include/m_Do/m_Do_lib.h b/include/m_Do/m_Do_lib.h index db3a1dbea4..6b85cc0660 100644 --- a/include/m_Do/m_Do_lib.h +++ b/include/m_Do/m_Do_lib.h @@ -8,7 +8,7 @@ #include "JSystem/JGeometry.h" #endif -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" typedef struct Vec Vec; struct ResTIMG; diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h index dcd5cd10c7..89e7e8b7cf 100644 --- a/include/m_Do/m_Do_mtx.h +++ b/include/m_Do/m_Do_mtx.h @@ -6,7 +6,7 @@ #include #include "JSystem/JMath/JMath.h" -#include "dusk/endian.h" +#include "helpers/endian.h" extern u8 g_printCurrentHeapDebug; DUSK_GAME_EXTERN u8 g_printOtherHeapDebug; diff --git a/include/m_Do/m_Do_printf.h b/include/m_Do/m_Do_printf.h index 527be3d58a..a71669f432 100644 --- a/include/m_Do/m_Do_printf.h +++ b/include/m_Do/m_Do_printf.h @@ -2,7 +2,7 @@ #define M_DO_M_DO_PRINTF_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" void my_PutString(const char*); void mDoPrintf_vprintf_Interrupt(char const*, va_list); diff --git a/include/os_report.h b/include/os_report.h index c622b172b3..0831e45396 100644 --- a/include/os_report.h +++ b/include/os_report.h @@ -31,10 +31,4 @@ extern u8 __OSReport_Warning_disable; extern u8 __OSReport_System_disable; extern u8 __OSReport_enable; -#if TARGET_PC -namespace dusk { - DUSK_GAME_EXTERN bool OSReportReallyForceEnable; -} -#endif - #endif // _OS_REPORT_H diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h b/libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h index f82788d57c..1eddcb943a 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h @@ -4,7 +4,7 @@ #include "JSystem/J2DGraph/J2DManage.h" #include "JSystem/J2DGraph/J2DMatBlock.h" -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-j2d diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h index 510381ae10..a588b4e7f7 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h @@ -5,7 +5,7 @@ #include "JSystem/JSupport/JSUList.h" #include #include -#include "dusk/endian.h" +#include "helpers/endian.h" class J2DAnmBase; class J2DAnmColor; diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h index f738a96dd4..f311e191fa 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h @@ -4,7 +4,7 @@ #include "JSystem/J2DGraph/J2DPane.h" #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JUtility/TColor.h" -#include "dusk/endian.h" +#include "helpers/endian.h" class J2DMaterial; class JUTPalette; diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h b/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h index 9244198475..ffc7568846 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h @@ -4,7 +4,7 @@ #include "JSystem/J2DGraph/J2DManage.h" #include "JSystem/J2DGraph/J2DPane.h" #include "JSystem/JUtility/TColor.h" -#include "dusk/endian.h" +#include "helpers/endian.h" class J2DMaterial; class JUTNameTab; diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h b/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h index 368325ff81..e515321188 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h @@ -4,7 +4,7 @@ #include #include #include "global.h" -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-j2d diff --git a/libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h b/libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h index 0d875ad652..96a53c5a16 100644 --- a/libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h @@ -3,8 +3,8 @@ #include "JSystem/J2DGraph/J2DMaterial.h" #include "JSystem/J2DGraph/J2DPane.h" -#include "dusk/endian.h" -#include "dusk/string.hpp" +#include "helpers/endian.h" +#include "helpers/string.hpp" class J2DMaterial; class JUTFont; @@ -100,7 +100,7 @@ public: J2DTextBoxVBinding); void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*); TEXT_SPAN getStringPtr() const; - dusk::TextSpan getSpan() const; + TextSpan getSpan() const; s32 setString(s16, char const*, ...); s32 setString(char const*, ...); diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h index 3c5133e880..f006183d07 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -6,7 +6,7 @@ #include #include "global.h" -#include "dusk/endian.h" +#include "helpers/endian.h" #if TARGET_PC #define OFFSET_PTR_V0 BE(u32) diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DCluster.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DCluster.h index 2a71ada3dd..4704fe1ee1 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DCluster.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DCluster.h @@ -3,7 +3,7 @@ #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphLoader/J3DClusterLoader.h" -#include "dusk/endian.h" +#include "helpers/endian.h" class J3DDeformer; class J3DClusterKey; diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJointTree.h index 92b252fb7a..e4018f1ea2 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJointTree.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJointTree.h @@ -3,7 +3,7 @@ #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DTransform.h" -#include "dusk/endian.h" +#include "helpers/endian.h" class J3DJoint; class J3DMtxBuffer; diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h index 2e5b3bd38d..d55bb82465 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -3,7 +3,6 @@ #include "JSystem/J3DGraphAnimator/J3DSkinDeform.h" #include "JSystem/J3DGraphBase/J3DPacket.h" -#include "dusk/frame_interpolation.h" #include enum J3DMdlFlag { @@ -106,12 +105,13 @@ public: void setUserArea(uintptr_t area) { mUserArea = area; } uintptr_t getUserArea() const { return mUserArea; } Vec* getBaseScale() { return &mBaseScale; } +#if TARGET_PC + void setAnmMtx(int jointNo, Mtx m); +#else void setAnmMtx(int jointNo, Mtx m) { mMtxBuffer->setAnmMtx(jointNo, m); -#ifdef TARGET_PC - dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo)); -#endif } +#endif MtxP getAnmMtx(int jointNo) { return mMtxBuffer->getAnmMtx(jointNo); } MtxP getWeightAnmMtx(int i) { return mMtxBuffer->getWeightAnmMtx(i); } J3DSkinDeform* getSkinDeform() { return mSkinDeform; } diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h index ac9d4558bc..4ba3cc8023 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h @@ -7,7 +7,7 @@ #include "JSystem/JMath/JMath.h" #include "global.h" #include -#include "dusk/endian_gx.hpp" +#include "helpers/endian_gx.hpp" class J3DShapeMtx; diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h index 9edd5e6898..2b7ad8ad35 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphBase/J3DShape.h" #include "JSystem/J3DAssert.h" #include -#include "dusk/endian.h" +#include "helpers/endian.h" class J3DTexMtx; class J3DTexGenBlock; diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h index 05663fd84e..0de93bcaf5 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h @@ -7,7 +7,7 @@ #include "global.h" #include "JSystem/JMath/JMath.h" -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-j3d diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h index b97be2ec03..a4750e5d29 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h @@ -6,8 +6,7 @@ #include "JSystem/J3DAssert.h" #include "JSystem/JMath/JMath.h" -#include "dusk/frame_interpolation.h" -#include "dusk/endian.h" +#include "helpers/endian.h" #include "global.h" enum J3DSysDrawBuf { @@ -190,15 +189,13 @@ struct J3DSys { Mtx& getModelDrawMtx(u16 no) { return mModelDrawMtx[no]; } J3DShapePacket* getShapePacket() { return mShapePacket; } +#if TARGET_PC + void setViewMtx(const Mtx m); +#else void setViewMtx(const Mtx m) { -#ifdef TARGET_PC - Mtx patched; - if (dusk::frame_interp::lookup_replacement(m, patched)) { - m = patched; - } -#endif MTXCopy(m, mViewMtx); } +#endif J3DModel* getModel() { return mModel; } diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h index 6e95222b6d..5b05b08bcc 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h @@ -7,7 +7,7 @@ #include "global.h" #include -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" /** * @ingroup jsystem-j3d diff --git a/libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h index 1638e316e9..f7ad92afb8 100644 --- a/libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h @@ -3,7 +3,7 @@ #include #include -#include "dusk/endian_gx.hpp" +#include "helpers/endian_gx.hpp" class J3DModel; class J3DAnmVtxColor; diff --git a/libs/JSystem/include/JSystem/J3DGraphLoader/J3DClusterLoader.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DClusterLoader.h index 2899065150..75ba644be8 100644 --- a/libs/JSystem/include/JSystem/J3DGraphLoader/J3DClusterLoader.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DClusterLoader.h @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/J3DGraphAnimator/J3DAnimation.h" -#include "dusk/endian.h" +#include "helpers/endian.h" #if TARGET_PC #define OFFSET_PTR_V0 BE(u32) diff --git a/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h index 6c856f1a3d..05fc99785b 100644 --- a/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphBase/J3DSys.h" #include -#include "dusk/endian.h" +#include "helpers/endian.h" class J3DModelData; class J3DMaterialTable; diff --git a/libs/JSystem/include/JSystem/JAudio2/JAISound.h b/libs/JSystem/include/JSystem/JAudio2/JAISound.h index e96053fc9f..fa262a7426 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JAISound.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAISound.h @@ -5,7 +5,7 @@ #include "JSystem/JAudio2/JAIAudible.h" #include "JSystem/JUtility/JUTAssert.h" #include "global.h" -#include "dusk/endian.h" +#include "helpers/endian.h" #include class JAISound; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h b/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h index 5128b9186a..46a30d2616 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h @@ -4,7 +4,7 @@ #include "JSystem/JAudio2/JASTaskThread.h" #include "JSystem/JUtility/JUTAssert.h" #include -#include "dusk/endian.h" +#include "helpers/endian.h" class JASChannel; diff --git a/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h b/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h index 438bf9c70f..8ac20ce1ca 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h @@ -2,7 +2,7 @@ #define JASOSCILLATOR_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-jaudio diff --git a/libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h index 44d4137d9b..cc5653fe25 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h @@ -2,7 +2,7 @@ #define JAUAUDIBLEPARAM_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-jaudio diff --git a/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h index c36ad44b22..33a31adb9f 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h @@ -2,7 +2,7 @@ #define JAUAUDIOARCINTERPRETER_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-jaudio diff --git a/libs/JSystem/include/JSystem/JAudio2/JAUSoundAnimator.h b/libs/JSystem/include/JSystem/JAudio2/JAUSoundAnimator.h index e81cd70ee4..f590815af5 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JAUSoundAnimator.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUSoundAnimator.h @@ -2,7 +2,7 @@ #define JAUSOUNDANIMATOR_H #include "JSystem/JAudio2/JAISound.h" -#include "dusk/offset_ptr.h" +#include "helpers/offset_ptr.h" class JAUSoundAnimation; diff --git a/libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h b/libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h index 4cc48f2a0b..fbd3427649 100644 --- a/libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h @@ -3,7 +3,7 @@ #include "JSystem/JAudio2/JAISound.h" #include "JSystem/JAudio2/JASGadget.h" -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-jaudio diff --git a/libs/JSystem/include/JSystem/JGadget/binary.h b/libs/JSystem/include/JSystem/JGadget/binary.h index f93e548f88..eb0ddfb1d0 100644 --- a/libs/JSystem/include/JSystem/JGadget/binary.h +++ b/libs/JSystem/include/JSystem/JGadget/binary.h @@ -3,7 +3,7 @@ #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JGadget/search.h" -#include "dusk/endian.h" +#include "helpers/endian.h" namespace JGadget { namespace binary { diff --git a/libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h b/libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h index 3d8c452c72..e5a3e11553 100644 --- a/libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h +++ b/libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h @@ -2,7 +2,7 @@ #define JHICOMMONMEM_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" inline u32 JHIhtonl(u32 v) { return BSWAP32(v); diff --git a/libs/JSystem/include/JSystem/JKernel/JKRArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRArchive.h index 40fff2dd6d..4ac5de7a46 100644 --- a/libs/JSystem/include/JSystem/JKernel/JKRArchive.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRArchive.h @@ -4,7 +4,7 @@ #include "JSystem/JKernel/JKRCompression.h" #include "JSystem/JKernel/JKRFileLoader.h" #include "global.h" -#include "dusk/endian.h" +#include "helpers/endian.h" class JKRHeap; diff --git a/libs/JSystem/include/JSystem/JMath/JMath.h b/libs/JSystem/include/JSystem/JMath/JMath.h index 5d0263d669..8a7efc3f32 100644 --- a/libs/JSystem/include/JSystem/JMath/JMath.h +++ b/libs/JSystem/include/JSystem/JMath/JMath.h @@ -4,7 +4,7 @@ #include #include -#include "dusk/math.h" +#include "helpers/math.h" typedef f32 Mtx33[3][3]; typedef f32 Mtx23[2][3]; diff --git a/libs/JSystem/include/JSystem/JMessage/JMessage.h b/libs/JSystem/include/JSystem/JMessage/JMessage.h index 0b3d1c64c8..7218c7f4a9 100644 --- a/libs/JSystem/include/JSystem/JMessage/JMessage.h +++ b/libs/JSystem/include/JSystem/JMessage/JMessage.h @@ -6,7 +6,7 @@ #else #include #endif -#include "dusk/endian.h" +#include "helpers/endian.h" // Struct definitions might be wrong typedef struct bmg_header_t { diff --git a/libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h b/libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h index c69ddc07cb..eb08e4ff9f 100644 --- a/libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h +++ b/libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h @@ -4,7 +4,7 @@ #include "JSystem/JGeometry.h" #include -#include "dusk/endian.h" +#include "helpers/endian.h" struct JPAEmitterWorkData; diff --git a/libs/JSystem/include/JSystem/JParticle/JPAResource.h b/libs/JSystem/include/JSystem/JParticle/JPAResource.h index 07563fa73d..ba52564b95 100644 --- a/libs/JSystem/include/JSystem/JParticle/JPAResource.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAResource.h @@ -2,7 +2,7 @@ #define JPARESOURCE_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" class JKRHeap; struct JPAEmitterWorkData; diff --git a/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h index a23eed44e9..826e0948c1 100644 --- a/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h @@ -6,7 +6,7 @@ #define m_PI_D 3.141592653589793 #ifndef __MWERKS__ -#include "dusk/math.h" +#include "helpers/math.h" #endif namespace JStudio { diff --git a/libs/JSystem/include/JSystem/JSupport/JSUInputStream.h b/libs/JSystem/include/JSystem/JSupport/JSUInputStream.h index 77c27d0530..07d5a29b69 100644 --- a/libs/JSystem/include/JSystem/JSupport/JSUInputStream.h +++ b/libs/JSystem/include/JSystem/JSupport/JSUInputStream.h @@ -2,7 +2,7 @@ #define JSUINPUTSTREAM_H #include "JSystem/JSupport/JSUIosBase.h" -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-jsupport diff --git a/libs/JSystem/include/JSystem/JUtility/JUTFont.h b/libs/JSystem/include/JSystem/JUtility/JUTFont.h index 3c1cd0bf1f..0b262c0ac4 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTFont.h @@ -3,7 +3,7 @@ #include "JSystem/JUtility/TColor.h" #include -#include "dusk/endian.h" +#include "helpers/endian.h" #if TARGET_PC struct FontDrawContext { diff --git a/libs/JSystem/include/JSystem/JUtility/JUTNameTab.h b/libs/JSystem/include/JSystem/JUtility/JUTNameTab.h index 6affae8ecb..6d4994d3f3 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTNameTab.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTNameTab.h @@ -2,7 +2,7 @@ #define JUTNAMETAB_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" /** * @ingroup jsystem-jutility diff --git a/libs/JSystem/include/JSystem/JUtility/JUTPalette.h b/libs/JSystem/include/JSystem/JUtility/JUTPalette.h index 5d29005a92..8987c28f13 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTPalette.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTPalette.h @@ -3,7 +3,7 @@ #include -#include "dusk/endian.h" +#include "helpers/endian.h" enum JUTTransparency { UNK0, UNK1 }; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTResFont.h b/libs/JSystem/include/JSystem/JUtility/JUTResFont.h index a333cb9939..5e1cfa0011 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTResFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTResFont.h @@ -2,7 +2,7 @@ #define JUTRESFONT_H #include "JSystem/JUtility/JUTFont.h" -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" class JKRHeap; diff --git a/libs/JSystem/include/JSystem/JUtility/JUTTexture.h b/libs/JSystem/include/JSystem/JUtility/JUTTexture.h index 6a7a8f9a0e..c4356b0bf9 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTTexture.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTTexture.h @@ -3,8 +3,8 @@ #include #include -#include "dusk/endian.h" -#include "dusk/gx_helper.h" +#include "helpers/endian.h" +#include "helpers/gx_helper.h" class JUTPalette; diff --git a/libs/JSystem/include/JSystem/JUtility/TColor.h b/libs/JSystem/include/JSystem/JUtility/TColor.h index d4a615b5b4..5ec7afa42a 100644 --- a/libs/JSystem/include/JSystem/JUtility/TColor.h +++ b/libs/JSystem/include/JSystem/JUtility/TColor.h @@ -2,7 +2,7 @@ #define TCOLOR_H #include -#include "dusk/endian.h" +#include "helpers/endian.h" namespace JUtility { diff --git a/libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp b/libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp index 2cede2c49a..34e33bc03d 100644 --- a/libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp +++ b/libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp @@ -8,7 +8,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" J2DMaterialFactory::J2DMaterialFactory(J2DMaterialBlock const& param_0) { mMaterialNum = param_0.field_0x8; diff --git a/libs/JSystem/src/J2DGraph/J2DPane.cpp b/libs/JSystem/src/J2DGraph/J2DPane.cpp index 55a1b27ae1..01ab0e5444 100644 --- a/libs/JSystem/src/J2DGraph/J2DPane.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPane.cpp @@ -8,7 +8,7 @@ #include "JSystem/JSupport/JSURandomInputStream.h" #include "JSystem/JUtility/JUTResource.h" #ifndef __MWERKS__ -#include "dusk/math.h" +#include "helpers/math.h" #endif J2DPane::J2DPane() : mBounds(), mGlobalBounds(), mClipRect(), mPaneTree(this) { diff --git a/libs/JSystem/src/J2DGraph/J2DTevs.cpp b/libs/JSystem/src/J2DGraph/J2DTevs.cpp index bb49596d85..bda5576cee 100644 --- a/libs/JSystem/src/J2DGraph/J2DTevs.cpp +++ b/libs/JSystem/src/J2DGraph/J2DTevs.cpp @@ -9,7 +9,7 @@ #ifdef __MWERKS__ #include #else -#include +#include #endif #include diff --git a/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp b/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp index fe4c5df9e6..284d7ea220 100644 --- a/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp +++ b/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp @@ -3,7 +3,7 @@ #include "JSystem/J2DGraph/J2DWindowEx.h" #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JSupport/JSURandomInputStream.h" -#include "dusk/endian.h" +#include "helpers/endian.h" struct J2DWindowExDef { BE(u32) field_0x0[4]; diff --git a/libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp index 8e111428cc..51f3951e38 100644 --- a/libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp +++ b/libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp @@ -8,7 +8,10 @@ #include "JSystem/J3DGraphBase/J3DShapeMtx.h" #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/JKernel/JKRHeap.h" + +#if TARGET_PC #include "dusk/frame_interpolation.h" +#endif #define J3D_ASSERTMSG(LINE, COND, MSG) JUT_ASSERT_MSG(LINE, (COND) != 0, MSG) #define J3D_WARN1(LINE, MSG, ARG1) JUT_WARN(LINE, MSG, ARG1) @@ -105,6 +108,11 @@ void J3DModel::interp_callback(bool isSimFrame, void* pUserWork) { i_this->diff(); } } + +void J3DModel::setAnmMtx(int jointNo, Mtx m) { + mMtxBuffer->setAnmMtx(jointNo, m); + dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo)); +} #endif s32 J3DModel::createShapePacket(J3DModelData* pModelData) { diff --git a/libs/JSystem/src/J3DGraphBase/J3DSys.cpp b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp index 653b6e08f1..d37b4608bf 100644 --- a/libs/JSystem/src/J3DGraphBase/J3DSys.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp @@ -4,10 +4,14 @@ #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/J3DGraphBase/J3DTevs.h" #include "JSystem/J3DGraphBase/J3DTexture.h" -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" #include "global.h" #include "tracy/Tracy.hpp" +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#endif + DUSK_GAME_DATA J3DSys j3dSys; DUSK_GAME_DATA Mtx J3DSys::mCurrentMtx; @@ -370,3 +374,13 @@ void J3DSys::reinitPixelProc() { GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); GXSetZCompLoc(GX_TRUE); } + +#if TARGET_PC +void J3DSys::setViewMtx(const Mtx m) { + Mtx patched; + if (dusk::frame_interp::lookup_replacement(m, patched)) { + m = patched; + } + MTXCopy(m, mViewMtx); +} +#endif diff --git a/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp b/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp index 6bd9bf225a..1459a705cd 100644 --- a/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp +++ b/libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp @@ -2,7 +2,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" DUSK_GAME_DATA u32 JAHVirtualNode::smVirNodeNum; diff --git a/libs/JSystem/src/JAHostIO/JAHioNode.cpp b/libs/JSystem/src/JAHostIO/JAHioNode.cpp index d3b45a4b5d..6e6ea2a320 100644 --- a/libs/JSystem/src/JAHostIO/JAHioNode.cpp +++ b/libs/JSystem/src/JAHostIO/JAHioNode.cpp @@ -6,7 +6,7 @@ #include "JSystem/JAHostIO/JAHioNode.h" #include "JSystem/JHostIO/JORServer.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" DUSK_GAME_DATA JAHioNode* JAHioNode::smCurrentNode; diff --git a/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp b/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp index 3848a64d3c..02730f46b4 100644 --- a/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp +++ b/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp @@ -9,7 +9,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" DUSK_GAME_DATA JASHeap* JASWaveArcLoader::sAramHeap; diff --git a/libs/JSystem/src/JFramework/JFWDisplay.cpp b/libs/JSystem/src/JFramework/JFWDisplay.cpp index aef89f309b..99b1e63364 100644 --- a/libs/JSystem/src/JFramework/JFWDisplay.cpp +++ b/libs/JSystem/src/JFramework/JFWDisplay.cpp @@ -14,11 +14,12 @@ #ifdef TARGET_PC #include "dusk/dusk.h" -#include "dusk/gx_helper.h" +#include "dusk/frame_interpolation.h" #include "dusk/logging.h" #include "dusk/settings.h" #include "dusk/time.h" #include "f_op/f_op_overlap_mng.h" +#include "helpers/gx_helper.h" #include "SDL3/SDL_timer.h" #include "tracy/Tracy.hpp" diff --git a/libs/JSystem/src/JKernel/JKRFileCache.cpp b/libs/JSystem/src/JKernel/JKRFileCache.cpp index 1a97ddefa3..a4795602c0 100644 --- a/libs/JSystem/src/JKernel/JKRFileCache.cpp +++ b/libs/JSystem/src/JKernel/JKRFileCache.cpp @@ -8,7 +8,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "global.h" JKRFileCache* JKRFileCache::mount(const char* path, JKRHeap* heap, const char* param_3) { diff --git a/libs/JSystem/src/JKernel/JKRFileLoader.cpp b/libs/JSystem/src/JKernel/JKRFileLoader.cpp index c3c5ac1903..0ff00f5f84 100644 --- a/libs/JSystem/src/JKernel/JKRFileLoader.cpp +++ b/libs/JSystem/src/JKernel/JKRFileLoader.cpp @@ -8,7 +8,7 @@ #include #include #include "JSystem/JKernel/JKRHeap.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "global.h" DUSK_GAME_DATA JKRFileLoader* JKRFileLoader::sCurrentVolume; diff --git a/libs/JSystem/src/JKernel/JKRHeap.cpp b/libs/JSystem/src/JKernel/JKRHeap.cpp index 34b3e7c619..3c329e0a43 100644 --- a/libs/JSystem/src/JKernel/JKRHeap.cpp +++ b/libs/JSystem/src/JKernel/JKRHeap.cpp @@ -15,7 +15,7 @@ #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTException.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" #ifdef __MWERKS__ #include #else @@ -702,7 +702,7 @@ JKRHeap* JKRHeap::getCurrentHeap() { } void JKRHeap::setName(const char* name) { - dusk::SafeStringCopyTruncate(mName, name); + SafeStringCopyTruncate(mName, name); } void JKRHeap::setNamef(const char* fmt, ...) { diff --git a/libs/JSystem/src/JKernel/JKRThread.cpp b/libs/JSystem/src/JKernel/JKRThread.cpp index 8203248339..73135381eb 100644 --- a/libs/JSystem/src/JKernel/JKRThread.cpp +++ b/libs/JSystem/src/JKernel/JKRThread.cpp @@ -7,7 +7,7 @@ #include "global.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #if TARGET_PC #include "dusk/os.h" diff --git a/libs/JSystem/src/JParticle/JPAParticle.cpp b/libs/JSystem/src/JParticle/JPAParticle.cpp index eb2395e346..99ba95453c 100644 --- a/libs/JSystem/src/JParticle/JPAParticle.cpp +++ b/libs/JSystem/src/JParticle/JPAParticle.cpp @@ -7,6 +7,10 @@ #include "JSystem/JParticle/JPAEmitterManager.h" #include "JSystem/JParticle/JPAExtraShape.h" +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#endif + JPAParticleCallBack::~JPAParticleCallBack() { /* empty function */ } diff --git a/libs/JSystem/src/JParticle/JPAResource.cpp b/libs/JSystem/src/JParticle/JPAResource.cpp index 2d5d872bac..9385b258e7 100644 --- a/libs/JSystem/src/JParticle/JPAResource.cpp +++ b/libs/JSystem/src/JParticle/JPAResource.cpp @@ -19,6 +19,8 @@ #include "tracy/Tracy.hpp" #if TARGET_PC +#include "dusk/frame_interpolation.h" + #define JPA_DRAW_CTX_ARG , &ctx #else #define JPA_DRAW_CTX_ARG diff --git a/libs/JSystem/src/JStudio/JStudio/stb-data.cpp b/libs/JSystem/src/JStudio/JStudio/stb-data.cpp index 95b8d7dafd..5de2b8f7bf 100644 --- a/libs/JSystem/src/JStudio/JStudio/stb-data.cpp +++ b/libs/JSystem/src/JStudio/JStudio/stb-data.cpp @@ -1,5 +1,5 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep -#include "dusk/endian.h" +#include "helpers/endian.h" #include "JSystem/JStudio/JStudio/stb-data.h" DUSK_GAME_DATA const s32 JStudio::stb::data::gauDataSize_TEParagraph_data[8] = {0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40}; diff --git a/libs/JSystem/src/JUtility/JUTConsole.cpp b/libs/JSystem/src/JUtility/JUTConsole.cpp index 2899e3f0e4..75150cb498 100644 --- a/libs/JSystem/src/JUtility/JUTConsole.cpp +++ b/libs/JSystem/src/JUtility/JUTConsole.cpp @@ -8,7 +8,7 @@ #include "JSystem/JUtility/JUTConsole.h" #include "JSystem/JUtility/JUTDirectPrint.h" #include "JSystem/JUtility/JUTVideo.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "global.h" DUSK_GAME_DATA JUTConsoleManager* JUTConsoleManager::sManager; diff --git a/libs/JSystem/src/JUtility/JUTException.cpp b/libs/JSystem/src/JUtility/JUTException.cpp index 4b87dd50f8..9e00bce739 100644 --- a/libs/JSystem/src/JUtility/JUTException.cpp +++ b/libs/JSystem/src/JUtility/JUTException.cpp @@ -10,7 +10,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #ifdef __REVOLUTION_SDK__ #include #else diff --git a/libs/JSystem/src/JUtility/JUTFader.cpp b/libs/JSystem/src/JUtility/JUTFader.cpp index e7d33454b7..a8d9fe6028 100644 --- a/libs/JSystem/src/JUtility/JUTFader.cpp +++ b/libs/JSystem/src/JUtility/JUTFader.cpp @@ -10,6 +10,7 @@ #ifdef TARGET_PC #include +#include "dusk/frame_interpolation.h" #endif JUTFader::JUTFader(int x, int y, int width, int height, JUtility::TColor pColor) diff --git a/libs/freeverb/CMakeLists.txt b/libs/freeverb/CMakeLists.txt index c0c12da293..d0275f62ac 100644 --- a/libs/freeverb/CMakeLists.txt +++ b/libs/freeverb/CMakeLists.txt @@ -7,3 +7,5 @@ add_library(freeverb allpass.cpp revmodel.cpp ) +target_include_directories(freeverb PRIVATE include/freeverb) +target_include_directories(freeverb INTERFACE include) diff --git a/libs/freeverb/allpass.hpp b/libs/freeverb/include/freeverb/allpass.hpp similarity index 100% rename from libs/freeverb/allpass.hpp rename to libs/freeverb/include/freeverb/allpass.hpp diff --git a/libs/freeverb/comb.hpp b/libs/freeverb/include/freeverb/comb.hpp similarity index 100% rename from libs/freeverb/comb.hpp rename to libs/freeverb/include/freeverb/comb.hpp diff --git a/libs/freeverb/denormals.h b/libs/freeverb/include/freeverb/denormals.h similarity index 100% rename from libs/freeverb/denormals.h rename to libs/freeverb/include/freeverb/denormals.h diff --git a/libs/freeverb/revmodel.hpp b/libs/freeverb/include/freeverb/revmodel.hpp similarity index 100% rename from libs/freeverb/revmodel.hpp rename to libs/freeverb/include/freeverb/revmodel.hpp diff --git a/libs/freeverb/tuning.h b/libs/freeverb/include/freeverb/tuning.h similarity index 100% rename from libs/freeverb/tuning.h rename to libs/freeverb/include/freeverb/tuning.h diff --git a/mods/ao_mod/CMakeLists.txt b/mods/ao_mod/CMakeLists.txt index 13590923f0..723ed55006 100644 --- a/mods/ao_mod/CMakeLists.txt +++ b/mods/ao_mod/CMakeLists.txt @@ -13,6 +13,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) endif () add_mod(ao_mod + FEATURES webgpu SOURCES src/mod.cpp MOD_JSON mod.json RES_DIR res diff --git a/mods/shadow_mod/CMakeLists.txt b/mods/shadow_mod/CMakeLists.txt index 4479d0fcc4..ae44eca49c 100644 --- a/mods/shadow_mod/CMakeLists.txt +++ b/mods/shadow_mod/CMakeLists.txt @@ -13,6 +13,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) endif () add_mod(shadow_mod + FEATURES game webgpu SOURCES src/mod.cpp MOD_JSON mod.json RES_DIR res diff --git a/mods/shadow_mod/src/mod.cpp b/mods/shadow_mod/src/mod.cpp index 4e3470c9be..0319dab3dc 100644 --- a/mods/shadow_mod/src/mod.cpp +++ b/mods/shadow_mod/src/mod.cpp @@ -24,7 +24,6 @@ #include "mods/service.hpp" #include "mods/svc/camera.h" #include "mods/svc/config.h" -#include "mods/svc/game.h" #include "mods/svc/gfx.h" #include "mods/svc/hook.h" #include "mods/svc/log.h" @@ -45,7 +44,6 @@ IMPORT_SERVICE(UiService, svc_ui); IMPORT_SERVICE(GfxService, svc_gfx); IMPORT_SERVICE(CameraService, svc_camera); IMPORT_SERVICE(HookService, svc_hook); -IMPORT_SERVICE(GameService, svc_game); IMPORT_SERVICE(LogService, svc_log); namespace { diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt index 7d1d17a8c2..2f25c28efe 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt @@ -1,17 +1,17 @@ # Dusklight Mod SDK entry point # -# Provides game/service headers, compile definitions, version.h and WebGPU -# headers without configuring the full game tree. +# Provides selectable mod service, game ABI, and WebGPU header surfaces without configuring the +# full game tree. # # Usage (from a mod project): # add_subdirectory(/sdk dusk-sdk EXCLUDE_FROM_ALL) -# add_mod(my_mod SOURCES ... MOD_JSON mod.json) +# add_mod(my_mod FEATURES game webgpu SOURCES ... MOD_JSON mod.json) # # TODO: auto-download link targets from tag cmake_minimum_required(VERSION 3.25) -if (TARGET dusklight_game_headers) +if (TARGET dusklight_mod_api) message(FATAL_ERROR "Mod SDK already configured") endif () @@ -29,12 +29,7 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/DetectVersion.cmake") detect_version() configure_version_header() -# Provides dawn::webgpu_dawn and dawn::dawncpp_headers for public gfx service headers. -include("${CMAKE_CURRENT_SOURCE_DIR}/../extern/aurora/cmake/AuroraDependencyVersions.cmake") -set(AURORA_DAWN_PROVIDER "package" CACHE STRING "How to provide Dawn for the mod SDK") -include("${CMAKE_CURRENT_SOURCE_DIR}/../extern/aurora/cmake/AuroraDawnProvider.cmake") - -# Game ABI headers & compile definitions +# Mod API and optional feature header surfaces include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GameABIConfig.cmake") if (WIN32 OR APPLE OR ANDROID) diff --git a/include/mods/api.h b/sdk/include/mods/api.h similarity index 100% rename from include/mods/api.h rename to sdk/include/mods/api.h diff --git a/include/mods/hook.hpp b/sdk/include/mods/hook.hpp similarity index 98% rename from include/mods/hook.hpp rename to sdk/include/mods/hook.hpp index 94d5bce797..d48e9bff9f 100644 --- a/include/mods/hook.hpp +++ b/sdk/include/mods/hook.hpp @@ -1,6 +1,10 @@ #pragma once -#include "mods/svc/hook.h" +#if !defined(DUSK_BUILDING_GAME) && !defined(DUSK_MOD_FEATURE_GAME) +#error "DEFINE_HOOK requires add_mod(... FEATURES game)" +#endif + +#include #include #include diff --git a/include/mods/meta.hpp b/sdk/include/mods/meta.hpp similarity index 99% rename from include/mods/meta.hpp rename to sdk/include/mods/meta.hpp index 1f533feaa7..7d5d1e5eec 100644 --- a/include/mods/meta.hpp +++ b/sdk/include/mods/meta.hpp @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include #include #include diff --git a/include/mods/service.hpp b/sdk/include/mods/service.hpp similarity index 99% rename from include/mods/service.hpp rename to sdk/include/mods/service.hpp index f5ba322c45..d97d8def31 100644 --- a/include/mods/service.hpp +++ b/sdk/include/mods/service.hpp @@ -1,7 +1,7 @@ #pragma once -#include "mods/api.h" -#include "mods/meta.hpp" +#include +#include #include #include diff --git a/include/mods/svc/camera.h b/sdk/include/mods/svc/camera.h similarity index 99% rename from include/mods/svc/camera.h rename to sdk/include/mods/svc/camera.h index 884aadef1e..ec7724a1de 100644 --- a/include/mods/svc/camera.h +++ b/sdk/include/mods/svc/camera.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include #define CAMERA_SERVICE_ID "dev.twilitrealm.dusklight.camera" #define CAMERA_SERVICE_MAJOR 1u diff --git a/include/mods/svc/config.h b/sdk/include/mods/svc/config.h similarity index 99% rename from include/mods/svc/config.h rename to sdk/include/mods/svc/config.h index 4275312201..50c518bd40 100644 --- a/include/mods/svc/config.h +++ b/sdk/include/mods/svc/config.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include #define CONFIG_SERVICE_ID "dev.twilitrealm.dusklight.config" #define CONFIG_SERVICE_MAJOR 1u diff --git a/include/mods/svc/game.h b/sdk/include/mods/svc/game.h similarity index 81% rename from include/mods/svc/game.h rename to sdk/include/mods/svc/game.h index 116d6fc316..bdcf2d71f0 100644 --- a/include/mods/svc/game.h +++ b/sdk/include/mods/svc/game.h @@ -1,10 +1,10 @@ #pragma once -#include "mods/api.h" +#include /* - * Mods that link or hook game code directly must import this service; service-only and asset-only - * mods must not. + * The mod SDK imports this service automatically for mods built with FEATURES game; service-only + * and asset-only mods do not require it. * * Major version is the game-code ABI epoch: it is bumped when game-visible struct or vtable layouts * change incompatibly (e.g. a TARGET_PC field added to an existing game struct). The loader's @@ -20,7 +20,7 @@ typedef struct GameService { } GameService; #ifdef __cplusplus -#include "mods/service.hpp" +#include template <> struct dusk::mods::ServiceTraits { diff --git a/include/mods/svc/gfx.h b/sdk/include/mods/svc/gfx.h similarity index 98% rename from include/mods/svc/gfx.h rename to sdk/include/mods/svc/gfx.h index d87255e978..fad1b0bf9a 100644 --- a/include/mods/svc/gfx.h +++ b/sdk/include/mods/svc/gfx.h @@ -1,6 +1,10 @@ #pragma once -#include "mods/api.h" +#include + +#if !defined(DUSK_BUILDING_GAME) && !defined(DUSK_MOD_FEATURE_WEBGPU) +#error "mods/svc/gfx.h requires add_mod(... FEATURES webgpu)" +#endif #include diff --git a/include/mods/svc/hook.h b/sdk/include/mods/svc/hook.h similarity index 99% rename from include/mods/svc/hook.h rename to sdk/include/mods/svc/hook.h index 00760d2945..987c438fa0 100644 --- a/include/mods/svc/hook.h +++ b/sdk/include/mods/svc/hook.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include /* * Intercept game functions by address. Prefer the typed helpers in mods/hook.hpp diff --git a/include/mods/svc/host.h b/sdk/include/mods/svc/host.h similarity index 99% rename from include/mods/svc/host.h rename to sdk/include/mods/svc/host.h index b0b278612c..0f7851c7e1 100644 --- a/include/mods/svc/host.h +++ b/sdk/include/mods/svc/host.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include /* * The host service: the calling mod's identity and its runtime interface to the loader. diff --git a/include/mods/svc/log.h b/sdk/include/mods/svc/log.h similarity index 98% rename from include/mods/svc/log.h rename to sdk/include/mods/svc/log.h index b25780ed4a..0dbf4ec48e 100644 --- a/include/mods/svc/log.h +++ b/sdk/include/mods/svc/log.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include /* * Logging into the game's console and log files. Messages are attributed to the calling mod diff --git a/include/mods/svc/overlay.h b/sdk/include/mods/svc/overlay.h similarity index 98% rename from include/mods/svc/overlay.h rename to sdk/include/mods/svc/overlay.h index bf6fd7b975..02f60bd727 100644 --- a/include/mods/svc/overlay.h +++ b/sdk/include/mods/svc/overlay.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include #define OVERLAY_SERVICE_ID "dev.twilitrealm.dusklight.overlay" #define OVERLAY_SERVICE_MAJOR 1u diff --git a/include/mods/svc/resource.h b/sdk/include/mods/svc/resource.h similarity index 98% rename from include/mods/svc/resource.h rename to sdk/include/mods/svc/resource.h index 602ab1a25f..1a8251d83a 100644 --- a/include/mods/svc/resource.h +++ b/sdk/include/mods/svc/resource.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include /* * Read-only access to the res/ tree of the calling mod's own bundle. Reload serves the new diff --git a/include/mods/svc/texture.h b/sdk/include/mods/svc/texture.h similarity index 99% rename from include/mods/svc/texture.h rename to sdk/include/mods/svc/texture.h index 1c7a944cba..bb648cf860 100644 --- a/include/mods/svc/texture.h +++ b/sdk/include/mods/svc/texture.h @@ -1,6 +1,6 @@ #pragma once -#include "mods/api.h" +#include #define TEXTURE_SERVICE_ID "dev.twilitrealm.dusklight.texture" #define TEXTURE_SERVICE_MAJOR 1u diff --git a/include/mods/svc/ui.h b/sdk/include/mods/svc/ui.h similarity index 99% rename from include/mods/svc/ui.h rename to sdk/include/mods/svc/ui.h index 676706a739..73df25cb47 100644 --- a/include/mods/svc/ui.h +++ b/sdk/include/mods/svc/ui.h @@ -1,7 +1,7 @@ #pragma once -#include "mods/api.h" -#include "mods/svc/config.h" +#include +#include #define UI_SERVICE_ID "dev.twilitrealm.dusklight.ui" #define UI_SERVICE_MAJOR 1u diff --git a/sdk/src/game_feature.cpp b/sdk/src/game_feature.cpp new file mode 100644 index 0000000000..15fa16c443 --- /dev/null +++ b/sdk/src/game_feature.cpp @@ -0,0 +1,5 @@ +#include +#include + +// Linking the game feature makes the loader enforce the game ABI epoch. +IMPORT_SERVICE(GameService, svc_game); diff --git a/src/Z2AudioCS/SpkSystem.cpp b/src/Z2AudioCS/SpkSystem.cpp index ebe8c0a88c..0e91ca599c 100644 --- a/src/Z2AudioCS/SpkSystem.cpp +++ b/src/Z2AudioCS/SpkSystem.cpp @@ -1,6 +1,5 @@ #include "Z2AudioCS/SpkSystem.h" -#include "../../libs/JSystem/include/JSystem/JKernel/JKRHeap.h" #include "JSystem/JAudio2/JASGadget.h" #include "JSystem/JAudio2/JASHeapCtrl.h" #include "JSystem/JKernel/JKRHeap.h" diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index e3d4c7252c..45829188db 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -57,7 +57,7 @@ #include "dusk/settings.h" #include "res/Object/Alink.h" #include -#include +#include #endif static int daAlink_Create(fopAc_ac_c* i_this); diff --git a/src/d/actor/d_a_alink_effect.inc b/src/d/actor/d_a_alink_effect.inc index 1e3c8460eb..db64d25b81 100644 --- a/src/d/actor/d_a_alink_effect.inc +++ b/src/d/actor/d_a_alink_effect.inc @@ -8,7 +8,7 @@ #include "d/actor/d_a_alink.h" #include "d/d_com_inf_game.h" #include "d/d_k_wmark.h" -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" DUSK_GAME_DATA const EffParamProc daAlink_c::m_fEffParamProc[] = { &daAlink_c::setEffectFrontRollParam, diff --git a/src/d/actor/d_a_bg_obj.cpp b/src/d/actor/d_a_bg_obj.cpp index 85af9a406c..da18ce4501 100644 --- a/src/d/actor/d_a_bg_obj.cpp +++ b/src/d/actor/d_a_bg_obj.cpp @@ -13,7 +13,7 @@ #include "d/actor/d_a_bg_obj.h" #include "d/actor/d_a_set_bgobj.h" #include "d/d_s_play.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" static const char* getBmdName(int param_0, int param_1) { static char l_bmdName[16]; diff --git a/src/d/actor/d_a_mirror.cpp b/src/d/actor/d_a_mirror.cpp index c405645320..486a035590 100644 --- a/src/d/actor/d_a_mirror.cpp +++ b/src/d/actor/d_a_mirror.cpp @@ -18,7 +18,7 @@ #endif #ifndef __MWERKS__ -#include "dusk/math.h" +#include "helpers/math.h" #endif static BOOL daMirror_c_createHeap(fopAc_ac_c* i_this) { diff --git a/src/d/actor/d_a_movie_player.cpp b/src/d/actor/d_a_movie_player.cpp index 43117615e5..a830f1440f 100644 --- a/src/d/actor/d_a_movie_player.cpp +++ b/src/d/actor/d_a_movie_player.cpp @@ -29,7 +29,7 @@ #include "JSystem/JAudio2/JASCriticalSection.h" #if TARGET_PC -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" #include "dusk/os.h" #include "dusk/layout.hpp" #if MOVIE_SUPPORT @@ -4592,12 +4592,3 @@ DUSK_PROFILE actor_process_profile_definition DUSK_CONST g_profile_MOVIE_PLAYER }; AUDIO_INSTANCES; - -#if TARGET_PC -void dusk::MoviePlayerShutdown() { - // We need to cleanly shut down the threads to avoid crashes on shutdown. - if (daMP_c::m_myObj) { - daMP_c::m_myObj->daMP_c_Finish(); - } -} -#endif \ No newline at end of file diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index ede59f65b5..cbd3d9dcf9 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -15,7 +15,7 @@ #include "Z2AudioLib/Z2Instances.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" static DUSK_CONSTEXPR int l_bmdData[4][2] = { {14, 1}, {26, 2}, diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index d3690b833a..7f3f9e1126 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -11,7 +11,7 @@ #include "d/actor/d_a_e_ym.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" enum saru_TW_RES_File_ID { /* BMDR */ diff --git a/src/d/actor/d_a_npc_shop0.cpp b/src/d/actor/d_a_npc_shop0.cpp index b24e372aaf..e61ea44f4e 100644 --- a/src/d/actor/d_a_npc_shop0.cpp +++ b/src/d/actor/d_a_npc_shop0.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc_shop0.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" static int createHeapCallBack(fopAc_ac_c* i_this) { return static_cast(i_this)->createHeap(); diff --git a/src/d/actor/d_a_npc_yelia.cpp b/src/d/actor/d_a_npc_yelia.cpp index bcdff6b5da..44b408b35c 100644 --- a/src/d/actor/d_a_npc_yelia.cpp +++ b/src/d/actor/d_a_npc_yelia.cpp @@ -9,7 +9,7 @@ #include "d/actor/d_a_demo_item.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" static DUSK_CONSTEXPR daNpc_GetParam1 l_bmdData[3] = { {3, 1}, diff --git a/src/d/actor/d_a_npc_ykw.cpp b/src/d/actor/d_a_npc_ykw.cpp index e71a0e6b93..7ca9c4f36f 100644 --- a/src/d/actor/d_a_npc_ykw.cpp +++ b/src/d/actor/d_a_npc_ykw.cpp @@ -20,7 +20,7 @@ #include "m_Do/m_Do_ext.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #if DEBUG class daNpc_ykW_HIO_c : public mDoHIO_entry_c { diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index faef741c27..a5fa226ee7 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -12,7 +12,7 @@ #include "d/d_cc_uty.h" #include "d/d_com_inf_actor.h" #include "d/d_com_inf_game.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" #if DEBUG #include "d/d_debug_viewer.h" #endif diff --git a/src/d/actor/d_a_obj_lv4chandelier.cpp b/src/d/actor/d_a_obj_lv4chandelier.cpp index 9ab47345d4..7847b37358 100644 --- a/src/d/actor/d_a_obj_lv4chandelier.cpp +++ b/src/d/actor/d_a_obj_lv4chandelier.cpp @@ -13,7 +13,7 @@ #include "d/d_cc_uty.h" #ifndef __MWERKS__ -#include "dusk/math.h" +#include "helpers/math.h" #endif #if DEBUG diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index 5170fbca4e..f8493ec385 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -9,7 +9,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "f_op/f_op_actor_mng.h" #include "f_op/f_op_msg.h" diff --git a/src/d/actor/d_a_tag_evt.cpp b/src/d/actor/d_a_tag_evt.cpp index 6f1de5a71c..780fc1d38c 100644 --- a/src/d/actor/d_a_tag_evt.cpp +++ b/src/d/actor/d_a_tag_evt.cpp @@ -8,7 +8,7 @@ #include "f_op/f_op_actor_mng.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" static DUSK_CONST char* l_evtNameList[] = { NULL, diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp index cf8db83f8f..e023319a9f 100644 --- a/src/d/actor/d_a_tag_msg.cpp +++ b/src/d/actor/d_a_tag_msg.cpp @@ -11,7 +11,7 @@ #include "d/d_debug_viewer.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" static int createHeapCallBack(fopAc_ac_c* i_this) { daTag_Msg_c* msg = (daTag_Msg_c*)i_this; diff --git a/src/d/actor/d_flower.inc b/src/d/actor/d_flower.inc index 54b1e022cc..bef7848c24 100644 --- a/src/d/actor/d_flower.inc +++ b/src/d/actor/d_flower.inc @@ -19,7 +19,7 @@ static u8* l_J_Ohana00_64TEX_get() { static u8 buf[0x800]; static bool _ = (dusk // from d_grass.inc static MtxP get_model_mtx(Mtx modelMtx, Mtx storage); static void transform_positions( - const dusk::batch::LeafTemplate& tpl, const Vec* posArray, const Mtx mtx, Vec* xfPos); + const batch::LeafTemplate& tpl, const Vec* posArray, const Mtx mtx, Vec* xfPos); static void split_batch(u32& emitted, u32 vtxCount); #else #include "assets/l_J_Ohana00_64TEX.h" @@ -595,11 +595,11 @@ dFlower_packet_c::dFlower_packet_c() { l_J_Ohana01_64128_0419TEX__width + 1, l_J_Ohana01_64128_0419TEX__height + 1, GX_TF_CMPR, GX_MIRROR, GX_MIRROR, GX_FALSE ); - dusk::batch::decode_leaf_template(l_J_hana00DL, 0x140, mTplHana00); - dusk::batch::decode_leaf_template(l_J_hana00_cDL, 0xC0, mTplHana00Cut); - dusk::batch::decode_leaf_template(l_J_hana01DL, 0x120, mTplHana01); - dusk::batch::decode_leaf_template(l_J_hana01_c_00DL, 0xC0, mTplHana01Cut00); - dusk::batch::decode_leaf_template(l_J_hana01_c_01DL, 0x120, mTplHana01Cut); + batch::decode_leaf_template(l_J_hana00DL, 0x140, mTplHana00); + batch::decode_leaf_template(l_J_hana00_cDL, 0xC0, mTplHana00Cut); + batch::decode_leaf_template(l_J_hana01DL, 0x120, mTplHana01); + batch::decode_leaf_template(l_J_hana01_c_00DL, 0xC0, mTplHana01Cut00); + batch::decode_leaf_template(l_J_hana01_c_01DL, 0x120, mTplHana01Cut); #endif m_deleteRoom = &dFlower_packet_c::deleteRoom; @@ -757,9 +757,9 @@ static GXColor hana01_amb_color(int idx, const dKy_tevstr_c* tevstr) { return amb; } -static void flower_emit(const dusk::batch::LeafTemplate& tpl, const Vec* xformedPos, GXColor amb) { +static void flower_emit(const batch::LeafTemplate& tpl, const Vec* xformedPos, GXColor amb) { for (u32 i = 0; i < tpl.vtxCount; i++) { - const dusk::batch::LeafTemplate::Vtx& v = tpl.vtx[i]; + const batch::LeafTemplate::Vtx& v = tpl.vtx[i]; const Vec& p = xformedPos[v.pos]; GXPosition3f32(p.x, p.y, p.z); GXNormal1x8(v.nrm); @@ -852,7 +852,7 @@ void dFlower_packet_c::draw() { for (int bucket = 0; bucket < 2; bucket++) { const bool cut = bucket != 0; - const dusk::batch::LeafTemplate& tpl = cut ? mTplHana00Cut : mTplHana00; + const batch::LeafTemplate& tpl = cut ? mTplHana00Cut : mTplHana00; bool open = false; u32 emitted = 0; @@ -931,10 +931,10 @@ void dFlower_packet_c::draw() { GXLoadPosMtxImm(identity, GX_PNMTX0); GXLoadNrmMtxImm(j3dSys.getViewMtx(), 0); - const dusk::batch::LeafTemplate* const buckets[3] = { + const batch::LeafTemplate* const buckets[3] = { &mTplHana01, &mTplHana01Cut00, &mTplHana01Cut}; for (int bucket = 0; bucket < 3; bucket++) { - const dusk::batch::LeafTemplate& tpl = *buckets[bucket]; + const batch::LeafTemplate& tpl = *buckets[bucket]; bool open = false; u32 emitted = 0; diff --git a/src/d/actor/d_grass.inc b/src/d/actor/d_grass.inc index 9e8c360518..d2c212f043 100644 --- a/src/d/actor/d_grass.inc +++ b/src/d/actor/d_grass.inc @@ -513,9 +513,9 @@ dGrass_packet_c::dGrass_packet_c() { field_0x1d714 = 0; #if TARGET_PC - dusk::batch::decode_leaf_template(mp_Mkusa_9q_DL, m_Mkusa_9q_DL_size, mTplKusa9q); - dusk::batch::decode_leaf_template(mp_Mkusa_9q_cDL, m_Mkusa_9q_cDL_size, mTplKusa9qCut); - dusk::batch::decode_leaf_template(l_M_TenGusaDL, 0xC0, mTplTengusa); + batch::decode_leaf_template(mp_Mkusa_9q_DL, m_Mkusa_9q_DL_size, mTplKusa9q); + batch::decode_leaf_template(mp_Mkusa_9q_cDL, m_Mkusa_9q_cDL_size, mTplKusa9qCut); + batch::decode_leaf_template(l_M_TenGusaDL, 0xC0, mTplTengusa); #endif OS_REPORT("草群メモリ=%fK\n", 117.7734375f); @@ -533,7 +533,7 @@ static MtxP get_model_mtx(Mtx modelMtx, Mtx storage) { } static void transform_positions( - const dusk::batch::LeafTemplate& tpl, const Vec* posArray, const Mtx mtx, Vec* xfPos) { + const batch::LeafTemplate& tpl, const Vec* posArray, const Mtx mtx, Vec* xfPos) { for (u32 i = 0; i < tpl.posRefCount; i++) { const u8 idx = tpl.posRefs[i]; MTXMultVec(mtx, &posArray[idx], &xfPos[idx]); @@ -609,10 +609,10 @@ static GXColor blade_amb_color(const dGrass_data_c* blade, const dKy_tevstr_c* t return amb; } -static void blade_emit(const dusk::batch::LeafTemplate& tpl, const Vec* xformedPos, +static void blade_emit(const batch::LeafTemplate& tpl, const Vec* xformedPos, const GXColor* colors, GXColor amb) { for (u32 i = 0; i < tpl.vtxCount; i++) { - const dusk::batch::LeafTemplate::Vtx& v = tpl.vtx[i]; + const batch::LeafTemplate::Vtx& v = tpl.vtx[i]; const Vec& p = xformedPos[v.pos]; GXPosition3f32(p.x, p.y, p.z); GXNormal1x8(v.nrm); @@ -765,7 +765,7 @@ void dGrass_packet_c::draw() { for (int bucket = 0; bucket < 4; bucket++) { const bool kusaTex = bucket < 2; const bool cut = (bucket & 1) != 0; - const dusk::batch::LeafTemplate& tpl = + const batch::LeafTemplate& tpl = cut ? mTplKusa9qCut : (kusaTex ? mTplKusa9q : mTplTengusa); bool open = false; diff --git a/src/d/d_bg_parts.cpp b/src/d/d_bg_parts.cpp index c7d94551b9..07c91f8807 100644 --- a/src/d/d_bg_parts.cpp +++ b/src/d/d_bg_parts.cpp @@ -8,7 +8,7 @@ #include "JSystem/JKernel/JKRSolidHeap.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" void dBgp_c::material_c::draw() { material_c* material = this; diff --git a/src/d/d_bg_s.cpp b/src/d/d_bg_s.cpp index f48c58fead..51811d9538 100644 --- a/src/d/d_bg_s.cpp +++ b/src/d/d_bg_s.cpp @@ -15,7 +15,7 @@ #include "d/d_bg_s_capt_poly.h" #if TARGET_PC -#include "dusk/offset_ptr.h" +#include "helpers/offset_ptr.h" #include "dusk/settings.h" #endif diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index 0df7475116..cfadb5aa8a 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -26,7 +26,11 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" + +#if TARGET_PC +#include "dusk/settings.h" +#endif void dComIfG_play_c::ct() { mWindowNum = 0; @@ -2990,3 +2994,19 @@ u8 dComIfGs_staffroll_next_go_check() { DUSK_GAME_DATA GXColor g_whiteColor = {255, 255, 255, 255}; DUSK_GAME_DATA GXColor g_saftyWhiteColor = {160, 160, 160, 255}; + +#if TARGET_PC +void dComIfGd_drawXluListInvisible() { + ZoneScoped; + if (!dusk::getSettings().game.disableWaterRefraction) { + g_dComIfG_gameInfo.drawlist.drawXluListInvisible(); + } +} + +void dComIfGd_drawOpaListInvisible() { + ZoneScoped; + if (!dusk::getSettings().game.disableWaterRefraction) { + g_dComIfG_gameInfo.drawlist.drawOpaListInvisible(); + } +} +#endif diff --git a/src/d/d_cursor_mng.cpp b/src/d/d_cursor_mng.cpp index 230b4e740e..b99ec8f4db 100644 --- a/src/d/d_cursor_mng.cpp +++ b/src/d/d_cursor_mng.cpp @@ -1,10 +1,7 @@ #include "JSystem/JKernel/JKRHeap.h" #include "d/dolzel.h" // IWYU pragma: keep - #include "d/d_cursor_mng.h" - -#include "../../libs/JSystem/include/JSystem/JKernel/JKRHeap.h" #include "d/d_com_inf_game.h" dCsr_mng_c* dCsr_mng_c::m_myObj; diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp index 438e910bff..8552ead16e 100644 --- a/src/d/d_drawlist.cpp +++ b/src/d/d_drawlist.cpp @@ -20,7 +20,7 @@ #include "absl/container/flat_hash_map.h" #include "client/TracyScoped.hpp" #include "dusk/frame_interpolation.h" -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" #include "dusk/logging.h" static const void* getInterpKey(const void* base, int idx) { diff --git a/src/d/d_ev_camera.cpp b/src/d/d_ev_camera.cpp index 67cda5863b..2650c2d05e 100644 --- a/src/d/d_ev_camera.cpp +++ b/src/d/d_ev_camera.cpp @@ -13,7 +13,7 @@ #include "d/actor/d_a_alink.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #ifdef __MWERKS__ #define LOAD_4BYTE_STRING_LITERAL(x) (*(u32*)(x)) diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index 3ae3becd93..b17ebf61f0 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -13,7 +13,7 @@ #include "SSystem/SComponent/c_counter.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" namespace { static u8 event_debug_evnt() { diff --git a/src/d/d_event_manager.cpp b/src/d/d_event_manager.cpp index 9da313c239..154a1c9288 100644 --- a/src/d/d_event_manager.cpp +++ b/src/d/d_event_manager.cpp @@ -15,7 +15,7 @@ #include "SSystem/SComponent/c_counter.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #if DEBUG static dEvM_HIO_c l_HIO; diff --git a/src/d/d_file_sel_info.cpp b/src/d/d_file_sel_info.cpp index d54bc4424d..e107d6dacc 100644 --- a/src/d/d_file_sel_info.cpp +++ b/src/d/d_file_sel_info.cpp @@ -14,7 +14,7 @@ #include #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "dusk/version.hpp" dFile_info_c::dFile_info_c(JKRArchive* i_archive, u8 param_1) { diff --git a/src/d/d_file_select.cpp b/src/d/d_file_select.cpp index 19cdcfe81c..f57265aa77 100644 --- a/src/d/d_file_select.cpp +++ b/src/d/d_file_select.cpp @@ -25,7 +25,7 @@ #if TARGET_PC #include "dusk/menu_pointer.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" namespace { constexpr u8 pointer_target(u8 group, u8 index) noexcept { diff --git a/src/d/d_gameover.cpp b/src/d/d_gameover.cpp index 7d421a187c..c7dcde357c 100644 --- a/src/d/d_gameover.cpp +++ b/src/d/d_gameover.cpp @@ -14,7 +14,7 @@ #include "JSystem/J2DGraph/J2DGrafContext.h" #include -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" class dGov_HIO_c : public mDoHIO_entry_c { public: diff --git a/src/d/d_menu_calibration.cpp b/src/d/d_menu_calibration.cpp index bc256547d7..23f81121bc 100644 --- a/src/d/d_menu_calibration.cpp +++ b/src/d/d_menu_calibration.cpp @@ -14,7 +14,7 @@ #include "m_Do/m_Do_controller_pad.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" // Need 0xC bytes of padding with no symbol between dMenu_Calibration_c::__vtable and the end of // .data diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index 17d581eeab..36348b4387 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -26,7 +26,11 @@ #include "m_Do/m_Do_graphic.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" + +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#endif #if (PLATFORM_WII || PLATFORM_SHIELD) #define POINTER_OPT dComIfGs_getOptPointer() diff --git a/src/d/d_menu_fishing.cpp b/src/d/d_menu_fishing.cpp index 75ba679df7..2af4291525 100644 --- a/src/d/d_menu_fishing.cpp +++ b/src/d/d_menu_fishing.cpp @@ -16,7 +16,7 @@ #include "m_Do/m_Do_graphic.h" #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "dusk/version.hpp" typedef void (dMenu_Fishing_c::*initFunc)(); diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp index 7b9558c1ce..7db489e51b 100644 --- a/src/d/d_menu_fmap.cpp +++ b/src/d/d_menu_fmap.cpp @@ -21,10 +21,14 @@ #include "d/d_msg_object.h" #include "d/d_msg_scrn_explain.h" #include "d/d_stage.h" -#include "dusk/memory.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "f_op/f_op_msg_mng.h" +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#include "dusk/memory.h" +#endif + static dMf_HIO_c g_fmHIO; static dMenu_Fmap_c::process init_process[30] = { diff --git a/src/d/d_menu_ring.cpp b/src/d/d_menu_ring.cpp index c3f1ed2a4a..a50d6def3a 100644 --- a/src/d/d_menu_ring.cpp +++ b/src/d/d_menu_ring.cpp @@ -30,6 +30,7 @@ #include #if TARGET_PC +#include "dusk/frame_interpolation.h" #include "dusk/game_clock.h" #include "dusk/menu_pointer.h" #include "dusk/settings.h" diff --git a/src/d/d_meter2_info.cpp b/src/d/d_meter2_info.cpp index 879ab5d386..6309e83a86 100644 --- a/src/d/d_meter2_info.cpp +++ b/src/d/d_meter2_info.cpp @@ -15,7 +15,7 @@ #include -#include "dusk/string.hpp" +#include "helpers/string.hpp" enum ITEMICON_RES_FILE_ID { ITEMICON_BTI_ARI_MESU_00=0x3, diff --git a/src/d/d_meter_button.cpp b/src/d/d_meter_button.cpp index 1f47969f47..0e3354e76e 100644 --- a/src/d/d_meter_button.cpp +++ b/src/d/d_meter_button.cpp @@ -18,11 +18,10 @@ #include "d/d_pane_class.h" #include "dusk/frame_interpolation.h" #include -#if TARGET_PC -#include "dusk/string.hpp" -#endif -#include "dusk/string.hpp" +#if TARGET_PC +#include "helpers/string.hpp" +#endif #if VERSION == VERSION_GCN_JPN #define STR_BUF_LEN 528 diff --git a/src/d/d_model.cpp b/src/d/d_model.cpp index f1e58f2961..bdff472367 100644 --- a/src/d/d_model.cpp +++ b/src/d/d_model.cpp @@ -5,6 +5,10 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "d/d_com_inf_game.h" +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#endif + void dMdl_c::draw() { j3dSys.setVtxPos(mpModelData->getVtxPosArray(), mpModelData->getVtxNum()); j3dSys.setVtxNrm(mpModelData->getVtxNrmArray(), mpModelData->getNrmNum()); diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 4bcdc7af5b..e33de068db 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -26,8 +26,12 @@ #include "m_Do/m_Do_lib.h" #include "tracy/Tracy.hpp" +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#endif + #ifndef __MWERKS__ -#include "dusk/math.h" +#include "helpers/math.h" #endif #if DEBUG diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index cc0deb2213..22729ad43e 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -31,8 +31,8 @@ #include "dusk/settings.h" #include -#include "dusk/string.hpp" -#define strcpy dusk::SafeStringCopy +#include "helpers/string.hpp" +#define strcpy SafeStringCopy #endif static u8 dSv_item_rename(u8 i_itemNo) { diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index cd5c48b20f..a27f0482f8 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -23,7 +23,7 @@ #include #include "dusk/logging.h" -#include "dusk/string.hpp" +#include "helpers/string.hpp" #if TARGET_PC #include #include @@ -157,7 +157,7 @@ void dStage_startStage_c::set(const char* i_Name, s8 i_RoomNo, s16 i_Point, s8 i #if TARGET_PC // UB fix. if (mName != i_Name) { - dusk::SafeStringCopy(mName, i_Name); + SafeStringCopy(mName, i_Name); } #else strcpy(mName, i_Name); diff --git a/src/dusk/OSReport.cpp b/src/dusk/OSReport.cpp index 422b88f03c..78bfd652c9 100644 --- a/src/dusk/OSReport.cpp +++ b/src/dusk/OSReport.cpp @@ -1,6 +1,7 @@ #include #include "aurora/lib/logging.hpp" +#include "dusk/os.h" #include "os_report.h" aurora::Module Log("dusk::osReport"); @@ -143,4 +144,4 @@ void OSAttention(const char* fmt, ...) { va_start(args, fmt); OSVAttention(fmt, args); va_end(args); -} \ No newline at end of file +} diff --git a/include/dusk/achievements.h b/src/dusk/achievements.h similarity index 100% rename from include/dusk/achievements.h rename to src/dusk/achievements.h diff --git a/include/dusk/action_bindings.h b/src/dusk/action_bindings.h similarity index 100% rename from include/dusk/action_bindings.h rename to src/dusk/action_bindings.h diff --git a/include/dusk/app_info.hpp b/src/dusk/app_info.hpp similarity index 86% rename from include/dusk/app_info.hpp rename to src/dusk/app_info.hpp index e08fe680d9..bb8c15856e 100644 --- a/include/dusk/app_info.hpp +++ b/src/dusk/app_info.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_APPNAME_HPP -#define DUSK_APPNAME_HPP +#pragma once namespace dusk { /** @@ -21,5 +20,3 @@ namespace dusk { */ constexpr auto OrgName = "TwilitRealm"; } - -#endif // DUSK_APPNAME_HPP diff --git a/include/dusk/audio.h b/src/dusk/audio.h similarity index 72% rename from include/dusk/audio.h rename to src/dusk/audio.h index e3dfda9f52..0f247689f6 100644 --- a/include/dusk/audio.h +++ b/src/dusk/audio.h @@ -1,5 +1,4 @@ -#ifndef DUSK_AUDIO_H -#define DUSK_AUDIO_H +#pragma once #if TARGET_PC #define DUSK_AUDIO_DISABLED 0 @@ -12,5 +11,3 @@ #else #define DUSK_AUDIO_SKIP(...) #endif - -#endif // DUSK_AUDIO_H diff --git a/include/dusk/audio/DuskAudioSystem.h b/src/dusk/audio/DuskAudioSystem.h similarity index 100% rename from include/dusk/audio/DuskAudioSystem.h rename to src/dusk/audio/DuskAudioSystem.h diff --git a/src/dusk/audio/DuskDsp.cpp b/src/dusk/audio/DuskDsp.cpp index ca4d079e92..1f304d4b3e 100644 --- a/src/dusk/audio/DuskDsp.cpp +++ b/src/dusk/audio/DuskDsp.cpp @@ -10,11 +10,11 @@ #include #include "Adpcm.hpp" -#include "freeverb/revmodel.hpp" #include "dusk/audio/DuskAudioSystem.h" -#include "dusk/endian.h" #include "dusk/logging.h" +#include "freeverb/revmodel.hpp" #include "global.h" +#include "helpers/endian.h" #include "tracy/Tracy.hpp" using namespace dusk::audio; diff --git a/include/dusk/autosave.h b/src/dusk/autosave.h similarity index 86% rename from include/dusk/autosave.h rename to src/dusk/autosave.h index c32cd1e22b..2ab0887295 100644 --- a/include/dusk/autosave.h +++ b/src/dusk/autosave.h @@ -1,8 +1,5 @@ #pragma once -#ifndef AUTOSAVE_H -#define AUTOSAVE_H - #include #include #include @@ -15,5 +12,3 @@ void autoSaving(); void waitingForWrite(); void endAutoSave(); void toggleAutoSave(bool enabled); - -#endif \ No newline at end of file diff --git a/include/dusk/config.hpp b/src/dusk/config.hpp similarity index 99% rename from include/dusk/config.hpp rename to src/dusk/config.hpp index 6d36dff1f3..53591437db 100644 --- a/include/dusk/config.hpp +++ b/src/dusk/config.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_CONFIG_HPP -#define DUSK_CONFIG_HPP +#pragma once #include #include @@ -193,5 +192,3 @@ const ConfigImplBase* GetConfigImpl() { } } // namespace dusk::config - -#endif diff --git a/include/dusk/config_var.hpp b/src/dusk/config_var.hpp similarity index 99% rename from include/dusk/config_var.hpp rename to src/dusk/config_var.hpp index 52e62172cb..c4d3ac1d6b 100644 --- a/include/dusk/config_var.hpp +++ b/src/dusk/config_var.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_CONFIG_VAR_HPP -#define DUSK_CONFIG_VAR_HPP +#pragma once #include "dolphin/types.h" #include @@ -386,5 +385,3 @@ private: using ActionBindConfigVar = ConfigVar; } - -#endif // DUSK_CONFIG_VAR_HPP diff --git a/include/dusk/crash_handler.h b/src/dusk/crash_handler.h similarity index 100% rename from include/dusk/crash_handler.h rename to src/dusk/crash_handler.h diff --git a/include/dusk/crash_reporting.h b/src/dusk/crash_reporting.h similarity index 100% rename from include/dusk/crash_reporting.h rename to src/dusk/crash_reporting.h diff --git a/include/dusk/discord_presence.hpp b/src/dusk/discord_presence.hpp similarity index 100% rename from include/dusk/discord_presence.hpp rename to src/dusk/discord_presence.hpp diff --git a/include/dusk/dusk.h b/src/dusk/dusk.h similarity index 87% rename from include/dusk/dusk.h rename to src/dusk/dusk.h index 911ddbb535..b95b33515e 100644 --- a/include/dusk/dusk.h +++ b/src/dusk/dusk.h @@ -1,5 +1,4 @@ -#ifndef DUSK_DUSK_H -#define DUSK_DUSK_H +#pragma once #include @@ -19,5 +18,3 @@ constexpr u32 defaultAspectRatioW = 19; constexpr u32 defaultAspectRatioH = 14; static_assert(defaultWindowWidth / defaultAspectRatioW == defaultWindowHeight / defaultAspectRatioH); - -#endif // DUSK_DUSK_H diff --git a/src/dusk/dvd_asset.cpp b/src/dusk/dvd_asset.cpp index 75c82107cc..f5c8e73d4d 100644 --- a/src/dusk/dvd_asset.cpp +++ b/src/dusk/dvd_asset.cpp @@ -1,6 +1,6 @@ #include "dusk/dvd_asset.hpp" #include "dusk/logging.h" -#include "dusk/endian.h" +#include "helpers/endian.h" #include "dolphin/dvd.h" #include "DynamicLink.h" #include "JSystem/JKernel/JKRArchive.h" diff --git a/include/dusk/dvd_asset.hpp b/src/dusk/dvd_asset.hpp similarity index 100% rename from include/dusk/dvd_asset.hpp rename to src/dusk/dvd_asset.hpp diff --git a/include/dusk/extras.h b/src/dusk/extras.h similarity index 73% rename from include/dusk/extras.h rename to src/dusk/extras.h index 562ca051c1..8a3d633a3f 100644 --- a/include/dusk/extras.h +++ b/src/dusk/extras.h @@ -1,5 +1,4 @@ -#ifndef _SRC_EXTRAS_H_ -#define _SRC_EXTRAS_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -13,5 +12,3 @@ int stricmp(const char* str1, const char* str2); #ifdef __cplusplus } #endif - -#endif // _SRC_EXTRAS_H_ diff --git a/include/dusk/frame_interpolation.h b/src/dusk/frame_interpolation.h similarity index 100% rename from include/dusk/frame_interpolation.h rename to src/dusk/frame_interpolation.h diff --git a/include/dusk/game_clock.h b/src/dusk/game_clock.h similarity index 100% rename from include/dusk/game_clock.h rename to src/dusk/game_clock.h diff --git a/include/dusk/gamepad_color.h b/src/dusk/gamepad_color.h similarity index 66% rename from include/dusk/gamepad_color.h rename to src/dusk/gamepad_color.h index 0524b0b98d..9e3e35a84e 100644 --- a/include/dusk/gamepad_color.h +++ b/src/dusk/gamepad_color.h @@ -1,11 +1,6 @@ #pragma once -#ifndef GAMEPAD_COLOR_H -#define GAMEPAD_COLOR_H - namespace dusk::input { void handleGamepadColor(); bool pad_has_led(int port) noexcept; } - -#endif \ No newline at end of file diff --git a/include/dusk/gfx.hpp b/src/dusk/gfx.hpp similarity index 100% rename from include/dusk/gfx.hpp rename to src/dusk/gfx.hpp diff --git a/src/dusk/globals.cpp b/src/dusk/globals.cpp index 49ab54ccbe..591ece679f 100644 --- a/src/dusk/globals.cpp +++ b/src/dusk/globals.cpp @@ -1,6 +1,25 @@ #include #include #include +#include "dusk/dusk.h" +#include "dusk/main.h" + +bool dusk::IsRunning = true; +bool dusk::IsShuttingDown = false; +bool dusk::IsGameLaunched = false; +bool dusk::RestartRequested = false; +uint8_t dusk::SaveRequested = 0; +dusk::StageRequest dusk::StageRequested{"", false}; +std::filesystem::path dusk::ConfigPath; +std::filesystem::path dusk::CachePath; +AuroraStats dusk::lastFrameAuroraStats; +float dusk::frameUsagePct = 0.0f; + +void dusk::RequestRestart() noexcept { + RestartRequested = SupportsProcessRestart; + IsRunning = false; +} + u8 g_printOtherHeapDebug; dKankyo_HIO_c g_kankyoHIO; diff --git a/include/dusk/gyro.h b/src/dusk/gyro.h similarity index 100% rename from include/dusk/gyro.h rename to src/dusk/gyro.h diff --git a/include/dusk/hotkeys.h b/src/dusk/hotkeys.h similarity index 89% rename from include/dusk/hotkeys.h rename to src/dusk/hotkeys.h index 7a774bde80..bdf1778c3f 100644 --- a/include/dusk/hotkeys.h +++ b/src/dusk/hotkeys.h @@ -1,5 +1,4 @@ -#ifndef DUSK_HOTKEYS_H -#define DUSK_HOTKEYS_H +#pragma once namespace dusk::hotkeys { @@ -23,5 +22,3 @@ constexpr const char* TOGGLE_FULLSCREEN = "F11"; constexpr const char* TURBO = "Tab"; } - -#endif // DUSK_HOTKEYS_H diff --git a/src/dusk/imgui/ImGuiMenuTools.cpp b/src/dusk/imgui/ImGuiMenuTools.cpp index cf5b22a270..b9ad5eb021 100644 --- a/src/dusk/imgui/ImGuiMenuTools.cpp +++ b/src/dusk/imgui/ImGuiMenuTools.cpp @@ -15,6 +15,7 @@ #include "dusk/data.hpp" #include "dusk/dusk.h" #include "dusk/main.h" +#include "dusk/os.h" #include "m_Do/m_Do_main.h" #include diff --git a/include/dusk/io.hpp b/src/dusk/io.hpp similarity index 97% rename from include/dusk/io.hpp rename to src/dusk/io.hpp index aba6bf8a48..c8f9ae771b 100644 --- a/include/dusk/io.hpp +++ b/src/dusk/io.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_IO_HPP -#define DUSK_IO_HPP +#pragma once #include #include @@ -106,5 +105,3 @@ inline std::string fs_path_to_string(const std::filesystem::path& path) { } } // namespace dusk::io - -#endif // DUSK_IO_HPP diff --git a/include/dusk/layout.hpp b/src/dusk/layout.hpp similarity index 90% rename from include/dusk/layout.hpp rename to src/dusk/layout.hpp index 78316d2e09..bb207c2000 100644 --- a/include/dusk/layout.hpp +++ b/src/dusk/layout.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_LAYOUT_H -#define DUSK_LAYOUT_H +#pragma once #include "dolphin/types.h" @@ -33,5 +32,3 @@ struct LayoutRect { f32 heightInner); }; } - -#endif // DUSK_LAYOUT_H diff --git a/include/dusk/livesplit.h b/src/dusk/livesplit.h similarity index 100% rename from include/dusk/livesplit.h rename to src/dusk/livesplit.h diff --git a/include/dusk/logging.h b/src/dusk/logging.h similarity index 93% rename from include/dusk/logging.h rename to src/dusk/logging.h index 54350af4bf..fdf315752e 100644 --- a/include/dusk/logging.h +++ b/src/dusk/logging.h @@ -1,5 +1,4 @@ -#ifndef DUSK_LOGGING_H -#define DUSK_LOGGING_H +#pragma once #include #include @@ -34,5 +33,3 @@ extern aurora::Module DuskLog; #else #define STUB_RET() (void)0 #endif - -#endif diff --git a/src/dusk/main.cpp b/src/dusk/main.cpp index a35f695b50..c1003a7718 100644 --- a/src/dusk/main.cpp +++ b/src/dusk/main.cpp @@ -5,6 +5,7 @@ #endif #include +#include "d/actor/d_a_movie_player.h" #include "dusk/main.h" #include "dusk/io.hpp" diff --git a/include/dusk/main.h b/src/dusk/main.h similarity index 91% rename from include/dusk/main.h rename to src/dusk/main.h index a16291a8a7..1378e48a1b 100644 --- a/include/dusk/main.h +++ b/src/dusk/main.h @@ -1,5 +1,4 @@ -#ifndef DUSK_MAIN_H -#define DUSK_MAIN_H +#pragma once #include @@ -34,5 +33,3 @@ inline constexpr bool SupportsProcessRestart = true; void RequestRestart() noexcept; } // namespace dusk - -#endif // DUSK_MAIN_H diff --git a/include/dusk/map_loader_definitions.h b/src/dusk/map_loader_definitions.h similarity index 100% rename from include/dusk/map_loader_definitions.h rename to src/dusk/map_loader_definitions.h diff --git a/include/dusk/memory.h b/src/dusk/memory.h similarity index 68% rename from include/dusk/memory.h rename to src/dusk/memory.h index dd55181170..2d24e5b957 100644 --- a/include/dusk/memory.h +++ b/src/dusk/memory.h @@ -1,10 +1,7 @@ -#ifndef DUSK_MEMORY_H -#define DUSK_MEMORY_H +#pragma once #if TARGET_PC #define HEAP_SIZE(original, dusk) (dusk) #else #define HEAP_SIZE(original, dusk) (original) #endif - -#endif diff --git a/include/dusk/menu_pointer.h b/src/dusk/menu_pointer.h similarity index 100% rename from include/dusk/menu_pointer.h rename to src/dusk/menu_pointer.h diff --git a/include/dusk/mod_loader.hpp b/src/dusk/mod_loader.hpp similarity index 100% rename from include/dusk/mod_loader.hpp rename to src/dusk/mod_loader.hpp diff --git a/include/dusk/mouse.h b/src/dusk/mouse.h similarity index 100% rename from include/dusk/mouse.h rename to src/dusk/mouse.h diff --git a/include/dusk/os.h b/src/dusk/os.h similarity index 62% rename from include/dusk/os.h rename to src/dusk/os.h index 180bdb9b1a..46529d1e61 100644 --- a/include/dusk/os.h +++ b/src/dusk/os.h @@ -1,5 +1,4 @@ -#ifndef DUSK_OS_H -#define DUSK_OS_H +#pragma once #ifdef __cplusplus extern "C" { @@ -9,6 +8,8 @@ void OSSetCurrentThreadName(const char* name); #ifdef __cplusplus } -#endif -#endif // DUSK_OS_H \ No newline at end of file +namespace dusk { +extern bool OSReportReallyForceEnable; +} +#endif diff --git a/include/dusk/scope_guard.hpp b/src/dusk/scope_guard.hpp similarity index 79% rename from include/dusk/scope_guard.hpp rename to src/dusk/scope_guard.hpp index 281d23434d..ac35334d5d 100644 --- a/include/dusk/scope_guard.hpp +++ b/src/dusk/scope_guard.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_SCOPE_GUARD_HPP -#define DUSK_SCOPE_GUARD_HPP +#pragma once #include @@ -16,5 +15,3 @@ public: private: std::function m_func; }; - -#endif //DUSK_SCOPE_GUARD_HPP diff --git a/include/dusk/settings.h b/src/dusk/settings.h similarity index 100% rename from include/dusk/settings.h rename to src/dusk/settings.h diff --git a/include/dusk/speedrun.h b/src/dusk/speedrun.h similarity index 100% rename from include/dusk/speedrun.h rename to src/dusk/speedrun.h diff --git a/include/dusk/texture_replacements.hpp b/src/dusk/texture_replacements.hpp similarity index 78% rename from include/dusk/texture_replacements.hpp rename to src/dusk/texture_replacements.hpp index 85cb59b001..1a633d424d 100644 --- a/include/dusk/texture_replacements.hpp +++ b/src/dusk/texture_replacements.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_TEXTURE_REPLACEMENTS_HPP -#define DUSK_TEXTURE_REPLACEMENTS_HPP +#pragma once #include @@ -13,5 +12,3 @@ void set_enabled(bool enabled); void shutdown(); } - -#endif diff --git a/include/dusk/time.h b/src/dusk/time.h similarity index 98% rename from include/dusk/time.h rename to src/dusk/time.h index ead946188b..fad3186042 100644 --- a/include/dusk/time.h +++ b/src/dusk/time.h @@ -1,5 +1,4 @@ -#ifndef DUSK_TIME_H -#define DUSK_TIME_H +#pragma once #include #include @@ -138,5 +137,3 @@ private: void NanoSleep(const duration_t duration) { SDL_DelayPrecise(duration); } #endif }; - -#endif diff --git a/include/dusk/touch_camera.h b/src/dusk/touch_camera.h similarity index 100% rename from include/dusk/touch_camera.h rename to src/dusk/touch_camera.h diff --git a/include/dusk/version.hpp b/src/dusk/version.hpp similarity index 95% rename from include/dusk/version.hpp rename to src/dusk/version.hpp index fe393b049b..4fd6395059 100644 --- a/include/dusk/version.hpp +++ b/src/dusk/version.hpp @@ -1,5 +1,4 @@ -#ifndef DUSK_VERSION_HPP -#define DUSK_VERSION_HPP +#pragma once /** * Functionality for switching game behavior based on the loaded game version (e.g. PAL/JPN, GC/Wii) @@ -63,5 +62,3 @@ namespace dusk::version { return defaultValue; } } // namespace dusk::version - -#endif // DUSK_VERSION_HPP diff --git a/src/f_pc/f_pc_manager.cpp b/src/f_pc/f_pc_manager.cpp index ad226b4d1d..3cda826854 100644 --- a/src/f_pc/f_pc_manager.cpp +++ b/src/f_pc/f_pc_manager.cpp @@ -21,6 +21,10 @@ #include "f_pc/f_pc_priority.h" #include "m_Do/m_Do_controller_pad.h" +#if TARGET_PC +#include "dusk/frame_interpolation.h" +#endif + #include "tracy/Tracy.hpp" void fpcM_Draw(void* i_proc) { diff --git a/src/dusk/batch.cpp b/src/helpers/batch.cpp similarity index 97% rename from src/dusk/batch.cpp rename to src/helpers/batch.cpp index 04cba52b0d..a614eb8b1c 100644 --- a/src/dusk/batch.cpp +++ b/src/helpers/batch.cpp @@ -1,10 +1,10 @@ -#include "dusk/batch.hpp" +#include "helpers/batch.hpp" #include "dusk/logging.h" #include #include -namespace dusk::batch { +namespace batch { void decode_leaf_template(const u8* dl, u32 size, LeafTemplate& out) { out.vtxCount = 0; @@ -69,4 +69,4 @@ void decode_leaf_template(const u8* dl, u32 size, LeafTemplate& out) { } } -} // namespace dusk::batch +} // namespace batch diff --git a/src/dusk/endian.cpp b/src/helpers/endian.cpp similarity index 94% rename from src/dusk/endian.cpp rename to src/helpers/endian.cpp index 777ed8ae69..a4de822f07 100644 --- a/src/dusk/endian.cpp +++ b/src/helpers/endian.cpp @@ -1,7 +1,7 @@ -#include "dusk/endian.h" +#include "helpers/endian.h" #include #include "SSystem/SComponent/c_xyz.h" -#include "dusk/endian_gx.hpp" +#include "helpers/endian_gx.hpp" #define IMPL_ENUM(type) \ template <> \ diff --git a/src/dusk/offset_ptr.cpp b/src/helpers/offset_ptr.cpp similarity index 92% rename from src/dusk/offset_ptr.cpp rename to src/helpers/offset_ptr.cpp index f26fae3db5..59ca70a4de 100644 --- a/src/dusk/offset_ptr.cpp +++ b/src/helpers/offset_ptr.cpp @@ -1,8 +1,7 @@ -#include "dusk/offset_ptr.h" +#include "helpers/offset_ptr.h" #include "JSystem/JUtility/JUTAssert.h" -#if TARGET_PC bool OffsetPtr::isRelocated() { return value & 0x8000'0000; } @@ -25,4 +24,3 @@ bool OffsetPtr::setBase(void* base) { value = newDiff | 0x8000'0000; return true; } -#endif diff --git a/src/dusk/string.cpp b/src/helpers/string.cpp similarity index 96% rename from src/dusk/string.cpp rename to src/helpers/string.cpp index 7666f9d9ae..23fdbfb8db 100644 --- a/src/dusk/string.cpp +++ b/src/helpers/string.cpp @@ -1,4 +1,4 @@ -#include "dusk/string.hpp" +#include "helpers/string.hpp" #include "fmt/format.h" namespace { @@ -14,8 +14,6 @@ void strncpyProxy(char* dst, const char* src, size_t count) { } } // namespace -namespace dusk { - void TextSpan::CrashSpawnEmpty() { CRASH("Span is empty!"); } @@ -81,5 +79,3 @@ int SafeStringVPrintf(char* buffer, size_t bufSize, const char* src, std::va_lis return vsnprintf(buffer, bufSize, src, args); } - -} // namespace dusk \ No newline at end of file diff --git a/src/m_Do/m_Do_audio.cpp b/src/m_Do/m_Do_audio.cpp index b0427f065e..fec93cbed4 100644 --- a/src/m_Do/m_Do_audio.cpp +++ b/src/m_Do/m_Do_audio.cpp @@ -14,6 +14,10 @@ #include "m_Do/m_Do_dvd_thread.h" #include "tracy/Tracy.hpp" +#if TARGET_PC +#include "dusk/settings.h" +#endif + #if PLATFORM_WII || PLATFORM_SHIELD #include "Z2AudioCS/Z2AudioCS.h" #include @@ -25,6 +29,18 @@ DUSK_GAME_DATA u8 mDoAud_zelAudio_c::mResetFlag; DUSK_GAME_DATA u8 mDoAud_zelAudio_c::mBgmSet; +#if TARGET_PC +void mDoAud_seStartMenu(u32 i_sfxID) { + if (!mDoAud_zelAudio_c::isInitFlag()) { + return; + } + if (!dusk::getSettings().audio.menuSounds.getValue()) { + return; + } + mDoAud_seStart(i_sfxID, nullptr, 0, 0); +} +#endif + void mDoAud_zelAudio_c::reset() { mBgmSet = false; } diff --git a/src/m_Do/m_Do_controller_pad.cpp b/src/m_Do/m_Do_controller_pad.cpp index fc1ebf7b8c..9751bf4f27 100644 --- a/src/m_Do/m_Do_controller_pad.cpp +++ b/src/m_Do/m_Do_controller_pad.cpp @@ -14,6 +14,7 @@ #if TARGET_PC #include "dusk/menu_pointer.h" +#include "dusk/settings.h" #include "dusk/ui/touch_controls.hpp" #endif @@ -22,6 +23,22 @@ DUSK_GAME_DATA JUTGamePad* mDoCPd_c::m_gamePad[4]; DUSK_GAME_DATA interface_of_controller_pad mDoCPd_c::m_cpadInfo[4]; DUSK_GAME_DATA interface_of_controller_pad mDoCPd_c::m_debugCpadInfo[4]; +#if TARGET_PC +s16 mDoCPd_c::getStickAngle3D(u32 pad) { + if (dusk::getSettings().game.enableMirrorMode) { + return -getCpadInfo(pad).mMainStickAngle; + } + return getCpadInfo(pad).mMainStickAngle; +} + +f32 mDoCPd_c::getSubStickX3D(u32 pad) { + if (dusk::getSettings().game.enableMirrorMode) { + return -getCpadInfo(pad).mCStickPosX; + } + return getCpadInfo(pad).mCStickPosX; +} +#endif + void mDoCPd_c::create() { #if PLATFORM_GCN || PLATFORM_SHIELD m_gamePad[0] = JKR_NEW JUTGamePad(JUTGamePad::EPort1); diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index 1a4bc19098..0d0f9014dc 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -51,10 +51,10 @@ #include "aurora/lib/window.hpp" #include "d/actor/d_a_horse.h" #include "dusk/dusk.h" -#include "dusk/endian.h" +#include "helpers/endian.h" #include "dusk/frame_interpolation.h" #include "dusk/gfx.hpp" -#include "dusk/gx_helper.h" +#include "helpers/gx_helper.h" #include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/logging.h" #include "dusk/settings.h" diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 70a32e5afc..d291043d67 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -64,6 +64,7 @@ #include "dusk/mod_loader.hpp" #include "dusk/logging.h" #include "dusk/main.h" +#include "dusk/os.h" #include "dusk/ui/menu_bar.hpp" #include "dusk/ui/overlay.hpp" #include "dusk/ui/prelaunch.hpp" @@ -121,22 +122,6 @@ const int audioHeapSize = 0x14D800; // ========================================================================= #define COPYDATE_PATH "/str/Final/Release/COPYDATE" -#if TARGET_PC -DUSK_GAME_DATA bool dusk::IsRunning = true; -DUSK_GAME_DATA bool dusk::IsShuttingDown = false; -DUSK_GAME_DATA bool dusk::IsGameLaunched = false; -DUSK_GAME_DATA bool dusk::RestartRequested = false; -DUSK_GAME_DATA uint8_t dusk::SaveRequested = 0; -DUSK_GAME_DATA dusk::StageRequest dusk::StageRequested = {"",false}; -DUSK_GAME_DATA std::filesystem::path dusk::ConfigPath; -DUSK_GAME_DATA std::filesystem::path dusk::CachePath; -#endif - -void dusk::RequestRestart() noexcept { - RestartRequested = SupportsProcessRestart; - IsRunning = false; -} - s32 LOAD_COPYDATE(void*) { char buffer[32]; memset(buffer, 0, sizeof(buffer)); @@ -164,9 +149,7 @@ s32 LOAD_COPYDATE(void*) { return 1; } -DUSK_GAME_DATA AuroraInfo auroraInfo; -DUSK_GAME_DATA AuroraStats dusk::lastFrameAuroraStats; -DUSK_GAME_DATA float dusk::frameUsagePct = 0.0f; +AuroraInfo auroraInfo; bool launchUILoop() { while (dusk::IsRunning && !dusk::IsGameLaunched) { @@ -910,7 +893,10 @@ int game_main(int argc, char* argv[]) { main01(); - dusk::MoviePlayerShutdown(); + // We need to cleanly shut down the threads to avoid crashes on shutdown. + if (daMP_c::m_myObj) { + daMP_c::m_myObj->daMP_c_Finish(); + } dusk::crash_reporting::shutdown(); dusk::ShutdownFileLogging(); diff --git a/src/m_Do/m_Do_printf.cpp b/src/m_Do/m_Do_printf.cpp index 3cacece77d..70cde36c32 100644 --- a/src/m_Do/m_Do_printf.cpp +++ b/src/m_Do/m_Do_printf.cpp @@ -9,6 +9,7 @@ #include "m_Do/m_Do_ext.h" #if TARGET_PC #include +#include "dusk/os.h" #endif u8 __OSReport_disable; From 30def245f00d37f9956e422a03a2b084e2d253c1 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 20:31:51 -0600 Subject: [PATCH 044/223] Mods: Reject old layout mods & improve errors --- src/dusk/data.cpp | 46 +++++++++ src/dusk/data.hpp | 3 + src/dusk/io.cpp | 20 ++-- src/dusk/mod_loader.hpp | 20 +++- src/dusk/mods/loader/loader.cpp | 164 +++++++++++++++++++------------- src/dusk/mods/svc/host.cpp | 4 +- src/dusk/ui/settings.cpp | 54 +---------- 7 files changed, 179 insertions(+), 132 deletions(-) diff --git a/src/dusk/data.cpp b/src/dusk/data.cpp index 69ee5bebc8..48517b7308 100644 --- a/src/dusk/data.cpp +++ b/src/dusk/data.cpp @@ -1005,4 +1005,50 @@ Paths initialize_data() { }; } +std::filesystem::path user_home_path() { + const char* homePath = SDL_GetUserFolder(SDL_FOLDER_HOME); + if (homePath == nullptr || homePath[0] == '\0') { + return {}; + } + return std::filesystem::path{reinterpret_cast(homePath)}; +} + +std::filesystem::path normalized_display_path(const std::filesystem::path& path) { + std::error_code ec; + auto normalized = std::filesystem::weakly_canonical(path, ec); + if (!ec) { + return normalized; + } + + normalized = std::filesystem::absolute(path, ec); + if (!ec) { + return normalized.lexically_normal(); + } + + return path.lexically_normal(); +} + +std::string abbreviated_path_string(const std::filesystem::path& path) { + const auto homePath = user_home_path(); + if (path.empty() || homePath.empty()) { + return io::fs_path_to_string(path); + } + + const auto normalizedPath = normalized_display_path(path); + const auto normalizedHome = normalized_display_path(homePath); + if (normalizedPath == normalizedHome) { + return "~"; + } + + const auto relativePath = normalizedPath.lexically_relative(normalizedHome); + if (!relativePath.empty() && !relativePath.is_absolute()) { + const auto it = relativePath.begin(); + if (it == relativePath.end() || *it != "..") { + return io::fs_path_to_string(std::filesystem::path{"~"} / relativePath); + } + } + + return io::fs_path_to_string(path); +} + } // namespace dusk::data diff --git a/src/dusk/data.hpp b/src/dusk/data.hpp index 7e7861dbf0..a2f9313852 100644 --- a/src/dusk/data.hpp +++ b/src/dusk/data.hpp @@ -39,5 +39,8 @@ bool set_portable_data_path(); bool reset_data_path(); bool is_default_data_path(); bool is_data_path_restart_pending(); +std::filesystem::path user_home_path(); +std::filesystem::path normalized_display_path(const std::filesystem::path& path); +std::string abbreviated_path_string(const std::filesystem::path& path); } // namespace dusk::data diff --git a/src/dusk/io.cpp b/src/dusk/io.cpp index 88bd04ae8f..7638194d35 100644 --- a/src/dusk/io.cpp +++ b/src/dusk/io.cpp @@ -5,8 +5,6 @@ #include "dusk/io.hpp" -using namespace dusk::io; - #if _WIN32 #define MODE_TYPE wchar_t #define MODE(val) L##val @@ -23,7 +21,10 @@ using namespace dusk::io; #define _SH_DENYWR 0 #endif -static FILE* ThrowIfNotOpen(const FileStream& file) { +namespace dusk::io { +namespace { + +FILE* ThrowIfNotOpen(const FileStream& file) { if (!file.GetFileHandle()) { throw std::runtime_error("Invalid file handle!"); } @@ -31,14 +32,14 @@ static FILE* ThrowIfNotOpen(const FileStream& file) { return static_cast(file.GetFileHandle()); } -[[noreturn]] static void ThrowForError(int code) { +[[noreturn]] void ThrowForError(int code) { if (code == 0) { throw std::system_error(std::make_error_code(std::errc::io_error)); } throw std::system_error(std::make_error_code(static_cast(code))); } -static FILE* OpenCore(const std::filesystem::path& path, const MODE_TYPE* mode, int shareFlag) { +FILE* OpenCore(const std::filesystem::path& path, const MODE_TYPE* mode, int shareFlag) { FILE* file; int err; @@ -59,12 +60,13 @@ static FILE* OpenCore(const std::filesystem::path& path, const MODE_TYPE* mode, return file; } -static FILE* OpenCore(const char* path, const MODE_TYPE* mode, int shareFlag) { +FILE* OpenCore(const char* path, const MODE_TYPE* mode, int shareFlag) { return OpenCore(reinterpret_cast(path), mode, shareFlag); } -FileStream::FileStream() noexcept : file(nullptr) { -} +} // namespace + +FileStream::FileStream() noexcept : file(nullptr) {} FileStream::FileStream(FILE* file) : file(file) { if (!file) { @@ -184,3 +186,5 @@ FILE* FileStream::ToInner() { file = nullptr; return handle; } + +} // namespace dusk::io diff --git a/src/dusk/mod_loader.hpp b/src/dusk/mod_loader.hpp index 74e01a0fdd..34e17274bc 100644 --- a/src/dusk/mod_loader.hpp +++ b/src/dusk/mod_loader.hpp @@ -139,6 +139,11 @@ enum class NativeModStatus : u8 { */ InvalidMetadata, + /** + * Mod bundle contains files in an invalid location. + */ + InvalidBundle, + /** * Unknown error loading the native mod. */ @@ -147,8 +152,10 @@ enum class NativeModStatus : u8 { struct LoadedMod { ModMetadata metadata; - std::string modPath; - std::string dir; + std::filesystem::path modPath; + std::filesystem::path dir; + // Stable UTF-8 storage for HostService::mod_dir. + std::string dirUtf8; uint32_t searchDirIndex = 0; // Native lib is dlopen'd in place and stays resident for the session. Reload is unsupported. @@ -175,9 +182,11 @@ struct LoadedMod { // asset-only reloads, so it doubles as a generation for anything caching per-mod content. uint32_t cacheGeneration = 0; // Currently extracted native library, empty if none. - std::string nativePath; + std::filesystem::path nativePath; // Read-only directory containing the current platform's main module and runtime libraries. - std::string nativeDir; + std::filesystem::path nativeDir; + // Stable UTF-8 storage for HostService::native_dir. + std::string nativeDirUtf8; NativeModStatus nativeStatus = NativeModStatus::None; std::unique_ptr native; @@ -227,7 +236,7 @@ private: // the next tick, by which point every per-frame entry into the mod should have returned. struct RetiredNative { std::unique_ptr native; - std::string directory; + std::filesystem::path directory; }; std::vector> m_mods; @@ -242,6 +251,7 @@ private: void try_load_mod(const std::filesystem::path& modPath, bool fromDir, uint32_t searchDirIndex); void load_native(LoadedMod& mod, const std::string& dllEntry, const std::vector& runtimeEntries); + bool load_native_if_present(LoadedMod& mod); // Resolved / if it exists on disk, empty otherwise. [[nodiscard]] std::filesystem::path external_native_lib_path(const LoadedMod& mod) const; void unload_native(LoadedMod& mod); diff --git a/src/dusk/mods/loader/loader.cpp b/src/dusk/mods/loader/loader.cpp index adf465e367..353a2ab596 100644 --- a/src/dusk/mods/loader/loader.cpp +++ b/src/dusk/mods/loader/loader.cpp @@ -10,10 +10,12 @@ #include #include #include +#include #include "../manifest.hpp" #include "depgraph.hpp" #include "dusk/config.hpp" +#include "dusk/data.hpp" #include "dusk/io.hpp" #include "dusk/mods/log_buffer.hpp" #include "dusk/mods/svc/config.hpp" @@ -109,17 +111,49 @@ std::unique_ptr load_bundle(const std::filesystem::path& modPath, boo } } -struct NativeLocateResult { +struct NativeRuntimeLocation { std::string entry; std::vector runtimeEntries; bool anyLibs = false; }; +struct NativeLocateFailure { + NativeModStatus status; + std::string logMessage; +}; + +using NativeLocateResult = std::variant; + +bool has_native_library_extension(std::string_view name) { + const auto endsWith = [name](std::string_view extension) { + if (name.size() < extension.size()) { + return false; + } + const auto suffix = name.substr(name.size() - extension.size()); + return std::ranges::equal(suffix, extension, [](char lhs, char rhs) { + const auto lower = [](char value) { + return value >= 'A' && value <= 'Z' ? static_cast(value + ('a' - 'A')) : + value; + }; + return lower(lhs) == lower(rhs); + }); + }; + return endsWith(".dll"sv) || endsWith(".so"sv) || endsWith(".dylib"sv); +} + NativeLocateResult locate_native_runtime(ModBundle& bundle) { - NativeLocateResult result; + NativeRuntimeLocation result; const std::string platformPrefix = fmt::format("{}{}/", k_nativeLibDir, k_nativePlatform); const std::string nativeEntry = platformPrefix + std::string{k_nativeLibName}; for (const auto& name : bundle.getFileNames()) { + if (name.find('/') == std::string::npos && has_native_library_extension(name)) { + return NativeLocateFailure{ + NativeModStatus::InvalidBundle, + fmt::format( + "native library '{}' found at the root (natives go in /lib/{{platform}})", + name), + }; + } if (!name.starts_with(k_nativeLibDir)) { continue; } @@ -415,15 +449,6 @@ static bool parse_meta(NativeMod& native, LoadedMod& mod) { return true; } -static bool validate_context_symbol(ModContext** contextSymbol, LoadedMod& mod) { - if (contextSymbol == nullptr) { - log::write(mod.metadata.id, LOG_LEVEL_ERROR, "missing required mod_ctx export"); - mod.nativeStatus = NativeModStatus::MissingExport; - return false; - } - return true; -} - static std::string lifecycle_error_message( const char* fnName, const ModResult result, const ModError& error) { if (error.message[0] != '\0') { @@ -445,6 +470,8 @@ static std::string native_status_message(const NativeModStatus status) { return "Missing required mod API exports"; case NativeModStatus::InvalidMetadata: return "Invalid mod metadata records"; + case NativeModStatus::InvalidBundle: + return "Invalid mod bundle layout (old mod?)"; case NativeModStatus::Unknown: return "Unknown mod load failure"; case NativeModStatus::None: @@ -488,17 +515,18 @@ void ModLoader::load_native( fs::create_directories(scratchDir, ec); if (ec) { log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to create mod directory {}: {}", - io::fs_path_to_string(scratchDir), ec.message()); + data::abbreviated_path_string(scratchDir), ec.message()); return; } - mod.dir = io::fs_path_to_string(fs::absolute(scratchDir)); + mod.dir = fs::absolute(scratchDir); + mod.dirUtf8 = io::fs_path_to_string(mod.dir); fs::path libPath; fs::path runtimeDir; DirectoryRollback runtimeDirRollback; if (mod.inPlace) { if (!dllEntry.empty()) { - libPath = fs::path(mod.modPath) / dllEntry; + libPath = mod.modPath / dllEntry; } else if (auto external = external_native_lib_path(mod); !external.empty()) { libPath = std::move(external); } else { @@ -525,7 +553,7 @@ void ModLoader::load_native( if (ec) { log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to create native runtime directory {}: {}", - io::fs_path_to_string(runtimeDir), ec.message()); + data::abbreviated_path_string(runtimeDir), ec.message()); return; } @@ -580,7 +608,7 @@ void ModLoader::load_native( nativeMod->handle = std::make_unique(libPath); } catch (const std::runtime_error& e) { log::write(mod.metadata.id, LOG_LEVEL_ERROR, "failed to open {}: {}", - io::fs_path_to_string(libPath), e.what()); + data::abbreviated_path_string(libPath), e.what()); return; } @@ -595,7 +623,7 @@ void ModLoader::load_native( { log::write(mod.metadata.id, LOG_LEVEL_ERROR, "{} missing required mod API exports; skipping", - io::fs_path_to_string(libPath.filename())); + data::abbreviated_path_string(libPath)); mod.nativeStatus = NativeModStatus::MissingExport; return; } @@ -604,18 +632,45 @@ void ModLoader::load_native( return; } - if (!validate_context_symbol(nativeMod->contextSymbol, mod)) { + if (nativeMod->contextSymbol == nullptr) { + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "missing required mod_ctx export"); + mod.nativeStatus = NativeModStatus::MissingExport; return; } *nativeMod->contextSymbol = mod.context.get(); - mod.nativePath = io::fs_path_to_string(fs::absolute(libPath)); - mod.nativeDir = io::fs_path_to_string(fs::absolute(runtimeDir)); + mod.nativePath = fs::absolute(libPath); + mod.nativeDir = fs::absolute(runtimeDir); + mod.nativeDirUtf8 = io::fs_path_to_string(mod.nativeDir); mod.native = std::move(nativeMod); mod.nativeStatus = NativeModStatus::Loaded; runtimeDirRollback.release(); } +bool ModLoader::load_native_if_present(LoadedMod& mod) { + const auto result = locate_native_runtime(*mod.bundle); + if (const auto* failure = std::get_if(&result)) { + mod.nativeStatus = failure->status; + log::write(mod.metadata.id, LOG_LEVEL_ERROR, "{}", failure->logMessage); + fail_mod(mod, MOD_ERROR, native_status_message(failure->status)); + return false; + } + + const auto& native = std::get(result); + if (!native.anyLibs && !(mod.inPlace && !external_native_lib_path(mod).empty())) { + mod.nativeStatus = NativeModStatus::None; + return true; + } + + mod.nativeStatus = NativeModStatus::Unknown; + load_native(mod, native.entry, native.runtimeEntries); + if (mod.nativeStatus != NativeModStatus::Loaded) { + fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); + return false; + } + return true; +} + void ModLoader::unload_native(LoadedMod& mod) { if (!mod.native || mod.inPlace) { return; @@ -624,6 +679,7 @@ void ModLoader::unload_native(LoadedMod& mod) { m_retiredNatives.push_back({std::move(mod.native), std::move(mod.nativeDir)}); mod.nativePath.clear(); mod.nativeDir.clear(); + mod.nativeDirUtf8.clear(); } void ModLoader::drain_retired_natives() { @@ -714,8 +770,7 @@ void ModLoader::try_load_mod( try { bundle = load_bundle(modPath, fromDir); } catch (const std::exception& e) { - Log.error( - "Failed to open {} bundle: {}", io::fs_path_to_string(modPath.filename()), e.what()); + Log.error("Failed to open {} bundle: {}", data::abbreviated_path_string(modPath), e.what()); return; } @@ -723,26 +778,26 @@ void ModLoader::try_load_mod( try { metadata = load_metadata(modPath, *bundle); } catch (const std::exception& e) { - Log.error("bad mod.json in {}: {}", io::fs_path_to_string(modPath.filename()), e.what()); + Log.error("bad mod.json in {}: {}", data::abbreviated_path_string(modPath), e.what()); return; } if (const auto* existing = find_mod(metadata.id)) { if (existing->searchDirIndex < searchDirIndex) { - log::write(metadata.id, LOG_LEVEL_INFO, "{} shadowed by higher-priority copy {}", - io::fs_path_to_string(modPath.filename()), existing->modPath); + log::write(metadata.id, LOG_LEVEL_INFO, "{} shadowed by higher-priority duplicate {}", + data::abbreviated_path_string(modPath), + data::abbreviated_path_string(existing->modPath)); } else { log::write(metadata.id, LOG_LEVEL_ERROR, "duplicate mod id, not loading {}", - io::fs_path_to_string(modPath.filename())); + data::abbreviated_path_string(modPath)); } return; } const auto& inserted = m_mods.emplace_back(std::make_unique()); - auto& mod = *inserted; mod.active = true; - mod.modPath = io::fs_path_to_string(fs::absolute(modPath)); + mod.modPath = fs::absolute(modPath); mod.searchDirIndex = searchDirIndex; mod.inPlace = m_searchDirs[searchDirIndex].inPlaceNative && fromDir; mod.metadata = std::move(metadata); @@ -751,21 +806,12 @@ void ModLoader::try_load_mod( mod.context->mod = &mod; mod.cvarIsEnabled = std::make_unique>(mod_enabled_cvar_name(mod.metadata.id), true); - - const auto [dllEntry, runtimeEntries, anyLibs] = locate_native_runtime(*mod.bundle); - if (anyLibs || (mod.inPlace && !external_native_lib_path(mod).empty())) { - mod.nativeStatus = NativeModStatus::Unknown; - load_native(mod, dllEntry, runtimeEntries); - if (mod.nativeStatus != NativeModStatus::Loaded) { - Log.error("Native mod '{}' failed to load, disabling", mod.metadata.id); - fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); - } else { - mod.manifestInfo = build_manifest_info(mod.native->parsed); - } + if (load_native_if_present(mod) && mod.native) { + mod.manifestInfo = build_manifest_info(mod.native->parsed); } log::write(mod.metadata.id, LOG_LEVEL_INFO, "found '{}' v{} by {} ({})", mod.metadata.name, - mod.metadata.version, mod.metadata.author, io::fs_path_to_string(modPath.filename())); + mod.metadata.version, mod.metadata.author, data::abbreviated_path_string(modPath)); } bool ModLoader::activate_mod(LoadedMod& mod) { @@ -890,9 +936,11 @@ void ModLoader::init() { if (!fs::is_directory(searchDir.path)) { if (dirIndex == 0) { - Log.info("mods directory '{}' not found", io::fs_path_to_string(searchDir.path)); + Log.info( + "mods directory '{}' not found", data::abbreviated_path_string(searchDir.path)); } else { - Log.debug("mods directory '{}' not found", io::fs_path_to_string(searchDir.path)); + Log.debug( + "mods directory '{}' not found", data::abbreviated_path_string(searchDir.path)); } continue; } @@ -1080,25 +1128,13 @@ bool ModLoader::ensure_native_loaded(LoadedMod& mod) { if (mod.native || mod.nativeStatus == NativeModStatus::None) { return true; } - - const auto [dllEntry, runtimeEntries, anyLibs] = locate_native_runtime(*mod.bundle); - if (!anyLibs && !(mod.inPlace && !external_native_lib_path(mod).empty())) { - mod.nativeStatus = NativeModStatus::None; - return true; - } - - mod.nativeStatus = NativeModStatus::Unknown; - load_native(mod, dllEntry, runtimeEntries); - if (mod.nativeStatus != NativeModStatus::Loaded) { - fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); - return false; - } - return true; + return load_native_if_present(mod); } bool ModLoader::reload_bundle(LoadedMod& mod) { namespace fs = std::filesystem; - log::write(mod.metadata.id, LOG_LEVEL_INFO, "reloading from {}", mod.modPath); + log::write(mod.metadata.id, LOG_LEVEL_INFO, "reloading from {}", + data::abbreviated_path_string(mod.modPath)); std::shared_ptr newBundle; ModMetadata newMetadata; @@ -1124,18 +1160,12 @@ bool ModLoader::reload_bundle(LoadedMod& mod) { mod.failureReason.clear(); ModManifestInfo newInfo; - if (const auto [dllEntry, runtimeEntries, anyLibs] = locate_native_runtime(*mod.bundle); - anyLibs) - { - mod.nativeStatus = NativeModStatus::Unknown; - load_native(mod, dllEntry, runtimeEntries); - if (mod.nativeStatus != NativeModStatus::Loaded) { - fail_mod(mod, MOD_ERROR, native_status_message(mod.nativeStatus)); - return false; - } + if (!load_native_if_present(mod)) { + return false; + } + if (mod.native) { newInfo = build_manifest_info(mod.native->parsed); } else { - mod.nativeStatus = NativeModStatus::None; ++mod.cacheGeneration; } diff --git a/src/dusk/mods/svc/host.cpp b/src/dusk/mods/svc/host.cpp index f5d409f797..5deccc7c9e 100644 --- a/src/dusk/mods/svc/host.cpp +++ b/src/dusk/mods/svc/host.cpp @@ -60,12 +60,12 @@ const char* host_mod_version(ModContext* context) { const char* host_mod_dir(ModContext* context) { const auto* mod = mod_from_context(context); - return mod != nullptr ? mod->dir.c_str() : ""; + return mod != nullptr ? mod->dirUtf8.c_str() : ""; } const char* host_native_dir(ModContext* context) { const auto* mod = mod_from_context(context); - return mod != nullptr ? mod->nativeDir.c_str() : ""; + return mod != nullptr ? mod->nativeDirUtf8.c_str() : ""; } struct LifecycleWatcher { diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp index e2ee60729a..f6cfe0320f 100644 --- a/src/dusk/ui/settings.cpp +++ b/src/dusk/ui/settings.cpp @@ -219,55 +219,8 @@ AuroraBackend configured_backend() { return configuredBackend; } -std::filesystem::path normalized_display_path(const std::filesystem::path& path) { - std::error_code ec; - auto normalized = std::filesystem::weakly_canonical(path, ec); - if (!ec) { - return normalized; - } - - normalized = std::filesystem::absolute(path, ec); - if (!ec) { - return normalized.lexically_normal(); - } - - return path.lexically_normal(); -} - -std::filesystem::path user_home_path() { - const char* homePath = SDL_GetUserFolder(SDL_FOLDER_HOME); - if (homePath == nullptr || homePath[0] == '\0') { - return {}; - } - return std::filesystem::path{reinterpret_cast(homePath)}; -} - -Rml::String abbreviated_data_path_string() { - const auto path = data::configured_data_path(); - const auto homePath = user_home_path(); - if (path.empty() || homePath.empty()) { - return io::fs_path_to_string(path); - } - - const auto normalizedPath = normalized_display_path(path); - const auto normalizedHome = normalized_display_path(homePath); - if (normalizedPath == normalizedHome) { - return "~"; - } - - const auto relativePath = normalizedPath.lexically_relative(normalizedHome); - if (!relativePath.empty() && !relativePath.is_absolute()) { - const auto it = relativePath.begin(); - if (it == relativePath.end() || *it != "..") { - return io::fs_path_to_string(std::filesystem::path{"~"} / relativePath); - } - } - - return io::fs_path_to_string(path); -} - Rml::String configured_data_path_display_name() { - const auto path = abbreviated_data_path_string(); + const auto path = data::abbreviated_path_string(data::configured_data_path()); if (path.empty()) { return "(none)"; } @@ -284,8 +237,9 @@ public: explicit DataFolderPathText(Rml::Element* parent) : Component(append(parent, "div")) {} void update() override { - const Rml::String rml = "Current data folder:
" + - escape(abbreviated_data_path_string()) + "
"; + const Rml::String rml = + "Current data folder:
" + + escape(data::abbreviated_path_string(data::configured_data_path())) + "
"; if (rml != mCurrentRml) { mRoot->SetInnerRML(rml); mCurrentRml = rml; From a2fd82d18b71a0679c9d844be5cf9fe69ac0be18 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 14 Jul 2026 22:52:13 -0600 Subject: [PATCH 045/223] Android: Copy libc++_shared.so in stage-jni-libs.sh --- platforms/android/scripts/stage-jni-libs.sh | 23 +++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/platforms/android/scripts/stage-jni-libs.sh b/platforms/android/scripts/stage-jni-libs.sh index a30d961156..3984cf03ee 100755 --- a/platforms/android/scripts/stage-jni-libs.sh +++ b/platforms/android/scripts/stage-jni-libs.sh @@ -61,14 +61,33 @@ rm -rf "$APP_DIR/x86" "$APP_DIR/arm64-v8a" "$APP_DIR/x86_64" for abi in $ANDROID_STAGE_ABIS; do case "$abi" in - arm64-v8a) src="$ROOT_DIR/build/android-arm64/libmain.so" ;; - x86_64) src="$ROOT_DIR/build/android-x86_64/libmain.so" ;; + arm64-v8a) + src="$ROOT_DIR/build/android-arm64/libmain.so" + triple="aarch64-linux-android" + ;; + x86_64) + src="$ROOT_DIR/build/android-x86_64/libmain.so" + triple="x86_64-linux-android" + ;; *) echo "Unsupported ABI '$abi'. Supported ABIs: arm64-v8a x86_64" >&2 exit 1 ;; esac copy_lib "$abi" "$src" + if [[ -n "$STRIP_TOOL" ]]; then + stl="$(dirname "$STRIP_TOOL")/../sysroot/usr/lib/$triple/libc++_shared.so" + if [[ -f "$stl" ]]; then + cp -f "$stl" "$APP_DIR/$abi/libc++_shared.so" + echo "Staged $stl -> $APP_DIR/$abi/libc++_shared.so" + else + echo "Missing libc++_shared.so for $abi at $stl" >&2 + exit 1 + fi + else + echo "Cannot stage libc++_shared.so for $abi (NDK not found)" >&2 + exit 1 + fi done # Stage bundled mod packages into the app's assets source dir. From adfb830b4da15b368806fbc9d5d65a55bc85c714 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 00:08:19 -0600 Subject: [PATCH 046/223] hook: Fix thunk re-resolution on Windows --- src/dusk/mods/svc/hook.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/dusk/mods/svc/hook.cpp b/src/dusk/mods/svc/hook.cpp index b5eb60c216..34d7d54aa7 100644 --- a/src/dusk/mods/svc/hook.cpp +++ b/src/dusk/mods/svc/hook.cpp @@ -118,10 +118,19 @@ void sort_hooks(std::vector& hooks) { }); } +// Once a hook is installed, funchook has patched the target's entry: its bytes lead to the +// detour, not the function, so canonicalization must stop there. +[[maybe_unused]] bool installed_target(void* addr) { + return s_installed.contains(reinterpret_cast(addr)); +} + // Follow E9/FF25 chains to skip MSVC incremental-link and import stubs. void* resolve_import_thunk(void* addr) { #if defined(_WIN32) && (defined(_M_X64) || defined(__x86_64__)) for (int i = 0; i < 8; ++i) { + if (installed_target(addr)) { + break; + } const auto* p = static_cast(addr); if (p[0] == 0x48 && p[1] == 0xFF && p[2] == 0x25) { // lld emits a REX.W prefix ++p; @@ -145,6 +154,9 @@ void* resolve_import_thunk(void* addr) { // incremental-link stubs are a plain `b`, or `adrp x16; add x16, x16, #off; br x16` // range-extension thunks when the target is out of B range. for (int i = 0; i < 8; ++i) { + if (installed_target(addr)) { + break; + } const auto* p = static_cast(addr); uint32_t insn0, insn1, insn2; std::memcpy(&insn0, p, 4); From 0f2a00cd1f559e7d2c719091e8b1ece372e0f918 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 00:26:34 -0600 Subject: [PATCH 047/223] Mods: Embed symdb in linked executable (#2216) * Mods: Embed symdb in linked executable * Update to symgen v1.2.3 --- .github/workflows/build.yml | 1 - CMakeLists.txt | 2 + ci/build-appimage.sh | 3 - cmake/SymbolManifest.cmake | 26 +++---- src/dusk/mods/manifest.cpp | 145 +++++++++++++++++++++--------------- 5 files changed, 101 insertions(+), 76 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f9f666700..4712b36439 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -290,7 +290,6 @@ jobs: path: | build/install/*.exe build/install/*.dll - build/install/*.symdb build/install/res/ build/install/mods/ build/install/debug.7z diff --git a/CMakeLists.txt b/CMakeLists.txt index bf35cb2e45..75a8d01151 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -519,6 +519,8 @@ endif () if (CMAKE_SYSTEM_NAME STREQUAL Linux) target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1") target_link_libraries(dusklight PRIVATE dl) +elseif (ANDROID) + target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1") endif () if (NOT APPLE) diff --git a/ci/build-appimage.sh b/ci/build-appimage.sh index ec7d6b410e..e12f1163b9 100755 --- a/ci/build-appimage.sh +++ b/ci/build-appimage.sh @@ -19,9 +19,6 @@ for install_path in build/install/*; do [[ "$(basename "$install_path")" == *.* ]] && continue cp -r "$install_path" build/appdir/usr/bin done -if [[ -f build/install/dusklight.symdb ]]; then - cp build/install/dusklight.symdb build/appdir/usr/bin -fi cp -r platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} build/appdir/usr/share/icons/hicolor cp platforms/freedesktop/dev.twilitrealm.dusk.desktop build/appdir/usr/share/applications diff --git a/cmake/SymbolManifest.cmake b/cmake/SymbolManifest.cmake index 1cb78b6bb8..657afa2a78 100644 --- a/cmake/SymbolManifest.cmake +++ b/cmake/SymbolManifest.cmake @@ -2,7 +2,7 @@ include_guard(GLOBAL) get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) -set(_SYMGEN_VERSION "1.2.0") +set(_SYMGEN_VERSION "1.2.3") set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}") set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release") mark_as_advanced(SYMGEN_PATH) @@ -108,21 +108,21 @@ function(setup_symbol_manifest target) if (WIN32) set(_input --pdb "$") - set(_out "$/dusklight.symdb") else () set(_input --binary "$") - if (APPLE) - set(_out "$/Resources/dusklight.symdb") - else () - set(_out "$/dusklight.symdb") - endif () endif () - add_custom_command(TARGET ${target} POST_BUILD - COMMAND "${SYMGEN_EXE}" manifest ${_input} --out "${_out}" - COMMENT "Generating symbol manifest" - VERBATIM) - if (NOT APPLE) - install(FILES "${_out}" DESTINATION .) + if (APPLE) + # Room for the load command `symgen manifest --embed` inserts post-link. + target_link_options(${target} PRIVATE "LINKER:-headerpad,0x200") endif () + + # The manifest is embedded into the image as a new section, located at runtime through + # the descriptor manifest.cpp reserves. On Apple platforms this command must stay + # attached before the ad-hoc codesign POST_BUILD command: the patch invalidates any + # existing signature. + add_custom_command(TARGET ${target} POST_BUILD + COMMAND "${SYMGEN_EXE}" manifest ${_input} --embed "$" + COMMENT "Embedding symbol manifest" + VERBATIM) endfunction() diff --git a/src/dusk/mods/manifest.cpp b/src/dusk/mods/manifest.cpp index 7e83dfb8f6..17097a518b 100644 --- a/src/dusk/mods/manifest.cpp +++ b/src/dusk/mods/manifest.cpp @@ -6,18 +6,14 @@ #include #include -#include #include #include #include -#include #include #include "aurora/lib/logging.hpp" -#include "dusk/io.hpp" - #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include @@ -63,6 +59,31 @@ struct Entry { }; static_assert(sizeof(Entry) == 24); +/* + * `symgen manifest --embed` appends the symbol manifest to the linked executable as an added + * section and patches this descriptor with its location. + */ +struct SymdbDescriptor { + volatile uint64_t magic; + volatile uint64_t rva; + volatile uint64_t size; +}; +constexpr uint64_t kDescriptorMagic = 0x52444842444d5953ull; // "SYMDBHDR" +#if defined(_WIN32) +#pragma section(".symdbh", read) +__declspec(allocate(".symdbh")) +#if defined(__clang__) +__attribute__((used)) +#endif +constinit const SymdbDescriptor s_symdbDescriptor{kDescriptorMagic, 0, 0}; +#elif defined(__APPLE__) +__attribute__((section("__DATA,__symdbh"), used)) constinit const SymdbDescriptor + s_symdbDescriptor{kDescriptorMagic, 0, 0}; +#else +__attribute__((section("symdbh"), used)) constinit const SymdbDescriptor s_symdbDescriptor{ + kDescriptorMagic, 0, 0}; +#endif + struct State { std::vector data; const Entry* entries = nullptr; @@ -149,13 +170,28 @@ bool running_image_identity(std::vector& outId, uintptr_t& outBase) { #elif defined(__linux__) struct Ctx { std::vector* id; + uintptr_t probe; uintptr_t base = 0; bool found = false; - } ctx{&outId}; + } ctx{&outId, reinterpret_cast(&s_symdbDescriptor)}; dl_iterate_phdr( [](dl_phdr_info* info, size_t, void* data) -> int { auto* ctx = static_cast(data); - // The first callback is the main executable. + // Select the image containing our descriptor: the game is not always the + // first entry (on Android it is libmain.so, behind the app process). + bool contains = false; + for (int i = 0; i < info->dlpi_phnum; ++i) { + const auto& phdr = info->dlpi_phdr[i]; + if (phdr.p_type == PT_LOAD && ctx->probe >= info->dlpi_addr + phdr.p_vaddr && + ctx->probe - (info->dlpi_addr + phdr.p_vaddr) < phdr.p_memsz) + { + contains = true; + break; + } + } + if (!contains) { + return 0; + } ctx->base = info->dlpi_addr; for (int i = 0; i < info->dlpi_phnum; ++i) { const auto& phdr = info->dlpi_phdr[i]; @@ -178,7 +214,7 @@ bool running_image_identity(std::vector& outId, uintptr_t& outBase) { p = desc + ((note->n_descsz + 3) & ~3u); } } - return 1; // only inspect the main executable + return 1; // matched our image; stop either way }, &ctx); outBase = ctx.base; @@ -190,13 +226,6 @@ bool running_image_identity(std::vector& outId, uintptr_t& outBase) { #endif } -std::filesystem::path manifest_path() { - const char* basePath = SDL_GetBasePath(); - std::filesystem::path dir = - basePath != nullptr ? std::filesystem::path{basePath} : std::filesystem::current_path(); - return dir / "dusklight.symdb"; -} - std::string hex_string(const uint8_t* data, size_t len) { std::string out; out.reserve(len * 2); @@ -216,40 +245,12 @@ void initialize() { } s_state.initialized = true; - const auto path = manifest_path(); - std::error_code ec; - if (!std::filesystem::exists(path, ec)) { - Log.info("no symbol manifest at {}; by-name resolution unavailable", - io::fs_path_to_string(path)); + if (s_symdbDescriptor.magic != kDescriptorMagic) { + Log.error("symbol manifest descriptor is corrupt"); return; } - std::vector data; - try { - data = io::FileStream::ReadAllBytes(path); - } catch (const std::exception& e) { - Log.error("failed to read symbol manifest {}: {}", io::fs_path_to_string(path), e.what()); - return; - } - if (data.size() < sizeof(Header)) { - Log.error( - "symbol manifest {} is truncated ({} bytes)", io::fs_path_to_string(path), data.size()); - return; - } - - Header header{}; - std::memcpy(&header, data.data(), sizeof(header)); - if (std::memcmp(header.magic, kMagic, sizeof(kMagic)) != 0 || header.version != kVersion) { - Log.error("symbol manifest {} has wrong magic/version", io::fs_path_to_string(path)); - return; - } - const auto compression = static_cast(header.compression); - if ((compression != Compression::None && compression != Compression::Zstd) || - header.buildIdLen > sizeof(header.buildId) || - header.compressedLen > data.size() - sizeof(Header) || - header.uncompressedLen > std::numeric_limits::max() || - (compression == Compression::None && header.compressedLen != header.uncompressedLen)) - { - Log.error("symbol manifest {} is malformed", io::fs_path_to_string(path)); + if (s_symdbDescriptor.rva == 0) { + Log.info("no symbol manifest embedded; by-name resolution unavailable"); return; } @@ -259,41 +260,67 @@ void initialize() { Log.error("cannot determine the running image's build id; ignoring symbol manifest"); return; } + + const auto* blob = reinterpret_cast(imageBase + s_symdbDescriptor.rva); + const auto blobLen = static_cast(s_symdbDescriptor.size); + if (blobLen < sizeof(Header)) { + Log.error("embedded symbol manifest is truncated ({} bytes)", blobLen); + return; + } + + Header header{}; + std::memcpy(&header, blob, sizeof(header)); + if (std::memcmp(header.magic, kMagic, sizeof(kMagic)) != 0 || header.version != kVersion) { + Log.error("embedded symbol manifest has wrong magic/version"); + return; + } + const auto compression = static_cast(header.compression); + if ((compression != Compression::None && compression != Compression::Zstd) || + header.buildIdLen > sizeof(header.buildId) || + header.compressedLen > blobLen - sizeof(Header) || + header.uncompressedLen > std::numeric_limits::max() || + (compression == Compression::None && header.compressedLen != header.uncompressedLen)) + { + Log.error("embedded symbol manifest is malformed"); + return; + } + + // The manifest travels inside the image it describes, so a mismatch here means broken + // build tooling rather than a stale file — but it still guards resolved addresses. if (imageId.size() != header.buildIdLen || std::memcmp(imageId.data(), header.buildId, imageId.size()) != 0) { - Log.error("symbol manifest {} is stale: built for {}, running image is {}", - io::fs_path_to_string(path), hex_string(header.buildId, header.buildIdLen), + Log.error("embedded symbol manifest is stale: built for {}, running image is {}", + hex_string(header.buildId, header.buildIdLen), hex_string(imageId.data(), imageId.size())); return; } const auto compressedLen = static_cast(header.compressedLen); const auto uncompressedLen = static_cast(header.uncompressedLen); - std::vector payload; - const auto* storedPayload = data.data() + sizeof(Header); + std::vector data; + const auto* storedPayload = blob + sizeof(Header); if (compression == Compression::None) { - payload.assign(storedPayload, storedPayload + compressedLen); + data.assign(storedPayload, storedPayload + compressedLen); } else { - payload.resize(uncompressedLen); + data.resize(uncompressedLen); const size_t decompressedLen = - ZSTD_decompress(payload.data(), payload.size(), storedPayload, compressedLen); + ZSTD_decompress(data.data(), data.size(), storedPayload, compressedLen); if (ZSTD_isError(decompressedLen)) { - Log.error("failed to decompress symbol manifest {}: {}", io::fs_path_to_string(path), + Log.error("failed to decompress embedded symbol manifest: {}", ZSTD_getErrorName(decompressedLen)); return; } - if (decompressedLen != payload.size()) { - Log.error("symbol manifest {} decompressed to {} bytes, expected {}", - io::fs_path_to_string(path), decompressedLen, payload.size()); + if (decompressedLen != data.size()) { + Log.error("embedded symbol manifest decompressed to {} bytes, expected {}", + decompressedLen, data.size()); return; } } - data = std::move(payload); const uint64_t entriesEnd = uint64_t{header.entryCount} * sizeof(Entry); if (entriesEnd > data.size()) { - Log.error("decompressed symbol manifest {} is malformed", io::fs_path_to_string(path)); + Log.error("decompressed embedded symbol manifest is malformed"); return; } From 5ea7f7ca9a057a028d786f7174c9ba15490808f9 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 12:04:00 -0600 Subject: [PATCH 048/223] Mod SDK: Auto-download link stub for self-contained mods --- cmake/GameABIConfig.cmake | 9 ++++++++ cmake/ModSDK.cmake | 47 +++++++++++++++++++++++++++++++-------- sdk/CMakeLists.txt | 3 ++- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/cmake/GameABIConfig.cmake b/cmake/GameABIConfig.cmake index 8b95dcaf67..0b965aa082 100644 --- a/cmake/GameABIConfig.cmake +++ b/cmake/GameABIConfig.cmake @@ -47,6 +47,15 @@ target_link_libraries(dusklight_mod_feature_game INTERFACE dusklight_mod_api dusklight_game_abi_headers) target_compile_definitions(dusklight_mod_feature_game INTERFACE DUSK_MOD_FEATURE_GAME=1) +# Game headers assume global.h comes first in the translation unit (it defines DUSK_GAME_DATA +# and friends); force-include it so mods don't depend on include order. +if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") + target_compile_options(dusklight_mod_feature_game INTERFACE + "$<$:/FIglobal.h>") +else () + target_compile_options(dusklight_mod_feature_game INTERFACE + "$<$:SHELL:-include global.h>") +endif () target_sources(dusklight_mod_feature_game INTERFACE ${_game_root}/sdk/src/game_feature.cpp) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 87125e12fd..0371a7d61b 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -2,6 +2,8 @@ # [RUNTIME_LIBRARIES ...] [RES_DIR ] [OVERLAY_DIR ] # [TEXTURES_DIR ] [OUTPUT_DIR ] [BUNDLE]) set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into") +set(DUSKLIGHT_SDK_STUB_URL "https://github.com/encounter/dusklight/releases/download/sdk" + CACHE STRING "Base URL for game link stubs downloaded by out-of-tree mod builds") function(_mod_lib_info out_platform_var out_name_var) set(_arch "${CMAKE_SYSTEM_PROCESSOR}") @@ -29,6 +31,34 @@ function(_mod_lib_info out_platform_var out_name_var) set(${out_name_var} "mod${_ext}" PARENT_SCOPE) endfunction() +# For out-of-tree builds without a game binary: download the version-independent link stub +# (generated by symgen) for the target platform. +function(_mod_download_link_stub out_var) + _mod_lib_info(_platform _lib_name) + if (WIN32) + set(_asset "${_platform}.lib") + elseif (ANDROID) + set(_asset "stub-${_platform}.so") + else () + set(_asset "stub-${_platform}") + endif () + set(_stub "${CMAKE_BINARY_DIR}/dusklight-sdk-stubs/${_asset}") + if (NOT EXISTS "${_stub}") + message(STATUS "Mod SDK: downloading link stub ${_asset}") + file(DOWNLOAD "${DUSKLIGHT_SDK_STUB_URL}/${_asset}" "${_stub}.tmp" STATUS _status) + list(GET _status 0 _code) + if (NOT _code EQUAL 0) + list(GET _status 1 _error) + file(REMOVE "${_stub}.tmp") + message(FATAL_ERROR + "Mod SDK: failed to download ${DUSKLIGHT_SDK_STUB_URL}/${_asset}: ${_error}\n" + "Set DUSK_GAME_EXE to a game binary or link stub to skip the download.") + endif () + file(RENAME "${_stub}.tmp" "${_stub}") + endif () + set(${out_var} "${_stub}" PARENT_SCOPE) +endfunction() + function(_mod_resolve_source_path out_var path) if (IS_ABSOLUTE "${path}") set(_path "${path}") @@ -150,8 +180,7 @@ function(add_mod target_name) elseif (DUSK_GAME_EXE) _mod_resolve_source_path(_game_exe "${DUSK_GAME_EXE}") else () - message(FATAL_ERROR - "add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (game executable)") + _mod_download_link_stub(_game_exe) endif () target_link_options(${target_name} PRIVATE -Xlinker -bundle_loader -Xlinker "${_game_exe}") @@ -164,12 +193,13 @@ function(add_mod target_name) if (_needs_host_link) if (TARGET dusklight) target_link_libraries(${target_name} PRIVATE dusklight) - elseif (DUSK_GAME_EXE) - _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") - target_link_libraries(${target_name} PRIVATE "${_game_lib}") else () - message(FATAL_ERROR - "add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (libmain.so or stub)") + if (DUSK_GAME_EXE) + _mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}") + else () + _mod_download_link_stub(_game_lib) + endif () + target_link_libraries(${target_name} PRIVATE "${_game_lib}") endif () endif () set_target_properties(${target_name} PROPERTIES @@ -202,8 +232,7 @@ function(add_mod target_name) "(sdk/windows-.lib)") endif () else () - message(FATAL_ERROR - "add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (import library)") + _mod_download_link_stub(_game_lib) endif () target_link_libraries(${target_name} PRIVATE "${_game_lib}") endif () diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt index 2f25c28efe..cd80781eb6 100644 --- a/sdk/CMakeLists.txt +++ b/sdk/CMakeLists.txt @@ -7,7 +7,8 @@ # add_subdirectory(/sdk dusk-sdk EXCLUDE_FROM_ALL) # add_mod(my_mod FEATURES game webgpu SOURCES ... MOD_JSON mod.json) # -# TODO: auto-download link targets from tag +# On platforms where mods link against the game binary (Windows/Apple/Android), a +# version-independent link stub is downloaded automatically unless DUSK_GAME_EXE is set. cmake_minimum_required(VERSION 3.25) From 5db55c508be6e48c218515bcb23d1c0572ba48c1 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 12:04:26 -0600 Subject: [PATCH 049/223] Mod API: Rename dusk::mods -> mods --- mods/ao_mod/src/mod.cpp | 20 +++++++++--------- mods/shadow_mod/src/mod.cpp | 36 ++++++++++++++++----------------- sdk/include/mods/hook.hpp | 19 +++++++++-------- sdk/include/mods/meta.hpp | 10 ++++----- sdk/include/mods/service.hpp | 27 ++++++++++++------------- sdk/include/mods/svc/camera.h | 2 +- sdk/include/mods/svc/config.h | 2 +- sdk/include/mods/svc/game.h | 2 +- sdk/include/mods/svc/gfx.h | 2 +- sdk/include/mods/svc/hook.h | 4 ++-- sdk/include/mods/svc/host.h | 2 +- sdk/include/mods/svc/log.h | 2 +- sdk/include/mods/svc/overlay.h | 2 +- sdk/include/mods/svc/resource.h | 2 +- sdk/include/mods/svc/texture.h | 2 +- sdk/include/mods/svc/ui.h | 2 +- 16 files changed, 66 insertions(+), 70 deletions(-) diff --git a/mods/ao_mod/src/mod.cpp b/mods/ao_mod/src/mod.cpp index a7eb4f4028..fb36ddb40c 100644 --- a/mods/ao_mod/src/mod.cpp +++ b/mods/ao_mod/src/mod.cpp @@ -752,7 +752,7 @@ ModResult register_bool_option( cvarDesc.type = CONFIG_VAR_BOOL; cvarDesc.default_bool = defaultValue; if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register AO option"); + return mods::set_error(error, MOD_ERROR, "failed to register AO option"); } return MOD_OK; } @@ -764,7 +764,7 @@ ModResult register_int_option( cvarDesc.type = CONFIG_VAR_INT; cvarDesc.default_int = defaultValue; if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register AO option"); + return mods::set_error(error, MOD_ERROR, "failed to register AO option"); } return MOD_OK; } @@ -785,7 +785,7 @@ MOD_EXPORT ModResult mod_initialize(ModError* error) { result = svc_resource->load(mod_ctx, "composite.wgsl", &g_compositeSource); } if (result != MOD_OK) { - return dusk::mods::set_error(error, result, "failed to load AO shaders"); + return mods::set_error(error, result, "failed to load AO shaders"); } result = register_bool_option("effectEnabled", false, g_cvarEnabled, error); @@ -814,7 +814,7 @@ MOD_EXPORT ModResult mod_initialize(ModError* error) { } if (svc_gfx->get_device_info(mod_ctx, &g_deviceInfo) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to query device info"); + return mods::set_error(error, MOD_ERROR, "failed to query device info"); } if (!build_compute_pipeline("AO preprocess depth", g_preprocessSource, "preprocess_depth", g_preprocessPipeline, g_preprocessLayout) || @@ -824,35 +824,35 @@ MOD_EXPORT ModResult mod_initialize(ModError* error) { !build_compute_pipeline( "AO denoise", g_denoiseSource, "spatial_denoise", g_denoisePipeline, g_denoiseLayout)) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to create AO compute pipelines"); + return mods::set_error(error, MOD_ERROR, "failed to create AO compute pipelines"); } if (!build_composite_pipeline(true, g_compositePipeline, g_compositeLayout) || !build_composite_pipeline(false, g_compositeDebugPipeline, g_compositeDebugLayout)) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to create AO composite pipeline"); + return mods::set_error(error, MOD_ERROR, "failed to create AO composite pipeline"); } if (!build_hilbert_lut()) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to create AO noise LUT"); + return mods::set_error(error, MOD_ERROR, "failed to create AO noise LUT"); } GfxComputeTypeDesc computeDesc = GFX_COMPUTE_TYPE_DESC_INIT; computeDesc.label = "AO chain"; computeDesc.callback = on_compute; if (svc_gfx->register_compute_type(mod_ctx, &computeDesc, &g_computeType) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register compute type"); + return mods::set_error(error, MOD_ERROR, "failed to register compute type"); } GfxDrawTypeDesc drawDesc = GFX_DRAW_TYPE_DESC_INIT; drawDesc.label = "AO composite"; drawDesc.draw = on_draw; if (svc_gfx->register_draw_type(mod_ctx, &drawDesc, &g_drawType) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register draw type"); + return mods::set_error(error, MOD_ERROR, "failed to register draw type"); } GfxStageHookDesc stageDesc = GFX_STAGE_HOOK_DESC_INIT; stageDesc.callback = on_scene_after_opaque; if (svc_gfx->register_stage_hook( mod_ctx, GFX_STAGE_SCENE_AFTER_OPAQUE, &stageDesc, &g_afterOpaqueHook) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + return mods::set_error(error, MOD_ERROR, "failed to register stage hook"); } UiModsPanelDesc panelDesc = UI_MODS_PANEL_DESC_INIT; diff --git a/mods/shadow_mod/src/mod.cpp b/mods/shadow_mod/src/mod.cpp index 0319dab3dc..97439d7015 100644 --- a/mods/shadow_mod/src/mod.cpp +++ b/mods/shadow_mod/src/mod.cpp @@ -945,7 +945,7 @@ ModResult register_bool_option( cvarDesc.type = CONFIG_VAR_BOOL; cvarDesc.default_bool = defaultValue; if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register shadow option"); + return mods::set_error(error, MOD_ERROR, "failed to register shadow option"); } return MOD_OK; } @@ -957,7 +957,7 @@ ModResult register_int_option( cvarDesc.type = CONFIG_VAR_INT; cvarDesc.default_int = defaultValue; if (svc_config->register_var(mod_ctx, &cvarDesc, &outHandle) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register shadow option"); + return mods::set_error(error, MOD_ERROR, "failed to register shadow option"); } return MOD_OK; } @@ -969,7 +969,7 @@ extern "C" { MOD_EXPORT ModResult mod_initialize(ModError* error) { ModResult result = svc_resource->load(mod_ctx, "shadow.wgsl", &g_shaderSource); if (result != MOD_OK || g_shaderSource.data == nullptr) { - return dusk::mods::set_error(error, result, "failed to load shadow.wgsl"); + return mods::set_error(error, result, "failed to load shadow.wgsl"); } result = register_bool_option("effectEnabled", false, g_cvarEnabled, error); @@ -1014,56 +1014,56 @@ MOD_EXPORT ModResult mod_initialize(ModError* error) { } if (svc_gfx->get_device_info(mod_ctx, &g_deviceInfo) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to query device info"); + return mods::set_error(error, MOD_ERROR, "failed to query device info"); } if (!build_composite_pipeline(true, g_compositePipeline, g_compositeLayout) || !build_composite_pipeline(false, g_compositeDebugPipeline, g_compositeDebugLayout)) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to create composite pipeline"); + return mods::set_error(error, MOD_ERROR, "failed to create composite pipeline"); } GfxDrawTypeDesc drawDesc = GFX_DRAW_TYPE_DESC_INIT; drawDesc.label = "shadow composite"; drawDesc.draw = on_draw; if (svc_gfx->register_draw_type(mod_ctx, &drawDesc, &g_drawType) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register draw type"); + return mods::set_error(error, MOD_ERROR, "failed to register draw type"); } GfxStageHookDesc stageDesc = GFX_STAGE_HOOK_DESC_INIT; stageDesc.callback = on_scene_begin; if (svc_gfx->register_stage_hook( mod_ctx, GFX_STAGE_SCENE_BEGIN, &stageDesc, &g_sceneBeginHook) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + return mods::set_error(error, MOD_ERROR, "failed to register stage hook"); } stageDesc.callback = on_scene_after_terrain; if (svc_gfx->register_stage_hook( mod_ctx, GFX_STAGE_SCENE_AFTER_TERRAIN, &stageDesc, &g_sceneAfterTerrainHook) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + return mods::set_error(error, MOD_ERROR, "failed to register stage hook"); } stageDesc.callback = on_frame_before_hud; if (svc_gfx->register_stage_hook( mod_ctx, GFX_STAGE_FRAME_BEFORE_HUD, &stageDesc, &g_frameBeforeHudHook) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to register stage hook"); + return mods::set_error(error, MOD_ERROR, "failed to register stage hook"); } // Skip the game's own shadow rendering while the dynamic pass is active: the // shadowControl pair covers the actor real/blob shadows, drawCloudShadow the weather // cloud shadows. - if (dusk::mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK || - dusk::mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK || - dusk::mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK) + if (mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK || + mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK || + mods::hook_add_pre(svc_hook, on_game_shadow_pre) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to hook game shadow rendering"); + return mods::set_error(error, MOD_ERROR, "failed to hook game shadow rendering"); } - if (dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK || - dusk::mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK) + if (mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK || + mods::hook_add_pre(svc_hook, on_frustum_clip_pre) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to hook frustum clipping"); + return mods::set_error(error, MOD_ERROR, "failed to hook frustum clipping"); } - if (dusk::mods::hook_add_pre(svc_hook, on_copy_tex_pre) != MOD_OK) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to hook GXCopyTex"); + if (mods::hook_add_pre(svc_hook, on_copy_tex_pre) != MOD_OK) { + return mods::set_error(error, MOD_ERROR, "failed to hook GXCopyTex"); } UiModsPanelDesc panelDesc = UI_MODS_PANEL_DESC_INIT; panelDesc.build = build_panel; diff --git a/sdk/include/mods/hook.hpp b/sdk/include/mods/hook.hpp index d48e9bff9f..07999da84c 100644 --- a/sdk/include/mods/hook.hpp +++ b/sdk/include/mods/hook.hpp @@ -9,7 +9,7 @@ #include #include -namespace dusk::mods { +namespace mods { template T arg(void* argsRaw, int n) noexcept { @@ -133,7 +133,7 @@ struct NamedHook : HookImpl, R, A...> {}; * DEFINE_HOOK_SYMBOL("daAlink_hookshotAtHitCallBack", * void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*), HookshotHit); * - * dusk::mods::hook_add_pre(svc_hook, on_link_execute); + * mods::hook_add_pre(svc_hook, on_link_execute); * * DEFINE_HOOK_SYMBOL names may be the platform mangled name (dlopen convention, no Mach-O * leading underscore) or the demangled qualified display name; overloaded display names are @@ -141,19 +141,18 @@ struct NamedHook : HookImpl, R, A...> {}; */ #define DEFINE_HOOK(target, alias) \ [[maybe_unused]] static const void* const mod_meta_hook_##alias = \ - &::dusk::mods::detail::HookRecordFor<(target), \ - ::dusk::mods::FixedString{#target}>::Holder::record; \ - struct alias : ::dusk::mods::Hook<(target)> { \ + &::mods::detail::HookRecordFor<(target), ::mods::FixedString{#target}>::Holder::record; \ + struct alias : ::mods::Hook<(target)> { \ static void* resolved_target() { \ - return ::dusk::mods::detail::HookRecordFor<(target), \ - ::dusk::mods::FixedString{#target}>::Holder::record.resolved; \ + return ::mods::detail::HookRecordFor<(target), \ + ::mods::FixedString{#target}>::Holder::record.resolved; \ } \ } #define DEFINE_HOOK_SYMBOL(name, sig, alias) \ MOD_META_RECORD static constinit auto mod_meta_hook_##alias = \ - ::dusk::mods::detail::make_hook_name_record<::dusk::mods::FixedString{name}>(); \ - struct alias : ::dusk::mods::NamedHook<::dusk::mods::FixedString{name}, sig> { \ + ::mods::detail::make_hook_name_record<::mods::FixedString{name}>(); \ + struct alias : ::mods::NamedHook<::mods::FixedString{name}, sig> { \ static void* resolved_target() { return mod_meta_hook_##alias.resolved; } \ } @@ -208,4 +207,4 @@ ModResult hook_replace( return hooks->replace(mod_ctx, Entry::target, callback, options); } -} // namespace dusk::mods +} // namespace mods diff --git a/sdk/include/mods/meta.hpp b/sdk/include/mods/meta.hpp index 7d5d1e5eec..023783cea1 100644 --- a/sdk/include/mods/meta.hpp +++ b/sdk/include/mods/meta.hpp @@ -52,7 +52,7 @@ extern "C" const unsigned char __stop_modmeta[]; #define MOD_META_BOUNDS_END (__stop_modmeta) #endif -namespace dusk::mods { +namespace mods { /* A string usable as a template argument: carries a symbol/target name into record builders * and makes each hook declaration's static state unique. */ @@ -254,8 +254,7 @@ struct HookFnHolder { {sizeof(HookFnRecord), MOD_META_HOOK_FN, 0}, 0, Target, nullptr}; }; -template > +template > struct HookRecordFor { using Holder = HookFnHolder; }; @@ -268,8 +267,7 @@ struct HookRecordFor { struct Bind> { using Type = HookMemHolder().chars[Is]...>; }; - using Holder = - Bind().len>>::Type; + using Holder = Bind().len>>::Type; }; template @@ -284,4 +282,4 @@ consteval auto make_hook_name_record() { } } // namespace detail -} // namespace dusk::mods +} // namespace mods diff --git a/sdk/include/mods/service.hpp b/sdk/include/mods/service.hpp index d97d8def31..a6010a375c 100644 --- a/sdk/include/mods/service.hpp +++ b/sdk/include/mods/service.hpp @@ -7,7 +7,7 @@ #include #include -namespace dusk::mods { +namespace mods { template struct ServiceTraits; @@ -23,14 +23,14 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa return code; } -} // namespace dusk::mods +} // namespace mods #define DEFINE_MOD() \ extern "C" { \ MOD_EXPORT ModContext* mod_ctx = nullptr; \ } \ MOD_META_RECORD static constinit ModMetaHeader mod_meta_header_record = \ - ::dusk::mods::detail::make_header(); \ + ::mods::detail::make_header(); \ MOD_META_BOUNDS_DEFN \ extern "C" { \ MOD_EXPORT constinit const ModMeta mod_meta = { \ @@ -52,26 +52,26 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa static_cast(major_value), \ static_cast(min_minor_value), \ &(variable), \ - ::dusk::mods::detail::make_service_id(service_id_value), \ + ::mods::detail::make_service_id(service_id_value), \ } #define IMPORT_SERVICE_VERSION(service_type, variable, min_minor_value) \ - IMPORT_SERVICE_EX(service_type, variable, ::dusk::mods::ServiceTraits::id, \ - ::dusk::mods::ServiceTraits::major_version, min_minor_value, \ + IMPORT_SERVICE_EX(service_type, variable, ::mods::ServiceTraits::id, \ + ::mods::ServiceTraits::major_version, min_minor_value, \ SERVICE_IMPORT_REQUIRED) #define IMPORT_SERVICE(service_type, variable) \ IMPORT_SERVICE_VERSION( \ - service_type, variable, ::dusk::mods::ServiceTraits::minor_version) + service_type, variable, ::mods::ServiceTraits::minor_version) #define IMPORT_OPTIONAL_SERVICE_VERSION(service_type, variable, min_minor_value) \ - IMPORT_SERVICE_EX(service_type, variable, ::dusk::mods::ServiceTraits::id, \ - ::dusk::mods::ServiceTraits::major_version, min_minor_value, \ + IMPORT_SERVICE_EX(service_type, variable, ::mods::ServiceTraits::id, \ + ::mods::ServiceTraits::major_version, min_minor_value, \ SERVICE_IMPORT_OPTIONAL) #define IMPORT_OPTIONAL_SERVICE(service_type, variable) \ IMPORT_OPTIONAL_SERVICE_VERSION( \ - service_type, variable, ::dusk::mods::ServiceTraits::minor_version) + service_type, variable, ::mods::ServiceTraits::minor_version) #define EXPORT_SERVICE_AS(instance, service_id_value) \ MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##instance = { \ @@ -79,12 +79,11 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa (instance).header.major_version, \ (instance).header.minor_version, \ &(instance), \ - ::dusk::mods::detail::make_service_id(service_id_value), \ + ::mods::detail::make_service_id(service_id_value), \ } #define EXPORT_SERVICE(instance) \ - EXPORT_SERVICE_AS( \ - instance, ::dusk::mods::ServiceTraits>::id) + EXPORT_SERVICE_AS(instance, ::mods::ServiceTraits>::id) #define EXPORT_DEFERRED_SERVICE(token, service_id_value, major_value, minor_value) \ MOD_META_RECORD static constinit ModMetaExport mod_meta_export_##token = { \ @@ -92,5 +91,5 @@ inline ModResult set_error(ModError* outError, ModResult code, const char* messa static_cast(major_value), \ static_cast(minor_value), \ nullptr, \ - ::dusk::mods::detail::make_service_id(service_id_value), \ + ::mods::detail::make_service_id(service_id_value), \ } diff --git a/sdk/include/mods/svc/camera.h b/sdk/include/mods/svc/camera.h index ec7724a1de..f6de5b8146 100644 --- a/sdk/include/mods/svc/camera.h +++ b/sdk/include/mods/svc/camera.h @@ -57,7 +57,7 @@ typedef struct CameraService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = CAMERA_SERVICE_ID; static constexpr uint16_t major_version = CAMERA_SERVICE_MAJOR; static constexpr uint16_t minor_version = CAMERA_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/config.h b/sdk/include/mods/svc/config.h index 50c518bd40..cd4afdbbdf 100644 --- a/sdk/include/mods/svc/config.h +++ b/sdk/include/mods/svc/config.h @@ -100,7 +100,7 @@ typedef struct ConfigService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = CONFIG_SERVICE_ID; static constexpr uint16_t major_version = CONFIG_SERVICE_MAJOR; static constexpr uint16_t minor_version = CONFIG_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/game.h b/sdk/include/mods/svc/game.h index bdcf2d71f0..0a3585b912 100644 --- a/sdk/include/mods/svc/game.h +++ b/sdk/include/mods/svc/game.h @@ -23,7 +23,7 @@ typedef struct GameService { #include template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = GAME_SERVICE_ID; static constexpr uint16_t major_version = GAME_SERVICE_MAJOR; static constexpr uint16_t minor_version = GAME_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/gfx.h b/sdk/include/mods/svc/gfx.h index fad1b0bf9a..03b24ed986 100644 --- a/sdk/include/mods/svc/gfx.h +++ b/sdk/include/mods/svc/gfx.h @@ -206,7 +206,7 @@ typedef struct GfxService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = GFX_SERVICE_ID; static constexpr uint16_t major_version = GFX_SERVICE_MAJOR; static constexpr uint16_t minor_version = GFX_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/hook.h b/sdk/include/mods/svc/hook.h index 987c438fa0..3d4e9c0472 100644 --- a/sdk/include/mods/svc/hook.h +++ b/sdk/include/mods/svc/hook.h @@ -46,7 +46,7 @@ typedef enum HookReplacePolicy { /* * Hook callbacks. `args` is an array of pointers to the call's arguments (index 0 is `this` * for member functions); `retval` points at the return slot (NULL for void). Read and write - * them through dusk::mods::arg / arg_ref from mods/hook.hpp. `userdata` is the pointer + * them through mods::arg / arg_ref from mods/hook.hpp. `userdata` is the pointer * from HookOptions. All run on the game thread, in the hooked call's own stack frame. */ typedef HookAction (*HookPreFn)(ModContext* ctx, void* args, void* retval, void* userdata); @@ -118,7 +118,7 @@ typedef struct HookService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = HOOK_SERVICE_ID; static constexpr uint16_t major_version = HOOK_SERVICE_MAJOR; static constexpr uint16_t minor_version = HOOK_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/host.h b/sdk/include/mods/svc/host.h index 0f7851c7e1..9e278d5790 100644 --- a/sdk/include/mods/svc/host.h +++ b/sdk/include/mods/svc/host.h @@ -107,7 +107,7 @@ typedef struct HostService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = HOST_SERVICE_ID; static constexpr uint16_t major_version = HOST_SERVICE_MAJOR; static constexpr uint16_t minor_version = HOST_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/log.h b/sdk/include/mods/svc/log.h index 0dbf4ec48e..0bb9ca74ed 100644 --- a/sdk/include/mods/svc/log.h +++ b/sdk/include/mods/svc/log.h @@ -40,7 +40,7 @@ typedef struct LogService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = LOG_SERVICE_ID; static constexpr uint16_t major_version = LOG_SERVICE_MAJOR; static constexpr uint16_t minor_version = LOG_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/overlay.h b/sdk/include/mods/svc/overlay.h index 02f60bd727..76e24c878b 100644 --- a/sdk/include/mods/svc/overlay.h +++ b/sdk/include/mods/svc/overlay.h @@ -50,7 +50,7 @@ typedef struct OverlayService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = OVERLAY_SERVICE_ID; static constexpr uint16_t major_version = OVERLAY_SERVICE_MAJOR; static constexpr uint16_t minor_version = OVERLAY_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/resource.h b/sdk/include/mods/svc/resource.h index 1a8251d83a..05a22754a3 100644 --- a/sdk/include/mods/svc/resource.h +++ b/sdk/include/mods/svc/resource.h @@ -45,7 +45,7 @@ typedef struct ResourceService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = RESOURCE_SERVICE_ID; static constexpr uint16_t major_version = RESOURCE_SERVICE_MAJOR; static constexpr uint16_t minor_version = RESOURCE_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/texture.h b/sdk/include/mods/svc/texture.h index bb648cf860..cdcfbe7e2a 100644 --- a/sdk/include/mods/svc/texture.h +++ b/sdk/include/mods/svc/texture.h @@ -81,7 +81,7 @@ typedef struct TextureService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = TEXTURE_SERVICE_ID; static constexpr uint16_t major_version = TEXTURE_SERVICE_MAJOR; static constexpr uint16_t minor_version = TEXTURE_SERVICE_MINOR; diff --git a/sdk/include/mods/svc/ui.h b/sdk/include/mods/svc/ui.h index 73df25cb47..e19ec65f6c 100644 --- a/sdk/include/mods/svc/ui.h +++ b/sdk/include/mods/svc/ui.h @@ -277,7 +277,7 @@ typedef struct UiService { #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = UI_SERVICE_ID; static constexpr uint16_t major_version = UI_SERVICE_MAJOR; static constexpr uint16_t minor_version = UI_SERVICE_MINOR; From 12261dbc491c6a06ec48588f3a9101d01ea2b8c4 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 12:04:41 -0600 Subject: [PATCH 050/223] Update aurora --- extern/aurora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/aurora b/extern/aurora index 1dde08fa0d..81f12f31d2 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit 1dde08fa0d0030133788a6250a81c8b9c44f246f +Subproject commit 81f12f31d23ec822d8bde2031c91e94c470911eb From e9ebb174f12603d43e2495c00e2964b482577edd Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 12:44:27 -0600 Subject: [PATCH 051/223] Mod SDK: Fix Windows ARM detection; ignore dotfiles in dir copies --- cmake/ModSDK.cmake | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 0371a7d61b..10a87e8525 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -13,6 +13,18 @@ function(_mod_lib_info out_platform_var out_name_var) message(FATAL_ERROR "add_mod: universal binaries are not supported") endif () set(_arch "${CMAKE_OSX_ARCHITECTURES}") + elseif (WIN32) + set(_arch_id "${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}") + if (NOT _arch_id) + set(_arch_id "${CMAKE_C_COMPILER_ARCHITECTURE_ID}") + endif () + if (_arch_id MATCHES "^ARM64(EC)?$") + set(_arch "arm64") + elseif (_arch_id STREQUAL "x64") + set(_arch "amd64") + elseif (_arch_id STREQUAL "X86") + set(_arch "x86") + endif () endif () string(TOLOWER "${CMAKE_SYSTEM_NAME}" _platform) if (_platform STREQUAL "darwin") @@ -74,7 +86,15 @@ function(_mod_collect_assets out_var dir) endif () file(GLOB_RECURSE _files CONFIGURE_DEPENDS LIST_DIRECTORIES false "${dir}/*") - set(${out_var} ${_files} PARENT_SCOPE) + # Dotfiles (.gitkeep, .DS_Store, ...) are not packaged; see CopyModAssets.cmake. + set(_assets "") + foreach (_file IN LISTS _files) + file(RELATIVE_PATH _rel "${dir}" "${_file}") + if (NOT _rel MATCHES "(^|/)\\.") + list(APPEND _assets "${_file}") + endif () + endforeach () + set(${out_var} ${_assets} PARENT_SCOPE) endfunction() function(_mod_add_webgpu_headers target_name) @@ -290,8 +310,8 @@ function(add_mod target_name) list(APPEND _package_deps ${_res_deps}) list(APPEND _package_inputs "${_res_dir}" ${_res_deps}) list(APPEND _zip_args res) - list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} -E copy_directory - "${_res_dir}" "${_stage}/res") + list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_res_dir}" + "-DDST=${_stage}/res" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake") endif () if (ARG_OVERLAY_DIR) _mod_resolve_source_path(_overlay_dir "${ARG_OVERLAY_DIR}") @@ -299,8 +319,8 @@ function(add_mod target_name) list(APPEND _package_deps ${_overlay_deps}) list(APPEND _package_inputs "${_overlay_dir}" ${_overlay_deps}) list(APPEND _zip_args overlay) - list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} -E copy_directory - "${_overlay_dir}" "${_stage}/overlay") + list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_overlay_dir}" + "-DDST=${_stage}/overlay" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake") endif () if (ARG_TEXTURES_DIR) _mod_resolve_source_path(_textures_dir "${ARG_TEXTURES_DIR}") @@ -308,8 +328,8 @@ function(add_mod target_name) list(APPEND _package_deps ${_textures_deps}) list(APPEND _package_inputs "${_textures_dir}" ${_textures_deps}) list(APPEND _zip_args textures) - list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} -E copy_directory - "${_textures_dir}" "${_stage}/textures") + list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_textures_dir}" + "-DDST=${_stage}/textures" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake") endif () set(_bundle_cmds "") From 76b56cd8b81809fce0a5c2a44e2f6d437591132f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 12:46:57 -0600 Subject: [PATCH 052/223] Forgot to stage this --- cmake/CopyModAssets.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cmake/CopyModAssets.cmake diff --git a/cmake/CopyModAssets.cmake b/cmake/CopyModAssets.cmake new file mode 100644 index 0000000000..ca16da6018 --- /dev/null +++ b/cmake/CopyModAssets.cmake @@ -0,0 +1,10 @@ +# Copies a mod asset directory for packaging, skipping dotfiles and dot-directories +# (.gitkeep, .DS_Store, ...). Usage: cmake -DSRC= -DDST= -P CopyModAssets.cmake +file(MAKE_DIRECTORY "${DST}") +file(GLOB_RECURSE _files RELATIVE "${SRC}" "${SRC}/*") +foreach (_file IN LISTS _files) + if (NOT _file MATCHES "(^|/)\\.") + get_filename_component(_dir "${_file}" DIRECTORY) + file(COPY "${SRC}/${_file}" DESTINATION "${DST}/${_dir}") + endif () +endforeach () From ec51ba298b7086fa1f7f9cf590fb79041a0a7f81 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Jul 2026 13:07:22 -0600 Subject: [PATCH 053/223] Update docs/modding.md --- docs/modding.md | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/modding.md b/docs/modding.md index 8afe8701e5..2600b4721d 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -28,7 +28,8 @@ function, read and write data fields, and hook the vast majority of game functio ## Getting Started -Fork the [mod template](../mods/template_mod/), a self-contained CMake project that uses the Dusklight mod SDK. +Fork the [mod template](https://github.com/TwilitRealm/mod-template), a self-contained CMake project that uses the +Dusklight mod SDK. ``` my_mod/ @@ -43,19 +44,22 @@ my_mod/ **CMakeLists.txt:** ```cmake -cmake_minimum_required(VERSION 3.25) +cmake_minimum_required(VERSION 3.26) project(my_mod CXX) -set(DUSKLIGHT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dusklight" CACHE PATH "Path to dusklight source root") +if (NOT DUSKLIGHT_VERSION) + set(DUSKLIGHT_VERSION "76b56cd8b81809fce0a5c2a44e2f6d437591132f") +endif () +include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FetchDusklight.cmake") add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL) add_mod(my_mod - FEATURES game # optional + FEATURES game # remove for service/asset-only mods; add webgpu for GfxService SOURCES src/mod.cpp MOD_JSON mod.json - RES_DIR res # optional - OVERLAY_DIR overlay # optional - TEXTURES_DIR textures # optional + RES_DIR res # mod resources, including icon.png and banner.png + OVERLAY_DIR overlay # game file overlays; remove if unused + TEXTURES_DIR textures # texture replacements; remove if unused ) ``` @@ -65,11 +69,7 @@ Available features: - `webgpu`: Allows importing the WebGPU API (`webgpu/webgpu.h`). Must be enabled when using [GfxService](#gfxservice-modssvcgfxh). -Building produces `my_mod.dusk` in `build//mods/` (configurable via the `DUSK_MODS_OUTPUT_DIR` cache variable). -Dusklight searches a `mods/` directory next to the app in addition to the user directory, so a dev build launched from -`build//` picks these up automatically: rebuild, relaunch (or click Reload), done. - -For a regular game install, copy the `.dusk` into the user mods folder: +Building produces `my_mod.dusk` in `build/mods/`. Copy the `.dusk` into the user mods folder: - Windows: `%APPDATA%\TwilitRealm\Dusklight\mods` - Linux: `~/.local/share/TwilitRealm/Dusklight/mods` @@ -498,14 +498,14 @@ Run before the original. Return `HOOK_SKIP_ORIGINAL` to cancel it (post-hooks st ```cpp HookAction on_pos_move_pre(ModContext*, void* args, void* retval, void* userdata) { - daAlink_c* link = dusk::mods::arg(args, 0); // arg 0 is `this` + daAlink_c* link = mods::arg(args, 0); // arg 0 is `this` if (link->shape_angle.y > 10000) { return HOOK_SKIP_ORIGINAL; } return HOOK_CONTINUE; } -dusk::mods::hook_add_pre(svc_hook, on_pos_move_pre); +mods::hook_add_pre(svc_hook, on_pos_move_pre); ``` ### Post-hooks @@ -516,7 +516,7 @@ if any. ```cpp void on_pos_move_post(ModContext*, void* args, void* retval, void* userdata) { ... } -dusk::mods::hook_add_post(svc_hook, on_pos_move_post); +mods::hook_add_post(svc_hook, on_pos_move_post); ``` ### Replace-hooks @@ -525,13 +525,13 @@ Substitute the original entirely. Call through to it via the declaration's `g_or ```cpp void on_execute_replace(ModContext*, void* args, void* retval, void*) { - int result = LinkExecute::g_orig(dusk::mods::arg(args, 0)); + int result = LinkExecute::g_orig(mods::arg(args, 0)); if (retval != nullptr) { *static_cast(retval) = result; } } -dusk::mods::hook_replace(svc_hook, on_execute_replace); +mods::hook_replace(svc_hook, on_execute_replace); ``` By default a second replace-hook on the same function is a conflict; `HookOptions` (`replace_policy`, `priority`, @@ -547,7 +547,7 @@ symbol name instead. You must supply the signature along with the name. DEFINE_HOOK_SYMBOL("daAlink_hookshotAtHitCallBack", void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*), HookshotHit); -dusk::mods::hook_add_pre(svc_hook, on_hookshot_hit_pre); +mods::hook_add_pre(svc_hook, on_hookshot_hit_pre); ... HookshotHit::g_orig(link, atObjInf, target, tgObjInf); // call through to the original ``` @@ -571,8 +571,8 @@ call. declaration order. ```cpp -T value = dusk::mods::arg(args, n); // copy -T& ref = dusk::mods::arg_ref(args, n); // read/write reference +T value = mods::arg(args, n); // copy +T& ref = mods::arg_ref(args, n); // read/write reference ``` ```cpp @@ -580,14 +580,14 @@ DEFINE_HOOK(fopAcM_createItem, CreateItem); // fpc_ProcID fopAcM_createItem(..., int itemNo, ...): turn heart drops into green rupees HookAction on_create_item_pre(ModContext*, void* args, void*, void*) { - int& itemNo = dusk::mods::arg_ref(args, 1); + int& itemNo = mods::arg_ref(args, 1); if (itemNo == dItemNo_HEART_e) { itemNo = dItemNo_GREEN_RUPEE_e; } return HOOK_CONTINUE; } -dusk::mods::hook_add_pre(svc_hook, on_create_item_pre); +mods::hook_add_pre(svc_hook, on_create_item_pre); ``` For reference parameters (e.g. `const cXyz& pos`), `arg_ref` yields a direct reference. @@ -646,13 +646,13 @@ the stack for the whole session (e.g. the outermost main loop); a mod that does Service calls report failure through `ModResult` return values (`MOD_OK`, `MOD_UNAVAILABLE`, `MOD_INVALID_ARGUMENT`, ...). Lifecycle exports additionally receive a `ModError*`: fill it (e.g. with -`dusk::mods::set_error(error, code, "message")`) and return the code, and the loader disables the mod and shows the +`mods::set_error(error, code, "message")`) and return the code, and the loader disables the mod and shows the message to the user. ```cpp MOD_EXPORT ModResult mod_initialize(ModError* error) { if (!load_my_data()) { - return dusk::mods::set_error(error, MOD_ERROR, "failed to load data"); + return mods::set_error(error, MOD_ERROR, "failed to load data"); } return MOD_OK; } @@ -686,7 +686,7 @@ typedef struct MyModService { #ifdef __cplusplus #include "mods/service.hpp" template <> -struct dusk::mods::ServiceTraits { +struct mods::ServiceTraits { static constexpr const char* id = MY_MOD_SERVICE_ID; static constexpr uint16_t major_version = MY_MOD_SERVICE_MAJOR; static constexpr uint16_t minor_version = MY_MOD_SERVICE_MINOR; From 1bae8a5e6a812217ca33ba533e707ecfa64b1553 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 16 Jul 2026 00:10:07 -0600 Subject: [PATCH 054/223] DuskDsp: Fix streamed audio position tracking --- src/dusk/audio/DuskDsp.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/dusk/audio/DuskDsp.cpp b/src/dusk/audio/DuskDsp.cpp index 1f304d4b3e..4009b37e39 100644 --- a/src/dusk/audio/DuskDsp.cpp +++ b/src/dusk/audio/DuskDsp.cpp @@ -457,10 +457,7 @@ static int ReadChannelSamplesChunk( auto aramBase = static_cast(ARGetStorageAddress()) + channel.mWaveAramAddress; - // Streaming logic directly modifies mSamplesLeft. - // So we use that as our tracking of where we are. - auto curSamplePosition = channel.mEndSample - channel.mSamplesLeft; - + auto curSamplePosition = channel.mSamplePosition; u32 skipSamples = curSamplePosition % channel.mSamplesPerBlock; if (skipSamples != 0) { // We need to start reading in the middle of a block. This can happen thanks to loops. From 8051679c96dd9992584a1160b105e4d333319083 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Thu, 16 Jul 2026 17:23:51 -0700 Subject: [PATCH 055/223] fix jp font rendering Co-Authored-By: pengin <2162454+pengin@users.noreply.github.com> --- .../include/JSystem/JUtility/JUTCacheFont.h | 4 +++ libs/JSystem/src/JUtility/JUTCacheFont.cpp | 33 ++++++++++++++++++- libs/JSystem/src/JUtility/JUTResFont.cpp | 25 +++++++++++--- 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h b/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h index 2e089b7cc4..6c4b0b14fc 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h @@ -55,7 +55,11 @@ public: void prepend(JUTCacheFont::TGlyphCacheInfo*); virtual ~JUTCacheFont(); +#if TARGET_PC + virtual void loadImage(int, GXTexMapID FONT_DRAW_CTX); +#else virtual void loadImage(int, GXTexMapID); +#endif virtual void setBlock(); void setPagingType(EPagingType type) { mPagingType = type; } diff --git a/libs/JSystem/src/JUtility/JUTCacheFont.cpp b/libs/JSystem/src/JUtility/JUTCacheFont.cpp index 81b9f252f1..2282361672 100644 --- a/libs/JSystem/src/JUtility/JUTCacheFont.cpp +++ b/libs/JSystem/src/JUtility/JUTCacheFont.cpp @@ -203,7 +203,7 @@ bool JUTCacheFont::allocArea(void* cacheBuffer, u32 param_1, JKRHeap* heap) { } } - field_0x94 = mMaxSheetSize + 0x40; + field_0x94 = mMaxSheetSize + sizeof(TCachePage); mCachePage = param_1 / field_0x94; u32 v1 = field_0x94 * mCachePage; if (mCachePage == 0) { @@ -346,7 +346,23 @@ void JUTCacheFont::getGlyphFromAram(JUTCacheFont::TGlyphCacheInfo* param_0, JUTCacheFont::TCachePage* pCachePage, int* param_2, int* param_3) { TGlyphCacheInfo* pGylphCacheInfo = pCachePage; int* r30 = param_2; +#if TARGET_PC + // TODO: proper fix to account for 64bit ptr sizes + ResFONT::GLY1* glyph = (ResFONT::GLY1*)param_0; + pGylphCacheInfo->field_0x8 = glyph->startCode; + pGylphCacheInfo->field_0xa = glyph->endCode; + pGylphCacheInfo->field_0xc = glyph->cellWidth; + pGylphCacheInfo->field_0xe = glyph->cellHeight; + pGylphCacheInfo->field_0x10 = glyph->textureSize; + pGylphCacheInfo->mTexFormat = glyph->textureFormat; + pGylphCacheInfo->field_0x16 = glyph->numRows; + pGylphCacheInfo->field_0x18 = glyph->numColumns; + pGylphCacheInfo->mWidth = glyph->textureWidth; + pGylphCacheInfo->mHeight = glyph->textureHeight; + pGylphCacheInfo->field_0x1e = 0; +#else memcpy(pGylphCacheInfo, param_0, sizeof(TGlyphCacheInfo)); +#endif prepend(pGylphCacheInfo); int iVar3 = pGylphCacheInfo->field_0x16 * pGylphCacheInfo->field_0x18; int iVar2 = *r30 / iVar3; @@ -364,7 +380,11 @@ void JUTCacheFont::getGlyphFromAram(JUTCacheFont::TGlyphCacheInfo* param_0, GX_ANISO_1); } +#if TARGET_PC +void JUTCacheFont::loadImage(int param_0, GXTexMapID texMapId FONT_DRAW_CTX) { +#else void JUTCacheFont::loadImage(int param_0, GXTexMapID texMapId) { +#endif TCachePage* cachePage = loadCache_char_subroutine(¶m_0, false); if (cachePage != NULL) { mWidth = cachePage->field_0xc * (param_0 % (int)cachePage->field_0x16); @@ -421,6 +441,16 @@ JUTCacheFont::TCachePage* JUTCacheFont::loadCache_char_subroutine(int* param_0, } void JUTCacheFont::invalidiateAllCache() { +#if TARGET_PC + u8* cacheBuffer = (u8*)mCacheBuffer; + for (int i = 0; i < mCachePage; i++) { + TGlyphCacheInfo* current = (TGlyphCacheInfo*)cacheBuffer; + current->mPrev = i == 0 ? NULL : (TGlyphCacheInfo*)(cacheBuffer - field_0x94); + current->mNext = i == mCachePage - 1 ? NULL : (TGlyphCacheInfo*)(cacheBuffer + field_0x94); + cacheBuffer = cacheBuffer + field_0x94; + } + field_0xa8 = (intptr_t)cacheBuffer - field_0x94; +#else int* cacheBuffer = (int*)mCacheBuffer; for (int i = 0; i < mCachePage; i++) { *cacheBuffer = i == 0 ? 0 : (intptr_t)cacheBuffer - field_0x94; @@ -428,6 +458,7 @@ void JUTCacheFont::invalidiateAllCache() { cacheBuffer = (int*)((intptr_t)cacheBuffer + field_0x94); } field_0xa8 = (intptr_t)cacheBuffer - field_0x94; +#endif field_0xa4 = (TGlyphCacheInfo*)mCacheBuffer; field_0x9c = NULL; field_0xa0 = NULL; diff --git a/libs/JSystem/src/JUtility/JUTResFont.cpp b/libs/JSystem/src/JUtility/JUTResFont.cpp index 02b59aa739..4ec23dff44 100644 --- a/libs/JSystem/src/JUtility/JUTResFont.cpp +++ b/libs/JSystem/src/JUtility/JUTResFont.cpp @@ -7,6 +7,8 @@ #include "JSystem/JUtility/JUTConsole.h" #include +#include "dusk/version.hpp" + JUTResFont::JUTResFont() { initialize_state(); JUTFont::initialize_state(); @@ -68,8 +70,16 @@ void JUTResFont::initJoinedTexture() { int pageCount = 0; u32 pageNumCells = block.numRows * block.numColumns; - for (u32 code = block.startCode; code < block.endCode; code += pageNumCells) { - pageCount += 1; + + if (dusk::version::getGameVersion() == dusk::version::GameVersion::GcnJpn) { + pageCount = 1; + if (pageNumCells > 0 && block.endCode > block.startCode) { + pageCount = (block.endCode - block.startCode + pageNumCells - 1) / pageNumCells; + } + } else { + for (u32 code = block.startCode; code < block.endCode; code += pageNumCells) { + pageCount += 1; + } } mJoinedTextureHeight = block.textureHeight * pageCount; @@ -273,12 +283,19 @@ f32 JUTResFont::drawChar_scale(f32 pos_x, f32 pos_y, f32 scale_x, f32 scale_y, i u16 texW = mpGlyphBlocks[field_0x66]->textureWidth; #if TARGET_PC - u16 texH = mJoinedTextureHeight; + // JUTCacheFont does not set mJoinedTextureHeight (it uses per-page textures via loadImage override). + // Fall back to the individual glyph block's textureHeight in that case. + u16 texH = mJoinedTextureHeight > 0 ? (u16)mJoinedTextureHeight : (u16)mpGlyphBlocks[field_0x66]->textureHeight; #else u16 texH = mpGlyphBlocks[field_0x66]->textureHeight; #endif - u16 cellW = mpGlyphBlocks[field_0x66]->cellWidth; +#if AVOID_UB + if (texW == 0) texW = 1; + if (texH == 0) texH = 1; +#endif + + u16 cellW = mpGlyphBlocks[field_0x66]->cellWidth; u16 cellH = mpGlyphBlocks[field_0x66]->cellHeight; s32 u1 = (mWidth * 0x8000) / texW; s32 v1 = (mHeight * 0x8000) / texH; From 241927b4894fa7c51d675682e825225c64175a57 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Thu, 16 Jul 2026 19:53:47 -0700 Subject: [PATCH 056/223] fix jp name screen --- src/d/d_name.cpp | 200 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 144 insertions(+), 56 deletions(-) diff --git a/src/d/d_name.cpp b/src/d/d_name.cpp index 50d861d1b9..2f3970bb2f 100644 --- a/src/d/d_name.cpp +++ b/src/d/d_name.cpp @@ -17,6 +17,12 @@ static bool isPalOrJpn() { return dusk::version::isRegionPal() || dusk::version::isRegionJpn(); } +#if TARGET_PC +#define SJIS_MOJI(wmoji) ((static_cast(static_cast((wmoji)[0])) << 8) | static_cast((wmoji)[1])) +#else +#define SJIS_MOJI(wmoji) *(u16*)wmoji +#endif + #if TARGET_PC static const char* l_mojiHira[65] = { "\x82\xA0", "\x82\xA2", "\x82\xA4", "\x82\xA6", "\x82\xA8", "\x82\xA9", "\x82\xAB", "\x82\xAD", "\x82\xAF", "\x82\xB1", "\x82\xB3", "\x82\xB5", "\x82\xB7", @@ -46,7 +52,7 @@ static const char* l_mojikata[65] = { "\x83\x41", "\x83\x43", "\x83\x45", "\x83\x47", "\x83\x49", "\x83\x4A", "\x83\x4C", "\x83\x4E", "\x83\x50", "\x83\x52", "\x83\x54", "\x83\x56", "\x83\x58", "\x83\x5A", "\x83\x5C", "\x83\x5E", "\x83\x60", "\x83\x63", "\x83\x65", "\x83\x67", "\x83\x69", "\x83\x6A", "\x83\x6B", "\x83\x6C", "\x83\x6D", "\x83\x6E", "\x83\x71", "\x83\x74", "\x83\x77", "\x83\x7A", "\x83\x7D", "\x83\x7E", "\x83\x80", "\x83\x81", "\x83\x82", "\x83\x84", "\x81\x40", "\x83\x86", "\x81\x40", - "\x83\x88", "\x83\x89", "\x83\x8A", "\x83\x8B", "\x83\x8C", "\x83\x8D", "\x83\x8F", "\x81\x40", "\x83\x93", "\x81\x40", "\x83\x93", "\x83\x40", "\x83\x42" + "\x83\x88", "\x83\x89", "\x83\x8A", "\x83\x8B", "\x83\x8C", "\x83\x8D", "\x83\x8F", "\x81\x40", "\x83\x93", "\x81\x40", "\x83\x93", "\x83\x40", "\x83\x42", "\x83\x44", "\x83\x46", "\x83\x48", "\x83\x83", "\x81\x40", "\x83\x85", "\x81\x40", "\x83\x87", "\x83\x62", "\x81\x40", "\x81\x5B", "\x81\x4A", "\x81\x4B", }; @@ -163,7 +169,7 @@ static const char* l_mojiEisuPal_2[65] = { #if TARGET_PC // ' ' (full-width space) -#define SPACE_MAYBE_FULL (dusk::version::isRegionJpn() ? '\x81\x40' : ' ') +#define SPACE_MAYBE_FULL (dusk::version::isRegionJpn() ? 0x8140U : ' ') #elif REGION_JPN // ' ' (full-width space) #define SPACE_MAYBE_FULL '\x81\x40' @@ -430,7 +436,7 @@ int dName_c::nameCheck() { #if REGION_JPN if (mChrInfo[len].mCharacter != ' ' && mChrInfo[len].mCharacter != '\x81\x40') { #else - if (mChrInfo[len].mCharacter != ' ' IF_DUSK(&& (!dusk::version::isRegionJpn() || mChrInfo[len].mCharacter != '\x81\x40'))) { + if (mChrInfo[len].mCharacter != ' ' IF_DUSK(&& (!dusk::version::isRegionJpn() || mChrInfo[len].mCharacter != 0x8140U))) { #endif return len + 1; } @@ -449,7 +455,12 @@ void dName_c::playNameSet(int nameLength) { *str = mChrInfo[i].mCharacter; str += 1; } else { + #if TARGET_PC + str[0] = mChrInfo[i].mCharacter >> 8; + str[1] = mChrInfo[i].mCharacter & 0xFF; + #else *(u16*)str = mChrInfo[i].mCharacter; + #endif str += 2; } #else @@ -682,30 +693,41 @@ int dName_c::mojiChange(u8 idx) { } void dName_c::selectMojiSet() { - #if REGION_JPN - int moji = getMoji(); - if (moji != -1) { - if (moji == '゛' || moji == '゜') { - if (mCurPos != 0) { - if (checkDakuon(moji, mCurPos - 1) == 1) { - mDoAud_seStart(Z2SE_SY_NAME_INPUT, NULL, 0, 0); - setDakuon(moji, mCurPos - 1); - } else { - mDoAud_seStart(Z2SE_SYS_ERROR, NULL, 0, 0); +#if TARGET_PC || REGION_JPN + #if TARGET_PC + if (dusk::version::isRegionJpn()) + #endif + { + int moji = getMoji(); + if (moji != -1) { + if (moji == SJIS('゛', 0x814AU) || moji == SJIS('゜', 0x814BU)) { + if (mCurPos != 0) { + if (checkDakuon(moji, mCurPos - 1) == 1) { + mDoAud_seStart(Z2SE_SY_NAME_INPUT, NULL, 0, 0); + setDakuon(moji, mCurPos - 1); + } else { + mDoAud_seStart(Z2SE_SYS_ERROR, NULL, 0, 0); + } } + } else { + setMoji(moji); } - } else { - setMoji(moji); } } + #if TARGET_PC + else { + setMoji(getMoji()); + } + #endif + setNameText(); - #else +#else setMoji(getMoji()); setNameText(); - #endif +#endif } -#if REGION_JPN +#if TARGET_PC || REGION_JPN int dName_c::checkDakuon(int param_0, u8 param_1) { if (mChrInfo[param_1].mMojiSet == MOJI_EIGO) { return 0; @@ -715,17 +737,17 @@ int dName_c::checkDakuon(int param_0, u8 param_1) { return 0; } - if (param_0 == '゜' && mChrInfo[param_1].mColumn != 5) { + if (param_0 == SJIS('゜', 0x814BU) && mChrInfo[param_1].mColumn != 5) { return 0; } - if (param_0 == '゛' && - (mChrInfo[param_1].mCharacter == 'ウ' || mChrInfo[param_1].mCharacter == 'ヴ')) + if (param_0 == SJIS('゛', 0x814AU) && + (mChrInfo[param_1].mCharacter == SJIS('ウ', 0x8345U) || mChrInfo[param_1].mCharacter == SJIS('ヴ', 0x8394U))) { return 1; } - if (param_0 == '゛' && mChrInfo[param_1].mColumn != 1 && mChrInfo[param_1].mColumn != 2 && + if (param_0 == SJIS('゛', 0x814AU) && mChrInfo[param_1].mColumn != 1 && mChrInfo[param_1].mColumn != 2 && mChrInfo[param_1].mColumn != 3 && mChrInfo[param_1].mColumn != 5) { return 0; @@ -737,46 +759,46 @@ int dName_c::checkDakuon(int param_0, u8 param_1) { int dName_c::setDakuon(int param_1, u8 param_2) { int c; - if (param_1 == '゛') { + if (param_1 == SJIS('゛', 0x814AU)) { switch (mChrInfo[param_2].mColumn) { case 0: { c = -1; - if (mChrInfo[param_2].mCharacter == 'ウ' || mChrInfo[param_2].mCharacter == 'ヴ') { + if (mChrInfo[param_2].mCharacter == SJIS('ウ', 0x8345U) || mChrInfo[param_2].mCharacter == SJIS('ヴ', 0x8394U)) { c = 4; - mChrInfo[param_2].mCharacter = 'ヴ'; + mChrInfo[param_2].mCharacter = SJIS('ヴ', 0x8394U); } break; } case 1: { - int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'カ' : 'か'; + int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('カ', 0x834AU) : SJIS('か', 0x82A9U); c = (mChrInfo[param_2].mCharacter - c2) % 2; break; } case 2: { - int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'サ' : 'さ'; + int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('サ', 0x8354U) : SJIS('さ', 0x82B3U); c = (mChrInfo[param_2].mCharacter - c2) % 2; break; } case 3: { int c2; if (mChrInfo[param_2].mCharacter <= - ((mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'ヂ' : 'ぢ'))) + ((mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('ヂ', 0x8361U) : SJIS('ぢ', 0x82C0U)))) { - c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'タ' : 'た'; + c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('タ', 0x835EU) : SJIS('た', 0x82BDU); c = (mChrInfo[param_2].mCharacter - c2) % 2; } else { - if (mChrInfo[param_2].mCharacter <= (mChrInfo[param_2].mMojiSet != 0 ? 'ド' : 'ど')) + if (mChrInfo[param_2].mCharacter <= (mChrInfo[param_2].mMojiSet != 0 ? SJIS('ド', 0x8368U) : SJIS('ど', 0x82C7U))) { if (mChrInfo[param_2].mCharacter >= - (mChrInfo[param_2].mMojiSet != 0 ? 'テ' : 'て')) + (mChrInfo[param_2].mMojiSet != 0 ? SJIS('テ', 0x8365U) : SJIS('て', 0x82C4U))) { - c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'テ' : 'て'; + c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('テ', 0x8365U) : SJIS('て', 0x82C4U); c = (mChrInfo[param_2].mCharacter - c2) % 2; break; } } - c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'ッ' : 'っ'; + c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('ッ', 0x8362U) : SJIS('っ', 0x82C1U); c = (mChrInfo[param_2].mCharacter - c2) % 3; if (c == 2) { c = 1; @@ -789,7 +811,7 @@ int dName_c::setDakuon(int param_1, u8 param_2) { break; } case 5: { - int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'ハ' : 'は'; + int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('ハ', 0x836EU) : SJIS('は', 0x82CDU); c = (mChrInfo[param_2].mCharacter - c2) % 3; break; } @@ -808,8 +830,8 @@ int dName_c::setDakuon(int param_1, u8 param_2) { return 1; } - } else if (param_1 == '゜') { - int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? 'ハ' : 'は'; + } else if (param_1 == SJIS('゜', 0x814BU)) { + int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('ハ', 0x836EU) : SJIS('は', 0x82CDU); c = (mChrInfo[param_2].mCharacter - c2) % 3; if (c != 2) { mChrInfo[param_2].mCharacter = mChrInfo[param_2].mCharacter + (2 - c); @@ -880,7 +902,7 @@ int dName_c::getMoji() { #if TARGET_PC if (dusk::version::isRegionJpn()) { if (*(u8*)moji >> 4 == 0x8 || *(u8*)moji >> 4 == 0x9) { - result = *(u16*)moji; + result = SJIS_MOJI(moji); } else { result = *moji; } @@ -962,8 +984,8 @@ void dName_c::setNameText() { //"\x1bCD\x1bCR\x1bCC[000000]\x1bGM[0]%c\x1bHM\x1bCC[ffffff]\x1bGM[0]%c" //"\x1bCD\x1bCR\x1bCC[000000]\x1bGM[0]%c%c\x1bHM\x1bCC[ffffff]\x1bGM[0]%c%c" if (mChrInfo[i].field_0x3 != 0) { - #if REGION_JPN - if (mChrInfo[i].mMojiSet == 2) { + #if TARGET_PC || REGION_JPN + if (IF_DUSK(!dusk::version::isRegionJpn() ||) mChrInfo[i].mMojiSet == 2) { #endif SAFE_SPRINTF(mNameText[i], "\x1b" @@ -974,7 +996,7 @@ void dName_c::setNameText() { CHAR_TRUNC((u8)mChrInfo[i].mCharacter), CHAR_TRUNC((u8)mChrInfo[i].mCharacter) ); - #if REGION_JPN + #if TARGET_PC || REGION_JPN } else { SAFE_SPRINTF(mNameText[i], "\x1b" @@ -1062,7 +1084,7 @@ void dName_c::selectCursorMove() { g_nmHIO.mSelCharScale); ((J2DTextBox*)mMojiIcon[mCharRow + mCharColumn * 5]->getPanePtr()) ->setWhite(JUtility::TColor(0xC8, 0xC8, 0xC8, 0xFF)); - + #if TARGET_PC nameWide(); #endif @@ -1493,7 +1515,7 @@ void dName_c::nameWide() { for (PaneCache& entry : l_tagName) { J2DPane* pane = nameIn.NameInScr->search(entry.tag); if (!entry.cached) { - entry.origTransX = pane->getTranslateX(); + entry.origTransX = pane->getTranslateX(); entry.origTransY = pane->getTranslateY(); entry.cached = true; } @@ -1501,7 +1523,7 @@ void dName_c::nameWide() { for (PaneCache& entry : l_nameTagName) { J2DPane* pane = nameIn.NameInScr->search(entry.tag); if (!entry.cached) { - entry.origTransX = pane->getTranslateX(); + entry.origTransX = pane->getTranslateX(); entry.origTransY = pane->getTranslateY(); entry.cached = true; } @@ -1509,7 +1531,7 @@ void dName_c::nameWide() { for (PaneCache& entry : l_nameCurTagName) { J2DPane* pane = nameIn.NameInScr->search(entry.tag); if (!entry.cached) { - entry.origTransX = pane->getTranslateX(); + entry.origTransX = pane->getTranslateX(); entry.origTransY = pane->getTranslateY(); entry.cached = true; } @@ -1587,7 +1609,42 @@ void dName_c::screenSet() { static u64 l_cur1TagName[8] = { 's_0r', MULTI_CHAR('s_01r'), MULTI_CHAR('s_02r'), MULTI_CHAR('s_03r'), MULTI_CHAR('s_04r'), MULTI_CHAR('s_05r'), MULTI_CHAR('s_06r'), MULTI_CHAR('s_07r'), }; -#if REGION_JPN + +#if TARGET_PC + static u64 l_menu_icon_tag_jpn[4] = { + MULTI_CHAR('j_hira_n'), + MULTI_CHAR('j_kata_n'), + MULTI_CHAR('j_eigo_n'), + MULTI_CHAR('j_end_n'), + }; + static u64 l_menu_tag_jpn[5][3] = { + MULTI_CHAR('m_hira_0'), MULTI_CHAR('m_hira_1'), MULTI_CHAR('m_hira_s'), MULTI_CHAR('m_kata_0'), MULTI_CHAR('m_kata_1'), MULTI_CHAR('m_kata_s'), + MULTI_CHAR('m_eigo_0'), MULTI_CHAR('m_eigo_1'), MULTI_CHAR('m_eigo_s'), MULTI_CHAR('j_end_0'), MULTI_CHAR('j_end_1'), MULTI_CHAR('j_end_s'), + }; + static u32 l_menu_msg_jpn[4] = { + 0x386, + 0x387, + 0x388, + 0x38A, + }; + + static u64 l_menu_icon_tag[4] = { + MULTI_CHAR('p_ABC_n'), + MULTI_CHAR('p_abc_n'), + MULTI_CHAR('j_eigo_n'), + MULTI_CHAR('p_end_n'), + }; + static u64 l_menu_tag[5][3] = { + MULTI_CHAR('p_ABC_0'), MULTI_CHAR('p_ABC_1'), MULTI_CHAR('p_ABC_2'), MULTI_CHAR('p_abc_0'), MULTI_CHAR('p_abc_1'), MULTI_CHAR('p_abc_2'), + MULTI_CHAR('m_eigo_0'), MULTI_CHAR('m_eigo_1'), MULTI_CHAR('m_eigo_2'), MULTI_CHAR('p_end_0'), MULTI_CHAR('p_end_1'), MULTI_CHAR('p_end_2'), + }; + static u32 l_menu_msg[4] = { + 0x38B, + 0x38C, + 0x388, + 0x38E, + }; +#elif REGION_JPN static u64 l_menu_icon_tag[4] = { MULTI_CHAR('j_hira_n'), MULTI_CHAR('j_kata_n'), @@ -1669,7 +1726,26 @@ void dName_c::screenSet() { panes1[i]->setAnimation(mCursorColorKey); } - #if REGION_JPN + #if TARGET_PC + if (dusk::version::isRegionJpn()) { + nameIn.NameInScr->search(MULTI_CHAR('pal_n'))->hide(); + mMenuPane = nameIn.NameInScr->search(MULTI_CHAR('jpn_n')); + mMenuPane->show(); + + nameIn.NameInScr->search(MULTI_CHAR('p_ABC_n'))->scale(0.0f, 0.0f); + nameIn.NameInScr->search(MULTI_CHAR('p_abc_n'))->scale(0.0f, 0.0f); + nameIn.NameInScr->search(MULTI_CHAR('p_end_n'))->scale(0.0f, 0.0f); + } else { + nameIn.NameInScr->search(MULTI_CHAR('jpn_n'))->hide(); + mMenuPane = nameIn.NameInScr->search(MULTI_CHAR('pal_n')); + mMenuPane->show(); + + nameIn.NameInScr->search(MULTI_CHAR('j_hira_n'))->scale(0.0f, 0.0f); + nameIn.NameInScr->search(MULTI_CHAR('j_kata_n'))->scale(0.0f, 0.0f); + nameIn.NameInScr->search(MULTI_CHAR('j_eigo_n'))->scale(0.0f, 0.0f); + nameIn.NameInScr->search(MULTI_CHAR('j_end_n'))->scale(0.0f, 0.0f); + } + #elif REGION_JPN nameIn.NameInScr->search(MULTI_CHAR('pal_n'))->hide(); mMenuPane = nameIn.NameInScr->search(MULTI_CHAR('jpn_n')); mMenuPane->show(); @@ -1690,19 +1766,31 @@ void dName_c::screenSet() { J2DTextBox* menuPane[3]; for (int i = 0; i < 4; i++) { - #if !REGION_JPN - if (i == 2) { + #if TARGET_PC || !REGION_JPN + if (IF_DUSK(!dusk::version::isRegionJpn() &&) i == 2) { mMenuIcon[i] = NULL; mMenuText[i] = NULL; } else { #endif + #if TARGET_PC + mMenuIcon[i] = JKR_NEW CPaneMgr(nameIn.NameInScr, dusk::version::isRegionJpn() ? l_menu_icon_tag_jpn[i] : l_menu_icon_tag[i], 1, NULL); + #else mMenuIcon[i] = JKR_NEW CPaneMgr(nameIn.NameInScr, l_menu_icon_tag[i], 1, NULL); + #endif char buf[16]; + #if TARGET_PC + fopMsgM_messageGet(buf, dusk::version::isRegionJpn() ? l_menu_msg_jpn[i] : l_menu_msg[i]); + #else fopMsgM_messageGet(buf, l_menu_msg[i]); + #endif for (int j = 0; j < 3; j++) { + #if TARGET_PC + menuPane[j] = (J2DTextBox*)nameIn.NameInScr->search(dusk::version::isRegionJpn() ? l_menu_tag_jpn[i][j] : l_menu_tag[i][j]); + #else menuPane[j] = (J2DTextBox*)nameIn.NameInScr->search(l_menu_tag[i][j]); + #endif if (j == 0) { mMenuText[i] = menuPane[j]; @@ -1711,7 +1799,7 @@ void dName_c::screenSet() { menuPane[j]->setFont(nameIn.font); menuPane[j]->setString(buf); } - #if !REGION_JPN + #if TARGET_PC || !REGION_JPN } #endif } @@ -1852,20 +1940,20 @@ void dName_c::NameStrSet() { i++; } else { if (*(u8*)moji >> 4 == 8 || *(u8*)moji >> 4 == 9) { - mChrInfo[i].mCharacter = *(u16*)moji; + mChrInfo[i].mCharacter = SJIS_MOJI(moji); for (int j = 0; j < 65; j++) { - if (mChrInfo[i].mCharacter == *(u16*)l_mojiHira[j] || - mChrInfo[i].mCharacter == *(u16*)l_mojiHira2[j] || - mChrInfo[i].mCharacter == *(u16*)l_mojiHira3[j]) + if (mChrInfo[i].mCharacter == SJIS_MOJI(l_mojiHira[j]) || + mChrInfo[i].mCharacter == SJIS_MOJI(l_mojiHira2[j]) || + mChrInfo[i].mCharacter == SJIS_MOJI(l_mojiHira3[j])) { mChrInfo[i].mColumn = j / 5; mChrInfo[i].mRow = j % 5; mChrInfo[i].mMojiSet = MOJI_HIRA; break; - } else if (mChrInfo[i].mCharacter == *(u16*)l_mojikata[j] || - mChrInfo[i].mCharacter == *(u16*)l_mojikata2[j] || - mChrInfo[i].mCharacter == *(u16*)l_mojikata3[j]) + } else if (mChrInfo[i].mCharacter == SJIS_MOJI(l_mojikata[j]) || + mChrInfo[i].mCharacter == SJIS_MOJI(l_mojikata2[j]) || + mChrInfo[i].mCharacter == SJIS_MOJI(l_mojikata3[j])) { mChrInfo[i].mColumn = j / 5; mChrInfo[i].mRow = j % 5; From 1654d256ecf2824097f6b71dc21227bfb611427a Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Thu, 16 Jul 2026 20:06:37 -0700 Subject: [PATCH 057/223] mant/flower jp offsets --- src/d/actor/d_a_mant.cpp | 12 ++++++------ src/d/actor/d_flower.inc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/d/actor/d_a_mant.cpp b/src/d/actor/d_a_mant.cpp index 956bd6cc72..449efcd672 100644 --- a/src/d/actor/d_a_mant.cpp +++ b/src/d/actor/d_a_mant.cpp @@ -18,9 +18,9 @@ using GameVersion = dusk::version::GameVersion; // keep the original version of the cape texture const so we don't need to reload the file -static u8 const * l_Egnd_mantTEX_get() { alignas(32) static u8 buf[0x4000]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x1C00}, {GameVersion::GcnPal, 0x1C00}}, 0x4000), true); return buf; } -static u8* l_Egnd_mantTEX_U_get() { alignas(32) static u8 buf[0x4000]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x5C00}, {GameVersion::GcnPal, 0x5C00}}, 0x4000), true); return buf; } -static u8* l_Egnd_mantPAL_get() { alignas(32) static u8 buf[0x60]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x9C00}, {GameVersion::GcnPal, 0x9C00}}, 0x60), true); return buf; } +static u8 const * l_Egnd_mantTEX_get() { alignas(32) static u8 buf[0x4000]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x1C00}, {GameVersion::GcnPal, 0x1C00}, {GameVersion::GcnJpn, 0x1C00}}, 0x4000), true); return buf; } +static u8* l_Egnd_mantTEX_U_get() { alignas(32) static u8 buf[0x4000]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x5C00}, {GameVersion::GcnPal, 0x5C00}, {GameVersion::GcnJpn, 0x5C00}}, 0x4000), true); return buf; } +static u8* l_Egnd_mantPAL_get() { alignas(32) static u8 buf[0x60]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x9C00}, {GameVersion::GcnPal, 0x9C00}, {GameVersion::GcnJpn, 0x9C00}}, 0x60), true); return buf; } #define l_Egnd_mantTEX (l_Egnd_mantTEX_get()) #define l_Egnd_mantTEX_U (l_Egnd_mantTEX_U_get()) #define l_Egnd_mantPAL (l_Egnd_mantPAL_get()) @@ -36,8 +36,8 @@ static TGXTexObj undersideTexObj; // l_pos is unused //static f32* l_pos_get() { alignas(32) static f32 buf[507]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA44C}, {GameVersion::GcnPal, 0xA44C}}, sizeof(buf)), true); return buf; } -static f32* l_normal_get() { alignas(32) static f32 buf[3]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x9C60}, {GameVersion::GcnPal, 0x9C60}}, sizeof(buf)), true); return buf; } -static f32* l_texCoord_get() { alignas(32) static f32 buf[338]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA458}, {GameVersion::GcnPal, 0xA458}}, sizeof(buf)), true); return buf; } +static f32* l_normal_get() { alignas(32) static f32 buf[3]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x9C60}, {GameVersion::GcnPal, 0x9C60}, {GameVersion::GcnJpn, 0x9C60}}, sizeof(buf)), true); return buf; } +static f32* l_texCoord_get() { alignas(32) static f32 buf[338]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA458}, {GameVersion::GcnPal, 0xA458}, {GameVersion::GcnJpn, 0xA458}}, sizeof(buf)), true); return buf; } //#define l_pos (l_pos_get()) #define l_normal (l_normal_get()) #define l_texCoord (l_texCoord_get()) @@ -55,7 +55,7 @@ static bool l_Egnd_mantTEX_hasReplacement = false; #if TARGET_PC using GameVersion = dusk::version::GameVersion; -static u8* l_Egnd_mantDL_get() { alignas(32) static u8 buf[0x3EC]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA9A0}, {GameVersion::GcnPal, 0xA9A0}}, 0x3EC), true); return buf; } +static u8* l_Egnd_mantDL_get() { alignas(32) static u8 buf[0x3EC]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA9A0}, {GameVersion::GcnPal, 0xA9A0}, {GameVersion::GcnJpn, 0xA9A0}}, 0x3EC), true); return buf; } #define l_Egnd_mantDL (l_Egnd_mantDL_get()) #else #include "assets/l_Egnd_mantDL.h" diff --git a/src/d/actor/d_flower.inc b/src/d/actor/d_flower.inc index accaff88fa..f8fe0bed10 100644 --- a/src/d/actor/d_flower.inc +++ b/src/d/actor/d_flower.inc @@ -142,7 +142,7 @@ const u16 l_J_Ohana01_64128_0419TEX__height = 127; #if TARGET_PC using GameVersion = dusk::version::GameVersion; -static u8* l_J_Ohana01_64128_0419TEX_get() { static u8 buf[0x1000]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xA0A0}, {GameVersion::GcnPal, 0xA0A0}}, 0x1000), true); return buf; } +static u8* l_J_Ohana01_64128_0419TEX_get() { static u8 buf[0x1000]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xA0A0}, {GameVersion::GcnPal, 0xA0A0}, {GameVersion::GcnJpn, 0xA0A0}}, 0x1000), true); return buf; } #define l_J_Ohana01_64128_0419TEX (l_J_Ohana01_64128_0419TEX_get()) #else #include "assets/l_J_Ohana01_64128_0419TEX.h" From ce386d8dbdfb5a13cdd915fb34166398499d377e Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Fri, 17 Jul 2026 18:12:28 -0700 Subject: [PATCH 058/223] convert jpn ui/text changes to runtime checks --- include/d/d_menu_option.h | 18 +- include/d/d_msg_class.h | 6 +- include/d/d_msg_unit.h | 4 + include/d/d_timer.h | 2 +- src/d/d_file_sel_info.cpp | 29 +- src/d/d_file_sel_warning.cpp | 23 +- src/d/d_file_select.cpp | 111 ++++++- src/d/d_menu_collect.cpp | 202 ++++++++++-- src/d/d_menu_dmap.cpp | 91 +++++- src/d/d_menu_fishing.cpp | 11 +- src/d/d_menu_fmap2D.cpp | 139 +++++++-- src/d/d_menu_insect.cpp | 27 +- src/d/d_menu_item_explain.cpp | 36 ++- src/d/d_menu_letter.cpp | 233 ++++++++++++-- src/d/d_menu_option.cpp | 573 ++++++++++++++++++++++++++-------- src/d/d_menu_ring.cpp | 147 ++++++--- src/d/d_menu_save.cpp | 131 ++++++-- src/d/d_menu_skill.cpp | 55 +++- src/d/d_meter2_draw.cpp | 14 +- src/d/d_meter2_info.cpp | 39 ++- src/d/d_meter_button.cpp | 83 ++++- src/d/d_msg_class.cpp | 136 ++++++-- src/d/d_msg_object.cpp | 7 + src/d/d_msg_out_font.cpp | 17 +- src/d/d_msg_scrn_3select.cpp | 112 ++++++- src/d/d_msg_scrn_boss.cpp | 7 +- src/d/d_msg_scrn_explain.cpp | 75 ++++- src/d/d_msg_scrn_howl.cpp | 37 ++- src/d/d_msg_scrn_item.cpp | 50 ++- src/d/d_msg_scrn_jimaku.cpp | 53 +++- src/d/d_msg_scrn_kanban.cpp | 45 ++- src/d/d_msg_scrn_place.cpp | 13 +- src/d/d_msg_scrn_talk.cpp | 92 +++++- src/d/d_msg_scrn_tree.cpp | 50 ++- src/d/d_msg_unit.cpp | 205 +++++++++++- src/d/d_save.cpp | 7 +- src/d/d_timer.cpp | 29 +- 37 files changed, 2467 insertions(+), 442 deletions(-) diff --git a/include/d/d_menu_option.h b/include/d/d_menu_option.h index 03aca42808..49e81f98ae 100644 --- a/include/d/d_menu_option.h +++ b/include/d/d_menu_option.h @@ -17,6 +17,20 @@ class dSelect_cursor_c; class dMenu_Option_c : public dDlst_base_c { public: + enum { + PROC_ATTEN_e, +#if TARGET_PC || VERSION == VERSION_GCN_JPN + PROC_RUBY_e, +#endif + PROC_VIB_e, + PROC_SOUND_e, + PROC_CHANGE_MOVE_e, + PROC_CONFIRM_OPEN_MOVE_e, + PROC_CONFIRM_MOVE_MOVE_e, + PROC_CONFIRM_SELECT_MOVE_e, + PROC_CONFIRM_CLOSE_MOVE_e, + }; + dMenu_Option_c(JKRArchive*, STControl*); void _create(); void _delete(); @@ -31,7 +45,7 @@ public: bool _close(); void atten_init(); void atten_move(); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN void ruby_init(); void ruby_move(); #endif @@ -189,7 +203,7 @@ private: /* 0x3E2 */ u8 field_0x3e2; /* 0x3E3 */ u8 field_0x3e3; /* 0x3E4 */ u8 field_0x3e4; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN /* 0x3E5 */ u8 field_0x3e5_JPN; #endif /* 0x3E5 */ u8 field_0x3e5; diff --git a/include/d/d_msg_class.h b/include/d/d_msg_class.h index 5292eed5d3..a8bba32351 100644 --- a/include/d/d_msg_class.h +++ b/include/d/d_msg_class.h @@ -7,7 +7,11 @@ #include "helpers/endian.h" #include "helpers/string.hpp" -#if REGION_JPN +#if TARGET_PC +#define D_MSG_CLASS_PAGE_CNT_MAX 40 +#define D_MSG_CLASS_CHAR_CNT_MAX 0x210 +#define D_MSG_CLASS_LINE_MAX 12 +#elif REGION_JPN #define D_MSG_CLASS_PAGE_CNT_MAX 30 #define D_MSG_CLASS_CHAR_CNT_MAX 0x210 #define D_MSG_CLASS_LINE_MAX 9 diff --git a/include/d/d_msg_unit.h b/include/d/d_msg_unit.h index c48d89d0e0..59e0a81183 100644 --- a/include/d/d_msg_unit.h +++ b/include/d/d_msg_unit.h @@ -8,6 +8,10 @@ public: dMsgUnit_c(); void setTag(int, int, TEXT_SPAN, bool); +#if TARGET_PC + void setTag_jpn(int, int, TEXT_SPAN, bool); +#endif + virtual ~dMsgUnit_c(); }; diff --git a/include/d/d_timer.h b/include/d/d_timer.h index 9d3bd7ce1f..104a4cae9e 100644 --- a/include/d/d_timer.h +++ b/include/d/d_timer.h @@ -52,7 +52,7 @@ public: s32 createStart(u16); bool checkStartAnimeEnd(); void playBckAnimation(f32); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN bool isLeadByte(int); #endif void drawPikari(int); diff --git a/src/d/d_file_sel_info.cpp b/src/d/d_file_sel_info.cpp index e107d6dacc..70bd101aa0 100644 --- a/src/d/d_file_sel_info.cpp +++ b/src/d/d_file_sel_info.cpp @@ -46,8 +46,19 @@ void dFile_info_c::screenSet() { J2DTextBox* info_text[4]; - - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + if (dusk::version::isRegionJpn()) { + info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01')); + info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01')); + mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02'))->hide(); + mFileInfo.Scr->search(MULTI_CHAR('f_p_t_02'))->hide(); + } else { + info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02')); + info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_p_t_02')); + mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01'))->hide(); + mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01'))->hide(); + } + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01')); info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01')); mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02'))->hide(); @@ -66,7 +77,19 @@ void dFile_info_c::screenSet() { dMeter2Info_getString(0x3D0, info_text[0]->getStringPtr(), NULL); // Save time dMeter2Info_getString(0x3D1, info_text[1]->getStringPtr(), NULL); // Total play time - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + if (dusk::version::isRegionJpn()) { + info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_name01')); + info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_new_1')); + mFileInfo.Scr->search(MULTI_CHAR('f_name01'))->hide(); + mFileInfo.Scr->search(MULTI_CHAR('f_new_1'))->hide(); + } else { + info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_name01')); + info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_new_1')); + mFileInfo.Scr->search(MULTI_CHAR('w_name01'))->hide(); + mFileInfo.Scr->search(MULTI_CHAR('w_new_1'))->hide(); + } + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_name01')); info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_new_1')); mFileInfo.Scr->search(MULTI_CHAR('f_name01'))->hide(); diff --git a/src/d/d_file_sel_warning.cpp b/src/d/d_file_sel_warning.cpp index e2d767453b..fc17e05a0d 100644 --- a/src/d/d_file_sel_warning.cpp +++ b/src/d/d_file_sel_warning.cpp @@ -4,13 +4,14 @@ #include "d/dolzel.h" // IWYU pragma: keep +#include "JSystem/J2DGraph/J2DAnmLoader.h" +#include "JSystem/J2DGraph/J2DScreen.h" +#include "JSystem/J2DGraph/J2DTextBox.h" +#include "d/d_com_inf_game.h" #include "d/d_file_sel_warning.h" #include "d/d_msg_string.h" #include "d/d_pane_class.h" -#include "JSystem/J2DGraph/J2DScreen.h" -#include "JSystem/J2DGraph/J2DAnmLoader.h" -#include "JSystem/J2DGraph/J2DTextBox.h" -#include "d/d_com_inf_game.h" +#include "dusk/version.hpp" typedef void (dFile_warning_c::*procFunc)(); static procFunc fileWarningProc[] = {&dFile_warning_c::modeWait, &dFile_warning_c::modeMove}; @@ -63,7 +64,19 @@ void dFile_warning_c::screenSet() { JUT_ASSERT(0, mpRootPane != NULL); field_0x34 = mpRootPane->getTranslateY(); -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mFileWarn.Scr->search(MULTI_CHAR('ms_for_2'))->hide(); + mFileWarn.Scr->search(MULTI_CHAR('ms_for_3'))->hide(); + + field_0x20 = static_cast(mFileWarn.Scr->search(MULTI_CHAR('w_msg_jp'))); + } else { + mFileWarn.Scr->search(MULTI_CHAR('w_msg_jp'))->hide(); + mFileWarn.Scr->search(MULTI_CHAR('ms_for_2'))->hide(); + + field_0x20 = static_cast(mFileWarn.Scr->search(MULTI_CHAR('ms_for_3'))); + } +#elif REGION_JPN mFileWarn.Scr->search(MULTI_CHAR('ms_for_2'))->hide(); mFileWarn.Scr->search(MULTI_CHAR('ms_for_3'))->hide(); diff --git a/src/d/d_file_select.cpp b/src/d/d_file_select.cpp index f57265aa77..98d60fa195 100644 --- a/src/d/d_file_select.cpp +++ b/src/d/d_file_select.cpp @@ -23,6 +23,8 @@ #include "m_Do/m_Do_graphic.h" #include +#include "dusk/version.hpp" + #if TARGET_PC #include "dusk/menu_pointer.h" #include "helpers/string.hpp" @@ -3184,8 +3186,10 @@ void dFile_select_c::screenSet() { static u64 l_nouseTag[15] = {MULTI_CHAR('w_mcheck'), MULTI_CHAR('w_tabi1'), MULTI_CHAR('w_tabi2'), MULTI_CHAR('w_tabi3'), MULTI_CHAR('w_doko_c'), MULTI_CHAR('w_uwa_c'), MULTI_CHAR('w_cp_chu'), MULTI_CHAR('w_cpsita'), MULTI_CHAR('w_cp_x'), 'w_de', MULTI_CHAR('w_de_chu'), MULTI_CHAR('w_desita'), MULTI_CHAR('w_de_x'), MULTI_CHAR('w_name'), MULTI_CHAR('w_h_name')}; - -#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) +#if TARGET_PC + static u64 l_tagName21_jpn[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')}; + static u64 l_tagName21[2] = {MULTI_CHAR('t_for'), MULTI_CHAR('t_for1')}; +#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) static u64 l_tagName21[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')}; #else static u64 l_tagName21[2] = {MULTI_CHAR('t_for'), MULTI_CHAR('t_for1')}; @@ -3194,7 +3198,10 @@ void dFile_select_c::screenSet() { static u64 l_tagName18[3] = {MULTI_CHAR('w_de_ef0'), MULTI_CHAR('w_de_ef1'), MULTI_CHAR('w_de_ef2')}; static u64 l_tagName19[3] = {MULTI_CHAR('w_cp_ef0'), MULTI_CHAR('w_cp_ef1'), MULTI_CHAR('w_cp_ef2')}; -#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) +#if TARGET_PC + static u64 l_tagName20_jpn[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')}; + static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')}; +#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) static u64 l_tagName20[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')}; #else static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')}; @@ -3230,7 +3237,19 @@ void dFile_select_c::screenSet() { mBbtnPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_n_bbtn'), 2, NULL); mAbtnPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_n_abtn'), 2, NULL); -#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mModoruTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_modo'), 2, NULL); + mKetteiTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_kete'), 2, NULL); + fileSel.Scr->search(MULTI_CHAR('f_modo'))->hide(); + fileSel.Scr->search(MULTI_CHAR('f_kete'))->hide(); + } else { + mModoruTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('f_modo'), 2, NULL); + mKetteiTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('f_kete'), 2, NULL); + fileSel.Scr->search(MULTI_CHAR('w_modo'))->hide(); + fileSel.Scr->search(MULTI_CHAR('w_kete'))->hide(); + } +#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) mModoruTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_modo'), 2, NULL); mKetteiTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_kete'), 2, NULL); fileSel.Scr->search(MULTI_CHAR('f_modo'))->hide(); @@ -3306,7 +3325,17 @@ void dFile_select_c::screenSet() { fileSel.Scr->search(l_nouseTag[i])->hide(); } -#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + fileSel.Scr->search(MULTI_CHAR('t_for'))->hide(); + fileSel.Scr->search(MULTI_CHAR('t_for1'))->hide(); + } else { + fileSel.Scr->search(MULTI_CHAR('w_tabi_s'))->hide(); + fileSel.Scr->search(MULTI_CHAR('w_tabi_x'))->hide(); + fileSel.Scr->search(MULTI_CHAR('w_mgn1'))->hide(); + fileSel.Scr->search(MULTI_CHAR('w_mgn2'))->hide(); + } +#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) fileSel.Scr->search(MULTI_CHAR('t_for'))->hide(); fileSel.Scr->search(MULTI_CHAR('t_for1'))->hide(); #else @@ -3317,10 +3346,20 @@ void dFile_select_c::screenSet() { #endif for (int i = 0; i < 2; i++) { - mHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, l_tagName21[i], 0, NULL); + mHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName21_jpn[i] : l_tagName21[i], l_tagName21[i]), 0, NULL); ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFont(fileSel.font[0]); ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setString(512, ""); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f); + } else { + ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFontSize(24.0f, 24.0f); + ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setLineSpace(20.0f); + ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setCharSpace(0.0f); + } +#elif VERSION == VERSION_GCN_JPN ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f); ((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f); @@ -3361,8 +3400,15 @@ void dFile_select_c::screenSet() { field_0x0208 = 0; field_0x0209 = 0; mErrorMsgPane = fileSel.Scr->search(MULTI_CHAR('w_er_n')); - -#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + fileSel.Scr->search(MULTI_CHAR('er_for0'))->hide(); + fileSel.Scr->search(MULTI_CHAR('er_for1'))->hide(); + } else { + fileSel.Scr->search(MULTI_CHAR('w_er_msg'))->hide(); + fileSel.Scr->search(MULTI_CHAR('w_er_msR'))->hide(); + } +#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) fileSel.Scr->search(MULTI_CHAR('er_for0'))->hide(); fileSel.Scr->search(MULTI_CHAR('er_for1'))->hide(); #else @@ -3373,17 +3419,27 @@ void dFile_select_c::screenSet() { fileSel.Scr->search(MULTI_CHAR('w_er_msE'))->hide(); for (int i = 0; i < 2; i++) { - mErrorMsgTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, l_tagName20[i], 0, NULL); + mErrorMsgTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName20_jpn[i] : l_tagName20[i], l_tagName20[i]), 0, NULL); ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setFont(fileSel.font[0]); ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setString(512, ""); -#if (VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN) +#if TARGET_PC || ((VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN)) + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) mErrorMsgTxtPane[i]->getPanePtr()->resize(440.0f, 198.0f); + IF_DUSK_BLOCK_END #endif ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); -#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setCharSpace(2.0f); + } else { + ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setLineSpace(21.0f); + ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setCharSpace(1.0f); + } +#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setLineSpace(22.0f); ((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setCharSpace(2.0f); #else @@ -3579,7 +3635,15 @@ void dFile_select_c::screenSetYesNo() { for (int i = 0; i < 2; i++) { mYnSelPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName012[i], 0, NULL); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mYnSelTxtPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName013[i], 0, NULL); + mYnSel.ScrYn->search(l_tagName013U[i])->hide(); + } else { + mYnSelTxtPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName013U[i], 0, NULL); + mYnSel.ScrYn->search(l_tagName013[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mYnSelTxtPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName013[i], 0, NULL); mYnSel.ScrYn->search(l_tagName013U[i])->hide(); #else @@ -3657,7 +3721,15 @@ void dFile_select_c::screenSet3Menu() { for (int i = 0; i < 3; i++) { m3mSelPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName1[i], 0, NULL); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + m3mSelTextPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName011[i], 0, NULL); + m3mSel.Scr3m->search(l_tagName011U[i])->hide(); + } else { + m3mSelTextPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName011U[i], 0, NULL); + m3mSel.Scr3m->search(l_tagName011[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN m3mSelTextPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName011[i], 0, NULL); m3mSel.Scr3m->search(l_tagName011U[i])->hide(); #else @@ -3777,7 +3849,12 @@ void dFile_select_c::headerTxtSet(u16 i_msgId, u8 i_type, u8 param_3) { SAFE_STRCPY(mHeaderStringPtr[dispIdx], ""); } else { static f32 fontsize[2] = {21.0f, 27.0f}; - #if VERSION == VERSION_GCN_JPN + #if TARGET_PC + static f32 linespace_jpn[2] = {22.0f, 20.0f}; + static f32 charspace_jpn[2] = {2.0f, 3.0f}; + static f32 linespace[2] = {21.0f, 20.0f}; + static f32 charspace[2] = {0.0f, 0.0f}; + #elif VERSION == VERSION_GCN_JPN static f32 linespace[2] = {22.0f, 20.0f}; static f32 charspace[2] = {2.0f, 3.0f}; #else @@ -3787,8 +3864,8 @@ void dFile_select_c::headerTxtSet(u16 i_msgId, u8 i_type, u8 param_3) { ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setFont(fileSel.font[i_type]); ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setFontSize(fontsize[i_type], fontsize[i_type]); - ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setLineSpace(linespace[i_type]); - ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setCharSpace(charspace[i_type]); + ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setLineSpace(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? linespace_jpn[i_type] : linespace[i_type], linespace[i_type])); + ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setCharSpace(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? charspace_jpn[i_type] : charspace[i_type], charspace[i_type])); fileSel.mMessageString->getString(i_msgId, ((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr()), NULL, fileSel.font[i_type], NULL, 0); diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 4de8b2c5a4..28f964ec10 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -5,36 +5,37 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_menu_collect.h" -#include "JSystem/J3DGraphLoader/J3DModelLoader.h" -#include "JSystem/J3DGraphLoader/J3DAnmLoader.h" +#include +#include +#include "JSystem/J2DGraph/J2DAnmLoader.h" +#include "JSystem/J2DGraph/J2DGrafContext.h" #include "JSystem/J2DGraph/J2DTextBox.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "JSystem/J3DGraphLoader/J3DAnmLoader.h" +#include "JSystem/J3DGraphLoader/J3DModelLoader.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "d/actor/d_a_alink.h" -#include "d/d_select_cursor.h" +#include "d/d_item.h" +#include "d/d_lib.h" +#include "d/d_menu_collect.h" #include "d/d_menu_fishing.h" #include "d/d_menu_insect.h" #include "d/d_menu_letter.h" #include "d/d_menu_option.h" #include "d/d_menu_save.h" #include "d/d_menu_skill.h" +#include "d/d_menu_window.h" +#include "d/d_meter2_info.h" #include "d/d_meter_HIO.h" #include "d/d_msg_class.h" #include "d/d_msg_object.h" #include "d/d_msg_string.h" #include "d/d_pane_class.h" -#include "d/d_item.h" -#include "d/d_lib.h" -#include "d/d_meter2_info.h" -#include -#include +#include "d/d_select_cursor.h" +#include "dusk/version.hpp" #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_mtx.h" -#include "JSystem/J2DGraph/J2DAnmLoader.h" -#include "JSystem/J2DGraph/J2DGrafContext.h" -#include "d/d_menu_window.h" -#include "JSystem/J3DGraphBase/J3DMaterial.h" #if TARGET_PC #include "dusk/menu_pointer.h" @@ -438,7 +439,21 @@ void dMenu_Collect2D_c::screenSet() { static const u64 text_a_tag[5] = {MULTI_CHAR('atext1_1'), MULTI_CHAR('atext1_2'), MULTI_CHAR('atext1_3'), MULTI_CHAR('atext1_4'), MULTI_CHAR('atext1_5')}; static const u64 text_b_tag[5] = {MULTI_CHAR('btext1_1'), MULTI_CHAR('btext1_2'), MULTI_CHAR('btext1_3'), MULTI_CHAR('btext1_4'), MULTI_CHAR('btext1_5')}; -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpScreen->search(MULTI_CHAR('t_t00')))->setFont(mDoExt_getRubyFont()); + static_cast(mpScreen->search(MULTI_CHAR('t_t00')))->setString(0x20, ""); + dMeter2Info_getStringKanji( + 0x3E1, static_cast(mpScreen->search(MULTI_CHAR('t_t00')))->getStringPtr(), NULL); + mpScreen->search(MULTI_CHAR('f_t00'))->hide(); + } else { + static_cast(mpScreen->search(MULTI_CHAR('f_t00')))->setFont(mDoExt_getRubyFont()); + static_cast(mpScreen->search(MULTI_CHAR('f_t00')))->setString(0x20, ""); + dMeter2Info_getStringKanji( + 0x3E1, static_cast(mpScreen->search(MULTI_CHAR('f_t00')))->getStringPtr(), NULL); + mpScreen->search(MULTI_CHAR('t_t00'))->hide(); + } +#elif REGION_JPN static_cast(mpScreen->search(MULTI_CHAR('t_t00')))->setFont(mDoExt_getRubyFont()); static_cast(mpScreen->search(MULTI_CHAR('t_t00')))->setString(0x20, ""); dMeter2Info_getStringKanji( @@ -453,7 +468,31 @@ void dMenu_Collect2D_c::screenSet() { #endif for (int i = 0; i < 3; i++) { -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpScreen->search(text_sv[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(text_op[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(text_sv[i]))->setString(0x20, ""); + static_cast(mpScreen->search(text_op[i]))->setString(0x20, ""); + dMeter2Info_getStringKanji( + 0x60, static_cast(mpScreen->search(text_sv[i]))->getStringPtr(), NULL); + dMeter2Info_getStringKanji( + 0x5F, static_cast(mpScreen->search(text_op[i]))->getStringPtr(), NULL); + mpScreen->search(ftext_sv[i])->hide(); + mpScreen->search(ftext_op[i])->hide(); + } else { + static_cast(mpScreen->search(ftext_sv[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(ftext_op[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(ftext_sv[i]))->setString(0x20, ""); + static_cast(mpScreen->search(ftext_op[i]))->setString(0x20, ""); + dMeter2Info_getStringKanji( + 0x60, static_cast(mpScreen->search(ftext_sv[i]))->getStringPtr(), NULL); + dMeter2Info_getStringKanji( + 0x5F, static_cast(mpScreen->search(ftext_op[i]))->getStringPtr(), NULL); + mpScreen->search(text_sv[i])->hide(); + mpScreen->search(text_op[i])->hide(); + } +#elif REGION_JPN static_cast(mpScreen->search(text_sv[i]))->setFont(mDoExt_getMesgFont()); static_cast(mpScreen->search(text_op[i]))->setFont(mDoExt_getMesgFont()); static_cast(mpScreen->search(text_sv[i]))->setString(0x20, ""); @@ -487,7 +526,49 @@ void dMenu_Collect2D_c::screenSet() { static_cast(mpScreenIcon->search(text_b_tag[i]))->setString(0x20, ""); } -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpScreen->search(MULTI_CHAR('item_n00')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n01')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n02')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n03')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n00')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('item_n01')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('item_n02')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('item_n03')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('i_text1')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('i_text0')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('i_text1')))->setString(0x100, ""); + static_cast(mpScreen->search(MULTI_CHAR('i_text0')))->setString(0x100, ""); + + mpScreen->search(MULTI_CHAR('item_n04'))->hide(); + mpScreen->search(MULTI_CHAR('item_n05'))->hide(); + mpScreen->search(MULTI_CHAR('item_n06'))->hide(); + mpScreen->search(MULTI_CHAR('item_n07'))->hide(); + mpScreen->search(MULTI_CHAR('f_text1'))->hide(); + mpScreen->search(MULTI_CHAR('f_text0'))->hide(); + } else { + static_cast(mpScreen->search(MULTI_CHAR('item_n04')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n05')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n06')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n07')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('item_n04')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('item_n05')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('item_n06')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('item_n07')))->setString(0x20, ""); + static_cast(mpScreen->search(MULTI_CHAR('f_text1')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('f_text0')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('f_text1')))->setString(0x100, ""); + static_cast(mpScreen->search(MULTI_CHAR('f_text0')))->setString(0x100, ""); + + mpScreen->search(MULTI_CHAR('item_n00'))->hide(); + mpScreen->search(MULTI_CHAR('item_n01'))->hide(); + mpScreen->search(MULTI_CHAR('item_n02'))->hide(); + mpScreen->search(MULTI_CHAR('item_n03'))->hide(); + mpScreen->search(MULTI_CHAR('i_text1'))->hide(); + mpScreen->search(MULTI_CHAR('i_text0'))->hide(); + } +#elif REGION_JPN static_cast(mpScreen->search(MULTI_CHAR('item_n00')))->setFont(mDoExt_getMesgFont()); static_cast(mpScreen->search(MULTI_CHAR('item_n01')))->setFont(mDoExt_getMesgFont()); static_cast(mpScreen->search(MULTI_CHAR('item_n02')))->setFont(mDoExt_getMesgFont()); @@ -2337,35 +2418,69 @@ void dMenu_Collect2D_c::_draw() { mpScreen->draw(0.0f, 0.0f, grafPort); if (mItemNameString == 0) { -#if REGION_JPN +#if TARGET_PC + TEXT_SPAN stringPtr1; + if (dusk::version::isRegionJpn()) { + stringPtr1 = static_cast(mpScreen->search(MULTI_CHAR('i_text1')))->getStringPtr(); + } else { + stringPtr1 = static_cast(mpScreen->search(MULTI_CHAR('f_text1')))->getStringPtr(); + } +#elif REGION_JPN TEXT_SPAN stringPtr1 = static_cast(mpScreen->search(MULTI_CHAR('i_text1')))->getStringPtr(); #else TEXT_SPAN stringPtr1 = static_cast(mpScreen->search(MULTI_CHAR('f_text1')))->getStringPtr(); #endif SAFE_STRCPY(stringPtr1, ""); -#if REGION_JPN +#if TARGET_PC + TEXT_SPAN stringPtr0; + if (dusk::version::isRegionJpn()) { + stringPtr0 = static_cast(mpScreen->search(MULTI_CHAR('i_text0')))->getStringPtr(); + } else { + stringPtr0 = static_cast(mpScreen->search(MULTI_CHAR('f_text0')))->getStringPtr(); + } +#elif REGION_JPN TEXT_SPAN stringPtr0 = static_cast(mpScreen->search(MULTI_CHAR('i_text0')))->getStringPtr(); #else TEXT_SPAN stringPtr0 = static_cast(mpScreen->search(MULTI_CHAR('f_text0')))->getStringPtr(); #endif SAFE_STRCPY(stringPtr0, ""); } else { -#if REGION_JPN +#if TARGET_PC + J2DTextBox* textBox1; + if (dusk::version::isRegionJpn()) { + textBox1 = static_cast(mpScreen->search(MULTI_CHAR('i_text1'))); + } else { + textBox1 = static_cast(mpScreen->search(MULTI_CHAR('f_text1'))); + } +#elif REGION_JPN J2DTextBox* textBox1 = static_cast(mpScreen->search(MULTI_CHAR('i_text1'))); #else J2DTextBox* textBox1 = static_cast(mpScreen->search(MULTI_CHAR('f_text1'))); #endif mpString->getString(mItemNameString, textBox1, NULL, NULL, NULL, 0); -#if REGION_JPN +#if TARGET_PC + J2DTextBox* textBox0; + if (dusk::version::isRegionJpn()) { + textBox0 = static_cast(mpScreen->search(MULTI_CHAR('i_text0'))); + } else { + textBox0 = static_cast(mpScreen->search(MULTI_CHAR('f_text0'))); + } +#elif REGION_JPN J2DTextBox* textBox0 = static_cast(mpScreen->search(MULTI_CHAR('i_text0'))); #else J2DTextBox* textBox0 = static_cast(mpScreen->search(MULTI_CHAR('f_text0'))); #endif mpString->getString(mItemNameString, textBox0, NULL, NULL, NULL, 0); -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + textBox0 = static_cast(mpScreen->search(MULTI_CHAR('i_text0'))); + } else { + textBox0 = static_cast(mpScreen->search(MULTI_CHAR('f_text0'))); + } +#elif REGION_JPN textBox0 = static_cast(mpScreen->search(MULTI_CHAR('i_text0'))); #else textBox0 = static_cast(mpScreen->search(MULTI_CHAR('f_text0'))); @@ -2448,7 +2563,29 @@ void dMenu_Collect2D_c::setItemNameString(u8 param_0, u8 param_1) { if (uVar6 == 0) { setItemNameStringNull(); } else { -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + TEXT_SPAN stringPtr = + static_cast(mpScreen->search(MULTI_CHAR('item_n00')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n01')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n02')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n03')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + } else { + TEXT_SPAN stringPtr = + static_cast(mpScreen->search(MULTI_CHAR('item_n04')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n05')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n06')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n07')))->getStringPtr(); + dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); + } +#elif REGION_JPN TEXT_SPAN stringPtr = static_cast(mpScreen->search(MULTI_CHAR('item_n00')))->getStringPtr(); dMeter2Info_getStringKanji(uVar6, stringPtr, NULL); @@ -2475,7 +2612,26 @@ void dMenu_Collect2D_c::setItemNameString(u8 param_0, u8 param_1) { void dMenu_Collect2D_c::setItemNameStringNull() { mItemNameString = 0; -#if REGION_JPN +#if TARGET_PC + J2DTextBox* textBox; + if (dusk::version::isRegionJpn()) { + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n00')); + SAFE_STRCPY(textBox->getStringPtr(), ""); + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n01')); + SAFE_STRCPY(textBox->getStringPtr(), ""); + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n02')); + SAFE_STRCPY(textBox->getStringPtr(), ""); + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n03')); + } else { + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n04')); + SAFE_STRCPY(textBox->getStringPtr(), ""); + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n05')); + SAFE_STRCPY(textBox->getStringPtr(), ""); + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n06')); + SAFE_STRCPY(textBox->getStringPtr(), ""); + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n07')); + } +#elif REGION_JPN J2DTextBox* textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n00')); SAFE_STRCPY(textBox->getStringPtr(), ""); textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n01')); diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index 36348b4387..b71c756283 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -26,6 +26,7 @@ #include "m_Do/m_Do_graphic.h" #include +#include "dusk/version.hpp" #include "helpers/string.hpp" #if TARGET_PC @@ -304,6 +305,16 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { static u64 const cont_bt[5] = {MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4')}; static u64 const font_at[5] = {MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4')}; static u64 const font_bt[5] = {MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4')}; + + #if TARGET_PC + static u64 const c_tag_jpn[2] = { + MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') + }; + + static u64 const c_tag[2] = { + MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text') + }; + #else static u64 const c_tag[2] = { #if VERSION == VERSION_GCN_JPN MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') @@ -311,6 +322,7 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text') #endif }; + #endif mButtonScreen = JKR_NEW J2DScreen(); JUT_ASSERT(916, mButtonScreen != NULL); @@ -350,7 +362,23 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { mpJButton = NULL; for (int i = 0; i < 5; i++) { - #if VERSION == VERSION_GCN_JPN + #if TARGET_PC + if (dusk::version::isRegionJpn()) { + ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->setFont(mDoExt_getMesgFont()); + ((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->setFont(mDoExt_getMesgFont()); + ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->setString(32, ""); + ((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->setString(32, ""); + ((J2DTextBox*)mButtonScreen->search(font_at[i]))->hide(); + ((J2DTextBox*)mButtonScreen->search(font_bt[i]))->hide(); + } else { + ((J2DTextBox*)mButtonScreen->search(font_at[i]))->setFont(mDoExt_getMesgFont()); + ((J2DTextBox*)mButtonScreen->search(font_bt[i]))->setFont(mDoExt_getMesgFont()); + ((J2DTextBox*)mButtonScreen->search(font_at[i]))->setString(32, ""); + ((J2DTextBox*)mButtonScreen->search(font_bt[i]))->setString(32, ""); + ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->hide(); + ((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->hide(); + } + #elif VERSION == VERSION_GCN_JPN ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->setFont(mDoExt_getMesgFont()); ((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->setFont(mDoExt_getMesgFont()); ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->setString(32, ""); @@ -372,7 +400,7 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { J2DTextBox* textBox; for (int i = 0; i < 2; i++) { - textBox = ((J2DTextBox*)mButtonScreen->search(c_tag[i])); + textBox = ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i]))); textBox->setFont(mDoExt_getMesgFont()); textBox->setString(32, ""); } @@ -389,6 +417,14 @@ void dMenu_DmapBg_c::buttonIconScreenInit() { } void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) { +#if TARGET_PC + static u64 const cont_at_jpn[5] = { + MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4') + }; + static u64 const cont_at[5] = { + MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4') + }; +#else static u64 const cont_at[5] = { #if VERSION == VERSION_GCN_JPN MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4') @@ -396,16 +432,26 @@ void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) { MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4') #endif }; +#endif + for (int i = 0; i < 5; i++) { if (i_msgNo == 0) { - SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(cont_at[i]))->getStringPtr(), ""); + SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), ""); } else { - dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->getStringPtr(), NULL); + dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), NULL); } } } void dMenu_DmapBg_c::setBButtonString(u32 i_msgNo) { +#if TARGET_PC + static u64 const cont_bt_jpn[5] = { + MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4') + }; + static u64 const cont_bt[5] = { + MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4') + }; +#else static u64 const cont_bt[5] = { #if VERSION == VERSION_GCN_JPN MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4') @@ -413,11 +459,13 @@ void dMenu_DmapBg_c::setBButtonString(u32 i_msgNo) { MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4') #endif }; +#endif + for (int i = 0; i < 5; i++) { if (i_msgNo == 0) { - SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->getStringPtr(), ""); + SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), ""); } else { - dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->getStringPtr(), NULL); + dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), NULL); } } } @@ -429,6 +477,14 @@ static f32 player_py; DUSK_GAME_DATA dMenu_Dmap_c* dMenu_Dmap_c::myclass; void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) { +#if TARGET_PC + static u64 const c_tag_jpn[2] = { + MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') + }; + static u64 const c_tag[2] = { + MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') + }; +#else static u64 const c_tag[2] = { #if VERSION == VERSION_GCN_JPN MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') @@ -436,6 +492,7 @@ void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) { MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text') #endif }; +#endif int i; u32 msgNo; @@ -447,12 +504,12 @@ void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) { if (msgNo == 0) { for (i = 0; i < 2; i++) { - SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(c_tag[i]))->getStringPtr(), ""); + SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), ""); } mpCButton->setAlphaRate(0.5f); } else { for (i = 0; i < 2; i++) { - dMeter2Info_getStringKanji(msgNo, ((J2DTextBox*)mButtonScreen->search(c_tag[i]))->getStringPtr(), NULL); + dMeter2Info_getStringKanji(msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), NULL); } mpCButton->setAlphaRate(1.0f); } @@ -511,7 +568,16 @@ void dMenu_DmapBg_c::baseScreenInit() { mpDrawCursor->setAlphaRate(1.0f); mpDrawCursor->setParam(0.95f, 0.9f, 0.1f, 0.6f, 0.5f); - #if VERSION == VERSION_GCN_JPN + #if TARGET_PC + J2DTextBox* uVar9; + if (dusk::version::isRegionJpn()) { + uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('t_t00')); + mBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); + } else { + uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('f_t_00')); + mBaseScreen->search(MULTI_CHAR('t_t00'))->hide(); + } + #elif VERSION == VERSION_GCN_JPN J2DTextBox* uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('t_t00')); mBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); #else @@ -541,7 +607,12 @@ void dMenu_DmapBg_c::setFloorMessage() { 0x036E, 0x036F, 0x03DC, 0x03DD, 0x03D9, 0x03D8, }; - #if VERSION == VERSION_GCN_JPN + #if TARGET_PC + u64 tag0 = dusk::version::isRegionJpn() ? MULTI_CHAR('ffoor0_0') : MULTI_CHAR('floor0_0'); + #define FLOOR_TAG(A, B) (tag0 | (A<<16) | (B)) + u64 tag1 = dusk::version::isRegionJpn() ? MULTI_CHAR('floor0_0') : MULTI_CHAR('ffoor0_0'); + #define FFOOR_TAG(A, B) (tag1 | (A<<16) | (B)) + #elif VERSION == VERSION_GCN_JPN #define FLOOR_TAG(A, B) (MULTI_CHAR('ffoor0_0') | (A<<16) | (B)) #define FFOOR_TAG(A, B) (MULTI_CHAR('floor0_0') | (A<<16) | (B)) #else diff --git a/src/d/d_menu_fishing.cpp b/src/d/d_menu_fishing.cpp index 2af4291525..eb24852160 100644 --- a/src/d/d_menu_fishing.cpp +++ b/src/d/d_menu_fishing.cpp @@ -305,7 +305,16 @@ void dMenu_Fishing_c::screenSetBase() { mpFishInfoParent[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('info_blu'), 0, NULL); mpFishInfoParent[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('info_red'), 0, NULL); - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + J2DTextBox* textBox; + if (dusk::version::isRegionJpn()) { + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00')); + mpScreen->search(MULTI_CHAR('f_t00'))->hide(); + } else { + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('f_t00')); + mpScreen->search(MULTI_CHAR('t_t00'))->hide(); + } + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) J2DTextBox* textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00')); mpScreen->search(MULTI_CHAR('f_t00'))->hide(); #else diff --git a/src/d/d_menu_fmap2D.cpp b/src/d/d_menu_fmap2D.cpp index 8b4e4b59b9..9d1d17ca0e 100644 --- a/src/d/d_menu_fmap2D.cpp +++ b/src/d/d_menu_fmap2D.cpp @@ -23,6 +23,8 @@ #endif #include +#include "dusk/version.hpp" + #if TARGET_PC void dMenu_Fmap2DBack_c::fMapBackWide() { mpBaseScreen->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f); @@ -2417,7 +2419,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 area_name[3] = {MULTI_CHAR('i_name_s'), MULTI_CHAR('i_name') ,MULTI_CHAR('i_name1')}; static const u64 farea_name[3] = {MULTI_CHAR('f_name_1'), MULTI_CHAR('f_name3'), MULTI_CHAR('f_name2')}; for (int i = 0; i < 3; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(area_name[i]))->setFont(mDoExt_getRubyFont()); + static_cast(mpTitleScreen->search(area_name[i]))->setString(0x40, ""); + mpTitleScreen->search(farea_name[i])->hide(); + } else { + static_cast(mpTitleScreen->search(farea_name[i]))->setFont(mDoExt_getRubyFont()); + static_cast(mpTitleScreen->search(farea_name[i]))->setString(0x40, ""); + mpTitleScreen->search(area_name[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(area_name[i])) ->setFont(mDoExt_getRubyFont()); static_cast(mpTitleScreen->search(area_name[i]))->setString(0x40, ""); @@ -2445,7 +2457,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { }; #endif for (int i = 0; i < 7; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(sfont_name[i]))->setFont(mDoExt_getRubyFont()); + static_cast(mpTitleScreen->search(sfont_name[i]))->setString(0x40, ""); + mpTitleScreen->search(ffont_name[i])->hide(); + } else { + static_cast(mpTitleScreen->search(ffont_name[i]))->setFont(mDoExt_getRubyFont()); + static_cast(mpTitleScreen->search(ffont_name[i]))->setString(0x40, ""); + mpTitleScreen->search(sfont_name[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(sfont_name[i])) ->setFont(mDoExt_getRubyFont()); static_cast(mpTitleScreen->search(sfont_name[i]))->setString(0x40, ""); @@ -2462,7 +2484,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 cont_zt[5] = {MULTI_CHAR('cont_zt'), MULTI_CHAR('cont_zt1'), MULTI_CHAR('cont_zt2'), MULTI_CHAR('cont_zt3'), MULTI_CHAR('cont_zt4')}; static const u64 font_zt[5] = {MULTI_CHAR('font_zt1'), MULTI_CHAR('font_zt2'), MULTI_CHAR('font_zt3'), MULTI_CHAR('font_zt4'), MULTI_CHAR('font_zt5')}; for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(cont_zt[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(cont_zt[i]))->setString(0x20, ""); + mpTitleScreen->search(font_zt[i])->hide(); + } else { + static_cast(mpTitleScreen->search(font_zt[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(font_zt[i]))->setString(0x20, ""); + mpTitleScreen->search(cont_zt[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(cont_zt[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(cont_zt[i]))->setString(0x20, ""); @@ -2483,7 +2515,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 font_bt[5] = {MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4'), MULTI_CHAR('font_bt5')}; #endif for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(cont_bt[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(cont_bt[i]))->setString(0x20, ""); + mpTitleScreen->search(font_bt[i])->hide(); + } else { + static_cast(mpTitleScreen->search(font_bt[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(font_bt[i]))->setString(0x20, ""); + mpTitleScreen->search(cont_bt[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(cont_bt[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(cont_bt[i]))->setString(0x20, ""); @@ -2500,7 +2542,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 cont_at[5] = {MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')}; static const u64 font_at[5] = {MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at5')}; for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(cont_at[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(cont_at[i]))->setString(0x20, ""); + mpTitleScreen->search(font_at[i])->hide(); + } else { + static_cast(mpTitleScreen->search(font_at[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(font_at[i]))->setString(0x20, ""); + mpTitleScreen->search(cont_at[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(cont_at[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(cont_at[i]))->setString(0x20, ""); @@ -2518,7 +2570,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 juji_c[5] = {MULTI_CHAR('juji_c00'), MULTI_CHAR('juji_c01'), MULTI_CHAR('juji_c02'), MULTI_CHAR('juji_c03'), MULTI_CHAR('juji_c04')}; static const u64 fuji_c[5] = {MULTI_CHAR('fuji_c00'), MULTI_CHAR('fuji_c01'), MULTI_CHAR('fuji_c02'), MULTI_CHAR('fuji_c03'), MULTI_CHAR('fuji_c04')}; for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(juji_c[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(juji_c[i]))->setString(0x20, ""); + mpTitleScreen->search(fuji_c[i])->hide(); + } else { + static_cast(mpTitleScreen->search(fuji_c[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(fuji_c[i]))->setString(0x20, ""); + mpTitleScreen->search(juji_c[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(juji_c[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(juji_c[i]))->setString(0x20, ""); @@ -2535,7 +2597,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) { static const u64 ast_c[5] = {MULTI_CHAR('ast_00'), MULTI_CHAR('ast_01'), MULTI_CHAR('ast_02'), MULTI_CHAR('ast_03'), MULTI_CHAR('ast_04')}; static const u64 fst_c[5] = {MULTI_CHAR('fst_00'), MULTI_CHAR('fst_01'), MULTI_CHAR('fst_02'), MULTI_CHAR('fst_03'), MULTI_CHAR('fst_04')}; for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + static_cast(mpTitleScreen->search(ast_c[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(ast_c[i]))->setString(0x20, ""); + mpTitleScreen->search(fst_c[i])->hide(); + } else { + static_cast(mpTitleScreen->search(fst_c[i]))->setFont(mDoExt_getMesgFont()); + static_cast(mpTitleScreen->search(fst_c[i]))->setString(0x20, ""); + mpTitleScreen->search(ast_c[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN static_cast(mpTitleScreen->search(ast_c[i])) ->setFont(mDoExt_getMesgFont()); static_cast(mpTitleScreen->search(ast_c[i]))->setString(0x20, ""); @@ -2784,7 +2856,16 @@ void dMenu_Fmap2DTop_c::setMoyaAlpha(u8 i_alpha) { } void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 sfont_name[7] = { + MULTI_CHAR('sfont00'), MULTI_CHAR('sfontl0'), MULTI_CHAR('sfontl1'), MULTI_CHAR('sfontl2'), MULTI_CHAR('sfontb0'), MULTI_CHAR('sfontb1'), MULTI_CHAR('sfontb2') + }; + static const u64 ffont_name[7] = { + MULTI_CHAR('ffont00'), MULTI_CHAR('ffontl0'), MULTI_CHAR('ffontl1'), MULTI_CHAR('ffontl2'), MULTI_CHAR('ffontb0'), MULTI_CHAR('ffontb3'), MULTI_CHAR('ffontb4') + }; + + auto setTitleNameString_font_name = dusk::version::isRegionJpn() ? sfont_name : ffont_name; +#elif VERSION == VERSION_GCN_JPN static const u64 sfont_name[7] = { MULTI_CHAR('sfont00'), MULTI_CHAR('sfontl0'), MULTI_CHAR('sfontl1'), MULTI_CHAR('sfontl2'), MULTI_CHAR('sfontb0'), MULTI_CHAR('sfontb1'), MULTI_CHAR('sfontb2') }; @@ -2816,7 +2897,11 @@ void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) { } void dMenu_Fmap2DTop_c::setAreaNameString(u32 param_0) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 iarea_name[3] = {MULTI_CHAR('i_name_s'), MULTI_CHAR('i_name'), MULTI_CHAR('i_name1')}; + static const u64 farea_name[3] = {MULTI_CHAR('f_name_1'), MULTI_CHAR('f_name3'), MULTI_CHAR('f_name2')}; + auto setAreaNameString_area_name = dusk::version::isRegionJpn() ? iarea_name : farea_name; +#elif VERSION == VERSION_GCN_JPN static const u64 iarea_name[3] = {MULTI_CHAR('i_name_s'), MULTI_CHAR('i_name'), MULTI_CHAR('i_name1')}; #define setAreaNameString_area_name iarea_name #else @@ -2849,7 +2934,11 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) { dusk::ui::ControlOverride::Default); #endif -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 cont_zt[5] = {MULTI_CHAR('cont_zt'), MULTI_CHAR('cont_zt1'), MULTI_CHAR('cont_zt2'), MULTI_CHAR('cont_zt3'), MULTI_CHAR('cont_zt4')}; + static const u64 font_zt[5] = {MULTI_CHAR('font_zt1'), MULTI_CHAR('font_zt2'), MULTI_CHAR('font_zt3'), MULTI_CHAR('font_zt4'), MULTI_CHAR('font_zt5')}; + auto setZButtonString_font_zt = dusk::version::isRegionJpn() ? cont_zt : font_zt; +#elif VERSION == VERSION_GCN_JPN static const u64 cont_zt[5] = {MULTI_CHAR('cont_zt'), MULTI_CHAR('cont_zt1'), MULTI_CHAR('cont_zt2'), MULTI_CHAR('cont_zt3'), MULTI_CHAR('cont_zt4')}; #define setZButtonString_font_zt cont_zt #else @@ -2883,7 +2972,11 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) { } void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 cont_bt[5] = {MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4'), MULTI_CHAR('cont_bt')}; + static const u64 font_bt[5] = {MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4'), MULTI_CHAR('font_bt5')}; + auto setBButtonString_font_bt = dusk::version::isRegionJpn() ? cont_bt : font_bt; +#elif VERSION == VERSION_GCN_JPN static const u64 cont_bt[5] = {MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4'), MULTI_CHAR('cont_bt')}; #define setBButtonString_font_bt cont_bt #else @@ -2909,7 +3002,11 @@ void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) { } void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 cont_at[5] = {MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')}; + static const u64 font_at[5] = {MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at5')}; + auto setAButtonString_font_at = dusk::version::isRegionJpn() ? cont_at : font_at; +#elif VERSION == VERSION_GCN_JPN static const u64 cont_at[5] = {MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')}; #define setAButtonString_font_at cont_at #else @@ -2936,21 +3033,24 @@ void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) { void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) { #if PLATFORM_GCN || (VERSION == VERSION_SHIELD) -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 juji_c_jpn[5] = {MULTI_CHAR('juji_c00'), MULTI_CHAR('juji_c01'), MULTI_CHAR('juji_c02'), MULTI_CHAR('juji_c03'), MULTI_CHAR('juji_c04')}; + static const u64 juji_c[5] = {MULTI_CHAR('fuji_c00'), MULTI_CHAR('fuji_c01'), MULTI_CHAR('fuji_c02'), MULTI_CHAR('fuji_c03'), MULTI_CHAR('fuji_c04')}; +#elif VERSION == VERSION_GCN_JPN static const u64 juji_c[5] = {MULTI_CHAR('juji_c00'), MULTI_CHAR('juji_c01'), MULTI_CHAR('juji_c02'), MULTI_CHAR('juji_c03'), MULTI_CHAR('juji_c04')}; #else static const u64 juji_c[5] = {MULTI_CHAR('fuji_c00'), MULTI_CHAR('fuji_c01'), MULTI_CHAR('fuji_c02'), MULTI_CHAR('fuji_c03'), MULTI_CHAR('fuji_c04')}; #endif if (param_0 == 0) { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(juji_c[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? juji_c_jpn[i] : juji_c[i], juji_c[i]))); SAFE_STRCPY(text_box->getStringPtr(), ""); } mpTitleScreen->search(MULTI_CHAR('juy_sha0'))->show(); mAlphaDpad = 1; } else { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(juji_c[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? juji_c_jpn[i] : juji_c[i], juji_c[i]))); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } mpTitleScreen->search(MULTI_CHAR('juy_sha0'))->show(); @@ -2961,21 +3061,24 @@ void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) { void dMenu_Fmap2DTop_c::set3DStickString(u32 param_0) { #if PLATFORM_GCN || (VERSION == VERSION_SHIELD) -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + static const u64 ast_c_jpn[5] = {MULTI_CHAR('ast_00'), MULTI_CHAR('ast_01'), MULTI_CHAR('ast_02'), MULTI_CHAR('ast_03'), MULTI_CHAR('ast_04')}; + static const u64 ast_c[5] = {MULTI_CHAR('fst_00'), MULTI_CHAR('fst_01'), MULTI_CHAR('fst_02'), MULTI_CHAR('fst_03'), MULTI_CHAR('fst_04')}; +#elif VERSION == VERSION_GCN_JPN static const u64 ast_c[5] = {MULTI_CHAR('ast_00'), MULTI_CHAR('ast_01'), MULTI_CHAR('ast_02'), MULTI_CHAR('ast_03'), MULTI_CHAR('ast_04')}; #else static const u64 ast_c[5] = {MULTI_CHAR('fst_00'), MULTI_CHAR('fst_01'), MULTI_CHAR('fst_02'), MULTI_CHAR('fst_03'), MULTI_CHAR('fst_04')}; #endif if (param_0 == 0) { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(ast_c[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? ast_c_jpn[i] : ast_c[i], ast_c[i]))); SAFE_STRCPY(text_box->getStringPtr(), ""); } mpTitleScreen->search(MULTI_CHAR('as_sha0'))->show(); mAlphaAnalogStick = 1; } else { for (int i = 0; i < 5; i++) { - J2DTextBox* text_box = static_cast(mpTitleScreen->search(ast_c[i])); + J2DTextBox* text_box = static_cast(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? ast_c_jpn[i] : ast_c[i], ast_c[i]))); dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL); } mpTitleScreen->search(MULTI_CHAR('as_sha0'))->show(); diff --git a/src/d/d_menu_insect.cpp b/src/d/d_menu_insect.cpp index aa18407b09..e7917532a2 100644 --- a/src/d/d_menu_insect.cpp +++ b/src/d/d_menu_insect.cpp @@ -22,6 +22,8 @@ #include #include +#include "dusk/version.hpp" + #if TARGET_PC #include "dusk/menu_pointer.h" #endif @@ -535,7 +537,16 @@ void dMenu_Insect_c::screenSetBase() { } } } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* textBox; + if (dusk::version::isRegionJpn()) { + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00')); + mpScreen->search(MULTI_CHAR('f_t00'))->hide(); + } else { + textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('f_t00')); + mpScreen->search(MULTI_CHAR('t_t00'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00')); mpScreen->search(MULTI_CHAR('f_t00'))->hide(); #else @@ -558,7 +569,19 @@ void dMenu_Insect_c::screenSetExplain() { if (field_0xf6 == 0) { mpExpSubWin[1]->hide(); } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpInfoText = JKR_NEW CPaneMgr(mpExpScreen, MULTI_CHAR('mg_3line'), 0, NULL); + mpExpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + field_0x5c = (J2DTextBox*)mpExpScreen->search(MULTI_CHAR('w_msg_jp')); + mpExpScreen->search(MULTI_CHAR('ms_for_2'))->hide(); + } else { + mpInfoText = JKR_NEW CPaneMgr(mpExpScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + mpExpScreen->search(MULTI_CHAR('n_3line'))->hide(); + field_0x5c = (J2DTextBox*)mpExpScreen->search(MULTI_CHAR('ms_for_2')); + mpExpScreen->search(MULTI_CHAR('w_msg_jp'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpInfoText = JKR_NEW CPaneMgr(mpExpScreen, MULTI_CHAR('mg_3line'), 0, NULL); mpExpScreen->search(MULTI_CHAR('n_e4line'))->hide(); field_0x5c = (J2DTextBox*)mpExpScreen->search(MULTI_CHAR('w_msg_jp')); diff --git a/src/d/d_menu_item_explain.cpp b/src/d/d_menu_item_explain.cpp index bebcb2cdb0..9ef85ed32e 100644 --- a/src/d/d_menu_item_explain.cpp +++ b/src/d/d_menu_item_explain.cpp @@ -5,25 +5,26 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_menu_item_explain.h" +#include +#include #include "JSystem/J2DGraph/J2DTextBox.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JUtility/JUTTexture.h" -#include -#include #include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" #include "d/d_item.h" #include "d/d_kantera_icon_meter.h" #include "d/d_lib.h" -#include "d/d_select_cursor.h" +#include "d/d_menu_item_explain.h" #include "d/d_meter2_info.h" #include "d/d_meter_HIO.h" -#include "d/d_msg_string.h" -#include "m_Do/m_Do_controller_pad.h" -#include "m_Do/m_Do_graphic.h" #include "d/d_msg_scrn_3select.h" #include "d/d_msg_scrn_arrow.h" +#include "d/d_msg_string.h" +#include "d/d_select_cursor.h" +#include "dusk/version.hpp" +#include "m_Do/m_Do_controller_pad.h" +#include "m_Do/m_Do_graphic.h" typedef void (dMenu_ItemExplain_c::*initFunc)(); static initFunc init_process[] = { @@ -103,7 +104,16 @@ dMenu_ItemExplain_c::dMenu_ItemExplain_c(JKRExpHeap* i_heap, JKRArchive* i_archi mDescAlpha = 0.0f; field_0x78 = 0; mAlphaRatio = 201.0f; -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpInfoText = JKR_NEW CPaneMgr(mpInfoScreen, MULTI_CHAR('i_text4'), 0, NULL); + mpInfoScreen->search(MULTI_CHAR('i_text1'))->hide(); + } else { + mpInfoText = JKR_NEW CPaneMgr(mpInfoScreen, MULTI_CHAR('i_text1'), 0, NULL); + mpInfoScreen->search(MULTI_CHAR('i_text4'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpInfoText = JKR_NEW CPaneMgr(mpInfoScreen, MULTI_CHAR('i_text4'), 0, NULL); mpInfoScreen->search(MULTI_CHAR('i_text1'))->hide(); #else @@ -114,7 +124,15 @@ dMenu_ItemExplain_c::dMenu_ItemExplain_c(JKRExpHeap* i_heap, JKRArchive* i_archi ((J2DTextBox*)(mpInfoText->getPanePtr()))->setString(0x200, ""); mpInfoText->show(); for (int i = 0; i < 4; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpNameText[i] = JKR_NEW CPaneMgr(mpInfoScreen, name_tag[i], 0, NULL); + mpInfoScreen->search(fame_tag[i])->hide(); + } else { + mpNameText[i] = JKR_NEW CPaneMgr(mpInfoScreen, fame_tag[i], 0, NULL); + mpInfoScreen->search(name_tag[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpNameText[i] = JKR_NEW CPaneMgr(mpInfoScreen, name_tag[i], 0, NULL); mpInfoScreen->search(fame_tag[i])->hide(); #else diff --git a/src/d/d_menu_letter.cpp b/src/d/d_menu_letter.cpp index 3f997bbda5..a1349e9fe5 100644 --- a/src/d/d_menu_letter.cpp +++ b/src/d/d_menu_letter.cpp @@ -21,6 +21,7 @@ #include "dusk/achievements.h" #include "dusk/menu_pointer.h" #include "dusk/ui/touch_controls.hpp" +#include "dusk/version.hpp" static void enable_turn_page_controls(bool enabled) { const auto controlOverride = @@ -30,7 +31,9 @@ static void enable_turn_page_controls(bool enabled) { } #endif -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC +#define D_MENU_LETTER_LINE_MAX (dusk::version::isRegionJpn() ? 9 : 12) +#elif VERSION == VERSION_GCN_JPN #define D_MENU_LETTER_LINE_MAX 9 #else #define D_MENU_LETTER_LINE_MAX 12 @@ -459,7 +462,16 @@ void dMenu_Letter_c::wait_move() { } if (mProcess == 1 || mProcess == 2) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* textBox; + if (dusk::version::isRegionJpn()) { + textBox = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00')); + mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); + } else { + textBox = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('f_t_00')); + mpBaseScreen->search(MULTI_CHAR('t_t00'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* textBox = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00')); mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); #else @@ -811,6 +823,15 @@ void dMenu_Letter_c::screenSetMenu() { static const u64 tag_frame[6] = { MULTI_CHAR('flame_00'), MULTI_CHAR('flame_01'), MULTI_CHAR('flame_02'), MULTI_CHAR('flame_03'), MULTI_CHAR('flame_04'), MULTI_CHAR('flame_05'), }; + +#if TARGET_PC + static const u64 tag_menu0_jpn[6] = { + MULTI_CHAR('menu_t0'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t4'), MULTI_CHAR('menu_t5'), + }; + static const u64 tag_menu0[6] = { + MULTI_CHAR('fenu_t0'), MULTI_CHAR('fenu_t1'), MULTI_CHAR('fenu_t2'), MULTI_CHAR('fenu_t3'), MULTI_CHAR('fenu_t4'), MULTI_CHAR('fenu_t5'), + }; +#else static const u64 tag_menu0[6] = { #if VERSION == VERSION_GCN_JPN MULTI_CHAR('menu_t0'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t4'), MULTI_CHAR('menu_t5'), @@ -818,6 +839,16 @@ void dMenu_Letter_c::screenSetMenu() { MULTI_CHAR('fenu_t0'), MULTI_CHAR('fenu_t1'), MULTI_CHAR('fenu_t2'), MULTI_CHAR('fenu_t3'), MULTI_CHAR('fenu_t4'), MULTI_CHAR('fenu_t5'), #endif }; +#endif + +#if TARGET_PC + static const u64 tag_menu1_jpn[6] = { + MULTI_CHAR('menu_f6'), MULTI_CHAR('menu_f7'), MULTI_CHAR('menu_t8'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t11'), + }; + static const u64 tag_menu1[6] = { + MULTI_CHAR('fenu_t6'), MULTI_CHAR('fenu_t7'), MULTI_CHAR('fenu_t8'), MULTI_CHAR('fenu_t9'), MULTI_CHAR('fenu_t10'), MULTI_CHAR('fenu_t11'), + }; +#else static const u64 tag_menu1[6] = { #if VERSION == VERSION_GCN_JPN MULTI_CHAR('menu_f6'), MULTI_CHAR('menu_f7'), MULTI_CHAR('menu_t8'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t11'), @@ -825,6 +856,8 @@ void dMenu_Letter_c::screenSetMenu() { MULTI_CHAR('fenu_t6'), MULTI_CHAR('fenu_t7'), MULTI_CHAR('fenu_t8'), MULTI_CHAR('fenu_t9'), MULTI_CHAR('fenu_t10'), MULTI_CHAR('fenu_t11'), #endif }; +#endif + static const u64 tag_midoku[6] = { MULTI_CHAR('midoku_0'), MULTI_CHAR('midoku_1'), MULTI_CHAR('midoku_2'), MULTI_CHAR('midoku_3'), MULTI_CHAR('midoku_4'), MULTI_CHAR('midoku_5'), }; @@ -838,7 +871,27 @@ void dMenu_Letter_c::screenSetMenu() { JUT_ASSERT(1161, mpParent[0] != NULL); mpParent[0]->setAlphaRate(0.0f); for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]); + field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]); + field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]); + field_0x124[i][3] = (J2DTextBox*)mpMenuScreen->search(tag_name1[i]); + mpMenuScreen->search(ftag_sub0[i])->hide(); + mpMenuScreen->search(ftag_sub1[i])->hide(); + mpMenuScreen->search(ftag_name0[i])->hide(); + mpMenuScreen->search(ftag_name1[i])->hide(); + } else { + field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(ftag_sub0[i]); + field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(ftag_sub1[i]); + field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(ftag_name0[i]); + field_0x124[i][3] = (J2DTextBox*)mpMenuScreen->search(ftag_name1[i]); + mpMenuScreen->search(tag_sub0[i])->hide(); + mpMenuScreen->search(tag_sub1[i])->hide(); + mpMenuScreen->search(tag_name0[i])->hide(); + mpMenuScreen->search(tag_name1[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]); field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]); field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]); @@ -868,8 +921,8 @@ void dMenu_Letter_c::screenSetMenu() { } for (int i = 0; i < 6; i++) { field_0x34[i][0] = mpMenuScreen->search(tag_frame[i]); - field_0x34[i][1] = mpMenuScreen->search(tag_menu0[i]); - field_0x34[i][2] = mpMenuScreen->search(tag_menu1[i]); + field_0x34[i][1] = mpMenuScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? tag_menu0_jpn[i] : tag_menu0[i], tag_menu0[i])); + field_0x34[i][2] = mpMenuScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? tag_menu1_jpn[i] : tag_menu1[i], tag_menu1[i])); field_0x34[i][3] = mpMenuScreen->search(tag_letter[i]); field_0x34[i][4] = mpMenuScreen->search(tag_midoku[i]); if (i < field_0x373) { @@ -909,7 +962,27 @@ void dMenu_Letter_c::screenSetMenu() { mpDMYParent = JKR_NEW CPaneMgr(mpMenuDMYScreen, MULTI_CHAR('n_all'), 2, NULL); JUT_ASSERT(1285, mpDMYParent != NULL); for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub0[i]); + field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub1[i]); + field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name0[i]); + field_0x184[i][3] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name1[i]); + mpMenuDMYScreen->search(ftag_sub0[i])->hide(); + mpMenuDMYScreen->search(ftag_sub1[i])->hide(); + mpMenuDMYScreen->search(ftag_name0[i])->hide(); + mpMenuDMYScreen->search(ftag_name1[i])->hide(); + } else { + field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_sub0[i]); + field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_sub1[i]); + field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_name0[i]); + field_0x184[i][3] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_name1[i]); + mpMenuDMYScreen->search(tag_sub0[i])->hide(); + mpMenuDMYScreen->search(tag_sub1[i])->hide(); + mpMenuDMYScreen->search(tag_name0[i])->hide(); + mpMenuDMYScreen->search(tag_name1[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub0[i]); field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub1[i]); field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name0[i]); @@ -964,7 +1037,16 @@ void dMenu_Letter_c::screenSetBase() { mpParent[1] = JKR_NEW CPaneMgr(mpBaseScreen, MULTI_CHAR('n_all'), 2, NULL); JUT_ASSERT(1372, mpParent[1] != NULL); mpParent[1]->setAlphaRate(0.0f); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* piVar9; + if (dusk::version::isRegionJpn()) { + piVar9 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00')); + mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); + } else { + piVar9 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('f_t_00')); + mpBaseScreen->search(MULTI_CHAR('t_t00'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* piVar9 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00')); mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide(); #else @@ -975,7 +1057,31 @@ void dMenu_Letter_c::screenSetBase() { piVar9->setFont(mDoExt_getSubFont()); dComIfGp_setMessageCountNumber(field_0x374 + (field_0x36f + 1) * 100); mpString->getString(0x4d6, piVar9, NULL, NULL, NULL, 0); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* text1; + J2DTextBox* text2; + J2DTextBox* text3; + J2DTextBox* text4; + if (dusk::version::isRegionJpn()) { + text1 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('wps_text')); + text2 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('w_p_text')); + text3 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('g_ps_txt')); + text4 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('g_p_text')); + mpBaseScreen->search(MULTI_CHAR('fwpstex1'))->hide(); + mpBaseScreen->search(MULTI_CHAR('fwp_tex1'))->hide(); + mpBaseScreen->search(MULTI_CHAR('fgps_tx1'))->hide(); + mpBaseScreen->search(MULTI_CHAR('fgp_tex1'))->hide(); + } else { + text1 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fwpstex1')); + text2 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fwp_tex1')); + text3 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fgps_tx1')); + text4 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fgp_tex1')); + mpBaseScreen->search(MULTI_CHAR('wps_text'))->hide(); + mpBaseScreen->search(MULTI_CHAR('w_p_text'))->hide(); + mpBaseScreen->search(MULTI_CHAR('g_ps_txt'))->hide(); + mpBaseScreen->search(MULTI_CHAR('g_p_text'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* text1 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('wps_text')); J2DTextBox* text2 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('w_p_text')); J2DTextBox* text3 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('g_ps_txt')); @@ -1059,7 +1165,96 @@ void dMenu_Letter_c::screenSetLetter() { JUT_ASSERT(1511, fg != false); dPaneClass_showNullPane(mpLetterScreen[0]); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0) { + field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('t3f_s'), 0, NULL); + field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3flin'), 0, NULL); + field_0x2f4[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3f_s'), 0, NULL); + field_0x2f4[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3f'), 0, NULL); + mpLetterScreen[0]->search('t4_s')->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_e4lin'))->hide(); + mpLetterScreen[0]->search('t3_s')->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3line'))->hide(); + mpLineParent = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('jp_fri_n'), 0, NULL); + JUT_ASSERT(1530, mpLineParent != NULL); + for (int i = 0; i < 12; i++) { + static u64 const line_tag[12] = { + MULTI_CHAR('line00'), MULTI_CHAR('line01'), MULTI_CHAR('line02'), MULTI_CHAR('line03'), MULTI_CHAR('line04'), MULTI_CHAR('line05'), + MULTI_CHAR('line06'), MULTI_CHAR('line07'), MULTI_CHAR('line08'), + }; + + if (line_tag[i] != 0) { + field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]); + } else { + field_0x25c[i] = NULL; + } + } + mpLetterScreen[0]->search('jp_n')->hide(); + mpLetterScreen[0]->search('us_n')->hide(); + + ((J2DTextBox*)field_0x2f4[0]->getPanePtr())->setLineSpace(((J2DTextBox*)field_0x2ec[0]->getPanePtr())->getLineSpace()); + ((J2DTextBox*)field_0x2f4[1]->getPanePtr())->setLineSpace(((J2DTextBox*)field_0x2ec[1]->getPanePtr())->getLineSpace()); + } else { + field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], 't3_s', 0, NULL); + field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3line'), 0, NULL); + for (int i = 0; i < 2; i++) { + field_0x2f4[i] = NULL; + } + mpLetterScreen[0]->search('t4_s')->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_e4lin'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('t3f_s'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3flin'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3f_s'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3f'))->hide(); + mpLineParent = JKR_NEW CPaneMgr(mpLetterScreen[0], 'jp_n', 0, NULL); + JUT_ASSERT(1530, mpLineParent != NULL); + for (int i = 0; i < 12; i++) { + static u64 const line_tag[12] = { + MULTI_CHAR('line21'), MULTI_CHAR('line22'), MULTI_CHAR('line23'), MULTI_CHAR('line24'), MULTI_CHAR('line25'), MULTI_CHAR('line26'), + MULTI_CHAR('line27'), MULTI_CHAR('line28'), MULTI_CHAR('line29'), + }; + + if (line_tag[i] != 0) { + field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]); + } else { + field_0x25c[i] = NULL; + } + } + + mpLetterScreen[0]->search(MULTI_CHAR('jp_fri_n'))->hide(); + mpLetterScreen[0]->search('us_n')->hide(); + } + } else { + static u64 const line_tag[12] = { + MULTI_CHAR('line09'), MULTI_CHAR('line10'), MULTI_CHAR('line11'), MULTI_CHAR('line12'), MULTI_CHAR('line13'), MULTI_CHAR('line14'), + MULTI_CHAR('line15'), MULTI_CHAR('line16'), MULTI_CHAR('line17'), MULTI_CHAR('line18'), MULTI_CHAR('line19'), MULTI_CHAR('line20'), + }; + + field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], 't4_s', 0, NULL); + field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_e4lin'), 0, NULL); + for (int i = 0; i < 2; i++) { + field_0x2f4[i] = NULL; + } + mpLetterScreen[0]->search(MULTI_CHAR('t3f_s'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3flin'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3f_s'))->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3f'))->hide(); + mpLetterScreen[0]->search('t3_s')->hide(); + mpLetterScreen[0]->search(MULTI_CHAR('mg_3line'))->hide(); + mpLineParent = JKR_NEW CPaneMgr(mpLetterScreen[0], 'us_n', 0, NULL); + JUT_ASSERT(1530, mpLineParent != NULL); + for (int i = 0; i < 12; i++) { + if (line_tag[i] != 0) { + field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]); + } else { + field_0x25c[i] = NULL; + } + } + mpLetterScreen[0]->search(MULTI_CHAR('jp_fri_n'))->hide(); + mpLetterScreen[0]->search('jp_n')->hide(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0) { field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('t3f_s'), 0, NULL); field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3flin'), 0, NULL); @@ -1148,20 +1343,20 @@ void dMenu_Letter_c::screenSetLetter() { mpLetterScreen[0]->search('jp_n')->hide(); #endif +#if TARGET_PC +#define STR_BUF_LEN 528 +#elif VERSION == VERSION_GCN_JPN +#define STR_BUF_LEN 528 +#else +#define STR_BUF_LEN 512 +#endif + for (int i = 0; i < 2; i++) { ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(STR_BUF_LEN, ""); if (field_0x2f4[i] != NULL) { ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(STR_BUF_LEN, ""); } } field_0x1e4[0] = (J2DTextBox*)mpLetterScreen[0]->search(MULTI_CHAR('p_texts')); diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index 94babc8342..cb9af850c0 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -25,6 +25,7 @@ #include #include "JSystem/JAudio2/JASDriverIF.h" +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/menu_pointer.h" @@ -34,7 +35,7 @@ typedef void (dMenu_Option_c::*initFunc)(); static initFunc init[] = { &dMenu_Option_c::atten_init, -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN &dMenu_Option_c::ruby_init, #endif &dMenu_Option_c::vib_init, @@ -46,7 +47,7 @@ static initFunc init[] = { typedef void (dMenu_Option_c::*processFunc)(); static processFunc process[] = { &dMenu_Option_c::atten_move, -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN &dMenu_Option_c::ruby_move, #endif &dMenu_Option_c::vib_move, @@ -68,21 +69,6 @@ static calibrationFunc calibration_process[] = { &dMenu_Option_c::calibration_close2_move, }; -enum SelectType { -#if VERSION == VERSION_GCN_JPN - SelectType0_JPN, -#endif - SelectType0, - SelectType1, - SelectType2, - SelectType3, - SelectType4, - SelectType5, - SelectType6, - SelectType7, - SelectType8, -}; - #if TARGET_PC static dusk::menu_pointer::TargetId option_yes_no_target(u8 index) noexcept { return static_cast(0x100 + index); @@ -271,11 +257,11 @@ void dMenu_Option_c::_create() { field_0x3e1 = 10; field_0x3e2 = 0xff; field_0x3e3 = 0xc0; - field_0x3ef = 0; + field_0x3ef = PROC_ATTEN_e; field_0x3f0 = 0xff; field_0x3f1 = 0xff; field_0x3f2 = 0; - field_0x3f5 = 0; + field_0x3f5 = PROC_ATTEN_e; field_0x3f3 = 5; field_0x3f4 = 5; field_0x334 = 0.0f; @@ -499,9 +485,9 @@ void dMenu_Option_c::_move() { } if (mDoGph_gInf_c::getFader()->getStatus() == 1) { - if (mDoCPd_c::getTrigA(PAD_1) != 0 && field_0x3ef != SelectType3 && field_0x3f3 == 5) { - if (field_0x3f4 == 5 && field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && - field_0x3ef != SelectType7) + if (mDoCPd_c::getTrigA(PAD_1) != 0 && field_0x3ef != PROC_CHANGE_MOVE_e && field_0x3f3 == 5) { + if (field_0x3f4 == 5 && field_0x3ef != PROC_CONFIRM_OPEN_MOVE_e && field_0x3ef != PROC_CONFIRM_MOVE_MOVE_e && field_0x3ef != PROC_CONFIRM_SELECT_MOVE_e && + field_0x3ef != PROC_CONFIRM_CLOSE_MOVE_e) { if (mDoCPd_c::getTrigStart(PAD_1) == 0 && mDoCPd_c::getTrigB(PAD_1) == 0) { if (mDoCPd_c::getTrigUp(PAD_1) == 0 && mDoCPd_c::getTrigDown(PAD_1) == 0 && @@ -509,7 +495,7 @@ void dMenu_Option_c::_move() { { field_0x3f7 = 1; field_0x3f5 = field_0x3ef; - field_0x3ef = SelectType4; + field_0x3ef = PROC_CONFIRM_OPEN_MOVE_e; dMeter2Info_set2DVibration(); (this->*init[field_0x3ef])(); goto skip; @@ -518,8 +504,8 @@ void dMenu_Option_c::_move() { } } - if (mDoCPd_c::getTrigB(PAD_1) != 0 && field_0x3ef != SelectType3 && field_0x3f3 == 5 && - field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && field_0x3ef != SelectType7) + if (mDoCPd_c::getTrigB(PAD_1) != 0 && field_0x3ef != PROC_CHANGE_MOVE_e && field_0x3f3 == 5 && + field_0x3ef != PROC_CONFIRM_OPEN_MOVE_e && field_0x3ef != PROC_CONFIRM_MOVE_MOVE_e && field_0x3ef != PROC_CONFIRM_SELECT_MOVE_e && field_0x3ef != PROC_CONFIRM_CLOSE_MOVE_e) { if (field_0x3f4 == 5 && mDoCPd_c::getTrigStart(PAD_1) == 0 && mDoCPd_c::getTrigA(PAD_1) == 0 && mDoCPd_c::getTrigUp(PAD_1) == 0 && @@ -528,16 +514,16 @@ void dMenu_Option_c::_move() { { field_0x3f7 = 0; field_0x3f5 = field_0x3ef; - field_0x3ef = SelectType4; + field_0x3ef = PROC_CONFIRM_OPEN_MOVE_e; dMeter2Info_set2DVibration(); (this->*init[field_0x3ef])(); } } #if TARGET_PC - if (field_0x3f4 == 5 && field_0x3ef != SelectType3 && field_0x3f3 == 5 && - field_0x3ef != SelectType4 && field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && - field_0x3ef != SelectType7 && pointerConfirmSelect()) + if (field_0x3f4 == 5 && field_0x3ef != PROC_CHANGE_MOVE_e && field_0x3f3 == 5 && + field_0x3ef != PROC_CONFIRM_OPEN_MOVE_e && field_0x3ef != PROC_CONFIRM_MOVE_MOVE_e && field_0x3ef != PROC_CONFIRM_SELECT_MOVE_e && + field_0x3ef != PROC_CONFIRM_CLOSE_MOVE_e && pointerConfirmSelect()) { goto skip; } @@ -545,7 +531,7 @@ void dMenu_Option_c::_move() { } skip: u8 oldValue = field_0x3ef; - if (field_0x3f3 == 5 && oldValue != SelectType4 && oldValue != SelectType5 && oldValue != SelectType6 && oldValue != SelectType7) { + if (field_0x3f3 == 5 && oldValue != PROC_CONFIRM_OPEN_MOVE_e && oldValue != PROC_CONFIRM_MOVE_MOVE_e && oldValue != PROC_CONFIRM_SELECT_MOVE_e && oldValue != PROC_CONFIRM_CLOSE_MOVE_e) { dpdMenuMove(); } @@ -624,8 +610,8 @@ void dMenu_Option_c::drawHaihai() { field_0x3f6 = 0; field_0x3f6 |= 1; field_0x3f6 |= 4; - if (selectType < SelectType4 && field_0x3f6 != 0 && field_0x3f3 == 5 && field_0x3ef != SelectType4 && - field_0x3ef != SelectType5 && field_0x3ef != SelectType6 && field_0x3ef != SelectType7) + if (selectType < PROC_CONFIRM_OPEN_MOVE_e && field_0x3f6 != 0 && field_0x3f3 == 5 && field_0x3ef != PROC_CONFIRM_OPEN_MOVE_e && + field_0x3ef != PROC_CONFIRM_MOVE_MOVE_e && field_0x3ef != PROC_CONFIRM_SELECT_MOVE_e && field_0x3ef != PROC_CONFIRM_CLOSE_MOVE_e) { mpMeterHaihai->_execute(0); Vec haihaiPosL = @@ -766,7 +752,13 @@ void dMenu_Option_c::atten_move() { if (field_0x3f3 != 5) { (this->*tv_process[field_0x3f3])(); } else if (downTrigger) { - field_0x3ef = 1; +#if TARGET_PC + field_0x3ef = dusk::version::isRegionJpn() ? PROC_RUBY_e : PROC_VIB_e; +#elif VERSION == VERSION_GCN_JPN + field_0x3ef = PROC_RUBY_e; +#else + field_0x3ef = PROC_VIB_e; +#endif Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (leftTrigger) { if (field_0x3e4 == 0) { @@ -776,8 +768,8 @@ void dMenu_Option_c::atten_move() { field_0x3e4 = 0; field_0x3da = -5; } - field_0x3ef = SelectType3; - field_0x3f5 = 0; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_ATTEN_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (rightTrigger) { if (field_0x3e4 == 0) { @@ -787,16 +779,23 @@ void dMenu_Option_c::atten_move() { field_0x3e4 = 0; field_0x3da = 5; } - field_0x3ef = SelectType3; - field_0x3f5 = 0; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_ATTEN_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else { changeTVCheck(); } } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN void dMenu_Option_c::ruby_init() { +#if TARGET_PC + if (!dusk::version::isRegionJpn()) { + vib_init(); + return; + } +#endif + mpDrawCursor->setAlphaRate(1.0f); setCursorPos(1); setAButtonString(0x40c); @@ -804,6 +803,12 @@ void dMenu_Option_c::ruby_init() { } void dMenu_Option_c::ruby_move() { +#if TARGET_PC + if (!dusk::version::isRegionJpn()) { + vib_move(); + return; + } +#endif bool upTrigger = mpStick->checkUpTrigger(); bool downTrigger= mpStick->checkDownTrigger(); @@ -813,10 +818,10 @@ void dMenu_Option_c::ruby_move() { if (field_0x3f3 != 5) { (this->*tv_process[field_0x3f3])(); } else if (upTrigger) { - field_0x3ef = SelectType0_JPN; + field_0x3ef = PROC_ATTEN_e; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (downTrigger) { - field_0x3ef = SelectType1; + field_0x3ef = PROC_VIB_e; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (leftTrigger) { if (field_0x3e5_JPN == 0) { @@ -826,8 +831,8 @@ void dMenu_Option_c::ruby_move() { field_0x3e5_JPN = 0; field_0x3da = -5; } - field_0x3ef = SelectType3; - field_0x3f5 = SelectType0; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_RUBY_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (rightTrigger) { if (field_0x3e5_JPN == 0) { @@ -837,8 +842,8 @@ void dMenu_Option_c::ruby_move() { field_0x3e5_JPN = 0; field_0x3da = 5; } - field_0x3ef = SelectType3; - field_0x3f5 = SelectType0; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_RUBY_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else { changeTVCheck(); @@ -848,7 +853,7 @@ void dMenu_Option_c::ruby_move() { void dMenu_Option_c::vib_init() { mpDrawCursor->setAlphaRate(1.0f); - setCursorPos(SelectType1); + setCursorPos(PROC_VIB_e); setAButtonString(0x40C); setBButtonString(0x3F9); } @@ -862,10 +867,16 @@ void dMenu_Option_c::vib_move() { if (field_0x3f3 != 5) { (this->*tv_process[field_0x3f3])(); } else if (upTrigger) { - field_0x3ef = SelectType0; +#if TARGET_PC + field_0x3ef = dusk::version::isRegionJpn() ? PROC_RUBY_e : PROC_ATTEN_e; +#elif VERSION == VERSION_GCN_JPN + field_0x3ef = PROC_RUBY_e; +#else + field_0x3ef = PROC_ATTEN_e; +#endif Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (downTrigger) { - field_0x3ef = SelectType2; + field_0x3ef = PROC_SOUND_e; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (leftTrigger) { if (isRumbleSupported()) { @@ -877,8 +888,8 @@ void dMenu_Option_c::vib_move() { field_0x3ea = 0; field_0x3da = -5; } - field_0x3ef = SelectType3; - field_0x3f5 = SelectType1; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_VIB_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } @@ -892,8 +903,8 @@ void dMenu_Option_c::vib_move() { field_0x3ea = 0; field_0x3da = 5; } - field_0x3ef = SelectType3; - field_0x3f5 = SelectType1; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_VIB_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } @@ -904,7 +915,7 @@ void dMenu_Option_c::vib_move() { void dMenu_Option_c::sound_init() { mpDrawCursor->setAlphaRate(1.0f); - setCursorPos(SelectType2); + setCursorPos(PROC_SOUND_e); setAButtonString(0x40C); setBButtonString(0x3F9); } @@ -918,7 +929,7 @@ void dMenu_Option_c::sound_move() { if (field_0x3f3 != 5) { (this->*tv_process[field_0x3f3])(); } else if (upTrigger) { - field_0x3ef = SelectType1; + field_0x3ef = PROC_VIB_e; Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (leftTrigger) { if (field_0x3e9 == 2) { @@ -943,8 +954,8 @@ void dMenu_Option_c::sound_move() { } mDoAud_setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); - field_0x3ef = SelectType3; - field_0x3f5 = SelectType2; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_SOUND_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else if (rightTrigger) { if (field_0x3e9 == 0) { @@ -969,8 +980,8 @@ void dMenu_Option_c::sound_move() { } mDoAud_setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); - field_0x3ef = SelectType3; - field_0x3f5 = SelectType2; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_SOUND_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } else { changeTVCheck(); @@ -992,32 +1003,28 @@ void dMenu_Option_c::change_move() { } u8 index; switch (field_0x3f5) { -#if VERSION == VERSION_GCN_JPN - case SelectType0_JPN: - index = SelectType0_JPN; + case PROC_ATTEN_e: + index = PROC_ATTEN_e; if (field_0x3da == 0) { setAttenString(); } break; -#endif - case SelectType0: - index = SelectType0; + case PROC_RUBY_e: + index = PROC_RUBY_e; if (field_0x3da == 0) { -#if VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) setRubyString(); -#else - setAttenString(); -#endif + IF_DUSK_BLOCK_END } break; - case SelectType1: - index = SelectType1; + case PROC_VIB_e: + index = DUSK_IF_ELSE(dusk::version::isRegionJpn() ? 2 : 1, PROC_VIB_e); if (field_0x3da == 0) { setVibString(); } break; - case SelectType2: - index = SelectType2; + case PROC_SOUND_e: + index = DUSK_IF_ELSE(dusk::version::isRegionJpn() ? 3 : 2, PROC_SOUND_e); if (field_0x3da == 0) { setSoundString(); } @@ -1083,7 +1090,7 @@ void dMenu_Option_c::confirm_open_move() { } if (status == 1 && yesNoMenuMove == 1 && field_0x374 == 1.0f) { yesnoCursorShow(); - field_0x3ef = SelectType5; + field_0x3ef = PROC_CONFIRM_MOVE_MOVE_e; } mpWarning->_move(); setAnimation(); @@ -1113,21 +1120,21 @@ void dMenu_Option_c::confirm_move_move() { field_0x3f9 = i; if (clicked) { yesNoSelectStart(); - field_0x3ef = SelectType7; + field_0x3ef = PROC_CONFIRM_CLOSE_MOVE_e; dMeter2Info_set2DVibrationM(); mpWarning->_move(); setAnimation(); return; } yesnoSelectAnmSet(); - field_0x3ef = SelectType6; + field_0x3ef = PROC_CONFIRM_SELECT_MOVE_e; mpWarning->_move(); setAnimation(); return; } if (clicked) { yesNoSelectStart(); - field_0x3ef = SelectType7; + field_0x3ef = PROC_CONFIRM_CLOSE_MOVE_e; dMeter2Info_set2DVibrationM(); mpWarning->_move(); setAnimation(); @@ -1138,12 +1145,12 @@ void dMenu_Option_c::confirm_move_move() { if (mDoCPd_c::getTrigA(PAD_1) != 0) { yesNoSelectStart(); - field_0x3ef = SelectType7; + field_0x3ef = PROC_CONFIRM_CLOSE_MOVE_e; dMeter2Info_set2DVibrationM(); } else if (mDoCPd_c::getTrigB(PAD_1) != 0) { field_0x3f9 = 0; yesnoCancelAnmSet(); - field_0x3ef = SelectType7; + field_0x3ef = PROC_CONFIRM_CLOSE_MOVE_e; dMeter2Info_set2DVibrationM(); } else if (rightTrigger != 0) { if (field_0x3f9 != 0) { @@ -1152,7 +1159,7 @@ void dMenu_Option_c::confirm_move_move() { field_0x3fa = field_0x3f9; field_0x3f9 = 0; yesnoSelectAnmSet(); - field_0x3ef = SelectType6; + field_0x3ef = PROC_CONFIRM_SELECT_MOVE_e; } } else if (leftTrigger != 0) { if (field_0x3f9 != 1) { @@ -1161,7 +1168,7 @@ void dMenu_Option_c::confirm_move_move() { field_0x3fa = field_0x3f9; field_0x3f9 = 1; yesnoSelectAnmSet(); - field_0x3ef = SelectType6; + field_0x3ef = PROC_CONFIRM_SELECT_MOVE_e; } } mpWarning->_move(); @@ -1195,14 +1202,14 @@ void dMenu_Option_c::confirm_select_move() { dusk::menu_pointer::Context::Options, option_yes_no_target(field_0x3f9))) { yesNoSelectStart(); - field_0x3ef = SelectType7; + field_0x3ef = PROC_CONFIRM_CLOSE_MOVE_e; dMeter2Info_set2DVibrationM(); mpWarning->_move(); setAnimation(); return; } #endif - field_0x3ef = SelectType5; + field_0x3ef = PROC_CONFIRM_MOVE_MOVE_e; } mpWarning->_move(); setAnimation(); @@ -1231,8 +1238,8 @@ void dMenu_Option_c::confirm_close_move() { if (field_0x3f9 == 1) { mQuitStatus = 3; dComIfGs_setOptAttentionType(field_0x3e4); -#if VERSION == VERSION_GCN_JPN - if (field_0x3e5_JPN == 0) { +#if TARGET_PC || VERSION == VERSION_GCN_JPN + if (IF_DUSK(dusk::version::isRegionJpn() &&) field_0x3e5_JPN == 0) { dComIfGs_setOptRuby(1); } else { dComIfGs_setOptRuby(0); @@ -1346,7 +1353,14 @@ void dMenu_Option_c::calibration_close2_move() { void dMenu_Option_c::menuVisible() { for (int i = 0; i < 6; i++) { - if (i < SelectType3) { +#if TARGET_PC + if ((dusk::version::isRegionJpn() && i < 4) || i < 3) +#elif VERSION == VERSION_GCN_JPN + if (i < 4) +#else + if (i < 3) +#endif + { menuShow(i); } else { menuHide(i); @@ -1396,7 +1410,16 @@ void dMenu_Option_c::screenSet() { static const u64 tag_frame[6] = { MULTI_CHAR('flame_00'), MULTI_CHAR('flame_01'), MULTI_CHAR('flame_02'), MULTI_CHAR('flame_03'), MULTI_CHAR('flame_04'), MULTI_CHAR('flame_05'), }; -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + static const u64 tag_menu0_jpn[6] = { + MULTI_CHAR('menu_t0'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t4'), MULTI_CHAR('menu_t5'), + }; + + static const u64 tag_menu0[6] = { + MULTI_CHAR('fenu_t0'), MULTI_CHAR('fenu_t1'), MULTI_CHAR('fenu_t2'), MULTI_CHAR('fenu_t3'), MULTI_CHAR('fenu_t4'), MULTI_CHAR('fenu_t5'), + }; +#elif VERSION == VERSION_GCN_JPN static const u64 tag_menu0[6] = { MULTI_CHAR('menu_t0'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t4'), MULTI_CHAR('menu_t5'), }; @@ -1405,6 +1428,7 @@ void dMenu_Option_c::screenSet() { MULTI_CHAR('fenu_t0'), MULTI_CHAR('fenu_t1'), MULTI_CHAR('fenu_t2'), MULTI_CHAR('fenu_t3'), MULTI_CHAR('fenu_t4'), MULTI_CHAR('fenu_t5'), }; #endif + static const u64 let_n[6] = { MULTI_CHAR('let_00_n'), MULTI_CHAR('let_01_n'), MULTI_CHAR('let_02_n'), MULTI_CHAR('let_03_n'), MULTI_CHAR('let_04_n'), MULTI_CHAR('let_05_n'), }; @@ -1444,7 +1468,34 @@ void dMenu_Option_c::screenSet() { static const u64 ftv_btnA[5] = { MULTI_CHAR('font_a1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at'), }; -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + static const u64 fenu_t0_jpn[2] = {MULTI_CHAR('fenu_t0s'), MULTI_CHAR('fenu_t0')}; + static const u64 menu_t0_jpn[2] = {MULTI_CHAR('menu_t0s'), MULTI_CHAR('menu_t0')}; + static const u64 fenu_t1_jpn[2] = {MULTI_CHAR('fenu_t1s'), MULTI_CHAR('fenu_t1')}; + static const u64 menu_t1_jpn[2] = {MULTI_CHAR('menu_t1s'), MULTI_CHAR('menu_t1')}; + static const u64 fenu_t2_jpn[2] = {MULTI_CHAR('fenu_t2s'), MULTI_CHAR('fenu_t2')}; + static const u64 menu_t2_jpn[2] = {MULTI_CHAR('menu_t2s'), MULTI_CHAR('menu_t2')}; + static const u64 fenu_t3_jpn[2] = {MULTI_CHAR('fenu_t3s'), MULTI_CHAR('fenu_t3')}; + static const u64 menu_t3_jpn[2] = {MULTI_CHAR('menu_t3s'), MULTI_CHAR('menu_t3')}; + static const u64 fenu_t4_jpn[2] = {MULTI_CHAR('fenu_t4s'), MULTI_CHAR('fenu_t4')}; + static const u64 menu_t4_jpn[2] = {MULTI_CHAR('menu_t4s'), MULTI_CHAR('menu_t4')}; + static const u64 fenu_t5_jpn[2] = {MULTI_CHAR('fenu_t5s'), MULTI_CHAR('fenu_t5')}; + static const u64 menu_t5_jpn[2] = {MULTI_CHAR('menu_t5s'), MULTI_CHAR('menu_t5')}; + + static const u64 fenu_t0[2] = {MULTI_CHAR('fenu_t0s'), MULTI_CHAR('fenu_t0')}; + static const u64 menu_t0[2] = {MULTI_CHAR('menu_t0s'), MULTI_CHAR('menu_t0')}; + static const u64 fenu_t2[2] = {MULTI_CHAR('fenu_t1s'), MULTI_CHAR('fenu_t1')}; + static const u64 menu_t2[2] = {MULTI_CHAR('menu_t1s'), MULTI_CHAR('menu_t1')}; + static const u64 fenu_t3[2] = {MULTI_CHAR('fenu_t2s'), MULTI_CHAR('fenu_t2')}; + static const u64 menu_t3[2] = {MULTI_CHAR('menu_t2s'), MULTI_CHAR('menu_t2')}; + static const u64 fenu_t4[2] = {MULTI_CHAR('fenu_t3s'), MULTI_CHAR('fenu_t3')}; + static const u64 menu_t4[2] = {MULTI_CHAR('menu_t3s'), MULTI_CHAR('menu_t3')}; + static const u64 fenu_t1[2] = {MULTI_CHAR('fenu_t4s'), MULTI_CHAR('fenu_t4')}; + static const u64 menu_t1[2] = {MULTI_CHAR('menu_t4s'), MULTI_CHAR('menu_t4')}; + static const u64 fenu_t5[2] = {MULTI_CHAR('fenu_t5s'), MULTI_CHAR('fenu_t5')}; + static const u64 menu_t5[2] = {MULTI_CHAR('menu_t5s'), MULTI_CHAR('menu_t5')}; +#elif VERSION == VERSION_GCN_JPN static const u64 fenu_t0[2] = {MULTI_CHAR('fenu_t0s'), MULTI_CHAR('fenu_t0')}; static const u64 menu_t0[2] = {MULTI_CHAR('menu_t0s'), MULTI_CHAR('menu_t0')}; static const u64 fenu_t1[2] = {MULTI_CHAR('fenu_t1s'), MULTI_CHAR('fenu_t1')}; @@ -1501,7 +1552,15 @@ void dMenu_Option_c::screenSet() { static const u64 fenut_4[6] = { MULTI_CHAR('menut321'), MULTI_CHAR('menut320'), MULTI_CHAR('menut319'), MULTI_CHAR('menut318'), MULTI_CHAR('menut317'), MULTI_CHAR('menut316'), }; -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + static const u64 tx_jpn[6] = { + MULTI_CHAR('wps_text'), MULTI_CHAR('w_p_text'), MULTI_CHAR('g_ps_tx3'), MULTI_CHAR('g_p_tex3'), MULTI_CHAR('wps_tex1'), MULTI_CHAR('w_p_tex1'), + }; + static const u64 tx[6] = { + MULTI_CHAR('w_p_tex5'), MULTI_CHAR('w_p_tex6'), MULTI_CHAR('w_p_tex3'), MULTI_CHAR('w_p_tex4'), MULTI_CHAR('fps_tex1'), MULTI_CHAR('f_p_tex1'), + }; +#elif VERSION == VERSION_GCN_JPN static const u64 tx[6] = { MULTI_CHAR('wps_text'), MULTI_CHAR('w_p_text'), MULTI_CHAR('g_ps_tx3'), MULTI_CHAR('g_p_tex3'), MULTI_CHAR('wps_tex1'), MULTI_CHAR('w_p_tex1'), }; @@ -1510,13 +1569,24 @@ void dMenu_Option_c::screenSet() { MULTI_CHAR('w_p_tex5'), MULTI_CHAR('w_p_tex6'), MULTI_CHAR('w_p_tex3'), MULTI_CHAR('w_p_tex4'), MULTI_CHAR('fps_tex1'), MULTI_CHAR('f_p_tex1'), }; #endif + static const u64 op_tx[4] = { MULTI_CHAR('w_text_n'), MULTI_CHAR('w_btn_n'), MULTI_CHAR('w_k_t_n'), MULTI_CHAR('w_abtn_n'), }; static const u64 z_tx[3] = { MULTI_CHAR('z_gc_n'), 0, 0, }; -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + static const u64 txTV_jpn[10] = { + MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'), + MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'), + }; + static const u64 txTV[10] = { + MULTI_CHAR('menu_t61'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t91'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menut101'), + MULTI_CHAR('menu_t01'), MULTI_CHAR('menu_t71'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t81'), MULTI_CHAR('menu_t4'), + }; +#elif VERSION == VERSION_GCN_JPN static const u64 txTV[10] = { MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'), MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'), @@ -1533,7 +1603,7 @@ void dMenu_Option_c::screenSet() { mpWarning->mPosY = pos.y + g_drawHIO.mOptionScreen.mBackgroundPosY; for (int i = 0; i < 6; i++) { field_0x280[i] = (J2DPicture*)mpScreen->search(tag_frame[i]); - field_0x298[i] = (J2DTextBox*)mpScreen->search(tag_menu0[i]); + field_0x298[i] = (J2DTextBox*)mpScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? tag_menu0_jpn[i] : tag_menu0[i], tag_menu0[i])); } field_0x2b0[0] = field_0x280[1]->getBlack(); field_0x2c0[0] = field_0x280[1]->getWhite(); @@ -1600,7 +1670,23 @@ void dMenu_Option_c::screenSet() { mpMenuPane32[i] = NULL; } } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x270[0] = (J2DTextBox*)mpBackScreen->search(MULTI_CHAR('t_t00')); + field_0x270[1] = (J2DTextBox*)mpBackScreen->search(MULTI_CHAR('t_t01')); + mpBackScreen->search(MULTI_CHAR('f_t00'))->hide(); + mpBackScreen->search(MULTI_CHAR('t_t01'))->hide(); + field_0x270[2] = (J2DTextBox*)mpTVScreen->search(MULTI_CHAR('t_t00')); + mpTVScreen->search(MULTI_CHAR('f_t00'))->hide(); + } else { + field_0x270[0] = (J2DTextBox*)mpBackScreen->search(MULTI_CHAR('f_t00')); + field_0x270[1] = (J2DTextBox*)mpBackScreen->search(MULTI_CHAR('t_t01')); + mpBackScreen->search(MULTI_CHAR('t_t00'))->hide(); + mpBackScreen->search(MULTI_CHAR('t_t01'))->hide(); + field_0x270[2] = (J2DTextBox*)mpTVScreen->search(MULTI_CHAR('f_t00')); + mpTVScreen->search(MULTI_CHAR('t_t00'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x270[0] = (J2DTextBox*)mpBackScreen->search(MULTI_CHAR('t_t00')); field_0x270[1] = (J2DTextBox*)mpBackScreen->search(MULTI_CHAR('t_t01')); mpBackScreen->search(MULTI_CHAR('f_t00'))->hide(); @@ -1623,7 +1709,15 @@ void dMenu_Option_c::screenSet() { mpString->getString(0x547, field_0x270[1], NULL, NULL, NULL, 0); mpString->getString(0x55C, field_0x270[2], NULL, NULL, NULL, 0); for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(tv_btnA[i]); + mpTVScreen->search(ftv_btnA[i])->hide(); + } else { + field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(ftv_btnA[i]); + mpTVScreen->search(tv_btnA[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(tv_btnA[i]); mpTVScreen->search(ftv_btnA[i])->hide(); #else @@ -1634,8 +1728,17 @@ void dMenu_Option_c::screenSet() { field_0x25c[i]->setString(0x40, ""); mpString->getString(0x564, field_0x25c[i], NULL, NULL, NULL, 0); } + for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x21c[0][i] = (J2DTextBox*)mpScreen->search(menu_t0_jpn[i]); + mpScreen->search(fenu_t0_jpn[i])->hide(); + } else { + field_0x21c[0][i] = (J2DTextBox*)mpScreen->search(fenu_t0[i]); + mpScreen->search(menu_t0[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x21c[0][i] = (J2DTextBox*)mpScreen->search(menu_t0[i]); mpScreen->search(fenu_t0[i])->hide(); #else @@ -1647,7 +1750,15 @@ void dMenu_Option_c::screenSet() { mpString->getString(0x548, field_0x21c[0][i], NULL, NULL, NULL, 0); } for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x21c[1][i] = (J2DTextBox*)mpScreen->search(menu_t1_jpn[i]); + mpScreen->search(fenu_t1_jpn[i])->hide(); + } else { + field_0x21c[1][i] = (J2DTextBox*)mpScreen->search(fenu_t2[i]); + mpScreen->search(menu_t2[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x21c[1][i] = (J2DTextBox*)mpScreen->search(menu_t1[i]); mpScreen->search(fenu_t1[i])->hide(); #else @@ -1656,14 +1767,29 @@ void dMenu_Option_c::screenSet() { #endif field_0x21c[1][i]->setFont(mpFont); field_0x21c[1][i]->setString(0x40, ""); -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpString->getString(0x54B, field_0x21c[1][i], NULL, NULL, NULL, 0); + } else { + mpString->getString(0x54E, field_0x21c[1][i], NULL, NULL, NULL, 0); + } +#elif VERSION == VERSION_GCN_JPN mpString->getString(0x54B, field_0x21c[1][i], NULL, NULL, NULL, 0); #else mpString->getString(0x54E, field_0x21c[1][i], NULL, NULL, NULL, 0); #endif } for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x21c[2][i] = (J2DTextBox*)mpScreen->search(menu_t2_jpn[i]); + mpScreen->search(fenu_t2_jpn[i])->hide(); + } else { + field_0x21c[2][i] = (J2DTextBox*)mpScreen->search(fenu_t3[i]); + mpScreen->search(menu_t3[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x21c[2][i] = (J2DTextBox*)mpScreen->search(menu_t2[i]); mpScreen->search(fenu_t2[i])->hide(); #else @@ -1672,14 +1798,29 @@ void dMenu_Option_c::screenSet() { #endif field_0x21c[2][i]->setFont(mpFont); field_0x21c[2][i]->setString(0x40, ""); -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpString->getString(0x54E, field_0x21c[2][i], NULL, NULL, NULL, 0); + } else { + mpString->getString(0x54F, field_0x21c[2][i], NULL, NULL, NULL, 0); + } +#elif VERSION == VERSION_GCN_JPN mpString->getString(0x54E, field_0x21c[2][i], NULL, NULL, NULL, 0); #else mpString->getString(0x54F, field_0x21c[2][i], NULL, NULL, NULL, 0); #endif } for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x21c[3][i] = (J2DTextBox*)mpScreen->search(menu_t3_jpn[i]); + mpScreen->search(fenu_t3_jpn[i])->hide(); + } else { + field_0x21c[3][i] = (J2DTextBox*)mpScreen->search(fenu_t4[i]); + mpScreen->search(menu_t4[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x21c[3][i] = (J2DTextBox*)mpScreen->search(menu_t3[i]); mpScreen->search(fenu_t3[i])->hide(); #else @@ -1688,12 +1829,25 @@ void dMenu_Option_c::screenSet() { #endif field_0x21c[3][i]->setFont(mpFont); field_0x21c[3][i]->setString(0x40, ""); -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpString->getString(0x54F, field_0x21c[3][i], NULL, NULL, NULL, 0); + } +#elif VERSION == VERSION_GCN_JPN mpString->getString(0x54F, field_0x21c[3][i], NULL, NULL, NULL, 0); #endif } for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x21c[4][i] = (J2DTextBox*)mpScreen->search(menu_t4_jpn[i]); + mpScreen->search(fenu_t4_jpn[i])->hide(); + } else { + field_0x21c[4][i] = (J2DTextBox*)mpScreen->search(fenu_t1[i]); + mpScreen->search(menu_t1[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x21c[4][i] = (J2DTextBox*)mpScreen->search(menu_t4[i]); mpScreen->search(fenu_t4[i])->hide(); #else @@ -1704,7 +1858,15 @@ void dMenu_Option_c::screenSet() { field_0x21c[4][i]->setString(0x40, ""); } for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x21c[5][i] = (J2DTextBox*)mpScreen->search(menu_t5_jpn[i]); + mpScreen->search(fenu_t5_jpn[i])->hide(); + } else { + field_0x21c[5][i] = (J2DTextBox*)mpScreen->search(fenu_t5[i]); + mpScreen->search(menu_t5[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN field_0x21c[5][i] = (J2DTextBox*)mpScreen->search(menu_t5[i]); mpScreen->search(fenu_t5[i])->hide(); #else @@ -1716,7 +1878,17 @@ void dMenu_Option_c::screenSet() { mpString->getString(0x554, field_0x21c[5][i], NULL, NULL, NULL, 0); } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + paneResize(menut_0[i]); + mpMenuText[0][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_0[i], 0, NULL); + mpClipScreen->search(fenut_0[i])->hide(); + } else { + paneResize(fenut_0[i]); + mpMenuText[0][i] = JKR_NEW CPaneMgr(mpClipScreen, fenut_0[i], 0, NULL); + mpClipScreen->search(menut_0[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN paneResize(menut_0[i]); mpMenuText[0][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_0[i], 0, NULL); mpClipScreen->search(fenut_0[i])->hide(); @@ -1730,7 +1902,17 @@ void dMenu_Option_c::screenSet() { mpMenuText[0][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + paneResize(menut_1[i]); + mpMenuText[1][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_1[i], 0, NULL); + mpClipScreen->search(fenut_1[i])->hide(); + } else { + paneResize(fenut_1[i]); + mpMenuText[1][i] = JKR_NEW CPaneMgr(mpClipScreen, fenut_1[i], 0, NULL); + mpClipScreen->search(menut_1[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN paneResize(menut_1[i]); mpMenuText[1][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_1[i], 0, NULL); mpClipScreen->search(fenut_1[i])->hide(); @@ -1745,7 +1927,17 @@ void dMenu_Option_c::screenSet() { mpMenuText[1][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + paneResize(menut_2[i]); + mpMenuText[2][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_2[i], 0, NULL); + mpClipScreen->search(fenut_2[i])->hide(); + } else { + paneResize(fenut_2[i]); + mpMenuText[2][i] = JKR_NEW CPaneMgr(mpClipScreen, fenut_2[i], 0, NULL); + mpClipScreen->search(menut_2[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN paneResize(menut_2[i]); mpMenuText[2][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_2[i], 0, NULL); mpClipScreen->search(fenut_2[i])->hide(); @@ -1760,7 +1952,17 @@ void dMenu_Option_c::screenSet() { mpMenuText[2][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + paneResize(menut_3[i]); + mpMenuText[3][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_3[i], 0, NULL); + mpClipScreen->search(fenut_3[i])->hide(); + } else { + paneResize(fenut_3[i]); + mpMenuText[3][i] = JKR_NEW CPaneMgr(mpClipScreen, fenut_3[i], 0, NULL); + mpClipScreen->search(menut_3[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN paneResize(menut_3[i]); mpMenuText[3][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_3[i], 0, NULL); mpClipScreen->search(fenut_3[i])->hide(); @@ -1775,7 +1977,17 @@ void dMenu_Option_c::screenSet() { mpMenuText[3][i]->getPanePtr()->setBasePosition(J2DBasePosition_4); } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + paneResize(menut_4[i]); + mpMenuText[4][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_4[i], 0, NULL); + mpClipScreen->search(fenut_4[i])->hide(); + } else { + paneResize(fenut_4[i]); + mpMenuText[4][i] = JKR_NEW CPaneMgr(mpClipScreen, fenut_4[i], 0, NULL); + mpClipScreen->search(menut_4[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN paneResize(menut_4[i]); mpMenuText[4][i] = JKR_NEW CPaneMgr(mpClipScreen, menut_4[i], 0, NULL); mpClipScreen->search(fenut_4[i])->hide(); @@ -1801,7 +2013,16 @@ void dMenu_Option_c::screenSet() { } field_0x3b4 = 0.0f; menuVisible(); -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpBackScreen->search(MULTI_CHAR('jpn_n'))->show(); + mpBackScreen->search(MULTI_CHAR('foregn_n'))->hide(); + } else { + mpBackScreen->search(MULTI_CHAR('jpn_n'))->hide(); + mpBackScreen->search(MULTI_CHAR('foregn_n'))->show(); + } +#elif VERSION == VERSION_GCN_JPN mpBackScreen->search(MULTI_CHAR('jpn_n'))->show(); mpBackScreen->search(MULTI_CHAR('foregn_n'))->hide(); #else @@ -1809,7 +2030,7 @@ void dMenu_Option_c::screenSet() { mpBackScreen->search(MULTI_CHAR('foregn_n'))->show(); #endif for (int i = 0; i < 6; i++) { - J2DTextBox* backScreen = (J2DTextBox*)mpBackScreen->search(tx[i]); + J2DTextBox* backScreen = (J2DTextBox*)mpBackScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? tx_jpn[i] : tx[i], tx[i])); backScreen->setFont(mpFont); backScreen->setString(0x80, ""); if (i < 2) { @@ -1832,10 +2053,12 @@ void dMenu_Option_c::screenSet() { } } for (int i = 0; i < 10; i++) { - J2DTextBox* tvScreen = (J2DTextBox*)mpTVScreen->search(txTV[i]); + J2DTextBox* tvScreen = (J2DTextBox*)mpTVScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? txTV_jpn[i] : txTV[i], txTV[i])); tvScreen->setFont(mpFont); -#if VERSION != VERSION_GCN_JPN +#if TARGET_PC || VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) tvScreen->setCharSpace(0.0f); + IF_DUSK_BLOCK_END #endif if (i < 2) { @@ -1894,7 +2117,7 @@ void dMenu_Option_c::setAttenString() { } } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN void dMenu_Option_c::setRubyString() { u16 stringId1; u16 stringId2; @@ -1930,7 +2153,9 @@ void dMenu_Option_c::setVibString() { stringId2 = 0x54C; } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + const int IDX = dusk::version::isRegionJpn() ? 2 : 1; +#elif VERSION == VERSION_GCN_JPN const int IDX = 2; #else const int IDX = 1; @@ -1964,7 +2189,9 @@ void dMenu_Option_c::setSoundString() { stringId3 = 0x550; } for (int i = 0; i < 6; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + const int IDX = dusk::version::isRegionJpn() ? 3 : 2; +#elif VERSION == VERSION_GCN_JPN const int IDX = 3; #else const int IDX = 2; @@ -1983,10 +2210,25 @@ void dMenu_Option_c::setSoundString() { } void dMenu_Option_c::setCursorPos(u8 i_index) { -#if VERSION != VERSION_GCN_JPN +#if TARGET_PC + if (!dusk::version::isRegionJpn()) { + switch (i_index) { + case PROC_VIB_e: + i_index = 1; + break; + case PROC_SOUND_e: + i_index = 2; + break; + } + } +#endif + +#if TARGET_PC || VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) if (i_index == 4) { i_index = 5; } + IF_DUSK_BLOCK_END #endif Vec pos = mpMenuPane[i_index]->getGlobalVtxCenter(mpMenuPane[i_index]->mPane, false, 0); @@ -2037,13 +2279,33 @@ void dMenu_Option_c::setSelectColor(u8 param_0, bool param_1) { } u8 dMenu_Option_c::getSelectType() { - if (field_0x3ef < SelectType3) { +#if TARGET_PC + u8 proc = 0; + if (field_0x3ef < PROC_CHANGE_MOVE_e) { + proc = field_0x3ef; + } else if (field_0x3f5 < PROC_CHANGE_MOVE_e) { + proc = field_0x3f5; + } + + if (!dusk::version::isRegionJpn()) { + switch (proc) { + case PROC_VIB_e: + return 1; + case PROC_SOUND_e: + return 2; + } + } + + return proc; +#else + if (field_0x3ef < PROC_CHANGE_MOVE_e) { return field_0x3ef; } - if (field_0x3f5 < SelectType3) { + if (field_0x3f5 < PROC_CHANGE_MOVE_e) { return field_0x3f5; } return 0; +#endif } void dMenu_Option_c::changeBarColor(bool i_changeColor) { @@ -2237,7 +2499,7 @@ bool dMenu_Option_c::isRumbleSupported() { #if TARGET_PC bool dMenu_Option_c::pointerConfirmSelect() { dusk::menu_pointer::begin_context(dusk::menu_pointer::Context::Options); - for (u8 i = 0; i < SelectType3; ++i) { + for (u8 i = 0; i < (dusk::version::isRegionJpn() ? 4 : 3); ++i) { if (dusk::menu_pointer::hit_pane(mpMenuPane[i], 8.0f)) { dusk::menu_pointer::set_hover_target(i); return false; @@ -2251,7 +2513,7 @@ bool dMenu_Option_c::pointerConfirmSelect() { field_0x3f7 = 1; field_0x3f5 = field_0x3ef; - field_0x3ef = SelectType4; + field_0x3ef = PROC_CONFIRM_OPEN_MOVE_e; dMeter2Info_set2DVibration(); (this->*init[field_0x3ef])(); return true; @@ -2261,14 +2523,45 @@ bool dMenu_Option_c::pointerConfirmSelect() { bool dMenu_Option_c::dpdMenuMove() { #if TARGET_PC dusk::menu_pointer::begin_context(dusk::menu_pointer::Context::Options); - for (u8 i = 0; i < SelectType3; ++i) { + for (u8 i = 0; i < (dusk::version::isRegionJpn() ? 4 : 3); ++i) { if (!dusk::menu_pointer::hit_pane(mpMenuPane[i], 8.0f)) { continue; } dusk::menu_pointer::set_hover_target(i); + + u8 selectProc = 0; + if (dusk::version::isRegionJpn()) { + switch (i) { + case 0: + selectProc = PROC_ATTEN_e; + break; + case 1: + selectProc = PROC_RUBY_e; + break; + case 2: + selectProc = PROC_VIB_e; + break; + case 3: + selectProc = PROC_SOUND_e; + break; + } + } else { + switch (i) { + case 0: + selectProc = PROC_ATTEN_e; + break; + case 1: + selectProc = PROC_VIB_e; + break; + case 2: + selectProc = PROC_SOUND_e; + break; + } + } + if (getSelectType() != i) { - field_0x3ef = i; - setCursorPos(i); + field_0x3ef = selectProc; + setCursorPos(field_0x3ef); Z2GetAudioMgr()->seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } @@ -2276,29 +2569,41 @@ bool dMenu_Option_c::dpdMenuMove() { return true; } - switch (i) { - case SelectType0: + switch (selectProc) { + case PROC_ATTEN_e: field_0x3e4 ^= 1; field_0x3da = 5; - field_0x3ef = SelectType3; - field_0x3f5 = SelectType0; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_ATTEN_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); return true; - case SelectType1: + case PROC_RUBY_e: + if (field_0x3e5_JPN == 0) { + field_0x3e5_JPN = 1; + field_0x3da = 5; + } else if (field_0x3e5_JPN == 1) { + field_0x3e5_JPN = 0; + field_0x3da = 5; + } + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_RUBY_e; + Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); + return true; + case PROC_VIB_e: if (isRumbleSupported()) { field_0x3ea ^= 1; if (field_0x3ea != 0) { mDoCPd_c::startMotorWave(0, &field_0x3e0, JUTGamePad::CRumble::VAL_0, 0x3c); } field_0x3da = 5; - field_0x3ef = SelectType3; - field_0x3f5 = SelectType1; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_VIB_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } return true; - case SelectType2: + case PROC_SOUND_e: if (field_0x3e9 == 0) { field_0x3e9 = 2; } else { @@ -2307,8 +2612,8 @@ bool dMenu_Option_c::dpdMenuMove() { field_0x3da = 5; mDoAud_setOutputMode(dMo_soundMode[field_0x3e9]); setSoundMode(dMo_soundMode[field_0x3e9]); - field_0x3ef = SelectType3; - field_0x3f5 = SelectType2; + field_0x3ef = PROC_CHANGE_MOVE_e; + field_0x3f5 = PROC_SOUND_e; Z2GetAudioMgr()->seStart(Z2SE_SY_OPTION_SWITCH, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); return true; @@ -2333,8 +2638,8 @@ void dMenu_Option_c::paneResize(u64 i_tag) { void dMenu_Option_c::initialize() { field_0x3e4 = dComIfGs_getOptAttentionType(); -#if VERSION == VERSION_GCN_JPN - if (dComIfGs_getOptRuby() == 0) { +#if TARGET_PC || VERSION == VERSION_GCN_JPN + if (IF_DUSK(dusk::version::isRegionJpn() &&) dComIfGs_getOptRuby() == 0) { field_0x3e5_JPN = 1; } else { field_0x3e5_JPN = 0; @@ -2352,8 +2657,10 @@ void dMenu_Option_c::initialize() { field_0x3ea = 0; } setAttenString(); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) setRubyString(); + IF_DUSK_BLOCK_END #endif setVibString(); setSoundString(); diff --git a/src/d/d_menu_ring.cpp b/src/d/d_menu_ring.cpp index a50d6def3a..3fe55c2b6c 100644 --- a/src/d/d_menu_ring.cpp +++ b/src/d/d_menu_ring.cpp @@ -29,6 +29,8 @@ #include +#include "dusk/version.hpp" + #if TARGET_PC #include "dusk/frame_interpolation.h" #include "dusk/game_clock.h" @@ -341,7 +343,16 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i } mpString = JKR_NEW dMsgString_c(); for (i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* fxy_TextBox; + if (dusk::version::isRegionJpn()) { + fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]); + mpScreen->search(fxy_text[i])->hide(); + } else { + fxy_TextBox = (J2DTextBox*)mpScreen->search(fxy_text[i]); + mpScreen->search(xy_text[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]); mpScreen->search(fxy_text[i])->hide(); #else @@ -353,75 +364,77 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i field_0x580[0] = mpString->getString(0x380, fxy_TextBox, NULL, NULL, NULL, 0); } for (i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN - #if TARGET_PC +#if TARGET_PC J2DTextBox* fc_TextBox; - if (dusk::getSettings().game.swapDirectSelect) { - fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]); - mpScreen->search(fc_text1[i])->hide(); + if (dusk::version::isRegionJpn()) { + if (dusk::getSettings().game.swapDirectSelect) { + fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]); + mpScreen->search(fc_text1[i])->hide(); + } else { + fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]); + mpScreen->search(fc_text[i])->hide(); + } } else { - fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]); - mpScreen->search(fc_text[i])->hide(); + if (dusk::getSettings().game.swapDirectSelect) { + fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]); + mpScreen->search(c_text1[i])->hide(); + } else { + fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]); + mpScreen->search(c_text[i])->hide(); + } } - #else +#elif VERSION == VERSION_GCN_JPN J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]); mpScreen->search(fc_text[i])->hide(); - #endif #else - #if TARGET_PC - J2DTextBox* fc_TextBox; - if (dusk::getSettings().game.swapDirectSelect) { - fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]); - mpScreen->search(c_text1[i])->hide(); - } else { - fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]); - mpScreen->search(c_text[i])->hide(); - } - #else J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]); mpScreen->search(c_text[i])->hide(); - #endif #endif fc_TextBox->setFont(mDoExt_getMesgFont()); fc_TextBox->setString(0x40, ""); field_0x580[1] = mpString->getString(0x37F, fc_TextBox, NULL, NULL, NULL, 0); } for (i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN - #if TARGET_PC +#if TARGET_PC J2DTextBox* fc1_TextBox; - if (dusk::getSettings().game.swapDirectSelect) { - fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]); - mpScreen->search(fc_text[i])->hide(); + if (dusk::version::isRegionJpn()) { + if (dusk::getSettings().game.swapDirectSelect) { + fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]); + mpScreen->search(fc_text[i])->hide(); + } else { + fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]); + mpScreen->search(fc_text1[i])->hide(); + } } else { - fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]); - mpScreen->search(fc_text1[i])->hide(); + if (dusk::getSettings().game.swapDirectSelect) { + fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]); + mpScreen->search(c_text[i])->hide(); + } else { + fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]); + mpScreen->search(c_text1[i])->hide(); + } } - #else +#elif VERSION == VERSION_GCN_JPN J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]); mpScreen->search(fc_text1[i])->hide(); - #endif #else - #if TARGET_PC - J2DTextBox* fc1_TextBox; - if (dusk::getSettings().game.swapDirectSelect) { - fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]); - mpScreen->search(c_text[i])->hide(); - } else { - fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]); - mpScreen->search(c_text1[i])->hide(); - } - #else J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]); mpScreen->search(c_text1[i])->hide(); - #endif #endif fc1_TextBox->setFont(mDoExt_getMesgFont()); fc1_TextBox->setString(0x40, ""); field_0x580[2] = mpString->getString(0x4CD, fc1_TextBox, NULL, NULL, NULL, 0); } for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]); + mpScreen->search(ft_on[i])->hide(); + } else { + mpComboOffString[i] = (J2DTextBox*)mpScreen->search(ft_on[i]); + mpScreen->search(t_on[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]); mpScreen->search(ft_on[i])->hide(); #else @@ -433,7 +446,15 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i mpString->getString(0x4D2, mpComboOffString[i], NULL, NULL, NULL, 0); } for (int i = 0; i < 5; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]); + mpScreen->search(ft_off[i])->hide(); + } else { + mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(ft_off[i]); + mpScreen->search(t_off[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]); mpScreen->search(ft_off[i])->hide(); #else @@ -464,7 +485,31 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i mpNameParent = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('label_n'), 1, NULL); mpCircle = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('circle_n'), 2, NULL); J2DTextBox* textBox[4]; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04')); + textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05')); + textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06')); + textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n07')); + J2DPane* pane = mpCenterScreen->search(MULTI_CHAR('fitem_n1')); + pane->mVisible = false; + pane = mpCenterScreen->search(MULTI_CHAR('fitem_n2')); + pane->mVisible = false; + pane = mpCenterScreen->search(MULTI_CHAR('fitem_n3')); + pane->mVisible = false; + pane = mpCenterScreen->search(MULTI_CHAR('fitem_n4')); + pane->mVisible = false; + } else { + textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n1')); + textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n2')); + textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n3')); + textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n4')); + mpCenterScreen->search(MULTI_CHAR('item_n04')); + mpCenterScreen->search(MULTI_CHAR('item_n05')); + mpCenterScreen->search(MULTI_CHAR('item_n06')); + mpCenterScreen->search(MULTI_CHAR('item_n07')); + } +#elif VERSION == VERSION_GCN_JPN textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04')); textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05')); textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06')); @@ -1246,7 +1291,19 @@ void dMenu_Ring_c::setScale() { void dMenu_Ring_c::setNameString(u32 i_stringID) { J2DTextBox* textBox[4]; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04')); + textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05')); + textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06')); + textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n07')); + } else { + textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n1')); + textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n2')); + textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n3')); + textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n4')); + } +#elif VERSION == VERSION_GCN_JPN textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04')); textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05')); textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06')); diff --git a/src/d/d_menu_save.cpp b/src/d/d_menu_save.cpp index 78ebd3e064..e9be233f6b 100644 --- a/src/d/d_menu_save.cpp +++ b/src/d/d_menu_save.cpp @@ -1,25 +1,26 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_menu_save.h" -#include "JSystem/JKernel/JKRExpHeap.h" -#include "JSystem/JKernel/JKRMemArchive.h" #include #include +#include "JSystem/J2DGraph/J2DAnmLoader.h" +#include "JSystem/JKernel/JKRExpHeap.h" +#include "JSystem/JKernel/JKRMemArchive.h" #include "d/d_com_inf_game.h" -#include "d/d_lib.h" -#include "d/d_select_cursor.h" #include "d/d_file_sel_info.h" #include "d/d_file_sel_warning.h" +#include "d/d_lib.h" +#include "d/d_menu_save.h" #include "d/d_meter2_info.h" +#include "d/d_msg_scrn_explain.h" #include "d/d_msg_string.h" +#include "d/d_select_cursor.h" +#include "dusk/version.hpp" +#include "f_op/f_op_msg_mng.h" #include "m_Do/m_Do_MemCard.h" #include "m_Do/m_Do_MemCardRWmng.h" #include "m_Do/m_Do_Reset.h" #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" -#include "d/d_msg_scrn_explain.h" -#include "JSystem/J2DGraph/J2DAnmLoader.h" -#include "f_op/f_op_msg_mng.h" #if TARGET_PC #include "dusk/frame_interpolation.h" @@ -179,7 +180,15 @@ void dMenu_save_c::screenSet() { static u64 l_tagName10[2] = {MULTI_CHAR('w_no_g'), MULTI_CHAR('w_yes_g')}; static u64 l_tagName11[2] = {MULTI_CHAR('w_no_gr'), MULTI_CHAR('w_yes_gr')}; static u64 l_tagName12[3] = {MULTI_CHAR('w_bk_l00'), MULTI_CHAR('w_bk_l01'), MULTI_CHAR('w_bk_l02')}; -#if VERSION == VERSION_GCN_JPN + +#if TARGET_PC + static u64 l_tagName21_jpn[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')}; + static u64 l_tagName20_jpn[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')}; + static u64 l_tagName21[2] = {MULTI_CHAR('t_for'), MULTI_CHAR('t_for1')}; + static u64 l_tagName211[10] = {MULTI_CHAR('tmoyou00'), MULTI_CHAR('tmoyou01'), MULTI_CHAR('tmoyou02'), MULTI_CHAR('tmoyou03'), MULTI_CHAR('tmoyou04'), + MULTI_CHAR('tmoyou05'), MULTI_CHAR('tmoyou06'), MULTI_CHAR('tmoyou07'), MULTI_CHAR('tmoyou08'), MULTI_CHAR('tmoyou09')}; + static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')}; +#elif VERSION == VERSION_GCN_JPN static u64 l_tagName21[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')}; static u64 l_tagName20[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')}; #else @@ -188,6 +197,7 @@ void dMenu_save_c::screenSet() { MULTI_CHAR('tmoyou05'), MULTI_CHAR('tmoyou06'), MULTI_CHAR('tmoyou07'), MULTI_CHAR('tmoyou08'), MULTI_CHAR('tmoyou09')}; static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')}; #endif + static u64 l_tagName13[3] = {MULTI_CHAR('w_dat_i0'), MULTI_CHAR('w_dat_i1'), MULTI_CHAR('w_dat_i2')}; static u8 l_msgNum0[2] = {0x08, 0x07}; static u8 l_msgNum[2] = {0x54, 0x55}; @@ -221,7 +231,15 @@ void dMenu_save_c::screenSet() { mpNoYes[1] = JKR_NEW CPaneMgr(mSaveSel.Scr, MULTI_CHAR('w_yes_n'), 0, NULL); for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpNoYesTxt[i] = JKR_NEW CPaneMgr(mSaveSel.Scr, l_tagName000[i], 0, NULL); + mSaveSel.Scr->search(l_tagName000U[i])->hide(); + } else { + mpNoYesTxt[i] = JKR_NEW CPaneMgr(mSaveSel.Scr, l_tagName000U[i], 0, NULL); + mSaveSel.Scr->search(l_tagName000[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpNoYesTxt[i] = JKR_NEW CPaneMgr(mSaveSel.Scr, l_tagName000[i], 0, NULL); mSaveSel.Scr->search(l_tagName000U[i])->hide(); #else @@ -240,7 +258,15 @@ void dMenu_save_c::screenSet() { mpBBtnIcon = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_nbbtn'), 2, NULL); mpABtnIcon = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_nabtn'), 2, NULL); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpBackTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_modo'), 2, NULL); + mpConfirmTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_kete'), 2, NULL); + } else { + mpBackTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('f_modo'), 2, NULL); + mpConfirmTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('f_kete'), 2, NULL); + } +#elif VERSION == VERSION_GCN_JPN mpBackTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_modo'), 2, NULL); mpConfirmTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_kete'), 2, NULL); #else @@ -255,7 +281,15 @@ void dMenu_save_c::screenSet() { for (int i = 0; i < 2; i++) { J2DTextBox* tbox[2]; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00[i]); + mSaveSel.Scr->search(l_tagName00U[i])->hide(); + } else { + tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00U[i]); + mSaveSel.Scr->search(l_tagName00[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00[i]); mSaveSel.Scr->search(l_tagName00U[i])->hide(); #else @@ -330,7 +364,19 @@ void dMenu_save_c::screenSet() { mpBookWaku[i]->setAlpha(0); } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mSaveSel.Scr->search(MULTI_CHAR('t_for'))->hide(); + mSaveSel.Scr->search(MULTI_CHAR('t_for1'))->hide(); + } else { + mSaveSel.Scr->search(MULTI_CHAR('w_tabi_s'))->hide(); + mSaveSel.Scr->search(MULTI_CHAR('w_tabi_x'))->hide(); + + for (int i = 0; i < 10; i++) { + mSaveSel.Scr->search(l_tagName211[i])->hide(); + } + } +#elif VERSION == VERSION_GCN_JPN mSaveSel.Scr->search(MULTI_CHAR('t_for'))->hide(); mSaveSel.Scr->search(MULTI_CHAR('t_for1'))->hide(); #else @@ -343,11 +389,21 @@ void dMenu_save_c::screenSet() { #endif for (int i = 0; i < 2; i++) { - mpHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, l_tagName21[i], 0, NULL); + mpHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName21_jpn[i] : l_tagName21[i], l_tagName21[i]), 0, NULL); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFont(mSaveSel.font[0]); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setString(0x100, ""); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f); + } else { + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(19.0f, 19.0f); + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(20.0f); + ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(0.0f); + } +#elif VERSION == VERSION_GCN_JPN ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f); ((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f); @@ -364,7 +420,15 @@ void dMenu_save_c::screenSet() { mHeaderTxtType = 0; field_0xb4 = mSaveSel.Scr->search(MULTI_CHAR('w_er_n')); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mSaveSel.Scr->search(MULTI_CHAR('er_for0'))->hide(); + mSaveSel.Scr->search(MULTI_CHAR('er_for1'))->hide(); + } else { + mSaveSel.Scr->search(MULTI_CHAR('w_er_msg'))->hide(); + mSaveSel.Scr->search(MULTI_CHAR('w_er_msR'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN mSaveSel.Scr->search(MULTI_CHAR('er_for0'))->hide(); mSaveSel.Scr->search(MULTI_CHAR('er_for1'))->hide(); #else @@ -373,7 +437,9 @@ void dMenu_save_c::screenSet() { #endif for (int i = 0; i < 2; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + mpErrTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName20_jpn[i] : l_tagName20[i], l_tagName20[i]), 0, NULL); +#elif VERSION == VERSION_GCN_JPN mpErrTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, l_tagName20[i], 0, NULL); #else mpErrTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, l_tagName20[i], 0, NULL); @@ -381,7 +447,18 @@ void dMenu_save_c::screenSet() { ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFont(mSaveSel.font[0]); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setString(0x200, ""); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(22.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(2.0f); + } else { + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->resize(440.0f, 198.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(21.0f); + ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(1.0f); + } +#elif VERSION == VERSION_GCN_JPN ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(22.0f); ((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(2.0f); @@ -2468,7 +2545,23 @@ bool dMenu_save_c::selectDataBaseMoveAnm() { mpSelectMoveBase->getPanePtr()->animationTransform(); return false; } else { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (mDataBaseMoveAnmFrame == 33) { + field_0x64 = 1; + } else { + field_0x64 = 0; + } + field_0x65 = 0; + } else { + if (mDataBaseMoveAnmFrame == 33) { + field_0x64 = 1; + field_0x65 = 0; + } else { + field_0x64 = 0; + } + } +#elif VERSION == VERSION_GCN_JPN if (mDataBaseMoveAnmFrame == 33) { field_0x64 = 1; } else { diff --git a/src/d/d_menu_skill.cpp b/src/d/d_menu_skill.cpp index 0c970e76c3..90d4a3f92b 100644 --- a/src/d/d_menu_skill.cpp +++ b/src/d/d_menu_skill.cpp @@ -18,6 +18,8 @@ #include "m_Do/m_Do_graphic.h" #include +#include "dusk/version.hpp" + #if TARGET_PC #include "dusk/menu_pointer.h" #endif @@ -467,7 +469,27 @@ void dMenu_Skill_c::screenSetMenu() { mpParent = JKR_NEW CPaneMgr(mpMenuScreen, MULTI_CHAR('n_all'), 2, NULL); mpParent->setAlphaRate(0.0f); for (int i = 0; i < 7; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]); + mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]); + mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]); + mpFTagPicture[i][3] = (J2DTextBox*)mpMenuScreen->search(tag_name1[i]); + mpMenuScreen->search(ftag_sub0[i])->hide(); + mpMenuScreen->search(ftag_sub1[i])->hide(); + mpMenuScreen->search(ftag_name0[i])->hide(); + mpMenuScreen->search(ftag_name1[i])->hide(); + } else { + mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(ftag_sub0[i]); + mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(ftag_sub1[i]); + mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(ftag_name0[i]); + mpFTagPicture[i][3] = (J2DTextBox*)mpMenuScreen->search(ftag_name1[i]); + mpMenuScreen->search(tag_sub0[i])->hide(); + mpMenuScreen->search(tag_sub1[i])->hide(); + mpMenuScreen->search(tag_name0[i])->hide(); + mpMenuScreen->search(tag_name1[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]); mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]); mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]); @@ -522,7 +544,16 @@ void dMenu_Skill_c::screenSetMenu() { mSelectWhite[i] = mpFTagPicture[1][i]->getWhite(); } } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* textBox; + if (dusk::version::isRegionJpn()) { + textBox = (J2DTextBox*)mpMenuScreen->search(MULTI_CHAR('t_t00')); + mpMenuScreen->search(MULTI_CHAR('f_t00'))->hide(); + } else { + textBox = (J2DTextBox*)mpMenuScreen->search(MULTI_CHAR('f_t00')); + mpMenuScreen->search(MULTI_CHAR('t_t00'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* textBox = (J2DTextBox*)mpMenuScreen->search(MULTI_CHAR('t_t00')); mpMenuScreen->search(MULTI_CHAR('f_t00'))->hide(); #else @@ -551,7 +582,15 @@ void dMenu_Skill_c::screenSetLetter() { mpLetterScreen = JKR_NEW J2DScreen(); mpLetterScreen->setPriority("zelda_ougi_info.blo", 0x20000, mpArchive); dPaneClass_showNullPane(mpLetterScreen); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpTextPane = JKR_NEW CPaneMgr(mpLetterScreen, MULTI_CHAR('mg_3line'), 0, NULL); + mpLetterScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + mpTextPane = JKR_NEW CPaneMgr(mpLetterScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + mpLetterScreen->search(MULTI_CHAR('n_3line'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpTextPane = JKR_NEW CPaneMgr(mpLetterScreen, MULTI_CHAR('mg_3line'), 0, NULL); mpLetterScreen->search(MULTI_CHAR('n_e4line'))->hide(); #else @@ -564,7 +603,15 @@ void dMenu_Skill_c::screenSetLetter() { J2DTextBox* paneString = (J2DTextBox*)mpTextPane->getPanePtr(); paneString->setString(0x200, ""); for (int i = 0; i < 4; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(name_tag[i]); + mpLetterScreen->search(fame_tag[i])->hide(); + } else { + mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(fame_tag[i]); + mpLetterScreen->search(name_tag[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(name_tag[i]); mpLetterScreen->search(fame_tag[i])->hide(); #else diff --git a/src/d/d_meter2_draw.cpp b/src/d/d_meter2_draw.cpp index 7ce7bb29d4..f4e96c6fbe 100644 --- a/src/d/d_meter2_draw.cpp +++ b/src/d/d_meter2_draw.cpp @@ -23,6 +23,8 @@ #include "dusk/frame_interpolation.h" #include +#include "dusk/version.hpp" + #if TARGET_PC #include "dusk/settings.h" #include "dusk/ui/icon_provider.hpp" @@ -59,6 +61,14 @@ void dAnchorHudScale(CPaneMgr* i_pane, HudCorner i_corner, f32* io_x, f32* io_y, #endif dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) { +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + g_drawHIO.mButtonATextSpacing = -2.0f; + } else { + g_drawHIO.mButtonATextSpacing = 1.0f; + } +#endif + OS_REPORT("enter dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap *mp_heap)\n"); heap = mp_heap; @@ -161,7 +171,8 @@ dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) { } J2DTextBox::TFontSize font_size; -#if VERSION != VERSION_GCN_JPN +#if TARGET_PC || VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) font_size.mSizeX = 17.0f; font_size.mSizeY = 20.0f; for (int i = 0; i < 5; i++) { @@ -171,6 +182,7 @@ dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) { static_cast(mpXYText[i][1]->getPanePtr())->setFontSize(font_size); static_cast(mpXYText[i][2]->getPanePtr())->setFontSize(font_size); } + IF_DUSK_BLOCK_END #endif init(); diff --git a/src/d/d_meter2_info.cpp b/src/d/d_meter2_info.cpp index 6309e83a86..4e55a330f9 100644 --- a/src/d/d_meter2_info.cpp +++ b/src/d/d_meter2_info.cpp @@ -15,6 +15,7 @@ #include +#include "dusk/version.hpp" #include "helpers/string.hpp" enum ITEMICON_RES_FILE_ID { @@ -534,13 +535,18 @@ f32 dMeter2Info_c::getStringLength(J2DTextBox* i_textbox, char* i_string) { str_width = 0.0f; } else { int c = (u8)*string; -#if VERSION == VERSION_GCN_JPN - bool unkFlag1 = false; - if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { - unkFlag1 = true; - } - if (unkFlag1) { - c = (c << 8) | (u8)*++string; +#if TARGET_PC || VERSION == VERSION_GCN_JPN + #if TARGET_PC + if (dusk::version::isRegionJpn()) + #endif + { + bool unkFlag1 = false; + if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { + unkFlag1 = true; + } + if (unkFlag1) { + c = (c << 8) | (u8)*++string; + } } #endif str_width += charSpace + (fontSize.mSizeX * ((f32)font->getWidth(c) / (f32)font->getCellWidth())); @@ -566,13 +572,18 @@ f32 dMeter2Info_c::getStringLength(JUTFont* i_font, f32 param_2, f32 param_3, ch str_width = 0.0f; } else { int c = (u8)*string; -#if VERSION == VERSION_GCN_JPN - bool unkFlag1 = false; - if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { - unkFlag1 = true; - } - if (unkFlag1) { - c = (c << 8) | (u8)*++string; +#if TARGET_PC || VERSION == VERSION_GCN_JPN + #if TARGET_PC + if (dusk::version::isRegionJpn()) + #endif + { + bool unkFlag1 = false; + if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { + unkFlag1 = true; + } + if (unkFlag1) { + c = (c << 8) | (u8)*++string; + } } #endif str_width += param_3 + param_2 * ((f32)i_font->getWidth(c) / (f32)i_font->getCellWidth()); diff --git a/src/d/d_meter_button.cpp b/src/d/d_meter_button.cpp index 0e3354e76e..573147f888 100644 --- a/src/d/d_meter_button.cpp +++ b/src/d/d_meter_button.cpp @@ -19,11 +19,15 @@ #include "dusk/frame_interpolation.h" #include +#include "dusk/version.hpp" + #if TARGET_PC #include "helpers/string.hpp" #endif -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC +#define STR_BUF_LEN 528 +#elif VERSION == VERSION_GCN_JPN #define STR_BUF_LEN 528 #else #define STR_BUF_LEN 512 @@ -261,7 +265,15 @@ void dMeterButton_c::draw() { SAFE_STRCPY(tmp_buf, static_cast(mpTm_c[0]->getPanePtr())->getStringPtr()); mpTextScreen->draw(0.0f, 0.0f, graf_ctx); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpString_c->getString(mMsgID, static_cast(mpTm_c[0]->getPanePtr()), NULL, NULL, + NULL, 12); + } else { + mpString_c->getString(mMsgID, static_cast(mpTm_c[0]->getPanePtr()), NULL, NULL, + NULL, 8); + } +#elif VERSION == VERSION_GCN_JPN mpString_c->getString(mMsgID, static_cast(mpTm_c[0]->getPanePtr()), NULL, NULL, NULL, 12); #else @@ -1195,7 +1207,15 @@ void dMeterButton_c::screenInitButton() { field_0x4d9 = 0xFF; for (int i = 0; i < 10; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(text_tag[i]); + mpButtonScreen->search(ftext_tag[i])->hide(); + } else { + mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(ftext_tag[i]); + mpButtonScreen->search(text_tag[i])->hide(); + } +#elif VERSION == VERSION_GCN_JPN mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(text_tag[i]); mpButtonScreen->search(ftext_tag[i])->hide(); #else @@ -1468,7 +1488,50 @@ void dMeterButton_c::screenInitText() { mpTmRoot_c = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_null'), 0, NULL); JUT_ASSERT(2499, mpTmRoot_c != NULL); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0) { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3flin'), 0, NULL); + + mpTm_c[1] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('t3f_s'), 0, NULL); + + field_0x0ec[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3f'), 0, NULL); + + field_0x0ec[1] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3f_s'), 0, NULL); + + mpTextScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTextScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpTextScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3line'), 0, NULL); + + mpTm_c[1] = JKR_NEW CPaneMgr(mpTextScreen, 't3_s', 0, NULL); + + field_0x0ec[0] = NULL; + field_0x0ec[1] = NULL; + OS_REPORT("[%s] %d\n", __FILE__, __LINE__); + + mpTextScreen->search(MULTI_CHAR('n_3line'))->show(); + mpTextScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTextScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + JUT_ASSERT(2504, mpTm_c[0] != NULL); + + mpTm_c[1] = JKR_NEW CPaneMgr(mpTextScreen, 't4_s', 0, NULL); + JUT_ASSERT(2507, mpTm_c[1] != NULL); + + field_0x0ec[0] = NULL; + field_0x0ec[1] = NULL; + + OS_REPORT("[%s] %d\n", __FILE__, 2512); + + mpTextScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTextScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTextScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3flin'), 0, NULL); @@ -1516,19 +1579,11 @@ void dMeterButton_c::screenInitText() { f32 line_space = static_cast(mpTm_c[0]->getPanePtr())->getLineSpace(); for (int i = 0; i < 2; i++) { static_cast(mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - static_cast(mpTm_c[i]->getPanePtr())->setString(0x210, ""); -#else - static_cast(mpTm_c[i]->getPanePtr())->setString(0x200, ""); -#endif + static_cast(mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); if (field_0x0ec[i] != NULL) { static_cast(field_0x0ec[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - static_cast(field_0x0ec[i]->getPanePtr())->setString(0x210, ""); -#else - static_cast(field_0x0ec[i]->getPanePtr())->setString(0x200, ""); -#endif + static_cast(field_0x0ec[i]->getPanePtr())->setString(STR_BUF_LEN, ""); static_cast(field_0x0ec[i]->getPanePtr())->setLineSpace(line_space); } } diff --git a/src/d/d_msg_class.cpp b/src/d/d_msg_class.cpp index 8dc2a82c01..5dbc00a1d2 100644 --- a/src/d/d_msg_class.cpp +++ b/src/d/d_msg_class.cpp @@ -1,23 +1,33 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_class.h" #include #include -#include "d/d_meter2_info.h" -#include "d/d_msg_object.h" -#include "d/d_msg_unit.h" #include "JSystem/J2DGraph/J2DTextBox.h" -#include "d/d_msg_out_font.h" -#include "m_Do/m_Do_graphic.h" -#include "d/d_lib.h" #include "JSystem/JUtility/JUTFont.h" +#include "d/d_lib.h" +#include "d/d_meter2_info.h" +#include "d/d_msg_class.h" +#include "d/d_msg_object.h" +#include "d/d_msg_out_font.h" +#include "d/d_msg_unit.h" +#include "dusk/version.hpp" +#include "m_Do/m_Do_graphic.h" #if TARGET_PC #include "dusk/menu_pointer.h" #include "dusk/scope_guard.hpp" #endif -#if REGION_JPN +#if TARGET_PC +#define CHAR_CODE_MALE_ICON (dusk::version::isRegionJpn() ? 0x8189 : 0xB2) +#define CHAR_CODE_FEMALE_ICON (dusk::version::isRegionJpn() ? 0x818A : 0xB3) +#define CHAR_CODE_STAR_ICON (dusk::version::isRegionJpn() ? 0x819A : 0xB1) +#define CHAR_CODE_REFMARK (dusk::version::isRegionJpn() ? 0x81A6 : 0x89) +#define CHAR_CODE_THIN_LEFT_ARROW (dusk::version::isRegionJpn() ? 0x81A9 : 0xB9) +#define CHAR_CODE_THIN_RIGHT_ARROW (dusk::version::isRegionJpn() ? 0x81A8 : 0xBC) +#define CHAR_CODE_THIN_UP_ARROW (dusk::version::isRegionJpn() ? 0x81AA : 0xBD) +#define CHAR_CODE_THIN_DOWN_ARROW (dusk::version::isRegionJpn() ? 0x81AB : 0xBE) +#elif REGION_JPN #define CHAR_CODE_MALE_ICON 0x8189 #define CHAR_CODE_FEMALE_ICON 0x818A #define CHAR_CODE_STAR_ICON 0x819A @@ -431,8 +441,33 @@ void jmessage_tReference::calcDistance() { u8 jmessage_tReference::getLineMax() { int line_max; - -#if REGION_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (isKanban()) { + line_max = 6; + } else if (isBook()) { + line_max = 7; + } else if (isStaffRoll()) { + line_max = 10; + } else if (isSaveSeq()) { + line_max = 5; + } else { + line_max = 3; + } + } else { + if (isKanban()) { + line_max = 7; + } else if (isBook()) { + line_max = 9; + } else if (isStaffRoll()) { + line_max = 10; + } else if (isSaveSeq()) { + line_max = 6; + } else { + line_max = 4; + } + } +#elif REGION_JPN if (isKanban()) { line_max = 6; } else if (isBook()) { @@ -895,7 +930,7 @@ void jmessage_tMeasureProcessor::do_begin(void const* pEntry, char const* pszTex mSeSpeaker = ((JMSMesgEntry_c*)pEntry)->se_speaker; mSeMood = ((JMSMesgEntry_c*)pEntry)->se_mood; - for (int i = 0; i < D_MSG_CLASS_PAGE_CNT_MAX; i++) { + for (int i = 0; i < DUSK_IF_ELSE((dusk::version::isRegionJpn() ? 30 : D_MSG_CLASS_PAGE_CNT_MAX), D_MSG_CLASS_PAGE_CNT_MAX); i++) { pReference->setLineLength(i, 0.0f, 0.0f); pReference->setPageLine(i, 0); pReference->setPageLineMax(i, 0); @@ -912,7 +947,11 @@ void jmessage_tMeasureProcessor::do_begin(void const* pEntry, char const* pszTex pReference->setLineArrange(i, 1); } -#if !REGION_JPN +#if TARGET_PC + if (!dusk::version::isRegionJpn() && ((JMSMesgEntry_c*)pEntry)->unk_0xd == 0) { + pReference->setLineArrange(i, 1); + } +#elif !REGION_JPN if (((JMSMesgEntry_c*)pEntry)->unk_0xd == 0) { pReference->setLineArrange(i, 1); } @@ -1591,8 +1630,8 @@ void jmessage_tMeasureProcessor::do_scale(f32 i_scale) { mPageLineMax--; JUT_ASSERT(0x930, mPageLineMax > 0); -#if REGION_JPN - if (field_0x3e == 0) { +#if TARGET_PC || REGION_JPN + if (IF_DUSK(dusk::version::isRegionJpn() &&) field_0x3e == 0) { pReference->setPageType(field_0x40, 2); } #else @@ -1762,7 +1801,10 @@ void jmessage_tMeasureProcessor::do_pageType(int param_0) { void jmessage_tMeasureProcessor::do_name1() { const char* name = dComIfGs_getPlayerName(); -#if REGION_JPN +#if TARGET_PC || REGION_JPN + if (!dusk::version::isRegionJpn()) + return; + int c = (((char)name[0] & 0xFF) << 8) | ((char)name[1] & 0xFF); // if first character is hiragana or katakana if ((c >= 0x829F && c <= 0x82F1) || (c >= 0x8340 && c <= 0x8396)) { @@ -2041,7 +2083,7 @@ bool jmessage_tSequenceProcessor::do_isReady() { field_0xae = 1; field_0xa4 = 0; pReference->onBatchFlag(); - pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX); + pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX)); field_0xa4 = field_0xa8; return true; } @@ -2061,7 +2103,7 @@ bool jmessage_tSequenceProcessor::do_isReady() { field_0xae = 1; field_0xa4 = 0; pReference->onBatchFlag(); - pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX); + pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX)); return true; } @@ -2084,7 +2126,7 @@ bool jmessage_tSequenceProcessor::do_isReady() { if (mDoCPd_c::getTrigA(PAD_1) || field_0xb2 != 0 IF_DUSK(|| (dusk::getSettings().game.instantText && mDoCPd_c::getHoldB(0)))) { field_0xa4 = 0; pReference->onBatchFlag(); - pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX); + pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX)); } break; case 1: @@ -2093,7 +2135,7 @@ bool jmessage_tSequenceProcessor::do_isReady() { case 9: field_0xa4 = 0; pReference->onBatchFlag(); - pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX); + pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX)); break; case 2: if (field_0xb2 != 0) { @@ -2108,8 +2150,8 @@ bool jmessage_tSequenceProcessor::do_isReady() { } field_0xa6++; -#if REGION_JPN - if (field_0xa6 >= 1) { +#if TARGET_PC || REGION_JPN + if (IF_DUSK(dusk::version::isRegionJpn() &&) field_0xa6 >= 1) { #else if (field_0xa6 >= 2) { #endif @@ -2533,7 +2575,10 @@ bool jmessage_tSequenceProcessor::do_jump_isReady() { void jmessage_tSequenceProcessor::do_name1() { const char* name = dComIfGs_getPlayerName(); -#if REGION_JPN +#if TARGET_PC || REGION_JPN + if (!dusk::version::isRegionJpn()) + return; + int c = (((char)name[0] & 0xFF) << 8) | ((char)name[1] & 0xFF); // if first character is hiragana or katakana if ((c >= 0x829F && c <= 0x82F1) || (c >= 0x8340 && c <= 0x8396)) { @@ -3357,9 +3402,9 @@ void jmessage_tRenderingProcessor::do_heightcenter() { } break; } -#if REGION_JPN +#if TARGET_PC || REGION_JPN case 2: - if ((s8)pReference->getLineMax() == 3) { + if (IF_DUSK(dusk::version::isRegionJpn() &&) (s8)pReference->getLineMax() == 3) { int nowPageLine = pReference->getNowPageLine(); field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine)); var_f31 += field_0x138; @@ -3368,13 +3413,24 @@ void jmessage_tRenderingProcessor::do_heightcenter() { if (field_0x142 == 0) { field_0x138 = pReference->getLineSpace(); var_f31 += field_0x138; - } else if (field_0x142 == 1) { + } +#if TARGET_PC + else if (!dusk::version::isRegionJpn() || (dusk::version::isRegionJpn() && field_0x142 == 1)) +#else + else if (field_0x142 == 1) +#endif + { field_0x138 = 0.5f * pReference->getLineSpace(); var_f31 += field_0x138; } break; case 3: { - if (field_0x142 == 1) { +#if TARGET_PC + if (!dusk::version::isRegionJpn() || (dusk::version::isRegionJpn() && field_0x142 == 1)) +#else + if (field_0x142 == 1) +#endif + { int nowPageLine = pReference->getNowPageLine(); field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine)); var_f31 += field_0x138; @@ -3383,8 +3439,25 @@ void jmessage_tRenderingProcessor::do_heightcenter() { break; } case 4: { + #if TARGET_PC + if (!dusk::version::isRegionJpn() && field_0x142 == 0) { + int nowPageLine = pReference->getNowPageLine(); + field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine)); + var_f31 += field_0x138; + } + #endif + if (field_0x142 == 1) { + #if TARGET_PC + if (!dusk::version::isRegionJpn()) { + field_0x138 = 0.5f * pReference->getLineSpace(); + var_f31 += field_0x138; + } else { + var_f31 += 0.5f * pReference->getLineSpace(); + } + #else var_f31 += 0.5f * pReference->getLineSpace(); + #endif } f32 sp8 = pReference->getLineScale(field_0x142) / 100.0f; @@ -3662,7 +3735,7 @@ void jmessage_tRenderingProcessor::do_strcat(char* i_str, bool param_2, bool par } else { JUT_WARN(5316, "%s", "TextBox Alloc Byte Over!!"); } - } else if (field_0x11c < D_MSG_CLASS_CHAR_CNT_MAX) { + } else if (field_0x11c < DUSK_IF_ELSE((dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200), D_MSG_CLASS_CHAR_CNT_MAX)) { if (param_2) { field_0x146++; if (pReference->getBatchColorFlag() != 0) { @@ -3697,7 +3770,7 @@ void jmessage_tRenderingProcessor::do_strcat(char* i_str, bool param_2, bool par int length = 0; length = strlen(buffer); - if (field_0x11c + length < D_MSG_CLASS_CHAR_CNT_MAX) { + if (field_0x11c + length < DUSK_IF_ELSE((dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200), D_MSG_CLASS_CHAR_CNT_MAX)) { field_0x148 = strlen(pReference->getTextPtr()); field_0x14a = strlen(pReference->getTextSPtr()); @@ -3792,7 +3865,10 @@ void jmessage_tRenderingProcessor::do_rubystrcat(char* i_src, TEXT_SPAN i_dst, f void jmessage_tRenderingProcessor::do_name1() { const char* name = dComIfGs_getPlayerName(); -#if REGION_JPN +#if TARGET_PC || REGION_JPN + if (!dusk::version::isRegionJpn()) + return; + int c = (((char)name[0] & 0xFF) << 8) | ((char)name[1] & 0xFF); // if first character is hiragana or katakana if ((c >= 0x829F && c <= 0x82F1) || (c >= 0x8340 && c <= 0x8396)) { @@ -3889,7 +3965,7 @@ void jmessage_string_tReference::init(J2DTextBox* panePtr, J2DTextBox* runyPaneP mRubyPanePtr = runyPanePtr; mOutFontPtr = outFontPtr; mLineCount = 0; - mLineMax = D_MSG_CLASS_LINE_MAX; + mLineMax = DUSK_IF_ELSE(dusk::version::isRegionJpn() ? 9 : D_MSG_CLASS_LINE_MAX, D_MSG_CLASS_LINE_MAX); mNowPage = 0; mFlags = flags; if (font != NULL) { diff --git a/src/d/d_msg_object.cpp b/src/d/d_msg_object.cpp index 712ee61584..fc6b03d6df 100644 --- a/src/d/d_msg_object.cpp +++ b/src/d/d_msg_object.cpp @@ -314,6 +314,13 @@ dMsgObject_HIO_c::dMsgObject_HIO_c() { } int dMsgObject_c::_create(msg_class* param_1) { +#if TARGET_PC + if (dusk::version::isRegionJpn()) + g_MsgObject_HIO_c.mBoxTalkScaleX = 1.1f; + else + g_MsgObject_HIO_c.mBoxTalkScaleX = 1.2f; +#endif + field_0x124 = NULL; field_0x100 = param_1; field_0x16c = -1; diff --git a/src/d/d_msg_out_font.cpp b/src/d/d_msg_out_font.cpp index efc655d529..79bbad5ebb 100644 --- a/src/d/d_msg_out_font.cpp +++ b/src/d/d_msg_out_font.cpp @@ -1,11 +1,12 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_out_font.h" #include "JSystem/J2DGraph/J2DTextBox.h" #include "JSystem/JUtility/JUTTexture.h" #include "d/d_meter2_info.h" #include "d/d_msg_object.h" +#include "d/d_msg_out_font.h" #include "dusk/frame_interpolation.h" +#include "dusk/version.hpp" #include "f_op/f_op_msg_mng.h" COutFontSet_c::COutFontSet_c() { @@ -289,8 +290,10 @@ void COutFont_c::initialize() { void COutFont_c::drawFont(J2DTextBox* i_textbox, u8 i_type, f32 i_posX, f32 i_posY, f32 i_sizeX, f32 i_sizeY, u32 i_color, u8 i_alpha) { -#if VERSION != VERSION_GCN_JPN +#if TARGET_PC || VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) i_posY += 1.0f; + IF_DUSK_BLOCK_END; #endif for (int i = 0; i < 35; i++) { if (mpOfs[i]->getType() == 0x47) { @@ -380,7 +383,15 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param break; case 5: case 6: { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + posY -= 2.0f; + sizeY -= 2.0f; + } else { + posY += 1.0f; + sizeY -= 3.0f; + } +#elif VERSION == VERSION_GCN_JPN posY -= 2.0f; sizeY -= 2.0f; #else diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp index 2f19f23c83..b3a41a2988 100644 --- a/src/d/d_msg_scrn_3select.cpp +++ b/src/d/d_msg_scrn_3select.cpp @@ -5,16 +5,17 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_scrn_3select.h" +#include #include "JSystem/J2DGraph/J2DAnmLoader.h" #include "JSystem/J2DGraph/J2DGrafContext.h" #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/J2DGraph/J2DTextBox.h" -#include #include "d/d_com_inf_game.h" -#include "d/d_select_cursor.h" #include "d/d_msg_object.h" +#include "d/d_msg_scrn_3select.h" #include "d/d_pane_class.h" +#include "d/d_select_cursor.h" +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/menu_pointer.h" @@ -118,7 +119,97 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { mCursorPos[i] = mpCursor_c[i]->getGlobalVtxCenter(true, 0); } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0) { + mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, 'a_tf', 0, NULL); + + mpTmSel_c[1] = JKR_NEW CPaneMgr(mpScreen, 'b_tf', 0, NULL); + + mpTmSel_c[2] = JKR_NEW CPaneMgr(mpScreen, 'c_tf', 0, NULL); + + mpTmrSel_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('a_tf_f'), 0, NULL); + + mpTmrSel_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('b_tf_f'), 0, NULL); + + mpTmrSel_c[2] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('c_tf_f'), 0, NULL); + + for (int i = 0; i < 3; i++) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + } + + mpScreen->search(MULTI_CHAR('a_t_e'))->hide(); + mpScreen->search(MULTI_CHAR('b_t_e'))->hide(); + mpScreen->search(MULTI_CHAR('c_t_e'))->hide(); + mpScreen->search('a_tf')->show(); + mpScreen->search('b_tf')->show(); + mpScreen->search('c_tf')->show(); + mpScreen->search(MULTI_CHAR('a_tf_f'))->show(); + mpScreen->search(MULTI_CHAR('b_tf_f'))->show(); + mpScreen->search(MULTI_CHAR('c_tf_f'))->show(); + mpScreen->search('a_t')->hide(); + mpScreen->search('b_t')->hide(); + mpScreen->search('c_t')->hide(); + } else { + mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, 'a_t', 0, NULL); + + mpTmSel_c[1] = JKR_NEW CPaneMgr(mpScreen, 'b_t', 0, NULL); + + mpTmSel_c[2] = JKR_NEW CPaneMgr(mpScreen, 'c_t', 0, NULL); + + for (int i = 0; i < 3; i++) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + mpTmrSel_c[i] = NULL; + } + + mpScreen->search(MULTI_CHAR('a_t_e'))->hide(); + mpScreen->search(MULTI_CHAR('b_t_e'))->hide(); + mpScreen->search(MULTI_CHAR('c_t_e'))->hide(); + mpScreen->search('a_tf')->hide(); + mpScreen->search('b_tf')->hide(); + mpScreen->search('c_tf')->hide(); + mpScreen->search(MULTI_CHAR('a_tf_f'))->hide(); + mpScreen->search(MULTI_CHAR('b_tf_f'))->hide(); + mpScreen->search(MULTI_CHAR('c_tf_f'))->hide(); + mpScreen->search('a_t')->show(); + mpScreen->search('b_t')->show(); + mpScreen->search('c_t')->show(); + } + } else { + mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('a_t_e'), 0, NULL); + JUT_ASSERT(0, mpTmSel_c[0] != NULL); + + mpTmSel_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('b_t_e'), 0, NULL); + JUT_ASSERT(0, mpTmSel_c[1] != NULL); + + mpTmSel_c[2] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('c_t_e'), 0, NULL); + JUT_ASSERT(0, mpTmSel_c[2] != NULL); + + for (int i = 0; i < 3; i++) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + mpTmrSel_c[i] = NULL; + } + + mpScreen->search(MULTI_CHAR('a_t_e'))->show(); + mpScreen->search(MULTI_CHAR('b_t_e'))->show(); + mpScreen->search(MULTI_CHAR('c_t_e'))->show(); + mpScreen->search('a_tf')->hide(); + mpScreen->search('b_tf')->hide(); + mpScreen->search('c_tf')->hide(); + mpScreen->search(MULTI_CHAR('a_tf_f'))->hide(); + mpScreen->search(MULTI_CHAR('b_tf_f'))->hide(); + mpScreen->search(MULTI_CHAR('c_tf_f'))->hide(); + mpScreen->search('a_t')->hide(); + mpScreen->search('b_t')->hide(); + mpScreen->search('c_t')->hide(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0) { mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, 'a_tf', 0, NULL); @@ -966,7 +1057,18 @@ void dMsgScrn3Select_c::selectTrans() { f32 sp68[3]; for (int i = 0; i < 3; i++) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0 && (field_0x112 & (u8)(1 << i)) != 0) { + sp68[i] = 0.0f; + } else { + f32 temp = mpTmSel_c[i]->getInitPosY(); + sp68[i] = mpScreen->search(tag_n[i])->getBounds().i.y - temp; + } + } else { + sp68[i] = 0.0f; + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0 && (field_0x112 & (u8)(1 << i)) != 0) { sp68[i] = 0.0f; } else { diff --git a/src/d/d_msg_scrn_boss.cpp b/src/d/d_msg_scrn_boss.cpp index 54938ceb72..b747887316 100644 --- a/src/d/d_msg_scrn_boss.cpp +++ b/src/d/d_msg_scrn_boss.cpp @@ -1,10 +1,11 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_scrn_boss.h" #include "JSystem/J2DGraph/J2DGrafContext.h" #include "JSystem/J2DGraph/J2DScreen.h" #include "d/d_msg_object.h" +#include "d/d_msg_scrn_boss.h" #include "d/d_pane_class.h" +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/settings.h" @@ -37,8 +38,10 @@ dMsgScrnBoss_c::dMsgScrnBoss_c() { for (int i = 0; i < 7; i++) { mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL); ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getRubyFont()); -#if VERSION != VERSION_GCN_JPN +#if TARGET_PC || VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setCharSpace(1.0f); + IF_DUSK_BLOCK_END #endif ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x100, ""); } diff --git a/src/d/d_msg_scrn_explain.cpp b/src/d/d_msg_scrn_explain.cpp index 29a88590ee..9460ce8921 100644 --- a/src/d/d_msg_scrn_explain.cpp +++ b/src/d/d_msg_scrn_explain.cpp @@ -14,7 +14,9 @@ #include #include -#if VERSION == VERSION_GCN_JPN +#include "dusk/version.hpp" + +#if TARGET_PC || VERSION == VERSION_GCN_JPN #define STR_BUF_LEN 528 #else #define STR_BUF_LEN 512 @@ -95,7 +97,13 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUs mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x50 = 0.0f; + } else { + field_0x50 = -10.0f; + } +#elif VERSION == VERSION_GCN_JPN field_0x50 = 0.0f; #else field_0x50 = -10.0f; @@ -109,7 +117,48 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUs mpScreen->search(MULTI_CHAR('n_all'))->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + field_0x50 = 0.0f; + + if (dComIfGs_getOptRuby() == 0) { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL); + + mpTmr_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f'), 0, NULL); + mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s'), 0, NULL); + + mpTxScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3line'), 0, NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + + mpTmr_c[0] = NULL; + mpTmr_c[1] = NULL; + + mpTxScreen->search(MULTI_CHAR('n_3line'))->show(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + field_0x50 = -10.0f; + + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + JUT_ASSERT(162, mpTm_c[0] != NULL); + + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't4_s', 0, NULL); + JUT_ASSERT(165, mpTm_c[1] != NULL); + + mpTmr_c[0] = NULL; + mpTmr_c[1] = NULL; + + mpTxScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN field_0x50 = 0.0f; if (dComIfGs_getOptRuby() == 0) { @@ -160,20 +209,12 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUs f32 lineSpace = ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getLineSpace(); for (int i = 0; i < 2; i++) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setLineSpace(lineSpace); if (mpTmr_c[i] != NULL) { ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setLineSpace(lineSpace); } } @@ -320,7 +361,13 @@ void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) { SAFE_STRCPY(string_buf, ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr()); mpTxScreen->draw(0.0f, 0.0f, (J2DGrafContext*)i_graf); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12); + } else { + mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8); + } +#elif VERSION == VERSION_GCN_JPN mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12); #else mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8); diff --git a/src/d/d_msg_scrn_howl.cpp b/src/d/d_msg_scrn_howl.cpp index c701ea0b2b..4e5c59546c 100644 --- a/src/d/d_msg_scrn_howl.cpp +++ b/src/d/d_msg_scrn_howl.cpp @@ -4,20 +4,21 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_scrn_howl.h" -#include "m_Do/m_Do_controller_pad.h" -#include "m_Do/m_Do_graphic.h" -#include "d/d_msg_object.h" -#include "d/d_pane_class.h" +#include "JSystem/J2DGraph/J2DGrafContext.h" +#include "JSystem/J2DGraph/J2DScreen.h" +#include "JSystem/JUtility/JUTAssert.h" +#include "JSystem/JUtility/JUTTexture.h" +#include "Z2AudioLib/Z2WolfHowlMgr.h" #include "d/actor/d_a_alink.h" #include "d/d_meter2.h" #include "d/d_meter2_draw.h" #include "d/d_meter2_info.h" -#include "JSystem/JUtility/JUTTexture.h" -#include "JSystem/JUtility/JUTAssert.h" -#include "JSystem/J2DGraph/J2DGrafContext.h" -#include "JSystem/J2DGraph/J2DScreen.h" -#include "Z2AudioLib/Z2WolfHowlMgr.h" +#include "d/d_msg_object.h" +#include "d/d_msg_scrn_howl.h" +#include "d/d_pane_class.h" +#include "dusk/version.hpp" +#include "m_Do/m_Do_controller_pad.h" +#include "m_Do/m_Do_graphic.h" #if TARGET_PC #include "dusk/frame_interpolation.h" @@ -89,7 +90,21 @@ dMsgScrnHowl_c::dMsgScrnHowl_c() { JUT_ASSERT(96, mpButtonIcon[1] != NULL); mpButtonText[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('gr_txt_n'), 2, NULL); JUT_ASSERT(98, mpButtonText[1] != NULL); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + J2DTextBox* piStack_19c; + J2DTextBox* piStack_1a0; + if (dusk::version::isRegionJpn()) { + piStack_19c = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_l_info')); + piStack_1a0 = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_r_info')); + mpScreen->search(MULTI_CHAR('fgr_info'))->hide(); + mpScreen->search(MULTI_CHAR('fgl_info'))->hide(); + } else { + piStack_19c = (J2DTextBox*)mpScreen->search(MULTI_CHAR('fgl_info')); + piStack_1a0 = (J2DTextBox*)mpScreen->search(MULTI_CHAR('fgr_info')); + mpScreen->search(MULTI_CHAR('g_l_info'))->hide(); + mpScreen->search(MULTI_CHAR('g_r_info'))->hide(); + } +#elif VERSION == VERSION_GCN_JPN J2DTextBox* piStack_19c = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_l_info')); J2DTextBox* piStack_1a0 = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_r_info')); mpScreen->search(MULTI_CHAR('fgr_info'))->hide(); diff --git a/src/d/d_msg_scrn_item.cpp b/src/d/d_msg_scrn_item.cpp index 26a741e320..ab91739acc 100644 --- a/src/d/d_msg_scrn_item.cpp +++ b/src/d/d_msg_scrn_item.cpp @@ -24,6 +24,8 @@ #include "JSystem/JUtility/JUTTexture.h" #include +#include "dusk/version.hpp" + dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { if (param_3 != NULL) { field_0x138 = param_3; @@ -198,7 +200,53 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { mpPmP_c->scale(g_MsgObject_HIO_c.mBoxItemScaleX, g_MsgObject_HIO_c.mBoxItemScaleY); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0) { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL); + JUT_ASSERT(407, mpTm_c[0] != NULL); + + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL); + JUT_ASSERT(410, mpTm_c[1] != NULL); + + mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_w'), 0, NULL); + JUT_ASSERT(413, mpTm_c[2] != NULL); + + mpTmr_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f'), 0, NULL); + JUT_ASSERT(416, mpTmr_c[0] != NULL); + + mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s'), 0, NULL); + JUT_ASSERT(419, mpTmr_c[1] != NULL); + + mpTmr_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_w'), 0, NULL); + JUT_ASSERT(422, mpTmr_c[2] != NULL); + + mpTxScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3line'), 0, NULL); + JUT_ASSERT(407, mpTm_c[0] != NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + JUT_ASSERT(410, mpTm_c[1] != NULL); + mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, 't3_w', 0, NULL); + JUT_ASSERT(413, mpTm_c[2] != NULL); + mpTxScreen->search(MULTI_CHAR('n_3line'))->show(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + JUT_ASSERT(407, mpTm_c[0] != NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't4_s', 0, NULL); + JUT_ASSERT(410, mpTm_c[1] != NULL); + mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, 't4_w', 0, NULL); + JUT_ASSERT(413, mpTm_c[2] != NULL); + mpTxScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL); JUT_ASSERT(407, mpTm_c[0] != NULL); diff --git a/src/d/d_msg_scrn_jimaku.cpp b/src/d/d_msg_scrn_jimaku.cpp index ce059bd194..832befb543 100644 --- a/src/d/d_msg_scrn_jimaku.cpp +++ b/src/d/d_msg_scrn_jimaku.cpp @@ -15,6 +15,14 @@ #include "d/d_pane_class.h" #include +#include "dusk/version.hpp" + +#if TARGET_PC || VERSION == VERSION_GCN_JPN +#define STR_BUF_LEN 528 +#else +#define STR_BUF_LEN 512 +#endif + dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) { if (i_heap != NULL) { heap = i_heap; @@ -46,7 +54,38 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) { field_0xcc = g_MsgObject_HIO_c.mBoxPos[0][5]; mpPmP_c->paneTrans(0.0f, field_0xcc); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0) { + mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3flin'), 0, NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('t3f_s'), 0, NULL); + + mpTmr_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3f'), 0, NULL); + mpTmr_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3f_s'), 0, NULL); + + mpScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3line'), 0, NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, 't3_s', 0, NULL); + + mpScreen->search(MULTI_CHAR('n_3line'))->show(); + mpScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + JUT_ASSERT(0, mpTm_c[0] != NULL); + + mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, 't4_s', 0, NULL); + JUT_ASSERT(0, mpTm_c[1] != NULL); + + mpScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3flin'), 0, NULL); mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('t3f_s'), 0, NULL); @@ -79,21 +118,13 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) { for (int i = 0; i < 2; i++) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); mpTm_c[i]->setBlackWhite(g_MsgObject_HIO_c.mBoxStartBlack[i][4], g_MsgObject_HIO_c.mBoxStartWhite[i][4]); if (mpTmr_c[i] != NULL) { ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); mpTmr_c[i]->setBlackWhite(g_MsgObject_HIO_c.mBoxStartBlack[i][4], g_MsgObject_HIO_c.mBoxStartWhite[i][4]); } diff --git a/src/d/d_msg_scrn_kanban.cpp b/src/d/d_msg_scrn_kanban.cpp index d6e91b12f6..8e2346feab 100644 --- a/src/d/d_msg_scrn_kanban.cpp +++ b/src/d/d_msg_scrn_kanban.cpp @@ -4,14 +4,15 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_scrn_kanban.h" #include "JSystem/J2DGraph/J2DAnmLoader.h" #include "JSystem/J2DGraph/J2DGrafContext.h" #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "d/d_msg_object.h" #include "d/d_msg_out_font.h" +#include "d/d_msg_scrn_kanban.h" #include "d/d_pane_class.h" +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/settings.h" @@ -60,8 +61,48 @@ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) { mpSpot_c->getPanePtr()->setAnimation(field_0xd0); +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() != 0) { + static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'}; + for (int i = 0; i < 3; i++) { + mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + } -#if VERSION == VERSION_GCN_JPN + mpScreen->search(MULTI_CHAR('n_3line'))->show(); + mpScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + static u64 const t_tag_2[3] = {MULTI_CHAR('t3fline'), MULTI_CHAR('t3f_w'), MULTI_CHAR('t3f_s')}; + static u64 const tr_tag[3] = {MULTI_CHAR('mg_3f'), MULTI_CHAR('mg_3f_w'), MULTI_CHAR('mg_3f_s')}; + + for (int i = 0; i < 3; i++) { + mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag_2[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + + mpTmr_c[i] = JKR_NEW CPaneMgr(mpScreen, tr_tag[i], 0, NULL); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + } + + mpScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + static u64 const t_tag[3] = {MULTI_CHAR('mg_e4lin'), 'f4_w', 't4_s'}; + + for (int i = 0; i < 3; i++) { + mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL); + JUT_ASSERT(81, mpTm_c[i] != NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + } + + mpScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() != 0) { static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'}; for (int i = 0; i < 3; i++) { diff --git a/src/d/d_msg_scrn_place.cpp b/src/d/d_msg_scrn_place.cpp index 93c2ec7c20..31718f6d49 100644 --- a/src/d/d_msg_scrn_place.cpp +++ b/src/d/d_msg_scrn_place.cpp @@ -5,12 +5,13 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_scrn_place.h" #include "JSystem/J2DGraph/J2DGrafContext.h" #include "JSystem/J2DGraph/J2DScreen.h" #include "d/d_camera.h" #include "d/d_msg_object.h" +#include "d/d_msg_scrn_place.h" #include "d/d_pane_class.h" +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/settings.h" @@ -32,7 +33,13 @@ dMsgScrnPlace_c::dMsgScrnPlace_c() { } mpScreen = JKR_NEW J2DScreen(); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + mpScreen->setPriority("zelda_stage_title.blo", 0x20000, dComIfGp_getMsgArchive(4)); + } else { + mpScreen->setPriority("zelda_stage_title_foreign.blo", 0x20000, dComIfGp_getMsgArchive(4)); + } +#elif VERSION == VERSION_GCN_JPN mpScreen->setPriority("zelda_stage_title.blo", 0x20000, dComIfGp_getMsgArchive(4)); #else mpScreen->setPriority("zelda_stage_title_foreign.blo", 0x20000, dComIfGp_getMsgArchive(4)); @@ -59,7 +66,9 @@ dMsgScrnPlace_c::dMsgScrnPlace_c() { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getRubyFont()); ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x80, ""); #if VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setCharSpace(1.0f); + IF_DUSK_BLOCK_END #endif } diff --git a/src/d/d_msg_scrn_talk.cpp b/src/d/d_msg_scrn_talk.cpp index 5cf1b184da..6a30d08c47 100644 --- a/src/d/d_msg_scrn_talk.cpp +++ b/src/d/d_msg_scrn_talk.cpp @@ -20,10 +20,20 @@ #include "JSystem/J2DGraph/J2DScreen.h" #include +#include "dusk/version.hpp" + #if TARGET_PC #include "dusk/settings.h" #endif +#if TARGET_PC +#define STR_BUF_LEN 528 +#elif VERSION == VERSION_GCN_JPN +#define STR_BUF_LEN 528 +#else +#define STR_BUF_LEN 512 +#endif + dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { if (param_3 != NULL) { field_0xe4 = param_3; @@ -100,7 +110,12 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { JUT_ASSERT(153, mpMg_c[1] != NULL); OSInitFastCast(); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) + field_0xf4 = 0.0f; + else + field_0xf4 = -10.0f; +#elif VERSION == VERSION_GCN_JPN field_0xf4 = 0.0f; #else field_0xf4 = -10.0f; @@ -110,7 +125,68 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { JUT_ASSERT(176, mpPmP_c != NULL); mpPmP_c->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() == 0) { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL); + + mpTmr_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f'), 0, NULL); + if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) { + mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s1'), 0, NULL); + mpTm_c[3] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s2'), 0, NULL); + mpTm_c[4] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s3'), 0, NULL); + mpTm_c[5] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s4'), 0, NULL); + mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s1'), 0, NULL); + mpTmr_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s2'), 0, NULL); + } else { + mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s'), 0, NULL); + } + + mpTxScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3line'), 0, NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + + if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) { + mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s1'), 0, NULL); + JUT_ASSERT(189, mpTm_c[2] != NULL); + mpTm_c[3] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s2'), 0, NULL); + JUT_ASSERT(191, mpTm_c[3] != NULL); + mpTm_c[4] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s3'), 0, NULL); + JUT_ASSERT(193, mpTm_c[4] != NULL); + mpTm_c[5] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s4'), 0, NULL); + JUT_ASSERT(193, mpTm_c[5] != NULL); + } + + mpTxScreen->search(MULTI_CHAR('n_3line'))->show(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_e4lin'), 0, NULL); + JUT_ASSERT(182, mpTm_c[0] != NULL); + mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't4_s', 0, NULL); + JUT_ASSERT(185, mpTm_c[1] != NULL); + + if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) { + mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s1'), 0, NULL); + JUT_ASSERT(189, mpTm_c[2] != NULL); + mpTm_c[3] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s2'), 0, NULL); + JUT_ASSERT(191, mpTm_c[3] != NULL); + mpTm_c[4] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s3'), 0, NULL); + JUT_ASSERT(193, mpTm_c[4] != NULL); + mpTm_c[5] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s4'), 0, NULL); + JUT_ASSERT(193, mpTm_c[5] != NULL); + } + + mpTxScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpTxScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() == 0) { mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL); mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL); @@ -173,19 +249,11 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { for (int i = 0; i < 6; i++) { if (mpTm_c[i] != NULL) { ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); } if (mpTmr_c[i] != NULL) { ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); -#if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); -#else - ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, ""); -#endif + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(STR_BUF_LEN, ""); } } if (dMsgObject_getMsgObjectClass()->getFukiKind() != 8) { diff --git a/src/d/d_msg_scrn_tree.cpp b/src/d/d_msg_scrn_tree.cpp index 899a8f449a..440b2702d3 100644 --- a/src/d/d_msg_scrn_tree.cpp +++ b/src/d/d_msg_scrn_tree.cpp @@ -1,13 +1,14 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_scrn_tree.h" #include "JSystem/J2DGraph/J2DAnmLoader.h" #include "JSystem/J2DGraph/J2DGrafContext.h" #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "d/d_msg_object.h" #include "d/d_msg_out_font.h" +#include "d/d_msg_scrn_tree.h" #include "d/d_pane_class.h" +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/settings.h" @@ -61,7 +62,52 @@ dMsgScrnTree_c::dMsgScrnTree_c(JUTFont* param_0, JKRExpHeap* param_1) { mpScreen->search(MULTI_CHAR('white_m'))->setAnimation(field_0xd4); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (dComIfGs_getOptRuby() != 0) { + for (int i = 0; i < 3; i++) { + static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'}; + + mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); + } + + mpScreen->search(MULTI_CHAR('n_3line'))->show(); + mpScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } else { + for (int i = 0; i < 3; i++) { + static u64 const t_tag[3] = {MULTI_CHAR('t3fline'), MULTI_CHAR('t3f_w'), MULTI_CHAR('t3f_s')}; + static u64 const tr_tag[3] = {MULTI_CHAR('mg_3f'), MULTI_CHAR('mg_3f_w'), MULTI_CHAR('mg_3f_s')}; + + mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, ""); + + mpTmr_c[i] = JKR_NEW CPaneMgr(mpScreen, tr_tag[i], 0, NULL); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); + } + + mpScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpScreen->search(MULTI_CHAR('n_3fline'))->show(); + mpScreen->search(MULTI_CHAR('n_e4line'))->hide(); + } + } else { + for (int i = 0; i < 3; i++) { + static u64 const t_tag[3] = {MULTI_CHAR('mg_e4lin'), 'f4_w', 't4_s'}; + + mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54); + ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, ""); + } + + mpScreen->search(MULTI_CHAR('n_3line'))->hide(); + mpScreen->search(MULTI_CHAR('n_3fline'))->hide(); + mpScreen->search(MULTI_CHAR('n_e4line'))->show(); + } +#elif VERSION == VERSION_GCN_JPN if (dComIfGs_getOptRuby() != 0) { for (int i = 0; i < 3; i++) { static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'}; diff --git a/src/d/d_msg_unit.cpp b/src/d/d_msg_unit.cpp index 130b5da906..057e6cc3fc 100644 --- a/src/d/d_msg_unit.cpp +++ b/src/d/d_msg_unit.cpp @@ -1,11 +1,12 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "d/d_msg_unit.h" -#include "d/d_com_inf_game.h" #include #include +#include "d/d_com_inf_game.h" #include "d/d_kankyo.h" #include "d/d_meter2_info.h" +#include "d/d_msg_unit.h" +#include "dusk/version.hpp" // temporary until a better solution is found typedef struct dMsgUnit_inf1_entry { @@ -41,6 +42,199 @@ dMsgUnit_c::dMsgUnit_c() {} dMsgUnit_c::~dMsgUnit_c() {} +#if TARGET_PC +typedef struct dMsgUnit_inf1_entry_JPN { + BE(u32) dat1EntryOffset; + BE(u16) field_0x04; + BE(u16) field_0x06; + BE(u16) field_0x08; + BE(u16) field_0x0a; + BE(u16) field_0x0c; + BE(u16) field_0x0e; + BE(u16) field_0x10; + BE(u16) field_0x12; + BE(u16) field_0x14; + BE(u16) field_0x16; + BE(u16) field_0x18; + BE(u16) startFrame; + BE(u16) endFrame; +} dMsgUnit_inf1_entry_JPN; + +typedef struct dMsgUnit_inf1_section_JPN { + /* 0x00 */ BE(u32) msgType; // sectionType + /* 0x04 */ BE(u32) size; // total size of the section + /* 0x08 */ BE(u16) entryCount; + /* 0x0A */ BE(u16) entryLength; + /* 0x0C */ BE(u16) msgArchiveId; + /* 0x10 */ dMsgUnit_inf1_entry_JPN entries[0]; +} dMsgUnit_inf1_section_JPN; + +void dMsgUnit_c::setTag_jpn(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_4) { + *o_buffer = 0; + bool stack9 = false; + bool stack8 = false; + int value = i_value; + + if (i_type == 0x10000) { + SAFE_SPRINTF(o_buffer, "%d", i_value); + return; + } + + if (i_type == 0x10001) { + int tens_digit = i_value / 10; + int ones_digit = i_value % 10; + SAFE_SPRINTF(o_buffer, "%d-%d", tens_digit, ones_digit); + return; + } + + if ((i_type == 4 && param_4 == true) || (i_type == 5 && param_4 == false)) { + int seconds = i_value / 1000; + int minutes = seconds / 60; + seconds -= minutes * 60; + if (minutes > 99) { + minutes = 99; + seconds = 59; + } + + if (minutes == 0 && seconds == 0) { + if (strcmp(dComIfGp_getStartStageName(), "F_SP00") == 0) { + return; + } + } + + if (i_type == 4) { + i_value = minutes; + if (minutes == 0) { + stack9 = true; + } + } + + if (i_type == 5) { + if (seconds == 0 && minutes != 0) { + return; + } + i_value = seconds; + } + } + + if ((i_type == 3 && param_4 == true) || i_type == 4 && param_4 == false) { + f32 dayTime = g_env_light.getDaytime(); + f32 hour = dayTime / 15.0f; + + f32 iVar8b = ((s32)(1000000.0f * dayTime) % 15000000) / 1000000.0f; + f32 minute = 60.0f * (iVar8b / 15.0f); + // not sure why this affects codegen, in theory it should be optimized out + f32 minute2 = 60.0f * (iVar8b / 15.0f); + if (i_type == 3) { + i_value = (s32)hour; + } + + if (i_type == 4) { + i_value = (s32)minute; + } + } + + if (i_type == 9 && param_4 == true) { + SAFE_SPRINTF(o_buffer, "%d", i_value); + stack8 = true; + } + + if (!stack9) { + bmg_header_t* pHeader = (bmg_header_t*)dMeter2Info_getMsgUnitResource(); + dMsgUnit_inf1_section_JPN* pInfoBlock = NULL; + const void* pMsgDataBlock = NULL; + str1_section_t* pStrAttributeBlock = NULL; + int filepos = sizeof(bmg_header_t); + u32 filesize = pHeader->size; + bmg_section_t* pSection = (bmg_section_t*)(((u8*)pHeader) + filepos); + + for (; filepos < filesize; filepos += pSection->size) { + switch(pSection->magic) { + case 'FLW1': + break; + case 'FLI1': + break; + case 'INF1': + pInfoBlock = (dMsgUnit_inf1_section_JPN*)pSection; + break; + case 'DAT1': + pMsgDataBlock = pSection; + break; + case 'STR1': + pStrAttributeBlock = (str1_section_t*)pSection; + break; + } + pSection = (bmg_section_t*)((u8*)pSection + pSection->size); + } + + u16 vals[12]; + vals[0] = pInfoBlock->entries[i_type].field_0x04; + vals[1] = pInfoBlock->entries[i_type].field_0x06; + vals[2] = pInfoBlock->entries[i_type].field_0x08; + vals[3] = pInfoBlock->entries[i_type].field_0x0a; + vals[4] = pInfoBlock->entries[i_type].field_0x0c; + vals[5] = pInfoBlock->entries[i_type].field_0x0e; + vals[6] = pInfoBlock->entries[i_type].field_0x10; + vals[7] = pInfoBlock->entries[i_type].field_0x12; + vals[8] = pInfoBlock->entries[i_type].field_0x14; + vals[9] = pInfoBlock->entries[i_type].field_0x16; + vals[10] = pInfoBlock->entries[i_type].field_0x18; + int entryOff = pInfoBlock->entries[i_type].dat1EntryOffset; + + char* value2 = (char*)((uintptr_t)pMsgDataBlock + entryOff + 8); + + const char* uVar5; + if (i_value == 0) { + uVar5 = pStrAttributeBlock->entries->str + vals[0]; + } else { + if ((i_value % 10) == 0) { + uVar5 = pStrAttributeBlock->entries->str + (vals[10]); + } else { + uVar5 = pStrAttributeBlock->entries->str + vals[i_value % 10]; + } + } + + int uVar5Len = strlen(uVar5); + if (uVar5Len == 0) { + if (stack8) { + SAFE_STRCAT(o_buffer, value2); + } else { + SAFE_SPRINTF(o_buffer, "%d%s", i_value, value2); + } + } else { + char unkCharArr[7]; + unkCharArr[0] = 26; + unkCharArr[1] = uVar5Len + 6; + unkCharArr[2] = -1; + unkCharArr[3] = -1; + unkCharArr[4] = 2; + unkCharArr[5] = strlen(value2) / 2; + unkCharArr[6] = 0; + + if (stack8) { + SAFE_STRCAT(o_buffer, unkCharArr); + SAFE_STRCAT(o_buffer, uVar5); + SAFE_STRCAT(o_buffer, value2); + } else { + SAFE_SPRINTF(o_buffer, "%d%s%s%s", i_value, unkCharArr, uVar5, value2); + } + } + } + + if (i_type == 3 && param_4 == true) { + char buffer[20]; + setTag(4, 0, buffer, false); + SAFE_STRCAT(o_buffer, buffer); + } + + if (i_type == 4 && param_4 == true) { + char buffer[20]; + setTag(5, value, buffer, false); + SAFE_STRCAT(o_buffer, buffer); + } +} +#endif + #if REGION_JPN void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_4) { *o_buffer = 0; @@ -208,6 +402,13 @@ void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_ } #else void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_4) { +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + setTag_jpn(i_type, i_value, o_buffer, param_4); + return; + } +#endif + *o_buffer = 0; bool stack9 = false; bool stack8 = false; diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 22729ad43e..cdd5c467ef 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -1016,7 +1016,12 @@ void dSv_player_info_c::init() { } void dSv_player_config_c::init() { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) + mRuby = 0; + else + mRuby = 1; +#elif VERSION == VERSION_GCN_JPN mRuby = 0; #else mRuby = 1; diff --git a/src/d/d_timer.cpp b/src/d/d_timer.cpp index 1b4febc9f4..e07cc3af80 100644 --- a/src/d/d_timer.cpp +++ b/src/d/d_timer.cpp @@ -24,6 +24,7 @@ #include #include "dusk/frame_interpolation.h" +#include "dusk/version.hpp" static int dTimer_createStart2D(s32 param_0, u16 param_1); @@ -1430,7 +1431,7 @@ void dDlst_TimerScrnDraw_c::playBckAnimation(f32 i_frame) { mpGetInParent->getPanePtr()->setAnimation((J2DAnmTransform*)NULL); } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN bool dDlst_TimerScrnDraw_c::isLeadByte(int i_char) { return (i_char >= 0x81 && i_char <= 0x9f) || (i_char >= 0xe0 && i_char <= 0xfc); } @@ -1466,7 +1467,18 @@ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) { var_f25 * static_cast(mpGetInText->getPanePtr())->getCharSpace(); } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (isLeadByte(c)) { + c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF); + str_idx++; + } else { + c = string[str_idx] & 0xFF; + } + } else { + c = string[str_idx] & 0xFF; + } +#elif VERSION == VERSION_GCN_JPN if (isLeadByte(c)) { c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF); str_idx++; @@ -1492,7 +1504,18 @@ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) { var_f25 * static_cast(mpGetInText->getPanePtr())->getCharSpace(); } -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (isLeadByte(c)) { + c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF); + str_idx++; + } else { + c = string[str_idx] & 0xFF; + } + } else { + c = string[str_idx] & 0xFF; + } +#elif VERSION == VERSION_GCN_JPN if (isLeadByte(c)) { c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF); str_idx++; From e3075520e7406d4459284adf27b4107fa1e2f639 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Fri, 17 Jul 2026 20:35:15 -0700 Subject: [PATCH 059/223] convert jpn logic changes to runtime checks --- src/Z2AudioLib/Z2SoundObjMgr.cpp | 6 +++ src/d/actor/d_a_alink_demo.inc | 13 +++-- src/d/actor/d_a_e_mk.cpp | 6 ++- src/d/actor/d_a_e_mk_bo.cpp | 11 ++-- src/d/actor/d_a_e_mm_mt.cpp | 7 ++- src/d/actor/d_a_mg_fshop.cpp | 8 ++- src/d/d_kankyo_rain.cpp | 18 +++++-- src/d/d_menu_fmap.cpp | 8 +-- src/d/d_msg_unit.cpp | 86 ++++++++++++++++---------------- src/m_Do/m_Do_MemCardRWmng.cpp | 7 +-- 10 files changed, 105 insertions(+), 65 deletions(-) diff --git a/src/Z2AudioLib/Z2SoundObjMgr.cpp b/src/Z2AudioLib/Z2SoundObjMgr.cpp index 19099c7675..2c67cfb22b 100644 --- a/src/Z2AudioLib/Z2SoundObjMgr.cpp +++ b/src/Z2AudioLib/Z2SoundObjMgr.cpp @@ -6,6 +6,8 @@ #include "Z2AudioLib/Z2LinkMgr.h" #include +#include "dusk/version.hpp" + Z2SoundObjMgr::Z2SoundObjMgr() : JASGlobalInstance(true) { ghostEnemyState_ = 0; twilightBattle_ = 0; @@ -207,6 +209,10 @@ void Z2SoundObjMgr::searchEnemy() { case Z2_ENEMY_RD: case Z2_ENEMY_SH: case Z2_ENEMY_HP: +#elif TARGET_PC + case Z2_ENEMY_SH: + if (enemyId == Z2_ENEMY_SH && !dusk::version::isRegionJpn()) + continue; #endif if (!Z2GetLink()->isRiding()) break; diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc index b1eb71a85d..cf1a222c9c 100644 --- a/src/d/actor/d_a_alink_demo.inc +++ b/src/d/actor/d_a_alink_demo.inc @@ -26,6 +26,7 @@ #include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/settings.h" #include "dusk/speedrun.h" +#include "dusk/version.hpp" BOOL daAlink_c::checkEventRun() const { return dComIfGp_event_runCheck() || checkPlayerDemoMode(); @@ -4399,8 +4400,10 @@ void daAlink_c::checkWarpStart() { if (dMeter2Info_getWarpStatus() == WARP_STATUS_DECIDED_e || dComIfGp_event_compulsory(this, 0, 0xFFFF)) { - #if VERSION != VERSION_GCN_JPN && VERSION != VERSION_SHIELD_DEBUG + #if TARGET_PC || (VERSION != VERSION_GCN_JPN && VERSION != VERSION_SHIELD_DEBUG) + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) onNoResetFlg0(FLG0_UNK_4000); + IF_DUSK_BLOCK_END #endif if (dMeter2Info_getWarpStatus() == WARP_STATUS_DECIDED_e) { @@ -4428,8 +4431,10 @@ void daAlink_c::checkWarpStart() { fopAcM_orderOtherEvent(this, portal, 0xFFFF, 1, 1); } else { mDemo.setSpecialDemoType(); - #if VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG + #if TARGET_PC || (VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG) + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) onNoResetFlg0(FLG0_UNK_4000); + IF_DUSK_BLOCK_END #endif if (dMeter2Info_getWarpStatus() == 1) { @@ -4513,10 +4518,12 @@ int daAlink_c::procCoWarpInit(int param_0, int param_1) { soundId = Z2SE_WOLF_WARP_IN_TATE; } - #if VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG + #if TARGET_PC || (VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG) + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) if (param_1) { onNoResetFlg0(FLG0_UNK_4000); } + IF_DUSK_BLOCK_END #endif if (param_1) { diff --git a/src/d/actor/d_a_e_mk.cpp b/src/d/actor/d_a_e_mk.cpp index f507177f1d..7484a4b22b 100644 --- a/src/d/actor/d_a_e_mk.cpp +++ b/src/d/actor/d_a_e_mk.cpp @@ -21,6 +21,8 @@ #include "Z2AudioLib/Z2Instances.h" #include +#include "dusk/version.hpp" + class daE_MK_HIO_c : public JORReflexible { public: virtual ~daE_MK_HIO_c() {} @@ -612,8 +614,10 @@ static void e_mk_shoot(e_mk_class* i_this) { i_this->sound.startCreatureVoice(Z2SE_EN_MK_V_CATCH_BOOM, -1); i_this->sound.startCreatureSound(Z2SE_EN_MK_CATCH_BOOM, 0, -1); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) return; + IF_DUSK_BLOCK_END #endif } } diff --git a/src/d/actor/d_a_e_mk_bo.cpp b/src/d/actor/d_a_e_mk_bo.cpp index 950d6cdc56..c3b303cf6f 100644 --- a/src/d/actor/d_a_e_mk_bo.cpp +++ b/src/d/actor/d_a_e_mk_bo.cpp @@ -5,12 +5,13 @@ #include "d/dolzel_rel.h" // IWYU pragma: keep -#include "d/actor/d_a_e_mk_bo.h" +#include "Z2AudioLib/Z2Instances.h" +#include "c/c_damagereaction.h" #include "d/actor/d_a_e_mk.h" +#include "d/actor/d_a_e_mk_bo.h" #include "d/actor/d_a_player.h" #include "d/d_s_play.h" -#include "c/c_damagereaction.h" -#include "Z2AudioLib/Z2Instances.h" +#include "dusk/version.hpp" static int daE_MK_BO_Draw(e_mk_bo_class* i_this) { if (i_this->field_0x9b4 != 0) { @@ -569,8 +570,10 @@ static int daE_MK_BO_Execute(e_mk_bo_class* i_this) { if (i_this->field_0x600 != 0) { fopAcM_delete(actor); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) return 1; + IF_DUSK_BLOCK_END #endif } diff --git a/src/d/actor/d_a_e_mm_mt.cpp b/src/d/actor/d_a_e_mm_mt.cpp index a3f57ddcf1..782978d801 100644 --- a/src/d/actor/d_a_e_mm_mt.cpp +++ b/src/d/actor/d_a_e_mm_mt.cpp @@ -3,9 +3,10 @@ * */ -#include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_e_mm_mt.h" #include "d/d_cc_d.h" +#include "d/dolzel_rel.h" // IWYU pragma: keep +#include "dusk/version.hpp" #include "f_op/f_op_actor_enemy.h" static int daE_MM_MT_Draw(e_mm_mt_class* i_this) { @@ -802,7 +803,9 @@ static int daE_MM_MT_Create(fopAc_ac_c* i_this) { if (i_this->argument == 1) { fopAcM_OffStatus(i_this, 0x80000); helmasaurShell->m_sphere.SetAtType( - #if VERSION == VERSION_GCN_JPN + #if TARGET_PC + dusk::version::isRegionJpn() ? AT_TYPE_CSTATUE_SWING : 0xD8FBBDFF + #elif VERSION == VERSION_GCN_JPN AT_TYPE_CSTATUE_SWING #else 0xD8FBBDFF diff --git a/src/d/actor/d_a_mg_fshop.cpp b/src/d/actor/d_a_mg_fshop.cpp index 9e8eb3f357..061fb5b7be 100644 --- a/src/d/actor/d_a_mg_fshop.cpp +++ b/src/d/actor/d_a_mg_fshop.cpp @@ -1783,7 +1783,13 @@ static int daFshop_Create(fopAc_ac_c* actor) { }; if (sp10 == 1) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + sp24 = dComIfGs_getEventReg(check_kind[i]); + } else { + sp24 = 2.54f * dComIfGs_getEventReg(check_kind[i]); + } +#elif VERSION == VERSION_GCN_JPN sp24 = dComIfGs_getEventReg(check_kind[i]); #else sp24 = 2.54f * dComIfGs_getEventReg(check_kind[i]); diff --git a/src/d/d_kankyo_rain.cpp b/src/d/d_kankyo_rain.cpp index bcc8b228e6..02dcd94d68 100644 --- a/src/d/d_kankyo_rain.cpp +++ b/src/d/d_kankyo_rain.cpp @@ -12,6 +12,8 @@ #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_lib.h" #include + +#include "dusk/version.hpp" #if TARGET_PC #include "dusk/frame_interpolation.h" #endif @@ -2386,10 +2388,12 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* ppos, GXColor& unused, u8** tex) { u8 draw_sun = false; u16 date = dComIfGs_getDate(); -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) if (g_env_light.hide_vrbox) { return; } + IF_DUSK_BLOCK_END #endif if (strcmp(dComIfGp_getStartStageName(), "F_SP200") == 0) { @@ -2754,10 +2758,12 @@ void dKyr_drawLenzflare(Mtx drawMtx, cXyz* ppos, GXColor& param_2, u8** tex) { static s16 S_rot_work1 = 0; static s16 S_rot_work2 = 0; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) if (g_env_light.hide_vrbox) { return; } + IF_DUSK_BLOCK_END #endif Mtx camMtx; @@ -4223,10 +4229,12 @@ void dKyr_drawStar(Mtx drawMtx, u8** tex) { csXyz(0, 30000, 19000), }; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) if (g_env_light.hide_vrbox) { return; } + IF_DUSK_BLOCK_END #endif if (star_packet->mEffectNum != 0) { @@ -4770,10 +4778,12 @@ void drawVrkumo(Mtx drawMtx, GXColor& color, u8** tex) { int pass = 1; f32 spC4 = 0.0f; -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) if (g_env_light.hide_vrbox) { return; } + IF_DUSK_BLOCK_END #endif cXyz sp15C; diff --git a/src/d/d_menu_fmap.cpp b/src/d/d_menu_fmap.cpp index 7db489e51b..c2d642a6d4 100644 --- a/src/d/d_menu_fmap.cpp +++ b/src/d/d_menu_fmap.cpp @@ -21,8 +21,9 @@ #include "d/d_msg_object.h" #include "d/d_msg_scrn_explain.h" #include "d/d_stage.h" -#include "helpers/string.hpp" +#include "dusk/version.hpp" #include "f_op/f_op_msg_mng.h" +#include "helpers/string.hpp" #if TARGET_PC #include "dusk/frame_interpolation.h" @@ -1217,7 +1218,8 @@ void dMenu_Fmap_c::spot_map_proc() { { mpDraw2DBack->stageMapMove(mpStick, 1, true); } else if (dMw_Z_TRIGGER() && mpDraw2DTop->isWarpAccept()) { -#if VERSION >= VERSION_GCN_JPN +#if TARGET_PC || VERSION >= VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) //! JPN version added a check to make sure if Arbiter's Grounds is cleared that //! the Mirror Chamber Statue has been spun before allowing portal warping from the map screen. if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265]) && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361])) { @@ -1227,7 +1229,7 @@ void dMenu_Fmap_c::spot_map_proc() { mPrevProcessAlt = mProcess; setProcess(PROC_PORTAL_WARP_FORBID); Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); - } else + } IF_DUSK_BLOCK_END else #endif if (mpDraw2DTop->checkPlayerWarpAccept()) { mIsWarpMap = true; diff --git a/src/d/d_msg_unit.cpp b/src/d/d_msg_unit.cpp index 057e6cc3fc..e81e5cd2b5 100644 --- a/src/d/d_msg_unit.cpp +++ b/src/d/d_msg_unit.cpp @@ -56,8 +56,7 @@ typedef struct dMsgUnit_inf1_entry_JPN { BE(u16) field_0x14; BE(u16) field_0x16; BE(u16) field_0x18; - BE(u16) startFrame; - BE(u16) endFrame; + BE(u16) field_0x1A; } dMsgUnit_inf1_entry_JPN; typedef struct dMsgUnit_inf1_section_JPN { @@ -117,7 +116,7 @@ void dMsgUnit_c::setTag_jpn(int i_type, int i_value, TEXT_SPAN o_buffer, bool pa } } - if ((i_type == 3 && param_4 == true) || i_type == 4 && param_4 == false) { + if ((i_type == 3 && param_4 == true) || (i_type == 4 && param_4 == false)) { f32 dayTime = g_env_light.getDaytime(); f32 hour = dayTime / 15.0f; @@ -141,65 +140,64 @@ void dMsgUnit_c::setTag_jpn(int i_type, int i_value, TEXT_SPAN o_buffer, bool pa if (!stack9) { bmg_header_t* pHeader = (bmg_header_t*)dMeter2Info_getMsgUnitResource(); - dMsgUnit_inf1_section_JPN* pInfoBlock = NULL; + bmg_section_t* pInfoBlock = NULL; const void* pMsgDataBlock = NULL; str1_section_t* pStrAttributeBlock = NULL; int filepos = sizeof(bmg_header_t); u32 filesize = pHeader->size; - bmg_section_t* pSection = (bmg_section_t*)(((u8*)pHeader) + filepos); + u8* pSection = ((u8*)pHeader) + filepos; - for (; filepos < filesize; filepos += pSection->size) { - switch(pSection->magic) { - case 'FLW1': - break; - case 'FLI1': - break; - case 'INF1': - pInfoBlock = (dMsgUnit_inf1_section_JPN*)pSection; - break; - case 'DAT1': - pMsgDataBlock = pSection; - break; - case 'STR1': - pStrAttributeBlock = (str1_section_t*)pSection; - break; + while (filepos < filesize) { + switch(((bmg_section_t*)pSection)->magic) { + case 'FLW1': + break; + case 'FLI1': + break; + case 'INF1': + pInfoBlock = (bmg_section_t*)pSection; + break; + case 'DAT1': + pMsgDataBlock = pSection; + break; + case 'STR1': + pStrAttributeBlock = (str1_section_t*)pSection; + break; } - pSection = (bmg_section_t*)((u8*)pSection + pSection->size); + filepos += ((bmg_section_t*)pSection)->size; + pSection += ((bmg_section_t*)pSection)->size; } u16 vals[12]; - vals[0] = pInfoBlock->entries[i_type].field_0x04; - vals[1] = pInfoBlock->entries[i_type].field_0x06; - vals[2] = pInfoBlock->entries[i_type].field_0x08; - vals[3] = pInfoBlock->entries[i_type].field_0x0a; - vals[4] = pInfoBlock->entries[i_type].field_0x0c; - vals[5] = pInfoBlock->entries[i_type].field_0x0e; - vals[6] = pInfoBlock->entries[i_type].field_0x10; - vals[7] = pInfoBlock->entries[i_type].field_0x12; - vals[8] = pInfoBlock->entries[i_type].field_0x14; - vals[9] = pInfoBlock->entries[i_type].field_0x16; - vals[10] = pInfoBlock->entries[i_type].field_0x18; - int entryOff = pInfoBlock->entries[i_type].dat1EntryOffset; + vals[0] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x04; + vals[1] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x06; + vals[2] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x08; + vals[3] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x0a; + vals[4] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x0c; + vals[5] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x0e; + vals[6] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x10; + vals[7] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x12; + vals[8] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x14; + vals[9] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x16; + vals[10] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x18; + u32 dat1EntryOffset = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].dat1EntryOffset; - char* value2 = (char*)((uintptr_t)pMsgDataBlock + entryOff + 8); + char* dat1Entry = (char*)((u8*)pMsgDataBlock + dat1EntryOffset + 8); const char* uVar5; if (i_value == 0) { uVar5 = pStrAttributeBlock->entries->str + vals[0]; + } else if ((i_value % 10) == 0) { + uVar5 = pStrAttributeBlock->entries->str + (vals[10]); } else { - if ((i_value % 10) == 0) { - uVar5 = pStrAttributeBlock->entries->str + (vals[10]); - } else { - uVar5 = pStrAttributeBlock->entries->str + vals[i_value % 10]; - } + uVar5 = pStrAttributeBlock->entries->str + vals[i_value % 10]; } int uVar5Len = strlen(uVar5); if (uVar5Len == 0) { if (stack8) { - SAFE_STRCAT(o_buffer, value2); + SAFE_STRCAT(o_buffer, dat1Entry); } else { - SAFE_SPRINTF(o_buffer, "%d%s", i_value, value2); + SAFE_SPRINTF(o_buffer, "%d%s", i_value, dat1Entry); } } else { char unkCharArr[7]; @@ -208,15 +206,15 @@ void dMsgUnit_c::setTag_jpn(int i_type, int i_value, TEXT_SPAN o_buffer, bool pa unkCharArr[2] = -1; unkCharArr[3] = -1; unkCharArr[4] = 2; - unkCharArr[5] = strlen(value2) / 2; + unkCharArr[5] = strlen(dat1Entry) / 2; unkCharArr[6] = 0; if (stack8) { SAFE_STRCAT(o_buffer, unkCharArr); SAFE_STRCAT(o_buffer, uVar5); - SAFE_STRCAT(o_buffer, value2); + SAFE_STRCAT(o_buffer, dat1Entry); } else { - SAFE_SPRINTF(o_buffer, "%d%s%s%s", i_value, unkCharArr, uVar5, value2); + SAFE_SPRINTF(o_buffer, "%d%s%s%s", i_value, unkCharArr, uVar5, dat1Entry); } } } diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp index d7739d6158..59688043a5 100644 --- a/src/m_Do/m_Do_MemCardRWmng.cpp +++ b/src/m_Do/m_Do_MemCardRWmng.cpp @@ -348,9 +348,10 @@ static void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) { snprintf(header->mComment, sizeof(header->mComment), HEADER_COMMENT, time.mon + 1, time.mday); } else { - // TODO JPN SHIFT-JIS - // snprintf(header->mTitle, sizeof(header->mTitle), "ゼルダの伝説 トワイライトプリンセス"); - // snprintf(header->mComment, sizeof(header->mComment), "%d月%d日のセーブデータです", time.mon + 1, time.mday); + // shift-jis "ゼルダの伝説 トワイライトプリンセス" + snprintf(header->mTitle, sizeof(header->mTitle), "\x83\x5b\x83\x8b\x83\x5f\x82\xcc\x93\x60\x90\xe0\x20\xc4\xdc\xb2\xd7\xb2\xc4\xcc\xdf\xd8\xdd\xbe\xbd"); + // shift-jis "%d月%d日のセーブデータです" + snprintf(header->mComment, sizeof(header->mComment), "\x25\x64\x8c\x8e\x25\x64\x93\xfa\x82\xcc\x83\x5a\x81\x5b\x83\x75\x83\x66\x81\x5b\x83\x5e\x82\xc5\x82\xb7", time.mon + 1, time.mday); } #elif VERSION == VERSION_GCN_PAL switch (dComIfGs_getPalLanguage()) { From 8caab1a6ba4aad5513bc9fe402a76dce53964e9c Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 17 Jul 2026 22:35:37 -0600 Subject: [PATCH 060/223] Implement iOS hook prepatching & improve MSVC PTMF support (#2222) --- CMakeLists.txt | 62 +++++-- CMakePresets.json | 16 ++ cmake/ModSDK.cmake | 33 ++++ cmake/SymbolManifest.cmake | 14 +- files.cmake | 2 + sdk/include/mods/api.h | 25 ++- sdk/include/mods/meta.hpp | 46 +++++- src/dusk/mod_loader.hpp | 10 ++ src/dusk/mods/loader/loader.cpp | 28 ++++ src/dusk/mods/loader/prepatch.cpp | 260 ++++++++++++++++++++++++++++++ src/dusk/mods/loader/prepatch.hpp | 20 +++ src/dusk/mods/svc/hook.cpp | 256 ++++++++++++++++++++++++----- 12 files changed, 707 insertions(+), 65 deletions(-) create mode 100644 src/dusk/mods/loader/prepatch.cpp create mode 100644 src/dusk/mods/loader/prepatch.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 75a8d01151..b1c8986597 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,35 @@ option(DUSK_PACKAGE_INSTALL "Install Dusklight with a Linux-native file structur option(DUSK_GFX_DEBUG_GROUPS "Report debug groups to the native graphics API" ${DUSK_GFX_DEBUG_GROUPS_DEFAULT}) option(DUSK_ENABLE_CODE_MODS "Enable code mods" OFF) +set(DUSK_HAS_FUNCHOOK OFF) +if (DUSK_ENABLE_CODE_MODS AND (NOT APPLE OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")) + set(DUSK_HAS_FUNCHOOK ON) +endif () +set(DUSK_HAS_FUNCHOOK ${DUSK_HAS_FUNCHOOK} CACHE INTERNAL "Enable funchook" FORCE) + +set(_target_architectures ${CMAKE_OSX_ARCHITECTURES}) +if (NOT _target_architectures) + set(_target_architectures ${CMAKE_SYSTEM_PROCESSOR}) +endif () +list(LENGTH _target_architectures _target_arch_count) +set(DUSK_HAS_PREPATCH OFF) +if (DUSK_ENABLE_CODE_MODS AND APPLE AND _target_arch_count EQUAL 1) + list(GET _target_architectures 0 _target_arch) + if (_target_arch STREQUAL "arm64") + set(DUSK_HAS_PREPATCH ON) + endif () +endif () +set(DUSK_HAS_PREPATCH ${DUSK_HAS_PREPATCH} CACHE INTERNAL "Enable symgen prepatch support" FORCE) + +if (DUSK_ENABLE_CODE_MODS AND CMAKE_SYSTEM_NAME MATCHES "^(iOS|tvOS)$") + list(LENGTH CMAKE_OSX_ARCHITECTURES _mobile_arch_count) + if (NOT _mobile_arch_count EQUAL 1 OR NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64") + message(FATAL_ERROR + "iOS/tvOS code mods require a single arm64 architecture; got " + "CMAKE_OSX_ARCHITECTURES='${CMAKE_OSX_ARCHITECTURES}'") + endif () +endif () + # Edit & Continue if (MSVC) if ("${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}" STREQUAL "" AND CMAKE_BUILD_TYPE STREQUAL "Debug" @@ -175,8 +204,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux) set(CMAKE_BUILD_RPATH "$ORIGIN") elseif (APPLE) add_compile_options(-Wno-declaration-after-statement -Wno-non-pod-varargs) - set(CMAKE_INSTALL_RPATH "$ORIGIN") - set(CMAKE_BUILD_RPATH "$ORIGIN") + set(CMAKE_INSTALL_RPATH "@loader_path") + set(CMAKE_BUILD_RPATH "@loader_path") elseif (MSVC) add_compile_options( $<$:/bigobj> @@ -219,7 +248,7 @@ FetchContent_Declare(miniz ) set(_fetch_content_deps cxxopts json miniz) -if (DUSK_ENABLE_CODE_MODS) +if (DUSK_HAS_FUNCHOOK) message(STATUS "dusklight: Fetching funchook") # cmake/PatchFunchook.cmake patches funchook's cmake/capstone.cmake.in to inject a # PATCH_COMMAND into capstone's inner ExternalProject. That PATCH_COMMAND runs @@ -272,10 +301,10 @@ if (DUSK_ENABLE_SENTRY_NATIVE) ) if (NOT sentry_native_POPULATED) FetchContent_Populate(sentry_native) - set(_dusk_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES}) + set(_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES}) set(CMAKE_SKIP_INSTALL_RULES ON) add_subdirectory(${sentry_native_SOURCE_DIR} ${sentry_native_BINARY_DIR} EXCLUDE_FROM_ALL) - set(CMAKE_SKIP_INSTALL_RULES ${_dusk_skip_install_rules}) + set(CMAKE_SKIP_INSTALL_RULES ${_skip_install_rules}) endif () endif () @@ -308,7 +337,7 @@ set(GAME_COMPILE_DEFS DUSK_BUILDING_GAME=1) set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt Threads::Threads zstd::libzstd dusklight_game_headers) -if (DUSK_ENABLE_CODE_MODS) +if (DUSK_HAS_FUNCHOOK) list(APPEND GAME_LIBS funchook-static) endif () @@ -381,6 +410,9 @@ endif () if (DUSK_ENABLE_CODE_MODS) list(APPEND GAME_COMPILE_DEFS DUSK_CODE_MODS=1) endif () +list(APPEND GAME_COMPILE_DEFS + DUSK_HAS_FUNCHOOK=$ + DUSK_HAS_PREPATCH=$) if (DUSK_PACKAGE_INSTALL) include(GNUInstallDirs) @@ -473,18 +505,28 @@ if (MSVC) else () target_link_options(dusklight PRIVATE /FUNCTIONPADMIN /OPT:NOICF) endif () -elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +elseif (CMAKE_CXX_COMPILER_ID MATCHES "^(AppleClang|Clang)$") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64") set(DUSK_PATCHABLE_ENTRY_FLAG $<$:-fpatchable-function-entry=2,1>) else () set(DUSK_PATCHABLE_ENTRY_FLAG $<$:-fpatchable-function-entry=10,5>) endif () endif () + if (DEFINED DUSK_PATCHABLE_ENTRY_FLAG) target_compile_options(dusklight PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG}) foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES) target_compile_options(${jsystem_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG}) endforeach() + foreach(_sdk_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx + aurora_os aurora_pad aurora_si aurora_vi) + if (TARGET ${_sdk_lib}) + get_target_property(_sdk_lib_imported ${_sdk_lib} IMPORTED) + if (NOT _sdk_lib_imported) + target_compile_options(${_sdk_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG}) + endif () + endif () + endforeach () endif () if (WIN32) @@ -612,13 +654,13 @@ if (APPLE) list(APPEND _apple_bundle_properties XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${DUSK_ENTITLEMENTS}) endif () - if (NOT IOS AND NOT TVOS) + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(APPEND _apple_bundle_properties XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES") endif () set_target_properties(dusklight PROPERTIES ${_apple_bundle_properties}) - if (NOT IOS AND NOT TVOS AND NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") set(_sign_nested_commands) if (TARGET crashpad_handler) list(APPEND _sign_nested_commands @@ -635,7 +677,7 @@ if (APPLE) endif () endif () -if (APPLE AND NOT IOS AND NOT TVOS) +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") find_library(APPKIT_FRAMEWORK AppKit REQUIRED) target_sources(dusklight PRIVATE src/dusk/file_select_macos.mm) set_source_files_properties(src/dusk/file_select_macos.mm PROPERTIES COMPILE_FLAGS -fobjc-arc) diff --git a/CMakePresets.json b/CMakePresets.json index e6485ddac1..4faccc4448 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -314,11 +314,19 @@ "type": "BOOL", "value": false }, + "ENABLE_VISIBILITY": { + "type": "BOOL", + "value": true + }, "Rust_CARGO_TARGET": "aarch64-apple-ios", "BUILD_SHARED_LIBS": { "type": "BOOL", "value": false }, + "DUSK_ENABLE_CODE_MODS": { + "type": "BOOL", + "value": true + }, "CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": { "type": "BOOL", "value": true @@ -354,12 +362,20 @@ "type": "BOOL", "value": false }, + "ENABLE_VISIBILITY": { + "type": "BOOL", + "value": true + }, "Rust_CARGO_TARGET": "aarch64-apple-tvos", "Rust_TOOLCHAIN": "nightly", "BUILD_SHARED_LIBS": { "type": "BOOL", "value": false }, + "DUSK_ENABLE_CODE_MODS": { + "type": "BOOL", + "value": true + }, "CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": { "type": "BOOL", "value": true diff --git a/cmake/ModSDK.cmake b/cmake/ModSDK.cmake index 10a87e8525..0dfe5c48b4 100644 --- a/cmake/ModSDK.cmake +++ b/cmake/ModSDK.cmake @@ -417,6 +417,21 @@ function(install_bundled_mods) DESTINATION "${_bundle_dir}/Frameworks" PATTERN "${_lib_name}" EXCLUDE) endforeach () + if (DUSK_HAS_PREPATCH) + set(_prepatch_executable "${_bundle_dir}/Dusklight") + set(_prepatch_mod_args "") + foreach (_id IN LISTS _ids) + string(APPEND _prepatch_mod_args + " \"${_bundle_dir}/Frameworks/${_id}.so\"") + endforeach () + install(CODE " + execute_process( + COMMAND \"${SYMGEN_EXE}\" prepatch + --binary \"${_prepatch_executable}\" + --report \"${CMAKE_BINARY_DIR}/prepatch-report-$.json\" + ${_prepatch_mod_args} + COMMAND_ERROR_IS_FATAL ANY)") + endif () else () foreach (_i RANGE ${_last}) list(GET _ids ${_i} _id) @@ -432,6 +447,24 @@ function(install_bundled_mods) endif () endforeach ()") endforeach () + if (DUSK_HAS_PREPATCH) + set(_prepatch_executable "${_bundle_dir}/Contents/MacOS/Dusklight") + set(_prepatch_mod_args "") + foreach (_i RANGE ${_last}) + list(GET _ids ${_i} _id) + list(GET _lib_platforms ${_i} _lib_platform) + list(GET _lib_names ${_i} _lib_name) + string(APPEND _prepatch_mod_args + " \"${_bundle_dir}/Contents/Resources/mods/${_id}/lib/${_lib_platform}/${_lib_name}\"") + endforeach () + install(CODE " + execute_process( + COMMAND \"${SYMGEN_EXE}\" prepatch + --binary \"${_prepatch_executable}\" + --report \"${CMAKE_BINARY_DIR}/prepatch-report-$.json\" + ${_prepatch_mod_args} + COMMAND_ERROR_IS_FATAL ANY)") + endif () if (TARGET crashpad_handler) install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/MacOS/$\" COMMAND_ERROR_IS_FATAL ANY)") endif () diff --git a/cmake/SymbolManifest.cmake b/cmake/SymbolManifest.cmake index 657afa2a78..40584ede19 100644 --- a/cmake/SymbolManifest.cmake +++ b/cmake/SymbolManifest.cmake @@ -2,7 +2,7 @@ include_guard(GLOBAL) get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) -set(_SYMGEN_VERSION "1.2.3") +set(_SYMGEN_VERSION "1.3.1") set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}") set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release") mark_as_advanced(SYMGEN_PATH) @@ -113,14 +113,18 @@ function(setup_symbol_manifest target) endif () if (APPLE) - # Room for the load command `symgen manifest --embed` inserts post-link. - target_link_options(${target} PRIVATE "LINKER:-headerpad,0x200") + # Room for the symbol manifest and several prepatch arenas. + target_link_options(${target} PRIVATE "LINKER:-headerpad,0x1000") + # ld64 may update an existing output, which breaks our symdb insertion. Remove it first. + add_custom_command(TARGET ${target} PRE_LINK + COMMAND "${CMAKE_COMMAND}" -E rm -f "$" + VERBATIM) endif () # The manifest is embedded into the image as a new section, located at runtime through # the descriptor manifest.cpp reserves. On Apple platforms this command must stay - # attached before the ad-hoc codesign POST_BUILD command: the patch invalidates any - # existing signature. + # attached before the ad-hoc codesign POST_BUILD command: the patch removes any existing + # signature. add_custom_command(TARGET ${target} POST_BUILD COMMAND "${SYMGEN_EXE}" manifest ${_input} --embed "$" COMMENT "Embedding symbol manifest" diff --git a/files.cmake b/files.cmake index c8c92c9b75..fa96e313c6 100644 --- a/files.cmake +++ b/files.cmake @@ -1479,6 +1479,8 @@ set(DUSK_FILES src/dusk/mods/loader/loader.hpp src/dusk/mods/loader/native_module.cpp src/dusk/mods/loader/native_module.hpp + src/dusk/mods/loader/prepatch.cpp + src/dusk/mods/loader/prepatch.hpp src/dusk/mods/log_buffer.cpp src/dusk/mods/log_buffer.hpp src/dusk/mods/manifest.cpp diff --git a/sdk/include/mods/api.h b/sdk/include/mods/api.h index c63d08cfe2..3a72135388 100644 --- a/sdk/include/mods/api.h +++ b/sdk/include/mods/api.h @@ -148,6 +148,7 @@ typedef enum ModMetaKind { MOD_META_HOOK_FN = 4, MOD_META_HOOK_MEM = 5, MOD_META_HOOK_NAME = 6, + MOD_META_HOOK_MEM_EXT = 7, } ModMetaKind; typedef struct ModMetaRecord { @@ -203,15 +204,37 @@ static_assert(sizeof(ModMetaHookFn) == 24); * NUL-terminated strings follow `resolved`: the class vtable symbol (empty if the class name is not * representable), then the stringified target for tooling display. */ +#define MOD_META_HOOK_MEM_CAPACITY 16u typedef struct MOD_META_ALIGN ModMetaHookMem { ModMetaRecord rec; uint32_t reserved; - unsigned char pmf[16]; + unsigned char pmf[MOD_META_HOOK_MEM_CAPACITY]; void* resolved; /* runtime only */ } ModMetaHookMem; static_assert(sizeof(ModMetaHookMem) == 32); +/* + * Extended member-function hook record. The Microsoft x64 ABI uses a 24-byte member pointer for + * classes whose inheritance model was fixed while the class was incomplete. Keep this a distinct + * record kind so loaders can continue to consume MOD_META_HOOK_MEM's original 16-byte layout. + * + * MSVC cannot constant-initialize that member pointer, so materialize points to a compiler- + * generated helper that writes its native representation to a caller-provided buffer. The record + * itself, including its trailing names and the helper relocation, remains constant-initialized and + * available to static tooling. pmf_size is the number of bytes the helper writes. + */ +#define MOD_META_HOOK_MEM_EXT_CAPACITY 24u +typedef void (*ModMetaHookMemMaterializeFn)(unsigned char* out_pmf); +typedef struct MOD_META_ALIGN ModMetaHookMemExt { + ModMetaRecord rec; + uint32_t pmf_size; + ModMetaHookMemMaterializeFn materialize; + void* resolved; /* runtime only */ +} ModMetaHookMemExt; + +static_assert(sizeof(ModMetaHookMemExt) == 24); + /* * Hook on a function by symbol name, for targets that cannot be named in C++ (file-local statics, * private members). One NUL-terminated string follows `resolved`; it may be either the platform diff --git a/sdk/include/mods/meta.hpp b/sdk/include/mods/meta.hpp index 023783cea1..3c6223e6fb 100644 --- a/sdk/include/mods/meta.hpp +++ b/sdk/include/mods/meta.hpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -185,12 +186,21 @@ struct HookMemRecord { uint32_t reserved; union { F fn; - unsigned char raw[16]; + unsigned char raw[MOD_META_HOOK_MEM_CAPACITY]; } pmf; void* resolved; char names[N]; }; +template +struct HookMemExtRecord { + ModMetaRecord rec; + uint32_t pmfSize; + ModMetaHookMemMaterializeFn materialize; + void* resolved; + char names[N]; +}; + template struct HookNameRecord { ModMetaRecord rec; @@ -232,19 +242,43 @@ consteval auto make_hook_mem_names() { } /* - * MSVC constant-evaluates a pointer-to-member only when every other operand in the - * initializer is a literal: no consteval calls, constexpr-object copies, or default - * member initializers. + * MSVC constant-evaluates a compact pointer-to-member only when every other operand in the + * initializer is a literal: no consteval calls, constexpr-object copies, or default member + * initializers. It cannot constant-initialize the 24-byte general representation at all, so the + * extended record points at a compiler-generated materializer while keeping the metadata itself + * constant-initialized for static tooling. */ +template +struct HookMemHolderImpl; + template -struct HookMemHolder { +struct HookMemHolderImpl { using F = decltype(Target); - static_assert(sizeof(F) <= 16, "unsupported pointer-to-member representation"); MOD_META_RECORD static constinit inline HookMemRecord record = { {sizeof(HookMemRecord), MOD_META_HOOK_MEM, 0}, 0, {Target}, nullptr, {Cs...}}; }; +template +struct HookMemHolderImpl { + using F = decltype(Target); + static void materialize(unsigned char* outPmf) { + const F target = Target; + std::memcpy(outPmf, &target, sizeof(target)); + } + MOD_META_RECORD static constinit inline HookMemExtRecord record = { + {sizeof(HookMemExtRecord), MOD_META_HOOK_MEM_EXT, 0}, sizeof(F), materialize, + nullptr, {Cs...}}; +}; + +template +struct HookMemHolder + : HookMemHolderImpl MOD_META_HOOK_MEM_CAPACITY), Cs...> { + using F = decltype(Target); + static_assert(sizeof(F) <= MOD_META_HOOK_MEM_EXT_CAPACITY, + "unsupported pointer-to-member representation"); +}; + template struct HookFnHolder { using F = decltype(Target); diff --git a/src/dusk/mod_loader.hpp b/src/dusk/mod_loader.hpp index 34e17274bc..fad9ba1501 100644 --- a/src/dusk/mod_loader.hpp +++ b/src/dusk/mod_loader.hpp @@ -73,6 +73,7 @@ struct ModMetaParsed { std::vector exports; std::vector hookFns; std::vector hookMems; + std::vector hookMemExts; std::vector hookNames; }; @@ -85,6 +86,15 @@ inline const char* hook_mem_display_name(const ModMetaHookMem& rec) { return vtable + std::char_traits::length(vtable) + 1; } +inline const char* hook_mem_vtable_symbol(const ModMetaHookMemExt& rec) { + return reinterpret_cast(&rec) + sizeof(ModMetaHookMemExt); +} + +inline const char* hook_mem_display_name(const ModMetaHookMemExt& rec) { + const char* vtable = hook_mem_vtable_symbol(rec); + return vtable + std::char_traits::length(vtable) + 1; +} + inline const char* hook_name_symbol(const ModMetaHookName& rec) { return reinterpret_cast(&rec) + sizeof(ModMetaHookName); } diff --git a/src/dusk/mods/loader/loader.cpp b/src/dusk/mods/loader/loader.cpp index 353a2ab596..cdcc16c5e2 100644 --- a/src/dusk/mods/loader/loader.cpp +++ b/src/dusk/mods/loader/loader.cpp @@ -26,6 +26,9 @@ #include "miniz.h" #include "native_module.hpp" #include "nlohmann/json.hpp" +#if DUSK_HAS_PREPATCH +#include "prepatch.hpp" +#endif using namespace std::string_literals; using namespace std::string_view_literals; @@ -411,6 +414,28 @@ static bool parse_meta(NativeMod& native, LoadedMod& mod) { parsed.hookMems.push_back(record); break; } + case MOD_META_HOOK_MEM_EXT: { + if (size <= sizeof(ModMetaHookMemExt)) { + return invalid("truncated extended hook record"); + } + auto* record = reinterpret_cast(const_cast(cursor)); + if (record->pmf_size <= MOD_META_HOOK_MEM_CAPACITY || + record->pmf_size > MOD_META_HOOK_MEM_EXT_CAPACITY || record->materialize == nullptr) + { + return invalid("bad extended hook member-pointer size"); + } + const char* strings = reinterpret_cast(cursor) + sizeof(ModMetaHookMemExt); + const size_t capacity = size - sizeof(ModMetaHookMemExt); + if (!terminated_within(strings, capacity)) { + return invalid("unterminated extended hook vtable symbol"); + } + const size_t vtableLen = std::char_traits::length(strings); + if (!terminated_within(strings + vtableLen + 1, capacity - vtableLen - 1)) { + return invalid("unterminated extended hook display name"); + } + parsed.hookMemExts.push_back(record); + break; + } case MOD_META_HOOK_NAME: { if (size <= sizeof(ModMetaHookName)) { return invalid("truncated hook record"); @@ -906,6 +931,9 @@ void ModLoader::init() { m_initialized = true; manifest::initialize(); +#if DUSK_HAS_PREPATCH + prepatch::initialize(); +#endif if (m_searchDirs.empty()) { Log.warn("no mod search directories configured; mod loading skipped"); diff --git a/src/dusk/mods/loader/prepatch.cpp b/src/dusk/mods/loader/prepatch.cpp new file mode 100644 index 0000000000..a9da0f9301 --- /dev/null +++ b/src/dusk/mods/loader/prepatch.cpp @@ -0,0 +1,260 @@ +#include "prepatch.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "aurora/lib/logging.hpp" + +#if DUSK_HAS_PREPATCH +#include +#include +#endif + +namespace dusk::mods::prepatch { +namespace { + +aurora::Module Log("dusk::mods::prepatch"); + +constexpr std::string_view kSiteMagic = "PS01"; +constexpr size_t kSiteHeaderSize = 12; +constexpr size_t kGatewaySize = 28; +constexpr size_t kOriginalStubOffset = 20; + +constexpr uint32_t kBranchMask = 0xfc000000u; +constexpr uint32_t kBranch = 0x14000000u; +constexpr uint32_t kLdarX16X16 = 0xc8dffe10u; +constexpr uint32_t kCbzX16Stub = 0xb4000050u; +constexpr uint32_t kBrX16 = 0xd61f0200u; +constexpr uint32_t kBtiC = 0xd503245fu; + +struct SiteHeader { + char magic[4]; + int32_t targetDelta; + int32_t slotDelta; +}; +static_assert(sizeof(SiteHeader) == kSiteHeaderSize); + +struct Range { + uintptr_t begin = 0; + uintptr_t end = 0; + + bool contains(uintptr_t address, size_t size) const { + return address >= begin && address <= end && size <= end - address; + } +}; + +struct State { + std::vector executableRanges; + std::vector writableRanges; + std::string failureReason = "not initialized"; + bool loaded = false; + bool initialized = false; +}; +State s_state; + +void fail(std::string reason) { + s_state.failureReason = std::move(reason); + Log.error("prepatch backend unavailable: {}", s_state.failureReason); +} + +void unavailable(std::string reason) { + s_state.failureReason = std::move(reason); + Log.info("prepatch backend unavailable: {}", s_state.failureReason); +} + +bool add_delta(uintptr_t address, int64_t delta, uintptr_t& out) { + if (delta >= 0) { + const auto offset = static_cast(delta); + if (address > std::numeric_limits::max() - offset) { + return false; + } + out = address + offset; + } else { + const auto offset = static_cast(-(delta + 1)) + 1; + if (address < offset) { + return false; + } + out = address - offset; + } + return true; +} + +bool branch_target(uintptr_t address, uint32_t instruction, uintptr_t& out) { + if ((instruction & kBranchMask) != kBranch) { + return false; + } + int64_t words = instruction & 0x03ffffffu; + if ((words & 0x02000000) != 0) { + words -= int64_t{1} << 26; + } + return add_delta(address, words * 4, out); +} + +const Range* containing(const std::vector& ranges, uintptr_t address, size_t size) { + for (const auto& range : ranges) { + if (range.contains(address, size)) { + return ⦥ + } + } + return nullptr; +} + +#if DUSK_HAS_PREPATCH +bool slide_address(intptr_t slide, uint64_t vmaddr, uintptr_t& out) { + if (vmaddr > std::numeric_limits::max()) { + return false; + } + return add_delta(static_cast(vmaddr), slide, out); +} +#endif + +} // namespace + +void initialize() { + if (s_state.initialized) { + return; + } + s_state.initialized = true; + +#if DUSK_HAS_PREPATCH + const auto* imageHeader = reinterpret_cast(_dyld_get_image_header(0)); + if (imageHeader == nullptr || imageHeader->magic != MH_MAGIC_64 || + imageHeader->cputype != CPU_TYPE_ARM64 || + (imageHeader->cpusubtype & ~CPU_SUBTYPE_MASK) == CPU_SUBTYPE_ARM64E || + (imageHeader->cpusubtype & CPU_SUBTYPE_ARM64_PTR_AUTH_MASK) != 0) + { + fail("main image is not a supported 64-bit arm64 Mach-O image"); + return; + } + + const intptr_t slide = _dyld_get_image_vmaddr_slide(0); + const auto* commands = reinterpret_cast(imageHeader + 1); + size_t commandOffset = 0; + for (uint32_t i = 0; i < imageHeader->ncmds; ++i) { + if (commandOffset > imageHeader->sizeofcmds || + imageHeader->sizeofcmds - commandOffset < sizeof(load_command)) + { + fail("main image has malformed load commands"); + return; + } + const auto* command = reinterpret_cast(commands + commandOffset); + if (command->cmdsize < sizeof(load_command) || + command->cmdsize > imageHeader->sizeofcmds - commandOffset) + { + fail("main image has malformed load commands"); + return; + } + if (command->cmd == LC_SEGMENT_64) { + if (command->cmdsize < sizeof(segment_command_64)) { + fail("main image has a truncated segment command"); + return; + } + const auto* segment = reinterpret_cast(command); + const uint64_t vmEnd = segment->vmaddr + segment->vmsize; + if (vmEnd < segment->vmaddr) { + fail("main image segment range overflows"); + return; + } + uintptr_t begin = 0; + uintptr_t end = 0; + if (!slide_address(slide, segment->vmaddr, begin) || + !slide_address(slide, vmEnd, end) || end < begin) + { + fail("main image runtime segment range overflows"); + return; + } + constexpr vm_prot_t kRx = VM_PROT_READ | VM_PROT_EXECUTE; + constexpr vm_prot_t kRw = VM_PROT_READ | VM_PROT_WRITE; + if (segment->initprot == kRx && segment->maxprot == kRx) { + s_state.executableRanges.push_back({begin, end}); + } else if (segment->initprot == kRw && segment->maxprot == kRw) { + s_state.writableRanges.push_back({begin, end}); + } + } + commandOffset += command->cmdsize; + } + if (commandOffset != imageHeader->sizeofcmds || s_state.executableRanges.empty() || + s_state.writableRanges.empty()) + { + fail("main image has no usable executable or writable segments"); + return; + } + + s_state.failureReason.clear(); + s_state.loaded = true; +#else + unavailable("prepatch support is not available in this build"); +#endif +} + +bool available() { + return s_state.loaded; +} + +const char* unavailable_reason() { + return s_state.failureReason.c_str(); +} + +std::optional lookup(void* runtimeTarget) { + if (!s_state.loaded || runtimeTarget == nullptr) { + return std::nullopt; + } + const auto target = reinterpret_cast(runtimeTarget); + if (containing(s_state.executableRanges, target, sizeof(uint32_t)) == nullptr) { + return std::nullopt; + } + + uint32_t entry = 0; + std::memcpy(&entry, reinterpret_cast(target), sizeof(entry)); + uintptr_t gateway = 0; + if (!branch_target(target, entry, gateway) || gateway < kSiteHeaderSize) { + return std::nullopt; + } + const uintptr_t headerAddress = gateway - kSiteHeaderSize; + if (containing(s_state.executableRanges, headerAddress, kSiteHeaderSize + kGatewaySize) == + nullptr) + { + return std::nullopt; + } + + SiteHeader header{}; + std::memcpy(&header, reinterpret_cast(headerAddress), sizeof(header)); + if (std::memcmp(header.magic, kSiteMagic.data(), kSiteMagic.size()) != 0) { + return std::nullopt; + } + uintptr_t recordedTarget = 0; + uintptr_t slot = 0; + if (!add_delta(gateway, header.targetDelta, recordedTarget) || recordedTarget != target || + !add_delta(gateway, header.slotDelta, slot) || (slot & (alignof(void*) - 1)) != 0 || + containing(s_state.writableRanges, slot, sizeof(void*)) == nullptr) + { + return std::nullopt; + } + + uint32_t instructions[7]{}; + std::memcpy(instructions, reinterpret_cast(gateway), sizeof(instructions)); + uintptr_t original = 0; + if (instructions[2] != kLdarX16X16 || instructions[3] != kCbzX16Stub || + instructions[4] != kBrX16 || instructions[5] != kBtiC || + target > std::numeric_limits::max() - 4 || + !branch_target(gateway + 24, instructions[6], original) || original != target + 4) + { + return std::nullopt; + } + + return Site{ + reinterpret_cast(slot), reinterpret_cast(gateway + kOriginalStubOffset)}; +} + +void publish(const Site& site, void* trampoline) { + std::atomic_ref slot{*site.slot}; + slot.store(trampoline, std::memory_order_release); +} + +} // namespace dusk::mods::prepatch diff --git a/src/dusk/mods/loader/prepatch.hpp b/src/dusk/mods/loader/prepatch.hpp new file mode 100644 index 0000000000..3b742d003b --- /dev/null +++ b/src/dusk/mods/loader/prepatch.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include + +namespace dusk::mods::prepatch { + +struct Site { + void** slot = nullptr; + void* original = nullptr; +}; + +void initialize(); +bool available(); +const char* unavailable_reason(); +// Returns the target function's prepatched hook site, or nullopt if it is not prepatched. +std::optional lookup(void* runtimeTarget); +// Publishes a trampoline (or nullptr to deactivate). +void publish(const Site& site, void* trampoline); + +} // namespace dusk::mods::prepatch diff --git a/src/dusk/mods/svc/hook.cpp b/src/dusk/mods/svc/hook.cpp index 34d7d54aa7..ec967ae7e6 100644 --- a/src/dusk/mods/svc/hook.cpp +++ b/src/dusk/mods/svc/hook.cpp @@ -1,6 +1,9 @@ #include "registry.hpp" #include "dusk/mods/loader/loader.hpp" +#if DUSK_HAS_PREPATCH +#include "dusk/mods/loader/prepatch.hpp" +#endif #include "dusk/mods/manifest.hpp" #include "mods/svc/hook.h" @@ -9,11 +12,14 @@ #include "dusk/mods/log_buffer.hpp" #include +#include #include #include #include #include +#if DUSK_HAS_FUNCHOOK #include +#endif #include #include #include @@ -48,8 +54,7 @@ struct HookSlot { // One per mod that requested a hook on a target: its template-generated trampoline and the // address of its Hook::g_orig, both living in the mod's dylib. Any candidate's trampoline // is interchangeable (dispatch walks the shared HookSlot), so when the active installer's mod -// unloads, the funchook detour is handed off to a surviving candidate and every candidate's -// *orig_store is rewritten to the new original pointer. +// unloads, the backend is handed off to a surviving candidate. struct HookCandidate { ModContext* context = nullptr; void* trampoline = nullptr; @@ -57,8 +62,28 @@ struct HookCandidate { uint64_t order = 0; }; -struct InstalledHook { +enum class BackendKind { + None, +#if DUSK_HAS_FUNCHOOK + Funchook, +#endif +#if DUSK_HAS_PREPATCH + Prepatch, +#endif +}; + +struct InstalledBackend { + BackendKind kind = BackendKind::None; +#if DUSK_HAS_FUNCHOOK funchook_t* handle = nullptr; +#endif +#if DUSK_HAS_PREPATCH + prepatch::Site prepatchSite{}; +#endif +}; + +struct InstalledHook { + InstalledBackend backend{}; void* original = nullptr; ModContext* active = nullptr; std::vector candidates; @@ -205,7 +230,8 @@ void* resolve_target(void* addr) { return addr; } -funchook_t* install_trampoline(void* fnAddr, void* trampoline, void** outOriginal) { +#if DUSK_HAS_FUNCHOOK +funchook_t* install_funchook(void* fnAddr, void* trampoline, void** outOriginal) { funchook_t* fh = funchook_create(); if (fh == nullptr) { DuskLog.warn("HookSystem: funchook_create failed for {:p}", fnAddr); @@ -214,18 +240,101 @@ funchook_t* install_trampoline(void* fnAddr, void* trampoline, void** outOrigina void* fn = fnAddr; const int prep = funchook_prepare(fh, &fn, trampoline); + if (prep == 0) { + *outOriginal = fn; + } const int inst = prep == 0 ? funchook_install(fh, 0) : -1; if (prep != 0 || inst != 0) { const char* message = funchook_error_message(fh); DuskLog.warn("HookSystem: funchook failed for {:p} (prepare={} install={}): {}", fnAddr, prep, inst, message != nullptr && message[0] != '\0' ? message : "no details"); funchook_destroy(fh); + *outOriginal = nullptr; return nullptr; } - - *outOriginal = fn; return fh; } +#endif + +bool install_backend( + void* fnAddr, void* trampoline, InstalledBackend& outBackend, void** originalStore) { +#if DUSK_HAS_PREPATCH + if (const auto site = prepatch::lookup(fnAddr)) { + *originalStore = site->original; + prepatch::publish(*site, trampoline); + outBackend.kind = BackendKind::Prepatch; + outBackend.prepatchSite = *site; + return true; + } +#endif + +#if DUSK_HAS_FUNCHOOK + funchook_t* handle = install_funchook(fnAddr, trampoline, originalStore); + if (handle == nullptr) { + return false; + } + outBackend.kind = BackendKind::Funchook; + outBackend.handle = handle; + return true; +#else +#if DUSK_HAS_PREPATCH + DuskLog.warn("HookSystem: prepatch backend cannot install target {:p}: {}", fnAddr, + prepatch::available() ? "target has no valid gateway" : prepatch::unavailable_reason()); +#else + DuskLog.warn("HookSystem: no hook backend can install target {:p}", fnAddr); +#endif + return false; +#endif +} + +void deactivate_backend(void* target, InstalledBackend& backend) { +#if DUSK_HAS_PREPATCH + if (backend.kind == BackendKind::Prepatch) { + prepatch::publish(backend.prepatchSite, nullptr); + backend = {}; + return; + } +#endif +#if DUSK_HAS_FUNCHOOK + if (backend.kind == BackendKind::Funchook) { + const int uninst = funchook_uninstall(backend.handle, 0); + const int destr = funchook_destroy(backend.handle); + if (uninst != 0 || destr != 0) { + DuskLog.warn("HookSystem: funchook uninstall/destroy for {:p} returned {}/{}", target, + uninst, destr); + } + } +#else + (void)target; +#endif + backend = {}; +} + +bool handoff_backend( + void* target, InstalledHook& entry, const HookCandidate& candidate, void** outOriginal) { +#if DUSK_HAS_PREPATCH + if (entry.backend.kind == BackendKind::Prepatch) { + *candidate.origStore = entry.original; + prepatch::publish(entry.backend.prepatchSite, candidate.trampoline); + *outOriginal = entry.original; + return true; + } +#endif +#if DUSK_HAS_FUNCHOOK + InstalledBackend backend; + if (!install_backend(target, candidate.trampoline, backend, candidate.origStore)) { + return false; + } + entry.backend = backend; + *outOriginal = *candidate.origStore; + return true; +#else + (void)target; + (void)candidate; + (void)outOriginal; + return false; +#endif +} ModResult hook_install(ModContext* context, void* fnAddr, void* trampolineFn, void** outOriginal) { if (fnAddr == nullptr || trampolineFn == nullptr || outOriginal == nullptr) { @@ -272,18 +381,16 @@ ModResult hook_install(ModContext* context, void* fnAddr, void* trampolineFn, vo name != nullptr ? name : "?", fnAddr, mod_id_from_context(context)); } - void* original = nullptr; - funchook_t* fh = install_trampoline(fnAddr, trampolineFn, &original); - if (fh == nullptr) { + InstalledBackend backend; + if (!install_backend(fnAddr, trampolineFn, backend, outOriginal)) { return MOD_ERROR; } auto& entry = s_installed[key]; - entry.handle = fh; - entry.original = original; + entry.backend = backend; + entry.original = *outOriginal; entry.active = context; entry.candidates.push_back({context, trampolineFn, outOriginal, s_nextOrder++}); - *outOriginal = original; return MOD_OK; } @@ -543,20 +650,67 @@ bool resolve_symbol_checked(const char* symbol, bool requireCode, void** out, st return false; } -/* Decode a HOOK_MEM record's pointer-to-member representation into the target code address, - * mirroring what calling through the mfp would invoke. Virtual members hook the class's own - * overrider, read from its vtable (resolved from the symbol manifest). */ -void* resolve_member_record( - const ModMetaHookMem& record, const char* vtableSymbol, std::string& why) { - uintptr_t words[2]; - std::memcpy(words, record.pmf, sizeof(words)); +/* + * Decodes a member hook record's pointer-to-member representation into the target code address. + * Virtual members prefer their named overrider, then fall back to reading the primary vtable slot. + */ +void* resolve_member_record(const unsigned char* pmf, size_t pmfSize, const char* vtableSymbol, + const char* displayName, std::string& why) { + if (pmfSize < sizeof(uintptr_t)) { + why = "truncated pointer-to-member representation"; + return nullptr; + } + uintptr_t words[2]{}; + std::memcpy(words, pmf, std::min(sizeof(words), pmfSize)); #if defined(_WIN32) const void* fn = reinterpret_cast(words[0]); + if (fn == nullptr) { + why = "null pointer-to-member target"; + return nullptr; + } const size_t slot = vcall_slot_offset(fn); if (slot == static_cast(-1)) { // not a vcall thunk: direct address return const_cast(fn); } + + // A display name resolves the actual overrider rather than an ABI vcall thunk. Besides being + // more direct, this covers secondary vtables: the MSVC representation has `this` adjustment + // but does not have the base-path suffix used by the decorated vtable symbol. + std::string displayWhy; + void* displayTarget = nullptr; + if (displayName[0] != '\0' && + resolve_symbol_checked(displayName, true, &displayTarget, displayWhy)) + { + return displayTarget; + } + + int32_t thisAdjustment = 0; + if (pmfSize >= sizeof(uintptr_t) + sizeof(thisAdjustment)) { + std::memcpy(&thisAdjustment, pmf + sizeof(uintptr_t), sizeof(thisAdjustment)); + } + if (thisAdjustment != 0) { + why = fmt::format( + "virtual member requires a {}-byte this adjustment and its overrider did not " + "resolve by name ({})", + thisAdjustment, displayWhy); + return nullptr; + } + int32_t firstVirtualField = 0; + if (pmfSize > MOD_META_HOOK_MEM_CAPACITY && pmfSize >= sizeof(uintptr_t) + 2 * sizeof(int32_t)) + { + std::memcpy(&firstVirtualField, pmf + sizeof(uintptr_t) + sizeof(int32_t), sizeof(int32_t)); + } + int32_t secondVirtualField = 0; + if (pmfSize > MOD_META_HOOK_MEM_CAPACITY && pmfSize >= sizeof(uintptr_t) + 3 * sizeof(int32_t)) + { + std::memcpy( + &secondVirtualField, pmf + sizeof(uintptr_t) + 2 * sizeof(int32_t), sizeof(int32_t)); + } + if (firstVirtualField != 0 || secondVirtualField != 0) { + why = fmt::format("virtual-base member did not resolve by name ({})", displayWhy); + return nullptr; + } if (vtableSymbol[0] == '\0') { why = "class name is not representable as a vtable symbol"; return nullptr; @@ -583,10 +737,18 @@ void* resolve_member_record( if (!isVirtual) { // non-virtual: the address itself return reinterpret_cast(words[0]); } + + std::string displayWhy; + void* displayTarget = nullptr; + if (displayName[0] != '\0' && + resolve_symbol_checked(displayName, true, &displayTarget, displayWhy)) + { + return displayTarget; + } if (thisAdjust != 0) { - // this-adjusting mfp (member of a secondary base): the slot offset is relative to a - // vtable we can't locate. Hook the overrider by name instead. - why = "virtual member of a secondary base; hook the overrider by name"; + // The slot is relative to a secondary vtable whose base path is not encoded in the mfp. + why = fmt::format( + "virtual member of a secondary base did not resolve by name ({})", displayWhy); return nullptr; } if (vtableSymbol[0] == '\0') { @@ -638,35 +800,32 @@ void hook_remove_mod(LoadedMod& mod) { } auto* target = reinterpret_cast(it->first); - const int uninst = funchook_uninstall(entry.handle, 0); - const int destr = funchook_destroy(entry.handle); - if (uninst != 0 || destr != 0) { - DuskLog.warn("HookSystem: funchook uninstall/destroy for {:p} returned {}/{}", target, - uninst, destr); - } - entry.handle = nullptr; - entry.active = nullptr; - if (entry.candidates.empty()) { + deactivate_backend(target, entry.backend); it = s_installed.erase(it); continue; } - // Hand the detour off to a surviving candidate (lowest registration order first; the - // vector is append-ordered). A candidate whose install fails stays in the list: its - // g_orig must still track the current original pointer. + // A prepatch may be atomically updated directly. + // Funchook must first restore the original instructions before reinstalling. +#if DUSK_HAS_PREPATCH + const bool prepatched = entry.backend.kind == BackendKind::Prepatch; +#else + constexpr bool prepatched = false; +#endif + if (!prepatched) { + deactivate_backend(target, entry.backend); + } + entry.active = nullptr; for (auto& cand : entry.candidates) { void* original = nullptr; - funchook_t* fh = install_trampoline(target, cand.trampoline, &original); - if (fh == nullptr) { + if (!handoff_backend(target, entry, cand, &original)) { continue; } - entry.handle = fh; entry.original = original; entry.active = cand.context; - DuskLog.info("HookSystem: reinstalled trampoline for {:p}: {} -> {} (tramp={:p})", - target, mod_id_from_context(context), mod_id_from_context(cand.context), - cand.trampoline); + DuskLog.info("HookSystem: replaced trampoline for {:p}: {} -> {} (tramp={:p})", target, + mod_id_from_context(context), mod_id_from_context(cand.context), cand.trampoline); break; } @@ -677,6 +836,7 @@ void hook_remove_mod(LoadedMod& mod) { for (auto& cand : entry.candidates) { *cand.origStore = target; } + deactivate_backend(target, entry.backend); it = s_installed.erase(it); continue; } @@ -772,14 +932,24 @@ void hook_resolve_mod_records(LoadedMod& mod) { unresolved("", "null link-time target", &record->resolved); } } - for (auto* record : mod.native->parsed.hookMems) { + const auto resolveMember = [&](auto* record, const unsigned char* pmf, size_t pmfSize) { + const char* displayName = hook_mem_display_name(*record); std::string why; - void* target = resolve_member_record(*record, hook_mem_vtable_symbol(*record), why); + void* target = + resolve_member_record(pmf, pmfSize, hook_mem_vtable_symbol(*record), displayName, why); if (target != nullptr) { resolved(target, &record->resolved); } else { - unresolved(hook_mem_display_name(*record), why, &record->resolved); + unresolved(displayName, why, &record->resolved); } + }; + for (auto* record : mod.native->parsed.hookMems) { + resolveMember(record, record->pmf, sizeof(record->pmf)); + } + for (auto* record : mod.native->parsed.hookMemExts) { + alignas(std::max_align_t) unsigned char pmf[MOD_META_HOOK_MEM_EXT_CAPACITY]{}; + record->materialize(pmf); + resolveMember(record, pmf, record->pmf_size); } for (auto* record : mod.native->parsed.hookNames) { const char* name = hook_name_symbol(*record); From 27c9719abc5f0c6a669a828d6bcc218e8998eeaa Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sat, 18 Jul 2026 18:07:49 -0700 Subject: [PATCH 061/223] pr comments --- README.md | 2 +- libs/JSystem/src/JUtility/JUTCacheFont.cpp | 4 +++ src/Z2AudioLib/Z2SoundObjMgr.cpp | 9 ++++- src/d/d_msg_class.cpp | 38 +++++++++++++++++++--- 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7584c09c46..b5a9ecae72 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ It aims to be as accurate as possible to the original while also providing new o You must dump your own copy of the game. Please see [this article](https://wiki.dolphin-emu.org/index.php?title=Ripping_Games) for instructions. After dumping, you can use a program like [Dolphin](https://dolphin-emu.org/) or [nodtool](https://github.com/encounter/nod/releases) to convert the `.iso` to `.rvz` to save space. -Currently, only the GameCube USA and EUR releases are supported. Support for other versions of the game is planned in the future. +Currently, only the GameCube releases are supported. Support for other versions of the game is planned in the future. ### 2. Install Dusklight diff --git a/libs/JSystem/src/JUtility/JUTCacheFont.cpp b/libs/JSystem/src/JUtility/JUTCacheFont.cpp index 2282361672..3fd02a1232 100644 --- a/libs/JSystem/src/JUtility/JUTCacheFont.cpp +++ b/libs/JSystem/src/JUtility/JUTCacheFont.cpp @@ -56,6 +56,10 @@ void JUTCacheFont::initialize_state() { mCacheBuffer = NULL; field_0x9c = NULL; field_0xa0 = NULL; + +#if TARGET_PC + mJoinedTextureHeight = 0; +#endif } int JUTCacheFont::getMemorySize(ResFONT const* p_font, u16* o_widCount, u32* o_widSize, diff --git a/src/Z2AudioLib/Z2SoundObjMgr.cpp b/src/Z2AudioLib/Z2SoundObjMgr.cpp index 2c67cfb22b..013dbd1c54 100644 --- a/src/Z2AudioLib/Z2SoundObjMgr.cpp +++ b/src/Z2AudioLib/Z2SoundObjMgr.cpp @@ -182,6 +182,13 @@ void Z2SoundObjMgr::searchEnemy() { case Z2_ENEMY_PO: case Z2_ENEMY_HP: isGhostEnemy = true; +#if TARGET_PC + if (enemyId == Z2_ENEMY_HP && dusk::version::isRegionJpn() && + Z2GetLink()->isRiding() && Z2GetLink()->getMoveSpeed() > 38) + { + continue; + } +#endif break; case Z2_ENEMY_RDB: if (subBgmType == 0) @@ -212,7 +219,7 @@ void Z2SoundObjMgr::searchEnemy() { #elif TARGET_PC case Z2_ENEMY_SH: if (enemyId == Z2_ENEMY_SH && !dusk::version::isRegionJpn()) - continue; + break; #endif if (!Z2GetLink()->isRiding()) break; diff --git a/src/d/d_msg_class.cpp b/src/d/d_msg_class.cpp index 5dbc00a1d2..aeeb2243b8 100644 --- a/src/d/d_msg_class.cpp +++ b/src/d/d_msg_class.cpp @@ -1630,8 +1630,35 @@ void jmessage_tMeasureProcessor::do_scale(f32 i_scale) { mPageLineMax--; JUT_ASSERT(0x930, mPageLineMax > 0); -#if TARGET_PC || REGION_JPN - if (IF_DUSK(dusk::version::isRegionJpn() &&) field_0x3e == 0) { +#if TARGET_PC + if (dusk::version::isRegionJpn()) { + if (field_0x3e == 0) { + pReference->setPageType(field_0x40, 2); + } else { + pReference->setPageType(field_0x40, 3); + if (field_0x3e == 1 && pReference->getPageType(field_0x40) == 2) { + pReference->setPageType(field_0x40, 4); + } + } + } else { + if (field_0x3e == 0) { + pReference->setPageType(field_0x40, 2); + } else if (field_0x3e == 2 && mPageLineMax == 3) { + if (pReference->getPageType(field_0x40) == 4) { + pReference->setPageType(field_0x40, 5); + } else { + pReference->setPageType(field_0x40, 8); + } + } else { + pReference->setPageType(field_0x40, 3); + if (field_0x3e == 1 && pReference->getPageType(field_0x40) == 2) { + pReference->setPageType(field_0x40, 4); + } + } + } +#else +#if REGION_JPN + if (field_0x3e == 0) { pReference->setPageType(field_0x40, 2); } #else @@ -1651,6 +1678,7 @@ void jmessage_tMeasureProcessor::do_scale(f32 i_scale) { pReference->setPageType(field_0x40, 4); } } +#endif } } @@ -2150,8 +2178,10 @@ bool jmessage_tSequenceProcessor::do_isReady() { } field_0xa6++; -#if TARGET_PC || REGION_JPN - if (IF_DUSK(dusk::version::isRegionJpn() &&) field_0xa6 >= 1) { +#if TARGET_PC + if ((dusk::version::isRegionJpn() && field_0xa6 >= 1) || (!dusk::version::isRegionJpn() && field_0xa6 >= 2)) { +#elif REGION_JPN + if (field_0xa6 >= 1) { #else if (field_0xa6 >= 2) { #endif From d3e05a4f37ee488e386e075a4a327fca7be2226a Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sat, 18 Jul 2026 19:39:24 -0700 Subject: [PATCH 062/223] pr comments again --- src/d/actor/d_a_e_pm.cpp | 139 +++++++++++++++++++++++---------------- src/d/d_bright_check.cpp | 53 +++++++++++++-- src/d/d_menu_dmap.cpp | 2 +- src/d/d_msg_class.cpp | 10 +-- src/d/d_name.cpp | 10 ++- 5 files changed, 141 insertions(+), 73 deletions(-) diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index 8c68907f15..0d019da747 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -19,6 +19,7 @@ #include "d/actor/d_a_obj_smw_stone.h" #include "f_op/f_op_actor_enemy.h" #include "f_op/f_op_camera_mng.h" +#include "dusk/version.hpp" class daE_PM_HIO_c { public: @@ -115,7 +116,7 @@ enum Joint { }; enum Mode { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN /* 0x00 */ Mode0_JPN, #endif /* 0x00 */ Mode0, @@ -470,26 +471,31 @@ void daE_PM_c::Ap_StartAction() { bool bVar3 = false; switch (mMode) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN case Mode0_JPN: - if (mAppear) { - bVar3 = true; - mMode++; - } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { - bVar3 = true; - mMode++; - } + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) + if (mAppear) { + bVar3 = true; + mMode++; + } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { + bVar3 = true; + mMode++; + } + IF_DUSK_BLOCK_END break; - case Mode0: - bVar3 = true; -#else - case Mode0: - if (mAppear) { - bVar3 = true; - } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { - bVar3 = true; - } #endif + case Mode0: + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) + bVar3 = true; + IF_DUSK_BLOCK_END + + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) + if (mAppear) { + bVar3 = true; + } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { + bVar3 = true; + } + IF_DUSK_BLOCK_END if (bVar3 && CameraSet()) { if (dComIfG_play_c::getLayerNo(0) == 2) { player_pos.set(-10477.0f, mAcch.GetGroundH(), 17710.0f); @@ -816,10 +822,12 @@ void daE_PM_c::DemoBeforeEscape() { for (int i = 0; i < 4; i++) { e_fs_class* puppet; if (fopAcM_SearchByID(mPuppetID[i], (fopAc_ac_c**)&puppet)) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) if (puppet == NULL) { continue; } + IF_DUSK_BLOCK_END #endif puppet->mAction = e_fs_class::ACT_END; puppet->mMode = 0; @@ -1271,11 +1279,14 @@ void daE_PM_c::DemoBossStart2() { player = (daPy_py_c*)dComIfGp_getPlayer(0); -#if VERSION == VERSION_GCN_JPN - if (mDemoMode > Mode0) { +#if TARGET_PC + if (dusk::version::isRegionJpn() ? (mDemoMode > Mode0) : (mDemoMode != Mode0)) +#elif VERSION == VERSION_GCN_JPN + if (mDemoMode > Mode0) #else - if (mDemoMode != Mode0) { + if (mDemoMode != Mode0) #endif + { SetMoveCam(0.1f, 50.0f); } else { SetMoveCam(0.03f, 50.0f); @@ -1284,31 +1295,33 @@ void daE_PM_c::DemoBossStart2() { mTargetAngleY = s_TargetAngle; switch (mDemoMode) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN case Mode0_JPN: - if (!CameraSet()) { - break; - } + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) + if (!CameraSet()) { + break; + } - mPuppetNum = 4; - gravity = -9.0f; - mTimer[0] = 130; - if (mSecondEncounter) { - mTimer[0] = 180; - vec1.set(current.pos.x, 1900.0f, current.pos.z); - SetStopCam(vec1, 500.0f, 0.0f, s_TargetAngle); - mCamEye.set(mCamEyeTarget); - actor_status &= ~fopAcStts_CULL_e; - } - if (mSecondEncounter) { - player->mDemo.setDemoType(daPy_demo_c::DEMO_TYPE_ORIGINAL_e); - player->mDemo.setParam0(0); - player->mDemo.setDemoMode(4); - player->mDemo.setParam0(0); - player->mDemo.setParam1(0); - player->mDemo.setParam2(0); - } - mDemoMode++; + mPuppetNum = 4; + gravity = -9.0f; + mTimer[0] = 130; + if (mSecondEncounter) { + mTimer[0] = 180; + vec1.set(current.pos.x, 1900.0f, current.pos.z); + SetStopCam(vec1, 500.0f, 0.0f, s_TargetAngle); + mCamEye.set(mCamEyeTarget); + actor_status &= ~fopAcStts_CULL_e; + } + if (mSecondEncounter) { + player->mDemo.setDemoType(daPy_demo_c::DEMO_TYPE_ORIGINAL_e); + player->mDemo.setParam0(0); + player->mDemo.setDemoMode(4); + player->mDemo.setParam0(0); + player->mDemo.setParam1(0); + player->mDemo.setParam2(0); + } + mDemoMode++; + IF_DUSK_BLOCK_END break; #endif case Mode0: @@ -1443,20 +1456,21 @@ void daE_PM_c::DemoBossStart() { } switch (mDemoMode) { -#if VERSION == VERSION_GCN_JPN +#if TARGET_PC || VERSION == VERSION_GCN_JPN case Mode0_JPN: - if (!CameraSet()) { - break; - } - - mPuppetNum = 4; - gravity = -9.0f; - mTimer[0] = 130; - vec1.set(current.pos.x, current.pos.y + 80.0f, current.pos.z); - mTargetAngleY = shape_angle.y; - SetStopCam(vec1, 500.0f, -150.0f, shape_angle.y); - mDemoMode++; + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) + if (!CameraSet()) { + break; + } + mPuppetNum = 4; + gravity = -9.0f; + mTimer[0] = 130; + vec1.set(current.pos.x, current.pos.y + 80.0f, current.pos.z); + mTargetAngleY = shape_angle.y; + SetStopCam(vec1, 500.0f, -150.0f, shape_angle.y); + mDemoMode++; + IF_DUSK_BLOCK_END break; #endif case Mode0: @@ -2209,7 +2223,8 @@ void daE_PM_c::StartAction() { if (fopAcM_gc_c::gndCheck(&pos) && current.pos.absXZ(*s_LinkPos) < 1000.0f && mAnm == ANM_WAIT01 && s_LinkPos->y <= fopAcM_gc_c::getGroundY() + 100.0f) { -#if VERSION != VERSION_GCN_JPN +#if TARGET_PC || VERSION != VERSION_GCN_JPN + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) if (!CameraSet()) { break; } @@ -2236,6 +2251,14 @@ void daE_PM_c::StartAction() { player->changeOriginalDemo(); player->changeDemoMode(4, 0, 0, 0); } + IF_DUSK_BLOCK_END + + IF_DUSK_BLOCK(dusk::version::isRegionJpn()) + mPuppetNum = 4; + mAction = 6; + mMode = Mode0; + mDemoMode = 0; + IF_DUSK_BLOCK_END #else mPuppetNum = 4; mAction = 6; diff --git a/src/d/d_bright_check.cpp b/src/d/d_bright_check.cpp index ccb04c69e5..cbea55100a 100644 --- a/src/d/d_bright_check.cpp +++ b/src/d/d_bright_check.cpp @@ -15,6 +15,8 @@ #include "m_Do/m_Do_controller_pad.h" #include +#include "dusk/version.hpp" + dBrightCheck_c::dBrightCheck_c(JKRArchive* i_archive) { mArchive = i_archive; mBrightCheck.mMsgString = JKR_NEW dMsgString_c(); @@ -39,7 +41,16 @@ void dBrightCheck_c::screenSet() { MULTI_CHAR('font_a1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at'), }; - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + static u64 const txTV_jpn[] = { + MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'), + MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'), + }; + static u64 const txTV[] = { + MULTI_CHAR('menu_t61'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t91'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menut101'), + MULTI_CHAR('menu_t01'), MULTI_CHAR('menu_t71'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t81'), MULTI_CHAR('menu_t4'), + }; + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) static u64 const txTV[] = { MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'), MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'), @@ -51,7 +62,14 @@ void dBrightCheck_c::screenSet() { }; #endif - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + static u64 const txTVhide_jpn[] = { + MULTI_CHAR('fmenu_6n'), MULTI_CHAR('fmenu_9n'), MULTI_CHAR('fmenu_10'), MULTI_CHAR('fmenu_7n'), MULTI_CHAR('fmenu_8n'), + }; + static u64 const txTVhide[] = { + MULTI_CHAR('menu_6n'), MULTI_CHAR('menu_9n'), MULTI_CHAR('menu_10n'), MULTI_CHAR('menu_7n'), MULTI_CHAR('menu_8n'), + }; + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) static u64 const txTVhide[] = { MULTI_CHAR('fmenu_6n'), MULTI_CHAR('fmenu_9n'), MULTI_CHAR('fmenu_10'), MULTI_CHAR('fmenu_7n'), MULTI_CHAR('fmenu_8n'), }; @@ -67,7 +85,18 @@ void dBrightCheck_c::screenSet() { mBrightCheck.Scr->search(MULTI_CHAR('g_abtn_n'))->hide(); - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + J2DTextBox* settings_text; + if (dusk::version::isRegionJpn()) { + settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('t_t00')); + mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->show(); + mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->hide(); + } else { + settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('f_t00')); + mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->show(); + mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->hide(); + } + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) J2DTextBox* settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('t_t00')); mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->show(); mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->hide(); @@ -83,7 +112,15 @@ void dBrightCheck_c::screenSet() { J2DTextBox* btna_text[5]; for (int i = 0; i < 5; i++) { - #if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) + #if TARGET_PC + if (dusk::version::isRegionJpn()) { + btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(tv_btnA[i]); + mBrightCheck.Scr->search(ftv_btnA[i])->hide(); + } else { + btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(ftv_btnA[i]); + mBrightCheck.Scr->search(tv_btnA[i])->hide(); + } + #elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN) btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(tv_btnA[i]); mBrightCheck.Scr->search(ftv_btnA[i])->hide(); #else @@ -97,15 +134,17 @@ void dBrightCheck_c::screenSet() { } for (int i = 0; i < 5; i++) { - mBrightCheck.Scr->search(txTVhide[i])->hide(); + mBrightCheck.Scr->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? txTVhide_jpn[i] : txTVhide[i], txTVhide[i]))->hide(); } for (int i = 0; i < 10; i++) { - J2DTextBox* check_text = (J2DTextBox*)mBrightCheck.Scr->search(txTV[i]); + J2DTextBox* check_text = (J2DTextBox*)mBrightCheck.Scr->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? txTV_jpn[i] : txTV[i], txTV[i])); check_text->setFont(mDoExt_getMesgFont()); - #if (VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN) + #if TARGET_PC || ((VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN)) + IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) check_text->setCharSpace(0.0f); + IF_DUSK_BLOCK_END #endif if (i < 2) { diff --git a/src/d/d_menu_dmap.cpp b/src/d/d_menu_dmap.cpp index b71c756283..6feb191562 100644 --- a/src/d/d_menu_dmap.cpp +++ b/src/d/d_menu_dmap.cpp @@ -482,7 +482,7 @@ void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) { MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') }; static u64 const c_tag[2] = { - MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text') + MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text') }; #else static u64 const c_tag[2] = { diff --git a/src/d/d_msg_class.cpp b/src/d/d_msg_class.cpp index aeeb2243b8..f299049f28 100644 --- a/src/d/d_msg_class.cpp +++ b/src/d/d_msg_class.cpp @@ -3456,11 +3456,13 @@ void jmessage_tRenderingProcessor::do_heightcenter() { break; case 3: { #if TARGET_PC - if (!dusk::version::isRegionJpn() || (dusk::version::isRegionJpn() && field_0x142 == 1)) -#else - if (field_0x142 == 1) + if (!dusk::version::isRegionJpn()) { + field_0x138 = 0.5f * pReference->getLineSpace(); + var_f31 += field_0x138; + break; + } #endif - { + if (field_0x142 == 1) { int nowPageLine = pReference->getNowPageLine(); field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine)); var_f31 += field_0x138; diff --git a/src/d/d_name.cpp b/src/d/d_name.cpp index 2f3970bb2f..bf906f9285 100644 --- a/src/d/d_name.cpp +++ b/src/d/d_name.cpp @@ -337,11 +337,15 @@ void dName_c::_move() { mDoAud_seStart(Z2SE_SY_DUMMY, 0, 0, 0); mPrevMojiSet = mMojiSet; mMojiSet++; - #if REGION_JPN - if (mMojiSet > MOJI_EIGO) { + + #if TARGET_PC + if ((dusk::version::isRegionJpn() && mMojiSet > MOJI_EIGO) || (!dusk::version::isRegionJpn() && mMojiSet > MOJI_KATA)) + #elif REGION_JPN + if (mMojiSet > MOJI_EIGO) #else - if (mMojiSet > MOJI_KATA) { + if (mMojiSet > MOJI_KATA) #endif + { mMojiSet = MOJI_HIRA; } mojiListChange(); From 9696c1256379c8d24ce8db7dea453dd947f4dda6 Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sat, 18 Jul 2026 21:17:29 -0700 Subject: [PATCH 063/223] couple more fixes, revert e_pm for now --- .../include/JSystem/JUtility/JUTCacheFont.h | 2 +- src/d/actor/d_a_e_pm.cpp | 121 ++++++++---------- src/d/d_meter2_draw.cpp | 13 ++ 3 files changed, 69 insertions(+), 67 deletions(-) diff --git a/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h b/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h index 6c4b0b14fc..dabb561aa1 100644 --- a/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h @@ -64,7 +64,7 @@ public: void setPagingType(EPagingType type) { mPagingType = type; } - static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; } + static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + sizeof(TCachePage)) * param_1; } TGXTexObj* getTexObj(void* buffer) const { return &((TCachePage*)buffer)->mTexObj; } void delete_and_initialize() { deleteMemBlocks_CacheFont(); initialize_state(); } diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index 0d019da747..5162a04598 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -116,7 +116,7 @@ enum Joint { }; enum Mode { -#if TARGET_PC || VERSION == VERSION_GCN_JPN +#if VERSION == VERSION_GCN_JPN /* 0x00 */ Mode0_JPN, #endif /* 0x00 */ Mode0, @@ -471,31 +471,26 @@ void daE_PM_c::Ap_StartAction() { bool bVar3 = false; switch (mMode) { -#if TARGET_PC || VERSION == VERSION_GCN_JPN +#if VERSION == VERSION_GCN_JPN case Mode0_JPN: - IF_DUSK_BLOCK(dusk::version::isRegionJpn()) - if (mAppear) { - bVar3 = true; - mMode++; - } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { - bVar3 = true; - mMode++; - } - IF_DUSK_BLOCK_END + if (mAppear) { + bVar3 = true; + mMode++; + } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { + bVar3 = true; + mMode++; + } break; -#endif case Mode0: - IF_DUSK_BLOCK(dusk::version::isRegionJpn()) bVar3 = true; - IF_DUSK_BLOCK_END - - IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) - if (mAppear) { - bVar3 = true; - } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { - bVar3 = true; - } - IF_DUSK_BLOCK_END +#else + case Mode0: + if (mAppear) { + bVar3 = true; + } else if (mSecondEncounter && fopAcM_searchPlayerDistanceXZ(this) < 800.0f) { + bVar3 = true; + } +#endif if (bVar3 && CameraSet()) { if (dComIfG_play_c::getLayerNo(0) == 2) { player_pos.set(-10477.0f, mAcch.GetGroundH(), 17710.0f); @@ -1279,14 +1274,11 @@ void daE_PM_c::DemoBossStart2() { player = (daPy_py_c*)dComIfGp_getPlayer(0); -#if TARGET_PC - if (dusk::version::isRegionJpn() ? (mDemoMode > Mode0) : (mDemoMode != Mode0)) -#elif VERSION == VERSION_GCN_JPN - if (mDemoMode > Mode0) +#if VERSION == VERSION_GCN_JPN + if (mDemoMode > Mode0) { #else - if (mDemoMode != Mode0) + if (mDemoMode != Mode0) { #endif - { SetMoveCam(0.1f, 50.0f); } else { SetMoveCam(0.03f, 50.0f); @@ -1295,33 +1287,31 @@ void daE_PM_c::DemoBossStart2() { mTargetAngleY = s_TargetAngle; switch (mDemoMode) { -#if TARGET_PC || VERSION == VERSION_GCN_JPN +#if VERSION == VERSION_GCN_JPN case Mode0_JPN: - IF_DUSK_BLOCK(dusk::version::isRegionJpn()) - if (!CameraSet()) { - break; - } + if (!CameraSet()) { + break; + } - mPuppetNum = 4; - gravity = -9.0f; - mTimer[0] = 130; - if (mSecondEncounter) { - mTimer[0] = 180; - vec1.set(current.pos.x, 1900.0f, current.pos.z); - SetStopCam(vec1, 500.0f, 0.0f, s_TargetAngle); - mCamEye.set(mCamEyeTarget); - actor_status &= ~fopAcStts_CULL_e; - } - if (mSecondEncounter) { - player->mDemo.setDemoType(daPy_demo_c::DEMO_TYPE_ORIGINAL_e); - player->mDemo.setParam0(0); - player->mDemo.setDemoMode(4); - player->mDemo.setParam0(0); - player->mDemo.setParam1(0); - player->mDemo.setParam2(0); - } - mDemoMode++; - IF_DUSK_BLOCK_END + mPuppetNum = 4; + gravity = -9.0f; + mTimer[0] = 130; + if (mSecondEncounter) { + mTimer[0] = 180; + vec1.set(current.pos.x, 1900.0f, current.pos.z); + SetStopCam(vec1, 500.0f, 0.0f, s_TargetAngle); + mCamEye.set(mCamEyeTarget); + actor_status &= ~fopAcStts_CULL_e; + } + if (mSecondEncounter) { + player->mDemo.setDemoType(daPy_demo_c::DEMO_TYPE_ORIGINAL_e); + player->mDemo.setParam0(0); + player->mDemo.setDemoMode(4); + player->mDemo.setParam0(0); + player->mDemo.setParam1(0); + player->mDemo.setParam2(0); + } + mDemoMode++; break; #endif case Mode0: @@ -1456,21 +1446,20 @@ void daE_PM_c::DemoBossStart() { } switch (mDemoMode) { -#if TARGET_PC || VERSION == VERSION_GCN_JPN +#if VERSION == VERSION_GCN_JPN case Mode0_JPN: - IF_DUSK_BLOCK(dusk::version::isRegionJpn()) - if (!CameraSet()) { - break; - } + if (!CameraSet()) { + break; + } + + mPuppetNum = 4; + gravity = -9.0f; + mTimer[0] = 130; + vec1.set(current.pos.x, current.pos.y + 80.0f, current.pos.z); + mTargetAngleY = shape_angle.y; + SetStopCam(vec1, 500.0f, -150.0f, shape_angle.y); + mDemoMode++; - mPuppetNum = 4; - gravity = -9.0f; - mTimer[0] = 130; - vec1.set(current.pos.x, current.pos.y + 80.0f, current.pos.z); - mTargetAngleY = shape_angle.y; - SetStopCam(vec1, 500.0f, -150.0f, shape_angle.y); - mDemoMode++; - IF_DUSK_BLOCK_END break; #endif case Mode0: diff --git a/src/d/d_meter2_draw.cpp b/src/d/d_meter2_draw.cpp index f4e96c6fbe..09963e8cc7 100644 --- a/src/d/d_meter2_draw.cpp +++ b/src/d/d_meter2_draw.cpp @@ -62,10 +62,23 @@ void dAnchorHudScale(CPaneMgr* i_pane, HudCorner i_corner, f32* io_x, f32* io_y, dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) { #if TARGET_PC + // correct hio data here because we can't do runtime disc checks in sinit data constructors if (dusk::version::isRegionJpn()) { g_drawHIO.mButtonATextSpacing = -2.0f; + for (int i = 0; i < 6; i++) { + static f32 const finfoPosX_jpn[6] = {-27.0f, 0.0f, -12.0f, 0.0f, -12.0f, -32.8f}; + static f32 const fishnPosX_jpn[6] = {-27.0f, 0.0f, -12.0f, 0.0f, -12.0f, -32.8f}; + g_drawHIO.mFishListScreen.mFishCountSizePosX[i] = finfoPosX_jpn[i]; + g_drawHIO.mFishListScreen.mFishInfoPosX[i] = fishnPosX_jpn[i]; + } } else { g_drawHIO.mButtonATextSpacing = 1.0f; + for (int i = 0; i < 6; i++) { + static f32 const finfoPosX[6] = {-17.0f, 0.0f, -14.0f, 0.0f, -12.0f, -32.8f}; + static f32 const fishnPosX[6] = {-17.0f, 0.0f, -14.0f, 0.0f, -12.0f, -32.8f}; + g_drawHIO.mFishListScreen.mFishCountSizePosX[i] = finfoPosX[i]; + g_drawHIO.mFishListScreen.mFishInfoPosX[i] = fishnPosX[i]; + } } #endif From 3e343acc8677fe3f6f71e21fb4acbd7ce82c894d Mon Sep 17 00:00:00 2001 From: TakaRikka Date: Sat, 18 Jul 2026 22:09:32 -0700 Subject: [PATCH 064/223] revert, e_pm jpn logic change TODO later --- src/d/actor/d_a_e_pm.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index 5162a04598..2cf0341172 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -2212,8 +2212,7 @@ void daE_PM_c::StartAction() { if (fopAcM_gc_c::gndCheck(&pos) && current.pos.absXZ(*s_LinkPos) < 1000.0f && mAnm == ANM_WAIT01 && s_LinkPos->y <= fopAcM_gc_c::getGroundY() + 100.0f) { -#if TARGET_PC || VERSION != VERSION_GCN_JPN - IF_DUSK_BLOCK(!dusk::version::isRegionJpn()) +#if VERSION != VERSION_GCN_JPN if (!CameraSet()) { break; } @@ -2240,14 +2239,6 @@ void daE_PM_c::StartAction() { player->changeOriginalDemo(); player->changeDemoMode(4, 0, 0, 0); } - IF_DUSK_BLOCK_END - - IF_DUSK_BLOCK(dusk::version::isRegionJpn()) - mPuppetNum = 4; - mAction = 6; - mMode = Mode0; - mDemoMode = 0; - IF_DUSK_BLOCK_END #else mPuppetNum = 4; mAction = 6; From 61a4ab3117e2c19810fe370bbbd3774abe55467a Mon Sep 17 00:00:00 2001 From: jdflyer Date: Sun, 19 Jul 2026 00:50:49 -0700 Subject: [PATCH 065/223] Mod SDK: Gamemode Service, Change Speedrun mode to a gamemode, Allow prelaunch to be restarted --- docs/modding.md | 47 +++++++ files.cmake | 2 + include/m_Do/m_Do_MemCard.h | 20 +++ res/rml/window.rcss | 10 ++ sdk/include/mods/svc/gamemode.h | 39 ++++++ src/d/actor/d_a_alink_demo.inc | 9 +- src/d/d_bright_check.cpp | 18 +-- src/d/d_s_name.cpp | 26 ++-- src/d/d_save.cpp | 8 ++ src/dusk/OSThread.cpp | 6 + src/dusk/gamemode.cpp | 93 +++++++++++++ src/dusk/gamemode.hpp | 69 ++++++++++ src/dusk/imgui/ImGuiConsole.cpp | 5 +- src/dusk/imgui/ImGuiMenuTools.cpp | 5 +- src/dusk/iso_validate.hpp | 1 + src/dusk/livesplit.cpp | 136 ++++++++++--------- src/dusk/livesplit.h | 2 + src/dusk/main.h | 3 - src/dusk/mods/svc/gamemode.cpp | 144 +++++++++++++++++++++ src/dusk/mods/svc/registry.cpp | 1 + src/dusk/mods/svc/registry.hpp | 1 + src/dusk/settings.cpp | 4 +- src/dusk/settings.h | 2 + src/dusk/speedrun.cpp | 31 ++++- src/dusk/speedrun.h | 13 +- src/dusk/ui/menu_bar.cpp | 9 +- src/dusk/ui/modal.cpp | 10 +- src/dusk/ui/modal.hpp | 1 + src/dusk/ui/overlay.cpp | 26 ++-- src/dusk/ui/prelaunch.cpp | 208 ++++++++++++++++++++++-------- src/dusk/ui/prelaunch.hpp | 8 +- src/dusk/ui/settings.cpp | 26 ++-- src/dusk/ui/ui.hpp | 2 + src/f_ap/f_ap_game.cpp | 6 +- src/f_op/f_op_overlap_req.cpp | 19 +-- src/m_Do/m_Do_MemCard.cpp | 152 +++++++++++++++------- src/m_Do/m_Do_Reset.cpp | 45 ++++++- src/m_Do/m_Do_main.cpp | 17 ++- 38 files changed, 974 insertions(+), 250 deletions(-) create mode 100644 sdk/include/mods/svc/gamemode.h create mode 100644 src/dusk/gamemode.cpp create mode 100644 src/dusk/gamemode.hpp create mode 100644 src/dusk/mods/svc/gamemode.cpp diff --git a/docs/modding.md b/docs/modding.md index 2600b4721d..f19609757d 100644 --- a/docs/modding.md +++ b/docs/modding.md @@ -470,6 +470,53 @@ if (svc_camera->get_camera(mod_ctx, game_view, &camera) == MOD_OK) { first in-game frame. Projection matrices match the renderer's WebGPU clip convention and renderer depth convention (reversed-Z by default). +### GamemodeService (`mods/svc/gamemode.h`) + +Allows a mod to register a gamemode that allows the game to designate one form of gameplay (named a gamemode). This +is intended to allow large mods that change large amounts of game logic (such as a randomizer) to have explicit control +over how the game will function at certain points. When a gamemode is registered via the service, it will add an entry +to the pre-launch menu. When selected, the game will use a unique set of savefiles (designated by the `saveName` field) +to store save data while the gamemode is active. Any function pointers registered with the gamemode will be called by +dusklight when their condition is met. + +Note: for any gamemode wishing to use the vanilla set of savefiles, use `gczelda2` as the save file name. + +```cpp +IMPORT_SERVICE(GamemodeService, svc_gamemode); + +void onSaveLoaded() { + // This function will be invoked by the game as a save is loaded +} + +#define ONLY_GAMEMODE(ctx, id) \ + { \ + bool isGamemodeActive; \ + svc_gamemode->is_active(ctx, id, &isGamemodeActive); \ + if (!isGamemodeActive) { \ + return; \ + } \ + } + +static HookAction myFunctionHook(ModContext *ctx, void *args, void *, void *) { + // Note: normal function hooks will need to check if the gamemode is active + ONLY_GAMEMODE(ctx,"id"); // A macro like this can make it easy +} + +const GamemodeDesc gamemodeDesc = { + .gamemodeId = "my-unique-gamemode-id", + .fullName = "Gamemode Name", + .saveName = "my-unique-save-name", + .onActivatedFunction = nullptr, + .onDeactivatedFunction = nullptr, + .onPlayFunction = nullptr, + .onSaveLoadedFunction = onSaveLoaded, + .onNewSaveFunction = nullptr, + .onGameResetFunction = nullptr, + .onTickFunction = nullptr, +}; +svc_gamemode->register_gamemode(mod_ctx, &gamemodeDesc); +``` + --- ## Hooking Game Functions diff --git a/files.cmake b/files.cmake index c8c92c9b75..0a0b46140a 100644 --- a/files.cmake +++ b/files.cmake @@ -1441,6 +1441,7 @@ set(DUSK_FILES src/dusk/file_select.hpp src/dusk/frame_interpolation.cpp src/dusk/game_clock.cpp + src/dusk/gamemode.cpp src/dusk/gamepad_color.cpp src/dusk/globals.cpp src/dusk/gyro.cpp @@ -1498,6 +1499,7 @@ set(DUSK_FILES src/dusk/mods/svc/texture.cpp src/dusk/mods/svc/ui.cpp src/dusk/mods/svc/ui.hpp + src/dusk/mods/svc/gamemode.cpp src/dusk/mouse.cpp src/dusk/scope_guard.hpp src/dusk/settings.cpp diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h index 555d7a6a9f..84fc246e09 100644 --- a/include/m_Do/m_Do_MemCard.h +++ b/include/m_Do/m_Do_MemCard.h @@ -112,6 +112,11 @@ public: mSerialNo = serial_no; } +#ifdef TARGET_PC + void setFileName(const std::string& fileName); + const char* getFileName(); +#endif + /* 0x0000 */ u8 mData[SAVEFILE_SIZE]; /* 0x1FBC */ u8 mChannel; /* 0x1FBD */ u8 mCopyToPos; @@ -124,6 +129,11 @@ public: /* 0x1FEC */ s32 mNandState; /* 0x1FF0 */ u64 mSerialNo; /* 0x1FF8 */ u32 mDataVersion; +#ifdef TARGET_PC + bool mInitialized; + std::string mFileName; +#endif + }; // Size: 0x2000 STATIC_ASSERT(sizeof(mDoMemCd_Ctrl_c) == 8192); @@ -230,4 +240,14 @@ inline s32 mDoMemCd_checkNANDFile() { } #endif +#ifdef TARGET_PC +inline void mDoMemCd_SetFileName(const std::string& fileName) { + g_mDoMemCd_control.setFileName(fileName); +} + +inline const char* mDoMemCd_GetFileName() { + return g_mDoMemCd_control.getFileName(); +} +#endif + #endif /* M_DO_M_DO_MEMCARD_H */ diff --git a/res/rml/window.rcss b/res/rml/window.rcss index ab338e97c7..8ca2f80760 100644 --- a/res/rml/window.rcss +++ b/res/rml/window.rcss @@ -519,3 +519,13 @@ progress.verification-progress-bar { flex: 0 0 auto; padding-top: 4dp; } + +.modal-actions-vertical { + flex-direction: column; + align-items: stretch; +} + +.modal-actions-vertical button.modal-btn { + flex: 0 0 auto; + width: 100%; +} diff --git a/sdk/include/mods/svc/gamemode.h b/sdk/include/mods/svc/gamemode.h new file mode 100644 index 0000000000..2132002578 --- /dev/null +++ b/sdk/include/mods/svc/gamemode.h @@ -0,0 +1,39 @@ +#pragma once + +#include +#include + +#define GAMEMODE_SERVICE_ID "dev.twilitrealm.dusklight.gamemode" +#define GAMEMODE_SERVICE_MAJOR 1u +#define GAMEMODE_SERVICE_MINOR 0u + +typedef struct { + const char* gamemodeId; + const char* fullName; + const char* saveName; + void (*onActivatedFunction)(); + void (*onDeactivatedFunction)(); + void (*onPlayFunction)(); + void (*onSaveLoadedFunction)(); + void (*onNewSaveFunction)(); + void (*onGameResetFunction)(); + void (*onTickFunction)(); +} GamemodeDesc; + +typedef struct GamemodeService { + ServiceHeader header; + ModResult (*register_gamemode)(ModContext* ctx, const GamemodeDesc* desc); + ModResult (*unregister_gamemode)(ModContext* ctx, const char* id); + ModResult (*is_active)(ModContext* ctx, const char* gamemodeId, bool* out_active); +} GamemodeService; + +#ifdef __cplusplus +#include "mods/service.hpp" + +template <> +struct mods::ServiceTraits { + static constexpr const char* id = GAMEMODE_SERVICE_ID; + static constexpr uint16_t major_version = GAMEMODE_SERVICE_MAJOR; + static constexpr uint16_t minor_version = GAMEMODE_SERVICE_MINOR; +}; +#endif diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc index b1eb71a85d..2c6fcac2b3 100644 --- a/src/d/actor/d_a_alink_demo.inc +++ b/src/d/actor/d_a_alink_demo.inc @@ -23,9 +23,12 @@ #include "d/actor/d_a_npc_tkc.h" #include +#ifdef TARGET_PC #include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/settings.h" #include "dusk/speedrun.h" +#include "dusk/gamemode.hpp" +#endif BOOL daAlink_c::checkEventRun() const { return dComIfGp_event_runCheck() || checkPlayerDemoMode(); @@ -4009,9 +4012,9 @@ int daAlink_c::procGanonFinishInit() { onEndResetFlg1(ERFLG1_SHIELD_BACKBONE); #if TARGET_PC - if (dusk::getSettings().game.speedrunMode) { - if (dusk::m_speedrunInfo.m_isRunStarted) { - dusk::m_speedrunInfo.stopRun(); + if (dusk::speedrun::isActive()) { + if (dusk::speedrun::g_speedrunInfo.m_isRunStarted) { + dusk::speedrun::g_speedrunInfo.stopRun(); } } #endif diff --git a/src/d/d_bright_check.cpp b/src/d/d_bright_check.cpp index ccb04c69e5..cef3a5adf4 100644 --- a/src/d/d_bright_check.cpp +++ b/src/d/d_bright_check.cpp @@ -9,11 +9,15 @@ #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/J2DGraph/J2DTextBox.h" #include "d/d_msg_string.h" +#include "m_Do/m_Do_controller_pad.h" + +#ifdef TARGET_PC +#include #include "dusk/livesplit.h" #include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/speedrun.h" -#include "m_Do/m_Do_controller_pad.h" -#include +#include "dusk/gamemode.hpp" +#endif dBrightCheck_c::dBrightCheck_c(JKRArchive* i_archive) { mArchive = i_archive; @@ -143,12 +147,10 @@ void dBrightCheck_c::modeMove() { if (mDoCPd_c::getTrigA(PAD_1) || mDoCPd_c::getTrigStart(PAD_1)) { mDoAud_seStart(Z2SE_ENTER_GAME, NULL, 0, 0); #ifdef TARGET_PC - if (dusk::getSettings().game.speedrunMode && !dusk::getSettings().game.hideTvSettingsScreen) { - // start a new run if a run isn't already in progress - if (!dusk::m_speedrunInfo.m_isRunStarted) { - dusk::resetForSpeedrunMode(); - dusk::m_speedrunInfo.startRun(); - dusk::speedrun::start(); + if (!dusk::getSettings().game.hideTvSettingsScreen) { + const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode(); + if (gamemode) { + gamemode->mOnSaveLoadedFunction(); } } diff --git a/src/d/d_s_name.cpp b/src/d/d_s_name.cpp index d0e33adce4..6136353e16 100644 --- a/src/d/d_s_name.cpp +++ b/src/d/d_s_name.cpp @@ -9,11 +9,6 @@ #include "d/d_com_inf_game.h" #include "d/d_meter2_info.h" #include "d/d_s_name.h" -#include "dusk/imgui/ImGuiConsole.hpp" -#include "dusk/livesplit.h" -#include "dusk/memory.h" -#include "dusk/speedrun.h" -#include "dusk/settings.h" #include "f_op/f_op_overlap_mng.h" #include "f_op/f_op_scene_mng.h" #include "m_Do/m_Do_Reset.h" @@ -21,7 +16,16 @@ #include "m_Do/m_Do_machine.h" #include "m_Do/m_Do_main.h" #include "m_Do/m_Do_mtx.h" -#include + +#ifdef TARGET_PC +#include "dusk/imgui/ImGuiConsole.hpp" +#include "dusk/livesplit.h" +#include "dusk/memory.h" +#include "dusk/speedrun.h" +#include "dusk/settings.h" +#include "dusk/autosave.h" +#include "dusk/gamemode.hpp" +#endif #if TARGET_PC #define SHOW_TV_SETTINGS_SCREEN (this->mShowTvSettingsScreen) @@ -418,12 +422,10 @@ void dScnName_c::changeGameScene() { dComIfGs_setRestartRoomParam(0); #if TARGET_PC - if (dusk::getSettings().game.speedrunMode && dusk::getSettings().game.hideTvSettingsScreen) { - // start a new run on file load if a run isn't already in progress - if (!dusk::m_speedrunInfo.m_isRunStarted) { - dusk::resetForSpeedrunMode(); - dusk::m_speedrunInfo.startRun(); - dusk::speedrun::start(); + if (dusk::getSettings().game.hideTvSettingsScreen) { + const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode(); + if (gamemode) { + gamemode->mOnSaveLoadedFunction(); } } diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 22729ad43e..80923fd011 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -29,6 +29,7 @@ #if TARGET_PC #include "dusk/settings.h" +#include "dusk/gamemode.hpp" #include #include "helpers/string.hpp" @@ -1531,6 +1532,13 @@ void dSv_save_c::init() { mEvent.init(); mMiniGame.init(); + +#ifdef TARGET_PC + const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode(); + if (gamemode) { + gamemode->mOnNewSaveFunction(); + } +#endif } dSv_memory2_c* dSv_save_c::getSave2(int i_stage2No) { diff --git a/src/dusk/OSThread.cpp b/src/dusk/OSThread.cpp index 7b97026e13..ac86a0ecce 100644 --- a/src/dusk/OSThread.cpp +++ b/src/dusk/OSThread.cpp @@ -509,6 +509,12 @@ BOOL OSJoinThread(OSThread* thread, void** val) { *(s32*)val = (s32)(intptr_t)thread->val; } thread->state = 0; + + { + std::lock_guard mapLock(GetThreadDataMutex()); + GetThreadDataMap().erase(thread); + } + sActiveThreadCount--; return 1; } return 0; diff --git a/src/dusk/gamemode.cpp b/src/dusk/gamemode.cpp new file mode 100644 index 0000000000..c3b62d7c75 --- /dev/null +++ b/src/dusk/gamemode.cpp @@ -0,0 +1,93 @@ +#include "dusk/gamemode.hpp" +#include "dusk/config.hpp" +#include "JSystem/JUtility/JUTGamePad.h" +#include "aurora/lib/logging.hpp" +#include "m_Do/m_Do_MemCard.h" +#include "dusk/ui/prelaunch.hpp" + +namespace dusk::gamemode { + +GamemodeManager g_GamemodeManager; + +aurora::Module DuskGamemodeLog("dusk::gamemode"); + +GamemodeManager::GamemodeManager() { + registerGamemode(Gamemode("vanilla","Vanilla","gczelda2")); + + mCurrentGamemodeId = "vanilla"; +} + +void GamemodeManager::setGamemodeToPrevious() { + // Gets the value from the settings of the last played gamemode id and sets that to the current gamemode (if registered) + GamemodeId id = dusk::getSettings().game.lastSelectedGamemodeId; + if (mRegisteredGamemodes.find(id) == mRegisteredGamemodes.end()) { + setCurrentGamemode("vanilla"); + return; + } + setCurrentGamemode(id); +} + +void GamemodeManager::registerGamemode(const Gamemode& gamemode) { + if (gamemode.getId().empty()) { + DuskGamemodeLog.fatal("No gamemode id specified in GamemodeManager::registerGamemode!"); + } + if (gamemode.getSaveName().empty()) { + DuskGamemodeLog.fatal("No save name provided for gamemode {}", gamemode.getId()); + } + if (gamemode.getFullName().empty()) { + DuskGamemodeLog.fatal("No Name Specified for gamemode {}", gamemode.getId()); + } + + if (mRegisteredGamemodes.find(gamemode.getId()) != mRegisteredGamemodes.end()) { + DuskGamemodeLog.warn("Attempting to register gamemode {} when it is already registered!", gamemode.getId()); + return; + } + + mRegisteredGamemodes.emplace(gamemode.getId(),gamemode); + dusk::ui::Prelaunch::rebuild_menu_buttons(); +} + +void GamemodeManager::unregisterGamemode(const GamemodeId& gamemodeId) { + const auto& it = mRegisteredGamemodes.find(gamemodeId); + if (it == mRegisteredGamemodes.end()) { + DuskGamemodeLog.warn( + "Attempting to unregister gamemode of id {} that isn't registered!", gamemodeId); + return; + } + + if (mCurrentGamemodeId == gamemodeId) { + // We need to be careful if we are unregistering a running gamemode, the easiest way is just + // to reset the game back to title as vanilla; + ui::prelaunch_state().showPrelaunchOnReset = true; + JUTGamePad::C3ButtonReset::sResetSwitchPushing = true; + setCurrentGamemode("vanilla"); + } + mRegisteredGamemodes.erase(it); + dusk::ui::Prelaunch::rebuild_menu_buttons(); +} + +void GamemodeManager::setCurrentGamemode(const GamemodeId& id) { + if (mCurrentGamemodeId == id) { + return; + } + const Gamemode* currentGamemode = getCurrentGamemode(); + if (currentGamemode) { + currentGamemode->mOnDeactivatedFunction(); + } + if (mRegisteredGamemodes.find(id) == mRegisteredGamemodes.end()) { + DuskGamemodeLog.warn("Attempting to set current game mode to {} when it hasn't been registered!", id); + } + + mCurrentGamemodeId = id; + dusk::getSettings().game.lastSelectedGamemodeId.setValue(id); + dusk::config::save(); + + currentGamemode = getCurrentGamemode(); + if (currentGamemode) { + // Set the loaded save file to our gamemode's save name + mDoMemCd_SetFileName(currentGamemode->mSaveName); + currentGamemode->mOnActivatedFunction(); + } +} + +}; // namespace dusk::gamemode diff --git a/src/dusk/gamemode.hpp b/src/dusk/gamemode.hpp new file mode 100644 index 0000000000..6a48807d56 --- /dev/null +++ b/src/dusk/gamemode.hpp @@ -0,0 +1,69 @@ +#pragma once +#include +#include + +namespace dusk::gamemode { +using GamemodeId = std::string; + +// This class holds the definition for the gamemode and various function pointers to call +class Gamemode { +public: + Gamemode(const GamemodeId& id, const std::string& fullName, const std::string& saveName) { + mId = id; + mFullName = fullName; + mSaveName = saveName; + } + const GamemodeId& getId() const { return mId; } + const std::string& getFullName() const { return mFullName; } + const std::string& getSaveName() const { return mSaveName; } + + GamemodeId mId; + std::string mFullName; + std::string mSaveName; + + std::function mOnActivatedFunction = gamemodeStub; + std::function mOnDeactivatedFunction = gamemodeStub; + std::function mOnPlayFunction = gamemodeStub; + std::function mOnSaveLoadedFunction = gamemodeStub; + std::function mOnNewSaveFunction = gamemodeStub; + std::function mOnGameResetFunction = gamemodeStub; + std::function mOnTickFunction = gamemodeStub; + +private: + static void gamemodeStub() {} +}; + +class GamemodeManager { +public: + GamemodeManager(); + void registerGamemode(const Gamemode& gamemode); + void unregisterGamemode(const GamemodeId& gamemodeId); + + const Gamemode* getCurrentGamemode() const { + const auto& it = mRegisteredGamemodes.find(mCurrentGamemodeId); + return it != mRegisteredGamemodes.end() ? &it->second : &mRegisteredGamemodes.at("vanilla"); + } + bool isCurrentGamemode(const GamemodeId& id) const { + const Gamemode* gamemode = getCurrentGamemode(); + if (gamemode && gamemode->getId() == id) { + return true; + } + return false; + } + void setCurrentGamemode(const GamemodeId& id); + void setGamemodeToPrevious(); + + std::map& getRegisteredGamemodes() { return mRegisteredGamemodes; } + +private: + GamemodeId mCurrentGamemodeId; + std::map mRegisteredGamemodes; +}; + +extern GamemodeManager g_GamemodeManager; + +inline GamemodeManager& getGamemodeManager() { + return g_GamemodeManager; +} + +}; // namespace dusk::gamemode diff --git a/src/dusk/imgui/ImGuiConsole.cpp b/src/dusk/imgui/ImGuiConsole.cpp index 3c0131c729..9e0e3fc6f8 100644 --- a/src/dusk/imgui/ImGuiConsole.cpp +++ b/src/dusk/imgui/ImGuiConsole.cpp @@ -22,6 +22,7 @@ #include "dusk/main.h" #include "dusk/settings.h" #include "dusk/ui/ui.hpp" +#include "dusk/gamemode.hpp" #include "f_pc/f_pc_manager.h" #include "f_pc/f_pc_name.h" #include "m_Do/m_Do_controller_pad.h" @@ -285,7 +286,7 @@ namespace dusk { if (dusk::IsGameLaunched && !m_isLaunchInitialized) { m_isLaunchInitialized = true; - if (getSettings().game.speedrunMode && getSettings().game.liveSplitEnabled) { + if (dusk::speedrun::isActive() && getSettings().game.liveSplitEnabled) { dusk::speedrun::connectLiveSplit(); } } @@ -357,7 +358,7 @@ namespace dusk { m_menuTools.ShowInputViewer(); - if (dusk::IsGameLaunched && !dusk::getSettings().game.speedrunMode) { + if (dusk::IsGameLaunched && !dusk::speedrun::isActive()) { m_menuTools.ShowDebugOverlay(); m_menuTools.ShowCameraOverlay(); m_menuTools.ShowProcessManager(); diff --git a/src/dusk/imgui/ImGuiMenuTools.cpp b/src/dusk/imgui/ImGuiMenuTools.cpp index b9ad5eb021..d0e1ad6999 100644 --- a/src/dusk/imgui/ImGuiMenuTools.cpp +++ b/src/dusk/imgui/ImGuiMenuTools.cpp @@ -14,6 +14,7 @@ #include "d/d_com_inf_game.h" #include "dusk/data.hpp" #include "dusk/dusk.h" +#include "dusk/speedrun.h" #include "dusk/main.h" #include "dusk/os.h" #include "m_Do/m_Do_main.h" @@ -38,7 +39,7 @@ namespace dusk { ImGui::BeginDisabled(); } - ImGui::BeginDisabled(getSettings().game.speedrunMode); + ImGui::BeginDisabled(dusk::speedrun::isActive()); ImGui::MenuItem("Save Editor", hotkeys::SHOW_SAVE_EDITOR, &m_showSaveEditor); ImGui::MenuItem("State Share", hotkeys::SHOW_STATE_SHARE, &m_showStateShare); @@ -60,7 +61,7 @@ namespace dusk { } if (ImGui::BeginMenu("Debug")) { - ImGui::BeginDisabled(getSettings().game.speedrunMode); + ImGui::BeginDisabled(dusk::speedrun::isActive()); bool developmentMode = mDoMain::developmentMode == 1; if (ImGui::Checkbox("Development Mode", &developmentMode)) { diff --git a/src/dusk/iso_validate.hpp b/src/dusk/iso_validate.hpp index 176284fd02..b814b604ae 100644 --- a/src/dusk/iso_validate.hpp +++ b/src/dusk/iso_validate.hpp @@ -2,6 +2,7 @@ #define DUSK_ISO_VALIDATE_HPP #include +#include "dusk/settings.h" namespace dusk::iso { struct KnownDisc; diff --git a/src/dusk/livesplit.cpp b/src/dusk/livesplit.cpp index 80c29379e5..d583ef75fa 100644 --- a/src/dusk/livesplit.cpp +++ b/src/dusk/livesplit.cpp @@ -1,46 +1,48 @@ #if _WIN32 - #include - #include - using socket_t = SOCKET; - static void closeSocket(socket_t s) { - LINGER li{1, 0}; - setsockopt(s, SOL_SOCKET, SO_LINGER, reinterpret_cast(&li), sizeof(li)); - closesocket(s); - } - static int socketError(socket_t s) { - int err = 0; int len = sizeof(err); - getsockopt(s, SOL_SOCKET, SO_ERROR, reinterpret_cast(&err), &len); - return err; - } - static constexpr int kSendFlags = 0; +#include +#include +using socket_t = SOCKET; +static void closeSocket(socket_t s) { + LINGER li{1, 0}; + setsockopt(s, SOL_SOCKET, SO_LINGER, reinterpret_cast(&li), sizeof(li)); + closesocket(s); +} +static int socketError(socket_t s) { + int err = 0; + int len = sizeof(err); + getsockopt(s, SOL_SOCKET, SO_ERROR, reinterpret_cast(&err), &len); + return err; +} +static constexpr int kSendFlags = 0; #else - #include - #include - #include - #include - #include - #include - #include - using socket_t = int; - static void closeSocket(socket_t s) { - struct linger li{1, 0}; - setsockopt(s, SOL_SOCKET, SO_LINGER, &li, sizeof(li)); - close(s); - } - static int socketError(socket_t s) { - int err = 0; socklen_t len = sizeof(err); - getsockopt(s, SOL_SOCKET, SO_ERROR, &err, &len); - return err; - } - #ifndef INVALID_SOCKET - #define INVALID_SOCKET -1 - #endif +#include +#include +#include +#include +#include +#include +#include +using socket_t = int; +static void closeSocket(socket_t s) { + struct linger li{1, 0}; + setsockopt(s, SOL_SOCKET, SO_LINGER, &li, sizeof(li)); + close(s); +} +static int socketError(socket_t s) { + int err = 0; + socklen_t len = sizeof(err); + getsockopt(s, SOL_SOCKET, SO_ERROR, &err, &len); + return err; +} +#ifndef INVALID_SOCKET +#define INVALID_SOCKET -1 +#endif - #if defined(__APPLE__) - static constexpr int kSendFlags = 0; - #else - static constexpr int kSendFlags = MSG_NOSIGNAL; - #endif +#if defined(__APPLE__) +static constexpr int kSendFlags = 0; +#else +static constexpr int kSendFlags = MSG_NOSIGNAL; +#endif #endif #include @@ -49,18 +51,18 @@ namespace dusk::speedrun { -static bool running = false; -static bool startPending = false; -static uint64_t frameCount = 0; -static socket_t sock = INVALID_SOCKET; -static bool wasLoading = false; -static bool connected = false; -static bool connectPending = false; -static bool disconnectPending = false; -static uint32_t idleProbeCounter = 0; -static uint32_t reconnectCounter = 0; -static char storedHost[64] = "127.0.0.1"; -static int storedPort = 16834; +static bool running = false; +static bool startPending = false; +static uint64_t frameCount = 0; +static socket_t sock = INVALID_SOCKET; +static bool wasLoading = false; +static bool connected = false; +static bool connectPending = false; +static bool disconnectPending = false; +static uint32_t idleProbeCounter = 0; +static uint32_t reconnectCounter = 0; +static char storedHost[64] = "127.0.0.1"; +static int storedPort = 16834; static void sendCmd(const char* cmd) { if (sock == INVALID_SOCKET) { @@ -122,9 +124,11 @@ void onGameFrame() { } void start() { - if (running) { + if (g_speedrunInfo.m_isRunStarted || running) { return; } + resetForSpeedrunMode(); + g_speedrunInfo.startRun(); running = true; startPending = true; @@ -214,8 +218,16 @@ void disconnectLiveSplit() { connected = connectPending = disconnectPending = false; } -bool consumeConnectedEvent() { bool v = connectPending; connectPending = false; return v; } -bool consumeDisconnectedEvent() { bool v = disconnectPending; disconnectPending = false; return v; } +bool consumeConnectedEvent() { + bool v = connectPending; + connectPending = false; + return v; +} +bool consumeDisconnectedEvent() { + bool v = disconnectPending; + disconnectPending = false; + return v; +} void updateLiveSplit() { if (sock == INVALID_SOCKET) { @@ -267,7 +279,8 @@ void updateLiveSplit() { #else || (r < 0 && errno != EAGAIN && errno != EWOULDBLOCK) #endif - ) { + ) + { if (connected) { disconnectPending = true; } @@ -280,15 +293,12 @@ void updateLiveSplit() { return; } - const uint64_t totalMs = frameCount * 1000 / 30; + const uint64_t totalMs = frameCount * 1000 / 30; const uint64_t totalSec = totalMs / 1000; char cmd[32]; snprintf(cmd, sizeof(cmd), "setgametime %u:%02u:%02u.%03u", - static_cast(totalSec / 3600), - static_cast((totalSec / 60) % 60), - static_cast(totalSec % 60), - static_cast(totalMs % 1000) - ); + static_cast(totalSec / 3600), static_cast((totalSec / 60) % 60), + static_cast(totalSec % 60), static_cast(totalMs % 1000)); sendCmd(cmd); } @@ -299,4 +309,4 @@ void shutdown() { #endif } -} +} // namespace dusk::speedrun diff --git a/src/dusk/livesplit.h b/src/dusk/livesplit.h index b283a29af4..b803e9b50b 100644 --- a/src/dusk/livesplit.h +++ b/src/dusk/livesplit.h @@ -1,6 +1,8 @@ #pragma once #include +#include "dusk/gamemode.hpp" +#include "dusk/speedrun.h" namespace dusk::speedrun { void onGameFrame(); diff --git a/src/dusk/main.h b/src/dusk/main.h index 1378e48a1b..e3db4420d1 100644 --- a/src/dusk/main.h +++ b/src/dusk/main.h @@ -1,7 +1,6 @@ #pragma once #include - namespace dusk { extern bool IsRunning; @@ -21,8 +20,6 @@ struct StageRequest { }; extern StageRequest StageRequested; - - #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS) || \ (defined(TARGET_OS_TV) && TARGET_OS_TV) inline constexpr bool SupportsProcessRestart = false; diff --git a/src/dusk/mods/svc/gamemode.cpp b/src/dusk/mods/svc/gamemode.cpp new file mode 100644 index 0000000000..d46e9f7cda --- /dev/null +++ b/src/dusk/mods/svc/gamemode.cpp @@ -0,0 +1,144 @@ +#include "mods/svc/gamemode.h" +#include "dusk/gamemode.hpp" + +#include "config.hpp" +#include "registry.hpp" +#include "slot_map.hpp" + +#include "aurora/lib/logging.hpp" +#include "dusk/mod_loader.hpp" + +#include + + +namespace dusk::mods::svc::gamemode_impl { +namespace { + +aurora::Module Log("dusk::mods::gamemode"); + +// These track which gamemodes are registered by which mods, allowing us to automatically unregister them +std::unordered_map> s_gamemodesRegisteredToMods; + +std::string get_mod_gamemode_id(ModContext* ctx, const std::string& id) { + return id + "_" + ctx->mod->metadata.id; +} + +void gamemode_remove_mod(LoadedMod& mod) { + const auto it = s_gamemodesRegisteredToMods.find(mod.metadata.id); + if (it != s_gamemodesRegisteredToMods.end()) { + for (const auto& id : it->second) { + dusk::gamemode::getGamemodeManager().unregisterGamemode(id); + } + s_gamemodesRegisteredToMods.erase(it); + } +} +} // namespace + + +ModResult register_gamemode(ModContext* ctx, const GamemodeDesc* desc) { + std::string id; + if (!desc->gamemodeId) { + Log.error("Attempted to register a gamemode with a null id!"); + return MOD_ERROR; + } + id = desc->gamemodeId; + if (id.empty()) { + Log.error("Attempted to register a gamemode with an empty id!"); + return MOD_ERROR; + } + id = get_mod_gamemode_id(ctx, id); // Append the mod id to the end of the gamemode id to ensure they are unique + + std::string fullName; + if (!desc->fullName) { + Log.warn("Attempted to register gamemode {} with a null full name! Defaulting to: ({})",id,id); + fullName = id; + }else{ + fullName = desc->fullName; + if (fullName.empty()) { + Log.warn("Attempted to register gamemode {} with an empty full name! Defaulting to: ({})",id,id); + fullName = id; + } + } + + std::string saveName; + if (!desc->saveName) { + Log.warn("Attempted to register gamemode {} with a null save name! Defaulting to: (gczelda2)",id); + saveName = "gczelda2"; + }else{ + saveName = desc->saveName; + if (saveName.empty()) { + Log.warn("Attempted to register gamemode {} with an empty save name! Defaulting to: (gczelda2)",id); + saveName = "gczelda2"; + } + } + + dusk::gamemode::Gamemode gamemode(id, fullName, saveName); + + if (desc->onActivatedFunction) { + gamemode.mOnActivatedFunction = desc->onActivatedFunction; + } + if (desc->onDeactivatedFunction) { + gamemode.mOnDeactivatedFunction = desc->onDeactivatedFunction; + } + if (desc->onPlayFunction) { + gamemode.mOnPlayFunction = desc->onPlayFunction; + } + if (desc->onSaveLoadedFunction) { + gamemode.mOnSaveLoadedFunction = desc->onSaveLoadedFunction; + } + if (desc->onNewSaveFunction) { + gamemode.mOnNewSaveFunction = desc->onNewSaveFunction; + } + if (desc->onGameResetFunction) { + gamemode.mOnGameResetFunction = desc->onGameResetFunction; + } + if (desc->onTickFunction) { + gamemode.mOnTickFunction = desc->onTickFunction; + } + + dusk::gamemode::getGamemodeManager().registerGamemode(gamemode); + + const auto it = s_gamemodesRegisteredToMods.find(ctx->mod->metadata.id); + if (it == s_gamemodesRegisteredToMods.end()) { + std::vector registeredGamemodes = {id}; + s_gamemodesRegisteredToMods.emplace(ctx->mod->metadata.id, registeredGamemodes); + }else { + it->second.push_back(id); + } + + return MOD_OK; +} + +ModResult unregister_gamemode(ModContext* ctx, const char* id) { + dusk::gamemode::getGamemodeManager().unregisterGamemode(get_mod_gamemode_id(ctx,id)); + return MOD_OK; +} + +ModResult is_active(ModContext* ctx, const char* gamemodeId, bool* out_active) { + *out_active = dusk::gamemode::getGamemodeManager().isCurrentGamemode(get_mod_gamemode_id(ctx,gamemodeId)); + return MOD_OK; +} + +} + +namespace dusk::mods::svc { +namespace { + +constexpr GamemodeService s_gamemodeService{ + .header = SERVICE_HEADER(GamemodeService, GAMEMODE_SERVICE_MAJOR, GAMEMODE_SERVICE_MINOR), + .register_gamemode = gamemode_impl::register_gamemode, + .unregister_gamemode = gamemode_impl::unregister_gamemode, + .is_active = gamemode_impl::is_active +}; + +} + +constinit const ServiceModule g_gamemodeModule{ + .id = GAMEMODE_SERVICE_ID, + .majorVersion = GAMEMODE_SERVICE_MAJOR, + .minorVersion = GAMEMODE_SERVICE_MINOR, + .service = &s_gamemodeService, + .modDetached = gamemode_impl::gamemode_remove_mod, +}; + +} // namespace dusk::mods::svc diff --git a/src/dusk/mods/svc/registry.cpp b/src/dusk/mods/svc/registry.cpp index 2033d47475..a003eacc93 100644 --- a/src/dusk/mods/svc/registry.cpp +++ b/src/dusk/mods/svc/registry.cpp @@ -210,6 +210,7 @@ void ModLoader::init_services() { &svc::g_gameModule, &svc::g_cameraModule, &svc::g_gfxModule, + &svc::g_gamemodeModule, }) { svc::register_module(*module); diff --git a/src/dusk/mods/svc/registry.hpp b/src/dusk/mods/svc/registry.hpp index 191626e0ef..25cdfdaab7 100644 --- a/src/dusk/mods/svc/registry.hpp +++ b/src/dusk/mods/svc/registry.hpp @@ -72,5 +72,6 @@ extern const ServiceModule g_uiModule; extern const ServiceModule g_gameModule; extern const ServiceModule g_cameraModule; extern const ServiceModule g_gfxModule; +extern const ServiceModule g_gamemodeModule; } // namespace dusk::mods::svc diff --git a/src/dusk/settings.cpp b/src/dusk/settings.cpp index e2a2169485..f44f788fdd 100644 --- a/src/dusk/settings.cpp +++ b/src/dusk/settings.cpp @@ -154,7 +154,8 @@ UserSettings g_userSettings = { .recordingMode {"game.recordingMode", false}, .removeQuestMapMarkers {"game.removeQuestMapMarkers", false}, .showInputViewer {"game.showInputViewer", false}, - .showInputViewerGyro {"game.showInputViewerGyro", false} + .showInputViewerGyro {"game.showInputViewerGyro", false}, + .lastSelectedGamemodeId {"game.lastSelectedGamemodeId", "vanilla"} }, .backend = { @@ -302,6 +303,7 @@ void registerSettings() { Register(g_userSettings.game.removeQuestMapMarkers); Register(g_userSettings.game.showInputViewer); Register(g_userSettings.game.showInputViewerGyro); + Register(g_userSettings.game.lastSelectedGamemodeId); Register(g_userSettings.game.fastSpinner); Register(g_userSettings.game.infiniteHearts); Register(g_userSettings.game.infiniteArrows); diff --git a/src/dusk/settings.h b/src/dusk/settings.h index 326f7f321c..43247fa23f 100644 --- a/src/dusk/settings.h +++ b/src/dusk/settings.h @@ -282,6 +282,8 @@ struct UserSettings { ConfigVar removeQuestMapMarkers; ConfigVar showInputViewer; ConfigVar showInputViewerGyro; + + ConfigVar lastSelectedGamemodeId; } game; struct { diff --git a/src/dusk/speedrun.cpp b/src/dusk/speedrun.cpp index 275a8de900..3cf0c6184b 100644 --- a/src/dusk/speedrun.cpp +++ b/src/dusk/speedrun.cpp @@ -3,10 +3,37 @@ #include "dusk/config.hpp" #include "m_Do/m_Do_main.h" #include +#include "dusk/gamemode.hpp" +#include "dusk/livesplit.h" -namespace dusk { +namespace dusk::speedrun { -SpeedrunInfo m_speedrunInfo; +SpeedrunInfo g_speedrunInfo; + +static void onSpeedrunModeActive() { + resetForSpeedrunMode(); +} + +static void onSpeedrunModeDeactive() { + restoreFromSpeedrunMode(); + if (getSettings().game.liveSplitEnabled) { + speedrun::disconnectLiveSplit(); + } +} + +void registerSpeedrunGamemode() { + dusk::gamemode::Gamemode speedrunGamemode(DUSK_SPEEDRUN_GAMEMODE_ID,"Speedrun","gczelda2-speedrun"); + speedrunGamemode.mOnSaveLoadedFunction = dusk::speedrun::start; + speedrunGamemode.mOnActivatedFunction = onSpeedrunModeActive; + speedrunGamemode.mOnDeactivatedFunction = onSpeedrunModeDeactive; + speedrunGamemode.mOnTickFunction = dusk::speedrun::onGameFrame; + + dusk::gamemode::getGamemodeManager().registerGamemode(speedrunGamemode); +} + +void unregisterSpeedrunGamemode() { + dusk::gamemode::getGamemodeManager().unregisterGamemode(DUSK_SPEEDRUN_GAMEMODE_ID); +} void resetForSpeedrunMode() { mDoMain::developmentMode = -1; diff --git a/src/dusk/speedrun.h b/src/dusk/speedrun.h index d9e43c3ed7..f915ff6981 100644 --- a/src/dusk/speedrun.h +++ b/src/dusk/speedrun.h @@ -1,7 +1,10 @@ #pragma once #include +#include "dusk/gamemode.hpp" -namespace dusk { +#define DUSK_SPEEDRUN_GAMEMODE_ID "vanilla_speedrun" + +namespace dusk::speedrun { struct SpeedrunInfo { void startRun() { @@ -34,9 +37,15 @@ struct SpeedrunInfo { OSTime m_igtTimer = 0; }; -extern SpeedrunInfo m_speedrunInfo; +extern SpeedrunInfo g_speedrunInfo; +void registerSpeedrunGamemode(); +void unregisterSpeedrunGamemode(); void resetForSpeedrunMode(); void restoreFromSpeedrunMode(); +inline bool isActive() { + return dusk::gamemode::getGamemodeManager().isCurrentGamemode(DUSK_SPEEDRUN_GAMEMODE_ID); +} + } // namespace dusk diff --git a/src/dusk/ui/menu_bar.cpp b/src/dusk/ui/menu_bar.cpp index 0c6528e424..018f02e47e 100644 --- a/src/dusk/ui/menu_bar.cpp +++ b/src/dusk/ui/menu_bar.cpp @@ -8,6 +8,7 @@ #include "achievements.hpp" #include "aurora/rmlui.hpp" #include "dusk/livesplit.h" +#include "dusk/gamemode.hpp" #include "dusk/main.h" #include "dusk/mods/svc/ui.hpp" #include "dusk/settings.h" @@ -20,6 +21,7 @@ #include "mods_window.hpp" #include "settings.hpp" #include "ui.hpp" +#include "dusk/ui/prelaunch.hpp" #include "warp.hpp" #include "window.hpp" @@ -93,9 +95,10 @@ MenuBar::MenuBar() dismiss(modal); return; } + prelaunch_state().showPrelaunchOnReset = true; JUTGamePad::C3ButtonReset::sResetSwitchPushing = true; dismiss(modal); - hide(false); + Document::hide(true); }, }, }, @@ -134,11 +137,11 @@ MenuBar::MenuBar() })); }); - if (getSettings().game.speedrunMode) { + if (dusk::speedrun::isActive()) { mTabBar->add_tab("Reset Timer", [this] { mTabBar->set_active_tab(-1); mDoAud_seStartMenu(kSoundClick); - m_speedrunInfo.reset(); + dusk::speedrun::g_speedrunInfo.reset(); if (getSettings().game.liveSplitEnabled) { dusk::speedrun::reset(); } diff --git a/src/dusk/ui/modal.cpp b/src/dusk/ui/modal.cpp index 8d9956ca13..db4e04ba88 100644 --- a/src/dusk/ui/modal.cpp +++ b/src/dusk/ui/modal.cpp @@ -25,6 +25,10 @@ Modal::Modal(Props props) : WindowSmall("modal", "modal-dialog"), mProps(std::mo auto* actions = append(mDialog, "div"); actions->SetClass("modal-actions", true); + if (props.isVertical) { + actions->SetClass("modal-actions-vertical", true); + }else{ + } for (auto& action : mProps.actions) { add_action(std::move(action)); @@ -87,9 +91,11 @@ bool Modal::handle_nav_command(Rml::Event& event, NavCommand cmd) { } int direction = 0; - if (cmd == NavCommand::Left) { + NavCommand prevCommand = mProps.isVertical ? NavCommand::Up : NavCommand::Left; + NavCommand nextCommand = mProps.isVertical ? NavCommand::Down : NavCommand::Right; + if (cmd == prevCommand) { direction = -1; - } else if (cmd == NavCommand::Right) { + } else if (cmd == nextCommand) { direction = 1; } else { return false; diff --git a/src/dusk/ui/modal.hpp b/src/dusk/ui/modal.hpp index 400f55bd64..dd2e79ff91 100644 --- a/src/dusk/ui/modal.hpp +++ b/src/dusk/ui/modal.hpp @@ -20,6 +20,7 @@ public: std::function onDismiss; Rml::String variant; Rml::String icon = ""; + bool isVertical; }; explicit Modal(Props props); diff --git a/src/dusk/ui/overlay.cpp b/src/dusk/ui/overlay.cpp index d2bd3fe6c1..c987f660ac 100644 --- a/src/dusk/ui/overlay.cpp +++ b/src/dusk/ui/overlay.cpp @@ -289,7 +289,7 @@ void Overlay::update() { update_pipeline_progress(); #if !(defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS && !TARGET_OS_MACCATALYST)) - if (getSettings().game.speedrunMode && getSettings().game.liveSplitEnabled) { + if (dusk::speedrun::isActive() && getSettings().game.liveSplitEnabled) { dusk::speedrun::updateLiveSplit(); if (dusk::speedrun::consumeConnectedEvent()) { push_toast({.title = "LiveSplit connected", .duration = std::chrono::seconds(3)}); @@ -301,33 +301,33 @@ void Overlay::update() { #endif if (mSpeedrunTimer != nullptr && mSpeedrunRta != nullptr && mSpeedrunIgt != nullptr) { - if (getSettings().game.speedrunMode) { + if (dusk::speedrun::isActive()) { // L+R+A+Start to reset timer if (mDoCPd_c::getHoldL(PAD_1) && mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getHoldA(PAD_1) && mDoCPd_c::getTrigZ(PAD_1)) { - m_speedrunInfo.reset(); + dusk::speedrun::g_speedrunInfo.reset(); } // L+R+A+Y to manually stop timer if (mDoCPd_c::getHoldL(PAD_1) && mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getHoldA(PAD_1) && mDoCPd_c::getTrigY(PAD_1)) { - if (m_speedrunInfo.m_isRunStarted) { - m_speedrunInfo.m_endTimestamp = OSGetTime() - m_speedrunInfo.m_startTimestamp; - m_speedrunInfo.m_isRunStarted = false; + if (dusk::speedrun::g_speedrunInfo.m_isRunStarted) { + dusk::speedrun::g_speedrunInfo.m_endTimestamp = OSGetTime() - dusk::speedrun::g_speedrunInfo.m_startTimestamp; + dusk::speedrun::g_speedrunInfo.m_isRunStarted = false; } } OSTime elapsedTime = 0; - if (m_speedrunInfo.m_isRunStarted) { - elapsedTime = OSGetTime() - m_speedrunInfo.m_startTimestamp; - } else if (m_speedrunInfo.m_endTimestamp != 0) { - elapsedTime = m_speedrunInfo.m_endTimestamp; + if (dusk::speedrun::g_speedrunInfo.m_isRunStarted) { + elapsedTime = OSGetTime() - dusk::speedrun::g_speedrunInfo.m_startTimestamp; + } else if (dusk::speedrun::g_speedrunInfo.m_endTimestamp != 0) { + elapsedTime = dusk::speedrun::g_speedrunInfo.m_endTimestamp; } - if (!m_speedrunInfo.m_isPauseIGT) { - m_speedrunInfo.m_igtTimer = elapsedTime - m_speedrunInfo.m_totalLoadTime; + if (!dusk::speedrun::g_speedrunInfo.m_isPauseIGT) { + dusk::speedrun::g_speedrunInfo.m_igtTimer = elapsedTime - dusk::speedrun::g_speedrunInfo.m_totalLoadTime; } mSpeedrunTimer->SetAttribute("open", ""); @@ -340,7 +340,7 @@ void Overlay::update() { } mSpeedrunIgt->SetInnerRML( - escape(fmt::format("IGT {}", FormatTime(m_speedrunInfo.m_igtTimer)))); + escape(fmt::format("IGT {}", FormatTime(dusk::speedrun::g_speedrunInfo.m_igtTimer)))); } else { mSpeedrunTimer->RemoveAttribute("open"); } diff --git a/src/dusk/ui/prelaunch.cpp b/src/dusk/ui/prelaunch.cpp index 8379d4bef0..2d885b8373 100644 --- a/src/dusk/ui/prelaunch.cpp +++ b/src/dusk/ui/prelaunch.cpp @@ -3,9 +3,11 @@ #include "dusk/config.hpp" #include "dusk/data.hpp" #include "dusk/file_select.hpp" +#include "dusk/gamemode.hpp" #include "dusk/iso_validate.hpp" #include "dusk/main.h" #include "dusk/settings.h" +#include "dusk/ui/menu_bar.hpp" #include "dusk/update_check.hpp" #include "modal.hpp" #include "mods_window.hpp" @@ -685,61 +687,42 @@ void try_apply_mirrored_layout(Rml::Element* body) { body->SetClass("mirrored", getSettings().game.enableMirrorMode.getValue()); } -Prelaunch::Prelaunch() - : Document(kDocumentSource, false, DocumentScope::Prelaunch), - mRoot(mDocument->GetElementById("root")) { +void Prelaunch::rebuild_menu_buttons() { + for (auto& doc : get_document_stack()) { + if (auto* prelaunch = dynamic_cast(doc.get())) { + auto* menuList = prelaunch->mDocument->GetElementById("menu-list"); + while (menuList->GetNumChildren() > 0) { + menuList->RemoveChild(menuList->GetChild(0)); + } + prelaunch->mMenuButtons.clear(); + prelaunch->build_menu_buttons(); + break; + } + } +} + +static std::string getPlayButtonText() { + auto& state = prelaunch_state(); + const bool activeDiscLoaded = !state.activeDiscPath.empty(); + if (activeDiscLoaded == false) { + return "Select Disc Image"; + } + std::string playText; + const dusk::gamemode::Gamemode* currentGameMode = + dusk::gamemode::getGamemodeManager().getCurrentGamemode(); + if (currentGameMode != nullptr) { + return currentGameMode->getId() == "vanilla" ? "Play" : + "Play " + currentGameMode->getFullName(); + } + return "Play"; +} + +Prelaunch::Prelaunch() : Document(kDocumentSource, false, DocumentScope::Prelaunch) { + mRoot = mDocument->GetElementById("root"); ensure_initialized(); begin_update_check(); - if (auto* menuList = mDocument->GetElementById("menu-list")) { - auto& state = prelaunch_state(); - const bool activeDiscLoaded = !state.activeDiscPath.empty(); - mMenuButtons.push_back( - std::make_unique - + @@ -329,7 +330,7 @@ void apply_disc_verification_result(const DiscVerificationResult& result) { state.pendingDiscPath = result.path; state.pendingDiscInfo = result.info; state.pendingDiscValidation = result.validation; - state.errorString = escape(get_error_msg(result.validation)); + state.errorString = get_error_msg(result.validation); return; } @@ -345,41 +346,34 @@ void apply_disc_verification_result(const DiscVerificationResult& result) { state.pendingDiscPath.clear(); state.pendingDiscInfo = {}; state.pendingDiscValidation = iso::ValidationError::Unknown; - state.errorString = escape(get_error_msg(result.validation)); + state.errorString = get_error_msg(result.validation); } class DiscVerificationModal : public WindowSmall { public: - DiscVerificationModal() : WindowSmall("modal", "modal-dialog") { - auto* header = append(mDialog, "div"); - header->SetClass("modal-header", true); + DiscVerificationModal() : WindowSmall("modal") { + auto* header = append(mDialog, "modal-header"); - auto* title = append(header, "div"); - title->SetClass("modal-title", true); - title->SetInnerRML("Verifying disc image"); + auto* title = append(header, "modal-title"); + append_text(title, "Verifying disc image"); auto* icon = append(header, "icon"); icon->SetClass("verifying", true); - auto* body = append(mDialog, "div"); - body->SetClass("modal-body", true); + auto* body = append(mDialog, "modal-body"); - auto* content = append(body, "div"); - content->SetClass("verification-progress", true); + auto* content = append(body, "verification-progress"); - mFileName = append(content, "div"); - mFileName->SetClass("verification-file", true); + mFileName = append(content, "verification-file"); mProgress = append(content, "progress"); mProgress->SetClass("progress-ongoing", true); mProgress->SetClass("verification-progress-bar", true); mProgress->SetAttribute("value", 0.f); - mDetail = append(content, "div"); - mDetail->SetClass("verification-detail", true); + mDetail = append(content, "verification-detail"); - auto* actions = append(mDialog, "div"); - actions->SetClass("modal-actions", true); + auto* actions = append(mDialog, "modal-actions"); mCancelButton = std::make_unique