Renombradas las variables de opciones
Actualizado el fichero de configuración
This commit is contained in:
@@ -20,10 +20,10 @@ Game::Game(int numPlayers, int currentStage, SDL_Renderer *renderer, Screen *scr
|
||||
lastStageReached = currentStage;
|
||||
if (numPlayers == 1)
|
||||
{ // Si solo juega un jugador, permite jugar tanto con teclado como con mando
|
||||
onePlayerControl = options->input[0].deviceType;
|
||||
options->input[0].deviceType = INPUT_USE_ANY;
|
||||
onePlayerControl = options->game.input[0].deviceType;
|
||||
options->game.input[0].deviceType = INPUT_USE_ANY;
|
||||
}
|
||||
difficulty = options->difficulty;
|
||||
difficulty = options->game.difficulty;
|
||||
|
||||
// Crea los objetos
|
||||
fade = new Fade(renderer, param);
|
||||
@@ -62,7 +62,7 @@ Game::~Game()
|
||||
// Restaura el metodo de control
|
||||
if (numPlayers == 1)
|
||||
{
|
||||
options->input[0].deviceType = onePlayerControl;
|
||||
options->game.input[0].deviceType = onePlayerControl;
|
||||
}
|
||||
|
||||
// Elimina todos los objetos contenidos en vectores
|
||||
@@ -182,7 +182,7 @@ void Game::init()
|
||||
// Crea los jugadores
|
||||
if (numPlayers == 1)
|
||||
{
|
||||
Player *player = new Player(PLAY_AREA_CENTER_X - 11, PLAY_AREA_BOTTOM - 24, renderer, playerTextures[options->playerSelected], playerAnimations);
|
||||
Player *player = new Player(PLAY_AREA_CENTER_X - 11, PLAY_AREA_BOTTOM - 24, renderer, playerTextures[options->game.playerSelected], playerAnimations);
|
||||
players.push_back(player);
|
||||
}
|
||||
|
||||
@@ -2846,7 +2846,7 @@ void Game::checkGameInput()
|
||||
if (player->isAlive())
|
||||
{
|
||||
// Input a la izquierda
|
||||
if (input->checkInput(input_left, REPEAT_TRUE, options->input[i].deviceType, options->input[i].id))
|
||||
if (input->checkInput(input_left, REPEAT_TRUE, options->game.input[i].deviceType, options->game.input[i].id))
|
||||
{
|
||||
player->setInput(input_left);
|
||||
demo.keys.left = 1;
|
||||
@@ -2854,7 +2854,7 @@ void Game::checkGameInput()
|
||||
else
|
||||
{
|
||||
// Input a la derecha
|
||||
if (input->checkInput(input_right, REPEAT_TRUE, options->input[i].deviceType, options->input[i].id))
|
||||
if (input->checkInput(input_right, REPEAT_TRUE, options->game.input[i].deviceType, options->game.input[i].id))
|
||||
{
|
||||
player->setInput(input_right);
|
||||
demo.keys.right = 1;
|
||||
@@ -2867,7 +2867,7 @@ void Game::checkGameInput()
|
||||
}
|
||||
}
|
||||
// Comprueba el input de disparar al centro
|
||||
if (input->checkInput(input_fire_center, REPEAT_TRUE, options->input[i].deviceType, options->input[i].id))
|
||||
if (input->checkInput(input_fire_center, REPEAT_TRUE, options->game.input[i].deviceType, options->game.input[i].id))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2883,7 +2883,7 @@ void Game::checkGameInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de disparar a la izquierda
|
||||
if (input->checkInput(input_fire_left, REPEAT_TRUE, options->input[i].deviceType, options->input[i].id))
|
||||
if (input->checkInput(input_fire_left, REPEAT_TRUE, options->game.input[i].deviceType, options->game.input[i].id))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2899,7 +2899,7 @@ void Game::checkGameInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de disparar a la derecha
|
||||
if (input->checkInput(input_fire_right, REPEAT_TRUE, options->input[i].deviceType, options->input[i].id))
|
||||
if (input->checkInput(input_fire_right, REPEAT_TRUE, options->game.input[i].deviceType, options->game.input[i].id))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2915,7 +2915,7 @@ void Game::checkGameInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de pausa
|
||||
if (input->checkInput(input_cancel, REPEAT_FALSE, options->input[i].deviceType, options->input[i].id))
|
||||
if (input->checkInput(input_cancel, REPEAT_FALSE, options->game.input[i].deviceType, options->game.input[i].id))
|
||||
{
|
||||
section->subsection = SUBSECTION_GAME_PAUSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user