diff --git a/const.h b/const.h index 33eee30..854d6df 100644 --- a/const.h +++ b/const.h @@ -106,6 +106,6 @@ const int BUTTON_L = 6; const int BUTTON_R = 7; //Estado del teclado SDL -const Uint8 *keystates; +//const Uint8 *keystates; #endif \ No newline at end of file diff --git a/gamedirector.cpp b/gamedirector.cpp index fae017d..372d2df 100644 --- a/gamedirector.cpp +++ b/gamedirector.cpp @@ -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)) diff --git a/menu.cpp b/menu.cpp index 64a7049..7c69006 100644 --- a/menu.cpp +++ b/menu.cpp @@ -137,7 +137,7 @@ void Menu::setRectSize() //y dos por la izquierda, uno de ellos para el selector for (i = 0; i < mTotalItems; i++) { - if (mMenuItem[i].label.length() > maxLength) + if ((int)mMenuItem[i].label.length() > maxLength) { maxLength = mMenuItem[i].label.length(); }