La sección del programa se controla ahora mediante un puntero a una variable

This commit is contained in:
2023-09-23 00:02:49 +02:00
parent 337e6ed6cc
commit 9513a6c57e
16 changed files with 179 additions and 201 deletions

View File

@@ -24,11 +24,11 @@ private:
Texture *texture; // Textura con los graficos
SDL_Event *eventHandler; // Manejador de eventos
Sprite *sprite; // Sprite con la textura del logo
section_t *section; // Estado del bucle principal para saber si continua o se sale
// Variables
Uint32 ticks; // Contador de ticks para ajustar la velocidad del programa
Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa
section_t section; // Estado del bucle principal para saber si continua o se sale
int counter; // Contador
// Actualiza las variables del objeto
@@ -51,13 +51,13 @@ private:
public:
// Constructor
Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input);
Logo(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, section_t *section);
// Destructor
~Logo();
// Bucle principal
section_t run();
void run();
};
#endif