2.6.2: maximum hand size 100X, pv customization toggle, fix typo in Credits, option for disabling custom refract/refrect res, version in-game

This commit is contained in:
nastys
2021-09-29 18:13:11 +02:00
parent b511bf64c3
commit bc925fd514
7 changed files with 176 additions and 157 deletions
+3 -1
View File
@@ -46,6 +46,8 @@ No_Scrolling_SFX=0
Enhanced_Stage_Manager=0
#Use encore stages or not
Enhanced_Stage_Manager_Encore=1
#Enable PV Customization below
Enable_PV_Customization=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
@@ -54,7 +56,7 @@ Force_Expressions=0
Force_Look=0
#Disable hand scaling
No_Hand_Scaling=0
#Default hand size -- 0-10000=default, 12200=PDA
#Default hand size -- 0-10000=default, 12200=PDA, 1000000=maximum
Default_Hand_Size_uint=0
#Sing missed notes
Sing_Missed=0
@@ -33,6 +33,7 @@ Panel^ MakePanel(int width, int height, std::vector<ConfigOptionBase*> &cfg, Too
#define RESOPT_MATCH_WINDOW_TEXT "Match Window"
#define RESOPT_MATCH_SCREEN_TEXT "Match Screen"
#define RESOPT_DEFAULT_TEXT "Default"
ref class ComboboxValidation
{
@@ -81,7 +82,7 @@ public:
{
System::String^ text = cb->Text;
if (text == RESOPT_MATCH_WINDOW_TEXT || text == RESOPT_MATCH_SCREEN_TEXT)
if (text == RESOPT_MATCH_WINDOW_TEXT || text == RESOPT_MATCH_SCREEN_TEXT || text == RESOPT_DEFAULT_TEXT)
return;
cli::array<Char>^ digitsarray = gcnew cli::array<Char>{ L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9' };
@@ -888,7 +889,8 @@ enum ResolutionOptionOpts
{
RESOPT_NONE,
RESOPT_INCLUDE_MATCH_WINDOW,
RESOPT_INCLUDE_MATCH_SCREEN
RESOPT_INCLUDE_MATCH_SCREEN,
RESOPT_INCLUDE_DEFAULT
};
class ResolutionOption : public ConfigOptionBase
@@ -932,6 +934,8 @@ public:
combobox->Items->Add(RESOPT_MATCH_WINDOW_TEXT);
else if (_opts & RESOPT_INCLUDE_MATCH_SCREEN)
combobox->Items->Add(RESOPT_MATCH_SCREEN_TEXT);
else if (_opts & RESOPT_INCLUDE_DEFAULT)
combobox->Items->Add(RESOPT_DEFAULT_TEXT);
for (resolution& choice : _valueResolutions) {
tempSysStr = Convert::ToInt32(choice.width).ToString() + L"x" + Convert::ToInt32(choice.height).ToString();
@@ -954,6 +958,8 @@ public:
combobox->Text = RESOPT_MATCH_WINDOW_TEXT;
else if (_opts & RESOPT_INCLUDE_MATCH_SCREEN)
combobox->Text = RESOPT_MATCH_SCREEN_TEXT;
else if (_opts & RESOPT_INCLUDE_DEFAULT)
combobox->Text = RESOPT_DEFAULT_TEXT;
}
else {
tempSysStr = Convert::ToInt32(width).ToString() + L"x" + Convert::ToInt32(height).ToString();
@@ -1014,7 +1020,7 @@ public:
tempSysStr = ((ComboBox^)ComboBox::FromHandle(mainControlHandle))->Text;
// Match window/screen -> -1x-1
if (tempSysStr == RESOPT_MATCH_WINDOW_TEXT || tempSysStr == RESOPT_MATCH_SCREEN_TEXT)
if (tempSysStr == RESOPT_MATCH_WINDOW_TEXT || tempSysStr == RESOPT_MATCH_SCREEN_TEXT || tempSysStr == RESOPT_DEFAULT_TEXT)
tempSysStr = "-1x-1";
resolutionArray = tempSysStr->Split('x');
@@ -172,8 +172,8 @@ ConfigOptionBase* graphicsArray[] = {
new DropdownOption(L"MAG", GRAPHICS_SECTION, CONFIG_FILE, L"Filter:", L"Image filter.\n\nBilinear: default filter\nNearest-neighbour: sharpest, but blocky\nSharpen: sharp filter\nCone: smooth filter", 0, std::vector<LPCWSTR>({ L"Bilinear", L"Nearest-neighbour", L"Sharpen", L"Cone" })),
new BooleanOption(L"DOF", GRAPHICS_SECTION, CONFIG_FILE, L"Depth of Field", L"Blurs the background. Disable for better performance.", true, false),
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>({resolution(256,256), resolution(512,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096)}), true, (ResolutionOptionOpts)0),
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>({resolution(256,256), resolution(512,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096)}), true, (ResolutionOptionOpts)0),
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(-1, -1), std::vector<resolution>({resolution(256,256), resolution(512,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096)}), true, RESOPT_INCLUDE_DEFAULT),
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(-1, -1), std::vector<resolution>({resolution(256,256), resolution(512,256), resolution(512,512), resolution(1024,1024), resolution(2048,2048), resolution(4096,4096)}), true, RESOPT_INCLUDE_DEFAULT),
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 BooleanOption(L"punchthrough", GRAPHICS_SECTION, CONFIG_FILE, L"Transparent Meshes", L"Show transparent meshes.", true, false),
@@ -219,11 +219,12 @@ ConfigOptionBase* optionsArray[] = {
new OptionMetaSpacer(8),
new OptionMetaSectionLabel(L"PV Customization"),
new BooleanOption(L"enable_pv_customization", PATCHES_SECTION, CONFIG_FILE, L"Enable PV Customization", L"Enable the options below.", 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 NumericOption(L"default_hand_size_uint", PATCHES_SECTION, CONFIG_FILE, L"Default Hand Size:", L"0-10000: default\n12200: PDA", 0, 0, INT_MAX),
new NumericOption(L"default_hand_size_uint", PATCHES_SECTION, CONFIG_FILE, L"Default Hand Size:", L"0-10000: default\n12200: PDA\n1000000: maximum", 0, 0, 1000000),
new OptionMetaSeparator(),
new OptionMetaSpacer(8),
+1 -1
View File
@@ -938,7 +938,7 @@ private: System::Windows::Forms::Button^ button_Wiki;
this->MaximizeBox = false;
this->Name = L"ui";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"PD Launcher (2.6b)";
this->Text = L"PD Launcher (2.6.2)";
this->TransparencyKey = System::Drawing::Color::Magenta;
this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &ui::Ui_FormClosing);
this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this, &ui::Ui_FormClosed);
+1 -1
View File
@@ -120,7 +120,7 @@
<data name="creditsTextBox.Text" xml:space="preserve">
<value>PD Loader is intended for educational purposes only; not for piracy.
Users should possess a legally-obtained dump of the game to use this software.
Please check your local laws/regulataions to verify the legality of tampering
Please check your local laws/regulations to verify the legality of tampering
with and dumping data from protected arcade machine hardware.
Project Contributors:
@@ -166,7 +166,8 @@ class PatchApplier710 : public PatchApplier {
if (nPDLoaderText && !nHideFreeplay)
{
InjectCode((void*)0x00000001409F61F0, { 0x50, 0x44, 0x20, 0x4C, 0x6F, 0x61, 0x64, 0x65, 0x72, 0x20, 0x00 });
InjectCode((void*)0x00000001409F61F0, { 0x50, 0x44, 0x20, 0x4C, 0x6F, 0x61, 0x64, 0x65, 0x72, 0x20, 0x00, 0x20,
'2', '.', '6', '.', '2'});
printf("[Patches] Show PD Loader text\n");
}
}
@@ -373,31 +374,121 @@ class PatchApplier710 : public PatchApplier {
{
InjectCode((void*)0x00000001405C84B3, { 0x90, 0x90, 0x90, 0x90, 0x90 });
}
// Disable hand scaling
if (nNoHandScaling)
if (nEnablePvCustomization)
{
InjectCode((void*)0x0000000140120709, { 0xE9, 0x82, 0x0A, 0x00 });
}
// Default hand size
if (nDefaultHandSize >= 10000)
{
printf("[Patches] Changing default hand size...\n");
const float num = (float)nDefaultHandSize / 10000.0;
DWORD oldProtect;
float* addr1 = (float*)(0x140506B59);
float* addr2 = (float*)(0x140506B60);
/*float* addr3 = (float*)(0x140506B67);
float* addr4 = (float*)(0x140506B71);*/
VirtualProtect(addr1, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
VirtualProtect(addr2, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
/*VirtualProtect(addr3, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
VirtualProtect(addr4, 4, PAGE_EXECUTE_READWRITE, &oldProtect);*/
*addr1 = *addr2 /*= *addr3 = *addr4*/ = num;
VirtualProtect(addr1, 4, oldProtect, nullptr);
VirtualProtect(addr2, 4, oldProtect, nullptr);
/*VirtualProtect(addr3, 4, oldProtect, nullptr);
VirtualProtect(addr4, 4, oldProtect, nullptr);*/
printf("[Patches] New default hand size: %f\n", num);
// Disable hand scaling
if (nNoHandScaling)
{
InjectCode((void*)0x0000000140120709, { 0xE9, 0x82, 0x0A, 0x00 });
}
// Default hand size
if (nDefaultHandSize >= 10000 && nDefaultHandSize <= 1000000)
{
printf("[Patches] Changing default hand size...\n");
const float num = (float)nDefaultHandSize / 10000.0;
DWORD oldProtect;
float* addr1 = (float*)(0x140506B59);
float* addr2 = (float*)(0x140506B60);
/*float* addr3 = (float*)(0x140506B67);
float* addr4 = (float*)(0x140506B71);*/
VirtualProtect(addr1, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
VirtualProtect(addr2, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
/*VirtualProtect(addr3, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
VirtualProtect(addr4, 4, PAGE_EXECUTE_READWRITE, &oldProtect);*/
*addr1 = *addr2 /*= *addr3 = *addr4*/ = num;
VirtualProtect(addr1, 4, oldProtect, nullptr);
VirtualProtect(addr2, 4, oldProtect, nullptr);
/*VirtualProtect(addr3, 4, oldProtect, nullptr);
VirtualProtect(addr4, 4, oldProtect, nullptr);*/
printf("[Patches] New default hand size: %f\n", num);
}
// Force mouth animations
{
if (nForceMouth == 1) // PDA
{
printf("[Patches] Forcing PDA mouth...\n");
int* mouth_table = (int*)(0x1409A1DC0);
DWORD oldProtect;
VirtualProtect(mouth_table, 44, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 11; i++)
{
mouth_table[i]++;
}
VirtualProtect(mouth_table, 44, oldProtect, nullptr);
printf("[Patches] PDA mouth forced\n");
}
else if (nForceMouth == 2) // FT
{
printf("[Patches] Forcing FT mouth...\n");
int* mouth_table_oldid = (int*)(0x1409A1E1C);
DWORD oldProtect;
VirtualProtect(mouth_table_oldid, 44, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 11; i++)
{
mouth_table_oldid[i]--;
}
VirtualProtect(mouth_table_oldid, 44, oldProtect, nullptr);
printf("[Patches] FT mouth forced\n");
}
}
// Force expressions
{
if (nForceExpressions == 1) // PDA
{
printf("[Patches] Forcing PDA expressions...\n");
int* exp_table = (int*)(0x140A21900);
DWORD oldProtect;
VirtualProtect(exp_table, 104, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 26; i++)
{
exp_table[i] += 2;
}
VirtualProtect(exp_table, 104, oldProtect, nullptr);
printf("[Patches] PDA expressions forced\n");
}
else if (nForceExpressions == 2) // FT
{
printf("[Patches] Forcing FT expressions...\n");
int* exp_table_oldid = (int*)(0x140A219D0);
DWORD oldProtect;
VirtualProtect(exp_table_oldid, 104, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 26; i++)
{
exp_table_oldid[i] -= 2;
}
VirtualProtect(exp_table_oldid, 104, oldProtect, nullptr);
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 < 9; i++)
{
look_table_oldid[i]--;
}
VirtualProtect(look_table_oldid, 36, oldProtect, nullptr);
printf("[Patches] FT look forced\n");
}
}
}
// Sing missed notes
if (nSingMissed)
@@ -406,93 +497,6 @@ class PatchApplier710 : public PatchApplier {
// Breaks border:
// InjectCode((void*)0x140109096, { 0xEB });
}
// Force mouth animations
{
if (nForceMouth == 1) // PDA
{
printf("[Patches] Forcing PDA mouth...\n");
int* mouth_table = (int*)(0x1409A1DC0);
DWORD oldProtect;
VirtualProtect(mouth_table, 44, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 11; i++)
{
mouth_table[i]++;
}
VirtualProtect(mouth_table, 44, oldProtect, nullptr);
printf("[Patches] PDA mouth forced\n");
}
else if (nForceMouth == 2) // FT
{
printf("[Patches] Forcing FT mouth...\n");
int* mouth_table_oldid = (int*)(0x1409A1E1C);
DWORD oldProtect;
VirtualProtect(mouth_table_oldid, 44, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 11; i++)
{
mouth_table_oldid[i]--;
}
VirtualProtect(mouth_table_oldid, 44, oldProtect, nullptr);
printf("[Patches] FT mouth forced\n");
}
}
// Force expressions
{
if (nForceExpressions == 1) // PDA
{
printf("[Patches] Forcing PDA expressions...\n");
int* exp_table = (int*)(0x140A21900);
DWORD oldProtect;
VirtualProtect(exp_table, 104, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 26; i++)
{
exp_table[i] += 2;
}
VirtualProtect(exp_table, 104, oldProtect, nullptr);
printf("[Patches] PDA expressions forced\n");
}
else if (nForceExpressions == 2) // FT
{
printf("[Patches] Forcing FT expressions...\n");
int* exp_table_oldid = (int*)(0x140A219D0);
DWORD oldProtect;
VirtualProtect(exp_table_oldid, 104, PAGE_EXECUTE_READWRITE, &oldProtect);
for (int i = 0; i < 26; i++)
{
exp_table_oldid[i] -= 2;
}
VirtualProtect(exp_table_oldid, 104, oldProtect, nullptr);
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 < 9; i++)
{
look_table_oldid[i]--;
}
VirtualProtect(look_table_oldid, 36, oldProtect, nullptr);
printf("[Patches] FT look forced\n");
}
}
// NPR1
{
if (nNpr1 == 1) // force on
@@ -645,48 +649,53 @@ class PatchApplier710 : public PatchApplier {
}
// patch refract and reflect buffer sizes
// no need to really check anything before injecting, because reinjecting defaults is fine
InjectCode((void*)(0x140a24424), std::vector<uint8_t>((uint8_t*)&nRefractResWidth, (uint8_t*)((int64_t)&nRefractResWidth + 4)));
InjectCode((void*)(0x140a24428), std::vector<uint8_t>((uint8_t*)&nRefractResHeight, (uint8_t*)((int64_t)&nRefractResHeight + 4)));
InjectCode((void*)(0x140a2443c), std::vector<uint8_t>((uint8_t*)&nReflectResWidth, (uint8_t*)((int64_t)&nReflectResWidth + 4)));
InjectCode((void*)(0x140a24440), std::vector<uint8_t>((uint8_t*)&nReflectResHeight, (uint8_t*)((int64_t)&nReflectResHeight + 4)));
// for large reflect resolutions, adjust blur effect amount to not lose the effect
// scaling is based on a 1024 width instead of the original 512px
// because we don't wanna make it too blurry when just being used to smooth jaggies
if (nReflectResWidth >= 2048)
if (nRefractResWidth > 0 && nRefractResHeight > 0)
{
int blurAmount = nReflectResWidth / 1024;
InjectCode((void*)(0x140a24424), std::vector<uint8_t>((uint8_t*)&nRefractResWidth, (uint8_t*)((int64_t)&nRefractResWidth + 4)));
InjectCode((void*)(0x140a24428), std::vector<uint8_t>((uint8_t*)&nRefractResHeight, (uint8_t*)((int64_t)&nRefractResHeight + 4)));
}
if (nReflectResWidth > 0 && nReflectResHeight > 0)
{
InjectCode((void*)(0x140a2443c), std::vector<uint8_t>((uint8_t*)&nReflectResWidth, (uint8_t*)((int64_t)&nReflectResWidth + 4)));
InjectCode((void*)(0x140a24440), std::vector<uint8_t>((uint8_t*)&nReflectResHeight, (uint8_t*)((int64_t)&nReflectResHeight + 4)));
// for large reflect resolutions, adjust blur effect amount to not lose the effect
// scaling is based on a 1024 width instead of the original 512px
// because we don't wanna make it too blurry when just being used to smooth jaggies
if (nReflectResWidth >= 2048)
{
int blurAmount = nReflectResWidth / 1024;
// multiply blur setting
// ECX has blur amount, EDX has blur type
InjectCode((void*)(0x140503000), { 0x89, 0x15, 0x3a, 0xa3, 0xca, 0x00 }); // MOV dword ptr [0x1411ad340], EDX
InjectCode((void*)(0x140503006), { 0xb8 }); // MOV EAX, blurAmount
InjectCode((void*)(0x140503007), std::vector<uint8_t>((uint8_t*)&blurAmount, (uint8_t*)((int64_t)&blurAmount + 4)));
InjectCode((void*)(0x14050300b), { 0xf7, 0xe1 }); // MUL (EDX:EAX,)ECX
InjectCode((void*)(0x14050300d), { 0xeb, 0x09 }); // JMP 0x140503018
InjectCode((void*)(0x140503018), { 0x89, 0x05, 0x1e, 0xa3, 0xca, 0x00 }); // MOV dword ptr [0x1411ad33c], EAX
InjectCode((void*)(0x14050301e), { 0xc3 }); // RET
// multiply blur setting
// ECX has blur amount, EDX has blur type
InjectCode((void*)(0x140503000), { 0x89, 0x15, 0x3a, 0xa3, 0xca, 0x00 }); // MOV dword ptr [0x1411ad340], EDX
InjectCode((void*)(0x140503006), { 0xb8 }); // MOV EAX, blurAmount
InjectCode((void*)(0x140503007), std::vector<uint8_t>((uint8_t*)&blurAmount, (uint8_t*)((int64_t)&blurAmount + 4)));
InjectCode((void*)(0x14050300b), { 0xf7, 0xe1 }); // MUL (EDX:EAX,)ECX
InjectCode((void*)(0x14050300d), { 0xeb, 0x09 }); // JMP 0x140503018
InjectCode((void*)(0x140503018), { 0x89, 0x05, 0x1e, 0xa3, 0xca, 0x00 }); // MOV dword ptr [0x1411ad33c], EAX
InjectCode((void*)(0x14050301e), { 0xc3 }); // RET
// divide dwgui blur amount getting
// RDX gets type, RCX gets amount
InjectCode((void*)(0x140502910), { 0x48, 0x85, 0xd2 }); // TEST RDX, RDX
InjectCode((void*)(0x140502913), { 0x74, 0x08 }); // JZ 0x14050291d
InjectCode((void*)(0x140502915), { 0x8b, 0x05, 0x25, 0xaa, 0xca, 0x00 }); // MOV EAX, dword ptr [0x1411ad340]
InjectCode((void*)(0x14050291b), { 0x89, 0x02 }); // MOV dword ptr [RDX], EAX
// divide dwgui blur amount getting
// RDX gets type, RCX gets amount
InjectCode((void*)(0x140502910), { 0x48, 0x85, 0xd2 }); // TEST RDX, RDX
InjectCode((void*)(0x140502913), { 0x74, 0x08 }); // JZ 0x14050291d
InjectCode((void*)(0x140502915), { 0x8b, 0x05, 0x25, 0xaa, 0xca, 0x00 }); // MOV EAX, dword ptr [0x1411ad340]
InjectCode((void*)(0x14050291b), { 0x89, 0x02 }); // MOV dword ptr [RDX], EAX
InjectCode((void*)(0x14050291d), { 0x48, 0x85, 0xc9 }); // TEST RCX, RCX
InjectCode((void*)(0x140502920), { 0x74, 0x2d }); // JZ 0x14050294f
InjectCode((void*)(0x140502922), { 0x8b, 0x05, 0x14, 0xaa, 0xca, 0x00 }); // MOV EAX, dword ptr [0x1411ad33c]
InjectCode((void*)(0x14050291d), { 0x48, 0x85, 0xc9 }); // TEST RCX, RCX
InjectCode((void*)(0x140502920), { 0x74, 0x2d }); // JZ 0x14050294f
InjectCode((void*)(0x140502922), { 0x8b, 0x05, 0x14, 0xaa, 0xca, 0x00 }); // MOV EAX, dword ptr [0x1411ad33c]
InjectCode((void*)(0x140502928), { 0xeb, 0x0d }); // JMP 0x140502937
InjectCode((void*)(0x140502937), { 0x49, 0xc7, 0xc0 }); // MOV R8, blurAmount
InjectCode((void*)(0x14050293a), std::vector<uint8_t>((uint8_t*)&blurAmount, (uint8_t*)((int64_t)&blurAmount + 4)));
InjectCode((void*)(0x14050293e), { 0xeb, 0x08 }); // JMP 0x140502948
InjectCode((void*)(0x140502948), { 0x31, 0xd2 }); // XOR EDX,EDX
InjectCode((void*)(0x14050294a), { 0x49, 0xf7, 0xf0 }); // DIV (EDX:EAX,)R8
InjectCode((void*)(0x140502928), { 0xeb, 0x0d }); // JMP 0x140502937
InjectCode((void*)(0x140502937), { 0x49, 0xc7, 0xc0 }); // MOV R8, blurAmount
InjectCode((void*)(0x14050293a), std::vector<uint8_t>((uint8_t*)&blurAmount, (uint8_t*)((int64_t)&blurAmount + 4)));
InjectCode((void*)(0x14050293e), { 0xeb, 0x08 }); // JMP 0x140502948
InjectCode((void*)(0x140502948), { 0x31, 0xd2 }); // XOR EDX,EDX
InjectCode((void*)(0x14050294a), { 0x49, 0xf7, 0xf0 }); // DIV (EDX:EAX,)R8
InjectCode((void*)(0x14050294d), { 0x89, 0x01 }); // MOV dword ptr [RCX], EAX
InjectCode((void*)(0x14050294f), { 0xc3 }); // RET
InjectCode((void*)(0x14050294d), { 0x89, 0x01 }); // MOV dword ptr [RCX], EAX
InjectCode((void*)(0x14050294f), { 0xc3 }); // RET
}
}
// lag compensation
@@ -109,6 +109,7 @@ auto nStereo = GetPrivateProfileIntW(L"patches", L"stereo", TRUE, CONFIG_FILE);
auto nCustomPatches = GetPrivateProfileIntW(L"patches", L"custom_patches", TRUE, CONFIG_FILE);
auto nQuickStart = GetPrivateProfileIntW(L"patches", L"quick_start", 1, CONFIG_FILE);
auto nNoScrollingSfx = GetPrivateProfileIntW(L"patches", L"no_scrolling_sfx", FALSE, CONFIG_FILE);
auto nEnablePvCustomization = GetPrivateProfileIntW(L"patches", L"enable_pv_customization", FALSE, CONFIG_FILE);
auto nNoHandScaling = GetPrivateProfileIntW(L"patches", L"no_hand_scaling", FALSE, CONFIG_FILE);
auto nDefaultHandSize = GetPrivateProfileIntW(L"patches", L"default_hand_size_uint", 0, CONFIG_FILE);
auto nSingMissed = GetPrivateProfileIntW(L"patches", L"sing_missed", FALSE, CONFIG_FILE);