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 11:58:09 -06:00
committed by GitHub
parent ac45cac56e
commit 27d27e6d94
34 changed files with 755 additions and 283 deletions
+10 -5
View File
@@ -68,13 +68,18 @@ body:
required: true
- type: dropdown
id: game-region
id: game-disc
attributes:
label: Game Region
description: The game region you are playing on
label: Game Disc
description: The game disc you are playing on
options:
- NTSC-U (North America)
- PAL (Europe)
- GameCube NTSC-U (North America)
- GameCube PAL (Europe)
- GameCube NTSC-J (Japan)
- Wii NTSC-U (North America) Revision 0
- Wii NTSC-U (North America) Revision 2
- Wii PAL (Europe)
- Wii NTSC-J (Japan)
validations:
required: true
+4 -1
View File
@@ -26,7 +26,10 @@ It aims to be as accurate as possible to the original while also providing new o
You must dump your own copy of the game. Please see [this article](https://wiki.dolphin-emu.org/index.php?title=Ripping_Games) for instructions. After dumping, you can use a program like [Dolphin](https://dolphin-emu.org/) or [nodtool](https://github.com/encounter/nod/releases) to convert the `.iso` to `.rvz` to save space.
Currently, only the GameCube releases are supported. Support for other versions of the game is planned in the future.
Dusklight currently supports all commercial discs except for Wii's Korean release.
> [!NOTE]
> Dusklight is based on the [Twilight Princess decompilation](https://github.com/zeldaret/tp), which is currently only matching for GameCube. As a result, even when playing Dusklight with a Wii disc, you will be presented with the GameCube version's HUD and certain other specificities.
### 2. Install Dusklight
+7 -1
View File
@@ -5,7 +5,13 @@
- A Windows, Linux, or macOS device
- iOS device connected to computer via USB
- Dusklight IPA file (download the latest `Dusklight-vX.X.X-ios-arm64.ipa` from the [releases page](https://github.com/TwilitRealm/dusklight/releases))
- Legally acquired game disc - `GZ2E01` (Gamecube USA) or `GZ2PE01` (Gamecube PAL)
- Legally acquired game disc:
- `GZ2E01` (GameCube USA)
- `GZ2P01` (GameCube PAL)
- `GZ2J01` (GameCube JPN)
- `RZDE01` (Wii USA Rev. 0 *or* Rev. 2)
- `RZDP01` (Wii PAL)
- `RZDJ01` (Wii JPN)
## 1. Install iloader
+2
View File
@@ -1457,6 +1457,8 @@ set(DUSK_FILES
src/dusk/imgui/ImGuiStubLog.cpp
src/dusk/io.cpp
src/dusk/iso_validate.cpp
src/dusk/language.cpp
src/dusk/language.hpp
src/dusk/layout.cpp
src/dusk/livesplit.cpp
src/dusk/logging.cpp
+1 -1
View File
@@ -71,7 +71,7 @@ void JUTResFont::initJoinedTexture() {
int pageCount = 0;
u32 pageNumCells = block.numRows * block.numColumns;
if (dusk::version::getGameVersion() == dusk::version::GameVersion::GcnJpn) {
if (dusk::version::isRegionJpn()) {
pageCount = 1;
if (pageNumCells > 0 && block.endCode > block.startCode) {
pageCount = (block.endCode - block.startCode + pageNumCells - 1) / pageNumCells;
+4 -1
View File
@@ -11,7 +11,10 @@
#include "Z2AudioLib/SpotName.h"
#include "os_report.h"
#if TARGET_PC
#include "dusk/audio.h"
#include "dusk/version.hpp"
#endif
Z2SeqMgr::Z2SeqMgr() : JASGlobalInstance<Z2SeqMgr>(true) {
mMainBgmMaster.forceIn();
@@ -584,7 +587,7 @@ void Z2SeqMgr::bgmStreamPlay() {
}
#if !PLATFORM_SHIELD
else if (getStreamBgmID() == 0x2000000) {
else if (getStreamBgmID() == 0x2000000 IF_DUSK(&& dusk::version::isGcn())) {
if (mStreamBgmHandle) {
mStreamBgmHandle->stop();
}
+74 -18
View File
@@ -15,12 +15,50 @@
#include "dusk/dvd_asset.hpp"
#include "dusk/frame_interpolation.h"
using GameVersion = dusk::version::GameVersion;
#include <type_traits>
using namespace dusk::version;
#define MANT_REL_PATH platformSelect<const char*>("/rel/Final/Release/d_a_mant.rel", "/rel/Rfinal/Release/d_a_mant.rel")
#define DEFINE_MANT_ASSET(name, type, count, ...) \
static type* name##_get() { \
alignas(32) static std::remove_cv_t<type> buf[count]; \
static bool _ = (dusk::LoadRelAsset(buf, MANT_REL_PATH, __VA_ARGS__), true); \
return buf; \
}
// keep the original version of the cape texture const so we don't need to reload the file
static u8 const * l_Egnd_mantTEX_get() { alignas(32) static u8 buf[0x4000]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x1C00}, {GameVersion::GcnPal, 0x1C00}, {GameVersion::GcnJpn, 0x1C00}}, 0x4000), true); return buf; }
static u8* l_Egnd_mantTEX_U_get() { alignas(32) static u8 buf[0x4000]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x5C00}, {GameVersion::GcnPal, 0x5C00}, {GameVersion::GcnJpn, 0x5C00}}, 0x4000), true); return buf; }
static u8* l_Egnd_mantPAL_get() { alignas(32) static u8 buf[0x60]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x9C00}, {GameVersion::GcnPal, 0x9C00}, {GameVersion::GcnJpn, 0x9C00}}, 0x60), true); return buf; }
DEFINE_MANT_ASSET(l_Egnd_mantTEX, u8 const, 0x4000, {
{GameVersion::GcnUsa, 0x1C00},
{GameVersion::GcnPal, 0x1C00},
{GameVersion::GcnJpn, 0x1C00},
{GameVersion::WiiUsaRev0, 0x1B00},
{GameVersion::WiiUsa, 0x1900},
{GameVersion::WiiPal, 0x1900},
{GameVersion::WiiJpn, 0x1900},
});
DEFINE_MANT_ASSET(l_Egnd_mantTEX_U, u8, 0x4000, {
{GameVersion::GcnUsa, 0x5C00},
{GameVersion::GcnPal, 0x5C00},
{GameVersion::GcnJpn, 0x5C00},
{GameVersion::WiiUsaRev0, 0x5B00},
{GameVersion::WiiUsa, 0x5900},
{GameVersion::WiiPal, 0x5900},
{GameVersion::WiiJpn, 0x5900},
});
DEFINE_MANT_ASSET(l_Egnd_mantPAL, u8, 0x60, {
{GameVersion::GcnUsa, 0x9C00},
{GameVersion::GcnPal, 0x9C00},
{GameVersion::GcnJpn, 0x9C00},
{GameVersion::WiiUsaRev0, 0x9B00},
{GameVersion::WiiUsa, 0x9900},
{GameVersion::WiiPal, 0x9900},
{GameVersion::WiiJpn, 0x9900},
});
#define l_Egnd_mantTEX (l_Egnd_mantTEX_get())
#define l_Egnd_mantTEX_U (l_Egnd_mantTEX_U_get())
#define l_Egnd_mantPAL (l_Egnd_mantPAL_get())
@@ -35,14 +73,39 @@ static TGXTexObj mainTexObj;
static TGXTexObj undersideTexObj;
// l_pos is unused
//static f32* l_pos_get() { alignas(32) static f32 buf[507]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA44C}, {GameVersion::GcnPal, 0xA44C}}, sizeof(buf)), true); return buf; }
static f32* l_normal_get() { alignas(32) static f32 buf[3]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0x9C60}, {GameVersion::GcnPal, 0x9C60}, {GameVersion::GcnJpn, 0x9C60}}, sizeof(buf)), true); return buf; }
static f32* l_texCoord_get() { alignas(32) static f32 buf[338]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA458}, {GameVersion::GcnPal, 0xA458}, {GameVersion::GcnJpn, 0xA458}}, sizeof(buf)), true); return buf; }
//#define l_pos (l_pos_get())
#define l_normal (l_normal_get())
// DEFINE_MANT_ASSET(l_pos, f32, 507, {
// {GameVersion::GcnUsa, 0x9C60},
// {GameVersion::GcnPal, 0x9C60},
// });
alignas(32) static f32 const l_normal[3] = {0.0f, 1.0f, 0.0f};
DEFINE_MANT_ASSET(l_texCoord, f32, 338, {
{GameVersion::GcnUsa, 0xA458},
{GameVersion::GcnPal, 0xA458},
{GameVersion::GcnJpn, 0xA458},
{GameVersion::WiiUsaRev0, 0x9B60},
{GameVersion::WiiUsa, 0x9960},
{GameVersion::WiiPal, 0x9960},
{GameVersion::WiiJpn, 0x9960},
});
// #define l_pos (l_pos_get())
#define l_texCoord (l_texCoord_get())
static bool l_Egnd_mantTEX_hasReplacement = false;
DEFINE_MANT_ASSET(l_Egnd_mantDL, u8, 0x3EC, {
{GameVersion::GcnUsa, 0xA9A0},
{GameVersion::GcnPal, 0xA9A0},
{GameVersion::GcnJpn, 0xA9A0},
{GameVersion::WiiUsaRev0, 0xA0C0},
{GameVersion::WiiUsa, 0x9EC0},
{GameVersion::WiiPal, 0x9EC0},
{GameVersion::WiiJpn, 0x9EC0},
});
#define l_Egnd_mantDL (l_Egnd_mantDL_get())
#else
#include "assets/l_Egnd_mantTEX.h"
@@ -52,16 +115,9 @@ static bool l_Egnd_mantTEX_hasReplacement = false;
#endif
#include "d/d_s_play.h"
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
static u8* l_Egnd_mantDL_get() { alignas(32) static u8 buf[0x3EC]; static bool _ = (dusk::LoadRelAsset(buf, "/rel/Final/Release/d_a_mant.rel", {{GameVersion::GcnUsa, 0xA9A0}, {GameVersion::GcnPal, 0xA9A0}, {GameVersion::GcnJpn, 0xA9A0}}, 0x3EC), true); return buf; }
#define l_Egnd_mantDL (l_Egnd_mantDL_get())
#else
#include "assets/l_Egnd_mantDL.h"
#endif
#if !TARGET_PC
#include "assets/l_Egnd_mantDL.h"
static void* pal_d = (void*)&l_Egnd_mantPAL;
static void* tex_d[2] = {
+8 -4
View File
@@ -375,10 +375,14 @@ static const u8* l_sightDL_get() {
static bool _ = (
dusk::LoadDolAsset(
buf,
{
{GameVersion::GcnUsa, 0x803BA0C0},
{GameVersion::GcnPal, 0x803BBDA0},
{GameVersion::GcnJpn, 0x803B4220}
{
{GameVersion::GcnUsa, 0x803BA0C0},
{GameVersion::GcnPal, 0x803BBDA0},
{GameVersion::GcnJpn, 0x803B4220},
{GameVersion::WiiUsaRev0, 0x803F63C0},
{GameVersion::WiiUsa, 0x803E1640},
{GameVersion::WiiPal, 0x803E23A0},
{GameVersion::WiiJpn, 0x803DF600}
},
0x89
),
+1 -1
View File
@@ -52,7 +52,7 @@ static u8 const lit_3772[12] = {
#if TARGET_PC
using namespace dusk::version;
#define l_arcName versionSelect<const char*>({{GameVersion::GcnPal, "TitlePal"}}, "Title")
#define l_arcName regionSelect<const char*>("Title", "TitlePal", "Title")
#elif VERSION == VERSION_GCN_PAL
static char const l_arcName[] = "TitlePal";
#else
+108 -16
View File
@@ -11,9 +11,16 @@ const u16 l_J_Ohana00_64TEX__width = 63;
const u16 l_J_Ohana00_64TEX__height = 63;
#if TARGET_PC
#include "dusk/dvd_asset.hpp"
using GameVersion = dusk::version::GameVersion;
static u8* l_J_Ohana00_64TEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9060}, {GameVersion::GcnPal, 0x9060}, {GameVersion::GcnJpn, 0x9060}}, 0x800), true); return buf; }
DEFINE_GRASS_ASSET(l_J_Ohana00_64TEX, u8, 0x800, {
{GameVersion::GcnUsa, 0x9060},
{GameVersion::GcnPal, 0x9060},
{GameVersion::GcnJpn, 0x9060},
{GameVersion::WiiUsaRev0, 0x7B60},
{GameVersion::WiiUsa, 0x7BC0},
{GameVersion::WiiPal, 0x7BC0},
{GameVersion::WiiJpn, 0x7BC0},
});
#define l_J_Ohana00_64TEX (l_J_Ohana00_64TEX_get())
// from d_grass.inc
@@ -115,12 +122,46 @@ static u8 l_flowerTexCoord[] = {
0x3E, 0xA7, 0x72, 0xD6, 0xBD, 0x2F, 0x46, 0xAA};
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
DEFINE_GRASS_ASSET(l_J_hana00DL, u8, 0x150, {
{GameVersion::GcnUsa, 0x9D20},
{GameVersion::GcnPal, 0x9D20},
{GameVersion::GcnJpn, 0x9D20},
{GameVersion::WiiUsaRev0, 0x8820},
{GameVersion::WiiUsa, 0x8880},
{GameVersion::WiiPal, 0x8880},
{GameVersion::WiiJpn, 0x8880},
});
DEFINE_GRASS_ASSET(l_J_hana00_cDL, u8, 0xDE, {
{GameVersion::GcnUsa, 0x9E80},
{GameVersion::GcnPal, 0x9E80},
{GameVersion::GcnJpn, 0x9E80},
{GameVersion::WiiUsaRev0, 0x8980},
{GameVersion::WiiUsa, 0x89E0},
{GameVersion::WiiPal, 0x89E0},
{GameVersion::WiiJpn, 0x89E0},
});
DEFINE_GRASS_ASSET(l_matDL, u8, 0x99, {
{GameVersion::GcnUsa, 0x9F60},
{GameVersion::GcnPal, 0x9F60},
{GameVersion::GcnJpn, 0x9F60},
{GameVersion::WiiUsaRev0, 0x8A60},
{GameVersion::WiiUsa, 0x8AC0},
{GameVersion::WiiPal, 0x8AC0},
{GameVersion::WiiJpn, 0x8AC0},
});
DEFINE_GRASS_ASSET(l_matLight4DL, u8, 0x99, {
{GameVersion::GcnUsa, 0xA000},
{GameVersion::GcnPal, 0xA000},
{GameVersion::GcnJpn, 0xA000},
{GameVersion::WiiUsaRev0, 0x8B00},
{GameVersion::WiiUsa, 0x8B60},
{GameVersion::WiiPal, 0x8B60},
{GameVersion::WiiJpn, 0x8B60},
});
static u8* l_J_hana00DL_get() { static u8 buf[0x150]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9D20}, {GameVersion::GcnPal, 0x9D20}, {GameVersion::GcnJpn, 0x9D20}}, 0x150), true); return buf; }
static u8* l_J_hana00_cDL_get() { static u8 buf[0xDE]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9E80}, {GameVersion::GcnPal, 0x9E80}, {GameVersion::GcnJpn, 0x9E80}}, 0xDE), true); return buf; }
static u8* l_matDL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x9F60}, {GameVersion::GcnPal, 0x9F60}, {GameVersion::GcnJpn, 0x9F60}}, 0x99), true); return buf; }
static u8* l_matLight4DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xA000}, {GameVersion::GcnPal, 0xA000}, {GameVersion::GcnJpn, 0xA000}}, 0x99), true); return buf; }
#define l_J_hana00DL (l_J_hana00DL_get())
#define l_J_hana00_cDL (l_J_hana00_cDL_get())
#define l_matDL (l_matDL_get())
@@ -141,8 +182,16 @@ const u16 l_J_Ohana01_64128_0419TEX__width = 63;
const u16 l_J_Ohana01_64128_0419TEX__height = 127;
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
static u8* l_J_Ohana01_64128_0419TEX_get() { static u8 buf[0x1000]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xA0A0}, {GameVersion::GcnPal, 0xA0A0}, {GameVersion::GcnJpn, 0xA0A0}}, 0x1000), true); return buf; }
DEFINE_GRASS_ASSET(l_J_Ohana01_64128_0419TEX, u8, 0x1000, {
{GameVersion::GcnUsa, 0xA0A0},
{GameVersion::GcnPal, 0xA0A0},
{GameVersion::GcnJpn, 0xA0A0},
{GameVersion::WiiUsaRev0, 0x8BA0},
{GameVersion::WiiUsa, 0x8C00},
{GameVersion::WiiPal, 0x8C00},
{GameVersion::WiiJpn, 0x8C00},
});
#define l_J_Ohana01_64128_0419TEX (l_J_Ohana01_64128_0419TEX_get())
#else
#include "assets/l_J_Ohana01_64128_0419TEX.h"
@@ -274,13 +323,56 @@ static u8 l_flowerTexCoord2[] = {
0x40, 0x1B, 0x7D, 0x52, 0x3F, 0x80, 0x3F, 0x79, 0x40, 0x1B, 0x7D, 0x52, 0x3F, 0x51, 0x10, 0x6F};
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
DEFINE_GRASS_ASSET(l_J_hana01DL, u8, 0x138, {
{GameVersion::GcnUsa, 0xB7C0},
{GameVersion::GcnPal, 0xB7C0},
{GameVersion::GcnJpn, 0xB7C0},
{GameVersion::WiiUsaRev0, 0xA2C0},
{GameVersion::WiiUsa, 0xA320},
{GameVersion::WiiPal, 0xA320},
{GameVersion::WiiJpn, 0xA320},
});
DEFINE_GRASS_ASSET(l_J_hana01_c_00DL, u8, 0xDE, {
{GameVersion::GcnUsa, 0xB900},
{GameVersion::GcnPal, 0xB900},
{GameVersion::GcnJpn, 0xB900},
{GameVersion::WiiUsaRev0, 0xA400},
{GameVersion::WiiUsa, 0xA460},
{GameVersion::WiiPal, 0xA460},
{GameVersion::WiiJpn, 0xA460},
});
DEFINE_GRASS_ASSET(l_J_hana01_c_01DL, u8, 0x128, {
{GameVersion::GcnUsa, 0xB9E0},
{GameVersion::GcnPal, 0xB9E0},
{GameVersion::GcnJpn, 0xB9E0},
{GameVersion::WiiUsaRev0, 0xA4E0},
{GameVersion::WiiUsa, 0xA540},
{GameVersion::WiiPal, 0xA540},
{GameVersion::WiiJpn, 0xA540},
});
DEFINE_GRASS_ASSET(l_mat2DL, u8, 0x99, {
{GameVersion::GcnUsa, 0xBB20},
{GameVersion::GcnPal, 0xBB20},
{GameVersion::GcnJpn, 0xBB20},
{GameVersion::WiiUsaRev0, 0xA620},
{GameVersion::WiiUsa, 0xA680},
{GameVersion::WiiPal, 0xA680},
{GameVersion::WiiJpn, 0xA680},
});
DEFINE_GRASS_ASSET(l_mat2Light4DL, u8, 0x99, {
{GameVersion::GcnUsa, 0xBBC0},
{GameVersion::GcnPal, 0xBBC0},
{GameVersion::GcnJpn, 0xBBC0},
{GameVersion::WiiUsaRev0, 0xA6C0},
{GameVersion::WiiUsa, 0xA720},
{GameVersion::WiiPal, 0xA720},
{GameVersion::WiiJpn, 0xA720},
});
static u8* l_J_hana01DL_get() { static u8 buf[0x138]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB7C0}, {GameVersion::GcnPal, 0xB7C0}, {GameVersion::GcnJpn, 0xB7C0}}, 0x138), true); return buf; }
static u8* l_J_hana01_c_00DL_get() { static u8 buf[0xDE]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB900}, {GameVersion::GcnPal, 0xB900}, {GameVersion::GcnJpn, 0xB900}}, 0xDE), true); return buf; }
static u8* l_J_hana01_c_01DL_get() { static u8 buf[0x128]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xB9E0}, {GameVersion::GcnPal, 0xB9E0}, {GameVersion::GcnJpn, 0xB9E0}}, 0x128), true); return buf; }
static u8* l_mat2DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xBB20}, {GameVersion::GcnPal, 0xBB20}, {GameVersion::GcnJpn, 0xBB20}}, 0x99), true); return buf; }
static u8* l_mat2Light4DL_get() { static u8 buf[0x99]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0xBBC0}, {GameVersion::GcnPal, 0xBBC0}, {GameVersion::GcnJpn, 0xBBC0}}, 0x99), true); return buf; }
#define l_J_hana01DL (l_J_hana01DL_get())
#define l_J_hana01_c_00DL (l_J_hana01_c_00DL_get())
#define l_J_hana01_c_01DL (l_J_hana01_c_01DL_get())
+92 -9
View File
@@ -21,8 +21,39 @@ const u16 l_M_kusa05_RGBATEX__height = 31;
#if TARGET_PC
#include "dusk/dvd_asset.hpp"
using GameVersion = dusk::version::GameVersion;
static u8* l_M_kusa05_RGBATEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x7680}, {GameVersion::GcnPal, 0x7680}, {GameVersion::GcnJpn, 0x7680}}, 0x800), true); return buf; }
static u8* l_M_Hijiki00TEX_get() { static u8 buf[0x800]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x7E80}, {GameVersion::GcnPal, 0x7E80}, {GameVersion::GcnJpn, 0x7E80}}, 0x800), true); return buf; }
template <typename T, size_t N>
static bool LoadGrassAsset(T (&dst)[N], std::initializer_list<dusk::OffsetVersion> offset) {
return dusk::LoadArchivedRelAsset(dst, 'AMEM', "d_a_grass.rel", offset);
}
#define DEFINE_GRASS_ASSET(name, type, count, ...) \
static type* name##_get() { \
static type buf[count]; \
static bool _ = (LoadGrassAsset(buf, __VA_ARGS__), true); \
return buf; \
}
DEFINE_GRASS_ASSET(l_M_kusa05_RGBATEX, u8, 0x800, {
{GameVersion::GcnUsa, 0x7680},
{GameVersion::GcnPal, 0x7680},
{GameVersion::GcnJpn, 0x7680},
{GameVersion::WiiUsaRev0, 0x6180},
{GameVersion::WiiUsa, 0x61E0},
{GameVersion::WiiPal, 0x61E0},
{GameVersion::WiiJpn, 0x61E0},
});
DEFINE_GRASS_ASSET(l_M_Hijiki00TEX, u8, 0x800, {
{GameVersion::GcnUsa, 0x7E80},
{GameVersion::GcnPal, 0x7E80},
{GameVersion::GcnJpn, 0x7E80},
{GameVersion::WiiUsaRev0, 0x6980},
{GameVersion::WiiUsa, 0x69E0},
{GameVersion::WiiPal, 0x69E0},
{GameVersion::WiiJpn, 0x69E0},
});
#define l_M_kusa05_RGBATEX (l_M_kusa05_RGBATEX_get())
#define l_M_Hijiki00TEX (l_M_Hijiki00TEX_get())
#else
@@ -114,14 +145,66 @@ static u8 l_texCoord[160] = {
};
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
DEFINE_GRASS_ASSET(l_M_Kusa_9qDL, u8, 0xCB, {
{GameVersion::GcnUsa, 0x8B00},
{GameVersion::GcnPal, 0x8B00},
{GameVersion::GcnJpn, 0x8B00},
{GameVersion::WiiUsaRev0, 0x7600},
{GameVersion::WiiUsa, 0x7660},
{GameVersion::WiiPal, 0x7660},
{GameVersion::WiiJpn, 0x7660},
});
DEFINE_GRASS_ASSET(l_M_Kusa_9q_cDL, u8, 0xCB, {
{GameVersion::GcnUsa, 0x8BE0},
{GameVersion::GcnPal, 0x8BE0},
{GameVersion::GcnJpn, 0x8BE0},
{GameVersion::WiiUsaRev0, 0x76E0},
{GameVersion::WiiUsa, 0x7740},
{GameVersion::WiiPal, 0x7740},
{GameVersion::WiiJpn, 0x7740},
});
DEFINE_GRASS_ASSET(l_M_TenGusaDL, u8, 0xD4, {
{GameVersion::GcnUsa, 0x8CC0},
{GameVersion::GcnPal, 0x8CC0},
{GameVersion::GcnJpn, 0x8CC0},
{GameVersion::WiiUsaRev0, 0x77C0},
{GameVersion::WiiUsa, 0x7820},
{GameVersion::WiiPal, 0x7820},
{GameVersion::WiiJpn, 0x7820},
});
DEFINE_GRASS_ASSET(l_Tengusa_matDL, u8, 0xA8, {
{GameVersion::GcnUsa, 0x8DA0},
{GameVersion::GcnPal, 0x8DA0},
{GameVersion::GcnJpn, 0x8DA0},
{GameVersion::WiiUsaRev0, 0x78A0},
{GameVersion::WiiUsa, 0x7900},
{GameVersion::WiiPal, 0x7900},
{GameVersion::WiiJpn, 0x7900},
});
DEFINE_GRASS_ASSET(l_kusa9q_matDL, u8, 0xA8, {
{GameVersion::GcnUsa, 0x8E60},
{GameVersion::GcnPal, 0x8E60},
{GameVersion::GcnJpn, 0x8E60},
{GameVersion::WiiUsaRev0, 0x7960},
{GameVersion::WiiUsa, 0x79C0},
{GameVersion::WiiPal, 0x79C0},
{GameVersion::WiiJpn, 0x79C0},
});
DEFINE_GRASS_ASSET(l_kusa9q_l4_matDL, u8, 0xA8, {
{GameVersion::GcnUsa, 0x8F20},
{GameVersion::GcnPal, 0x8F20},
{GameVersion::GcnJpn, 0x8F20},
{GameVersion::WiiUsaRev0, 0x7A20},
{GameVersion::WiiUsa, 0x7A80},
{GameVersion::WiiPal, 0x7A80},
{GameVersion::WiiJpn, 0x7A80},
});
static u8* l_M_Kusa_9qDL_get() { static u8 buf[0xCB]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8B00}, {GameVersion::GcnPal, 0x8B00}, {GameVersion::GcnJpn, 0x8B00}}, 0xCB), true); return buf; }
static u8* l_M_Kusa_9q_cDL_get() { static u8 buf[0xCB]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8BE0}, {GameVersion::GcnPal, 0x8BE0}, {GameVersion::GcnJpn, 0x8BE0}}, 0xCB), true); return buf; }
static u8* l_M_TenGusaDL_get() { static u8 buf[0xD4]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8CC0}, {GameVersion::GcnPal, 0x8CC0}, {GameVersion::GcnJpn, 0x8CC0}}, 0xD4), true); return buf; }
static u8* l_Tengusa_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8DA0}, {GameVersion::GcnPal, 0x8DA0}, {GameVersion::GcnJpn, 0x8DA0}}, 0xA8), true); return buf; }
static u8* l_kusa9q_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8E60}, {GameVersion::GcnPal, 0x8E60}, {GameVersion::GcnJpn, 0x8E60}}, 0xA8), true); return buf; }
static u8* l_kusa9q_l4_matDL_get() { static u8 buf[0xA8]; static bool _ = (dusk::LoadArchivedRelAsset(buf, 'AMEM', "d_a_grass.rel", {{GameVersion::GcnUsa, 0x8F20}, {GameVersion::GcnPal, 0x8F20}, {GameVersion::GcnJpn, 0x8F20}}, 0xA8), true); return buf; }
#define l_M_Kusa_9qDL (l_M_Kusa_9qDL_get())
#define l_M_Kusa_9q_cDL (l_M_Kusa_9q_cDL_get())
#define l_M_TenGusaDL (l_M_TenGusaDL_get())
+9 -3
View File
@@ -83,7 +83,9 @@ void dBrightCheck_c::screenSet() {
JUT_ASSERT(0, mBrightCheck.Scr != NULL);
mBrightCheck.Scr->setPriority("zelda_option_check.blo", 0x1100000, mArchive);
IF_DUSK_BLOCK(dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn)
mBrightCheck.Scr->search(MULTI_CHAR('g_abtn_n'))->hide();
IF_DUSK_BLOCK_END
#if TARGET_PC
J2DTextBox* settings_text;
@@ -113,9 +115,11 @@ void dBrightCheck_c::screenSet() {
J2DTextBox* btna_text[5];
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(tv_btnA[i]);
mBrightCheck.Scr->search(ftv_btnA[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mBrightCheck.Scr->search(ftv_btnA[i])->hide();
}
} else {
btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(ftv_btnA[i]);
mBrightCheck.Scr->search(tv_btnA[i])->hide();
@@ -222,7 +226,9 @@ void dBrightCheck_c::brightCheckWide() {
// Confirm A Button
mBrightCheck.Scr->search(MULTI_CHAR('abtn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('gcabtn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mBrightCheck.Scr->search(MULTI_CHAR('gcabtn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
// Text
mBrightCheck.Scr->search(MULTI_CHAR('menu_6n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
+16 -12
View File
@@ -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);
+2
View File
@@ -343,7 +343,9 @@ void dMenu_Fishing_c::screenSetBase() {
field_0x19c[1][i]->setString(0x20, "");
mpFishNameString[i] = (J2DTextBox*)mpScreen->search(name_0[i]);
IF_DUSK_BLOCK(dusk::version::isGcn())
mpScreen->search(fname_0[i])->hide();
IF_DUSK_BLOCK_END
mpFishNameString[i]->setFont(mDoExt_getSubFont());
mpFishNameString[i]->setString(0x20, "");
dMeter2Info_getStringKanji(name_id[i], mpFishNameString[i]->getStringPtr(), NULL);
+48 -56
View File
@@ -2420,10 +2420,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
static const u64 farea_name[3] = {MULTI_CHAR('f_name_1'), MULTI_CHAR('f_name3'), MULTI_CHAR('f_name2')};
for (int i = 0; i < 3; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(area_name[i]))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(area_name[i]))->setString(0x40, "");
mpTitleScreen->search(farea_name[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(farea_name[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(farea_name[i]))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(farea_name[i]))->setString(0x40, "");
@@ -2458,10 +2460,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
#endif
for (int i = 0; i < 7; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(sfont_name[i]))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(sfont_name[i]))->setString(0x40, "");
mpTitleScreen->search(ffont_name[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(ffont_name[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(ffont_name[i]))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(ffont_name[i]))->setString(0x40, "");
@@ -2485,10 +2489,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
static const u64 font_zt[5] = {MULTI_CHAR('font_zt1'), MULTI_CHAR('font_zt2'), MULTI_CHAR('font_zt3'), MULTI_CHAR('font_zt4'), MULTI_CHAR('font_zt5')};
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_zt[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_zt[i]))->setString(0x20, "");
mpTitleScreen->search(font_zt[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(font_zt[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(font_zt[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(font_zt[i]))->setString(0x20, "");
@@ -2516,10 +2522,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
#endif
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_bt[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_bt[i]))->setString(0x20, "");
mpTitleScreen->search(font_bt[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(font_bt[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(font_bt[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(font_bt[i]))->setString(0x20, "");
@@ -2543,10 +2551,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
static const u64 font_at[5] = {MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at5')};
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_at[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_at[i]))->setString(0x20, "");
mpTitleScreen->search(font_at[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(font_at[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(font_at[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(font_at[i]))->setString(0x20, "");
@@ -2571,10 +2581,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
static const u64 fuji_c[5] = {MULTI_CHAR('fuji_c00'), MULTI_CHAR('fuji_c01'), MULTI_CHAR('fuji_c02'), MULTI_CHAR('fuji_c03'), MULTI_CHAR('fuji_c04')};
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(juji_c[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(juji_c[i]))->setString(0x20, "");
mpTitleScreen->search(fuji_c[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(fuji_c[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(fuji_c[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(fuji_c[i]))->setString(0x20, "");
@@ -2598,10 +2610,12 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
static const u64 fst_c[5] = {MULTI_CHAR('fst_00'), MULTI_CHAR('fst_01'), MULTI_CHAR('fst_02'), MULTI_CHAR('fst_03'), MULTI_CHAR('fst_04')};
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
static_cast<J2DTextBox*>(mpTitleScreen->search(ast_c[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(ast_c[i]))->setString(0x20, "");
mpTitleScreen->search(fst_c[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTitleScreen->search(fst_c[i])->hide();
}
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(fst_c[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(fst_c[i]))->setString(0x20, "");
@@ -2863,8 +2877,7 @@ void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) {
static const u64 ffont_name[7] = {
MULTI_CHAR('ffont00'), MULTI_CHAR('ffontl0'), MULTI_CHAR('ffontl1'), MULTI_CHAR('ffontl2'), MULTI_CHAR('ffontb0'), MULTI_CHAR('ffontb3'), MULTI_CHAR('ffontb4')
};
auto setTitleNameString_font_name = dusk::version::isRegionJpn() ? sfont_name : ffont_name;
auto setTitleNameString_font_name = dusk::version::isJpnOrLessThanWiiJpn() ? sfont_name : ffont_name;
#elif VERSION == VERSION_GCN_JPN
static const u64 sfont_name[7] = {
MULTI_CHAR('sfont00'), MULTI_CHAR('sfontl0'), MULTI_CHAR('sfontl1'), MULTI_CHAR('sfontl2'), MULTI_CHAR('sfontb0'), MULTI_CHAR('sfontb1'), MULTI_CHAR('sfontb2')
@@ -2883,15 +2896,9 @@ void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) {
#endif
for (int i = 0; i < 7; i++) {
if (param_0 == 0) {
SAFE_STRCPY(((J2DTextBox*)(mpTitleScreen->search(setTitleNameString_font_name[i])))
->getStringPtr(),
"");
SAFE_STRCPY(((J2DTextBox*)(mpTitleScreen->search(setTitleNameString_font_name[i])))->getStringPtr(), "");
} else {
dMeter2Info_getStringKanji(
param_0,
((J2DTextBox*)(mpTitleScreen->search(setTitleNameString_font_name[i])))
->getStringPtr(),
NULL);
dMeter2Info_getStringKanji(param_0, ((J2DTextBox*)(mpTitleScreen->search(setTitleNameString_font_name[i])))->getStringPtr(), NULL);
}
}
}
@@ -2900,7 +2907,7 @@ void dMenu_Fmap2DTop_c::setAreaNameString(u32 param_0) {
#if TARGET_PC
static const u64 iarea_name[3] = {MULTI_CHAR('i_name_s'), MULTI_CHAR('i_name'), MULTI_CHAR('i_name1')};
static const u64 farea_name[3] = {MULTI_CHAR('f_name_1'), MULTI_CHAR('f_name3'), MULTI_CHAR('f_name2')};
auto setAreaNameString_area_name = dusk::version::isRegionJpn() ? iarea_name : farea_name;
auto setAreaNameString_area_name = dusk::version::isJpnOrLessThanWiiJpn() ? iarea_name : farea_name;
#elif VERSION == VERSION_GCN_JPN
static const u64 iarea_name[3] = {MULTI_CHAR('i_name_s'), MULTI_CHAR('i_name'), MULTI_CHAR('i_name1')};
#define setAreaNameString_area_name iarea_name
@@ -2910,15 +2917,9 @@ void dMenu_Fmap2DTop_c::setAreaNameString(u32 param_0) {
#endif
for (int i = 0; i < 3; i++) {
if (param_0 == 0) {
SAFE_STRCPY(((J2DTextBox*)(mpTitleScreen->search(setAreaNameString_area_name[i])))
->getStringPtr(),
"");
SAFE_STRCPY(((J2DTextBox*)(mpTitleScreen->search(setAreaNameString_area_name[i])))->getStringPtr(), "");
} else {
dMeter2Info_getStringKanji(
param_0,
((J2DTextBox*)(mpTitleScreen->search(setAreaNameString_area_name[i])))
->getStringPtr(),
NULL);
dMeter2Info_getStringKanji(param_0, ((J2DTextBox*)(mpTitleScreen->search(setAreaNameString_area_name[i])))->getStringPtr(), NULL);
}
}
}
@@ -2937,7 +2938,7 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) {
#if TARGET_PC
static const u64 cont_zt[5] = {MULTI_CHAR('cont_zt'), MULTI_CHAR('cont_zt1'), MULTI_CHAR('cont_zt2'), MULTI_CHAR('cont_zt3'), MULTI_CHAR('cont_zt4')};
static const u64 font_zt[5] = {MULTI_CHAR('font_zt1'), MULTI_CHAR('font_zt2'), MULTI_CHAR('font_zt3'), MULTI_CHAR('font_zt4'), MULTI_CHAR('font_zt5')};
auto setZButtonString_font_zt = dusk::version::isRegionJpn() ? cont_zt : font_zt;
auto setZButtonString_font_zt = dusk::version::isJpnOrLessThanWiiJpn() ? cont_zt : font_zt;
#elif VERSION == VERSION_GCN_JPN
static const u64 cont_zt[5] = {MULTI_CHAR('cont_zt'), MULTI_CHAR('cont_zt1'), MULTI_CHAR('cont_zt2'), MULTI_CHAR('cont_zt3'), MULTI_CHAR('cont_zt4')};
#define setZButtonString_font_zt cont_zt
@@ -2953,10 +2954,7 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) {
#endif
} else {
for (int i = 0; i < 5; i++) {
dMeter2Info_getStringKanji(
param_0,
((J2DTextBox*)(mpTitleScreen->search(setZButtonString_font_zt[i])))->getStringPtr(),
NULL);
dMeter2Info_getStringKanji(param_0, ((J2DTextBox*)(mpTitleScreen->search(setZButtonString_font_zt[i])))->getStringPtr(), NULL);
}
if (i_alpha == ALPHA_DEFAULT) {
@@ -2975,7 +2973,7 @@ void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) {
#if TARGET_PC
static const u64 cont_bt[5] = {MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4'), MULTI_CHAR('cont_bt')};
static const u64 font_bt[5] = {MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4'), MULTI_CHAR('font_bt5')};
auto setBButtonString_font_bt = dusk::version::isRegionJpn() ? cont_bt : font_bt;
auto setBButtonString_font_bt = dusk::version::isJpnOrLessThanWiiJpn() ? cont_bt : font_bt;
#elif VERSION == VERSION_GCN_JPN
static const u64 cont_bt[5] = {MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4'), MULTI_CHAR('cont_bt')};
#define setBButtonString_font_bt cont_bt
@@ -2987,10 +2985,7 @@ void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) {
mAlphaButtonB = ALPHA_MIN;
} else {
for (int i = 0; i < 5; i++) {
dMeter2Info_getStringKanji(
param_0,
((J2DTextBox*)(mpTitleScreen->search(setBButtonString_font_bt[i])))->getStringPtr(),
NULL);
dMeter2Info_getStringKanji(param_0, ((J2DTextBox*)(mpTitleScreen->search(setBButtonString_font_bt[i])))->getStringPtr(), NULL);
}
if (i_alpha == ALPHA_DEFAULT) {
@@ -3005,7 +3000,7 @@ void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) {
#if TARGET_PC
static const u64 cont_at[5] = {MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')};
static const u64 font_at[5] = {MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at5')};
auto setAButtonString_font_at = dusk::version::isRegionJpn() ? cont_at : font_at;
auto setAButtonString_font_at = dusk::version::isJpnOrLessThanWiiJpn() ? cont_at : font_at;
#elif VERSION == VERSION_GCN_JPN
static const u64 cont_at[5] = {MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')};
#define setAButtonString_font_at cont_at
@@ -3017,10 +3012,7 @@ void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) {
mAlphaButtonA = ALPHA_MIN;
} else {
for (int i = 0; i < 5; i++) {
dMeter2Info_getStringKanji(
param_0,
((J2DTextBox*)(mpTitleScreen->search(setAButtonString_font_at[i])))->getStringPtr(),
NULL);
dMeter2Info_getStringKanji(param_0, ((J2DTextBox*)(mpTitleScreen->search(setAButtonString_font_at[i])))->getStringPtr(), NULL);
}
if (i_alpha == ALPHA_DEFAULT) {
@@ -3034,8 +3026,8 @@ void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) {
void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) {
#if PLATFORM_GCN || (VERSION == VERSION_SHIELD)
#if TARGET_PC
static const u64 juji_c_jpn[5] = {MULTI_CHAR('juji_c00'), MULTI_CHAR('juji_c01'), MULTI_CHAR('juji_c02'), MULTI_CHAR('juji_c03'), MULTI_CHAR('juji_c04')};
static const u64 juji_c[5] = {MULTI_CHAR('fuji_c00'), MULTI_CHAR('fuji_c01'), MULTI_CHAR('fuji_c02'), MULTI_CHAR('fuji_c03'), MULTI_CHAR('fuji_c04')};
static const u64 juji_c[5] = {MULTI_CHAR('juji_c00'), MULTI_CHAR('juji_c01'), MULTI_CHAR('juji_c02'), MULTI_CHAR('juji_c03'), MULTI_CHAR('juji_c04')};
static const u64 fuji_c[5] = {MULTI_CHAR('fuji_c00'), MULTI_CHAR('fuji_c01'), MULTI_CHAR('fuji_c02'), MULTI_CHAR('fuji_c03'), MULTI_CHAR('fuji_c04')};
#elif VERSION == VERSION_GCN_JPN
static const u64 juji_c[5] = {MULTI_CHAR('juji_c00'), MULTI_CHAR('juji_c01'), MULTI_CHAR('juji_c02'), MULTI_CHAR('juji_c03'), MULTI_CHAR('juji_c04')};
#else
@@ -3043,14 +3035,14 @@ void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) {
#endif
if (param_0 == 0) {
for (int i = 0; i < 5; i++) {
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? juji_c_jpn[i] : juji_c[i], juji_c[i])));
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? juji_c[i] : fuji_c[i], juji_c[i])));
SAFE_STRCPY(text_box->getStringPtr(), "");
}
mpTitleScreen->search(MULTI_CHAR('juy_sha0'))->show();
mAlphaDpad = 1;
} else {
for (int i = 0; i < 5; i++) {
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? juji_c_jpn[i] : juji_c[i], juji_c[i])));
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? juji_c[i] : fuji_c[i], juji_c[i])));
dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL);
}
mpTitleScreen->search(MULTI_CHAR('juy_sha0'))->show();
@@ -3062,8 +3054,8 @@ void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) {
void dMenu_Fmap2DTop_c::set3DStickString(u32 param_0) {
#if PLATFORM_GCN || (VERSION == VERSION_SHIELD)
#if TARGET_PC
static const u64 ast_c_jpn[5] = {MULTI_CHAR('ast_00'), MULTI_CHAR('ast_01'), MULTI_CHAR('ast_02'), MULTI_CHAR('ast_03'), MULTI_CHAR('ast_04')};
static const u64 ast_c[5] = {MULTI_CHAR('fst_00'), MULTI_CHAR('fst_01'), MULTI_CHAR('fst_02'), MULTI_CHAR('fst_03'), MULTI_CHAR('fst_04')};
static const u64 ast_c[5] = {MULTI_CHAR('ast_00'), MULTI_CHAR('ast_01'), MULTI_CHAR('ast_02'), MULTI_CHAR('ast_03'), MULTI_CHAR('ast_04')};
static const u64 fst_c[5] = {MULTI_CHAR('fst_00'), MULTI_CHAR('fst_01'), MULTI_CHAR('fst_02'), MULTI_CHAR('fst_03'), MULTI_CHAR('fst_04')};
#elif VERSION == VERSION_GCN_JPN
static const u64 ast_c[5] = {MULTI_CHAR('ast_00'), MULTI_CHAR('ast_01'), MULTI_CHAR('ast_02'), MULTI_CHAR('ast_03'), MULTI_CHAR('ast_04')};
#else
@@ -3071,14 +3063,14 @@ void dMenu_Fmap2DTop_c::set3DStickString(u32 param_0) {
#endif
if (param_0 == 0) {
for (int i = 0; i < 5; i++) {
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? ast_c_jpn[i] : ast_c[i], ast_c[i])));
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? ast_c[i] : fst_c[i], ast_c[i])));
SAFE_STRCPY(text_box->getStringPtr(), "");
}
mpTitleScreen->search(MULTI_CHAR('as_sha0'))->show();
mAlphaAnalogStick = 1;
} else {
for (int i = 0; i < 5; i++) {
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? ast_c_jpn[i] : ast_c[i], ast_c[i])));
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(DUSK_IF_ELSE(dusk::version::isJpnOrLessThanWiiJpn() ? ast_c[i] : fst_c[i], ast_c[i])));
dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL);
}
mpTitleScreen->search(MULTI_CHAR('as_sha0'))->show();
+6 -2
View File
@@ -159,7 +159,9 @@ void dMenu_Option_c::_create() {
mpTVButtonText = JKR_NEW CPaneMgr(mpTVScreen, MULTI_CHAR('a_text_n'), 0, NULL);
JUT_ASSERT(298, mpTVButtonText != NULL);
IF_DUSK_BLOCK(dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn)
mpTVScreen->search(MULTI_CHAR('g_abtn_n'))->hide();
IF_DUSK_BLOCK_END
mpScreenIcon = JKR_NEW J2DScreen();
JUT_ASSERT(325, mpScreenIcon != NULL);
@@ -1710,9 +1712,11 @@ void dMenu_Option_c::screenSet() {
mpString->getString(0x55C, field_0x270[2], NULL, NULL, NULL, 0);
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(tv_btnA[i]);
mpTVScreen->search(ftv_btnA[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpTVScreen->search(ftv_btnA[i])->hide();
}
} else {
field_0x25c[i] = (J2DTextBox*)mpTVScreen->search(ftv_btnA[i]);
mpTVScreen->search(tv_btnA[i])->hide();
+44 -32
View File
@@ -333,11 +333,13 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
mpScreen->search(MULTI_CHAR('yx_te_s3'))->hide();
mpScreen->search(MULTI_CHAR('yx_te_s4'))->hide();
mpScreen->search(MULTI_CHAR('yx_text'))->hide();
IF_DUSK_BLOCK(dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn)
mpScreen->search(MULTI_CHAR('fyx_te_1'))->hide();
mpScreen->search(MULTI_CHAR('fyx_te_2'))->hide();
mpScreen->search(MULTI_CHAR('fyx_te_3'))->hide();
mpScreen->search(MULTI_CHAR('fyx_te_4'))->hide();
mpScreen->search(MULTI_CHAR('fyx_tex'))->hide();
IF_DUSK_BLOCK_END
mpScreen->search(MULTI_CHAR('x_btn_n'))->hide();
mpScreen->search(MULTI_CHAR('y_btn_n'))->hide();
}
@@ -345,9 +347,11 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
for (i = 0; i < 5; i++) {
#if TARGET_PC
J2DTextBox* fxy_TextBox;
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]);
mpScreen->search(fxy_text[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(fxy_text[i])->hide();
}
} else {
fxy_TextBox = (J2DTextBox*)mpScreen->search(fxy_text[i]);
mpScreen->search(xy_text[i])->hide();
@@ -366,13 +370,17 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
for (i = 0; i < 5; i++) {
#if TARGET_PC
J2DTextBox* fc_TextBox;
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
if (dusk::getSettings().game.swapDirectSelect) {
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(fc_text1[i])->hide();
}
} else {
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(fc_text[i])->hide();
}
}
} else {
if (dusk::getSettings().game.swapDirectSelect) {
@@ -397,13 +405,17 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
for (i = 0; i < 5; i++) {
#if TARGET_PC
J2DTextBox* fc1_TextBox;
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
if (dusk::getSettings().game.swapDirectSelect) {
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(fc_text[i])->hide();
}
} else {
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(fc_text1[i])->hide();
}
}
} else {
if (dusk::getSettings().game.swapDirectSelect) {
@@ -427,9 +439,11 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
}
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]);
mpScreen->search(ft_on[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(ft_on[i])->hide();
}
} else {
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(ft_on[i]);
mpScreen->search(t_on[i])->hide();
@@ -447,9 +461,11 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
}
for (int i = 0; i < 5; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]);
mpScreen->search(ft_off[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpScreen->search(ft_off[i])->hide();
}
} else {
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(ft_off[i]);
mpScreen->search(t_off[i])->hide();
@@ -486,19 +502,21 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
mpCircle = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('circle_n'), 2, NULL);
J2DTextBox* textBox[4];
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06'));
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n07'));
J2DPane* pane = mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
pane->mVisible = false;
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
pane->mVisible = false;
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
pane->mVisible = false;
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
pane->mVisible = false;
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
J2DPane* pane = mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
pane->mVisible = false;
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
pane->mVisible = false;
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
pane->mVisible = false;
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
pane->mVisible = false;
}
} else {
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
@@ -1292,17 +1310,11 @@ void dMenu_Ring_c::setScale() {
void dMenu_Ring_c::setNameString(u32 i_stringID) {
J2DTextBox* textBox[4];
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06'));
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n07'));
} else {
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
}
const bool useDomestic = dusk::version::isJpnOrLessThanWiiJpn();
textBox[0] = (J2DTextBox*)mpCenterScreen->search(useDomestic ? MULTI_CHAR('item_n04') : MULTI_CHAR('fitem_n1'));
textBox[1] = (J2DTextBox*)mpCenterScreen->search(useDomestic ? MULTI_CHAR('item_n05') : MULTI_CHAR('fitem_n2'));
textBox[2] = (J2DTextBox*)mpCenterScreen->search(useDomestic ? MULTI_CHAR('item_n06') : MULTI_CHAR('fitem_n3'));
textBox[3] = (J2DTextBox*)mpCenterScreen->search(useDomestic ? MULTI_CHAR('item_n07') : MULTI_CHAR('fitem_n4'));
#elif VERSION == VERSION_GCN_JPN
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
+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);
}
+4 -2
View File
@@ -1208,9 +1208,11 @@ void dMeterButton_c::screenInitButton() {
for (int i = 0; i < 10; i++) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dusk::version::isJpnOrLessThanWiiJpn()) {
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(text_tag[i]);
mpButtonScreen->search(ftext_tag[i])->hide();
if (dusk::version::getGameVersion() >= dusk::version::GameVersion::WiiJpn) {
mpButtonScreen->search(ftext_tag[i])->hide();
}
} else {
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(ftext_tag[i]);
mpButtonScreen->search(text_tag[i])->hide();
+5 -30
View File
@@ -30,6 +30,7 @@
#include "m_Do/m_Do_lib.h"
#if TARGET_PC
#include "dusk/language.hpp"
#include "dusk/menu_pointer.h"
#include "dusk/settings.h"
#include "dusk/version.hpp"
@@ -1731,7 +1732,9 @@ void dMsgObject_c::readMessageGroupLocal(mDoDvdThd_mountXArchive_c** p_arcMount)
#endif
int msgGroup = dStage_stagInfo_GetMsgGroup(dComIfGp_getStage()->getStagInfo());
#if REGION_PAL
#if TARGET_PC
snprintf(arcName, sizeof(arcName), "/res/%s/bmgres%d.arc", dusk::language::msg_folder(), msgGroup);
#elif REGION_PAL
switch (dComIfGs_getPalLanguage()) {
case dSv_player_config_c::LANGUAGE_GERMAN:
sprintf(arcName, "/res/Msgde/bmgres%d.arc", msgGroup);
@@ -1748,39 +1751,11 @@ void dMsgObject_c::readMessageGroupLocal(mDoDvdThd_mountXArchive_c** p_arcMount)
default:
sprintf(arcName, "/res/Msguk/bmgres%d.arc", msgGroup);
}
#elif REGION_JPN
#elif REGION_JPN
sprintf(arcName, "/res/Msgjp/bmgres%d.arc", msgGroup);
#else
#if TARGET_PC
// Original game UB
if (dusk::version::isRegionPal()) {
switch (dComIfGs_getPalLanguage()) {
case dSv_player_config_c::LANGUAGE_GERMAN:
snprintf(arcName, sizeof(arcName), "/res/Msgde/bmgres%d.arc", msgGroup);
break;
case dSv_player_config_c::LANGUAGE_FRENCH:
snprintf(arcName, sizeof(arcName), "/res/Msgfr/bmgres%d.arc", msgGroup);
break;
case dSv_player_config_c::LANGUAGE_SPANISH:
snprintf(arcName, sizeof(arcName), "/res/Msgsp/bmgres%d.arc", msgGroup);
break;
case dSv_player_config_c::LANGUAGE_ITALIAN:
snprintf(arcName, sizeof(arcName), "/res/Msgit/bmgres%d.arc", msgGroup);
break;
default:
snprintf(arcName, sizeof(arcName), "/res/Msguk/bmgres%d.arc", msgGroup);
}
} else if (dusk::version::isRegionJpn()) {
snprintf(arcName, sizeof(arcName), "/res/Msgjp/bmgres%d.arc", msgGroup);
} else {
snprintf(arcName, sizeof(arcName), "/res/Msgus/bmgres%d.arc", msgGroup);
}
#else
sprintf(arcName, "/res/Msgus/bmgres%d.arc", msgGroup);
#endif
#endif
*p_arcMount = mDoDvdThd_mountXArchive_c::create(arcName, 0, JKRArchive::MOUNT_MEM, NULL);

Some files were not shown because too many files have changed in this diff Show More