Eliminada la classe Lang
This commit is contained in:
@@ -73,8 +73,7 @@ Director::Director(int argc, char *argv[])
|
||||
dbg_init(renderer);
|
||||
|
||||
// Crea los objetos
|
||||
lang = new Lang(asset);
|
||||
lang->setLang(options->game.language);
|
||||
lang::loadFromFile(asset->get("ba_BA.txt"));
|
||||
|
||||
input = new Input(asset->get("gamecontrollerdb.txt"));
|
||||
initInput();
|
||||
@@ -95,7 +94,6 @@ Director::~Director()
|
||||
delete asset;
|
||||
delete input;
|
||||
delete screen;
|
||||
delete lang;
|
||||
delete options;
|
||||
delete param;
|
||||
delete section;
|
||||
@@ -523,7 +521,7 @@ void Director::initOptions()
|
||||
|
||||
// Opciones de juego
|
||||
options->game.difficulty = DIFFICULTY_NORMAL;
|
||||
options->game.language = ba_BA;
|
||||
options->game.language = 1;
|
||||
options->game.autofire = true;
|
||||
|
||||
// Opciones de control
|
||||
@@ -695,9 +693,9 @@ bool Director::loadConfigFile()
|
||||
options->video.window.size = 3;
|
||||
}
|
||||
|
||||
if (options->game.language < 0 || options->game.language > MAX_LANGUAGES)
|
||||
if (options->game.language < 0 || options->game.language > 2)
|
||||
{
|
||||
options->game.language = en_UK;
|
||||
options->game.language = 2;
|
||||
}
|
||||
|
||||
return success;
|
||||
@@ -896,7 +894,7 @@ void Director::runLogo()
|
||||
// Ejecuta la sección con la secuencia de introducción
|
||||
void Director::runIntro()
|
||||
{
|
||||
intro = new Intro(screen, asset, input, lang, options, param, section, getMusic(musics, "intro.ogg"));
|
||||
intro = new Intro(screen, asset, input, options, param, section, getMusic(musics, "intro.ogg"));
|
||||
intro->run();
|
||||
delete intro;
|
||||
}
|
||||
@@ -904,7 +902,7 @@ void Director::runIntro()
|
||||
// Ejecuta la sección con el titulo del juego
|
||||
void Director::runTitle()
|
||||
{
|
||||
title = new Title(screen, asset, input, lang, options, param, section, getMusic(musics, "title.ogg"));
|
||||
title = new Title(screen, asset, input, options, param, section, getMusic(musics, "title.ogg"));
|
||||
title->run();
|
||||
delete title;
|
||||
}
|
||||
@@ -914,7 +912,7 @@ void Director::runGame()
|
||||
{
|
||||
const int playerID = section->options;
|
||||
const int currentStage = 0;
|
||||
game = new Game(playerID, currentStage, GAME_MODE_DEMO_OFF, screen, asset, input, lang, options, param, section, getMusic(musics, "playing.ogg"));
|
||||
game = new Game(playerID, currentStage, GAME_MODE_DEMO_OFF, screen, asset, input, options, param, section, getMusic(musics, "playing.ogg"));
|
||||
game->run();
|
||||
delete game;
|
||||
}
|
||||
@@ -922,7 +920,7 @@ void Director::runGame()
|
||||
// Ejecuta la sección donde se muestran las instrucciones
|
||||
void Director::runInstructions()
|
||||
{
|
||||
instructions = new Instructions(screen, asset, input, lang, options, param, section, getMusic(musics, "title.ogg"));
|
||||
instructions = new Instructions(screen, asset, input, options, param, section, getMusic(musics, "title.ogg"));
|
||||
instructions->run();
|
||||
delete instructions;
|
||||
}
|
||||
@@ -930,7 +928,7 @@ void Director::runInstructions()
|
||||
// Ejecuta la sección donde se muestra la tabla de puntuaciones
|
||||
void Director::runHiScoreTable()
|
||||
{
|
||||
hiScoreTable = new HiScoreTable(screen, asset, input, lang, options, param, section, getMusic(musics, "title.ogg"));
|
||||
hiScoreTable = new HiScoreTable(screen, asset, input, options, param, section, getMusic(musics, "title.ogg"));
|
||||
hiScoreTable->run();
|
||||
delete hiScoreTable;
|
||||
}
|
||||
@@ -940,7 +938,7 @@ void Director::runDemoGame()
|
||||
{
|
||||
const int playerID = (rand() % 2) + 1;
|
||||
const int currentStage = 0;
|
||||
demoGame = new Game(playerID, currentStage, GAME_MODE_DEMO_ON, screen, asset, input, lang, options, param, section, nullptr);
|
||||
demoGame = new Game(playerID, currentStage, GAME_MODE_DEMO_ON, screen, asset, input, options, param, section, nullptr);
|
||||
demoGame->run();
|
||||
delete demoGame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user