Compare commits

...

2 Commits

Author SHA1 Message Date
c0d52b2b82 rework xml 2023-09-24 23:28:19 +02:00
ce9d18099f fix omnimix song cursor, fix pfree pplist crash 2023-09-24 23:24:48 +02:00
2 changed files with 37 additions and 12 deletions

View File

@ -20,14 +20,6 @@
<!-- Force skip menu and long note tutorials without a card -->
<skip_tutorials __type="bool">0</skip_tutorials>
<!-- Default option behavior -->
<!-- Force full options by default (useful when no numpad is available) -->
<force_full_opt __type="bool">0</force_full_opt>
<!-- Guide SE defaults to OFF (useful for Battle mode) -->
<guidese_off __type="bool">0</guidese_off>
<!-- All net Ojama default to OFF (useful for Local mode) -->
<netvs_off __type="bool">0</netvs_off>
<!-- Stage management -->
<!-- Premium free (unlimited stages per credit) -->
<pfree __type="bool">0</pfree>
@ -49,22 +41,27 @@
<!-- Display offset adjust value on score result screen (requires hidden_is_offset, won't be sent over network) -->
<show_offset __type="bool">0</show_offset>
<!-- Hi-speed -->
<!-- Option patches -->
<!-- Auto set hi-speed to match previously set BPM (0: off, 1: target higher bpm on soflan, 2: target lower bpm on soflan, 3: target longest bpm on soflan) -->
<hispeed_auto __type="u8">0</hispeed_auto>
<!-- Default target BPM, 0 to disable (requires hispeed_auto) -->
<!-- Note: target is still updated when manually changing hi-speed (except soflan and "?" charts) -->
<hispeed_default_bpm __type="u16">0</hispeed_default_bpm>
<!-- Gauge options -->
<!-- IIDX-like hard gauge (start with full gauge, instant fail if gauge drops to 0) -->
<!-- Gauge details: increment: +0.1% for each cool/great/good (like spicy gauge), decrement: -9% for each bad, or -4.5% if gauge <=30% ) -->
<iidx_hard_gauge __type="bool">0</iidx_hard_gauge>
<!-- Force full options by default (useful when no numpad is available) -->
<force_full_opt __type="bool">0</force_full_opt>
<!-- Guide SE defaults to OFF (useful for Battle mode) -->
<guidese_off __type="bool">0</guidese_off>
<!-- All net Ojama default to OFF (useful for Local mode) -->
<netvs_off __type="bool">0</netvs_off>
<!-- Result screen display patches -->
<!-- Display details on result screen by default (no need to press yellow button) -->
<!-- Details on result screen by default (no need to press yellow button) -->
<show_details __type="bool">0</show_details>
<!-- Display fast/slow counter on result screen even on judge+ off/lost/panic -->
<!-- Fast/Slow counter on result screen even on judge+ off/lost/panic -->
<show_fast_slow __type="bool">0</show_fast_slow>
<!-- Input polling -->

View File

@ -2227,6 +2227,13 @@ pfree_apply:
MH_CreateHook((LPVOID)patch_addr, (LPVOID)hook_pfree_pplist_inject,
(void **)&real_pfree_pplist_inject);
}
/* prevent crash when playing only customs in a credit */
{
if (!find_and_patch_hex(g_game_dll_fn, "\x0F\x8E\x5C\xFF\xFF\xFF\xEB\x04", 8, 6, "\x90\x90", 2))
{
LOG("popnhax: pfree: cannot patch end list pointer\n");
}
}
/* restore pp_list pointer so that it is freed at end of credit */
{
@ -4908,6 +4915,26 @@ void hook_pp_increment_compute()
__asm("jmp %0\n"::"m"(real_pp_increment_compute));
}
static bool patch_db_fix_cursor(){
/* bypass song id sanitizer */
{
if (!find_and_patch_hex(g_game_dll_fn, "\x0F\xB7\x06\x66\x85\xC0\x7C\x1C", 8, -5, "\x90\x90\x90\x90\x90", 5))
{
LOG("popnhax: patch_db: cannot fix cursor\n");
return false;
}
}
/* skip 2nd check */
{
if (!find_and_patch_hex(g_game_dll_fn, "\x0F\xB7\x06\x66\x85\xC0\x7C\x1C", 8, 0x1A, "\xEB", 1))
{
LOG("popnhax: patch_db: cannot fix cursor (2)\n");
return false;
}
}
return true;
}
bool patch_db_power_points()
{
DWORD dllSize = 0;
@ -5308,6 +5335,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
LOG("popnhax: patching songdb\n");
/* must be called after force_datecode */
patch_db_power_points();
patch_db_fix_cursor();
patch_database(config.force_unlocks);
}