gonna fer un commit per si reventa algo: estic a meitat implementar surfaces

This commit is contained in:
2025-02-28 22:58:01 +01:00
parent 5bb2b5e7c4
commit 5ff04daf20
14 changed files with 511 additions and 157 deletions

View File

@@ -1,18 +1,18 @@
#pragma once
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <memory> // for shared_ptr
#include <string> // for string
#include <vector> // for vector
#include "paleta.h" // for jSurface
class Input; // lines 13-13
class Resource; // lines 14-14
class Screen; // lines 15-15
class Sprite; // lines 16-16
class Text; // lines 17-17
class Texture; // lines 18-18
#include <SDL2/SDL_rect.h> // for SDL_Rect
#include <SDL2/SDL_render.h> // for SDL_Renderer, SDL_Texture
#include <SDL2/SDL_stdinc.h> // for Uint32
#include <memory> // for shared_ptr
#include <string> // for string
#include <vector> // for vector
#include "paleta.h" // for jSurface
class Input; // lines 13-13
class Resource; // lines 14-14
class Screen; // lines 15-15
class Sprite; // lines 16-16
class Text; // lines 17-17
class Texture; // lines 18-18
class Title
{
@@ -32,13 +32,13 @@ private:
};
// Objetos y punteros
Screen *screen_; // Objeto encargado de dibujar en pantalla
SDL_Renderer *renderer_; // El renderizador de la ventana
Resource *resource_; // Objeto con los recursos
Input *input_; // Objeto pata gestionar la entrada
Screen *screen_; // Objeto encargado de dibujar en pantalla
SDL_Renderer *renderer_; // El renderizador de la ventana
Resource *resource_; // Objeto con los recursos
Input *input_; // Objeto pata gestionar la entrada
std::shared_ptr<Texture> texture_; // Textura con los graficos
std::shared_ptr<Sprite> sprite_; // Sprite para manejar la textura
SDL_Texture *bg_texture_; // Textura para dibujar el fondo de la pantalla
SDL_Texture *bg_texture_; // Textura para dibujar el fondo de la pantalla
std::shared_ptr<Text> text_; // Objeto para escribir texto en pantalla
std::shared_ptr<Text> info_text_; // Objeto para escribir texto en pantalla
std::shared_ptr<Texture> cheevos_texture_; // Textura con la lista de logros
@@ -53,7 +53,7 @@ private:
bool show_cheevos_ = false; // Indica si se muestra por pantalla el listado de logros
SDL_Rect cheevos_texture_view_; // Zona visible de la textura con el listado de logros
states_e state_; // Estado en el que se encuentra el bucle principal
jSurface loading_screen_; // Surface con los gráficos de la pantalla de carga
jSurface loading_screen_; // Surface con los gráficos de la pantalla de carga
// Actualiza las variables
void update();