Trabajando en prog.cpp
This commit is contained in:
@@ -2,14 +2,63 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <string>
|
||||
#include "asset.h"
|
||||
#include "jail_audio.h"
|
||||
#include "game.h"
|
||||
#include "input.h"
|
||||
#include "utils.h"
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef PROG_H
|
||||
#define PROG_H
|
||||
|
||||
#define WINDOW_CAPTION "Volcano"
|
||||
#define WINDOW_WIDTH 320
|
||||
#define WINDOW_HEIGHT 240
|
||||
#define GAME_WIDTH 320
|
||||
#define GAME_HEIGHT 240
|
||||
|
||||
|
||||
class Prog
|
||||
{
|
||||
private:
|
||||
Asset *asset;
|
||||
SDL_Window *window; // La ventana donde dibujamos
|
||||
SDL_Renderer *renderer; // El renderizador de la ventana
|
||||
Asset *asset; // Objeto encargado de gestionar los ficheros de recursos
|
||||
Screen *screen; // Objeto encargado de dibujar en pantalla
|
||||
Game *game; // Objeto para la sección del juego
|
||||
Input *input; // Objeto Input para gestionar las entradas
|
||||
section_t section; // Sección y subsección actual del programa;
|
||||
struct options_t *options; // Contiene las opciones del programa
|
||||
|
||||
// Inicializa jail_audio
|
||||
void initJailAudio();
|
||||
|
||||
// Arranca SDL y crea la ventana
|
||||
bool initSDL();
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user