From 7e5507be8d7104652c9054ee9eb349b39d8fd26f Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 19 Jul 2025 19:31:00 +0200 Subject: [PATCH] =?UTF-8?q?arreglat=20el=20caf=C3=A9=20que=20ix=20quan=20e?= =?UTF-8?q?t=20peguen,=20que=20rotava=20en=20el=20punt=200,0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/director.cpp | 2 +- source/sections/game.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/director.cpp b/source/director.cpp index fbbe9c5..cfcc8e1 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -46,7 +46,7 @@ Director::Director(int argc, const char *argv[]) { Section::name = Section::Name::GAME; Section::options = Section::Options::GAME_PLAY_1P; #elif DEBUG - Section::name = Section::Name::LOGO; + Section::name = Section::Name::GAME; Section::options = Section::Options::GAME_PLAY_1P; #else // NORMAL GAME Section::name = Section::Name::LOGO; diff --git a/source/sections/game.cpp b/source/sections/game.cpp index c0eaaf0..5c3e179 100644 --- a/source/sections/game.cpp +++ b/source/sections/game.cpp @@ -729,6 +729,7 @@ void Game::throwCoffee(int x, int y) { smart_sprites_.back()->setEnabled(true); smart_sprites_.back()->setFinishedCounter(1); smart_sprites_.back()->setSpriteClip(0, param.game.item_size, param.game.item_size, param.game.item_size); + smart_sprites_.back()->setRotatingCenter({param.game.item_size / 2, param.game.item_size / 2}); smart_sprites_.back()->setRotate(true); smart_sprites_.back()->setRotateSpeed(10); smart_sprites_.back()->setRotateAmount(90.0); @@ -1763,7 +1764,8 @@ void Game::checkDebugEvents(const SDL_Event &event) { switch (event.key.key) { case SDLK_1: // Crea una powerball { - balloon_manager_->createPowerBall(); + // balloon_manager_->createPowerBall(); + throwCoffee(players_.at(0)->getPosX() + (players_.at(0)->getWidth() / 2), players_.at(0)->getPosY() + (players_.at(0)->getHeight() / 2)); break; } case SDLK_2: // Activa o desactiva la aparición de globos