diff --git a/data/gfx/player_arounder_head.png b/data/gfx/player_arounder_head.png index de58b3a..211f287 100644 Binary files a/data/gfx/player_arounder_head.png and b/data/gfx/player_arounder_head.png differ diff --git a/data/gfx/player_bal1_head.png b/data/gfx/player_bal1_head.png index bcc7023..d35d3a0 100644 Binary files a/data/gfx/player_bal1_head.png and b/data/gfx/player_bal1_head.png differ diff --git a/data/gfx/player_body.ani b/data/gfx/player_body.ani index 8ef25af..811093e 100644 --- a/data/gfx/player_body.ani +++ b/data/gfx/player_body.ani @@ -83,4 +83,46 @@ name=centershoot_2C speed=5 loop=0 frames=44,45,46,47 +[/animation] + +[animation] +name=sideshoot_pwr +speed=2 +loop=0 +frames=24,25,26,27 +[/animation] + +[animation] +name=centershoot_pwr +speed=2 +loop=0 +frames=28,29,30,31 +[/animation] + +[animation] +name=sideshoot_1C_pwr +speed=2 +loop=0 +frames=32,33,34,35 +[/animation] + +[animation] +name=centershoot_1C_pwr +speed=2 +loop=0 +frames=36,37,38,39 +[/animation] + +[animation] +name=sideshoot_2C_pwr +speed=2 +loop=0 +frames=40,41,42,43 +[/animation] + +[animation] +name=centershoot_2C_pwr +speed=2 +loop=0 +frames=44,45,46,47 [/animation] \ No newline at end of file diff --git a/data/gfx/player_head.ani b/data/gfx/player_head.ani index 45986ed..581565b 100644 --- a/data/gfx/player_head.ani +++ b/data/gfx/player_head.ani @@ -61,54 +61,54 @@ frames=28,29,30,31 name=sideshoot speed=5 loop=0 -frames=32,33,34,35 +frames=16,17,18,19 [/animation] [animation] name=centershoot speed=5 loop=0 -frames=36,37,38,39 +frames=20,21,22,23 [/animation] [animation] name=sideshoot_1C speed=5 loop=0 -frames=40,41,42,43 +frames=24,25,26,27 [/animation] [animation] name=centershoot_1C speed=5 loop=0 -frames=44,45,46,47 +frames=28,29,30,31 [/animation] [animation] name=sideshoot_pwr -speed=5 +speed=2 loop=0 -frames=48,49,50,51 +frames=16,17,18,19,20 [/animation] [animation] name=centershoot_pwr -speed=5 +speed=2 loop=0 -frames=52,53,54,55 +frames=20,21,22,23 [/animation] [animation] name=sideshoot_1C_pwr -speed=5 +speed=2 loop=0 -frames=56,57,58,59 +frames=24,25,26,27 [/animation] [animation] name=centershoot_1C_pwr -speed=5 +speed=2 loop=0 -frames=60,61,62,63 +frames=28,29,30,31 [/animation] \ No newline at end of file diff --git a/source/game.cpp b/source/game.cpp index e4ca9f5..5a03b4f 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -14,7 +14,7 @@ Game::Game(int numPlayers, int currentStage, SDL_Renderer *renderer, Screen *scr // Pasa variables this->demo.enabled = demo; this->numPlayers = numPlayers; - this->currentStage = 9; // currentStage; + this->currentStage = 9;//currentStage; lastStageReached = currentStage; if (numPlayers == 1) { // Si solo juega un jugador, permite jugar tanto con teclado como con mando @@ -3705,28 +3705,6 @@ void Game::checkEventHandler() reloadTextures(); break; - case SDL_SCANCODE_P: - createPowerBall(); - break; - - case SDL_SCANCODE_O: - stopAllBalloons(200); - break; - - case SDL_SCANCODE_I: - static bool toogle = true; - if (toogle) - { - players.at(0)->setPlayerTextures(player1Textures); - toogle = !toogle; - } - else - { - players.at(0)->setPlayerTextures(player2Textures); - toogle = !toogle; - } - break; - default: break; } diff --git a/source/player.cpp b/source/player.cpp index 85d5fbd..f1b894d 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -235,8 +235,8 @@ void Player::setAnimation() aHeadCoffees = "_1C"; } - //const std::string aPowerUp = powerUp ? "_pwr" : ""; - const std::string aPowerUp = ""; + const std::string aPowerUp = powerUp ? "_pwr" : ""; + //const std::string aPowerUp = ""; const std::string aWalking = statusWalking == PLAYER_STATUS_WALKING_STOP ? "stand" : "walk"; const std::string aFiring = statusFiring == PLAYER_STATUS_FIRING_UP ? "centershoot" : "sideshoot"; @@ -248,14 +248,14 @@ void Player::setAnimation() legsSprite->setFlip(flipWalk); if (statusFiring == PLAYER_STATUS_FIRING_NO) { // No esta disparando - bodySprite->setCurrentAnimation(aWalking + aBodyCoffees); + bodySprite->setCurrentAnimation(aWalking + aBodyCoffees + aPowerUp); bodySprite->setFlip(flipWalk); headSprite->setCurrentAnimation(aWalking + aHeadCoffees + aPowerUp); headSprite->setFlip(flipWalk); } else { // Está disparando - bodySprite->setCurrentAnimation(aFiring + aBodyCoffees); + bodySprite->setCurrentAnimation(aFiring + aBodyCoffees + aPowerUp); bodySprite->setFlip(flipFire); headSprite->setCurrentAnimation(aFiring + aHeadCoffees + aPowerUp); headSprite->setFlip(flipFire); diff --git a/todo.txt b/todo.txt index bb42cd1..46597b1 100644 --- a/todo.txt +++ b/todo.txt @@ -25,4 +25,5 @@ x poner un dibujito en la pantalla de game over al terminar el juego x y quizas otro en la propia pantalla de game over x que las nubes al final se vuelva a frenar quitar las cabezas powerup -x el modo 2P no arranca \ No newline at end of file +x el modo 2P no arranca +arreglar el menu de gameover cuando has completado el juego \ No newline at end of file