better branding

This commit is contained in:
m 2022-12-22 08:39:14 -06:00
parent 3d8427b9b1
commit 0398b8cfad

View File

@ -20,7 +20,7 @@ namespace branding
{ {
utils::hook::detour ui_get_formatted_build_number_hook; utils::hook::detour ui_get_formatted_build_number_hook;
float color[4] = {0.666f, 0.666f, 0.666f, 0.666f}; float color[4] = {0.39f, 0.9f, 0.4f, 0.9f};
const char* ui_get_formatted_build_number_stub() const char* ui_get_formatted_build_number_stub()
{ {
@ -30,15 +30,19 @@ namespace branding
void draw_branding() void draw_branding()
{ {
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20); const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 22);
if (font) if (font)
{ {
#ifdef DEBUG #ifdef DEBUG
game::R_AddCmdDrawText("H1-Mod: " VERSION " (" __DATE__ " " __TIME__ ")", 0x7FFFFFFF, font, 10.f, game::R_AddCmdDrawText("h1-mod: " VERSION " (" __DATE__ " " __TIME__ ")",
5.f + static_cast<float>(font->pixelHeight), 1.f, 1.f, 0.0f, color, 0); 0x7FFFFFFF, font, 10.f,
5.f + static_cast<float>(font->pixelHeight),
1.f, 1.f, 0.0f, color, 0);
#else #else
game::R_AddCmdDrawText("H1-Mod: " VERSION, 0x7FFFFFFF, font, 10.f, game::R_AddCmdDrawText("h1-mod",
5.f + static_cast<float>(font->pixelHeight), 1.f, 1.f, 0.0f, color, 0); 0x7FFFFFFF, font, 10.f,
5.f + static_cast<float>(font->pixelHeight),
1.f, 1.f, 0.0f, color, 0);
#endif #endif
} }
} }
@ -59,12 +63,6 @@ namespace branding
return; return;
} }
if (game::environment::is_mp())
{
localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER\n");
localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER");
}
ui_get_formatted_build_number_hook.create( ui_get_formatted_build_number_hook.create(
SELECT_VALUE(0x406EC0_b, 0x1DF300_b), ui_get_formatted_build_number_stub); SELECT_VALUE(0x406EC0_b, 0x1DF300_b), ui_get_formatted_build_number_stub);
} }