forked from Popn_Tools/popnhax
Compare commits
2 Commits
fc2fe581bd
...
c0d52b2b82
Author | SHA1 | Date | |
---|---|---|---|
c0d52b2b82 | |||
ce9d18099f |
21
dist/popnhax/popnhax.xml
vendored
21
dist/popnhax/popnhax.xml
vendored
@ -20,14 +20,6 @@
|
|||||||
<!-- Force skip menu and long note tutorials without a card -->
|
<!-- Force skip menu and long note tutorials without a card -->
|
||||||
<skip_tutorials __type="bool">0</skip_tutorials>
|
<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 -->
|
<!-- Stage management -->
|
||||||
<!-- Premium free (unlimited stages per credit) -->
|
<!-- Premium free (unlimited stages per credit) -->
|
||||||
<pfree __type="bool">0</pfree>
|
<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) -->
|
<!-- 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>
|
<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) -->
|
<!-- 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>
|
<hispeed_auto __type="u8">0</hispeed_auto>
|
||||||
<!-- Default target BPM, 0 to disable (requires 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) -->
|
<!-- Note: target is still updated when manually changing hi-speed (except soflan and "?" charts) -->
|
||||||
<hispeed_default_bpm __type="u16">0</hispeed_default_bpm>
|
<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) -->
|
<!-- 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% ) -->
|
<!-- 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>
|
<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 -->
|
<!-- 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>
|
<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>
|
<show_fast_slow __type="bool">0</show_fast_slow>
|
||||||
|
|
||||||
<!-- Input polling -->
|
<!-- Input polling -->
|
||||||
|
@ -2227,6 +2227,13 @@ pfree_apply:
|
|||||||
MH_CreateHook((LPVOID)patch_addr, (LPVOID)hook_pfree_pplist_inject,
|
MH_CreateHook((LPVOID)patch_addr, (LPVOID)hook_pfree_pplist_inject,
|
||||||
(void **)&real_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 */
|
/* 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));
|
__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()
|
bool patch_db_power_points()
|
||||||
{
|
{
|
||||||
DWORD dllSize = 0;
|
DWORD dllSize = 0;
|
||||||
@ -5308,6 +5335,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
|||||||
LOG("popnhax: patching songdb\n");
|
LOG("popnhax: patching songdb\n");
|
||||||
/* must be called after force_datecode */
|
/* must be called after force_datecode */
|
||||||
patch_db_power_points();
|
patch_db_power_points();
|
||||||
|
patch_db_fix_cursor();
|
||||||
patch_database(config.force_unlocks);
|
patch_database(config.force_unlocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user