Merge pull request #237 from TwilitRealm/feature/dynamic-aspect-ratio

Feature/dynamic aspect ratio
This commit is contained in:
TakaRikka
2026-04-06 15:52:19 -07:00
committed by GitHub
32 changed files with 591 additions and 12 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ message(STATUS "dusk: TP Version: ${DUSK_TP_VERSION}")
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${JSYSTEM_DEBUG_FILES} ${REL_FILES})
source_group("dusk" FILES ${DUSK_FILES})
set(GAME_COMPILE_DEFS TARGET_PC AVOID_UB=1 VERSION=0
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0
DUSK_TP_VERSION="${DUSK_TP_VERSION}" DUSK_GAME_NAME="${DUSK_GAME_NAME}" DUSK_GAME_VERSION="${DUSK_GAME_VERSION}")
set(GAME_INCLUDE_DIRS
+1 -1
+3
View File
@@ -29,6 +29,9 @@ public:
void _move();
void modeWait();
void modeMove();
#if TARGET_PC
void brightCheckWide();
#endif
void _draw();
void draw() {
+3
View File
@@ -367,6 +367,9 @@ public:
void menuCursorShow();
void yesnoWakuAlpahAnmInit(u8, u8, u8, u8);
bool yesnoWakuAlpahAnm(u8);
#if TARGET_PC
void fileSelectWide();
#endif
void _draw();
void errorMoveAnmInitSet(int, int);
bool errorMoveAnm();
+5
View File
@@ -29,6 +29,11 @@ public:
class dMenu_Collect2D_c : public dDlst_base_c {
public:
dMenu_Collect2D_c(JKRExpHeap*, STControl*, CSTControl*);
#if TARGET_PC
void menuCollectWide();
#endif
void _create();
void _delete();
void initialize();
+5
View File
@@ -263,6 +263,11 @@ public:
void setSaveData();
void setInitSaveData();
void _draw();
#if TARGET_PC
void menuSaveWide();
#endif
void _draw2();
virtual ~dMenu_save_c() {}
+5
View File
@@ -110,6 +110,11 @@ public:
void menuCursorMove();
void menuCursorMove2();
void selectCursorPosSet(int);
#if TARGET_PC
void nameWide();
#endif
void _draw();
void screenSet();
void displayInit();
+13 -1
View File
@@ -8,7 +8,7 @@
#include <aurora/aurora.h>
#endif
#if WIDESCREEN_SUPPORT
#if WIDESCREEN_SUPPORT && !TARGET_PC
#define FB_WIDTH (640)
#define FB_HEIGHT (456)
#else
@@ -117,6 +117,13 @@ public:
static void setTickRate(u32 rate) { JFWDisplay::getManager()->setTickRate(rate); }
static void waitBlanking(int wait) { JFWDisplay::getManager()->waitBlanking(wait); }
#if TARGET_PC
static f32 hudAspectScaleDown;
static f32 hudAspectScaleUp;
static f32 ScaleHUDXLeft(f32 baseX) { return getMinXF() + baseX; }
static f32 ScaleHUDXRight(f32 baseX) { return -getMinXF() + baseX; }
#endif
static void setBlureMtx(const Mtx m) {
cMtx_copy(m, mBlureMtx);
}
@@ -266,7 +273,12 @@ public:
#if WIDESCREEN_SUPPORT
static void setTvSize();
#if TARGET_PC
static void onWide(f32 width, f32 height);
#else
static void onWide();
#endif
static void offWide();
static u8 isWide();
+5
View File
@@ -1562,6 +1562,11 @@ void daAlink_c::setMetamorphoseEffectStartLink() {
emitter->setGlobalParticleScale(effScale);
}
#endif
#if TARGET_PC
static const Vec effWideScale = {mDoGph_gInf_c::getAspect(), 1.0f, 1.0f};
emitter->setGlobalParticleScale(effWideScale);
#endif
}
void daAlink_c::setMetamorphoseEffect() {
+49
View File
@@ -143,7 +143,56 @@ void dBrightCheck_c::modeMove() {
}
}
#if TARGET_PC
void dBrightCheck_c::brightCheckWide() {
// Main Canvas
mBrightCheck.Scr->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
mBrightCheck.Scr->translate(mDoGph_gInf_c::getMinXF(), 0.0f);
// Right Square
mBrightCheck.Scr->search(MULTI_CHAR('fuchi_1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('big_squa'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Middle Square
mBrightCheck.Scr->search(MULTI_CHAR('fuchi_3'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('big_squ1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Left Square
mBrightCheck.Scr->search(MULTI_CHAR('fuchi_4'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('big_squ2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Gray Squares
mBrightCheck.Scr->search(MULTI_CHAR('gray_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('fuchi_2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Confirm A Button
mBrightCheck.Scr->search(MULTI_CHAR('abtn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('gcabtn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Text
mBrightCheck.Scr->search(MULTI_CHAR('menu_6n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('menu_9n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('menu_10n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('menu_7n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('menu_8n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('fmenu_8n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('fmenu_7n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('fmenu_10'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('fmenu_6n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('fmenu_9n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Spirals
mBrightCheck.Scr->search(MULTI_CHAR('t_mo_l_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mBrightCheck.Scr->search(MULTI_CHAR('t_mo_r_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
#endif
void dBrightCheck_c::_draw() {
#if TARGET_PC
brightCheckWide();
#endif
dComIfGd_set2DOpa(&mBrightCheck);
}
+99
View File
@@ -2091,7 +2091,12 @@ void dFile_select_c::yesnoCursorShow() {
Vec pos = mYnSelPane[field_0x0268]->getGlobalVtxCenter(0, 0);
mSelIcon->setPos(pos.x, pos.y, mYnSelPane[field_0x0268]->getPanePtr(), true);
mSelIcon->setAlphaRate(1.0f);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.84f, 0.06f, 0.5f, 0.5f);
#else
mSelIcon->setParam(0.96f, 0.84f, 0.06f, 0.5f, 0.5f);
#endif
}
}
@@ -2243,7 +2248,12 @@ void dFile_select_c::YesNoCancelMove() {
mSelIcon->setPos(vtxCenter.x, vtxCenter.y,
m3mSelPane[mSelectMenuNum]->getPanePtr(), true);
mSelIcon->setAlphaRate(1.0f);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.84f, 0.06f, 0.5f, 0.5f);
#else
mSelIcon->setParam(0.96f, 0.84f, 0.06f, 0.5f, 0.5f);
#endif
#if PLATFORM_WII || PLATFORM_SHIELD
field_0x4333 = mSelectMenuNum;
@@ -3126,7 +3136,13 @@ void dFile_select_c::screenSet() {
mSelIcon = JKR_NEW dSelect_cursor_c(0, 1.0f, NULL);
JUT_ASSERT(5209, mSelIcon != NULL);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.94f, 0.03f, 0.7f, 0.7f);
#else
mSelIcon->setParam(0.96f, 0.94f, 0.03f, 0.7f, 0.7f);
#endif
Vec vtxCenter;
vtxCenter = mSelFilePanes[mSelectNum]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(vtxCenter.x, vtxCenter.y, mSelFilePanes[mSelectNum]->getPanePtr(), true);
@@ -3257,7 +3273,13 @@ void dFile_select_c::screenSetCopySel() {
mSelIcon2 = JKR_NEW dSelect_cursor_c(0, 1.0f, NULL);
JUT_ASSERT(5406, mSelIcon2 != NULL);
#if TARGET_PC
mSelIcon2->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.94f, 0.03f, 0.7f, 0.7f);
#else
mSelIcon2->setParam(0.96f, 0.94f, 0.03f, 0.7f, 0.7f);
#endif
Vec center = mCpSelPane[0]->getGlobalVtxCenter(false, 0);
mSelIcon2->setPos(center.x, center.y, mCpSelPane[0]->getPanePtr(), true);
mSelIcon2->setAlphaRate(0.0f);
@@ -3647,7 +3669,12 @@ void dFile_select_c::selFileCursorShow() {
Vec local_1c = mSelFilePanes[mSelectNum]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(local_1c.x, local_1c.y, mSelFilePanes[mSelectNum]->getPanePtr(), true);
mSelIcon->setAlphaRate(1.0f);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.94f, 0.03f, 0.7f, 0.7f);
#else
mSelIcon->setParam(0.96f, 0.94f, 0.03f, 0.7f, 0.7f);
#endif
}
void dFile_select_c::menuWakuAlpahAnmInit(u8 i_idx, u8 param_1, u8 param_2, u8 param_3) {
@@ -3689,7 +3716,12 @@ void dFile_select_c::menuCursorShow() {
Vec local_24 = m3mSelPane[mSelectMenuNum]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(local_24.x, local_24.y, m3mSelPane[mSelectMenuNum]->getPanePtr(), true);
mSelIcon->setAlphaRate(1.0f);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.84f, 0.06f, 0.5f, 0.5f);
#else
mSelIcon->setParam(0.96f, 0.84f, 0.06f, 0.5f, 0.5f);
#endif
}
}
@@ -3731,7 +3763,74 @@ bool dFile_select_c::yesnoWakuAlpahAnm(u8 param_1) {
return rv;
}
#if TARGET_PC
void dFile_select_c::fileSelectWide() {
mYnSel.ScrYn->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
mYnSel.ScrYn->translate(mDoGph_gInf_c::getMinXF(), 0.0f);
mYnSel.ScrYn->search(MULTI_CHAR('w_no_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mYnSel.ScrYn->search(MULTI_CHAR('f_no_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mYnSel.ScrYn->search(MULTI_CHAR('w_yes_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mYnSel.ScrYn->search(MULTI_CHAR('f_yes_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
m3mSel.Scr3m->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
m3mSel.Scr3m->translate(mDoGph_gInf_c::getMinXF(), 0.0f);
m3mSel.Scr3m->search(MULTI_CHAR('w_sta'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
m3mSel.Scr3m->search(MULTI_CHAR('f_sta'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
m3mSel.Scr3m->search(MULTI_CHAR('w_del'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
m3mSel.Scr3m->search(MULTI_CHAR('f_del'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
m3mSel.Scr3m->search(MULTI_CHAR('w_cop_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
m3mSel.Scr3m->search(MULTI_CHAR('f_cop_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
fileSel.Scr->translate(mDoGph_gInf_c::getMinXF(), 0.0f);
fileSel.Scr->search(MULTI_CHAR('t_for'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('t_for1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_btn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_n_bk00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_n_bk01'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_n_bk02'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_dat_i0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_dat_i1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_dat_i2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mCpSel.Scr->search(MULTI_CHAR('w_dat_i1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mCpSel.Scr->search(MULTI_CHAR('w_dat_i2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mCpSel.Scr->search(MULTI_CHAR('w_n_bk01'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mCpSel.Scr->search(MULTI_CHAR('w_n_bk02'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('tate_n0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('tate_n1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('ken_n0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('ken_n1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('fuku_n0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('fuku_n1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSelDt.ScrDt->search(MULTI_CHAR('fuku_n2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Spirals
fileSel.Scr->search(MULTI_CHAR('w_uzu00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu01'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu02'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu03'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu04'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu05'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu06'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu07'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu08'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
fileSel.Scr->search(MULTI_CHAR('w_uzu09'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
#endif
void dFile_select_c::_draw() {
#if TARGET_PC
fileSelectWide();
#endif
if (!mHasDrawn) {
dComIfGd_set2DOpa(&fileSel);
+1 -1
View File
@@ -775,7 +775,7 @@ static void dKy_FiveSenses_fullthrottle_dark_static1() {
particle_size.y = 1.0f;
particle_size.z = 1.0f;
#if !PLATFORM_GCN
#if !PLATFORM_GCN || TARGET_PC
particle_size.x *= mDoGph_gInf_c::getScale();
#endif
+99 -1
View File
@@ -95,6 +95,78 @@ dMenu_Collect2D_c::~dMenu_Collect2D_c() {
}
}
#if TARGET_PC
void dMenu_Collect2D_c::menuCollectWide() {
// Main Canvas
mpScreen->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
mpScreen->translate(mDoGph_gInf_c::getMinXF(), 0.0f);
// Pieces of Heart
mpScreen->search(MULTI_CHAR('heart_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Scents
mpScreen->search(MULTI_CHAR('wolf_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Quiver
mpScreen->search(MULTI_CHAR('item_0_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Wallet
mpScreen->search(MULTI_CHAR('item_1_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Poes
mpScreen->search(MULTI_CHAR('item_2_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Fish Bestiary
mpScreen->search(MULTI_CHAR('fish_3_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Letters
mpScreen->search(MULTI_CHAR('lett_4_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Hidden Skills
mpScreen->search(MULTI_CHAR('maki_5_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Green Tunic
mpScreen->search(MULTI_CHAR('fuku_n0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Zora Armor
mpScreen->search(MULTI_CHAR('fuku_n1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Magic Armor
mpScreen->search(MULTI_CHAR('fuku_n2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Ordon Shield
mpScreen->search(MULTI_CHAR('tate_n0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Hylian Shield
mpScreen->search(MULTI_CHAR('tate_n1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Ordon Sword
mpScreen->search(MULTI_CHAR('ken_n0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Master Sword
mpScreen->search(MULTI_CHAR('ken_n1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Bugs
mpScreen->search(MULTI_CHAR('kabu_6n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// "Collection" Text
mpScreen->search(MULTI_CHAR('t_t00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mpScreen->search(MULTI_CHAR('f_t00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// "Save" Text
mpScreen->search(MULTI_CHAR('sa_tex_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// "Options" Text
mpScreen->search(MULTI_CHAR('op_tex_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Item Name Text
mpScreen->search(MULTI_CHAR('itemn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Item Description Text
mpScreen->search(MULTI_CHAR('infotxtn'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
#endif
void dMenu_Collect2D_c::_create() {
mpHeap->getTotalFreeSize();
mpScreen = JKR_NEW J2DScreen();
@@ -108,7 +180,17 @@ void dMenu_Collect2D_c::_create() {
mpButtonAB[i] = NULL;
mpButtonText[i] = NULL;
}
#if TARGET_PC
mpScreenIcon->translate(-mDoGph_gInf_c::getMinXF(), 0.0f);
#endif
dPaneClass_showNullPane(mpScreenIcon);
#if TARGET_PC
menuCollectWide();
#endif
mpDraw2DTop = JKR_NEW dMenu_Collect2DTop_c(this);
ResTIMG* image = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti");
mpBlackTex = JKR_NEW J2DPicture(image);
@@ -1004,11 +1086,23 @@ void dMenu_Collect2D_c::cursorPosSet() {
Vec pos = mpSelPm[mCursorX][mCursorY]->getGlobalVtxCenter(false, 0);
mpDrawCursor->setPos(pos.x, pos.y, mpSelPm[mCursorX][mCursorY]->getPanePtr(), false);
if (mCursorY == 5) {
#if TARGET_PC
mpDrawCursor->setParam(1.1f * mDoGph_gInf_c::hudAspectScaleUp, 0.85f, 0.05f, 0.5f, 0.5f);
#else
mpDrawCursor->setParam(1.1f, 0.85f, 0.05f, 0.5f, 0.5f);
#endif
} else if (mCursorX == 6 && mCursorY == 0) {
#if TARGET_PC
mpDrawCursor->setParam(0.6f * mDoGph_gInf_c::hudAspectScaleUp, 0.85f, 0.03f, 0.6f, 0.6f);
#else
mpDrawCursor->setParam(0.6f, 0.85f, 0.03f, 0.6f, 0.6f);
#endif
} else {
#if TARGET_PC
mpDrawCursor->setParam(1.0f * mDoGph_gInf_c::hudAspectScaleUp, 1.0f, 0.1f, 0.7f, 0.7f);
#else
mpDrawCursor->setParam(1.0f, 1.0f, 0.1f, 0.7f, 0.7f);
#endif
}
}
@@ -2028,6 +2122,10 @@ void dMenu_Collect2D_c::_move() {
void dMenu_Collect2D_c::_draw() {
#if TARGET_PC
menuCollectWide();
#endif
J2DGrafContext* grafPort = dComIfGp_getCurrentGrafPort();
grafPort->setup2D();
mpScreen->draw(0.0f, 0.0f, grafPort);
@@ -2555,7 +2653,7 @@ f32 dMenu_Collect3D_c::mViewOffsetY = -100.0f;
void dMenu_Collect3D_c::setupItem3D(Mtx param_0) {
#if TARGET_PC
f32 scaleFactor = mDoGph_gInf_c::getWidth() / FB_WIDTH; // TODO: get display pixel density from aurora
f32 scaleFactor = mDoGph_gInf_c::getHeight() / FB_HEIGHT;
GXSetViewport(0.0f, mViewOffsetY * scaleFactor, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight(), 0.0f, 1.0f);
#else
GXSetViewport(0.0f, mViewOffsetY, FB_WIDTH, FB_HEIGHT, 0.0f, 1.0f);
+25 -2
View File
@@ -864,7 +864,16 @@ void dMenu_DmapBg_c::draw() {
J2DOrthoGraph* grafContext = (J2DOrthoGraph*)dComIfGp_getCurrentGrafPort();
grafContext->setup2D();
#if TARGET_PC
// GXGetScissor uses 11-bit GC register fields (max 2047) which overflow
// at window widths > ~1705px, producing garbage values on restore.
scissor_left = 0;
scissor_top = 0;
scissor_width = (u32)mDoGph_gInf_c::getWidth();
scissor_height = (u32)mDoGph_gInf_c::getHeight();
#else
GXGetScissor(&scissor_left, &scissor_top, &scissor_width, &scissor_height);
#endif
#if TARGET_PC
grafContext->scissor(field_0xd94, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
#else
@@ -876,8 +885,8 @@ void dMenu_DmapBg_c::draw() {
dMenu_Dmap_c::myclass->drawFloorScreenBack(mFloorScreen, field_0xd94, field_0xd98, grafContext);
#if TARGET_PC
f32 dVar21 = mDoGph_gInf_c::getWidth() / FB_WIDTH;
f32 dVar16 = mDoGph_gInf_c::getHeight() / FB_HEIGHT;
f32 dVar21 = mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getWidth();
f32 dVar16 = mDoGph_gInf_c::getHeightF() / mDoGph_gInf_c::getHeight();
#else
f32 dVar21 = mDoGph_gInf_c::getWidthF() / FB_WIDTH;
f32 dVar16 = mDoGph_gInf_c::getHeightF() / FB_HEIGHT;
@@ -890,8 +899,15 @@ void dMenu_DmapBg_c::draw() {
Mtx mtx;
Vec local_200 = pane.getGlobalVtx(center_pane, &mtx, 0, false, 0);
Vec local_20c = pane.getGlobalVtx(center_pane, &mtx, 3, false, 0);
#if TARGET_PC
grafContext->scissor(((local_200.x - mDoGph_gInf_c::getMinXF()) / dVar21),
((local_200.y - mDoGph_gInf_c::getMinYF()) / dVar16),
((local_20c.x - local_200.x) / dVar21),
(2.0f + (local_20c.y - local_200.y)) / dVar16);
#else
grafContext->scissor(((local_200.x - mDoGph_gInf_c::getMinXF()) / dVar21), ((local_200.y / dVar16) / dVar16),
((local_20c.x - local_200.x) / dVar21), 2.0f + (local_20c.y - local_200.y));
#endif
grafContext->setScissor();
f32 dVar17 = field_0xd8c / 255.0f;
@@ -925,10 +941,17 @@ void dMenu_DmapBg_c::draw() {
Mtx local_110;
Vec local_218 = pane.getGlobalVtx(center_pane, &local_110, 0, false, 0);
Vec local_224 = pane.getGlobalVtx(center_pane, &local_110, 3, false, 0);
#if TARGET_PC
f32 local_294 = ((local_218.x - mDoGph_gInf_c::getMinXF()) / dVar21);
f32 local_298 = ((local_218.y - mDoGph_gInf_c::getMinYF()) / dVar16);
f32 local_29c = ((local_224.x - local_218.x) / dVar21);
f32 local_2a0 = (2.0f + (local_224.y - local_218.y)) / dVar16;
#else
f32 local_294 = ((local_218.x - mDoGph_gInf_c::getMinXF()) / dVar21);
f32 local_298 = ((local_218.y / dVar16) / dVar16);
f32 local_29c = ((local_224.x - local_218.x) / dVar21);
f32 local_2a0 = 2.0f + (local_224.y - local_218.y);
#endif
grafContext->scissor(local_294, local_298, local_29c, local_2a0);
grafContext->setScissor();
+7
View File
@@ -114,7 +114,14 @@ void dMenu_Fishing_c::_draw() {
if (mpArchive) {
J2DGrafContext* grafPort = dComIfGp_getCurrentGrafPort();
mpBlackTex->setAlpha(0xff);
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpScreen->draw(0.0f, 0.0f, grafPort);
mpIconScreen->draw(0.0f, 0.0f, grafPort);
}
+5 -1
View File
@@ -359,7 +359,11 @@ void dMenu_Fmap2DBack_c::draw() {
drawDebugRegionArea();
}
#if TARGET_PC
grafPort->scissor(scissorLeft, scissorTop, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
#else
grafPort->scissor(scissorLeft, scissorTop, scissorWidth, scissorHeight);
#endif
grafPort->setScissor();
if (isArrowDrawFlag()) {
@@ -1191,7 +1195,7 @@ f32 dMenu_Fmap2DBack_c::getMapScissorAreaSizeX() {
}
f32 dMenu_Fmap2DBack_c::getMapScissorAreaSizeRealX() {
#if PLATFORM_GCN
#if PLATFORM_GCN && !TARGET_PC
return getMapScissorAreaSizeX();
#else
return getMapScissorAreaSizeX() * mDoGph_gInf_c::getScale();
+14
View File
@@ -161,12 +161,26 @@ void dMenu_Insect_c::_draw() {
if (mpArchive != NULL) {
J2DGrafContext* grafPort = dComIfGp_getCurrentGrafPort();
mpBlackTex->setAlpha(0xff);
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpScreen->draw(0.0f, 0.0f, grafPort);
mpDrawCursor->draw();
field_0xfc = mpExpParent->getAlphaRate() * 150.0f;
mpBlackTex->setAlpha(field_0xfc);
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpExpScreen->draw(0.0f, 0.0f, grafPort);
mpSelect_c->setOffsetX(g_drawHIO.mInsectListScreen.mConfirmOptionPosX_4x3);
mpSelect_c->translate(g_drawHIO.mInsectListScreen.mConfirmOptionPosX_4x3 + 486.0f,
+5
View File
@@ -310,7 +310,12 @@ void dMenu_ItemExplain_c::draw(J2DOrthoGraph* i_graph) {
mpLabel->scale(g_ringHIO.mItemDescTitleScale, g_ringHIO.mItemDescTitleScale);
mpLabel->paneTrans(g_ringHIO.mItemDescTitlePosX, g_ringHIO.mItemDescTitlePosY);
if (mpBackTex != NULL) {
#if TARGET_PC
mpBackTex->draw(mDoGph_gInf_c::ScaleHUDXLeft(0.0f), 0.0f, mDoGph_gInf_c::getWidthF(),
FB_HEIGHT, false, false, false);
#else
mpBackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, false, false, false);
#endif
}
if (field_0xc8 != field_0xd0) {
field_0xd0 = field_0xc8;
+12
View File
@@ -555,13 +555,25 @@ void dMenu_Option_c::_draw() {
#endif
mpBlackTex->setAlpha(0xff);
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpBackScreen->draw(0.0f, 0.0f, ctx);
f32 alpha = (f32)g_drawHIO.mOptionScreen.mBackgroundAlpha * (f32)field_0x374;
mpBlackTex->setAlpha(alpha);
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(), mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpScreen->draw(0.0f, 0.0f, ctx);
mpClipScreen->draw(0.0f, 0.0f, ctx);
#if TARGET_PC
ctx->scissor(0.0f, 0.0f, mDoGph_gInf_c::getWidth(), mDoGph_gInf_c::getHeight());
ctx->setScissor();
#endif
mpShadowScreen->draw(0.0f, 0.0f, ctx);
if (field_0x3f3 == 1 || field_0x3f3 == 2 || field_0x3f3 == 3) {
mpTVScreen->draw(0.0f, 0.0f, ctx);
+56
View File
@@ -384,7 +384,12 @@ void dMenu_save_c::screenSet() {
mSelectedFile = dComIfGs_getDataNum();
mSelIcon = JKR_NEW dSelect_cursor_c(0, 1.0f, NULL);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.94f, 0.03f, 0.7f, 0.7f);
#else
mSelIcon->setParam(0.96f, 0.94f, 0.03f, 0.7f, 0.7f);
#endif
Vec pos;
pos = mpSelData[mSelectedFile]->getGlobalVtxCenter(false, 0);
@@ -2516,7 +2521,12 @@ void dMenu_save_c::yesnoCursorShow() {
Vec pos = mpNoYes[mYesNoCursor]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(pos.x, pos.y, mpNoYes[mYesNoCursor]->getPanePtr(), true);
mSelIcon->setAlphaRate(1.0f);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.84f, 0.06f, 0.5f, 0.5f);
#else
mSelIcon->setParam(0.96f, 0.84f, 0.06f, 0.5f, 0.5f);
#endif
}
}
@@ -2664,7 +2674,12 @@ void dMenu_save_c::selFileCursorShow() {
Vec pos = mpSelData[mSelectedFile]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(pos.x, pos.y, mpSelData[mSelectedFile]->getPanePtr(), true);
mSelIcon->setAlphaRate(1.0f);
#if TARGET_PC
mSelIcon->setParam(0.96f * mDoGph_gInf_c::hudAspectScaleUp, 0.94f, 0.03f, 0.7f, 0.7f);
#else
mSelIcon->setParam(0.96f, 0.94f, 0.03f, 0.7f, 0.7f);
#endif
}
void dMenu_save_c::yesnoWakuAlpahAnmInit(u8 yesnoIdx, u8 startAlpha, u8 endAlpha, u8 anmTimer) {
@@ -2763,6 +2778,43 @@ void dMenu_save_c::_draw() {
}
}
#if TARGET_PC
void dMenu_save_c::menuSaveWide() {
mSaveSel.Scr->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
mSaveSel.Scr->translate(mDoGph_gInf_c::getMinXF(), 0.0f);
mSaveSel.Scr->search(MULTI_CHAR('t_for'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('t_for1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_btn_n'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_n_bk00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_n_bk01'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_n_bk02'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_dat_i0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_dat_i1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_dat_i2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_no_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('f_no_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_yes_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('f_yes_t'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Spirals
mSaveSel.Scr->search(MULTI_CHAR('w_uzu00'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu01'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu02'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu03'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu04'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu05'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu06'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu07'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu08'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
mSaveSel.Scr->search(MULTI_CHAR('w_uzu09'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
#endif
void dMenu_save_c::_draw2() {
if (field_0x21a1 == 0) {
if (mpScrnExplain != NULL) {
@@ -2770,6 +2822,10 @@ void dMenu_save_c::_draw2() {
}
if (mDisplayMenu) {
#if TARGET_PC
menuSaveWide();
#endif
dComIfGd_set2DOpa(&mSaveSel);
for (int i = 0; i < 3; i++) {
+14
View File
@@ -143,12 +143,26 @@ void dMenu_Skill_c::_draw() {
J2DGrafContext* context = dComIfGp_getCurrentGrafPort();
u8 alpha = mpBlackTex->mAlpha;
mpBlackTex->setAlpha(0xff);
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpBlackTex->setAlpha(alpha);
mpMenuScreen->draw(mPosX, 0.0f, context);
mpDrawCursor->draw();
if (mProcess == 1 || mProcess == 2 || mProcess == 3) {
#if TARGET_PC
mpBlackTex->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), 0, 0, 0);
#else
mpBlackTex->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, 0, 0, 0);
#endif
mpLetterScreen->draw(0.0f, 0.0f, context);
if (mStringID != 0) {
mpString->getString(mStringID, (J2DTextBox*)mpTextPane->getPanePtr(), NULL, NULL,
+6
View File
@@ -564,6 +564,7 @@ void dMeter2Draw_c::exec(u32 i_status) {
{
mButtonsPosX = g_drawHIO.mMainHUDButtonsPosX;
mButtonsPosY = g_drawHIO.mMainHUDButtonsPosY;
mpButtonParent->paneTrans(g_drawHIO.mMainHUDButtonsPosX, g_drawHIO.mMainHUDButtonsPosY);
}
@@ -1589,7 +1590,9 @@ void dMeter2Draw_c::drawKanteraScreen(u8 i_meterType) {
mpMagicFrameR->move(field_0x59c[i_meterType], field_0x5a8[i_meterType]);
mpMagicBase->resize(field_0x5b4[i_meterType], field_0x5c0[i_meterType]);
mpMagicParent->scale(field_0x5cc[i_meterType], field_0x5d8[i_meterType]);
mpMagicParent->paneTrans(field_0x5e4[i_meterType], field_0x5f0[i_meterType]);
mpKanteraScreen->draw(0.0f, 0.0f, graf_ctx);
}
@@ -1854,6 +1857,7 @@ void dMeter2Draw_c::drawLightDrop(u8 i_num, u8 i_needNum, f32 i_posX, f32 i_posY
mLightDropVesselScale = i_vesselScale;
mpLightDropParent->scale(mLightDropVesselScale * field_0x6f8,
mLightDropVesselScale * field_0x6f8);
mpLightDropParent->paneTrans(i_posX, i_posY);
}
@@ -2001,6 +2005,7 @@ void dMeter2Draw_c::drawRupee(s16 i_rupeeNum) {
mpRupeeKeyParent->scale(g_drawHIO.mRupeeKeyScale * field_0x718,
g_drawHIO.mRupeeKeyScale * field_0x718);
mpRupeeKeyParent->paneTrans(g_drawHIO.mRupeeKeyPosX, g_drawHIO.mRupeeKeyPosY);
mpRupeeParent[0]->scale(g_drawHIO.mRupeeScale, g_drawHIO.mRupeeScale);
@@ -2582,6 +2587,7 @@ void dMeter2Draw_c::drawButtonCross(f32 i_posX, f32 i_posY) {
mpButtonCrossParent->scale(g_drawHIO.mButtonCrossScale, g_drawHIO.mButtonCrossScale);
mpTextI->scale(g_drawHIO.mButtonCrossTextScale, g_drawHIO.mButtonCrossTextScale);
mpTextM->scale(g_drawHIO.mButtonCrossTextScale, g_drawHIO.mButtonCrossTextScale);
mpButtonCrossParent->paneTrans(i_posX, i_posY);
}
+4
View File
@@ -1868,12 +1868,16 @@ f32 dMeter2Info_getWide2DPosX(f32* param_0) {
}
void dMeter2Info_onWide2D() {
#if !TARGET_PC
g_ringHIO.updateOnWide();
#endif
g_drawHIO.updateOnWide();
}
void dMeter2Info_offWide2D() {
#if !TARGET_PC
g_ringHIO.updateOffWide();
#endif
g_drawHIO.updateOffWide();
}
#endif
+13 -2
View File
@@ -2287,7 +2287,18 @@ dMeter_drawHIO_c::dMeter_drawHIO_c() {
}
#if WIDESCREEN_SUPPORT
void dMeter_drawHIO_c::updateOnWide() {}
void dMeter_drawHIO_c::updateOnWide() {
#if TARGET_PC
g_drawHIO = {}; // this might be a bad idea
g_drawHIO.mMainHUDButtonsPosX = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mMainHUDButtonsPosX);
g_drawHIO.mRupeeKeyPosX = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mRupeeKeyPosX);
g_drawHIO.mButtonCrossOFFPosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mButtonCrossOFFPosX);
g_drawHIO.mButtonCrossONPosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mButtonCrossONPosX);
g_drawHIO.mLifeGaugePosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mLifeGaugePosX);
g_drawHIO.mLanternMeterPosX = mDoGph_gInf_c::ScaleHUDXLeft(g_drawHIO.mLanternMeterPosX);
#endif
}
void dMeter_drawHIO_c::updateOffWide() {}
#endif
@@ -3003,7 +3014,7 @@ void dMeter_drawHIO_c::updateFMsgDebug() {
#endif
dMeter_ringHIO_c::dMeter_ringHIO_c() {
#if WIDESCREEN_SUPPORT
#if WIDESCREEN_SUPPORT && !TARGET_PC
updateOnWide();
#else
mRingRadiusH = 175.0f;
+6
View File
@@ -628,7 +628,13 @@ void dMeterMap_c::draw() {
#endif
mMapJ2DPicture->setAlpha(alpha);
#if TARGET_PC
mMapJ2DPicture->draw(mDoGph_gInf_c::ScaleHUDXLeft(drawPosX), drawPosY, sizeX, sizeY, false,
false, false);
#else
mMapJ2DPicture->draw(drawPosX, drawPosY, sizeX, sizeY, false, false, false);
#endif
mMapJ2DPicture->calcMtx();
}
}
+12
View File
@@ -101,13 +101,25 @@ void dMsgScrnPlace_c::exec() {
mpFontParent->scale(g_MsgObject_HIO_c.mStageTitleCharSizeX,
g_MsgObject_HIO_c.mStageTitleCharSizeY);
#if TARGET_PC
mpFontParent->paneTrans(mDoGph_gInf_c::ScaleHUDXLeft(g_MsgObject_HIO_c.mStageTitleCharPosX),
g_MsgObject_HIO_c.mStageTitleCharPosY - mScaleX);
#else
mpFontParent->paneTrans(g_MsgObject_HIO_c.mStageTitleCharPosX,
g_MsgObject_HIO_c.mStageTitleCharPosY - mScaleX);
#endif
mpBaseParent->scale(g_MsgObject_HIO_c.mStageTitleBaseSizeX,
g_MsgObject_HIO_c.mStageTitleBaseSizeY);
#if TARGET_PC
mpBaseParent->paneTrans(mDoGph_gInf_c::ScaleHUDXLeft(g_MsgObject_HIO_c.mStageTitleBasePosX),
g_MsgObject_HIO_c.mStageTitleBasePosY - mScaleY);
#else
mpBaseParent->paneTrans(g_MsgObject_HIO_c.mStageTitleBasePosX,
g_MsgObject_HIO_c.mStageTitleBasePosY - mScaleY);
#endif
if (isTalkNow()) {
fukiAlpha(1.0f);
+60
View File
@@ -918,6 +918,10 @@ 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
Vec pos = mMojiIcon[mCharRow + mCharColumn * 5]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(pos.x, pos.y, mMojiIcon[mCharRow + mCharColumn * 5]->getPanePtr(), true);
@@ -1281,7 +1285,58 @@ void dName_c::selectCursorPosSet(int row) {
}
}
#if TARGET_PC
void dName_c::nameWide() {
//Resize Select Icon
mSelIcon->setParam(0.82f * mDoGph_gInf_c::hudAspectScaleUp, 0.77f, 0.05f, 0.4f, 0.4f);
// List of Characters Box
static u64 l_tagName[65] = {
MULTI_CHAR('m_00_0'), MULTI_CHAR('m_00_1'), MULTI_CHAR('m_00_2'), MULTI_CHAR('m_00_3'), MULTI_CHAR('m_00_4'), MULTI_CHAR('m_01_0'), MULTI_CHAR('m_01_1'), MULTI_CHAR('m_01_2'), MULTI_CHAR('m_01_3'),
MULTI_CHAR('m_01_4'), MULTI_CHAR('m_02_0'), MULTI_CHAR('m_02_1'), MULTI_CHAR('m_02_2'), MULTI_CHAR('m_02_3'), MULTI_CHAR('m_02_4'), MULTI_CHAR('m03_0'), MULTI_CHAR('m03_1'), MULTI_CHAR('m03_2'),
MULTI_CHAR('m03_3'), MULTI_CHAR('m03_4'), MULTI_CHAR('m_04_0'), MULTI_CHAR('m_04_1'), MULTI_CHAR('m_04_2'), MULTI_CHAR('m_04_3'), MULTI_CHAR('m_04_4'), MULTI_CHAR('m_05_0'), MULTI_CHAR('m_05_1'),
MULTI_CHAR('m_05_2'), MULTI_CHAR('m_05_3'), MULTI_CHAR('m_05_4'), MULTI_CHAR('m_06_0'), MULTI_CHAR('m_06_1'), MULTI_CHAR('m_06_2'), MULTI_CHAR('m_06_3'), MULTI_CHAR('m_06_4'), MULTI_CHAR('m_07_0'),
MULTI_CHAR('m_07_1'), MULTI_CHAR('m_07_2'), MULTI_CHAR('m_07_3'), MULTI_CHAR('m_07_4'), MULTI_CHAR('m_08_0'), MULTI_CHAR('m_08_1'), MULTI_CHAR('m_08_2'), MULTI_CHAR('m_08_3'), MULTI_CHAR('m_08_4'),
MULTI_CHAR('m_09_0'), MULTI_CHAR('m_09_1'), MULTI_CHAR('m_09_2'), MULTI_CHAR('m_09_3'), MULTI_CHAR('m_09_4'), MULTI_CHAR('m_10_0'), MULTI_CHAR('m_10_1'), MULTI_CHAR('m_10_2'), MULTI_CHAR('m_10_3'),
MULTI_CHAR('m_10_4'), MULTI_CHAR('m_11_0'), MULTI_CHAR('m_11_1'), MULTI_CHAR('m_11_2'), MULTI_CHAR('m_11_3'), MULTI_CHAR('m_11_4'), MULTI_CHAR('m12_0'), MULTI_CHAR('m12_1'), MULTI_CHAR('m12_2'),
MULTI_CHAR('m12_3'), MULTI_CHAR('m12_4'),
};
for (u32 i = 0; i < 65; i++) {
nameIn.NameInScr->search(l_tagName[i])->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
// "END" Text
nameIn.NameInScr->search(MULTI_CHAR('p_end_2'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
nameIn.NameInScr->search(MULTI_CHAR('p_end_1'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
nameIn.NameInScr->search(MULTI_CHAR('p_end_0'))->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
// Letters being typed
static u64 l_nameTagName[8] = {
MULTI_CHAR('name_00'), MULTI_CHAR('name_01'), MULTI_CHAR('name_02'), MULTI_CHAR('name_03'), MULTI_CHAR('name_04'), MULTI_CHAR('name_05'), MULTI_CHAR('name_06'), MULTI_CHAR('name_07'),
};
for (u32 i = 0; i < 8; i++) {
nameIn.NameInScr->search(l_nameTagName[i])->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
// Underscores when typing below letters
static u64 l_nameCurTagName[8] = {
MULTI_CHAR('s__n_00'), MULTI_CHAR('s__n_01'), MULTI_CHAR('s__n_02'), MULTI_CHAR('s__n_03'), MULTI_CHAR('s__n_04'), MULTI_CHAR('s__n_05'), MULTI_CHAR('s__n_06'), MULTI_CHAR('s__n_07'),
};
for (u32 i = 0; i < 8; i++) {
nameIn.NameInScr->search(l_nameCurTagName[i])
->scale(mDoGph_gInf_c::hudAspectScaleDown, 1.0f);
}
}
#endif
void dName_c::_draw() {
#if TARGET_PC
nameWide();
#endif
dComIfGd_set2DOpa(&nameIn);
dComIfGd_set2DOpa(mSelIcon);
}
@@ -1484,7 +1539,12 @@ void dName_c::screenSet() {
mSelIcon = JKR_NEW dSelect_cursor_c(0, 1.0f, NULL);
JUT_ASSERT(0, mSelIcon != NULL);
#if TARGET_PC
mSelIcon->setParam(0.82f * mDoGph_gInf_c::hudAspectScaleUp, 0.77f, 0.05f, 0.4f, 0.4f);
#else
mSelIcon->setParam(0.82f, 0.77f, 0.05f, 0.4f, 0.4f);
#endif
Vec pos = mMojiIcon[mCharRow + mCharColumn * 5]->getGlobalVtxCenter(false, 0);
mSelIcon->setPos(pos.x, pos.y, mMojiIcon[mCharRow + mCharColumn * 5]->getPanePtr(), true);
+6
View File
@@ -51,8 +51,14 @@ void dOvlpFd2_dlst_c::draw() {
GXEnd();
Mtx44 m;
#if TARGET_PC
C_MTXPerspective(m, 60.0f, 1.3571428f, 100.0f, 100000.0f);
#else
C_MTXPerspective(m, 60.0f, mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getHeightF(), 100.0f,
100000.0f);
#endif
GXSetProjection(m, GX_PERSPECTIVE);
#ifdef TARGET_PC
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
+6
View File
@@ -64,8 +64,14 @@ void dOvlpFd3_dlst_c::draw() {
GXEnd();
Mtx44 m;
#if TARGET_PC
C_MTXPerspective(m, 60.0f, 1.3571428f, 100.0f, 100000.0f);
#else
C_MTXPerspective(m, 60.0f, mDoGph_gInf_c::getWidthF() / mDoGph_gInf_c::getHeightF(), 100.0f,
100000.0f);
#endif
GXSetProjection(m, GX_PERSPECTIVE);
#ifdef TARGET_PC
mDoGph_gInf_c::getFrameBufferTexObj()->reset();
+8
View File
@@ -12,6 +12,7 @@
#include "dusk/hotkeys.h"
#include "dusk/settings.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
namespace dusk {
void ImGuiMenuGame::ToggleFullscreen() {
@@ -35,6 +36,13 @@ namespace dusk {
ToggleFullscreen();
}
if (ImGui::MenuItem("Default Window Size")) {
getSettings().video.enableFullscreen.setValue(false);
VISetWindowFullscreen(false);
VISetWindowSize(FB_WIDTH * 2, FB_HEIGHT * 2);
VICenterWindow();
}
ImGui::EndMenu();
}
+41
View File
@@ -552,8 +552,16 @@ const tvSize l_tvSize[2] = {
{808, 448},
};
#if TARGET_PC
tvSize pc_tvSize = {608, 448};
#endif
void mDoGph_gInf_c::setTvSize() {
#if TARGET_PC
const tvSize* tvsize = &pc_tvSize;
#else
const tvSize* tvsize = &l_tvSize[mWide];
#endif
m_width = tvsize->width;
m_height = tvsize->height;
@@ -572,13 +580,28 @@ void mDoGph_gInf_c::setTvSize() {
m_aspect = m_widthF / m_heightF;
m_scale = m_aspect / 1.3571428f;
m_invScale = 1.0f / m_scale;
#if TARGET_PC
hudAspectScaleDown = 1.3571428f / mDoGph_gInf_c::getAspect();
hudAspectScaleUp = 1.0f / hudAspectScaleDown;
#endif
}
#if TARGET_PC
void mDoGph_gInf_c::onWide(f32 width, f32 height) {
mWide = TRUE;
pc_tvSize.width = width;
pc_tvSize.height = height;
setTvSize();
dMeter2Info_onWide2D();
}
#else
void mDoGph_gInf_c::onWide() {
mWide = TRUE;
setTvSize();
dMeter2Info_onWide2D();
}
#endif
void mDoGph_gInf_c::offWide() {
mWide = FALSE;
@@ -686,10 +709,16 @@ void mDoGph_gInf_c::setWideZoomLightProjection(Mtx& m) {
#endif
#if TARGET_PC
f32 mDoGph_gInf_c::hudAspectScaleDown = 1.0f;
f32 mDoGph_gInf_c::hudAspectScaleUp = 1.0f;
void mDoGph_gInf_c::setWindowSize(AuroraWindowSize const& size) {
JUTVideo::getManager()->setWindowSize(size);
dComIfGp_setWindow(0, 0.0f, 0.0f, getWidth(), getHeight(), 0.0f, 1.0f, 0, 2);
mFader->mBox.set(0, 0, getWidth(), getHeight());
f32 newWidth = (getWidth() / getHeight()) * 448.0f;
onWide(newWidth, 448.0f);
}
#endif
@@ -1285,7 +1314,13 @@ void mDoGph_gInf_c::bloom_c::draw() {
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, 0x3c);
for (int texCoord = (int)GX_TEXCOORD1; texCoord < (int)GX_MAX_TEXCOORD; texCoord++) {
GXSetTexCoordGen((GXTexCoordID)texCoord, GX_TG_MTX2x4, GX_TG_TEX0, iVar11);
#if TARGET_PC
f32 dVar15 = mBlureSize * ((448.0f / getHeight()) / 6400.0f);
#else
f32 dVar15 = mBlureSize * (1.0f / 6400.0f);
#endif
mDoMtx_stack_c::transS((dVar15 * cM_scos(sVar10)) * getInvScale(),
dVar15 * cM_ssin(sVar10), 0.0f);
GXLoadTexMtxImm(mDoMtx_stack_c::get(), iVar11, GX_MTX2x4);
@@ -2014,7 +2049,13 @@ int mDoGph_Painter() {
Mtx m2;
Mtx44 m;
#if TARGET_PC
C_MTXPerspective(m, AREG_F(8) + 60.0f, 1.3571428f, 1.0f, 100000.0f);
#else
C_MTXPerspective(m, AREG_F(8) + 60.0f, mDoGph_gInf_c::getAspect(), 1.0f, 100000.0f);
#endif
GXSetProjection(m, GX_PERSPECTIVE);
cXyz sp38c(0.0f, 0.0f, AREG_F(7) + -2.0f);
cXyz sp398(0.0f, 1.0f, 0.0f);
+2 -2
View File
@@ -321,8 +321,8 @@ int game_main(int argc, char* argv[]) {
config.configPath = configPath;
config.windowPosX = -1;
config.windowPosY = -1;
config.windowWidth = 608 * 2;
config.windowHeight = 448 * 2;
config.windowWidth = FB_WIDTH * 2;
config.windowHeight = FB_HEIGHT * 2;
config.desiredBackend = ParseAuroraBackend(parsed_arg_options["backend"].as<std::string>());
config.logCallback = &aurora_log_callback;
config.logLevel = (AuroraLogLevel)parsed_arg_options["log-level"].as<uint8_t>();