Force PDA/FT look
This commit is contained in:
@@ -42,12 +42,14 @@ No_Scrolling_SFX=0
|
||||
Enhanced_Stage_Manager=0
|
||||
#Use encore stages or not
|
||||
Enhanced_Stage_Manager_Encore=1
|
||||
#Disable hand scaling
|
||||
No_Hand_Scaling=0
|
||||
#Change the mouth animations -- 0=default, 1=force PDA, 2=force FT
|
||||
Force_Mouth=0
|
||||
#Change the expressions -- 0=default, 1=force PDA, 2=force FT
|
||||
Force_Expressions=0
|
||||
#Change the look animations -- 0=default, 1=force PDA, 2=force FT
|
||||
Force_Look=0
|
||||
#Disable hand scaling
|
||||
No_Hand_Scaling=0
|
||||
#Hide the volume and SE control buttons
|
||||
Hide_Volume=0
|
||||
#Remove the photo controls during PV playback
|
||||
|
||||
@@ -173,9 +173,10 @@ ConfigOptionBase* optionsArray[] = {
|
||||
new BooleanOption(L"Enhanced_Stage_Manager_Encore", PATCHES_SECTION, CONFIG_FILE, L"Encore", L"Enable encore stages.", true, false),
|
||||
new OptionMetaSpacer(8),
|
||||
|
||||
new BooleanOption(L"no_hand_scaling", PATCHES_SECTION, CONFIG_FILE, L"No Hand Scaling", L"Disable hand scaling.", false, false),
|
||||
new DropdownOption(L"force_mouth", PATCHES_SECTION, CONFIG_FILE, L"Mouth Type:", L"Change the mouth animations.", 0, std::vector<LPCWSTR>({ L"Default", L"Force PDA", L"Force FT" })),
|
||||
new DropdownOption(L"force_expressions", PATCHES_SECTION, CONFIG_FILE, L"Expression Type:", L"Change the expressions.", 0, std::vector<LPCWSTR>({ L"Default", L"Force PDA", L"Force FT" })),
|
||||
new DropdownOption(L"force_look", PATCHES_SECTION, CONFIG_FILE, L"Look Type:", L"Change the look animations.", 0, std::vector<LPCWSTR>({ 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 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),
|
||||
|
||||
@@ -229,6 +229,7 @@ void ApplyPatches() {
|
||||
auto nNoHandScaling = GetPrivateProfileIntW(L"patches", L"no_hand_scaling", 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);
|
||||
|
||||
std::string version_string = std::to_string(game_version);
|
||||
version_string.insert(version_string.begin()+1, '.');
|
||||
@@ -859,6 +860,36 @@ void ApplyPatches() {
|
||||
printf("[Patches] FT expressions forced\n");
|
||||
}
|
||||
}
|
||||
// Force look animations
|
||||
{
|
||||
if (nForceLook == 1) // PDA
|
||||
{
|
||||
printf("[Patches] Forcing PDA look...\n");
|
||||
int* look_table = (int*)(0x1409A1D70);
|
||||
DWORD oldProtect;
|
||||
VirtualProtect(look_table, 36, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
look_table[i]++;
|
||||
}
|
||||
VirtualProtect(look_table, 36, oldProtect, nullptr);
|
||||
printf("[Patches] PDA look forced\n");
|
||||
}
|
||||
else if (nForceLook == 2) // FT
|
||||
{
|
||||
printf("[Patches] Forcing FT look...\n");
|
||||
int* look_table_oldid = (int*)(0x1409A1D9C);
|
||||
DWORD oldProtect;
|
||||
VirtualProtect(look_table_oldid, 36, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||
for (int i = 0; i < 11; i++)
|
||||
{
|
||||
look_table_oldid[i]--;
|
||||
}
|
||||
VirtualProtect(look_table_oldid, 36, oldProtect, nullptr);
|
||||
printf("[Patches] FT look forced\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user