Compare commits

..

182 Commits
v1.08 ... main

Author SHA1 Message Date
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
633936c6e8 style: arreglant capçaleres 2025-10-29 12:11:37 +01:00
95b82e5f62 fix: errors de renombrat de variables 2025-10-29 11:56:34 +01:00
ead3265bfc style: arreglades capçaleres 2025-10-29 10:58:37 +01:00
8bf9da5fb6 style: organitzada la capçalera de Room 2025-10-29 09:58:49 +01:00
cd836862c0 style: corregides les capçaleres de game/entities 2025-10-29 09:21:05 +01:00
acdad8295a actualitzats els fitxers .room a pixels per segons (la velocitat dels enemics) 2025-10-28 11:03:04 +01:00
f14a1075ab migrat Enemy a time based 2025-10-28 11:02:22 +01:00
31c84f9676 migrat Game, Player i Item a time based 2025-10-28 10:52:13 +01:00
9e8c5e13df migrat Notifier a time based 2025-10-28 10:10:47 +01:00
de8c714132 migrats els fitxers .ani a segons/frame 2025-10-28 09:49:57 +01:00
da65777a5b migrades les clases Sprite a time based 2025-10-28 09:48:58 +01:00
70b76edcbf migrat GameOver a time based 2025-10-27 19:22:36 +01:00
6af2d72ea8 linter 2025-10-27 19:03:34 +01:00
5f47c88770 linter 2025-10-27 18:56:24 +01:00
3179a08dac linter 2025-10-27 18:35:53 +01:00
b1dca32a5b linter 2025-10-27 17:39:23 +01:00
aacb14149f eliminades les opcions de configuracio de posicio de les notificacions 2025-10-27 13:24:43 +01:00
cdb9bde6aa linter 2025-10-27 13:01:11 +01:00
5d8811026d linter 2025-10-27 11:53:12 +01:00
231dcd4b3b afegida carpeta tools/linter 2025-10-27 09:22:57 +01:00
17101a3da1 optimitzada la marquesina de Title 2025-10-26 23:23:33 +01:00
87370dd11d migracio de Title a time based 2025-10-26 23:07:08 +01:00
fc17131455 mogut GlobalEvenets a core/system 2025-10-26 22:33:27 +01:00
0c87612a17 treballant en les novetats de LoadingScreen 2025-10-26 21:44:16 +01:00
96506988b6 afegida la clase Audio 2025-10-26 21:43:44 +01:00
c7b07e9351 actualitzat a la ultima versió de jail_audio 2025-10-26 21:43:29 +01:00
6d2a116d15 migracio de LoadingScreen completada 2025-10-26 19:55:25 +01:00
d1acc59319 migrant LoadingScreen a delta_time i estats 2025-10-26 19:51:08 +01:00
0388adfed8 migrat Logo a time based 2025-10-26 18:01:02 +01:00
342177a751 renombrades les clases SSprite a SurfaceSprite 2025-10-26 14:56:56 +01:00
fdea094e26 corregit el logo de jailgames 2025-10-26 14:56:24 +01:00
2eadd7d8df mes reestructuracio de fitxers de codi 2025-10-26 14:46:19 +01:00
51330db998 mogut options.section a SceneManager 2025-10-26 14:18:45 +01:00
df4965a84b canviat Options de struct a namespace 2025-10-26 14:01:08 +01:00
8f49e442de redistribuida la carpeta source 2025-10-26 13:02:45 +01:00
9676e5bc2f creada carpeta source2 2025-10-26 12:31:49 +01:00
545d471654 fix: arreglades les colisions "the static cast menner" 2025-10-16 14:14:33 +02:00
9db902c024 netejat codi mort en screen.cpp 2025-10-16 13:29:25 +02:00
7fe2523221 fix: ja funcionen els shaders 2025-10-16 12:46:02 +02:00
d5ff840445 fix: faltava fer SDL_INIT_AUDIO 2025-10-16 11:51:17 +02:00
fb5fee02e9 Ja es por jugar
Estat actual: no van els shaders. Jail_audio dona errors
2025-10-16 10:22:12 +02:00
9a4b3b04a5 Corregits mil warnings de int a float
Corregit getDisplayInfo per al calcul del zoomMax
2025-10-16 10:12:03 +02:00
e811cf0a1d apegat de mala manera els shaders del CCAE i fets uns apanyets per a vore si compila 2025-10-15 12:59:17 +02:00
e4a08d2ec7 corregides cridades a SDL3 i migrat casi tot de int a float. Falta jail_shader 2025-10-15 12:16:50 +02:00
7c102e42cc corregits mes includes
llevats els errors en texture
2025-10-15 09:14:30 +02:00
78c5333144 Redistribuits els .cpp en carpetes
Actualitzat cmake
Modificats els include de SDL2 a SDL3
2025-10-15 08:28:57 +02:00
c3415fd106 Actualizar README.md 2025-06-25 21:53:41 +02:00
428fe664bd arreglada la logica d'estats en Ending2 2025-03-21 13:24:32 +01:00
0f8de0d8b5 arreglos d'estil 2025-03-21 08:42:54 +01:00
2ee2d5c45d millorat el renderitzat amb el borde activat 2025-03-21 08:27:24 +01:00
b8cde79107 fix: en windows no es calculaven be les colisions 2025-03-20 18:45:49 +01:00
0667e2105b passat el codi de pintar el mode debug de textura a surface 2025-03-20 18:02:31 +01:00
f438e8946b style: canviar border_ a enum class 2025-03-20 14:06:58 +01:00
68c97610fb style: canvis en Game 2025-03-20 13:46:31 +01:00
7746b679b4 style: canvis en Player 2025-03-20 13:44:37 +01:00
73008992e0 fix: no actualitzava correctament la caixa de colisions del jugador al canviar d'habitació 2025-03-20 13:37:17 +01:00
d4acb38c05 Merge branch 'master' of https://gitea.sustancia.synology.me/jaildesigner/jaildoctors_dilemma 2025-03-20 08:22:39 +01:00
7aae9fb5e6 arreglos d'estil en Screen 2025-03-20 08:22:25 +01:00
a63066bd68 arreglada la paleta taronja 2025-03-19 18:07:46 +01:00
0de6117ca0 afegit comptador de frames per segon 2025-03-17 14:10:07 +01:00
a43967c279 incrementat el nivell de detall en updateLoadingProgress() 2025-03-17 13:46:38 +01:00
15ecc10d8b fix: si arrancava en pantalla completa amb shaders, no reescalava be la imatge 2025-03-16 18:55:00 +01:00
0a5996f220 afegit soport per a axis del mando 2025-03-16 17:45:07 +01:00
64ee2d1e45 actualitzat gamecontrollerdb.txt a la ultima versió 2025-03-16 17:14:01 +01:00
40dcbabfe8 afegit gif.cpp i jail_shader.cpp desde coffee_crisis_arcade_edition 2025-03-16 15:44:38 +01:00
a14f6fcf6f Mil arreglos de paletes, gifs i colors transparents
El gif del jugador de game over estava mal
2025-03-08 20:04:43 +01:00
7b3f82aa34 Establit en Cheevos el temps de les notificacions 2025-03-08 11:40:22 +01:00
3a36bf6530 Optimitzats alguns bucles en les notificacions 2025-03-08 11:38:17 +01:00
195d812d2a Les notificacions ara van per milisegons.
posibilitat d'establir el tems de una notificacio (util per a allargar les dels logros)
2025-03-08 11:29:25 +01:00
fdb85ac393 Afegida tecla per a canviar el escalat sencer 2025-03-08 10:54:44 +01:00
d4e3995d71 Millorades les paletes verda i taronja
Retocada la paleta sweetie-16
Afegida política al fitxer CMakeLists.txt
2025-03-08 10:17:22 +01:00
b885aa8c9e fix: el cursor del mouse no està amagat per defecte 2025-03-07 22:44:53 +01:00
9cf0891a04 fix: la musica del mode DEMO no era la correcta 2025-03-07 22:29:17 +01:00
09ac952404 Afegit efecte de fundit a negre per a la paleta principal i per a la secundaria. Implementat en Title 2025-03-07 14:32:35 +01:00
529bfb5e3a Eliminada paleta.cpp i mig adaptada la surface que la gastava 2025-03-07 14:12:24 +01:00
ce88596d35 No se pq el ultim commit ha deixat 4 fitxers per commitar 2025-03-07 12:21:21 +01:00
6c3e231d51 Arreglats alguns colorets que havia per ahi rebolicats
fix: Credits no estava ben portat a surfaces
2025-03-07 12:20:30 +01:00
ae5c511988 fix: tamany incorrecte per a la textura de shaders quan es desactiva el borde 2025-03-06 23:20:07 +01:00
9eaf3bc134 Retocat un poc el disseny de Title
Retocades les notificacions
2025-03-06 23:12:53 +01:00
ff309168ef Ja torna a pintar de negre la pantalla al morir 2025-03-06 22:44:44 +01:00
c5c312fc51 Ja torna a funcionar el fade del logo 2025-03-06 22:36:53 +01:00
34d34a5d91 canvi de pc 2025-03-06 22:13:13 +01:00
d339fb13b0 Canviades les paletes dels .gif
Ara es poden carregar paletes desde fitxers .pal
Reajustada la pleta general
fix: la pantalla de càrrega deixava un pixel per pintar, desde sempre
Ajustat el color del borde en el Logo i el Title per a ser igual al fondo amb les paletes de 16 colors (la del Spectrum es de 15)
2025-03-06 20:04:53 +01:00
d0e06e30c9 Ja tornen a funcionar els shaders 2025-03-06 14:24:31 +01:00
982db7f75b Ja carrega la ultima paleta seleccionada 2025-03-06 14:07:47 +01:00
68e03ac1b0 La barra de progres ja torna a estar com abans 2025-03-06 13:42:52 +01:00
537150365b Retocat el render path d'Screen 2025-03-06 13:29:39 +01:00
12e27a1062 Ja torna a funcionar el borde 2025-03-06 13:14:57 +01:00
72efa0dc46 Afegides guardes en Surface::render() per a no pintar fora del destí (no estava implementat en totes les versions de render) 2025-03-06 12:27:10 +01:00
f2bfc970bc Quan canvia de RendererSurface, torna a deixar la que havia, no la de per defecte 2025-03-06 12:09:59 +01:00
60c926a9c9 Ja funciona la roda de paletes 2025-03-06 11:45:06 +01:00
10debde847 Treballant en la caché de les paletes 2025-03-05 22:58:26 +01:00
5cc163dd14 Arreglats els endings 2025-03-05 21:57:10 +01:00
241732752a i per fi ja comença a tornar tot a la normalitat 2025-03-05 20:52:34 +01:00
5a8747cc4b val! ja pinta coses en altres surfaces 2025-03-05 19:41:55 +01:00
70a50f5117 Imposible canviar la rendererSurface 2025-03-05 18:51:36 +01:00
d41b0cb31c He posat punteros dobles i tampoc va res 2025-03-05 12:31:54 +01:00
33038e8509 canvi de pc 2025-03-05 07:44:12 +01:00
57481a1e97 Ja pinta cosetes per pantalla 2025-03-04 14:24:30 +01:00
05f91b2a94 Transició a surface acabada. Ja compila 2025-03-04 12:30:19 +01:00
c4033e3663 Transició a surface: barallantme amb tots els Color que hi ha pel codi 2025-03-03 22:58:12 +01:00
b940d627d6 Transició a surface: crec que falta room.cpp 2025-03-03 21:33:59 +01:00
b320030547 Transició a surface: ending.cpp fet 2025-03-03 20:48:31 +01:00
d7e0178602 Transició a surface: game.cpp fet 2025-03-03 19:15:24 +01:00
c9e75ad5c8 bfff, a casa a meitat enfangà.. be..
Estic acabant de convertir Title
2025-03-03 14:26:07 +01:00
8f1d1df5d6 Transició a surface: vaig per title.cpp 2025-03-02 21:56:19 +01:00
db3a0d7263 Afegides classes SSprite, SMovingSprite i SAnimatedSprite 2025-03-02 19:29:48 +01:00
636b91ae6f Afegides noves funciones a Surface 2025-03-02 18:38:17 +01:00
4b820ad6b7 Modificada la llista de fitxers 2025-03-02 18:17:37 +01:00
a4db80e116 Canviats els .png per .gif 2025-03-02 18:10:58 +01:00
2ebb285a27 fix: el brillet del cor dels credits pillava mal la posició 2025-03-02 16:51:08 +01:00
d05f18ce2d fix: amb shaders no canviava be el mode de vdeo 2025-03-02 14:56:57 +01:00
0d74a8a29f fix: s'havien fotut els dos finals, pero ja estan corregits 2025-03-02 13:43:23 +01:00
cdf0b0a694 demo.cpp a fer la mar 2025-03-02 10:41:38 +01:00
82f0992116 Llevats un parell de warnings en pLoadSurface i pLoadPal 2025-03-02 09:39:48 +01:00
b1ba5e67dc Arreglos en la estructura i format del codi 2025-03-02 09:32:25 +01:00
193dac708f canvi de pc 2025-03-02 08:09:15 +01:00
cd96be80f9 Afegit Cheevos::clearUnobtainableState(); 2025-03-01 22:49:03 +01:00
aca2be98af Arreglos en la estructura i format del codi 2025-03-01 22:36:22 +01:00
360ebfd2e6 Arreglos en la estructura i format del codi 2025-03-01 20:39:44 +01:00
5c371e7517 Arreglos en la estructura i format del codi 2025-03-01 19:33:40 +01:00
31cded15cc Arreglos en la estructura i format del codi 2025-03-01 17:01:50 +01:00
3562b139c3 Arreglos en la estructura i format del codi 2025-03-01 11:02:08 +01:00
c2040d3ded Actualitzat Makefile per al release de macos amb target x86_64-apple-macos10.15
Actualitzat el numero de versió a 1.10
2025-03-01 10:20:45 +01:00
b34f4dda42 fix: llevar el text de REDEFINE KEYS 2025-03-01 09:28:17 +01:00
4e525642a0 v1.09 2025-03-01 09:15:08 +01:00
c7db6aeaa3 canvi de pc 2025-03-01 08:11:00 +01:00
5ff04daf20 gonna fer un commit per si reventa algo: estic a meitat implementar surfaces 2025-02-28 22:58:01 +01:00
5bb2b5e7c4 fix: les notificacions ja no embruten la pantalla de càrrega 2025-02-28 14:00:59 +01:00
7a685c0cc8 fix: no pintava el efecte de carrega del borde en LoadingScreen 2025-02-28 13:40:30 +01:00
07e83fc811 Tornada a posar la musica de Title i el attract mode 2025-02-28 13:25:21 +01:00
3167251eae Eliminat el alpha de les notificacions 2025-02-28 13:13:36 +01:00
4efbb61fbc Arreglat aixina sense massa ganes Scoreboard::render() 2025-02-28 13:11:02 +01:00
3992fc08bf Afegides comprobacions de valors per al fitxer de configuració 2025-02-28 11:34:51 +01:00
366fe404ca Modes de video aclarits (sembla)
La finestra manté la posició al canviar de tamany o activar el borde
La finestra ja pot creixer mentres donde de si el escriptori
2025-02-28 09:46:55 +01:00
217781c621 lo mateix 2025-02-27 23:18:16 +01:00
212b2b481c Treballant en els modes de video 2025-02-27 21:05:01 +01:00
59e766f5c3 Nou engine de notificacions 2025-02-27 19:03:57 +01:00
2e11fec2cb canvi de pc 2025-02-27 16:51:20 +01:00
0d7ab830c9 Modificada la barra de progres de carrega de recursos per a que s'actualitze cada 5 items. Aixina ja va rapidet encara que estiga el vsync 2025-02-27 14:21:53 +01:00
0cec9f8556 Solventat bug amb el punter a ScoreboardData 2025-02-27 14:17:00 +01:00
c6474cb2da canvi de pc 2025-02-27 07:37:39 +01:00
e6fd4225a2 Ja torna a deixar jugar
Encara queden bugs per corregir
Trencat el sistema de triar la paleta, de moment
2025-02-26 20:37:29 +01:00
85ab5ea03f Singleton de ItemTracker
Arreglos menors
2025-02-26 13:07:41 +01:00
2457517f2b Afegida barra de progres en la càrrega de recursos 2025-02-26 10:05:52 +01:00
64880a427e Metodes per mostrar o amagar la finestra 2025-02-26 08:58:17 +01:00
a8e5517a77 Arreglada la cárrega de opcions i recursos
Modificats els parametros dels fitxers .ani a snake_case
2025-02-26 08:50:12 +01:00
a07a08adb7 De moment ja compila i executa, encara que no troba alguns fitxers 2025-02-25 23:03:16 +01:00
32c31a8cb6 commit de moure a un Linux a gastar eines de home 2025-02-25 19:37:08 +01:00
c9da5135b2 canvi de pc enmig de la enfangà 2025-02-25 13:18:56 +01:00
817140825a canvi de pc 2025-02-25 07:38:34 +01:00
e6f101ece6 Afegint smart pointers
Actualitzat Resources
Actualitzades les classes Sprite i derivades
Afegida nova tipografia
Actualitzat Asset
Actualitzat Text
2025-02-24 14:09:29 +01:00
48971cd5d1 canvi de pc 2025-02-24 08:52:11 +01:00
5bb5be9c33 Afinada un poc mes la classe Options 2025-02-23 20:02:55 +01:00
2ee0c70319 Reestructurant la classe Options 2025-02-23 18:12:02 +01:00
3ba4293e8a Afegit globalEvents 2025-02-23 09:53:06 +01:00
8ae686a70b globalInputs implementat en totes les seccions excepte Title i Game 2025-02-23 08:57:01 +01:00
2ac425483b Acabat amb els singletones, de moment
Arreglat els checkEvents
2025-02-22 23:39:10 +01:00
fc01676df2 Singletonejant
Borrat menu.cpp que no estava gastantse...mmm.. desde mai
2025-02-22 18:27:23 +01:00
e361d295c1 JA VA! Nomes s'havia de fer les coses be i no ser un ansias 2025-02-22 00:30:32 +01:00
f6098a479b PETA QUE NI EL PEPE KARTS 2025-02-21 22:00:33 +01:00
7a0bc5c9ae canvi de pc 2025-02-21 19:45:29 +01:00
5f68c6256f singletoning 2025-02-21 18:03:09 +01:00
debcc3409e Sanejar codi 2025-02-21 15:55:44 +01:00
c86a6496b3 Actualitzada a la ultima versió de jail_audio 2025-02-21 15:38:29 +01:00
6bb877b510 Sanejar codi 2025-02-21 14:45:41 +01:00
ec73c5fa30 Modificat CMakeLists.txt 2025-02-21 08:22:03 +01:00
4dd6c94730 Toquetechant includes 2025-02-20 13:56:07 +01:00
e1d6aff724 Toquetechant includes 2025-02-20 13:34:18 +01:00
bcb2e96069 Moguts tots els .cpp a la mateixa carpeta 2025-02-20 12:32:40 +01:00
e23f6b5ed9 Eliminat TOT el online i merdes 2025-02-20 12:07:28 +01:00
9cb57e2ff2 Implementats els shaders 2025-02-20 08:48:55 +01:00
cc0f050c50 Afegit CMakeLists.txt 2025-02-19 20:11:33 +01:00
d75a733985 Actualitzat .gitignore 2025-02-19 20:11:19 +01:00
33d91dab55 Actualitzat README.md al valencià i corregides les rutes a les imatges 2025-02-19 20:03:02 +01:00
bd6807d655 Update: createSystemFolder() ja crea la carpeta on toca en Linux 2025-02-19 19:43:56 +01:00
c6d15bb96f Merge branch 'master' of https://gitea.sustancia.synology.me/JailDesigner/jaildoctors_dilemma 2025-02-19 19:36:47 +01:00
e20cc3b4bb Actualitzada la versió en info.plist 2025-02-19 19:36:33 +01:00
0baf7e5e2c Actualitzada la versió de Makefile 2025-02-19 19:36:16 +01:00
d9d4818d8a Modificado README.md 2024-08-03 09:29:51 +02:00
492 changed files with 25015 additions and 24736 deletions

21
.clang-format Normal file
View File

@@ -0,0 +1,21 @@
BasedOnStyle: Google
IndentWidth: 4
IndentAccessModifiers: true
ColumnLimit: 0 # Sin límite de longitud de línea
BreakBeforeBraces: Attach # Llaves en la misma línea
AllowShortIfStatementsOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AlignOperands: DontAlign
AlignAfterOpenBracket: DontAlign
BinPackArguments: false
BinPackParameters: false
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 4
IndentWrappedFunctionNames: false
Cpp11BracedListStyle: true
BreakConstructorInitializers: BeforeColon
AllowAllConstructorInitializersOnNextLine: false
PackConstructorInitializers: Never
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false

83
.clang-tidy Normal file
View File

@@ -0,0 +1,83 @@
Checks:
- readability-*
- modernize-*
- performance-*
- bugprone-unchecked-optional-access
- bugprone-sizeof-expression
- bugprone-suspicious-missing-comma
- bugprone-suspicious-index
- bugprone-undefined-memory-manipulation
- bugprone-use-after-move
- bugprone-out-of-bound-access
- -readability-identifier-length
- -readability-magic-numbers
- -bugprone-narrowing-conversions
- -performance-enum-size
- -performance-inefficient-string-concatenation
- -bugprone-integer-division
- -bugprone-easily-swappable-parameters
WarningsAsErrors: '*'
# Solo incluir archivos de tu código fuente
HeaderFilterRegex: '^source/(sections|ui)/.*'
FormatStyle: file
CheckOptions:
# Variables locales en snake_case
- { key: readability-identifier-naming.VariableCase, value: lower_case }
# Miembros privados en snake_case con sufijo _
- { key: readability-identifier-naming.PrivateMemberCase, value: lower_case }
- { key: readability-identifier-naming.PrivateMemberSuffix, value: _ }
# Miembros protegidos en snake_case con sufijo _
- { key: readability-identifier-naming.ProtectedMemberCase, value: lower_case }
- { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ }
# Miembros públicos en snake_case (sin sufijo)
- { key: readability-identifier-naming.PublicMemberCase, value: lower_case }
# Namespaces en CamelCase
- { key: readability-identifier-naming.NamespaceCase, value: CamelCase }
# Variables estáticas privadas como miembros privados
- { key: readability-identifier-naming.StaticVariableCase, value: lower_case }
- { key: readability-identifier-naming.StaticVariableSuffix, value: _ }
# Constantes estáticas sin sufijo
- { key: readability-identifier-naming.StaticConstantCase, value: UPPER_CASE }
# Constantes globales en UPPER_CASE
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
# Variables constexpr globales en UPPER_CASE
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE }
# Constantes locales en UPPER_CASE
- { key: readability-identifier-naming.LocalConstantCase, value: UPPER_CASE }
# Constexpr miembros en UPPER_CASE (sin sufijo)
- { key: readability-identifier-naming.ConstexprMemberCase, value: UPPER_CASE }
# Constexpr miembros privados/protegidos con sufijo _
- { key: readability-identifier-naming.ConstexprMethodCase, value: UPPER_CASE }
# Clases, structs y enums en CamelCase
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
# Valores de enums en UPPER_CASE
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
# Métodos en camelBack (sin sufijos)
- { key: readability-identifier-naming.MethodCase, value: camelBack }
- { key: readability-identifier-naming.PrivateMethodCase, value: camelBack }
- { key: readability-identifier-naming.ProtectedMethodCase, value: camelBack }
- { key: readability-identifier-naming.PublicMethodCase, value: camelBack }
# Funciones en camelBack
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
# Parámetros en lower_case
- { key: readability-identifier-naming.ParameterCase, value: lower_case }

8
.gitignore vendored
View File

@@ -1,4 +1,4 @@
.vscode
.vscode/
*data/config/config.txt
*stats.txt
*.DS_Store
@@ -11,6 +11,8 @@ thumbs.db
*.zip
*.app
*_debug*
sync_jail_engine.sh
jaildoctors_dilemma*
todo
todo
build/
linux_utils/
.claude/

788
CLAUDE.md Normal file
View File

@@ -0,0 +1,788 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
---
# JailDoctor's Dilemma - Codebase Architecture Guide
## Overview
**JailDoctor's Dilemma** is a retro-style 2D puzzle platformer game built in C++20 using SDL3 for graphics and audio. The game features 60+ rooms, collectible items, enemies, and an achievement system. It targets multiple platforms (Windows, macOS, Linux) with a focus on retro aesthetics and precise collision detection.
**Language:** C++20
**Graphics:** SDL3, OpenGL
**Audio:** SDL3 + custom jail_audio library
**Build:** CMake 3.10+
**Game Canvas:** 256x192 pixels (retro resolution)
---
## Build Commands
### Initial Setup & Build
```bash
# From project root
mkdir -p build
cd build
cmake ..
cmake --build .
```
### Rebuild After Changes
```bash
# From build directory
cmake --build .
# Or from project root
cmake --build build
```
### Clean Build
```bash
# From build directory
cmake --build . --clean-first
# Or from project root
cmake --build build --clean-first
```
### Run the Game
```bash
# Executable is placed in project root
./jaildoctors_dilemma
```
**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)
**IMPORTANT:** Always run the linter on specific files, NOT on the entire project, to avoid long execution times and errors in unrelated files.
```bash
# Analyze a specific file (RECOMMENDED)
tools/linter/run_clang-tidy.sh source/game/entities/player.cpp
# Analyze multiple specific files
tools/linter/run_clang-tidy.sh source/game/entities/player.cpp source/game/entities/enemy.cpp
# Apply fixes automatically to a specific file
tools/linter/run_clang-tidy.sh --fix source/game/entities/player.cpp
# Analyze entire project (SLOW, may have errors in defaults.hpp)
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.
---
## 1. High-Level Architecture Overview
The architecture follows a **layered, modular design** with clear separation of concerns:
```
┌─────────────────────────────────────┐
│ Application Layer │
│ (Director, Scene Manager) │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Game Logic Layer │
│ (Game Scene, Entities, Gameplay) │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Core Systems Layer │
│ (Rendering, Audio, Input, Resources)│
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ SDL3 & External Libraries │
│ (jail_audio, stb_image, stb_vorbis) │
└─────────────────────────────────────┘
```
### Key Design Principles
- **Singleton Pattern:** Core systems (Director, Screen, Audio, Input, Resource, Asset) use singleton pattern for global access
- **Scene-Based Architecture:** Game flow managed through discrete scenes (Logo, Title, Loading, Game, Ending, etc.)
- **Component-Based Entities:** Player, enemies, and items are discrete entities with render/update patterns
- **Resource Management:** All assets (textures, sounds, animations, tilemaps) cached through Resource singleton
- **Delta Time:** Frame-rate independent physics using DeltaTimer class
---
## 2. Directory Structure
```
source/
├── core/ # Core engine systems
│ ├── audio/ # Audio management
│ │ └── audio.hpp/cpp # Audio singleton (music, sounds, volumes)
│ ├── input/ # Input handling
│ │ ├── input.hpp/cpp # Input manager (keyboard, gamepad)
│ │ ├── global_inputs.hpp # Global input state
│ │ └── mouse.hpp # Mouse input
│ ├── rendering/ # Graphics rendering
│ │ ├── screen.hpp/cpp # Screen/window singleton, SDL renderer
│ │ ├── surface.hpp/cpp # 8-bit indexed color surface abstraction
│ │ ├── surface_sprite.hpp # Static sprite rendering
│ │ ├── surface_animated_sprite.hpp # Animated sprite with frame data
│ │ ├── surface_moving_sprite.hpp # Moving sprite with velocity
│ │ ├── texture.hpp/cpp # SDL texture wrapper
│ │ ├── text.hpp/cpp # Text rendering system
│ │ ├── gif.hpp/cpp # GIF image loader
│ │ ├── opengl/ # OpenGL shader backend
│ │ │ └── opengl_shader.hpp/cpp # CRT shader effects
│ │ └── shader_backend.hpp # Abstract shader interface
│ ├── resources/ # Asset & Resource management
│ │ ├── asset.hpp/cpp # Asset registry (file path mapping)
│ │ └── resource.hpp/cpp # Resource singleton (loads/caches assets)
│ └── system/ # System management
│ ├── director.hpp/cpp # Main application controller
│ ├── debug.hpp/cpp # Debug info overlay
│ └── global_events.hpp/cpp # Global event broadcasting
├── game/ # Game-specific logic
│ ├── entities/ # Game objects
│ │ ├── player.hpp/cpp # Player entity with physics
│ │ ├── enemy.hpp/cpp # Enemy entities
│ │ └── item.hpp/cpp # Collectible items
│ ├── gameplay/ # Core gameplay systems
│ │ ├── room.hpp/cpp # Room/level logic, tilemap, collision
│ │ ├── room_tracker.hpp/cpp # Tracks visited rooms
│ │ ├── scoreboard.hpp/cpp # Score display & data
│ │ ├── item_tracker.hpp/cpp # Tracks collected items
│ │ ├── stats.hpp/cpp # Game statistics
│ │ └── cheevos.hpp/cpp # Achievement system
│ ├── scenes/ # Game scenes (flow states)
│ │ ├── logo.hpp/cpp # JailGames logo screen
│ │ ├── loading_screen.hpp/cpp # Resource loading progress
│ │ ├── title.hpp/cpp # Title screen & menus
│ │ ├── game.hpp/cpp # Main gameplay loop
│ │ ├── game_over.hpp/cpp # Game over screen
│ │ ├── ending.hpp/cpp # Ending sequence 1
│ │ ├── ending2.hpp/cpp # Ending sequence 2
│ │ └── credits.hpp/cpp # Credits screen
│ ├── ui/ # User interface
│ │ └── notifier.hpp/cpp # Achievement/notification display
│ ├── options.hpp/cpp # Game configuration/options
│ ├── scene_manager.hpp # Scene flow state machine
│ ├── defaults.hpp # Game defaults constants
│ └── gameplay.hpp # Gameplay constants
├── external/ # Third-party libraries
│ ├── jail_audio.hpp/cpp # Custom audio library
│ ├── jail_audio.h # C interface for jail_audio
│ ├── stb_image.h # Image loading library
│ └── stb_vorbis.h # OGG Vorbis audio decoding
├── utils/ # Utility code
│ ├── delta_timer.hpp/cpp # Frame-rate independent timing
│ ├── defines.hpp # Game constants (resolutions, block sizes)
│ └── utils.hpp/cpp # Helper functions (colors, math)
└── main.cpp # Application entry point
data/ # Game assets
├── font/ # Bitmap fonts + descriptors
├── palette/ # Color palettes (.pal files)
├── shaders/ # GLSL vertex/fragment shaders
├── room/ # Tilemaps & room definitions (01.tmx-60.tmx)
├── tilesets/ # Tileset graphics
├── enemies/ # Enemy sprites & animations
├── player/ # Player sprites & animations
├── items/ # Item sprite sheets
├── music/ # Background music (OGG)
├── sound/ # Sound effects (WAV)
├── logo/ # Logo images
├── loading/ # Loading screen graphics
├── title/ # Title screen graphics
├── ending/ # Ending sequence images
└── credits/ # Credits screen assets
```
---
## 3. Key Architectural Patterns
### 3.1 Singleton Pattern (Core Systems)
Most core systems use thread-safe singleton pattern:
```cpp
class Screen {
private:
static Screen* screen_; // Singleton instance
Screen(); // Private constructor
~Screen();
public:
static void init(); // Creates singleton
static void destroy(); // Destroys singleton
static Screen* get(); // Accesses singleton
};
```
**Singleton Systems:**
- `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
- `Director` - Main application controller
- `Cheevos` - Achievement state management
- `Debug` - Debug information overlay
### 3.2 Scene-Based State Machine
The game uses a scene manager to control application flow:
```cpp
// namespace SceneManager
enum class Scene {
LOGO, LOADING_SCREEN, TITLE, CREDITS, GAME, DEMO,
GAME_OVER, ENDING, ENDING2, QUIT
};
inline Scene current = Scene::LOGO; // Global scene state
inline Options options = ...; // Transition options
```
**Scene Hierarchy:**
- Each scene runs its own update/render loop
- `Director` switches between scenes based on `SceneManager::current`
- Scenes can request transitions via `SceneManager::current` assignment
### 3.3 Entity-Component Pattern (Simplified)
Entities (Player, Enemies, Items) have:
- **Update** - Logic, physics, animation
- **Render** - Draw to screen surface
- **Collision** - Hit detection (player collides with room, enemies, items)
### 3.4 Surface-Based Rendering Pipeline
The rendering system uses a **8-bit indexed color** pipeline:
```
SurfaceData (pixel buffer)
Surface (palette + rendering operations)
SDL_Texture (GPU texture)
SDL_Renderer (to SDL_Window)
Display
```
**Key Components:**
- `Surface` - 8-bit indexed pixel buffer with palette support
- `SurfaceSprite` - Renders a fixed region of a surface
- `SurfaceAnimatedSprite` - Frame-based animation on top of sprite
- `SurfaceMovingSprite` - Adds velocity/position to animated sprite
- Supports color replacement, palette swapping, and shader effects (CRT)
### 3.5 Tile-Based Collision System
Rooms use a sophisticated collision detection system:
```cpp
class Room {
std::vector<LineHorizontal> bottom_floors_; // Ground surfaces
std::vector<LineHorizontal> top_floors_; // Ceiling surfaces
std::vector<LineVertical> left_walls_; // Left walls
std::vector<LineVertical> right_walls_; // Right walls
std::vector<LineDiagonal> left_slopes_; // Ramps going left
std::vector<LineDiagonal> right_slopes_; // Ramps going right
std::vector<LineHorizontal> conveyor_belt_floors_; // Moving platforms
};
```
**Collision Detection:**
- Player has collision points and "feet" points for fine-grained detection
- Room provides `check*Surfaces()` methods for collision resolution
- Supports ramps, slopes, conveyor belts, and auto-surfaces
- Enemies have axis-aligned bounding boxes
### 3.6 Sprite Animation System
Animation is data-driven:
```cpp
struct AnimationData {
std::string name;
std::vector<SDL_FRect> frames; // Frame rectangles
int speed; // Milliseconds per frame
int loop; // Frame to return to (-1 = no loop)
bool completed;
int current_frame;
int counter;
};
// Loaded from .ani files (list of animation names)
// Rendered with SurfaceAnimatedSprite
```
---
## 4. System Interactions & Data Flow
### 4.1 Application Lifecycle
```
main()
Director::Director() [Initialization]
├─ Options::init() - Load game configuration
├─ Asset::init() - Register asset paths
├─ Screen::init() - Create window, SDL renderer
├─ Audio::init() - Initialize SDL audio
├─ Input::init() - Bind keyboard/gamepad controls
├─ Resource::init() - Load all game resources
└─ Cheevos::init() - Load achievement state
Director::run() [Main loop]
├─ while (SceneManager::current != QUIT)
│ ├─ Logo::run()
│ ├─ LoadingScreen::run()
│ ├─ Title::run()
│ ├─ Game::run()
│ ├─ Ending::run()
│ └─ ...
└─ return 0
Director::~Director() [Cleanup]
├─ Options::saveToFile() - Save game settings
├─ Resource::destroy()
├─ Audio::destroy()
├─ Input::destroy()
├─ Screen::destroy()
└─ Asset::destroy()
```
### 4.2 Game Scene Flow (Core Gameplay Loop)
```cpp
Game::run() {
while (game is running) {
// Update
Input::checkInput() - Get player commands
Player::update() - Physics, animation, collision
Room::update() - Enemy AI, animated tiles
checkCollisions() - Player vs enemies, items, room
checkGameOver() - Win/lose conditions
// Render
Screen::start() - Prepare for drawing
Room::renderMap() - Draw tilemap
Room::renderEnemies() - Draw enemy sprites
Room::renderItems() - Draw item sprites
Player::render() - Draw player sprite
renderScoreboard() - Draw HUD
Screen::render() - Flush to GPU
}
}
```
### 4.3 Resource Loading & Caching
```
Director::setFileList()
├─ Asset::add(file, type) - Register all assets
└─ Asset::check() - Verify files exist
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
During gameplay
└─ Resource::get*(name) - Return cached resource
```
### 4.4 Input Flow
```
SDL_Event (from OS)
Input::checkInput(action)
├─ Check keyboard bindings - SDL_Scancode → InputAction
├─ Check gamepad bindings - SDL_GamepadButton → InputAction
└─ Return true if action active
Game logic uses checked inputs
└─ Player responds to actions
```
### 4.5 Audio Control Flow
```
Game code
├─ Audio::playMusic(name, loop)
├─ Audio::playSound(name, group)
└─ Audio::stopMusic()
Audio [wrapper/manager]
├─ Resource::getMusic(name)
├─ Resource::getSound(name)
└─ jail_audio C library
└─ SDL3 Audio device
```
---
## 5. Important Design Patterns & Conventions
### 5.1 Naming Conventions
**Classes:**
- `PascalCase` for classes: `Player`, `Room`, `Screen`, `Director`
- Suffix `Sprite` for sprite classes: `SurfaceSprite`, `SurfaceAnimatedSprite`
**Methods:**
- `get*()` for getters: `getWidth()`, `getRect()`
- `set*()` for setters: `setColor()`, `setPos()`
- `check*()` for boolean checks: `checkInput()`, `checkCollision()`
- `update()` for game logic updates
- `render()` for drawing
**Variables:**
- `snake_case` for member variables with `_` suffix: `x_`, `y_`, `sprite_`
- `UPPER_CASE` for constants: `BLOCK`, `MAX_VY`, `WIDTH`
- Private members: `private_member_`
**Structs for Data:**
- `XxxData` suffix: `PlayerData`, `RoomData`, `AnimationData`
- Used as initialization structures passed to constructors
### 5.2 Memory Management
- **Smart Pointers:** Uses `std::shared_ptr` for shared ownership (Surfaces, Sprites, Rooms)
- **Unique Pointers:** Uses `std::unique_ptr` for sole ownership (Director, local objects)
- **Raw Pointers:** Minimal use, mainly for singleton access or SDL objects
- **Static Allocation:** Singletons use static pointer pattern for RAII
### 5.3 Frame-Independent Physics
Uses `DeltaTimer` for delta time calculation:
```cpp
// In game loop
float delta = deltaTimer.tick(); // Get seconds since last frame
// Apply to physics
player.vy_ += gravity * delta;
player.y_ += player.vy_ * delta;
```
Provides **time scaling** for slow-motion effects.
### 5.4 Palette System
- 8-bit indexed color (256 colors per palette)
- Multiple palettes can be loaded and swapped
- `Surface::setPalette()` changes rendering colors
- Supports color replacement per-render: `renderWithColorReplace()`
- CRT shader effects can modify colors in real-time
### 5.5 Configuration System
Game settings stored in configuration file:
```cpp
namespace Options {
inline Video video{}; // Screen resolution, fullscreen, etc.
inline Audio audio{}; // Music/sound volumes
inline Notification notifications{};
inline Cheat cheats{}; // Cheat codes
inline ControlScheme keys{}; // Control mapping
inline Stats stats{}; // Game statistics
}
Options::loadFromFile(path); // Load from config.txt
Options::saveToFile(path); // Save on exit
```
### 5.6 Achievement System
```cpp
struct Achievement {
int id;
std::string caption;
std::string description;
int icon;
bool completed;
bool obtainable;
};
Cheevos::unlock(id); // Unlock achievement
Cheevos::setUnobtainable(id); // Lock achievement
Cheevos::saveToFile(); // Persist state
```
Achievements trigger notifications on unlock.
---
## 6. Technology Stack
### Core Technologies
| Component | Technology | Version | Role |
|-----------|-----------|---------|------|
| **Graphics** | SDL3 | Latest | Window, rendering, input |
| **GPU Rendering** | OpenGL | 3.2+ | Shader effects (CRT) |
| **Audio** | SDL3 Audio | Latest | Audio device, mixing |
| **Audio Decoding** | jail_audio (custom) | 1.x | OGG/WAV playback |
| **Image Loading** | stb_image | v2.x | PNG/GIF image loading |
| **Audio Decoding** | stb_vorbis | v1.x | OGG Vorbis support |
| **Language** | C++ | C++20 | Standard library features |
| **Build System** | CMake | 3.10+ | Cross-platform building |
### C++ Features Used
- **Smart Pointers:** `std::shared_ptr`, `std::unique_ptr`
- **Standard Containers:** `std::vector`, `std::array`
- **Modern Features:** `std::move`, lambda functions, constexpr
- **Namespaces:** Extensive use for organization
- **Inline Variables:** C++17 `inline` for global game state
### Platform Support
- **Windows:** MinGW/MSVC with SDL3
- **macOS:** Apple Clang, arm64 architecture, OpenGL
- **Linux:** GCC with SDL3 and OpenGL
---
## 7. Key Classes & Their Responsibilities
### Core System Classes
| Class | Purpose | Pattern |
|-------|---------|---------|
| `Director` | Main application controller, scene manager | Singleton |
| `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 |
| `Debug` | Debug overlay information | Singleton |
| `globalEvents` | Global SDL event handling (quit, device reset, mouse) | Namespace |
### Game Logic Classes
| Class | Purpose |
|-------|---------|
| `Game` | Main gameplay scene, orchestrates update/render |
| `Player` | Player entity with physics and animation |
| `Room` | Level data, collision detection, tilemap rendering |
| `Enemy` | Enemy entity behavior and rendering |
| `Item` | Collectible items |
| `Scoreboard` | HUD display data |
| `Cheevos` | Achievement unlock and state |
| `ItemTracker` | Tracks collected items |
| `RoomTracker` | Tracks visited rooms |
### Rendering Classes
| Class | Purpose |
|-------|---------|
| `Surface` | 8-bit indexed color pixel buffer with palette |
| `SurfaceSprite` | Renders a sprite region |
| `SurfaceAnimatedSprite` | Frame-based animation rendering |
| `SurfaceMovingSprite` | Sprite with velocity/position |
| `Text` | Text rendering system |
| `OpenGLShader` | Shader compilation and effects |
### Utility Classes
| Class | Purpose |
|-------|---------|
| `DeltaTimer` | Frame-rate independent timing |
---
## 8. Common Development Workflows
### Adding a New Input Action
1. Add to `InputAction` enum in `core/input/input.hpp`
2. Bind in `Director::initInput()`:
```cpp
Input::get()->bindKey(InputAction::NEW_ACTION, SDL_SCANCODE_X);
```
3. Check in game code:
```cpp
if (Input::get()->checkInput(InputAction::NEW_ACTION)) {
// Handle action
}
```
### Adding a New Scene
1. Create class inheriting appropriate base (usually standalone `run()` method)
2. Add to `SceneManager::Scene` enum
3. Implement in `Director::run()` switch statement
4. Set `SceneManager::current` to transition
### Adding Game Assets
1. Place file in `data/` directory
2. Register in `Director::setFileList()`:
```cpp
Asset::get()->add("/data/path/file.ext", AssetType::TYPE);
```
3. Resource loads automatically during `Resource::init()`
4. Access via: `Resource::get()->getSurface("name")`
### Modifying Collision Detection
1. Update `Room::setBottomSurfaces()`, `setLeftSlopes()`, etc.
2. Modify Player collision point generation in `Player::updateColliderPoints()`
3. Adjust tile classification in `TileType` enum
4. Test with debug visualization (F12 key)
---
## 9. Debug Features
### Available at Runtime
- **F12** - Toggle debug info overlay (FPS, player position, collision points)
- **F1/F2** - Decrease/increase window zoom
- **F3** - Toggle fullscreen mode
- **F4** - Toggle shader effects
- **F5/F6** - Next/previous palette
- **F7** - Toggle integer scaling
- **M** - Toggle music
- **B** - Toggle border display
- **P** - Pause game
### Debug Mode Compilation
In debug builds (`#ifdef DEBUG`), renders:
- Player collision boxes
- Collision point visualization
- Debug information overlay
- Special debug event handling
---
## 10. Performance Considerations
### Optimization Points
1. **Rendering:** Uses indexed color (8-bit) to reduce memory bandwidth
2. **Surfaces:** Shared smart pointers reduce copying
3. **Collision:** Pre-computed tile surface lists avoid per-frame searches
4. **Animation:** Frame-based animation reduces computation vs. bone systems
5. **Audio:** Cached music and sound effects, no runtime decoding
6. **Delta Time:** Frame-rate independent logic for smooth gameplay
### Known Limitations
- Single-threaded architecture (SDL3 requires single-thread rendering)
- Surfaces stored entirely in CPU memory (not GPU-side textures)
- Palette system requires full surface redraw when changing colors
---
## 11. File Format Reference
### Animation Files (.ani)
List of animation names, one per line:
```
default
jump
run
fall
```
### Room Data Files (.room)
Key-value pairs defining room properties:
```
number=01
name=Starting Room
bg_color=0x000000
border_color=0xFF00FF
...
```
### Tilemap Files (.tmx)
Tiled map format with tileset and collision data.
### Palette Files (.pal)
Binary 256-color palette format (256 × 4 bytes RGBA).
---
## 12. Quick Reference: Main Entry Points
### For Graphics Issues
- `Screen::render()` - Main rendering method
- `Screen::setPalete()` - Palette application
- `Surface` class - Pixel buffer operations
### For Input Issues
- `Input::checkInput()` - Input state checking
- `Director::initInput()` - Binding configuration
### For Audio Issues
- `Audio::playMusic()` - Music playback
- `Audio::playSound()` - SFX playback
- `jail_audio` library - Low-level audio operations
### For Game Logic
- `Game::run()` - Main game loop
- `Room` class - Collision and level logic
- `Player::update()` - Physics and movement
### For Asset Management
- `Asset::add()` - Asset registration
- `Resource::load()` - Asset loading
- `Director::setFileList()` - Complete asset registry
---
## 13. Future Enhancement Points
### Identified Areas for Expansion
1. **Network Play:** Stats upload to online service
2. **More Scenes:** Additional game modes
3. **Custom Rooms:** Level editor integration
4. **Audio Streaming:** Background music without loading entire file
5. **Particle System:** Visual effects for pickups/collisions
6. **Controller Feedback:** Haptic feedback for game events
7. **Accessibility:** Font scaling, color-blind modes, key remapping UI
---
## Development Notes
- **Language:** All code comments and some variable names are in Spanish (maintaining original author style)
- **Compilation:** Use CMake - automatically handles platform differences
- **Performance Profiling:** Use debug overlay (F12) for basic metrics; consider external profilers for deeper analysis
- **Common Warnings:** The codebase has been cleaned of the `struct`/`class` forward declaration inconsistency warnings that previously appeared
### Important Code Consistency Rules
1. **Forward Declarations:** Always use `class` for forward declarations of classes defined with `class` (not `struct`). The `Surface` class is defined as `class Surface` in `surface.hpp:57`, so all forward declarations must use `class Surface;`
2. **Singleton Pattern:** When creating new singletons, follow the existing pattern:
- Private static instance pointer
- Private constructor/destructor
- Public `init()`, `destroy()`, and `get()` methods
3. **Delta Time:** Always use `DeltaTimer` for frame-rate independent physics calculations
4. **Memory Management:** Prefer `std::shared_ptr` for shared resources (Surfaces, Sprites) and `std::unique_ptr` for sole ownership
---
**Last Updated:** November 2022 (per README)
**Original Author:** JailDesigner
**Repository:** Gitea (internal)

162
CMakeLists.txt Normal file
View File

@@ -0,0 +1,162 @@
# CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(jaildoctors_dilemma VERSION 1.00)
# Establecer estándar de C++
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Exportar comandos de compilación para herramientas de análisis
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Establece la política CMP0072 para indicar cómo se debe seleccionar la implementación de OpenGL.
# En este caso, se elige la opción "GLVND", que utiliza bibliotecas modernas y modulares (libOpenGL, libGLX),
# en lugar de la biblioteca OpenGL clásica (libGL). Esto mejora la compatibilidad con drivers recientes
# y evita ambigüedades cuando se encuentran múltiples implementaciones de OpenGL en el sistema.
cmake_policy(SET CMP0072 NEW)
set(OpenGL_GL_PREFERENCE GLVND)
# --- GENERACIÓN DE VERSIÓN AUTOMÁTICA ---
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short=7 HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
else()
set(GIT_HASH "unknown")
endif()
# Configurar archivo de versión
configure_file(${CMAKE_SOURCE_DIR}/source/version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY)
# --- 1. LISTA EXPLÍCITA DE FUENTES ---
set(APP_SOURCES
# Core - Audio
source/core/audio/audio.cpp
# Core - Input
source/core/input/global_inputs.cpp
source/core/input/input.cpp
source/core/input/mouse.cpp
# Core - Rendering
source/core/rendering/gif.cpp
source/core/rendering/screen.cpp
source/core/rendering/surface.cpp
source/core/rendering/surface_animated_sprite.cpp
source/core/rendering/surface_moving_sprite.cpp
source/core/rendering/surface_sprite.cpp
source/core/rendering/text.cpp
source/core/rendering/texture.cpp
# Core - Resources
source/core/resources/asset.cpp
source/core/resources/resource.cpp
# Core - System
source/core/system/debug.cpp
source/core/system/director.cpp
source/core/system/global_events.cpp
# Game - Entities
source/game/entities/enemy.cpp
source/game/entities/item.cpp
source/game/entities/player.cpp
# Game - Configuration
source/game/options.cpp
# Game - Gameplay
source/game/gameplay/cheevos.cpp
source/game/gameplay/item_tracker.cpp
source/game/gameplay/room.cpp
source/game/gameplay/room_tracker.cpp
source/game/gameplay/scoreboard.cpp
source/game/gameplay/stats.cpp
# Game - Scenes
source/game/scenes/credits.cpp
source/game/scenes/ending.cpp
source/game/scenes/ending2.cpp
source/game/scenes/game.cpp
source/game/scenes/game_over.cpp
source/game/scenes/loading_screen.cpp
source/game/scenes/logo.cpp
source/game/scenes/title.cpp
# Game - UI
source/game/ui/notifier.cpp
# Utils
source/utils/delta_timer.cpp
source/utils/utils.cpp
# Main
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
)
# 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})
# --- 3. DIRECTORIOS DE INCLUSIÓN ---
target_include_directories(${PROJECT_NAME} PUBLIC
"${CMAKE_SOURCE_DIR}/source"
"${CMAKE_BINARY_DIR}"
)
# Enlazar la librería SDL3
target_link_libraries(${PROJECT_NAME} PRIVATE SDL3::SDL3)
# --- 4. CONFIGURACIÓN PLATAFORMAS Y COMPILADOR ---
# Configuración de flags de compilación
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
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:_DEBUG>)
# Configuración específica para cada plataforma
if(WIN32)
target_compile_definitions(${PROJECT_NAME} PRIVATE WINDOWS_BUILD)
target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32 mingw32 opengl32)
elseif(APPLE)
target_compile_definitions(${PROJECT_NAME} PRIVATE MACOS_BUILD)
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-deprecated)
set(CMAKE_OSX_ARCHITECTURES "arm64")
elseif(UNIX AND NOT APPLE)
target_compile_definitions(${PROJECT_NAME} PRIVATE LINUX_BUILD)
endif()
# Configuración común para OpenGL
if(NOT WIN32)
find_package(OpenGL REQUIRED)
if(OPENGL_FOUND)
message(STATUS "OpenGL encontrado: ${OPENGL_LIBRARIES}")
target_link_libraries(${PROJECT_NAME} PRIVATE ${OPENGL_LIBRARIES})
else()
message(FATAL_ERROR "OpenGL no encontrado")
endif()
endif()
# Especificar la ubicación del ejecutable
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})

View File

@@ -1,8 +1,8 @@
executable = jaildoctors_dilemma
source = source/*.cpp source/jail_engine/*.cpp
source = source/*.cpp
appName = JailDoctor's Dilemma
releaseFolder = jdd_release
version = v1.08
version = v1.10
# Release names
windowsRelease = $(executable)-$(version)-win32-x64.zip
@@ -10,14 +10,17 @@ macosIntelRelease = $(executable)-$(version)-macos-intel.dmg
macosAppleSiliconRelease = $(executable)-$(version)-macos-apple-silicon.dmg
linuxRelease = $(executable)-$(version)-linux.tar.gz
# Specify the C++ standard
cpp_standard = c++20
windows:
@echo off
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable).exe"
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
windows_debug:
@echo off
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable)_debug.exe"
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
windows_release:
@@ -38,7 +41,7 @@ windows_release:
powershell Copy-Item "release\*.dll" -Destination "$(releaseFolder)"
# Build
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
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
# Create ZIP
@@ -49,10 +52,10 @@ windows_release:
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
macos:
clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)"
clang++ $(source) -std=$(cpp_standard) -Wall -Os -lSDL2 -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(executable)"
macos_debug:
clang++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)_debug"
clang++ $(source) -D DEBUG -std=$(cpp_standard) -Wall -Os -lSDL2 -framework OpenGL -Wno-deprecated -ffunction-sections -fdata-sections -o "$(executable)_debug"
macos_release:
# Remove data and possible data from previous builds
@@ -87,7 +90,7 @@ macos_release:
ln -s /Applications "$(releaseFolder)"/Applications
# Build INTEL
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
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
# Build INTEL DMG
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
@@ -95,7 +98,7 @@ macos_release:
rm -f tmp.dmg
# Build APPLE SILICON
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
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
# Build APPLE SILICON DMG
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
@@ -107,11 +110,11 @@ macos_release:
rm -rdf "$(releaseFolder)"
linux:
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)"
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
linux_debug:
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)_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
linux_release:
@@ -131,7 +134,7 @@ linux_release:
rm -f "$(releaseFolder)/data/room/standard.tsx"
# Build
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(releaseFolder)/$(executable)"
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
# Pack files

102
README.md
View File

@@ -1,89 +1,69 @@
# JailDoctor's Dilemma
JailDoc es un Jailer. A los Jailers les gusta empezar proyectos. A nadie le gusta terminarlos. Los Jailers viven en la Jail. A la Jail va uno a empezar proyectos. A la Jail va uno a enseñar sus proyectos. A la Jail va uno a aprender como empezar nuevos proyectos. A la Jail va uno a ayudar a sus compañeros a que empiecen nuevos proyectos.
<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">
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.
![JailDoctor's Dilemma - Title screen](https://php.sustancia.synology.me/images/jdd_title.png)
JailDoc és un Jailer destacat entre els Jailers. Té més projectes començats que ningú i és qui més ajuda als altres a iniciar els seus.
Però un dia, va passar una cosa inesperada. Algú va acabar un projecte. Algú va alliberar el *Puzzle Jail Facker*. Un autèntic desaprensiu.
JailDoc es un Jailer destacado entre los Jailers. Tiene más proyectos empezados que nadie y es el que más ayuda a que los demas empiecen los suyos.
Això va fer que JailDoc prenguera una decisió: acabaria i lliuraria un dels seus projectes. Però, quin? *JailBattle*? *Sigmasuá*? *Calculín Doom*? Quin dilema! Finalment, es va arromangar i va decidir acabar i lliurar **tots** els seus projectes inacabats. Ho aconseguirà?
<br clear="left">
Un día, ocurrió algo. Alguien terminó un proyecto. Alguien liberó el *Puzzle Jail Facker*. Algún desaprensivo.
---
## Jugabilitat
Esto hizo que JailDoc decidiera terminar y entregar uno de sus proyectos, pero, ¿cual? ¿JailBattle? ¿Sigmasuá? ¿Calculín Doom? Menudo dilema. JailDoc se arremangó y decidió finalizar y entregar todos sus proyectos inacabados. ¿Lo logrará?
Ajuda a JailDoc a recuperar les peces dels seus projectes, que estan escampades per qualsevol racó de l'Univers Jailer. Hi ha més de **150 peces** repartides en **60 pantalles**. Algunes són senzilles, però en altres hauràs de calcular molt bé els teus moviments si no vols acabar com un *arounder* més.
![JailDoctor's Dilemma - Gameplay](https://php.sustancia.synology.me/images/jdd/jdd_game1.png)
## Jugabilidad
Quan hages recuperat la major part de les peces, dirigeix-te a la Jail per mostrar als Jailers com es finalitza un projecte. Però compte! Bry no et deixarà entrar així com així. Només aquells que han creat un *Fire Effect* o un *Facedor de Tornejos* són dignes d'aquesta fita.
Ayuda a JailDoc a recuperar las partes de su proyecto que estan desperdigadas por cualquier lugar del Universo Jailer. Hay mas de **150 piezas** desperdigadas por **60 pantallas**. Algunas son un paseo, pero en otras tendras que calcular muy bien tus movimientos si no quieres acabar como un arounder del montón.
---
## Controls
![JailDoctor's Dilemma - Gameplay](https://php.sustancia.synology.me/images/jdd_game1.png)
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.
Cuando consigas recuperar gran parte de las piezas desperdigadas, dirigete a la Jail a mostrar a los Jailers como se termina un proyecto. Ten en cuenta que Bry no te dejará entrar. Solo aquellos que han realizado un *Fire Effect* o un *Facedor de Tornejos* son dignos de tal privilegio.
- **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.
![JailDoctor's Dilemma - Gameplay](https://php.sustancia.synology.me/images/jdd/jdd_game2.png)
## Controles
---
El juego permite tanto el uso del teclado como de un mando de control. Las teclas para manejar el juego son las siguientes:
## Dades del programa
El programa guarda automàticament la configuració del mode de vídeo i les estadístiques del joc a la teua carpeta personal del sistema. La ubicació d'aquesta carpeta depén del sistema operatiu que utilitzes:
- **Cursores**: Para mover a izquierda o derecha a JailDoc y para saltar. En el fichero de configuración se pueden cambiar las teclas por otras opciones prefijadas: O, P para moverse y Q para saltar o A, D para moverse y W para saltar.
- **Windows**: `C:\Users\<nom_d'usuari>\AppData\Roaming\jailgames\jaildoctors_dilemma`
- **MacOS**: `~/Library/Application Support/jailgames/jaildoctors_dilemma`
- **Linux**: `~/.jailgames/jaildoctors_dilemma`
- **Tecla M**: Activa o desactiva la música
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.
- **Tecla P**: Pone en pausa el juego
---
- **Tecla ESC**: Sale del juego si estas jugando. Sale del programa en cualquier otra circunstancia
## Agraïments
- **Tecla F1**: Disminuye el tamaño de la ventana
Gràcies, com sempre, a tots els Jailers per motivar-me a crear aquest joc i per ajudar-me en els moments de dubte en escriure el codi. I, com sempre, un agraïment especial a JailDoc per la seua unitat de *Jail_Audio* i per qualsevol altre codi, ajuda o ensenyament que haja necessitat per a completar el programa.
- **Tecla F2**: Aumenta el tamaño de la ventana
Si no he perdut el compte, aquest és el quart joc que aconseguisc crear.
- **Tecla F3**: Cambia entre el modo de pantalla completa y el de ventana
- **Tecla F5**: Cambia la paleta de colores del juego
- **Tecla B**: Activa o desactiva el borde de colores de la pantalla cuando el programa se ejecuta en modo de ventana
![JailDoctor's Dilemma - Gameplay](https://php.sustancia.synology.me/images/jdd_game2.png)
## Datos del programa
El programa guarda automáticamente la configuración del modo de video y las estadísticas de juego en tu carpeta personal del sistema. Esta carpeta tiene una ubicación distinta en función del sistema operativo que utilices.
En **Windows** se encuentra en:
`C:\Users\<nombre_de_usuario>\AppData\Roaming\jailgames\jaildoctors_dilemma`
En **MacOS** se encuentra en:
`~/Library/Application Support/jailgames/jaildoctors_dilemma`
En **Linux** se encuentra en:
`~/./jailgames/jaildoctors_dilemma`
En la carpeta está el fichero de configuración `config.txt` donde se puede modificar la configuración para conectarse al servicio online y los ficheros `stats.csv` y `stats_buffer.csv` con información de las estadisticas de juego.
## Agradecimientos
Agradecimientos como siempre a todos los Jailers por motivarme a hacer el juego y ayudarme en los momentos de duda a la hora de escribir el código. Y, como siempre, en especial a JailDoc por su unidad de Jail_Audio y cualquier otro código/ayuda/enseñanzas que haya necesitado para terminar el programa.
Si no me he descontado, este es el cuarto juego que consigo crear.
*13 de noviembre de 2022, JailDesigner*
*13 de novembre de 2022, JailDesigner*

View File

@@ -1,9 +1,10 @@
frameWidth=8
frameHeight=8
tileSetFile=shine.gif
frame_width=8
frame_height=8
[animation]
name=default
speed=6
speed=0.1000
loop=-1
frames=0,1,2,3,4,5,6,7
[/animation]

BIN
data/credits/shine.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

BIN
data/ending/ending1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
data/ending/ending2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
data/ending/ending3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/ending/ending4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
data/ending/ending5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,9 +1,10 @@
frameWidth=8
frameHeight=16
tileSetFile=abad.gif
frame_width=8
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2
[/animation]

BIN
data/enemies/abad.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

View File

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

BIN
data/enemies/abad_bell.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

View File

@@ -1,9 +1,10 @@
frameWidth=8
frameHeight=8
tileSetFile=amstrad_cs.gif
frame_width=8
frame_height=8
[animation]
name=default
speed=4
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]

BIN
data/enemies/amstrad_cs.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=arounders_door.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=8
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]

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=arounders_machine.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=4
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

View File

@@ -1,9 +1,10 @@
frameWidth=9
frameHeight=7
tileSetFile=bat.gif
frame_width=9
frame_height=7
[animation]
name=default
speed=3
speed=0.0500
loop=0
frames=0,1
[/animation]

BIN
data/enemies/bat.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

View File

@@ -1,9 +1,10 @@
frameWidth=8
frameHeight=16
tileSetFile=batman.gif
frame_width=8
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/batman.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=batman_bell.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=6
speed=0.1000
loop=0
frames=0,1,2,3,4,5
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=batman_fire.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=4
speed=0.0667
loop=0
frames=0,1,2,3
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

View File

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

BIN
data/enemies/bell.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=8
tileSetFile=bin.gif
frame_width=16
frame_height=8
[animation]
name=default
speed=10
speed=0.1667
loop=0
frames=0,1,2,3,4
[/animation]

BIN
data/enemies/bin.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=bird.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/bird.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

View File

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

BIN
data/enemies/breakout.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

View File

@@ -1,9 +1,10 @@
frameWidth=10
frameHeight=16
tileSetFile=bry.gif
frame_width=10
frame_height=16
[animation]
name=default
speed=6
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]

BIN
data/enemies/bry.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

View File

@@ -1,9 +1,10 @@
frameWidth=8
frameHeight=16
tileSetFile=chip.gif
frame_width=8
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/chip.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=code.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=6
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/code.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

View File

@@ -1,9 +1,10 @@
frameWidth=8
frameHeight=16
tileSetFile=congo.gif
frame_width=8
frame_height=16
[animation]
name=default
speed=6
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/congo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=crosshair.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=6
speed=0.1000
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/crosshair.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=demon.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/demon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=dimallas.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/dimallas.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

View File

@@ -1,9 +1,10 @@
frameWidth=22
frameHeight=16
tileSetFile=dong.gif
frame_width=22
frame_height=16
[animation]
name=default
speed=6
speed=0.1000
loop=0
frames=0,1,2,3,4,5
[/animation]

BIN
data/enemies/dong.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=elsa.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=6
speed=0.1000
loop=0
frames=0,1,2,3,4,5
[/animation]

BIN
data/enemies/elsa.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=floppy.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/floppy.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

View File

@@ -1,9 +1,10 @@
frameWidth=7
frameHeight=7
tileSetFile=flying_arounder.gif
frame_width=7
frame_height=7
[animation]
name=default
speed=10
speed=0.1667
loop=0
frames=0
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

View File

@@ -1,9 +1,10 @@
frameWidth=16
frameHeight=16
tileSetFile=guitar.gif
frame_width=16
frame_height=16
[animation]
name=default
speed=8
speed=0.1333
loop=0
frames=0,1,2,3
[/animation]

BIN
data/enemies/guitar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

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