Add partial PSEUDO unlock patch

This commit is contained in:
nastys
2019-10-13 15:12:45 +02:00
parent 5b0e662e6b
commit 798d57d860
3 changed files with 16 additions and 1 deletions
@@ -174,6 +174,9 @@ ConfigOptionBase* optionsArray[] = {
new NumericOption(L"Enhanced_Stage_Manager", PATCHES_SECTION, CONFIG_FILE, L"Number of stages:", L"Set the number of stages (0 = default).", 0, 0, INT_MAX),
new OptionMetaSpacer(8),
new BooleanOption(L"unlock_pseudo", PATCHES_SECTION, CONFIG_FILE, L"Unlock PSEUDO modules (incomplete)", L"Lets you play any PV with any performer.\n(incomplete, recommended modules will default to Miku)", false, false),
new OptionMetaSpacer(8),
new BooleanOption(L"hardware_slider", PATCHES_SECTION, CONFIG_FILE, L"Use Hardware Slider", L"Enable this if using a real arcade slider.\n(set the slider to port COM11)", false, false),
new OptionMetaSpacer(8),
@@ -140,6 +140,7 @@ void ApplyPatches() {
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 nUnlockPseudo = GetPrivateProfileIntW(L"patches", L"unlock_pseudo", FALSE, CONFIG_FILE);
auto nHardwareSlider = GetPrivateProfileIntW(L"patches", L"hardware_slider", FALSE, CONFIG_FILE);
// Replace the hardcoded videos with MP4s, if they exist
@@ -324,6 +325,15 @@ void ApplyPatches() {
printf("[Patches] Enhanced Stage Manager enabled\n");
}
// Unlock PSEUDO modules (which will all default to Miku, unless we also patch them to match the first performer)
if (nUnlockPseudo)
{
InjectCode((void*)0x0000000140A21770, { 0x56, 0x4F, 0x43, 0x41, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
InjectCode((void*)0x0000000140A21780, { 0x56, 0x4F, 0x43, 0x41, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
InjectCode((void*)0x0000000140A21790, { 0x56, 0x4F, 0x43, 0x41, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
InjectCode((void*)0x0000000140A217A0, { 0x56, 0x4F, 0x43, 0x41, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
InjectCode((void*)0x0000000140A217B0, { 0x56, 0x4F, 0x43, 0x41, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
}
// The original slider update needs to run for hardware sliders to work -- only patch it when using emulation
if (!nHardwareSlider)
{