Mapeados los jugadores a los dos mandos
This commit is contained in:
@@ -87,6 +87,7 @@ void Director::initInput()
|
||||
{
|
||||
// Establece si ha de mostrar mensajes
|
||||
input->setVerbose(options->console);
|
||||
input->setVerbose(true);
|
||||
|
||||
// Busca si hay un mando conectado
|
||||
input->discoverGameController();
|
||||
@@ -117,18 +118,27 @@ void Director::initInput()
|
||||
input->bindGameControllerButton(input_right, SDL_CONTROLLER_BUTTON_DPAD_RIGHT);
|
||||
input->bindGameControllerButton(input_fire_left, SDL_CONTROLLER_BUTTON_X);
|
||||
input->bindGameControllerButton(input_fire_center, SDL_CONTROLLER_BUTTON_Y);
|
||||
input->bindGameControllerButton(input_fire_right, SDL_CONTROLLER_BUTTON_B);
|
||||
input->bindGameControllerButton(input_fire_right, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER);
|
||||
|
||||
// Mando - Otros
|
||||
input->bindGameControllerButton(input_accept, SDL_CONTROLLER_BUTTON_B);
|
||||
input->bindGameControllerButton(input_cancel, SDL_CONTROLLER_BUTTON_A);
|
||||
#ifdef GAME_CONSOLE
|
||||
input->bindGameControllerButton(input_pause, SDL_CONTROLLER_BUTTON_BACK);
|
||||
input->bindGameControllerButton(input_exit, SDL_CONTROLLER_BUTTON_START);
|
||||
#else
|
||||
input->bindGameControllerButton(input_pause, SDL_CONTROLLER_BUTTON_START);
|
||||
input->bindGameControllerButton(input_exit, SDL_CONTROLLER_BUTTON_BACK);
|
||||
#endif
|
||||
|
||||
// Pone valores por defecto a las opciones de control
|
||||
options->game.input.clear();
|
||||
|
||||
input_t i;
|
||||
i.id = 0;
|
||||
i.name = "MANDO 1";
|
||||
i.deviceType = INPUT_USE_ANY;
|
||||
options->game.input.push_back(i);
|
||||
|
||||
i.id = 1;
|
||||
i.name = "MANDO 2";
|
||||
i.deviceType = INPUT_USE_GAMECONTROLLER;
|
||||
options->game.input.push_back(i);
|
||||
}
|
||||
|
||||
// Inicializa JailAudio
|
||||
@@ -402,11 +412,11 @@ void Director::initOptions()
|
||||
|
||||
input_t inp;
|
||||
inp.id = 0;
|
||||
inp.name = "KEYBOARD";
|
||||
inp.deviceType = INPUT_USE_KEYBOARD;
|
||||
inp.name = "GAME CONTROLLER";
|
||||
inp.deviceType = INPUT_USE_GAMECONTROLLER;
|
||||
options->game.input.push_back(inp);
|
||||
|
||||
inp.id = 0;
|
||||
inp.id = 1;
|
||||
inp.name = "GAME CONTROLLER";
|
||||
inp.deviceType = INPUT_USE_GAMECONTROLLER;
|
||||
options->game.input.push_back(inp);
|
||||
@@ -414,8 +424,6 @@ void Director::initOptions()
|
||||
// Opciones de video
|
||||
options->video.mode = 0;
|
||||
options->video.window.size = 3;
|
||||
// options->video.window.width = options->video.window.size * param->gameWidth;
|
||||
// options->video.window.height = options->video.window.size * param->gameHeight;
|
||||
options->video.filter = FILTER_NEAREST;
|
||||
options->video.vSync = true;
|
||||
options->video.integerScale = true;
|
||||
|
||||
Reference in New Issue
Block a user