Finalizada la primera implementación funcional de la clase screen

This commit is contained in:
2021-09-09 17:18:34 +02:00
parent 850b4e2a12
commit 37325a2ec3
5 changed files with 66 additions and 45 deletions

View File

@@ -92,15 +92,17 @@ section_t Game::run()
}
}
// Limpia la pantalla
mScreen->clean();
// Prepara para dibujar el frame
const color_t color = {0xAA, 0x55, 0x55};
mScreen->start();
mScreen->clean(color);
// Medidas de ancho y alto de la pantalla
mText->writeCentered(SCREEN_CENTER_X, 0, std::to_string(SCREEN_WIDTH), -1);
mText->write(0, SCREEN_CENTER_Y - (mText->getCharacterWidth() / 2), std::to_string(SCREEN_HEIGHT), -1);
// Escribe las medidas de ancho y alto de la pantalla
mText->writeCentered(GAMECANVAS_CENTER_X, 0, std::to_string(GAMECANVAS_WIDTH), -1);
mText->write(0, GAMECANVAS_CENTER_Y - (mText->getCharacterWidth() / 2), std::to_string(GAMECANVAS_HEIGHT), -1);
// Texto en el centro de la pantalla
mText->writeCentered(SCREEN_CENTER_X, SCREEN_CENTER_Y - (mText->getCharacterWidth() / 2), "Pepe el Cazavampiros", -1);
mText->writeCentered(GAMECANVAS_CENTER_X, GAMECANVAS_CENTER_Y - (mText->getCharacterWidth() / 2), "Pepe el Cazavampiros", -1);
// Actualiza la pantalla
mScreen->blit();