diff options
author | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 19:22:15 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 19:22:15 +0100 |
commit | fb98fd19ba9e27eb3a169a7599ce41fb0877b7a6 (patch) | |
tree | 2185933c9bde571819dfd480b48aa66459a30b2e /src/ft_drawsquare.c | |
parent | Solid map is better (diff) | |
download | 42-cub3d-fb98fd19ba9e27eb3a169a7599ce41fb0877b7a6.tar.gz 42-cub3d-fb98fd19ba9e27eb3a169a7599ce41fb0877b7a6.tar.bz2 42-cub3d-fb98fd19ba9e27eb3a169a7599ce41fb0877b7a6.tar.xz 42-cub3d-fb98fd19ba9e27eb3a169a7599ce41fb0877b7a6.tar.zst 42-cub3d-fb98fd19ba9e27eb3a169a7599ce41fb0877b7a6.zip |
Better code structure
Diffstat (limited to 'src/ft_drawsquare.c')
-rw-r--r-- | src/ft_drawsquare.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/ft_drawsquare.c b/src/ft_drawsquare.c deleted file mode 100644 index dd7cce7..0000000 --- a/src/ft_drawsquare.c +++ /dev/null @@ -1,37 +0,0 @@ -/* ************************************************************************** */ -/* LE - / */ -/* / */ -/* ft_drawsquare.c .:: .:/ . .:: */ -/* +:+:+ +: +: +:+:+ */ -/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */ -/* #+# #+ #+ #+# */ -/* Created: 2020/02/02 17:19:22 by rbousset #+# ## ## #+# */ -/* Updated: 2020/02/02 17:19:22 by rbousset ### #+. /#+ ###.fr */ -/* / */ -/* / */ -/* ************************************************************************** */ - -#include <cub3d.h> -#include <mlx.h> -#include <stdint.h> - -void - ft_drawsquare(int a, int b, int rgb, t_cub *clist) -{ - const uint16_t scale = clist->scale; - int x; - int y; - - x = a; - y = b; - while (x > a - scale) - { - while (y > b - scale) - { - *(int*)(clist->img.ptr + (x * 4 + (y * clist->img.sizeline))) = rgb; - y--; - } - y = b; - x--; - } -} |