summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index 665363d..62726ca 100644
--- a/src/game.c
+++ b/src/game.c
@@ -58,12 +58,15 @@ game_restart_scene(Game *this)
for (int x = 0; x < map_width(); x++) {
const int dx = x * TSIZE + TSIZE / 2;
const int dy = y * TSIZE + TSIZE / 2;
+ Entity *e;
switch (map_get(x, y)) {
case 2:
player_init(game_create_entity(this), dx, dy);
break;
+ case 3:
case 4:
- exit_init(game_create_entity(this), dx, dy);
+ e = exit_init(game_create_entity(this), dx, dy);
+ e->exit.dir = (map_get(x, y) == 3) ? -1 : 1;
break;
case 5:
spike_init(game_create_entity(this), dx, dy);