Eliminado la variable global keystates
This commit is contained in:
+2
-3
@@ -332,7 +332,6 @@ bool GameDirector::checkPlayerBallonCollision()
|
||||
//Comprueba y procesa la colisión entre las balas y los globos
|
||||
void GameDirector::processBulletBallonCollision()
|
||||
{
|
||||
bool result = false;
|
||||
for (Uint8 i = 0; i < mMaxBalloons; i++)
|
||||
{
|
||||
for (Uint8 j = 0; j < mMaxBullets; j++)
|
||||
@@ -482,7 +481,7 @@ void GameDirector::checkMenaceLevel()
|
||||
void GameDirector::checkGameInput()
|
||||
{
|
||||
//Obtiene el estado de las teclas pulsadas del teclado
|
||||
keystates = SDL_GetKeyboardState(NULL);
|
||||
const Uint8 *keystates = SDL_GetKeyboardState(NULL);
|
||||
|
||||
//Si está pulsada la tecla izquierda o el mando hacia la izquierda
|
||||
if ((keystates[SDL_SCANCODE_LEFT] != 0) || (SDL_JoystickGetAxis(gGameController, 0) < -JOYSTICK_DEAD_ZONE))
|
||||
@@ -553,7 +552,7 @@ void GameDirector::checkGameInput()
|
||||
void GameDirector::checkMenuInput(Menu *menu)
|
||||
{
|
||||
//Obtiene el estado de las teclas pulsadas del teclado
|
||||
keystates = SDL_GetKeyboardState(NULL);
|
||||
const Uint8 *keystates = SDL_GetKeyboardState(NULL);
|
||||
|
||||
//Si está pulsada la tecla izquierda o el mando hacia la izquierda
|
||||
if ((keystates[SDL_SCANCODE_UP] != 0) || (SDL_JoystickGetAxis(gGameController, 1) < -JOYSTICK_DEAD_ZONE))
|
||||
|
||||
Reference in New Issue
Block a user