hd faster tears toggle

This commit is contained in:
TakaRikka
2026-04-04 06:02:23 -07:00
parent b45af18374
commit 015e7aceab
6 changed files with 77 additions and 2 deletions
+1
View File
@@ -35,6 +35,7 @@ struct UserSettings {
int damageMultiplier;
bool instantDeath;
bool fastClimbing;
bool fastTears;
// Preferences
bool enableMirrorMode;
+16 -1
View File
@@ -16,6 +16,8 @@
#include "f_op/f_op_camera_mng.h"
#include <cstring>
#include "dusk/settings.h"
class daE_YM_HIO_c: public JORReflexible {
public:
daE_YM_HIO_c();
@@ -1066,7 +1068,11 @@ void daE_YM_c::executeDown() {
}
if (mAcch.ChkGroundHit()) {
if (mFlyType != 1) {
#if TARGET_PC
bckSet(6, 0, 0.0f, dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0 ? 2.0f : 1.0f);
#else
bckSet(6, 0, 0.0f, 1.0f);
#endif
}
if (mMode == 1) {
mSound.startCreatureSound(Z2SE_EN_YM_LAND, 0, -1);
@@ -1086,7 +1092,11 @@ void daE_YM_c::executeDown() {
if (current.pos.y < gnd_cross) {
mSound.startCreatureSound(Z2SE_CM_BODYFALL_WATER_M, 0, -1);
mSound.startCreatureSound(Z2SE_EN_YM_MOGAKU, 0, -1);
#if TARGET_PC
bckSet(6, 0, 0.0f, dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0 ? 2.0f : 1.0f);
#else
bckSet(6, 0, 0.0f, 1.0f);
#endif
speedF = 0.0f;
speed.y = gravity = 0.0f;
current.pos.y = gnd_cross;
@@ -1102,8 +1112,13 @@ void daE_YM_c::executeDown() {
f32 gnd_cross_2 = dComIfG_Bgsp().GroundCross(&gnd_chk);
if (gnd_cross_2 == -G_CM3D_F_INF || std::abs(gnd_cross_2 - current.pos.y) > 1000.0f
|| dComIfG_Bgsp().GetGroundCode(gnd_chk) == 4 || dComIfG_Bgsp().GetGroundCode(gnd_chk) == 10
|| dComIfG_Bgsp().GetGroundCode(gnd_chk) == 5) {
|| dComIfG_Bgsp().GetGroundCode(gnd_chk) == 5)
{
#if TARGET_PC
bckSet(6, 0, 0.0f, dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0 ? 2.0f : 1.0f);
#else
bckSet(6, 0, 0.0f, 1.0f);
#endif
mMode = 3;
speedF = 0.0f;
shape_angle.x = -0x8000;
+53
View File
@@ -20,6 +20,8 @@
#include "d/actor/d_a_e_ymb.h"
#include "f_op/f_op_camera_mng.h"
#include "dusk/settings.h"
#if DEBUG
daObjDrop_HIO_c l_HIO;
#endif
@@ -261,8 +263,18 @@ int daObjDrop_c::modeParentWait() {
}
mModeAction = 1;
#if TARGET_PC
mModeTimer = dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0 ? 20 : 40;
if (dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0) {
current.pos.y += 100.0f;
} else {
current.pos.y += 300.0f;
}
#else
mModeTimer = 40;
current.pos.y += 300.0f;
#endif
mSound.startSound(Z2SE_OBJ_LIGHTDROP_APPEAR, 0, -1);
break;
case 1:
@@ -272,7 +284,11 @@ int daObjDrop_c::modeParentWait() {
break;
case 2:
createBodyEffect();
#if TARGET_PC
mModeTimer = dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0 ? 5 : 45;
#else
mModeTimer = 45;
#endif
mModeAction = 0;
setMode(MODE_WAIT_e);
break;
@@ -281,6 +297,18 @@ int daObjDrop_c::modeParentWait() {
return 1;
}
#if TARGET_PC
static inline BOOL checkGetCargoRide() {
if ((daPy_getPlayerActorClass()->checkCargoCarry() && strcmp(dComIfGp_getStartStageName(), "F_SP112") == 0) ||
dComIfGs_isLightDropGetFlag(dComIfGp_getStartStageDarkArea()))
{
return true;
}
return false;
}
#endif
int daObjDrop_c::modeWait() {
daPy_py_c* pplayer = daPy_getPlayerActorClass();
@@ -302,7 +330,32 @@ int daObjDrop_c::modeWait() {
case 1:
case 2:
case 50:
#if TARGET_PC
if (dusk::getSettings().game.fastTears && dComIfGp_event_getMode() == 0) {
f32 player_dist = current.pos.abs(daPy_getPlayerActorClass()->current.pos);
f32 home_dist = current.pos.abs(home.pos);
if (checkGetCargoRide() && player_dist < 1000.0f) {
mTargetPos = pplayer->current.pos;
mTargetPos.y += 100.0f;
f32 temp = 3000.0f - home_dist;
if (temp < 0.0f) {
temp = 0.0f;
}
cLib_chaseF(&speedF, (temp / 3000.0f) * 10.0f * (temp / 3000.0f), 1.0f);
} else {
mTargetPos = home.pos;
cLib_chaseF(&speedF, 2.0f, 0.5f);
}
} else {
cLib_chaseF(&speedF, 7.5f, 0.4f);
}
#else
cLib_chaseF(&speedF, 7.5f, 0.4f);
#endif
if (mModeAction == 1) {
cLib_chasePos(&current.pos, mTargetPos, speedF);
}
+5
View File
@@ -37,6 +37,11 @@ namespace dusk {
ImGui::SetTooltip("Quicker climbing on ladders and vines like the HD version");
}
ImGui::Checkbox("Faster Tears of Light", &getSettings().game.fastTears);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Tears of Light dropped by Shadow Insects pop out faster like the HD version");
}
ImGui::Checkbox("Hide TV Settings Screen", &getSettings().game.hideTvSettingsScreen);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Hides the TV calibration screen shown when loading a save");
+1 -1
View File
@@ -823,7 +823,7 @@ namespace dusk {
for (int e = 0; e < 255; e++) {
ImGui::Text("%03d ", e);
ImGui::SameLine();
for (int i = 8; i >= 0; i--) {
for (int i = 7; i >= 0; i--) {
bool flag = event.mEvent[e] & (1 << i);
if (ImGui::Checkbox(fmt::format("##event{0}{1}", e, i).c_str(), &flag)) {
if (flag)
+1
View File
@@ -31,6 +31,7 @@ UserSettings g_userSettings = {
.damageMultiplier = 1,
.instantDeath = false,
.fastClimbing = false,
.fastTears = false,
// Preferences
.enableMirrorMode = false,