From a4e2ec965bdadbabe7dd19f534de4cb9f38550ba Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Tue, 22 Sep 2026 03:54:54 +0000 Subject: [PATCH] Match systemmenu CSPane --- src/channelScript/systemmenu/iplCSPane.cpp | 44 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/channelScript/systemmenu/iplCSPane.cpp b/src/channelScript/systemmenu/iplCSPane.cpp index 94b6af3e..64c0a2e0 100644 --- a/src/channelScript/systemmenu/iplCSPane.cpp +++ b/src/channelScript/systemmenu/iplCSPane.cpp @@ -1,3 +1,22 @@ +#include +#include + +extern "C" const char lbl_8166A6E3[]; +extern "C" const u8 lbl_81697844; +extern "C" const u8 lbl_81697845; +extern "C" const u8 lbl_81697846; +extern "C" const u8 lbl_81697847; + +#define NW4R_DB_ASSERT_H +#define NW4R_ASSERT(x) \ + { \ + if (!(x)) { \ + GXColor front = {lbl_81697844, lbl_81697845, lbl_81697846, lbl_81697847}; \ + GXColor back = {0, 0, 0, 0}; \ + OSFatal((GXColor)front, (GXColor)back, lbl_8166A6E3); \ + } \ + } + #include "channelScript/iplCSLibrary.h" #include "iplSystem.h" @@ -10,7 +29,9 @@ #include "math/iplMathTypes.h" -extern f32 lbl_81694FC0; +extern "C" const f32 lbl_81694FC0 = 0.0f; + +extern "C" nw4r::ut::Color GetTextColor__Q34nw4r3lyt7TextBoxCFUl(const nw4r::lyt::TextBox*, u32); namespace ipl { namespace cs { @@ -393,7 +414,7 @@ namespace ipl { CHANSVmObjHdr* arg = CHANSVmGetArgInteger(VmInst, 0); if (box != NULL && argc == 1 && arg != NULL) { if (arg->value.int_v < 4ULL) { - result = color::_ctor(VmInst, VmReturnObj, (nw4r::ut::Color) static_cast(box->GetTextColor(arg->value.int_v))) == TRUE; + result = color::_ctor(VmInst, VmReturnObj, (nw4r::ut::Color) static_cast(GetTextColor__Q34nw4r3lyt7TextBoxCFUl(box, arg->value.int_v))) == TRUE; } } } @@ -595,3 +616,22 @@ namespace ipl { } // namespace pane } // namespace cs } // namespace ipl + +namespace ipl { + namespace cs { + namespace pane { +#pragma push +#pragma section const_type ".data" + extern "C" const char lbl_8166A6E3[] = "Error#004\nAn error has occurred.\nThe system files are corrupted."; +#pragma pop + +#pragma push +#pragma section data_type ".sdata" + extern "C" __declspec(section ".sdata") const u8 lbl_81697844 = 0xff; + extern "C" __declspec(section ".sdata") const u8 lbl_81697845 = 0xff; + extern "C" __declspec(section ".sdata") const u8 lbl_81697846 = 0xff; + extern "C" __declspec(section ".sdata") const u8 lbl_81697847 = 0; +#pragma pop + } + } +} -- 2.49.1