have modified tears of light count use tphd_active function

This commit is contained in:
MelonSpeedruns
2026-05-23 16:03:45 -04:00
parent 81c0c6f4d3
commit f11d4b14d9
5 changed files with 31 additions and 8 deletions
+2
View File
@@ -242,6 +242,8 @@ struct UserSettings {
UserSettings& getSettings();
bool tphd_active();
void registerSettings();
// Transient settings
+10 -4
View File
@@ -10,6 +10,7 @@
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h"
#include <cstring>
#include <dusk/ui/settings.hpp>
static int daKytag04_Draw(kytag04_class* i_this) {
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
@@ -260,8 +261,10 @@ static int daKytag04_Create(fopAc_ac_c* i_this) {
a_this->mNeedDropNum = i_this->current.angle.z & 0xFF;
#if DUSK_TPHD
a_this->mNeedDropNum = 12;
#if TARGET_PC
if (dusk::tphd_active()) {
a_this->mNeedDropNum = 12;
}
#endif
int phase_state = dComIfG_resLoad(&a_this->mPhase, "Kytag04");
@@ -270,8 +273,11 @@ static int daKytag04_Create(fopAc_ac_c* i_this) {
a_this->mStageNo = (i_this->current.angle.z >> 8) & 0xFF;
a_this->mExitID = fopAcM_GetParam(i_this) & 0xFF;
a_this->mNeedDropNum = i_this->current.angle.z & 0xFF;
#if DUSK_TPHD
a_this->mNeedDropNum = 12;
#if TARGET_PC
if (dusk::tphd_active()) {
a_this->mNeedDropNum = 12;
}
#endif
a_this->field_0x5b5 = fopAcM_GetParam(i_this) >> 0x10;
+8 -2
View File
@@ -26,6 +26,8 @@
daObjDrop_HIO_c l_HIO;
#endif
#include <dusk/ui/settings.hpp>
static void* searchParentSub(void* pproc, void* pdata) {
daObjDrop_c* pdrop = (daObjDrop_c*)pdata;
fopAc_ac_c* pym = (fopAc_ac_c*)pproc;
@@ -103,8 +105,12 @@ void daObjDrop_c::dropGet() {
dComIfGs_setLightDropNum(dComIfGp_getStartStageDarkArea(), num + 1);
if (dComIfGp_getStartStageDarkArea() == 2 &&
#if DUSK_TPHD
dComIfGs_getLightDropNum(dComIfGp_getStartStageDarkArea()) == 11)
#if TARGET_PC
((dusk::tphd_active() &&
dComIfGs_getLightDropNum(dComIfGp_getStartStageDarkArea()) == 11) ||
!dusk::tphd_active() &&
dComIfGs_getLightDropNum(dComIfGp_getStartStageDarkArea()) == 15
))
#else
dComIfGs_getLightDropNum(dComIfGp_getStartStageDarkArea()) == 15)
#endif
+6 -2
View File
@@ -25,6 +25,7 @@
#include "m_Do/m_Do_graphic.h"
#include <cstdio>
#include <cstring>
#include <dusk/ui/settings.hpp>
void dComIfG_play_c::ct() {
mWindowNum = 0;
@@ -2571,8 +2572,11 @@ u8 dComIfG_getNowCalcRegion() {
bool dComIfGp_isLightDropMapVisible() {
for (int i = 0; i < 3; i++) {
#if DUSK_TPHD
if (dComIfGs_isLightDropGetFlag(i) != FALSE && dComIfGs_getLightDropNum(i) < 12) {
#if TARGET_PC
if (dComIfGs_isLightDropGetFlag(i) != FALSE &&
((dusk::tphd_active() && dComIfGs_getLightDropNum(i) < 12) ||
(!dusk::tphd_active() && dComIfGs_getLightDropNum(i) < 16)))
{
#else
if (dComIfGs_isLightDropGetFlag(i) != FALSE && dComIfGs_getLightDropNum(i) < 16) {
#endif
+5
View File
@@ -176,6 +176,11 @@ UserSettings& getSettings() {
return g_userSettings;
}
bool tphd_active() {
const std::string& hdPath = g_userSettings.backend.hdContentPath;
return !hdPath.empty();
}
void registerSettings() {
// Video
Register(g_userSettings.video.enableFullscreen);