[TLAC] Backport wireframe and extra keyboard bindings
This commit is contained in:
@@ -63,6 +63,7 @@ MENU_CIRCLE = Spacebar
|
||||
|
||||
TOON = F9
|
||||
COIN = F10
|
||||
WIREFRAME = Backspace
|
||||
|
||||
# Touch Slider:
|
||||
LEFT_SIDE_SLIDE_LEFT = Q, Ds4_L_Stick_Left, XINPUT_LLEFT
|
||||
@@ -94,6 +95,7 @@ RIGHT_SIDE_SLIDE_RIGHT = O, Ds4_R_Stick_Right, XINPUT_RRIGHT
|
||||
|
||||
# - Special Keys
|
||||
# "Enter", "Tab", "Backspace", "Spacebar", "Insert", "Delete", "Home", "End", "PageUp", "PageDown", "Escape"
|
||||
# "Comma", "Period", "Colon", "Slash", "Tilde", "LeftBracket", "Backslash", "RightBracket", "SingleDoubleQuote", "OEM_8"
|
||||
|
||||
# --- MOUSE BUTTON NAMES: ---
|
||||
# "MouseLeft", "MouseMiddle", "MouseRight", "MouseX1", "MouseX2"
|
||||
|
||||
@@ -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.6.5a)";
|
||||
this->Text = L"PD Launcher -- TEST VERSION --";
|
||||
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);
|
||||
|
||||
@@ -149,7 +149,7 @@ class PatchApplier600 : public PatchApplier {
|
||||
|
||||
if (nPDLoaderText && !nHideFreeplay)
|
||||
{
|
||||
InjectCode((void*)0x00000001409BC188, { 0x50, 0x44, 0x20, 0x4C, 0x6F, 0x61, 0x64, 0x65, 0x72, 0x20, 0x00 });
|
||||
InjectCode((void*)0x00000001409BC188, { 'U', 'N', 'S', 'U', 'P', 'P', 'O', 'R', 'T', 'E', 'D', '\0' });
|
||||
printf("[Patches] Show PD Loader text\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class PatchApplier710 : public PatchApplier {
|
||||
if (nPDLoaderText && !nHideFreeplay)
|
||||
{
|
||||
InjectCode((void*)0x00000001409F61F0, { 0x50, 0x44, 0x20, 0x4C, 0x6F, 0x61, 0x64, 0x65, 0x72,
|
||||
0x20, 0x32, 0x2E, 0x36, 0x2E, 0x35, 0x61,
|
||||
0x20, 't', 'e', 's', 't',
|
||||
0x00});
|
||||
printf("[Patches] Show PD Loader text\n");
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace TLAC::Components
|
||||
|
||||
CoinBinding = new Binding();
|
||||
ToonBinding = new Binding();
|
||||
WireframeBinding = new Binding();
|
||||
|
||||
FileSystem::ConfigFile configFile(framework::GetModuleDirectory(), KEY_CONFIG_FILE_NAME);
|
||||
configFile.OpenRead();
|
||||
@@ -103,6 +104,7 @@ namespace TLAC::Components
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "MENU_CIRCLE", *MenuCircleBinding, { "D", "L", "Spacebar" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "TOON", *ToonBinding, { "F9" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "COIN", *CoinBinding, { "F10" });
|
||||
Config::BindConfigKeys(configFile.ConfigMap, "WIREFRAME", *WireframeBinding, { "Backspace" });
|
||||
|
||||
mouseScrollPvSelection = configFile.GetBooleanValue("mouse_scroll_pv_selection");
|
||||
}
|
||||
@@ -176,6 +178,9 @@ namespace TLAC::Components
|
||||
|
||||
if (ToonBinding->AnyTapped())
|
||||
toggleNpr1();
|
||||
|
||||
if (WireframeBinding->AnyTapped())
|
||||
toggleWireframe();
|
||||
}
|
||||
|
||||
HoldState InputEmulator::GetHoldState()
|
||||
@@ -467,4 +472,28 @@ namespace TLAC::Components
|
||||
printf("[TLAC] NPR1 restored\n");
|
||||
}
|
||||
}
|
||||
|
||||
void InputEmulator::toggleWireframe()
|
||||
{
|
||||
static bool wireframeEnabled = false;
|
||||
|
||||
if (!wireframeEnabled)
|
||||
{
|
||||
// inject samyuu's wireframe code
|
||||
InjectCode((void*)0x00000000140500BE6, { 0xBA, 0x01, 0x1B, 0x00, 0x00, // mov edx,00001B01
|
||||
0xB9, 0x08, 0x04, 0x00, 0x00, // mov ecx,00000408
|
||||
0xE8, 0xE1, 0x5A, 0x3B, 0x00, // call 1408B66D6
|
||||
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 });
|
||||
|
||||
wireframeEnabled = true;
|
||||
printf("[TLAC] Wireframe enabled\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
InjectCode((void*)0x00000000140500BE6, { 0xB9, 0x1C, 0x00, 0x00, 0x00, 0xE8, 0x30, 0x7C, 0xF3, 0xFF, 0xB9, 0x1B, 0x00, 0x00, 0x00, 0x8B, 0xD8, 0xE8, 0x24, 0x7C, 0xF3, 0xFF, 0xB9, 0x1A, 0x00, 0x00, 0x00 });
|
||||
|
||||
wireframeEnabled = false;
|
||||
printf("[TLAC] Wireframe disabled\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,7 @@ namespace TLAC::Components
|
||||
|
||||
Input::Binding* CoinBinding;
|
||||
Input::Binding* ToonBinding;
|
||||
Input::Binding* WireframeBinding;
|
||||
|
||||
InputEmulator();
|
||||
~InputEmulator();
|
||||
@@ -112,5 +113,6 @@ namespace TLAC::Components
|
||||
|
||||
void addCoin();
|
||||
void toggleNpr1();
|
||||
void toggleWireframe();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,9 +26,6 @@ namespace TLAC::Input::KeyConfig
|
||||
{ "Minus", VK_SUBTRACT },
|
||||
{ "Divide", VK_DIVIDE },
|
||||
{ "Multiply", VK_MULTIPLY },
|
||||
{ "Comma", VK_OEM_COMMA },
|
||||
{ "Period", VK_OEM_PERIOD },
|
||||
{ "Slash", VK_OEM_2 },
|
||||
// F-Keys
|
||||
{ "F1", VK_F1 },
|
||||
{ "F2", VK_F2 },
|
||||
@@ -91,7 +88,14 @@ namespace TLAC::Input::KeyConfig
|
||||
{ "Escape", VK_ESCAPE },
|
||||
{ "Comma", VK_OEM_COMMA },
|
||||
{ "Period", VK_OEM_PERIOD },
|
||||
{ "Colon", VK_OEM_1 },
|
||||
{ "Slash", VK_OEM_2 },
|
||||
{ "Tilde", VK_OEM_3 },
|
||||
{ "LeftBracket", VK_OEM_4 },
|
||||
{ "Backslash", VK_OEM_5 },
|
||||
{ "RightBracket", VK_OEM_6 },
|
||||
{ "SingleDoubleQuote", VK_OEM_7 },
|
||||
{ "OEM_8", VK_OEM_8 },
|
||||
// Mouse buttons
|
||||
{ "MouseLeft", VK_LBUTTON },
|
||||
{ "MouseMiddle", VK_MBUTTON },
|
||||
|
||||
Reference in New Issue
Block a user