From 7f920fe13b623f229c0cfca14ced7f0f994e3bac Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 2 Sep 2023 19:57:14 +0300 Subject: [PATCH] Add erase_rect --- src/mapper/map_func.cc | 22 ++++++++++++++++++++++ src/mapper/map_func.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/src/mapper/map_func.cc b/src/mapper/map_func.cc index b9f853b..f328b0a 100644 --- a/src/mapper/map_func.cc +++ b/src/mapper/map_func.cc @@ -1,6 +1,7 @@ #include "mapper/map_func.h" #include "proto.h" +#include "window_manager.h" namespace fallout { @@ -19,6 +20,27 @@ void copy_proto_lists() // TODO: Incomplete. } +// 0x4843A0 +void erase_rect(Rect* rect) +{ + Rect r = *rect; + + r.bottom = rect->top; + windowRefreshAll(&r); + + r.bottom = rect->bottom; + r.left = rect->right; + windowRefreshAll(&r); + + r.left = rect->left; + r.top = rect->bottom; + windowRefreshAll(&r); + + r.top = rect->top; + r.right = rect->left; + windowRefreshAll(&r); +} + // 0x484400 int toolbar_proto(int type, int id) { diff --git a/src/mapper/map_func.h b/src/mapper/map_func.h index e779f28..0961c90 100644 --- a/src/mapper/map_func.h +++ b/src/mapper/map_func.h @@ -1,10 +1,13 @@ #ifndef FALLOUT_MAPPER_MAP_FUNC_H_ #define FALLOUT_MAPPER_MAP_FUNC_H_ +#include "geometry.h" + namespace fallout { void setup_map_dirs(); void copy_proto_lists(); +void erase_rect(Rect* rect); int toolbar_proto(int type, int id); bool map_toggle_block_obj_viewing_on();