aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_sprite.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c
index b7b9e5d..9cd7dae 100644
--- a/src/ft_draw_sprite.c
+++ b/src/ft_draw_sprite.c
@@ -1,3 +1,15 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_draw_sprite.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/24 20:22:45 by rbousset #+# #+# */
+/* Updated: 2020/02/24 20:22:47 by rbousset ### ########lyon.fr */
+/* */
+/* ************************************************************************** */
+
#include <libft.h>
#include <cub3d.h>
#include <stdint.h>
@@ -11,20 +23,20 @@ void
if (cl->tlist[4].tex_x)
cl->img.ptr[x * 4 + (cl->img.sizeline * y)] =
(char)cl->tlist[4].ptr[cl->tlist[4].tex_x * 4 + 4 *
- cl->tlist[4].img_h * tex_y];
+ cl->tlist[4].img_h * tex_y];
cl->img.ptr[x * 4 + (cl->img.sizeline * y) + 1] =
- (char)cl->tlist[4].ptr[cl->tlist[4].tex_x * 4 + 4 *
- cl->tlist[4].img_h * tex_y + 1];
+ (char)cl->tlist[4].ptr[cl->tlist[4].tex_x * 4 + 4 *
+ cl->tlist[4].img_h * tex_y + 1];
cl->img.ptr[x * 4 + (cl->img.sizeline * y) + 2] =
- (char)cl->tlist[4].ptr[cl->tlist[4].tex_x * 4 + 4 *
- cl->tlist[4].img_h * tex_y + 2];
+ (char)cl->tlist[4].ptr[cl->tlist[4].tex_x * 4 + 4 *
+ cl->tlist[4].img_h * tex_y + 2];
cl->img.ptr[x * 4 + cl->wlist->x_size * y + 3] = (char)0;
}
void
ft_draw_sprite(t_cub *cl, int x)
{
- int hor_it;/*y*/
+ int hor_it;
int d;
int tex_y;