aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-17 16:24:04 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-17 16:24:04 +0100
commit9af56266c16eaffe9375ba3edb3465c33f015b9f (patch)
treeefc8c7adf952ad533f362bf147667cbc5a8a30f7 /src
parentBetter parse (diff)
download42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.gz
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.bz2
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.xz
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.tar.zst
42-cub3d-9af56266c16eaffe9375ba3edb3465c33f015b9f.zip
ready to merge
Diffstat (limited to 'src')
-rw-r--r--src/ft_draw_verline.c4
-rw-r--r--src/ft_init_winlx.c2
-rw-r--r--src/ft_raycasting.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c
index d7ebe34..5c5ed29 100644
--- a/src/ft_draw_verline.c
+++ b/src/ft_draw_verline.c
@@ -15,7 +15,7 @@
static void
ft_draw_floor(t_cub *cl, int32_t y, int32_t x)
{
- while (y < cl->wlist->y_size)
+ while ((uint32_t)y < cl->wlist->y_size)
{
*(int*)(cl->img.ptr +
(x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(cl->f_rgb);
@@ -47,7 +47,7 @@ int8_t
y1 = 0;
if (y2 < 0)
y2 = 0;
- if (y2 >= cl->wlist->y_size)
+ if ((uint32_t)y2 >= cl->wlist->y_size)
y2 = cl->wlist->x_size - 1;
if (y1 > y2)
{
diff --git a/src/ft_init_winlx.c b/src/ft_init_winlx.c
index 1b60477..6657408 100644
--- a/src/ft_init_winlx.c
+++ b/src/ft_init_winlx.c
@@ -26,7 +26,7 @@ int
clist->wlist->x_size, clist->wlist->y_size, "Cub3D")))
return (-1);
clist->wlist->inited = 1;
- ft_printf("Created window of size %dx%d\n",
+ ft_printf("Created window of size %ux%u\n",
clist->wlist->x_size, clist->wlist->y_size);
return (0);
}
diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c
index a4446b3..bf33374 100644
--- a/src/ft_raycasting.c
+++ b/src/ft_raycasting.c
@@ -55,7 +55,7 @@ void
if (cl->rlist.wall_t < 0)
cl->rlist.wall_t = 0;
cl->rlist.wall_b = cl->rlist.line_h / 2 + wl->y_size / 2;
- if (cl->rlist.wall_b >= wl->y_size)
+ if (cl->rlist.wall_b >= (float)wl->y_size)
cl->rlist.wall_b = wl->y_size - 1;
ft_draw_verline(cl, i, cl->rlist.wall_t - 1, cl->rlist.wall_b);
i++;