mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-14 21:39:01 -04:00
disable los transforming
This commit is contained in:
+33
-31
@@ -5,51 +5,53 @@
|
||||
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_b_mgn.h"
|
||||
#include "d/actor/d_a_canoe.h"
|
||||
#include "d/actor/d_a_cow.h"
|
||||
#include "d/actor/d_a_crod.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/actor/d_a_kytag05.h"
|
||||
#include "d/actor/d_a_mg_rod.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/actor/d_a_mirror.h"
|
||||
#include "d/actor/d_a_spinner.h"
|
||||
#include "d/actor/d_a_tbox.h"
|
||||
#include "d/actor/d_a_tag_Lv6Gate.h"
|
||||
#include "d/actor/d_a_tag_kmsg.h"
|
||||
#include "d/actor/d_a_tag_magne.h"
|
||||
#include "d/actor/d_a_tag_wljump.h"
|
||||
#include "d/actor/d_a_npc_tk.h"
|
||||
#include "d/actor/d_a_cow.h"
|
||||
#include "d/actor/d_a_obj_crope.h"
|
||||
#include "d/actor/d_a_obj_wchain.h"
|
||||
#include "d/actor/d_a_tag_hstop.h"
|
||||
#include "d/actor/d_a_scene_exit.h"
|
||||
#include "d/actor/d_a_tag_mhint.h"
|
||||
#include "d/actor/d_a_tag_mmsg.h"
|
||||
#include "d/actor/d_a_tag_lantern.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "d/d_bomb.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/actor/d_a_kytag05.h"
|
||||
#include "d/actor/d_a_b_mgn.h"
|
||||
#include "d/actor/d_a_ni.h"
|
||||
#include "d/actor/d_a_npc_bou.h"
|
||||
#include "d/actor/d_a_npc_kolin.h"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "d/actor/d_a_npc_tk.h"
|
||||
#include "d/actor/d_a_obj_crope.h"
|
||||
#include "d/actor/d_a_obj_wchain.h"
|
||||
#include "d/actor/d_a_scene_exit.h"
|
||||
#include "d/actor/d_a_spinner.h"
|
||||
#include "d/actor/d_a_tag_Lv6Gate.h"
|
||||
#include "d/actor/d_a_tag_hstop.h"
|
||||
#include "d/actor/d_a_tag_kmsg.h"
|
||||
#include "d/actor/d_a_tag_lantern.h"
|
||||
#include "d/actor/d_a_tag_magne.h"
|
||||
#include "d/actor/d_a_tag_mhint.h"
|
||||
#include "d/actor/d_a_tag_mmsg.h"
|
||||
#include "d/actor/d_a_tag_mstop.h"
|
||||
#include "d/actor/d_a_tag_mwait.h"
|
||||
#include "d/actor/d_a_canoe.h"
|
||||
#include "d/actor/d_a_ni.h"
|
||||
#include "d/actor/d_a_tag_wljump.h"
|
||||
#include "d/actor/d_a_tbox.h"
|
||||
#include "d/d_bomb.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
#include "dusk/tphd/TphdPack.hpp"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/action_bindings.h"
|
||||
@@ -17452,7 +17454,7 @@ int daAlink_c::procCoMetamorphoseInit() {
|
||||
mProcVar2.field_0x300c = shape_angle.x;
|
||||
|
||||
daMidna_c* midna = (daMidna_c*)getMidnaActor();
|
||||
if (checkMidnaRide() && daMidna_c::checkMidnaRealBody() && midna->checkDemoTypeNone())
|
||||
if (checkMidnaRide() && (daMidna_c::checkMidnaRealBody() IF_DUSK(|| dusk::tphd::is_los_active())) && midna->checkDemoTypeNone())
|
||||
{
|
||||
midna->changeOriginalDemo();
|
||||
midna->changeDemoMode(daPy_demo_c::DEMO_UNK_15_e);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "d/d_meter2.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
|
||||
void daAlink_c::handleWolfHowl() {
|
||||
if (checkWolf()) {
|
||||
@@ -71,6 +72,11 @@ void daAlink_c::handleQuickTransform() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dusk::tphd::is_los_active() && !dusk::getSettings().game.canTransformAnywhere) {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check to see if Link has the ability to transform.
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::M_077)) {
|
||||
return;
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_kago.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
|
||||
static f32 dummy_lit_3777(int idx, u8 foo) {
|
||||
Vec dummy_vec = {0.0f, 0.0f, 0.0f};
|
||||
@@ -3308,7 +3309,14 @@ int daMidna_c::execute() {
|
||||
}
|
||||
}
|
||||
onStateFlg0(FLG0_UNK_8000);
|
||||
mMsgFlow.init(this, 0xbb9, 0, NULL);
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd::is_los_active() && !dusk::getSettings().game.canTransformAnywhere) {
|
||||
mMsgFlow.init(this, 0x457, 0, NULL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
mMsgFlow.init(this, 0xbb9, 0, NULL);
|
||||
}
|
||||
} else if (mMsgFlow.doFlow(this, NULL, 0)) {
|
||||
int item_id;
|
||||
u16 event_id = mMsgFlow.getEventId(&item_id);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <aurora/lib/internal.hpp>
|
||||
#include <SDL3/SDL_misc.h>
|
||||
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
@@ -106,6 +108,10 @@ namespace dusk {
|
||||
ImGui::MenuItem("Stub Log", nullptr, &m_showStubLog);
|
||||
ImGui::MenuItem("Actor Spawner", nullptr, &m_showActorSpawner);
|
||||
|
||||
if (ImGui::MenuItem("Load Cave of Shadows")) {
|
||||
dusk::tphd::set_los_next_stage();
|
||||
}
|
||||
|
||||
if (!dusk::IsGameLaunched) {
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "aurora/lib/logging.hpp"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "dusk/endian.h"
|
||||
|
||||
static aurora::Module LosLog("dusk::tphd::los");
|
||||
@@ -124,4 +125,11 @@ bool is_los_active() {
|
||||
std::strcmp(dComIfGp_getStartStageName(), "D_SB11") == 0;
|
||||
}
|
||||
|
||||
void set_los_next_stage() {
|
||||
dComIfGp_setNextStage("D_SB11", 0, 19, -1, 0.0f, 0, 1, 0, 0, 1, 0);
|
||||
g_dComIfG_gameInfo.info.getRestart().setLastSceneInfo(20.0f, 0, 0);
|
||||
dComIfGs_setTurnRestart(dComIfGs_getTurnRestartPos(), 0, 0, daPy_py_c::setParamData(0, 1, 0xCA, 0));
|
||||
dComIfGs_setLife(dComIfGs_getMaxLife());
|
||||
}
|
||||
|
||||
} // namespace dusk::tphd
|
||||
|
||||
@@ -25,6 +25,7 @@ int los_prev_floor(int roomNo);
|
||||
int los_floor_index(int roomNo);
|
||||
|
||||
bool is_los_active();
|
||||
void set_los_next_stage();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user