From 480094a3ebe154642beea08df940121129a0ec8f Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sun, 23 Jul 2023 09:49:22 +0300 Subject: [PATCH] Add redraw_toolname --- src/mapper/mapper.cc | 18 ++++++++++++++++++ src/mapper/mapper.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/src/mapper/mapper.cc b/src/mapper/mapper.cc index 77b9551..22b775c 100644 --- a/src/mapper/mapper.cc +++ b/src/mapper/mapper.cc @@ -6,15 +6,33 @@ #include "inventory.h" #include "object.h" #include "proto.h" +#include "svga.h" +#include "window_manager.h" namespace fallout { +static void redraw_toolname(); static int mapper_mark_exit_grid(); static void mapper_mark_all_exit_grids(); // 0x559748 MapTransition mapInfo = { -1, -1, 0, 0 }; +// 0x6EC4AC +int tool_win; + +// 0x48B230 +void redraw_toolname() +{ + Rect rect; + + rect.left = _scr_size.right - _scr_size.left - 149; + rect.top = 60; + rect.right = _scr_size.right - _scr_size.left + 1; + rect.bottom = 95; + windowRefreshRect(tool_win, &rect); +} + // 0x48C604 int mapper_inven_unwield(Object* obj, int right_hand) { diff --git a/src/mapper/mapper.h b/src/mapper/mapper.h index f69546b..c85597b 100644 --- a/src/mapper/mapper.h +++ b/src/mapper/mapper.h @@ -8,6 +8,8 @@ namespace fallout { extern MapTransition mapInfo; +extern int tool_win; + int mapper_inven_unwield(Object* obj, int right_hand); } // namespace fallout