diff --git a/source-code/data/plugins/config.ini b/source-code/data/plugins/config.ini index 9ba0f58..797902d 100644 --- a/source-code/data/plugins/config.ini +++ b/source-code/data/plugins/config.ini @@ -37,6 +37,10 @@ MP4_Movies=1 Hide_Volume=0 #Disable the error banner No_Error=1 +#Freeze the timer +No_Timer_Sprite=1 +#Disable the timer sprite +No_Timer_Sprite=1 #Allow using a real arcade slider attached to COM11 Hardware_Slider=0 #Enhanced Stage Manager (sets a custom number of stages; "stage_manager" should be disabled in "components.ini") diff --git a/source-code/source/plugins/Launcher/framework.h b/source-code/source/plugins/Launcher/framework.h index 3fba0d3..0326ad0 100644 --- a/source-code/source/plugins/Launcher/framework.h +++ b/source-code/source/plugins/Launcher/framework.h @@ -58,7 +58,7 @@ LPCWSTR PLAYERDATA_SECTION = L"playerdata"; LPCWSTR KEYCONFIG_SECTION = L"keyconfig"; int nSkipLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"skip", FALSE, CONFIG_FILE); -int nNoGPUDialog = GetPrivateProfileIntW(LAUNCHER_SECTION, L"no_gpu_diaog", FALSE, CONFIG_FILE); +int nNoGPUDialog = GetPrivateProfileIntW(LAUNCHER_SECTION, L"no_gpu_dialog", FALSE, CONFIG_FILE); std::vector getScreenModes() { @@ -165,6 +165,8 @@ ConfigOptionBase* optionsArray[] = { new BooleanOption(L"hide_pv_watermark", PATCHES_SECTION, CONFIG_FILE, L"Hide PV Watermark", L"Hide the watermark that's usually shown in PV viewing mode.", false, false), new BooleanOption(L"no_lyrics", PATCHES_SECTION, CONFIG_FILE, L"Disable Lyrics", L"Disable showing lyrics.", false, false), new BooleanOption(L"no_error", PATCHES_SECTION, CONFIG_FILE, L"Disable Error Banner", L"Disable the error banner on the attract screen.", true, false), + new BooleanOption(L"no_timer", PATCHES_SECTION, CONFIG_FILE, L"Freeze Timer", L"Disable the timer.", true, false), + new BooleanOption(L"no_timer_sprite", PATCHES_SECTION, CONFIG_FILE, L"Disable Timer Sprite", L"Disable the timer sprite.", true, false), new DropdownOption(L"status_icons", PATCHES_SECTION, CONFIG_FILE, L"Status Icons:", L"Set the state of card reader and network status icons.", 3, std::vector({ L"Default", L"Hidden", L"Error", L"OK", L"Partial OK" })), new OptionMetaSpacer(8), @@ -187,7 +189,7 @@ ConfigOptionBase* optionsArray[] = { new NumericOption(L"xinput_preferred", KEYCONFIG_SECTION, KEYCONFIG_FILE, L"XInput Controller Num:", L"Sets the preferred XInput controller.\nIf unavailable, the next connected controller is used.", 0, 0, 3), new OptionMetaSpacer(8), - new BooleanOption(L"no_gpu_diaog", LAUNCHER_SECTION, CONFIG_FILE, L"Disable GPU Warning", L"Disables the warning dialog for unsupported GPUs.", L"", false), + new BooleanOption(L"no_gpu_dialog", LAUNCHER_SECTION, CONFIG_FILE, L"Disable GPU Warning", L"Disables the warning dialog for unsupported GPUs.", L"", false), new StringOption(L"command_line", LAUNCHER_SECTION, CONFIG_FILE, L"Command Line:", L"Allows setting command line parameters for the game when using the launcher.\nDisabling the launcher will bypass this.", L"", false), }; @@ -221,8 +223,6 @@ ConfigOptionBase* componentsArray[] = { new BooleanOption(L"touch_slider_emulator", COMPONENTS_SECTION, COMPONENTS_FILE, L"Slider Emulator", L"Emulates slider through keyboard and/or mouse.", false, true), new BooleanOption(L"touch_panel_emulator", COMPONENTS_SECTION, COMPONENTS_FILE, L"Touch Panel Emulator", L"Emulates touch panel through mouse.", false, true), - new BooleanOption(L"sys_timer", COMPONENTS_SECTION, COMPONENTS_FILE, L"Timer Freeze", L"Freezes the PV select timer at 39 seconds.", false, true), - new BooleanOption(L"player_data_manager", COMPONENTS_SECTION, COMPONENTS_FILE, L"Player Data Manager", L"Loads user-defined values into the PlayerData struct.\nRequired for modules and game mode modifiers.", false, true), new BooleanOption(L"frame_rate_manager", COMPONENTS_SECTION, COMPONENTS_FILE, L"Frame Rate Manager", L"Adjusts animations to the correct speed at different frame rates.\nOnly needed when FPS isn't locket at 60.", false, true), diff --git a/source-code/source/plugins/Patches/dllmain.cpp b/source-code/source/plugins/Patches/dllmain.cpp index e7fa9c0..254e75c 100644 --- a/source-code/source/plugins/Patches/dllmain.cpp +++ b/source-code/source/plugins/Patches/dllmain.cpp @@ -100,8 +100,6 @@ void ApplyPatches() { // Force Hide IDs { (void*)0x00000001409A5918, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { (void*)0x00000001409A5928, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - // Freeze mode selection timer - { (void*)0x0000000140566B9E, { 0x90, 0x90, 0x90 } }, // fix TouchReaction // get some more space by optimizing this code for size { (void*)0x00000001406A1FE2,{ 0x7E } }, // MOVQ XMM0,qword ptr [0x168 + RSP] (change to MOVQ) @@ -138,6 +136,8 @@ void ApplyPatches() { auto nNoMovies = GetPrivateProfileIntW(L"patches", L"no_movies", FALSE, CONFIG_FILE); auto nMP4Movies = GetPrivateProfileIntW(L"patches", L"mp4_movies", FALSE, CONFIG_FILE); auto nNoError = GetPrivateProfileIntW(L"patches", L"no_error", FALSE, CONFIG_FILE); + auto nNoTimer = GetPrivateProfileIntW(L"patches", L"no_timer", TRUE, CONFIG_FILE); + auto nNoTimerSprite = GetPrivateProfileIntW(L"patches", L"no_timer_sprite", TRUE, CONFIG_FILE); auto nEStageManager = GetPrivateProfileIntW(L"patches", L"enhanced_stage_manager", 0, CONFIG_FILE); auto nEStageManagerEncore = GetPrivateProfileIntW(L"patches", L"enhanced_stage_manager_encore", TRUE, CONFIG_FILE); auto nHardwareSlider = GetPrivateProfileIntW(L"patches", L"hardware_slider", FALSE, CONFIG_FILE); @@ -276,6 +276,22 @@ void ApplyPatches() { InjectCode((void*)0x00000001403B9E9B, { 0x90, 0x90 }); printf("[Patches] Errors Banner disabled\n"); } + // Disable timer + if (nNoTimer) + { + // Freeze mode selection timer + InjectCode((void*)0x0000000140566B9E, { 0x90, 0x90, 0x90 }); + + // Freeze PV selection timer + InjectCode((void*)0x00000001405BDFBF, { 0x90, 0x90, 0x90, 0x90 }); + } + // Disable timer sprite + if (nNoTimerSprite) + { + InjectCode((void*)0x00000001409C075D, { 0x72 }); // time_loop -> time_roop + InjectCode((void*)0x0000000140A3D3F5, { 0x6E }); // time_in -> time_nn + InjectCode((void*)0x0000000140A3D3FF, { 0x70 }); // time_out -> time_oup + } // Enhanced Stage Manager if (nEStageManager > 0) { diff --git a/source-code/source/plugins/TLAC/Components/ComponentsManager.cpp b/source-code/source/plugins/TLAC/Components/ComponentsManager.cpp index 8bac123..a5599c8 100644 --- a/source-code/source/plugins/TLAC/Components/ComponentsManager.cpp +++ b/source-code/source/plugins/TLAC/Components/ComponentsManager.cpp @@ -4,7 +4,6 @@ #include "Input/InputEmulator.h" #include "Input/TouchSliderEmulator.h" #include "Input/TouchPanelEmulator.h" -#include "SysTimer.h" #include "PlayerDataManager.h" #include "FrameRateManager.h" #include "FastLoader.h" @@ -37,7 +36,6 @@ namespace TLAC::Components new InputEmulator(), new TouchSliderEmulator(), new TouchPanelEmulator(), - new SysTimer(), new PlayerDataManager(), new FrameRateManager(), new FastLoader(), diff --git a/source-code/source/plugins/TLAC/Components/SysTimer.cpp b/source-code/source/plugins/TLAC/Components/SysTimer.cpp deleted file mode 100644 index def84db..0000000 --- a/source-code/source/plugins/TLAC/Components/SysTimer.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "SysTimer.h" -#include "../Constants.h" - -namespace TLAC::Components -{ - SysTimer::SysTimer() - { - } - - SysTimer::~SysTimer() - { - } - - const char* SysTimer::GetDisplayName() - { - return "sys_timer"; - } - - void SysTimer::Initialize(ComponentsManager*) - { - selPvTime = GetSysTimePtr((void*)SEL_PV_TIME_ADDRESS); - } - - void SysTimer::Update() - { - // account for the decrement that occures during this frame - *selPvTime = SEL_PV_FREEZE_TIME * SYS_TIME_FACTOR + 1; - } - - int* SysTimer::GetSysTimePtr(void *address) - { - return (int*)address; - } -} diff --git a/source-code/source/plugins/TLAC/Components/SysTimer.h b/source-code/source/plugins/TLAC/Components/SysTimer.h deleted file mode 100644 index 5f78dff..0000000 --- a/source-code/source/plugins/TLAC/Components/SysTimer.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once -#include "EmulatorComponent.h" - -namespace TLAC::Components -{ - class SysTimer : public EmulatorComponent - { - const int SYS_TIME_FACTOR = 60; - const int SEL_PV_FREEZE_TIME = 39; - - public: - SysTimer(); - ~SysTimer(); - - virtual const char* GetDisplayName() override; - - virtual void Initialize(ComponentsManager*) override; - virtual void Update() override; - - private: - int* selPvTime; - int* GetSysTimePtr(void *address); - }; -} - diff --git a/source-code/source/plugins/TLAC/TLAC.vcxproj b/source-code/source/plugins/TLAC/TLAC.vcxproj index d09047a..09bfdd7 100644 --- a/source-code/source/plugins/TLAC/TLAC.vcxproj +++ b/source-code/source/plugins/TLAC/TLAC.vcxproj @@ -197,7 +197,6 @@ - @@ -250,7 +249,6 @@ - diff --git a/source-code/source/plugins/TLAC/TLAC.vcxproj.filters b/source-code/source/plugins/TLAC/TLAC.vcxproj.filters index ad474b4..d95a19b 100644 --- a/source-code/source/plugins/TLAC/TLAC.vcxproj.filters +++ b/source-code/source/plugins/TLAC/TLAC.vcxproj.filters @@ -54,9 +54,6 @@ Header Files - - Header Files - Header Files @@ -230,9 +227,6 @@ Source Files - - Source Files - Source Files