revisat intro.cpp, path_sprite i writer.cpp
This commit is contained in:
@@ -37,34 +37,36 @@ class Intro {
|
||||
void run();
|
||||
|
||||
private:
|
||||
// --- Constantes de tiempo (en milisegundos) ---
|
||||
static constexpr float TEXT_DISPLAY_DURATION_MS = 3000.0f; // Duración de visualización de texto (180 frames a 60fps)
|
||||
static constexpr Uint32 POST_BG_STOP_DELAY_MS = 1000; // Retraso antes de detener el fondo
|
||||
static constexpr Uint32 POST_END_DELAY_MS = 1000; // Retraso antes de finalizar intro
|
||||
// --- Constantes de tiempo (en segundos) ---
|
||||
static constexpr float TEXT_DISPLAY_DURATION_S = 3.0f; // Duración de visualización de texto (180 frames a 60fps)
|
||||
static constexpr float POST_BG_STOP_DELAY_S = 1.0f; // Retraso antes de detener el fondo
|
||||
static constexpr float POST_END_DELAY_S = 1.0f; // Retraso antes de finalizar intro
|
||||
|
||||
// --- Constantes de layout ---
|
||||
static constexpr float CARD_BORDER_SIZE = 2.0f; // Tamaño del borde de tarjetas
|
||||
static constexpr float SHADOW_OFFSET = 8.0f; // Desplazamiento de sombra
|
||||
static constexpr float TILED_BG_SPEED = 18.0f; // Velocidad del fondo mosaico (pixels/segundo)
|
||||
static constexpr int TEXT_KERNING = -2; // Espaciado entre caracteres
|
||||
|
||||
// --- Constantes de velocidades de texto ---
|
||||
static constexpr int TEXT_SPEED_NORMAL = 8; // Velocidad normal de escritura
|
||||
static constexpr int TEXT_SPEED_FAST = 12; // Velocidad rápida
|
||||
static constexpr int TEXT_SPEED_VERY_SLOW = 1; // Velocidad muy lenta (grito)
|
||||
static constexpr int TEXT_SPEED_VERY_FAST = 16; // Velocidad muy rápida
|
||||
static constexpr int TEXT_SPEED_SLOW = 2; // Velocidad lenta
|
||||
static constexpr int TEXT_SPEED_MEDIUM_SLOW = 3; // Velocidad medio-lenta
|
||||
static constexpr int TEXT_SPEED_ULTRA_FAST = 20; // Velocidad ultra rápida
|
||||
// --- Constantes de velocidades de texto (segundos entre caracteres) ---
|
||||
static constexpr float TEXT_SPEED_NORMAL = 0.133f; // Velocidad normal (8 frames * 16.67ms = 133ms)
|
||||
static constexpr float TEXT_SPEED_FAST = 0.2f; // Velocidad rápida (12 frames * 16.67ms = 200ms)
|
||||
static constexpr float TEXT_SPEED_VERY_SLOW = 0.0167f; // Velocidad muy lenta (1 frame * 16.67ms = 16.7ms)
|
||||
static constexpr float TEXT_SPEED_VERY_FAST = 0.267f; // Velocidad muy rápida (16 frames * 16.67ms = 267ms)
|
||||
static constexpr float TEXT_SPEED_SLOW = 0.033f; // Velocidad lenta (2 frames * 16.67ms = 33ms)
|
||||
static constexpr float TEXT_SPEED_MEDIUM_SLOW = 0.05f; // Velocidad medio-lenta (3 frames * 16.67ms = 50ms)
|
||||
static constexpr float TEXT_SPEED_ULTRA_FAST = 0.333f; // Velocidad ultra rápida (20 frames * 16.67ms = 333ms)
|
||||
|
||||
// --- Constantes de animaciones de tarjetas (duraciones en ms) ---
|
||||
static constexpr int CARD_ANIM_DURATION_NORMAL = 100; // Duración estándar (100ms)
|
||||
static constexpr int CARD_ANIM_DURATION_FAST = 40; // Duración rápida (40ms)
|
||||
static constexpr int CARD_ANIM_DURATION_MEDIUM = 70; // Duración media (70ms)
|
||||
static constexpr int CARD_ANIM_DURATION_SHORT = 80; // Duración corta (80ms)
|
||||
static constexpr int CARD_ANIM_DURATION_SLOW = 250; // Duración lenta (250ms)
|
||||
static constexpr int CARD_ANIM_DURATION_VERY_SLOW = 300; // Duración muy lenta (300ms)
|
||||
static constexpr int CARD_ANIM_DELAY_LONG = 450; // Retraso largo antes de animación
|
||||
static constexpr float CARD_OFFSET_MARGIN = 10.0f; // Margen fuera de pantalla
|
||||
// --- Constantes de animaciones de tarjetas (duraciones en segundos) ---
|
||||
static constexpr float CARD_ANIM_DURATION_NORMAL = 100.0f / 60.0f; // ≈ 1.6667 s
|
||||
static constexpr float CARD_ANIM_DURATION_FAST = 40.0f / 60.0f; // ≈ 0.6667 s
|
||||
static constexpr float CARD_ANIM_DURATION_MEDIUM = 70.0f / 60.0f; // ≈ 1.1667 s
|
||||
static constexpr float CARD_ANIM_DURATION_SHORT = 80.0f / 60.0f; // ≈ 1.3333 s
|
||||
static constexpr float CARD_ANIM_DURATION_SLOW = 250.0f / 60.0f; // ≈ 4.1667 s
|
||||
static constexpr float CARD_ANIM_DURATION_VERY_SLOW = 300.0f / 60.0f; // ≈ 5.0000 s
|
||||
|
||||
static constexpr float CARD_ANIM_DELAY_LONG = 0.45f; // Retraso largo antes de animación
|
||||
static constexpr float CARD_OFFSET_MARGIN = 10.0f; // Margen fuera de pantalla
|
||||
|
||||
// --- Estados internos ---
|
||||
enum class State {
|
||||
@@ -88,7 +90,7 @@ class Intro {
|
||||
int scene_ = 0; // Indica qué escena está activa
|
||||
State state_ = State::SCENES; // Estado principal de la intro
|
||||
PostState post_state_ = PostState::STOP_BG; // Estado POST
|
||||
Uint32 state_start_time_; // Tiempo de inicio del estado actual
|
||||
float state_start_time_; // Tiempo de inicio del estado actual (segundos)
|
||||
Color bg_color_ = param.intro.bg_color; // Color de fondo
|
||||
|
||||
// --- Métodos internos ---
|
||||
|
||||
Reference in New Issue
Block a user