forked from Popn_Tools/popnhax
fps uncapper (thanks pulse <3 )
This commit is contained in:
parent
fa7db1bd0e
commit
efc33bde8d
2
dist/popnhax/popnhax.xml
vendored
2
dist/popnhax/popnhax.xml
vendored
@ -43,6 +43,8 @@
|
||||
<keysound_offset __type="s8">0</keysound_offset>
|
||||
<!-- Adjust pop-kun and beam brightness (won't affect long popkuns) -->
|
||||
<beam_brightness __type="s8">0</beam_brightness>
|
||||
<!-- Disable the builtin frame limiter (smoother animations at 120fps+) -->
|
||||
<fps_uncap __type="bool">0</fps_uncap>
|
||||
<!-- Force the newly created buffers to be the same size as the original buffers -->
|
||||
<disable_expansions __type="bool">0</disable_expansions>
|
||||
<!-- Copy the new table information over top the old tables (automatically enables disable_expansions) -->
|
||||
|
@ -26,6 +26,7 @@ struct popnhax_config {
|
||||
char force_datecode[11];
|
||||
int8_t keysound_offset;
|
||||
int8_t beam_brightness;
|
||||
bool fps_uncap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@
|
||||
const char* g_game_dll_fn = NULL;
|
||||
const char* g_config_fn = NULL;
|
||||
|
||||
#define DEBUG 1
|
||||
#define DEBUG 0
|
||||
|
||||
#if DEBUG == 1
|
||||
double g_multiplier = 1.;
|
||||
@ -123,6 +123,8 @@ PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_S8, struct popnhax_config, keysound_offset,
|
||||
"/popnhax/keysound_offset")
|
||||
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_S8, struct popnhax_config, beam_brightness,
|
||||
"/popnhax/beam_brightness")
|
||||
PSMAP_MEMBER_REQ(PSMAP_PROPERTY_TYPE_BOOL, struct popnhax_config, fps_uncap,
|
||||
"/popnhax/fps_uncap")
|
||||
PSMAP_END
|
||||
|
||||
enum BufferIndexes {
|
||||
@ -1980,6 +1982,17 @@ static bool patch_hd_resolution(uint8_t mode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool patch_fps_uncap() {
|
||||
if (!patch_hex("\x7E\x07\xB9\x0C\x00\x00\x00\xEB\x09\x85\xC9", 11, 0, "\xEB\x1C", 2))
|
||||
{
|
||||
printf("popnhax: fps uncap: cannot find frame limiter\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
printf("popnhax: fps uncapped\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
void (*real_song_options)();
|
||||
void patch_song_options() {
|
||||
__asm("mov byte ptr[ecx+0xA15], 0\n");
|
||||
@ -2175,6 +2188,9 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
||||
if (config.force_full_opt)
|
||||
patch_options();
|
||||
|
||||
if (config.fps_uncap)
|
||||
patch_fps_uncap();
|
||||
|
||||
#if DEBUG == 1
|
||||
patch_get_time();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user