summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
index 31ac01b..40319d5 100644
--- a/src/game.c
+++ b/src/game.c
@@ -41,6 +41,7 @@ game_update(Game *this)
if (e->type != ET_NONE && e->update != NULL)
e->update(e, this);
}
+ this->show_ui -= (this->show_ui > 0);
}
void
@@ -52,12 +53,15 @@ game_draw(Game *this)
if (e->type != ET_NONE && e->draw != NULL)
e->draw(e, this);
}
+ if (this->show_ui)
+ map_draw_ui();
}
void
game_restart_scene(Game *this)
{
memset(this->entities, 0, sizeof(this->entities));
+ this->show_ui = 30;
for (int y = 0; y < map_height(); y++)
for (int x = 0; x < map_width(); x++) {
const int dx = x * TSIZE + TSIZE / 2;