Improve branding

This commit is contained in:
momo5502 2022-09-17 09:16:24 +02:00
parent e0b6ba12ee
commit 867de3c3dd
2 changed files with 16 additions and 4 deletions

View File

@ -3,6 +3,7 @@
#include "game/game.hpp"
#include <utils/hook.hpp>
#include <version.hpp>
namespace branding
{
@ -13,17 +14,17 @@ namespace branding
void draw_branding()
{
constexpr auto x = 4;
constexpr auto y = -5;
constexpr auto scale = 1.0f;
constexpr auto y = 0;
constexpr auto scale = 0.5f;
//float color[4] = {0.666f, 0.666f, 0.666f, 0.666f};
float color[4] = {236 / 255.0f, 113 / 255.0f, 10 / 255.0f, 1.0f};
auto* font = reinterpret_cast<uint32_t*(*)()>(0x141CAC8E0_g)();
if (!font) return;
game::R_AddCmdDrawText("BOIII", 0x7FFFFFFF, font, static_cast<float>(x),
game::R_AddCmdDrawText("BOIII: " VERSION, 0x7FFFFFFF, font, static_cast<float>(x),
y + static_cast<float>(font[2]) * scale,
scale, scale, 0.0f, color, 0);
scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_SHADOWEDMORE);
}
void r_end_frame_stub()

View File

@ -405,4 +405,15 @@ namespace game
BD_GMSG_GROUP_POST_RATE_EXCEEDED = 0x27E1,
BD_MAX_ERROR_CODE = 0x27E2,
};
enum itemTextStyle
{
ITEM_TEXTSTYLE_NORMAL = 0,
ITEM_TEXTSTYLE_SHADOWED = 3,
ITEM_TEXTSTYLE_SHADOWEDMORE = 6,
ITEM_TEXTSTYLE_BORDERED = 7,
ITEM_TEXTSTYLE_BORDEREDMORE = 8,
ITEM_TEXTSTYLE_MONOSPACE = 128,
ITEM_TEXTSTYLE_MONOSPACESHADOWED = 132,
};
}