aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_draw_hud.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ft_draw_hud.c b/src/ft_draw_hud.c
index 68cdac5..bd2bf37 100644
--- a/src/ft_draw_hud.c
+++ b/src/ft_draw_hud.c
@@ -37,7 +37,7 @@ static void
}
static void
- ft_draw_hud_back_top(size_t map_h, size_t map_w, t_win *wl, t_cub *cl)
+ ft_draw_hud_back_top_r(size_t map_h, size_t map_w, t_win *wl, t_cub *cl)
{
const uint16_t scl = cl->mlist->scale;
uint32_t x;
@@ -56,7 +56,17 @@ static void
y = wl->y_size - (map_h * scl) - 20;
x++;
}
+}
+
+static void
+ ft_draw_hud_back_top_l(size_t map_h, size_t map_w, t_win *wl, t_cub *cl)
+{
+ const uint16_t scl = cl->mlist->scale;
+ uint32_t x;
+ uint32_t y;
+
x = wl->x_size - (map_w * scl) + 20;
+ y = wl->y_size - (map_h * scl) - 20;
while (x < wl->x_size)
{
while (y < wl->y_size - (map_h * scl))
@@ -74,7 +84,9 @@ void
ft_draw_hud(t_cub *clist)
{
ft_draw_hud_back(clist->wlist, clist);
- ft_draw_hud_back_top(clist->mlist->map_h,
+ ft_draw_hud_back_top_r(clist->mlist->map_h,
+ clist->mlist->map_w, clist->wlist, clist);
+ ft_draw_hud_back_top_l(clist->mlist->map_h,
clist->mlist->map_w, clist->wlist, clist);
ft_draw_map(clist->mlist->map, clist);
}