Fix external console

This commit is contained in:
momo5502 2016-03-06 14:13:41 +01:00
parent ff4961a205
commit 60363dd1f3
3 changed files with 17 additions and 3 deletions

View File

@ -380,6 +380,19 @@ namespace Components
// Check for bad food ;) // Check for bad food ;)
Utils::Hook(0x4CB9F4, Console::GetAutoCompleteFileList, HOOK_CALL).Install()->Quick(); Utils::Hook(0x4CB9F4, Console::GetAutoCompleteFileList, HOOK_CALL).Install()->Quick();
// Modify console style
Utils::Hook::Set<BYTE>(0x428A8E, 0); // Adjust logo Y pos
Utils::Hook::Set<BYTE>(0x428A90, 0); // Adjust logo X pos
Utils::Hook::Set<BYTE>(0x428AF2, 67); // Adjust output Y pos
Utils::Hook::Set<DWORD>(0x428AC5, 397); // Adjust input Y pos
Utils::Hook::Set<DWORD>(0x428951, 609); // Reduce window width
Utils::Hook::Set<DWORD>(0x42895D, 423); // Reduce window height
Utils::Hook::Set<DWORD>(0x428AC0, 597); // Reduce input width
Utils::Hook::Set<DWORD>(0x428AED, 596); // Reduce output width
// Don't resize the console
Utils::Hook(0x64DC6B, 0x64DCC2, HOOK_JUMP).Install()->Quick();
// Code below is not necessary, when performing unit tests! // Code below is not necessary, when performing unit tests!
if (Loader::PerformingUnitTests()) return; if (Loader::PerformingUnitTests()) return;

View File

@ -114,7 +114,7 @@ namespace Components
Utils::Hook::Set<DWORD>(0x45ACE0, 0xC301B0); Utils::Hook::Set<DWORD>(0x45ACE0, 0xC301B0);
// fs_basegame // fs_basegame
Utils::Hook::Set<char*>(0x6431D1, "data2"); Utils::Hook::Set<char*>(0x6431D1, BASEGAME);
// UI version string // UI version string
Utils::Hook::Set<char*>(0x43F73B, "IW4x: r" REVISION_STR "-" MILESTONE); Utils::Hook::Set<char*>(0x43F73B, "IW4x: r" REVISION_STR "-" MILESTONE);
@ -138,10 +138,10 @@ namespace Components
Utils::Hook::Set<char*>(0x60BD91, VERSION_STR); Utils::Hook::Set<char*>(0x60BD91, VERSION_STR);
// console logo // console logo
//Utils::Hook::Set<char*>(0x428A66, "data/images/logo.bmp"); Utils::Hook::Set<char*>(0x428A66, BASEGAME "/images/logo.bmp");
// splash logo // splash logo
//Utils::Hook::Set<char*>(0x475F9E, "data/images/splash.bmp"); Utils::Hook::Set<char*>(0x475F9E, BASEGAME "/images/splash.bmp");
// Numerical ping (cg_scoreboardPingText 1) // Numerical ping (cg_scoreboardPingText 1)
Utils::Hook::Set<BYTE>(0x45888E, 1); Utils::Hook::Set<BYTE>(0x45888E, 1);

View File

@ -103,6 +103,7 @@
#define STRINGIZE_(x) #x #define STRINGIZE_(x) #x
#define STRINGIZE(x) STRINGIZE_(x) #define STRINGIZE(x) STRINGIZE_(x)
#define BASEGAME "data2"
#define MILESTONE "beta" #define MILESTONE "beta"
#define REVISION_STR STRINGIZE(REVISION) #define REVISION_STR STRINGIZE(REVISION)