branding cleanup

normal scale again

use reverse_g

format
This commit is contained in:
m 2022-09-17 09:22:54 -05:00
parent 0b935f0c69
commit 3855c173bf
2 changed files with 3 additions and 12 deletions

View File

@ -1,24 +1,21 @@
#include <std_include.hpp>
#include "loader/component_loader.hpp"
#include "game/game.hpp"
#include "version.hpp"
#include "scheduler.hpp"
#include <utils/hook.hpp>
#include <version.hpp>
namespace branding
{
namespace
{
utils::hook::detour r_end_frame_hook;
void draw_branding()
{
constexpr auto x = 4;
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)();
@ -28,12 +25,6 @@ namespace branding
y + static_cast<float>(font[2]) * scale,
scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_SHADOWEDMORE);
}
void r_end_frame_stub()
{
draw_branding();
r_end_frame_hook.invoke<void>();
}
}
class component final : public component_interface

View File

@ -71,7 +71,7 @@ namespace exception
const std::string error_str = utils::string::va("Fatal error (0x%08X) at 0x%p (0x%p).\n"
"A minidump has been written.\n",
exception_data.code, exception_data.address,
reinterpret_cast<uint64_t>(exception_data.address) - get_base());
reverse_g(reinterpret_cast<uint64_t>(exception_data.address)));
utils::thread::suspend_other_threads();
show_mouse_cursor();
@ -92,7 +92,7 @@ namespace exception
"Make sure to update your graphics card drivers and install operating system updates!\n"
"Closing or restarting Steam might also help.",
exception_data.code, exception_data.address,
reinterpret_cast<uint64_t>(exception_data.address) - get_base());
reverse_g(reinterpret_cast<uint64_t>(exception_data.address)));
}
else
{