forked from jaildesigner-jailgames/jaildoctors_dilemma
Commit to continue on other pc
This commit is contained in:
109
source/director.h
Normal file
109
source/director.h
Normal file
@@ -0,0 +1,109 @@
|
||||
#pragma once
|
||||
#include "ifdefs.h"
|
||||
#include "sprite.h"
|
||||
#include "movingsprite.h"
|
||||
#include "smartsprite.h"
|
||||
#include "player.h"
|
||||
#include "balloon.h"
|
||||
#include "bullet.h"
|
||||
#include "coffeedrop.h"
|
||||
#include "item.h"
|
||||
#include "text.h"
|
||||
#include "writer.h"
|
||||
#include "menu.h"
|
||||
#include "const.h"
|
||||
#include "jail_audio.h"
|
||||
#include "utils.h"
|
||||
#include "logo.h"
|
||||
#include "intro.h"
|
||||
#include "title.h"
|
||||
#include "game.h"
|
||||
#include "input.h"
|
||||
#include "fade.h"
|
||||
//#include <math.h>
|
||||
|
||||
#ifndef DIRECTOR_H
|
||||
#define DIRECTOR_H
|
||||
|
||||
#define MAX_FILE_LIST 100
|
||||
|
||||
// Director
|
||||
class Director
|
||||
{
|
||||
private:
|
||||
SDL_Window *mWindow; // La ventana donde dibujamos
|
||||
SDL_Renderer *mRenderer; // El renderizador de la ventana
|
||||
|
||||
Logo *mLogo; // Objeto para la sección del logo
|
||||
Intro *mIntro; // Objeto para la sección de la intro
|
||||
Title *mTitle; // Objeto para la sección del titulo y el menu de opciones
|
||||
Game *mGame; // Objeto para la sección del juego
|
||||
Input *mInput; // Objeto Input para gestionar las entradas
|
||||
Lang *mLang; // Objeto para gestionar los textos en diferentes idiomas
|
||||
|
||||
std::string mFileList[MAX_FILE_LIST]; // Vector con las rutas a los ficheros de recursos
|
||||
struct options_t *mOptions; // Variable con todas las opciones del programa
|
||||
|
||||
std::string mExecutablePath; // Path del ejecutable
|
||||
section_t mSection; // Sección y subsección actual del programa;
|
||||
|
||||
// Inicializa jail_audio
|
||||
void initJailAudio();
|
||||
|
||||
// Arranca SDL y crea la ventana
|
||||
bool initSDL();
|
||||
|
||||
// Crea el indice de ficheros
|
||||
void setFileList();
|
||||
|
||||
// Comprueba que todos los ficheros existen
|
||||
bool checkFileList();
|
||||
|
||||
// Carga el fichero de configuración
|
||||
bool loadConfigFile();
|
||||
|
||||
// Guarda el fichero de configuración
|
||||
bool saveConfigFile();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setExecutablePath(std::string path);
|
||||
|
||||
// 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();
|
||||
|
||||
// Comprueba los ficheros del vector de ficheros que coinciden con una ruta dada
|
||||
bool checkFolder(std::string name, std::string path);
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Director(std::string path);
|
||||
|
||||
// Destructor
|
||||
~Director();
|
||||
|
||||
// Inicia las variables necesarias para arrancar el programa
|
||||
void init(Uint8 name);
|
||||
|
||||
// Bucle principal
|
||||
void run();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user