summaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/init.c b/src/init.c
index 40f15f1..524e2ab 100644
--- a/src/init.c
+++ b/src/init.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/09 14:50:09 by dkaiser #+# #+# */
-/* Updated: 2024/05/20 18:31:33 by dkaiser ### ########.fr */
+/* Updated: 2024/05/29 16:16:13 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,10 +18,9 @@ static void init_player(t_game *game);
int init(t_game *game)
{
- game->mlx = mlx_init(1920, 1080, "so_long", false);
- // TODO: make size and title dynamic
game->input_direction = ZERO;
game->map.tile_size = (t_ivector){48, 48};
+ game->mlx = mlx_init(game->map.grid_size.x * game->map.tile_size.x, game->map.grid_size.y * game->map.tile_size.y, "so_long", false);
init_hooks(game);
init_player(game);
return (0);