Movido 'autofire' de param.txt a config.txt
This commit is contained in:
@@ -152,7 +152,7 @@ void Director::initInput()
|
||||
// Mando - Otros
|
||||
input->bindGameControllerButton(i, input_accept, SDL_CONTROLLER_BUTTON_START);
|
||||
input->bindGameControllerButton(i, input_cancel, SDL_CONTROLLER_BUTTON_A);
|
||||
//input->bindGameControllerButton(i, input_pause, SDL_CONTROLLER_BUTTON_B);
|
||||
// input->bindGameControllerButton(i, input_pause, SDL_CONTROLLER_BUTTON_B);
|
||||
input->bindGameControllerButton(i, input_exit, SDL_CONTROLLER_BUTTON_BACK);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,6 @@ void Director::loadParams()
|
||||
loadParam(param, asset->get("param.txt"));
|
||||
|
||||
// Modifica las opciones desde el fichero de parametros
|
||||
options->game.autofire = param->autofire;
|
||||
options->video.window.width = options->video.window.size * param->gameWidth;
|
||||
options->video.window.height = options->video.window.size * param->gameHeight;
|
||||
options->video.gameWidth = param->gameWidth;
|
||||
@@ -473,6 +472,7 @@ void Director::initOptions()
|
||||
// Opciones de juego
|
||||
options->game.difficulty = DIFFICULTY_NORMAL;
|
||||
options->game.language = ba_BA;
|
||||
options->game.autofire = true;
|
||||
|
||||
// Opciones de control
|
||||
options->controller.clear();
|
||||
@@ -736,6 +736,7 @@ bool Director::saveConfigFile()
|
||||
|
||||
file << "game.language=" + std::to_string(options->game.language) + "\n";
|
||||
file << "game.difficulty=" + std::to_string(options->game.difficulty) + "\n";
|
||||
file << "game.autofire=" + boolToString(options->game.autofire) + "\n";
|
||||
|
||||
// Opciones de mandos
|
||||
file << "\n\n## CONTROLLERS\n";
|
||||
@@ -1021,6 +1022,11 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
|
||||
options->game.difficulty = std::stoi(value);
|
||||
}
|
||||
|
||||
else if (var == "game.autofire")
|
||||
{
|
||||
options->game.autofire = stringToBool(value);
|
||||
}
|
||||
|
||||
// Opciones de mandos
|
||||
else if (var == "controller1.name")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user