diff --git a/source-code/data/plugins/config_template.bin b/source-code/data/plugins/config_template.bin index 47d0520..bf7e73c 100644 --- a/source-code/data/plugins/config_template.bin +++ b/source-code/data/plugins/config_template.bin @@ -17,12 +17,6 @@ Skip=0 No_GPU_Dialog=0 # Sets the dark colour scheme in the launcher. Dark_Launcher=0 -# Enables acrylic blur in the launcher on Windows 10 20H2 or later. -Acrylic_Blur=0 -#Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing -OpenGL_Patch_A=0 -#Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing -OpenGL_Patch_B=0 # Command line arguments Command_Line= # Launches divahook.bat/start.bat intead of diva.exe. @@ -90,8 +84,6 @@ Card=0 Hardware_Slider=0 #Enable custom patches Custom_Patches=1 -#Prevent data deletion -Prevent_Data_Deletion=0 [Graphics] # Lag Compensation diff --git a/source-code/data/ram/databank_template/PvList0_SBZV_7.10_64103_1636921101.dat b/source-code/data/ram/databank_template_v2/PvList0_SBZV_7.10_64103_1636921101.dat similarity index 100% rename from source-code/data/ram/databank_template/PvList0_SBZV_7.10_64103_1636921101.dat rename to source-code/data/ram/databank_template_v2/PvList0_SBZV_7.10_64103_1636921101.dat diff --git a/source-code/data/ram/databank_template/PvList1_SBZV_7.10_26572_1636921101.dat b/source-code/data/ram/databank_template_v2/PvList1_SBZV_7.10_26572_1636921101.dat similarity index 100% rename from source-code/data/ram/databank_template/PvList1_SBZV_7.10_26572_1636921101.dat rename to source-code/data/ram/databank_template_v2/PvList1_SBZV_7.10_26572_1636921101.dat diff --git a/source-code/data/ram/databank_template/PvList2_SBZV_7.10_38035_1636921101.dat b/source-code/data/ram/databank_template_v2/PvList2_SBZV_7.10_38035_1636921101.dat similarity index 100% rename from source-code/data/ram/databank_template/PvList2_SBZV_7.10_38035_1636921101.dat rename to source-code/data/ram/databank_template_v2/PvList2_SBZV_7.10_38035_1636921101.dat diff --git a/source-code/data/ram/databank_template/PvList3_SBZV_7.10_48722_1636921101.dat b/source-code/data/ram/databank_template_v2/PvList3_SBZV_7.10_48722_1636921101.dat similarity index 100% rename from source-code/data/ram/databank_template/PvList3_SBZV_7.10_48722_1636921101.dat rename to source-code/data/ram/databank_template_v2/PvList3_SBZV_7.10_48722_1636921101.dat diff --git a/source-code/data/ram/databank_template/PvList4_SBZV_7.10_5341_1636921101.dat b/source-code/data/ram/databank_template_v2/PvList4_SBZV_7.10_5341_1636921101.dat similarity index 100% rename from source-code/data/ram/databank_template/PvList4_SBZV_7.10_5341_1636921101.dat rename to source-code/data/ram/databank_template_v2/PvList4_SBZV_7.10_5341_1636921101.dat diff --git a/source-code/source/PD-Loader/dllmain.cpp b/source-code/source/PD-Loader/dllmain.cpp index 5fa9c2a..4f2f9fc 100644 --- a/source-code/source/PD-Loader/dllmain.cpp +++ b/source-code/source/PD-Loader/dllmain.cpp @@ -798,7 +798,7 @@ void Init() stream.close(); } - const std::filesystem::path databank_template = L"ram\\databank_template"; + const std::filesystem::path databank_template = L"ram\\databank_template_v2"; const std::filesystem::path databank = L"ram\\databank"; if (!std::filesystem::exists(databank)&&std::filesystem::exists(databank_template)) { diff --git a/source-code/source/plugins/Launcher/framework.h b/source-code/source/plugins/Launcher/framework.h index 8717c50..82b2963 100644 --- a/source-code/source/plugins/Launcher/framework.h +++ b/source-code/source/plugins/Launcher/framework.h @@ -174,8 +174,9 @@ ConfigOptionBase* graphicsArray[] = { new BooleanOption(L"reflections", GRAPHICS_SECTION, CONFIG_FILE, L"Reflections", L"Enable or disable reflections.", true, false), new ResolutionOption(L"reflect_res_width", L"reflect_res_height", GRAPHICS_SECTION, CONFIG_FILE, L"Reflection Res:", L"Sets the reflection buffer resolution (instead of 512x256).", resolution(512, 256), std::vector({resolution(256,256), resolution(512,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096)}), true, RESOPT_NONE), new ResolutionOption(L"refract_res_width", L"refract_res_height", GRAPHICS_SECTION, CONFIG_FILE, L"Refraction Res:", L"Sets the refraction buffer resolution (instead of 512x256).", resolution(512, 256), std::vector({resolution(256,256), resolution(512,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096)}), true, RESOPT_NONE), - new NumericOption(L"gamma", GRAPHICS_SECTION, CONFIG_FILE, L"Gamma:", L"Increase to darken shadows.\nSet to 125 for a console-like experience.\n\nDefault: 0 or 100", 100, 0, 200), new BooleanOption(L"shadows", GRAPHICS_SECTION, CONFIG_FILE, L"Shadows", L"Enable or disable shadows.", true, false), + new ResolutionOption(L"shadow_res_width", L"shadow_res_height", GRAPHICS_SECTION, CONFIG_FILE, L"Shadow Res:", L"Sets the shadow buffer resolution (instead of 2048x2048).", resolution(2048, 2048), std::vector({resolution(256,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096), resolution(8192,8192)}), true, RESOPT_NONE), + new NumericOption(L"gamma", GRAPHICS_SECTION, CONFIG_FILE, L"Gamma:", L"Increase to darken shadows.\nSet to 125 for a console-like experience.\n\nDefault: 0 or 100", 100, 0, 200), new BooleanOption(L"punchthrough", GRAPHICS_SECTION, CONFIG_FILE, L"Transparent Meshes", L"Show transparent meshes.", true, false), new BooleanOption(L"glare", GRAPHICS_SECTION, CONFIG_FILE, L"Glare", L"Enable or disable glare.", true, false), new BooleanOption(L"shader", GRAPHICS_SECTION, CONFIG_FILE, L"Shader", L"Enable or disable high-quality shaders.", true, false), @@ -232,7 +233,7 @@ ConfigOptionBase* optionsArray[] = { new BooleanOption(L"hide_volume", PATCHES_SECTION, CONFIG_FILE, L"Hide Volume Buttons", L"Hide the volume and SE control buttons.", false, false), new BooleanOption(L"no_pv_ui", PATCHES_SECTION, CONFIG_FILE, L"Disable PV UI", L"Remove the photo controls during PV playback.", false, false), 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 DropdownOption(L"status_icons", PATCHES_SECTION, CONFIG_FILE, L"Top-Right Corner 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 DropdownOption(L"status_icons", PATCHES_SECTION, CONFIG_FILE, L"Top-Right Network 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 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"hide_freeplay", PATCHES_SECTION, CONFIG_FILE, L"Hide \"FREE PLAY\"/\"CREDIT(S)\"", L"Hide the \"FREE PLAY\"/\"CREDIT(S)\" text.", false, false), @@ -250,21 +251,21 @@ ConfigOptionBase* optionsArray[] = { new OptionMetaSeparator(), new OptionMetaSpacer(8), - new OptionMetaSectionLabel(L"Advanced Compatibility"), - new BooleanOption(L"opengl_patch_a", LAUNCHER_SECTION, CONFIG_FILE, L"OpenGL Patch A", L"Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing.", false, false), - new BooleanOption(L"opengl_patch_b", LAUNCHER_SECTION, CONFIG_FILE, L"OpenGL Patch B", L"Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing.", false, false), - new OptionMetaSeparator(), - new OptionMetaSpacer(8), + //new OptionMetaSectionLabel(L"Advanced Compatibility"), + //new BooleanOption(L"opengl_patch_a", LAUNCHER_SECTION, CONFIG_FILE, L"OpenGL Patch A", L"Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing.", false, false), + //new BooleanOption(L"opengl_patch_b", LAUNCHER_SECTION, CONFIG_FILE, L"OpenGL Patch B", L"Ignores some OpenGL-related errors. Don't use both patches at the same time unless you're know what you're doing.", false, false), + //new OptionMetaSeparator(), + //new OptionMetaSpacer(8), new OptionMetaSectionLabel(L"Loader"), new BooleanOption(L"custom_patches", PATCHES_SECTION, CONFIG_FILE, L"Enable Custom Patches", L"Enables all custom patches.", true, false), - new BooleanOption(L"prevent_data_deletion", PATCHES_SECTION, CONFIG_FILE, L"Prevent Data Deletion", L"Prevents the game from deleting files.", false, false), + //new BooleanOption(L"prevent_data_deletion", PATCHES_SECTION, CONFIG_FILE, L"Prevent Data Deletion", L"Prevents the game from deleting files.", false, false), new OptionMetaSeparator(), new OptionMetaSpacer(8), new OptionMetaSectionLabel(L"Launcher"), new BooleanOption(L"dark_launcher", LAUNCHER_SECTION, CONFIG_FILE, L"Dark Launcher", L"Sets the dark colour scheme in the launcher.", false, false), - new BooleanOption(L"acrylic_blur", LAUNCHER_SECTION, CONFIG_FILE, L"Acrylic Blur", L"Enables acrylic blur in the launcher on Windows 10 20H2 or later.", false, false), + //new BooleanOption(L"acrylic_blur", LAUNCHER_SECTION, CONFIG_FILE, L"Acrylic Blur", L"Enables acrylic blur in the launcher on Windows 10 20H2 or later.", false, false), new BooleanOption(L"no_gpu_dialog", LAUNCHER_SECTION, CONFIG_FILE, L"Disable GPU Warning", L"Disables the warning dialog for unsupported GPUs.", false, false), //new BooleanOption(L"ignore_exe_checksum", PATCHES_SECTION, CONFIG_FILE, L"Ignore exe checksum", L"Use at your own risk.", false, 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), diff --git a/source-code/source/plugins/Launcher/ui.h b/source-code/source/plugins/Launcher/ui.h index 1fe244c..abd56c8 100644 --- a/source-code/source/plugins/Launcher/ui.h +++ b/source-code/source/plugins/Launcher/ui.h @@ -395,9 +395,6 @@ namespace Launcher { void updateStyle() { int nDarkLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"dark_launcher", FALSE, CONFIG_FILE); - int nAcrylicLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"acrylic_blur", FALSE, CONFIG_FILE); - - bool useAcrylic = nAcrylicLauncher && setBlur(hWnd, AccentState::ACCENT_ENABLE_ACRYLICBLURBEHIND); Color colourBg, colourBg2, colourFg; @@ -416,22 +413,10 @@ namespace Launcher { colourBg2 = Color::FromArgb(242, 242, 242); } - if (useAcrylic) - { - this->button_Discord->BackColor = colourBg2; - this->button_github->BackColor = colourBg2; - this->button_Wiki->BackColor = colourBg2; - colourBg2 = Color::FromArgb(255, 0, 255); - } - else - { - setBlur(hWnd, AccentState::ACCENT_DISABLED); - - this->button_Discord->BackColor = Color::Transparent; - this->button_github->BackColor = Color::Transparent; - this->button_Wiki->BackColor = Color::Transparent; - } + this->button_Discord->BackColor = Color::Transparent; + this->button_github->BackColor = Color::Transparent; + this->button_Wiki->BackColor = Color::Transparent; this->tabPage_Resolution->BackColor = colourBg; this->tabPage_Resolution->ForeColor = colourFg; diff --git a/source-code/source/plugins/Patches/PatchApplier600.h b/source-code/source/plugins/Patches/PatchApplier600.h index 6115595..c5376f1 100644 --- a/source-code/source/plugins/Patches/PatchApplier600.h +++ b/source-code/source/plugins/Patches/PatchApplier600.h @@ -308,16 +308,16 @@ class PatchApplier600 : public PatchApplier { printf("[Patches] Enhanced Stage Manager enabled\n"); } // OpenGL Patches - if (nOGLPatchA) - { - // (call cs:glGetError) -> (xor eax, eax); (nop); (nop); (nop); (nop); - InjectCode((void*)0x000000014067842D, { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 }); - } - if (nOGLPatchB) - { - // (js loc_14069BC32) -> (nop)... - InjectCode((void*)0x0000000140676D04, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - } + //if (nOGLPatchA) + //{ + // // (call cs:glGetError) -> (xor eax, eax); (nop); (nop); (nop); (nop); + // InjectCode((void*)0x000000014067842D, { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 }); + //} + //if (nOGLPatchB) + //{ + // // (js loc_14069BC32) -> (nop)... + // InjectCode((void*)0x0000000140676D04, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + //} // Unlock PSEUDO modules (which will all default to Miku, unless we also patch them to match the first performer) if (nUnlockPseudo) { diff --git a/source-code/source/plugins/Patches/PatchApplier710.h b/source-code/source/plugins/Patches/PatchApplier710.h index 1b4290d..4bdb678 100644 --- a/source-code/source/plugins/Patches/PatchApplier710.h +++ b/source-code/source/plugins/Patches/PatchApplier710.h @@ -325,18 +325,20 @@ class PatchApplier710 : public PatchApplier { ESM[2] = nEStageManagerEncore; printf("[Patches] Enhanced Stage Manager enabled\n"); + } - // OpenGL Patches - if (nOGLPatchA) - { - // (call cs:glGetError) -> (xor eax, eax); (nop); (nop); (nop); (nop); - InjectCode((void*)0x000000014069D21D, { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 }); - } - if (nOGLPatchB) - { - // (js loc_14069BC32) -> (nop)... - InjectCode((void*)0x000000014069BAF4, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - } + //// OpenGL Patches + //if (nOGLPatchA) + //{ + // // (call cs:glGetError) -> (xor eax, eax); (nop); (nop); (nop); (nop); + // InjectCode((void*)0x000000014069D21D, { 0x31, 0xC0, 0x90, 0x90, 0x90, 0x90 }); + //} + //if (nOGLPatchB) + //{ + // // (js loc_14069BC32) -> (nop)... + // InjectCode((void*)0x000000014069BAF4, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + //} + // // Unlock PSEUDO modules (which will all default to Miku, unless we also patch them to match the first performer) if (nUnlockPseudo) { @@ -596,58 +598,59 @@ class PatchApplier710 : public PatchApplier { InjectCode((void*)0x140A07920, { 0x00 }); // ignore objset } - // Prevent data deletion - if (nNoDelete) - { - InjectCode((void*)(0x1406FEF80 + 0x1DB), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407113F0 + 0x13C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140712270 + 0x6C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140712580 + 0x4C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140712580 + 0x7C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140713470 + 0x104), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407135B0 + 0x102), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407135B0 + 0x135), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407135B0 + 0x232), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140713810 + 0x3E8), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140713D00 + 0x677), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x9C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x1D2), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x218), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x22A), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140720910 + 0x25C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140723EE0 + 0xEC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140870DE0 + 0x4), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1406FEF80 + 0x1DB), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407113F0 + 0x13C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140712270 + 0x6E), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140712580 + 0x4C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140712580 + 0x7C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140713470 + 0x104), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407135B0 + 0x102), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407135B0 + 0x135), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407135B0 + 0x232), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140713810 + 0x3E8), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140713D00 + 0x677), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x9C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x1D2), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x218), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x22A), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140720910 + 0x25C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140723EE0 + 0xEC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407168A0 + 0x9C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140870DE0 + 0x4), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x14081B6A4), { 0xC3 }); - InjectCode((void*)(0x1406E1090 + 0x43C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140718250 + 0x176), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140718750 + 0xC9), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407193E0 + 0xFC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1406E1090 + 0x43C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140718250 + 0x176), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x140718750 + 0xC9), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x1407193E0 + 0xFC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); - InjectCode((void*)(0x14081B67A), { 0xC3 }); - } + //// Prevent data deletion + //if (nNoDelete) + //{ + // InjectCode((void*)(0x1406FEF80 + 0x1DB), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407113F0 + 0x13C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140712270 + 0x6C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140712580 + 0x4C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140712580 + 0x7C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140713470 + 0x104), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407135B0 + 0x102), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407135B0 + 0x135), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407135B0 + 0x232), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140713810 + 0x3E8), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140713D00 + 0x677), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x9C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x1D2), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x218), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x22A), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140720910 + 0x25C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140723EE0 + 0xEC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140870DE0 + 0x4), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1406FEF80 + 0x1DB), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407113F0 + 0x13C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140712270 + 0x6E), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140712580 + 0x4C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140712580 + 0x7C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140713470 + 0x104), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407135B0 + 0x102), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407135B0 + 0x135), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407135B0 + 0x232), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140713810 + 0x3E8), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140713D00 + 0x677), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x9C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x1D2), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x218), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x22A), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140720910 + 0x25C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140723EE0 + 0xEC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407168A0 + 0x9C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140870DE0 + 0x4), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x14081B6A4), { 0xC3 }); + + // InjectCode((void*)(0x1406E1090 + 0x43C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140718250 + 0x176), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140718750 + 0xC9), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407193E0 + 0xFC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1406E1090 + 0x43C), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140718250 + 0x176), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x140718750 + 0xC9), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x1407193E0 + 0xFC), { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); + // InjectCode((void*)(0x14081B67A), { 0xC3 }); + //} // patch refract and reflect buffer sizes if (nRefractResWidth != 512 || nRefractResHeight != 256) @@ -702,6 +705,13 @@ class PatchApplier710 : public PatchApplier { printf("[Patches] Reflection resolution patched.\n"); } + if (nShadowResWidth != 2048 || nShadowResHeight != 2048) + { + InjectUint((void*)(0x140A81E04), nShadowResHeight); + InjectUint((void*)(0x140A81E08), nShadowResWidth); + + printf("[Patches] Shadow resolution patched.\n"); + } // lag compensation if (nLagCompensation > 0 && nLagCompensation <= 500) diff --git a/source-code/source/plugins/Patches/framework.h b/source-code/source/plugins/Patches/framework.h index dfb9de3..6bfd676 100644 --- a/source-code/source/plugins/Patches/framework.h +++ b/source-code/source/plugins/Patches/framework.h @@ -47,6 +47,14 @@ void InjectCode(void* address, const std::vector data) VirtualProtect(address, byteCount, oldProtect, nullptr); } +void InjectUint(void* address, const uint32_t data) +{ + DWORD oldProtect; + VirtualProtect(address, 4, PAGE_EXECUTE_READWRITE, &oldProtect); + memcpy(address, &data, 4); + VirtualProtect(address, 4, oldProtect, nullptr); +} + // patchMovieExt will modify an extension to mp4 only if the file exists on disk as an mp4 void patchMovieExt(std::string moviefile, void* address) { @@ -98,8 +106,6 @@ auto nEStageManagerEncore = GetPrivateProfileIntW(L"patches", L"enhanced_stage_m auto nUnlockPseudo = GetPrivateProfileIntW(L"patches", L"unlock_pseudo", FALSE, CONFIG_FILE); auto nCard = GetPrivateProfileIntW(L"patches", L"card", TRUE, CONFIG_FILE); auto nHardwareSlider = GetPrivateProfileIntW(L"patches", L"hardware_slider", FALSE, CONFIG_FILE); -auto nOGLPatchA = GetPrivateProfileIntW(L"patches", L"opengl_patch_a", FALSE, CONFIG_FILE); -auto nOGLPatchB = GetPrivateProfileIntW(L"patches", L"opengl_patch_b", FALSE, CONFIG_FILE); auto nTAA = GetPrivateProfileIntW(L"graphics", L"taa", TRUE, CONFIG_FILE); auto nMLAA = GetPrivateProfileIntW(L"graphics", L"mlaa", TRUE, CONFIG_FILE); auto nDoF = GetPrivateProfileIntW(L"graphics", L"dof", TRUE, CONFIG_FILE); @@ -123,10 +129,11 @@ auto nPunchthrough = GetPrivateProfileIntW(L"graphics", L"punchthrough", TRUE, C auto nGlare = GetPrivateProfileIntW(L"graphics", L"glare", TRUE, CONFIG_FILE); auto nShader = GetPrivateProfileIntW(L"graphics", L"shader", TRUE, CONFIG_FILE); auto n2D = GetPrivateProfileIntW(L"graphics", L"2D", FALSE, CONFIG_FILE); -auto nNoDelete = GetPrivateProfileIntW(L"patches", L"prevent_data_deletion", FALSE, CONFIG_FILE); auto nReflectResWidth = GetPrivateProfileIntW(L"graphics", L"reflect_res_width", 512, CONFIG_FILE); auto nReflectResHeight = GetPrivateProfileIntW(L"graphics", L"reflect_res_height", 256, CONFIG_FILE); auto nRefractResWidth = GetPrivateProfileIntW(L"graphics", L"refract_res_width", 512, CONFIG_FILE); auto nRefractResHeight = GetPrivateProfileIntW(L"graphics", L"refract_res_height", 256, CONFIG_FILE); +auto nShadowResWidth = GetPrivateProfileIntW(L"graphics", L"shadow_res_width", 2048, CONFIG_FILE); +auto nShadowResHeight = GetPrivateProfileIntW(L"graphics", L"shadow_res_height", 2048, CONFIG_FILE); auto nLagCompensation = GetPrivateProfileIntW(L"graphics", L"lag_compensation", 0, CONFIG_FILE); auto nUseDivahookBat = GetPrivateProfileIntW(L"launcher", L"use_divahook_bat", FALSE, CONFIG_FILE); \ No newline at end of file