mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-21 05:34:10 -04:00
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:
+16
-12
@@ -363,13 +363,15 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
#if TARGET_PC
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
if (dusk::version::isJpnOrLessThanWiiJpn()) {
|
||||
((J2DTextBox*)mButtonScreen->search(cont_at[i]))->setFont(mDoExt_getMesgFont());
|
||||
((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->setFont(mDoExt_getMesgFont());
|
||||
((J2DTextBox*)mButtonScreen->search(cont_at[i]))->setString(32, "");
|
||||
((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->setString(32, "");
|
||||
((J2DTextBox*)mButtonScreen->search(font_at[i]))->hide();
|
||||
((J2DTextBox*)mButtonScreen->search(font_bt[i]))->hide();
|
||||
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
|
||||
((J2DTextBox*)mButtonScreen->search(font_at[i]))->hide();
|
||||
((J2DTextBox*)mButtonScreen->search(font_bt[i]))->hide();
|
||||
}
|
||||
} else {
|
||||
((J2DTextBox*)mButtonScreen->search(font_at[i]))->setFont(mDoExt_getMesgFont());
|
||||
((J2DTextBox*)mButtonScreen->search(font_bt[i]))->setFont(mDoExt_getMesgFont());
|
||||
@@ -400,7 +402,7 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
|
||||
|
||||
J2DTextBox* textBox;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
textBox = ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])));
|
||||
textBox = (J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i]));
|
||||
textBox->setFont(mDoExt_getMesgFont());
|
||||
textBox->setString(32, "");
|
||||
}
|
||||
@@ -436,9 +438,9 @@ void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) {
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (i_msgNo == 0) {
|
||||
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), "");
|
||||
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), "");
|
||||
} else {
|
||||
dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), NULL);
|
||||
dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -463,9 +465,9 @@ void dMenu_DmapBg_c::setBButtonString(u32 i_msgNo) {
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (i_msgNo == 0) {
|
||||
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), "");
|
||||
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), "");
|
||||
} else {
|
||||
dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), NULL);
|
||||
dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -504,12 +506,12 @@ void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) {
|
||||
|
||||
if (msgNo == 0) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), "");
|
||||
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), "");
|
||||
}
|
||||
mpCButton->setAlphaRate(0.5f);
|
||||
} else {
|
||||
for (i = 0; i < 2; i++) {
|
||||
dMeter2Info_getStringKanji(msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), NULL);
|
||||
dMeter2Info_getStringKanji(msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), NULL);
|
||||
}
|
||||
mpCButton->setAlphaRate(1.0f);
|
||||
}
|
||||
@@ -979,8 +981,10 @@ void dMenu_DmapBg_c::dMapBgWide() {
|
||||
mButtonScreen->search(MULTI_CHAR('c_btn'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
mButtonScreen->search(MULTI_CHAR('c_text_s'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
mButtonScreen->search(MULTI_CHAR('c_text'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
mButtonScreen->search(MULTI_CHAR('f_text_s'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
mButtonScreen->search(MULTI_CHAR('f_text'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
|
||||
mButtonScreen->search(MULTI_CHAR('f_text_s'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
mButtonScreen->search(MULTI_CHAR('f_text'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
}
|
||||
|
||||
// Decorations
|
||||
mButtonScreen->search(MULTI_CHAR('kazari_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
|
||||
|
||||
Reference in New Issue
Block a user