Açò ja no hi ha Cristo que ho pete
This commit is contained in:
@@ -510,8 +510,11 @@ void AnimatedSprite::setCurrentAnimation(int index)
|
||||
// Actualiza las variables del objeto
|
||||
void AnimatedSprite::update()
|
||||
{
|
||||
animate();
|
||||
MovingSprite::update();
|
||||
if (enabled_)
|
||||
{
|
||||
animate();
|
||||
MovingSprite::update();
|
||||
}
|
||||
}
|
||||
|
||||
// Establece el rectangulo para un frame de una animación
|
||||
|
||||
@@ -1049,7 +1049,7 @@ void Game::updateBalloonSpeed()
|
||||
}
|
||||
|
||||
// Explosiona un globo. Lo destruye y crea otros dos si es el caso
|
||||
void Game::popBalloon(std::shared_ptr<Balloon> &balloon)
|
||||
void Game::popBalloon(std::shared_ptr<Balloon> balloon)
|
||||
{
|
||||
// Aumenta el poder de la fase
|
||||
increaseStageCurrentPower(1);
|
||||
@@ -1072,11 +1072,11 @@ void Game::popBalloon(std::shared_ptr<Balloon> &balloon)
|
||||
}
|
||||
else
|
||||
{ // En cualquier otro caso, crea dos globos de un tipo inferior
|
||||
const auto bLeft = createBalloon(0, balloon->getPosY(), balloon->getKind() - 1, BALLOON_VELX_NEGATIVE, enemySpeed, 0);
|
||||
auto bLeft = createBalloon(0, balloon->getPosY(), balloon->getKind() - 1, BALLOON_VELX_NEGATIVE, enemySpeed, 0);
|
||||
bLeft->allignTo(balloon->getPosX() + (balloon->getWidth() / 2));
|
||||
bLeft->setVelY(bLeft->getClass() == BALLOON_CLASS ? -2.50f : BALLOON_VELX_NEGATIVE);
|
||||
|
||||
const auto bRight = createBalloon(0, balloon->getPosY(), balloon->getKind() - 1, BALLOON_VELX_POSITIVE, enemySpeed, 0);
|
||||
auto bRight = createBalloon(0, balloon->getPosY(), balloon->getKind() - 1, BALLOON_VELX_POSITIVE, enemySpeed, 0);
|
||||
bRight->allignTo(balloon->getPosX() + (balloon->getWidth() / 2));
|
||||
bRight->setVelY(bRight->getClass() == BALLOON_CLASS ? -2.50f : BALLOON_VELX_NEGATIVE);
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ private:
|
||||
void updateBalloonSpeed();
|
||||
|
||||
// Explosiona un globo. Lo destruye y crea otros dos si es el caso
|
||||
void popBalloon(std::shared_ptr<Balloon> &balloon);
|
||||
void popBalloon(std::shared_ptr<Balloon> balloon);
|
||||
|
||||
// Explosiona un globo. Lo destruye
|
||||
void destroyBalloon(std::shared_ptr<Balloon> &balloon);
|
||||
|
||||
@@ -68,7 +68,10 @@ void MovingSprite::move()
|
||||
// Muestra el sprite por pantalla
|
||||
void MovingSprite::render()
|
||||
{
|
||||
texture_->render((int)x_, (int)y_, &spriteClip_, zoomW_, zoomH_, angle_, center_, currentFlip_);
|
||||
if (enabled_)
|
||||
{
|
||||
texture_->render((int)x_, (int)y_, &spriteClip_, zoomW_, zoomH_, angle_, center_, currentFlip_);
|
||||
}
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
@@ -259,9 +262,12 @@ void MovingSprite::disableRotate()
|
||||
// Actualiza las variables internas del objeto
|
||||
void MovingSprite::update()
|
||||
{
|
||||
move();
|
||||
rotate();
|
||||
++counter_ %= 60000;
|
||||
if (enabled_)
|
||||
{
|
||||
move();
|
||||
rotate();
|
||||
++counter_ %= 60000;
|
||||
}
|
||||
}
|
||||
|
||||
// Cambia el sentido de la rotación
|
||||
|
||||
@@ -232,7 +232,7 @@ void Screen::setVideoMode(ScreenVideoMode videoMode)
|
||||
// Reinicia los shaders
|
||||
if (options.video.shaders)
|
||||
{
|
||||
#ifdef SHADERS
|
||||
#ifndef NO_SHADERS
|
||||
std::ifstream f(asset->get("crtpi.glsl").c_str());
|
||||
std::string source((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
|
||||
|
||||
|
||||
@@ -19,20 +19,18 @@ void SmartSprite::init()
|
||||
destX_ = 0;
|
||||
destY_ = 0;
|
||||
finished_ = false;
|
||||
enabled_ = false;
|
||||
}
|
||||
|
||||
// Actualiza la posición y comprueba si ha llegado a su destino
|
||||
void SmartSprite::update()
|
||||
{
|
||||
MovingSprite::update();
|
||||
checkMove();
|
||||
checkFinished();
|
||||
}
|
||||
|
||||
// Pinta el objeto en pantalla
|
||||
void SmartSprite::render()
|
||||
{
|
||||
MovingSprite::render();
|
||||
if (enabled_)
|
||||
{
|
||||
MovingSprite::update();
|
||||
checkMove();
|
||||
checkFinished();
|
||||
}
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
|
||||
@@ -34,9 +34,6 @@ public:
|
||||
// Actualiza la posición y comprueba si ha llegado a su destino
|
||||
void update();
|
||||
|
||||
// Pinta el objeto en pantalla
|
||||
void render();
|
||||
|
||||
// Establece el valor de la variable
|
||||
void setFinishedCounter(int value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user