diff --git a/CLAUDE.md b/CLAUDE.md index 590c9f9..9462cc3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -61,7 +61,7 @@ make rpi_release # Raspberry Pi ARM64 cross-compile ```cmake project(orni VERSION 0.3.0) set(PROJECT_LONG_NAME "Orni Attack") -set(PROJECT_COPYRIGHT "© 1999 Visente i Sergi, 2025 Port") +set(PROJECT_COPYRIGHT "© 2026 JailDesigner") ``` **Auto-generated** `build/project.h`: @@ -71,12 +71,12 @@ namespace Project { constexpr const char* NAME = "orni"; constexpr const char* LONG_NAME = "Orni Attack"; constexpr const char* VERSION = "0.3.0"; - constexpr const char* COPYRIGHT = "© 1999 Visente i Sergi, 2025 Port"; + constexpr const char* COPYRIGHT = "© 2026 JailDesigner"; constexpr const char* GIT_HASH = "abc1234"; // From git rev-parse } ``` -**Window title** (dynamic): `Orni Attack v0.3.0 (© 1999 Visente i Sergi, 2025 Port)` +**Window title** (estático): `© 2026 Orni Attack — JailDesigner` ### File Discovery diff --git a/CMakeLists.txt b/CMakeLists.txt index bdb14ab..d499baf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,7 @@ project(orni VERSION 0.7.2 LANGUAGES CXX) # Info del projecte (font de veritat per a project.h) set(PROJECT_LONG_NAME "Orni Attack") -set(PROJECT_COPYRIGHT_ORIGINAL "© 1999 Visente i Sergi") -set(PROJECT_COPYRIGHT_PORT "© 2025 JailDesigner") -set(PROJECT_COPYRIGHT "${PROJECT_COPYRIGHT_ORIGINAL}, ${PROJECT_COPYRIGHT_PORT}") +set(PROJECT_COPYRIGHT "© 2026 JailDesigner") if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) diff --git a/data/shapes/enemy_pinwheel.shp b/data/shapes/enemy_pinwheel.shp index f625f8d..9747af1 100644 --- a/data/shapes/enemy_pinwheel.shp +++ b/data/shapes/enemy_pinwheel.shp @@ -1,5 +1,5 @@ # enemy_pinwheel.shp - ORNI enemic (molinillo de 4 triangles) -# © 2025 Port a C++20 amb SDL3 +# © 2026 JailDesigner name: enemy_pinwheel scale: 1.0 diff --git a/data/shapes/ship3.shp b/data/shapes/ship3.shp index bc85e5a..998a4a6 100644 --- a/data/shapes/ship3.shp +++ b/data/shapes/ship3.shp @@ -1,5 +1,5 @@ # ship2.shp - Nau del jugador 2 (interceptor amb ales) -# © 2025 Orni Attack - Jugador 2 +# © 2026 JailDesigner name: ship2 scale: 1.0 diff --git a/data/shapes/star.shp b/data/shapes/star.shp index 749de82..cc04a19 100644 --- a/data/shapes/star.shp +++ b/data/shapes/star.shp @@ -1,5 +1,5 @@ # star.shp - Estrella per a starfield -# © 2025 Orni Attack +# © 2026 JailDesigner name: star scale: 1.0 diff --git a/data/stages/stages.yaml b/data/stages/stages.yaml index b1bb66c..d2eee4f 100644 --- a/data/stages/stages.yaml +++ b/data/stages/stages.yaml @@ -1,5 +1,5 @@ # stages.yaml - Configuració de les 10 etapes d'Orni Attack -# © 2025 Orni Attack +# © 2026 JailDesigner metadata: version: "1.0" diff --git a/release/macos/Info.plist b/release/macos/Info.plist index 2b03629..48f5653 100644 --- a/release/macos/Info.plist +++ b/release/macos/Info.plist @@ -33,7 +33,7 @@ NSHighResolutionCapable NSHumanReadableCopyright - © 1999 Visente i Sergi, 2025 Port + © 2026 JailDesigner NSPrincipalClass NSApplication SUPublicDSAKeyFile diff --git a/source/core/audio/audio_adapter.cpp b/source/core/audio/audio_adapter.cpp index e67d744..19eb32a 100644 --- a/source/core/audio/audio_adapter.cpp +++ b/source/core/audio/audio_adapter.cpp @@ -1,5 +1,5 @@ // audio_adapter.cpp - Implementación de AudioResource para orni_attack -// © 2025 Orni Attack +// © 2026 JailDesigner // // Implementa AudioResource::getMusic / getSound delegando a // Resource::Helper::loadFile (que abstrae el resources.pack y el fallback diff --git a/source/core/config/postfx_config.hpp b/source/core/config/postfx_config.hpp index 7e1f41b..f0fd463 100644 --- a/source/core/config/postfx_config.hpp +++ b/source/core/config/postfx_config.hpp @@ -1,5 +1,5 @@ // postfx_config.hpp - Carga de los parámetros del shader de postpro desde YAML. -// © 2025 Orni Attack +// © 2026 JailDesigner // // Lee `config/postfx.yaml` (dentro de resources.pack) y devuelve un struct // PostFxParams listo para pasar a GpuFrameRenderer::setPostFx(). Si el YAML diff --git a/source/core/defaults.hpp b/source/core/defaults.hpp index da5552a..4a29379 100644 --- a/source/core/defaults.hpp +++ b/source/core/defaults.hpp @@ -508,6 +508,10 @@ constexpr float COPYRIGHT_LINE_SPACING = 0.0F; // Entre línies copyright (5px) constexpr float LOGO_SCALE = 0.6F; // Escala "ORNI ATTACK!" constexpr float PRESS_START_SCALE = 1.0F; // Escala "PRESS START TO PLAY" constexpr float COPYRIGHT_SCALE = 0.5F; // Escala copyright +constexpr float JAILGAMES_SCALE = 0.25F; // Escala del logo JAILGAMES pequeño sobre el copyright + +// Separación entre el logo JAILGAMES y la línea de copyright (proporción de Game::HEIGHT). +constexpr float JAILGAMES_COPYRIGHT_GAP = 0.015F; // Espaiat entre caràcters (usado per VectorText) constexpr float TEXT_SPACING = 2.0F; diff --git a/source/core/entities/entity.hpp b/source/core/entities/entity.hpp index 47d3d13..08db5e0 100644 --- a/source/core/entities/entity.hpp +++ b/source/core/entities/entity.hpp @@ -1,5 +1,5 @@ // entity.hpp - Clase base abstracta para todas las entidades del juego -// © 2025 Orni Attack - Arquitectura de entidades +// © 2026 JailDesigner // // Cada Entity incluye un Physics::RigidBody como member. Las entidades que // se simulen físicamente lo configuran en init() y registran en el diff --git a/source/core/graphics/shape.cpp b/source/core/graphics/shape.cpp index a647864..606e0f0 100644 --- a/source/core/graphics/shape.cpp +++ b/source/core/graphics/shape.cpp @@ -1,5 +1,5 @@ // shape.cpp - Implementació del sistema de formes vectorials -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "core/graphics/shape.hpp" diff --git a/source/core/graphics/shape.hpp b/source/core/graphics/shape.hpp index 7836328..af8593b 100644 --- a/source/core/graphics/shape.hpp +++ b/source/core/graphics/shape.hpp @@ -1,5 +1,5 @@ // shape.hpp - Sistema de formes vectorials -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/core/graphics/shape_loader.cpp b/source/core/graphics/shape_loader.cpp index 27f74e2..0fee976 100644 --- a/source/core/graphics/shape_loader.cpp +++ b/source/core/graphics/shape_loader.cpp @@ -1,5 +1,5 @@ // shape_loader.cpp - Implementació del carregador con caché -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "core/graphics/shape_loader.hpp" diff --git a/source/core/graphics/shape_loader.hpp b/source/core/graphics/shape_loader.hpp index 9f14c4c..03732a9 100644 --- a/source/core/graphics/shape_loader.hpp +++ b/source/core/graphics/shape_loader.hpp @@ -1,5 +1,5 @@ // shape_loader.hpp - Carregador estàtic de formes con caché -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/core/graphics/starfield.cpp b/source/core/graphics/starfield.cpp index 632fa91..506de37 100644 --- a/source/core/graphics/starfield.cpp +++ b/source/core/graphics/starfield.cpp @@ -1,5 +1,5 @@ // starfield.cpp - Implementació del sistema de estrelles de fons -// © 2025 Orni Attack +// © 2026 JailDesigner #include "core/graphics/starfield.hpp" diff --git a/source/core/graphics/starfield.hpp b/source/core/graphics/starfield.hpp index 30ae441..0d8b395 100644 --- a/source/core/graphics/starfield.hpp +++ b/source/core/graphics/starfield.hpp @@ -1,5 +1,5 @@ // starfield.hpp - Sistema de estrelles de fons con efecte de profunditat -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/core/graphics/vector_text.cpp b/source/core/graphics/vector_text.cpp index 9c283c6..f41d5f1 100644 --- a/source/core/graphics/vector_text.cpp +++ b/source/core/graphics/vector_text.cpp @@ -1,5 +1,5 @@ // vector_text.cpp - Implementació del sistema de text vectorial -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // Test pre-commit hook #include "core/graphics/vector_text.hpp" diff --git a/source/core/graphics/vector_text.hpp b/source/core/graphics/vector_text.hpp index 6352f7b..3a12e41 100644 --- a/source/core/graphics/vector_text.hpp +++ b/source/core/graphics/vector_text.hpp @@ -1,5 +1,5 @@ // vector_text.hpp - Sistema de texto vectorial con display de 7-segmentos -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/core/math/easing.hpp b/source/core/math/easing.hpp index 5c135b2..8eabe81 100644 --- a/source/core/math/easing.hpp +++ b/source/core/math/easing.hpp @@ -1,5 +1,5 @@ // easing.hpp - Funciones de interpolació i easing -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/core/physics/collision.hpp b/source/core/physics/collision.hpp index 4152d20..43d5dca 100644 --- a/source/core/physics/collision.hpp +++ b/source/core/physics/collision.hpp @@ -1,5 +1,5 @@ // collision.hpp - Utilitats de detecció de colisiones -// © 2025 Orni Attack - Sistema de física +// © 2026 JailDesigner #pragma once diff --git a/source/core/physics/physics_world.cpp b/source/core/physics/physics_world.cpp index 3d1e7a5..822203d 100644 --- a/source/core/physics/physics_world.cpp +++ b/source/core/physics/physics_world.cpp @@ -1,5 +1,5 @@ // physics_world.cpp - Implementación del mundo físico -// © 2025 Orni Attack +// © 2026 JailDesigner #include "core/physics/physics_world.hpp" diff --git a/source/core/physics/physics_world.hpp b/source/core/physics/physics_world.hpp index 28314f8..f98bbe9 100644 --- a/source/core/physics/physics_world.hpp +++ b/source/core/physics/physics_world.hpp @@ -1,5 +1,5 @@ // physics_world.hpp - Mundo físico 2D -// © 2025 Orni Attack +// © 2026 JailDesigner // // Gestiona un conjunto de RigidBody, integra sus movimientos y detecta // colisiones por frame. Diseño minimalista para arcade: broadphase trivial diff --git a/source/core/physics/rigid_body.hpp b/source/core/physics/rigid_body.hpp index c90b840..6cf563b 100644 --- a/source/core/physics/rigid_body.hpp +++ b/source/core/physics/rigid_body.hpp @@ -1,5 +1,5 @@ // rigid_body.hpp - Cuerpo rígido 2D para el sistema de física -// © 2025 Orni Attack +// © 2026 JailDesigner // // Estructura POD-like que encapsula el estado físico de una entidad: // posición, velocidad lineal/angular, masa, restitución y damping. diff --git a/source/core/rendering/coordinate_transform.cpp b/source/core/rendering/coordinate_transform.cpp index 1e1f58d..cd44d0d 100644 --- a/source/core/rendering/coordinate_transform.cpp +++ b/source/core/rendering/coordinate_transform.cpp @@ -1,5 +1,5 @@ // coordinate_transform.cpp - Inicialización de variables globals -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "core/rendering/coordinate_transform.hpp" diff --git a/source/core/rendering/coordinate_transform.hpp b/source/core/rendering/coordinate_transform.hpp index 724e7c0..5cfa566 100644 --- a/source/core/rendering/coordinate_transform.hpp +++ b/source/core/rendering/coordinate_transform.hpp @@ -1,5 +1,5 @@ // coordinate_transform.hpp - Transformació de coordenades lògiques a físiques -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/core/rendering/gpu/gpu_device.hpp b/source/core/rendering/gpu/gpu_device.hpp index 6e5b828..4f523c3 100644 --- a/source/core/rendering/gpu/gpu_device.hpp +++ b/source/core/rendering/gpu/gpu_device.hpp @@ -1,5 +1,5 @@ // gpu_device.hpp - Wrapper de SDL_GPUDevice -// © 2025 Orni Attack +// © 2026 JailDesigner // // Ownership del SDL_GPUDevice y del claim del window. Backend preferido: // Vulkan (Linux, Windows) y Metal (macOS). Sin DirectX. diff --git a/source/core/rendering/gpu/gpu_frame_renderer.hpp b/source/core/rendering/gpu/gpu_frame_renderer.hpp index 3e78bdd..376c1c5 100644 --- a/source/core/rendering/gpu/gpu_frame_renderer.hpp +++ b/source/core/rendering/gpu/gpu_frame_renderer.hpp @@ -1,5 +1,5 @@ // gpu_frame_renderer.hpp - Renderer de alto nivel basado en SDL_GPU -// © 2025 Orni Attack +// © 2026 JailDesigner // // Flujo por frame: // 1. beginFrame(clear_color) diff --git a/source/core/rendering/gpu/gpu_line_pipeline.hpp b/source/core/rendering/gpu/gpu_line_pipeline.hpp index f5c6c0f..ae28f3b 100644 --- a/source/core/rendering/gpu/gpu_line_pipeline.hpp +++ b/source/core/rendering/gpu/gpu_line_pipeline.hpp @@ -1,5 +1,5 @@ // gpu_line_pipeline.hpp - Pipeline gráfico para dibujar líneas vectoriales -// © 2025 Orni Attack +// © 2026 JailDesigner // // Las líneas se renderizan como quads (2 triángulos = 6 índices) ya extrudidos // en CPU según el grosor pedido por línea. Vertex layout: position (vec2) + color (vec4). diff --git a/source/core/rendering/gpu/gpu_postfx_pipeline.hpp b/source/core/rendering/gpu/gpu_postfx_pipeline.hpp index 0d897c4..6dd5add 100644 --- a/source/core/rendering/gpu/gpu_postfx_pipeline.hpp +++ b/source/core/rendering/gpu/gpu_postfx_pipeline.hpp @@ -1,5 +1,5 @@ // gpu_postfx_pipeline.hpp - Pipeline de postprocesado (fullscreen triangle) -// © 2025 Orni Attack +// © 2026 JailDesigner // // Pase final del frame: muestrea la escena renderizada en offscreen y aplica // bloom + flicker + background pulse en el fragment shader. El vertex shader diff --git a/source/core/rendering/line_renderer.cpp b/source/core/rendering/line_renderer.cpp index c6afdc8..6a1efcd 100644 --- a/source/core/rendering/line_renderer.cpp +++ b/source/core/rendering/line_renderer.cpp @@ -1,6 +1,5 @@ // line_renderer.cpp - Implementación de renderizado de líneas (SDL3 GPU) -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "core/rendering/line_renderer.hpp" diff --git a/source/core/rendering/line_renderer.hpp b/source/core/rendering/line_renderer.hpp index e1468f2..75f70e9 100644 --- a/source/core/rendering/line_renderer.hpp +++ b/source/core/rendering/line_renderer.hpp @@ -1,6 +1,5 @@ // line_renderer.hpp - Renderizado de líneas vectoriales (SDL3 GPU) -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // // El dibujo de líneas pasa por el pipeline GPU. Las coordenadas (x1,y1,x2,y2) // son lógicas (1280×720); el shader las mapea a NDC y el viewport del SDLManager diff --git a/source/core/rendering/render_context.hpp b/source/core/rendering/render_context.hpp index c127b55..470332a 100644 --- a/source/core/rendering/render_context.hpp +++ b/source/core/rendering/render_context.hpp @@ -1,5 +1,5 @@ // render_context.hpp - Alias del contexto de rendering del juego -// © 2025 Orni Attack +// © 2026 JailDesigner // // Punto único de indireción entre el resto del código y el backend de // rendering. El juego habla con un `Rendering::Renderer*` opaco; el alias diff --git a/source/core/rendering/sdl_manager.cpp b/source/core/rendering/sdl_manager.cpp index 7c87478..e247d63 100644 --- a/source/core/rendering/sdl_manager.cpp +++ b/source/core/rendering/sdl_manager.cpp @@ -1,5 +1,5 @@ // sdl_manager.cpp - Implementació del gestor SDL3 -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "sdl_manager.hpp" diff --git a/source/core/rendering/sdl_manager.hpp b/source/core/rendering/sdl_manager.hpp index 618d31d..35af38e 100644 --- a/source/core/rendering/sdl_manager.hpp +++ b/source/core/rendering/sdl_manager.hpp @@ -1,5 +1,5 @@ // sdl_manager.hpp - Gestor de inicialización de SDL3 -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // // Tras la Fase 7 de la migración, el rendering ya no usa SDL_Renderer: // SDLManager posee un GpuFrameRenderer (SDL3 GPU) que es el contexto único diff --git a/source/core/rendering/shape_renderer.cpp b/source/core/rendering/shape_renderer.cpp index 2a99b7a..4c2aae9 100644 --- a/source/core/rendering/shape_renderer.cpp +++ b/source/core/rendering/shape_renderer.cpp @@ -1,5 +1,5 @@ // shape_renderer.cpp - Implementació del renderizado de formes -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "core/rendering/shape_renderer.hpp" diff --git a/source/core/rendering/shape_renderer.hpp b/source/core/rendering/shape_renderer.hpp index 8b6940a..30fa31b 100644 --- a/source/core/rendering/shape_renderer.hpp +++ b/source/core/rendering/shape_renderer.hpp @@ -1,5 +1,5 @@ // shape_renderer.hpp - Renderizado de formes vectorials -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/core/resources/resource_helper.cpp b/source/core/resources/resource_helper.cpp index 50c37fb..59049ec 100644 --- a/source/core/resources/resource_helper.cpp +++ b/source/core/resources/resource_helper.cpp @@ -1,5 +1,5 @@ // resource_helper.cpp - Implementació de funciones de ajuda -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "resource_helper.hpp" diff --git a/source/core/resources/resource_helper.hpp b/source/core/resources/resource_helper.hpp index dbb30ee..778edf8 100644 --- a/source/core/resources/resource_helper.hpp +++ b/source/core/resources/resource_helper.hpp @@ -1,5 +1,5 @@ // resource_helper.hpp - Funciones de ajuda per gestió de recursos -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // API simplificada i normalització de rutes #pragma once diff --git a/source/core/resources/resource_loader.cpp b/source/core/resources/resource_loader.cpp index af8113b..2815c4c 100644 --- a/source/core/resources/resource_loader.cpp +++ b/source/core/resources/resource_loader.cpp @@ -1,5 +1,5 @@ // resource_loader.cpp - Implementació del carregador de recursos -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "resource_loader.hpp" diff --git a/source/core/resources/resource_loader.hpp b/source/core/resources/resource_loader.hpp index 08fcfa3..0e6cec0 100644 --- a/source/core/resources/resource_loader.hpp +++ b/source/core/resources/resource_loader.hpp @@ -1,5 +1,5 @@ // resource_loader.hpp - Carregador de recursos (Singleton) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // Coordina càrrega des del paquet i/o sistema de archivos #pragma once diff --git a/source/core/resources/resource_pack.cpp b/source/core/resources/resource_pack.cpp index 8d9d506..164d695 100644 --- a/source/core/resources/resource_pack.cpp +++ b/source/core/resources/resource_pack.cpp @@ -1,5 +1,5 @@ // resource_pack.cpp - Implementació del sistema de empaquetament -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "resource_pack.hpp" diff --git a/source/core/resources/resource_pack.hpp b/source/core/resources/resource_pack.hpp index 84ba874..faee5fc 100644 --- a/source/core/resources/resource_pack.hpp +++ b/source/core/resources/resource_pack.hpp @@ -1,5 +1,5 @@ // resource_pack.hpp - Sistema de empaquetament de recursos -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // Basat en el sistema de "pollo" con adaptacions per Orni Attack #pragma once diff --git a/source/core/system/debug_overlay.hpp b/source/core/system/debug_overlay.hpp index bb012b0..d7de176 100644 --- a/source/core/system/debug_overlay.hpp +++ b/source/core/system/debug_overlay.hpp @@ -1,5 +1,5 @@ // debug_overlay.hpp - Overlay de debug (FPS + VSync) toggleable con F11 -// © 2025 Orni Attack +// © 2026 JailDesigner // // Sistema global propiedad del Director. Se actualiza y dibuja cada frame // después de la escena (queda on top). En builds debug arranca visible, diff --git a/source/core/system/global_events.cpp b/source/core/system/global_events.cpp index 2893bdf..b85d992 100644 --- a/source/core/system/global_events.cpp +++ b/source/core/system/global_events.cpp @@ -1,5 +1,5 @@ // global_events.cpp - Implementació dels events globals -// © 2025 Port a C++20 +// © 2026 JailDesigner #include "global_events.hpp" diff --git a/source/core/system/global_events.hpp b/source/core/system/global_events.hpp index c96fd0c..1b6d796 100644 --- a/source/core/system/global_events.hpp +++ b/source/core/system/global_events.hpp @@ -1,6 +1,6 @@ // global_events.hpp - Events globals del juego // Basat en el patró del projecte "pollo" -// © 2025 Port a C++20 +// © 2026 JailDesigner #pragma once diff --git a/source/core/system/scene.hpp b/source/core/system/scene.hpp index 96f6038..1ce17e3 100644 --- a/source/core/system/scene.hpp +++ b/source/core/system/scene.hpp @@ -1,5 +1,5 @@ // scene.hpp - Interfaz base para escenas del juego -// © 2025 Orni Attack +// © 2026 JailDesigner // // El frame loop vive en Director, no en cada escena. Cada escena implementa // estos cuatro métodos y el Director los llama en orden por frame: diff --git a/source/core/system/scene_context.hpp b/source/core/system/scene_context.hpp index b7a4b04..2ba7914 100644 --- a/source/core/system/scene_context.hpp +++ b/source/core/system/scene_context.hpp @@ -1,5 +1,5 @@ // scene_context.hpp - Sistema de gestió de escenes i context de transiciones -// © 2025 Port a C++20 +// © 2026 JailDesigner #pragma once diff --git a/source/core/types.hpp b/source/core/types.hpp index c463496..e6433c4 100644 --- a/source/core/types.hpp +++ b/source/core/types.hpp @@ -1,5 +1,5 @@ // types.hpp - Tipos básicos compartidos -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/core/utils/path_utils.cpp b/source/core/utils/path_utils.cpp index 2926503..5f8ed92 100644 --- a/source/core/utils/path_utils.cpp +++ b/source/core/utils/path_utils.cpp @@ -1,5 +1,5 @@ // path_utils.cpp - Implementació de utilitats de rutes -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "path_utils.hpp" diff --git a/source/core/utils/path_utils.hpp b/source/core/utils/path_utils.hpp index 7819fad..f3de59f 100644 --- a/source/core/utils/path_utils.hpp +++ b/source/core/utils/path_utils.hpp @@ -1,5 +1,5 @@ // path_utils.hpp - Utilitats de gestió de rutes -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner // Detecció de directoris i bundles multiplataforma #pragma once diff --git a/source/game/effects/debris.hpp b/source/game/effects/debris.hpp index e0126fe..c13d18d 100644 --- a/source/game/effects/debris.hpp +++ b/source/game/effects/debris.hpp @@ -1,5 +1,5 @@ // debris.hpp - Fragment de línia volant (explosión de formes) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once #include diff --git a/source/game/effects/debris_manager.cpp b/source/game/effects/debris_manager.cpp index 46478c1..28dd2fe 100644 --- a/source/game/effects/debris_manager.cpp +++ b/source/game/effects/debris_manager.cpp @@ -1,5 +1,5 @@ // debris_manager.cpp - Implementació del gestor de fragments -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "debris_manager.hpp" diff --git a/source/game/effects/debris_manager.hpp b/source/game/effects/debris_manager.hpp index 89acddd..feb027a 100644 --- a/source/game/effects/debris_manager.hpp +++ b/source/game/effects/debris_manager.hpp @@ -1,5 +1,5 @@ // debris_manager.hpp - Gestor de fragments de explosions -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/game/effects/floating_score.hpp b/source/game/effects/floating_score.hpp index f56bd34..166be1e 100644 --- a/source/game/effects/floating_score.hpp +++ b/source/game/effects/floating_score.hpp @@ -1,5 +1,5 @@ // floating_score.hpp - Número de puntuación que apareix y desapareix -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/game/effects/floating_score_manager.cpp b/source/game/effects/floating_score_manager.cpp index a03e24f..1dcf819 100644 --- a/source/game/effects/floating_score_manager.cpp +++ b/source/game/effects/floating_score_manager.cpp @@ -1,5 +1,5 @@ // floating_score_manager.cpp - Implementació del gestor de números flotantes -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "floating_score_manager.hpp" diff --git a/source/game/effects/floating_score_manager.hpp b/source/game/effects/floating_score_manager.hpp index 2b37eae..ebd15f2 100644 --- a/source/game/effects/floating_score_manager.hpp +++ b/source/game/effects/floating_score_manager.hpp @@ -1,5 +1,5 @@ // floating_score_manager.hpp - Gestor de números de puntuación flotantes -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/game/entities/bullet.cpp b/source/game/entities/bullet.cpp index 9a52f56..87c379f 100644 --- a/source/game/entities/bullet.cpp +++ b/source/game/entities/bullet.cpp @@ -1,6 +1,5 @@ // bullet.cpp - Implementación de projectils de la ship -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "game/entities/bullet.hpp" diff --git a/source/game/entities/bullet.hpp b/source/game/entities/bullet.hpp index b41337e..0ad8575 100644 --- a/source/game/entities/bullet.hpp +++ b/source/game/entities/bullet.hpp @@ -1,6 +1,5 @@ // bullet.hpp - Clase para projectils de la ship -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once #include diff --git a/source/game/entities/enemy.cpp b/source/game/entities/enemy.cpp index 98a3083..0ef4375 100644 --- a/source/game/entities/enemy.cpp +++ b/source/game/entities/enemy.cpp @@ -1,6 +1,5 @@ // enemy.cpp - Implementación de enemigos (ORNIs) -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "game/entities/enemy.hpp" diff --git a/source/game/entities/enemy.hpp b/source/game/entities/enemy.hpp index 71fe9a3..cc72214 100644 --- a/source/game/entities/enemy.hpp +++ b/source/game/entities/enemy.hpp @@ -1,6 +1,5 @@ // enemy.hpp - Clase para enemigos (ORNIs) -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once #include diff --git a/source/game/entities/ship.cpp b/source/game/entities/ship.cpp index 087e1ef..e11c47a 100644 --- a/source/game/entities/ship.cpp +++ b/source/game/entities/ship.cpp @@ -1,6 +1,5 @@ // ship.cpp - Implementación de la nave del player -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "game/entities/ship.hpp" diff --git a/source/game/entities/ship.hpp b/source/game/entities/ship.hpp index 8dc8448..aad40f5 100644 --- a/source/game/entities/ship.hpp +++ b/source/game/entities/ship.hpp @@ -1,6 +1,5 @@ // ship.hpp - Clase para la nave del player -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once #include diff --git a/source/game/scenes/game_scene.cpp b/source/game/scenes/game_scene.cpp index e84b565..f24a1c3 100644 --- a/source/game/scenes/game_scene.cpp +++ b/source/game/scenes/game_scene.cpp @@ -1,6 +1,5 @@ // game_scene.cpp - Implementació de la lógica del juego -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "game_scene.hpp" diff --git a/source/game/scenes/game_scene.hpp b/source/game/scenes/game_scene.hpp index 7fe4ee7..d460789 100644 --- a/source/game/scenes/game_scene.hpp +++ b/source/game/scenes/game_scene.hpp @@ -1,6 +1,5 @@ // game_scene.hpp - Lógica principal del juego -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/game/scenes/logo_scene.cpp b/source/game/scenes/logo_scene.cpp index 283dcea..3914da3 100644 --- a/source/game/scenes/logo_scene.cpp +++ b/source/game/scenes/logo_scene.cpp @@ -1,5 +1,5 @@ // logo_scene.cpp - Implementació de l'escena logo -// © 2025 Port a C++20 +// © 2026 JailDesigner #include "logo_scene.hpp" diff --git a/source/game/scenes/logo_scene.hpp b/source/game/scenes/logo_scene.hpp index 845edbb..1609f86 100644 --- a/source/game/scenes/logo_scene.hpp +++ b/source/game/scenes/logo_scene.hpp @@ -1,6 +1,6 @@ // logo_scene.hpp - Pantalla de start del juego // Muestra logo JAILGAMES animat con zoom i salta al juego -// © 2025 Port a C++20 +// © 2026 JailDesigner #pragma once diff --git a/source/game/scenes/title_scene.cpp b/source/game/scenes/title_scene.cpp index af8006c..7ba4ae9 100644 --- a/source/game/scenes/title_scene.cpp +++ b/source/game/scenes/title_scene.cpp @@ -1,5 +1,5 @@ // title_scene.cpp - Implementació de l'escena de título -// © 2025 Port a C++20 +// © 2026 JailDesigner #include "title_scene.hpp" @@ -91,6 +91,9 @@ TitleScene::TitleScene(SDLManager& sdl, SceneContext& context) // Inicialitzar lletres del título "ORNI ATTACK!" inicialitzar_titol(); + // Logo JAILGAMES pequeño sobre el copyright inferior. + inicialitzarJailgames(); + // Iniciar música de título si no está sonant if (Audio::getMusicState() != Audio::MusicState::PLAYING) { Audio::get()->playMusic("title.ogg"); @@ -254,6 +257,99 @@ void TitleScene::inicialitzar_titol() { std::cout << "[TitleScene] Animación: Posicions originals guardades\n"; } +void TitleScene::inicialitzarJailgames() { + using namespace Graphics; + + // Mismas letras que la LogoScene, mismo orden (J-A-I-L-G-A-M-E-S). + const std::vector FITXERS = { + "logo/letra_j.shp", + "logo/letra_a.shp", + "logo/letra_i.shp", + "logo/letra_l.shp", + "logo/letra_g.shp", + "logo/letra_a.shp", + "logo/letra_m.shp", + "logo/letra_e.shp", + "logo/letra_s.shp"}; + + constexpr float SCALE = Defaults::Title::Layout::JAILGAMES_SCALE; + + // Pas 1: carregar formes i calcular amplada/altura escalades. + float ancho_total = 0.0F; + float altura_max = 0.0F; + + for (const auto& file : FITXERS) { + auto shape = ShapeLoader::load(file); + if (!shape || !shape->isValid()) { + std::cerr << "[TitleScene] Error carregant " << file << '\n'; + continue; + } + + float min_x = FLT_MAX; + float max_x = -FLT_MAX; + float min_y = FLT_MAX; + float max_y = -FLT_MAX; + for (const auto& prim : shape->get_primitives()) { + for (const auto& point : prim.points) { + min_x = std::min(min_x, point.x); + max_x = std::max(max_x, point.x); + min_y = std::min(min_y, point.y); + max_y = std::max(max_y, point.y); + } + } + const float ANCHO = (max_x - min_x) * SCALE; + const float ALTURA = (max_y - min_y) * SCALE; + const float OFFSET_CENTRE = (shape->getCenter().x - min_x) * SCALE; + + lletres_jailgames_.push_back({shape, {.x = 0.0F, .y = 0.0F}, + ANCHO, ALTURA, OFFSET_CENTRE}); + + ancho_total += ANCHO; + altura_max = std::max(altura_max, ALTURA); + } + + // Espaiat entre lletres (proporcional a la escala, para que no quede pegado). + constexpr float ESPAI_JAILGAMES = ESPAI_ENTRE_LLETRES * SCALE; + if (!lletres_jailgames_.empty()) { + ancho_total += ESPAI_JAILGAMES * static_cast(lletres_jailgames_.size() - 1); + } + + // Pas 2: centrar horizontalmente y colocar JUST encima de la línea de copyright. + const float Y_COPYRIGHT = Defaults::Game::HEIGHT * Defaults::Title::Layout::COPYRIGHT1_POS; + const float GAP = Defaults::Game::HEIGHT * Defaults::Title::Layout::JAILGAMES_COPYRIGHT_GAP; + const float Y_CENTRE = Y_COPYRIGHT - GAP - (altura_max / 2.0F); + const float X_INICIAL = (Defaults::Game::WIDTH - ancho_total) / 2.0F; + + float x_actual = X_INICIAL; + for (auto& lletra : lletres_jailgames_) { + lletra.position.x = x_actual + lletra.offset_centre; + lletra.position.y = Y_CENTRE; + x_actual += lletra.ancho + ESPAI_JAILGAMES; + } +} + +void TitleScene::dibuixarPeuTitol(float spacing) const { + // Logo JAILGAMES pequeño sobre el copyright. + for (const auto& lletra : lletres_jailgames_) { + Rendering::render_shape(sdl_.getRenderer(), lletra.shape, + lletra.position, 0.0F, + Defaults::Title::Layout::JAILGAMES_SCALE, + 1.0F); + } + + // Copyright en una sola línea, centrado, en mayúsculas. + std::string copyright = Project::COPYRIGHT; + for (char& c : copyright) { + if (c >= 'a' && c <= 'z') { + c = static_cast(c - 32); + } + } + const float Y_COPY = Defaults::Game::HEIGHT * Defaults::Title::Layout::COPYRIGHT1_POS; + const float CENTRE_X = Defaults::Game::WIDTH / 2.0F; + text_.renderCentered(copyright, {.x = CENTRE_X, .y = Y_COPY}, + Defaults::Title::Layout::COPYRIGHT_SCALE, spacing); +} + auto TitleScene::isFinished() const -> bool { return context_.nextScene() != SceneType::TITLE; } @@ -604,36 +700,7 @@ void TitleScene::draw() { text_.renderCentered(main_text, {.x = centre_x, .y = centre_y}, escala_main, spacing); } - // === Copyright a la part inferior (centrat horitzontalment, dues línies) === - const float escala_copy = Defaults::Title::Layout::COPYRIGHT_SCALE; - const float copy_height = text_.get_text_height(escala_copy); - const float line_spacing = Defaults::Game::HEIGHT * Defaults::Title::Layout::COPYRIGHT_LINE_SPACING; - - // Línea 1: Original (© 1999 Visente i Sergi) - std::string copyright_original = Project::COPYRIGHT_ORIGINAL; - for (char& c : copyright_original) { - if (c >= 'a' && c <= 'z') { - c = c - 32; // Uppercase - } - } - - // Línea 2: Port (© 2025 jaildesigner) - std::string copyright_port = Project::COPYRIGHT_PORT; - for (char& c : copyright_port) { - if (c >= 'a' && c <= 'z') { - c = c - 32; // Uppercase - } - } - - // Calcular posicions (anclatge des del top + separació) - float y_line1 = Defaults::Game::HEIGHT * Defaults::Title::Layout::COPYRIGHT1_POS; - float y_line2 = y_line1 + copy_height + line_spacing; // Línea 2 debajo de línea 1 - - // Renderizar línees centrades - float centre_x = Defaults::Game::WIDTH / 2.0F; - - text_.renderCentered(copyright_original, {.x = centre_x, .y = y_line1}, escala_copy, spacing); - text_.renderCentered(copyright_port, {.x = centre_x, .y = y_line2}, escala_copy, spacing); + dibuixarPeuTitol(spacing); } } diff --git a/source/game/scenes/title_scene.hpp b/source/game/scenes/title_scene.hpp index 826da38..67482f6 100644 --- a/source/game/scenes/title_scene.hpp +++ b/source/game/scenes/title_scene.hpp @@ -1,6 +1,6 @@ // title_scene.hpp - Pantalla de título del juego // Muestra message "PRESS BUTTON TO PLAY" y copyright -// © 2025 Port a C++20 +// © 2026 JailDesigner #pragma once @@ -70,6 +70,9 @@ class TitleScene final : public Scene { std::vector lletres_attack_; // Lletres de "ATTACK!" (línia 2) float y_attack_dinamica_; // Posición Y calculada dinàmicament per "ATTACK!" + // Logo "JAILGAMES" pequeño sobre el copyright (esquinas inferiores del título). + std::vector lletres_jailgames_; + // Estat de animación del logo float temps_animacio_; // Temps acumulat per animación orbital std::vector posicions_originals_orni_; // Posicions originals de "ORNI" @@ -111,5 +114,7 @@ class TitleScene final : public Scene { void actualitzar_animacio_logo(float delta_time); // Actualitza l'animación orbital del logo auto checkSkipButtonPressed() -> bool; auto checkStartGameButtonPressed() -> bool; - void inicialitzar_titol(); // Carrega i posiciona las lletres del título + void inicialitzar_titol(); // Carrega i posiciona las lletres del título + void inicialitzarJailgames(); // Carrega i posiciona el logo JAILGAMES pequeño + void dibuixarPeuTitol(float spacing) const; // Logo JAILGAMES + línia de copyright }; diff --git a/source/game/stage_system/spawn_controller.cpp b/source/game/stage_system/spawn_controller.cpp index 2f415e1..1435bb4 100644 --- a/source/game/stage_system/spawn_controller.cpp +++ b/source/game/stage_system/spawn_controller.cpp @@ -1,5 +1,5 @@ // spawn_controller.cpp - Implementació del controlador de spawn -// © 2025 Orni Attack +// © 2026 JailDesigner #include "spawn_controller.hpp" diff --git a/source/game/stage_system/spawn_controller.hpp b/source/game/stage_system/spawn_controller.hpp index cc60115..359d2e9 100644 --- a/source/game/stage_system/spawn_controller.hpp +++ b/source/game/stage_system/spawn_controller.hpp @@ -1,5 +1,5 @@ // spawn_controller.hpp - Controlador de spawn de enemigos -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/game/stage_system/stage_config.hpp b/source/game/stage_system/stage_config.hpp index 3b11429..6165071 100644 --- a/source/game/stage_system/stage_config.hpp +++ b/source/game/stage_system/stage_config.hpp @@ -1,5 +1,5 @@ // stage_config.hpp - Estructures de dades per configuración de stages -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/game/stage_system/stage_loader.cpp b/source/game/stage_system/stage_loader.cpp index 3a5b8fa..a8ca196 100644 --- a/source/game/stage_system/stage_loader.cpp +++ b/source/game/stage_system/stage_loader.cpp @@ -1,5 +1,5 @@ // stage_loader.cpp - Implementació del carregador de configuración YAML -// © 2025 Orni Attack +// © 2026 JailDesigner #include "stage_loader.hpp" diff --git a/source/game/stage_system/stage_loader.hpp b/source/game/stage_system/stage_loader.hpp index 06d7c90..762592b 100644 --- a/source/game/stage_system/stage_loader.hpp +++ b/source/game/stage_system/stage_loader.hpp @@ -1,5 +1,5 @@ // stage_loader.hpp - Carregador de configuración YAML -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/game/stage_system/stage_manager.cpp b/source/game/stage_system/stage_manager.cpp index d6bfa69..9834242 100644 --- a/source/game/stage_system/stage_manager.cpp +++ b/source/game/stage_system/stage_manager.cpp @@ -1,5 +1,5 @@ // stage_manager.cpp - Implementació del gestor de stages -// © 2025 Orni Attack +// © 2026 JailDesigner #include "stage_manager.hpp" diff --git a/source/game/stage_system/stage_manager.hpp b/source/game/stage_system/stage_manager.hpp index 128a6e7..09be138 100644 --- a/source/game/stage_system/stage_manager.hpp +++ b/source/game/stage_system/stage_manager.hpp @@ -1,5 +1,5 @@ // stage_manager.hpp - Gestor de state i progressió de stages -// © 2025 Orni Attack +// © 2026 JailDesigner #pragma once diff --git a/source/game/systems/collision_system.hpp b/source/game/systems/collision_system.hpp index 244dd42..61e8545 100644 --- a/source/game/systems/collision_system.hpp +++ b/source/game/systems/collision_system.hpp @@ -1,5 +1,5 @@ // collision_system.hpp - Detección de colisiones de gameplay -// © 2025 Orni Attack +// © 2026 JailDesigner // // Detecta colisiones bullet↔enemy, ship↔enemy y bullet↔player y aplica los // efectos directos sobre las entidades (destruir enemy, desactivar bullet, diff --git a/source/game/systems/continue_system.hpp b/source/game/systems/continue_system.hpp index 266a9ec..d9abe86 100644 --- a/source/game/systems/continue_system.hpp +++ b/source/game/systems/continue_system.hpp @@ -1,5 +1,5 @@ // continue_system.hpp - Pantalla de continue y máquina de estados de game over -// © 2025 Orni Attack +// © 2026 JailDesigner // // Gestiona la transición CONTINUE → GAME_OVER, el countdown, los inputs de // los jugadores para continuar la partida y la revivificación. Vive como diff --git a/source/game/systems/init_hud_animator.hpp b/source/game/systems/init_hud_animator.hpp index 681f584..e16576e 100644 --- a/source/game/systems/init_hud_animator.hpp +++ b/source/game/systems/init_hud_animator.hpp @@ -1,5 +1,5 @@ // init_hud_animator.hpp - Animación inicial del HUD del juego -// © 2025 Orni Attack +// © 2026 JailDesigner // // Cubre la animación INIT_HUD del comienzo de cada partida/stage: // 1. Crecimiento de los marcos del PLAYAREA con efecto pincel en 3 fases. diff --git a/source/game/title/ship_animator.cpp b/source/game/title/ship_animator.cpp index ad15a55..69c61d2 100644 --- a/source/game/title/ship_animator.cpp +++ b/source/game/title/ship_animator.cpp @@ -1,5 +1,5 @@ // ship_animator.cpp - Implementació del sistema de animación de naves -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include "ship_animator.hpp" diff --git a/source/game/title/ship_animator.hpp b/source/game/title/ship_animator.hpp index 751957b..bd509f8 100644 --- a/source/game/title/ship_animator.hpp +++ b/source/game/title/ship_animator.hpp @@ -1,5 +1,5 @@ // ship_animator.hpp - Sistema de animación de naves para l'escena de título -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #pragma once diff --git a/source/main.cpp b/source/main.cpp index 9dedad5..128091a 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -1,6 +1,5 @@ // main.cpp - Vec2 de entrada del juego Asteroides -// © 1999 Visente i Sergi (versión Pascal) -// © 2025 Port a C++20 con SDL3 +// © 2026 JailDesigner #include #include diff --git a/source/project.h.in b/source/project.h.in index a336301..34941db 100644 --- a/source/project.h.in +++ b/source/project.h.in @@ -5,7 +5,5 @@ constexpr const char* NAME = "@PROJECT_NAME@"; constexpr const char* LONG_NAME = "@PROJECT_LONG_NAME@"; constexpr const char* VERSION = "@PROJECT_VERSION@"; constexpr const char* COPYRIGHT = "@PROJECT_COPYRIGHT@"; -constexpr const char* COPYRIGHT_ORIGINAL = "@PROJECT_COPYRIGHT_ORIGINAL@"; -constexpr const char* COPYRIGHT_PORT = "@PROJECT_COPYRIGHT_PORT@"; constexpr const char* GIT_HASH = "@GIT_HASH@"; } // namespace Project diff --git a/tools/pack_resources/pack_resources.cpp b/tools/pack_resources/pack_resources.cpp index 675dc48..8051ea9 100644 --- a/tools/pack_resources/pack_resources.cpp +++ b/tools/pack_resources/pack_resources.cpp @@ -1,5 +1,5 @@ // pack_resources.cpp - Utilitat per crear paquets de recursos -// © 2025 Orni Attack +// © 2026 JailDesigner #include "../../source/core/resources/resource_pack.hpp"