aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--map/map_vim.cub25
-rw-r--r--src/ft_get_map.c3
-rw-r--r--src/main.c2
3 files changed, 27 insertions, 3 deletions
diff --git a/map/map_vim.cub b/map/map_vim.cub
new file mode 100644
index 0000000..face56c
--- /dev/null
+++ b/map/map_vim.cub
@@ -0,0 +1,25 @@
+R 1200 600
+
+NO ./path_to_the_north_texture
+SO ./path_to_the_south_texture
+EA ./path_to_the_east_texture
+WE ./path_to_the_west_texture
+S ./path_to_the_sprite_texture
+
+F 220,100,0
+C 225,30,0
+
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
+1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 2 0 0 0 0 0 1 0 0 0 1
+1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
+1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
+1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 1
+1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1
+1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1
+1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1
+1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1
+1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1
+1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 N 0 1
+1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 1
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
diff --git a/src/ft_get_map.c b/src/ft_get_map.c
index b64da72..a0ddfbb 100644
--- a/src/ft_get_map.c
+++ b/src/ft_get_map.c
@@ -82,10 +82,9 @@ int
i = 1;
ret = 1;
- while (ret > 0)
+ while ((ret = get_next_line(fd, &line)) > 0)
{
clist->line_chk += 1;
- ret = get_next_line(fd, &line);
if (!line[0] || ft_check_map_line(line, 0, clist) < 0
|| ft_cat_mapl(line, i, clist) < 0)
{
diff --git a/src/main.c b/src/main.c
index b9f4514..a660128 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,7 +31,7 @@ int
ft_memdel((void**)&clist);
return (1);
}
- ft_parse_map("map/map_one.cub", clist);
+ ft_parse_map("map/map_vim.cub", clist);
if (ft_init_winlx(clist) < 0)
return (ft_exit(3, clist));
mlx_key_hook(clist->wlist->winptr, ft_key_event, clist);