Add support for playing Dusklight using Wii disc images (#2296)

* Add offsets for Wii USA R0/R2, JPN, and PAL
Also fix an oopsie where l_pos and l_normal's offsets were swapped

* Allow loading Wii discs

* Change GameVersion::GcnJpn checks to isRegionJpn()

* Change GameVersion::GcnPal checks to isRegionPal()

* Add platformSelect and regionSelect templates, simplify a ton of code

* Add *_get() macros to simplify REL loads

* Actually accept Wii USA Rev. 2 discs

* Show the Wii USA revision in prelaunch's disc status

* l_normal isn't in Wii RELs, so I'll just hardcode it

* Account for various BLO differences

Fix crash when opening the map on Wii USA Rev 0 and Wii PAL

* Use the streamed version of the file select music

* Update language selection

* Fix the d-pad/cross button text for Wii PAL
Resizing panes that are already 120.0f wide is harmless, so I didn't bother with a GameVersion check

* Fix brightness check discrepancy, use IF_DUSK_BLOCK macros when ideal

* Update docs and the issue template
This commit is contained in:
Irastris
2026-08-15 13:58:09 -04:00
committed by GitHub
parent ac45cac56e
commit 27d27e6d94
34 changed files with 755 additions and 283 deletions
+16
View File
@@ -1386,6 +1386,22 @@ void dMeter2Draw_c::initButtonCross() {
dMeter2Info_getString(
0x62, static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('cont_ju9')))->getStringPtr(), NULL);
#if TARGET_PC
// These panes are not wide enough for French text (and possibly other languages)
// on Wii PAL. Resize them to always match their counterparts in later releases.
static u64 const juTags[] = {
MULTI_CHAR('cont_ju0'), MULTI_CHAR('cont_ju1'), MULTI_CHAR('cont_ju2'),
MULTI_CHAR('cont_ju3'), MULTI_CHAR('cont_ju4'), MULTI_CHAR('cont_ju5'),
MULTI_CHAR('cont_ju6'), MULTI_CHAR('cont_ju7'), MULTI_CHAR('cont_ju8'),
MULTI_CHAR('cont_ju9'),
};
for (u64 tag : juTags) {
J2DPane* pane = mpScreen->search(tag);
pane->resize(120.0f, pane->getHeight());
}
#endif
mpButtonCrossParent->setAlphaRate(0.0f);
drawButtonCross(g_drawHIO.mButtonCrossOFFPosX, g_drawHIO.mButtonCrossOFFPosY);
}