forked from jaildesigner-jailgames/jaildoctors_dilemma
Afegit globalEvents
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "options.h"
|
||||
#include "notifier.h"
|
||||
#include "global_inputs.h"
|
||||
#include "global_events.h"
|
||||
|
||||
// Constructor
|
||||
Game::Game()
|
||||
@@ -131,24 +132,13 @@ void Game::checkEvents()
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event))
|
||||
{
|
||||
// Evento de salida de la aplicación
|
||||
if (event.type == SDL_QUIT)
|
||||
{
|
||||
options.section.name = SECTION_QUIT;
|
||||
screen_->setBorderColor(stringToColor(options.palette, "black"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (event.type == SDL_RENDER_DEVICE_RESET || event.type == SDL_RENDER_TARGETS_RESET)
|
||||
{
|
||||
reLoadTextures();
|
||||
}
|
||||
globalEvents::check(event);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (event.type == SDL_KEYDOWN && event.key.repeat == 0)
|
||||
{
|
||||
switch (event.key.keysym.scancode)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
case SDL_SCANCODE_G:
|
||||
debug_->switchEnabled();
|
||||
options.cheat.invincible = debug_->getEnabled();
|
||||
@@ -191,11 +181,11 @@ void Game::checkEvents()
|
||||
case SDL_SCANCODE_F9:
|
||||
Notifier::get()->show("JAILDESIGNER IS LOGGED IN", "", 5);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user