forked from jaildesigner-jailgames/jaildoctors_dilemma
79 lines
1.6 KiB
C++
79 lines
1.6 KiB
C++
#pragma once
|
|
#include <SDL2/SDL.h>
|
|
#include "sprite.h"
|
|
#include "movingsprite.h"
|
|
#include "text.h"
|
|
#include "menu.h"
|
|
|
|
#include "jail_audio.h"
|
|
#include "utils.h"
|
|
#include "input.h"
|
|
#include "game.h"
|
|
#include "asset.h"
|
|
#include "const.h"
|
|
|
|
#ifndef DIRECTOR_H
|
|
#define DIRECTOR_H
|
|
|
|
// Director
|
|
class Director
|
|
{
|
|
private:
|
|
SDL_Window *window; // La ventana donde dibujamos
|
|
SDL_Renderer *renderer; // El renderizador de la ventana
|
|
Screen *screen; // Objeto encargado de dibujar en pantalla
|
|
Input *input; // Objeto Input para gestionar las entradas
|
|
Game *game; // Objeto para la sección del juego
|
|
Asset *asset; // Objeto que gestiona todos los ficheros de recursos
|
|
|
|
struct options_t *options; // Variable con todas las opciones del programa
|
|
|
|
std::string executablePath; // Path del ejecutable
|
|
section_t section; // Sección y subsección actual del programa;
|
|
|
|
// Inicializa jail_audio
|
|
void initJailAudio();
|
|
|
|
// Arranca SDL y crea la ventana
|
|
bool initSDL();
|
|
|
|
// Inicializa el objeto Input
|
|
void initInput();
|
|
|
|
// Crea el indice de ficheros
|
|
bool setFileList();
|
|
|
|
// Obtiene el valor de la variable
|
|
Uint8 getSubsection();
|
|
|
|
// Obtiene el valor de la variable
|
|
Uint8 getSection();
|
|
|
|
// Establece el valor de la variable
|
|
void setSection(section_t section);
|
|
|
|
// Ejecuta la seccion de juego con el logo
|
|
void runLogo();
|
|
|
|
// Ejecuta la seccion de juego de la introducción
|
|
void runIntro();
|
|
|
|
// Ejecuta la seccion de juego con el titulo y los menus
|
|
void runTitle();
|
|
|
|
// Ejecuta la seccion de juego donde se juega
|
|
void runGame();
|
|
|
|
public:
|
|
// Constructor
|
|
Director(std::string path);
|
|
|
|
// Destructor
|
|
~Director();
|
|
|
|
// Bucle principal
|
|
void run();
|
|
};
|
|
|
|
#endif
|