forked from jaildesigner-jailgames/jaildoctors_dilemma
i per fi ja comença a tornar tot a la normalitat
This commit is contained in:
@@ -75,13 +75,14 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer)
|
||||
}
|
||||
|
||||
// Crea la surface donde se dibujan los graficos del juego
|
||||
game_surface_ = std::make_shared<Surface>(nullptr, options.game.width, options.game.height);
|
||||
game_surface_ = std::make_shared<Surface>(options.game.width, options.game.height);
|
||||
game_surface_->loadPalette(palettes_.front());
|
||||
|
||||
// Crea la surface donde se dibujan los graficos del juego
|
||||
border_surface_ = std::make_shared<Surface>(nullptr, options.game.width + options.video.border.width * 2, options.game.height + options.video.border.height * 2);
|
||||
border_surface_ = std::make_shared<Surface>(options.game.width + options.video.border.width * 2, options.game.height + options.video.border.height * 2);
|
||||
border_surface_->loadPalette(palettes_.front());
|
||||
|
||||
// Establece la surface que actuará como renderer para recibir las llamadas a render()
|
||||
renderer_surface_ = std::make_shared<std::shared_ptr<Surface>>(game_surface_);
|
||||
|
||||
// Establece el modo de video
|
||||
@@ -127,11 +128,12 @@ void Screen::startDrawOnBorder()
|
||||
// Vuelca el contenido del renderizador en pantalla
|
||||
void Screen::render()
|
||||
{
|
||||
// Renderiza sobre game_surface_ los overlays
|
||||
//renderNotifications();
|
||||
|
||||
// Copia la surface a game_texture_
|
||||
game_surface_->copyToTexture(renderer_, game_texture_);
|
||||
|
||||
// Renderiza sobre gameCanvas los overlays
|
||||
// renderNotifications();
|
||||
|
||||
// Si está el borde activo, vuelca gameCanvas sobre borderCanvas
|
||||
if (options.video.border.enabled)
|
||||
@@ -381,9 +383,7 @@ void Screen::resetShaders()
|
||||
// Establece el renderizador para las surfaces
|
||||
void Screen::setRendererSurface(std::shared_ptr<Surface> surface)
|
||||
{
|
||||
(surface) ?
|
||||
renderer_surface_ = std::make_shared<std::shared_ptr<Surface>>(surface):
|
||||
renderer_surface_ = std::make_shared<std::shared_ptr<Surface>>(game_surface_);
|
||||
(surface) ? renderer_surface_ = std::make_shared<std::shared_ptr<Surface>>(surface) : renderer_surface_ = std::make_shared<std::shared_ptr<Surface>>(game_surface_);
|
||||
}
|
||||
|
||||
// Cambia la paleta
|
||||
|
||||
Reference in New Issue
Block a user