mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-28 15:07:04 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer
This commit is contained in:
+94
-17
@@ -23,6 +23,8 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/config.hpp"
|
||||
#include "dusk/menu_pointer.h"
|
||||
@@ -3325,8 +3327,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')};
|
||||
@@ -3335,7 +3339,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')};
|
||||
@@ -3371,7 +3378,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();
|
||||
@@ -3447,7 +3466,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
|
||||
@@ -3458,10 +3487,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);
|
||||
@@ -3502,8 +3541,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
|
||||
@@ -3514,17 +3560,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
|
||||
@@ -3720,7 +3776,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
|
||||
@@ -3798,7 +3862,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
|
||||
@@ -3918,7 +3990,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
|
||||
@@ -3928,8 +4005,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);
|
||||
|
||||
Reference in New Issue
Block a user