Actualizado renderGame y screen.h
This commit is contained in:
@@ -442,16 +442,18 @@ void Director::updateGame()
|
||||
// Pinta la sección de juego
|
||||
void Director::renderGame()
|
||||
{
|
||||
// Prepara para empezar a dibujar el frame
|
||||
screen->start();
|
||||
|
||||
// Limpia la pantalla
|
||||
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
|
||||
SDL_RenderClear(renderer);
|
||||
screen->clean();
|
||||
|
||||
// Dibuja los objetos
|
||||
map->render();
|
||||
player->render();
|
||||
|
||||
// Muestra el backbuffer en pantalla
|
||||
SDL_RenderPresent(renderer);
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
screen->blit();
|
||||
}
|
||||
|
||||
// Bucle principal
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
~Screen();
|
||||
|
||||
// Limpia la pantalla
|
||||
void clean(color_t color);
|
||||
void clean(color_t color = {0x00, 0x00, 0x00});
|
||||
|
||||
// Prepara para empezar a dibujar en la textura de juego
|
||||
void start();
|
||||
|
||||
Reference in New Issue
Block a user