En el titulo no se podia empezar a jugar si no era con mando
This commit is contained in:
@@ -87,7 +87,6 @@ void Director::initInput()
|
|||||||
{
|
{
|
||||||
// Establece si ha de mostrar mensajes
|
// Establece si ha de mostrar mensajes
|
||||||
input->setVerbose(options->console);
|
input->setVerbose(options->console);
|
||||||
input->setVerbose(true);
|
|
||||||
|
|
||||||
// Busca si hay un mando conectado
|
// Busca si hay un mando conectado
|
||||||
input->discoverGameController();
|
input->discoverGameController();
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *scree
|
|||||||
|
|
||||||
// Pasa variables
|
// Pasa variables
|
||||||
this->demo.enabled = demo;
|
this->demo.enabled = demo;
|
||||||
this->numPlayers = numPlayers;
|
|
||||||
this->currentStage = currentStage;
|
this->currentStage = currentStage;
|
||||||
lastStageReached = currentStage;
|
lastStageReached = currentStage;
|
||||||
difficulty = options->game.difficulty;
|
difficulty = options->game.difficulty;
|
||||||
@@ -175,6 +174,7 @@ void Game::init(int playerID)
|
|||||||
Player *player2 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((1 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 24, renderer, playerTextures[1], playerAnimations);
|
Player *player2 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((1 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 24, renderer, playerTextures[1], playerAnimations);
|
||||||
players.push_back(player2);
|
players.push_back(player2);
|
||||||
|
|
||||||
|
numPlayers = 2;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ Reescribiendo el código el 27/09/2022
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
std::cout << "Starting the game..." << std::endl
|
std::cout << "Game start" << std::endl;
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
// Crea el objeto Director
|
// Crea el objeto Director
|
||||||
Director *director = new Director(argc, argv);
|
Director *director = new Director(argc, argv);
|
||||||
@@ -56,7 +55,7 @@ int main(int argc, char *argv[])
|
|||||||
// Destruye el objeto Director
|
// Destruye el objeto Director
|
||||||
delete director;
|
delete director;
|
||||||
|
|
||||||
std::cout << "\nShutting down the game..." << std::endl;
|
std::cout << "\nGame end" << std::endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,8 +235,19 @@ void Title::checkInput()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comprueba solo el teclado
|
// Comprueba el teclado
|
||||||
if (input->checkInput(input_window_fullscreen, REPEAT_FALSE))
|
if (input->checkInput(input_exit, REPEAT_FALSE))
|
||||||
|
{
|
||||||
|
section->name = SECTION_PROG_QUIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (input->checkInput(input_accept, REPEAT_FALSE))
|
||||||
|
{
|
||||||
|
fade->activate();
|
||||||
|
postFade = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (input->checkInput(input_window_fullscreen, REPEAT_FALSE))
|
||||||
{
|
{
|
||||||
screen->switchVideoMode();
|
screen->switchVideoMode();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user