renombrades extensions .h a .hpp
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// IWYU pragma: no_include <bits/std_abs.h>
|
||||
#include "credits.h"
|
||||
#include "credits.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_RenderFillRect, SDL_RenderTexture, SDL_SetRenderTarget, SDL_SetRenderDrawColor, SDL_CreateTexture, SDL_DestroyTexture, SDL_GetTicks, SDL_GetRenderTarget, SDL_PixelFormat, SDL_PollEvent, SDL_RenderClear, SDL_RenderRect, SDL_SetTextureBlendMode, SDL_TextureAccess, SDL_BLENDMODE_BLEND, SDL_Event
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
#include <string_view> // Para string_view
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "balloon_manager.h" // Para BalloonManager
|
||||
#include "color.h" // Para Zone, Colors::SHADOW_TEXT, Colors::NO_COLOR_MOD, Color
|
||||
#include "fade.h" // Para Fade, FadeType, FadeMode
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input, Input::ALLOW_REPEAT
|
||||
#include "lang.h" // Para getText
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamFade
|
||||
#include "player.h" // Para Player, PlayerState
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "text.h" // Para Text, Text::CENTER, Text::SHADOW
|
||||
#include "texture.h" // Para Texture
|
||||
#include "tiled_bg.h" // Para TiledBG, TiledBGMode
|
||||
#include "ui/service_menu.h" // Para ServiceMenu
|
||||
#include "utils.h"
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "balloon_manager.hpp" // Para BalloonManager
|
||||
#include "color.hpp" // Para Zone, Colors::SHADOW_TEXT, Colors::NO_COLOR_MOD, Color
|
||||
#include "fade.hpp" // Para Fade, FadeType, FadeMode
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "input.hpp" // Para Input, Input::ALLOW_REPEAT
|
||||
#include "lang.hpp" // Para getText
|
||||
#include "param.hpp" // Para Param, param, ParamGame, ParamFade
|
||||
#include "player.hpp" // Para Player, PlayerState
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
#include "text.hpp" // Para Text, Text::CENTER, Text::SHADOW
|
||||
#include "texture.hpp" // Para Texture
|
||||
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode
|
||||
#include "ui/service_menu.hpp" // Para ServiceMenu
|
||||
#include "utils.hpp"
|
||||
|
||||
// Textos
|
||||
constexpr std::string_view TEXT_COPYRIGHT = "@2020,2025 JailDesigner";
|
||||
@@ -105,7 +105,7 @@ void Credits::update(float deltaTime) {
|
||||
const float multiplier = want_to_pass_ ? 4.0f : 1.0f;
|
||||
const float adjusted_delta_time = deltaTime * multiplier;
|
||||
|
||||
static auto *const SCREEN = Screen::get();
|
||||
static auto* const SCREEN = Screen::get();
|
||||
SCREEN->update(deltaTime); // Actualiza el objeto screen
|
||||
Audio::update(); // Actualiza el objeto audio
|
||||
|
||||
@@ -126,7 +126,7 @@ void Credits::update(float deltaTime) {
|
||||
|
||||
// Dibuja Credits::en patalla
|
||||
void Credits::render() {
|
||||
static auto *const SCREEN = Screen::get();
|
||||
static auto* const SCREEN = Screen::get();
|
||||
|
||||
SCREEN->start(); // Prepara para empezar a dibujar en la textura de juego
|
||||
SDL_RenderTexture(SCREEN->getRenderer(), canvas_, nullptr, nullptr); // Copia la textura con la zona de juego a la pantalla
|
||||
@@ -251,7 +251,7 @@ void Credits::fillTextTexture() {
|
||||
// Dibuja todos los sprites en la textura
|
||||
void Credits::fillCanvas() {
|
||||
// Cambia el destino del renderizador
|
||||
auto *temp = SDL_GetRenderTarget(Screen::get()->getRenderer());
|
||||
auto* temp = SDL_GetRenderTarget(Screen::get()->getRenderer());
|
||||
SDL_SetRenderTarget(Screen::get()->getRenderer(), canvas_);
|
||||
|
||||
// Dibuja el fondo, los globos y los jugadores
|
||||
@@ -411,7 +411,7 @@ void Credits::initPlayers() {
|
||||
players_.back()->setPlayingState(Player::State::CREDITS);
|
||||
|
||||
// Registra los jugadores en Options
|
||||
for (const auto &player : players_) {
|
||||
for (const auto& player : players_) {
|
||||
Options::keyboard.addPlayer(player);
|
||||
Options::gamepad_manager.addPlayer(player);
|
||||
}
|
||||
@@ -541,14 +541,14 @@ void Credits::cycleColors() {
|
||||
|
||||
// Actualza los jugadores (time-based)
|
||||
void Credits::updatePlayers(float deltaTime) {
|
||||
for (auto &player : players_) {
|
||||
for (auto& player : players_) {
|
||||
player->update(deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
// Renderiza los jugadores
|
||||
void Credits::renderPlayers() {
|
||||
for (auto const &player : players_) {
|
||||
for (auto const& player : players_) {
|
||||
player->render();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#include <memory> // Para unique_ptr, shared_ptr
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "color.h" // Para Zone, Color
|
||||
#include "options.h" // Para AudioOptions, MusicOptions, audio
|
||||
#include "param.h" // Para Param, ParamGame, param
|
||||
#include "utils.h"
|
||||
#include "color.hpp" // Para Zone, Color
|
||||
#include "options.hpp" // Para AudioOptions, MusicOptions, audio
|
||||
#include "param.hpp" // Para Param, ParamGame, param
|
||||
#include "utils.hpp"
|
||||
|
||||
// Declaraciones adelantadas
|
||||
class BalloonManager;
|
||||
@@ -27,7 +27,7 @@ class Credits {
|
||||
|
||||
private:
|
||||
// --- Métodos del bucle principal ---
|
||||
void update(float deltaTime); // Actualización principal de la lógica (time-based)
|
||||
void update(float deltaTime); // Actualización principal de la lógica (time-based)
|
||||
auto calculateDeltaTime() -> float; // Calcula el deltatime
|
||||
|
||||
private:
|
||||
@@ -42,14 +42,14 @@ class Credits {
|
||||
std::vector<std::shared_ptr<Player>> players_; // Vector de jugadores
|
||||
|
||||
// --- Gestión de texturas ---
|
||||
SDL_Texture *text_texture_; // Textura con el texto de créditos
|
||||
SDL_Texture *canvas_; // Textura donde se dibuja todo
|
||||
SDL_Texture* text_texture_; // Textura con el texto de créditos
|
||||
SDL_Texture* canvas_; // Textura donde se dibuja todo
|
||||
|
||||
// --- Temporización y contadores ---
|
||||
Uint64 last_time_ = 0; // Último tiempo registrado para deltaTime
|
||||
float counter_ = 0; // Contador principal de lógica
|
||||
float counter_pre_fade_ = 0; // Activación del fundido final
|
||||
float counter_prevent_endless_ = 0; // Prevención de bucle infinito
|
||||
Uint64 last_time_ = 0; // Último tiempo registrado para deltaTime
|
||||
float counter_ = 0; // Contador principal de lógica
|
||||
float counter_pre_fade_ = 0; // Activación del fundido final
|
||||
float counter_prevent_endless_ = 0; // Prevención de bucle infinito
|
||||
|
||||
// --- Variables de estado ---
|
||||
bool fading_ = false; // Estado del fade final
|
||||
@@ -67,16 +67,16 @@ class Credits {
|
||||
|
||||
// --- Estado de acumuladores para animaciones ---
|
||||
struct CreditsState {
|
||||
float texture_accumulator = 0.0f;
|
||||
float balloon_accumulator = 0.0f;
|
||||
float powerball_accumulator = 0.0f;
|
||||
float black_rect_accumulator = 0.0f;
|
||||
float r = 255.0f; // UPPER_LIMIT
|
||||
float g = 0.0f; // LOWER_LIMIT
|
||||
float b = 0.0f; // LOWER_LIMIT
|
||||
float step_r = -0.5f;
|
||||
float step_g = 0.3f;
|
||||
float step_b = 0.1f;
|
||||
float texture_accumulator = 0.0f;
|
||||
float balloon_accumulator = 0.0f;
|
||||
float powerball_accumulator = 0.0f;
|
||||
float black_rect_accumulator = 0.0f;
|
||||
float r = 255.0f; // UPPER_LIMIT
|
||||
float g = 0.0f; // LOWER_LIMIT
|
||||
float b = 0.0f; // LOWER_LIMIT
|
||||
float step_r = -0.5f;
|
||||
float step_g = 0.3f;
|
||||
float step_b = 0.1f;
|
||||
} credits_state_;
|
||||
|
||||
// --- Rectángulos de renderizado ---
|
||||
@@ -125,25 +125,25 @@ class Credits {
|
||||
void checkInput(); // Procesamiento de entrada
|
||||
|
||||
// --- Métodos de renderizado ---
|
||||
void fillTextTexture(); // Crear textura de texto de créditos
|
||||
void fillCanvas(); // Renderizar todos los sprites y fondos
|
||||
void renderPlayers(); // Renderiza los jugadores
|
||||
void fillTextTexture(); // Crear textura de texto de créditos
|
||||
void fillCanvas(); // Renderizar todos los sprites y fondos
|
||||
void renderPlayers(); // Renderiza los jugadores
|
||||
|
||||
// --- Métodos de lógica del juego ---
|
||||
void throwBalloons(); // Lanzar globos al escenario (frame-based)
|
||||
void throwBalloons(float deltaTime); // Lanzar globos al escenario (time-based)
|
||||
void initPlayers(); // Inicializar jugadores
|
||||
void updateAllFades(); // Actualizar estados de fade (frame-based)
|
||||
void updateAllFades(float deltaTime); // Actualizar estados de fade (time-based)
|
||||
void cycleColors(); // Cambiar colores de fondo
|
||||
void updatePlayers(float deltaTime); // Actualza los jugadores (time-based)
|
||||
void throwBalloons(); // Lanzar globos al escenario (frame-based)
|
||||
void throwBalloons(float deltaTime); // Lanzar globos al escenario (time-based)
|
||||
void initPlayers(); // Inicializar jugadores
|
||||
void updateAllFades(); // Actualizar estados de fade (frame-based)
|
||||
void updateAllFades(float deltaTime); // Actualizar estados de fade (time-based)
|
||||
void cycleColors(); // Cambiar colores de fondo
|
||||
void updatePlayers(float deltaTime); // Actualza los jugadores (time-based)
|
||||
|
||||
// --- Métodos de interfaz ---
|
||||
void updateBlackRects(); // Actualizar rectángulos negros (letterbox) (frame-based)
|
||||
void updateBlackRects(float deltaTime); // Actualizar rectángulos negros (letterbox) (time-based)
|
||||
void updateRedRect(); // Actualizar rectángulo rojo (borde)
|
||||
void updateTextureDstRects(); // Actualizar destinos de texturas (frame-based)
|
||||
void updateTextureDstRects(float deltaTime); // Actualizar destinos de texturas (time-based)
|
||||
void updateBlackRects(); // Actualizar rectángulos negros (letterbox) (frame-based)
|
||||
void updateBlackRects(float deltaTime); // Actualizar rectángulos negros (letterbox) (time-based)
|
||||
void updateRedRect(); // Actualizar rectángulo rojo (borde)
|
||||
void updateTextureDstRects(); // Actualizar destinos de texturas (frame-based)
|
||||
void updateTextureDstRects(float deltaTime); // Actualizar destinos de texturas (time-based)
|
||||
|
||||
// --- Métodos de audio ---
|
||||
static void setVolume(int amount); // Establecer volumen
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "game.h"
|
||||
#include "game.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_CreateTexture, SDL_Delay, SDL_DestroyTexture, SDL_EventType, SDL_GetRenderTarget, SDL_PollEvent, SDL_RenderTexture, SDL_SetTextureBlendMode, SDL_BLENDMODE_BLEND, SDL_Event, SDL_PixelFormat, SDL_Point, SDL_TextureAccess
|
||||
|
||||
@@ -11,42 +11,42 @@
|
||||
#include <random> // std::random_device, std::default_random_engine
|
||||
#include <utility> // Para move
|
||||
|
||||
#include "asset.h" // Para Asset
|
||||
#include "audio.h" // Para Audio
|
||||
#include "background.h" // Para Background
|
||||
#include "balloon.h" // Para Balloon
|
||||
#include "balloon_manager.h" // Para BalloonManager
|
||||
#include "bullet.h" // Para Bullet, Bullet::Type, BulletMoveStatus
|
||||
#include "bullet_manager.h" // Para BulletManager
|
||||
#include "color.h" // Para Color, Colors::FLASH
|
||||
#include "difficulty.h" // Para Code
|
||||
#include "fade.h" // Para Fade, FadeType, FadeMode
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "hit.h" // Para Hit
|
||||
#include "input.h" // Para Input
|
||||
#include "input_types.h" // Para InputAction
|
||||
#include "item.h" // Para Item, ItemType
|
||||
#include "lang.h" // Para getText
|
||||
#include "manage_hiscore_table.h" // Para HiScoreEntry, ManageHiScoreTable
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamScoreboard, ParamFade, ParamBalloon
|
||||
#include "path_sprite.h" // Para Path, PathSprite, createPath, PathType
|
||||
#include "pause_manager.h" // Para PauseManager
|
||||
#include "player.h" // Para Player
|
||||
#include "resource.h" // Para Resource
|
||||
#include "scoreboard.h" // Para Scoreboard
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, AttractMode, Options, attract_mode, options
|
||||
#include "smart_sprite.h" // Para SmartSprite
|
||||
#include "stage.h" // Para number, Stage, get, total_power, power, init, power_can_be_added, stages
|
||||
#include "tabe.h" // Para Tabe
|
||||
#include "text.h" // Para Text
|
||||
#include "texture.h" // Para Texture
|
||||
#include "ui/service_menu.h" // Para ServiceMenu
|
||||
#include "asset.hpp" // Para Asset
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "background.hpp" // Para Background
|
||||
#include "balloon.hpp" // Para Balloon
|
||||
#include "balloon_manager.hpp" // Para BalloonManager
|
||||
#include "bullet.hpp" // Para Bullet, Bullet::Type, BulletMoveStatus
|
||||
#include "bullet_manager.hpp" // Para BulletManager
|
||||
#include "color.hpp" // Para Color, Colors::FLASH
|
||||
#include "difficulty.hpp" // Para Code
|
||||
#include "fade.hpp" // Para Fade, FadeType, FadeMode
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "hit.hpp" // Para Hit
|
||||
#include "input.hpp" // Para Input
|
||||
#include "input_types.hpp" // Para InputAction
|
||||
#include "item.hpp" // Para Item, ItemType
|
||||
#include "lang.hpp" // Para getText
|
||||
#include "manage_hiscore_table.hpp" // Para HiScoreEntry, ManageHiScoreTable
|
||||
#include "param.hpp" // Para Param, param, ParamGame, ParamScoreboard, ParamFade, ParamBalloon
|
||||
#include "path_sprite.hpp" // Para Path, PathSprite, createPath, PathType
|
||||
#include "pause_manager.hpp" // Para PauseManager
|
||||
#include "player.hpp" // Para Player
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "scoreboard.hpp" // Para Scoreboard
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, AttractMode, Options, attract_mode, options
|
||||
#include "smart_sprite.hpp" // Para SmartSprite
|
||||
#include "stage.hpp" // Para number, Stage, get, total_power, power, init, power_can_be_added, stages
|
||||
#include "tabe.hpp" // Para Tabe
|
||||
#include "text.hpp" // Para Text
|
||||
#include "texture.hpp" // Para Texture
|
||||
#include "ui/service_menu.hpp" // Para ServiceMenu
|
||||
#ifdef _DEBUG
|
||||
#include <iostream> // Para std::cout
|
||||
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
#include "ui/notifier.hpp" // Para Notifier
|
||||
#endif
|
||||
|
||||
// Constructor
|
||||
@@ -902,8 +902,8 @@ void Game::render() {
|
||||
fade_in_->render(); // Dibuja el fade de entrada
|
||||
fade_out_->render(); // Dibuja el fade de salida
|
||||
|
||||
//SDL_SetRenderDrawColor(renderer_, 255, 0, 0, 255);
|
||||
//SDL_RenderLine(renderer_, param.game.play_area.rect.x, param.game.play_area.center_y, param.game.play_area.rect.w, param.game.play_area.center_y);
|
||||
// SDL_SetRenderDrawColor(renderer_, 255, 0, 0, 255);
|
||||
// SDL_RenderLine(renderer_, param.game.play_area.rect.x, param.game.play_area.center_y, param.game.play_area.rect.w, param.game.play_area.center_y);
|
||||
|
||||
screen_->render(); // Vuelca el contenido del renderizador en pantalla
|
||||
}
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "bullet.h" // Para Bullet
|
||||
#include "bullet_manager.h" // Para BulletManager
|
||||
#include "hit.h" // Para Hit
|
||||
#include "item.h" // Para Item, ItemType
|
||||
#include "manage_hiscore_table.h" // Para HiScoreEntry
|
||||
#include "options.h" // Para Settings, settings
|
||||
#include "path_sprite.h" // Para PathSprite, Path
|
||||
#include "player.h" // Para Player
|
||||
#include "smart_sprite.h" // Para SmartSprite
|
||||
#include "stage.h" // Para StageManager
|
||||
#include "demo.h" // Para Demo
|
||||
#include "utils.h" // Para otras utilidades
|
||||
#include "bullet.hpp" // Para Bullet
|
||||
#include "bullet_manager.hpp" // Para BulletManager
|
||||
#include "demo.hpp" // Para Demo
|
||||
#include "hit.hpp" // Para Hit
|
||||
#include "item.hpp" // Para Item, ItemType
|
||||
#include "manage_hiscore_table.hpp" // Para HiScoreEntry
|
||||
#include "options.hpp" // Para Settings, settings
|
||||
#include "path_sprite.hpp" // Para PathSprite, Path
|
||||
#include "player.hpp" // Para Player
|
||||
#include "smart_sprite.hpp" // Para SmartSprite
|
||||
#include "stage.hpp" // Para StageManager
|
||||
#include "utils.hpp" // Para otras utilidades
|
||||
|
||||
class Background;
|
||||
class Balloon;
|
||||
@@ -316,10 +316,10 @@ class Game {
|
||||
void setMenace(); // Calcula y establece amenaza según globos activos
|
||||
|
||||
// --- Puntuación y marcador ---
|
||||
void updateHiScore(); // Actualiza el récord máximo si es necesario
|
||||
void updateHiScore(); // Actualiza el récord máximo si es necesario
|
||||
void updateScoreboard(float deltaTime); // Actualiza la visualización del marcador
|
||||
void updateHiScoreName(); // Pone en el marcador el nombre del primer jugador de la tabla
|
||||
void initScoreboard(); // Inicializa el sistema de puntuación
|
||||
void updateHiScoreName(); // Pone en el marcador el nombre del primer jugador de la tabla
|
||||
void initScoreboard(); // Inicializa el sistema de puntuación
|
||||
|
||||
// --- Modo demostración ---
|
||||
void initDemo(Player::Id player_id); // Inicializa variables para el modo demostración
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "hiscore_table.h"
|
||||
#include "hiscore_table.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
#include <functional> // Para function
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "background.h" // Para Background
|
||||
#include "color.h" // Para Color, easeOutQuint, Colors::NO_COLOR_MOD
|
||||
#include "fade.h" // Para Fade, FadeMode, FadeType
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input
|
||||
#include "lang.h" // Para getText
|
||||
#include "manage_hiscore_table.h" // Para HiScoreEntry
|
||||
#include "options.h" // Para SettingsOptions, settings
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamFade
|
||||
#include "path_sprite.h" // Para PathSprite, Path, PathType
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "text.h" // Para Text, Text::SHADOW, Text::COLOR
|
||||
#include "texture.h" // Para Texture
|
||||
#include "utils.h"
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "background.hpp" // Para Background
|
||||
#include "color.hpp" // Para Color, easeOutQuint, Colors::NO_COLOR_MOD
|
||||
#include "fade.hpp" // Para Fade, FadeMode, FadeType
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "input.hpp" // Para Input
|
||||
#include "lang.hpp" // Para getText
|
||||
#include "manage_hiscore_table.hpp" // Para HiScoreEntry
|
||||
#include "options.hpp" // Para SettingsOptions, settings
|
||||
#include "param.hpp" // Para Param, param, ParamGame, ParamFade
|
||||
#include "path_sprite.hpp" // Para PathSprite, Path, PathType
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
#include "text.hpp" // Para Text, Text::SHADOW, Text::COLOR
|
||||
#include "texture.hpp" // Para Texture
|
||||
#include "utils.hpp"
|
||||
|
||||
// Constructor
|
||||
HiScoreTable::HiScoreTable()
|
||||
@@ -54,9 +54,9 @@ HiScoreTable::~HiScoreTable() {
|
||||
|
||||
// Actualiza las variables
|
||||
void HiScoreTable::update(float delta_time) {
|
||||
elapsed_time_ += delta_time; // Incrementa el tiempo transcurrido
|
||||
|
||||
static auto *const SCREEN = Screen::get();
|
||||
elapsed_time_ += delta_time; // Incrementa el tiempo transcurrido
|
||||
|
||||
static auto* const SCREEN = Screen::get();
|
||||
SCREEN->update(delta_time); // Actualiza el objeto screen
|
||||
Audio::update(); // Actualiza el objeto audio
|
||||
|
||||
@@ -69,16 +69,16 @@ void HiScoreTable::update(float delta_time) {
|
||||
|
||||
// Pinta en pantalla
|
||||
void HiScoreTable::render() {
|
||||
static auto *const SCREEN = Screen::get();
|
||||
static auto* const SCREEN = Screen::get();
|
||||
|
||||
SCREEN->start(); // Prepara para empezar a dibujar en la textura de juego
|
||||
SCREEN->clean(); // Limpia la pantalla
|
||||
|
||||
background_->render(); // Pinta el fondo
|
||||
float counter_equivalent = elapsed_time_ * 60.0f; // Convertir tiempo a equivalente frame para UI
|
||||
background_->render(); // Pinta el fondo
|
||||
float counter_equivalent = elapsed_time_ * 60.0f; // Convertir tiempo a equivalente frame para UI
|
||||
view_area_.y = std::max(0.0F, param.game.height - counter_equivalent + 100); // Establece la ventana del backbuffer
|
||||
SDL_RenderTexture(renderer_, backbuffer_, nullptr, &view_area_); // Copia el backbuffer al renderizador
|
||||
fade_->render(); // Renderiza el fade
|
||||
fade_->render(); // Renderiza el fade
|
||||
|
||||
SCREEN->render(); // Vuelca el contenido del renderizador en pantalla
|
||||
}
|
||||
@@ -86,7 +86,7 @@ void HiScoreTable::render() {
|
||||
// Dibuja los sprites en la textura
|
||||
void HiScoreTable::fillTexture() {
|
||||
// Pinta en el backbuffer el texto y los sprites
|
||||
auto *temp = SDL_GetRenderTarget(renderer_);
|
||||
auto* temp = SDL_GetRenderTarget(renderer_);
|
||||
SDL_SetRenderTarget(renderer_, backbuffer_);
|
||||
SDL_SetRenderDrawColor(renderer_, 0, 0, 0, 0);
|
||||
SDL_RenderClear(renderer_);
|
||||
@@ -95,7 +95,7 @@ void HiScoreTable::fillTexture() {
|
||||
header_->render();
|
||||
|
||||
// Escribe los nombres de la tabla de puntuaciones
|
||||
for (auto const &entry : entry_names_) {
|
||||
for (auto const& entry : entry_names_) {
|
||||
entry->render();
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void HiScoreTable::createSprites() {
|
||||
const auto TABLE_POSITION = format(i + 1) + ". ";
|
||||
const auto SCORE = format(Options::settings.hi_score_table.at(i).score);
|
||||
const auto NUM_DOTS = ENTRY_LENGTH - Options::settings.hi_score_table.at(i).name.size() - SCORE.size();
|
||||
const auto *const ONE_CC = Options::settings.hi_score_table.at(i).one_credit_complete ? " }" : "";
|
||||
const auto* const ONE_CC = Options::settings.hi_score_table.at(i).one_credit_complete ? " }" : "";
|
||||
std::string dots;
|
||||
for (int j = 0; j < (int)NUM_DOTS; ++j) {
|
||||
dots = dots + ".";
|
||||
@@ -272,7 +272,7 @@ void HiScoreTable::updateSprites(float delta_time) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto const &entry : entry_names_) {
|
||||
for (auto const& entry : entry_names_) {
|
||||
entry->update(delta_time);
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ void HiScoreTable::iniEntryColors() {
|
||||
void HiScoreTable::glowEntryNames() {
|
||||
int color_counter = static_cast<int>(elapsed_time_ * 60.0f / 5.0f); // Convertir tiempo a equivalente frame
|
||||
const Color ENTRY_COLOR = getEntryColor(color_counter);
|
||||
for (const auto &entry_index : Options::settings.glowing_entries) {
|
||||
for (const auto& entry_index : Options::settings.glowing_entries) {
|
||||
if (entry_index != -1) {
|
||||
entry_names_.at(entry_index)->getTexture()->setColor(ENTRY_COLOR);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
#include <string> // Para string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "color.h" // Para Color
|
||||
#include "fade.h" // Para Fade
|
||||
#include "path_sprite.h" // Para Path, PathSprite (ptr only)
|
||||
#include "color.hpp" // Para Color
|
||||
#include "fade.hpp" // Para Fade
|
||||
#include "path_sprite.hpp" // Para Path, PathSprite (ptr only)
|
||||
|
||||
class Background;
|
||||
class Sprite;
|
||||
@@ -39,8 +39,8 @@ class HiScoreTable {
|
||||
static constexpr float CLOUDS_SPEED = -6.0f; // Velocidad nubes (pixels/s)
|
||||
|
||||
// --- Objetos y punteros ---
|
||||
SDL_Renderer *renderer_; // El renderizador de la ventana
|
||||
SDL_Texture *backbuffer_; // Textura para usar como backbuffer
|
||||
SDL_Renderer* renderer_; // El renderizador de la ventana
|
||||
SDL_Texture* backbuffer_; // Textura para usar como backbuffer
|
||||
|
||||
std::unique_ptr<Fade> fade_; // Objeto para renderizar fades
|
||||
std::unique_ptr<Background> background_; // Objeto para dibujar el fondo del juego
|
||||
@@ -58,13 +58,13 @@ class HiScoreTable {
|
||||
|
||||
// --- Flags para eventos basados en tiempo ---
|
||||
struct HiScoreFlags {
|
||||
bool background_changed = false;
|
||||
bool fade_activated = false;
|
||||
bool background_changed = false;
|
||||
bool fade_activated = false;
|
||||
|
||||
void reset() {
|
||||
background_changed = false;
|
||||
fade_activated = false;
|
||||
}
|
||||
void reset() {
|
||||
background_changed = false;
|
||||
fade_activated = false;
|
||||
}
|
||||
} hiscore_flags_;
|
||||
|
||||
// --- Métodos internos ---
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "instructions.h"
|
||||
#include "instructions.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_Re...
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
#include <utility> // Para move
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "color.h" // Para Color, Colors::SHADOW_TEXT, Zone, NO_TEXT_C...
|
||||
#include "fade.h" // Para Fade, FadeMode, FadeType
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input
|
||||
#include "item.h" // Para Item
|
||||
#include "lang.h" // Para getText
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamFade, Param...
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "text.h" // Para Text, Text::CENTER, Text::COLOR, Text::SHADOW
|
||||
#include "tiled_bg.h" // Para TiledBG, TiledBGMode
|
||||
#include "utils.h"
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "color.hpp" // Para Color, Colors::SHADOW_TEXT, Zone, NO_TEXT_C...
|
||||
#include "fade.hpp" // Para Fade, FadeMode, FadeType
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "input.hpp" // Para Input
|
||||
#include "item.hpp" // Para Item
|
||||
#include "lang.hpp" // Para getText
|
||||
#include "param.hpp" // Para Param, param, ParamGame, ParamFade, Param...
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
#include "text.hpp" // Para Text, Text::CENTER, Text::COLOR, Text::SHADOW
|
||||
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode
|
||||
#include "utils.hpp"
|
||||
|
||||
// Constructor
|
||||
Instructions::Instructions()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <memory> // Para unique_ptr, shared_ptr
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
|
||||
class Fade;
|
||||
class Text;
|
||||
@@ -57,9 +57,9 @@ class Instructions {
|
||||
static constexpr float LINE_START_DELAY_MS = 5.0f; // Retraso entre líneas (5ms)
|
||||
|
||||
// --- Objetos y punteros ---
|
||||
SDL_Renderer *renderer_; // El renderizador de la ventana
|
||||
SDL_Texture *texture_; // Textura fija con el texto
|
||||
SDL_Texture *backbuffer_; // Textura para usar como backbuffer
|
||||
SDL_Renderer* renderer_; // El renderizador de la ventana
|
||||
SDL_Texture* texture_; // Textura fija con el texto
|
||||
SDL_Texture* backbuffer_; // Textura para usar como backbuffer
|
||||
|
||||
std::vector<std::shared_ptr<Texture>> item_textures_; // Vector con las texturas de los items
|
||||
std::vector<std::unique_ptr<Sprite>> sprites_; // Vector con los sprites de los items
|
||||
@@ -88,8 +88,8 @@ class Instructions {
|
||||
void iniSprites(); // Inicializa los sprites de los items
|
||||
void updateSprites(); // Actualiza los sprites
|
||||
static auto initializeLines(int height) -> std::vector<Line>; // Inicializa las líneas animadas
|
||||
static auto moveLines(std::vector<Line> &lines, int width, float duration, Uint32 start_delay) -> bool; // Mueve las líneas (ya usa tiempo real)
|
||||
static void renderLines(SDL_Renderer *renderer, SDL_Texture *texture, const std::vector<Line> &lines); // Renderiza las líneas
|
||||
void updateBackbuffer(float delta_time); // Gestiona la textura con los gráficos
|
||||
static auto moveLines(std::vector<Line>& lines, int width, float duration, Uint32 start_delay) -> bool; // Mueve las líneas (ya usa tiempo real)
|
||||
static void renderLines(SDL_Renderer* renderer, SDL_Texture* texture, const std::vector<Line>& lines); // Renderiza las líneas
|
||||
void updateBackbuffer(float delta_time); // Gestiona la textura con los gráficos
|
||||
float calculateDeltaTime(); // Calcula el tiempo transcurrido desde el último frame
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "intro.h"
|
||||
#include "intro.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderDrawColor, SDL_FRect, SDL_RenderFillRect, SDL_GetRenderTarget, SDL_RenderClear, SDL_RenderRect, SDL_SetRenderTarget, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_PollEvent, SDL_RenderTexture, SDL_TextureAccess, SDL_Event, Uint32
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
#include <string> // Para basic_string, string
|
||||
#include <utility> // Para move
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "color.h" // Para Color
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input
|
||||
#include "lang.h" // Para getText
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamIntro, ParamTitle
|
||||
#include "path_sprite.h" // Para PathSprite, PathType
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options
|
||||
#include "text.h" // Para Text
|
||||
#include "texture.h" // Para Texture
|
||||
#include "tiled_bg.h" // Para TiledBG, TiledBGMode
|
||||
#include "utils.h" // Para Zone, easeInOutExpo, easeInElastic, easeOutBounce, easeOutElastic, easeOutQuad, easeOutQuint
|
||||
#include "writer.h" // Para Writer
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "color.hpp" // Para Color
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "input.hpp" // Para Input
|
||||
#include "lang.hpp" // Para getText
|
||||
#include "param.hpp" // Para Param, param, ParamGame, ParamIntro, ParamTitle
|
||||
#include "path_sprite.hpp" // Para PathSprite, PathType
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options
|
||||
#include "text.hpp" // Para Text
|
||||
#include "texture.hpp" // Para Texture
|
||||
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode
|
||||
#include "utils.hpp" // Para Zone, easeInOutExpo, easeInElastic, easeOutBounce, easeOutElastic, easeOutQuad, easeOutQuint
|
||||
#include "writer.hpp" // Para Writer
|
||||
|
||||
// Constructor
|
||||
Intro::Intro()
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include <memory> // Para unique_ptr
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "color.h" // Para Color
|
||||
#include "param.h" // Para Param, ParamIntro, param
|
||||
#include "path_sprite.h" // Para PathSprite
|
||||
#include "tiled_bg.h" // Para TiledBG
|
||||
#include "writer.h" // Para Writer
|
||||
#include "color.hpp" // Para Color
|
||||
#include "param.hpp" // Para Param, ParamIntro, param
|
||||
#include "path_sprite.hpp" // Para PathSprite
|
||||
#include "tiled_bg.hpp" // Para TiledBG
|
||||
#include "writer.hpp" // Para Writer
|
||||
|
||||
// --- Clase Intro: secuencia cinemática de introducción del juego ---
|
||||
//
|
||||
@@ -1,21 +1,21 @@
|
||||
#include "logo.h"
|
||||
#include "logo.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_PollEvent, SDL_Event, SDL_FRect
|
||||
|
||||
#include <utility> // Para move
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "color.h" // Para Color
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input
|
||||
#include "param.h" // Para Param, ParamGame, param
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "texture.h" // Para Texture
|
||||
#include "utils.h" // Para Zone
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "color.hpp" // Para Color
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "input.hpp" // Para Input
|
||||
#include "param.hpp" // Para Param, ParamGame, param
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
#include "texture.hpp" // Para Texture
|
||||
#include "utils.hpp" // Para Zone
|
||||
|
||||
// Constructor
|
||||
Logo::Logo()
|
||||
@@ -138,7 +138,7 @@ void Logo::updateTextureColors(float delta_time) {
|
||||
void Logo::update(float delta_time) {
|
||||
elapsed_time_s_ += delta_time; // Acumula el tiempo transcurrido
|
||||
|
||||
static auto *const SCREEN = Screen::get();
|
||||
static auto* const SCREEN = Screen::get();
|
||||
SCREEN->update(delta_time); // Actualiza el objeto screen
|
||||
Audio::update(); // Actualiza el objeto audio
|
||||
|
||||
@@ -149,7 +149,7 @@ void Logo::update(float delta_time) {
|
||||
|
||||
// Dibuja en pantalla
|
||||
void Logo::render() {
|
||||
static auto *const SCREEN = Screen::get();
|
||||
static auto* const SCREEN = Screen::get();
|
||||
|
||||
SCREEN->start();
|
||||
SCREEN->clean();
|
||||
@@ -184,7 +184,7 @@ void Logo::run() {
|
||||
// Renderiza el logo de JAILGAMES
|
||||
void Logo::renderJAILGAMES() {
|
||||
// Dibuja los sprites
|
||||
for (auto &sprite : jail_sprite_) {
|
||||
for (auto& sprite : jail_sprite_) {
|
||||
sprite->render();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <memory> // Para unique_ptr, shared_ptr
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "color.h" // Para Color
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "color.hpp" // Para Color
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
|
||||
class Texture;
|
||||
|
||||
@@ -36,13 +36,13 @@ class Logo {
|
||||
|
||||
private:
|
||||
// --- Constantes de tiempo (en segundos) ---
|
||||
static constexpr float SOUND_TRIGGER_TIME_S = 0.5f; // Tiempo para activar el sonido del logo
|
||||
static constexpr float SHOW_SINCE_SPRITE_TIME_S = 1.167f; // Tiempo para mostrar el sprite "SINCE 1998"
|
||||
static constexpr float INIT_FADE_TIME_S = 5.0f; // Tiempo de inicio del fade a negro
|
||||
static constexpr float END_LOGO_TIME_S = 6.668f; // Tiempo de finalización del logo
|
||||
static constexpr float POST_LOGO_DURATION_S = 0.333f; // Duración adicional después del fade
|
||||
static constexpr float LOGO_SPEED_PX_PER_S = 480.0f; // Velocidad de desplazamiento (píxeles por segundo) - 8.0f/16.67f*1000
|
||||
static constexpr float COLOR_CHANGE_INTERVAL_S = 0.0667f; // Intervalo entre cambios de color (~4 frames a 60fps)
|
||||
static constexpr float SOUND_TRIGGER_TIME_S = 0.5f; // Tiempo para activar el sonido del logo
|
||||
static constexpr float SHOW_SINCE_SPRITE_TIME_S = 1.167f; // Tiempo para mostrar el sprite "SINCE 1998"
|
||||
static constexpr float INIT_FADE_TIME_S = 5.0f; // Tiempo de inicio del fade a negro
|
||||
static constexpr float END_LOGO_TIME_S = 6.668f; // Tiempo de finalización del logo
|
||||
static constexpr float POST_LOGO_DURATION_S = 0.333f; // Duración adicional después del fade
|
||||
static constexpr float LOGO_SPEED_PX_PER_S = 480.0f; // Velocidad de desplazamiento (píxeles por segundo) - 8.0f/16.67f*1000
|
||||
static constexpr float COLOR_CHANGE_INTERVAL_S = 0.0667f; // Intervalo entre cambios de color (~4 frames a 60fps)
|
||||
|
||||
// --- Constantes de layout ---
|
||||
static constexpr int SINCE_SPRITE_Y_OFFSET = 83; // Posición Y base del sprite "Since 1998"
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "title.h"
|
||||
#include "title.hpp"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, Uint32, SDL_Event, SDL_PollEvent, SDL_EventType
|
||||
|
||||
@@ -6,27 +6,27 @@
|
||||
#include <string> // Para operator+, char_traits, to_string, string, basic_string
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "audio.h" // Para Audio
|
||||
#include "color.h" // Para Colors::NO_COLOR_MOD, Colors::TITLE_SHADOW_TEXT
|
||||
#include "fade.h" // Para Fade, FadeType
|
||||
#include "game_logo.h" // Para GameLogo
|
||||
#include "global_events.h" // Para check
|
||||
#include "global_inputs.h" // Para check
|
||||
#include "input.h" // Para Input
|
||||
#include "input_types.h" // Para InputAction
|
||||
#include "lang.h" // Para getText
|
||||
#include "options.h" // Para Gamepad, GamepadManager, gamepad_manager, Settings, settings, Keyboard, keyboard, getPlayerWhoUsesKeyboard, swapControllers, swapKeyboard
|
||||
#include "param.h" // Para Param, param, ParamGame, ParamTitle, ParamFade
|
||||
#include "player.h" // Para Player
|
||||
#include "resource.h" // Para Resource
|
||||
#include "screen.h" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options, AttractMode, attract_mode
|
||||
#include "sprite.h" // Para Sprite
|
||||
#include "text.h" // Para Text
|
||||
#include "tiled_bg.h" // Para TiledBG, TiledBGMode
|
||||
#include "ui/notifier.h" // Para Notifier
|
||||
#include "ui/service_menu.h" // Para ServiceMenu
|
||||
#include "utils.h" // Para Zone, BLOCK
|
||||
#include "audio.hpp" // Para Audio
|
||||
#include "color.hpp" // Para Colors::NO_COLOR_MOD, Colors::TITLE_SHADOW_TEXT
|
||||
#include "fade.hpp" // Para Fade, FadeType
|
||||
#include "game_logo.hpp" // Para GameLogo
|
||||
#include "global_events.hpp" // Para check
|
||||
#include "global_inputs.hpp" // Para check
|
||||
#include "input.hpp" // Para Input
|
||||
#include "input_types.hpp" // Para InputAction
|
||||
#include "lang.hpp" // Para getText
|
||||
#include "options.hpp" // Para Gamepad, GamepadManager, gamepad_manager, Settings, settings, Keyboard, keyboard, getPlayerWhoUsesKeyboard, swapControllers, swapKeyboard
|
||||
#include "param.hpp" // Para Param, param, ParamGame, ParamTitle, ParamFade
|
||||
#include "player.hpp" // Para Player
|
||||
#include "resource.hpp" // Para Resource
|
||||
#include "screen.hpp" // Para Screen
|
||||
#include "section.hpp" // Para Name, name, Options, options, AttractMode, attract_mode
|
||||
#include "sprite.hpp" // Para Sprite
|
||||
#include "text.hpp" // Para Text
|
||||
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode
|
||||
#include "ui/notifier.hpp" // Para Notifier
|
||||
#include "ui/service_menu.hpp" // Para ServiceMenu
|
||||
#include "utils.hpp" // Para Zone, BLOCK
|
||||
|
||||
class Texture;
|
||||
|
||||
@@ -45,7 +45,8 @@ Title::Title()
|
||||
state_(State::LOGO_ANIMATING),
|
||||
num_controllers_(Input::get()->getNumGamepads())
|
||||
#ifdef _DEBUG
|
||||
, debug_color_(param.title.bg_color)
|
||||
,
|
||||
debug_color_(param.title.bg_color)
|
||||
#endif
|
||||
{
|
||||
// Configura objetos
|
||||
@@ -84,7 +85,7 @@ Title::~Title() {
|
||||
|
||||
// Actualiza las variables del objeto
|
||||
void Title::update(float deltaTime) {
|
||||
static auto *const SCREEN = Screen::get();
|
||||
static auto* const SCREEN = Screen::get();
|
||||
SCREEN->update(deltaTime); // Actualiza el objeto screen
|
||||
Audio::update(); // Actualiza el objeto audio
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string_view> // Para string_view
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "player.h" // Para Player
|
||||
#include "player.hpp" // Para Player
|
||||
#include "section.hpp" // Para Options, Name (ptr only)
|
||||
|
||||
class Fade;
|
||||
@@ -130,11 +130,11 @@ class Title {
|
||||
auto getPlayer(Player::Id id) -> std::shared_ptr<Player>; // Obtiene un jugador a partir de su "id"
|
||||
|
||||
// --- Visualización / Renderizado ---
|
||||
void render(); // Dibuja el objeto en pantalla
|
||||
void updateFade(); // Actualiza el efecto de fundido (fade in/out)
|
||||
void render(); // Dibuja el objeto en pantalla
|
||||
void updateFade(); // Actualiza el efecto de fundido (fade in/out)
|
||||
void updateStartPrompt(float deltaTime); // Actualiza el mensaje de "Pulsa Start"
|
||||
void renderStartPrompt(); // Dibuja el mensaje de "Pulsa Start" en pantalla
|
||||
void renderCopyright(); // Dibuja el aviso de copyright
|
||||
void renderStartPrompt(); // Dibuja el mensaje de "Pulsa Start" en pantalla
|
||||
void renderCopyright(); // Dibuja el aviso de copyright
|
||||
|
||||
// --- Utilidades estáticas ---
|
||||
static void swapControllers(); // Intercambia la asignación de mandos a los jugadores
|
||||
Reference in New Issue
Block a user