Some branding stuff
This commit is contained in:
parent
939ecbb3b6
commit
4a06c810cf
@ -34,7 +34,6 @@ namespace branding
|
|||||||
public:
|
public:
|
||||||
void post_unpack() override
|
void post_unpack() override
|
||||||
{
|
{
|
||||||
|
|
||||||
if (game::environment::is_dedi())
|
if (game::environment::is_dedi())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -42,24 +41,26 @@ namespace branding
|
|||||||
|
|
||||||
if (game::environment::is_mp())
|
if (game::environment::is_mp())
|
||||||
{
|
{
|
||||||
localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER\n");
|
//localized_strings::override("LUA_MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER\n");
|
||||||
localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER");
|
//localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER");
|
||||||
}
|
}
|
||||||
|
|
||||||
dvars::override::set_string("version", utils::string::va("H1-Mod %s", VERSION));
|
//dvars::override::set_string("version", utils::string::va("H1-Mod %s", VERSION));
|
||||||
|
|
||||||
ui_get_formatted_build_number_hook.create(
|
ui_get_formatted_build_number_hook.create(
|
||||||
SELECT_VALUE(0x1403B1C40, 0x1404E74C0), ui_get_formatted_build_number_stub);
|
SELECT_VALUE(0x1403B1C40, 0x1DF300_b), ui_get_formatted_build_number_stub);
|
||||||
|
|
||||||
scheduler::loop([]()
|
scheduler::loop([]()
|
||||||
{
|
{
|
||||||
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20);
|
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20);
|
||||||
|
if (font)
|
||||||
|
{
|
||||||
game::R_AddCmdDrawText("H1-Mod: " VERSION, 0x7FFFFFFF, font, 10.f,
|
game::R_AddCmdDrawText("H1-Mod: " VERSION, 0x7FFFFFFF, font, 10.f,
|
||||||
5.f + static_cast<float>(font->pixelHeight), 1.f, 1.f, 0.0f, color, 0);
|
5.f + static_cast<float>(font->pixelHeight), 1.f, 1.f, 0.0f, color, 0);
|
||||||
|
}
|
||||||
}, scheduler::pipeline::renderer);
|
}, scheduler::pipeline::renderer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//REGISTER_COMPONENT(branding::component)
|
REGISTER_COMPONENT(branding::component)
|
||||||
|
@ -96,8 +96,8 @@ namespace game
|
|||||||
float* color, Material* material)> R_AddCmdDrawStretchPic{0x17E5C0, 0x2443A0};
|
float* color, Material* material)> R_AddCmdDrawStretchPic{0x17E5C0, 0x2443A0};
|
||||||
WEAK symbol<Font_s* (const char* font, int size)> R_RegisterFont{ 0x4D4100, 0x67F630 }; // H1MP(1.15)
|
WEAK symbol<Font_s* (const char* font, int size)> R_RegisterFont{ 0x4D4100, 0x67F630 }; // H1MP(1.15)
|
||||||
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x4D43B0, 0x5D94A0};
|
WEAK symbol<int(const char* text, int maxChars, Font_s* font)> R_TextWidth{0x4D43B0, 0x5D94A0};
|
||||||
WEAK symbol<int(void* font)> R_GetFontHeight{0x5EA360, 0x5D92C0};
|
WEAK symbol<int(void* font)> R_GetFontHeight{0x5EA360, 0x67F710};
|
||||||
WEAK symbol<void* (int a1)> R_DrawSomething{0x4D37B0, 0x5D8890};
|
WEAK symbol<void* (int a1)> R_DrawSomething{0x4D37B0, 0x67ECE0};
|
||||||
WEAK symbol<void()> R_SyncRenderThread{0x4F8240, 0x5FF3A0};
|
WEAK symbol<void()> R_SyncRenderThread{0x4F8240, 0x5FF3A0};
|
||||||
WEAK symbol<void* (const char* text, int maxChars, void* font, int fontHeight, float x, float y, float xScale, float yScale, float rotation, float* color, int style, int cursor_pos, char cursor_char, void* style_unk)> H1_AddBaseDrawTextCmd{ 0x4F3DC0,0x6A3080 }; // H1MP(1.15)
|
WEAK symbol<void* (const char* text, int maxChars, void* font, int fontHeight, float x, float y, float xScale, float yScale, float rotation, float* color, int style, int cursor_pos, char cursor_char, void* style_unk)> H1_AddBaseDrawTextCmd{ 0x4F3DC0,0x6A3080 }; // H1MP(1.15)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user