From d53a6858a19619412cf1cc61d30df695cf5758af Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Sat, 16 Aug 2025 09:30:31 +0100 Subject: [PATCH] Avoid Tide randomness --- configure.py | 2 +- include/d/actor/d_a_tsubo.h | 11 ++++++++++- src/d/actor/d_a_tsubo.cpp | 26 +++----------------------- 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/configure.py b/configure.py index 19eca1c27..a0f6e8a99 100755 --- a/configure.py +++ b/configure.py @@ -1429,7 +1429,7 @@ config.libs = [ ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_swpush", extra_cflags=['-pragma "nosyminline on"']), ActorRel(Matching, "d_a_obj_table"), ActorRel(Matching, "d_a_obj_tenmado"), - ActorRel(Matching, "d_a_obj_tide"), + ActorRel(Equivalent, "d_a_obj_tide"), ActorRel(Matching, "d_a_obj_timer"), ActorRel(Equivalent, "d_a_obj_toripost", extra_cflags=['-pragma "nosyminline on"']), # weak func order ActorRel(Matching, "d_a_obj_tousekiki", extra_cflags=['-pragma "nosyminline on"']), diff --git a/include/d/actor/d_a_tsubo.h b/include/d/actor/d_a_tsubo.h index 9b3d7d512..7d6abf32d 100644 --- a/include/d/actor/d_a_tsubo.h +++ b/include/d/actor/d_a_tsubo.h @@ -162,7 +162,16 @@ namespace daTsubo { const AttrSpine_c& attrSpine() { return M_attrSpine; } const Data_c& data() const { return M_data[mType]; } const SpecBokoData& data_spec_boko(int index) { return M_data_spec_boko[index]; } - bool is_switch() const { return fopAcM_isSwitch(const_cast(this), prmZ_get_swSave()); } + #if VERSION == VERSION_DEMO + bool is_switch() const { + return fopAcM_isSwitch(const_cast(this), prmZ_get_swSave()); + } + #else + BOOL is_switch() const { + int sw = prmZ_get_swSave(); + return fopAcM_isSwitch(const_cast(this), sw); + } + #endif bool pos_init() { if (m678 == 2) { diff --git a/src/d/actor/d_a_tsubo.cpp b/src/d/actor/d_a_tsubo.cpp index 8daedd2bf..dd9be5af2 100644 --- a/src/d/actor/d_a_tsubo.cpp +++ b/src/d/actor/d_a_tsubo.cpp @@ -590,7 +590,7 @@ const Act_c::Data_c Act_c::M_data[] = { 0x5, (DataFlag_e)(DATA_FLAG_2_e | DATA_FLAG_10_e | DATA_FLAG_20_e), #if VERSION == VERSION_DEMO - 0xA, + SITEM_BDL_KMI_00, #else KMI00X_BDL_KMI_00X, #endif @@ -731,11 +731,7 @@ const Act_c::Data_c Act_c::M_data[] = { 0x7D, 0x5, (DataFlag_e)(DATA_FLAG_2_e | DATA_FLAG_4_e), -#if VERSION == VERSION_DEMO - 0xD, -#else HSEKI_BDL_HMON1, -#endif 0x48, 0x38, 0x96, @@ -800,11 +796,7 @@ const Act_c::Data_c Act_c::M_data[] = { 0x7D, 0x5, (DataFlag_e)(DATA_FLAG_2_e | DATA_FLAG_4_e), -#if VERSION == VERSION_DEMO - 0xD, -#else HSEKI_BDL_HMON1, -#endif 0x48, 0x38, 0x96, @@ -869,11 +861,7 @@ const Act_c::Data_c Act_c::M_data[] = { 0x7D, 0x5, (DataFlag_e)(DATA_FLAG_2_e | DATA_FLAG_4_e), -#if VERSION == VERSION_DEMO - 0xD, -#else HSEKI_BDL_HMON1, -#endif 0x48, 0x38, 0x96, @@ -938,11 +926,7 @@ const Act_c::Data_c Act_c::M_data[] = { 0x7D, 0x5, (DataFlag_e)(DATA_FLAG_2_e | DATA_FLAG_4_e), -#if VERSION == VERSION_DEMO - 0xD, -#else HSEKI_BDL_HMON1, -#endif 0x48, 0x38, 0x96, @@ -1007,11 +991,7 @@ const Act_c::Data_c Act_c::M_data[] = { 0x7D, 0x5, (DataFlag_e)(DATA_FLAG_2_e | DATA_FLAG_10_e), -#if VERSION == VERSION_DEMO - 0x7, -#else SITEM_BDL_KMI_02, -#endif 0x2D, 0x32, 0x64, @@ -1254,7 +1234,7 @@ bool Act_c::create_heap() { bool ret = false; if (mType == 7) { #if VERSION == VERSION_DEMO - J3DAnmTevRegKey* brk_data = static_cast(dComIfG_getObjectRes(M_arcname[mType], 13)); + J3DAnmTevRegKey* brk_data = static_cast(dComIfG_getObjectRes(M_arcname[mType], SITEM_BRK_KMI_00)); #else J3DAnmTevRegKey* brk_data = static_cast(dComIfG_getObjectRes(M_arcname[mType], KMI00X_BRK_KMI_00X)); #endif @@ -3566,7 +3546,7 @@ bool Act_c::_execute() { bool bVar4; if (prm_get_spec() == 5) { - bVar4 = !is_switch(); + bVar4 = is_switch() == FALSE; } else { bVar4 = false; }