diff options
Diffstat (limited to '')
-rw-r--r-- | inc/cub3d_defines.h | 5 | ||||
-rw-r--r-- | map/lvl_four.cub | 2 | ||||
-rw-r--r-- | src/ft_detect.c | 2 | ||||
-rw-r--r-- | src/ft_draw_verline.c | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index b2c1b8f..30d497e 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -115,10 +115,11 @@ enum */ # define FT_CHRST_VALID_PARSE "RNSEWFCLM" -# define FT_CHRST_MAP_ENTRY "012NSEWLD " +# define FT_CHRST_MAP_ENTRY "012NSEWL " # define FT_CHRST_SPAWN "NSEW" -# define FT_CHRST_MAP_NON_WALL "02NESWLD" +# define FT_CHRST_MAP_NON_WALL "02NESWL" # define FT_CHRST_COLLISION "12 " +# define FT_CHRST_DETECT "1L" /* ** ====== BMP ====== diff --git a/map/lvl_four.cub b/map/lvl_four.cub index 49e28ef..6c6428e 100644 --- a/map/lvl_four.cub +++ b/map/lvl_four.cub @@ -23,6 +23,6 @@ L ./map/lvl_five.cub 111110111111011 11111111111010111 1100000000000000001 - 111111111DDD111111011 + 111111111111111111011 1E000000000000000000001 1111111111111111111111111 diff --git a/src/ft_detect.c b/src/ft_detect.c index cbd8c58..42ecb3f 100644 --- a/src/ft_detect.c +++ b/src/ft_detect.c @@ -74,7 +74,7 @@ void cl->rlist.sqy += cl->mlist.y_step; cl->rlist.side = 1; } - if (ft_ischarset("1LD", cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy])) + if (ft_ischarset(FT_CHRST_DETECT, cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy])) cl->rlist.hit = 1; } } diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c index dd7697a..9abb73f 100644 --- a/src/ft_draw_verline.c +++ b/src/ft_draw_verline.c @@ -28,6 +28,7 @@ static void cl->img.ptr[x * 4 + cl->wlist.x_size * y + 3] = (int8_t)0; } +#include <stdio.h> static void ft_draw_floor(t_cub *cl, int32_t y, int32_t x) { @@ -56,6 +57,7 @@ static void ? (cl->tlist[6].tex_x) : (-cl->tlist[6].tex_x); cl->tlist[6].tex_y = (cl->tlist[6].tex_y > 0) ? (cl->tlist[6].tex_y) : (-cl->tlist[6].tex_y); + /* printf("tex_x %d | tex_y %d\n", cl->tlist[6].tex_x, cl->tlist[6].tex_y); */ ft_draw_floor_tex(cl, y, x, cl->tlist[6].tex_y); /* *(int*)(cl->img.ptr + */ /* (x * 4 + (y * cl->img.sizeline))) */ |