Commit de vesprà tirada a la brossa

This commit is contained in:
2024-10-16 22:35:19 +02:00
parent 5585f996cb
commit db884cb422
32 changed files with 450 additions and 463 deletions

View File

@@ -32,7 +32,7 @@
#include "scoreboard.h" // for Scoreboard, ScoreboardMode, SCOREB...
#include "screen.h" // for Screen
#include "section.h" // for Name, name, Options, options
#include "smart_sprite.h" // for SmartSprite
#include "smart_sprite.h" // for SpriteSmart
#include "text.h" // for Text, TEXT_CENTER
#include "texture.h" // for Texture
struct JA_Music_t; // lines 35-35
@@ -1413,7 +1413,7 @@ void Game::freeItems()
}
}
// Crea un objeto SmartSprite para mostrar la puntuación al coger un objeto
// Crea un objeto SpriteSmart para mostrar la puntuación al coger un objeto
void Game::createItemScoreSprite(int x, int y, std::shared_ptr<Texture> texture)
{
smart_sprites_.emplace_back(std::make_unique<SmartSprite>(texture));
@@ -1432,7 +1432,7 @@ void Game::createItemScoreSprite(int x, int y, std::shared_ptr<Texture> texture)
}
// Vacia el vector de smartsprites
void Game::freeSmartSprites()
void Game::freeSpriteSmarts()
{
if (!smart_sprites_.empty())
{
@@ -1446,7 +1446,7 @@ void Game::freeSmartSprites()
}
}
// Crea un SmartSprite para arrojar el item café al recibir un impacto
// Crea un SpriteSmart para arrojar el item café al recibir un impacto
void Game::throwCoffee(int x, int y)
{
smart_sprites_.emplace_back(std::make_unique<SmartSprite>(item_textures_[4]));
@@ -1464,13 +1464,13 @@ 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()->setRotate(true);
smart_sprites_.back()->enableRotate();
smart_sprites_.back()->setRotateSpeed(10);
smart_sprites_.back()->setRotateAmount(90.0);
}
// Actualiza los SmartSprites
void Game::updateSmartSprites()
// Actualiza los SpriteSmarts
void Game::updateSpriteSmarts()
{
for (auto &ss : smart_sprites_)
{
@@ -1478,8 +1478,8 @@ void Game::updateSmartSprites()
}
}
// Pinta los SmartSprites activos
void Game::renderSmartSprites()
// Pinta los SpriteSmarts activos
void Game::renderSpriteSmarts()
{
for (auto &ss : smart_sprites_)
{
@@ -1679,8 +1679,8 @@ void Game::update()
// Actualiza el estado de muerte
updateGameOver();
// Actualiza los SmartSprites
updateSmartSprites();
// Actualiza los SpriteSmarts
updateSpriteSmarts();
// Actualiza los contadores de estado y efectos
updateTimeStoppedCounter();
@@ -1708,7 +1708,7 @@ void Game::update()
freeBullets();
freeBalloons();
freeItems();
freeSmartSprites();
freeSpriteSmarts();
}
// Comprueba si la música ha de estar sonando
@@ -1757,7 +1757,7 @@ void Game::fillCanvas()
// Dibuja los objetos
background_->render();
renderItems();
renderSmartSprites();
renderSpriteSmarts();
explosions_->render();
renderBalloons();
renderBullets();