forked from jaildesigner-jailgames/jaildoctors_dilemma
- Ya se puede usar el mando en todas las secciones del juego
- Definido flag para compilar para consola de juegos (GAME_CONSOLE)
This commit is contained in:
@@ -30,7 +30,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
|
||||
|
||||
// Crea los objetos
|
||||
cheevos = new Cheevos(screen, options, asset->get("cheevos.bin"));
|
||||
scoreboard = new ScoreBoard(renderer, resource, asset, input, options, &board);
|
||||
scoreboard = new ScoreBoard(renderer, resource, asset, options, &board);
|
||||
itemTracker = new ItemTracker();
|
||||
roomTracker = new RoomTracker();
|
||||
room = new Room(resource->getRoom(currentRoom), renderer, screen, asset, options, itemTracker, &board.items, false, debug);
|
||||
@@ -190,54 +190,54 @@ void Game::checkInput()
|
||||
section->name = SECTION_PROG_TITLE;
|
||||
}
|
||||
|
||||
if (input->checkInput(input_switch_music, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_switch_music, REPEAT_FALSE))
|
||||
{
|
||||
board.music = !board.music;
|
||||
board.music ? JA_ResumeMusic() : JA_PauseMusic();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_pause, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_pause, REPEAT_FALSE))
|
||||
{
|
||||
switchPause();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_toggle_border, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_toggle_border, REPEAT_FALSE))
|
||||
{
|
||||
screen->switchBorder();
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_video_mode, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_video_mode, REPEAT_FALSE))
|
||||
{
|
||||
screen->switchVideoMode();
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_window_size_1, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_window_size_1, REPEAT_FALSE))
|
||||
{
|
||||
screen->setWindowSize(1);
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_window_size_2, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_window_size_2, REPEAT_FALSE))
|
||||
{
|
||||
screen->setWindowSize(2);
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_window_size_3, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_window_size_3, REPEAT_FALSE))
|
||||
{
|
||||
screen->setWindowSize(3);
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_window_size_4, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_window_size_4, REPEAT_FALSE))
|
||||
{
|
||||
screen->setWindowSize(4);
|
||||
reLoadTextures();
|
||||
}
|
||||
|
||||
if (input->checkInput(input_swap_palette, REPEAT_FALSE))
|
||||
else if (input->checkInput(input_swap_palette, REPEAT_FALSE))
|
||||
{
|
||||
switchPalette();
|
||||
}
|
||||
@@ -264,15 +264,15 @@ void Game::run()
|
||||
// Actualiza el juego, las variables, comprueba la entrada, etc.
|
||||
void Game::update()
|
||||
{
|
||||
// Comprueba los eventos de la cola
|
||||
checkEventHandler();
|
||||
|
||||
// Comprueba que la diferencia de ticks sea mayor a la velocidad del juego
|
||||
if (SDL_GetTicks() - ticks > ticksSpeed)
|
||||
{
|
||||
// Actualiza el contador de ticks
|
||||
ticks = SDL_GetTicks();
|
||||
|
||||
// Comprueba los eventos de la cola
|
||||
checkEventHandler();
|
||||
|
||||
// Comprueba el teclado
|
||||
checkInput();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user