mirror of
https://github.com/CrazyRedMachine/popnhax.git
synced 2024-11-24 06:10:12 +01:00
quick boot
This commit is contained in:
parent
9e2cd2b1e4
commit
70648336a3
3
dist/popnhax/popnhax.xml
vendored
3
dist/popnhax/popnhax.xml
vendored
@ -121,6 +121,9 @@
|
|||||||
<!-- PLEASE USE OFFLINE ONLY -->
|
<!-- PLEASE USE OFFLINE ONLY -->
|
||||||
<practice_mode __type="bool">0</practice_mode>
|
<practice_mode __type="bool">0</practice_mode>
|
||||||
|
|
||||||
|
<!-- Skip song checks before selftest on game launch -->
|
||||||
|
<quick_boot __type="bool">0</quick_boot>
|
||||||
|
|
||||||
<!-- ========================================================================================
|
<!-- ========================================================================================
|
||||||
DEBUG OPTIONS FOLLOW (GENERALLY SHOULD NOT BE CHANGED UNLESS YOU KNOW WHAT YOU'RE DOING)
|
DEBUG OPTIONS FOLLOW (GENERALLY SHOULD NOT BE CHANGED UNLESS YOU KNOW WHAT YOU'RE DOING)
|
||||||
======================================================================================== -->
|
======================================================================================== -->
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
struct popnhax_config {
|
struct popnhax_config {
|
||||||
uint8_t game_version;
|
uint8_t game_version;
|
||||||
|
bool quick_boot;
|
||||||
bool practice_mode;
|
bool practice_mode;
|
||||||
bool hidden_is_offset;
|
bool hidden_is_offset;
|
||||||
bool iidx_hard_gauge;
|
bool iidx_hard_gauge;
|
||||||
|
@ -100,6 +100,8 @@ uint8_t *add_string(uint8_t *input);
|
|||||||
struct popnhax_config config = {};
|
struct popnhax_config config = {};
|
||||||
|
|
||||||
PSMAP_BEGIN(config_psmap, static)
|
PSMAP_BEGIN(config_psmap, static)
|
||||||
|
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, quick_boot,
|
||||||
|
"/popnhax/quick_boot")
|
||||||
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, hidden_is_offset,
|
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, hidden_is_offset,
|
||||||
"/popnhax/hidden_is_offset")
|
"/popnhax/hidden_is_offset")
|
||||||
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, iidx_hard_gauge,
|
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, iidx_hard_gauge,
|
||||||
@ -8136,6 +8138,18 @@ static bool patch_afp_framerate(uint16_t fps)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool patch_quick_boot()
|
||||||
|
{
|
||||||
|
if ( !find_and_patch_hex(g_game_dll_fn, "\x8B\xF0\x8B\x16\x8B\x42\x04\x6A\x00", 9, -10, "\x90\x90\x90\x90\x90", 5) )
|
||||||
|
{
|
||||||
|
LOG("popnhax: quick_boot: cannot patch song checks\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG("popnhax: quick boot enabled\n");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
|
||||||
switch (ul_reason_for_call) {
|
switch (ul_reason_for_call) {
|
||||||
case DLL_PROCESS_ATTACH: {
|
case DLL_PROCESS_ATTACH: {
|
||||||
@ -8659,11 +8673,17 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
|||||||
{
|
{
|
||||||
patch_ex_attract( config.hispeed_auto ? config.hispeed_default_bpm : 0 );
|
patch_ex_attract( config.hispeed_auto ? config.hispeed_default_bpm : 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.attract_full)
|
if (config.attract_full)
|
||||||
{
|
{
|
||||||
patch_full_attract();
|
patch_full_attract();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.quick_boot)
|
||||||
|
{
|
||||||
|
patch_quick_boot();
|
||||||
|
}
|
||||||
|
|
||||||
if (config.time_rate)
|
if (config.time_rate)
|
||||||
patch_get_time(config.time_rate/100.);
|
patch_get_time(config.time_rate/100.);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user