Refactor(branding.cpp): Remove branding functions

This commit is contained in:
Rim 2024-03-11 05:06:07 -04:00
parent 978c7ca30e
commit c6be0f0aae

View File

@ -1,34 +1,15 @@
#include <std_include.hpp> #include <std_include.hpp>
#include "loader/component_loader.hpp" #include "loader/component_loader.hpp"
#include "game/game.hpp" #include "game/game.hpp"
#include "version.hpp"
#include "scheduler.hpp"
#include <utils/hook.hpp> #include <utils/hook.hpp>
namespace branding namespace branding
{ {
namespace namespace
{ {
void draw_branding()
{
constexpr auto x = 4;
constexpr auto y = 0;
constexpr auto scale = 0.45f;
float color[4] = {0.666f, 0.666f, 0.666f, 0.666f};
const auto* font = reinterpret_cast<uint32_t*(*)()>(0x141CAC8E0_g)();
if (!font) return;
game::R_AddCmdDrawText("", std::numeric_limits<int>::max(), font, static_cast<float>(x),
y + static_cast<float>(font[2]) * scale,
scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_NORMAL);
}
const char* get_ingame_console_prefix_stub() const char* get_ingame_console_prefix_stub()
{ {
return "T7x > "; return "T7x >";
} }
} }
@ -36,8 +17,6 @@ namespace branding
{ {
void post_unpack() override void post_unpack() override
{ {
scheduler::loop(draw_branding, scheduler::renderer);
// Change window title prefix // Change window title prefix
utils::hook::copy_string(0x14303F3D8_g, "T7x"); utils::hook::copy_string(0x14303F3D8_g, "T7x");