Merge with origin/main

This commit is contained in:
jdflyer
2026-07-20 17:24:48 -07:00
75 changed files with 3709 additions and 646 deletions
+10 -3
View File
@@ -28,6 +28,7 @@
#include "dusk/settings.h"
#include "dusk/speedrun.h"
#include "dusk/gamemode.hpp"
#include "dusk/version.hpp"
#endif
BOOL daAlink_c::checkEventRun() const {
@@ -4402,8 +4403,10 @@ void daAlink_c::checkWarpStart() {
if (dMeter2Info_getWarpStatus() == WARP_STATUS_DECIDED_e ||
dComIfGp_event_compulsory(this, 0, 0xFFFF))
{
#if VERSION != VERSION_GCN_JPN && VERSION != VERSION_SHIELD_DEBUG
#if TARGET_PC || (VERSION != VERSION_GCN_JPN && VERSION != VERSION_SHIELD_DEBUG)
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
onNoResetFlg0(FLG0_UNK_4000);
IF_DUSK_BLOCK_END
#endif
if (dMeter2Info_getWarpStatus() == WARP_STATUS_DECIDED_e) {
@@ -4431,8 +4434,10 @@ void daAlink_c::checkWarpStart() {
fopAcM_orderOtherEvent(this, portal, 0xFFFF, 1, 1);
} else {
mDemo.setSpecialDemoType();
#if VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG
#if TARGET_PC || (VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG)
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
onNoResetFlg0(FLG0_UNK_4000);
IF_DUSK_BLOCK_END
#endif
if (dMeter2Info_getWarpStatus() == 1) {
@@ -4516,10 +4521,12 @@ int daAlink_c::procCoWarpInit(int param_0, int param_1) {
soundId = Z2SE_WOLF_WARP_IN_TATE;
}
#if VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG
#if TARGET_PC || (VERSION == VERSION_GCN_JPN || VERSION == VERSION_SHIELD_DEBUG)
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
if (param_1) {
onNoResetFlg0(FLG0_UNK_4000);
}
IF_DUSK_BLOCK_END
#endif
if (param_1) {
+5 -1
View File
@@ -21,6 +21,8 @@
#include "Z2AudioLib/Z2Instances.h"
#include <cstring>
#include "dusk/version.hpp"
class daE_MK_HIO_c : public JORReflexible {
public:
virtual ~daE_MK_HIO_c() {}
@@ -612,8 +614,10 @@ static void e_mk_shoot(e_mk_class* i_this) {
i_this->sound.startCreatureVoice(Z2SE_EN_MK_V_CATCH_BOOM, -1);
i_this->sound.startCreatureSound(Z2SE_EN_MK_CATCH_BOOM, 0, -1);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
return;
IF_DUSK_BLOCK_END
#endif
}
}
+7 -4
View File
@@ -5,12 +5,13 @@
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_e_mk_bo.h"
#include "Z2AudioLib/Z2Instances.h"
#include "c/c_damagereaction.h"
#include "d/actor/d_a_e_mk.h"
#include "d/actor/d_a_e_mk_bo.h"
#include "d/actor/d_a_player.h"
#include "d/d_s_play.h"
#include "c/c_damagereaction.h"
#include "Z2AudioLib/Z2Instances.h"
#include "dusk/version.hpp"
static int daE_MK_BO_Draw(e_mk_bo_class* i_this) {
if (i_this->field_0x9b4 != 0) {
@@ -569,8 +570,10 @@ static int daE_MK_BO_Execute(e_mk_bo_class* i_this) {
if (i_this->field_0x600 != 0) {
fopAcM_delete(actor);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
return 1;
IF_DUSK_BLOCK_END
#endif
}
+5 -2
View File
@@ -3,9 +3,10 @@
*
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_e_mm_mt.h"
#include "d/d_cc_d.h"
#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "dusk/version.hpp"
#include "f_op/f_op_actor_enemy.h"
static int daE_MM_MT_Draw(e_mm_mt_class* i_this) {
@@ -802,7 +803,9 @@ static int daE_MM_MT_Create(fopAc_ac_c* i_this) {
if (i_this->argument == 1) {
fopAcM_OffStatus(i_this, 0x80000);
helmasaurShell->m_sphere.SetAtType(
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
dusk::version::isRegionJpn() ? AT_TYPE_CSTATUE_SWING : 0xD8FBBDFF
#elif VERSION == VERSION_GCN_JPN
AT_TYPE_CSTATUE_SWING
#else
0xD8FBBDFF
+4 -1
View File
@@ -19,6 +19,7 @@
#include "d/actor/d_a_obj_smw_stone.h"
#include "f_op/f_op_actor_enemy.h"
#include "f_op/f_op_camera_mng.h"
#include "dusk/version.hpp"
class daE_PM_HIO_c {
public:
@@ -816,10 +817,12 @@ void daE_PM_c::DemoBeforeEscape() {
for (int i = 0; i < 4; i++) {
e_fs_class* puppet;
if (fopAcM_SearchByID(mPuppetID[i], (fopAc_ac_c**)&puppet)) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
if (puppet == NULL) {
continue;
}
IF_DUSK_BLOCK_END
#endif
puppet->mAction = e_fs_class::ACT_END;
puppet->mMode = 0;
+6 -6
View File
@@ -18,9 +18,9 @@
using GameVersion = dusk::version::GameVersion;
// 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}}, 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}}, 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}}, 0x60), true); return buf; }
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 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())
@@ -36,8 +36,8 @@ 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}}, 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}}, 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 l_texCoord (l_texCoord_get())
@@ -55,7 +55,7 @@ static bool l_Egnd_mantTEX_hasReplacement = false;
#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}}, 0x3EC), true); return buf; }
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"
+7 -1
View File
@@ -1783,7 +1783,13 @@ static int daFshop_Create(fopAc_ac_c* actor) {
};
if (sp10 == 1) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
sp24 = dComIfGs_getEventReg(check_kind[i]);
} else {
sp24 = 2.54f * dComIfGs_getEventReg(check_kind[i]);
}
#elif VERSION == VERSION_GCN_JPN
sp24 = dComIfGs_getEventReg(check_kind[i]);
#else
sp24 = 2.54f * dComIfGs_getEventReg(check_kind[i]);
+11 -11
View File
@@ -13,7 +13,7 @@ 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}}, 0x800), true); return buf; }
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 l_J_Ohana00_64TEX (l_J_Ohana00_64TEX_get())
// from d_grass.inc
@@ -117,10 +117,10 @@ static u8 l_flowerTexCoord[] = {
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
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}}, 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}}, 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}}, 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}}, 0x99), true); return buf; }
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())
@@ -142,7 +142,7 @@ 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}}, 0x1000), true); return buf; }
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 l_J_Ohana01_64128_0419TEX (l_J_Ohana01_64128_0419TEX_get())
#else
#include "assets/l_J_Ohana01_64128_0419TEX.h"
@@ -276,11 +276,11 @@ static u8 l_flowerTexCoord2[] = {
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
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}}, 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}}, 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}}, 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}}, 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}}, 0x99), true); return buf; }
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())
+8 -8
View File
@@ -21,8 +21,8 @@ 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}}, 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}}, 0x800), true); return buf; }
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; }
#define l_M_kusa05_RGBATEX (l_M_kusa05_RGBATEX_get())
#define l_M_Hijiki00TEX (l_M_Hijiki00TEX_get())
#else
@@ -116,12 +116,12 @@ static u8 l_texCoord[160] = {
#if TARGET_PC
using GameVersion = dusk::version::GameVersion;
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}}, 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}}, 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}}, 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}}, 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}}, 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}}, 0xA8), true); return buf; }
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())
+46 -7
View File
@@ -19,6 +19,8 @@
#include "dusk/gamemode.hpp"
#endif
#include "dusk/version.hpp"
dBrightCheck_c::dBrightCheck_c(JKRArchive* i_archive) {
mArchive = i_archive;
mBrightCheck.mMsgString = JKR_NEW dMsgString_c();
@@ -43,7 +45,16 @@ void dBrightCheck_c::screenSet() {
MULTI_CHAR('font_a1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at'),
};
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
static u64 const txTV_jpn[] = {
MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'),
MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'),
};
static u64 const txTV[] = {
MULTI_CHAR('menu_t61'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t91'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menut101'),
MULTI_CHAR('menu_t01'), MULTI_CHAR('menu_t71'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t81'), MULTI_CHAR('menu_t4'),
};
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
static u64 const txTV[] = {
MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'),
MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'),
@@ -55,7 +66,14 @@ void dBrightCheck_c::screenSet() {
};
#endif
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
static u64 const txTVhide_jpn[] = {
MULTI_CHAR('fmenu_6n'), MULTI_CHAR('fmenu_9n'), MULTI_CHAR('fmenu_10'), MULTI_CHAR('fmenu_7n'), MULTI_CHAR('fmenu_8n'),
};
static u64 const txTVhide[] = {
MULTI_CHAR('menu_6n'), MULTI_CHAR('menu_9n'), MULTI_CHAR('menu_10n'), MULTI_CHAR('menu_7n'), MULTI_CHAR('menu_8n'),
};
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
static u64 const txTVhide[] = {
MULTI_CHAR('fmenu_6n'), MULTI_CHAR('fmenu_9n'), MULTI_CHAR('fmenu_10'), MULTI_CHAR('fmenu_7n'), MULTI_CHAR('fmenu_8n'),
};
@@ -71,7 +89,18 @@ void dBrightCheck_c::screenSet() {
mBrightCheck.Scr->search(MULTI_CHAR('g_abtn_n'))->hide();
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
J2DTextBox* settings_text;
if (dusk::version::isRegionJpn()) {
settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('t_t00'));
mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->show();
mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->hide();
} else {
settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('f_t00'));
mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->show();
mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
J2DTextBox* settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('t_t00'));
mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->show();
mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->hide();
@@ -87,7 +116,15 @@ void dBrightCheck_c::screenSet() {
J2DTextBox* btna_text[5];
for (int i = 0; i < 5; i++) {
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(tv_btnA[i]);
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();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
btna_text[i] = (J2DTextBox*)mBrightCheck.Scr->search(tv_btnA[i]);
mBrightCheck.Scr->search(ftv_btnA[i])->hide();
#else
@@ -101,15 +138,17 @@ void dBrightCheck_c::screenSet() {
}
for (int i = 0; i < 5; i++) {
mBrightCheck.Scr->search(txTVhide[i])->hide();
mBrightCheck.Scr->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? txTVhide_jpn[i] : txTVhide[i], txTVhide[i]))->hide();
}
for (int i = 0; i < 10; i++) {
J2DTextBox* check_text = (J2DTextBox*)mBrightCheck.Scr->search(txTV[i]);
J2DTextBox* check_text = (J2DTextBox*)mBrightCheck.Scr->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? txTV_jpn[i] : txTV[i], txTV[i]));
check_text->setFont(mDoExt_getMesgFont());
#if (VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN)
#if TARGET_PC || ((VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN))
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
check_text->setCharSpace(0.0f);
IF_DUSK_BLOCK_END
#endif
if (i < 2) {
+26 -3
View File
@@ -46,8 +46,19 @@ void dFile_info_c::screenSet() {
J2DTextBox* info_text[4];
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01'));
info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01'));
mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02'))->hide();
mFileInfo.Scr->search(MULTI_CHAR('f_p_t_02'))->hide();
} else {
info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02'));
info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_p_t_02'));
mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01'))->hide();
mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_s_t_01'));
info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_p_t_01'));
mFileInfo.Scr->search(MULTI_CHAR('f_s_t_02'))->hide();
@@ -66,7 +77,19 @@ void dFile_info_c::screenSet() {
dMeter2Info_getString(0x3D0, info_text[0]->getStringPtr(), NULL); // Save time
dMeter2Info_getString(0x3D1, info_text[1]->getStringPtr(), NULL); // Total play time
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_name01'));
info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_new_1'));
mFileInfo.Scr->search(MULTI_CHAR('f_name01'))->hide();
mFileInfo.Scr->search(MULTI_CHAR('f_new_1'))->hide();
} else {
info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_name01'));
info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('f_new_1'));
mFileInfo.Scr->search(MULTI_CHAR('w_name01'))->hide();
mFileInfo.Scr->search(MULTI_CHAR('w_new_1'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
info_text[0] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_name01'));
info_text[1] = (J2DTextBox*)mFileInfo.Scr->search(MULTI_CHAR('w_new_1'));
mFileInfo.Scr->search(MULTI_CHAR('f_name01'))->hide();
+18 -5
View File
@@ -4,13 +4,14 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "d/d_com_inf_game.h"
#include "d/d_file_sel_warning.h"
#include "d/d_msg_string.h"
#include "d/d_pane_class.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "d/d_com_inf_game.h"
#include "dusk/version.hpp"
typedef void (dFile_warning_c::*procFunc)();
static procFunc fileWarningProc[] = {&dFile_warning_c::modeWait, &dFile_warning_c::modeMove};
@@ -63,7 +64,19 @@ void dFile_warning_c::screenSet() {
JUT_ASSERT(0, mpRootPane != NULL);
field_0x34 = mpRootPane->getTranslateY();
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mFileWarn.Scr->search(MULTI_CHAR('ms_for_2'))->hide();
mFileWarn.Scr->search(MULTI_CHAR('ms_for_3'))->hide();
field_0x20 = static_cast<J2DTextBox*>(mFileWarn.Scr->search(MULTI_CHAR('w_msg_jp')));
} else {
mFileWarn.Scr->search(MULTI_CHAR('w_msg_jp'))->hide();
mFileWarn.Scr->search(MULTI_CHAR('ms_for_2'))->hide();
field_0x20 = static_cast<J2DTextBox*>(mFileWarn.Scr->search(MULTI_CHAR('ms_for_3')));
}
#elif REGION_JPN
mFileWarn.Scr->search(MULTI_CHAR('ms_for_2'))->hide();
mFileWarn.Scr->search(MULTI_CHAR('ms_for_3'))->hide();
+94 -17
View File
@@ -23,6 +23,8 @@
#include "m_Do/m_Do_graphic.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/menu_pointer.h"
#include "helpers/string.hpp"
@@ -3184,8 +3186,10 @@ void dFile_select_c::screenSet() {
static u64 l_nouseTag[15] = {MULTI_CHAR('w_mcheck'), MULTI_CHAR('w_tabi1'), MULTI_CHAR('w_tabi2'), MULTI_CHAR('w_tabi3'), MULTI_CHAR('w_doko_c'),
MULTI_CHAR('w_uwa_c'), MULTI_CHAR('w_cp_chu'), MULTI_CHAR('w_cpsita'), MULTI_CHAR('w_cp_x'), 'w_de',
MULTI_CHAR('w_de_chu'), MULTI_CHAR('w_desita'), MULTI_CHAR('w_de_x'), MULTI_CHAR('w_name'), MULTI_CHAR('w_h_name')};
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
static u64 l_tagName21_jpn[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')};
static u64 l_tagName21[2] = {MULTI_CHAR('t_for'), MULTI_CHAR('t_for1')};
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
static u64 l_tagName21[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')};
#else
static u64 l_tagName21[2] = {MULTI_CHAR('t_for'), MULTI_CHAR('t_for1')};
@@ -3194,7 +3198,10 @@ void dFile_select_c::screenSet() {
static u64 l_tagName18[3] = {MULTI_CHAR('w_de_ef0'), MULTI_CHAR('w_de_ef1'), MULTI_CHAR('w_de_ef2')};
static u64 l_tagName19[3] = {MULTI_CHAR('w_cp_ef0'), MULTI_CHAR('w_cp_ef1'), MULTI_CHAR('w_cp_ef2')};
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
static u64 l_tagName20_jpn[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')};
static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')};
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
static u64 l_tagName20[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')};
#else
static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')};
@@ -3230,7 +3237,19 @@ void dFile_select_c::screenSet() {
mBbtnPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_n_bbtn'), 2, NULL);
mAbtnPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_n_abtn'), 2, NULL);
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mModoruTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_modo'), 2, NULL);
mKetteiTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_kete'), 2, NULL);
fileSel.Scr->search(MULTI_CHAR('f_modo'))->hide();
fileSel.Scr->search(MULTI_CHAR('f_kete'))->hide();
} else {
mModoruTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('f_modo'), 2, NULL);
mKetteiTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('f_kete'), 2, NULL);
fileSel.Scr->search(MULTI_CHAR('w_modo'))->hide();
fileSel.Scr->search(MULTI_CHAR('w_kete'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
mModoruTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_modo'), 2, NULL);
mKetteiTxtPane = JKR_NEW CPaneMgrAlpha(fileSel.Scr, MULTI_CHAR('w_kete'), 2, NULL);
fileSel.Scr->search(MULTI_CHAR('f_modo'))->hide();
@@ -3306,7 +3325,17 @@ void dFile_select_c::screenSet() {
fileSel.Scr->search(l_nouseTag[i])->hide();
}
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
fileSel.Scr->search(MULTI_CHAR('t_for'))->hide();
fileSel.Scr->search(MULTI_CHAR('t_for1'))->hide();
} else {
fileSel.Scr->search(MULTI_CHAR('w_tabi_s'))->hide();
fileSel.Scr->search(MULTI_CHAR('w_tabi_x'))->hide();
fileSel.Scr->search(MULTI_CHAR('w_mgn1'))->hide();
fileSel.Scr->search(MULTI_CHAR('w_mgn2'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
fileSel.Scr->search(MULTI_CHAR('t_for'))->hide();
fileSel.Scr->search(MULTI_CHAR('t_for1'))->hide();
#else
@@ -3317,10 +3346,20 @@ void dFile_select_c::screenSet() {
#endif
for (int i = 0; i < 2; i++) {
mHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, l_tagName21[i], 0, NULL);
mHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName21_jpn[i] : l_tagName21[i], l_tagName21[i]), 0, NULL);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFont(fileSel.font[0]);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setString(512, "");
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
} else {
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFontSize(24.0f, 24.0f);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setLineSpace(20.0f);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setCharSpace(0.0f);
}
#elif VERSION == VERSION_GCN_JPN
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
@@ -3361,8 +3400,15 @@ void dFile_select_c::screenSet() {
field_0x0208 = 0;
field_0x0209 = 0;
mErrorMsgPane = fileSel.Scr->search(MULTI_CHAR('w_er_n'));
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
fileSel.Scr->search(MULTI_CHAR('er_for0'))->hide();
fileSel.Scr->search(MULTI_CHAR('er_for1'))->hide();
} else {
fileSel.Scr->search(MULTI_CHAR('w_er_msg'))->hide();
fileSel.Scr->search(MULTI_CHAR('w_er_msR'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
fileSel.Scr->search(MULTI_CHAR('er_for0'))->hide();
fileSel.Scr->search(MULTI_CHAR('er_for1'))->hide();
#else
@@ -3373,17 +3419,27 @@ void dFile_select_c::screenSet() {
fileSel.Scr->search(MULTI_CHAR('w_er_msE'))->hide();
for (int i = 0; i < 2; i++) {
mErrorMsgTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, l_tagName20[i], 0, NULL);
mErrorMsgTxtPane[i] = JKR_NEW CPaneMgrAlpha(fileSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName20_jpn[i] : l_tagName20[i], l_tagName20[i]), 0, NULL);
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setFont(fileSel.font[0]);
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setString(512, "");
#if (VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN)
#if TARGET_PC || ((VERSION != VERSION_GCN_JPN) && (VERSION != VERSION_WII_JPN))
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
mErrorMsgTxtPane[i]->getPanePtr()->resize(440.0f, 198.0f);
IF_DUSK_BLOCK_END
#endif
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
} else {
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setLineSpace(21.0f);
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setCharSpace(1.0f);
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mErrorMsgTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
#else
@@ -3579,7 +3635,15 @@ void dFile_select_c::screenSetYesNo() {
for (int i = 0; i < 2; i++) {
mYnSelPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName012[i], 0, NULL);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mYnSelTxtPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName013[i], 0, NULL);
mYnSel.ScrYn->search(l_tagName013U[i])->hide();
} else {
mYnSelTxtPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName013U[i], 0, NULL);
mYnSel.ScrYn->search(l_tagName013[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mYnSelTxtPane[i] = JKR_NEW CPaneMgr(mYnSel.ScrYn, l_tagName013[i], 0, NULL);
mYnSel.ScrYn->search(l_tagName013U[i])->hide();
#else
@@ -3657,7 +3721,15 @@ void dFile_select_c::screenSet3Menu() {
for (int i = 0; i < 3; i++) {
m3mSelPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName1[i], 0, NULL);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
m3mSelTextPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName011[i], 0, NULL);
m3mSel.Scr3m->search(l_tagName011U[i])->hide();
} else {
m3mSelTextPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName011U[i], 0, NULL);
m3mSel.Scr3m->search(l_tagName011[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
m3mSelTextPane[i] = JKR_NEW CPaneMgr(m3mSel.Scr3m, l_tagName011[i], 0, NULL);
m3mSel.Scr3m->search(l_tagName011U[i])->hide();
#else
@@ -3777,7 +3849,12 @@ void dFile_select_c::headerTxtSet(u16 i_msgId, u8 i_type, u8 param_3) {
SAFE_STRCPY(mHeaderStringPtr[dispIdx], "");
} else {
static f32 fontsize[2] = {21.0f, 27.0f};
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
static f32 linespace_jpn[2] = {22.0f, 20.0f};
static f32 charspace_jpn[2] = {2.0f, 3.0f};
static f32 linespace[2] = {21.0f, 20.0f};
static f32 charspace[2] = {0.0f, 0.0f};
#elif VERSION == VERSION_GCN_JPN
static f32 linespace[2] = {22.0f, 20.0f};
static f32 charspace[2] = {2.0f, 3.0f};
#else
@@ -3787,8 +3864,8 @@ void dFile_select_c::headerTxtSet(u16 i_msgId, u8 i_type, u8 param_3) {
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setFont(fileSel.font[i_type]);
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setFontSize(fontsize[i_type], fontsize[i_type]);
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setLineSpace(linespace[i_type]);
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setCharSpace(charspace[i_type]);
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setLineSpace(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? linespace_jpn[i_type] : linespace[i_type], linespace[i_type]));
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr())->setCharSpace(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? charspace_jpn[i_type] : charspace[i_type], charspace[i_type]));
fileSel.mMessageString->getString(i_msgId,
((J2DTextBox*)mHeaderTxtPane[dispIdx]->getPanePtr()), NULL,
fileSel.font[i_type], NULL, 0);
+14 -4
View File
@@ -12,6 +12,8 @@
#include "m_Do/m_Do_graphic.h"
#include "m_Do/m_Do_lib.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/frame_interpolation.h"
#endif
@@ -2386,10 +2388,12 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* ppos, GXColor& unused, u8** tex) {
u8 draw_sun = false;
u16 date = dComIfGs_getDate();
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
if (g_env_light.hide_vrbox) {
return;
}
IF_DUSK_BLOCK_END
#endif
if (strcmp(dComIfGp_getStartStageName(), "F_SP200") == 0) {
@@ -2754,10 +2758,12 @@ void dKyr_drawLenzflare(Mtx drawMtx, cXyz* ppos, GXColor& param_2, u8** tex) {
static s16 S_rot_work1 = 0;
static s16 S_rot_work2 = 0;
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
if (g_env_light.hide_vrbox) {
return;
}
IF_DUSK_BLOCK_END
#endif
Mtx camMtx;
@@ -4223,10 +4229,12 @@ void dKyr_drawStar(Mtx drawMtx, u8** tex) {
csXyz(0, 30000, 19000),
};
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
if (g_env_light.hide_vrbox) {
return;
}
IF_DUSK_BLOCK_END
#endif
if (star_packet->mEffectNum != 0) {
@@ -4770,10 +4778,12 @@ void drawVrkumo(Mtx drawMtx, GXColor& color, u8** tex) {
int pass = 1;
f32 spC4 = 0.0f;
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
if (g_env_light.hide_vrbox) {
return;
}
IF_DUSK_BLOCK_END
#endif
cXyz sp15C;
+179 -23
View File
@@ -5,36 +5,37 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_menu_collect.h"
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
#include <cstring>
#include <os.h>
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
#include "d/actor/d_a_alink.h"
#include "d/d_select_cursor.h"
#include "d/d_item.h"
#include "d/d_lib.h"
#include "d/d_menu_collect.h"
#include "d/d_menu_fishing.h"
#include "d/d_menu_insect.h"
#include "d/d_menu_letter.h"
#include "d/d_menu_option.h"
#include "d/d_menu_save.h"
#include "d/d_menu_skill.h"
#include "d/d_menu_window.h"
#include "d/d_meter2_info.h"
#include "d/d_meter_HIO.h"
#include "d/d_msg_class.h"
#include "d/d_msg_object.h"
#include "d/d_msg_string.h"
#include "d/d_pane_class.h"
#include "d/d_item.h"
#include "d/d_lib.h"
#include "d/d_meter2_info.h"
#include <os.h>
#include <cstring>
#include "d/d_select_cursor.h"
#include "dusk/version.hpp"
#include "m_Do/m_Do_graphic.h"
#include "m_Do/m_Do_mtx.h"
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "d/d_menu_window.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#if TARGET_PC
#include "dusk/menu_pointer.h"
@@ -438,7 +439,21 @@ void dMenu_Collect2D_c::screenSet() {
static const u64 text_a_tag[5] = {MULTI_CHAR('atext1_1'), MULTI_CHAR('atext1_2'), MULTI_CHAR('atext1_3'), MULTI_CHAR('atext1_4'), MULTI_CHAR('atext1_5')};
static const u64 text_b_tag[5] = {MULTI_CHAR('btext1_1'), MULTI_CHAR('btext1_2'), MULTI_CHAR('btext1_3'), MULTI_CHAR('btext1_4'), MULTI_CHAR('btext1_5')};
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('t_t00')))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('t_t00')))->setString(0x20, "");
dMeter2Info_getStringKanji(
0x3E1, static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('t_t00')))->getStringPtr(), NULL);
mpScreen->search(MULTI_CHAR('f_t00'))->hide();
} else {
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_t00')))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_t00')))->setString(0x20, "");
dMeter2Info_getStringKanji(
0x3E1, static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_t00')))->getStringPtr(), NULL);
mpScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif REGION_JPN
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('t_t00')))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('t_t00')))->setString(0x20, "");
dMeter2Info_getStringKanji(
@@ -453,7 +468,31 @@ void dMenu_Collect2D_c::screenSet() {
#endif
for (int i = 0; i < 3; i++) {
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
static_cast<J2DTextBox*>(mpScreen->search(text_sv[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(text_op[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(text_sv[i]))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(text_op[i]))->setString(0x20, "");
dMeter2Info_getStringKanji(
0x60, static_cast<J2DTextBox*>(mpScreen->search(text_sv[i]))->getStringPtr(), NULL);
dMeter2Info_getStringKanji(
0x5F, static_cast<J2DTextBox*>(mpScreen->search(text_op[i]))->getStringPtr(), NULL);
mpScreen->search(ftext_sv[i])->hide();
mpScreen->search(ftext_op[i])->hide();
} else {
static_cast<J2DTextBox*>(mpScreen->search(ftext_sv[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(ftext_op[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(ftext_sv[i]))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(ftext_op[i]))->setString(0x20, "");
dMeter2Info_getStringKanji(
0x60, static_cast<J2DTextBox*>(mpScreen->search(ftext_sv[i]))->getStringPtr(), NULL);
dMeter2Info_getStringKanji(
0x5F, static_cast<J2DTextBox*>(mpScreen->search(ftext_op[i]))->getStringPtr(), NULL);
mpScreen->search(text_sv[i])->hide();
mpScreen->search(text_op[i])->hide();
}
#elif REGION_JPN
static_cast<J2DTextBox*>(mpScreen->search(text_sv[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(text_op[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(text_sv[i]))->setString(0x20, "");
@@ -487,7 +526,49 @@ void dMenu_Collect2D_c::screenSet() {
static_cast<J2DTextBox*>(mpScreenIcon->search(text_b_tag[i]))->setString(0x20, "");
}
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n00')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n01')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n02')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n03')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n00')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n01')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n02')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n03')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text1')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text1')))->setString(0x100, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')))->setString(0x100, "");
mpScreen->search(MULTI_CHAR('item_n04'))->hide();
mpScreen->search(MULTI_CHAR('item_n05'))->hide();
mpScreen->search(MULTI_CHAR('item_n06'))->hide();
mpScreen->search(MULTI_CHAR('item_n07'))->hide();
mpScreen->search(MULTI_CHAR('f_text1'))->hide();
mpScreen->search(MULTI_CHAR('f_text0'))->hide();
} else {
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n04')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n05')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n06')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n07')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n04')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n05')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n06')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n07')))->setString(0x20, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text1')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text1')))->setString(0x100, "");
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')))->setString(0x100, "");
mpScreen->search(MULTI_CHAR('item_n00'))->hide();
mpScreen->search(MULTI_CHAR('item_n01'))->hide();
mpScreen->search(MULTI_CHAR('item_n02'))->hide();
mpScreen->search(MULTI_CHAR('item_n03'))->hide();
mpScreen->search(MULTI_CHAR('i_text1'))->hide();
mpScreen->search(MULTI_CHAR('i_text0'))->hide();
}
#elif REGION_JPN
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n00')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n01')))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n02')))->setFont(mDoExt_getMesgFont());
@@ -2337,35 +2418,69 @@ void dMenu_Collect2D_c::_draw() {
mpScreen->draw(0.0f, 0.0f, grafPort);
if (mItemNameString == 0) {
#if REGION_JPN
#if TARGET_PC
TEXT_SPAN stringPtr1;
if (dusk::version::isRegionJpn()) {
stringPtr1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text1')))->getStringPtr();
} else {
stringPtr1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text1')))->getStringPtr();
}
#elif REGION_JPN
TEXT_SPAN stringPtr1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text1')))->getStringPtr();
#else
TEXT_SPAN stringPtr1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text1')))->getStringPtr();
#endif
SAFE_STRCPY(stringPtr1, "");
#if REGION_JPN
#if TARGET_PC
TEXT_SPAN stringPtr0;
if (dusk::version::isRegionJpn()) {
stringPtr0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')))->getStringPtr();
} else {
stringPtr0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')))->getStringPtr();
}
#elif REGION_JPN
TEXT_SPAN stringPtr0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')))->getStringPtr();
#else
TEXT_SPAN stringPtr0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')))->getStringPtr();
#endif
SAFE_STRCPY(stringPtr0, "");
} else {
#if REGION_JPN
#if TARGET_PC
J2DTextBox* textBox1;
if (dusk::version::isRegionJpn()) {
textBox1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text1')));
} else {
textBox1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text1')));
}
#elif REGION_JPN
J2DTextBox* textBox1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text1')));
#else
J2DTextBox* textBox1 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text1')));
#endif
mpString->getString(mItemNameString, textBox1, NULL, NULL, NULL, 0);
#if REGION_JPN
#if TARGET_PC
J2DTextBox* textBox0;
if (dusk::version::isRegionJpn()) {
textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')));
} else {
textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')));
}
#elif REGION_JPN
J2DTextBox* textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')));
#else
J2DTextBox* textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')));
#endif
mpString->getString(mItemNameString, textBox0, NULL, NULL, NULL, 0);
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')));
} else {
textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')));
}
#elif REGION_JPN
textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('i_text0')));
#else
textBox0 = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('f_text0')));
@@ -2448,7 +2563,29 @@ void dMenu_Collect2D_c::setItemNameString(u8 param_0, u8 param_1) {
if (uVar6 == 0) {
setItemNameStringNull();
} else {
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
TEXT_SPAN stringPtr =
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n00')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
stringPtr = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n01')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
stringPtr = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n02')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
stringPtr = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n03')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
} else {
TEXT_SPAN stringPtr =
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n04')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
stringPtr = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n05')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
stringPtr = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n06')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
stringPtr = static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n07')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
}
#elif REGION_JPN
TEXT_SPAN stringPtr =
static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('item_n00')))->getStringPtr();
dMeter2Info_getStringKanji(uVar6, stringPtr, NULL);
@@ -2475,7 +2612,26 @@ void dMenu_Collect2D_c::setItemNameString(u8 param_0, u8 param_1) {
void dMenu_Collect2D_c::setItemNameStringNull() {
mItemNameString = 0;
#if REGION_JPN
#if TARGET_PC
J2DTextBox* textBox;
if (dusk::version::isRegionJpn()) {
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n00'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n01'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n02'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n03'));
} else {
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n04'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n05'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n06'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n07'));
}
#elif REGION_JPN
J2DTextBox* textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n00'));
SAFE_STRCPY(textBox->getStringPtr(), "");
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('item_n01'));
+81 -10
View File
@@ -26,6 +26,7 @@
#include "m_Do/m_Do_graphic.h"
#include <cstring>
#include "dusk/version.hpp"
#include "helpers/string.hpp"
#if TARGET_PC
@@ -304,6 +305,16 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
static u64 const cont_bt[5] = {MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4')};
static u64 const font_at[5] = {MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4')};
static u64 const font_bt[5] = {MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4')};
#if TARGET_PC
static u64 const c_tag_jpn[2] = {
MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text')
};
static u64 const c_tag[2] = {
MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text')
};
#else
static u64 const c_tag[2] = {
#if VERSION == VERSION_GCN_JPN
MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text')
@@ -311,6 +322,7 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text')
#endif
};
#endif
mButtonScreen = JKR_NEW J2DScreen();
JUT_ASSERT(916, mButtonScreen != NULL);
@@ -350,7 +362,23 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
mpJButton = NULL;
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
((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();
} else {
((J2DTextBox*)mButtonScreen->search(font_at[i]))->setFont(mDoExt_getMesgFont());
((J2DTextBox*)mButtonScreen->search(font_bt[i]))->setFont(mDoExt_getMesgFont());
((J2DTextBox*)mButtonScreen->search(font_at[i]))->setString(32, "");
((J2DTextBox*)mButtonScreen->search(font_bt[i]))->setString(32, "");
((J2DTextBox*)mButtonScreen->search(cont_at[i]))->hide();
((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->hide();
}
#elif VERSION == VERSION_GCN_JPN
((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, "");
@@ -372,7 +400,7 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
J2DTextBox* textBox;
for (int i = 0; i < 2; i++) {
textBox = ((J2DTextBox*)mButtonScreen->search(c_tag[i]));
textBox = ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])));
textBox->setFont(mDoExt_getMesgFont());
textBox->setString(32, "");
}
@@ -389,6 +417,14 @@ void dMenu_DmapBg_c::buttonIconScreenInit() {
}
void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) {
#if TARGET_PC
static u64 const cont_at_jpn[5] = {
MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')
};
static u64 const cont_at[5] = {
MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4')
};
#else
static u64 const cont_at[5] = {
#if VERSION == VERSION_GCN_JPN
MULTI_CHAR('cont_at'), MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4')
@@ -396,16 +432,26 @@ void dMenu_DmapBg_c::setAButtonString(u32 i_msgNo) {
MULTI_CHAR('font_at'), MULTI_CHAR('font_at1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4')
#endif
};
#endif
for (int i = 0; i < 5; i++) {
if (i_msgNo == 0) {
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(cont_at[i]))->getStringPtr(), "");
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_at_jpn[i] : cont_at[i], cont_at[i])))->getStringPtr(), "");
} else {
dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(cont_at[i]))->getStringPtr(), NULL);
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);
}
}
}
void dMenu_DmapBg_c::setBButtonString(u32 i_msgNo) {
#if TARGET_PC
static u64 const cont_bt_jpn[5] = {
MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4')
};
static u64 const cont_bt[5] = {
MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4')
};
#else
static u64 const cont_bt[5] = {
#if VERSION == VERSION_GCN_JPN
MULTI_CHAR('cont_bt'), MULTI_CHAR('cont_bt1'), MULTI_CHAR('cont_bt2'), MULTI_CHAR('cont_bt3'), MULTI_CHAR('cont_bt4')
@@ -413,11 +459,13 @@ void dMenu_DmapBg_c::setBButtonString(u32 i_msgNo) {
MULTI_CHAR('font_bt'), MULTI_CHAR('font_bt1'), MULTI_CHAR('font_bt2'), MULTI_CHAR('font_bt3'), MULTI_CHAR('font_bt4')
#endif
};
#endif
for (int i = 0; i < 5; i++) {
if (i_msgNo == 0) {
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->getStringPtr(), "");
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? cont_bt_jpn[i] : cont_bt[i], cont_bt[i])))->getStringPtr(), "");
} else {
dMeter2Info_getStringKanji(i_msgNo, ((J2DTextBox*)mButtonScreen->search(cont_bt[i]))->getStringPtr(), NULL);
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);
}
}
}
@@ -429,6 +477,14 @@ static f32 player_py;
DUSK_GAME_DATA dMenu_Dmap_c* dMenu_Dmap_c::myclass;
void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) {
#if TARGET_PC
static u64 const c_tag_jpn[2] = {
MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text')
};
static u64 const c_tag[2] = {
MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text')
};
#else
static u64 const c_tag[2] = {
#if VERSION == VERSION_GCN_JPN
MULTI_CHAR('c_text_s'), MULTI_CHAR('c_text')
@@ -436,6 +492,7 @@ void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) {
MULTI_CHAR('f_text_s'), MULTI_CHAR('f_text')
#endif
};
#endif
int i;
u32 msgNo;
@@ -447,12 +504,12 @@ void dMenu_DmapBg_c::setCButtonString(u32 i_msgNo) {
if (msgNo == 0) {
for (i = 0; i < 2; i++) {
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(c_tag[i]))->getStringPtr(), "");
SAFE_STRCPY(((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? 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(c_tag[i]))->getStringPtr(), NULL);
dMeter2Info_getStringKanji(msgNo, ((J2DTextBox*)mButtonScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? c_tag_jpn[i] : c_tag[i], c_tag[i])))->getStringPtr(), NULL);
}
mpCButton->setAlphaRate(1.0f);
}
@@ -511,7 +568,16 @@ void dMenu_DmapBg_c::baseScreenInit() {
mpDrawCursor->setAlphaRate(1.0f);
mpDrawCursor->setParam(0.95f, 0.9f, 0.1f, 0.6f, 0.5f);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* uVar9;
if (dusk::version::isRegionJpn()) {
uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('t_t00'));
mBaseScreen->search(MULTI_CHAR('f_t_00'))->hide();
} else {
uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('f_t_00'));
mBaseScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* uVar9 = (J2DTextBox*)mBaseScreen->search(MULTI_CHAR('t_t00'));
mBaseScreen->search(MULTI_CHAR('f_t_00'))->hide();
#else
@@ -541,7 +607,12 @@ void dMenu_DmapBg_c::setFloorMessage() {
0x036E, 0x036F, 0x03DC, 0x03DD, 0x03D9, 0x03D8,
};
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
u64 tag0 = dusk::version::isRegionJpn() ? MULTI_CHAR('ffoor0_0') : MULTI_CHAR('floor0_0');
#define FLOOR_TAG(A, B) (tag0 | (A<<16) | (B))
u64 tag1 = dusk::version::isRegionJpn() ? MULTI_CHAR('floor0_0') : MULTI_CHAR('ffoor0_0');
#define FFOOR_TAG(A, B) (tag1 | (A<<16) | (B))
#elif VERSION == VERSION_GCN_JPN
#define FLOOR_TAG(A, B) (MULTI_CHAR('ffoor0_0') | (A<<16) | (B))
#define FFOOR_TAG(A, B) (MULTI_CHAR('floor0_0') | (A<<16) | (B))
#else
+10 -1
View File
@@ -305,7 +305,16 @@ void dMenu_Fishing_c::screenSetBase() {
mpFishInfoParent[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('info_blu'), 0, NULL);
mpFishInfoParent[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('info_red'), 0, NULL);
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
#if TARGET_PC
J2DTextBox* textBox;
if (dusk::version::isRegionJpn()) {
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00'));
mpScreen->search(MULTI_CHAR('f_t00'))->hide();
} else {
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('f_t00'));
mpScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
J2DTextBox* textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00'));
mpScreen->search(MULTI_CHAR('f_t00'))->hide();
#else
+5 -3
View File
@@ -21,8 +21,9 @@
#include "d/d_msg_object.h"
#include "d/d_msg_scrn_explain.h"
#include "d/d_stage.h"
#include "helpers/string.hpp"
#include "dusk/version.hpp"
#include "f_op/f_op_msg_mng.h"
#include "helpers/string.hpp"
#if TARGET_PC
#include "dusk/frame_interpolation.h"
@@ -1217,7 +1218,8 @@ void dMenu_Fmap_c::spot_map_proc() {
{
mpDraw2DBack->stageMapMove(mpStick, 1, true);
} else if (dMw_Z_TRIGGER() && mpDraw2DTop->isWarpAccept()) {
#if VERSION >= VERSION_GCN_JPN
#if TARGET_PC || VERSION >= VERSION_GCN_JPN
IF_DUSK_BLOCK(dusk::version::isRegionJpn())
//! JPN version added a check to make sure if Arbiter's Grounds is cleared that
//! the Mirror Chamber Statue has been spun before allowing portal warping from the map screen.
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265]) && !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361])) {
@@ -1227,7 +1229,7 @@ void dMenu_Fmap_c::spot_map_proc() {
mPrevProcessAlt = mProcess;
setProcess(PROC_PORTAL_WARP_FORBID);
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
} else
} IF_DUSK_BLOCK_END else
#endif
if (mpDraw2DTop->checkPlayerWarpAccept()) {
mIsWarpMap = true;
+121 -18
View File
@@ -23,6 +23,8 @@
#endif
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
void dMenu_Fmap2DBack_c::fMapBackWide() {
mpBaseScreen->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
@@ -2417,7 +2419,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
static const u64 area_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')};
for (int i = 0; i < 3; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(farea_name[i]))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(farea_name[i]))->setString(0x40, "");
mpTitleScreen->search(area_name[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(area_name[i]))
->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(area_name[i]))->setString(0x40, "");
@@ -2445,7 +2457,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
};
#endif
for (int i = 0; i < 7; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(ffont_name[i]))->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(ffont_name[i]))->setString(0x40, "");
mpTitleScreen->search(sfont_name[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(sfont_name[i]))
->setFont(mDoExt_getRubyFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(sfont_name[i]))->setString(0x40, "");
@@ -2462,7 +2484,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
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')};
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(font_zt[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(font_zt[i]))->setString(0x20, "");
mpTitleScreen->search(cont_zt[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_zt[i]))
->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_zt[i]))->setString(0x20, "");
@@ -2483,7 +2515,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
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')};
#endif
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(font_bt[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(font_bt[i]))->setString(0x20, "");
mpTitleScreen->search(cont_bt[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_bt[i]))
->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_bt[i]))->setString(0x20, "");
@@ -2500,7 +2542,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
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')};
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(font_at[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(font_at[i]))->setString(0x20, "");
mpTitleScreen->search(cont_at[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_at[i]))
->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(cont_at[i]))->setString(0x20, "");
@@ -2518,7 +2570,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
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')};
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(fuji_c[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(fuji_c[i]))->setString(0x20, "");
mpTitleScreen->search(juji_c[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(juji_c[i]))
->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(juji_c[i]))->setString(0x20, "");
@@ -2535,7 +2597,17 @@ dMenu_Fmap2DTop_c::dMenu_Fmap2DTop_c(JKRExpHeap* i_heap, STControl* i_stick) {
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')};
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
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();
} else {
static_cast<J2DTextBox*>(mpTitleScreen->search(fst_c[i]))->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(fst_c[i]))->setString(0x20, "");
mpTitleScreen->search(ast_c[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTitleScreen->search(ast_c[i]))
->setFont(mDoExt_getMesgFont());
static_cast<J2DTextBox*>(mpTitleScreen->search(ast_c[i]))->setString(0x20, "");
@@ -2784,7 +2856,16 @@ void dMenu_Fmap2DTop_c::setMoyaAlpha(u8 i_alpha) {
}
void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
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')
};
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;
#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')
};
@@ -2816,7 +2897,11 @@ void dMenu_Fmap2DTop_c::setTitleNameString(u32 param_0) {
}
void dMenu_Fmap2DTop_c::setAreaNameString(u32 param_0) {
#if VERSION == VERSION_GCN_JPN
#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;
#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
#else
@@ -2849,7 +2934,11 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) {
dusk::ui::ControlOverride::Default);
#endif
#if VERSION == VERSION_GCN_JPN
#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;
#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
#else
@@ -2883,7 +2972,11 @@ void dMenu_Fmap2DTop_c::setZButtonString(u32 param_0, u8 i_alpha) {
}
void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) {
#if VERSION == VERSION_GCN_JPN
#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;
#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
#else
@@ -2909,7 +3002,11 @@ void dMenu_Fmap2DTop_c::setBButtonString(u32 param_0, u8 i_alpha) {
}
void dMenu_Fmap2DTop_c::setAButtonString(u32 param_0, u8 i_alpha) {
#if VERSION == VERSION_GCN_JPN
#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;
#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
#else
@@ -2936,21 +3033,24 @@ 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 VERSION == VERSION_GCN_JPN
#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')};
#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
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')};
#endif
if (param_0 == 0) {
for (int i = 0; i < 5; i++) {
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(juji_c[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])));
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(juji_c[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])));
dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL);
}
mpTitleScreen->search(MULTI_CHAR('juy_sha0'))->show();
@@ -2961,21 +3061,24 @@ void dMenu_Fmap2DTop_c::setCrossLRString(u32 param_0) {
void dMenu_Fmap2DTop_c::set3DStickString(u32 param_0) {
#if PLATFORM_GCN || (VERSION == VERSION_SHIELD)
#if VERSION == VERSION_GCN_JPN
#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')};
#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
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')};
#endif
if (param_0 == 0) {
for (int i = 0; i < 5; i++) {
J2DTextBox* text_box = static_cast<J2DTextBox*>(mpTitleScreen->search(ast_c[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])));
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(ast_c[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])));
dMeter2Info_getStringKanji(param_0, text_box->getStringPtr(), NULL);
}
mpTitleScreen->search(MULTI_CHAR('as_sha0'))->show();
+25 -2
View File
@@ -22,6 +22,8 @@
#include <cstdio>
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/menu_pointer.h"
#endif
@@ -535,7 +537,16 @@ void dMenu_Insect_c::screenSetBase() {
}
}
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* textBox;
if (dusk::version::isRegionJpn()) {
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00'));
mpScreen->search(MULTI_CHAR('f_t00'))->hide();
} else {
textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('f_t00'));
mpScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* textBox = (J2DTextBox*)mpScreen->search(MULTI_CHAR('t_t00'));
mpScreen->search(MULTI_CHAR('f_t00'))->hide();
#else
@@ -558,7 +569,19 @@ void dMenu_Insect_c::screenSetExplain() {
if (field_0xf6 == 0) {
mpExpSubWin[1]->hide();
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpInfoText = JKR_NEW CPaneMgr(mpExpScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpExpScreen->search(MULTI_CHAR('n_e4line'))->hide();
field_0x5c = (J2DTextBox*)mpExpScreen->search(MULTI_CHAR('w_msg_jp'));
mpExpScreen->search(MULTI_CHAR('ms_for_2'))->hide();
} else {
mpInfoText = JKR_NEW CPaneMgr(mpExpScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
mpExpScreen->search(MULTI_CHAR('n_3line'))->hide();
field_0x5c = (J2DTextBox*)mpExpScreen->search(MULTI_CHAR('ms_for_2'));
mpExpScreen->search(MULTI_CHAR('w_msg_jp'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpInfoText = JKR_NEW CPaneMgr(mpExpScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpExpScreen->search(MULTI_CHAR('n_e4line'))->hide();
field_0x5c = (J2DTextBox*)mpExpScreen->search(MULTI_CHAR('w_msg_jp'));
+27 -9
View File
@@ -5,25 +5,26 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_menu_item_explain.h"
#include <cstdio>
#include <cstring>
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JUtility/JUTTexture.h"
#include <cstdio>
#include <cstring>
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include "d/d_item.h"
#include "d/d_kantera_icon_meter.h"
#include "d/d_lib.h"
#include "d/d_select_cursor.h"
#include "d/d_menu_item_explain.h"
#include "d/d_meter2_info.h"
#include "d/d_meter_HIO.h"
#include "d/d_msg_string.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#include "d/d_msg_scrn_3select.h"
#include "d/d_msg_scrn_arrow.h"
#include "d/d_msg_string.h"
#include "d/d_select_cursor.h"
#include "dusk/version.hpp"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
typedef void (dMenu_ItemExplain_c::*initFunc)();
static initFunc init_process[] = {
@@ -103,7 +104,16 @@ dMenu_ItemExplain_c::dMenu_ItemExplain_c(JKRExpHeap* i_heap, JKRArchive* i_archi
mDescAlpha = 0.0f;
field_0x78 = 0;
mAlphaRatio = 201.0f;
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpInfoText = JKR_NEW CPaneMgr(mpInfoScreen, MULTI_CHAR('i_text4'), 0, NULL);
mpInfoScreen->search(MULTI_CHAR('i_text1'))->hide();
} else {
mpInfoText = JKR_NEW CPaneMgr(mpInfoScreen, MULTI_CHAR('i_text1'), 0, NULL);
mpInfoScreen->search(MULTI_CHAR('i_text4'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpInfoText = JKR_NEW CPaneMgr(mpInfoScreen, MULTI_CHAR('i_text4'), 0, NULL);
mpInfoScreen->search(MULTI_CHAR('i_text1'))->hide();
#else
@@ -114,7 +124,15 @@ dMenu_ItemExplain_c::dMenu_ItemExplain_c(JKRExpHeap* i_heap, JKRArchive* i_archi
((J2DTextBox*)(mpInfoText->getPanePtr()))->setString(0x200, "");
mpInfoText->show();
for (int i = 0; i < 4; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpNameText[i] = JKR_NEW CPaneMgr(mpInfoScreen, name_tag[i], 0, NULL);
mpInfoScreen->search(fame_tag[i])->hide();
} else {
mpNameText[i] = JKR_NEW CPaneMgr(mpInfoScreen, fame_tag[i], 0, NULL);
mpInfoScreen->search(name_tag[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpNameText[i] = JKR_NEW CPaneMgr(mpInfoScreen, name_tag[i], 0, NULL);
mpInfoScreen->search(fame_tag[i])->hide();
#else
+214 -19
View File
@@ -21,6 +21,7 @@
#include "dusk/achievements.h"
#include "dusk/menu_pointer.h"
#include "dusk/ui/touch_controls.hpp"
#include "dusk/version.hpp"
static void enable_turn_page_controls(bool enabled) {
const auto controlOverride =
@@ -30,7 +31,9 @@ static void enable_turn_page_controls(bool enabled) {
}
#endif
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
#define D_MENU_LETTER_LINE_MAX (dusk::version::isRegionJpn() ? 9 : 12)
#elif VERSION == VERSION_GCN_JPN
#define D_MENU_LETTER_LINE_MAX 9
#else
#define D_MENU_LETTER_LINE_MAX 12
@@ -459,7 +462,16 @@ void dMenu_Letter_c::wait_move() {
}
if (mProcess == 1 || mProcess == 2) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* textBox;
if (dusk::version::isRegionJpn()) {
textBox = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00'));
mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide();
} else {
textBox = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('f_t_00'));
mpBaseScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* textBox = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00'));
mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide();
#else
@@ -811,6 +823,15 @@ void dMenu_Letter_c::screenSetMenu() {
static const u64 tag_frame[6] = {
MULTI_CHAR('flame_00'), MULTI_CHAR('flame_01'), MULTI_CHAR('flame_02'), MULTI_CHAR('flame_03'), MULTI_CHAR('flame_04'), MULTI_CHAR('flame_05'),
};
#if TARGET_PC
static const u64 tag_menu0_jpn[6] = {
MULTI_CHAR('menu_t0'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t4'), MULTI_CHAR('menu_t5'),
};
static const u64 tag_menu0[6] = {
MULTI_CHAR('fenu_t0'), MULTI_CHAR('fenu_t1'), MULTI_CHAR('fenu_t2'), MULTI_CHAR('fenu_t3'), MULTI_CHAR('fenu_t4'), MULTI_CHAR('fenu_t5'),
};
#else
static const u64 tag_menu0[6] = {
#if VERSION == VERSION_GCN_JPN
MULTI_CHAR('menu_t0'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t4'), MULTI_CHAR('menu_t5'),
@@ -818,6 +839,16 @@ void dMenu_Letter_c::screenSetMenu() {
MULTI_CHAR('fenu_t0'), MULTI_CHAR('fenu_t1'), MULTI_CHAR('fenu_t2'), MULTI_CHAR('fenu_t3'), MULTI_CHAR('fenu_t4'), MULTI_CHAR('fenu_t5'),
#endif
};
#endif
#if TARGET_PC
static const u64 tag_menu1_jpn[6] = {
MULTI_CHAR('menu_f6'), MULTI_CHAR('menu_f7'), MULTI_CHAR('menu_t8'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t11'),
};
static const u64 tag_menu1[6] = {
MULTI_CHAR('fenu_t6'), MULTI_CHAR('fenu_t7'), MULTI_CHAR('fenu_t8'), MULTI_CHAR('fenu_t9'), MULTI_CHAR('fenu_t10'), MULTI_CHAR('fenu_t11'),
};
#else
static const u64 tag_menu1[6] = {
#if VERSION == VERSION_GCN_JPN
MULTI_CHAR('menu_f6'), MULTI_CHAR('menu_f7'), MULTI_CHAR('menu_t8'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t11'),
@@ -825,6 +856,8 @@ void dMenu_Letter_c::screenSetMenu() {
MULTI_CHAR('fenu_t6'), MULTI_CHAR('fenu_t7'), MULTI_CHAR('fenu_t8'), MULTI_CHAR('fenu_t9'), MULTI_CHAR('fenu_t10'), MULTI_CHAR('fenu_t11'),
#endif
};
#endif
static const u64 tag_midoku[6] = {
MULTI_CHAR('midoku_0'), MULTI_CHAR('midoku_1'), MULTI_CHAR('midoku_2'), MULTI_CHAR('midoku_3'), MULTI_CHAR('midoku_4'), MULTI_CHAR('midoku_5'),
};
@@ -838,7 +871,27 @@ void dMenu_Letter_c::screenSetMenu() {
JUT_ASSERT(1161, mpParent[0] != NULL);
mpParent[0]->setAlphaRate(0.0f);
for (int i = 0; i < 6; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]);
field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]);
field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]);
field_0x124[i][3] = (J2DTextBox*)mpMenuScreen->search(tag_name1[i]);
mpMenuScreen->search(ftag_sub0[i])->hide();
mpMenuScreen->search(ftag_sub1[i])->hide();
mpMenuScreen->search(ftag_name0[i])->hide();
mpMenuScreen->search(ftag_name1[i])->hide();
} else {
field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(ftag_sub0[i]);
field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(ftag_sub1[i]);
field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(ftag_name0[i]);
field_0x124[i][3] = (J2DTextBox*)mpMenuScreen->search(ftag_name1[i]);
mpMenuScreen->search(tag_sub0[i])->hide();
mpMenuScreen->search(tag_sub1[i])->hide();
mpMenuScreen->search(tag_name0[i])->hide();
mpMenuScreen->search(tag_name1[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
field_0x124[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]);
field_0x124[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]);
field_0x124[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]);
@@ -868,8 +921,8 @@ void dMenu_Letter_c::screenSetMenu() {
}
for (int i = 0; i < 6; i++) {
field_0x34[i][0] = mpMenuScreen->search(tag_frame[i]);
field_0x34[i][1] = mpMenuScreen->search(tag_menu0[i]);
field_0x34[i][2] = mpMenuScreen->search(tag_menu1[i]);
field_0x34[i][1] = mpMenuScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? tag_menu0_jpn[i] : tag_menu0[i], tag_menu0[i]));
field_0x34[i][2] = mpMenuScreen->search(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? tag_menu1_jpn[i] : tag_menu1[i], tag_menu1[i]));
field_0x34[i][3] = mpMenuScreen->search(tag_letter[i]);
field_0x34[i][4] = mpMenuScreen->search(tag_midoku[i]);
if (i < field_0x373) {
@@ -909,7 +962,27 @@ void dMenu_Letter_c::screenSetMenu() {
mpDMYParent = JKR_NEW CPaneMgr(mpMenuDMYScreen, MULTI_CHAR('n_all'), 2, NULL);
JUT_ASSERT(1285, mpDMYParent != NULL);
for (int i = 0; i < 6; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub0[i]);
field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub1[i]);
field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name0[i]);
field_0x184[i][3] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name1[i]);
mpMenuDMYScreen->search(ftag_sub0[i])->hide();
mpMenuDMYScreen->search(ftag_sub1[i])->hide();
mpMenuDMYScreen->search(ftag_name0[i])->hide();
mpMenuDMYScreen->search(ftag_name1[i])->hide();
} else {
field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_sub0[i]);
field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_sub1[i]);
field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_name0[i]);
field_0x184[i][3] = (J2DTextBox*)mpMenuDMYScreen->search(ftag_name1[i]);
mpMenuDMYScreen->search(tag_sub0[i])->hide();
mpMenuDMYScreen->search(tag_sub1[i])->hide();
mpMenuDMYScreen->search(tag_name0[i])->hide();
mpMenuDMYScreen->search(tag_name1[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
field_0x184[i][0] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub0[i]);
field_0x184[i][1] = (J2DTextBox*)mpMenuDMYScreen->search(tag_sub1[i]);
field_0x184[i][2] = (J2DTextBox*)mpMenuDMYScreen->search(tag_name0[i]);
@@ -964,7 +1037,16 @@ void dMenu_Letter_c::screenSetBase() {
mpParent[1] = JKR_NEW CPaneMgr(mpBaseScreen, MULTI_CHAR('n_all'), 2, NULL);
JUT_ASSERT(1372, mpParent[1] != NULL);
mpParent[1]->setAlphaRate(0.0f);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* piVar9;
if (dusk::version::isRegionJpn()) {
piVar9 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00'));
mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide();
} else {
piVar9 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('f_t_00'));
mpBaseScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* piVar9 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('t_t00'));
mpBaseScreen->search(MULTI_CHAR('f_t_00'))->hide();
#else
@@ -975,7 +1057,31 @@ void dMenu_Letter_c::screenSetBase() {
piVar9->setFont(mDoExt_getSubFont());
dComIfGp_setMessageCountNumber(field_0x374 + (field_0x36f + 1) * 100);
mpString->getString(0x4d6, piVar9, NULL, NULL, NULL, 0);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* text1;
J2DTextBox* text2;
J2DTextBox* text3;
J2DTextBox* text4;
if (dusk::version::isRegionJpn()) {
text1 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('wps_text'));
text2 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('w_p_text'));
text3 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('g_ps_txt'));
text4 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('g_p_text'));
mpBaseScreen->search(MULTI_CHAR('fwpstex1'))->hide();
mpBaseScreen->search(MULTI_CHAR('fwp_tex1'))->hide();
mpBaseScreen->search(MULTI_CHAR('fgps_tx1'))->hide();
mpBaseScreen->search(MULTI_CHAR('fgp_tex1'))->hide();
} else {
text1 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fwpstex1'));
text2 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fwp_tex1'));
text3 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fgps_tx1'));
text4 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('fgp_tex1'));
mpBaseScreen->search(MULTI_CHAR('wps_text'))->hide();
mpBaseScreen->search(MULTI_CHAR('w_p_text'))->hide();
mpBaseScreen->search(MULTI_CHAR('g_ps_txt'))->hide();
mpBaseScreen->search(MULTI_CHAR('g_p_text'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* text1 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('wps_text'));
J2DTextBox* text2 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('w_p_text'));
J2DTextBox* text3 = (J2DTextBox*)mpBaseScreen->search(MULTI_CHAR('g_ps_txt'));
@@ -1059,7 +1165,96 @@ void dMenu_Letter_c::screenSetLetter() {
JUT_ASSERT(1511, fg != false);
dPaneClass_showNullPane(mpLetterScreen[0]);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0) {
field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('t3f_s'), 0, NULL);
field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3flin'), 0, NULL);
field_0x2f4[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3f_s'), 0, NULL);
field_0x2f4[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3f'), 0, NULL);
mpLetterScreen[0]->search('t4_s')->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_e4lin'))->hide();
mpLetterScreen[0]->search('t3_s')->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3line'))->hide();
mpLineParent = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('jp_fri_n'), 0, NULL);
JUT_ASSERT(1530, mpLineParent != NULL);
for (int i = 0; i < 12; i++) {
static u64 const line_tag[12] = {
MULTI_CHAR('line00'), MULTI_CHAR('line01'), MULTI_CHAR('line02'), MULTI_CHAR('line03'), MULTI_CHAR('line04'), MULTI_CHAR('line05'),
MULTI_CHAR('line06'), MULTI_CHAR('line07'), MULTI_CHAR('line08'),
};
if (line_tag[i] != 0) {
field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]);
} else {
field_0x25c[i] = NULL;
}
}
mpLetterScreen[0]->search('jp_n')->hide();
mpLetterScreen[0]->search('us_n')->hide();
((J2DTextBox*)field_0x2f4[0]->getPanePtr())->setLineSpace(((J2DTextBox*)field_0x2ec[0]->getPanePtr())->getLineSpace());
((J2DTextBox*)field_0x2f4[1]->getPanePtr())->setLineSpace(((J2DTextBox*)field_0x2ec[1]->getPanePtr())->getLineSpace());
} else {
field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], 't3_s', 0, NULL);
field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3line'), 0, NULL);
for (int i = 0; i < 2; i++) {
field_0x2f4[i] = NULL;
}
mpLetterScreen[0]->search('t4_s')->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_e4lin'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('t3f_s'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3flin'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3f_s'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3f'))->hide();
mpLineParent = JKR_NEW CPaneMgr(mpLetterScreen[0], 'jp_n', 0, NULL);
JUT_ASSERT(1530, mpLineParent != NULL);
for (int i = 0; i < 12; i++) {
static u64 const line_tag[12] = {
MULTI_CHAR('line21'), MULTI_CHAR('line22'), MULTI_CHAR('line23'), MULTI_CHAR('line24'), MULTI_CHAR('line25'), MULTI_CHAR('line26'),
MULTI_CHAR('line27'), MULTI_CHAR('line28'), MULTI_CHAR('line29'),
};
if (line_tag[i] != 0) {
field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]);
} else {
field_0x25c[i] = NULL;
}
}
mpLetterScreen[0]->search(MULTI_CHAR('jp_fri_n'))->hide();
mpLetterScreen[0]->search('us_n')->hide();
}
} else {
static u64 const line_tag[12] = {
MULTI_CHAR('line09'), MULTI_CHAR('line10'), MULTI_CHAR('line11'), MULTI_CHAR('line12'), MULTI_CHAR('line13'), MULTI_CHAR('line14'),
MULTI_CHAR('line15'), MULTI_CHAR('line16'), MULTI_CHAR('line17'), MULTI_CHAR('line18'), MULTI_CHAR('line19'), MULTI_CHAR('line20'),
};
field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], 't4_s', 0, NULL);
field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_e4lin'), 0, NULL);
for (int i = 0; i < 2; i++) {
field_0x2f4[i] = NULL;
}
mpLetterScreen[0]->search(MULTI_CHAR('t3f_s'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3flin'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3f_s'))->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3f'))->hide();
mpLetterScreen[0]->search('t3_s')->hide();
mpLetterScreen[0]->search(MULTI_CHAR('mg_3line'))->hide();
mpLineParent = JKR_NEW CPaneMgr(mpLetterScreen[0], 'us_n', 0, NULL);
JUT_ASSERT(1530, mpLineParent != NULL);
for (int i = 0; i < 12; i++) {
if (line_tag[i] != 0) {
field_0x25c[i] = (J2DTextBox*)mpLetterScreen[0]->search(line_tag[i]);
} else {
field_0x25c[i] = NULL;
}
}
mpLetterScreen[0]->search(MULTI_CHAR('jp_fri_n'))->hide();
mpLetterScreen[0]->search('jp_n')->hide();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0) {
field_0x2ec[0] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('t3f_s'), 0, NULL);
field_0x2ec[1] = JKR_NEW CPaneMgr(mpLetterScreen[0], MULTI_CHAR('mg_3flin'), 0, NULL);
@@ -1148,20 +1343,20 @@ void dMenu_Letter_c::screenSetLetter() {
mpLetterScreen[0]->search('jp_n')->hide();
#endif
#if TARGET_PC
#define STR_BUF_LEN 528
#elif VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
#endif
for (int i = 0; i < 2; i++) {
((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)field_0x2ec[i]->getPanePtr())->setString(STR_BUF_LEN, "");
if (field_0x2f4[i] != NULL) {
((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)field_0x2f4[i]->getPanePtr())->setString(STR_BUF_LEN, "");
}
}
field_0x1e4[0] = (J2DTextBox*)mpLetterScreen[0]->search(MULTI_CHAR('p_texts'));
+440 -133
View File
File diff suppressed because it is too large Load Diff
+102 -45
View File
@@ -29,6 +29,8 @@
#include <cstdio>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/frame_interpolation.h"
#include "dusk/game_clock.h"
@@ -341,7 +343,16 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
}
mpString = JKR_NEW dMsgString_c();
for (i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* fxy_TextBox;
if (dusk::version::isRegionJpn()) {
fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]);
mpScreen->search(fxy_text[i])->hide();
} else {
fxy_TextBox = (J2DTextBox*)mpScreen->search(fxy_text[i]);
mpScreen->search(xy_text[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]);
mpScreen->search(fxy_text[i])->hide();
#else
@@ -353,75 +364,77 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
field_0x580[0] = mpString->getString(0x380, fxy_TextBox, NULL, NULL, NULL, 0);
}
for (i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
#if TARGET_PC
J2DTextBox* fc_TextBox;
if (dusk::getSettings().game.swapDirectSelect) {
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
if (dusk::version::isRegionJpn()) {
if (dusk::getSettings().game.swapDirectSelect) {
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
} else {
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
}
} else {
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
if (dusk::getSettings().game.swapDirectSelect) {
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
mpScreen->search(c_text1[i])->hide();
} else {
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
mpScreen->search(c_text[i])->hide();
}
}
#else
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
#endif
#else
#if TARGET_PC
J2DTextBox* fc_TextBox;
if (dusk::getSettings().game.swapDirectSelect) {
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
mpScreen->search(c_text1[i])->hide();
} else {
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
mpScreen->search(c_text[i])->hide();
}
#else
J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
mpScreen->search(c_text[i])->hide();
#endif
#endif
fc_TextBox->setFont(mDoExt_getMesgFont());
fc_TextBox->setString(0x40, "");
field_0x580[1] = mpString->getString(0x37F, fc_TextBox, NULL, NULL, NULL, 0);
}
for (i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
#if TARGET_PC
J2DTextBox* fc1_TextBox;
if (dusk::getSettings().game.swapDirectSelect) {
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
if (dusk::version::isRegionJpn()) {
if (dusk::getSettings().game.swapDirectSelect) {
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
mpScreen->search(fc_text[i])->hide();
} else {
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
}
} else {
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
if (dusk::getSettings().game.swapDirectSelect) {
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
mpScreen->search(c_text[i])->hide();
} else {
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
mpScreen->search(c_text1[i])->hide();
}
}
#else
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
mpScreen->search(fc_text1[i])->hide();
#endif
#else
#if TARGET_PC
J2DTextBox* fc1_TextBox;
if (dusk::getSettings().game.swapDirectSelect) {
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
mpScreen->search(c_text[i])->hide();
} else {
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
mpScreen->search(c_text1[i])->hide();
}
#else
J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
mpScreen->search(c_text1[i])->hide();
#endif
#endif
fc1_TextBox->setFont(mDoExt_getMesgFont());
fc1_TextBox->setString(0x40, "");
field_0x580[2] = mpString->getString(0x4CD, fc1_TextBox, NULL, NULL, NULL, 0);
}
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]);
mpScreen->search(ft_on[i])->hide();
} else {
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(ft_on[i]);
mpScreen->search(t_on[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]);
mpScreen->search(ft_on[i])->hide();
#else
@@ -433,7 +446,15 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
mpString->getString(0x4D2, mpComboOffString[i], NULL, NULL, NULL, 0);
}
for (int i = 0; i < 5; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]);
mpScreen->search(ft_off[i])->hide();
} else {
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(ft_off[i]);
mpScreen->search(t_off[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]);
mpScreen->search(ft_off[i])->hide();
#else
@@ -464,7 +485,31 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
mpNameParent = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('label_n'), 1, NULL);
mpCircle = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('circle_n'), 2, NULL);
J2DTextBox* textBox[4];
#if VERSION == VERSION_GCN_JPN
#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'));
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'));
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
mpCenterScreen->search(MULTI_CHAR('item_n04'));
mpCenterScreen->search(MULTI_CHAR('item_n05'));
mpCenterScreen->search(MULTI_CHAR('item_n06'));
mpCenterScreen->search(MULTI_CHAR('item_n07'));
}
#elif VERSION == VERSION_GCN_JPN
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'));
@@ -1246,7 +1291,19 @@ void dMenu_Ring_c::setScale() {
void dMenu_Ring_c::setNameString(u32 i_stringID) {
J2DTextBox* textBox[4];
#if VERSION == VERSION_GCN_JPN
#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'));
}
#elif VERSION == VERSION_GCN_JPN
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'));
+112 -19
View File
@@ -1,25 +1,26 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_menu_save.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRMemArchive.h"
#include <cstdio>
#include <cstring>
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRMemArchive.h"
#include "d/d_com_inf_game.h"
#include "d/d_lib.h"
#include "d/d_select_cursor.h"
#include "d/d_file_sel_info.h"
#include "d/d_file_sel_warning.h"
#include "d/d_lib.h"
#include "d/d_menu_save.h"
#include "d/d_meter2_info.h"
#include "d/d_msg_scrn_explain.h"
#include "d/d_msg_string.h"
#include "d/d_select_cursor.h"
#include "dusk/version.hpp"
#include "f_op/f_op_msg_mng.h"
#include "m_Do/m_Do_MemCard.h"
#include "m_Do/m_Do_MemCardRWmng.h"
#include "m_Do/m_Do_Reset.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#include "d/d_msg_scrn_explain.h"
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "f_op/f_op_msg_mng.h"
#if TARGET_PC
#include "dusk/frame_interpolation.h"
@@ -179,7 +180,15 @@ void dMenu_save_c::screenSet() {
static u64 l_tagName10[2] = {MULTI_CHAR('w_no_g'), MULTI_CHAR('w_yes_g')};
static u64 l_tagName11[2] = {MULTI_CHAR('w_no_gr'), MULTI_CHAR('w_yes_gr')};
static u64 l_tagName12[3] = {MULTI_CHAR('w_bk_l00'), MULTI_CHAR('w_bk_l01'), MULTI_CHAR('w_bk_l02')};
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
static u64 l_tagName21_jpn[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')};
static u64 l_tagName20_jpn[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')};
static u64 l_tagName21[2] = {MULTI_CHAR('t_for'), MULTI_CHAR('t_for1')};
static u64 l_tagName211[10] = {MULTI_CHAR('tmoyou00'), MULTI_CHAR('tmoyou01'), MULTI_CHAR('tmoyou02'), MULTI_CHAR('tmoyou03'), MULTI_CHAR('tmoyou04'),
MULTI_CHAR('tmoyou05'), MULTI_CHAR('tmoyou06'), MULTI_CHAR('tmoyou07'), MULTI_CHAR('tmoyou08'), MULTI_CHAR('tmoyou09')};
static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')};
#elif VERSION == VERSION_GCN_JPN
static u64 l_tagName21[2] = {MULTI_CHAR('w_tabi_s'), MULTI_CHAR('w_tabi_x')};
static u64 l_tagName20[2] = {MULTI_CHAR('w_er_msg'), MULTI_CHAR('w_er_msR')};
#else
@@ -188,6 +197,7 @@ void dMenu_save_c::screenSet() {
MULTI_CHAR('tmoyou05'), MULTI_CHAR('tmoyou06'), MULTI_CHAR('tmoyou07'), MULTI_CHAR('tmoyou08'), MULTI_CHAR('tmoyou09')};
static u64 l_tagName20[2] = {MULTI_CHAR('er_for0'), MULTI_CHAR('er_for1')};
#endif
static u64 l_tagName13[3] = {MULTI_CHAR('w_dat_i0'), MULTI_CHAR('w_dat_i1'), MULTI_CHAR('w_dat_i2')};
static u8 l_msgNum0[2] = {0x08, 0x07};
static u8 l_msgNum[2] = {0x54, 0x55};
@@ -221,7 +231,15 @@ void dMenu_save_c::screenSet() {
mpNoYes[1] = JKR_NEW CPaneMgr(mSaveSel.Scr, MULTI_CHAR('w_yes_n'), 0, NULL);
for (int i = 0; i < 2; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpNoYesTxt[i] = JKR_NEW CPaneMgr(mSaveSel.Scr, l_tagName000[i], 0, NULL);
mSaveSel.Scr->search(l_tagName000U[i])->hide();
} else {
mpNoYesTxt[i] = JKR_NEW CPaneMgr(mSaveSel.Scr, l_tagName000U[i], 0, NULL);
mSaveSel.Scr->search(l_tagName000[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpNoYesTxt[i] = JKR_NEW CPaneMgr(mSaveSel.Scr, l_tagName000[i], 0, NULL);
mSaveSel.Scr->search(l_tagName000U[i])->hide();
#else
@@ -240,7 +258,15 @@ void dMenu_save_c::screenSet() {
mpBBtnIcon = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_nbbtn'), 2, NULL);
mpABtnIcon = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_nabtn'), 2, NULL);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpBackTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_modo'), 2, NULL);
mpConfirmTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_kete'), 2, NULL);
} else {
mpBackTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('f_modo'), 2, NULL);
mpConfirmTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('f_kete'), 2, NULL);
}
#elif VERSION == VERSION_GCN_JPN
mpBackTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_modo'), 2, NULL);
mpConfirmTxt = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, MULTI_CHAR('w_kete'), 2, NULL);
#else
@@ -255,7 +281,15 @@ void dMenu_save_c::screenSet() {
for (int i = 0; i < 2; i++) {
J2DTextBox* tbox[2];
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00[i]);
mSaveSel.Scr->search(l_tagName00U[i])->hide();
} else {
tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00U[i]);
mSaveSel.Scr->search(l_tagName00[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
tbox[i] = (J2DTextBox*)mSaveSel.Scr->search(l_tagName00[i]);
mSaveSel.Scr->search(l_tagName00U[i])->hide();
#else
@@ -330,7 +364,19 @@ void dMenu_save_c::screenSet() {
mpBookWaku[i]->setAlpha(0);
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mSaveSel.Scr->search(MULTI_CHAR('t_for'))->hide();
mSaveSel.Scr->search(MULTI_CHAR('t_for1'))->hide();
} else {
mSaveSel.Scr->search(MULTI_CHAR('w_tabi_s'))->hide();
mSaveSel.Scr->search(MULTI_CHAR('w_tabi_x'))->hide();
for (int i = 0; i < 10; i++) {
mSaveSel.Scr->search(l_tagName211[i])->hide();
}
}
#elif VERSION == VERSION_GCN_JPN
mSaveSel.Scr->search(MULTI_CHAR('t_for'))->hide();
mSaveSel.Scr->search(MULTI_CHAR('t_for1'))->hide();
#else
@@ -343,11 +389,21 @@ void dMenu_save_c::screenSet() {
#endif
for (int i = 0; i < 2; i++) {
mpHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, l_tagName21[i], 0, NULL);
mpHeaderTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName21_jpn[i] : l_tagName21[i], l_tagName21[i]), 0, NULL);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFont(mSaveSel.font[0]);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setString(0x100, "");
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
} else {
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(19.0f, 19.0f);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(20.0f);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(0.0f);
}
#elif VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mpHeaderTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
@@ -364,7 +420,15 @@ void dMenu_save_c::screenSet() {
mHeaderTxtType = 0;
field_0xb4 = mSaveSel.Scr->search(MULTI_CHAR('w_er_n'));
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mSaveSel.Scr->search(MULTI_CHAR('er_for0'))->hide();
mSaveSel.Scr->search(MULTI_CHAR('er_for1'))->hide();
} else {
mSaveSel.Scr->search(MULTI_CHAR('w_er_msg'))->hide();
mSaveSel.Scr->search(MULTI_CHAR('w_er_msR'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
mSaveSel.Scr->search(MULTI_CHAR('er_for0'))->hide();
mSaveSel.Scr->search(MULTI_CHAR('er_for1'))->hide();
#else
@@ -373,7 +437,9 @@ void dMenu_save_c::screenSet() {
#endif
for (int i = 0; i < 2; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
mpErrTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, DUSK_IF_ELSE(dusk::version::isRegionJpn() ? l_tagName20_jpn[i] : l_tagName20[i], l_tagName20[i]), 0, NULL);
#elif VERSION == VERSION_GCN_JPN
mpErrTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, l_tagName20[i], 0, NULL);
#else
mpErrTxtPane[i] = JKR_NEW CPaneMgrAlpha(mSaveSel.Scr, l_tagName20[i], 0, NULL);
@@ -381,7 +447,18 @@ void dMenu_save_c::screenSet() {
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFont(mSaveSel.font[0]);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setString(0x200, "");
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
} else {
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->resize(440.0f, 198.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(21.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(1.0f);
}
#elif VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setFontSize(21.0f, 21.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setLineSpace(22.0f);
((J2DTextBox*)mpErrTxtPane[i]->getPanePtr())->setCharSpace(2.0f);
@@ -2468,7 +2545,23 @@ bool dMenu_save_c::selectDataBaseMoveAnm() {
mpSelectMoveBase->getPanePtr()->animationTransform();
return false;
} else {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (mDataBaseMoveAnmFrame == 33) {
field_0x64 = 1;
} else {
field_0x64 = 0;
}
field_0x65 = 0;
} else {
if (mDataBaseMoveAnmFrame == 33) {
field_0x64 = 1;
field_0x65 = 0;
} else {
field_0x64 = 0;
}
}
#elif VERSION == VERSION_GCN_JPN
if (mDataBaseMoveAnmFrame == 33) {
field_0x64 = 1;
} else {
+51 -4
View File
@@ -18,6 +18,8 @@
#include "m_Do/m_Do_graphic.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/menu_pointer.h"
#endif
@@ -467,7 +469,27 @@ void dMenu_Skill_c::screenSetMenu() {
mpParent = JKR_NEW CPaneMgr(mpMenuScreen, MULTI_CHAR('n_all'), 2, NULL);
mpParent->setAlphaRate(0.0f);
for (int i = 0; i < 7; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]);
mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]);
mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]);
mpFTagPicture[i][3] = (J2DTextBox*)mpMenuScreen->search(tag_name1[i]);
mpMenuScreen->search(ftag_sub0[i])->hide();
mpMenuScreen->search(ftag_sub1[i])->hide();
mpMenuScreen->search(ftag_name0[i])->hide();
mpMenuScreen->search(ftag_name1[i])->hide();
} else {
mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(ftag_sub0[i]);
mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(ftag_sub1[i]);
mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(ftag_name0[i]);
mpFTagPicture[i][3] = (J2DTextBox*)mpMenuScreen->search(ftag_name1[i]);
mpMenuScreen->search(tag_sub0[i])->hide();
mpMenuScreen->search(tag_sub1[i])->hide();
mpMenuScreen->search(tag_name0[i])->hide();
mpMenuScreen->search(tag_name1[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpFTagPicture[i][0] = (J2DTextBox*)mpMenuScreen->search(tag_sub0[i]);
mpFTagPicture[i][1] = (J2DTextBox*)mpMenuScreen->search(tag_sub1[i]);
mpFTagPicture[i][2] = (J2DTextBox*)mpMenuScreen->search(tag_name0[i]);
@@ -522,7 +544,16 @@ void dMenu_Skill_c::screenSetMenu() {
mSelectWhite[i] = mpFTagPicture[1][i]->getWhite();
}
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* textBox;
if (dusk::version::isRegionJpn()) {
textBox = (J2DTextBox*)mpMenuScreen->search(MULTI_CHAR('t_t00'));
mpMenuScreen->search(MULTI_CHAR('f_t00'))->hide();
} else {
textBox = (J2DTextBox*)mpMenuScreen->search(MULTI_CHAR('f_t00'));
mpMenuScreen->search(MULTI_CHAR('t_t00'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* textBox = (J2DTextBox*)mpMenuScreen->search(MULTI_CHAR('t_t00'));
mpMenuScreen->search(MULTI_CHAR('f_t00'))->hide();
#else
@@ -551,7 +582,15 @@ void dMenu_Skill_c::screenSetLetter() {
mpLetterScreen = JKR_NEW J2DScreen();
mpLetterScreen->setPriority("zelda_ougi_info.blo", 0x20000, mpArchive);
dPaneClass_showNullPane(mpLetterScreen);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpTextPane = JKR_NEW CPaneMgr(mpLetterScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpLetterScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
mpTextPane = JKR_NEW CPaneMgr(mpLetterScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
mpLetterScreen->search(MULTI_CHAR('n_3line'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpTextPane = JKR_NEW CPaneMgr(mpLetterScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpLetterScreen->search(MULTI_CHAR('n_e4line'))->hide();
#else
@@ -564,7 +603,15 @@ void dMenu_Skill_c::screenSetLetter() {
J2DTextBox* paneString = (J2DTextBox*)mpTextPane->getPanePtr();
paneString->setString(0x200, "");
for (int i = 0; i < 4; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(name_tag[i]);
mpLetterScreen->search(fame_tag[i])->hide();
} else {
mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(fame_tag[i]);
mpLetterScreen->search(name_tag[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpNameString[i] = (J2DTextBox*)mpLetterScreen->search(name_tag[i]);
mpLetterScreen->search(fame_tag[i])->hide();
#else
+26 -1
View File
@@ -23,6 +23,8 @@
#include "dusk/frame_interpolation.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/settings.h"
#include "dusk/ui/icon_provider.hpp"
@@ -59,6 +61,27 @@ void dAnchorHudScale(CPaneMgr* i_pane, HudCorner i_corner, f32* io_x, f32* io_y,
#endif
dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
#if TARGET_PC
// correct hio data here because we can't do runtime disc checks in sinit data constructors
if (dusk::version::isRegionJpn()) {
g_drawHIO.mButtonATextSpacing = -2.0f;
for (int i = 0; i < 6; i++) {
static f32 const finfoPosX_jpn[6] = {-27.0f, 0.0f, -12.0f, 0.0f, -12.0f, -32.8f};
static f32 const fishnPosX_jpn[6] = {-27.0f, 0.0f, -12.0f, 0.0f, -12.0f, -32.8f};
g_drawHIO.mFishListScreen.mFishCountSizePosX[i] = finfoPosX_jpn[i];
g_drawHIO.mFishListScreen.mFishInfoPosX[i] = fishnPosX_jpn[i];
}
} else {
g_drawHIO.mButtonATextSpacing = 1.0f;
for (int i = 0; i < 6; i++) {
static f32 const finfoPosX[6] = {-17.0f, 0.0f, -14.0f, 0.0f, -12.0f, -32.8f};
static f32 const fishnPosX[6] = {-17.0f, 0.0f, -14.0f, 0.0f, -12.0f, -32.8f};
g_drawHIO.mFishListScreen.mFishCountSizePosX[i] = finfoPosX[i];
g_drawHIO.mFishListScreen.mFishInfoPosX[i] = fishnPosX[i];
}
}
#endif
OS_REPORT("enter dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap *mp_heap)\n");
heap = mp_heap;
@@ -161,7 +184,8 @@ dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
}
J2DTextBox::TFontSize font_size;
#if VERSION != VERSION_GCN_JPN
#if TARGET_PC || VERSION != VERSION_GCN_JPN
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
font_size.mSizeX = 17.0f;
font_size.mSizeY = 20.0f;
for (int i = 0; i < 5; i++) {
@@ -171,6 +195,7 @@ dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
static_cast<J2DTextBox*>(mpXYText[i][1]->getPanePtr())->setFontSize(font_size);
static_cast<J2DTextBox*>(mpXYText[i][2]->getPanePtr())->setFontSize(font_size);
}
IF_DUSK_BLOCK_END
#endif
init();
+25 -14
View File
@@ -15,6 +15,7 @@
#include <cstring>
#include "dusk/version.hpp"
#include "helpers/string.hpp"
enum ITEMICON_RES_FILE_ID {
@@ -534,13 +535,18 @@ f32 dMeter2Info_c::getStringLength(J2DTextBox* i_textbox, char* i_string) {
str_width = 0.0f;
} else {
int c = (u8)*string;
#if VERSION == VERSION_GCN_JPN
bool unkFlag1 = false;
if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
unkFlag1 = true;
}
if (unkFlag1) {
c = (c << 8) | (u8)*++string;
#if TARGET_PC || VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn())
#endif
{
bool unkFlag1 = false;
if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
unkFlag1 = true;
}
if (unkFlag1) {
c = (c << 8) | (u8)*++string;
}
}
#endif
str_width += charSpace + (fontSize.mSizeX * ((f32)font->getWidth(c) / (f32)font->getCellWidth()));
@@ -566,13 +572,18 @@ f32 dMeter2Info_c::getStringLength(JUTFont* i_font, f32 param_2, f32 param_3, ch
str_width = 0.0f;
} else {
int c = (u8)*string;
#if VERSION == VERSION_GCN_JPN
bool unkFlag1 = false;
if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
unkFlag1 = true;
}
if (unkFlag1) {
c = (c << 8) | (u8)*++string;
#if TARGET_PC || VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn())
#endif
{
bool unkFlag1 = false;
if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
unkFlag1 = true;
}
if (unkFlag1) {
c = (c << 8) | (u8)*++string;
}
}
#endif
str_width += param_3 + param_2 * ((f32)i_font->getWidth(c) / (f32)i_font->getCellWidth());
+69 -14
View File
@@ -19,11 +19,15 @@
#include "dusk/frame_interpolation.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "helpers/string.hpp"
#endif
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
#define STR_BUF_LEN 528
#elif VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
@@ -261,7 +265,15 @@ void dMeterButton_c::draw() {
SAFE_STRCPY(tmp_buf, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getStringPtr());
mpTextScreen->draw(0.0f, 0.0f, graf_ctx);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpString_c->getString(mMsgID, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), NULL, NULL,
NULL, 12);
} else {
mpString_c->getString(mMsgID, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), NULL, NULL,
NULL, 8);
}
#elif VERSION == VERSION_GCN_JPN
mpString_c->getString(mMsgID, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), NULL, NULL,
NULL, 12);
#else
@@ -1195,7 +1207,15 @@ void dMeterButton_c::screenInitButton() {
field_0x4d9 = 0xFF;
for (int i = 0; i < 10; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(text_tag[i]);
mpButtonScreen->search(ftext_tag[i])->hide();
} else {
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(ftext_tag[i]);
mpButtonScreen->search(text_tag[i])->hide();
}
#elif VERSION == VERSION_GCN_JPN
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(text_tag[i]);
mpButtonScreen->search(ftext_tag[i])->hide();
#else
@@ -1468,7 +1488,50 @@ void dMeterButton_c::screenInitText() {
mpTmRoot_c = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_null'), 0, NULL);
JUT_ASSERT(2499, mpTmRoot_c != NULL);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('t3f_s'), 0, NULL);
field_0x0ec[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3f'), 0, NULL);
field_0x0ec[1] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3f_s'), 0, NULL);
mpTextScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTextScreen->search(MULTI_CHAR('n_3fline'))->show();
mpTextScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTextScreen, 't3_s', 0, NULL);
field_0x0ec[0] = NULL;
field_0x0ec[1] = NULL;
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
mpTextScreen->search(MULTI_CHAR('n_3line'))->show();
mpTextScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTextScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
JUT_ASSERT(2504, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTextScreen, 't4_s', 0, NULL);
JUT_ASSERT(2507, mpTm_c[1] != NULL);
field_0x0ec[0] = NULL;
field_0x0ec[1] = NULL;
OS_REPORT("[%s] %d\n", __FILE__, 2512);
mpTextScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTextScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTextScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTextScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
@@ -1516,19 +1579,11 @@ void dMeterButton_c::screenInitText() {
f32 line_space = static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getLineSpace();
for (int i = 0; i < 2; i++) {
static_cast<J2DTextBox*>(mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(mpTm_c[i]->getPanePtr())->setString(0x210, "");
#else
static_cast<J2DTextBox*>(mpTm_c[i]->getPanePtr())->setString(0x200, "");
#endif
static_cast<J2DTextBox*>(mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
if (field_0x0ec[i] != NULL) {
static_cast<J2DTextBox*>(field_0x0ec[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
static_cast<J2DTextBox*>(field_0x0ec[i]->getPanePtr())->setString(0x210, "");
#else
static_cast<J2DTextBox*>(field_0x0ec[i]->getPanePtr())->setString(0x200, "");
#endif
static_cast<J2DTextBox*>(field_0x0ec[i]->getPanePtr())->setString(STR_BUF_LEN, "");
static_cast<J2DTextBox*>(field_0x0ec[i]->getPanePtr())->setLineSpace(line_space);
}
}
+134 -26
View File
@@ -1,23 +1,33 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_class.h"
#include <cstdio>
#include <cstring>
#include "d/d_meter2_info.h"
#include "d/d_msg_object.h"
#include "d/d_msg_unit.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "d/d_msg_out_font.h"
#include "m_Do/m_Do_graphic.h"
#include "d/d_lib.h"
#include "JSystem/JUtility/JUTFont.h"
#include "d/d_lib.h"
#include "d/d_meter2_info.h"
#include "d/d_msg_class.h"
#include "d/d_msg_object.h"
#include "d/d_msg_out_font.h"
#include "d/d_msg_unit.h"
#include "dusk/version.hpp"
#include "m_Do/m_Do_graphic.h"
#if TARGET_PC
#include "dusk/menu_pointer.h"
#include "dusk/scope_guard.hpp"
#endif
#if REGION_JPN
#if TARGET_PC
#define CHAR_CODE_MALE_ICON (dusk::version::isRegionJpn() ? 0x8189 : 0xB2)
#define CHAR_CODE_FEMALE_ICON (dusk::version::isRegionJpn() ? 0x818A : 0xB3)
#define CHAR_CODE_STAR_ICON (dusk::version::isRegionJpn() ? 0x819A : 0xB1)
#define CHAR_CODE_REFMARK (dusk::version::isRegionJpn() ? 0x81A6 : 0x89)
#define CHAR_CODE_THIN_LEFT_ARROW (dusk::version::isRegionJpn() ? 0x81A9 : 0xB9)
#define CHAR_CODE_THIN_RIGHT_ARROW (dusk::version::isRegionJpn() ? 0x81A8 : 0xBC)
#define CHAR_CODE_THIN_UP_ARROW (dusk::version::isRegionJpn() ? 0x81AA : 0xBD)
#define CHAR_CODE_THIN_DOWN_ARROW (dusk::version::isRegionJpn() ? 0x81AB : 0xBE)
#elif REGION_JPN
#define CHAR_CODE_MALE_ICON 0x8189
#define CHAR_CODE_FEMALE_ICON 0x818A
#define CHAR_CODE_STAR_ICON 0x819A
@@ -431,8 +441,33 @@ void jmessage_tReference::calcDistance() {
u8 jmessage_tReference::getLineMax() {
int line_max;
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (isKanban()) {
line_max = 6;
} else if (isBook()) {
line_max = 7;
} else if (isStaffRoll()) {
line_max = 10;
} else if (isSaveSeq()) {
line_max = 5;
} else {
line_max = 3;
}
} else {
if (isKanban()) {
line_max = 7;
} else if (isBook()) {
line_max = 9;
} else if (isStaffRoll()) {
line_max = 10;
} else if (isSaveSeq()) {
line_max = 6;
} else {
line_max = 4;
}
}
#elif REGION_JPN
if (isKanban()) {
line_max = 6;
} else if (isBook()) {
@@ -895,7 +930,7 @@ void jmessage_tMeasureProcessor::do_begin(void const* pEntry, char const* pszTex
mSeSpeaker = ((JMSMesgEntry_c*)pEntry)->se_speaker;
mSeMood = ((JMSMesgEntry_c*)pEntry)->se_mood;
for (int i = 0; i < D_MSG_CLASS_PAGE_CNT_MAX; i++) {
for (int i = 0; i < DUSK_IF_ELSE((dusk::version::isRegionJpn() ? 30 : D_MSG_CLASS_PAGE_CNT_MAX), D_MSG_CLASS_PAGE_CNT_MAX); i++) {
pReference->setLineLength(i, 0.0f, 0.0f);
pReference->setPageLine(i, 0);
pReference->setPageLineMax(i, 0);
@@ -912,7 +947,11 @@ void jmessage_tMeasureProcessor::do_begin(void const* pEntry, char const* pszTex
pReference->setLineArrange(i, 1);
}
#if !REGION_JPN
#if TARGET_PC
if (!dusk::version::isRegionJpn() && ((JMSMesgEntry_c*)pEntry)->unk_0xd == 0) {
pReference->setLineArrange(i, 1);
}
#elif !REGION_JPN
if (((JMSMesgEntry_c*)pEntry)->unk_0xd == 0) {
pReference->setLineArrange(i, 1);
}
@@ -1591,6 +1630,33 @@ void jmessage_tMeasureProcessor::do_scale(f32 i_scale) {
mPageLineMax--;
JUT_ASSERT(0x930, mPageLineMax > 0);
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (field_0x3e == 0) {
pReference->setPageType(field_0x40, 2);
} else {
pReference->setPageType(field_0x40, 3);
if (field_0x3e == 1 && pReference->getPageType(field_0x40) == 2) {
pReference->setPageType(field_0x40, 4);
}
}
} else {
if (field_0x3e == 0) {
pReference->setPageType(field_0x40, 2);
} else if (field_0x3e == 2 && mPageLineMax == 3) {
if (pReference->getPageType(field_0x40) == 4) {
pReference->setPageType(field_0x40, 5);
} else {
pReference->setPageType(field_0x40, 8);
}
} else {
pReference->setPageType(field_0x40, 3);
if (field_0x3e == 1 && pReference->getPageType(field_0x40) == 2) {
pReference->setPageType(field_0x40, 4);
}
}
}
#else
#if REGION_JPN
if (field_0x3e == 0) {
pReference->setPageType(field_0x40, 2);
@@ -1612,6 +1678,7 @@ void jmessage_tMeasureProcessor::do_scale(f32 i_scale) {
pReference->setPageType(field_0x40, 4);
}
}
#endif
}
}
@@ -1762,7 +1829,10 @@ void jmessage_tMeasureProcessor::do_pageType(int param_0) {
void jmessage_tMeasureProcessor::do_name1() {
const char* name = dComIfGs_getPlayerName();
#if REGION_JPN
#if TARGET_PC || REGION_JPN
if (!dusk::version::isRegionJpn())
return;
int c = (((char)name[0] & 0xFF) << 8) | ((char)name[1] & 0xFF);
// if first character is hiragana or katakana
if ((c >= 0x829F && c <= 0x82F1) || (c >= 0x8340 && c <= 0x8396)) {
@@ -2041,7 +2111,7 @@ bool jmessage_tSequenceProcessor::do_isReady() {
field_0xae = 1;
field_0xa4 = 0;
pReference->onBatchFlag();
pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX);
pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX));
field_0xa4 = field_0xa8;
return true;
}
@@ -2061,7 +2131,7 @@ bool jmessage_tSequenceProcessor::do_isReady() {
field_0xae = 1;
field_0xa4 = 0;
pReference->onBatchFlag();
pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX);
pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX));
return true;
}
@@ -2084,7 +2154,7 @@ bool jmessage_tSequenceProcessor::do_isReady() {
if (mDoCPd_c::getTrigA(PAD_1) || field_0xb2 != 0 IF_DUSK(|| (dusk::getSettings().game.instantText && mDoCPd_c::getHoldB(0)))) {
field_0xa4 = 0;
pReference->onBatchFlag();
pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX);
pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX));
}
break;
case 1:
@@ -2093,7 +2163,7 @@ bool jmessage_tSequenceProcessor::do_isReady() {
case 9:
field_0xa4 = 0;
pReference->onBatchFlag();
pReference->setCharCnt(D_MSG_CLASS_CHAR_CNT_MAX);
pReference->setCharCnt(DUSK_IF_ELSE(dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200, D_MSG_CLASS_CHAR_CNT_MAX));
break;
case 2:
if (field_0xb2 != 0) {
@@ -2108,7 +2178,9 @@ bool jmessage_tSequenceProcessor::do_isReady() {
}
field_0xa6++;
#if REGION_JPN
#if TARGET_PC
if ((dusk::version::isRegionJpn() && field_0xa6 >= 1) || (!dusk::version::isRegionJpn() && field_0xa6 >= 2)) {
#elif REGION_JPN
if (field_0xa6 >= 1) {
#else
if (field_0xa6 >= 2) {
@@ -2533,7 +2605,10 @@ bool jmessage_tSequenceProcessor::do_jump_isReady() {
void jmessage_tSequenceProcessor::do_name1() {
const char* name = dComIfGs_getPlayerName();
#if REGION_JPN
#if TARGET_PC || REGION_JPN
if (!dusk::version::isRegionJpn())
return;
int c = (((char)name[0] & 0xFF) << 8) | ((char)name[1] & 0xFF);
// if first character is hiragana or katakana
if ((c >= 0x829F && c <= 0x82F1) || (c >= 0x8340 && c <= 0x8396)) {
@@ -3357,9 +3432,9 @@ void jmessage_tRenderingProcessor::do_heightcenter() {
}
break;
}
#if REGION_JPN
#if TARGET_PC || REGION_JPN
case 2:
if ((s8)pReference->getLineMax() == 3) {
if (IF_DUSK(dusk::version::isRegionJpn() &&) (s8)pReference->getLineMax() == 3) {
int nowPageLine = pReference->getNowPageLine();
field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine));
var_f31 += field_0x138;
@@ -3368,12 +3443,25 @@ void jmessage_tRenderingProcessor::do_heightcenter() {
if (field_0x142 == 0) {
field_0x138 = pReference->getLineSpace();
var_f31 += field_0x138;
} else if (field_0x142 == 1) {
}
#if TARGET_PC
else if (!dusk::version::isRegionJpn() || (dusk::version::isRegionJpn() && field_0x142 == 1))
#else
else if (field_0x142 == 1)
#endif
{
field_0x138 = 0.5f * pReference->getLineSpace();
var_f31 += field_0x138;
}
break;
case 3: {
#if TARGET_PC
if (!dusk::version::isRegionJpn()) {
field_0x138 = 0.5f * pReference->getLineSpace();
var_f31 += field_0x138;
break;
}
#endif
if (field_0x142 == 1) {
int nowPageLine = pReference->getNowPageLine();
field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine));
@@ -3383,8 +3471,25 @@ void jmessage_tRenderingProcessor::do_heightcenter() {
break;
}
case 4: {
#if TARGET_PC
if (!dusk::version::isRegionJpn() && field_0x142 == 0) {
int nowPageLine = pReference->getNowPageLine();
field_0x138 = pReference->getLineSpace() * (0.5f * (pReference->getLineMax() - (s16)nowPageLine));
var_f31 += field_0x138;
}
#endif
if (field_0x142 == 1) {
#if TARGET_PC
if (!dusk::version::isRegionJpn()) {
field_0x138 = 0.5f * pReference->getLineSpace();
var_f31 += field_0x138;
} else {
var_f31 += 0.5f * pReference->getLineSpace();
}
#else
var_f31 += 0.5f * pReference->getLineSpace();
#endif
}
f32 sp8 = pReference->getLineScale(field_0x142) / 100.0f;
@@ -3662,7 +3767,7 @@ void jmessage_tRenderingProcessor::do_strcat(char* i_str, bool param_2, bool par
} else {
JUT_WARN(5316, "%s", "TextBox Alloc Byte Over!!");
}
} else if (field_0x11c < D_MSG_CLASS_CHAR_CNT_MAX) {
} else if (field_0x11c < DUSK_IF_ELSE((dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200), D_MSG_CLASS_CHAR_CNT_MAX)) {
if (param_2) {
field_0x146++;
if (pReference->getBatchColorFlag() != 0) {
@@ -3697,7 +3802,7 @@ void jmessage_tRenderingProcessor::do_strcat(char* i_str, bool param_2, bool par
int length = 0;
length = strlen(buffer);
if (field_0x11c + length < D_MSG_CLASS_CHAR_CNT_MAX) {
if (field_0x11c + length < DUSK_IF_ELSE((dusk::version::isRegionJpn() ? D_MSG_CLASS_CHAR_CNT_MAX : 0x200), D_MSG_CLASS_CHAR_CNT_MAX)) {
field_0x148 = strlen(pReference->getTextPtr());
field_0x14a = strlen(pReference->getTextSPtr());
@@ -3792,7 +3897,10 @@ void jmessage_tRenderingProcessor::do_rubystrcat(char* i_src, TEXT_SPAN i_dst, f
void jmessage_tRenderingProcessor::do_name1() {
const char* name = dComIfGs_getPlayerName();
#if REGION_JPN
#if TARGET_PC || REGION_JPN
if (!dusk::version::isRegionJpn())
return;
int c = (((char)name[0] & 0xFF) << 8) | ((char)name[1] & 0xFF);
// if first character is hiragana or katakana
if ((c >= 0x829F && c <= 0x82F1) || (c >= 0x8340 && c <= 0x8396)) {
@@ -3889,7 +3997,7 @@ void jmessage_string_tReference::init(J2DTextBox* panePtr, J2DTextBox* runyPaneP
mRubyPanePtr = runyPanePtr;
mOutFontPtr = outFontPtr;
mLineCount = 0;
mLineMax = D_MSG_CLASS_LINE_MAX;
mLineMax = DUSK_IF_ELSE(dusk::version::isRegionJpn() ? 9 : D_MSG_CLASS_LINE_MAX, D_MSG_CLASS_LINE_MAX);
mNowPage = 0;
mFlags = flags;
if (font != NULL) {
+7
View File
@@ -314,6 +314,13 @@ dMsgObject_HIO_c::dMsgObject_HIO_c() {
}
int dMsgObject_c::_create(msg_class* param_1) {
#if TARGET_PC
if (dusk::version::isRegionJpn())
g_MsgObject_HIO_c.mBoxTalkScaleX = 1.1f;
else
g_MsgObject_HIO_c.mBoxTalkScaleX = 1.2f;
#endif
field_0x124 = NULL;
field_0x100 = param_1;
field_0x16c = -1;
+14 -3
View File
@@ -1,11 +1,12 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_out_font.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "d/d_meter2_info.h"
#include "d/d_msg_object.h"
#include "d/d_msg_out_font.h"
#include "dusk/frame_interpolation.h"
#include "dusk/version.hpp"
#include "f_op/f_op_msg_mng.h"
COutFontSet_c::COutFontSet_c() {
@@ -289,8 +290,10 @@ void COutFont_c::initialize() {
void COutFont_c::drawFont(J2DTextBox* i_textbox, u8 i_type, f32 i_posX, f32 i_posY, f32 i_sizeX,
f32 i_sizeY, u32 i_color, u8 i_alpha) {
#if VERSION != VERSION_GCN_JPN
#if TARGET_PC || VERSION != VERSION_GCN_JPN
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
i_posY += 1.0f;
IF_DUSK_BLOCK_END;
#endif
for (int i = 0; i < 35; i++) {
if (mpOfs[i]->getType() == 0x47) {
@@ -380,7 +383,15 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param
break;
case 5:
case 6: {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
posY -= 2.0f;
sizeY -= 2.0f;
} else {
posY += 1.0f;
sizeY -= 3.0f;
}
#elif VERSION == VERSION_GCN_JPN
posY -= 2.0f;
sizeY -= 2.0f;
#else
+107 -5
View File
@@ -5,16 +5,17 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_scrn_3select.h"
#include <cstring>
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
#include <cstring>
#include "d/d_com_inf_game.h"
#include "d/d_select_cursor.h"
#include "d/d_msg_object.h"
#include "d/d_msg_scrn_3select.h"
#include "d/d_pane_class.h"
#include "d/d_select_cursor.h"
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/menu_pointer.h"
@@ -118,7 +119,97 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() {
mCursorPos[i] = mpCursor_c[i]->getGlobalVtxCenter(true, 0);
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0) {
mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, 'a_tf', 0, NULL);
mpTmSel_c[1] = JKR_NEW CPaneMgr(mpScreen, 'b_tf', 0, NULL);
mpTmSel_c[2] = JKR_NEW CPaneMgr(mpScreen, 'c_tf', 0, NULL);
mpTmrSel_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('a_tf_f'), 0, NULL);
mpTmrSel_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('b_tf_f'), 0, NULL);
mpTmrSel_c[2] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('c_tf_f'), 0, NULL);
for (int i = 0; i < 3; i++) {
((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, "");
((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont());
((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setString(64, "");
((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont());
}
mpScreen->search(MULTI_CHAR('a_t_e'))->hide();
mpScreen->search(MULTI_CHAR('b_t_e'))->hide();
mpScreen->search(MULTI_CHAR('c_t_e'))->hide();
mpScreen->search('a_tf')->show();
mpScreen->search('b_tf')->show();
mpScreen->search('c_tf')->show();
mpScreen->search(MULTI_CHAR('a_tf_f'))->show();
mpScreen->search(MULTI_CHAR('b_tf_f'))->show();
mpScreen->search(MULTI_CHAR('c_tf_f'))->show();
mpScreen->search('a_t')->hide();
mpScreen->search('b_t')->hide();
mpScreen->search('c_t')->hide();
} else {
mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, 'a_t', 0, NULL);
mpTmSel_c[1] = JKR_NEW CPaneMgr(mpScreen, 'b_t', 0, NULL);
mpTmSel_c[2] = JKR_NEW CPaneMgr(mpScreen, 'c_t', 0, NULL);
for (int i = 0; i < 3; i++) {
((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, "");
((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont());
mpTmrSel_c[i] = NULL;
}
mpScreen->search(MULTI_CHAR('a_t_e'))->hide();
mpScreen->search(MULTI_CHAR('b_t_e'))->hide();
mpScreen->search(MULTI_CHAR('c_t_e'))->hide();
mpScreen->search('a_tf')->hide();
mpScreen->search('b_tf')->hide();
mpScreen->search('c_tf')->hide();
mpScreen->search(MULTI_CHAR('a_tf_f'))->hide();
mpScreen->search(MULTI_CHAR('b_tf_f'))->hide();
mpScreen->search(MULTI_CHAR('c_tf_f'))->hide();
mpScreen->search('a_t')->show();
mpScreen->search('b_t')->show();
mpScreen->search('c_t')->show();
}
} else {
mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('a_t_e'), 0, NULL);
JUT_ASSERT(0, mpTmSel_c[0] != NULL);
mpTmSel_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('b_t_e'), 0, NULL);
JUT_ASSERT(0, mpTmSel_c[1] != NULL);
mpTmSel_c[2] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('c_t_e'), 0, NULL);
JUT_ASSERT(0, mpTmSel_c[2] != NULL);
for (int i = 0; i < 3; i++) {
((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, "");
((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont());
mpTmrSel_c[i] = NULL;
}
mpScreen->search(MULTI_CHAR('a_t_e'))->show();
mpScreen->search(MULTI_CHAR('b_t_e'))->show();
mpScreen->search(MULTI_CHAR('c_t_e'))->show();
mpScreen->search('a_tf')->hide();
mpScreen->search('b_tf')->hide();
mpScreen->search('c_tf')->hide();
mpScreen->search(MULTI_CHAR('a_tf_f'))->hide();
mpScreen->search(MULTI_CHAR('b_tf_f'))->hide();
mpScreen->search(MULTI_CHAR('c_tf_f'))->hide();
mpScreen->search('a_t')->hide();
mpScreen->search('b_t')->hide();
mpScreen->search('c_t')->hide();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0) {
mpTmSel_c[0] = JKR_NEW CPaneMgr(mpScreen, 'a_tf', 0, NULL);
@@ -966,7 +1057,18 @@ void dMsgScrn3Select_c::selectTrans() {
f32 sp68[3];
for (int i = 0; i < 3; i++) {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0 && (field_0x112 & (u8)(1 << i)) != 0) {
sp68[i] = 0.0f;
} else {
f32 temp = mpTmSel_c[i]->getInitPosY();
sp68[i] = mpScreen->search(tag_n[i])->getBounds().i.y - temp;
}
} else {
sp68[i] = 0.0f;
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0 && (field_0x112 & (u8)(1 << i)) != 0) {
sp68[i] = 0.0f;
} else {
+5 -2
View File
@@ -1,10 +1,11 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_scrn_boss.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "d/d_msg_object.h"
#include "d/d_msg_scrn_boss.h"
#include "d/d_pane_class.h"
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/settings.h"
@@ -37,8 +38,10 @@ dMsgScrnBoss_c::dMsgScrnBoss_c() {
for (int i = 0; i < 7; i++) {
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getRubyFont());
#if VERSION != VERSION_GCN_JPN
#if TARGET_PC || VERSION != VERSION_GCN_JPN
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setCharSpace(1.0f);
IF_DUSK_BLOCK_END
#endif
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x100, "");
}
+61 -14
View File
@@ -14,7 +14,9 @@
#include <cstdio>
#include <cstring>
#if VERSION == VERSION_GCN_JPN
#include "dusk/version.hpp"
#if TARGET_PC || VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
@@ -95,7 +97,13 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUs
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
field_0x50 = 0.0f;
} else {
field_0x50 = -10.0f;
}
#elif VERSION == VERSION_GCN_JPN
field_0x50 = 0.0f;
#else
field_0x50 = -10.0f;
@@ -109,7 +117,48 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUs
mpScreen->search(MULTI_CHAR('n_all'))->scale(g_MsgObject_HIO_c.mBoxTalkScaleX,
g_MsgObject_HIO_c.mBoxTalkScaleY);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
field_0x50 = 0.0f;
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL);
mpTmr_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f'), 0, NULL);
mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s'), 0, NULL);
mpTxScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->show();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't3_s', 0, NULL);
mpTmr_c[0] = NULL;
mpTmr_c[1] = NULL;
mpTxScreen->search(MULTI_CHAR('n_3line'))->show();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
field_0x50 = -10.0f;
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
JUT_ASSERT(162, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't4_s', 0, NULL);
JUT_ASSERT(165, mpTm_c[1] != NULL);
mpTmr_c[0] = NULL;
mpTmr_c[1] = NULL;
mpTxScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
field_0x50 = 0.0f;
if (dComIfGs_getOptRuby() == 0) {
@@ -160,20 +209,12 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUs
f32 lineSpace = ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getLineSpace();
for (int i = 0; i < 2; i++) {
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setLineSpace(lineSpace);
if (mpTmr_c[i] != NULL) {
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setLineSpace(lineSpace);
}
}
@@ -320,7 +361,13 @@ void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) {
SAFE_STRCPY(string_buf, ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr());
mpTxScreen->draw(0.0f, 0.0f, (J2DGrafContext*)i_graf);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12);
} else {
mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8);
}
#elif VERSION == VERSION_GCN_JPN
mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12);
#else
mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8);
+26 -11
View File
@@ -4,20 +4,21 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_scrn_howl.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#include "d/d_msg_object.h"
#include "d/d_pane_class.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "Z2AudioLib/Z2WolfHowlMgr.h"
#include "d/actor/d_a_alink.h"
#include "d/d_meter2.h"
#include "d/d_meter2_draw.h"
#include "d/d_meter2_info.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "Z2AudioLib/Z2WolfHowlMgr.h"
#include "d/d_msg_object.h"
#include "d/d_msg_scrn_howl.h"
#include "d/d_pane_class.h"
#include "dusk/version.hpp"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
#if TARGET_PC
#include "dusk/frame_interpolation.h"
@@ -89,7 +90,21 @@ dMsgScrnHowl_c::dMsgScrnHowl_c() {
JUT_ASSERT(96, mpButtonIcon[1] != NULL);
mpButtonText[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('gr_txt_n'), 2, NULL);
JUT_ASSERT(98, mpButtonText[1] != NULL);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
J2DTextBox* piStack_19c;
J2DTextBox* piStack_1a0;
if (dusk::version::isRegionJpn()) {
piStack_19c = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_l_info'));
piStack_1a0 = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_r_info'));
mpScreen->search(MULTI_CHAR('fgr_info'))->hide();
mpScreen->search(MULTI_CHAR('fgl_info'))->hide();
} else {
piStack_19c = (J2DTextBox*)mpScreen->search(MULTI_CHAR('fgl_info'));
piStack_1a0 = (J2DTextBox*)mpScreen->search(MULTI_CHAR('fgr_info'));
mpScreen->search(MULTI_CHAR('g_l_info'))->hide();
mpScreen->search(MULTI_CHAR('g_r_info'))->hide();
}
#elif VERSION == VERSION_GCN_JPN
J2DTextBox* piStack_19c = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_l_info'));
J2DTextBox* piStack_1a0 = (J2DTextBox*)mpScreen->search(MULTI_CHAR('g_r_info'));
mpScreen->search(MULTI_CHAR('fgr_info'))->hide();
+49 -1
View File
@@ -24,6 +24,8 @@
#include "JSystem/JUtility/JUTTexture.h"
#include <cstring>
#include "dusk/version.hpp"
dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
if (param_3 != NULL) {
field_0x138 = param_3;
@@ -198,7 +200,53 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
mpPmP_c->scale(g_MsgObject_HIO_c.mBoxItemScaleX, g_MsgObject_HIO_c.mBoxItemScaleY);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
JUT_ASSERT(407, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL);
JUT_ASSERT(410, mpTm_c[1] != NULL);
mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_w'), 0, NULL);
JUT_ASSERT(413, mpTm_c[2] != NULL);
mpTmr_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f'), 0, NULL);
JUT_ASSERT(416, mpTmr_c[0] != NULL);
mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s'), 0, NULL);
JUT_ASSERT(419, mpTmr_c[1] != NULL);
mpTmr_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_w'), 0, NULL);
JUT_ASSERT(422, mpTmr_c[2] != NULL);
mpTxScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->show();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3line'), 0, NULL);
JUT_ASSERT(407, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't3_s', 0, NULL);
JUT_ASSERT(410, mpTm_c[1] != NULL);
mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, 't3_w', 0, NULL);
JUT_ASSERT(413, mpTm_c[2] != NULL);
mpTxScreen->search(MULTI_CHAR('n_3line'))->show();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
JUT_ASSERT(407, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't4_s', 0, NULL);
JUT_ASSERT(410, mpTm_c[1] != NULL);
mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, 't4_w', 0, NULL);
JUT_ASSERT(413, mpTm_c[2] != NULL);
mpTxScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
JUT_ASSERT(407, mpTm_c[0] != NULL);
+42 -11
View File
@@ -15,6 +15,14 @@
#include "d/d_pane_class.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC || VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
#endif
dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) {
if (i_heap != NULL) {
heap = i_heap;
@@ -46,7 +54,38 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) {
field_0xcc = g_MsgObject_HIO_c.mBoxPos[0][5];
mpPmP_c->paneTrans(0.0f, field_0xcc);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('t3f_s'), 0, NULL);
mpTmr_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3f'), 0, NULL);
mpTmr_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3f_s'), 0, NULL);
mpScreen->search(MULTI_CHAR('n_3line'))->hide();
mpScreen->search(MULTI_CHAR('n_3fline'))->show();
mpScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, 't3_s', 0, NULL);
mpScreen->search(MULTI_CHAR('n_3line'))->show();
mpScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
JUT_ASSERT(0, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, 't4_s', 0, NULL);
JUT_ASSERT(0, mpTm_c[1] != NULL);
mpScreen->search(MULTI_CHAR('n_3line'))->hide();
mpScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpScreen, MULTI_CHAR('t3f_s'), 0, NULL);
@@ -79,21 +118,13 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) {
for (int i = 0; i < 2; i++) {
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
mpTm_c[i]->setBlackWhite(g_MsgObject_HIO_c.mBoxStartBlack[i][4],
g_MsgObject_HIO_c.mBoxStartWhite[i][4]);
if (mpTmr_c[i] != NULL) {
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
mpTmr_c[i]->setBlackWhite(g_MsgObject_HIO_c.mBoxStartBlack[i][4],
g_MsgObject_HIO_c.mBoxStartWhite[i][4]);
}
+43 -2
View File
@@ -4,14 +4,15 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_scrn_kanban.h"
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "d/d_msg_object.h"
#include "d/d_msg_out_font.h"
#include "d/d_msg_scrn_kanban.h"
#include "d/d_pane_class.h"
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/settings.h"
@@ -60,8 +61,48 @@ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) {
mpSpot_c->getPanePtr()->setAnimation(field_0xd0);
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() != 0) {
static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'};
for (int i = 0; i < 3; i++) {
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
}
#if VERSION == VERSION_GCN_JPN
mpScreen->search(MULTI_CHAR('n_3line'))->show();
mpScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
static u64 const t_tag_2[3] = {MULTI_CHAR('t3fline'), MULTI_CHAR('t3f_w'), MULTI_CHAR('t3f_s')};
static u64 const tr_tag[3] = {MULTI_CHAR('mg_3f'), MULTI_CHAR('mg_3f_w'), MULTI_CHAR('mg_3f_s')};
for (int i = 0; i < 3; i++) {
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag_2[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
mpTmr_c[i] = JKR_NEW CPaneMgr(mpScreen, tr_tag[i], 0, NULL);
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
}
mpScreen->search(MULTI_CHAR('n_3line'))->hide();
mpScreen->search(MULTI_CHAR('n_3fline'))->show();
mpScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
static u64 const t_tag[3] = {MULTI_CHAR('mg_e4lin'), 'f4_w', 't4_s'};
for (int i = 0; i < 3; i++) {
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL);
JUT_ASSERT(81, mpTm_c[i] != NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
}
mpScreen->search(MULTI_CHAR('n_3line'))->hide();
mpScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() != 0) {
static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'};
for (int i = 0; i < 3; i++) {
+11 -2
View File
@@ -5,12 +5,13 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_scrn_place.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "d/d_camera.h"
#include "d/d_msg_object.h"
#include "d/d_msg_scrn_place.h"
#include "d/d_pane_class.h"
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/settings.h"
@@ -32,7 +33,13 @@ dMsgScrnPlace_c::dMsgScrnPlace_c() {
}
mpScreen = JKR_NEW J2DScreen();
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
mpScreen->setPriority("zelda_stage_title.blo", 0x20000, dComIfGp_getMsgArchive(4));
} else {
mpScreen->setPriority("zelda_stage_title_foreign.blo", 0x20000, dComIfGp_getMsgArchive(4));
}
#elif VERSION == VERSION_GCN_JPN
mpScreen->setPriority("zelda_stage_title.blo", 0x20000, dComIfGp_getMsgArchive(4));
#else
mpScreen->setPriority("zelda_stage_title_foreign.blo", 0x20000, dComIfGp_getMsgArchive(4));
@@ -59,7 +66,9 @@ dMsgScrnPlace_c::dMsgScrnPlace_c() {
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getRubyFont());
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x80, "");
#if VERSION != VERSION_GCN_JPN
IF_DUSK_BLOCK(!dusk::version::isRegionJpn())
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setCharSpace(1.0f);
IF_DUSK_BLOCK_END
#endif
}
+80 -12
View File
@@ -20,10 +20,20 @@
#include "JSystem/J2DGraph/J2DScreen.h"
#include <cstring>
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/settings.h"
#endif
#if TARGET_PC
#define STR_BUF_LEN 528
#elif VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
#endif
dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
if (param_3 != NULL) {
field_0xe4 = param_3;
@@ -100,7 +110,12 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
JUT_ASSERT(153, mpMg_c[1] != NULL);
OSInitFastCast();
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn())
field_0xf4 = 0.0f;
else
field_0xf4 = -10.0f;
#elif VERSION == VERSION_GCN_JPN
field_0xf4 = 0.0f;
#else
field_0xf4 = -10.0f;
@@ -110,7 +125,68 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
JUT_ASSERT(176, mpPmP_c != NULL);
mpPmP_c->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL);
mpTmr_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f'), 0, NULL);
if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) {
mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s1'), 0, NULL);
mpTm_c[3] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s2'), 0, NULL);
mpTm_c[4] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s3'), 0, NULL);
mpTm_c[5] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s4'), 0, NULL);
mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s1'), 0, NULL);
mpTmr_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s2'), 0, NULL);
} else {
mpTmr_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3f_s'), 0, NULL);
}
mpTxScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->show();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3line'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't3_s', 0, NULL);
if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) {
mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s1'), 0, NULL);
JUT_ASSERT(189, mpTm_c[2] != NULL);
mpTm_c[3] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s2'), 0, NULL);
JUT_ASSERT(191, mpTm_c[3] != NULL);
mpTm_c[4] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s3'), 0, NULL);
JUT_ASSERT(193, mpTm_c[4] != NULL);
mpTm_c[5] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3_s4'), 0, NULL);
JUT_ASSERT(193, mpTm_c[5] != NULL);
}
mpTxScreen->search(MULTI_CHAR('n_3line'))->show();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_e4lin'), 0, NULL);
JUT_ASSERT(182, mpTm_c[0] != NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, 't4_s', 0, NULL);
JUT_ASSERT(185, mpTm_c[1] != NULL);
if (dMsgObject_getMsgObjectClass()->getFukiKind() == 8) {
mpTm_c[2] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s1'), 0, NULL);
JUT_ASSERT(189, mpTm_c[2] != NULL);
mpTm_c[3] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s2'), 0, NULL);
JUT_ASSERT(191, mpTm_c[3] != NULL);
mpTm_c[4] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s3'), 0, NULL);
JUT_ASSERT(193, mpTm_c[4] != NULL);
mpTm_c[5] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t4_s4'), 0, NULL);
JUT_ASSERT(193, mpTm_c[5] != NULL);
}
mpTxScreen->search(MULTI_CHAR('n_3line'))->hide();
mpTxScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpTxScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('mg_3flin'), 0, NULL);
mpTm_c[1] = JKR_NEW CPaneMgr(mpTxScreen, MULTI_CHAR('t3f_s'), 0, NULL);
@@ -173,19 +249,11 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
for (int i = 0; i < 6; i++) {
if (mpTm_c[i] != NULL) {
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
}
if (mpTmr_c[i] != NULL) {
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
#if VERSION == VERSION_GCN_JPN
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, "");
#else
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, "");
#endif
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(STR_BUF_LEN, "");
}
}
if (dMsgObject_getMsgObjectClass()->getFukiKind() != 8) {
+48 -2
View File
@@ -1,13 +1,14 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_scrn_tree.h"
#include "JSystem/J2DGraph/J2DAnmLoader.h"
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "d/d_msg_object.h"
#include "d/d_msg_out_font.h"
#include "d/d_msg_scrn_tree.h"
#include "d/d_pane_class.h"
#include "dusk/version.hpp"
#if TARGET_PC
#include "dusk/settings.h"
@@ -61,7 +62,52 @@ dMsgScrnTree_c::dMsgScrnTree_c(JUTFont* param_0, JKRExpHeap* param_1) {
mpScreen->search(MULTI_CHAR('white_m'))->setAnimation(field_0xd4);
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (dComIfGs_getOptRuby() != 0) {
for (int i = 0; i < 3; i++) {
static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'};
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, "");
}
mpScreen->search(MULTI_CHAR('n_3line'))->show();
mpScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpScreen->search(MULTI_CHAR('n_e4line'))->hide();
} else {
for (int i = 0; i < 3; i++) {
static u64 const t_tag[3] = {MULTI_CHAR('t3fline'), MULTI_CHAR('t3f_w'), MULTI_CHAR('t3f_s')};
static u64 const tr_tag[3] = {MULTI_CHAR('mg_3f'), MULTI_CHAR('mg_3f_w'), MULTI_CHAR('mg_3f_s')};
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x210, "");
mpTmr_c[i] = JKR_NEW CPaneMgr(mpScreen, tr_tag[i], 0, NULL);
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(field_0x54);
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, "");
}
mpScreen->search(MULTI_CHAR('n_3line'))->hide();
mpScreen->search(MULTI_CHAR('n_3fline'))->show();
mpScreen->search(MULTI_CHAR('n_e4line'))->hide();
}
} else {
for (int i = 0; i < 3; i++) {
static u64 const t_tag[3] = {MULTI_CHAR('mg_e4lin'), 'f4_w', 't4_s'};
mpTm_c[i] = JKR_NEW CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(field_0x54);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, "");
}
mpScreen->search(MULTI_CHAR('n_3line'))->hide();
mpScreen->search(MULTI_CHAR('n_3fline'))->hide();
mpScreen->search(MULTI_CHAR('n_e4line'))->show();
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptRuby() != 0) {
for (int i = 0; i < 3; i++) {
static u64 const t_tag[3] = {MULTI_CHAR('mg_3line'), 't3_w', 't3_s'};
+201 -2
View File
@@ -1,11 +1,12 @@
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_msg_unit.h"
#include "d/d_com_inf_game.h"
#include <cstdio>
#include <cstring>
#include "d/d_com_inf_game.h"
#include "d/d_kankyo.h"
#include "d/d_meter2_info.h"
#include "d/d_msg_unit.h"
#include "dusk/version.hpp"
// temporary until a better solution is found
typedef struct dMsgUnit_inf1_entry {
@@ -41,6 +42,197 @@ dMsgUnit_c::dMsgUnit_c() {}
dMsgUnit_c::~dMsgUnit_c() {}
#if TARGET_PC
typedef struct dMsgUnit_inf1_entry_JPN {
BE(u32) dat1EntryOffset;
BE(u16) field_0x04;
BE(u16) field_0x06;
BE(u16) field_0x08;
BE(u16) field_0x0a;
BE(u16) field_0x0c;
BE(u16) field_0x0e;
BE(u16) field_0x10;
BE(u16) field_0x12;
BE(u16) field_0x14;
BE(u16) field_0x16;
BE(u16) field_0x18;
BE(u16) field_0x1A;
} dMsgUnit_inf1_entry_JPN;
typedef struct dMsgUnit_inf1_section_JPN {
/* 0x00 */ BE(u32) msgType; // sectionType
/* 0x04 */ BE(u32) size; // total size of the section
/* 0x08 */ BE(u16) entryCount;
/* 0x0A */ BE(u16) entryLength;
/* 0x0C */ BE(u16) msgArchiveId;
/* 0x10 */ dMsgUnit_inf1_entry_JPN entries[0];
} dMsgUnit_inf1_section_JPN;
void dMsgUnit_c::setTag_jpn(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_4) {
*o_buffer = 0;
bool stack9 = false;
bool stack8 = false;
int value = i_value;
if (i_type == 0x10000) {
SAFE_SPRINTF(o_buffer, "%d", i_value);
return;
}
if (i_type == 0x10001) {
int tens_digit = i_value / 10;
int ones_digit = i_value % 10;
SAFE_SPRINTF(o_buffer, "%d-%d", tens_digit, ones_digit);
return;
}
if ((i_type == 4 && param_4 == true) || (i_type == 5 && param_4 == false)) {
int seconds = i_value / 1000;
int minutes = seconds / 60;
seconds -= minutes * 60;
if (minutes > 99) {
minutes = 99;
seconds = 59;
}
if (minutes == 0 && seconds == 0) {
if (strcmp(dComIfGp_getStartStageName(), "F_SP00") == 0) {
return;
}
}
if (i_type == 4) {
i_value = minutes;
if (minutes == 0) {
stack9 = true;
}
}
if (i_type == 5) {
if (seconds == 0 && minutes != 0) {
return;
}
i_value = seconds;
}
}
if ((i_type == 3 && param_4 == true) || (i_type == 4 && param_4 == false)) {
f32 dayTime = g_env_light.getDaytime();
f32 hour = dayTime / 15.0f;
f32 iVar8b = ((s32)(1000000.0f * dayTime) % 15000000) / 1000000.0f;
f32 minute = 60.0f * (iVar8b / 15.0f);
// not sure why this affects codegen, in theory it should be optimized out
f32 minute2 = 60.0f * (iVar8b / 15.0f);
if (i_type == 3) {
i_value = (s32)hour;
}
if (i_type == 4) {
i_value = (s32)minute;
}
}
if (i_type == 9 && param_4 == true) {
SAFE_SPRINTF(o_buffer, "%d", i_value);
stack8 = true;
}
if (!stack9) {
bmg_header_t* pHeader = (bmg_header_t*)dMeter2Info_getMsgUnitResource();
bmg_section_t* pInfoBlock = NULL;
const void* pMsgDataBlock = NULL;
str1_section_t* pStrAttributeBlock = NULL;
int filepos = sizeof(bmg_header_t);
u32 filesize = pHeader->size;
u8* pSection = ((u8*)pHeader) + filepos;
while (filepos < filesize) {
switch(((bmg_section_t*)pSection)->magic) {
case 'FLW1':
break;
case 'FLI1':
break;
case 'INF1':
pInfoBlock = (bmg_section_t*)pSection;
break;
case 'DAT1':
pMsgDataBlock = pSection;
break;
case 'STR1':
pStrAttributeBlock = (str1_section_t*)pSection;
break;
}
filepos += ((bmg_section_t*)pSection)->size;
pSection += ((bmg_section_t*)pSection)->size;
}
u16 vals[12];
vals[0] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x04;
vals[1] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x06;
vals[2] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x08;
vals[3] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x0a;
vals[4] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x0c;
vals[5] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x0e;
vals[6] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x10;
vals[7] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x12;
vals[8] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x14;
vals[9] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x16;
vals[10] = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].field_0x18;
u32 dat1EntryOffset = ((dMsgUnit_inf1_section_JPN*)pInfoBlock)->entries[i_type].dat1EntryOffset;
char* dat1Entry = (char*)((u8*)pMsgDataBlock + dat1EntryOffset + 8);
const char* uVar5;
if (i_value == 0) {
uVar5 = pStrAttributeBlock->entries->str + vals[0];
} else if ((i_value % 10) == 0) {
uVar5 = pStrAttributeBlock->entries->str + (vals[10]);
} else {
uVar5 = pStrAttributeBlock->entries->str + vals[i_value % 10];
}
int uVar5Len = strlen(uVar5);
if (uVar5Len == 0) {
if (stack8) {
SAFE_STRCAT(o_buffer, dat1Entry);
} else {
SAFE_SPRINTF(o_buffer, "%d%s", i_value, dat1Entry);
}
} else {
char unkCharArr[7];
unkCharArr[0] = 26;
unkCharArr[1] = uVar5Len + 6;
unkCharArr[2] = -1;
unkCharArr[3] = -1;
unkCharArr[4] = 2;
unkCharArr[5] = strlen(dat1Entry) / 2;
unkCharArr[6] = 0;
if (stack8) {
SAFE_STRCAT(o_buffer, unkCharArr);
SAFE_STRCAT(o_buffer, uVar5);
SAFE_STRCAT(o_buffer, dat1Entry);
} else {
SAFE_SPRINTF(o_buffer, "%d%s%s%s", i_value, unkCharArr, uVar5, dat1Entry);
}
}
}
if (i_type == 3 && param_4 == true) {
char buffer[20];
setTag(4, 0, buffer, false);
SAFE_STRCAT(o_buffer, buffer);
}
if (i_type == 4 && param_4 == true) {
char buffer[20];
setTag(5, value, buffer, false);
SAFE_STRCAT(o_buffer, buffer);
}
}
#endif
#if REGION_JPN
void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_4) {
*o_buffer = 0;
@@ -208,6 +400,13 @@ void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_
}
#else
void dMsgUnit_c::setTag(int i_type, int i_value, TEXT_SPAN o_buffer, bool param_4) {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
setTag_jpn(i_type, i_value, o_buffer, param_4);
return;
}
#endif
*o_buffer = 0;
bool stack9 = false;
bool stack8 = false;
+207 -58
View File
@@ -17,6 +17,68 @@ static bool isPalOrJpn() {
return dusk::version::isRegionPal() || dusk::version::isRegionJpn();
}
#if TARGET_PC
#define SJIS_MOJI(wmoji) ((static_cast<u16>(static_cast<u8>((wmoji)[0])) << 8) | static_cast<u8>((wmoji)[1]))
#else
#define SJIS_MOJI(wmoji) *(u16*)wmoji
#endif
#if TARGET_PC
static const char* l_mojiHira[65] = {
"\x82\xA0", "\x82\xA2", "\x82\xA4", "\x82\xA6", "\x82\xA8", "\x82\xA9", "\x82\xAB", "\x82\xAD", "\x82\xAF", "\x82\xB1", "\x82\xB3", "\x82\xB5", "\x82\xB7",
"\x82\xB9", "\x82\xBB", "\x82\xBD", "\x82\xBF", "\x82\xC2", "\x82\xC4", "\x82\xC6", "\x82\xC8", "\x82\xC9", "\x82\xCA", "\x82\xCB", "\x82\xCC", "\x82\xCD",
"\x82\xD0", "\x82\xD3", "\x82\xD6", "\x82\xD9", "\x82\xDC", "\x82\xDD", "\x82\xDE", "\x82\xDF", "\x82\xE0", "\x82\xE2", "\x81\x40", "\x82\xE4", "\x81\x40",
"\x82\xE6", "\x82\xE7", "\x82\xE8", "\x82\xE9", "\x82\xEA", "\x82\xEB", "\x82\xED", "\x81\x40", "\x82\xF0", "\x81\x40", "\x82\xF1", "\x82\x9F", "\x82\xA1",
"\x82\xA3", "\x82\xA5", "\x82\xA7", "\x82\xE1", "\x81\x40", "\x82\xE3", "\x81\x40", "\x82\xE5", "\x82\xC1", "\x81\x40", "\x81\x5B", "\x81\x4A", "\x81\x4B",
};
static const char* l_mojiHira2[65] = {
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x82\xAA", "\x82\xAC", "\x82\xAE", "\x82\xB0", "\x82\xB2", "\x82\xB4", "\x82\xB6", "\x82\xB8",
"\x82\xBA", "\x82\xBC", "\x82\xBE", "\x82\xC0", "\x82\xC3", "\x82\xC5", "\x82\xC7", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x82\xCE",
"\x82\xD1", "\x82\xD4", "\x82\xD7", "\x82\xDA", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
};
static const char* l_mojiHira3[65] = {
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x82\xCF",
"\x82\xD2", "\x82\xD5", "\x82\xD8", "\x82\xDB", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
};
static const char* l_mojikata[65] = {
"\x83\x41", "\x83\x43", "\x83\x45", "\x83\x47", "\x83\x49", "\x83\x4A", "\x83\x4C", "\x83\x4E", "\x83\x50", "\x83\x52", "\x83\x54", "\x83\x56", "\x83\x58",
"\x83\x5A", "\x83\x5C", "\x83\x5E", "\x83\x60", "\x83\x63", "\x83\x65", "\x83\x67", "\x83\x69", "\x83\x6A", "\x83\x6B", "\x83\x6C", "\x83\x6D", "\x83\x6E",
"\x83\x71", "\x83\x74", "\x83\x77", "\x83\x7A", "\x83\x7D", "\x83\x7E", "\x83\x80", "\x83\x81", "\x83\x82", "\x83\x84", "\x81\x40", "\x83\x86", "\x81\x40",
"\x83\x88", "\x83\x89", "\x83\x8A", "\x83\x8B", "\x83\x8C", "\x83\x8D", "\x83\x8F", "\x81\x40", "\x83\x93", "\x81\x40", "\x83\x93", "\x83\x40", "\x83\x42",
"\x83\x44", "\x83\x46", "\x83\x48", "\x83\x83", "\x81\x40", "\x83\x85", "\x81\x40", "\x83\x87", "\x83\x62", "\x81\x40", "\x81\x5B", "\x81\x4A", "\x81\x4B",
};
static const char* l_mojikata2[65] = {
"\x81\x8F", "\x81\x8F", "\x83\x94", "\x81\x8F", "\x81\x8F", "\x83\x4B", "\x83\x4D", "\x83\x4F", "\x83\x51", "\x83\x53", "\x83\x55", "\x83\x57", "\x83\x59",
"\x83\x5B", "\x83\x5D", "\x83\x5F", "\x83\x61", "\x83\x64", "\x83\x66", "\x83\x68", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x83\x6F",
"\x83\x72", "\x83\x75", "\x83\x78", "\x83\x7B", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
};
static const char* l_mojikata3[65] = {
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x83\x70",
"\x83\x73", "\x83\x76", "\x83\x79", "\x83\x7C", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
"\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F", "\x81\x8F",
};
static const char* l_mojiEisu[65] = {
"A", "N", "a", "n", "1", "B", "O", "b", "o", "2", "C", "P", "c", "p", "3", "D", "Q",
"d", "q", "4", "E", "R", "e", "r", "5", "F", "S", "f", "s", "6", "G", "T", "g", "t",
"7", "H", "U", "h", "u", "8", "I", "V", "i", "v", "9", "J", "W", "j", "w", "0", "K",
"X", "k", "x", ",", "L", "Y", "l", "y", ".", "M", "Z", "m", "z", " ",
};
#else
static const char* l_mojiHira[65] = {
"", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "",
@@ -71,6 +133,7 @@ static const char* l_mojiEisu[65] = {
"7", "H", "U", "h", "u", "8", "I", "V", "i", "v", "9", "J", "W", "j", "w", "0", "K",
"X", "k", "x", ",", "L", "Y", "l", "y", ".", "M", "Z", "m", "z", " ",
};
#endif
#if TARGET_PC
// The game normally mutates this string list to fill in the real character codes.
@@ -106,7 +169,7 @@ static const char* l_mojiEisuPal_2[65] = {
#if TARGET_PC
// ' ' (full-width space)
#define SPACE_MAYBE_FULL (dusk::version::isRegionJpn() ? '\x81\x40' : ' ')
#define SPACE_MAYBE_FULL (dusk::version::isRegionJpn() ? 0x8140U : ' ')
#elif REGION_JPN
// ' ' (full-width space)
#define SPACE_MAYBE_FULL '\x81\x40'
@@ -274,11 +337,15 @@ void dName_c::_move() {
mDoAud_seStart(Z2SE_SY_DUMMY, 0, 0, 0);
mPrevMojiSet = mMojiSet;
mMojiSet++;
#if REGION_JPN
if (mMojiSet > MOJI_EIGO) {
#if TARGET_PC
if ((dusk::version::isRegionJpn() && mMojiSet > MOJI_EIGO) || (!dusk::version::isRegionJpn() && mMojiSet > MOJI_KATA))
#elif REGION_JPN
if (mMojiSet > MOJI_EIGO)
#else
if (mMojiSet > MOJI_KATA) {
if (mMojiSet > MOJI_KATA)
#endif
{
mMojiSet = MOJI_HIRA;
}
mojiListChange();
@@ -373,7 +440,7 @@ int dName_c::nameCheck() {
#if REGION_JPN
if (mChrInfo[len].mCharacter != ' ' && mChrInfo[len].mCharacter != '\x81\x40') {
#else
if (mChrInfo[len].mCharacter != ' ' IF_DUSK(&& (!dusk::version::isRegionJpn() || mChrInfo[len].mCharacter != '\x81\x40'))) {
if (mChrInfo[len].mCharacter != ' ' IF_DUSK(&& (!dusk::version::isRegionJpn() || mChrInfo[len].mCharacter != 0x8140U))) {
#endif
return len + 1;
}
@@ -392,7 +459,12 @@ void dName_c::playNameSet(int nameLength) {
*str = mChrInfo[i].mCharacter;
str += 1;
} else {
#if TARGET_PC
str[0] = mChrInfo[i].mCharacter >> 8;
str[1] = mChrInfo[i].mCharacter & 0xFF;
#else
*(u16*)str = mChrInfo[i].mCharacter;
#endif
str += 2;
}
#else
@@ -625,30 +697,41 @@ int dName_c::mojiChange(u8 idx) {
}
void dName_c::selectMojiSet() {
#if REGION_JPN
int moji = getMoji();
if (moji != -1) {
if (moji == '' || moji == '') {
if (mCurPos != 0) {
if (checkDakuon(moji, mCurPos - 1) == 1) {
mDoAud_seStart(Z2SE_SY_NAME_INPUT, NULL, 0, 0);
setDakuon(moji, mCurPos - 1);
} else {
mDoAud_seStart(Z2SE_SYS_ERROR, NULL, 0, 0);
#if TARGET_PC || REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn())
#endif
{
int moji = getMoji();
if (moji != -1) {
if (moji == SJIS('', 0x814AU) || moji == SJIS('', 0x814BU)) {
if (mCurPos != 0) {
if (checkDakuon(moji, mCurPos - 1) == 1) {
mDoAud_seStart(Z2SE_SY_NAME_INPUT, NULL, 0, 0);
setDakuon(moji, mCurPos - 1);
} else {
mDoAud_seStart(Z2SE_SYS_ERROR, NULL, 0, 0);
}
}
} else {
setMoji(moji);
}
} else {
setMoji(moji);
}
}
#if TARGET_PC
else {
setMoji(getMoji());
}
#endif
setNameText();
#else
#else
setMoji(getMoji());
setNameText();
#endif
#endif
}
#if REGION_JPN
#if TARGET_PC || REGION_JPN
int dName_c::checkDakuon(int param_0, u8 param_1) {
if (mChrInfo[param_1].mMojiSet == MOJI_EIGO) {
return 0;
@@ -658,17 +741,17 @@ int dName_c::checkDakuon(int param_0, u8 param_1) {
return 0;
}
if (param_0 == '' && mChrInfo[param_1].mColumn != 5) {
if (param_0 == SJIS('', 0x814BU) && mChrInfo[param_1].mColumn != 5) {
return 0;
}
if (param_0 == '' &&
(mChrInfo[param_1].mCharacter == '' || mChrInfo[param_1].mCharacter == ''))
if (param_0 == SJIS('', 0x814AU) &&
(mChrInfo[param_1].mCharacter == SJIS('', 0x8345U) || mChrInfo[param_1].mCharacter == SJIS('', 0x8394U)))
{
return 1;
}
if (param_0 == '' && mChrInfo[param_1].mColumn != 1 && mChrInfo[param_1].mColumn != 2 &&
if (param_0 == SJIS('', 0x814AU) && mChrInfo[param_1].mColumn != 1 && mChrInfo[param_1].mColumn != 2 &&
mChrInfo[param_1].mColumn != 3 && mChrInfo[param_1].mColumn != 5)
{
return 0;
@@ -680,46 +763,46 @@ int dName_c::checkDakuon(int param_0, u8 param_1) {
int dName_c::setDakuon(int param_1, u8 param_2) {
int c;
if (param_1 == '') {
if (param_1 == SJIS('', 0x814AU)) {
switch (mChrInfo[param_2].mColumn) {
case 0: {
c = -1;
if (mChrInfo[param_2].mCharacter == '' || mChrInfo[param_2].mCharacter == '') {
if (mChrInfo[param_2].mCharacter == SJIS('', 0x8345U) || mChrInfo[param_2].mCharacter == SJIS('', 0x8394U)) {
c = 4;
mChrInfo[param_2].mCharacter = '';
mChrInfo[param_2].mCharacter = SJIS('', 0x8394U);
}
break;
}
case 1: {
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x834AU) : SJIS('', 0x82A9U);
c = (mChrInfo[param_2].mCharacter - c2) % 2;
break;
}
case 2: {
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x8354U) : SJIS('', 0x82B3U);
c = (mChrInfo[param_2].mCharacter - c2) % 2;
break;
}
case 3: {
int c2;
if (mChrInfo[param_2].mCharacter <=
((mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '')))
((mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x8361U) : SJIS('', 0x82C0U))))
{
c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x835EU) : SJIS('', 0x82BDU);
c = (mChrInfo[param_2].mCharacter - c2) % 2;
} else {
if (mChrInfo[param_2].mCharacter <= (mChrInfo[param_2].mMojiSet != 0 ? '' : ''))
if (mChrInfo[param_2].mCharacter <= (mChrInfo[param_2].mMojiSet != 0 ? SJIS('', 0x8368U) : SJIS('', 0x82C7U)))
{
if (mChrInfo[param_2].mCharacter >=
(mChrInfo[param_2].mMojiSet != 0 ? '' : ''))
(mChrInfo[param_2].mMojiSet != 0 ? SJIS('', 0x8365U) : SJIS('', 0x82C4U)))
{
c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x8365U) : SJIS('', 0x82C4U);
c = (mChrInfo[param_2].mCharacter - c2) % 2;
break;
}
}
c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x8362U) : SJIS('', 0x82C1U);
c = (mChrInfo[param_2].mCharacter - c2) % 3;
if (c == 2) {
c = 1;
@@ -732,7 +815,7 @@ int dName_c::setDakuon(int param_1, u8 param_2) {
break;
}
case 5: {
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x836EU) : SJIS('', 0x82CDU);
c = (mChrInfo[param_2].mCharacter - c2) % 3;
break;
}
@@ -751,8 +834,8 @@ int dName_c::setDakuon(int param_1, u8 param_2) {
return 1;
}
} else if (param_1 == '') {
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? '' : '';
} else if (param_1 == SJIS('', 0x814BU)) {
int c2 = mChrInfo[param_2].mMojiSet != MOJI_HIRA ? SJIS('', 0x836EU) : SJIS('', 0x82CDU);
c = (mChrInfo[param_2].mCharacter - c2) % 3;
if (c != 2) {
mChrInfo[param_2].mCharacter = mChrInfo[param_2].mCharacter + (2 - c);
@@ -823,7 +906,7 @@ int dName_c::getMoji() {
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (*(u8*)moji >> 4 == 0x8 || *(u8*)moji >> 4 == 0x9) {
result = *(u16*)moji;
result = SJIS_MOJI(moji);
} else {
result = *moji;
}
@@ -905,8 +988,8 @@ void dName_c::setNameText() {
//"\x1bCD\x1bCR\x1bCC[000000]\x1bGM[0]%c\x1bHM\x1bCC[ffffff]\x1bGM[0]%c"
//"\x1bCD\x1bCR\x1bCC[000000]\x1bGM[0]%c%c\x1bHM\x1bCC[ffffff]\x1bGM[0]%c%c"
if (mChrInfo[i].field_0x3 != 0) {
#if REGION_JPN
if (mChrInfo[i].mMojiSet == 2) {
#if TARGET_PC || REGION_JPN
if (IF_DUSK(!dusk::version::isRegionJpn() ||) mChrInfo[i].mMojiSet == 2) {
#endif
SAFE_SPRINTF(mNameText[i],
"\x1b"
@@ -917,7 +1000,7 @@ void dName_c::setNameText() {
CHAR_TRUNC((u8)mChrInfo[i].mCharacter),
CHAR_TRUNC((u8)mChrInfo[i].mCharacter)
);
#if REGION_JPN
#if TARGET_PC || REGION_JPN
} else {
SAFE_SPRINTF(mNameText[i],
"\x1b"
@@ -1005,7 +1088,7 @@ void dName_c::selectCursorMove() {
g_nmHIO.mSelCharScale);
((J2DTextBox*)mMojiIcon[mCharRow + mCharColumn * 5]->getPanePtr())
->setWhite(JUtility::TColor(0xC8, 0xC8, 0xC8, 0xFF));
#if TARGET_PC
nameWide();
#endif
@@ -1436,7 +1519,7 @@ void dName_c::nameWide() {
for (PaneCache& entry : l_tagName) {
J2DPane* pane = nameIn.NameInScr->search(entry.tag);
if (!entry.cached) {
entry.origTransX = pane->getTranslateX();
entry.origTransX = pane->getTranslateX();
entry.origTransY = pane->getTranslateY();
entry.cached = true;
}
@@ -1444,7 +1527,7 @@ void dName_c::nameWide() {
for (PaneCache& entry : l_nameTagName) {
J2DPane* pane = nameIn.NameInScr->search(entry.tag);
if (!entry.cached) {
entry.origTransX = pane->getTranslateX();
entry.origTransX = pane->getTranslateX();
entry.origTransY = pane->getTranslateY();
entry.cached = true;
}
@@ -1452,7 +1535,7 @@ void dName_c::nameWide() {
for (PaneCache& entry : l_nameCurTagName) {
J2DPane* pane = nameIn.NameInScr->search(entry.tag);
if (!entry.cached) {
entry.origTransX = pane->getTranslateX();
entry.origTransX = pane->getTranslateX();
entry.origTransY = pane->getTranslateY();
entry.cached = true;
}
@@ -1530,7 +1613,42 @@ void dName_c::screenSet() {
static u64 l_cur1TagName[8] = {
's_0r', MULTI_CHAR('s_01r'), MULTI_CHAR('s_02r'), MULTI_CHAR('s_03r'), MULTI_CHAR('s_04r'), MULTI_CHAR('s_05r'), MULTI_CHAR('s_06r'), MULTI_CHAR('s_07r'),
};
#if REGION_JPN
#if TARGET_PC
static u64 l_menu_icon_tag_jpn[4] = {
MULTI_CHAR('j_hira_n'),
MULTI_CHAR('j_kata_n'),
MULTI_CHAR('j_eigo_n'),
MULTI_CHAR('j_end_n'),
};
static u64 l_menu_tag_jpn[5][3] = {
MULTI_CHAR('m_hira_0'), MULTI_CHAR('m_hira_1'), MULTI_CHAR('m_hira_s'), MULTI_CHAR('m_kata_0'), MULTI_CHAR('m_kata_1'), MULTI_CHAR('m_kata_s'),
MULTI_CHAR('m_eigo_0'), MULTI_CHAR('m_eigo_1'), MULTI_CHAR('m_eigo_s'), MULTI_CHAR('j_end_0'), MULTI_CHAR('j_end_1'), MULTI_CHAR('j_end_s'),
};
static u32 l_menu_msg_jpn[4] = {
0x386,
0x387,
0x388,
0x38A,
};
static u64 l_menu_icon_tag[4] = {
MULTI_CHAR('p_ABC_n'),
MULTI_CHAR('p_abc_n'),
MULTI_CHAR('j_eigo_n'),
MULTI_CHAR('p_end_n'),
};
static u64 l_menu_tag[5][3] = {
MULTI_CHAR('p_ABC_0'), MULTI_CHAR('p_ABC_1'), MULTI_CHAR('p_ABC_2'), MULTI_CHAR('p_abc_0'), MULTI_CHAR('p_abc_1'), MULTI_CHAR('p_abc_2'),
MULTI_CHAR('m_eigo_0'), MULTI_CHAR('m_eigo_1'), MULTI_CHAR('m_eigo_2'), MULTI_CHAR('p_end_0'), MULTI_CHAR('p_end_1'), MULTI_CHAR('p_end_2'),
};
static u32 l_menu_msg[4] = {
0x38B,
0x38C,
0x388,
0x38E,
};
#elif REGION_JPN
static u64 l_menu_icon_tag[4] = {
MULTI_CHAR('j_hira_n'),
MULTI_CHAR('j_kata_n'),
@@ -1612,7 +1730,26 @@ void dName_c::screenSet() {
panes1[i]->setAnimation(mCursorColorKey);
}
#if REGION_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
nameIn.NameInScr->search(MULTI_CHAR('pal_n'))->hide();
mMenuPane = nameIn.NameInScr->search(MULTI_CHAR('jpn_n'));
mMenuPane->show();
nameIn.NameInScr->search(MULTI_CHAR('p_ABC_n'))->scale(0.0f, 0.0f);
nameIn.NameInScr->search(MULTI_CHAR('p_abc_n'))->scale(0.0f, 0.0f);
nameIn.NameInScr->search(MULTI_CHAR('p_end_n'))->scale(0.0f, 0.0f);
} else {
nameIn.NameInScr->search(MULTI_CHAR('jpn_n'))->hide();
mMenuPane = nameIn.NameInScr->search(MULTI_CHAR('pal_n'));
mMenuPane->show();
nameIn.NameInScr->search(MULTI_CHAR('j_hira_n'))->scale(0.0f, 0.0f);
nameIn.NameInScr->search(MULTI_CHAR('j_kata_n'))->scale(0.0f, 0.0f);
nameIn.NameInScr->search(MULTI_CHAR('j_eigo_n'))->scale(0.0f, 0.0f);
nameIn.NameInScr->search(MULTI_CHAR('j_end_n'))->scale(0.0f, 0.0f);
}
#elif REGION_JPN
nameIn.NameInScr->search(MULTI_CHAR('pal_n'))->hide();
mMenuPane = nameIn.NameInScr->search(MULTI_CHAR('jpn_n'));
mMenuPane->show();
@@ -1633,19 +1770,31 @@ void dName_c::screenSet() {
J2DTextBox* menuPane[3];
for (int i = 0; i < 4; i++) {
#if !REGION_JPN
if (i == 2) {
#if TARGET_PC || !REGION_JPN
if (IF_DUSK(!dusk::version::isRegionJpn() &&) i == 2) {
mMenuIcon[i] = NULL;
mMenuText[i] = NULL;
} else {
#endif
#if TARGET_PC
mMenuIcon[i] = JKR_NEW CPaneMgr(nameIn.NameInScr, dusk::version::isRegionJpn() ? l_menu_icon_tag_jpn[i] : l_menu_icon_tag[i], 1, NULL);
#else
mMenuIcon[i] = JKR_NEW CPaneMgr(nameIn.NameInScr, l_menu_icon_tag[i], 1, NULL);
#endif
char buf[16];
#if TARGET_PC
fopMsgM_messageGet(buf, dusk::version::isRegionJpn() ? l_menu_msg_jpn[i] : l_menu_msg[i]);
#else
fopMsgM_messageGet(buf, l_menu_msg[i]);
#endif
for (int j = 0; j < 3; j++) {
#if TARGET_PC
menuPane[j] = (J2DTextBox*)nameIn.NameInScr->search(dusk::version::isRegionJpn() ? l_menu_tag_jpn[i][j] : l_menu_tag[i][j]);
#else
menuPane[j] = (J2DTextBox*)nameIn.NameInScr->search(l_menu_tag[i][j]);
#endif
if (j == 0) {
mMenuText[i] = menuPane[j];
@@ -1654,7 +1803,7 @@ void dName_c::screenSet() {
menuPane[j]->setFont(nameIn.font);
menuPane[j]->setString(buf);
}
#if !REGION_JPN
#if TARGET_PC || !REGION_JPN
}
#endif
}
@@ -1795,20 +1944,20 @@ void dName_c::NameStrSet() {
i++;
} else {
if (*(u8*)moji >> 4 == 8 || *(u8*)moji >> 4 == 9) {
mChrInfo[i].mCharacter = *(u16*)moji;
mChrInfo[i].mCharacter = SJIS_MOJI(moji);
for (int j = 0; j < 65; j++) {
if (mChrInfo[i].mCharacter == *(u16*)l_mojiHira[j] ||
mChrInfo[i].mCharacter == *(u16*)l_mojiHira2[j] ||
mChrInfo[i].mCharacter == *(u16*)l_mojiHira3[j])
if (mChrInfo[i].mCharacter == SJIS_MOJI(l_mojiHira[j]) ||
mChrInfo[i].mCharacter == SJIS_MOJI(l_mojiHira2[j]) ||
mChrInfo[i].mCharacter == SJIS_MOJI(l_mojiHira3[j]))
{
mChrInfo[i].mColumn = j / 5;
mChrInfo[i].mRow = j % 5;
mChrInfo[i].mMojiSet = MOJI_HIRA;
break;
} else if (mChrInfo[i].mCharacter == *(u16*)l_mojikata[j] ||
mChrInfo[i].mCharacter == *(u16*)l_mojikata2[j] ||
mChrInfo[i].mCharacter == *(u16*)l_mojikata3[j])
} else if (mChrInfo[i].mCharacter == SJIS_MOJI(l_mojikata[j]) ||
mChrInfo[i].mCharacter == SJIS_MOJI(l_mojikata2[j]) ||
mChrInfo[i].mCharacter == SJIS_MOJI(l_mojikata3[j]))
{
mChrInfo[i].mColumn = j / 5;
mChrInfo[i].mRow = j % 5;
+8 -1
View File
@@ -967,7 +967,14 @@ dScnLogo_c::~dScnLogo_c() {
mDoExt_getRubyFont();
mDoExt_setAraCacheSize(free_size - aram_heap->getTotalFreeSize());
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (getGameVersion() == GameVersion::GcnJpn) {
if (dComIfGp_getFontArchive() != NULL) {
dComIfGp_getFontArchive()->unmount();
dComIfGp_setFontArchive(NULL);
}
}
#elif VERSION == VERSION_GCN_JPN
if (dComIfGp_getFontArchive() != NULL) {
dComIfGp_getFontArchive()->unmount();
dComIfGp_setFontArchive(NULL);
+6 -1
View File
@@ -1017,7 +1017,12 @@ void dSv_player_info_c::init() {
}
void dSv_player_config_c::init() {
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn())
mRuby = 0;
else
mRuby = 1;
#elif VERSION == VERSION_GCN_JPN
mRuby = 0;
#else
mRuby = 1;
+26 -3
View File
@@ -24,6 +24,7 @@
#include <cstring>
#include "dusk/frame_interpolation.h"
#include "dusk/version.hpp"
static int dTimer_createStart2D(s32 param_0, u16 param_1);
@@ -1430,7 +1431,7 @@ void dDlst_TimerScrnDraw_c::playBckAnimation(f32 i_frame) {
mpGetInParent->getPanePtr()->setAnimation((J2DAnmTransform*)NULL);
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC || VERSION == VERSION_GCN_JPN
bool dDlst_TimerScrnDraw_c::isLeadByte(int i_char) {
return (i_char >= 0x81 && i_char <= 0x9f) || (i_char >= 0xe0 && i_char <= 0xfc);
}
@@ -1466,7 +1467,18 @@ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) {
var_f25 * static_cast<J2DTextBox*>(mpGetInText->getPanePtr())->getCharSpace();
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (isLeadByte(c)) {
c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF);
str_idx++;
} else {
c = string[str_idx] & 0xFF;
}
} else {
c = string[str_idx] & 0xFF;
}
#elif VERSION == VERSION_GCN_JPN
if (isLeadByte(c)) {
c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF);
str_idx++;
@@ -1492,7 +1504,18 @@ void dDlst_TimerScrnDraw_c::drawPikari(int i_no) {
var_f25 * static_cast<J2DTextBox*>(mpGetInText->getPanePtr())->getCharSpace();
}
#if VERSION == VERSION_GCN_JPN
#if TARGET_PC
if (dusk::version::isRegionJpn()) {
if (isLeadByte(c)) {
c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF);
str_idx++;
} else {
c = string[str_idx] & 0xFF;
}
} else {
c = string[str_idx] & 0xFF;
}
#elif VERSION == VERSION_GCN_JPN
if (isLeadByte(c)) {
c = ((string[str_idx] & 0xFF) << 8) | (string[str_idx + 1] & 0xFF);
str_idx++;