From 746bcc6d2eb5e7386a3c4932e164abd11d2a9080 Mon Sep 17 00:00:00 2001 From: KakarotCake <61133727+KakarottoCake@users.noreply.github.com> Date: Sun, 26 Jul 2026 11:08:49 -0400 Subject: [PATCH 1/2] Apply the game precompiled header globally --- configure.py | 73 ++++++++++++++++++++++++-------- include/Enemy/CoasterKiller.hpp | 2 +- include/MarioUtil/ShadowUtil.hpp | 3 ++ include/SMS.pch | 12 ++++++ src/Enemy/Kumokun.cpp | 2 +- src/Enemy/bgtentacle.cpp | 5 ++- src/Enemy/graph.cpp | 7 --- src/MSound/MSModBgm.cpp | 5 --- src/Map/MapEventMare.cpp | 2 +- src/MarioUtil/MathUtil.cpp | 4 -- src/NPC/NpcInitData.cpp | 3 -- src/NPC/NpcSound.cpp | 3 -- src/System/CardManager.cpp | 4 -- tools/project.py | 4 +- 14 files changed, 79 insertions(+), 50 deletions(-) create mode 100644 include/SMS.pch diff --git a/configure.py b/configure.py index a025faa7c..7651f7c7d 100644 --- a/configure.py +++ b/configure.py @@ -306,11 +306,18 @@ def MatchingFor(*versions): config.warn_missing_config = True config.warn_missing_source = False +config.precompiled_headers = [ + { + "source": "SMS.pch", + "mw_version": "GC/1.2.5", + "cflags": ["-lang=c++", *cflags_game], + }, +] config.libs = [ { "lib": "main", "mw_version": "GC/1.2.5", - "cflags": cflags_game, + "cflags": [*cflags_game, "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(Matching, "main.cpp"), @@ -768,7 +775,7 @@ def MatchingFor(*versions): { "lib": "THPPlayer", "mw_version": "GC/1.2.5", - "cflags": [*cflags_base, "-O4,p", "-inline auto", "-fp_contract on", "-str reuse,readonly", "-lang=c++", "-inline deferred"], + "cflags": [*cflags_base, "-O4,p", "-inline auto", "-fp_contract on", "-str reuse,readonly", "-lang=c++", "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "THPPlayer/THPAudioDecode.c"), @@ -781,7 +788,7 @@ def MatchingFor(*versions): { "lib": "MarioUtil", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred ", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred ", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(Matching, "MarioUtil/DLUtil.cpp"), @@ -791,11 +798,31 @@ def MatchingFor(*versions): Object(NonMatching, "MarioUtil/MtxUtil.cpp"), Object(NonMatching, "MarioUtil/ScreenUtil.cpp"), Object(NonMatching, "MarioUtil/ShadowUtil.cpp"), - Object(Matching, "MarioUtil/gd-reinit-gx.cpp"), + # Retail gd-reinit-gx does not contain the weak literals emitted by + # SMS.mch, so it was compiled without the game PCH. + Object( + Matching, + "MarioUtil/gd-reinit-gx.cpp", + cflags=[ + *cflags_game, + "-inline deferred ", + "-opt all,nostrength", + ], + ), Object(NonMatching, "MarioUtil/EffectUtil.cpp"), Object(NonMatching, "MarioUtil/ModelUtil.cpp"), Object(Matching, "MarioUtil/RumbleMgr.cpp"), - Object(Matching, "MarioUtil/RumbleData.cpp"), + # Retail RumbleData does not contain the weak literals emitted by + # SMS.mch, so it was compiled without the game PCH. + Object( + Matching, + "MarioUtil/RumbleData.cpp", + cflags=[ + *cflags_game, + "-inline deferred ", + "-opt all,nostrength", + ], + ), Object(Matching, "MarioUtil/RumbleType.cpp"), Object(NonMatching, "MarioUtil/PacketUtil.cpp"), Object(Matching, "MarioUtil/GDUtil.cpp"), @@ -807,7 +834,7 @@ def MatchingFor(*versions): { "lib": "M3DUtil", "mw_version": "GC/1.2.5", - "cflags": [*cflags_system, "-inline deferred"], + "cflags": [*cflags_system, "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "M3DUtil/M3UJoint.cpp"), @@ -826,7 +853,7 @@ def MatchingFor(*versions): { "lib": "System", "mw_version": "GC/1.2.5", - "cflags": [*cflags_system, "-inline deferred"], + "cflags": [*cflags_system, "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(Matching, "System/BaseParam.cpp"), @@ -880,7 +907,7 @@ def MatchingFor(*versions): { "lib": "Strategic", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "Strategic/liveactor.cpp"), @@ -889,7 +916,17 @@ def MatchingFor(*versions): Object(NonMatching, "Strategic/ObjHitCheck.cpp"), Object(NonMatching, "Strategic/objmanager.cpp"), Object(NonMatching, "Strategic/ObjModel.cpp"), - Object(NonMatching, "Strategic/spcinterp.cpp"), + # Retail spcinterp does not contain the weak literals emitted by + # SMS.mch, so it was compiled without the game PCH. + Object( + NonMatching, + "Strategic/spcinterp.cpp", + cflags=[ + *cflags_game, + "-inline deferred", + "-opt all,nostrength", + ], + ), Object(NonMatching, "Strategic/Strategy.cpp"), Object(NonMatching, "Strategic/question.cpp"), Object(Matching, "Strategic/smplcharacter.cpp"), @@ -902,7 +939,7 @@ def MatchingFor(*versions): { "lib": "Player", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(Matching, "Player/Atom.cpp"), @@ -940,7 +977,7 @@ def MatchingFor(*versions): { "lib": "NPC", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "NPC/NpcAnm.cpp"), @@ -972,7 +1009,7 @@ def MatchingFor(*versions): { "lib": "MSound", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "MSound/MAnmSound.cpp"), @@ -989,7 +1026,7 @@ def MatchingFor(*versions): { "lib": "MoveBG", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred"], + "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "MoveBG/WoodBarrel.cpp"), @@ -1039,7 +1076,7 @@ def MatchingFor(*versions): { "lib": "Map", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred"], + "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(Matching, "Map/JointModel.cpp"), @@ -1085,7 +1122,7 @@ def MatchingFor(*versions): { "lib": "GC2D", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred"], + "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(Matching, "GC2D/ChangeValue.cpp"), @@ -1120,7 +1157,7 @@ def MatchingFor(*versions): { "lib": "Enemy", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred"], + "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "Enemy/conductor.cpp"), @@ -1212,7 +1249,7 @@ def MatchingFor(*versions): { "lib": "Camera", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "Camera/CameraBGCheck.cpp"), @@ -1250,7 +1287,7 @@ def MatchingFor(*versions): { "lib": "Animal", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength"], + "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], "progress_category": "game", "objects": [ Object(NonMatching, "Animal/boid.cpp"), diff --git a/include/Enemy/CoasterKiller.hpp b/include/Enemy/CoasterKiller.hpp index 9145522fa..f54cf19ed 100644 --- a/include/Enemy/CoasterKiller.hpp +++ b/include/Enemy/CoasterKiller.hpp @@ -40,7 +40,7 @@ class TCoasterEnemy : public TWalkerEnemy { public: TCoasterEnemy(const char* name) : TWalkerEnemy(name) - , mPathIdx(0) { }; + , mPathDir(0) { }; virtual ~TCoasterEnemy() { } virtual void calcRootMatrix(); diff --git a/include/MarioUtil/ShadowUtil.hpp b/include/MarioUtil/ShadowUtil.hpp index 26ea10327..62f49817e 100644 --- a/include/MarioUtil/ShadowUtil.hpp +++ b/include/MarioUtil/ShadowUtil.hpp @@ -39,6 +39,9 @@ class TMBindShadowBody { bool isBodyJoint(int); void entryDrawShadow(); void calc(); + +private: + /* 0x0 */ u8 unk0[0x1C]; }; class TAlphaShadowQuad; diff --git a/include/SMS.pch b/include/SMS.pch new file mode 100644 index 000000000..9f0dc4c9f --- /dev/null +++ b/include/SMS.pch @@ -0,0 +1,12 @@ +#ifndef SMS_PCH +#define SMS_PCH + +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/src/Enemy/Kumokun.cpp b/src/Enemy/Kumokun.cpp index 597f124d0..9c0877029 100644 --- a/src/Enemy/Kumokun.cpp +++ b/src/Enemy/Kumokun.cpp @@ -1029,7 +1029,7 @@ void TKumokunManager::load(JSUMemoryInputStream& stream) unk38 = params; params->mSLAttackRadius.set(60); - params->mSLAttackRadius.set(50); + params->mSLAttackHeight.set(50); params->mSLDamageRadius.set(60); params->mSLDamageHeight.set(70); TSmallEnemyManager::load(stream); diff --git a/src/Enemy/bgtentacle.cpp b/src/Enemy/bgtentacle.cpp index 37f08681e..88c4564dc 100644 --- a/src/Enemy/bgtentacle.cpp +++ b/src/Enemy/bgtentacle.cpp @@ -1331,7 +1331,10 @@ void TBGTentacle::calcAttackGuideAnm() void TBGTentacle::resetAllNodes(const JGeometry::TVec3& param_1) { JGeometry::TVec3 local_78 = param_1; - JGeometry::TVec3 zero(0.0f, 0.0f, 0.0f); + JGeometry::TVec3 zero; + zero.z = 0.0f; + zero.y = 0.0f; + zero.x = 0.0f; getFirstNode()->onUnk24(); diff --git a/src/Enemy/graph.cpp b/src/Enemy/graph.cpp index 5a0ca3b73..d57435f20 100644 --- a/src/Enemy/graph.cpp +++ b/src/Enemy/graph.cpp @@ -7,13 +7,6 @@ #include #include -static void dummy(Vec* v) -{ - static Vec v1 = { 1.0f, 1.0f, 1.0f }; - static Vec v2 = { 1.0f, 1.0f, 1.0f }; - static int a[] = { 0, 2, 1, 3 }; -} - // rogue include #include diff --git a/src/MSound/MSModBgm.cpp b/src/MSound/MSModBgm.cpp index 840306e77..1c432dd28 100644 --- a/src/MSound/MSModBgm.cpp +++ b/src/MSound/MSModBgm.cpp @@ -5,11 +5,6 @@ #include #include -// TODO: this is from the PCH -static Vec dummy1 = { 1.0f, 1.0f, 1.0f }; -static Vec dummy2 = { 1.0f, 1.0f, 1.0f }; -static u32 dummy3[] = { 0, 2, 1, 3 }; - JAISound* MSModBgm::modBgm(u8 param_1, u8 param_2) { switch (param_1) { diff --git a/src/Map/MapEventMare.cpp b/src/Map/MapEventMare.cpp index ae6f2551e..dcf2682b6 100644 --- a/src/Map/MapEventMare.cpp +++ b/src/Map/MapEventMare.cpp @@ -47,7 +47,7 @@ void TMareWallRock::appear() (void)0; unk10C[0]->setUp(); - unk104->alive(); + unk104->awake(); JGeometry::TVec3 t(0.0f, 0.0f, unkFC); unk10C[0]->moveTrans(t); f32 rotY = unk128; diff --git a/src/MarioUtil/MathUtil.cpp b/src/MarioUtil/MathUtil.cpp index 8db84dad0..f0ab4c96d 100644 --- a/src/MarioUtil/MathUtil.cpp +++ b/src/MarioUtil/MathUtil.cpp @@ -1,10 +1,6 @@ #include #include -static Vec dummy1 = { 1.0f, 1.0f, 1.0f }; -static Vec dummy2 = { 1.0f, 1.0f, 1.0f }; -static int dummy3[] = { 0, 2, 1, 3 }; - static u16 atntable[] = { 0, 10, 20, 31, 41, 51, 61, 71, 81, 92, 102, 112, 122, 132, 143, 153, 163, 173, 183, 194, 204, 214, 224, 234, diff --git a/src/NPC/NpcInitData.cpp b/src/NPC/NpcInitData.cpp index 3fcfad138..1ccf38d42 100644 --- a/src/NPC/NpcInitData.cpp +++ b/src/NPC/NpcInitData.cpp @@ -2,9 +2,6 @@ #include // pch issues -static f32 dummy0[3] = { 1.0f, 1.0f, 1.0f }; -static f32 dummy1[3] = { 1.0f, 1.0f, 1.0f }; -static u32 dummy2[4] = { 0, 2, 1, 3 }; static const char dummy3[] = "\0\0\0\0\0\0\0\0\0\0\0"; static const char dummy4[] = "メモリが足りません\n"; static const char dummy5[] = "__ROOT_JOINT__"; diff --git a/src/NPC/NpcSound.cpp b/src/NPC/NpcSound.cpp index 88ad1d248..f07446d58 100644 --- a/src/NPC/NpcSound.cpp +++ b/src/NPC/NpcSound.cpp @@ -1,9 +1,6 @@ #include // pch issues with J3DJoint and co -static Vec dummy0 = { 1.0f, 1.0f, 1.0f }; -static Vec dummy1 = { 1.0f, 1.0f, 1.0f }; -static u32 dummy2[] = { 0, 2, 1, 3 }; static const char dummy3[] = "\0\0\0\0\0\0\0\0\0\0\0"; static const char dummy4[] = "メモリが足りません\n"; static const char* MtxCalcTypeName[] = { diff --git a/src/System/CardManager.cpp b/src/System/CardManager.cpp index ca19c8edb..cfdf94cf0 100644 --- a/src/System/CardManager.cpp +++ b/src/System/CardManager.cpp @@ -5,10 +5,6 @@ #include #include -f32 dummy[] = { 1.0f, 1.0f, 1.0f }; -f32 dummy2[] = { 1.0f, 1.0f, 1.0f }; -u32 dummy3[] = { 0, 2, 1, 3 }; - static u8 sDetach[2]; const char CardFileName[0x20] = "super_mario_sunshine\0\0\0\0\0\0\0\0\0\0\0"; diff --git a/tools/project.py b/tools/project.py index 090613806..c36a335f6 100644 --- a/tools/project.py +++ b/tools/project.py @@ -664,11 +664,11 @@ def write_cargo_rule(): mwcc_sjis_implicit: List[Optional[Path]] = [*mwcc_implicit, sjiswrap] # MWCC for precompiled headers - mwcc_pch_cmd = f"{wrapper_cmd}{mwcc} $cflags -MMD -c $in -o $basedir -precompile $basefilestem.mch" + mwcc_pch_cmd = f'{wrapper_cmd}{mwcc} $cflags -MMD -c $in -o "$basedir" -precompile $basefilestem.mch' mwcc_pch_implicit: List[Optional[Path]] = [*mwcc_implicit] # MWCC for precompiled headers with UTF-8 to Shift JIS wrapper - mwcc_pch_sjis_cmd = f"{wrapper_cmd}{sjiswrap} {mwcc} $cflags -MMD -c $in -o $basedir -precompile $basefilestem.mch" + mwcc_pch_sjis_cmd = f'{wrapper_cmd}{sjiswrap} {mwcc} $cflags -MMD -c $in -o "$basedir" -precompile $basefilestem.mch' mwcc_pch_sjis_implicit: List[Optional[Path]] = [*mwcc_implicit, sjiswrap] # MWCC with extab post-processing From 9b9140b3149bb8d83e9673220f1424652a219f65 Mon Sep 17 00:00:00 2001 From: KakarotCake <61133727+KakarottoCake@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:35:08 -0400 Subject: [PATCH 2/2] Selectively apply the game PCH --- configure.py | 163 ++++++++++++++++++++++----------------------------- 1 file changed, 69 insertions(+), 94 deletions(-) diff --git a/configure.py b/configure.py index 7651f7c7d..a49523867 100644 --- a/configure.py +++ b/configure.py @@ -249,7 +249,7 @@ "-func_align 32", ] -cflags_game = [ +cflags_game_base = [ *cflags_base, "-O4,p", "-inline auto", @@ -257,10 +257,10 @@ "-str reuse,readonly", ] -cflags_system = [ - *cflags_game, - "-inline auto", +cflags_game = [ + *cflags_game_base, "-opt all,nostrength", + "-inline deferred", ] cflags_dolphin = [ @@ -304,20 +304,25 @@ def MatchingFor(*versions): return config.version in versions +# The retail build applied the game PCH to a specific subset of translation units. +def PCHObject(completed: bool, name: str) -> Object: + return Object(completed, name, extra_cflags=["-prefix SMS.mch"]) + + config.warn_missing_config = True config.warn_missing_source = False config.precompiled_headers = [ { "source": "SMS.pch", "mw_version": "GC/1.2.5", - "cflags": ["-lang=c++", *cflags_game], + "cflags": ["-lang=c++", *cflags_game_base], }, ] config.libs = [ { "lib": "main", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(Matching, "main.cpp"), @@ -775,7 +780,7 @@ def MatchingFor(*versions): { "lib": "THPPlayer", "mw_version": "GC/1.2.5", - "cflags": [*cflags_base, "-O4,p", "-inline auto", "-fp_contract on", "-str reuse,readonly", "-lang=c++", "-inline deferred", "-prefix SMS.mch"], + "cflags": [*cflags_base, "-O4,p", "-inline auto", "-fp_contract on", "-str reuse,readonly", "-lang=c++", "-inline deferred"], "progress_category": "game", "objects": [ Object(NonMatching, "THPPlayer/THPAudioDecode.c"), @@ -788,41 +793,21 @@ def MatchingFor(*versions): { "lib": "MarioUtil", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred ", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(Matching, "MarioUtil/DLUtil.cpp"), Object(NonMatching, "MarioUtil/DrawUtil.cpp"), Object(NonMatching, "MarioUtil/LightUtil.cpp"), - Object(NonMatching, "MarioUtil/MathUtil.cpp"), + PCHObject(NonMatching, "MarioUtil/MathUtil.cpp"), Object(NonMatching, "MarioUtil/MtxUtil.cpp"), Object(NonMatching, "MarioUtil/ScreenUtil.cpp"), Object(NonMatching, "MarioUtil/ShadowUtil.cpp"), - # Retail gd-reinit-gx does not contain the weak literals emitted by - # SMS.mch, so it was compiled without the game PCH. - Object( - Matching, - "MarioUtil/gd-reinit-gx.cpp", - cflags=[ - *cflags_game, - "-inline deferred ", - "-opt all,nostrength", - ], - ), + Object(Matching, "MarioUtil/gd-reinit-gx.cpp"), Object(NonMatching, "MarioUtil/EffectUtil.cpp"), Object(NonMatching, "MarioUtil/ModelUtil.cpp"), Object(Matching, "MarioUtil/RumbleMgr.cpp"), - # Retail RumbleData does not contain the weak literals emitted by - # SMS.mch, so it was compiled without the game PCH. - Object( - Matching, - "MarioUtil/RumbleData.cpp", - cflags=[ - *cflags_game, - "-inline deferred ", - "-opt all,nostrength", - ], - ), + Object(Matching, "MarioUtil/RumbleData.cpp"), Object(Matching, "MarioUtil/RumbleType.cpp"), Object(NonMatching, "MarioUtil/PacketUtil.cpp"), Object(Matching, "MarioUtil/GDUtil.cpp"), @@ -834,17 +819,17 @@ def MatchingFor(*versions): { "lib": "M3DUtil", "mw_version": "GC/1.2.5", - "cflags": [*cflags_system, "-inline deferred", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ - Object(NonMatching, "M3DUtil/M3UJoint.cpp"), + PCHObject(NonMatching, "M3DUtil/M3UJoint.cpp"), Object(NonMatching, "M3DUtil/M3UModel.cpp"), Object(NonMatching, "M3DUtil/MActor.cpp"), Object(NonMatching, "M3DUtil/MActorAnm.cpp"), Object(NonMatching, "M3DUtil/MActorData.cpp"), Object(NonMatching, "M3DUtil/SDLModel.cpp"), - Object(NonMatching, "M3DUtil/MActorUtil.cpp", flags=cflags_system), - Object(NonMatching, "M3DUtil/SampleCtrlNode.cpp"), + Object(NonMatching, "M3DUtil/MActorUtil.cpp"), + PCHObject(NonMatching, "M3DUtil/SampleCtrlNode.cpp"), Object(NonMatching, "M3DUtil/SampleCtrlModel.cpp"), Object(Matching, "M3DUtil/MotionBlendCtrl.cpp"), Object(Matching, "M3DUtil/LodAnm.cpp"), @@ -853,11 +838,11 @@ def MatchingFor(*versions): { "lib": "System", "mw_version": "GC/1.2.5", - "cflags": [*cflags_system, "-inline deferred", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(Matching, "System/BaseParam.cpp"), - Object(NonMatching, "System/EmitterViewObj.cpp"), + PCHObject(NonMatching, "System/EmitterViewObj.cpp"), Object(NonMatching, "System/EventWatcher.cpp"), Object(NonMatching, "System/FlagManager.cpp"), Object(NonMatching, "System/GCLogoDir.cpp"), @@ -874,7 +859,7 @@ def MatchingFor(*versions): Object(Matching, "System/Params.cpp"), Object(Matching, "System/ParamInst.cpp"), Object(NonMatching, "System/PerformList.cpp"), - Object(NonMatching, "System/RenderModeObj.cpp"), + PCHObject(NonMatching, "System/RenderModeObj.cpp"), Object(NonMatching, "System/SnapTimeObj.cpp"), Object(NonMatching, "System/TalkCursor.cpp"), Object(Matching, "System/TexCache.cpp"), @@ -890,12 +875,12 @@ def MatchingFor(*versions): Object(NonMatching, "System/TimeRec.cpp"), Object(NonMatching, "System/DrawSyncManager.cpp"), Object(Matching, "System/THPRender.cpp"), - Object(NonMatching, "System/MarNameRefGen_BossEnemy.cpp"), + PCHObject(NonMatching, "System/MarNameRefGen_BossEnemy.cpp"), Object(NonMatching, "System/MarNameRefGen_Enemy.cpp"), Object(NonMatching, "System/MarNameRefGen_Map.cpp"), Object(NonMatching, "System/MarNameRefGen_MapObj.cpp"), Object(NonMatching, "System/MarNameRefGen_NPC.cpp"), - Object(NonMatching, "System/CardManager.cpp"), + PCHObject(NonMatching, "System/CardManager.cpp"), Object(NonMatching, "System/MarDirectorLoadResource.cpp"), Object(NonMatching, "System/MovieDirector.cpp"), Object(Matching, "System/MarDirectorCreateObjects.cpp"), @@ -907,26 +892,16 @@ def MatchingFor(*versions): { "lib": "Strategic", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "Strategic/liveactor.cpp"), - Object(NonMatching, "Strategic/liveinterp.cpp"), + PCHObject(NonMatching, "Strategic/liveinterp.cpp"), Object(NonMatching, "Strategic/livemanager.cpp"), Object(NonMatching, "Strategic/ObjHitCheck.cpp"), Object(NonMatching, "Strategic/objmanager.cpp"), Object(NonMatching, "Strategic/ObjModel.cpp"), - # Retail spcinterp does not contain the weak literals emitted by - # SMS.mch, so it was compiled without the game PCH. - Object( - NonMatching, - "Strategic/spcinterp.cpp", - cflags=[ - *cflags_game, - "-inline deferred", - "-opt all,nostrength", - ], - ), + Object(NonMatching, "Strategic/spcinterp.cpp"), Object(NonMatching, "Strategic/Strategy.cpp"), Object(NonMatching, "Strategic/question.cpp"), Object(Matching, "Strategic/smplcharacter.cpp"), @@ -939,7 +914,7 @@ def MatchingFor(*versions): { "lib": "Player", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(Matching, "Player/Atom.cpp"), @@ -948,26 +923,26 @@ def MatchingFor(*versions): Object(NonMatching, "Player/MarioBlend.cpp"), Object(NonMatching, "Player/MarioCap.cpp"), Object(NonMatching, "Player/MarioCollision.cpp"), - Object(NonMatching, "Player/MarioDraw.cpp"), + PCHObject(NonMatching, "Player/MarioDraw.cpp"), Object(NonMatching, "Player/MarioJump.cpp"), Object(NonMatching, "Player/MarioMain.cpp"), Object(NonMatching, "Player/MarioMove.cpp"), Object(NonMatching, "Player/MarioPhysics.cpp"), Object(Matching, "Player/MarioRecord.cpp"), - Object(NonMatching, "Player/MarioRun.cpp"), + PCHObject(NonMatching, "Player/MarioRun.cpp"), Object(NonMatching, "Player/MarioSpecial.cpp"), Object(NonMatching, "Player/MarioUpper.cpp"), - Object(NonMatching, "Player/MarioParticle.cpp"), + PCHObject(NonMatching, "Player/MarioParticle.cpp"), Object(NonMatching, "Player/MarioWait.cpp"), Object(NonMatching, "Player/SplashManager.cpp"), Object(NonMatching, "Player/Tongue.cpp"), Object(NonMatching, "Player/WaterGun.cpp"), - Object(NonMatching, "Player/Yoshi.cpp"), + PCHObject(NonMatching, "Player/Yoshi.cpp"), Object(NonMatching, "Player/MarioEffect.cpp"), Object(NonMatching, "Player/MarioSwim.cpp"), Object(NonMatching, "Player/MarioAccess.cpp"), - Object(NonMatching, "Player/MarioInit.cpp"), - Object(NonMatching, "Player/ModelWaterManager.cpp"), + PCHObject(NonMatching, "Player/MarioInit.cpp"), + PCHObject(NonMatching, "Player/ModelWaterManager.cpp"), Object(Matching, "Player/MarioPositionObj.cpp"), Object(NonMatching, "Player/MarioCheckCol.cpp"), Object(NonMatching, "Player/MarioReceiveMsg.cpp"), @@ -977,7 +952,7 @@ def MatchingFor(*versions): { "lib": "NPC", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "NPC/NpcAnm.cpp"), @@ -987,12 +962,12 @@ def MatchingFor(*versions): Object(NonMatching, "NPC/NpcNerve.cpp"), Object(Matching, "NPC/NpcSave.cpp"), Object(NonMatching, "NPC/NpcEvent.cpp"), - Object(Matching, "NPC/NpcInitData.cpp"), + PCHObject(Matching, "NPC/NpcInitData.cpp"), Object(NonMatching, "NPC/NpcInitPrg.cpp"), Object(NonMatching, "NPC/NpcInbetween.cpp"), Object(NonMatching, "NPC/NpcParts.cpp"), Object(NonMatching, "NPC/NpcColor.cpp"), - Object(Matching, "NPC/NpcSound.cpp"), + PCHObject(Matching, "NPC/NpcSound.cpp"), Object(NonMatching, "NPC/NpcChange.cpp"), Object(NonMatching, "NPC/NpcThrow.cpp"), Object(Matching, "NPC/NpcTrample.cpp"), @@ -1009,7 +984,7 @@ def MatchingFor(*versions): { "lib": "MSound", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "MSound/MAnmSound.cpp"), @@ -1019,14 +994,14 @@ def MatchingFor(*versions): Object(NonMatching, "MSound/MSoundScene.cpp"), Object(NonMatching, "MSound/MSoundSE.cpp"), Object(NonMatching, "MSound/MSoundStruct.cpp"), - Object(NonMatching, "MSound/MSHandle.cpp"), - Object(NonMatching, "MSound/MSModBgm.cpp"), + PCHObject(NonMatching, "MSound/MSHandle.cpp"), + PCHObject(NonMatching, "MSound/MSModBgm.cpp"), ], }, { "lib": "MoveBG", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "MoveBG/WoodBarrel.cpp"), @@ -1035,12 +1010,12 @@ def MatchingFor(*versions): Object(NonMatching, "MoveBG/MapObjGeneral.cpp"), Object(NonMatching, "MoveBG/MapObjManager.cpp"), Object(NonMatching, "MoveBG/MapObjLib.cpp"), - Object(NonMatching, "MoveBG/Item.cpp"), + PCHObject(NonMatching, "MoveBG/Item.cpp"), Object(NonMatching, "MoveBG/ItemManager.cpp"), Object(NonMatching, "MoveBG/MapObjTown.cpp"), Object(NonMatching, "MoveBG/MapObjBlock.cpp"), Object(NonMatching, "MoveBG/MapObjBianco.cpp"), - Object(NonMatching, "MoveBG/MapObjSirena.cpp"), + PCHObject(NonMatching, "MoveBG/MapObjSirena.cpp"), Object(NonMatching, "MoveBG/MapObjRicco.cpp"), Object(NonMatching, "MoveBG/MapObjMamma.cpp"), Object(NonMatching, "MoveBG/MapObjPinna.cpp"), @@ -1058,7 +1033,7 @@ def MatchingFor(*versions): Object(NonMatching, "MoveBG/MapObjGrass.cpp"), Object(Matching, "MoveBG/MapObjPole.cpp"), Object(NonMatching, "MoveBG/MapObjWater.cpp"), - Object(NonMatching, "MoveBG/ModelGate.cpp"), + PCHObject(NonMatching, "MoveBG/ModelGate.cpp"), Object(NonMatching, "MoveBG/MapObjFence.cpp"), Object(NonMatching, "MoveBG/MapObjOption.cpp"), Object(NonMatching, "MoveBG/MapObjRailBlock.cpp"), @@ -1076,7 +1051,7 @@ def MatchingFor(*versions): { "lib": "Map", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(Matching, "Map/JointModel.cpp"), @@ -1090,7 +1065,7 @@ def MatchingFor(*versions): Object(Matching, "Map/MapCollisionManager.cpp"), Object(Matching, "Map/MapDraw.cpp"), Object(Matching, "Map/MapEvent.cpp"), - Object(NonMatching, "Map/MapEventSink.cpp"), + PCHObject(NonMatching, "Map/MapEventSink.cpp"), Object(NonMatching, "Map/MapMakeData.cpp"), Object(NonMatching, "Map/MapMakeList.cpp"), Object(NonMatching, "Map/MapMirror.cpp"), @@ -1113,7 +1088,7 @@ def MatchingFor(*versions): Object(NonMatching, "Map/MapCollisionPlane.cpp"), Object(Matching, "Map/MarineSnow.cpp"), Object(Matching, "Map/MapData.cpp"), - Object(NonMatching, "Map/MapEventDolpic.cpp"), + PCHObject(NonMatching, "Map/MapEventDolpic.cpp"), Object(NonMatching, "Map/MapEventMare.cpp"), Object(NonMatching, "Map/BathWaterManager.cpp"), Object(Matching, "Map/StickyStainManager.cpp"), @@ -1122,7 +1097,7 @@ def MatchingFor(*versions): { "lib": "GC2D", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(Matching, "GC2D/ChangeValue.cpp"), @@ -1130,7 +1105,7 @@ def MatchingFor(*versions): Object(Matching, "GC2D/ExPane.cpp"), Object(NonMatching, "GC2D/Menu.cpp"), Object(NonMatching, "GC2D/ScrnFader.cpp"), - Object(NonMatching, "GC2D/GCConsole2.cpp"), + PCHObject(NonMatching, "GC2D/GCConsole2.cpp"), Object(NonMatching, "GC2D/Talk2D2.cpp"), Object(NonMatching, "GC2D/BoundPane.cpp"), Object(NonMatching, "GC2D/PauseMenu2.cpp"), @@ -1140,7 +1115,7 @@ def MatchingFor(*versions): Object(NonMatching, "GC2D/CardSave.cpp"), Object(NonMatching, "GC2D/CardLoad.cpp"), Object(NonMatching, "GC2D/ConsoleStr.cpp"), - Object(NonMatching, "GC2D/SelectMenu.cpp"), + PCHObject(NonMatching, "GC2D/SelectMenu.cpp"), Object(NonMatching, "GC2D/SelectDir.cpp"), Object(NonMatching, "GC2D/SelectShine2.cpp"), Object(NonMatching, "GC2D/BlendPane.cpp"), @@ -1150,14 +1125,14 @@ def MatchingFor(*versions): Object(NonMatching, "GC2D/ProgSelect.cpp"), Object(NonMatching, "GC2D/hx_wiper.c"), Object(NonMatching, "GC2D/MovieSubtitle.cpp"), - Object(NonMatching, "GC2D/Option.cpp"), + PCHObject(NonMatching, "GC2D/Option.cpp"), Object(NonMatching, "GC2D/MovieRumble.cpp"), ], }, { "lib": "Enemy", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-opt all,nostrength", "-inline deferred", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "Enemy/conductor.cpp"), @@ -1166,14 +1141,14 @@ def MatchingFor(*versions): Object(NonMatching, "Enemy/enemy.cpp"), Object(NonMatching, "Enemy/enemyAttachment.cpp"), Object(NonMatching, "Enemy/enemymanager.cpp"), - Object(NonMatching, "Enemy/enemyMario.cpp"), - Object(NonMatching, "Enemy/feetinv.cpp"), - Object(NonMatching, "Enemy/gesso.cpp"), - Object(NonMatching, "Enemy/graph.cpp"), + PCHObject(NonMatching, "Enemy/enemyMario.cpp"), + PCHObject(NonMatching, "Enemy/feetinv.cpp"), + PCHObject(NonMatching, "Enemy/gesso.cpp"), + PCHObject(NonMatching, "Enemy/graph.cpp"), Object(NonMatching, "Enemy/hamukuri.cpp"), - Object(NonMatching, "Enemy/hinokuri2.cpp"), + PCHObject(NonMatching, "Enemy/hinokuri2.cpp"), Object(NonMatching, "Enemy/mameGesso.cpp"), - Object(NonMatching, "Enemy/namekuri.cpp"), + PCHObject(NonMatching, "Enemy/namekuri.cpp"), Object(NonMatching, "Enemy/pakkun.cpp"), Object(NonMatching, "Enemy/smallEnemy.cpp"), Object(NonMatching, "Enemy/spider.cpp"), @@ -1181,7 +1156,7 @@ def MatchingFor(*versions): Object(Matching, "Enemy/typicalenemy.cpp"), Object(NonMatching, "Enemy/walker.cpp"), Object(NonMatching, "Enemy/walkerEnemy.cpp"), - Object(NonMatching, "Enemy/bossgesso.cpp"), + PCHObject(NonMatching, "Enemy/bossgesso.cpp"), Object(NonMatching, "Enemy/elecNokonoko.cpp"), Object(NonMatching, "Enemy/telesa.cpp"), Object(NonMatching, "Enemy/fireWanwan.cpp"), @@ -1189,19 +1164,19 @@ def MatchingFor(*versions): Object(NonMatching, "Enemy/generator.cpp"), Object(NonMatching, "Enemy/bosspakkun.cpp"), Object(NonMatching, "Enemy/tobiPuku.cpp"), - Object(NonMatching, "Enemy/tinkoopa.cpp"), + PCHObject(NonMatching, "Enemy/tinkoopa.cpp"), Object(NonMatching, "Enemy/launcher.cpp"), - Object(NonMatching, "Enemy/bosswanwan.cpp"), + PCHObject(NonMatching, "Enemy/bosswanwan.cpp"), Object(NonMatching, "Enemy/chuuhana.cpp"), Object(NonMatching, "Enemy/igaiga.cpp"), Object(NonMatching, "Enemy/poihana.cpp"), Object(NonMatching, "Enemy/tamaNoko.cpp"), Object(NonMatching, "Enemy/bosstelesa.cpp"), Object(NonMatching, "Enemy/riccohook.cpp"), - Object(NonMatching, "Enemy/bombhei.cpp"), + PCHObject(NonMatching, "Enemy/bombhei.cpp"), Object(NonMatching, "Enemy/cannon.cpp"), - Object(NonMatching, "Enemy/bosseel.cpp"), - Object(NonMatching, "Enemy/killer.cpp"), + PCHObject(NonMatching, "Enemy/bosseel.cpp"), + PCHObject(NonMatching, "Enemy/killer.cpp"), Object(NonMatching, "Enemy/beam.cpp"), Object(NonMatching, "Enemy/hanasambo.cpp"), Object(NonMatching, "Enemy/popo.cpp"), @@ -1215,12 +1190,12 @@ def MatchingFor(*versions): Object(NonMatching, "Enemy/BossHanachanParts.cpp"), Object(NonMatching, "Enemy/BossHanachanSave.cpp"), Object(NonMatching, "Enemy/amiNoko.cpp"), - Object(NonMatching, "Enemy/gatekeeper.cpp"), + PCHObject(NonMatching, "Enemy/gatekeeper.cpp"), Object(NonMatching, "Enemy/BossHanachanEffect.cpp"), Object(NonMatching, "Enemy/egggen.cpp"), Object(NonMatching, "Enemy/seal.cpp"), Object(NonMatching, "Enemy/bgpoldrop.cpp"), - Object(NonMatching, "Enemy/bgtentacle.cpp"), + PCHObject(NonMatching, "Enemy/bgtentacle.cpp"), Object(NonMatching, "Enemy/effectEnemy.cpp"), Object(NonMatching, "Enemy/hauntLeg.cpp"), Object(NonMatching, "Enemy/areacylinder.cpp"), @@ -1249,7 +1224,7 @@ def MatchingFor(*versions): { "lib": "Camera", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "Camera/CameraBGCheck.cpp"), @@ -1287,7 +1262,7 @@ def MatchingFor(*versions): { "lib": "Animal", "mw_version": "GC/1.2.5", - "cflags": [*cflags_game, "-inline deferred", "-opt all,nostrength", "-prefix SMS.mch"], + "cflags": cflags_game, "progress_category": "game", "objects": [ Object(NonMatching, "Animal/boid.cpp"),