diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-24 20:30:54 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-24 20:30:54 +0100 |
commit | 67d655e4a48aa7fdfaea58ece5e8f990b7e3b2ba (patch) | |
tree | ede8bd74820eb05c50d8a071b1934604803fd63c /src/ft_draw_sprite.c | |
parent | Commented ft_draw_sprite in ft_castray (diff) | |
download | 42-cub3d-67d655e4a48aa7fdfaea58ece5e8f990b7e3b2ba.tar.gz 42-cub3d-67d655e4a48aa7fdfaea58ece5e8f990b7e3b2ba.tar.bz2 42-cub3d-67d655e4a48aa7fdfaea58ece5e8f990b7e3b2ba.tar.xz 42-cub3d-67d655e4a48aa7fdfaea58ece5e8f990b7e3b2ba.tar.zst 42-cub3d-67d655e4a48aa7fdfaea58ece5e8f990b7e3b2ba.zip |
Norme
Diffstat (limited to 'src/ft_draw_sprite.c')
-rw-r--r-- | src/ft_draw_sprite.c | 24 |
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; |