42 Commits

Author SHA1 Message Date
JailDesigner 3fe8fa9b32 fix: silencia -Wtautological-compare de stb_vorbis al cmake 2026-05-31 00:20:35 +02:00
JailDesigner 491992a4d7 bump version a 0.8.1 2026-05-26 19:40:08 +02:00
JailDesigner 2d073b6055 feat(pack): alinear sortida i build amb projectes germans 2026-05-25 07:55:30 +02:00
JailDesigner 99b18d208d chore: bump version a 0.8.0
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 22:41:25 +02:00
JailDesigner 20250a0d6d fix(cmake): glslc opcional si els headers SPV ja estan commiteats al repo 2026-05-23 12:55:48 +02:00
JailDesigner ae946b578e feat(bloom): glow separable two-pass amb composite preserve-core i paleta neon 2026-05-21 18:39:16 +02:00
JailDesigner 6259f594c8 feat(gpu): suport Metal/MSL a macOS i shaders SPIR-V embedits 2026-05-20 23:07:49 +02:00
JailDesigner efbf2457a1 Lint: inicializadores + retornos const-ref + warnings preexistentes
Primera tanda mecánica sobre el lint pendiente. Arregla la causa raíz, no
silencia diagnósticos. Detalle por categoría:

- Uninit members (cppcheck warnings) → inicializadores en declaración:
  Bullet (esta_, owner_id_, grace_timer_), Enemy (drotacio_, rotacio_,
  esta_, type_, tracking_timer_, ship_position_, tracking_strength_,
  direction_change_timer_, timer_invulnerabilitat_), Ship (is_hit_,
  invulnerable_timer_), Shape (escala_defecte_) y TitleShip (todos los
  miembros del struct, que viven dentro de un std::array<,2>).

- returnByReference (cppcheck performance) → return const T&:
  Shape::getName, ResourceLoader::getBasePath. De paso, Shape::get_nom
  se renombra a getName y get_num_primitives a getNumPrimitives para
  cumplir la convención camelBack del proyecto (lint del .clang-tidy).

- useInitializationList (cppcheck performance) →
  Starfield::shape_estrella_ pasa a la lista de inicialización (reordenada
  según la declaración para no disparar -Wreorder-ctor).

- noExplicitConstructor (cppcheck style) → explicit en ctores de 1 arg:
  Bullet(Renderer*), Enemy(Renderer*), Ship(Renderer*,...) y VectorText(Renderer*).

- variableScope (cppcheck style) → en vector_text.cpp se elimina la
  variable 'c' intermedia y se usa el literal '\\xA9' directamente en el
  único punto donde se necesita.

- constParameterReference (cppcheck style) → drawScoreboardAnimated pasa
  el VectorText por const ref (la API render/renderCentered es const).

- Warnings preexistentes del compilador (resueltos de paso):
  - stage_config.hpp: stage_id <= 255 sobre uint8_t era siempre true; se
    elimina la comparación redundante y se explica con comentario.
  - director.cpp: 'struct stat st = {.st_dev = 0};' disparaba
    -Wmissing-field-initializers; pasa a 'struct stat st{};' (zero-init
    completo, robusto a las variantes específicas del SO).
  - game_scene.cpp: stepDeathSequence devolvía un bool [[nodiscard]] que
    el caller ignoraba; el valor era puramente interno. Cambiada la
    firma a void.

- cppcheck: añadido --suppress=useStlAlgorithm. Las 26 sugerencias
  'Consider using std::any_of/find_if/count_if' son cosméticas y no
  aportan claridad sobre las raw loops actuales.

- .clang-tidy de source/core/audio/ eliminado: deshabilitaba todos los
  checks en ese subdirectorio por dependencia de jail_audio.hpp, pero
  impedía ejecutar 'make tidy' (clang-tidy aborta con "no checks
  enabled" al primer archivo del directorio). El proyecto pasa a usar
  el mismo patrón de CCAE: solo source/external/ y source/legacy/
  quedan fuera del lint.

- lint-reports/ añadido a .gitignore. Carpeta donde 'make tidy' y
  'make cppcheck' vuelcan su salida completa para inspección posterior.

Build limpio, cero warnings activos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 10:29:36 +02:00
JailDesigner 8c251d2246 Title screen: copyright único + logo JAILGAMES encima
Sustituye las dos líneas de copyright (Pascal original 1999 + port 2025)
por una sola línea "© 2026 JAILDESIGNER" centrada en la posición de la
antigua primera línea. Encima, en el espacio liberado, se muestra el
logo vectorial JAILGAMES en pequeño (escala 0.25, las mismas letras
que usa LogoScene).

Cambios:
- CMakeLists.txt: PROJECT_COPYRIGHT pasa a "© 2026 JailDesigner".
  Eliminadas las variables intermedias PROJECT_COPYRIGHT_ORIGINAL y
  PROJECT_COPYRIGHT_PORT (ya no se referenciaban en otro sitio).
- project.h.in: fuera Project::COPYRIGHT_ORIGINAL y Project::COPYRIGHT_PORT.
- Defaults::Title::Layout: nuevas constantes JAILGAMES_SCALE (0.25) y
  JAILGAMES_COPYRIGHT_GAP (1.5% de la altura lógica) para el espaciado.
- TitleScene: nuevo helper inicialitzarJailgames() que carga las 9
  letras y las posiciona centradas justo encima de la línea de copyright.
  El bloque del pie del título sale del draw() a un dibuixarPeuTitol()
  para mantener la complejidad cognitiva por debajo del umbral del linter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 09:46:38 +02:00
JailDesigner ba6fd00b54 Fase 7a: infraestructura SDL3 GPU (dormida, sin tocar runtime)
Preparacion del pipeline GPU. Codigo nuevo aislado en
core/rendering/gpu/; el runtime sigue usando SDL_Renderer hasta
Fase 7b. Tras 7a el juego sigue funcionando identico.

Shaders (shaders/):
- line.vert.glsl: vertex shader, transforma de pixeles logicos a NDC
  via uniform buffer LineUniforms{viewport_w, viewport_h}.
- line.frag.glsl: pinta el color RGBA interpolado.

Build:
- CMakeLists.txt: step nuevo que compila *.glsl a build/shaders/*.spv
  con glslc. ALL depende del target 'shaders' para incluirlo en cada
  build. Falla en cmake config si glslc no esta instalado.

Wrappers C++ (source/core/rendering/gpu/):
- gpu_device.hpp/cpp: GpuDevice, claim del window, loadShader desde
  .spv. Backends solicitados: Vulkan + Metal (sin DirectX).
- gpu_line_pipeline.hpp/cpp: GpuLinePipeline. Vertex layout
  (vec2 pos + vec4 color), primitive TRIANGLELIST (lineas como
  quads), alpha blending estandar, sin culling ni depth.
- gpu_frame_renderer.hpp/cpp: GpuFrameRenderer, API alto nivel:
  beginFrame / pushLine / endFrame. Extrusion perpendicular en CPU
  por linea (thickness libre por linea). Un draw call por frame
  con vertex+index buffers transitorios.

Plan: 7b swap del SDL_Renderer al GpuFrameRenderer en SDLManager.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 14:01:34 +02:00
JailDesigner 851e6d35a2 alineat amb AEEA: cmake, makefile, clang-* i hooks 2026-05-19 08:48:25 +02:00
JailDesigner 79d6e71fff afegit readme 2025-12-23 13:06:52 +01:00
JailDesigner fb394d23c9 corregit makefile de macos 2025-12-23 10:36:03 +01:00
JailDesigner 1951bcad11 corregit makefile de windows 2025-12-23 10:03:32 +01:00
JailDesigner 47f7ffb169 feat: implementar jerarquia d'entitats amb classe base Entitat 2025-12-19 13:01:58 +01:00
JailDesigner 2088ccdcc6 config(clang-tidy): check 6 completat + exclusió audio/legacy
- Check 6 (readability-simplify-boolean-expr): No cal canvis
- Deshabilitada temporalment check 3 (identifier-naming) per evitar
  cascada de 300+ canvis de nomenclatura
- Exclosa source/core/audio/ i source/legacy/ dels targets de tidy
  (per evitar "no checks enabled" error)
2025-12-18 13:55:26 +01:00
JailDesigner bc94eff176 style: aplicar readability-uppercase-literal-suffix
- Cambiar todos los literales float de minúscula a mayúscula (1.0f → 1.0F)
- 657 correcciones aplicadas automáticamente con clang-tidy
- Check 1/N completado

🤖 Generated with Claude Code
2025-12-18 13:06:48 +01:00
JailDesigner f8521d644c modificat cmake amb clang-tidy 2025-12-18 12:21:29 +01:00
JailDesigner 54031e3520 afegit friendly fire 2025-12-17 19:39:33 +01:00
JailDesigner 3b432e6580 layout de TITOL 2025-12-17 11:32:37 +01:00
JailDesigner 57d623d6bc treballant en INIT_HUD 2025-12-09 22:09:24 +01:00
JailDesigner a41e696b69 afegit resources.pack y prefixe a les rutes de recursos 2025-12-08 21:48:52 +01:00
JailDesigner 1023cde1be afegida progresió 2025-12-03 22:19:44 +01:00
JailDesigner 3b0354da54 afegit titol al TITOL 2025-12-03 17:40:27 +01:00
JailDesigner 0500dce7aa includes amb ruta absoluta 2025-12-03 11:19:23 +01:00
JailDesigner 69fb5f3cc1 Migrate to CMake-based build with packaging
Major build system refactoring:

**CMake (build authority)**:
- Auto-discovers .cpp files (GLOB_RECURSE in source/core/ and source/game/)
- No manual file list maintenance needed
- Excludes source/legacy/ automatically
- Generates build/project.h from template

**Makefile (simplified wrapper)**:
- Delegates compilation to CMake (make → cmake --build build)
- Contains 5 release packaging targets:
  * macos_release: .app bundle + .dmg (Apple Silicon)
  * linux_release: .tar.gz
  * windows_release: .zip with .exe + DLLs
  * windows_cross: cross-compile from Linux/macOS
  * rpi_release: ARM64 cross-compile
- Complex packaging logic preserved (code signing, symlinks, DMG creation)

**Benefits**:
- Add new .cpp file → automatically compiled (no manual updates)
- Single source of truth in CMakeLists.txt (no duplication)
- IDE-friendly (VSCode, CLion, etc.)
- Complete packaging support (5 platforms)

**Files changed**:
- CMakeLists.txt: GLOB_RECURSE replaces 23-file hardcoded list
- Makefile: Simplified compilation + added 5 release targets (~220 lines)
- CLAUDE.md: Updated build system documentation
- escena_titol.cpp: Fixed include path (build/project.h → project.h)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 07:36:53 +01:00
JailDesigner 98c90e6075 treballant en el starfield 2025-12-02 21:19:43 +01:00
JailDesigner f795c86a38 afegida escena TITOL 2025-12-02 21:03:21 +01:00
JailDesigner e51749dbc6 afegit sistema de audio 2025-12-02 13:51:54 +01:00
JailDesigner 73f222fcb7 afegit debris_manager 2025-12-02 08:30:32 +01:00
JailDesigner 67681e0f37 el marcador fake ja es pinta correctament 2025-12-01 23:47:42 +01:00
JailDesigner 5210448ac9 versió preliminar de text en pantalla 2025-12-01 22:29:34 +01:00
JailDesigner 983f42814f afegides shapes per a fonts 2025-11-29 10:06:33 +01:00
JailDesigner 624039e00d treballant en el LOGO 2025-11-28 21:07:36 +01:00
JailDesigner 430fcbe026 afegides escenes 2025-11-28 20:22:15 +01:00
JailDesigner 8e25d388fa afegida clase text 2025-11-28 17:08:42 +01:00
JailDesigner 4d0a5ca5bd migrat a sistema de shapes 2025-11-28 12:29:56 +01:00
JailDesigner 06e9a10c98 afegit pulso de color 2025-11-28 09:00:41 +01:00
JailDesigner 836debdc0b separació per entitats 2025-11-28 08:17:12 +01:00
JailDesigner 1e8829ba22 ja guarda la configuracio 2025-11-27 22:19:00 +01:00
JailDesigner 2b1311042f creat project.h 2025-11-27 21:47:08 +01:00
JailDesigner 93fed0b984 migrant a SDL3 2025-11-27 12:25:39 +01:00