Movido 'autofire' de param.txt a config.txt
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
gameWidth 320
|
||||
gameHeight 240
|
||||
itemSize 20
|
||||
autofire true
|
||||
|
||||
## FADE
|
||||
numSquaresWidth 160
|
||||
|
||||
@@ -135,7 +135,7 @@ struct op_game_t
|
||||
{
|
||||
Uint8 difficulty; // Dificultad del juego
|
||||
Uint8 language; // Idioma usado en el juego
|
||||
bool autofire; // Indica si se va a usar el disparo automático para el disparo normal
|
||||
bool autofire; // Indica si el jugador ha de pulsar repetidamente para disparar o basta con mantener pulsado
|
||||
std::vector<hiScoreEntry_t> hiScoreTable; // Tabla con las mejores puntuaciones
|
||||
};
|
||||
|
||||
@@ -183,7 +183,6 @@ struct param_t
|
||||
int gameWidth; // Ancho de la resolucion nativa del juego
|
||||
int gameHeight; // Alto de la resolucion nativa del juego
|
||||
int itemSize; // Tamaño de los items del juego
|
||||
int autofire; // Indica si se va a usar el disparo automático para el disparo normal
|
||||
|
||||
// FADE
|
||||
int numSquaresWidth; // Cantidad total de cuadraditos en horizontal para el FADE_RANDOM_SQUARE
|
||||
|
||||
@@ -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")
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@ void initParam(param_t *param)
|
||||
param->gameWidth = 320;
|
||||
param->gameHeight = 240;
|
||||
param->itemSize = 20;
|
||||
param->autofire = true;
|
||||
|
||||
// SCOREBOARD
|
||||
param->scoreboard = {0, 200, 320, 40};
|
||||
@@ -155,11 +154,6 @@ bool setOptions(param_t *param, std::string var, std::string value)
|
||||
param->itemSize = std::stoi(value);
|
||||
}
|
||||
|
||||
else if (var == "autofire")
|
||||
{
|
||||
param->autofire = stringToBool(value);
|
||||
}
|
||||
|
||||
// FADE
|
||||
else if (var == "numSquaresWidth")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user