undo: he llevat lo de invertir el y-axis. lo que s'ha de fer es cablejar be el mando
This commit is contained in:
@@ -160,8 +160,8 @@ void Director::loadScoreFile()
|
|||||||
void Director::bindInputs()
|
void Director::bindInputs()
|
||||||
{
|
{
|
||||||
// Teclado - Movimiento del jugador
|
// Teclado - Movimiento del jugador
|
||||||
Input::get()->bindKey(InputAction::UP, Options::settings.is_y_axis_inverted ? SDL_SCANCODE_DOWN : SDL_SCANCODE_UP);
|
Input::get()->bindKey(InputAction::UP, SDL_SCANCODE_UP);
|
||||||
Input::get()->bindKey(InputAction::DOWN, Options::settings.is_y_axis_inverted ? SDL_SCANCODE_UP : SDL_SCANCODE_DOWN);
|
Input::get()->bindKey(InputAction::DOWN, SDL_SCANCODE_DOWN);
|
||||||
Input::get()->bindKey(InputAction::LEFT, SDL_SCANCODE_LEFT);
|
Input::get()->bindKey(InputAction::LEFT, SDL_SCANCODE_LEFT);
|
||||||
Input::get()->bindKey(InputAction::RIGHT, SDL_SCANCODE_RIGHT);
|
Input::get()->bindKey(InputAction::RIGHT, SDL_SCANCODE_RIGHT);
|
||||||
|
|
||||||
@@ -202,8 +202,8 @@ void Director::bindInputs()
|
|||||||
for (int i = 0; i < NUM_GAMEPADS; ++i)
|
for (int i = 0; i < NUM_GAMEPADS; ++i)
|
||||||
{
|
{
|
||||||
// Mando - Movimiento del jugador
|
// Mando - Movimiento del jugador
|
||||||
Input::get()->bindGameControllerButton(i, InputAction::UP, Options::settings.is_y_axis_inverted ? SDL_GAMEPAD_BUTTON_DPAD_DOWN : SDL_GAMEPAD_BUTTON_DPAD_UP);
|
Input::get()->bindGameControllerButton(i, InputAction::UP, SDL_GAMEPAD_BUTTON_DPAD_UP);
|
||||||
Input::get()->bindGameControllerButton(i, InputAction::DOWN, Options::settings.is_y_axis_inverted ? SDL_GAMEPAD_BUTTON_DPAD_UP : SDL_GAMEPAD_BUTTON_DPAD_DOWN);
|
Input::get()->bindGameControllerButton(i, InputAction::DOWN, SDL_GAMEPAD_BUTTON_DPAD_DOWN);
|
||||||
Input::get()->bindGameControllerButton(i, InputAction::LEFT, SDL_GAMEPAD_BUTTON_DPAD_LEFT);
|
Input::get()->bindGameControllerButton(i, InputAction::LEFT, SDL_GAMEPAD_BUTTON_DPAD_LEFT);
|
||||||
Input::get()->bindGameControllerButton(i, InputAction::RIGHT, SDL_GAMEPAD_BUTTON_DPAD_RIGHT);
|
Input::get()->bindGameControllerButton(i, InputAction::RIGHT, SDL_GAMEPAD_BUTTON_DPAD_RIGHT);
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ namespace Options
|
|||||||
file << "game.difficulty=" << static_cast<int>(settings.difficulty) << "\n";
|
file << "game.difficulty=" << static_cast<int>(settings.difficulty) << "\n";
|
||||||
file << "game.autofire=" << boolToString(settings.autofire) << "\n";
|
file << "game.autofire=" << boolToString(settings.autofire) << "\n";
|
||||||
file << "game.shutdown_enabled=" << boolToString(settings.shutdown_enabled) << "\n";
|
file << "game.shutdown_enabled=" << boolToString(settings.shutdown_enabled) << "\n";
|
||||||
file << "game.is_y_axis_inverted=" << boolToString(settings.is_y_axis_inverted) << "\n";
|
|
||||||
|
|
||||||
// Opciones de mandos
|
// Opciones de mandos
|
||||||
file << "\n\n## CONTROLLERS\n";
|
file << "\n\n## CONTROLLERS\n";
|
||||||
@@ -253,10 +252,6 @@ namespace Options
|
|||||||
{
|
{
|
||||||
settings.shutdown_enabled = stringToBool(value);
|
settings.shutdown_enabled = stringToBool(value);
|
||||||
}
|
}
|
||||||
else if (var == "game.is_y_axis_inverted")
|
|
||||||
{
|
|
||||||
settings.is_y_axis_inverted = stringToBool(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Opciones de mandos
|
// Opciones de mandos
|
||||||
else if (var == "controller.0.name")
|
else if (var == "controller.0.name")
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ namespace Options
|
|||||||
Lang::Code language; // Idioma usado en el juego
|
Lang::Code language; // Idioma usado en el juego
|
||||||
bool autofire; // Indicador de autofire
|
bool autofire; // Indicador de autofire
|
||||||
bool shutdown_enabled; // Especifica si se puede apagar el sistema
|
bool shutdown_enabled; // Especifica si se puede apagar el sistema
|
||||||
bool is_y_axis_inverted; // Indica si hay que invertir el eje Y de los controles
|
|
||||||
std::vector<HiScoreEntry> hi_score_table; // Tabla de mejores puntuaciones
|
std::vector<HiScoreEntry> hi_score_table; // Tabla de mejores puntuaciones
|
||||||
std::vector<int> last_hi_score_entry; // Últimas posiciones de entrada en la tabla
|
std::vector<int> last_hi_score_entry; // Últimas posiciones de entrada en la tabla
|
||||||
std::string config_file; // Ruta al fichero donde guardar la configuración y las opciones del juego
|
std::string config_file; // Ruta al fichero donde guardar la configuración y las opciones del juego
|
||||||
@@ -128,7 +127,6 @@ namespace Options
|
|||||||
language(Lang::Code::VALENCIAN),
|
language(Lang::Code::VALENCIAN),
|
||||||
autofire(true),
|
autofire(true),
|
||||||
shutdown_enabled(false),
|
shutdown_enabled(false),
|
||||||
is_y_axis_inverted(false),
|
|
||||||
last_hi_score_entry({INVALID_INDEX, INVALID_INDEX}),
|
last_hi_score_entry({INVALID_INDEX, INVALID_INDEX}),
|
||||||
config_file() {}
|
config_file() {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user