magic numbers: moving_sprite.cpp i game_logo.cpp

This commit is contained in:
2025-09-22 13:57:58 +02:00
parent 9edfe6877f
commit 8f83a1d13e
5 changed files with 104 additions and 31 deletions

View File

@@ -11,6 +11,17 @@ class Texture;
// --- Clase GameLogo: gestor del logo del juego ---
class GameLogo {
public:
// --- Constantes ---
static constexpr float COFFEE_VEL_Y = 0.15F; // Velocidad Y de coffee sprite (pixels/ms) - 2.5F/16.67
static constexpr float COFFEE_ACCEL_Y = 0.00036F; // Aceleración Y de coffee sprite (pixels/ms²) - 0.1F/(16.67)²
static constexpr float CRISIS_VEL_Y = -0.15F; // Velocidad Y de crisis sprite (pixels/ms) - -2.5F/16.67
static constexpr float CRISIS_ACCEL_Y = -0.00036F; // Aceleración Y de crisis sprite (pixels/ms²) - -0.1F/(16.67)²
static constexpr int CRISIS_OFFSET_X = 15; // Desplazamiento X de crisis sprite
static constexpr int DUST_SIZE = 16; // Tamaño de dust sprites
static constexpr float ZOOM_DECREMENT_PER_MS = 0.006F; // Decremento de zoom por milisegundo (0.1F/16.67ms)
static constexpr float SHAKE_DELAY_MS = 33.34F; // Delay de shake en milisegundos (2 frames * 16.67ms)
static constexpr float POST_FINISHED_FRAME_TIME = 16.67F; // Tiempo entre decrementos del counter (1 frame)
// --- Constructores y destructor ---
GameLogo(int x, int y);
~GameLogo() = default;