forked from jaildesigner-jailgames/jaildoctors_dilemma
Transició a surface: vaig per title.cpp
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <SDL2/SDL_stdinc.h> // for Uint32
|
||||
#include <SDL2/SDL_video.h> // for SDL_Window
|
||||
#include "utils.h" // for Color
|
||||
#include "surface.h" // for Surface
|
||||
#include <memory> // for shared_ptr
|
||||
|
||||
// Tipos de filtro
|
||||
enum class ScreenFilter : Uint32
|
||||
@@ -24,12 +26,12 @@ private:
|
||||
static Screen *screen_;
|
||||
|
||||
// Objetos y punteros
|
||||
SDL_Window *window_; // Ventana de la aplicación
|
||||
SDL_Renderer *renderer_; // El renderizador de la ventana
|
||||
SDL_Texture *surface_texture_; // Textura donde se dibuja el juego
|
||||
SDL_Texture *game_texture_; // Textura donde se dibuja el juego
|
||||
SDL_Texture *border_texture_; // Textura donde se dibuja el borde del juego
|
||||
// std::shared_ptr<Surface> surface_; // Objeto para trabajar con surfaces
|
||||
SDL_Window *window_; // Ventana de la aplicación
|
||||
SDL_Renderer *renderer_; // El renderizador de la ventana
|
||||
SDL_Texture *surface_texture_; // Textura donde se dibuja el juego
|
||||
SDL_Texture *game_texture_; // Textura donde se dibuja el juego
|
||||
SDL_Texture *border_texture_; // Textura donde se dibuja el borde del juego
|
||||
std::shared_ptr<Surface> surface_; // Objeto para trabajar con surfaces
|
||||
|
||||
// Variables
|
||||
int window_width_; // Ancho de la pantalla o ventana
|
||||
@@ -57,7 +59,7 @@ private:
|
||||
|
||||
// Reinicia los shaders
|
||||
void resetShaders();
|
||||
|
||||
|
||||
// Constructor
|
||||
Screen(SDL_Window *window, SDL_Renderer *renderer);
|
||||
|
||||
@@ -132,7 +134,7 @@ public:
|
||||
|
||||
// Getters
|
||||
SDL_Renderer *getRenderer() { return renderer_; }
|
||||
// std::shared_ptr<SurfaceData> getSurface() { return surface_->getSurface(); }
|
||||
std::shared_ptr<SurfaceData> getSurface() { return surface_->getSurface(); }
|
||||
SDL_Texture *getGameTexture() { return game_texture_; };
|
||||
SDL_Texture *getBorderTexture() { return border_texture_; }
|
||||
};
|
||||
Reference in New Issue
Block a user