Limpieza de código. Añadida la última versión de jail_audio
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
#include "director.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#ifdef __MIPSEL__
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
// Constructor
|
||||
Director::Director(std::string path)
|
||||
@@ -28,20 +24,6 @@ Director::Director(std::string path)
|
||||
// Crea el puntero a la estructura y carga el fichero de configuración
|
||||
mOptions = new options_t;
|
||||
loadConfigFile();
|
||||
//if (!loadConfigFile())
|
||||
//{
|
||||
// mOptions->fullScreenMode = 0;
|
||||
// mOptions->windowSize = 3;
|
||||
// mOptions->language = en_UK;
|
||||
// mOptions->difficulty = DIFFICULTY_NORMAL;
|
||||
// mOptions->input[0].deviceType = INPUT_USE_KEYBOARD;
|
||||
// mOptions->input[1].deviceType = INPUT_USE_GAMECONTROLLER;
|
||||
// mOptions->filter = FILTER_NEAREST;
|
||||
// mOptions->vSync = true;
|
||||
// mOptions->screenHeight = SCREEN_HEIGHT;
|
||||
// mOptions->screenWidth = SCREEN_WIDTH;
|
||||
// mOptions->integerScale = true;
|
||||
//}
|
||||
|
||||
// Crea los objetos
|
||||
mInput = new Input(mFileList[53]);
|
||||
@@ -56,23 +38,8 @@ Director::Director(std::string path)
|
||||
initJailAudio();
|
||||
|
||||
// Aplica las opciones
|
||||
//SDL_SetWindowFullscreen(mWindow, mOptions->fullScreenMode);
|
||||
//SDL_SetWindowSize(mWindow, REAL_SCREEN_WIDTH * mOptions->windowSize, REAL_SCREEN_HEIGHT * mOptions->windowSize);
|
||||
mLang->setLang(mOptions->language);
|
||||
|
||||
|
||||
#ifdef __MIPSEL__
|
||||
DIR *dir = opendir("/media/data/local/home/.coffee_crisis");
|
||||
if (dir)
|
||||
{
|
||||
closedir(dir);
|
||||
}
|
||||
else if (ENOENT == errno)
|
||||
{
|
||||
int status = mkdir("/media/data/local/home/.coffee_crisis", 755);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Inicializa el resto de variables
|
||||
init(section);
|
||||
}
|
||||
@@ -118,15 +85,9 @@ void Director::init(Uint8 name)
|
||||
mInput->bindKey(INPUT_RIGHT, SDL_SCANCODE_RIGHT);
|
||||
mInput->bindKey(INPUT_ACCEPT, SDL_SCANCODE_RETURN);
|
||||
mInput->bindKey(INPUT_CANCEL, SDL_SCANCODE_ESCAPE);
|
||||
#ifdef __MIPSEL__
|
||||
mInput->bindKey(INPUT_BUTTON_1, SDL_SCANCODE_LSHIFT);
|
||||
mInput->bindKey(INPUT_BUTTON_2, SDL_SCANCODE_SPACE);
|
||||
mInput->bindKey(INPUT_BUTTON_3, SDL_SCANCODE_LCTRL);
|
||||
#else
|
||||
mInput->bindKey(INPUT_BUTTON_1, SDL_SCANCODE_Q);
|
||||
mInput->bindKey(INPUT_BUTTON_2, SDL_SCANCODE_W);
|
||||
mInput->bindKey(INPUT_BUTTON_3, SDL_SCANCODE_E);
|
||||
#endif
|
||||
mInput->bindKey(INPUT_BUTTON_PAUSE, SDL_SCANCODE_ESCAPE); // PAUSE
|
||||
mInput->bindKey(INPUT_BUTTON_ESCAPE, SDL_SCANCODE_ESCAPE); // ESCAPE
|
||||
|
||||
@@ -217,16 +178,10 @@ void Director::setFileList()
|
||||
for (int i = 0; i < MAX_FILE_LIST; i++)
|
||||
mFileList[i] = "";
|
||||
|
||||
// Ficheros binarios
|
||||
#ifdef __MIPSEL__
|
||||
mFileList[0] = "/media/data/local/home/.coffee_crisis/score.bin";
|
||||
mFileList[1] = "/media/data/local/home/.coffee_crisis/demo.bin";
|
||||
mFileList[2] = "/media/data/local/home/.coffee_crisis/config.bin";
|
||||
#else
|
||||
// Ficheros binarios
|
||||
mFileList[0] = mExecutablePath + "/" + "../data/score.bin";
|
||||
mFileList[1] = mExecutablePath + "/" + "../data/demo.bin";
|
||||
mFileList[2] = mExecutablePath + "/" + "../data/config.bin";
|
||||
#endif
|
||||
|
||||
// Musicas
|
||||
mFileList[3] = mExecutablePath + "/" + "../media/music/intro.ogg";
|
||||
|
||||
Reference in New Issue
Block a user