Trabajando en el ending

This commit is contained in:
2022-11-03 12:42:11 +01:00
parent d514ed451f
commit c6779bfd77
4 changed files with 155 additions and 21 deletions

View File

@@ -20,16 +20,17 @@ class Ending
{
private:
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
Resource *resource; // Objeto con los recursos
Asset *asset; // Objeto con los ficheros de recursos
options_t *options; // Puntero a las opciones del juego
SDL_Event *eventHandler; // Manejador de eventos
Text *text; // Objeto para escribir texto en pantalla
SDL_Texture *textTexture; // Textura para dibujar el texto
SDL_Texture *coverTexture; // Textura para cubrir el texto
AnimatedSprite *sprite; // Sprite para el brillo del corazón
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
Resource *resource; // Objeto con los recursos
Asset *asset; // Objeto con los ficheros de recursos
options_t *options; // Puntero a las opciones del juego
SDL_Event *eventHandler; // Manejador de eventos
Text *text; // Objeto para escribir texto en pantalla
SDL_Texture *canvasTexture; // Textura para dibujar el texto y los dibujos
SDL_Texture *coverTexture; // Textura para cubrir el texto
Texture *texture; // Textura con los graficos
Sprite *sprite; // Sprite para dibujar las imagenes
// Variables
int counter; // Contador
@@ -37,6 +38,8 @@ private:
Uint32 ticks; // Contador de ticks para ajustar la velocidad del programa
Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa
std::vector<std::string> texts; // Vector con los textos
int scene; // Escena actual
std::vector<int> sceneLenght; // Duracion de cada escena
// Actualiza el objeto
void update();
@@ -47,6 +50,12 @@ private:
// Comprueba el manejador de eventos
void checkEventHandler();
// Inicializa los textos
void iniTexts();
// Rellena la textura segun la escena
void fillTexture();
public:
// Constructor
Ending(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *asset, options_t *options);