From 937edea9599718e959f8ed135e97c68728855975 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 6 May 2023 12:22:50 +1000 Subject: Add solid environment collisions. --- game.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'game.c') diff --git a/game.c b/game.c index 00e4265..b3d40fb 100644 --- a/game.c +++ b/game.c @@ -87,7 +87,7 @@ static void menu_deinit(Game* game) { static void gameplay_init(Game* game) { init_world(&game->world); - init_map(&game->world.map); + init_map(&game->world.map, &game->world); init_player(&game->world.player, &game->world); new_skull(&game->world, 0, 0); } @@ -103,6 +103,7 @@ static void gameplay_update(Game* game) { collision_system(&game->world); animation_system(&game->world); render_map(&game->world.map, cx, cy); + update_camera(&game->world.player, &game->world); sprite_system(&game->world); } -- cgit v1.2.3-54-g00ecf