iwyu
clang-format
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#include "game_logo.h"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_SetTextureScaleMode, SDL_FlipMode, SDL_ScaleMode
|
||||
#include <algorithm> // Para max
|
||||
#include <SDL3/SDL.h> // Para SDL_SetTextureScaleMode, SDL_FlipMode, SDL_ScaleMode
|
||||
|
||||
#include <algorithm> // Para max
|
||||
|
||||
#include "animated_sprite.h" // Para AnimatedSprite
|
||||
#include "audio.h" // Para Audio
|
||||
@@ -161,7 +162,7 @@ void GameLogo::handleCoffeeCrisisShaking() {
|
||||
} else {
|
||||
finishCoffeeCrisisShaking();
|
||||
}
|
||||
|
||||
|
||||
updateDustSprites();
|
||||
}
|
||||
|
||||
@@ -172,7 +173,7 @@ void GameLogo::handleCoffeeCrisisFinished() {
|
||||
void GameLogo::handleArcadeEditionMoving() {
|
||||
zoom_ -= 0.1F * ZOOM_FACTOR;
|
||||
arcade_edition_sprite_->setZoom(zoom_);
|
||||
|
||||
|
||||
if (zoom_ <= 1.0F) {
|
||||
finishArcadeEditionMoving();
|
||||
}
|
||||
@@ -192,10 +193,10 @@ void GameLogo::processShakeEffect(SmartSprite* primary_sprite, SmartSprite* seco
|
||||
shake_.counter--;
|
||||
} else {
|
||||
shake_.counter = shake_.delay;
|
||||
const auto displacement = calculateShakeDisplacement();
|
||||
primary_sprite->setPosX(shake_.origin + displacement);
|
||||
if (secondary_sprite) {
|
||||
secondary_sprite->setPosX(shake_.origin + displacement + 15);
|
||||
const auto DISPLACEMENT = calculateShakeDisplacement();
|
||||
primary_sprite->setPosX(shake_.origin + DISPLACEMENT);
|
||||
if (secondary_sprite != nullptr) {
|
||||
secondary_sprite->setPosX(shake_.origin + DISPLACEMENT + 15);
|
||||
}
|
||||
shake_.remaining--;
|
||||
}
|
||||
@@ -206,13 +207,13 @@ void GameLogo::processArcadeEditionShake() {
|
||||
shake_.counter--;
|
||||
} else {
|
||||
shake_.counter = shake_.delay;
|
||||
const auto displacement = calculateShakeDisplacement();
|
||||
arcade_edition_sprite_->setX(shake_.origin + displacement);
|
||||
const auto DISPLACEMENT = calculateShakeDisplacement();
|
||||
arcade_edition_sprite_->setX(shake_.origin + DISPLACEMENT);
|
||||
shake_.remaining--;
|
||||
}
|
||||
}
|
||||
|
||||
int GameLogo::calculateShakeDisplacement() const {
|
||||
auto GameLogo::calculateShakeDisplacement() const -> int {
|
||||
return shake_.remaining % 2 == 0 ? shake_.desp * (-1) : shake_.desp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user