Merge branch 'chore/copyrights'
Limpieza completa de copyrights: - Pantalla de título: una sola línea "© 2026 JAILDESIGNER" + logo JAILGAMES pequeño encima. - Cabeceras de todos los archivos .cpp/.hpp/.h/.in en source/ unificadas a "// © 2026 JailDesigner". - data/, tools/, release/macos/Info.plist y ejemplos en CLAUDE.md alineados al mismo formato. - Project::COPYRIGHT_ORIGINAL y Project::COPYRIGHT_PORT eliminados de project.h.in (ya no se referenciaban). - Defaults::Title::Layout gana JAILGAMES_SCALE y JAILGAMES_COPYRIGHT_GAP. Las menciones narrativas sobre el origen Pascal 1999 en README.md y CLAUDE.md se mantienen como historia del proyecto.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+1
-3
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# star.shp - Estrella per a starfield
|
||||
# © 2025 Orni Attack
|
||||
# © 2026 JailDesigner
|
||||
|
||||
name: star
|
||||
scale: 1.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# stages.yaml - Configuració de les 10 etapes d'Orni Attack
|
||||
# © 2025 Orni Attack
|
||||
# © 2026 JailDesigner
|
||||
|
||||
metadata:
|
||||
version: "1.0"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 1999 Visente i Sergi, 2025 Port</string>
|
||||
<string>© 2026 JailDesigner</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// shape.hpp - Sistema de formes vectorials
|
||||
// © 2025 Port a C++20 con SDL3
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// starfield.cpp - Implementació del sistema de estrelles de fons
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// easing.hpp - Funciones de interpolació i easing
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// collision.hpp - Utilitats de detecció de colisiones
|
||||
// © 2025 Orni Attack - Sistema de física
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// physics_world.cpp - Implementación del mundo físico
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// sdl_manager.cpp - Implementació del gestor SDL3
|
||||
// © 2025 Port a C++20 con SDL3
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// shape_renderer.hpp - Renderizado de formes vectorials
|
||||
// © 2025 Port a C++20 con SDL3
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// global_events.cpp - Implementació dels events globals
|
||||
// © 2025 Port a C++20
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// types.hpp - Tipos básicos compartidos
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 <SDL3/SDL.h>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// debris_manager.hpp - Gestor de fragments de explosions
|
||||
// © 2025 Port a C++20 con SDL3
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 <SDL3/SDL.h>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 <SDL3/SDL.h>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 <SDL3/SDL.h>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// logo_scene.cpp - Implementació de l'escena logo
|
||||
// © 2025 Port a C++20
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "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
|
||||
|
||||
|
||||
@@ -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<std::string> 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<float>(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<char>(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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<LetraLogo> 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<LetraLogo> lletres_jailgames_;
|
||||
|
||||
// Estat de animación del logo
|
||||
float temps_animacio_; // Temps acumulat per animación orbital
|
||||
std::vector<Vec2> 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
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// spawn_controller.cpp - Implementació del controlador de spawn
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "spawn_controller.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// spawn_controller.hpp - Controlador de spawn de enemigos
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// stage_config.hpp - Estructures de dades per configuración de stages
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// stage_loader.cpp - Implementació del carregador de configuración YAML
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "stage_loader.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// stage_loader.hpp - Carregador de configuración YAML
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// stage_manager.cpp - Implementació del gestor de stages
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#include "stage_manager.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// stage_manager.hpp - Gestor de state i progressió de stages
|
||||
// © 2025 Orni Attack
|
||||
// © 2026 JailDesigner
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+1
-2
@@ -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 <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user