From 60363dd1f34697d805d825c18c30baa0cf14ffa3 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 6 Mar 2016 14:13:41 +0100 Subject: [PATCH] Fix external console --- src/Components/Modules/Console.cpp | 13 +++++++++++++ src/Components/Modules/QuickPatch.cpp | 6 +++--- src/STDInclude.hpp | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index 4d203095..92efdb34 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -380,6 +380,19 @@ namespace Components // Check for bad food ;) Utils::Hook(0x4CB9F4, Console::GetAutoCompleteFileList, HOOK_CALL).Install()->Quick(); + // Modify console style + Utils::Hook::Set(0x428A8E, 0); // Adjust logo Y pos + Utils::Hook::Set(0x428A90, 0); // Adjust logo X pos + Utils::Hook::Set(0x428AF2, 67); // Adjust output Y pos + Utils::Hook::Set(0x428AC5, 397); // Adjust input Y pos + Utils::Hook::Set(0x428951, 609); // Reduce window width + Utils::Hook::Set(0x42895D, 423); // Reduce window height + Utils::Hook::Set(0x428AC0, 597); // Reduce input width + Utils::Hook::Set(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! if (Loader::PerformingUnitTests()) return; diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 125058f8..2d1fceed 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -114,7 +114,7 @@ namespace Components Utils::Hook::Set(0x45ACE0, 0xC301B0); // fs_basegame - Utils::Hook::Set(0x6431D1, "data2"); + Utils::Hook::Set(0x6431D1, BASEGAME); // UI version string Utils::Hook::Set(0x43F73B, "IW4x: r" REVISION_STR "-" MILESTONE); @@ -138,10 +138,10 @@ namespace Components Utils::Hook::Set(0x60BD91, VERSION_STR); // console logo - //Utils::Hook::Set(0x428A66, "data/images/logo.bmp"); + Utils::Hook::Set(0x428A66, BASEGAME "/images/logo.bmp"); // splash logo - //Utils::Hook::Set(0x475F9E, "data/images/splash.bmp"); + Utils::Hook::Set(0x475F9E, BASEGAME "/images/splash.bmp"); // Numerical ping (cg_scoreboardPingText 1) Utils::Hook::Set(0x45888E, 1); diff --git a/src/STDInclude.hpp b/src/STDInclude.hpp index f8bfa5d2..4a56dfc0 100644 --- a/src/STDInclude.hpp +++ b/src/STDInclude.hpp @@ -103,6 +103,7 @@ #define STRINGIZE_(x) #x #define STRINGIZE(x) STRINGIZE_(x) +#define BASEGAME "data2" #define MILESTONE "beta" #define REVISION_STR STRINGIZE(REVISION)