diff options
| author | Pieter-Jan Briers <pieterjan.briers+git@gmail.com> | 2026-06-20 02:46:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-19 17:46:30 -0700 |
| commit | 79fda477b11cc497b03195653751e5dfc81be094 (patch) | |
| tree | 0b934589556b1ca55154d713ae68cce6446ec2a6 /src/d/d_s_logo.cpp | |
| parent | 853a6addb4dba2cf7f5f336339e933011536c40e (diff) | |
Wii PAL d_s_logo improvements (#3157)
* Wii PAL d_s_logo improvements
* Fix d_s_logo/d_pane_class_alpha sdata spltis
* Specify some symbols to improve matches
Is there a better way to do this?
* More symbols
* match phase_1
* Fix regressions
* Fix d_s_name rodata split
* Add nextPauseTimer__9dScnPly_c to symbol map
Diffstat (limited to 'src/d/d_s_logo.cpp')
| -rw-r--r-- | src/d/d_s_logo.cpp | 120 |
1 files changed, 114 insertions, 6 deletions
diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index 1b8e71d3e8..dc89b3c40f 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -381,7 +381,7 @@ void dScnLogo_c::progOutDraw() { dComIfGd_set2DOpa(mProgressiveNo); if (mTimer == 0) { - #if VERSION == VERSION_GCN_PAL + #if REGION_PAL if (field_0x218 == 1 && field_0x209 == 0) #else if (field_0x218 != 0 && field_0x209 == 0) @@ -497,7 +497,7 @@ void dScnLogo_c::warningDispDraw() { field_0x210--; } - #if PLATFORM_WII + #if PLATFORM_WII && VERSION != VERSION_WII_PAL if (mTimer == 0 || cAPICPad_A_TRIGGER(PAD_1) || cAPICPad_B_TRIGGER(PAD_1) || cAPICPad_START_TRIGGER(PAD_1)) #else if (mTimer == 0 || mDoCPd_c::getTrig(PAD_1) & @@ -796,15 +796,32 @@ dScnLogo_c::~dScnLogo_c() { #if PLATFORM_WII || PLATFORM_SHIELD switch (getPalLanguage()) { +#if REGION_PAL + case 1: + dComIfG_deleteObjectResMain("LogoGmWii"); + break; +#endif case 2: dComIfG_deleteObjectResMain("LogoFrWii"); break; case 3: dComIfG_deleteObjectResMain("LogoSpWii"); break; +#if REGION_PAL + case 4: + dComIfG_deleteObjectResMain("LogoItWii"); + break; + case 5: + dComIfG_deleteObjectResMain("LogoDuWii"); + break; +#endif case 0: default: +#if REGION_PAL + dComIfG_deleteObjectResMain("LogoUkWii"); +#else dComIfG_deleteObjectResMain("LogoUsWii"); +#endif break; } #else @@ -992,6 +1009,27 @@ static int phase_1(dScnLogo_c* i_this) { int rt; #if PLATFORM_WII || PLATFORM_SHIELD switch (i_this->getPalLanguage()) { +#if REGION_PAL + case 1: + rt = dComIfG_setObjectRes("LogoGmWii", (u8)0, i_this->mLogoHeap); + break; + case 2: + rt = dComIfG_setObjectRes("LogoFrWii", (u8)0, i_this->mLogoHeap); + break; + case 3: + rt = dComIfG_setObjectRes("LogoSpWii", (u8)0, i_this->mLogoHeap); + break; + case 4: + rt = dComIfG_setObjectRes("LogoItWii", (u8)0, i_this->mLogoHeap); + break; + case 5: + rt = dComIfG_setObjectRes("LogoDuWii", (u8)0, i_this->mLogoHeap); + break; + case 0: + default: + rt = dComIfG_setObjectRes("LogoUkWii", (u8)0, i_this->mLogoHeap); + break; +#else case 0: default: rt = dComIfG_setObjectRes("LogoUsWii", (u8)0, i_this->mLogoHeap); @@ -1002,6 +1040,7 @@ static int phase_1(dScnLogo_c* i_this) { case 3: rt = dComIfG_setObjectRes("LogoSpWii", (u8)0, i_this->mLogoHeap); break; +#endif } #else rt = dComIfG_setObjectRes(LOGO_ARC, (u8)0, i_this->mLogoHeap); @@ -1111,6 +1150,12 @@ int dScnLogo_c::create() { } #if PLATFORM_WII || PLATFORM_SHIELD + +#if REGION_PAL +static const u8 logoIndexes[6] = {4, 4, 4, 4, 4, 4}; +static const u8 widescreenLogoIndexes[6] = {3, 3, 3, 3, 3, 3}; +#endif + void dScnLogo_c::logoInitWii() { u8 language = getPalLanguage(); if (language > 5) { @@ -1120,11 +1165,48 @@ void dScnLogo_c::logoInitWii() { ResTIMG* timg; s16 width; s16 height; +#if REGION_PAL + int index; + if (mDoGph_gInf_c::isWide()) { + width = 832; + index = widescreenLogoIndexes[language]; + height = FB_HEIGHT; + } else { + width = FB_WIDTH_BASE; + index = logoIndexes[language]; + height = FB_HEIGHT; + } + + switch (language) { + case 1: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoGmWii", index); + break; + case 2: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoFrWii", index); + break; + case 3: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoSpWii", index); + break; + case 4: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoItWii", index); + break; + case 0: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUkWii", index); + break; + case 5: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoDuWii", index); + break; + } +#else if (mDoGph_gInf_c::isWide()) { switch (language) { case 0: default: +#if PLATFORM_SHIELD + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", 3); +#else timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", dRes_ID_LOGOUSWII_BTI_STRAP_16_9_832X456_US_e); +#endif break; case 2: timg = (ResTIMG*)dComIfG_getObjectRes("LogoFrWii", 3); @@ -1140,7 +1222,11 @@ void dScnLogo_c::logoInitWii() { switch (language) { case 0: default: +#if PLATFORM_SHIELD + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", 4); +#else timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", dRes_ID_LOGOUSWII_BTI_STRAP_608X456_US_e); +#endif break; case 2: timg = (ResTIMG*)dComIfG_getObjectRes("LogoFrWii", 4); @@ -1154,6 +1240,7 @@ void dScnLogo_c::logoInitWii() { width = FB_WIDTH_BASE; height = FB_HEIGHT; } +#endif JUT_ASSERT(2309, timg != NULL); mStrapImg = new dDlst_2D_c(timg, (FB_WIDTH_BASE / 2) - (width / 2), (FB_HEIGHT_BASE / 2) - (height / 2), width, height, 255); @@ -1313,11 +1400,20 @@ void dScnLogo_c::dvdDataLoad() { static const homeBtnData l_homeBtnData[] = { {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, +#if REGION_PAL + {SC_LANG_GERMAN, "/res/HomeBtn/homeBtn_GER.arc"}, +#else {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, +#endif {SC_LANG_FRENCH, "/res/HomeBtn/homeBtn_FRA.arc"}, {SC_LANG_SPANISH, "/res/HomeBtn/homeBtn_SPA.arc"}, +#if REGION_PAL + {SC_LANG_ITALIAN, "/res/HomeBtn/homeBtn_ITA.arc"}, + {SC_LANG_DUTCH, "/res/HomeBtn/homeBtn_NED.arc"}, +#else {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, +#endif {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, }; @@ -1355,7 +1451,7 @@ void dScnLogo_c::dvdDataLoad() { mpButtonCommand = aramMount(BUTTON_RES_PATH, mDoExt_getJ2dHeap()); mpCardIconCommand = aramMount(ICON_RES_PATH, mDoExt_getJ2dHeap()); - #if VERSION == VERSION_GCN_PAL + #if REGION_PAL switch (getPalLanguage()) { case 1: mpBmgResCommand = onMemMount("/res/Msgde/bmgres.arc"); @@ -1408,7 +1504,7 @@ void dScnLogo_c::dvdDataLoad() { #if VERSION == VERSION_GCN_JPN mpFontResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fontjp/fontres.arc", 1, JKRArchive::MOUNT_MEM, NULL); mpRubyResCommand = onMemMount("/res/Fontjp/rubyres.arc"); -#elif VERSION == VERSION_GCN_PAL +#elif REGION_PAL mpFontResCommand = onMemMount("/res/Fonteu/fontres.arc"); mpRubyResCommand = onMemMount("/res/Fonteu/rubyres.arc"); #elif VERSION == VERSION_SHIELD_DEBUG @@ -1564,7 +1660,9 @@ void dScnLogo_c::setProgressiveMode(u8 mode) { return; #endif - #if PLATFORM_WII + #if VERSION == VERSION_WII_PAL + SCSetEuRgb60Mode(mode); + #elif PLATFORM_WII SCSetProgressiveMode(mode); #elif VERSION == VERSION_GCN_PAL OSSetEuRgb60Mode(mode); @@ -1574,7 +1672,9 @@ void dScnLogo_c::setProgressiveMode(u8 mode) { } u8 dScnLogo_c::getProgressiveMode() { - #if PLATFORM_WII || PLATFORM_SHIELD + #if VERSION == VERSION_WII_PAL + return SCGetEuRgb60Mode(); + #elif PLATFORM_WII || PLATFORM_SHIELD return SCGetProgressiveMode(); #endif @@ -1594,6 +1694,14 @@ bool dScnLogo_c::isProgressiveMode() { } void dScnLogo_c::setRenderMode() { +#if VERSION == VERSION_WII_PAL + if (VIGetDTVStatus() != 0) { + if (SCGetProgressiveMode() == 1) { + mDoMch_render_c::setRenderModeObj(&g_palZeldaProg60); + return; + } + } +#endif mDoMch_render_c::setProgressiveMode(); } |
