Optimisation du rendu

This commit is contained in:
attilavs2 2024-07-30 17:49:40 +02:00
parent 5eb1d18ea7
commit 1daa58723c
2 changed files with 5 additions and 6 deletions

View file

@ -7,6 +7,7 @@
#include <gint/cpu.h>
#include <gint/display.h>
#include <gint/keyboard.h>
#include <libprof.h>
#include <stdlib.h>
#include <string.h>
@ -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) {

View file

@ -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);