forked from jaildesigner-jailgames/jaildoctors_dilemma
Transició a surface acabada. Ja compila
This commit is contained in:
@@ -149,15 +149,14 @@ void LoadingScreen::renderBorder()
|
||||
{
|
||||
// Pinta el borde de colro azul
|
||||
Uint8 color = stringToColor("blue");
|
||||
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), color.r, color.g, color.b, 0xFF);
|
||||
SDL_RenderClear(Screen::get()->getRenderer());
|
||||
Screen::get()->clear(color);
|
||||
|
||||
// Añade lineas amarillas
|
||||
color = stringToColor("yellow");
|
||||
SDL_SetRenderDrawColor(Screen::get()->getRenderer(), color.r, color.g, color.b, 0xFF);
|
||||
const int WIDTH = options.game.width + (options.video.border.width * 2);
|
||||
const int HEIGHT = options.game.height + (options.video.border.height * 2);
|
||||
bool drawEnabled = rand() % 2 == 0 ? true : false;
|
||||
auto surface = Screen::get()->getRenderSurfaceData();
|
||||
|
||||
int row = 0;
|
||||
while (row < HEIGHT)
|
||||
@@ -167,7 +166,7 @@ void LoadingScreen::renderBorder()
|
||||
{
|
||||
for (int i = row; i < row + ROW_HEIGHT; ++i)
|
||||
{
|
||||
SDL_RenderDrawLine(Screen::get()->getRenderer(), 0, i, WIDTH, i);
|
||||
screen_surface_->drawLine(surface, 0, i, WIDTH, i, color);
|
||||
}
|
||||
}
|
||||
row += ROW_HEIGHT;
|
||||
@@ -221,7 +220,7 @@ void LoadingScreen::run()
|
||||
|
||||
// Limpia la pantalla
|
||||
Screen::get()->start();
|
||||
Screen::get()->clean();
|
||||
Screen::get()->clear();
|
||||
Screen::get()->render();
|
||||
|
||||
while (options.section.section == Section::LOADING_SCREEN)
|
||||
|
||||
Reference in New Issue
Block a user