From 568fe41d61e27b97e25861d46a529d94de8962a4 Mon Sep 17 00:00:00 2001 From: mattias-blum <142374929+mattias-blum@users.noreply.github.com> Date: Sun, 18 May 2025 10:15:09 -0400 Subject: [PATCH] PR changes made --- include/d/d_menu_collect.h | 2 +- src/d/d_menu_collect.cpp | 15 +++++---------- src/d/d_menu_option.cpp | 12 +++++------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/include/d/d_menu_collect.h b/include/d/d_menu_collect.h index 577a683cf..8b33a2ad9 100644 --- a/include/d/d_menu_collect.h +++ b/include/d/d_menu_collect.h @@ -181,7 +181,7 @@ public: /* 0x52 */ u8 m52; /* 0x53 */ u8 m53; /* 0x54 */ f32 m54; - /* 0x58 */ int m58; + /* 0x58 */ JUtility::TColor m58; /* 0x5C */ u8 m5C; /* 0x5D */ u8 m5D; }; diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 7f8831ac9..21eedf8e2 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -15,8 +15,6 @@ static dMc_HIO_c g_mcHIO; /* 8019BE8C-8019BF14 .text __ct__9dMc_HIO_cFv */ dMc_HIO_c::dMc_HIO_c() { - /* Fakematch */ - m58 = -1; m46 = 40; m48 = 10; m4A = 120; @@ -27,10 +25,7 @@ dMc_HIO_c::dMc_HIO_c() { m52 = 130; m4E = 250; m50 = 20; - ((u8*)&m58)[0] = -1; - ((u8*)&m58)[1] = 170; - ((u8*)&m58)[2] = 0; - ((u8*)&m58)[3] = 0; + m58.set(-1, 170, 0, 0); m44 = 13; } @@ -163,12 +158,12 @@ void dMenu_Collect_c::screenSet() { // Couple of functions missing here ((J2DTextBox*)(m740).pane)->setWhite(-1); - ((J2DTextBox*)(m740).pane)->setCharColor(0xff); - ((J2DTextBox*)(m740).pane)->setGradColor(0xff); + ((J2DTextBox*)(m740).pane)->setCharColor(-1); + ((J2DTextBox*)(m740).pane)->setGradColor(-1); ((J2DTextBox*)(m778).pane)->setWhite(-1); - ((J2DTextBox*)(m778).pane)->setCharColor(0xff); - ((J2DTextBox*)(m778).pane)->setGradColor(0xff); + ((J2DTextBox*)(m778).pane)->setCharColor(-1); + ((J2DTextBox*)(m778).pane)->setGradColor(-1); fopMsgM_setPaneData(&m858, m004, 'wd'); diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index 17189fd3c..fa43b0a66 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -579,14 +579,12 @@ void dMenu_Option_c::noteSet() { float fVar1 = m740[0].pane[1].mBounds.getHeight(); float fVar2 = m740[1].pane[1].mBounds.getHeight(); - mesg_header* mesg_header = msgGet.getMesgHeader(0x262); - if (mesg_header == NULL) { - JUTAssertion::showAssert(JUTAssertion::getSDevice(), "d_menu_option.cpp", 0x313, "head_p"); - OSPanic("d_menu_option.cpp", 0x313, "Halt"); - } + mesg_header* head_p = msgGet.getMesgHeader(0x262); + + JUT_ASSERT(0x313, head_p); - const char* mesg = msgGet.getMessage(mesg_header); - mesg_entry msg_entry = msgGet.getMesgEntry(mesg_header); + const char* mesg = msgGet.getMessage(head_p); + mesg_entry msg_entry = msgGet.getMesgEntry(head_p); msgDataProc.dataInit();