Skip to content

Commit

Permalink
upgrade to P2D 2024080500
Browse files Browse the repository at this point in the history
  • Loading branch information
GEEKiDoS committed Aug 7, 2024
1 parent a828c25 commit ee15452
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 46 deletions.
8 changes: 4 additions & 4 deletions src/client/component/iidx/chart_modifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,16 @@ namespace iidx::chart_modifier
void post_load() override
{
#ifdef DEBUG
utils::hook::jump(0x14016DD30, test_fps);
utils::hook::jump(0x14016DED0, test_fps);
#endif

post_load_chart_hook.create(0x14011B990, post_load_chart);
get_option_str_hook.create(0x140131890, get_option_str);
post_load_chart_hook.create(0x14011B9E0, post_load_chart);
get_option_str_hook.create(0x140131980, get_option_str);

utils::hook::set(0x140423778, report_result_export_request_property);

// allow negtive bpm (movzx -> movsx)
utils::hook::set<uint8_t>(0x14011C517, 0xBF);
utils::hook::set<uint8_t>(0x14011C567, 0xBF);
}
};
}
Expand Down
8 changes: 4 additions & 4 deletions src/client/component/iidx/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <game/game.hpp>
#include <launcher/launcher.hpp>

#define IIDX_TARGET_VERSION "P2D:J:B:A:2024052200"
#define IIDX_TARGET_VERSION "P2D:J:B:A:2024080500"

namespace iidx::env
{
Expand Down Expand Up @@ -56,7 +56,7 @@ namespace iidx::env
}
)();

utils::hook::set<uint32_t>(0x1405F0CD4, language);
utils::hook::set<uint32_t>(0x1405F0D24, language);
return EXCEPTION_CONTINUE_EXECUTION;
}

Expand All @@ -76,15 +76,15 @@ namespace iidx::env
throw std::runtime_error(utils::string::va("Unsupported version %s\nSupported version is " IIDX_TARGET_VERSION ".", version.data()));
}

load_ifs.create(0x1402240E0, load_ifs_hook);
load_ifs.create(0x140224290, load_ifs_hook);
// init_thread_footer.create(0x14035EFA4, init_thread_footer_hook);

CONTEXT ctx{ 0 };
ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS;
auto thread = GetCurrentThread();
if (GetThreadContext(thread, &ctx))
{
ctx.Dr0 = 0x1405F0CD0;
ctx.Dr0 = 0x1405F0D20;
ctx.Dr7 = 1 | 1 << 16;

SetThreadContext(thread, &ctx);
Expand Down
10 changes: 5 additions & 5 deletions src/client/component/iidx/omnimix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,19 @@ namespace iidx::omnimix
void post_load() override
{
// return success if file not exists
utils::hook::set<uint16_t>(0x1401F1508, 0x01B0);
utils::hook::set<uint16_t>(0x1401F16B8, 0x01B0);

// allow mp4 and wmv bga
get_name_hook.create(0x1401C4380, get_bga_name);
get_name_hook.create(0x1401C4530, get_bga_name);

// remove music count limit
utils::hook::set<uint8_t>(0x1401C31BE, 0xEB);
utils::hook::set<uint8_t>(0x1401C336E, 0xEB);

// add omni songs to music_data.bin
utils::hook::call(0x1401C31CE, insert_music_datas);
utils::hook::call(0x1401C337E, insert_music_datas);

// load omni song detail
load_music_info_hook.create(0x1401C3210, load_music_info);
load_music_info_hook.create(0x1401C33C0, load_music_info);
}
};
}
Expand Down
18 changes: 9 additions & 9 deletions src/client/component/iidx/overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,21 +837,21 @@ namespace iidx::overlay
steam_proxy::set_status(status);
}

bool dan_select_flow_attach(void* scene)
bool dan_select_scene_attach(void* scene)
{
printf("D:overlay: CDanSelectFlow::OnAttach\n");

dan_select_flow = scene;
return iidx::dan_select_flow_attach(scene);
return iidx::dan_select_scene_attach(scene);
}


void dan_select_flow_detach(void* scene)
void dan_select_scene_detach(void* scene)
{
printf("D:overlay: CDanSelectFlow::OnDetach\n");

dan_select_flow = nullptr;
return iidx::dan_select_flow_detach(scene);
return iidx::dan_select_scene_detach(scene);
}

void draw()
Expand Down Expand Up @@ -919,19 +919,19 @@ namespace iidx::overlay
public:
void post_load() override
{
present.create(0x1401F7710, present_stub);
present.create(0x1401F78C0, present_stub);

// hook wndproc
utils::hook::inject(0x1402023D2, wndproc);
utils::hook::inject(0x140202582, wndproc);

utils::hook::set(iidx::music_select_scene_attach.get_entry_ptr(), music_select_scene_attach);
utils::hook::set(iidx::music_select_scene_detach.get_entry_ptr(), music_select_scene_detach);

utils::hook::set(iidx::dan_select_flow_attach.get_entry_ptr(), dan_select_flow_attach);
utils::hook::set(iidx::dan_select_flow_detach.get_entry_ptr(), dan_select_flow_detach);
utils::hook::set(iidx::dan_select_scene_attach.get_entry_ptr(), dan_select_scene_attach);
utils::hook::set(iidx::dan_select_scene_detach.get_entry_ptr(), dan_select_scene_detach);

utils::hook::set(iidx::stage_result_draw_frame_init.get_entry_ptr(), stage_result_draw_frame_init);
base_stage_attach.create(0x140184E30, base_stage_attach_hook);
base_stage_attach.create(0x140184FD0, base_stage_attach_hook);
}

void pre_destroy() override
Expand Down
16 changes: 8 additions & 8 deletions src/client/component/iidx/patches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ namespace iidx::patches
void post_load() override
{
// disable signature check
utils::hook::jump(0x140312B60, is_signature_valid);
utils::hook::jump(0x140312D10, is_signature_valid);

// disable music list checksum check
utils::hook::nop(0x1403017E2, 2);
utils::hook::nop(0x1403017EE, 2);
utils::hook::nop(0x140301992, 2);
utils::hook::nop(0x14030199E, 2);

//// change server url
utils::hook::jump(0x1402F88B0, get_service_url);
// change server url
utils::hook::jump(0x1402F8A60, get_service_url);
printf("Using bootstrap url: %s\n", get_service_url(nullptr, false, false));

// override asio device name
Expand All @@ -104,12 +104,12 @@ namespace iidx::patches

std::memcpy(asio_name, device_name.data(), device_name.size());

utils::hook::inject(0x140253B24, asio_name);
utils::hook::inject(0x140253CD4, asio_name);
printf("I:launcher: using asio device: %s\n", asio_name);

// enable retry logic for asio
utils::hook::nop(0x1401DC897, 6);
init_superstep_sound_hook.create(0x140253840, init_superstep_sound_stub);
utils::hook::nop(0x1401DCA47, 6);
init_superstep_sound_hook.create(0x1402539F0, init_superstep_sound_stub);
}

utils::nt::library winhttp{ "winhttp.dll" };
Expand Down
32 changes: 16 additions & 16 deletions src/client/game/iidx/symbols.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ namespace iidx
{
using namespace game;

WEAK symbol<void()> finalize_music_data{ 0x1400D9790 };
WEAK symbol<music_data_t* ()> get_music_data{ 0x1401C4120 };
WEAK symbol<LRESULT(HWND, UINT, WPARAM, LPARAM)> main_wndproc{ 0x140202100 };
WEAK symbol<void()> finalize_music_data{ 0x1400D97C0 };
WEAK symbol<music_data_t* ()> get_music_data{ 0x1401C42D0 };
WEAK symbol<LRESULT(HWND, UINT, WPARAM, LPARAM)> main_wndproc{ 0x1402022B0 };

WEAK vftable_entry<bool(void*)> music_select_scene_attach{ 0x1404D9610, 13, launcher::game::iidx };
WEAK vftable_entry<void(void*)> music_select_scene_detach{ 0x1404D9610, 14, launcher::game::iidx };
WEAK vftable_entry<bool(void*)> music_select_scene_attach{ 0x1404D9658, 13, launcher::game::iidx };
WEAK vftable_entry<void(void*)> music_select_scene_detach{ 0x1404D9658, 14, launcher::game::iidx };

WEAK vftable_entry<bool(void*)> dan_select_flow_attach{ 0x1404CC1B8, 13, launcher::game::iidx };
WEAK vftable_entry<void(void*)> dan_select_flow_detach{ 0x1404CC1B8, 14, launcher::game::iidx };
WEAK vftable_entry<bool(void*)> dan_select_scene_attach{ 0x1404CC1F8, 13, launcher::game::iidx };
WEAK vftable_entry<void(void*)> dan_select_scene_detach{ 0x1404CC1F8, 14, launcher::game::iidx };

WEAK vftable_entry<void(StageResultDrawFrame_s*, void*)> stage_result_draw_frame_init{ 0x1404CB160, 1, launcher::game::iidx };
WEAK vftable_entry<void(StageResultDrawFrame_s*, void*)> stage_result_draw_frame_init{ 0x1404CB188, 1, launcher::game::iidx };

namespace EacnetRequestPost
{
WEAK symbol<bool(eacnet_request_post_s*, void*, void*)> OnRequestPropertyExported{ 0x140302E30 };
WEAK symbol<bool(eacnet_request_post_s*, void*, void*)> OnRequestPropertyExported{ 0x140302FE0 };
}

WEAK symbol<IDirect3DDevice9Ex*> d3d9ex_device{ 0x142AAD3F8 };
WEAK symbol<IDirect3DDevice9*> d3d9_device{ 0x142AAD3F8 };
WEAK symbol<HWND*> main_hwnd{ 0x142AAD3E8 };
WEAK symbol<IDirect3DDevice9Ex*> d3d9ex_device{ 0x142AAD408 };
WEAK symbol<IDirect3DDevice9*> d3d9_device{ 0x142AAD408 };
WEAK symbol<HWND*> main_hwnd{ 0x142AAD400 };
WEAK symbol<const char> infinitas_id{ 0x141AC5494 };
WEAK symbol<const char> game_version{ 0x141AC54E3 };

WEAK symbol<bool> show_options{ 0x141ACE104 };
WEAK symbol<bool> show_consume_window{ 0x1405EFA60 };
WEAK symbol<int> selected_gauge_type{ 0x141ACE138 };
WEAK symbol<bool> show_options{ 0x141ACE00F };
WEAK symbol<bool> show_consume_window{ 0x1405EFAA0 };
WEAK symbol<int> selected_gauge_type{ 0x141ACE128 };

WEAK symbol<state_t> state{ 0x1426A15A4 };
WEAK symbol<state_t> state{ 0x1426A15D4 };
}

0 comments on commit ee15452

Please sign in to comment.