aboutsummaryrefslogtreecommitdiff
path: root/game.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-06 12:22:50 +1000
committerquou <quou@disroot.org>2023-05-06 12:22:50 +1000
commit937edea9599718e959f8ed135e97c68728855975 (patch)
treeea5d5551b470603d2d907dba4869ff52e742d9de /game.c
parent91aef268319a77ee8f5a082ca89264bf2671e212 (diff)
Add solid environment collisions.
Diffstat (limited to 'game.c')
-rw-r--r--game.c3
1 files changed, 2 insertions, 1 deletions
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);
}