From 3855c173bf7f2056ca0a02106d35466824591e13 Mon Sep 17 00:00:00 2001 From: m Date: Sat, 17 Sep 2022 09:22:54 -0500 Subject: [PATCH] branding cleanup normal scale again use reverse_g format --- src/client/component/branding.cpp | 11 +---------- src/client/component/exception.cpp | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/client/component/branding.cpp b/src/client/component/branding.cpp index c53fe40f..13ed4cc4 100644 --- a/src/client/component/branding.cpp +++ b/src/client/component/branding.cpp @@ -1,24 +1,21 @@ #include #include "loader/component_loader.hpp" #include "game/game.hpp" +#include "version.hpp" #include "scheduler.hpp" #include -#include 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(0x141CAC8E0_g)(); @@ -28,12 +25,6 @@ namespace branding y + static_cast(font[2]) * scale, scale, scale, 0.0f, color, game::ITEM_TEXTSTYLE_SHADOWEDMORE); } - - void r_end_frame_stub() - { - draw_branding(); - r_end_frame_hook.invoke(); - } } class component final : public component_interface diff --git a/src/client/component/exception.cpp b/src/client/component/exception.cpp index 2d572533..1166d03f 100644 --- a/src/client/component/exception.cpp +++ b/src/client/component/exception.cpp @@ -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(exception_data.address) - get_base()); + reverse_g(reinterpret_cast(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(exception_data.address) - get_base()); + reverse_g(reinterpret_cast(exception_data.address))); } else {