mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-09 19:01:12 -04:00
Merge branch 'main' of https://github.com/TakaRikka/dusk
This commit is contained in:
@@ -4473,7 +4473,9 @@ int daMP_c::daMP_c_Get_arg_movieNo() {
|
||||
int daMP_c::daMP_c_Init() {
|
||||
JUT_ASSERT(9469, m_myObj == NULL);
|
||||
|
||||
#if !TARGET_PC // We don't properly simulate retrace interval so this doesn't work.
|
||||
mDoGph_gInf_c::setFrameRate(1);
|
||||
#endif
|
||||
daMP_Fail_alloc = FALSE;
|
||||
|
||||
int demoNo = daMP_c_Get_arg_demoNo();
|
||||
|
||||
@@ -1193,7 +1193,13 @@ void dFile_select_c::menuSelect() {
|
||||
|
||||
// Handles copy / start / delete actions depending on which menu is selected from menuSelect
|
||||
void dFile_select_c::menuSelectStart() {
|
||||
mDoAud_seStart(Z2SE_SY_CURSOR_OK, NULL, 0, 0);
|
||||
#if TARGET_PC
|
||||
if (!dusk::getSettings().game.hideTvSettingsScreen || mSelectMenuNum != 1) {
|
||||
mDoAud_seStart(Z2SE_SY_CURSOR_OK, NULL, 0, 0);
|
||||
}
|
||||
#else
|
||||
mDoAud_seStart(Z2SE_SY_CURSOR_OK, NULL, 0, 0);
|
||||
#endif
|
||||
|
||||
if (mSelectMenuNum == 1) {
|
||||
dComIfGs_setCardToMemory((u8*)mSaveData, mSelectNum);
|
||||
|
||||
@@ -432,7 +432,14 @@ void dDlst_GameOverScrnDraw_c::draw() {
|
||||
img_white.a = 255;
|
||||
|
||||
mpBackImg->setBlackWhite(img_black, img_white);
|
||||
|
||||
#if TARGET_PC
|
||||
mpBackImg->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
|
||||
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), false, false,
|
||||
false);
|
||||
#else
|
||||
mpBackImg->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, false, false, false);
|
||||
#endif
|
||||
} else {
|
||||
JUtility::TColor img_black;
|
||||
JUtility::TColor img_white;
|
||||
@@ -447,7 +454,13 @@ void dDlst_GameOverScrnDraw_c::draw() {
|
||||
img_white.b = l_HIO.mWhite.b;
|
||||
img_white.a = l_HIO.mWhite.a;
|
||||
|
||||
#if TARGET_PC
|
||||
mpBackImg->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
|
||||
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), false, false,
|
||||
false);
|
||||
#else
|
||||
mpBackImg->draw(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT, false, false, false);
|
||||
#endif
|
||||
|
||||
static f32 offset[8] = {-138.0f, -96.0f, -56.0f, -18.0f, 42.0f, 75.0f, 110.0f, 143.0f};
|
||||
|
||||
|
||||
@@ -590,6 +590,15 @@ void dMenu_Collect2D_c::screenSet() {
|
||||
field_0x184[4][2] = 0x196;
|
||||
field_0x184[5][2] = 0x195;
|
||||
field_0x184[6][2] = 0;
|
||||
#if TARGET_PC // Since we allow changing wallet sizes, do something more robust.
|
||||
if (dComIfGs_getWalletSize() == WALLET) {
|
||||
field_0x184[0][3] = 0x199;
|
||||
} else if (dComIfGs_getWalletSize() == BIG_WALLET) {
|
||||
field_0x184[0][3] = 0x19a;
|
||||
} else {
|
||||
field_0x184[0][3] = 0x19b;
|
||||
}
|
||||
#else
|
||||
if (dComIfGs_getRupeeMax() == WALLET_MAX) {
|
||||
field_0x184[0][3] = 0x199;
|
||||
} else if (dComIfGs_getRupeeMax() == BIG_WALLET_MAX) {
|
||||
@@ -597,6 +606,7 @@ void dMenu_Collect2D_c::screenSet() {
|
||||
} else {
|
||||
field_0x184[0][3] = 0x19b;
|
||||
}
|
||||
#endif
|
||||
if (dComIfGs_getArrowMax() == QUIVER_MAX) {
|
||||
field_0x184[1][3] = 0x1b9;
|
||||
} else if (dComIfGs_getArrowMax() == BIG_QUIVER_MAX) {
|
||||
@@ -757,7 +767,11 @@ void dMenu_Collect2D_c::screenSet() {
|
||||
setItemNameString(mCursorX, mCursorY);
|
||||
cursorPosSet();
|
||||
setArrowMaxNum(dComIfGs_getArrowMax());
|
||||
#if TARGET_PC
|
||||
setWalletSizeNum(dComIfGs_getWalletSize());
|
||||
#else
|
||||
setWalletMaxNum(dComIfGs_getRupeeMax());
|
||||
#endif
|
||||
setSmellType();
|
||||
setHeartPiece();
|
||||
setPohMaxNum(dComIfGs_getPohSpiritNum());
|
||||
@@ -1242,6 +1256,27 @@ void dMenu_Collect2D_c::setArrowMaxNum(u8 param_0) {
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void dMenu_Collect2D_c::setWalletSizeNum(u16 i_walletSize) {
|
||||
switch (i_walletSize) {
|
||||
case WALLET:
|
||||
mpScreen->search(MULTI_CHAR('item_1_0'))->show();
|
||||
mpScreen->search(MULTI_CHAR('item_1_1'))->hide();
|
||||
mpScreen->search(MULTI_CHAR('item_1_2'))->hide();
|
||||
break;
|
||||
case BIG_WALLET:
|
||||
mpScreen->search(MULTI_CHAR('item_1_0'))->hide();
|
||||
mpScreen->search(MULTI_CHAR('item_1_1'))->show();
|
||||
mpScreen->search(MULTI_CHAR('item_1_2'))->hide();
|
||||
break;
|
||||
case GIANT_WALLET:
|
||||
mpScreen->search(MULTI_CHAR('item_1_0'))->hide();
|
||||
mpScreen->search(MULTI_CHAR('item_1_1'))->hide();
|
||||
mpScreen->search(MULTI_CHAR('item_1_2'))->show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void dMenu_Collect2D_c::setWalletMaxNum(u16 i_walletSize) {
|
||||
switch (i_walletSize) {
|
||||
case 300:
|
||||
@@ -1261,6 +1296,7 @@ void dMenu_Collect2D_c::setWalletMaxNum(u16 i_walletSize) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void dMenu_Collect2D_c::setSmellType() {
|
||||
static const u64 smell_tag[5] = {
|
||||
|
||||
@@ -2292,6 +2292,7 @@ void dMeter_drawHIO_c::updateOnWide() {
|
||||
g_drawHIO = {}; // this might be a bad idea
|
||||
|
||||
g_drawHIO.mMainHUDButtonsPosX = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mMainHUDButtonsPosX);
|
||||
g_drawHIO.mRingHUDButtonsPosX = mDoGph_gInf_c::ScaleHUDXRight(g_drawHIO.mRingHUDButtonsPosX);
|
||||
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);
|
||||
|
||||
@@ -596,7 +596,8 @@ void dMeterMap_c::_draw() {
|
||||
#if TARGET_PC
|
||||
// Optimization: don't draw map if it's off-screen/invisible.
|
||||
// Especially useful in debug builds on Hyrule field etc., it's slow!
|
||||
if ((!mMapIsInside && mSlidePositionOffset == getDispPosOutSide_OffsetX()) || mMapAlpha == 0) {
|
||||
// That +3 is an arbitrary bias to avoid rounding issues causing this to fail.
|
||||
if ((!mMapIsInside && mSlidePositionOffset <= getDispPosOutSide_OffsetX() + 3) || mMapAlpha == 0) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user