clang-format
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
#include "core/jgame.hpp"
|
||||
#include "core/jdraw8.hpp"
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
#include "core/jail_audio.hpp"
|
||||
#include "core/jdraw8.hpp"
|
||||
#include "core/jfile.hpp"
|
||||
#include "core/jgame.hpp"
|
||||
#include "game/defines.hpp"
|
||||
#include "game/info.hpp"
|
||||
#include "game/modulegame.hpp"
|
||||
#include "game/modulesequence.hpp"
|
||||
#include "game/options.hpp"
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
int main( int argc, char* args[] ) {
|
||||
int main(int argc, char* args[]) {
|
||||
srand(unsigned(time(NULL)));
|
||||
|
||||
srand( unsigned(time(NULL)) );
|
||||
// Crea la carpeta de configuració i carrega les opcions
|
||||
file_setconfigfolder("jailgames/aee");
|
||||
Options::setConfigFile(std::string(file_getconfigfolder()) + "config.yaml");
|
||||
Options::loadFromFile();
|
||||
|
||||
// Crea la carpeta de configuració i carrega les opcions
|
||||
file_setconfigfolder("jailgames/aee");
|
||||
Options::setConfigFile(std::string(file_getconfigfolder()) + "config.yaml");
|
||||
Options::loadFromFile();
|
||||
JG_Init();
|
||||
JD8_Init(Texts::WINDOW_TITLE);
|
||||
JA_Init(48000, SDL_AUDIO_S16, 2);
|
||||
|
||||
JG_Init();
|
||||
JD8_Init(Texts::WINDOW_TITLE);
|
||||
JA_Init(48000, SDL_AUDIO_S16, 2);
|
||||
info::num_habitacio = Options::game.habitacio_inicial;
|
||||
info::num_piramide = Options::game.piramide_inicial;
|
||||
info::diners = 0;
|
||||
info::diamants = 0;
|
||||
info::vida = Options::game.vides;
|
||||
info::momies = 0;
|
||||
info::nou_personatge = false;
|
||||
info::pepe_activat = false;
|
||||
|
||||
info::num_habitacio = Options::game.habitacio_inicial;
|
||||
info::num_piramide = Options::game.piramide_inicial;
|
||||
info::diners = 0;
|
||||
info::diamants = 0;
|
||||
info::vida = Options::game.vides;
|
||||
info::momies = 0;
|
||||
info::nou_personatge = false;
|
||||
info::pepe_activat = false;
|
||||
FILE* ini = fopen("trick.ini", "rb");
|
||||
if (ini != NULL) {
|
||||
info::nou_personatge = true;
|
||||
fclose(ini);
|
||||
}
|
||||
|
||||
FILE* ini = fopen("trick.ini", "rb");
|
||||
if (ini != NULL) {
|
||||
info::nou_personatge = true;
|
||||
fclose(ini);
|
||||
}
|
||||
int gameState = 1;
|
||||
|
||||
int gameState = 1;
|
||||
while (gameState != -1) {
|
||||
switch (gameState) {
|
||||
case 0:
|
||||
ModuleGame* moduleGame;
|
||||
moduleGame = new ModuleGame();
|
||||
gameState = moduleGame->Go();
|
||||
delete moduleGame;
|
||||
break;
|
||||
case 1:
|
||||
ModuleSequence* moduleSequence;
|
||||
moduleSequence = new ModuleSequence();
|
||||
gameState = moduleSequence->Go();
|
||||
delete moduleSequence;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (gameState != -1) {
|
||||
switch (gameState) {
|
||||
case 0:
|
||||
ModuleGame* moduleGame;
|
||||
moduleGame = new ModuleGame();
|
||||
gameState = moduleGame->Go();
|
||||
delete moduleGame;
|
||||
break;
|
||||
case 1:
|
||||
ModuleSequence* moduleSequence;
|
||||
moduleSequence = new ModuleSequence();
|
||||
gameState = moduleSequence->Go();
|
||||
delete moduleSequence;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Options::saveToFile();
|
||||
|
||||
Options::saveToFile();
|
||||
JA_Quit();
|
||||
JD8_Quit();
|
||||
JG_Finalize();
|
||||
|
||||
JA_Quit();
|
||||
JD8_Quit();
|
||||
JG_Finalize();
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user