hi_score_table: faltava posar el fondo en modo manual

game: redefinides les prioritats de dibuixat -> jugadors altra volta al front
This commit is contained in:
2025-08-17 08:08:48 +02:00
parent 1ec272f017
commit 142603db71
4 changed files with 9 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ Director::Director(int argc, std::span<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;

View File

@@ -986,12 +986,14 @@ void Game::fillCanvas() {
// Dibuja los objetos
background_->render();
renderPlayers();
renderSmartSprites();
renderItems();
balloon_manager_->render();
renderSmartSprites(); // El cafe que sale cuando te golpean
renderItems();
tabe_->render();
renderBullets();
renderPlayers();
renderPathSprites();
// Deja el renderizador apuntando donde estaba

View File

@@ -33,7 +33,6 @@ HiScoreTable::HiScoreTable()
backbuffer_(SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, param.game.width, param.game.height)),
fade_(std::make_unique<Fade>()),
background_(std::make_unique<Background>()),
ticks_(0),
view_area_(SDL_FRect{0, 0, param.game.width, param.game.height}),
fade_mode_(Fade::Mode::IN),
@@ -280,6 +279,7 @@ void HiScoreTable::initFade() {
// Inicializa el fondo
void HiScoreTable::initBackground() {
background_->setManualMode(true);
background_->setPos(param.game.game_area.rect);
background_->setCloudsSpeed(-0.1F);