From 541d84c40827bc91c201829a07d2ee9d888a223f Mon Sep 17 00:00:00 2001 From: nastys <@> Date: Tue, 11 Aug 2020 06:20:47 +0200 Subject: [PATCH] [Patches] Sing Missed; add custom colour to custom FREE PLAY text example (thanks to Stewie1.0) --- source-code/data/patches/custom_freeplay_text_example.p | 6 ++++-- source-code/data/plugins/config.ini | 3 +++ source-code/source/plugins/Launcher/framework.h | 1 + source-code/source/plugins/Patches/dllmain.cpp | 7 +++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/source-code/data/patches/custom_freeplay_text_example.p b/source-code/data/patches/custom_freeplay_text_example.p index 062ff13..db7f65d 100644 --- a/source-code/data/patches/custom_freeplay_text_example.p +++ b/source-code/data/patches/custom_freeplay_text_example.p @@ -1,4 +1,3 @@ -IGNORE # Enable FREE PLAY // Just in case it's disabled... @1403BABEA:75 // ...enable it. @@ -6,6 +5,9 @@ IGNORE # Custom FREE PLAY text 1409F61F0:!Miku\0 +# Custom text colour +1401964A2:00 FF FF 7F + // Syntax: // "#" console comment // "//" hidden comment @@ -13,4 +15,4 @@ IGNORE // ":" address:bytes (hex) // " " byte byte // ":!" address:!string (escape characters require PD Loader 2.1+) -// "IGNORE" skip patch file \ No newline at end of file +// "IGNORE" skip patch file (deprecated) diff --git a/source-code/data/plugins/config.ini b/source-code/data/plugins/config.ini index 299d86e..72fc273 100644 --- a/source-code/data/plugins/config.ini +++ b/source-code/data/plugins/config.ini @@ -52,6 +52,8 @@ Force_Look=0 No_Hand_Scaling=0 #Default hand size -- -1=default, 12200=PDA Default_Hand_Size=-1 +#Sing missed notes +Sing_Missed=0 #Hide the volume and SE control buttons Hide_Volume=0 #Remove the photo controls during PV playback @@ -143,3 +145,4 @@ r.Height=1080 [plugins] DivaWig.dva=0 DSCRemote.dva=0 +custom_freeplay_text_example.p=0 diff --git a/source-code/source/plugins/Launcher/framework.h b/source-code/source/plugins/Launcher/framework.h index a358d82..8b5d168 100644 --- a/source-code/source/plugins/Launcher/framework.h +++ b/source-code/source/plugins/Launcher/framework.h @@ -178,6 +178,7 @@ ConfigOptionBase* optionsArray[] = { new DropdownOption(L"force_look", PATCHES_SECTION, CONFIG_FILE, L"Look Type:", L"Change the look animations.", 0, std::vector({ L"Default", L"Force PDA", L"Force FT" })), new BooleanOption(L"no_hand_scaling", PATCHES_SECTION, CONFIG_FILE, L"No Hand Scaling", L"Disable hand scaling.", false, false), new NumericOption(L"default_hand_size", PATCHES_SECTION, CONFIG_FILE, L"Default Hand Size:", L"-1: default\n12200: PDA", -1, -1, INT_MAX), + new BooleanOption(L"sing_missed", PATCHES_SECTION, CONFIG_FILE, L"Sing Missed", L"Sing missed notes.", false, false), new OptionMetaSpacer(8), new BooleanOption(L"hide_volume", PATCHES_SECTION, CONFIG_FILE, L"Hide Volume Buttons", L"Hide the volume and SE control buttons.", false, false), diff --git a/source-code/source/plugins/Patches/dllmain.cpp b/source-code/source/plugins/Patches/dllmain.cpp index 00f6f70..f92f23f 100644 --- a/source-code/source/plugins/Patches/dllmain.cpp +++ b/source-code/source/plugins/Patches/dllmain.cpp @@ -230,6 +230,7 @@ void ApplyPatches() { auto nNoScrollingSfx = GetPrivateProfileIntW(L"patches", L"no_scrolling_sfx", FALSE, CONFIG_FILE); auto nNoHandScaling = GetPrivateProfileIntW(L"patches", L"no_hand_scaling", FALSE, CONFIG_FILE); auto nDefaultHandSize = GetPrivateProfileIntW(L"patches", L"default_hand_size", -1, CONFIG_FILE); + auto nSingMissed = GetPrivateProfileIntW(L"patches", L"sing_missed", FALSE, CONFIG_FILE); auto nForceMouth = GetPrivateProfileIntW(L"patches", L"force_mouth", 0, CONFIG_FILE); auto nForceExpressions = GetPrivateProfileIntW(L"patches", L"force_expressions", 0, CONFIG_FILE); auto nForceLook = GetPrivateProfileIntW(L"patches", L"force_look", 0, CONFIG_FILE); @@ -835,6 +836,12 @@ void ApplyPatches() { VirtualProtect(addr4, 4, oldProtect, nullptr);*/ printf("[Patches] New default hand size: %f\n", num); } + // Sing missed notes + if (nSingMissed) + { + InjectCode((void*)0x140109044, { 0xEB }); + InjectCode((void*)0x140109096, { 0xEB }); + } // Force mouth animations { if (nForceMouth == 1) // PDA