57 lines
1016 B
C++
57 lines
1016 B
C++
/*
|
|
|
|
Volcano (abans "Rise of the Bal1")
|
|
Programat i dissenyat per
|
|
Sergio Valor @JailDesigner
|
|
Editor, música i suport técnic per
|
|
Raimon Zamora @JailDoc
|
|
Gràfics per
|
|
Diego Valor @JailBrother
|
|
Començat un 19 de febrer de 2016
|
|
Repres un 14 de febrer de 2021
|
|
|
|
*/
|
|
|
|
#include "ifdefs.h"
|
|
#include <time.h>
|
|
#include <stdio.h>
|
|
#include <string>
|
|
#include "const.h"
|
|
#include "game.h"
|
|
|
|
int main(int argc, char *args[])
|
|
{
|
|
// Inicia el generador de numeros aleatorios
|
|
srand(time(nullptr));
|
|
|
|
// Crea el objeto game
|
|
Game *game = new Game();
|
|
|
|
// Establece el valor de la variable con el path del ejecutable
|
|
game->setPath(args[0]);
|
|
|
|
// Inicializa la lista de ficheros
|
|
game->setFileList();
|
|
|
|
// Comprueba que existen todos los ficheros
|
|
if (!game->checkFileList())
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
// Arranca SDL y crea la ventana
|
|
if (!game->initSDL())
|
|
{
|
|
printf("Failed to initialize!\n");
|
|
return -1;
|
|
}
|
|
else
|
|
{
|
|
// Libera todos los recursos y cierra SDL
|
|
delete game;
|
|
printf("Shutting down the game...\n");
|
|
|
|
return 0;
|
|
}
|
|
}
|