Compare commits

...

150 Commits

Author SHA1 Message Date
723ab3d800 toggle FPS mentres jugues 2025-11-22 11:38:28 +01:00
fda8ff3f65 es poden activar els trucos en calent 2025-11-22 10:27:14 +01:00
9ef7f4274d corregida logica de atravesar el fondo de la pantalla a velocitat terminal 2025-11-22 09:29:20 +01:00
bd011a0ebb retocada aceleració de drag'n drop 2025-11-21 23:21:29 +01:00
6052be0c38 corregit bug en el modo invulnerable si caies de molt alt, es quedava marcat com mort i al llevar la invulnerabilitat, moria 2025-11-21 23:14:40 +01:00
ec3cc49710 si el jugador arriba al borde inferior de la habitació i no hi ha conexió, mor 2025-11-21 22:07:53 +01:00
2e1738c20c corregit el offset del ratoli 2025-11-21 21:23:07 +01:00
7479231110 ara pots recolocar al jugador en debug amb el ratoli 2025-11-21 21:16:03 +01:00
4fc5947ba7 corregits 2 pixels en ending3.gif 2025-11-21 21:00:19 +01:00
a21e6f8bb5 corregits missatges de log en opengl_shader.cpp que no deurien d'eixir en versions release 2025-11-21 20:15:35 +01:00
d27f978c62 afegit fade de audio al final de Ending 2025-11-21 20:06:30 +01:00
2fd101674e afegits MES estats a la classe Game 2025-11-21 18:52:20 +01:00
e36fa95762 afegits estats a la clase Game 2025-11-21 18:35:41 +01:00
88ce6cd570 clang-format 2025-11-21 18:02:53 +01:00
d011a41d5a mini-merdes 2025-11-21 17:35:33 +01:00
039eb20c06 millorat el log del principi antes de que jaildoc remugue 2025-11-21 14:03:11 +01:00
959a513651 modificat cmake per a definir RELEASE_BUILD en el BUILD_TYPE=release 2025-11-21 13:49:53 +01:00
1fed8f63bd eliminat el checkFiles inicial que a jaildoc li molestava 2025-11-21 13:34:20 +01:00
b475c4d818 jo arreglant lo de claude 2025-11-21 12:43:49 +01:00
972d23f178 claude arreglant el ending 2025-11-21 10:48:15 +01:00
83d4d0b954 afegit versió a la pantalla de carrega de recursos 2025-11-21 10:06:43 +01:00
ea43880d59 unificat el numero de versió 2025-11-21 09:44:48 +01:00
6bf26f7470 posat orden en defaults i defines 2025-11-21 09:30:33 +01:00
0fb986d7c4 linter 2025-11-21 08:07:32 +01:00
9aa86cd531 linter 2025-11-20 09:19:43 +01:00
34840a64cf linter 2025-11-20 09:19:24 +01:00
7d962ae752 fix: al canviar de pantalla lateralment, es resetejava la altura de salt i el jugador caia 2025-11-19 22:52:31 +01:00
28f11a42b7 corregides les conveyor belt d'algunes habitacions, de none a right 2025-11-19 22:33:01 +01:00
5337e3b4e5 linter 2025-11-19 20:43:20 +01:00
35ef99cf7c linter 2025-11-19 20:21:45 +01:00
cbe71b5af4 classe Player refactoritzada per chanclot 2025-11-19 19:56:35 +01:00
e73f573e9a arreglos en options.hpp/cpp 2025-11-19 19:06:06 +01:00
fa9723dafc fitxers room amb tile buit = -1 2025-11-19 13:31:24 +01:00
ceb2b71331 fitxers room convertits 2025-11-19 08:09:19 +01:00
0a5594b9a8 format de fitxers room 2025-11-19 07:59:33 +01:00
932de53609 creada resource_types 2025-11-18 13:52:41 +01:00
b7db34cdf7 arreglos d'estil en source/core/resources 2025-11-18 12:41:30 +01:00
4477cc4bbc eliminada tota la funcionalitat de gamepad_config_manager i la dependencia de json 2025-11-18 09:44:42 +01:00
435358ef1e arreglos estetics en credits 2025-11-18 09:22:07 +01:00
fff77e47cf corregides les tecles en la escena de credits 2025-11-18 09:14:50 +01:00
3550f26c45 actualitzat readme amb els controls 2025-11-18 09:11:31 +01:00
c0905adc62 migrada la configuracio de txt a yaml 2025-11-18 09:01:42 +01:00
f9b8edc23c migrat assets.txt a assets.yaml 2025-11-18 08:23:49 +01:00
6a18d880f2 eliminats comentaris i info de debug 2025-11-17 14:03:57 +01:00
d185a5e72a acabada la migracio de .ani a .yaml 2025-11-17 13:49:42 +01:00
0c9becae4c migrant .ani a .yaml 2025-11-17 13:31:20 +01:00
6a6cc22b21 migrant .ani a .yaml 2025-11-17 13:08:38 +01:00
3c4092df5e eliminades referencies a .ani 2025-11-17 12:55:27 +01:00
10911990dd migrant .ani a .yaml 2025-11-17 12:47:07 +01:00
21a495e40a migrat jail_audio a un .hpp (segur que ja no funciona res) 2025-11-17 12:27:58 +01:00
6827512025 migrat de yaml-cpp a fkYAML 2025-11-17 09:25:50 +01:00
23fe4a35a9 migrats els fitxers .room i .tmx a .yaml unificats 2025-11-17 08:20:02 +01:00
a5d43dfb1f nou icono
corregit Makefile
2025-11-16 21:11:52 +01:00
e4a61a7241 eliminada la clase Debug en Release 2025-11-16 20:44:15 +01:00
24a71395da afegits estils per a les notificacions (per a distinguir les de sistema de les dels logros) 2025-11-16 20:19:30 +01:00
e4c10b6b75 ACABADA LA LOGICA DE PLAYER! es pot refactoritzar i falta els casos on Player puga avançar mes de un pixel en un frame 2025-11-15 22:45:18 +01:00
710e7cc8c1 merdetes pa debugar a gust 2025-11-14 17:58:32 +01:00
8893e8f05b casi acabat el Player pero -> canvi de PC 2025-11-14 14:11:27 +01:00
7f51f02d96 treballant en Player: abans d'entrar a moveOnSlope() 2025-11-14 12:54:59 +01:00
29e0daffb0 treballant en Player 2025-11-14 10:42:30 +01:00
b8dd6e80d9 refactor(player): Simplificar structs y agregar inicialización en clase
- Eliminar constructores parametrizados redundantes de SpawnData y Data structs
- Agregar inicialización en declaración para collider_box_, jumping_sound_, falling_sound_
- Renombrar parámetro de transitionToState() para consistencia (value → state)
- Actualizar game.cpp para usar aggregate initialization de Player::Data
- Refactorizar sistema de estados del jugador con métodos por estado

Archivos modificados:
- source/game/entities/player.hpp: Simplificación de structs e inicialización
- source/game/entities/player.cpp: Refactoring del sistema de estados
- source/game/scenes/game.cpp: Actualización de construcción del Player

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 13:36:33 +01:00
46eeda4ae9 Merge branch 'refactor/room-modularization'
Refactorización completa de la clase Room siguiendo patrón Facade.

## Resumen de la refactorización

La clase Room era un God Object con más de 1500 líneas y múltiples
responsabilidades. Se ha refactorizado en 6 fases, extrayendo
responsabilidades a clases especializadas:

### Fases completadas:

1. **Fase 1**: Gestión de entidades
   - Creado EnemyManager
   - Creado ItemManager
   - Reducción: ~200 líneas

2. **Fase 2**: Sistema de colisiones
   - Creado CollisionMap
   - Extracción de geometría de colisión
   - Reducción: ~400 líneas

3. **Fase 3**: Renderizado de tilemap
   - Creado TilemapRenderer
   - Separación de lógica de rendering
   - Reducción: ~300 líneas

4. **Fase 4**: Sistema de parseo de archivos
   - Creado RoomLoader
   - Extracción de carga de .room y .tmx
   - Reducción: ~285 líneas

5. **Fase 5**: Limpieza final
   - Optimización de imports (16 → 12)
   - Correcciones de estilo
   - Reducción final

6. **Fase 6**: Corrección de estándares
   - Corregidos 9 includes relativos a absolutos
   - Cumplimiento de estándares del proyecto

## Resultados

- **Antes**: Room ~1500+ líneas (God Object)
- **Después**: Room ~260 líneas (Facade/Coordinator)
- **Reducción**: 83% del código
- **Nuevas clases**: 4 (EnemyManager, ItemManager, CollisionMap,
  TilemapRenderer, RoomLoader)
- **Compilación**: ✓ Sin errores
- **Funcionamiento**: ✓ 325 assets verificados
- **Linters**: ✓ cppcheck limpio

## Patrón aplicado

Room ahora actúa como **Facade/Coordinator** que delega a managers
especializados, manteniendo su rol legítimo como contenedor de nivel.

Closes #refactor-room
2025-11-13 12:32:53 +01:00
e13a8e5930 fix(gameplay): Corregir includes relativos a absolutos
## Problema
Durante la refactorización de Room (Fases 1-3), se introdujeron includes
relativos con ".." en 4 archivos, violando el estándar del proyecto que
requiere includes absolutos desde la raíz source/.

## Cambios Realizados

### collision_map.hpp (1 corrección)
- "../../utils/utils.hpp" → "utils/utils.hpp"

### collision_map.cpp (2 correcciones)
- "../../core/system/debug.hpp" → "core/system/debug.hpp"
- "../../utils/defines.hpp" → "utils/defines.hpp"

### enemy_manager.cpp (2 correcciones)
- "../../utils/utils.hpp" → "utils/utils.hpp"
- "../entities/enemy.hpp" → "game/entities/enemy.hpp"

### item_manager.cpp (4 correcciones)
- "../../core/audio/audio.hpp" → "core/audio/audio.hpp"
- "../../utils/utils.hpp" → "utils/utils.hpp"
- "../entities/item.hpp" → "game/entities/item.hpp"
- "../options.hpp" → "game/options.hpp"

## Validación
✓ Compilación exitosa
✓ 325 assets cargados correctamente
✓ Room files verificados
✓ Funcionamiento del juego confirmado

## Total
9 includes corregidos en 4 archivos, cumpliendo con el estándar de
includes absolutos del proyecto definido en CLAUDE.md.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 12:13:52 +01:00
c59812e4af refactor(room): Fase 5 - Final cleanup and optimization
## Summary
Final cleanup phase of Room class refactoring. Optimized dependencies,
fixed code quality issues, and improved maintainability.

## Changes Made

### Import Optimization
Reduced includes from 16 to 12 by removing unused dependencies:
- Removed STL: <algorithm>, <exception>, <fstream>, <iostream>, <sstream>
- Removed project headers: audio.hpp, debug.hpp, surface_sprite.hpp,
  resource_helper.hpp, options.hpp
- Retained only essential includes for Room's coordinator role

### Code Quality Fixes
- Fixed double std::move in constructor: data_(std::move(std::move(data)))
  → data_(std::move(data))
- Simplified getRoom() switch statement (removed redundant breaks)
- Improved code clarity and adherence to C++ best practices

### Style Consistency
- Standardized comment style in collision_map.hpp (=== → ---)

## Testing
✓ Compilation successful
✓ Game execution verified (asset loading, room parsing working)
✓ Linters run:
  - clang-tidy: 3 style warnings (false positives on const naming)
  - cppcheck: Clean (no warnings)

## Metrics
- room.cpp: 259 lines (down from 277 after Phase 4)
- Dependencies minimized to essential coordinator responsibilities
- Zero functional issues introduced

## Related
Part of Room class refactoring (God Object → Coordinator pattern)
- Phase 1: Entity management (EnemyManager, ItemManager)
- Phase 2: Collision system (CollisionMap)
- Phase 3: Tilemap rendering (TilemapRenderer)
- Phase 4: File parsing (RoomLoader)
- Phase 5: Final cleanup (this commit)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 12:05:36 +01:00
e97c951d0d Fase 4: Refactorización de Room - Extracción del sistema de parseo de archivos
## Cambios principales

### Nuevo componente: RoomLoader
- **room_loader.hpp/cpp**: Nueva clase estática para parseo de archivos
- Responsabilidades extraídas de Room:
  - Carga de archivos .room (loadRoomFile)
  - Carga de archivos .tmx de tilemap (loadRoomTileFile)
  - Parseo de claves y valores (parseKeyValue)
  - Asignación de valores a estructuras (setRoom, setEnemy, setItem)
  - Carga de bloques [enemy] y [item] (loadEnemyFromFile, loadItemFromFile)
  - Log de parámetros desconocidos (logUnknownParameter)

### Modificaciones en Room
- **room.hpp**:
  - Eliminados 9 métodos estáticos privados de parseo
  - Mantenidos 2 métodos públicos (loadRoomFile, loadRoomTileFile) que ahora delegan a RoomLoader
  - Añadido comentario indicando delegación a RoomLoader

- **room.cpp**:
  - Eliminadas ~285 líneas de código de parseo de archivos
  - Añadido #include "room_loader.hpp"
  - Implementaciones de loadRoomFile y loadRoomTileFile ahora son simples delegaciones:
    * `return RoomLoader::loadRoomFile(file_path, verbose);`
    * `return RoomLoader::loadRoomTileFile(file_path, verbose);`
  - Archivo reducido de 554 líneas a 277 líneas (50% de reducción)

### Build system
- **CMakeLists.txt**: Añadido room_loader.cpp a las fuentes del proyecto

## Diseño de RoomLoader

RoomLoader es una clase utility con solo métodos estáticos (no instanciable):
- Constructor/destructor eliminados
- No tiene estado (stateless)
- Todos los métodos son estáticos
- Encapsula toda la lógica de I/O y parseo de archivos de configuración

## Métricas
- **Código eliminado de Room**: ~285 líneas de lógica de parseo
- **Nuevo RoomLoader**: 300 líneas (room_loader.cpp)
- **Reducción en room.cpp**: De 554 a 277 líneas (50% de reducción)
- **Room.hpp**: Simplificado significativamente (9 declaraciones privadas eliminadas)

## Verificación
-  Compilación exitosa sin errores
-  Juego inicia y carga todos los archivos correctamente
-  clang-tidy: 1 warning de complejidad cognitiva (código heredado, no modificado)
-  cppcheck: Sin issues

## Progreso total de refactorización

Después de 4 fases, Room ha sido drásticamente simplificado:
- **Phase 1**: Gestión de entidades → EnemyManager & ItemManager
- **Phase 2**: Sistema de colisiones → CollisionMap (~465 líneas)
- **Phase 3**: Renderizado de tilemap → TilemapRenderer (~95 líneas)
- **Phase 4**: Parseo de archivos → RoomLoader (~285 líneas)

**Total eliminado de Room**: ~845+ líneas
**Reducción tamaño archivo**: De 1097 líneas originales a 277 líneas (75% de reducción)
**Nuevas clases especializadas**: 6 (EnemyManager, ItemManager, CollisionMap, TilemapRenderer, RoomLoader)

## Próximos pasos
- Fase 5: Limpieza final y optimización de Room como coordinador ligero

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 09:26:03 +01:00
5365d62abc Fase 3: Refactorización de Room - Extracción del sistema de renderizado de tilemap
## Cambios principales

### Nuevo componente: TilemapRenderer
- **tilemap_renderer.hpp/cpp**: Nueva clase que encapsula el renderizado del mapa de tiles
- Responsabilidades extraídas de Room:
  - Renderizado del tilemap estático
  - Gestión de tiles animados (conveyor belts)
  - Actualización de animaciones basadas en tiempo
  - Debug visualization de colisiones (en modo DEBUG)
  - Gestión de map_surface y time_accumulator

### Modificaciones en Room
- **room.hpp**:
  - Añadido TilemapRenderer como miembro (unique_ptr)
  - Removida estructura AnimatedTile (ahora privada en TilemapRenderer)
  - Removidos: map_surface_, animated_tiles_, time_accumulator_, CONVEYOR_FRAME_DURATION
  - Removidos 4 métodos privados de renderizado: fillMapTexture, setAnimatedTiles, updateAnimatedTiles, renderAnimatedTiles

- **room.cpp**:
  - Constructor: Inicializa TilemapRenderer con tile_map, tile_set_width, surface, bg_color, conveyor_belt_direction
  - Constructor: Llama a tilemap_renderer_->initialize(collision_map_)
  - Delegación: renderMap() llama a tilemap_renderer_->render()
  - Delegación: update() llama a tilemap_renderer_->update(delta_time)
  - Delegación: setPaused() llama a tilemap_renderer_->setPaused(value)
  - Removida inicialización de time_accumulator_
  - Eliminados ~95 líneas de código de renderizado (incluyendo debug lines)

### Mejoras en CollisionMap
- **collision_map.hpp/cpp**:
  - Marcados getTile(SDL_FPoint) y getTile(int) como const (const correctness)
  - Permite uso desde TilemapRenderer con puntero const

### Build system
- **CMakeLists.txt**: Añadido tilemap_renderer.cpp a las fuentes del proyecto

## Métricas
- **Código eliminado de Room**: ~95 líneas de lógica de renderizado de tilemap
- **Nuevo TilemapRenderer**: 208 líneas (tilemap_renderer.cpp)
- **Reducción en room.cpp**: Continúa la mejora en cohesión y separación de responsabilidades

## Verificación
-  Compilación exitosa sin errores
-  Juego inicia y renderiza correctamente
-  clang-tidy: 1 warning (naming style) corregido
-  cppcheck: 1 suggestion (const correctness) aplicado
-  Const correctness mejorada en CollisionMap

## Próximos pasos
- Fase 4: Extracción del parseo de archivos (RoomLoader)
- Fase 5: Limpieza final y reducción de Room a coordinador ligero

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 09:09:51 +01:00
c5ad8041e8 Fase 2: Refactorización de Room - Extracción del sistema de colisiones
## Cambios principales

### Nuevo componente: CollisionMap
- **collision_map.hpp/cpp**: Nueva clase que encapsula toda la lógica de detección de colisiones
- Responsabilidades extraídas de Room:
  - Determinación de tipos de tile (getTile)
  - Generación de geometría de colisión (superficies, rampas, conveyor belts)
  - Queries de colisión para Player y entidades
  - 14 métodos de detección de colisión
  - Getters para visualización debug

### Modificaciones en Room
- **room.hpp**:
  - Añadido CollisionMap como miembro (unique_ptr)
  - Removidos 7 vectores de geometría de colisión
  - Removidos 13 métodos privados de generación de geometría
  - Añadido getTile(int index) para soporte de animated tiles
  - Añadido destructor explícito (necesario para unique_ptr con forward declaration)

- **room.cpp**:
  - Constructor: Inicializa CollisionMap con tile_map, tile_set_width, conveyor_belt_direction
  - Delegación: Todos los métodos de colisión ahora llaman a collision_map_
  - Restaurados métodos de animated tiles (openTheJail, setAnimatedTiles, updateAnimatedTiles, renderAnimatedTiles)
  - Actualizado openTheJail() para usar enemy_manager_ en lugar de enemies_
  - Debug visualization actualizada para usar getters de CollisionMap

### Build system
- **CMakeLists.txt**: Añadido collision_map.cpp a las fuentes del proyecto

## Métricas
- **Código eliminado de Room**: ~465 líneas de lógica de colisión
- **Nuevo CollisionMap**: 487 líneas (collision_map.cpp)
- **Reducción neta en room.cpp**: Significativa mejora en cohesión

## Verificación
-  Compilación exitosa sin errores
-  Juego inicia y carga recursos correctamente
-  clang-tidy: Sin warnings en código de usuario
-  cppcheck: Sin issues reales (solo false positive en utils.hpp)

## Próximos pasos
- Fase 3: Extracción del sistema de renderizado de tilemap
- Fase 4: Extracción del parseo de archivos
- Fase 5: Limpieza final y reducción de Room a coordinador ligero

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 08:51:01 +01:00
2f90338214 Fase 1: Refactorización de Room - Extracción de gestión de entidades
Extraída la gestión de enemigos e items de Room a managers dedicados,
reduciendo las responsabilidades de la clase Room y mejorando la
separación de concernimientos.

Cambios principales:
- Creado EnemyManager para gestionar enemigos (creación, update, render, colisión)
- Creado ItemManager para gestionar items (creación, update, render, colisión, pickup)
- Room ahora delega toda la gestión de entidades a estos managers
- Room mantiene su interfaz pública sin cambios (retrocompatibilidad total)
- Eliminados vectores enemies_ e items_ de Room (reemplazados por managers)

Archivos nuevos:
- source/game/gameplay/enemy_manager.hpp/cpp
- source/game/gameplay/item_manager.hpp/cpp

Archivos modificados:
- source/game/gameplay/room.hpp/cpp
- CMakeLists.txt

Estado:
- Compilación exitosa
- Carga de assets verificada (325 assets OK)
- Linters ejecutados (clang-tidy y cppcheck)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 08:19:59 +01:00
477ab34057 reestructurat utils 2025-11-12 14:02:17 +01:00
9cf45062a3 netejant capçaleres 2025-11-12 13:47:19 +01:00
e626ec9763 corregit make resources.pack 2025-11-12 10:21:40 +01:00
cf40865d37 netejant capçaleres 2025-11-12 10:14:47 +01:00
580e52a51e netejant capçaleres 2025-11-11 13:02:25 +01:00
d6ced94316 netejant capçaleres 2025-11-11 12:35:21 +01:00
54fc6d2902 unificats els resources en un namespace 2025-11-11 10:04:57 +01:00
1821b84e73 fix: la pantalla de carrega carregava mal a 60FPS. es saltava bolcs per pintar.
style: adjustat el timing de loading_screen
2025-11-10 17:14:15 +01:00
6ea0acd3f3 Pos estava ci fent arreglos varios i m'han obligat a fer commit 2025-11-10 14:27:10 +01:00
b70b728b75 style: deixant guapetes les capçaleres de les classes 2025-11-10 13:53:29 +01:00
5dd463ad5a posss.. mes merdes que no van a cap lloc 2025-11-09 21:51:55 +01:00
1f01268dcf merdes varies 2025-11-08 13:21:59 +01:00
85d34fb907 style: afegides varies animacions amb easing per al Logo 2025-11-08 00:10:16 +01:00
e9fed353ff style: modificat el desplaçament de la llista de logros 2025-11-07 23:39:42 +01:00
b4f6b919d7 fix: coreció de rutes en resource_helper.cpp 2025-11-07 23:26:00 +01:00
667ab73fc6 implementada la logica de so (time based) en Player per a imitar la anterior frame based (amb els seus fallos) 2025-11-07 23:04:02 +01:00
7d0e0e0d18 fix: Player atravessava rampes al saltar recte si el framerate era molt alt 2025-11-07 20:01:07 +01:00
2c92fe8372 cppcheck 2025-11-07 17:58:47 +01:00
6e3cd05cd2 cppcheck 2025-11-07 17:01:29 +01:00
84b5ff05ad afegit cppcheck a tools/linter 2025-11-07 10:06:47 +01:00
cf6831206e style: elements de menu centrats verticalment en Title 2025-11-07 09:53:07 +01:00
9e3d3a7ce3 style: en Title, eliminat el submenu de controls 2025-11-07 09:35:44 +01:00
85844645ac fix: corregida la animació de Logo 2025-11-07 08:53:15 +01:00
da159f1409 correccions en fitxers .room 2025-11-06 20:54:14 +01:00
d875a2706b refinant la classe Player 2025-11-06 14:14:22 +01:00
288e01e47f treballant en la nova clase Player 2025-11-05 14:15:00 +01:00
a20ea5299d afegit player.md 2025-11-04 14:02:23 +01:00
66a580aff6 4 merdes fetes en la feina pr avorriment 2025-11-03 14:12:17 +01:00
d4030ec1bc linter 2025-11-03 09:58:19 +01:00
3f1c737247 linter 2025-11-03 09:52:54 +01:00
1409ab5bff corregida la velocitat del Logo 2025-11-02 22:50:57 +01:00
e08badbf22 afegida hotkey per activar/desactivar el vsync 2025-11-02 22:29:09 +01:00
64f0ef7349 Eliminar archivos binarios del repositorio y actualizar .gitignore
- Añadidas entradas para pack_resources y resources.pack al .gitignore
- Eliminados resources.pack y tools/pack_resources/pack_resources del repositorio
- Los archivos locales se mantienen pero ya no serán trackeados por git

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 22:28:10 +01:00
0d19cf18aa ja es pot redefinir el mando correctament 2025-11-02 19:07:46 +01:00
87527d01a8 ja redefinix els botons i axis, pero el axis sempre te un comportament default. corregir 2025-11-02 19:02:29 +01:00
b79f30a57b treballant en redefinir els botons i axis del joystick 2025-11-02 18:57:24 +01:00
6c766be023 el joc es pot controlar amb el primer mando que hi haja conectat 2025-11-02 18:18:12 +01:00
ee1dc70bd8 mogudes les tecles H, B i M a tecles de funció 2025-11-02 18:02:18 +01:00
eb550ab95b ja es poden redefinir les tecles
renombrat achievements a projects
2025-11-02 17:58:34 +01:00
13513384d1 treballant en redefine keys 2025-11-02 17:31:44 +01:00
f7aa6a2b8b afegit fadeout de musica en Title al passar al joc 2025-11-02 17:11:18 +01:00
ba06bccabc les tecles de control estan definides al fitxer de configuracio 2025-11-02 17:08:56 +01:00
9102c6a65e reorganitzat GlobalInputs 2025-11-02 16:42:45 +01:00
435ff5eb6a Title: codi mes ordenat. Fade quan transiciona a Credits. Esqueleto preparat per a treballar en redefine keys/joystick 2025-11-02 14:27:25 +01:00
af7420d7c7 Title: afegit fade i post_fade 2025-11-02 14:04:33 +01:00
4eac48ed78 LoadingScreen: nous efectes de so. Millores acabades 2025-11-02 11:00:09 +01:00
c5563768af LoadingScreen: la pantalla de carrega en BN ja es menja el Program 2025-11-02 10:25:25 +01:00
46f7968faf LoadingScreen: afegits picos de soroll als silencis 2025-11-02 10:08:39 +01:00
9cd1755266 LoadingScreen: implementat visualment la càrrega de headers 2025-11-02 09:48:07 +01:00
ef89a858c3 afegit make help 2025-11-02 07:58:12 +01:00
d46e2295ff style: en els update() de game/scenes 2025-11-01 22:52:56 +01:00
f91748bdf0 Merge branch 'main' of https://gitea.sustancia.synology.me/JailDesigner/jaildoctors_dilemma 2025-11-01 22:28:58 +01:00
824e7417ad migrat Input a la ultima versió
cohesionats tots els metodes update de les escenes
2025-11-01 22:28:51 +01:00
e86539eba0 Actualizar README.md 2025-11-01 19:56:33 +01:00
1dd750ba0c corregida la carrega de config.txt 2025-11-01 19:10:51 +01:00
7441fa2b6b corregides les lectures de fitxers de text en windows. fallava per culpa del final de linea 2025-11-01 18:55:07 +01:00
139d56f8b5 millores en la pantalla de càrrega de recursos 2025-11-01 18:07:55 +01:00
b80e81dab3 fix: bug de lectura en windows en Room::loadRoomTileFile() 2025-11-01 17:51:05 +01:00
b21c52092a correccions en el Makefile per a windows 2025-11-01 17:37:01 +01:00
5c5151c032 correccions en makefile i version.h 2025-11-01 09:44:31 +01:00
66c7c9dfe6 vectoritzat el icono. nova versió 2025-11-01 09:44:16 +01:00
cb09198bfe treballant en la pantalla de càrrega de recursos 2025-11-01 08:52:03 +01:00
16aa4f52aa normalitzat el audio de options, audio i jail_audio a float entre 0.0 i 1.0 2025-11-01 00:01:20 +01:00
f67bdc6f4f modificat aseprite.png a aseprite.gif 2025-11-01 00:00:52 +01:00
eb7d1bb014 optimitzats els constructors per defecte en Options 2025-10-31 23:46:07 +01:00
5f802ed6ef afegiida aseprite font 2025-10-31 23:45:06 +01:00
635efdba5e corregit el macos_release 2025-10-31 23:11:17 +01:00
8c6bea897c actualitzada la carpeta release a SDL3
migrat a resources.pack
2025-10-31 22:58:37 +01:00
70bfced50d migrat Assets a la ultima versió (fitxers no hardcoded) 2025-10-31 12:52:22 +01:00
2f20ac422e eliminats metodes deprecated
migracions finals a time based
migracions de jail_audio a Audio
2025-10-31 10:32:23 +01:00
1bb3d00e7c migrat Scoreboard a time based 2025-10-31 09:30:33 +01:00
f08b2f9193 migrat Ending2 a time based 2025-10-31 08:40:46 +01:00
3680ff3935 migrat Ending a time based 2025-10-30 22:57:43 +01:00
99893a0c83 migrat Credits a time based 2025-10-30 22:44:33 +01:00
c5cfb518a2 treballant en la classe Player 2025-10-30 22:01:20 +01:00
1041aaf385 afegides regles per reescriure la clase Player 2025-10-30 13:36:20 +01:00
c207b456f5 tractant d'entendre el codi de Player i posar ordre 2025-10-29 21:18:15 +01:00
7cd596a0b9 fix: inicialitzacions 2025-10-29 17:16:19 +01:00
89a7f197a6 fix: corregides les velocitats negatives dels enemics als fitxers .room 2025-10-29 16:42:29 +01:00
fda22dd5f2 Merge pull request 'Ja pilla el gif i el tamany del .ani, en compte de del [enemy] en les rooms.' (#20) from jailers/jaildoctors_dilemma:main into main
Reviewed-on: JailDesigner/jaildoctors_dilemma#20
2025-10-29 15:08:35 +01:00
70d6cbfaf8 [DOC:29/10/2025] la surface ara se pillarà del .ANI
Tots els arxius .ani i .room retocats per a adequarse als canvis.
2025-10-29 14:22:36 +01:00
95dd6b4f70 [DOC:29/10/2025] w i h ja no fan falta, se pilla del .ANI 2025-10-29 12:22:20 +01:00
930 changed files with 411600 additions and 44773 deletions

View File

@@ -16,10 +16,12 @@ Checks:
- -performance-inefficient-string-concatenation
- -bugprone-integer-division
- -bugprone-easily-swappable-parameters
- -modernize-avoid-c-arrays,-warnings-as-errors
WarningsAsErrors: '*'
# Solo incluir archivos de tu código fuente
HeaderFilterRegex: '^source/(sections|ui)/.*'
# Solo incluir archivos de tu código fuente (external tiene su propio .clang-tidy)
# Excluye jail_audio.hpp del análisis
HeaderFilterRegex: '^source/(?!core/audio/jail_audio\.hpp).*'
FormatStyle: file
CheckOptions:

View File

@@ -0,0 +1,172 @@
---
description: Ejecuta clang-tidy en archivos C++ y analiza los resultados
---
# Lint clang-tidy Command
Ejecuta análisis estático con clang-tidy en archivos C++ específicos, analiza los resultados inteligentemente, e identifica issues reales vs falsos positivos.
## Propósito
clang-tidy detecta:
- Oportunidades de modernización C++ (auto, range-for, etc.)
- Problemas de legibilidad del código
- Potenciales bugs y memory leaks
- Optimizaciones de performance
- Violaciones de mejores prácticas
## Workflow de Ejecución
1. **Solicitar archivos al usuario** (si no se especifican)
- Pedir rutas de archivos `.cpp` o `.hpp` a analizar
- Validar que los archivos existen
2. **Verificar build directory**
- Confirmar que `build/compile_commands.json` existe
- Si no existe, informar al usuario que debe compilar primero
3. **Ejecutar clang-tidy (sin --fix)**
```bash
tools/linter/run_clang-tidy.sh archivo1.cpp archivo2.hpp
```
4. **Capturar y analizar salida**
- Parsear mensajes de error/warning
- Clasificar por categoría (modernize, readability, performance, bugprone, etc.)
- Identificar falsos positivos conocidos
5. **Presentar resumen al usuario**
- Agrupar por tipo de issue
- Separar "Críticos" vs "Recomendaciones" vs "Falsos Positivos"
- Mostrar líneas de código afectadas con contexto
6. **Ofrecer acciones**
- Preguntar si aplicar `--fix` automáticamente
- Si el usuario acepta, ejecutar con `--fix` y recompilar
## Falsos Positivos Conocidos
Ignorar o marcar como "Opcional" estos casos:
### `readability-magic-numbers` / `cppcoreguidelines-avoid-magic-numbers`
- **Contexto:** Game constants (block sizes, velocities, timers)
- **Ejemplo:** `const int BLOCK = 16;`, `player.vx = 3.0F;`
- **Acción:** Marcar como "Opcional - Game constant"
### `modernize-use-trailing-return-type`
- **Contexto:** Funciones con tipos de retorno simples
- **Ejemplo:** `int getValue() { return x_; }`
- **Acción:** Marcar como "Opcional - Style preference"
### Errores en `defaults.hpp`
- **Contexto:** Archivos de constantes del juego
- **Acción:** Ignorar completamente, mencionar al usuario que es conocido
### `readability-identifier-length`
- **Contexto:** Variables cortas comunes en loops o coordenadas (`x`, `y`, `i`, `j`)
- **Acción:** Marcar como "Opcional - Common convention"
## Categorización de Issues
### 🔴 Críticos (Requieren atención)
- `bugprone-*`: Potenciales bugs
- `cert-*`: Security issues
- Memory leaks y null pointer dereferences
- Undefined behavior
### 🟡 Recomendados (Mejoran calidad)
- `modernize-*`: C++20 modernization
- `performance-*`: Optimizaciones
- `readability-*`: Mejoras de legibilidad (excepto magic-numbers)
### ⚪ Opcionales (A criterio)
- `readability-magic-numbers` en game constants
- `modernize-use-trailing-return-type`
- `readability-identifier-length` para `x`, `y`, `i`, `j`
### ⚫ Ignorar (Falsos positivos)
- Errores en `defaults.hpp`
- Issues en carpeta `external/`
- Warnings en headers del sistema
## Formato de Reporte al Usuario
```
=== clang-tidy Analysis Results ===
📁 Archivos analizados:
- source/game/entities/player.cpp
- source/game/entities/player.hpp
🔴 Críticos (2):
player.cpp:145 [bugprone-use-after-move] - Uso de variable después de std::move()
player.cpp:230 [cert-err58-cpp] - Excepción en inicialización estática
🟡 Recomendados (5):
player.cpp:67 [modernize-use-auto] - Puede usar 'auto' en lugar de tipo explícito
player.cpp:102 [performance-unnecessary-copy-initialization] - Copia innecesaria
player.hpp:23 [readability-redundant-access-specifiers] - Especificador de acceso redundante
⚪ Opcionales (3):
player.cpp:88 [readability-magic-numbers] - Magic number '16' (Game constant: BLOCK size)
player.cpp:120 [modernize-use-trailing-return-type] - Style preference
✅ Total: 10 issues (2 críticos, 5 recomendados, 3 opcionales)
---
💡 Recomendaciones:
1. Corregir los 2 issues críticos manualmente
2. Aplicar --fix para 5 recomendaciones (revisa cambios antes de commitear)
3. Los opcionales son aceptables en código de juego
¿Deseas aplicar fixes automáticos para los issues recomendados? (y/n)
```
## Aplicar Fixes Automáticos
Si el usuario acepta:
1. **Ejecutar con --fix**
```bash
tools/linter/run_clang-tidy.sh --fix archivo1.cpp archivo2.hpp
```
2. **Informar cambios**
- Listar archivos modificados
- Recomendar revisión manual
3. **Recompilar**
```bash
cmake --build build
```
4. **Verificar compilación exitosa**
- Si falla, informar errores
- Sugerir revertir cambios si es necesario
## Notas Importantes
- **Siempre analizar sin --fix primero** para revisar cambios propuestos
- **Requiere build/compile_commands.json** - el usuario debe haber compilado antes
- **Contexto importa** - Game code tiene patrones legítimos que linters marcan como issues
- **No aplicar --fix ciegamente** - Algunos fixes pueden romper lógica del juego
- **Archivos específicos** - Siempre analizar archivos concretos, no todo el proyecto
## Integración con Otros Comandos
Este comando puede ser llamado desde:
- `/refactor-class` - Después de refactorizar una clase
- Manualmente por el usuario para análisis ad-hoc
- Antes de commits importantes
---
**Uso:**
```
/lint-clang-tidy
(El comando preguntará qué archivos analizar)
O especificar directamente:
/lint-clang-tidy source/game/entities/player.cpp
```

View File

@@ -0,0 +1,275 @@
---
description: Ejecuta cppcheck en código C++ y analiza resultados
---
# Lint cppcheck Command
Ejecuta análisis estático con cppcheck en código C++, filtra noise, e identifica issues reales relacionados con bugs, memory safety y undefined behavior.
## Propósito
cppcheck detecta:
- Memory leaks y resource leaks
- Null pointer dereferences
- Buffer overflows y array bounds issues
- Uninitialized variables
- Dead code y unused functions
- Style issues y code smells
- Undefined behavior
## Workflow de Ejecución
1. **Solicitar archivos/rutas al usuario** (si no se especifican)
- Pedir rutas de archivos `.cpp`/`.hpp` o carpetas a analizar
- Preguntar nivel de análisis (warning/all/unused)
- Default: `-w` (warning, style, performance)
2. **Validar precondiciones**
- Confirmar que los archivos/carpetas existen
- Si no existe `build/compile_commands.json`, el script lo generará automáticamente
3. **Ejecutar cppcheck**
```bash
# Para archivo específico
tools/linter/run_cppcheck.sh -w --path source/game/entities/player.cpp
# Para carpeta
tools/linter/run_cppcheck.sh -w --path source/game/entities/
# Proyecto completo (LENTO)
tools/linter/run_cppcheck.sh -w
```
4. **Leer archivo de resultados**
- `-w`: `tools/linter/cppcheck-result-warning-style-performance.txt`
- `-a`: `tools/linter/cppcheck-result-all.txt`
- `-u`: `tools/linter/cppcheck-result-unusedFunction.txt`
5. **Analizar y clasificar issues**
- Parsear formato de cppcheck: `[archivo:línea]: (severidad) mensaje`
- Filtrar falsos positivos conocidos
- Agrupar por categoría
6. **Presentar resumen al usuario**
- Mostrar issues críticos primero
- Explicar contexto cuando sea relevante
- Sugerir acciones correctivas
## Niveles de Análisis
### `-w` / `--warning` (Recomendado para uso diario)
- **Velocidad:** Rápido
- **Checks:** warning, style, performance
- **Uso:** Refactoring diario, antes de commits
- **Ejemplo:** `tools/linter/run_cppcheck.sh -w --path source/game/entities/player.cpp`
### `-a` / `--all` (Análisis exhaustivo)
- **Velocidad:** Lento
- **Checks:** Todos los checks disponibles
- **Uso:** Después de cambios mayores, auditorías de código
- **Ejemplo:** `tools/linter/run_cppcheck.sh -a --path source/game/`
### `-u` / `--unused` (Funciones no usadas)
- **Velocidad:** Medio
- **Checks:** unusedFunction
- **Uso:** Limpieza de código muerto
- **Ejemplo:** `tools/linter/run_cppcheck.sh -u`
- **Nota:** Requiere análisis de proyecto completo
## Falsos Positivos Conocidos
### `unusedFunction` en métodos públicos
- **Contexto:** Métodos de API pública, callbacks, getters/setters
- **Ejemplo:** `Player::getX()` usado desde múltiples lugares
- **Acción:** Ignorar si el método es parte de la interfaz pública
### `passedByValue` para tipos pequeños
- **Contexto:** SDL_FRect, SDL_Point, enums, small structs
- **Ejemplo:** `void setPos(SDL_FPoint pos)`
- **Acción:** Aceptable para tipos ≤ 16 bytes en game code
### `constParameter` en APIs consistentes
- **Contexto:** Parámetros que no se modifican pero mantienen consistencia de API
- **Acción:** Opcional, depende de estilo del proyecto
### `variableScope` en inicializaciones complejas
- **Contexto:** Variables declaradas antes de inicialización compleja
- **Acción:** Revisar caso por caso, puede ser falso positivo
## Categorización de Issues
### 🔴 Críticos (Requieren corrección inmediata)
- `error`: Bugs confirmados
- `memleakOnRealloc`: Memory leaks
- `nullPointer`: Null pointer dereferences
- `bufferAccessOutOfBounds`: Buffer overflows
- `uninitvar`: Variables no inicializadas
- `useAfterFree`: Use-after-free
### 🟠 Advertencias (Revisar y corregir)
- `warning`: Potenciales problemas
- `memleak`: Posibles memory leaks
- `resourceLeak`: Resource leaks (file handles, etc.)
- `doubleFree`: Double free
- `arrayIndexOutOfBounds`: Array bounds issues
### 🟡 Estilo (Mejoran calidad)
- `style`: Code smells
- `unusedVariable`: Variables no usadas
- `redundantAssignment`: Asignaciones redundantes
- `unreadVariable`: Variables escritas pero no leídas
### 🟢 Performance (Optimizaciones)
- `performance`: Optimizaciones de rendimiento
- `passedByValue`: Pasar por const& en vez de value
- `postfixOperator`: Usar prefix++ en vez de postfix++
### ⚪ Informativo (Opcional)
- `information`: Información general
- `portability`: Problemas de portabilidad
- `unusedFunction`: Funciones no usadas (revisar contexto)
## Formato de Reporte al Usuario
```
=== cppcheck Analysis Results ===
📁 Archivos analizados: source/game/entities/player.cpp
📊 Nivel: warning + style + performance
📝 Resultados: tools/linter/cppcheck-result-warning-style-performance.txt
🔴 Errores críticos (2):
player.cpp:156 [error:uninitvar] - Variable 'velocity' no inicializada
player.cpp:234 [error:nullPointer] - Posible null pointer dereference
🟠 Advertencias (3):
player.cpp:89 [warning:memleak] - Posible memory leak en 'sprite_'
player.cpp:178 [warning:arrayIndexOutOfBounds] - Índice fuera de límites
🟡 Estilo (4):
player.cpp:45 [style:unusedVariable] - Variable 'temp' declarada pero no usada
player.cpp:102 [style:redundantAssignment] - Asignación redundante a 'x_'
🟢 Performance (2):
player.cpp:67 [performance:passedByValue] - Pasar 'data' por const& (8 bytes - FALSO POSITIVO)
player.hpp:34 [performance:postfixOperator] - Usar prefix++ en lugar de postfix++
✅ Total: 11 issues
- 2 críticos ❗
- 3 advertencias
- 4 estilo
- 2 performance (1 falso positivo)
---
💡 Acción requerida:
1. ✅ Corregir 2 errores críticos INMEDIATAMENTE
2. ⚠️ Revisar 3 advertencias y corregir si aplica
3. 🔧 Considerar 4 mejoras de estilo
4. ⚡ 1 optimización real de performance (ignorar passedByValue)
📄 Detalles completos en: tools/linter/cppcheck-result-warning-style-performance.txt
```
## Acciones Post-Análisis
### Si hay errores críticos:
1. **Mostrar código afectado** con contexto
2. **Explicar el problema** en términos claros
3. **Sugerir corrección** específica
4. **Ofrecer aplicar fix** si es sencillo
### Si solo hay warnings/style:
1. **Resumir issues** por categoría
2. **Indicar prioridades** (qué corregir primero)
3. **Explicar falsos positivos** identificados
4. **Preguntar si aplicar fixes** para issues simples
### Si no hay issues:
```
✅ ¡Código limpio! No se encontraron issues.
```
## Ejemplos de Correcciones Comunes
### Uninitialized variable
```cpp
// ❌ Antes
int velocity;
if (condition) {
velocity = 10;
}
use(velocity); // Error: puede estar no inicializada
// ✅ Después
int velocity{0}; // Inicializar en declaración
if (condition) {
velocity = 10;
}
use(velocity);
```
### Memory leak
```cpp
// ❌ Antes
void loadTexture() {
texture_ = new SDL_Texture(...);
if (error) return; // Leak si hay error después
}
// ✅ Después
void loadTexture() {
auto temp = std::make_unique<SDL_Texture>(...)
if (error) return; // RAII - se libera automáticamente
texture_ = std::move(temp);
}
```
### Null pointer dereference
```cpp
// ❌ Antes
Player* player = getPlayer();
player->update(); // Puede ser nullptr
// ✅ Después
Player* player = getPlayer();
if (player != nullptr) {
player->update();
}
```
## Integración con Workflow
### Cuándo ejecutar:
1. **Después de refactoring** - Verificar que no se introdujeron bugs
2. **Antes de commit** - Análisis `-w` rápido
3. **Antes de PR** - Análisis `-a` completo
4. **Periódicamente** - Análisis `-u` para limpieza de código
### Integración con `/refactor-class`:
El comando `/refactor-class` ejecuta automáticamente:
```bash
tools/linter/run_cppcheck.sh -w --path <archivo_refactorizado>
```
## Notas Importantes
- **Genera archivos de salida** en `tools/linter/cppcheck-result-*.txt`
- **Auto-genera compile_commands.json** si no existe
- **Paralelización automática** usa N-1 cores
- **Suppressions file** excluye external/ y system headers
- **Contexto importa** - Revisar falsos positivos manualmente
- **No modifica código** - Solo reporta, no aplica fixes automáticos
---
**Uso:**
```
/lint-cppcheck
(El comando preguntará qué analizar y qué nivel usar)
O especificar directamente:
/lint-cppcheck source/game/entities/player.cpp
```

View File

@@ -0,0 +1,279 @@
---
description: Refactoriza una clase C++ aplicando buenas prácticas de estilo
---
# Refactor Class Command
Refactoriza una clase C++ siguiendo estas reglas de estilo y buenas prácticas:
## Reglas de Refactorización
### 1. Inicialización de Variables Miembro
- **Inicializar en la declaración** todas las variables "simples" que no tengan dependencias complejas:
- Tipos primitivos: `int`, `float`, `bool`, etc.
- Enumeraciones: valores de enum class
- Valores por defecto conocidos: `0`, `0.0F`, `false`, `nullptr`, etc.
- **NO inicializar en declaración** si:
- Dependen de otros miembros
- Requieren llamadas a funciones complejas
- Son punteros a recursos que necesitan construcción específica
### 2. Structs con Valores por Defecto
- **Todos los miembros de structs** deben tener valores por defecto:
- Tipos primitivos: `int x{0}`, `float y{0.0F}`, `bool flag{false}`
- Strings: `std::string name{}`
- Punteros: `Type* ptr{nullptr}`
- **Ventajas**: Inicialización segura, evita valores indefinidos
### 3. Arrays C-style → std::array
- Convertir **todos** los arrays C-style a `std::array`:
- `Type array[N]``std::array<Type, N> array{}`
- Inicializar con `{}` para zero-initialization
- Agregar `#include <array>` si no existe
- **Ventajas**: type-safety, size(), métodos STL, sin decay a pointer
### 3. Reorganización de la Clase
#### Orden de Secciones
1. **public** (primero)
2. **private** (después)
#### Dentro de cada sección (private principalmente)
1. **Estructuras y enumeraciones** (tipos anidados)
2. **Constantes** (static constexpr)
3. **Métodos** (funciones miembro)
4. **Variables miembro** (al final)
### 4. Agrupación y Comentarios de Métodos
- **En sección public**: Agrupar métodos relacionados funcionalmente
- **Comentarios en línea** (a la derecha) para describir cada método/grupo
- **Formato**: `void method(); // Descripción concisa`
- **Espaciado**: Línea en blanco entre grupos funcionales
**Ejemplo:**
```cpp
public:
static void init(...); // Inicialización singleton
static void destroy(); // Destrucción singleton
static auto get() -> T*; // Acceso al singleton
void render(); // Renderizado
void update(float dt); // Actualización lógica
auto isActive() -> bool; // Consulta estado
```
### 5. Comentarios de Variables
- **Posición**: A la derecha de la variable/grupo
- **Formato**: `// Descripción concisa`
- Agrupar variables relacionadas con un comentario común
### 6. Constructores en Structs
- **Eliminar constructores por defecto redundantes** en structs:
- Si todos los miembros tienen inicialización en declaración
- Y no hay múltiples constructores
- Eliminar `explicit Type() = default;`
- El compilador generará automáticamente un constructor por defecto
**Ejemplo:**
```cpp
struct Data {
int x{0};
std::string name{};
// NO NECESITA: explicit Data() = default;
};
```
### 7. Includes Necesarios
- Agregar includes faltantes según lo que se use
- Mantener orden alfabético si es posible
### 8. Header Guards
- **Usar `#pragma once`** en todas las cabeceras (`.hpp`)
- **NO usar** `#ifndef`/`#define`/`#endif` tradicionales
- `#pragma once` debe ser la primera línea del archivo (antes de includes)
- **Ventajas**: Más simple, menos propenso a errores, ampliamente soportado
## Ejemplo de Aplicación
### Antes:
```cpp
class Example {
private:
struct Data {
std::string name;
int value;
};
int counter_;
bool flag_;
float values_[10];
public:
Example();
void update();
};
// Constructor
Example::Example()
: counter_(0),
flag_(false) {
for (int i = 0; i < 10; ++i) {
values_[i] = 0.0F;
}
}
```
### Después:
```cpp
#pragma once
#include <array>
class Example {
public:
Example() = default; // Ya no necesita inicializar
void update();
private:
// Tipos anidados
struct Data {
std::string name{}; // Nombre con valor por defecto
int value{0}; // Valor inicializado
};
// Variables miembro
int counter_{0}; // Contador de frames
bool flag_{false}; // Estado activo
std::array<float, 10> values_{}; // Buffer de valores
};
```
## Tareas a Realizar
Cuando uses este comando en una clase específica:
1. **Leer** el archivo `.hpp` y `.cpp` correspondiente
2. **Verificar** que la cabecera use `#pragma once` (reemplazar `#ifndef`/`#define`/`#endif` si existen)
3. **Identificar** structs y agregar valores por defecto a todos sus miembros
4. **Identificar** variables que pueden inicializarse en declaración
5. **Identificar** arrays C-style que convertir a std::array
6. **Reorganizar** la estructura de la clase (public/private, agrupación)
7. **Actualizar** el archivo `.cpp` eliminando inicializaciones redundantes
8. **Compilar** para verificar sintaxis correcta
9. **Ejecutar clang-tidy** (análisis, sin --fix) y revisar resultados
10. **Ejecutar cppcheck** (nivel -w) y revisar resultados
11. **Aplicar fixes apropiados** basados en análisis de linters
12. **Recompilar** si se aplicaron fixes
13. **Reportar resumen** al usuario: cambios + hallazgos de linters
## Workflow de Linters (Pasos 9-12)
### Paso 9: Ejecutar clang-tidy
```bash
tools/linter/run_clang-tidy.sh archivo.cpp archivo.hpp
```
**Analizar resultados:**
- Identificar issues críticos (bugprone, cert)
- Separar recomendaciones válidas de falsos positivos
- Ignorar: magic-numbers en game constants, defaults.hpp errors
- Si hay issues críticos, informar al usuario y pausar
- Si solo hay recomendaciones, continuar
### Paso 10: Ejecutar cppcheck
```bash
tools/linter/run_cppcheck.sh -w --path archivo.cpp
```
**Leer archivo de resultados:**
- `tools/linter/cppcheck-result-warning-style-performance.txt`
- Identificar errores críticos (error, nullPointer, uninitvar)
- Separar warnings de style issues
- Filtrar falsos positivos (passedByValue para tipos pequeños, unusedFunction en API pública)
- Si hay errores críticos, informar al usuario y pausar
### Paso 11: Aplicar Fixes
**Si hay issues aplicables:**
1. **Fixes automáticos de clang-tidy** (solo si son seguros):
- modernize-use-auto
- readability-redundant-access-specifiers
- Performance optimizations claras
```bash
tools/linter/run_clang-tidy.sh --fix archivo.cpp archivo.hpp
```
2. **Fixes manuales necesarios:**
- Inicializar variables no inicializadas
- Corregir null pointer issues
- Resolver memory leaks
3. **Documentar cambios** para el reporte final
### Paso 12: Recompilar
Si se aplicaron fixes en paso 11:
```bash
cmake --build build
```
**Verificar:**
- ✅ Compilación exitosa → Continuar a reporte
- ❌ Errores → Informar al usuario, sugerir revisión manual
## Formato de Reporte Final (Paso 13)
```
=== Refactor Completado: ClassName ===
📝 Cambios estructurales:
✅ #pragma once aplicado
✅ 3 structs actualizados con valores por defecto
✅ 12 variables movidas a inicialización en declaración
✅ 2 arrays C-style → std::array
✅ Clase reorganizada (public primero, variables al final)
✅ Constructor simplificado (elimina 12 inicializaciones redundantes)
🔍 Análisis de linters:
clang-tidy:
✅ Sin issues críticos
🟡 3 recomendaciones aplicadas automáticamente:
- Modernize: use auto (2 lugares)
- Readability: redundant specifier (1 lugar)
⚪ 2 opcionales ignorados:
- magic-numbers en game constants
cppcheck:
✅ Sin errores
🟡 2 style issues encontrados:
- Unused variable 'temp' en línea 45 → Eliminada
- Redundant assignment en línea 102 → Corregida
📊 Resultado:
✅ Compilación exitosa
✅ Todos los linters pasan sin issues críticos
✅ Código refactorizado y verificado
💡 Próximos pasos:
- Revisar cambios manualmente
- Ejecutar tests si existen
- Commitear con mensaje descriptivo
```
## Notas Importantes
- **No cambiar lógica**: Solo refactorización estructural
- **Mantener compatibilidad**: std::array usa misma sintaxis [] para acceso
- **Formato consistente**: Respetar estilo del proyecto (comentarios, espaciado)
- **Validar compilación**: Siempre verificar que compile después de cambios
- **Linters integrados**: Análisis automático post-refactor para garantizar calidad
- **Fixes inteligentes**: Solo aplicar --fix de clang-tidy si los cambios son seguros
- **Contexto importa**: Game code tiene patrones legítimos (magic numbers, etc.)
- **Falsos positivos**: Identificar y documentar, no corregir ciegamente

View File

@@ -0,0 +1,21 @@
{
"permissions": {
"allow": [
"Bash(clang-tidy:*)",
"Bash(cat:*)",
"Bash(tools/linter/run_cppcheck.sh:*)",
"Bash(cmake --build:*)",
"Bash(tee:*)",
"Bash(tools/linter/run_clang-tidy.sh:*)",
"Bash(find:*)",
"Bash(for file in source/game/scenes/title.cpp source/game/scenes/game.cpp source/game/entities/player.cpp source/game/options.cpp source/core/rendering/screen.cpp)",
"Bash(do echo \"=== $file ===\")",
"Bash(done)",
"Bash(Xvfb:*)",
"Bash(chmod:*)",
"Bash(timeout:*)"
],
"deny": [],
"ask": []
}
}

8
.gitignore vendored
View File

@@ -1,5 +1,5 @@
.vscode/
*data/config/config.txt
*data/config/config.yaml
*stats.txt
*.DS_Store
thumbs.db
@@ -15,4 +15,8 @@ jaildoctors_dilemma*
todo
build/
linux_utils/
.claude/
source/version.h
resources.pack
jdd_release/
tools/pack_resources/pack_resources
tools/pack_resources/pack_resources.exe

264
CLAUDE.md
View File

@@ -55,9 +55,55 @@ cmake --build build --clean-first
**Important:** The build directory is `/Users/sergio/Gitea/jaildoctors_dilemma/build` and the output executable is placed in the project root directory.
### Linter (clang-tidy)
### Testing in Headless Environment (SSH/Remote Server)
**IMPORTANT:** Always run the linter on specific files, NOT on the entire project, to avoid long execution times and errors in unrelated files.
**IMPORTANT:** When working on a remote server via SSH without a physical display, the game MUST be run using Xvfb (X Virtual Framebuffer) to avoid SDL3 display initialization errors.
#### Required Setup (One-time)
```bash
# Install Xvfb
sudo apt-get install xvfb
```
#### Running the Game in Headless Mode
**Option 1: Using the wrapper script (RECOMMENDED)**
```bash
./run_headless.sh
```
**Option 2: Using xvfb-run directly**
```bash
xvfb-run -a ./jaildoctors_dilemma
```
**Option 3: Custom display configuration**
```bash
xvfb-run -a -s "-screen 0 1280x720x24" ./jaildoctors_dilemma
```
#### Why This Is Critical
- **SDL3 requires a display:** The game uses SDL3 which requires X11/Wayland display
- **No code changes needed:** Xvfb simulates a virtual display without modifying the codebase
- **Full logging:** Console output and logs work normally, essential for debugging resource loading
- **Testing resource loading:** When modifying asset loading code, running with xvfb-run allows seeing all initialization logs
**ALWAYS use xvfb-run when testing on the remote server, especially when:**
- Modifying resource loading code
- Testing asset initialization
- Debugging startup issues
- Verifying configuration changes
### Static Analysis Tools (Linters)
This project uses two complementary static analysis tools for code quality:
#### clang-tidy (Modernization & Best Practices)
**Purpose:** Detects style issues, modernization opportunities, and potential bugs. Best for refactoring and applying C++20 best practices.
**IMPORTANT:** Always run on specific files, NOT on the entire project, to avoid long execution times and errors in unrelated files.
```bash
# Analyze a specific file (RECOMMENDED)
@@ -73,7 +119,80 @@ tools/linter/run_clang-tidy.sh --fix source/game/entities/player.cpp
tools/linter/run_clang-tidy.sh
```
**Note:** Running the linter on the entire project can produce errors in files like `defaults.hpp` that are unrelated to your changes. Always target specific files you're working on.
**Common clang-tidy Checks:**
- `modernize-*`: C++ modernization (use auto, range-for, etc.)
- `readability-*`: Code readability improvements
- `performance-*`: Performance optimizations
- `bugprone-*`: Potential bug detection
**Known False Positives:**
- `defaults.hpp`: May report errors in constant definitions
- `readability-magic-numbers`: Acceptable for game constants (block sizes, speeds, etc.)
- `cppcoreguidelines-avoid-magic-numbers`: Same as above, acceptable in game code
#### cppcheck (Bug Detection & Memory Safety)
**Purpose:** Detects bugs, memory leaks, undefined behavior, and style issues. Complementary to clang-tidy.
```bash
# Warning, style, and performance analysis (RECOMMENDED for daily use)
tools/linter/run_cppcheck.sh -w --path source/game/entities/player.cpp
# Exhaustive analysis (slower, more thorough)
tools/linter/run_cppcheck.sh -a --path source/game/entities/
# Detect unused functions (whole project analysis)
tools/linter/run_cppcheck.sh -u
# Analyze entire project with warning level
tools/linter/run_cppcheck.sh -w
```
**Output:** Results are saved in `tools/linter/cppcheck-result-*.txt`
**Common cppcheck Checks:**
- Memory leaks and resource management
- Null pointer dereferences
- Buffer overflows and array bounds
- Uninitialized variables
- Dead code and unused functions
**Known False Positives:**
- `unusedFunction`: May report false positives for callback functions or public API methods
- `passedByValue`: Acceptable for small types like SDL_FRect in game code
- `constParameter`: Not always applicable for API consistency
#### When to Use Each Tool
| Scenario | Tool | Reason |
|----------|------|--------|
| **Daily refactoring** | clang-tidy | Fast, auto-fixable issues |
| **Before committing** | Both | Comprehensive quality check |
| **After major changes** | cppcheck -a | Deep bug analysis |
| **Hunting memory leaks** | cppcheck | Specialized detection |
| **Code modernization** | clang-tidy --fix | Automatic C++20 upgrades |
#### Best Practices
1. **Run linters after compilation succeeds** - Fix compile errors first
2. **Analyze specific files** - Faster feedback, avoids unrelated errors
3. **Review before applying --fix** - Understand changes before accepting
4. **Context matters** - Game code may legitimately have "magic numbers" for gameplay constants
5. **Use both tools** - They catch different issues and complement each other
6. **Check suppressions file** - `tools/linter/cppcheck_suppressions` excludes external/ and system headers
#### Integration with Development Workflow
When refactoring code (especially with `/refactor-class` command):
1. Make structural changes
2. **Compile** to verify syntax
3. **Run clang-tidy** (without --fix) to identify issues
4. **Run cppcheck -w** to catch bugs
5. Review and fix legitimate issues
6. Apply automatic fixes if appropriate
7. Recompile and test
**Note:** The `/refactor-class` command automatically runs both linters after compilation and provides intelligent analysis of results.
---
@@ -181,6 +300,9 @@ source/
│ └── utils.hpp/cpp # Helper functions (colors, math)
└── main.cpp # Application entry point
config/ # Configuration files
└── assets.yaml # Asset registry (text-based configuration)
data/ # Game assets
├── font/ # Bitmap fonts + descriptors
├── palette/ # Color palettes (.pal files)
@@ -224,8 +346,8 @@ class Screen {
- `Screen` - Rendering, window management, palette/shader effects
- `Input` - Keyboard & gamepad input binding and checking
- `Audio` - Music and sound effect playback
- `Resource` - Asset loading, caching, streaming
- `Asset` - Asset path registry and verification
- `Resource::Cache` - Asset loading, caching, streaming (with error handling)
- `Resource::List` - Asset path registry from assets.yaml (O(1) lookups)
- `Director` - Main application controller
- `Cheevos` - Achievement state management
- `Debug` - Debug information overlay
@@ -331,12 +453,14 @@ struct AnimationData {
main()
Director::Director() [Initialization]
├─ Options::init() - Load game configuration
├─ Asset::init() - Register asset paths
├─ Screen::init() - Create window, SDL renderer
├─ Resource::List::init() - Initialize asset registry singleton
├─ Director::setFileList() - Load assets.yaml configuration (no verification)
├─ Options::loadFromFile() - Load game configuration
├─ Audio::init() - Initialize SDL audio
├─ Screen::init() - Create window, SDL renderer
├─ Input::init() - Bind keyboard/gamepad controls
├─ Resource::init() - Load all game resources
├─ Resource::Cache::init() - Load ALL game resources (with verification)
│ └─ Throws exception if any required asset is missing
└─ Cheevos::init() - Load achievement state
Director::run() [Main loop]
@@ -351,11 +475,11 @@ Director::run() [Main loop]
Director::~Director() [Cleanup]
├─ Options::saveToFile() - Save game settings
├─ Resource::destroy()
├─ Resource::Cache::destroy()
├─ Audio::destroy()
├─ Input::destroy()
├─ Screen::destroy()
└─ Asset::destroy()
└─ Resource::List::destroy()
```
### 4.2 Game Scene Flow (Core Gameplay Loop)
@@ -386,20 +510,27 @@ Game::run() {
```
Director::setFileList()
─ Asset::add(file, type) - Register all assets
└─ Asset::check() - Verify files exist
─ Asset::loadFromFile(config_path, PREFIX, system_folder_)
├─ Read config/assets.yaml - Parse text configuration file
├─ Parse YAML structure: assets grouped by category
├─ Replace variables (${PREFIX}, ${SYSTEM_FOLDER})
└─ Store in unordered_map (O(1) lookup) - Fast asset path retrieval
Game Scene initialization
└─ Resource::init() - Loads all resources
├─ loadSounds() - WAV files
├─ loadMusics() - OGG files
├─ loadSurfaces() - GIF/PNG images
├─ loadAnimations() - .ani animation definitions
├─ loadTileMaps() - .room tilemap data
─ loadRooms() - Room metadata
└─ Resource::Cache::init() - Loads all resources
├─ loadSounds() - WAV files (with error handling)
├─ loadMusics() - OGG files (with error handling)
├─ loadSurfaces() - GIF/PNG images (with error handling)
├─ loadPalettes() - PAL palette files (with error handling)
├─ loadTextFiles() - Font definition files (with error handling)
─ loadAnimations() - YAML animation definitions (with error handling)
└─ loadRooms() - Room YAML files (with error handling)
Note: Asset verification happens during actual loading.
If a required file is missing, Cache::load() throws detailed exception.
During gameplay
└─ Resource::get*(name) - Return cached resource
└─ Resource::Cache::get*(name) - Return cached resource
```
### 4.4 Input Flow
@@ -501,7 +632,7 @@ namespace Options {
inline Stats stats{}; // Game statistics
}
Options::loadFromFile(path); // Load from config.txt
Options::loadFromFile(path); // Load from config.yaml
Options::saveToFile(path); // Save on exit
```
@@ -567,8 +698,8 @@ Achievements trigger notifications on unlock.
| `Screen` | Rendering, window, palette management | Singleton |
| `Input` | Keyboard & gamepad input | Singleton |
| `Audio` | Music and SFX playback | Singleton |
| `Resource` | Asset caching and loading | Singleton |
| `Asset` | Asset path registry | Singleton |
| `Resource::Cache` | Asset caching and loading (with detailed error messages) | Singleton |
| `Resource::List` | Asset path registry from config/assets.yaml, O(1) lookups, variable substitution | Singleton |
| `Debug` | Debug overlay information | Singleton |
| `globalEvents` | Global SDL event handling (quit, device reset, mouse) | Namespace |
@@ -631,12 +762,25 @@ Achievements trigger notifications on unlock.
### Adding Game Assets
1. Place file in `data/` directory
2. Register in `Director::setFileList()`:
```cpp
Asset::get()->add("/data/path/file.ext", AssetType::TYPE);
2. Add entry to `config/assets.yaml` under the appropriate category:
```yaml
assets:
category_name: # e.g., player, enemies, music, etc.
- type: BITMAP
path: ${PREFIX}/data/path/file.ext
```
3. Resource loads automatically during `Resource::init()`
4. Access via: `Resource::get()->getSurface("name")`
Available types: `DATA`, `BITMAP`, `ANIMATION`, `MUSIC`, `SOUND`, `FONT`, `ROOM`, `PALETTE`
3. Optional flags can be added:
```yaml
- type: DATA
path: ${SYSTEM_FOLDER}/file.txt
required: false # Don't fail if missing
absolute: true # Path is absolute
```
4. Resource loads automatically during `Resource::init()`
5. Access via: `Resource::Cache::get()->getSurface("name")`
**Note:** No recompilation needed when adding/removing/modifying assets in `config/assets.yaml`
### Modifying Collision Detection
@@ -692,6 +836,62 @@ In debug builds (`#ifdef DEBUG`), renders:
## 11. File Format Reference
### Asset Configuration File (config/assets.yaml)
YAML-based asset registry with grouped structure:
```yaml
# JailDoctor's Dilemma - Asset Configuration
# Variables: ${PREFIX}, ${SYSTEM_FOLDER}
assets:
# FONTS
fonts:
- type: BITMAP
path: ${PREFIX}/data/font/smb2.gif
- type: FONT
path: ${PREFIX}/data/font/smb2.txt
# PLAYER
player:
- type: BITMAP
path: ${PREFIX}/data/player/player.gif
- type: ANIMATION
path: ${PREFIX}/data/player/player.yaml
# MUSIC
music:
- type: MUSIC
path: ${PREFIX}/data/music/title.ogg
# SYSTEM FILES (optional, absolute paths)
system:
- type: DATA
path: ${SYSTEM_FOLDER}/config.yaml
required: false
absolute: true
```
**Asset Structure:**
- Assets are organized into categories (fonts, palettes, shaders, player, enemies, etc.)
- Each asset entry contains:
- `type` - Asset type (required)
- `path` - File path with variable substitution (required)
- `required` - Whether file must exist (optional, default: `true`)
- `absolute` - Whether path is absolute (optional, default: `false`)
**Available Asset Types:**
- `DATA` - General data files (text, JSON, etc.)
- `BITMAP` - Images (GIF, PNG)
- `ANIMATION` - Animation definition files (.yaml)
- `MUSIC` - Music files (OGG)
- `SOUND` - Sound effects (WAV)
- `FONT` - Font definition files
- `ROOM` - Room data files (.yaml)
- `PALETTE` - Color palette files (.pal)
**Variables:**
- `${PREFIX}` - Replaced with `/../Resources` on macOS bundles, empty otherwise
- `${SYSTEM_FOLDER}` - Replaced with user's system config folder
### Animation Files (.ani)
List of animation names, one per line:
```
@@ -741,9 +941,11 @@ Binary 256-color palette format (256 × 4 bytes RGBA).
- `Player::update()` - Physics and movement
### For Asset Management
- `Asset::add()` - Asset registration
- `config/assets.yaml` - Asset configuration file (text-based, no recompilation needed)
- `Asset::loadFromFile()` - Loads assets from config file
- `Resource::List::get()` - Retrieves asset path (O(1) lookup with unordered_map)
- `Resource::load()` - Asset loading
- `Director::setFileList()` - Complete asset registry
- `Director::setFileList()` - Calls `Asset::loadFromFile()` with PREFIX and system_folder
---

View File

@@ -42,6 +42,7 @@ set(APP_SOURCES
# Core - Input
source/core/input/global_inputs.cpp
source/core/input/input.cpp
source/core/input/input_types.cpp
source/core/input/mouse.cpp
# Core - Rendering
@@ -55,11 +56,13 @@ set(APP_SOURCES
source/core/rendering/texture.cpp
# Core - Resources
source/core/resources/asset.cpp
source/core/resources/resource.cpp
source/core/resources/resource_list.cpp
source/core/resources/resource_cache.cpp
source/core/resources/resource_pack.cpp
source/core/resources/resource_loader.cpp
source/core/resources/resource_helper.cpp
# Core - System
source/core/system/debug.cpp
source/core/system/director.cpp
source/core/system/global_events.cpp
@@ -73,11 +76,16 @@ set(APP_SOURCES
# Game - Gameplay
source/game/gameplay/cheevos.cpp
source/game/gameplay/collision_map.cpp
source/game/gameplay/enemy_manager.cpp
source/game/gameplay/item_manager.cpp
source/game/gameplay/item_tracker.cpp
source/game/gameplay/room.cpp
source/game/gameplay/room_loader.cpp
source/game/gameplay/room_tracker.cpp
source/game/gameplay/scoreboard.cpp
source/game/gameplay/stats.cpp
source/game/gameplay/tilemap_renderer.cpp
# Game - Scenes
source/game/scenes/credits.cpp
@@ -100,22 +108,25 @@ set(APP_SOURCES
source/main.cpp
)
# Fuentes de librerías de terceros
set(EXTERNAL_SOURCES
source/external/jail_audio.cpp
)
# Fuentes del sistema de renderizado
set(RENDERING_SOURCES
source/core/rendering/opengl/opengl_shader.cpp
)
# Fuentes de debug (solo en modo Debug)
set(DEBUG_SOURCES
source/core/system/debug.cpp
)
# Configuración de SDL3
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
message(STATUS "SDL3 encontrado: ${SDL3_INCLUDE_DIRS}")
# --- 2. AÑADIR EJECUTABLE ---
add_executable(${PROJECT_NAME} ${APP_SOURCES} ${EXTERNAL_SOURCES} ${RENDERING_SOURCES})
add_executable(${PROJECT_NAME} ${APP_SOURCES} ${RENDERING_SOURCES})
# Añadir fuentes de debug solo en modo Debug
target_sources(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:${DEBUG_SOURCES}>)
# --- 3. DIRECTORIOS DE INCLUSIÓN ---
target_include_directories(${PROJECT_NAME} PUBLIC
@@ -123,7 +134,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
"${CMAKE_BINARY_DIR}"
)
# Enlazar la librería SDL3
# Enlazar las librerías SDL3
target_link_libraries(${PROJECT_NAME} PRIVATE SDL3::SDL3)
@@ -132,8 +143,9 @@ target_link_libraries(${PROJECT_NAME} PRIVATE SDL3::SDL3)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:RELEASE>:-Os -ffunction-sections -fdata-sections>)
# Definir _DEBUG en modo Debug
# Definir _DEBUG en modo Debug y RELEASE_BUILD en modo Release
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:_DEBUG>)
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:RELEASE>:RELEASE_BUILD>)
# Configuración específica para cada plataforma
if(WIN32)
@@ -159,4 +171,68 @@ if(NOT WIN32)
endif()
# Especificar la ubicación del ejecutable
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
# --- 5. STATIC ANALYSIS TARGETS ---
# Buscar herramientas de análisis estático
find_program(CLANG_TIDY_EXE NAMES clang-tidy)
find_program(CLANG_FORMAT_EXE NAMES clang-format)
# Recopilar todos los archivos fuente para formateo
file(GLOB_RECURSE ALL_SOURCE_FILES
"${CMAKE_SOURCE_DIR}/source/*.cpp"
"${CMAKE_SOURCE_DIR}/source/*.hpp"
"${CMAKE_SOURCE_DIR}/source/*.h"
)
# Excluir directorio external del análisis
list(FILTER ALL_SOURCE_FILES EXCLUDE REGEX ".*/external/.*")
# Para clang-tidy, también excluir jail_audio.hpp
set(CLANG_TIDY_SOURCES ${ALL_SOURCE_FILES})
list(FILTER CLANG_TIDY_SOURCES EXCLUDE REGEX ".*jail_audio\\.hpp$")
# Targets de clang-tidy
if(CLANG_TIDY_EXE)
add_custom_target(tidy
COMMAND ${CLANG_TIDY_EXE}
-p ${CMAKE_BINARY_DIR}
${CLANG_TIDY_SOURCES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running clang-tidy..."
)
add_custom_target(tidy-fix
COMMAND ${CLANG_TIDY_EXE}
-p ${CMAKE_BINARY_DIR}
--fix
${CLANG_TIDY_SOURCES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running clang-tidy with fixes..."
)
else()
message(STATUS "clang-tidy no encontrado - targets 'tidy' y 'tidy-fix' no disponibles")
endif()
# Targets de clang-format
if(CLANG_FORMAT_EXE)
add_custom_target(format
COMMAND ${CLANG_FORMAT_EXE}
-i
${ALL_SOURCE_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running clang-format..."
)
add_custom_target(format-check
COMMAND ${CLANG_FORMAT_EXE}
--dry-run
--Werror
${ALL_SOURCE_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Checking clang-format..."
)
else()
message(STATUS "clang-format no encontrado - targets 'format' y 'format-check' no disponibles")
endif()

22
LICENSE
View File

@@ -1 +1,21 @@
GNU General Public License v3.0 only
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Copyright (c) 2022 JailDoctor's Dilemma
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial — You may not use the material for commercial purposes.
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
To view a copy of this license, visit:
https://creativecommons.org/licenses/by-nc-sa/4.0/
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

458
Makefile
View File

@@ -1,145 +1,401 @@
executable = jaildoctors_dilemma
source = source/*.cpp
appName = JailDoctor's Dilemma
releaseFolder = jdd_release
version = v1.10
# ==============================================================================
# DIRECTORIES
# ==============================================================================
DIR_ROOT := $(dir $(abspath $(MAKEFILE_LIST)))
DIR_SOURCES := $(addsuffix /, $(DIR_ROOT)source)
DIR_BIN := $(addsuffix /, $(DIR_ROOT))
DIR_TOOLS := $(addsuffix /, $(DIR_ROOT)tools)
# Release names
windowsRelease = $(executable)-$(version)-win32-x64.zip
macosIntelRelease = $(executable)-$(version)-macos-intel.dmg
macosAppleSiliconRelease = $(executable)-$(version)-macos-apple-silicon.dmg
linuxRelease = $(executable)-$(version)-linux.tar.gz
# ==============================================================================
# TARGET NAMES
# ==============================================================================
TARGET_NAME := jaildoctors_dilemma
TARGET_FILE := $(DIR_BIN)$(TARGET_NAME)
APP_NAME := JailDoctor's Dilemma
RELEASE_FOLDER := jdd_release
RELEASE_FILE := $(RELEASE_FOLDER)/$(TARGET_NAME)
RESOURCE_FILE := release/jdd.res
# Specify the C++ standard
cpp_standard = c++20
# ==============================================================================
# PACKING TOOL
# ==============================================================================
ifeq ($(OS),Windows_NT)
PACK_TOOL := $(DIR_TOOLS)pack_resources/pack_resources.exe
PACK_CXX := $(CXX)
else
PACK_TOOL := $(DIR_TOOLS)pack_resources/pack_resources
PACK_CXX := $(CXX)
endif
PACK_SOURCES := $(DIR_TOOLS)pack_resources/pack_resources.cpp source/core/resources/resource_pack.cpp
PACK_INCLUDES := -Isource
# ==============================================================================
# VERSION (extracted from defines.hpp)
# ==============================================================================
ifeq ($(OS),Windows_NT)
VERSION := v$(shell powershell -Command "(Select-String -Path 'source/utils/defines.hpp' -Pattern 'constexpr const char\* VERSION = \"(.+?)\"').Matches.Groups[1].Value")
else
VERSION := v$(shell grep 'constexpr const char\* VERSION' source/utils/defines.hpp | sed -E 's/.*VERSION = "([^"]+)".*/\1/')
endif
# ==============================================================================
# WINDOWS-SPECIFIC VARIABLES
# ==============================================================================
ifeq ($(OS),Windows_NT)
WIN_TARGET_FILE := $(DIR_BIN)$(APP_NAME)
WIN_RELEASE_FILE := $(RELEASE_FOLDER)/$(APP_NAME)
else
WIN_TARGET_FILE := $(TARGET_FILE)
WIN_RELEASE_FILE := $(RELEASE_FILE)
endif
# ==============================================================================
# RELEASE NAMES
# ==============================================================================
WINDOWS_RELEASE := $(TARGET_NAME)-$(VERSION)-win32-x64.zip
MACOS_INTEL_RELEASE := $(TARGET_NAME)-$(VERSION)-macos-intel.dmg
MACOS_APPLE_SILICON_RELEASE := $(TARGET_NAME)-$(VERSION)-macos-apple-silicon.dmg
LINUX_RELEASE := $(TARGET_NAME)-$(VERSION)-linux.tar.gz
# ==============================================================================
# SOURCE FILES
# ==============================================================================
APP_SOURCES := \
source/main.cpp \
source/core/audio/audio.cpp \
source/core/input/input.cpp \
source/core/input/input_types.cpp \
source/core/input/mouse.cpp \
source/core/input/global_inputs.cpp \
source/core/rendering/screen.cpp \
source/core/rendering/surface.cpp \
source/core/rendering/surface_sprite.cpp \
source/core/rendering/surface_animated_sprite.cpp \
source/core/rendering/surface_moving_sprite.cpp \
source/core/rendering/text.cpp \
source/core/rendering/texture.cpp \
source/core/rendering/gif.cpp \
source/core/rendering/opengl/opengl_shader.cpp \
source/core/resources/resource_list.cpp \
source/core/resources/resource_cache.cpp \
source/core/resources/resource_helper.cpp \
source/core/resources/resource_loader.cpp \
source/core/resources/resource_pack.cpp \
source/core/system/director.cpp \
source/core/system/debug.cpp \
source/core/system/global_events.cpp \
source/game/options.cpp \
source/game/entities/player.cpp \
source/game/entities/enemy.cpp \
source/game/entities/item.cpp \
source/game/gameplay/room.cpp \
source/game/gameplay/collision_map.cpp \
source/game/gameplay/enemy_manager.cpp \
source/game/gameplay/item_manager.cpp \
source/game/gameplay/room_loader.cpp \
source/game/gameplay/tilemap_renderer.cpp \
source/game/gameplay/scoreboard.cpp \
source/game/gameplay/cheevos.cpp \
source/game/gameplay/item_tracker.cpp \
source/game/gameplay/room_tracker.cpp \
source/game/gameplay/stats.cpp \
source/game/scenes/logo.cpp \
source/game/scenes/loading_screen.cpp \
source/game/scenes/title.cpp \
source/game/scenes/game.cpp \
source/game/scenes/game_over.cpp \
source/game/scenes/ending.cpp \
source/game/scenes/ending2.cpp \
source/game/scenes/credits.cpp \
source/game/ui/notifier.cpp \
source/utils/utils.cpp \
source/utils/delta_timer.cpp
# All sources combined
ALL_SOURCES := $(APP_SOURCES)
# ==============================================================================
# INCLUDES
# ==============================================================================
INCLUDES := -Isource
# ==============================================================================
# COMPILER FLAGS (OS-specific)
# ==============================================================================
CPP_STANDARD := c++20
ifeq ($(OS),Windows_NT)
FixPath = $(subst /,\\,$1)
CXXFLAGS := -std=$(CPP_STANDARD) -Wall -Os -ffunction-sections -fdata-sections \
-Wl,--gc-sections -static-libstdc++ -static-libgcc \
-Wl,-subsystem,windows -DWINDOWS_BUILD
CXXFLAGS_DEBUG := -std=$(CPP_STANDARD) -Wall -g -D_DEBUG -DWINDOWS_BUILD
LDFLAGS := -lmingw32 -lws2_32 -lSDL3 -lopengl32
RM := del /Q
MKDIR := mkdir
else
FixPath = $1
CXXFLAGS := -std=$(CPP_STANDARD) -Wall -Os -ffunction-sections -fdata-sections
CXXFLAGS_DEBUG := -std=$(CPP_STANDARD) -Wall -g -D_DEBUG
LDFLAGS := -lSDL3
RMFILE := rm -f
RMDIR := rm -rdf
MKDIR := mkdir -p
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
CXXFLAGS += -DLINUX_BUILD
LDFLAGS += -lGL
endif
ifeq ($(UNAME_S),Darwin)
CXXFLAGS += -Wno-deprecated -DMACOS_BUILD
CXXFLAGS_DEBUG += -Wno-deprecated -DMACOS_BUILD
LDFLAGS += -framework OpenGL
# Configurar arquitectura (por defecto arm64)
CXXFLAGS += -arch arm64
CXXFLAGS_DEBUG += -arch arm64
endif
endif
# ==============================================================================
# REGLAS PARA HERRAMIENTA DE EMPAQUETADO Y RESOURCES.PACK
# ==============================================================================
$(PACK_TOOL): FORCE
@echo "Compilando herramienta de empaquetado..."
$(PACK_CXX) -std=$(CPP_STANDARD) -Wall -Os $(PACK_INCLUDES) $(PACK_SOURCES) -o $(PACK_TOOL)
@echo "✓ Herramienta de empaquetado lista: $(PACK_TOOL)"
pack_tool: $(PACK_TOOL)
resources.pack: $(PACK_TOOL)
@echo "Generando resources.pack desde directorio data/..."
$(PACK_TOOL) data resources.pack
@echo "✓ resources.pack generado exitosamente"
# ==============================================================================
# COMPILACIÓN PARA WINDOWS
# ==============================================================================
windows:
@echo off
g++ $(source) -std=$(cpp_standard) -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable).exe"
strip -s -R .comment -R .gnu.version "$(executable).exe" --strip-unneeded
@echo Compilando para Windows con nombre: "$(WIN_TARGET_FILE).exe"
windres release/jdd.rc -O coff -o $(RESOURCE_FILE)
g++ $(ALL_SOURCES) $(RESOURCE_FILE) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(WIN_TARGET_FILE).exe"
strip -s -R .comment -R .gnu.version "$(WIN_TARGET_FILE).exe" --strip-unneeded
windows_debug:
@echo off
g++ $(source) -D DEBUG -std=$(cpp_standard) -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable)_debug.exe"
strip -s -R .comment -R .gnu.version "$(executable)_debug.exe" --strip-unneeded
@echo Compilando version debug para Windows: "$(WIN_TARGET_FILE)_debug.exe"
g++ $(ALL_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(WIN_TARGET_FILE)_debug.exe"
windows_release:
@$(MAKE) pack_tool
@$(MAKE) resources.pack
@echo off
@echo Creando release para Windows - Version: $(VERSION)
# Create release folder
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
powershell if (-not (Test-Path "$(releaseFolder)")) {New-Item "$(releaseFolder)" -ItemType Directory}
# Generate version.h from version.h.in
@echo "Generando version.h..."
@powershell -Command "$$GIT_HASH = (git rev-parse --short=7 HEAD 2>$$null); if (-not $$GIT_HASH) { $$GIT_HASH = 'unknown' }; (Get-Content source/version.h.in) -replace '@GIT_HASH@', $$GIT_HASH | Set-Content source/version.h"
# Prepare data folder
powershell Copy-Item -Path "data" -Destination "$(releaseFolder)" -recurse -Force
powershell if (Test-Path "$(releaseFolder)\data\room\map.world") {Remove-Item "$(releaseFolder)\data\room\map.world" -Recurse -Force}
powershell if (Test-Path "$(releaseFolder)\data\room\standard.tsx") {Remove-Item "$(releaseFolder)\data\room\standard.tsx" -Recurse -Force}
# Copy root files
powershell Copy-Item "LICENSE" -Destination "$(releaseFolder)"
powershell Copy-Item "README.md" -Destination "$(releaseFolder)"
powershell Copy-Item "release\*.dll" -Destination "$(releaseFolder)"
# Crea carpeta temporal 'RELEASE_FOLDER'
powershell if (Test-Path "$(RELEASE_FOLDER)") {Remove-Item "$(RELEASE_FOLDER)" -Recurse -Force}
powershell if (-not (Test-Path "$(RELEASE_FOLDER)")) {New-Item "$(RELEASE_FOLDER)" -ItemType Directory}
# Build
g++ $(source) -std=$(cpp_standard) -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -lopengl32 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded
# Copia el archivo 'resources.pack'
powershell Copy-Item -Path "resources.pack" -Destination "$(RELEASE_FOLDER)"
# Create ZIP
powershell if (Test-Path $(windowsRelease)) {Remove-Item $(windowsRelease)}
powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(windowsRelease)
# Copia los ficheros que están en la raíz del proyecto
powershell Copy-Item "LICENSE" -Destination "$(RELEASE_FOLDER)"
powershell Copy-Item "README.md" -Destination "$(RELEASE_FOLDER)"
powershell Copy-Item "gamecontrollerdb.txt" -Destination "$(RELEASE_FOLDER)"
powershell Copy-Item "release\*.dll" -Destination "$(RELEASE_FOLDER)"
# Remove folder
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
# Compila (con icono)
windres release/jdd.rc -O coff -o $(RESOURCE_FILE)
g++ $(ALL_SOURCES) $(RESOURCE_FILE) $(INCLUDES) -DRELEASE_BUILD $(CXXFLAGS) $(LDFLAGS) -o "$(WIN_RELEASE_FILE).exe"
strip -s -R .comment -R .gnu.version "$(WIN_RELEASE_FILE).exe" --strip-unneeded
# Crea el fichero .zip
powershell if (Test-Path "$(WINDOWS_RELEASE)") {Remove-Item "$(WINDOWS_RELEASE)"}
powershell Compress-Archive -Path "$(RELEASE_FOLDER)"/* -DestinationPath "$(WINDOWS_RELEASE)"
@echo Release creado: $(WINDOWS_RELEASE)
# Elimina la carpeta temporal 'RELEASE_FOLDER'
powershell if (Test-Path "$(RELEASE_FOLDER)") {Remove-Item "$(RELEASE_FOLDER)" -Recurse -Force}
# ==============================================================================
# COMPILACIÓN PARA MACOS
# ==============================================================================
macos:
clang++ $(source) -std=$(cpp_standard) -Wall -Os -lSDL2 -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(executable)"
@echo "Compilando para macOS: $(TARGET_NAME)"
clang++ $(ALL_SOURCES) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
macos_debug:
clang++ $(source) -D DEBUG -std=$(cpp_standard) -Wall -Os -lSDL2 -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(executable)_debug"
@echo "Compilando version debug para macOS: $(TARGET_NAME)_debug"
clang++ $(ALL_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
macos_release:
# Remove data and possible data from previous builds
rm -rdf "$(releaseFolder)"
rm -rdf Frameworks
rm -f tmp.dmg
rm -f "$(macosIntelRelease)"
rm -f "$(macosAppleSiliconRelease)"
@$(MAKE) pack_tool
@$(MAKE) resources.pack
@echo "Creando release para macOS - Version: $(VERSION)"
# Create folders
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Frameworks"
mkdir -p "$(releaseFolder)/$(appName).app/Contents/MacOS"
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Resources"
mkdir -p Frameworks
# Verificar e instalar create-dmg si es necesario
@which create-dmg > /dev/null || (echo "Instalando create-dmg..." && brew install create-dmg)
# Copy folders
cp -R data "$(releaseFolder)/$(appName).app/Contents/Resources"
cp -R release/SDL2.framework "$(releaseFolder)/$(appName).app/Contents/Frameworks"
cp -R release/SDL2.framework Frameworks
# Generate version.h from version.h.in
@echo "Generando version.h..."
@GIT_HASH=$$(git rev-parse --short=7 HEAD 2>/dev/null || echo "unknown"); \
sed "s/@GIT_HASH@/$$GIT_HASH/g" source/version.h.in > source/version.h
# Delete data
rm -f "$(releaseFolder)/$(appName).app/Contents/Resources/data/room/map.world"
rm -f "$(releaseFolder)/$(appName).app/Contents/Resources/data/room/standard.tsx"
# Elimina datos de compilaciones anteriores
$(RMDIR) "$(RELEASE_FOLDER)"
$(RMDIR) Frameworks
$(RMFILE) tmp.dmg
$(RMFILE) "$(MACOS_INTEL_RELEASE)"
$(RMFILE) "$(MACOS_APPLE_SILICON_RELEASE)"
# Copy files
cp release/*.icns "$(releaseFolder)/$(appName).app/Contents/Resources"
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
cp LICENSE "$(releaseFolder)"
cp README.md "$(releaseFolder)"
# Crea la carpeta temporal para hacer el trabajo y las carpetas obligatorias para crear una app de macOS
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks"
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS"
$(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
$(MKDIR) Frameworks
# Create links
ln -s /Applications "$(releaseFolder)"/Applications
# Copia carpetas y ficheros
cp resources.pack "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
cp gamecontrollerdb.txt "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
cp -R release/frameworks/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks"
cp -R release/frameworks/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework Frameworks
cp release/*.icns "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources"
cp release/Info.plist "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents"
cp LICENSE "$(RELEASE_FOLDER)"
cp README.md "$(RELEASE_FOLDER)"
# Build INTEL
clang++ $(source) -D MACOS_BUNDLE -std=$(cpp_standard) -Wall -Os -framework SDL2 -F ./Frameworks -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.15
# Actualiza versión en Info.plist
@echo "Actualizando Info.plist con versión $(VERSION)..."
@RAW_VERSION=$$(echo "$(VERSION)" | sed 's/^v//'); \
sed -i '' '/<key>CFBundleShortVersionString<\/key>/{n;s|<string>.*</string>|<string>'"$$RAW_VERSION"'</string>|;}' "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Info.plist"; \
sed -i '' '/<key>CFBundleVersion<\/key>/{n;s|<string>.*</string>|<string>'"$$RAW_VERSION"'</string>|;}' "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Info.plist"
# Build INTEL DMG
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
hdiutil convert tmp.dmg -format UDZO -o "$(macosIntelRelease)"
rm -f tmp.dmg
# Compila la versión para procesadores Intel
clang++ $(ALL_SOURCES) $(INCLUDES) -DMACOS_BUNDLE -DRELEASE_BUILD -std=$(CPP_STANDARD) -Wall -Os -framework SDL3 -F ./Frameworks -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.15
# Build APPLE SILICON
clang++ $(source) -D MACOS_BUNDLE -std=$(cpp_standard) -Wall -Os -framework SDL2 -F ./Frameworks -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
# Firma la aplicación
codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app"
# Build APPLE SILICON DMG
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)"
rm -f tmp.dmg
# Empaqueta el .dmg de la versión Intel con create-dmg
@echo "Creando DMG Intel con iconos de 96x96..."
create-dmg \
--volname "$(APP_NAME)" \
--window-pos 200 120 \
--window-size 720 300 \
--icon-size 96 \
--text-size 12 \
--icon "$(APP_NAME).app" 278 102 \
--icon "LICENSE" 441 102 \
--icon "README.md" 604 102 \
--app-drop-link 115 102 \
--hide-extension "$(APP_NAME).app" \
"$(MACOS_INTEL_RELEASE)" \
"$(RELEASE_FOLDER)" || true
@echo "Release Intel creado: $(MACOS_INTEL_RELEASE)"
# Remove data
rm -rdf Frameworks
rm -rdf "$(releaseFolder)"
# Compila la versión para procesadores Apple Silicon
clang++ $(ALL_SOURCES) $(INCLUDES) -DMACOS_BUNDLE -DRELEASE_BUILD -std=$(CPP_STANDARD) -Wall -Os -framework SDL3 -F ./Frameworks -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
# Firma la aplicación
codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app"
# Empaqueta el .dmg de la versión Apple Silicon con create-dmg
@echo "Creando DMG Apple Silicon con iconos de 96x96..."
create-dmg \
--volname "$(APP_NAME)" \
--window-pos 200 120 \
--window-size 720 300 \
--icon-size 96 \
--text-size 12 \
--icon "$(APP_NAME).app" 278 102 \
--icon "LICENSE" 441 102 \
--icon "README.md" 604 102 \
--app-drop-link 115 102 \
--hide-extension "$(APP_NAME).app" \
"$(MACOS_APPLE_SILICON_RELEASE)" \
"$(RELEASE_FOLDER)" || true
@echo "Release Apple Silicon creado: $(MACOS_APPLE_SILICON_RELEASE)"
# Elimina las carpetas temporales
$(RMDIR) Frameworks
$(RMDIR) "$(RELEASE_FOLDER)"
# ==============================================================================
# COMPILACIÓN PARA LINUX
# ==============================================================================
linux:
g++ $(source) -std=$(cpp_standard) -Wall -Os -lSDL2 -lGL -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)"
strip -s -R .comment -R .gnu.version "$(executable)" --strip-unneeded
@echo "Compilando para Linux: $(TARGET_NAME)"
g++ $(ALL_SOURCES) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o "$(TARGET_FILE)"
strip -s -R .comment -R .gnu.version "$(TARGET_FILE)" --strip-unneeded
linux_debug:
g++ $(source) -D DEBUG -std=$(cpp_standard) -Wall -Os -lSDL2 -lGL -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)_debug"
strip -s -R .comment -R .gnu.version "$(executable)_debug" --strip-unneeded
@echo "Compilando version debug para Linux: $(TARGET_NAME)_debug"
g++ $(ALL_SOURCES) $(INCLUDES) -DDEBUG -DVERBOSE $(CXXFLAGS_DEBUG) $(LDFLAGS) -o "$(TARGET_FILE)_debug"
linux_release:
# Remove data
rm -rdf "$(releaseFolder)"
@$(MAKE) pack_tool
@$(MAKE) resources.pack
@echo "Creando release para Linux - Version: $(VERSION)"
# Create folders
mkdir -p "$(releaseFolder)"
# Generate version.h from version.h.in
@echo "Generando version.h..."
@GIT_HASH=$$(git rev-parse --short=7 HEAD 2>/dev/null || echo "unknown"); \
sed "s/@GIT_HASH@/$$GIT_HASH/g" source/version.h.in > source/version.h
# Copy data
cp -R data "$(releaseFolder)"
cp LICENSE "$(releaseFolder)"
cp README.md "$(releaseFolder)"
# Elimina carpetas previas
$(RMDIR) "$(RELEASE_FOLDER)"
# Delete data
rm -f "$(releaseFolder)/data/room/map.world"
rm -f "$(releaseFolder)/data/room/standard.tsx"
# Crea la carpeta temporal para realizar el lanzamiento
$(MKDIR) "$(RELEASE_FOLDER)"
# Build
g++ $(source) -std=$(cpp_standard) -Wall -Os -lSDL2 -lGL -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(releaseFolder)/$(executable)"
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable)" --strip-unneeded
# Copia ficheros
cp resources.pack "$(RELEASE_FOLDER)"
cp LICENSE "$(RELEASE_FOLDER)"
cp README.md "$(RELEASE_FOLDER)"
cp gamecontrollerdb.txt "$(RELEASE_FOLDER)"
# Pack files
rm -f "$(linuxRelease)"
cd "$(releaseFolder)" && tar -czvf "../$(linuxRelease)" *
# Compila
g++ $(ALL_SOURCES) $(INCLUDES) -DRELEASE_BUILD $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FILE)"
strip -s -R .comment -R .gnu.version "$(RELEASE_FILE)" --strip-unneeded
# Remove data
rm -rdf "$(releaseFolder)"
# Empaqueta ficheros
$(RMFILE) "$(LINUX_RELEASE)"
tar -czvf "$(LINUX_RELEASE)" -C "$(RELEASE_FOLDER)" .
@echo "Release creado: $(LINUX_RELEASE)"
# Elimina la carpeta temporal
$(RMDIR) "$(RELEASE_FOLDER)"
# ==============================================================================
# REGLAS ESPECIALES
# ==============================================================================
# Regla para mostrar la versión actual
show_version:
@echo "Version actual: $(VERSION)"
# Regla de ayuda
help:
@echo "Makefile para JailDoctor's Dilemma"
@echo "Comandos disponibles:"
@echo " windows - Compilar para Windows"
@echo " windows_debug - Compilar debug para Windows"
@echo " windows_release - Crear release completo para Windows"
@echo " linux - Compilar para Linux"
@echo " linux_debug - Compilar debug para Linux"
@echo " linux_release - Crear release completo para Linux"
@echo " macos - Compilar para macOS"
@echo " macos_debug - Compilar debug para macOS"
@echo " macos_release - Crear release completo para macOS"
@echo " pack_tool - Compilar herramienta de empaquetado"
@echo " resources.pack - Generar pack de recursos desde data/"
@echo " show_version - Mostrar version actual ($(VERSION))"
@echo " help - Mostrar esta ayuda"
FORCE:
.PHONY: windows windows_debug windows_release macos macos_debug macos_release linux linux_debug linux_release pack_tool resources.pack show_version help

View File

@@ -1,6 +1,8 @@
# JailDoctor's Dilemma
<div align="center">
<img src="https://php.sustancia.synology.me/images/jdd/jaildoctors_dilemma_cover_web.png" width="600" alt="JailDoctor's Dilemma Cover">
</div>
<img src="https://php.sustancia.synology.me/images/jdd/jaildoctors_dilemma_cover_web.png" width="300" align="left" style="margin-right: 20px; margin-bottom: 10px;" alt="JailDoctor's Dilemma Cover">
# JailDoctor's Dilemma
JailDoc és un Jailer. Als Jailers els agrada començar projectes. A ningú li agrada acabar-los. Els Jailers viuen a la Jail. A la Jail s'hi va a començar projectes. A la Jail s'hi va a ensenyar els projectes. A la Jail s'hi va a aprendre com començar nous projectes. A la Jail s'hi va a ajudar els companys a començar nous projectes.
@@ -28,21 +30,25 @@ Quan hages recuperat la major part de les peces, dirigeix-te a la Jail per mostr
El joc permet tant l'ús del teclat com d'un comandament. Les tecles per a jugar són les següents:
- **Cursors**: Per moure's a l'esquerra o dreta i per saltar. Es poden modificar les tecles en el fitxer de configuració, triant entre aquestes opcions:
- O, P per moure's i Q per saltar.
- A, D per moure's i W per saltar.
| Tecla | Acció |
|-------|-------|
| **←, →** | Moure's a l'esquerra o dreta |
| **↑** | Saltar |
| **Enter** | Eixir dels projectes |
| **ESC** | Cancelar / Eixir del joc |
| **F1** | Disminuir la mida de la finestra |
| **F2** | Augmentar la mida de la finestra |
| **F3** | Alternar pantalla completa |
| **F4** | Activar/desactivar els shaders |
| **F5** | Següent paleta de colors |
| **F6** | Paleta de colors anterior |
| **F7** | Activar/desactivar l'escalat exacte |
| **F8** | Activar/desactivar la música |
| **F9** | Activar/desactivar el marge de colors |
| **F10** | Activar/desactivar VSync |
| **F11** | Pausar el joc |
- **Tecla M**: Activa o desactiva la música.
- **Tecla P**: Pausa el joc.
- **Tecla ESC**: Ix del joc si estàs jugant. Tanca el programa en qualsevol altra circumstància.
- **Tecla F1**: Disminueix la mida de la finestra.
- **Tecla F2**: Augmenta la mida de la finestra.
- **Tecla F3**: Alterna entre el mode de pantalla completa i el mode finestra.
- **Tecla F4**: Activa o desactiva els shaders.
- **Tecla F5**: Estableix la següent paleta de colors.
- **Tecla F6**: Estableix la paleta de colors prèvia.
- **Tecla F7**: Activa o desactiva el escalat exacte.
- **Tecla B**: Activa o desactiva el marge de colors.
**Nota:** Les tecles de moviment (←, →, ↑) es poden redefinir des del menú del joc.
![JailDoctor's Dilemma - Gameplay](https://php.sustancia.synology.me/images/jdd/jdd_game2.png)
@@ -54,9 +60,9 @@ El programa guarda automàticament la configuració del mode de vídeo i les est
- **Windows**: `C:\Users\<nom_d'usuari>\AppData\Roaming\jailgames\jaildoctors_dilemma`
- **MacOS**: `~/Library/Application Support/jailgames/jaildoctors_dilemma`
- **Linux**: `~/.jailgames/jaildoctors_dilemma`
- **Linux**: `~/.config/jailgames/jaildoctors_dilemma`
Dins de la carpeta es troba el fitxer de configuració `config.txt`, on es pot modificar la configuració per connectar-se al servei en línia, i els fitxers `stats.csv` i `stats_buffer.csv`, que contenen informació sobre les estadístiques del joc.
Dins de la carpeta es troba el fitxer de configuració `config.yaml`, on es pot modificar la configuració per connectar-se al servei en línia, i els fitxers `stats.csv` i `stats_buffer.csv`, que contenen informació sobre les estadístiques del joc.
---

592
config/assets.yaml Normal file
View File

@@ -0,0 +1,592 @@
# JailDoctor's Dilemma - Asset Configuration
# Variables: ${PREFIX}, ${SYSTEM_FOLDER}
assets:
# FONTS
fonts:
- type: BITMAP
path: ${PREFIX}/data/font/smb2.gif
- type: FONT
path: ${PREFIX}/data/font/smb2.txt
- type: BITMAP
path: ${PREFIX}/data/font/aseprite.gif
- type: FONT
path: ${PREFIX}/data/font/aseprite.txt
- type: BITMAP
path: ${PREFIX}/data/font/gauntlet.gif
- type: FONT
path: ${PREFIX}/data/font/gauntlet.txt
- type: BITMAP
path: ${PREFIX}/data/font/subatomic.gif
- type: FONT
path: ${PREFIX}/data/font/subatomic.txt
- type: BITMAP
path: ${PREFIX}/data/font/8bithud.gif
- type: FONT
path: ${PREFIX}/data/font/8bithud.txt
# PALETTES
palettes:
- type: PALETTE
path: ${PREFIX}/data/palette/zx-spectrum.pal
- type: PALETTE
path: ${PREFIX}/data/palette/zx-spectrum-adjusted.pal
- type: PALETTE
path: ${PREFIX}/data/palette/zxarne-5-2.pal
- type: PALETTE
path: ${PREFIX}/data/palette/black-and-white.pal
- type: PALETTE
path: ${PREFIX}/data/palette/green-phosphor.pal
- type: PALETTE
path: ${PREFIX}/data/palette/orange-screen.pal
- type: PALETTE
path: ${PREFIX}/data/palette/ruzx-spectrum.pal
- type: PALETTE
path: ${PREFIX}/data/palette/ruzx-spectrum-revision-2.pal
- type: PALETTE
path: ${PREFIX}/data/palette/pico-8.pal
- type: PALETTE
path: ${PREFIX}/data/palette/sweetie-16.pal
- type: PALETTE
path: ${PREFIX}/data/palette/island-joy-16.pal
- type: PALETTE
path: ${PREFIX}/data/palette/lost-century.pal
- type: PALETTE
path: ${PREFIX}/data/palette/na16.pal
- type: PALETTE
path: ${PREFIX}/data/palette/steam-lords.pal
# SHADERS
shaders:
- type: DATA
path: ${PREFIX}/data/shaders/crtpi_vertex.glsl
- type: DATA
path: ${PREFIX}/data/shaders/crtpi_fragment.glsl
- type: DATA
path: ${PREFIX}/data/shaders/crtpi_vertex_es.glsl
- type: DATA
path: ${PREFIX}/data/shaders/crtpi_fragment_es.glsl
# INPUT
input:
- type: DATA
path: ${PREFIX}/gamecontrollerdb.txt
# SYSTEM
system:
- type: DATA
path: ${SYSTEM_FOLDER}/config.yaml
required: false
absolute: true
- type: DATA
path: ${SYSTEM_FOLDER}/stats_buffer.csv
required: false
absolute: true
- type: DATA
path: ${SYSTEM_FOLDER}/stats.csv
required: false
absolute: true
- type: DATA
path: ${SYSTEM_FOLDER}/cheevos.bin
required: false
absolute: true
# ROOMS
rooms:
- type: ROOM
path: ${PREFIX}/data/room/01.yaml
- type: ROOM
path: ${PREFIX}/data/room/02.yaml
- type: ROOM
path: ${PREFIX}/data/room/03.yaml
- type: ROOM
path: ${PREFIX}/data/room/04.yaml
- type: ROOM
path: ${PREFIX}/data/room/05.yaml
- type: ROOM
path: ${PREFIX}/data/room/06.yaml
- type: ROOM
path: ${PREFIX}/data/room/07.yaml
- type: ROOM
path: ${PREFIX}/data/room/08.yaml
- type: ROOM
path: ${PREFIX}/data/room/09.yaml
- type: ROOM
path: ${PREFIX}/data/room/10.yaml
- type: ROOM
path: ${PREFIX}/data/room/11.yaml
- type: ROOM
path: ${PREFIX}/data/room/12.yaml
- type: ROOM
path: ${PREFIX}/data/room/13.yaml
- type: ROOM
path: ${PREFIX}/data/room/14.yaml
- type: ROOM
path: ${PREFIX}/data/room/15.yaml
- type: ROOM
path: ${PREFIX}/data/room/16.yaml
- type: ROOM
path: ${PREFIX}/data/room/17.yaml
- type: ROOM
path: ${PREFIX}/data/room/18.yaml
- type: ROOM
path: ${PREFIX}/data/room/19.yaml
- type: ROOM
path: ${PREFIX}/data/room/20.yaml
- type: ROOM
path: ${PREFIX}/data/room/21.yaml
- type: ROOM
path: ${PREFIX}/data/room/22.yaml
- type: ROOM
path: ${PREFIX}/data/room/23.yaml
- type: ROOM
path: ${PREFIX}/data/room/24.yaml
- type: ROOM
path: ${PREFIX}/data/room/25.yaml
- type: ROOM
path: ${PREFIX}/data/room/26.yaml
- type: ROOM
path: ${PREFIX}/data/room/27.yaml
- type: ROOM
path: ${PREFIX}/data/room/28.yaml
- type: ROOM
path: ${PREFIX}/data/room/29.yaml
- type: ROOM
path: ${PREFIX}/data/room/30.yaml
- type: ROOM
path: ${PREFIX}/data/room/31.yaml
- type: ROOM
path: ${PREFIX}/data/room/32.yaml
- type: ROOM
path: ${PREFIX}/data/room/33.yaml
- type: ROOM
path: ${PREFIX}/data/room/34.yaml
- type: ROOM
path: ${PREFIX}/data/room/35.yaml
- type: ROOM
path: ${PREFIX}/data/room/36.yaml
- type: ROOM
path: ${PREFIX}/data/room/37.yaml
- type: ROOM
path: ${PREFIX}/data/room/38.yaml
- type: ROOM
path: ${PREFIX}/data/room/39.yaml
- type: ROOM
path: ${PREFIX}/data/room/40.yaml
- type: ROOM
path: ${PREFIX}/data/room/41.yaml
- type: ROOM
path: ${PREFIX}/data/room/42.yaml
- type: ROOM
path: ${PREFIX}/data/room/43.yaml
- type: ROOM
path: ${PREFIX}/data/room/44.yaml
- type: ROOM
path: ${PREFIX}/data/room/45.yaml
- type: ROOM
path: ${PREFIX}/data/room/46.yaml
- type: ROOM
path: ${PREFIX}/data/room/47.yaml
- type: ROOM
path: ${PREFIX}/data/room/48.yaml
- type: ROOM
path: ${PREFIX}/data/room/49.yaml
- type: ROOM
path: ${PREFIX}/data/room/50.yaml
- type: ROOM
path: ${PREFIX}/data/room/51.yaml
- type: ROOM
path: ${PREFIX}/data/room/52.yaml
- type: ROOM
path: ${PREFIX}/data/room/53.yaml
- type: ROOM
path: ${PREFIX}/data/room/54.yaml
- type: ROOM
path: ${PREFIX}/data/room/55.yaml
- type: ROOM
path: ${PREFIX}/data/room/56.yaml
- type: ROOM
path: ${PREFIX}/data/room/57.yaml
- type: ROOM
path: ${PREFIX}/data/room/58.yaml
- type: ROOM
path: ${PREFIX}/data/room/59.yaml
- type: ROOM
path: ${PREFIX}/data/room/60.yaml
# TILESETS
tilesets:
- type: BITMAP
path: ${PREFIX}/data/tilesets/standard.gif
# ENEMIES
enemies:
- type: ANIMATION
path: ${PREFIX}/data/enemies/abad_bell.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/abad_bell.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/abad.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/abad.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/amstrad_cs.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/amstrad_cs.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/flying_arounder.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/flying_arounder.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/stopped_arounder.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/stopped_arounder.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/walking_arounder.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/walking_arounder.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/arounders_door.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/arounders_door.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/arounders_machine.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/arounders_machine.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/bat.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/bat.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/batman_bell.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/batman_bell.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/batman_fire.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/batman_fire.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/batman.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/batman.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/bell.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/bell.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/bin.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/bin.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/bird.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/bird.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/breakout.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/breakout.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/bry.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/bry.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/chip.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/chip.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/code.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/code.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/congo.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/congo.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/crosshair.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/crosshair.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/demon.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/demon.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/dimallas.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/dimallas.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/floppy.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/floppy.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/dong.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/dong.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/guitar.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/guitar.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/heavy.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/heavy.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/jailer1.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/jailer1.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/jailer2.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/jailer2.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/jailer3.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/jailer3.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/jailbattle_alien.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/jailbattle_alien.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/jailbattle_human.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/jailbattle_human.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/jeannine.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/jeannine.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/lamp.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/lamp.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/lord_abad.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/lord_abad.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/matatunos.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/matatunos.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/mummy.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/mummy.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/paco.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/paco.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/elsa.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/elsa.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/qvoid.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/qvoid.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/robot.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/robot.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/sam.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/sam.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/shock.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/shock.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/sigmasua.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/sigmasua.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/spark.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/spark.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/special/aerojailer.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/special/aerojailer.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/special/arounder.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/special/arounder.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/special/pepe_rosita_job.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/special/pepe_rosita_job.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/special/shooting_star.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/special/shooting_star.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/spider.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/spider.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/tree_thing.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/tree_thing.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/tuno.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/tuno.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/tv_panel.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/tv_panel.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/tv.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/tv.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/upv_student.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/upv_student.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/wave.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/wave.gif
- type: ANIMATION
path: ${PREFIX}/data/enemies/z80.yaml
- type: BITMAP
path: ${PREFIX}/data/enemies/z80.gif
# PLAYER
player:
- type: BITMAP
path: ${PREFIX}/data/player/player.gif
- type: ANIMATION
path: ${PREFIX}/data/player/player.yaml
- type: BITMAP
path: ${PREFIX}/data/player/player2.gif
- type: ANIMATION
path: ${PREFIX}/data/player/player2.yaml
- type: BITMAP
path: ${PREFIX}/data/player/player_game_over.gif
- type: ANIMATION
path: ${PREFIX}/data/player/player_game_over.yaml
# ITEMS
items:
- type: BITMAP
path: ${PREFIX}/data/items/items.gif
# MUSIC
music:
- type: MUSIC
path: ${PREFIX}/data/music/title.ogg
- type: MUSIC
path: ${PREFIX}/data/music/game.ogg
- type: MUSIC
path: ${PREFIX}/data/music/loading_data1.ogg
- type: MUSIC
path: ${PREFIX}/data/music/loading_data2.ogg
- type: MUSIC
path: ${PREFIX}/data/music/loading_header.ogg
- type: MUSIC
path: ${PREFIX}/data/music/loading_screen_color.ogg
- type: MUSIC
path: ${PREFIX}/data/music/loading_screen_data.ogg
- type: MUSIC
path: ${PREFIX}/data/music/ending1.ogg
- type: MUSIC
path: ${PREFIX}/data/music/ending2.ogg
- type: MUSIC
path: ${PREFIX}/data/music/game_over.ogg
# SOUNDS
sounds:
- type: SOUND
path: ${PREFIX}/data/sound/item.wav
- type: SOUND
path: ${PREFIX}/data/sound/death.wav
- type: SOUND
path: ${PREFIX}/data/sound/notify.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump1.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump2.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump3.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump4.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump5.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump6.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump7.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump8.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump9.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump10.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump11.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump12.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump13.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump14.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump15.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump16.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump17.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump18.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump19.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump20.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump21.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump22.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump23.wav
- type: SOUND
path: ${PREFIX}/data/sound/jump24.wav
# LOGO
logo:
- type: BITMAP
path: ${PREFIX}/data/logo/jailgames.gif
- type: BITMAP
path: ${PREFIX}/data/logo/since_1998.gif
# LOADING
loading:
- type: BITMAP
path: ${PREFIX}/data/loading/loading_screen_bn.gif
- type: BITMAP
path: ${PREFIX}/data/loading/loading_screen_color.gif
- type: BITMAP
path: ${PREFIX}/data/loading/program_jaildoc.gif
# TITLE
title:
- type: BITMAP
path: ${PREFIX}/data/title/title_logo.gif
# ENDING
ending:
- type: BITMAP
path: ${PREFIX}/data/ending/ending1.gif
- type: BITMAP
path: ${PREFIX}/data/ending/ending2.gif
- type: BITMAP
path: ${PREFIX}/data/ending/ending3.gif
- type: BITMAP
path: ${PREFIX}/data/ending/ending4.gif
- type: BITMAP
path: ${PREFIX}/data/ending/ending5.gif
# CREDITS
credits:
- type: BITMAP
path: ${PREFIX}/data/credits/shine.gif
- type: ANIMATION
path: ${PREFIX}/data/credits/shine.yaml

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=8
[animation]
name=default
speed=0.1000
loop=-1
frames=0,1,2,3,4,5,6,7
[/animation]

10
data/credits/shine.yaml Normal file
View File

@@ -0,0 +1,10 @@
# shine animation
tileSetFile: shine.gif
frameWidth: 8
frameHeight: 8
animations:
- name: default
speed: 0.1
loop: -1
frames: [0, 1, 2, 3, 4, 5, 6, 7]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2
[/animation]

10
data/enemies/abad.yaml Normal file
View File

@@ -0,0 +1,10 @@
# abad animation
tileSetFile: abad.gif
frameWidth: 8
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3,4,5,6,7,8,9
[/animation]

View File

@@ -0,0 +1,10 @@
# abad_bell animation
tileSetFile: abad_bell.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=8
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
[/animation]

View File

@@ -0,0 +1,10 @@
# amstrad_cs animation
tileSetFile: amstrad_cs.gif
frameWidth: 8
frameHeight: 8
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3,3,3,3,3,3,3,3,3,3,3,3,2,1,0,0,0
[/animation]

View File

@@ -0,0 +1,10 @@
# arounders_door animation
tileSetFile: arounders_door.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -0,0 +1,10 @@
# arounders_machine animation
tileSetFile: arounders_machine.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=9
frame_height=7
[animation]
name=default
speed=0.0500
loop=0
frames=0,1
[/animation]

10
data/enemies/bat.yaml Normal file
View File

@@ -0,0 +1,10 @@
# bat animation
tileSetFile: bat.gif
frameWidth: 9
frameHeight: 7
animations:
- name: default
speed: 0.05
loop: 0
frames: [0, 1]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/batman.yaml Normal file
View File

@@ -0,0 +1,10 @@
# batman animation
tileSetFile: batman.gif
frameWidth: 8
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,4,5
[/animation]

View File

@@ -0,0 +1,10 @@
# batman_bell animation
tileSetFile: batman_bell.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 4, 5]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -0,0 +1,10 @@
# batman_fire animation
tileSetFile: batman_fire.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,4,5,6,7,8,9,10,11
[/animation]

10
data/enemies/bell.yaml Normal file
View File

@@ -0,0 +1,10 @@
# bell animation
tileSetFile: bell.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=8
[animation]
name=default
speed=0.1667
loop=0
frames=0,1,2,3,4
[/animation]

10
data/enemies/bin.yaml Normal file
View File

@@ -0,0 +1,10 @@
# bin animation
tileSetFile: bin.gif
frameWidth: 16
frameHeight: 8
animations:
- name: default
speed: 0.1667
loop: 0
frames: [0, 1, 2, 3, 4]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/bird.yaml Normal file
View File

@@ -0,0 +1,10 @@
# bird animation
tileSetFile: bird.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=24
frame_height=32
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,4,5,6,7,6,5,4,3,2,1
[/animation]

View File

@@ -0,0 +1,10 @@
# breakout animation
tileSetFile: breakout.gif
frameWidth: 24
frameHeight: 32
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1]

View File

@@ -1,9 +0,0 @@
frame_width=10
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5,4,5
[/animation]

10
data/enemies/bry.yaml Normal file
View File

@@ -0,0 +1,10 @@
# bry animation
tileSetFile: bry.gif
frameWidth: 10
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/chip.yaml Normal file
View File

@@ -0,0 +1,10 @@
# chip animation
tileSetFile: chip.gif
frameWidth: 8
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/code.yaml Normal file
View File

@@ -0,0 +1,10 @@
# code animation
tileSetFile: code.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/congo.yaml Normal file
View File

@@ -0,0 +1,10 @@
# congo animation
tileSetFile: congo.gif
frameWidth: 8
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -0,0 +1,10 @@
# crosshair animation
tileSetFile: crosshair.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/demon.yaml Normal file
View File

@@ -0,0 +1,10 @@
# demon animation
tileSetFile: demon.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -0,0 +1,10 @@
# dimallas animation
tileSetFile: dimallas.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=22
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,4,5
[/animation]

10
data/enemies/dong.yaml Normal file
View File

@@ -0,0 +1,10 @@
# dong animation
tileSetFile: dong.gif
frameWidth: 22
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 4, 5]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,4,5
[/animation]

10
data/enemies/elsa.yaml Normal file
View File

@@ -0,0 +1,10 @@
# elsa animation
tileSetFile: elsa.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 4, 5]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/floppy.yaml Normal file
View File

@@ -0,0 +1,10 @@
# floppy animation
tileSetFile: floppy.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=7
frame_height=7
[animation]
name=default
speed=0.1667
loop=0
frames=0
[/animation]

View File

@@ -0,0 +1,10 @@
# flying_arounder animation
tileSetFile: flying_arounder.gif
frameWidth: 7
frameHeight: 7
animations:
- name: default
speed: 0.1667
loop: 0
frames: [0]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/guitar.yaml Normal file
View File

@@ -0,0 +1,10 @@
# guitar animation
tileSetFile: guitar.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/heavy.yaml Normal file
View File

@@ -0,0 +1,10 @@
# heavy animation
tileSetFile: heavy.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=13
frame_height=15
[animation]
name=default
speed=0.1000
loop=0
frames=0,1
[/animation]

View File

@@ -0,0 +1,10 @@
# jailbattle_alien animation
tileSetFile: jailbattle_alien.gif
frameWidth: 13
frameHeight: 15
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1]

View File

@@ -1,9 +0,0 @@
frame_width=11
frame_height=13
[animation]
name=default
speed=0.1000
loop=0
frames=0,1
[/animation]

View File

@@ -0,0 +1,10 @@
# jailbattle_human animation
tileSetFile: jailbattle_human.gif
frameWidth: 11
frameHeight: 13
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1]

View File

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

10
data/enemies/jailer1.yaml Normal file
View File

@@ -0,0 +1,10 @@
# jailer1 animation
tileSetFile: jailer1.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3]

View File

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

10
data/enemies/jailer2.yaml Normal file
View File

@@ -0,0 +1,10 @@
# jailer2 animation
tileSetFile: jailer2.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5]

View File

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

10
data/enemies/jailer3.yaml Normal file
View File

@@ -0,0 +1,10 @@
# jailer3 animation
tileSetFile: jailer3.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,1,3,5,1,3,5,1,3,5
[/animation]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -0,0 +1,10 @@
# jeannine animation
tileSetFile: jeannine.gif
frameWidth: 8
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1
[/animation]

10
data/enemies/lamp.yaml Normal file
View File

@@ -0,0 +1,10 @@
# lamp animation
tileSetFile: lamp.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

View File

@@ -0,0 +1,10 @@
# lord_abad animation
tileSetFile: lord_abad.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3,4,5
[/animation]

View File

@@ -0,0 +1,10 @@
# matatunos animation
tileSetFile: matatunos.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3, 4, 5]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=16
[animation]
name=default
speed=0.2000
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/mummy.yaml Normal file
View File

@@ -0,0 +1,10 @@
# mummy animation
tileSetFile: mummy.gif
frameWidth: 8
frameHeight: 16
animations:
- name: default
speed: 0.2
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3,4,5,6,7
[/animation]

10
data/enemies/paco.yaml Normal file
View File

@@ -0,0 +1,10 @@
# paco animation
tileSetFile: paco.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3, 4, 5, 6, 7]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.1333
loop=0
frames=0,1,2,3,4,5,6,7
[/animation]

10
data/enemies/qvoid.yaml Normal file
View File

@@ -0,0 +1,10 @@
# qvoid animation
tileSetFile: qvoid.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.1333
loop: 0
frames: [0, 1, 2, 3, 4, 5, 6, 7]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=32
[animation]
name=default
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

10
data/enemies/robot.yaml Normal file
View File

@@ -0,0 +1,10 @@
# robot animation
tileSetFile: robot.gif
frameWidth: 16
frameHeight: 32
animations:
- name: default
speed: 0.0667
loop: 0
frames: [0, 1, 2, 3]

View File

@@ -1,9 +0,0 @@
frame_width=16
frame_height=16
[animation]
name=default
speed=0.0833
loop=0
frames=0,1
[/animation]

10
data/enemies/sam.yaml Normal file
View File

@@ -0,0 +1,10 @@
# sam animation
tileSetFile: sam.gif
frameWidth: 16
frameHeight: 16
animations:
- name: default
speed: 0.0833
loop: 0
frames: [0, 1]

View File

@@ -1,9 +0,0 @@
frame_width=8
frame_height=8
[animation]
name=default
speed=0.1000
loop=0
frames=0,1,2,3,4,5,4,3,2,1
[/animation]

10
data/enemies/shock.yaml Normal file
View File

@@ -0,0 +1,10 @@
# shock animation
tileSetFile: shock.gif
frameWidth: 8
frameHeight: 8
animations:
- name: default
speed: 0.1
loop: 0
frames: [0, 1, 2, 3, 4, 5, 4, 3, 2, 1]

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