From 807c2c633edab7c4088b039fc23bba4cc4790801 Mon Sep 17 00:00:00 2001 From: Iipal Date: Thu, 13 Jun 2019 10:07:20 +0300 Subject: [PATCH] Update libft & refactor file ierarchy --- libft | 2 +- srcs/{rendering => raycaster}/wolf_colored.c | 0 srcs/{rendering => raycaster}/wolf_textured.c | 0 srcs/{rendering => raycaster}/wolf_textured_draw_line.c | 0 srcs/rendering/wolf_torch.c | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename srcs/{rendering => raycaster}/wolf_colored.c (100%) rename srcs/{rendering => raycaster}/wolf_textured.c (100%) rename srcs/{rendering => raycaster}/wolf_textured_draw_line.c (100%) diff --git a/libft b/libft index 8ddf39a..11c2ebd 160000 --- a/libft +++ b/libft @@ -1 +1 @@ -Subproject commit 8ddf39aff6d3323c225e6ef493504085e4439d99 +Subproject commit 11c2ebdf5b1e97c85202da1571eb30ea2fb7ccb3 diff --git a/srcs/rendering/wolf_colored.c b/srcs/raycaster/wolf_colored.c similarity index 100% rename from srcs/rendering/wolf_colored.c rename to srcs/raycaster/wolf_colored.c diff --git a/srcs/rendering/wolf_textured.c b/srcs/raycaster/wolf_textured.c similarity index 100% rename from srcs/rendering/wolf_textured.c rename to srcs/raycaster/wolf_textured.c diff --git a/srcs/rendering/wolf_textured_draw_line.c b/srcs/raycaster/wolf_textured_draw_line.c similarity index 100% rename from srcs/rendering/wolf_textured_draw_line.c rename to srcs/raycaster/wolf_textured_draw_line.c diff --git a/srcs/rendering/wolf_torch.c b/srcs/rendering/wolf_torch.c index 31715aa..4b4abae 100644 --- a/srcs/rendering/wolf_torch.c +++ b/srcs/rendering/wolf_torch.c @@ -6,7 +6,7 @@ /* By: tmaluh +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/16 22:08:27 by tmaluh #+# #+# */ -/* Updated: 2019/06/13 09:46:30 by tmaluh ### ########.fr */ +/* Updated: 2019/06/13 10:04:27 by tmaluh ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,7 +31,7 @@ void wolf_rendering_torch(t_torch *torch, Uint32 *win_pxls, uint8_t fog_freq) { curr_tex_pxl = torch->tex[torch_frame] .pixels[p.y * torch->tex[torch_frame].surf->w + p.x]; - if (curr_tex_pxl != 0xff000000 || curr_tex_pxl != 0x00) + if (curr_tex_pxl != 0xff000000L && curr_tex_pxl != 0x0L) if (WIN_Y > p.y + torch_shift.y && WIN_X > p.x + torch_shift.x) win_pxls[(p.y + torch_shift.y) * WIN_X + (p.x + torch_shift.x)] = curr_tex_pxl;