diff --git a/configure.py b/configure.py index 5954815c..2aa8d7ba 100644 --- a/configure.py +++ b/configure.py @@ -623,7 +623,7 @@ config.libs = [ Object(Matching, "system/enc_dummy.c"), Object(Matching, "system/rvl_dec.c"), Object(Matching, "system/RIPL_BoardRecord.c"), - Object(Equivalent, "system/iplSystem.cpp"), + Object(Matching, "system/iplSystem.cpp"), Object(NonMatching, "system/iplController.cpp"), Object(Matching, "system/iplChannelManager.cpp"), Object(Matching, "system/iplChannelScriptManager.cpp"), diff --git a/libs/NW4R/include/nw4r/ut/Color.h b/libs/NW4R/include/nw4r/ut/Color.h index 50f93c50..5b7dd302 100644 --- a/libs/NW4R/include/nw4r/ut/Color.h +++ b/libs/NW4R/include/nw4r/ut/Color.h @@ -59,7 +59,7 @@ namespace nw4r { b = blue; a = alpha; } - } Color; + } ATTRIBUTE_ALIGN(4) Color; } // namespace ut } // namespace nw4r diff --git a/src/system/iplSystem.cpp b/src/system/iplSystem.cpp index 56b6820f..14be104f 100644 --- a/src/system/iplSystem.cpp +++ b/src/system/iplSystem.cpp @@ -39,9 +39,12 @@ extern "C" ipl::System::Arg smArg__Q23ipl6System; extern "C" ipl::snd::System sSystem__Q23ipl3snd; extern "C" void initOnMemory__Q33ipl3snd6SystemFPCvPQ23EGG4HeapUl(); -extern "C" const f32 lbl_81694410; -extern "C" const f64 lbl_81694418; -extern "C" const f32 lbl_81694420; +extern "C" const f32 lbl_81694424; +extern "C" const f32 lbl_81694428; +extern "C" const f32 lbl_8169442C; +extern "C" const f32 lbl_81694430; +extern "C" const f32 lbl_81694434; +extern "C" const f32 lbl_81694438; extern "C" void* m_handle__Q23ipl11TVRCManager; extern "C" void _savegpr_27(); extern "C" void _restgpr_27(); @@ -1136,7 +1139,7 @@ namespace ipl { bl VISetBlack lwz r3, 0xb0(r28) li r0, 1 - lfd f31, lbl_81694418 + lfd f31, lbl_81694424-0xc lis r30, 0x4330 lbz r29, 0x3d(r3) lis r31, sSystem__Q23ipl3snd@ha @@ -1159,7 +1162,7 @@ namespace ipl { bl makeRawData__Q33ipl7utility11JpegDecoderFv warning_run_no_jpeg: lwz r3, 0x74(r28) - lfs f1, lbl_81694410 + lfs f1, lbl_81694424-0x14 lwz r27, 0(r3) stw r30, 8(r1) fmr f2, f1 @@ -1167,7 +1170,7 @@ namespace ipl { fmr f5, f1 lhz r0, 6(r27) stw r3, 0xc(r1) - lfs f6, lbl_81694420 + lfs f6, lbl_81694424-0x4 lfd f0, 8(r1) stw r0, 0x14(r1) fsubs f3, f0, f31 @@ -1359,17 +1362,17 @@ namespace ipl { } void System::getProjectionRect4x3(nw4r::ut::Rect* rect) { - rect->left = -304.0; - rect->right = 304.0; - rect->bottom = 228.0; - rect->top = -228.0; + rect->left = *((volatile const f32*)&lbl_81694424); + rect->right = *((volatile const f32*)&lbl_81694428); + rect->bottom = *((volatile const f32*)&lbl_8169442C); + rect->top = *((volatile const f32*)&lbl_81694430); } void System::getProjectionRect16x9(nw4r::ut::Rect* rect) { - rect->left = -416.0; - rect->right = 416.0; - rect->bottom = 228.0; - rect->top = -228.0; + rect->left = *((volatile const f32*)&lbl_81694434); + rect->right = *((volatile const f32*)&lbl_81694438); + rect->bottom = *((volatile const f32*)&lbl_8169442C); + rect->top = *((volatile const f32*)&lbl_81694430); } GXRenderModeObj* System::getRenderModeObj() { @@ -1510,3 +1513,14 @@ namespace ipl { } } } // namespace ipl + +#ifdef __MWERKS__ +#pragma force_active on +extern "C" const f32 lbl_81694424 = -304.0f; +extern "C" const f32 lbl_81694428 = 304.0f; +extern "C" const f32 lbl_8169442C = 228.0f; +extern "C" const f32 lbl_81694430 = -228.0f; +extern "C" const f32 lbl_81694434 = -416.0f; +extern "C" const f32 lbl_81694438 = 416.0f; +#pragma force_active off +#endif