forked from jaildesigner-jailgames/jaildoctors_dilemma
Borradas clases que no se utilizaban
This commit is contained in:
@@ -21,16 +21,12 @@ Director::Director(std::string path)
|
||||
if (!mAsset->check())
|
||||
section = SECTION_PROG_QUIT;
|
||||
|
||||
// Inicializa el objeto de idioma
|
||||
mLang = new Lang(mAsset);
|
||||
|
||||
// Crea el puntero a la estructura y carga el fichero de configuración
|
||||
mOptions = new options_t;
|
||||
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;
|
||||
@@ -50,7 +46,6 @@ Director::Director(std::string path)
|
||||
// Aplica las opciones
|
||||
SDL_SetWindowFullscreen(mWindow, mOptions->fullScreenMode);
|
||||
SDL_SetWindowSize(mWindow, SCREEN_WIDTH * mOptions->windowSize, SCREEN_HEIGHT * mOptions->windowSize);
|
||||
mLang->setLang(mOptions->language);
|
||||
|
||||
// Inicializa el resto de variables
|
||||
init(section);
|
||||
@@ -63,9 +58,6 @@ Director::~Director()
|
||||
delete mInput;
|
||||
mInput = nullptr;
|
||||
|
||||
delete mLang;
|
||||
mLang = nullptr;
|
||||
|
||||
delete mOptions;
|
||||
mOptions = nullptr;
|
||||
|
||||
@@ -87,9 +79,6 @@ void Director::init(Uint8 name)
|
||||
mSection.name = name;
|
||||
mSection.subsection = 0;
|
||||
|
||||
// Textos
|
||||
mLang->setLang(mOptions->language);
|
||||
|
||||
// Controles
|
||||
mInput->bindKey(INPUT_UP, SDL_SCANCODE_UP);
|
||||
mInput->bindKey(INPUT_DOWN, SDL_SCANCODE_DOWN);
|
||||
@@ -221,7 +210,6 @@ bool Director::loadConfigFile()
|
||||
// Pone unos valores por defecto
|
||||
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;
|
||||
@@ -286,8 +274,6 @@ bool Director::loadConfigFile()
|
||||
mOptions->fullScreenMode = 0;
|
||||
if ((mOptions->windowSize < 1) || (mOptions->windowSize > 4))
|
||||
mOptions->windowSize = 3;
|
||||
if ((mOptions->language < 0) || (mOptions->language > MAX_LANGUAGES))
|
||||
mOptions->language = en_UK;
|
||||
|
||||
// Cierra el fichero
|
||||
SDL_RWclose(file);
|
||||
@@ -365,7 +351,7 @@ void Director::runTitle()
|
||||
|
||||
void Director::runGame()
|
||||
{
|
||||
mGame = new Game(mWindow, mRenderer, mAsset, mLang, mInput);
|
||||
mGame = new Game(mWindow, mRenderer, mAsset, mInput);
|
||||
setSection(mGame->run());
|
||||
delete mGame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user