From 35fd580dfdd2b4af0238721170c9070f231948c2 Mon Sep 17 00:00:00 2001 From: Hyblocker Date: Mon, 19 Oct 2026 22:31:26 +0200 Subject: [PATCH 1/3] fix: GCLogoDir NX improvements --- include/System/GCLogoDir.hpp | 20 ++++++++++++++++++++ src/System/GCLogoDir.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/include/System/GCLogoDir.hpp b/include/System/GCLogoDir.hpp index a11e46862..587779041 100644 --- a/include/System/GCLogoDir.hpp +++ b/include/System/GCLogoDir.hpp @@ -3,6 +3,7 @@ #include #include +#include namespace JDrama { class TDisplay; @@ -12,14 +13,33 @@ class TMarioGamePad; class JUTTexture; class TProgSelect; +#ifdef VERSION_GMSP01_NX +JUTRect toWideScreen(s32 x1, s32 y1, s32 x2, s32 y2); +#endif + class TNintendo2D : public JDrama::TViewObj { public: TNintendo2D(JUTTexture* tex, const char* name = "Nintendo2D") : JDrama::TViewObj(name) , mLogoTex(tex) +#ifdef VERSION_GMSP01_NX + , mRect(toWideScreen(133, 170, 509, 274)) +#else , mRect(133, 170, 509, 274) +#endif +#if defined(VERSION_GMSJ01) || defined(VERSION_GMSJ01_01) , mColor(0, 70, 255, 255) +#elif !defined (VERSION_GMSP01_NX) + , mColor(220, 0, 0, 255) +#endif { +#ifdef VERSION_GMSP01_NX + if (TFlagManager::getInstance()->getFlag(MSF_LANGUAGE) == 5) { + mColor = JUtility::TColor(0, 70, 255, 255); + } else { + mColor = JUtility::TColor(220, 0, 0, 255); + } +#endif } virtual void perform(u32 cue, JDrama::TGraphics* graphics); diff --git a/src/System/GCLogoDir.cpp b/src/System/GCLogoDir.cpp index a502b4651..51b08fc5c 100644 --- a/src/System/GCLogoDir.cpp +++ b/src/System/GCLogoDir.cpp @@ -1,3 +1,4 @@ +#include "JSystem/JUtility/JUTRect.hpp" #include #include #include @@ -77,6 +78,27 @@ TGCLogoDir::TGCLogoDir() mBHoldTimer = 0; } +#ifdef VERSION_GMSP01_NX +JUTRect toWideScreen(s32 in_x1, s32 in_y1, s32 in_x2, s32 in_y2) +{ + f32 x1 = in_x1; + f32 y1 = in_y1; + f32 x2 = in_x2; + f32 y2 = in_y2; + + f32 centerX = (x1 + x2) * 0.5f; + f32 centerY = (y1 + y2) * 0.5f; + + f32 posX1 = 0.8035714f * ((x1 - centerX) / 1.13f); + f32 posY1 = 0.8035714f * (y1 - centerY); + f32 posX2 = 0.8035714f * ((x2 - centerX) / 1.13f); + f32 posY2 = 0.8035714f * (y2 - centerY); + + return JUTRect(0.5f + posX1 + centerX, 0.5f + posY1 + centerY, + 0.5f + posX2 + centerX, 0.5f + posY2 + centerY); +} +#endif + void TGCLogoDir::setup(JDrama::TDisplay* param_1, TMarioGamePad* param_2) { unk14 = new JDrama::TDStageGroup(param_1); @@ -162,6 +184,7 @@ int TGCLogoDir::direct() switch (mOverallState) { case OVERALL_STATE_NLOGO: if (direct_nlogo()) { +#ifndef VERSION_GMSP01_NX if (mGamePad->isSomethingPushed()) { desiredAppState = TApplication::APP_STATE_DONE; break; @@ -172,6 +195,7 @@ int TGCLogoDir::direct() mLogoView->mRect = JUTRect(254, 201, 404, 271); mLogoView->mColor = JUtility::TColor(255, 255, 255, 255); SMSGetApplication()->getFader()->startWipe(14, 0.4f, 0.0f); +#endif nextState = OVERALL_STATE_DOLBY; } break; From 7a029629a141f07b777a0cb28fdeca99bc24a8f1 Mon Sep 17 00:00:00 2001 From: Hyblocker Date: Mon, 19 Oct 2026 22:33:58 +0200 Subject: [PATCH 2/3] vro --- include/System/GCLogoDir.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/System/GCLogoDir.hpp b/include/System/GCLogoDir.hpp index 587779041..7e7922514 100644 --- a/include/System/GCLogoDir.hpp +++ b/include/System/GCLogoDir.hpp @@ -29,7 +29,7 @@ class TNintendo2D : public JDrama::TViewObj { #endif #if defined(VERSION_GMSJ01) || defined(VERSION_GMSJ01_01) , mColor(0, 70, 255, 255) -#elif !defined (VERSION_GMSP01_NX) +#elif !defined(VERSION_GMSP01_NX) , mColor(220, 0, 0, 255) #endif { From 6bdb49da9c7481b712acc6fd364ee594980afd91 Mon Sep 17 00:00:00 2001 From: Hyblocker Date: Mon, 19 Oct 2026 22:41:04 +0200 Subject: [PATCH 3/3] make func weak --- src/System/GCLogoDir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System/GCLogoDir.cpp b/src/System/GCLogoDir.cpp index 51b08fc5c..7a645a0a7 100644 --- a/src/System/GCLogoDir.cpp +++ b/src/System/GCLogoDir.cpp @@ -79,7 +79,7 @@ TGCLogoDir::TGCLogoDir() } #ifdef VERSION_GMSP01_NX -JUTRect toWideScreen(s32 in_x1, s32 in_y1, s32 in_x2, s32 in_y2) +inline JUTRect toWideScreen(s32 in_x1, s32 in_y1, s32 in_x2, s32 in_y2) { f32 x1 = in_x1; f32 y1 = in_y1;