aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_del_tex.c2
-rw-r--r--src/ft_draw_sprite_extra.c1
-rw-r--r--src/ft_init_map.c6
-rw-r--r--src/ft_select_get.c4
-rw-r--r--src/ft_warp_level.c2
5 files changed, 8 insertions, 7 deletions
diff --git a/src/ft_del_tex.c b/src/ft_del_tex.c
index 70f23fa..fc0cf99 100644
--- a/src/ft_del_tex.c
+++ b/src/ft_del_tex.c
@@ -86,7 +86,7 @@ static void
void
ft_del_tex(t_cub *cl)
{
- if (cl->wlist.inited)
+ if (cl->walltexgood == 1)
{
if (cl->tlist[0].img)
mlx_destroy_image(cl->wlist.wlx, cl->tlist[0].img);
diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c
index 180702b..e592da0 100644
--- a/src/ft_draw_sprite_extra.c
+++ b/src/ft_draw_sprite_extra.c
@@ -47,7 +47,6 @@ static void
(1 + sprite->transformx / sprite->transformy);
}
-#include <libft.h>
void
ft_calc_sprite(t_cub *cl)
{
diff --git a/src/ft_init_map.c b/src/ft_init_map.c
index fb03bfd..b3bfa46 100644
--- a/src/ft_init_map.c
+++ b/src/ft_init_map.c
@@ -45,7 +45,7 @@ static int8_t
uint8_t i;
i = 0;
- while (i < 9)
+ while (i < 8)
{
if (!(mlist->sprite_path[i] = (char*)ft_calloc(1, sizeof(char))))
return (-1);
@@ -65,8 +65,8 @@ int8_t
mlist->weapon_var = 0;
mlist->topsp = 0;
ft_bzero(mlist->sprite_nbr, 8);
- ft_bzero(mlist->sprite_order, 4096);
- ft_bzero(mlist->st_o, 4096);
+ ft_bzero(mlist->sprite_order, 8);
+ ft_bzero(mlist->st_o, 8);
ft_bzero(mlist->traps_order, 512);
ft_bzero(mlist->heals_order, 64);
mlist->weaps_nbr[0] = 0;
diff --git a/src/ft_select_get.c b/src/ft_select_get.c
index 143dc09..88507a3 100644
--- a/src/ft_select_get.c
+++ b/src/ft_select_get.c
@@ -33,10 +33,10 @@ static int8_t
return (-1);
else if (ret == 5 && (clist->mlist.sprite_path[0][0]))
return (-1);
- else if (ret == 6 && ((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1)
+ if (ret == 6 && ((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1)
|| (clist->f_rgb.b != -1)))
return (-1);
- else if (ret == 7 && ((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1)
+ if (ret == 7 && ((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1)
|| (clist->c_rgb.b != -1)))
return (-1);
return (ret);
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 5055445..b6d1c38 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -64,6 +64,7 @@ static int8_t
return (-1);
if (ft_init_map(&cl->mlist) < 0)
return (-1);
+ ft_printf("[r %d] [g %d] [b %d]\n", cl->c_rgb.r, cl->c_rgb.g, cl->c_rgb.b);
i = 0;
while (i < 5)
{
@@ -101,6 +102,7 @@ int8_t
char *tmp_mup;
uint8_t isoldmus;
+ cl->walltexgood = 0;
if (!(next_path = (char *)malloc((ft_strlen(path) + 1) * sizeof(char))))
return (-1);
ft_sprintf(next_path, "%s", path);