diff --git a/OpenParrot/src/Functions/Games/ES3X/TER.cpp b/OpenParrot/src/Functions/Games/ES3X/TER.cpp new file mode 100644 index 0000000..eec006c --- /dev/null +++ b/OpenParrot/src/Functions/Games/ES3X/TER.cpp @@ -0,0 +1,32 @@ +#include +#include "Utility/InitFunction.h" +#include "Functions/Global.h" +#include "MinHook.h" +#include +#include +#ifdef _M_AMD64 +#pragma optimize("", off) +#pragma comment(lib, "Ws2_32.lib") + +extern LPCSTR hookPort; + +static InitFunction Tekken7Func([]() + { + hookPort = ("COM3"); + uintptr_t imageBase = (uintptr_t)GetModuleHandleA(0); + + // Skip all errors + injector::MakeNOP(imageBase + 0x25E791, 5); + + // First Check Error + injector::MakeNOP(imageBase + 0x268E00, 5); + + // Windowed + if (ToBool(config["General"]["Windowed"])) + { + // TODO: DOCUMENT PATCHES + injector::WriteMemory(imageBase + 0x115E757, 0xF633C1FFC1FFC933, true); + injector::WriteMemory(imageBase + 0x115E757 + 0x08, 0xC6FFC6FF, true); + } + }, GameID::TER); +#endif \ No newline at end of file diff --git a/OpenParrot/src/Functions/WindowedDx8.cpp b/OpenParrot/src/Functions/WindowedDx8.cpp index e50356a..d62060e 100644 --- a/OpenParrot/src/Functions/WindowedDx8.cpp +++ b/OpenParrot/src/Functions/WindowedDx8.cpp @@ -80,6 +80,8 @@ static InitFunction initFunc([]() { if (GameDetect::currentGame == GameID::BG4) return; + if (GameDetect::currentGame == GameID::TER) + return; if (GameDetect::currentGame == GameID::FNFSC) InitD3D8WindowHook(); if (ToBool(config["General"]["Windowed"])) diff --git a/OpenParrot/src/Functions/WindowedDx9.cpp b/OpenParrot/src/Functions/WindowedDx9.cpp index 1881093..21eef51 100644 --- a/OpenParrot/src/Functions/WindowedDx9.cpp +++ b/OpenParrot/src/Functions/WindowedDx9.cpp @@ -70,7 +70,7 @@ extern linb::ini config; static InitFunction initFunc([]() { - if (GameDetect::currentGame == GameID::BG4 || GameDetect::currentGame == GameID::JLeague) + if (GameDetect::currentGame == GameID::BG4 || GameDetect::currentGame == GameID::JLeague || GameDetect::currentGame == GameID::TER) return; if (ToBool(config["General"]["Windowed"])) { diff --git a/OpenParrot/src/Functions/WindowedDxgi.cpp b/OpenParrot/src/Functions/WindowedDxgi.cpp index 5c6a906..bda673e 100644 --- a/OpenParrot/src/Functions/WindowedDxgi.cpp +++ b/OpenParrot/src/Functions/WindowedDxgi.cpp @@ -241,7 +241,7 @@ extern linb::ini config; static InitFunction initFunc([]() { - if (GameDetect::currentGame == GameID::PokkenTournament || GameDetect::currentGame == GameID::SchoolOfRagnarok) + if (GameDetect::currentGame == GameID::PokkenTournament || GameDetect::currentGame == GameID::SchoolOfRagnarok || GameDetect::currentGame == GameID::TER) return; if (ToBool(config["General"]["Windowed"])) { diff --git a/OpenParrot/src/Utility/GameDetect.cpp b/OpenParrot/src/Utility/GameDetect.cpp index 8a89533..2c09d5c 100644 --- a/OpenParrot/src/Utility/GameDetect.cpp +++ b/OpenParrot/src/Utility/GameDetect.cpp @@ -474,6 +474,9 @@ void GameDetect::DetectCurrentGame() case 0x80ebd207: currentGame = GameID::Theatrhythm; break; + case 0xdb9c3a90: + currentGame = GameID::TER; + break; #endif default: #ifdef _DEBUG diff --git a/OpenParrot/src/Utility/GameID.h b/OpenParrot/src/Utility/GameID.h index da06b82..3fa6d2c 100644 --- a/OpenParrot/src/Utility/GameID.h +++ b/OpenParrot/src/Utility/GameID.h @@ -59,5 +59,6 @@ enum class GameID FNFSB2, GHA, JLeague, - Theatrhythm + Theatrhythm, + TER }; \ No newline at end of file