diff --git a/src/game.c b/src/game.c index 4898846..503b331 100644 --- a/src/game.c +++ b/src/game.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -78,8 +79,6 @@ void game_render_indicator(Game *game) { } void game_draw(Game *game) { - /* Draw everything. */ - dclear(C_WHITE); map_render_by_layer(game, BACKGROUND); npc_draw(game); player_draw(game); @@ -89,6 +88,7 @@ void game_draw(Game *game) { dprint(8, 16, C_BLACK, "Mana: %d", game->mana); } + /* Key management */ void game_get_inputs(Game *game) { diff --git a/src/main.c b/src/main.c index 8dde42b..fd1256a 100644 --- a/src/main.c +++ b/src/main.c @@ -120,12 +120,11 @@ int main(void) { #endif do { - /* clear screen */ - dclear(C_WHITE); - - /* render the map */ + /*clears & renders everything */ game_draw(&game); + dprint(0,30,0,"draw time : %d", game.frame_duration); + #if DEBUGMODE && GINT_RENDER_RGB if(game.debug_map) { dfont(NULL);