diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index e15b7716..cb15c5a1 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -25,8 +25,8 @@ namespace Components // External console Utils::Hook::Nop(0x60BB58, 11); - // Console '%s: %s> ' string - TODO: add buildnumber here - Utils::Hook::Set(0x5A44B4, "IW4x: r123> "); + // Console '%s: %s> ' string + Utils::Hook::Set(0x5A44B4, "IW4x: r" REVISION_STR "> "); // Internal console Utils::Hook(0x4F690C, Console::ToggleConsole, HOOK_CALL).Install()->Quick(); diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 470ea770..3214bc02 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -72,17 +72,17 @@ namespace Components // fs_basegame Utils::Hook::Set(0x6431D1, "data"); - // UI version string - TODO: add buildnumber here - Utils::Hook::Set(0x43F73B, "iw4x IW4x: r123"); + // UI version string + Utils::Hook::Set(0x43F73B, "iw4x IW4x: r" REVISION_STR); // console version string - Utils::Hook::Set(0x4B12BB, "iw4x IW4x r123 (built " __DATE__ " " __TIME__ ")"); + Utils::Hook::Set(0x4B12BB, "iw4x IW4x r" REVISION_STR " (built " __DATE__ " " __TIME__ ")"); // version string - Utils::Hook::Set(0x60BD56, "iw4x.IW4x (r123)"); + Utils::Hook::Set(0x60BD56, "iw4x IW4x (r" REVISION_STR ")"); // console title - Utils::Hook::Set(0x4289E8, "iw4x IW4x (r123): Console"); + Utils::Hook::Set(0x4289E8, "iw4x IW4x (r" REVISION_STR "): Console"); // window title Utils::Hook::Set(0x5076A0, "iw4x IW4x: Multiplayer"); @@ -91,7 +91,7 @@ namespace Components Utils::Hook::Set(0x4D378B, "IW4Host"); // shortversion - Utils::Hook::Set(0x60BD91, "4.2.123"); + Utils::Hook::Set(0x60BD91, VERSION_STR); // console logo Utils::Hook::Set(0x428A66, "data/images/logo.bmp"); diff --git a/src/STDInclude.hpp b/src/STDInclude.hpp index fe492110..82285cb9 100644 --- a/src/STDInclude.hpp +++ b/src/STDInclude.hpp @@ -36,3 +36,11 @@ #pragma comment(lib, "Winmm.lib") #pragma comment(lib, "Crypt32.lib") #pragma comment(lib, "Ws2_32.lib") + +// Revision number +#define STRINGIZE_(x) #x +#define STRINGIZE(x) STRINGIZE_(x) + +#define REVISION_STR STRINGIZE(REVISION) +#define VERSION 4,2,REVISION +#define VERSION_STR "4.2." REVISION_STR