This commit is contained in:
2026-04-14 13:26:30 +02:00
parent 4429cd92c1
commit f80d0a656e
116 changed files with 933 additions and 917 deletions

View File

@@ -44,24 +44,38 @@ make tidy-fix # run clang-tidy with auto-fix
## Architecture ## Architecture
### Singletons (core systems) ### Source layout
- **Director** (`source/director.hpp`) — Application state machine, orchestrates scene transitions (Logo → Intro → Title → Game → Credits/HiScore → Title) The `source/` tree is organised in the same style as the sibling projects `projecte_2026` and `jaildoctors_dilemma`:
- **Screen** (`source/screen.hpp`) — Window management, SDL3 GPU rendering pipeline, post-processing effects
- **Resource** (`source/resource.hpp`) — Asset loading/caching with PRELOAD and LAZY_LOAD modes, reads from `resources.pack`
- **Audio** (`source/audio.hpp`) — Music and SFX management
- **Input** (`source/input.hpp`) — Keyboard and gamepad input handling
### Scenes (source/sections/) ```
source/
├── core/ # engine: audio, input, locale, rendering (+ sdl3gpu, sprite), resources, system
├── game/ # gameplay: entities, gameplay, scenes, ui, options
├── utils/ # color, param, utils
├── external/ # vendored third-party headers (json, fkyaml, stb_*)
└── main.cpp
```
`#include` paths are absolute relative to `source/` (e.g. `#include "core/audio/audio.hpp"`, `#include "game/scenes/logo.hpp"`). The CMake build adds a single `-I${CMAKE_SOURCE_DIR}/source`.
### Singletons (core systems)
- **Director** (`source/core/system/director.hpp`) — Application state machine, orchestrates scene transitions (Logo → Intro → Title → Game → Credits/HiScore → Title)
- **Screen** (`source/core/rendering/screen.hpp`) — Window management, SDL3 GPU rendering pipeline, post-processing effects
- **Resource** (`source/core/resources/resource.hpp`) — Asset loading/caching with PRELOAD and LAZY_LOAD modes, reads from `resources.pack`
- **Audio** (`source/core/audio/audio.hpp`) — Music and SFX management
- **Input** (`source/core/input/input.hpp`) — Keyboard and gamepad input handling
### Scenes (source/game/scenes/)
Each scene is a self-contained class with update/render lifecycle. Scene flow is managed by Director. Each scene is a self-contained class with update/render lifecycle. Scene flow is managed by Director.
### Entity Managers ### Entity Managers
- `BalloonManager` / `BulletManager` — Object pool-based entity management - `BalloonManager` / `BulletManager` — Object pool-based entity management (`source/game/gameplay/`)
- `Player` — Two-player support (player 1: keyboard, player 2: gamepad) - `Player` — Two-player support (player 1: keyboard, player 2: gamepad) (`source/game/entities/`)
### Rendering Pipeline ### Rendering Pipeline
- SDL3 GPU API (Vulkan/Metal/D3D12 backends) - SDL3 GPU API (Vulkan/Metal/D3D12 backends)
- SPIR-V shaders compiled offline from GLSL (`data/shaders/`) via `glslc` - SPIR-V shaders compiled offline from GLSL (`data/shaders/`) via `glslc`
- Compiled shader headers embedded in `source/rendering/sdl3gpu/postfx_*_spv.h` - Compiled shader headers embedded in `source/core/rendering/sdl3gpu/postfx_*_spv.h`
- macOS uses Metal (no SPIR-V compilation needed) - macOS uses Metal (no SPIR-V compilation needed)
### Configuration ### Configuration
@@ -72,7 +86,9 @@ Each scene is a self-contained class with update/render lifecycle. Scene flow is
- Gamepad mappings: `config/gamecontrollerdb.txt` - Gamepad mappings: `config/gamecontrollerdb.txt`
### External Libraries (header-only/vendored in source/external/) ### External Libraries (header-only/vendored in source/external/)
- nlohmann/json, fkyaml (YAML), stb_image, stb_vorbis, jail_audio - nlohmann/json, fkyaml (YAML), stb_image, stb_vorbis
`jail_audio` lives in `source/core/audio/` and `gif.{hpp,cpp}` in `source/core/rendering/` — these are first-party, not third-party.
## Code Style ## Code Style

View File

@@ -28,91 +28,96 @@ configure_file(${CMAKE_SOURCE_DIR}/source/version.h.in ${CMAKE_BINARY_DIR}/versi
# --- 1. LISTA EXPLÍCITA DE FUENTES --- # --- 1. LISTA EXPLÍCITA DE FUENTES ---
set(APP_SOURCES set(APP_SOURCES
# --- Archivos Principales del Sistema ---
source/asset.cpp
source/audio.cpp
source/director.cpp
source/global_events.cpp
source/global_inputs.cpp
source/input.cpp
source/lang.cpp
source/main.cpp source/main.cpp
source/param.cpp
source/resource.cpp
source/resource_helper.cpp
source/resource_loader.cpp
source/resource_pack.cpp
source/screen.cpp
source/text.cpp
source/writer.cpp
# --- UI (User Interface) --- # --- core/audio ---
source/ui/menu_option.cpp source/core/audio/audio.cpp
source/ui/menu_renderer.cpp
source/ui/notifier.cpp
source/ui/service_menu.cpp
source/ui/ui_message.cpp
source/ui/window_message.cpp
# --- Lógica del Juego --- # --- core/input ---
source/balloon_formations.cpp source/core/input/define_buttons.cpp
source/balloon_manager.cpp source/core/input/global_inputs.cpp
source/balloon.cpp source/core/input/input.cpp
source/bullet.cpp source/core/input/input_types.cpp
source/bullet_manager.cpp source/core/input/mouse.cpp
source/enter_name.cpp
source/explosions.cpp
source/game_logo.cpp
source/item.cpp
source/manage_hiscore_table.cpp
source/player.cpp
source/scoreboard.cpp
source/tabe.cpp
# --- Escenas --- # --- core/locale ---
source/sections/credits.cpp source/core/locale/lang.cpp
source/sections/game.cpp
source/sections/hiscore_table.cpp
source/sections/instructions.cpp
source/sections/intro.cpp
source/sections/logo.cpp
source/sections/title.cpp
# --- Sprites y Gráficos --- # --- core/rendering ---
source/animated_sprite.cpp source/core/rendering/background.cpp
source/background.cpp source/core/rendering/fade.cpp
source/card_sprite.cpp source/core/rendering/gif.cpp
source/fade.cpp source/core/rendering/screen.cpp
source/moving_sprite.cpp source/core/rendering/text.cpp
source/path_sprite.cpp source/core/rendering/texture.cpp
source/smart_sprite.cpp source/core/rendering/tiled_bg.cpp
source/sprite.cpp source/core/rendering/writer.cpp
source/texture.cpp source/core/rendering/sdl3gpu/sdl3gpu_shader.cpp
source/tiled_bg.cpp source/core/rendering/sprite/animated_sprite.cpp
source/core/rendering/sprite/card_sprite.cpp
source/core/rendering/sprite/moving_sprite.cpp
source/core/rendering/sprite/path_sprite.cpp
source/core/rendering/sprite/smart_sprite.cpp
source/core/rendering/sprite/sprite.cpp
# --- Otros --- # --- core/resources ---
source/color.cpp source/core/resources/asset.cpp
source/demo.cpp source/core/resources/asset_integrated.cpp
source/define_buttons.cpp source/core/resources/resource.cpp
source/difficulty.cpp source/core/resources/resource_helper.cpp
source/input_types.cpp source/core/resources/resource_loader.cpp
source/mouse.cpp source/core/resources/resource_pack.cpp
source/options.cpp
source/shutdown.cpp
source/stage.cpp
source/system_utils.cpp
source/utils.cpp
)
# Fuentes de librerías de terceros # --- core/system ---
set(EXTERNAL_SOURCES source/core/system/demo.cpp
source/external/json.hpp source/core/system/director.cpp
source/external/gif.cpp source/core/system/global_events.cpp
) source/core/system/shutdown.cpp
source/core/system/system_utils.cpp
# Fuentes del sistema de renderizado # --- game ---
set(RENDERING_SOURCES source/game/options.cpp
source/rendering/sdl3gpu/sdl3gpu_shader.cpp
# --- game/entities ---
source/game/entities/balloon.cpp
source/game/entities/bullet.cpp
source/game/entities/explosions.cpp
source/game/entities/item.cpp
source/game/entities/player.cpp
source/game/entities/tabe.cpp
# --- game/gameplay ---
source/game/gameplay/balloon_formations.cpp
source/game/gameplay/balloon_manager.cpp
source/game/gameplay/bullet_manager.cpp
source/game/gameplay/difficulty.cpp
source/game/gameplay/enter_name.cpp
source/game/gameplay/game_logo.cpp
source/game/gameplay/manage_hiscore_table.cpp
source/game/gameplay/scoreboard.cpp
source/game/gameplay/stage.cpp
# --- game/scenes ---
source/game/scenes/credits.cpp
source/game/scenes/game.cpp
source/game/scenes/hiscore_table.cpp
source/game/scenes/instructions.cpp
source/game/scenes/intro.cpp
source/game/scenes/logo.cpp
source/game/scenes/title.cpp
# --- game/ui ---
source/game/ui/menu_option.cpp
source/game/ui/menu_renderer.cpp
source/game/ui/notifier.cpp
source/game/ui/service_menu.cpp
source/game/ui/ui_message.cpp
source/game/ui/window_message.cpp
# --- utils ---
source/utils/color.cpp
source/utils/param.cpp
source/utils/utils.cpp
) )
# Configuración de SDL3 # Configuración de SDL3
@@ -129,11 +134,11 @@ if(NOT APPLE)
set(SHADER_UPSCALE_SRC "${CMAKE_SOURCE_DIR}/data/shaders/upscale.frag") set(SHADER_UPSCALE_SRC "${CMAKE_SOURCE_DIR}/data/shaders/upscale.frag")
set(SHADER_DOWNSCALE_SRC "${CMAKE_SOURCE_DIR}/data/shaders/downscale.frag") set(SHADER_DOWNSCALE_SRC "${CMAKE_SOURCE_DIR}/data/shaders/downscale.frag")
set(SHADER_VERT_H "${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu/postfx_vert_spv.h") set(SHADER_VERT_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/postfx_vert_spv.h")
set(SHADER_FRAG_H "${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu/postfx_frag_spv.h") set(SHADER_FRAG_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/postfx_frag_spv.h")
set(SHADER_CRTPI_H "${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu/crtpi_frag_spv.h") set(SHADER_CRTPI_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/crtpi_frag_spv.h")
set(SHADER_UPSCALE_H "${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu/upscale_frag_spv.h") set(SHADER_UPSCALE_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/upscale_frag_spv.h")
set(SHADER_DOWNSCALE_H "${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu/downscale_frag_spv.h") set(SHADER_DOWNSCALE_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/downscale_frag_spv.h")
set(ALL_SHADER_SOURCES "${SHADER_VERT_SRC}" "${SHADER_FRAG_SRC}" "${SHADER_CRTPI_SRC}" "${SHADER_UPSCALE_SRC}" "${SHADER_DOWNSCALE_SRC}") set(ALL_SHADER_SOURCES "${SHADER_VERT_SRC}" "${SHADER_FRAG_SRC}" "${SHADER_CRTPI_SRC}" "${SHADER_UPSCALE_SRC}" "${SHADER_DOWNSCALE_SRC}")
set(ALL_SHADER_HEADERS "${SHADER_VERT_H}" "${SHADER_FRAG_H}" "${SHADER_CRTPI_H}" "${SHADER_UPSCALE_H}" "${SHADER_DOWNSCALE_H}") set(ALL_SHADER_HEADERS "${SHADER_VERT_H}" "${SHADER_FRAG_H}" "${SHADER_CRTPI_H}" "${SHADER_UPSCALE_H}" "${SHADER_DOWNSCALE_H}")
@@ -183,7 +188,7 @@ else()
endif() endif()
# --- 2. AÑADIR EJECUTABLE --- # --- 2. AÑADIR EJECUTABLE ---
add_executable(${PROJECT_NAME} ${APP_SOURCES} ${EXTERNAL_SOURCES} ${RENDERING_SOURCES}) add_executable(${PROJECT_NAME} ${APP_SOURCES})
if(NOT APPLE AND GLSLC_EXE) if(NOT APPLE AND GLSLC_EXE)
add_dependencies(${PROJECT_NAME} shaders) add_dependencies(${PROJECT_NAME} shaders)
@@ -192,9 +197,6 @@ endif()
# --- 3. DIRECTORIOS DE INCLUSIÓN --- # --- 3. DIRECTORIOS DE INCLUSIÓN ---
target_include_directories(${PROJECT_NAME} PUBLIC target_include_directories(${PROJECT_NAME} PUBLIC
"${CMAKE_SOURCE_DIR}/source" "${CMAKE_SOURCE_DIR}/source"
"${CMAKE_SOURCE_DIR}/source/external"
"${CMAKE_SOURCE_DIR}/source/rendering"
"${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu"
"${CMAKE_BINARY_DIR}" "${CMAKE_BINARY_DIR}"
) )
@@ -331,9 +333,6 @@ if(CPPCHECK_EXE)
-DLINUX_BUILD -DLINUX_BUILD
--quiet --quiet
-I ${CMAKE_SOURCE_DIR}/source -I ${CMAKE_SOURCE_DIR}/source
-I ${CMAKE_SOURCE_DIR}/source/external
-I ${CMAKE_SOURCE_DIR}/source/rendering
-I ${CMAKE_SOURCE_DIR}/source/rendering/sdl3gpu
${CPPCHECK_SOURCES} ${CPPCHECK_SOURCES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running cppcheck..." COMMENT "Running cppcheck..."

View File

@@ -1,4 +1,4 @@
#include "audio.hpp" #include "core/audio/audio.hpp"
#include <SDL3/SDL.h> // Para SDL_LogInfo, SDL_LogCategory, SDL_G... #include <SDL3/SDL.h> // Para SDL_LogInfo, SDL_LogCategory, SDL_G...
@@ -19,9 +19,9 @@
#undef PLAYBACK_RIGHT #undef PLAYBACK_RIGHT
// clang-format on // clang-format on
#include "external/jail_audio.hpp" // Para JA_FadeOutMusic, JA_Init, JA_PauseM... #include "core/audio/jail_audio.hpp" // Para JA_FadeOutMusic, JA_Init, JA_PauseM...
#include "options.hpp" // Para AudioOptions, audio, MusicOptions #include "core/resources/resource.hpp" // Para Resource
#include "resource.hpp" // Para Resource #include "game/options.hpp" // Para AudioOptions, audio, MusicOptions
// Singleton // Singleton
Audio* Audio::instance = nullptr; Audio* Audio::instance = nullptr;

View File

@@ -1,16 +1,16 @@
#include "define_buttons.hpp" #include "core/input/define_buttons.hpp"
#include <algorithm> // Para __all_of_fn, all_of #include <algorithm> // Para __all_of_fn, all_of
#include <memory> // Para unique_ptr, allocator, shared_ptr, operator==, make_unique #include <memory> // Para unique_ptr, allocator, shared_ptr, operator==, make_unique
#include "input.hpp" // Para Input #include "core/input/input.hpp" // Para Input
#include "input_types.hpp" // Para InputAction #include "core/input/input_types.hpp" // Para InputAction
#include "lang.hpp" // Para getText #include "core/locale/lang.hpp" // Para getText
#include "options.hpp" // Para Gamepad #include "core/resources/resource.hpp" // Para Resource
#include "param.hpp" // Para Param, param, ParamGame, ParamServiceMenu #include "game/options.hpp" // Para Gamepad
#include "resource.hpp" // Para Resource #include "game/ui/window_message.hpp" // Para WindowMessage
#include "ui/window_message.hpp" // Para WindowMessage #include "utils/param.hpp" // Para Param, param, ParamGame, ParamServiceMenu
#include "utils.hpp" // Para Zone #include "utils/utils.hpp" // Para Zone
DefineButtons::DefineButtons() DefineButtons::DefineButtons()
: input_(Input::get()) { : input_(Input::get()) {

View File

@@ -8,8 +8,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "input.hpp" #include "core/input/input.hpp"
#include "ui/window_message.hpp" #include "game/ui/window_message.hpp"
namespace Options { namespace Options {
struct Gamepad; struct Gamepad;

View File

@@ -5,8 +5,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "core/input/input_types.hpp" // Solo incluimos los tipos compartidos
#include "external/json.hpp" #include "external/json.hpp"
#include "input_types.hpp" // Solo incluimos los tipos compartidos
// --- Estructuras --- // --- Estructuras ---
struct GamepadConfig { struct GamepadConfig {

View File

@@ -1,4 +1,4 @@
#include "global_inputs.hpp" #include "core/input/global_inputs.hpp"
#include <algorithm> // Para __any_of_fn, any_of #include <algorithm> // Para __any_of_fn, any_of
#include <functional> // Para function #include <functional> // Para function
@@ -7,16 +7,16 @@
#include <utility> // Para pair #include <utility> // Para pair
#include <vector> // Para vector #include <vector> // Para vector
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "input.hpp" // Para Input #include "core/input/input.hpp" // Para Input
#include "input_types.hpp" // Para InputAction #include "core/input/input_types.hpp" // Para InputAction
#include "lang.hpp" // Para getText, getLangFile, getLangName, getNextLangCode, loadFromFile #include "core/locale/lang.hpp" // Para getText, getLangFile, getLangName, getNextLangCode, loadFromFile
#include "options.hpp" // Para Video, video, Settings, settings, Audio, audio, Window, window #include "core/rendering/screen.hpp" // Para Screen
#include "screen.hpp" // Para Screen #include "core/system/section.hpp" // Para Name, name, Options, options, AttractMode, attract_mode
#include "section.hpp" // Para Name, name, Options, options, AttractMode, attract_mode #include "game/options.hpp" // Para Video, video, Settings, settings, Audio, audio, Window, window
#include "ui/notifier.hpp" // Para Notifier #include "game/ui/notifier.hpp" // Para Notifier
#include "ui/service_menu.hpp" // Para ServiceMenu #include "game/ui/service_menu.hpp" // Para ServiceMenu
#include "utils.hpp" // Para boolToOnOff #include "utils/utils.hpp" // Para boolToOnOff
namespace GlobalInputs { namespace GlobalInputs {
// Termina // Termina

View File

@@ -1,4 +1,4 @@
#include "input.hpp" #include "core/input/input.hpp"
#include <SDL3/SDL.h> // Para SDL_GetGamepadAxis, SDL_GamepadAxis, SDL_GamepadButton, SDL_GetError, SDL_JoystickID, SDL_AddGamepadMappingsFromFile, SDL_Event, SDL_EventType, SDL_GetGamepadButton, SDL_GetKeyboardState, SDL_INIT_GAMEPAD, SDL_InitSubSystem, SDL_LogError, SDL_OpenGamepad, SDL_PollEvent, SDL_WasInit, Sint16, SDL_Gamepad, SDL_LogCategory, SDL_Scancode #include <SDL3/SDL.h> // Para SDL_GetGamepadAxis, SDL_GamepadAxis, SDL_GamepadButton, SDL_GetError, SDL_JoystickID, SDL_AddGamepadMappingsFromFile, SDL_Event, SDL_EventType, SDL_GetGamepadButton, SDL_GetKeyboardState, SDL_INIT_GAMEPAD, SDL_InitSubSystem, SDL_LogError, SDL_OpenGamepad, SDL_PollEvent, SDL_WasInit, Sint16, SDL_Gamepad, SDL_LogCategory, SDL_Scancode

View File

@@ -9,8 +9,8 @@
#include <utility> // Para pair #include <utility> // Para pair
#include <vector> // Para vector #include <vector> // Para vector
#include "gamepad_config_manager.hpp" // for GamepadConfig (ptr only), GamepadConfigs #include "core/input/gamepad_config_manager.hpp" // for GamepadConfig (ptr only), GamepadConfigs
#include "input_types.hpp" // for InputAction #include "core/input/input_types.hpp" // for InputAction
// --- Clase Input: gestiona la entrada de teclado y mandos (singleton) --- // --- Clase Input: gestiona la entrada de teclado y mandos (singleton) ---
class Input { class Input {

View File

@@ -1,4 +1,4 @@
#include "input_types.hpp" #include "core/input/input_types.hpp"
#include <utility> // Para pair #include <utility> // Para pair

View File

@@ -1,4 +1,4 @@
#include "mouse.hpp" #include "core/input/mouse.hpp"
#include <SDL3/SDL.h> // Para SDL_GetTicks, Uint32, SDL_HideCursor, SDL_Show... #include <SDL3/SDL.h> // Para SDL_GetTicks, Uint32, SDL_HideCursor, SDL_Show...

View File

@@ -1,4 +1,4 @@
#include "lang.hpp" #include "core/locale/lang.hpp"
#include <cstddef> // Para size_t #include <cstddef> // Para size_t
#include <exception> // Para exception #include <exception> // Para exception
@@ -7,11 +7,11 @@
#include <utility> // Para pair #include <utility> // Para pair
#include <vector> // Para vector #include <vector> // Para vector
#include "asset.hpp" // Para Asset #include "core/resources/asset.hpp" // Para Asset
#include "difficulty.hpp" // Para Difficulty #include "core/resources/resource_helper.hpp" // Para ResourceHelper
#include "external/json.hpp" // Para basic_json, iteration_proxy_value, oper... #include "external/json.hpp" // Para basic_json, iteration_proxy_value, oper...
#include "options.hpp" // Para SettingsOpt... #include "game/gameplay/difficulty.hpp" // Para Difficulty
#include "resource_helper.hpp" // Para ResourceHelper #include "game/options.hpp" // Para SettingsOpt...
using json = nlohmann::json; using json = nlohmann::json;

View File

@@ -1,5 +1,5 @@
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#include "background.hpp" #include "core/rendering/background.hpp"
#include <SDL3/SDL.h> // Para SDL_FRect, SDL_SetRenderTarget, SDL_CreateTexture, SDL_DestroyTexture, SDL_GetRenderTarget, SDL_RenderTexture, SDL_SetTextureAlphaMod, SDL_SetTextureBlendMode, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_RenderClear, SDL_SetRenderDrawColor, SDL_TextureAccess, SDL_FPoint #include <SDL3/SDL.h> // Para SDL_FRect, SDL_SetRenderTarget, SDL_CreateTexture, SDL_DestroyTexture, SDL_GetRenderTarget, SDL_RenderTexture, SDL_SetTextureAlphaMod, SDL_SetTextureBlendMode, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_RenderClear, SDL_SetRenderDrawColor, SDL_TextureAccess, SDL_FPoint
@@ -8,14 +8,14 @@
#include <string> // Para basic_string #include <string> // Para basic_string
#include <utility> // Para move #include <utility> // Para move
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/screen.hpp" // Para Screen
#include "moving_sprite.hpp" // Para MovingSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "param.hpp" // Para Param, ParamBackground, param #include "core/rendering/sprite/moving_sprite.hpp" // Para MovingSprite
#include "resource.hpp" // Para Resource #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "screen.hpp" // Para Screen #include "core/rendering/texture.hpp" // Para Texture
#include "sprite.hpp" // Para Sprite #include "core/resources/resource.hpp" // Para Resource
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, ParamBackground, param
#include "utils.hpp" // Para easeOutCubic #include "utils/utils.hpp" // Para easeOutCubic
// Constructor // Constructor
Background::Background(float total_progress_to_complete) Background::Background(float total_progress_to_complete)

View File

@@ -8,7 +8,7 @@
#include <memory> // Para unique_ptr, shared_ptr #include <memory> // Para unique_ptr, shared_ptr
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // Para Color #include "utils/color.hpp" // Para Color
class MovingSprite; class MovingSprite;
class Sprite; class Sprite;

View File

@@ -1,4 +1,4 @@
#include "fade.hpp" #include "core/rendering/fade.hpp"
#include <SDL3/SDL.h> #include <SDL3/SDL.h>
@@ -6,9 +6,9 @@
#include <cstdlib> #include <cstdlib>
#include <utility> #include <utility>
#include "color.hpp" #include "core/rendering/screen.hpp"
#include "param.hpp" #include "utils/color.hpp"
#include "screen.hpp" #include "utils/param.hpp"
// Constructor // Constructor
Fade::Fade() Fade::Fade()

View File

@@ -1,6 +1,7 @@
#include "gif.hpp" #include "core/rendering/gif.hpp"
#include <SDL3/SDL.h> // Para SDL_LogError, SDL_LogCategory, SDL_LogInfo #include <SDL3/SDL.h> // Para SDL_LogError, SDL_LogCategory, SDL_LogInfo
#include <cstring> // Para memcpy, size_t #include <cstring> // Para memcpy, size_t
#include <iostream> // Para std::cout #include <iostream> // Para std::cout
#include <stdexcept> // Para runtime_error #include <stdexcept> // Para runtime_error

View File

@@ -1,4 +1,4 @@
#include "screen.hpp" #include "core/rendering/screen.hpp"
#include <SDL3/SDL.h> // Para SDL_SetRenderTarget, SDL_RenderTexture, SDL_SetRenderDrawColor, SDL_SetRenderVSync, SDL_LogCategory, SDL_GetError, SDL_LogError, SDL_LogInfo, SDL_RendererLogicalPresentation, SDL_SetRenderLogicalPresentation, SDL_CreateTexture, SDL_DestroyTexture, SDL_DestroyWindow, SDL_GetDisplayName, SDL_GetTicks, SDL_Quit, SDL_RENDERER_VSYNC_DISABLED, SDL_RenderClear, SDL_CreateRenderer, SDL_CreateWindow, SDL_DestroyRenderer, SDL_DisplayID, SDL_FRect, SDL_GetCurrentDisplayMode, SDL_GetDisplays, SDL_GetRenderTarget, SDL_GetWindowPosition, SDL_GetWindowSize, SDL_Init, SDL_LogWarn, SDL_PixelFormat, SDL_RenderFillRect, SDL_RenderPresent, SDL_SetHint, SDL_SetRenderDrawBlendMode, SDL_SetTextureScaleMode, SDL_SetWindowFullscreen, SDL_SetWindowPosition, SDL_SetWindowSize, SDL_TextureAccess, SDL_free, SDL_BLENDMODE_BLEND, SDL_HINT_RENDER_DRIVER, SDL_INIT_VIDEO, SDL_ScaleMode, SDL_WINDOW_FULLSCREEN, SDL_WindowFlags #include <SDL3/SDL.h> // Para SDL_SetRenderTarget, SDL_RenderTexture, SDL_SetRenderDrawColor, SDL_SetRenderVSync, SDL_LogCategory, SDL_GetError, SDL_LogError, SDL_LogInfo, SDL_RendererLogicalPresentation, SDL_SetRenderLogicalPresentation, SDL_CreateTexture, SDL_DestroyTexture, SDL_DestroyWindow, SDL_GetDisplayName, SDL_GetTicks, SDL_Quit, SDL_RENDERER_VSYNC_DISABLED, SDL_RenderClear, SDL_CreateRenderer, SDL_CreateWindow, SDL_DestroyRenderer, SDL_DisplayID, SDL_FRect, SDL_GetCurrentDisplayMode, SDL_GetDisplays, SDL_GetRenderTarget, SDL_GetWindowPosition, SDL_GetWindowSize, SDL_Init, SDL_LogWarn, SDL_PixelFormat, SDL_RenderFillRect, SDL_RenderPresent, SDL_SetHint, SDL_SetRenderDrawBlendMode, SDL_SetTextureScaleMode, SDL_SetWindowFullscreen, SDL_SetWindowPosition, SDL_SetWindowSize, SDL_TextureAccess, SDL_free, SDL_BLENDMODE_BLEND, SDL_HINT_RENDER_DRIVER, SDL_INIT_VIDEO, SDL_ScaleMode, SDL_WINDOW_FULLSCREEN, SDL_WindowFlags
@@ -9,18 +9,18 @@
#include <string> // Para basic_string, operator+, char_traits, to_string, string #include <string> // Para basic_string, operator+, char_traits, to_string, string
#include <vector> // Para vector #include <vector> // Para vector
#include "asset.hpp" // Para Asset #include "core/input/mouse.hpp" // Para updateCursorVisibility
#include "director.hpp" // Para Director::debug_config #include "core/rendering/sdl3gpu/sdl3gpu_shader.hpp" // Para SDL3GPUShader
#include "mouse.hpp" // Para updateCursorVisibility #include "core/rendering/text.hpp" // Para Text
#include "options.hpp" // Para Video, video, Window, window #include "core/rendering/texture.hpp" // Para Texture
#include "param.hpp" // Para Param, param, ParamGame, ParamDebug #include "core/resources/asset.hpp" // Para Asset
#include "rendering/sdl3gpu/sdl3gpu_shader.hpp" // Para SDL3GPUShader #include "core/resources/resource.hpp" // Para Resource
#include "resource.hpp" // Para Resource #include "core/system/director.hpp" // Para Director::debug_config
#include "text.hpp" // Para Text #include "game/options.hpp" // Para Video, video, Window, window
#include "texture.hpp" // Para Texture #include "game/ui/notifier.hpp" // Para Notifier
#include "ui/notifier.hpp" // Para Notifier #include "game/ui/service_menu.hpp" // Para ServiceMenu
#include "ui/service_menu.hpp" // Para ServiceMenu #include "utils/param.hpp" // Para Param, param, ParamGame, ParamDebug
#include "utils.hpp" // Para toLower #include "utils/utils.hpp" // Para toLower
// Singleton // Singleton
Screen* Screen::instance = nullptr; Screen* Screen::instance = nullptr;

View File

@@ -6,9 +6,9 @@
#include <string> // Para string #include <string> // Para string
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // Para Color #include "core/rendering/shader_backend.hpp" // Para Rendering::ShaderType
#include "options.hpp" // Para VideoOptions, video #include "game/options.hpp" // Para VideoOptions, video
#include "rendering/shader_backend.hpp" // Para Rendering::ShaderType #include "utils/color.hpp" // Para Color
// Forward declarations // Forward declarations
class Notifier; class Notifier;

View File

@@ -1,4 +1,4 @@
#include "rendering/sdl3gpu/sdl3gpu_shader.hpp" #include "core/rendering/sdl3gpu/sdl3gpu_shader.hpp"
#include <SDL3/SDL_log.h> #include <SDL3/SDL_log.h>
@@ -8,11 +8,11 @@
#include <iostream> // Para std::cout #include <iostream> // Para std::cout
#ifndef __APPLE__ #ifndef __APPLE__
#include "rendering/sdl3gpu/crtpi_frag_spv.h" #include "core/rendering/sdl3gpu/crtpi_frag_spv.h"
#include "rendering/sdl3gpu/downscale_frag_spv.h" #include "core/rendering/sdl3gpu/downscale_frag_spv.h"
#include "rendering/sdl3gpu/postfx_frag_spv.h" #include "core/rendering/sdl3gpu/postfx_frag_spv.h"
#include "rendering/sdl3gpu/postfx_vert_spv.h" #include "core/rendering/sdl3gpu/postfx_vert_spv.h"
#include "rendering/sdl3gpu/upscale_frag_spv.h" #include "core/rendering/sdl3gpu/upscale_frag_spv.h"
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__

View File

@@ -6,7 +6,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "rendering/shader_backend.hpp" #include "core/rendering/shader_backend.hpp"
// PostFX uniforms pushed to fragment stage each frame. // PostFX uniforms pushed to fragment stage each frame.
// 12 floats = 48 bytes — meets Metal/Vulkan 16-byte alignment requirement. // 12 floats = 48 bytes — meets Metal/Vulkan 16-byte alignment requirement.

View File

@@ -1,4 +1,4 @@
#include "animated_sprite.hpp" #include "core/rendering/sprite/animated_sprite.hpp"
#include <SDL3/SDL.h> // Para SDL_LogWarn, SDL_LogCategory, SDL_LogError, SDL_FRect #include <SDL3/SDL.h> // Para SDL_LogWarn, SDL_LogCategory, SDL_LogError, SDL_FRect
@@ -10,8 +10,8 @@
#include <stdexcept> // Para runtime_error #include <stdexcept> // Para runtime_error
#include <utility> // Para move, pair #include <utility> // Para move, pair
#include "resource_helper.hpp" // Para loadFile #include "core/rendering/texture.hpp" // Para Texture
#include "texture.hpp" // Para Texture #include "core/resources/resource_helper.hpp" // Para loadFile
// Carga las animaciones en un vector(Animations) desde un fichero // Carga las animaciones en un vector(Animations) desde un fichero
auto loadAnimationsFromFile(const std::string& file_path) -> AnimationsFileBuffer { auto loadAnimationsFromFile(const std::string& file_path) -> AnimationsFileBuffer {

View File

@@ -9,7 +9,7 @@
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "moving_sprite.hpp" // for MovingSprite #include "core/rendering/sprite/moving_sprite.hpp" // for MovingSprite
// Declaración adelantada // Declaración adelantada
class Texture; class Texture;

View File

@@ -1,11 +1,11 @@
#include "card_sprite.hpp" #include "core/rendering/sprite/card_sprite.hpp"
#include <algorithm> // Para std::clamp #include <algorithm> // Para std::clamp
#include <functional> // Para function #include <functional> // Para function
#include <utility> // Para move #include <utility> // Para move
#include "texture.hpp" // Para Texture #include "core/rendering/texture.hpp" // Para Texture
#include "utils.hpp" // Para easeOutBounce, easeOutCubic #include "utils/utils.hpp" // Para easeOutBounce, easeOutCubic
// Constructor // Constructor
CardSprite::CardSprite(std::shared_ptr<Texture> texture) CardSprite::CardSprite(std::shared_ptr<Texture> texture)

View File

@@ -5,7 +5,7 @@
#include <functional> // Para function #include <functional> // Para function
#include <memory> // Para shared_ptr #include <memory> // Para shared_ptr
#include "moving_sprite.hpp" // Para MovingSprite #include "core/rendering/sprite/moving_sprite.hpp" // Para MovingSprite
class Texture; class Texture;

View File

@@ -1,9 +1,9 @@
#include "moving_sprite.hpp" #include "core/rendering/sprite/moving_sprite.hpp"
#include <cmath> // Para std::abs #include <cmath> // Para std::abs
#include <utility> #include <utility>
#include "texture.hpp" // Para Texture #include "core/rendering/texture.hpp" // Para Texture
// Constructor // Constructor
MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_FRect pos, Rotate rotate, float horizontal_zoom, float vertical_zoom, SDL_FlipMode flip) MovingSprite::MovingSprite(std::shared_ptr<Texture> texture, SDL_FRect pos, Rotate rotate, float horizontal_zoom, float vertical_zoom, SDL_FlipMode flip)

View File

@@ -4,7 +4,7 @@
#include <memory> // Para shared_ptr #include <memory> // Para shared_ptr
#include "sprite.hpp" // for Sprite #include "core/rendering/sprite/sprite.hpp" // for Sprite
class Texture; class Texture;

View File

@@ -1,5 +1,5 @@
// IWYU pragma: no_include <bits/std_abs.h> // IWYU pragma: no_include <bits/std_abs.h>
#include "path_sprite.hpp" #include "core/rendering/sprite/path_sprite.hpp"
#include <cmath> // Para abs #include <cmath> // Para abs
#include <functional> // Para function #include <functional> // Para function

View File

@@ -7,7 +7,7 @@
#include <utility> #include <utility>
#include <vector> // Para vector #include <vector> // Para vector
#include "sprite.hpp" // Para Sprite #include "core/rendering/sprite/sprite.hpp" // Para Sprite
class Texture; class Texture;

View File

@@ -1,6 +1,6 @@
#include "smart_sprite.hpp" #include "core/rendering/sprite/smart_sprite.hpp"
#include "moving_sprite.hpp" // Para MovingSprite #include "core/rendering/sprite/moving_sprite.hpp" // Para MovingSprite
// Actualiza la posición y comprueba si ha llegado a su destino (time-based) // Actualiza la posición y comprueba si ha llegado a su destino (time-based)
void SmartSprite::update(float delta_time) { void SmartSprite::update(float delta_time) {

View File

@@ -3,7 +3,7 @@
#include <memory> // Para shared_ptr #include <memory> // Para shared_ptr
#include <utility> #include <utility>
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
class Texture; class Texture;

View File

@@ -1,9 +1,9 @@
#include "sprite.hpp" #include "core/rendering/sprite/sprite.hpp"
#include <utility> #include <utility>
#include <vector> // Para vector #include <vector> // Para vector
#include "texture.hpp" // Para Texture #include "core/rendering/texture.hpp" // Para Texture
// Constructor // Constructor
Sprite::Sprite(std::shared_ptr<Texture> texture, float pos_x, float pos_y, float width, float height) Sprite::Sprite(std::shared_ptr<Texture> texture, float pos_x, float pos_y, float width, float height)

View File

@@ -1,4 +1,4 @@
#include "text.hpp" #include "core/rendering/text.hpp"
#include <SDL3/SDL.h> // Para SDL_FRect, Uint8, SDL_GetRenderTarget, SDL_RenderClear, SDL_SetRenderDrawColor, SDL_SetRenderTarget, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_TextureAccess, SDL_GetTextureAlphaMod #include <SDL3/SDL.h> // Para SDL_FRect, Uint8, SDL_GetRenderTarget, SDL_RenderClear, SDL_SetRenderDrawColor, SDL_SetRenderTarget, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_TextureAccess, SDL_GetTextureAlphaMod
@@ -10,12 +10,12 @@
#include <utility> // Para std::cmp_less_equal #include <utility> // Para std::cmp_less_equal
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // Para Color #include "core/rendering/screen.hpp" // Para Screen
#include "resource_helper.hpp" // Para loadFile #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "screen.hpp" // Para Screen #include "core/rendering/texture.hpp" // Para Texture
#include "sprite.hpp" // Para Sprite #include "core/resources/resource_helper.hpp" // Para loadFile
#include "texture.hpp" // Para Texture #include "utils/color.hpp" // Para Color
#include "utils.hpp" // Para getFileName #include "utils/utils.hpp" // Para getFileName
// Constructor // Constructor
Text::Text(const std::shared_ptr<Texture>& texture, const std::string& text_file) { Text::Text(const std::shared_ptr<Texture>& texture, const std::string& text_file) {

View File

@@ -6,8 +6,8 @@
#include <memory> // Para shared_ptr, unique_ptr #include <memory> // Para shared_ptr, unique_ptr
#include <string> // Para string #include <string> // Para string
#include "color.hpp" // Para Color #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "sprite.hpp" // Para Sprite #include "utils/color.hpp" // Para Color
class Texture; class Texture;

View File

@@ -1,5 +1,5 @@
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#include "texture.hpp" #include "core/rendering/texture.hpp"
#include <SDL3/SDL.h> // Para SDL_LogError, SDL_LogCategory, Uint8, SDL_... #include <SDL3/SDL.h> // Para SDL_LogError, SDL_LogCategory, Uint8, SDL_...
@@ -13,11 +13,11 @@
#include <utility> #include <utility>
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // Para getFileName, Color #include "core/rendering/gif.hpp" // Para Gif
#include "external/gif.hpp" // Para Gif #include "core/resources/resource_helper.hpp" // Para ResourceHelper
#include "resource_helper.hpp" // Para ResourceHelper #include "external/stb_image.h" // Para stbi_image_free, stbi_load, STBI_rgb_alpha
#include "stb_image.h" // Para stbi_image_free, stbi_load, STBI_rgb_alpha #include "utils/color.hpp" // Para getFileName, Color
#include "utils.hpp" #include "utils/utils.hpp"
// Constructor // Constructor
Texture::Texture(SDL_Renderer* renderer, std::string path) Texture::Texture(SDL_Renderer* renderer, std::string path)

View File

@@ -1,4 +1,4 @@
#include "tiled_bg.hpp" #include "core/rendering/tiled_bg.hpp"
#include <SDL3/SDL.h> // Para SDL_SetRenderTarget, SDL_CreateTexture, SDL_DestroyTexture, SDL_FRect, SDL_GetRenderTarget, SDL_RenderTexture, SDL_PixelFormat, SDL_TextureAccess #include <SDL3/SDL.h> // Para SDL_SetRenderTarget, SDL_CreateTexture, SDL_DestroyTexture, SDL_FRect, SDL_GetRenderTarget, SDL_RenderTexture, SDL_PixelFormat, SDL_TextureAccess
@@ -9,9 +9,9 @@
#include <numbers> // Para pi #include <numbers> // Para pi
#include <string> // Para basic_string #include <string> // Para basic_string
#include "resource.hpp" // Para Resource #include "core/rendering/screen.hpp" // Para Screen
#include "screen.hpp" // Para Screen #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "sprite.hpp" // Para Sprite #include "core/resources/resource.hpp" // Para Resource
// Constructor // Constructor
TiledBG::TiledBG(SDL_FRect pos, TiledBGMode mode) TiledBG::TiledBG(SDL_FRect pos, TiledBGMode mode)

View File

@@ -2,7 +2,7 @@
#include <SDL3/SDL.h> // Para SDL_FRect, SDL_SetTextureColorMod, SDL_Renderer, SDL_Texture #include <SDL3/SDL.h> // Para SDL_FRect, SDL_SetTextureColorMod, SDL_Renderer, SDL_Texture
#include "color.hpp" // Para Color #include "utils/color.hpp" // Para Color
// --- Enums --- // --- Enums ---
enum class TiledBGMode : int { // Modos de funcionamiento para el tileado de fondo enum class TiledBGMode : int { // Modos de funcionamiento para el tileado de fondo

View File

@@ -1,6 +1,6 @@
#include "writer.hpp" #include "core/rendering/writer.hpp"
#include "text.hpp" // Para Text #include "core/rendering/text.hpp" // Para Text
// Actualiza el objeto (delta_time en ms) // Actualiza el objeto (delta_time en ms)
void Writer::update(float delta_time) { void Writer::update(float delta_time) {

View File

@@ -1,4 +1,4 @@
#include "asset.hpp" #include "core/resources/asset.hpp"
#include <SDL3/SDL.h> // Para SDL_LogWarn, SDL_LogCategory, SDL_LogError #include <SDL3/SDL.h> // Para SDL_LogWarn, SDL_LogCategory, SDL_LogError
@@ -11,8 +11,8 @@
#include <sstream> // Para basic_istringstream #include <sstream> // Para basic_istringstream
#include <stdexcept> // Para runtime_error #include <stdexcept> // Para runtime_error
#include "resource_helper.hpp" // Para loadFile #include "core/resources/resource_helper.hpp" // Para loadFile
#include "utils.hpp" // Para getFileName #include "utils/utils.hpp" // Para getFileName
// Singleton // Singleton
Asset* Asset::instance = nullptr; Asset* Asset::instance = nullptr;

View File

@@ -1,4 +1,4 @@
#include "asset_integrated.hpp" #include "core/resources/asset_integrated.hpp"
#include <filesystem> #include <filesystem>
#include <fstream> #include <fstream>

View File

@@ -2,8 +2,8 @@
#include <memory> #include <memory>
#include "asset.hpp" #include "core/resources/asset.hpp"
#include "resource_loader.hpp" #include "core/resources/resource_loader.hpp"
// Extensión de Asset que integra ResourceLoader // Extensión de Asset que integra ResourceLoader
class AssetIntegrated : public Asset { class AssetIntegrated : public Asset {

View File

@@ -1,4 +1,4 @@
#include "resource.hpp" #include "core/resources/resource.hpp"
#include <SDL3/SDL.h> // Para SDL_LogInfo, SDL_LogCategory, SDL_LogError, SDL_SetRenderDrawColor, SDL_EventType, SDL_PollEvent, SDL_RenderFillRect, SDL_RenderRect, SDLK_ESCAPE, SDL_Event #include <SDL3/SDL.h> // Para SDL_LogInfo, SDL_LogCategory, SDL_LogError, SDL_SetRenderDrawColor, SDL_EventType, SDL_PollEvent, SDL_RenderFillRect, SDL_RenderRect, SDLK_ESCAPE, SDL_Event
@@ -12,15 +12,15 @@
#include <stdexcept> // Para runtime_error #include <stdexcept> // Para runtime_error
#include <utility> // Para move #include <utility> // Para move
#include "asset.hpp" // Para Asset #include "core/audio/jail_audio.hpp" // Para JA_LoadMusic, JA_LoadSound, JA_DeleteMusic, JA_DeleteSound
#include "color.hpp" // Para Color, NO_COLOR_MOD #include "core/locale/lang.hpp" // Para getText
#include "external/jail_audio.hpp" // Para JA_LoadMusic, JA_LoadSound, JA_DeleteMusic, JA_DeleteSound #include "core/rendering/screen.hpp" // Para Screen
#include "lang.hpp" // Para getText #include "core/rendering/text.hpp" // Para Text
#include "param.hpp" // Para Param, param, ParamPlayer, ParamResource, ParamGame #include "core/resources/asset.hpp" // Para Asset
#include "resource_helper.hpp" // Para loadFile #include "core/resources/resource_helper.hpp" // Para loadFile
#include "screen.hpp" // Para Screen #include "utils/color.hpp" // Para Color, NO_COLOR_MOD
#include "text.hpp" // Para Text #include "utils/param.hpp" // Para Param, param, ParamPlayer, ParamResource, ParamGame
#include "utils.hpp" // Para getFileName #include "utils/utils.hpp" // Para getFileName
#include "version.h" // Para APP_NAME, GIT_HASH #include "version.h" // Para APP_NAME, GIT_HASH
struct JA_Music_t; // lines 11-11 struct JA_Music_t; // lines 11-11

View File

@@ -8,10 +8,10 @@
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "animated_sprite.hpp" // Para AnimationsFileBuffer #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimationsFileBuffer
#include "demo.hpp" // Para DemoData #include "core/rendering/text.hpp" // Para Text, TextFile
#include "text.hpp" // Para Text, TextFile #include "core/rendering/texture.hpp" // Para Texture
#include "texture.hpp" // Para Texture #include "core/system/demo.hpp" // Para DemoData
struct JA_Music_t; struct JA_Music_t;
struct JA_Sound_t; struct JA_Sound_t;

View File

@@ -1,11 +1,11 @@
#include "resource_helper.hpp" #include "core/resources/resource_helper.hpp"
#include <algorithm> // Para replace #include <algorithm> // Para replace
#include <cstddef> // Para size_t #include <cstddef> // Para size_t
#include <fstream> // Para basic_ifstream, basic_ostream, basic_ios, operator<<, ios, basic_istream, endl, operator|, basic_istream::read, basic_istream::seekg, basic_istream::tellg, ifstream, streamsize #include <fstream> // Para basic_ifstream, basic_ostream, basic_ios, operator<<, ios, basic_istream, endl, operator|, basic_istream::read, basic_istream::seekg, basic_istream::tellg, ifstream, streamsize
#include <iostream> // Para cout #include <iostream> // Para cout
#include "resource_loader.hpp" // Para ResourceLoader #include "core/resources/resource_loader.hpp" // Para ResourceLoader
namespace ResourceHelper { namespace ResourceHelper {
static bool resource_system_initialized = false; static bool resource_system_initialized = false;

View File

@@ -1,11 +1,11 @@
#include "resource_loader.hpp" #include "core/resources/resource_loader.hpp"
#include <algorithm> // Para replace #include <algorithm> // Para replace
#include <filesystem> // Para exists, path, recursive_directory_iterator, directory_entry, relative #include <filesystem> // Para exists, path, recursive_directory_iterator, directory_entry, relative
#include <fstream> // Para basic_ostream, basic_ifstream, operator<<, basic_ios, endl, ios, basic_istream, operator|, basic_istream::read, basic_istream::seekg, basic_istream::tellg, ifstream, streamsize #include <fstream> // Para basic_ostream, basic_ifstream, operator<<, basic_ios, endl, ios, basic_istream, operator|, basic_istream::read, basic_istream::seekg, basic_istream::tellg, ifstream, streamsize
#include <iostream> // Para cerr, cout #include <iostream> // Para cerr, cout
#include "resource_pack.hpp" // Para ResourcePack #include "core/resources/resource_pack.hpp" // Para ResourcePack
std::unique_ptr<ResourceLoader> ResourceLoader::instance = nullptr; std::unique_ptr<ResourceLoader> ResourceLoader::instance = nullptr;

View File

@@ -1,4 +1,4 @@
#include "resource_pack.hpp" #include "core/resources/resource_pack.hpp"
#include <algorithm> // Para replace #include <algorithm> // Para replace
#include <array> // Para array #include <array> // Para array

View File

@@ -4,7 +4,7 @@
#include <array> #include <array>
#include "ui/notifier.hpp" // Para Notifier::Position #include "game/ui/notifier.hpp" // Para Notifier::Position
namespace Defaults::Game { namespace Defaults::Game {
constexpr float WIDTH = 320.0F; constexpr float WIDTH = 320.0F;

View File

@@ -1,12 +1,12 @@
#include "demo.hpp" #include "core/system/demo.hpp"
#include <SDL3/SDL.h> // Para SDL_IOStream, SDL_IOFromConstMem, SDL_IOFromFile, SDL_ReadIO, SDL_WriteIO, SDL_CloseIO #include <SDL3/SDL.h> // Para SDL_IOStream, SDL_IOFromConstMem, SDL_IOFromFile, SDL_ReadIO, SDL_WriteIO, SDL_CloseIO
#include <iostream> // Para std::cout #include <iostream> // Para std::cout
#include <stdexcept> // Para runtime_error #include <stdexcept> // Para runtime_error
#include "resource_helper.hpp" // Para ResourceHelper #include "core/resources/resource_helper.hpp" // Para ResourceHelper
#include "utils.hpp" // Para getFileName #include "utils/utils.hpp" // Para getFileName
// Carga el fichero de datos para la demo // Carga el fichero de datos para la demo
auto loadDemoDataFromFile(const std::string& file_path) -> DemoData { auto loadDemoDataFromFile(const std::string& file_path) -> DemoData {

View File

@@ -1,5 +1,5 @@
// IWYU pragma: no_include <bits/chrono.h> // IWYU pragma: no_include <bits/chrono.h>
#include "director.hpp" #include "core/system/director.hpp"
#include <SDL3/SDL.h> // Para SDL_SetLogPriority, SDL_LogCategory, SDL_LogPriority, SDL_Quit #include <SDL3/SDL.h> // Para SDL_SetLogPriority, SDL_LogCategory, SDL_LogPriority, SDL_Quit
@@ -11,31 +11,31 @@
#include <stdexcept> // Para runtime_error #include <stdexcept> // Para runtime_error
#include <string> // Para allocator, basic_string, char_traits, operator+, string, operator== #include <string> // Para allocator, basic_string, char_traits, operator+, string, operator==
#include "asset.hpp" // Para Asset #include "core/audio/audio.hpp" // Para Audio
#include "audio.hpp" // Para Audio #include "core/input/input.hpp" // Para Input
#include "core/locale/lang.hpp" // Para setLanguage
#include "core/rendering/screen.hpp" // Para Screen
#include "core/resources/asset.hpp" // Para Asset
#include "core/resources/resource.hpp" // Para Resource
#include "core/resources/resource_helper.hpp" // Para initializeResourceSystem
#include "core/system/global_events.hpp" // Para GlobalEvents::handle
#include "core/system/section.hpp" // Para Name, Options, name, options, AttractMode, attract_mode
#include "core/system/shutdown.hpp" // Para resultToString, shutdownSystem, ShutdownResult
#include "core/system/system_utils.hpp" // Para createApplicationFolder, resultToString, Result
#include "external/fkyaml_node.hpp" // Para fkyaml::node #include "external/fkyaml_node.hpp" // Para fkyaml::node
#include "global_events.hpp" // Para GlobalEvents::handle #include "game/entities/player.hpp" // Para Player
#include "input.hpp" // Para Input #include "game/gameplay/manage_hiscore_table.hpp" // Para ManageHiScoreTable
#include "lang.hpp" // Para setLanguage #include "game/options.hpp" // Para Settings, loadFromFile, saveToFile, settings, setConfigFile, setControllersFile
#include "manage_hiscore_table.hpp" // Para ManageHiScoreTable #include "game/scenes/credits.hpp" // Para Credits
#include "options.hpp" // Para Settings, loadFromFile, saveToFile, settings, setConfigFile, setControllersFile #include "game/scenes/game.hpp" // Para Game
#include "param.hpp" // Para loadParamsFromFile #include "game/scenes/hiscore_table.hpp" // Para HiScoreTable
#include "player.hpp" // Para Player #include "game/scenes/instructions.hpp" // Para Instructions
#include "resource.hpp" // Para Resource #include "game/scenes/intro.hpp" // Para Intro
#include "resource_helper.hpp" // Para initializeResourceSystem #include "game/scenes/logo.hpp" // Para Logo
#include "screen.hpp" // Para Screen #include "game/scenes/title.hpp" // Para Title
#include "section.hpp" // Para Name, Options, name, options, AttractMode, attract_mode #include "game/ui/notifier.hpp" // Para Notifier
#include "sections/credits.hpp" // Para Credits #include "game/ui/service_menu.hpp" // Para ServiceMenu
#include "sections/game.hpp" // Para Game #include "utils/param.hpp" // Para loadParamsFromFile
#include "sections/hiscore_table.hpp" // Para HiScoreTable
#include "sections/instructions.hpp" // Para Instructions
#include "sections/intro.hpp" // Para Intro
#include "sections/logo.hpp" // Para Logo
#include "sections/title.hpp" // Para Title
#include "shutdown.hpp" // Para resultToString, shutdownSystem, ShutdownResult
#include "system_utils.hpp" // Para createApplicationFolder, resultToString, Result
#include "ui/notifier.hpp" // Para Notifier
#include "ui/service_menu.hpp" // Para ServiceMenu
// Constructor // Constructor
Director::Director() { Director::Director() {

View File

@@ -5,7 +5,7 @@
#include <memory> // Para unique_ptr #include <memory> // Para unique_ptr
#include <string> // Para string #include <string> // Para string
#include "section.hpp" // Para Section::Name #include "core/system/section.hpp" // Para Section::Name
namespace Lang { namespace Lang {
enum class Code : int; enum class Code : int;

View File

@@ -1,4 +1,4 @@
#include "global_events.hpp" #include "core/system/global_events.hpp"
#include <SDL3/SDL.h> // Para SDL_EventType, SDL_Event, SDL_LogInfo, SDL_LogCategory #include <SDL3/SDL.h> // Para SDL_EventType, SDL_Event, SDL_LogInfo, SDL_LogCategory
@@ -7,14 +7,14 @@
#include <string> // Para allocator, operator+, string #include <string> // Para allocator, operator+, string
#include <vector> // Para vector #include <vector> // Para vector
#include "input.hpp" // Para Input #include "core/input/input.hpp" // Para Input
#include "lang.hpp" // Para getText #include "core/input/mouse.hpp" // Para handleEvent
#include "mouse.hpp" // Para handleEvent #include "core/locale/lang.hpp" // Para getText
#include "options.hpp" // Para GamepadManager, gamepad_manager #include "core/rendering/screen.hpp" // Para Screen
#include "screen.hpp" // Para Screen #include "core/system/section.hpp" // Para Name, Options, name, options
#include "section.hpp" // Para Name, Options, name, options #include "game/options.hpp" // Para GamepadManager, gamepad_manager
#include "ui/notifier.hpp" // Para Notifier #include "game/ui/notifier.hpp" // Para Notifier
#include "ui/service_menu.hpp" // Para ServiceMenu #include "game/ui/service_menu.hpp" // Para ServiceMenu
namespace GlobalEvents { namespace GlobalEvents {
// Comprueba los eventos de Input y muestra notificaciones // Comprueba los eventos de Input y muestra notificaciones

View File

@@ -1,4 +1,4 @@
#include "shutdown.hpp" #include "core/system/shutdown.hpp"
#include <sys/types.h> // Para pid_t #include <sys/types.h> // Para pid_t

View File

@@ -1,4 +1,4 @@
#include "system_utils.hpp" #include "core/system/system_utils.hpp"
#include <sys/stat.h> // Para stat, mkdir, S_ISDIR #include <sys/stat.h> // Para stat, mkdir, S_ISDIR

View File

@@ -1,14 +1,14 @@
#include "balloon.hpp" #include "game/entities/balloon.hpp"
#include <algorithm> // Para clamp #include <algorithm> // Para clamp
#include <array> // Para array #include <array> // Para array
#include <cmath> // Para fabs #include <cmath> // Para fabs
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/audio/audio.hpp" // Para Audio
#include "audio.hpp" // Para Audio #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "param.hpp" // Para Param, ParamBalloon, param #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "sprite.hpp" // Para Sprite #include "core/rendering/texture.hpp" // Para Texture
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, ParamBalloon, param
// Constructor // Constructor
Balloon::Balloon(const Config& config) Balloon::Balloon(const Config& config)

View File

@@ -8,8 +8,8 @@
#include <string_view> // Para string_view #include <string_view> // Para string_view
#include <vector> // Para vector #include <vector> // Para vector
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "utils.hpp" // Para Circle #include "utils/utils.hpp" // Para Circle
class Texture; class Texture;

View File

@@ -1,10 +1,10 @@
#include "bullet.hpp" #include "game/entities/bullet.hpp"
#include <memory> // Para unique_ptr, make_unique #include <memory> // Para unique_ptr, make_unique
#include <string> // Para basic_string, string #include <string> // Para basic_string, string
#include "param.hpp" // Para Param, ParamGame, param #include "core/resources/resource.hpp" // Para Resource
#include "resource.hpp" // Para Resource #include "utils/param.hpp" // Para Param, ParamGame, param
// Constructor // Constructor
Bullet::Bullet(float x, float y, Type type, Color color, int owner) Bullet::Bullet(float x, float y, Type type, Color color, int owner)

View File

@@ -5,8 +5,8 @@
#include <memory> // Para unique_ptr #include <memory> // Para unique_ptr
#include <string> // Para string #include <string> // Para string
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "utils.hpp" // Para Circle #include "utils/utils.hpp" // Para Circle
// --- Clase Bullet: representa una bala del jugador --- // --- Clase Bullet: representa una bala del jugador ---
class Bullet { class Bullet {

View File

@@ -1,8 +1,8 @@
#include "explosions.hpp" #include "game/entities/explosions.hpp"
#include <utility> // Para std::cmp_less #include <utility> // Para std::cmp_less
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
class Texture; // lines 4-4 class Texture; // lines 4-4

View File

@@ -5,7 +5,7 @@
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
class Texture; class Texture;

View File

@@ -1,11 +1,11 @@
#include "item.hpp" #include "game/entities/item.hpp"
#include <algorithm> // Para clamp #include <algorithm> // Para clamp
#include <cmath> // Para fmod #include <cmath> // Para fmod
#include <cstdlib> // Para rand #include <cstdlib> // Para rand
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "param.hpp" // Para Param, ParamGame, param #include "utils/param.hpp" // Para Param, ParamGame, param
class Texture; // lines 6-6 class Texture; // lines 6-6

View File

@@ -6,8 +6,8 @@
#include <string> // Para string #include <string> // Para string
#include <vector> // Para vector #include <vector> // Para vector
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "utils.hpp" // Para Circle #include "utils/utils.hpp" // Para Circle
class Texture; class Texture;

View File

@@ -1,4 +1,4 @@
#include "player.hpp" #include "game/entities/player.hpp"
#include <SDL3/SDL.h> // Para SDL_FlipMode #include <SDL3/SDL.h> // Para SDL_FlipMode
@@ -6,17 +6,17 @@
#include <cmath> // Para fmod #include <cmath> // Para fmod
#include <cstdlib> // Para rand #include <cstdlib> // Para rand
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/audio/audio.hpp" // Para Audio
#include "asset.hpp" // Para Asset #include "core/input/input.hpp" // Para Input
#include "audio.hpp" // Para Audio #include "core/input/input_types.hpp" // Para InputAction
#include "cooldown.hpp" // Para Cooldown #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "input.hpp" // Para Input #include "core/rendering/texture.hpp" // Para Texture
#include "input_types.hpp" // Para InputAction #include "core/resources/asset.hpp" // Para Asset
#include "manage_hiscore_table.hpp" // Para ManageHiScoreTable, HiScoreEntry #include "core/system/stage_interface.hpp" // Para IStageInfo
#include "param.hpp" // Para Param, ParamGame, param #include "game/gameplay/cooldown.hpp" // Para Cooldown
#include "scoreboard.hpp" // Para Scoreboard #include "game/gameplay/manage_hiscore_table.hpp" // Para ManageHiScoreTable, HiScoreEntry
#include "stage_interface.hpp" // Para IStageInfo #include "game/gameplay/scoreboard.hpp" // Para Scoreboard
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, ParamGame, param
// Constructor // Constructor
Player::Player(const Config& config) Player::Player(const Config& config)

View File

@@ -9,14 +9,14 @@
#include <utility> // Para move, pair #include <utility> // Para move, pair
#include <vector> // Para vector #include <vector> // Para vector
#include "animated_sprite.hpp" // for AnimatedSprite #include "core/input/input.hpp" // for Input
#include "bullet.hpp" // for Bullet #include "core/rendering/sprite/animated_sprite.hpp" // for AnimatedSprite
#include "cooldown.hpp" #include "game/entities/bullet.hpp" // for Bullet
#include "enter_name.hpp" // for EnterName #include "game/gameplay/cooldown.hpp"
#include "input.hpp" // for Input #include "game/gameplay/enter_name.hpp" // for EnterName
#include "manage_hiscore_table.hpp" // for Table #include "game/gameplay/manage_hiscore_table.hpp" // for Table
#include "scoreboard.hpp" // for Scoreboard #include "game/gameplay/scoreboard.hpp" // for Scoreboard
#include "utils.hpp" // for Circle #include "utils/utils.hpp" // for Circle
class IStageInfo; class IStageInfo;
class Texture; class Texture;

View File

@@ -1,5 +1,5 @@
// IWYU pragma: no_include <bits/std_abs.h> // IWYU pragma: no_include <bits/std_abs.h>
#include "tabe.hpp" #include "game/entities/tabe.hpp"
#include <SDL3/SDL.h> // Para SDL_FlipMode, SDL_GetTicks #include <SDL3/SDL.h> // Para SDL_FlipMode, SDL_GetTicks
@@ -8,10 +8,10 @@
#include <cstdlib> // Para rand, abs #include <cstdlib> // Para rand, abs
#include <string> // Para basic_string #include <string> // Para basic_string
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "param.hpp" // Para Param, param, ParamGame, ParamTabe #include "core/resources/resource.hpp" // Para Resource
#include "resource.hpp" // Para Resource #include "utils/param.hpp" // Para Param, param, ParamGame, ParamTabe
#include "utils.hpp" // Para Zone #include "utils/utils.hpp" // Para Zone
// Constructor // Constructor
Tabe::Tabe() Tabe::Tabe()

View File

@@ -5,7 +5,7 @@
#include <cstdlib> // Para rand #include <cstdlib> // Para rand
#include <memory> // Para unique_ptr #include <memory> // Para unique_ptr
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
// --- Clase Tabe --- // --- Clase Tabe ---
class Tabe { class Tabe {

View File

@@ -1,4 +1,4 @@
#include "balloon_formations.hpp" #include "game/gameplay/balloon_formations.hpp"
#include <algorithm> // Para max, min, copy #include <algorithm> // Para max, min, copy
#include <array> // Para array #include <array> // Para array
@@ -12,10 +12,10 @@
#include <string> // Para string, char_traits, allocator, operator==, stoi, getline, operator<=>, basic_string #include <string> // Para string, char_traits, allocator, operator==, stoi, getline, operator<=>, basic_string
#include <utility> // Para std::cmp_less #include <utility> // Para std::cmp_less
#include "asset.hpp" // Para Asset #include "core/resources/asset.hpp" // Para Asset
#include "balloon.hpp" // Para Balloon #include "game/entities/balloon.hpp" // Para Balloon
#include "param.hpp" // Para Param, ParamGame, param #include "utils/param.hpp" // Para Param, ParamGame, param
#include "utils.hpp" // Para Zone, BLOCK #include "utils/utils.hpp" // Para Zone, BLOCK
void BalloonFormations::initFormations() { void BalloonFormations::initFormations() {
// Calcular posiciones base // Calcular posiciones base

View File

@@ -8,7 +8,7 @@
#include <utility> // Para pair #include <utility> // Para pair
#include <vector> // Para vector #include <vector> // Para vector
#include "balloon.hpp" // for Balloon #include "game/entities/balloon.hpp" // for Balloon
// --- Clase BalloonFormations --- // --- Clase BalloonFormations ---
class BalloonFormations { class BalloonFormations {

View File

@@ -1,19 +1,19 @@
#include "balloon_manager.hpp" #include "game/gameplay/balloon_manager.hpp"
#include <algorithm> // Para remove_if #include <algorithm> // Para remove_if
#include <array> #include <array>
#include <cstdlib> // Para rand #include <cstdlib> // Para rand
#include <numeric> // Para accumulate #include <numeric> // Para accumulate
#include "balloon.hpp" // Para Balloon, Balloon::SCORE.at( )ALLOON_VELX... #include "core/rendering/screen.hpp" // Para Screen
#include "balloon_formations.hpp" // Para BalloonFormationParams, BalloonForma... #include "core/resources/resource.hpp" // Para Resource
#include "color.hpp" // Para Zone, Color, flash_color #include "core/system/stage_interface.hpp" // Para IStageInfo
#include "explosions.hpp" // Para Explosions #include "game/entities/balloon.hpp" // Para Balloon, Balloon::SCORE.at( )ALLOON_VELX...
#include "param.hpp" // Para Param, ParamGame, param #include "game/entities/explosions.hpp" // Para Explosions
#include "resource.hpp" // Para Resource #include "game/gameplay/balloon_formations.hpp" // Para BalloonFormationParams, BalloonForma...
#include "screen.hpp" // Para Screen #include "utils/color.hpp" // Para Zone, Color, flash_color
#include "stage_interface.hpp" // Para IStageInfo #include "utils/param.hpp" // Para Param, ParamGame, param
#include "utils.hpp" #include "utils/utils.hpp"
// Constructor // Constructor
BalloonManager::BalloonManager(IStageInfo* stage_info) BalloonManager::BalloonManager(IStageInfo* stage_info)

View File

@@ -8,11 +8,11 @@
#include <string> // Para basic_string, string #include <string> // Para basic_string, string
#include <vector> // Para vector #include <vector> // Para vector
#include "balloon.hpp" // for Balloon #include "game/entities/balloon.hpp" // for Balloon
#include "balloon_formations.hpp" // for BalloonFormations #include "game/entities/explosions.hpp" // for Explosions
#include "explosions.hpp" // for Explosions #include "game/gameplay/balloon_formations.hpp" // for BalloonFormations
#include "param.hpp" // for Param, ParamGame, param #include "utils/param.hpp" // for Param, ParamGame, param
#include "utils.hpp" // for Zone #include "utils/utils.hpp" // for Zone
class IStageInfo; class IStageInfo;
class Texture; class Texture;

View File

@@ -1,11 +1,11 @@
#include "bullet_manager.hpp" #include "game/gameplay/bullet_manager.hpp"
#include <algorithm> // Para remove_if #include <algorithm> // Para remove_if
#include <utility> #include <utility>
#include "bullet.hpp" // Para Bullet #include "game/entities/bullet.hpp" // Para Bullet
#include "param.hpp" // Para Param, ParamGame, param #include "utils/param.hpp" // Para Param, ParamGame, param
#include "utils.hpp" // Para Circle, Zone #include "utils/utils.hpp" // Para Circle, Zone
// Constructor // Constructor
BulletManager::BulletManager() BulletManager::BulletManager()

View File

@@ -7,7 +7,7 @@
#include <memory> // Para shared_ptr #include <memory> // Para shared_ptr
#include <vector> // Para vector #include <vector> // Para vector
#include "bullet.hpp" // for Bullet #include "game/entities/bullet.hpp" // for Bullet
// --- Types --- // --- Types ---
using Bullets = std::list<std::shared_ptr<Bullet>>; using Bullets = std::list<std::shared_ptr<Bullet>>;

View File

@@ -1,4 +1,4 @@
#include "difficulty.hpp" #include "game/gameplay/difficulty.hpp"
#include <vector> // Para vector #include <vector> // Para vector

View File

@@ -1,4 +1,4 @@
#include "enter_name.hpp" #include "game/gameplay/enter_name.hpp"
#include <array> // Para array #include <array> // Para array
#include <cstdlib> // Para rand #include <cstdlib> // Para rand

View File

@@ -1,19 +1,19 @@
#include "game_logo.hpp" #include "game/gameplay/game_logo.hpp"
#include <SDL3/SDL.h> // Para SDL_SetTextureScaleMode, SDL_FlipMode, SDL_ScaleMode #include <SDL3/SDL.h> // Para SDL_SetTextureScaleMode, SDL_FlipMode, SDL_ScaleMode
#include <algorithm> // Para max #include <algorithm> // Para max
#include <string> // Para basic_string #include <string> // Para basic_string
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/audio/audio.hpp" // Para Audio
#include "audio.hpp" // Para Audio #include "core/rendering/screen.hpp" // Para Screen
#include "color.hpp" // Para Color #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "param.hpp" // Para Param, param, ParamGame, ParamTitle #include "core/rendering/sprite/smart_sprite.hpp" // Para SmartSprite
#include "resource.hpp" // Para Resource #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "screen.hpp" // Para Screen #include "core/rendering/texture.hpp" // Para Texture
#include "smart_sprite.hpp" // Para SmartSprite #include "core/resources/resource.hpp" // Para Resource
#include "sprite.hpp" // Para Sprite #include "utils/color.hpp" // Para Color
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, param, ParamGame, ParamTitle
constexpr int ZOOM_FACTOR = 5; constexpr int ZOOM_FACTOR = 5;
constexpr float FLASH_DELAY_S = 0.05F; // 3 frames → 0.05s constexpr float FLASH_DELAY_S = 0.05F; // 3 frames → 0.05s

View File

@@ -2,9 +2,9 @@
#include <memory> // Para unique_ptr, shared_ptr #include <memory> // Para unique_ptr, shared_ptr
#include "animated_sprite.hpp" // Para AnimatedSprite #include "core/rendering/sprite/animated_sprite.hpp" // Para AnimatedSprite
#include "smart_sprite.hpp" // Para SmartSprite #include "core/rendering/sprite/smart_sprite.hpp" // Para SmartSprite
#include "sprite.hpp" // Para Sprite #include "core/rendering/sprite/sprite.hpp" // Para Sprite
class Texture; class Texture;

View File

@@ -1,4 +1,4 @@
#include "manage_hiscore_table.hpp" #include "game/gameplay/manage_hiscore_table.hpp"
#include <SDL3/SDL.h> // Para SDL_ReadIO, SDL_WriteIO, SDL_CloseIO, SDL_GetError, SDL_IOFromFile, SDL_LogError, SDL_LogCategory, SDL_LogInfo #include <SDL3/SDL.h> // Para SDL_ReadIO, SDL_WriteIO, SDL_CloseIO, SDL_GetError, SDL_IOFromFile, SDL_LogError, SDL_LogCategory, SDL_LogInfo
@@ -11,7 +11,7 @@
#include <ranges> // Para __find_if_fn, find_if #include <ranges> // Para __find_if_fn, find_if
#include <utility> // Para move #include <utility> // Para move
#include "utils.hpp" // Para getFileName #include "utils/utils.hpp" // Para getFileName
// Resetea la tabla a los valores por defecto // Resetea la tabla a los valores por defecto
void ManageHiScoreTable::clear() { void ManageHiScoreTable::clear() {

View File

@@ -1,4 +1,4 @@
#include "scoreboard.hpp" #include "game/gameplay/scoreboard.hpp"
#include <SDL3/SDL.h> // Para SDL_DestroyTexture, SDL_SetRenderDrawColor, SDL_SetRenderTarget, SDL_CreateTexture, SDL_GetRenderTarget, SDL_GetTicks, SDL_RenderClear, SDL_RenderLine, SDL_RenderTexture, SDL_SetTextureBlendMode, SDL_FRect, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_Texture, SDL_TextureAccess #include <SDL3/SDL.h> // Para SDL_DestroyTexture, SDL_SetRenderDrawColor, SDL_SetRenderTarget, SDL_CreateTexture, SDL_GetRenderTarget, SDL_GetTicks, SDL_RenderClear, SDL_RenderLine, SDL_RenderTexture, SDL_SetTextureBlendMode, SDL_FRect, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_Texture, SDL_TextureAccess
@@ -8,16 +8,16 @@
#include <iostream> #include <iostream>
#include <sstream> // Para basic_ostream, basic_ostringstream, basic_ostream::operator<<, ostringstream #include <sstream> // Para basic_ostream, basic_ostringstream, basic_ostream::operator<<, ostringstream
#include "color.hpp" #include "core/locale/lang.hpp" // Para getText
#include "enter_name.hpp" // Para NAME_SIZE #include "core/rendering/screen.hpp" // Para Screen
#include "lang.hpp" // Para getText #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "param.hpp" // Para Param, ParamScoreboard, param #include "core/rendering/text.hpp" // Para Text, Text::CENTER, Text::COLOR
#include "resource.hpp" // Para Resource #include "core/rendering/texture.hpp" // Para Texture
#include "screen.hpp" // Para Screen #include "core/resources/resource.hpp" // Para Resource
#include "sprite.hpp" // Para Sprite #include "game/gameplay/enter_name.hpp" // Para NAME_SIZE
#include "text.hpp" // Para Text, Text::CENTER, Text::COLOR #include "utils/color.hpp"
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, ParamScoreboard, param
#include "utils.hpp" // Para easeOutCubic #include "utils/utils.hpp" // Para easeOutCubic
// .at(SINGLETON) Hay que definir las variables estáticas, desde el .h sólo la hemos declarado // .at(SINGLETON) Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
Scoreboard* Scoreboard::instance = nullptr; Scoreboard* Scoreboard::instance = nullptr;

View File

@@ -11,7 +11,7 @@
// Forward declarations // Forward declarations
class EnterName; class EnterName;
#include "color.hpp" // Para Color #include "utils/color.hpp" // Para Color
class Sprite; class Sprite;
class Text; class Text;

View File

@@ -1,4 +1,4 @@
#include "stage.hpp" #include "game/gameplay/stage.hpp"
#include <algorithm> // Para max, min #include <algorithm> // Para max, min
#include <exception> // Para exception #include <exception> // Para exception

View File

@@ -6,7 +6,7 @@
#include <string> // Para basic_string, string #include <string> // Para basic_string, string
#include <vector> // Para vector #include <vector> // Para vector
#include "stage_interface.hpp" // for IStageInfo #include "core/system/stage_interface.hpp" // for IStageInfo
// --- Enums --- // --- Enums ---
enum class PowerCollectionState { enum class PowerCollectionState {

View File

@@ -1,4 +1,4 @@
#include "options.hpp" #include "game/options.hpp"
#include <SDL3/SDL.h> // Para SDL_ScaleMode, SDL_LogCategory, SDL_LogError, SDL_LogInfo, SDL_LogWarn #include <SDL3/SDL.h> // Para SDL_ScaleMode, SDL_LogCategory, SDL_LogError, SDL_LogInfo, SDL_LogWarn
@@ -9,11 +9,11 @@
#include <string> // Para string #include <string> // Para string
#include <vector> // Para vector #include <vector> // Para vector
#include "difficulty.hpp" // Para Code, init #include "core/input/input.hpp" // Para Input
#include "core/locale/lang.hpp" // Para getText, Code
#include "external/fkyaml_node.hpp" // Para fkyaml::node #include "external/fkyaml_node.hpp" // Para fkyaml::node
#include "input.hpp" // Para Input #include "game/gameplay/difficulty.hpp" // Para Code, init
#include "lang.hpp" // Para getText, Code #include "utils/utils.hpp" // Para boolToString, getFileName
#include "utils.hpp" // Para boolToString, getFileName
namespace Options { namespace Options {
// --- Variables globales --- // --- Variables globales ---

View File

@@ -13,13 +13,13 @@
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "defaults.hpp" #include "core/input/input.hpp" // for Input
#include "difficulty.hpp" // for Code #include "core/locale/lang.hpp" // for Code
#include "input.hpp" // for Input #include "core/rendering/shader_backend.hpp" // for Rendering::ShaderType
#include "lang.hpp" // for Code #include "core/system/defaults.hpp"
#include "manage_hiscore_table.hpp" // for ManageHiScoreTable, Table #include "game/entities/player.hpp" // for Player
#include "player.hpp" // for Player #include "game/gameplay/difficulty.hpp" // for Code
#include "rendering/shader_backend.hpp" // for Rendering::ShaderType #include "game/gameplay/manage_hiscore_table.hpp" // for ManageHiScoreTable, Table
// --- Namespace Options: gestión de configuración y opciones del juego --- // --- Namespace Options: gestión de configuración y opciones del juego ---
namespace Options { namespace Options {

View File

@@ -1,5 +1,5 @@
// IWYU pragma: no_include <bits/std_abs.h> // IWYU pragma: no_include <bits/std_abs.h>
#include "credits.hpp" #include "game/scenes/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, Uint64 #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, Uint64
@@ -11,25 +11,25 @@
#include <string_view> // Para string_view #include <string_view> // Para string_view
#include <vector> // Para vector #include <vector> // Para vector
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "balloon_manager.hpp" // Para BalloonManager #include "core/input/global_inputs.hpp" // Para check
#include "color.hpp" // Para Color, SHADOW_TEXT, NO_COLOR_MOD #include "core/input/input.hpp" // Para Input
#include "fade.hpp" // Para Fade #include "core/locale/lang.hpp" // Para getText
#include "global_events.hpp" // Para handle #include "core/rendering/fade.hpp" // Para Fade
#include "global_inputs.hpp" // Para check #include "core/rendering/screen.hpp" // Para Screen
#include "input.hpp" // Para Input #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "lang.hpp" // Para getText #include "core/rendering/text.hpp" // Para Text
#include "param.hpp" // Para Param, param, ParamGame, ParamFade #include "core/rendering/texture.hpp" // Para Texture
#include "player.hpp" // Para Player #include "core/rendering/tiled_bg.hpp" // Para TiledBG, TiledBGMode
#include "resource.hpp" // Para Resource #include "core/resources/resource.hpp" // Para Resource
#include "screen.hpp" // Para Screen #include "core/system/global_events.hpp" // Para handle
#include "section.hpp" // Para Name, name #include "core/system/section.hpp" // Para Name, name
#include "sprite.hpp" // Para Sprite #include "game/entities/player.hpp" // Para Player
#include "text.hpp" // Para Text #include "game/gameplay/balloon_manager.hpp" // Para BalloonManager
#include "texture.hpp" // Para Texture #include "game/ui/service_menu.hpp" // Para ServiceMenu
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode #include "utils/color.hpp" // Para Color, SHADOW_TEXT, NO_COLOR_MOD
#include "ui/service_menu.hpp" // Para ServiceMenu #include "utils/param.hpp" // Para Param, param, ParamGame, ParamFade
#include "utils.hpp" // Para Zone #include "utils/utils.hpp" // Para Zone
// Textos // Textos
constexpr std::string_view TEXT_COPYRIGHT = "@2020,2025 JailDesigner"; constexpr std::string_view TEXT_COPYRIGHT = "@2020,2025 JailDesigner";

View File

@@ -5,10 +5,10 @@
#include <memory> // Para unique_ptr, shared_ptr #include <memory> // Para unique_ptr, shared_ptr
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // Para Zone, Color #include "game/options.hpp" // Para AudioOptions, MusicOptions, audio
#include "options.hpp" // Para AudioOptions, MusicOptions, audio #include "utils/color.hpp" // Para Zone, Color
#include "param.hpp" // Para Param, ParamGame, param #include "utils/param.hpp" // Para Param, ParamGame, param
#include "utils.hpp" #include "utils/utils.hpp"
// Declaraciones adelantadas // Declaraciones adelantadas
class BalloonManager; class BalloonManager;

View File

@@ -1,4 +1,4 @@
#include "game.hpp" #include "game/scenes/game.hpp"
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_EventType, SDL_CreateTexture, SDL_Delay, SDL_DestroyTexture, SDL_Event, SDL_GetRenderTarget, SDL_PollEvent, SDL_RenderTexture, SDL_SetTextureBlendMode, SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_KP_MINUS, SDLK_KP_PLUS, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_Point, SDL_TextureAccess, Uint64 #include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_EventType, SDL_CreateTexture, SDL_Delay, SDL_DestroyTexture, SDL_Event, SDL_GetRenderTarget, SDL_PollEvent, SDL_RenderTexture, SDL_SetTextureBlendMode, SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_KP_MINUS, SDLK_KP_PLUS, SDL_BLENDMODE_BLEND, SDL_PixelFormat, SDL_Point, SDL_TextureAccess, Uint64
@@ -13,42 +13,42 @@
#include <random> // Para random_device, default_random_engine #include <random> // Para random_device, default_random_engine
#include <utility> // Para move #include <utility> // Para move
#include "asset.hpp" // Para Asset #include "core/audio/audio.hpp" // Para Audio
#include "audio.hpp" // Para Audio #include "core/input/global_inputs.hpp" // Para check
#include "background.hpp" // Para Background #include "core/input/input.hpp" // Para Input
#include "balloon.hpp" // Para Balloon #include "core/input/input_types.hpp" // Para InputAction
#include "balloon_manager.hpp" // Para BalloonManager #include "core/input/pause_manager.hpp" // Para PauseManager
#include "bullet.hpp" // Para Bullet #include "core/locale/lang.hpp" // Para getText
#include "bullet_manager.hpp" // Para BulletManager #include "core/rendering/background.hpp" // Para Background
#include "color.hpp" // Para Color, FLASH, NO_COLOR_MOD #include "core/rendering/fade.hpp" // Para Fade
#include "difficulty.hpp" // Para Code #include "core/rendering/screen.hpp" // Para Screen
#include "fade.hpp" // Para Fade #include "core/rendering/sprite/path_sprite.hpp" // Para Path, PathSprite, PathType
#include "global_events.hpp" // Para handle #include "core/rendering/sprite/smart_sprite.hpp" // Para SmartSprite
#include "global_inputs.hpp" // Para check #include "core/rendering/text.hpp" // Para Text
#include "input.hpp" // Para Input #include "core/rendering/texture.hpp" // Para Texture
#include "input_types.hpp" // Para InputAction #include "core/resources/asset.hpp" // Para Asset
#include "item.hpp" // Para Item, ItemType #include "core/resources/resource.hpp" // Para Resource
#include "lang.hpp" // Para getText #include "core/system/global_events.hpp" // Para handle
#include "manage_hiscore_table.hpp" // Para HiScoreEntry, ManageHiScoreTable #include "core/system/section.hpp" // Para Name, name, AttractMode, Options, attract_mode, options
#include "param.hpp" // Para Param, param, ParamGame, ParamScoreboard, ParamFade, ParamBalloon #include "game/entities/balloon.hpp" // Para Balloon
#include "path_sprite.hpp" // Para Path, PathSprite, PathType #include "game/entities/bullet.hpp" // Para Bullet
#include "pause_manager.hpp" // Para PauseManager #include "game/entities/item.hpp" // Para Item, ItemType
#include "player.hpp" // Para Player #include "game/entities/player.hpp" // Para Player
#include "resource.hpp" // Para Resource #include "game/entities/tabe.hpp" // Para Tabe
#include "scoreboard.hpp" // Para Scoreboard #include "game/gameplay/balloon_manager.hpp" // Para BalloonManager
#include "screen.hpp" // Para Screen #include "game/gameplay/bullet_manager.hpp" // Para BulletManager
#include "section.hpp" // Para Name, name, AttractMode, Options, attract_mode, options #include "game/gameplay/difficulty.hpp" // Para Code
#include "smart_sprite.hpp" // Para SmartSprite #include "game/gameplay/manage_hiscore_table.hpp" // Para HiScoreEntry, ManageHiScoreTable
#include "stage.hpp" // Para StageManager, StageData #include "game/gameplay/scoreboard.hpp" // Para Scoreboard
#include "tabe.hpp" // Para Tabe #include "game/gameplay/stage.hpp" // Para StageManager, StageData
#include "text.hpp" // Para Text #include "game/ui/service_menu.hpp" // Para ServiceMenu
#include "texture.hpp" // Para Texture #include "utils/color.hpp" // Para Color, FLASH, NO_COLOR_MOD
#include "ui/service_menu.hpp" // Para ServiceMenu #include "utils/param.hpp" // Para Param, param, ParamGame, ParamScoreboard, ParamFade, ParamBalloon
#include "utils.hpp" // Para Zone, checkCollision, easeInQuint, easeOutQuint, boolToString #include "utils/utils.hpp" // Para Zone, checkCollision, easeInQuint, easeOutQuint, boolToString
#ifdef _DEBUG #ifdef _DEBUG
#include <iostream> // Para basic_ostream, basic_ostream::operator<<, operator<<, cout #include <iostream> // Para basic_ostream, basic_ostream::operator<<, operator<<, cout
#include "ui/notifier.hpp" // Para Notifier #include "game/ui/notifier.hpp" // Para Notifier
#endif #endif
// Constructor // Constructor

View File

@@ -7,12 +7,12 @@
#include <string> // Para string #include <string> // Para string
#include <vector> // Para vector #include <vector> // Para vector
#include "bullet.hpp" // for Bullet #include "core/system/demo.hpp" // for Demo
#include "demo.hpp" // for Demo #include "game/entities/bullet.hpp" // for Bullet
#include "item.hpp" // for Item (ptr only), ItemType #include "game/entities/item.hpp" // for Item (ptr only), ItemType
#include "manage_hiscore_table.hpp" // for HiScoreEntry #include "game/entities/player.hpp" // for Player
#include "options.hpp" // for Settings, settings #include "game/gameplay/manage_hiscore_table.hpp" // for HiScoreEntry
#include "player.hpp" // for Player #include "game/options.hpp" // for Settings, settings
class Background; class Background;
class Balloon; class Balloon;

View File

@@ -1,4 +1,4 @@
#include "hiscore_table.hpp" #include "game/scenes/hiscore_table.hpp"
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget #include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget
@@ -8,25 +8,25 @@
#include <utility> // Para std::cmp_less #include <utility> // Para std::cmp_less
#include <vector> // Para vector #include <vector> // Para vector
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "background.hpp" // Para Background #include "core/input/global_inputs.hpp" // Para check
#include "color.hpp" // Para Color, easeOutQuint, Colors::NO_COLOR_MOD #include "core/input/input.hpp" // Para Input
#include "fade.hpp" // Para Fade, FadeMode, FadeType #include "core/locale/lang.hpp" // Para getText
#include "global_events.hpp" // Para check #include "core/rendering/background.hpp" // Para Background
#include "global_inputs.hpp" // Para check #include "core/rendering/fade.hpp" // Para Fade, FadeMode, FadeType
#include "input.hpp" // Para Input #include "core/rendering/screen.hpp" // Para Screen
#include "lang.hpp" // Para getText #include "core/rendering/sprite/path_sprite.hpp" // Para PathSprite, Path, PathType
#include "manage_hiscore_table.hpp" // Para HiScoreEntry #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "options.hpp" // Para SettingsOptions, settings #include "core/rendering/text.hpp" // Para Text, Text::SHADOW, Text::COLOR
#include "param.hpp" // Para Param, param, ParamGame, ParamFade #include "core/rendering/texture.hpp" // Para Texture
#include "path_sprite.hpp" // Para PathSprite, Path, PathType #include "core/resources/resource.hpp" // Para Resource
#include "resource.hpp" // Para Resource #include "core/system/global_events.hpp" // Para check
#include "screen.hpp" // Para Screen #include "core/system/section.hpp" // Para Name, name, Options, options
#include "section.hpp" // Para Name, name, Options, options #include "game/gameplay/manage_hiscore_table.hpp" // Para HiScoreEntry
#include "sprite.hpp" // Para Sprite #include "game/options.hpp" // Para SettingsOptions, settings
#include "text.hpp" // Para Text, Text::SHADOW, Text::COLOR #include "utils/color.hpp" // Para Color, easeOutQuint, Colors::NO_COLOR_MOD
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, param, ParamGame, ParamFade
#include "utils.hpp" #include "utils/utils.hpp"
// Constructor // Constructor
HiScoreTable::HiScoreTable() HiScoreTable::HiScoreTable()

View File

@@ -6,8 +6,8 @@
#include <string> // Para string #include <string> // Para string
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // for Color #include "core/rendering/fade.hpp" // for Fade
#include "fade.hpp" // for Fade #include "utils/color.hpp" // for Color
class Background; class Background;
class PathSprite; class PathSprite;

View File

@@ -1,4 +1,4 @@
#include "instructions.hpp" #include "game/scenes/instructions.hpp"
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_Re... #include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget, SDL_Re...
@@ -8,22 +8,22 @@
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "color.hpp" // Para Color, Colors::SHADOW_TEXT, Zone, NO_TEXT_C... #include "core/input/global_inputs.hpp" // Para check
#include "fade.hpp" // Para Fade, FadeMode, FadeType #include "core/input/input.hpp" // Para Input
#include "global_events.hpp" // Para check #include "core/locale/lang.hpp" // Para getText
#include "global_inputs.hpp" // Para check #include "core/rendering/fade.hpp" // Para Fade, FadeMode, FadeType
#include "input.hpp" // Para Input #include "core/rendering/screen.hpp" // Para Screen
#include "item.hpp" // Para Item #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "lang.hpp" // Para getText #include "core/rendering/text.hpp" // Para Text, Text::CENTER, Text::COLOR, Text::SHADOW
#include "param.hpp" // Para Param, param, ParamGame, ParamFade, Param... #include "core/rendering/tiled_bg.hpp" // Para TiledBG, TiledBGMode
#include "resource.hpp" // Para Resource #include "core/resources/resource.hpp" // Para Resource
#include "screen.hpp" // Para Screen #include "core/system/global_events.hpp" // Para check
#include "section.hpp" // Para Name, name, Options, options #include "core/system/section.hpp" // Para Name, name, Options, options
#include "sprite.hpp" // Para Sprite #include "game/entities/item.hpp" // Para Item
#include "text.hpp" // Para Text, Text::CENTER, Text::COLOR, Text::SHADOW #include "utils/color.hpp" // Para Color, Colors::SHADOW_TEXT, Zone, NO_TEXT_C...
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode #include "utils/param.hpp" // Para Param, param, ParamGame, ParamFade, Param...
#include "utils.hpp" #include "utils/utils.hpp"
// Constructor // Constructor
Instructions::Instructions() Instructions::Instructions()

View File

@@ -1,4 +1,4 @@
#include "intro.hpp" #include "game/scenes/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, Uint64 #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, Uint64
@@ -6,22 +6,22 @@
#include <string> // Para basic_string, string #include <string> // Para basic_string, string
#include <utility> // Para move #include <utility> // Para move
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "card_sprite.hpp" // Para CardSprite #include "core/input/global_inputs.hpp" // Para check
#include "color.hpp" // Para Color #include "core/input/input.hpp" // Para Input
#include "global_events.hpp" // Para handle #include "core/locale/lang.hpp" // Para getText
#include "global_inputs.hpp" // Para check #include "core/rendering/screen.hpp" // Para Screen
#include "input.hpp" // Para Input #include "core/rendering/sprite/card_sprite.hpp" // Para CardSprite
#include "lang.hpp" // Para getText #include "core/rendering/text.hpp" // Para Text
#include "param.hpp" // Para Param, param, ParamGame, ParamIntro, ParamTitle #include "core/rendering/texture.hpp" // Para Texture
#include "resource.hpp" // Para Resource #include "core/rendering/tiled_bg.hpp" // Para TiledBG, TiledBGMode
#include "screen.hpp" // Para Screen #include "core/rendering/writer.hpp" // Para Writer
#include "section.hpp" // Para Name, name, Options, options #include "core/resources/resource.hpp" // Para Resource
#include "text.hpp" // Para Text #include "core/system/global_events.hpp" // Para handle
#include "texture.hpp" // Para Texture #include "core/system/section.hpp" // Para Name, name, Options, options
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode #include "utils/color.hpp" // Para Color
#include "utils.hpp" // Para easeOutBounce #include "utils/param.hpp" // Para Param, param, ParamGame, ParamIntro, ParamTitle
#include "writer.hpp" // Para Writer #include "utils/utils.hpp" // Para easeOutBounce
// Constructor // Constructor
Intro::Intro() Intro::Intro()

View File

@@ -5,11 +5,11 @@
#include <memory> // Para unique_ptr #include <memory> // Para unique_ptr
#include <vector> // Para vector #include <vector> // Para vector
#include "card_sprite.hpp" // Para CardSprite #include "core/rendering/sprite/card_sprite.hpp" // Para CardSprite
#include "color.hpp" // Para Color #include "core/rendering/tiled_bg.hpp" // Para TiledBG
#include "param.hpp" // Para Param, ParamIntro, param #include "core/rendering/writer.hpp" // Para Writer
#include "tiled_bg.hpp" // Para TiledBG #include "utils/color.hpp" // Para Color
#include "writer.hpp" // Para Writer #include "utils/param.hpp" // Para Param, ParamIntro, param
// --- Clase Intro: secuencia cinemática de introducción del juego --- // --- Clase Intro: secuencia cinemática de introducción del juego ---
// //

View File

@@ -1,4 +1,4 @@
#include "logo.hpp" #include "game/scenes/logo.hpp"
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_PollEvent, SDL_Event, SDL_FRect, Uint64 #include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_PollEvent, SDL_Event, SDL_FRect, Uint64
@@ -6,18 +6,18 @@
#include <string> // Para basic_string #include <string> // Para basic_string
#include <utility> // Para move #include <utility> // Para move
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "color.hpp" // Para Color #include "core/input/global_inputs.hpp" // Para check
#include "global_events.hpp" // Para handle #include "core/input/input.hpp" // Para Input
#include "global_inputs.hpp" // Para check #include "core/rendering/screen.hpp" // Para Screen
#include "input.hpp" // Para Input #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "param.hpp" // Para Param, ParamGame, param #include "core/rendering/texture.hpp" // Para Texture
#include "resource.hpp" // Para Resource #include "core/resources/resource.hpp" // Para Resource
#include "screen.hpp" // Para Screen #include "core/system/global_events.hpp" // Para handle
#include "section.hpp" // Para Name, name #include "core/system/section.hpp" // Para Name, name
#include "sprite.hpp" // Para Sprite #include "utils/color.hpp" // Para Color
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, ParamGame, param
#include "utils.hpp" // Para Zone #include "utils/utils.hpp" // Para Zone
// Constructor // Constructor
Logo::Logo() Logo::Logo()

View File

@@ -5,7 +5,7 @@
#include <memory> // Para shared_ptr, unique_ptr #include <memory> // Para shared_ptr, unique_ptr
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // for Color #include "utils/color.hpp" // for Color
class Sprite; class Sprite;
class Texture; class Texture;

View File

@@ -1,4 +1,4 @@
#include "title.hpp" #include "game/scenes/title.hpp"
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_Event, SDL_Keycode, SDL_PollEvent, SDLK_A, SDLK_C, SDLK_D, SDLK_F, SDLK_S, SDLK_V, SDLK_X, SDLK_Z, SDL_EventType, Uint64 #include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_Event, SDL_Keycode, SDL_PollEvent, SDLK_A, SDLK_C, SDLK_D, SDLK_F, SDLK_S, SDLK_V, SDLK_X, SDLK_Z, SDL_EventType, Uint64
@@ -6,27 +6,27 @@
#include <string> // Para basic_string, char_traits, operator+, to_string, string #include <string> // Para basic_string, char_traits, operator+, to_string, string
#include <vector> // Para vector #include <vector> // Para vector
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "color.hpp" // Para Color, NO_COLOR_MOD, TITLE_SHADOW_TEXT #include "core/input/global_inputs.hpp" // Para check
#include "fade.hpp" // Para Fade #include "core/input/input.hpp" // Para Input
#include "game_logo.hpp" // Para GameLogo #include "core/input/input_types.hpp" // Para InputAction
#include "global_events.hpp" // Para handle #include "core/locale/lang.hpp" // Para getText
#include "global_inputs.hpp" // Para check #include "core/rendering/fade.hpp" // Para Fade
#include "input.hpp" // Para Input #include "core/rendering/screen.hpp" // Para Screen
#include "input_types.hpp" // Para InputAction #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "lang.hpp" // Para getText #include "core/rendering/text.hpp" // Para Text
#include "options.hpp" // Para Gamepad, GamepadManager, gamepad_manager, Settings, settings, Keyboard, keyboard, getPlayerWhoUsesKeyboard, swapControllers, swapKeyboard #include "core/rendering/tiled_bg.hpp" // Para TiledBG, TiledBGMode
#include "param.hpp" // Para Param, param, ParamGame, ParamTitle, ParamFade #include "core/resources/resource.hpp" // Para Resource
#include "player.hpp" // Para Player #include "core/system/global_events.hpp" // Para handle
#include "resource.hpp" // Para Resource #include "core/system/section.hpp" // Para Name, name, Options, options, AttractMode, attract_mode
#include "screen.hpp" // Para Screen #include "game/entities/player.hpp" // Para Player
#include "section.hpp" // Para Name, name, Options, options, AttractMode, attract_mode #include "game/gameplay/game_logo.hpp" // Para GameLogo
#include "sprite.hpp" // Para Sprite #include "game/options.hpp" // Para Gamepad, GamepadManager, gamepad_manager, Settings, settings, Keyboard, keyboard, getPlayerWhoUsesKeyboard, swapControllers, swapKeyboard
#include "text.hpp" // Para Text #include "game/ui/notifier.hpp" // Para Notifier
#include "tiled_bg.hpp" // Para TiledBG, TiledBGMode #include "game/ui/service_menu.hpp" // Para ServiceMenu
#include "ui/notifier.hpp" // Para Notifier #include "utils/color.hpp" // Para Color, NO_COLOR_MOD, TITLE_SHADOW_TEXT
#include "ui/service_menu.hpp" // Para ServiceMenu #include "utils/param.hpp" // Para Param, param, ParamGame, ParamTitle, ParamFade
#include "utils.hpp" // Para Zone, BLOCK #include "utils/utils.hpp" // Para Zone, BLOCK
class Texture; class Texture;

View File

@@ -6,8 +6,8 @@
#include <string_view> // Para string_view #include <string_view> // Para string_view
#include <vector> // Para vector #include <vector> // Para vector
#include "player.hpp" // for Player #include "core/system/section.hpp" // for Options, Name (ptr only)
#include "section.hpp" // for Options, Name (ptr only) #include "game/entities/player.hpp" // for Player
class Fade; class Fade;
class GameLogo; class GameLogo;

View File

@@ -1,10 +1,10 @@
#include "menu_option.hpp" #include "game/ui/menu_option.hpp"
#include <algorithm> // Para max #include <algorithm> // Para max
#include <iterator> // Para distance #include <iterator> // Para distance
#include <ranges> // Para __find_fn, find #include <ranges> // Para __find_fn, find
#include "text.hpp" // Para Text #include "core/rendering/text.hpp" // Para Text
auto ActionListOption::getValueAsString() const -> std::string { auto ActionListOption::getValueAsString() const -> std::string {
if (value_getter_) { if (value_getter_) {

View File

@@ -7,9 +7,9 @@
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "lang.hpp" // Para getText #include "core/locale/lang.hpp" // Para getText
#include "text.hpp" // Para Text #include "core/rendering/text.hpp" // Para Text
#include "ui/service_menu.hpp" // Para ServiceMenu #include "game/ui/service_menu.hpp" // Para ServiceMenu
// --- Clase MenuOption: interfaz base para todas las opciones del menú --- // --- Clase MenuOption: interfaz base para todas las opciones del menú ---
class MenuOption { class MenuOption {

View File

@@ -1,14 +1,14 @@
#include "menu_renderer.hpp" #include "game/ui/menu_renderer.hpp"
#include <algorithm> #include <algorithm>
#include <utility> #include <utility>
#include "color.hpp" #include "core/rendering/screen.hpp"
#include "menu_option.hpp" #include "core/rendering/text.hpp"
#include "param.hpp" #include "game/ui/menu_option.hpp"
#include "screen.hpp" #include "utils/color.hpp"
#include "text.hpp" #include "utils/param.hpp"
#include "utils.hpp" #include "utils/utils.hpp"
// --- Implementación de las estructuras de animación --- // --- Implementación de las estructuras de animación ---

View File

@@ -8,8 +8,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "color.hpp" #include "game/ui/service_menu.hpp"
#include "ui/service_menu.hpp" #include "utils/color.hpp"
class MenuOption; class MenuOption;
class Text; class Text;

View File

@@ -1,4 +1,4 @@
#include "notifier.hpp" #include "game/ui/notifier.hpp"
#include <SDL3/SDL.h> // Para SDL_RenderFillRect, SDL_FRect, SDL_RenderClear #include <SDL3/SDL.h> // Para SDL_RenderFillRect, SDL_FRect, SDL_RenderClear
@@ -7,12 +7,12 @@
#include <utility> #include <utility>
#include <vector> // Para vector #include <vector> // Para vector
#include "audio.hpp" // Para Audio #include "core/audio/audio.hpp" // Para Audio
#include "param.hpp" // Para Param, param, ParamNotification, ParamGame #include "core/rendering/screen.hpp" // Para Screen
#include "screen.hpp" // Para Screen #include "core/rendering/sprite/sprite.hpp" // Para Sprite
#include "sprite.hpp" // Para Sprite #include "core/rendering/text.hpp" // Para Text
#include "text.hpp" // Para Text #include "core/rendering/texture.hpp" // Para Texture
#include "texture.hpp" // Para Texture #include "utils/param.hpp" // Para Param, param, ParamNotification, ParamGame
// Singleton // Singleton
Notifier* Notifier::instance = nullptr; Notifier* Notifier::instance = nullptr;

View File

@@ -6,8 +6,8 @@
#include <string> // Para basic_string, string #include <string> // Para basic_string, string
#include <vector> // Para vector #include <vector> // Para vector
#include "color.hpp" // Para stringInVector, Color #include "utils/color.hpp" // Para stringInVector, Color
#include "utils.hpp" #include "utils/utils.hpp"
class Sprite; class Sprite;
class Text; class Text;

Some files were not shown because too many files have changed in this diff Show More