renombrades extensions .h a .hpp

This commit is contained in:
2025-10-17 21:45:19 +02:00
parent 50ccb2ccc2
commit 46974ef2eb
144 changed files with 1758 additions and 1783 deletions

View File

@@ -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();
}
}