aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_draw_hud.c13
-rw-r--r--src/ft_draw_scene.c4
-rw-r--r--src/ft_extra_keys.c8
-rw-r--r--src/ft_init_lists.c2
4 files changed, 20 insertions, 7 deletions
diff --git a/src/ft_draw_hud.c b/src/ft_draw_hud.c
index 6c05f31..1564e2e 100644
--- a/src/ft_draw_hud.c
+++ b/src/ft_draw_hud.c
@@ -10,4 +10,17 @@
/* */
/* ************************************************************************** */
+#include <cub3d.h>
+#include <mlx.h>
+static void
+ft_draw_hud_back(t_win *wl, t_cub *cl)
+{
+}
+
+void
+ ft_draw_hud(t_cub *clist)
+{
+ ft_draw_hud_back(clist->wlist, clist);
+ ft_draw_map(clist->mlist->map, clist);
+}
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c
index 3bf453a..b5f2283 100644
--- a/src/ft_draw_scene.c
+++ b/src/ft_draw_scene.c
@@ -23,8 +23,8 @@ void
clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
&clist->img.sizeline, &clist->img.endian);
ft_castray(clist);
- if (clist->minimap)
- ft_draw_map(clist->mlist->map, clist);
+ if (clist->ishud)
+ ft_draw_hud(clist);
mlx_put_image_to_window(clist->wlist->wlx,
clist->wlist->winptr, clist->img.img, 0, 0);
mlx_destroy_image(clist->wlist->wlx, clist->img.img);
diff --git a/src/ft_extra_keys.c b/src/ft_extra_keys.c
index 39a297b..507f808 100644
--- a/src/ft_extra_keys.c
+++ b/src/ft_extra_keys.c
@@ -53,14 +53,14 @@ int
int
ft_f1_key(t_cub *clist)
{
- if (clist->minimap == 0)
+ if (clist->ishud == 0)
{
- clist->minimap = 1;
+ clist->ishud = 1;
ft_draw_scene(clist);
}
- else if (clist->minimap == 1)
+ else if (clist->ishud == 1)
{
- clist->minimap = 0;
+ clist->ishud = 0;
ft_draw_scene(clist);
}
return (0);
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index 0fa4ba2..5592358 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -81,7 +81,7 @@ static t_cub
i = -1;
while (++i < 5)
clist->key_input[i] = -1;
- clist->minimap = 0;
+ clist->ishud = 0;
clist->f_rgb = ft_init_rgb();
clist->c_rgb = ft_init_rgb();
clist->rlist = ft_init_s_ray();