diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-27 20:37:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-27 17:37:31 -0700 |
| commit | 956e84b0e7090fde541f25319d0255c45b657b39 (patch) | |
| tree | 2feeca19517a6ae97fcf68fbbe8a0ff401879bb3 /src | |
| parent | e09f037fa3a3e1ddecf4075c7aa0e45d52b5616b (diff) | |
Start linking some TUs on debug and PAL (#2612)
* Fix clang union handling (affects all TUs including d_camera.h)
Union members with non-trivial ctors/dtors is undefined behavior and clangd normally throws a fit and refuses to parse the whole union, but it seems to be possible to ifdef the problematic ctors out for non-mwerks compilers and explicitly tell modern compilers to use the defaults instead. Thanks to encounter for this fix.
* Link all TUs that already match on debug
In order to link TUs for debug, most functions seem to need to have their alignment set to 16 in symbols.txt. There are a few hundred functions that seem to be the exception and break when their alignment is set to 16, but I don't know the reason for this.
* Remove some fakematches (nosyminline/sym off) for weak func order in retail
* Fix clang not knowing that MSL_C++ is C++
* Link more debug TUs
* Fix missing PAL split
* Fix wrong slashes being used in includes
* RZDE01_00: Fix incorrect capitalization in config.yml
* Add RZDE01_00 to configure task
* Revert configure.py to use MatchingFor
* Fix PAL splits and symbols, link matching PAL TUs
Diffstat (limited to 'src')
| -rw-r--r-- | src/JSystem/JFramework/JFWSystem.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/JStage/JSGCamera.cpp | 5 | ||||
| -rw-r--r-- | src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h | 11 | ||||
| -rw-r--r-- | src/SSystem/SComponent/c_angle.cpp | 6 | ||||
| -rw-r--r-- | src/Z2AudioLib/Z2LinkMgr.cpp | 2 | ||||
| -rw-r--r-- | src/d/actor/d_a_obj_sakuita_rope.cpp | 2 | ||||
| -rw-r--r-- | src/d/actor/d_a_obj_tobyhouse.cpp | 2 | ||||
| -rw-r--r-- | src/d/d_save.cpp | 44 | ||||
| -rw-r--r-- | src/f_pc/f_pc_debug_sv.cpp | 1 | ||||
| -rw-r--r-- | src/m_Do/m_Do_graphic.cpp | 2 |
10 files changed, 45 insertions, 32 deletions
diff --git a/src/JSystem/JFramework/JFWSystem.cpp b/src/JSystem/JFramework/JFWSystem.cpp index a2e0c225af..bb9008d37f 100644 --- a/src/JSystem/JFramework/JFWSystem.cpp +++ b/src/JSystem/JFramework/JFWSystem.cpp @@ -87,7 +87,7 @@ JUTConsoleManager* JFWSystem::systemConsoleManager; JUTConsole* JFWSystem::systemConsole; /* 804511BC-804511C0 0006BC 0004+00 1/1 0/0 0/0 .sbss None */ -static u8 sInitCalled; +bool JFWSystem::sInitCalled = false; /* 80271D18-80272040 26C658 0328+00 0/0 1/1 0/0 .text init__9JFWSystemFv */ // NONMATCHING - regalloc, equivalent diff --git a/src/JSystem/JStage/JSGCamera.cpp b/src/JSystem/JStage/JSGCamera.cpp index fae6ab2715..ef04b4c52b 100644 --- a/src/JSystem/JStage/JSGCamera.cpp +++ b/src/JSystem/JStage/JSGCamera.cpp @@ -1,5 +1,6 @@ #include "JSystem/JStage/JSGCamera.h" #include "math.h" +#include "limits.h" /* 80280BA0-80280C00 27B4E0 0060+00 0/0 1/1 0/0 .text __dt__Q26JStage7TCameraFv */ JStage::TCamera::~TCamera() {} @@ -31,7 +32,7 @@ void JStage::TCamera::JSGSetProjectionNear(f32) {} /* 80280C20-80280C2C 27B560 000C+00 1/0 0/0 0/0 .text JSGGetProjectionFar__Q26JStage7TCameraCFv */ f32 JStage::TCamera::JSGGetProjectionFar() const { - return FLT_MAX; + return std::numeric_limits<f32>::max(); } /* 80280C2C-80280C30 27B56C 0004+00 1/0 0/0 0/0 .text JSGSetProjectionFar__Q26JStage7TCameraFf */ @@ -104,4 +105,4 @@ f32 JStage::TCamera::JSGGetViewRoll() const { /* 80280C7C-80280C80 27B5BC 0004+00 1/0 0/0 0/0 .text JSGSetViewRoll__Q26JStage7TCameraFf */ -void JStage::TCamera::JSGSetViewRoll(f32) {}
\ No newline at end of file +void JStage::TCamera::JSGSetViewRoll(f32) {} diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h index 55110c724c..b04a57536e 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h @@ -1,6 +1,8 @@ #ifndef _STD_LIMITS_H #define _STD_LIMITS_H +#include "float.h" + #ifdef __cplusplus extern "C" { #endif @@ -97,6 +99,13 @@ public: inline static unsigned long max() { return 0xFFFFFFFF; } }; +template <> +class numeric_limits<float> { +public: + inline static float min(); + inline static float max() { return FLT_MAX; } +}; + } // namespace std #endif -#endif
\ No newline at end of file +#endif diff --git a/src/SSystem/SComponent/c_angle.cpp b/src/SSystem/SComponent/c_angle.cpp index bf2e8af648..f5d2847c12 100644 --- a/src/SSystem/SComponent/c_angle.cpp +++ b/src/SSystem/SComponent/c_angle.cpp @@ -13,10 +13,12 @@ const cSAngle cSAngle::_90(static_cast<s16>(0x4000)); const cSAngle cSAngle::_180(static_cast<s16>(-0x8000)); const cSAngle cSAngle::_270(static_cast<s16>(-0x4000)); +#ifdef __MWERKS__ /* 80270F68-80270F98 0030+00 s=0 e=33 z=2 None .text __ct__7cSAngleFRC7cSAngle */ cSAngle::cSAngle(const cSAngle& angle) { Val(angle); } +#endif /* 80270F98-80270FC8 0030+00 s=14 e=50 z=4 None .text __ct__7cSAngleFs */ cSAngle::cSAngle(s16 angle) { @@ -240,10 +242,12 @@ void cSPolar::Globe(cSGlobe* globe) const { globe->Val(mRadial, 0x4000 - mAngle1.Val(), mAngle2.Val()); } +#ifdef __MWERKS__ /* 802717F0-80271820 0030+00 s=0 e=6 z=0 None .text __ct__7cSGlobeFRC7cSGlobe */ cSGlobe::cSGlobe(const cSGlobe& other) { Val(other); } +#endif /* 80271820-80271850 0030+00 s=0 e=3 z=0 None .text __ct__7cSGlobeFfss */ cSGlobe::cSGlobe(f32 f, s16 s1, s16 s2) { @@ -329,4 +333,4 @@ cXyz cSGlobe::Norm() const { cSGlobe& cSGlobe::Invert() { mRadius = -mRadius; return Formal(); -}
\ No newline at end of file +} diff --git a/src/Z2AudioLib/Z2LinkMgr.cpp b/src/Z2AudioLib/Z2LinkMgr.cpp index a63446a0a8..4980fae402 100644 --- a/src/Z2AudioLib/Z2LinkMgr.cpp +++ b/src/Z2AudioLib/Z2LinkMgr.cpp @@ -4,7 +4,7 @@ // #include "Z2AudioLib/Z2LinkMgr.h" -#include "Z2AudioLib\Z2AudioCS.h" +#include "Z2AudioLib/Z2AudioCS.h" #include "d/d_com_inf_game.h" /* 802C321C-802C3220 2BDB5C 0004+00 0/0 1/1 0/0 .text setLinkGroupInfo__14Z2CreatureLinkFUc */ diff --git a/src/d/actor/d_a_obj_sakuita_rope.cpp b/src/d/actor/d_a_obj_sakuita_rope.cpp index c337ca6d62..3754674003 100644 --- a/src/d/actor/d_a_obj_sakuita_rope.cpp +++ b/src/d/actor/d_a_obj_sakuita_rope.cpp @@ -10,7 +10,7 @@ #include "d/d_path.h" #ifdef DEBUG -#include "d\d_a_obj.h" +#include "d/d_a_obj.h" class daObjItaRope_Hio_c : public JORReflexible { public: diff --git a/src/d/actor/d_a_obj_tobyhouse.cpp b/src/d/actor/d_a_obj_tobyhouse.cpp index a6c7d22c18..2cd8e4ae67 100644 --- a/src/d/actor/d_a_obj_tobyhouse.cpp +++ b/src/d/actor/d_a_obj_tobyhouse.cpp @@ -10,7 +10,7 @@ #include "d/d_bg_w.h" #include "d/d_com_inf_game.h" #include "d/d_bomb.h" -#include "Z2AudioLib\Z2Instances.h" +#include "Z2AudioLib/Z2Instances.h" #ifdef DEBUG daObjTobyHouse_HIO_c l_HIO; diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index 3d493eac60..a212cfa91b 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -1117,6 +1117,28 @@ u32 dSv_player_config_c::checkVibration() const { #endif } +/* 80034684-8003468C 02EFC4 0008+00 1/1 2/2 0/0 .text getSound__19dSv_player_config_cFv + */ +u8 dSv_player_config_c::getSound() { + return mSoundMode; +} + +/* 8003468C-80034694 -00001 0008+00 0/0 0/0 0/0 .text setSound__19dSv_player_config_cFUc + */ +void dSv_player_config_c::setSound(u8 i_mode) { + mSoundMode = i_mode; +} + +/* 80034694-8003469C 02EFD4 0008+00 1/1 1/1 0/0 .text getVibration__19dSv_player_config_cFv */ +u8 dSv_player_config_c::getVibration() { + return mVibration; +} + +/* 8003469C-800346A4 -00001 0008+00 0/0 0/0 0/0 .text setVibration__19dSv_player_config_cFUc */ +void dSv_player_config_c::setVibration(u8 i_status) { + mVibration = i_status; +} + u8 dSv_player_config_c::getPalLanguage() const { #if VERSION == VERSION_GCN_PAL switch (OSGetLanguage()) { @@ -1145,28 +1167,6 @@ u8 dSv_player_config_c::getPalLanguage() const { return 0; } -/* 80034684-8003468C 02EFC4 0008+00 1/1 2/2 0/0 .text getSound__19dSv_player_config_cFv - */ -u8 dSv_player_config_c::getSound() { - return mSoundMode; -} - -/* 8003468C-80034694 -00001 0008+00 0/0 0/0 0/0 .text setSound__19dSv_player_config_cFUc - */ -void dSv_player_config_c::setSound(u8 i_mode) { - mSoundMode = i_mode; -} - -/* 80034694-8003469C 02EFD4 0008+00 1/1 1/1 0/0 .text getVibration__19dSv_player_config_cFv */ -u8 dSv_player_config_c::getVibration() { - return mVibration; -} - -/* 8003469C-800346A4 -00001 0008+00 0/0 0/0 0/0 .text setVibration__19dSv_player_config_cFUc */ -void dSv_player_config_c::setVibration(u8 i_status) { - mVibration = i_status; -} - /* 800346A4-80034750 02EFE4 00AC+00 1/1 0/0 0/0 .text init__12dSv_player_cFv */ void dSv_player_c::init() { mPlayerStatusA.init(); diff --git a/src/f_pc/f_pc_debug_sv.cpp b/src/f_pc/f_pc_debug_sv.cpp index 94250ad66e..ee78360f14 100644 --- a/src/f_pc/f_pc_debug_sv.cpp +++ b/src/f_pc/f_pc_debug_sv.cpp @@ -849,7 +849,6 @@ char* fpcDbSv_getNameString(s16 i_name) { "METER2", "GAMEOVER", "DUMMY", - NULL, }; return namelist[i_name]; diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index 981e264e6a..2c079ee1f6 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -87,7 +87,7 @@ u8 mDoGph_gInf_c::mBlureRate; u8 mDoGph_gInf_c::mFade; -bool data_80450BE7; +bool mDoGph_gInf_c::mAutoForcus; /* 80007E44-80007F90 002784 014C+00 1/1 0/0 0/0 .text create__13mDoGph_gInf_cFv */ void mDoGph_gInf_c::create() { |
