aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_parse_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-02-04 23:45:21 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-02-04 23:45:21 +0100
commit20a7a10c762d2d81d3f749d08d4da3f56a045dce (patch)
tree0e04d3d6b0828b4b65e1bb4d49b464678492b03d /src/ft_parse_map.c
parentPretty good (diff)
download42-cub3d-20a7a10c762d2d81d3f749d08d4da3f56a045dce.tar.gz
42-cub3d-20a7a10c762d2d81d3f749d08d4da3f56a045dce.tar.bz2
42-cub3d-20a7a10c762d2d81d3f749d08d4da3f56a045dce.tar.xz
42-cub3d-20a7a10c762d2d81d3f749d08d4da3f56a045dce.tar.zst
42-cub3d-20a7a10c762d2d81d3f749d08d4da3f56a045dce.zip
Scale
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r--src/ft_parse_map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index 29f2c43..f5e491f 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stdint.h>
static void
ft_check_cub(const char *map_path, t_cub *clist)
@@ -118,6 +119,8 @@ void
ft_check_map_last_line(clist);
ft_get_player_spawn(clist->plist, clist);
ft_check_missing(clist);
+ clist->scale = ((uint16_t)clist->wlist->x_size /
+ (uint16_t)clist->map_w) - 2;
ft_print_list(clist);
close(fd);
}