summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index cf517b6..f7352f4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,16 +6,21 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/08 14:14:13 by dkaiser #+# #+# */
-/* Updated: 2024/05/10 10:53:37 by dkaiser ### ########.fr */
+/* Updated: 2024/05/11 15:58:31 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
-int main(void)
+int main(int argc, char *argv[])
{
t_game game;
+ if (argc != 2)
+ return (1);
+ if (load_map_from_file(&game.map, argv[1]))
+ return (1);
init(&game);
+ draw_map(&game);
mlx_loop(game.mlx);
}