69 Commits

Author SHA1 Message Date
2fe79de1d8 arreglos en Console i SS 2026-03-29 14:24:20 +02:00
d6ecadfd3a fix: vsync off no anava en Wayland 2026-03-29 14:13:02 +02:00
ad467847b9 corregit compile_spirv.cmake y la system_folder per a shaders 2026-03-29 13:45:29 +02:00
1bb2142d19 fix: corregida logica per obrir i entrar a la jail. ja no mira el nom de la habitacio sino el numero 2026-03-29 12:58:32 +02:00
f5a82229fe afegits cheats a la consola 2026-03-29 12:42:51 +02:00
145bab037f - eliminats accents en titols d'habitacions
- corregits fitxers .fnt (falta aseprite)
- corregint font_gent.py
- revisades algunes traduccions
2026-03-29 09:48:58 +02:00
754ad2de49 comandos i tecles per a manejar el nou disseny de shaders 2026-03-29 09:09:22 +02:00
a9b7c3f025 treballant en poder incloure diferents shaders 2026-03-29 08:23:42 +02:00
4db92d423c cos: afegida duracio final el logo 2026-03-29 07:45:28 +02:00
6717c1e307 fix: bug mileanri que deixava al jugador atascat en algunes rampes en certes condicions 2026-03-28 22:22:32 +01:00
9282d661aa millorada una mica la classe Debug en quant a mostrar info 2026-03-28 21:58:54 +01:00
a21f530dd4 corregit el caracter de coret que s'havia perdut 2026-03-28 20:53:33 +01:00
7483bf63c8 establir la posicio i habitacio inicial de debug desde la consola 2026-03-28 20:36:56 +01:00
268763f162 clase Debug ara carrega la posicio i habitacio inicial desde un fitxer 2026-03-28 20:15:44 +01:00
71c7b8e553 mes comandos per a Console 2026-03-28 14:14:33 +01:00
854a5f04b2 les tecles de funcio ja tornena a funcionar amb la consola oberta 2026-03-28 14:03:41 +01:00
ed21a47f92 augmentat el limit de caracters en la consola 2026-03-28 13:53:07 +01:00
637df23bc7 mes comandos en Console 2026-03-28 13:37:46 +01:00
ea421b4e17 fix: en TITLE, la consola no bloquejava la pulsacio del 1 al 4 i entrava a les opcions 2026-03-28 13:31:20 +01:00
3a5ff06dab - afegits comandos de GameControl per activar trucos o canviar de habitacio
- modificat el comando debug, ja no activa el overlay sino el mode debug
- nou alias show info i hide info
2026-03-28 13:27:33 +01:00
dfb0d2134f ajustat "al gust" el hud (consola, render info i notifier) 2026-03-28 13:04:03 +01:00
b459e2106f clang format 2026-03-28 12:50:00 +01:00
065f66d40e nova clase renderInfo
afegit control de offset a les notificacions
2026-03-28 12:49:38 +01:00
f15658a767 afegit soport per a configurar el audio (en config i en console) 2026-03-28 11:08:01 +01:00
21c8d1e8ca eliminat renderInfo de ResourceCache::init 2026-03-28 10:49:39 +01:00
a06eb8c8e9 fix: #include <iomanip> en Screen per a std::setprecision() 2026-03-28 10:08:08 +01:00
6b73a76d31 canvis en renderInfo
acabant de pulir el calcul actual del zoom en non integer scale
2026-03-28 02:01:51 +01:00
348a76090b permet escollir driver de gpu o no escollir-ne cap 2026-03-28 01:14:41 +01:00
02c1bf647e modificats defaults per a kiosk mode 2026-03-28 00:42:27 +01:00
a7f0a18e6d canvis de upscale i downscale en consola 2026-03-28 00:37:52 +01:00
8355c266a6 afegits comandos y restriccions en la consola per al modo kiosko 2026-03-28 00:26:29 +01:00
7bad27d686 canvi i reinici d'escene en la consola 2026-03-28 00:02:14 +01:00
d39622c7e2 afegits els comandos de les tecles de funció 2026-03-27 23:32:44 +01:00
4910d201f9 primer comando implementat en la consola 2026-03-27 23:19:47 +01:00
e85800c5ed ja es pot escriure en la consola 2026-03-27 22:54:47 +01:00
f25ee18329 treballant en la consola 2026-03-27 22:24:55 +01:00
3712f0c8d9 implementat lanzcos en el supersampling 2026-03-27 21:59:14 +01:00
c063488e8e optimitzat textureToRenderer() 2026-03-27 20:34:45 +01:00
deb0a8677f mostra el render device en info_debug 2026-03-27 10:18:41 +01:00
c5a7c9e70d optimitzant textureToRenderer() 2026-03-27 09:46:25 +01:00
92453a6104 llevats colorins del debug 2026-03-26 08:49:49 +01:00
7aff3e2109 afegit overlay de debug 2026-03-26 08:47:24 +01:00
8d213e7b3e afinant els shaders 2026-03-26 07:46:11 +01:00
c6d409c303 corregides scanlines per a treballar amb subpixels per proporció 2026-03-25 22:31:34 +01:00
6914f7df93 supersampling ara aplica al tamany de la finestra, no a la textura base 2026-03-25 22:00:10 +01:00
1dbfff2c17 fix: el supersampling es feia per cpu en lloc de per gpu 2026-03-25 21:33:06 +01:00
3493636954 correccions en les traduccions 2026-03-25 20:51:52 +01:00
8ff1073e4a corregides les scanlines per a paletes amb fondo blanc 2026-03-25 18:31:36 +01:00
6497e26202 reordenades i renombrades les classes sprite 2026-03-25 18:01:33 +01:00
e0e37204d7 eliminada la classe Texture 2026-03-25 17:54:23 +01:00
6595b28790 clang-format
clang-tidy (macos)
2026-03-23 07:26:21 +01:00
0ddb6c85e1 afegit un poc de chroma al preset crt 2026-03-22 23:00:39 +01:00
f84007902e afegit flicker a postfx 2026-03-22 22:38:18 +01:00
49ae2ae41f per defecte el joc eixirà ara en valencià 2026-03-22 22:07:12 +01:00
c701421a8f corregits offsets en smb2.fnt 2026-03-22 22:04:23 +01:00
1ecb427106 supersampling implementat 2026-03-22 21:55:18 +01:00
c87779cc09 imlementant supersampling 2026-03-22 21:24:20 +01:00
24594fa89a deixant postfx al gust 2026-03-22 20:54:02 +01:00
030779794e F12 toggle de showFPS en mode debug 2026-03-22 19:59:48 +01:00
495c23a3d2 fix: en la migracio de la marquesina a la nova versio de Text s'havia posat per error un kerning superior al que havia
opt: millores en la getió de la marquesina per optimitzar rendiment
2026-03-22 19:43:35 +01:00
911ee7a13e modificada la paleta d'aseprite.gif per consistencia 2026-03-22 19:22:56 +01:00
b876ccbb09 afegit fallback a la font_gen
afegida deteccio de caracters no definits a font_gen
2026-03-22 19:19:00 +01:00
94684e8758 ferramenta de text pot importar gifs
ferramenta de text accepta separació entre quadricules de lletres
2026-03-22 19:06:01 +01:00
0c116665bc treballant en el generador de .fnt 2026-03-22 18:40:51 +01:00
d0ed49d192 revisada i actualitzada la classe Text per a donar suport a utf-8 2026-03-22 12:47:32 +01:00
5e013a8414 revisió de metodes de debug 2026-03-22 10:16:09 +01:00
0cdbeb768d revisió de la traducció al valencià 2026-03-22 09:57:25 +01:00
cd0477cc4c fix: nom de variable en Locale 2026-03-22 09:21:45 +01:00
c6e2779429 afegit suport multiidioma
afegida traducció al valencià
2026-03-22 09:00:51 +01:00
184 changed files with 25652 additions and 4788 deletions

View File

@@ -41,14 +41,17 @@ set(APP_SOURCES
# Core - Rendering # Core - Rendering
source/core/rendering/gif.cpp source/core/rendering/gif.cpp
source/core/rendering/pixel_reveal.cpp source/core/rendering/pixel_reveal.cpp
source/core/rendering/render_info.cpp
source/core/rendering/screen.cpp source/core/rendering/screen.cpp
source/core/rendering/surface.cpp source/core/rendering/surface.cpp
source/core/rendering/surface_animated_sprite.cpp source/core/rendering/sprite/animated_sprite.cpp
source/core/rendering/surface_dissolve_sprite.cpp source/core/rendering/sprite/dissolve_sprite.cpp
source/core/rendering/surface_moving_sprite.cpp source/core/rendering/sprite/moving_sprite.cpp
source/core/rendering/surface_sprite.cpp source/core/rendering/sprite/sprite.cpp
source/core/rendering/text.cpp source/core/rendering/text.cpp
source/core/rendering/texture.cpp
# Core - Locale
source/core/locale/locale.cpp
# Core - Resources # Core - Resources
source/core/resources/resource_list.cpp source/core/resources/resource_list.cpp
@@ -93,6 +96,7 @@ set(APP_SOURCES
source/game/scenes/title.cpp source/game/scenes/title.cpp
# Game - UI # Game - UI
source/game/ui/console.cpp
source/game/ui/notifier.cpp source/game/ui/notifier.cpp
# Utils # Utils
@@ -121,32 +125,62 @@ message(STATUS "SDL3 encontrado: ${SDL3_INCLUDE_DIRS}")
if(NOT APPLE) if(NOT APPLE)
find_program(GLSLC_EXE NAMES glslc) find_program(GLSLC_EXE NAMES glslc)
set(SHADER_VERT_SRC "${CMAKE_SOURCE_DIR}/data/shaders/postfx.vert") set(SHADERS_DIR "${CMAKE_SOURCE_DIR}/data/shaders")
set(SHADER_FRAG_SRC "${CMAKE_SOURCE_DIR}/data/shaders/postfx.frag") set(HEADERS_DIR "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu")
set(SHADER_VERT_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/postfx_vert_spv.h")
set(SHADER_FRAG_H "${CMAKE_SOURCE_DIR}/source/core/rendering/sdl3gpu/postfx_frag_spv.h") set(SHADER_POSTFX_VERT_SRC "${SHADERS_DIR}/postfx.vert")
set(SHADER_POSTFX_FRAG_SRC "${SHADERS_DIR}/postfx.frag")
set(SHADER_UPSCALE_FRAG_SRC "${SHADERS_DIR}/upscale.frag")
set(SHADER_DOWNSCALE_FRAG_SRC "${SHADERS_DIR}/downscale.frag")
set(SHADER_CRTPI_FRAG_SRC "${SHADERS_DIR}/crtpi_frag.glsl")
set(SHADER_POSTFX_VERT_H "${HEADERS_DIR}/postfx_vert_spv.h")
set(SHADER_POSTFX_FRAG_H "${HEADERS_DIR}/postfx_frag_spv.h")
set(SHADER_UPSCALE_FRAG_H "${HEADERS_DIR}/upscale_frag_spv.h")
set(SHADER_DOWNSCALE_FRAG_H "${HEADERS_DIR}/downscale_frag_spv.h")
set(SHADER_CRTPI_FRAG_H "${HEADERS_DIR}/crtpi_frag_spv.h")
set(ALL_SHADER_HEADERS
"${SHADER_POSTFX_VERT_H}"
"${SHADER_POSTFX_FRAG_H}"
"${SHADER_UPSCALE_FRAG_H}"
"${SHADER_DOWNSCALE_FRAG_H}"
"${SHADER_CRTPI_FRAG_H}"
)
set(ALL_SHADER_SOURCES
"${SHADER_POSTFX_VERT_SRC}"
"${SHADER_POSTFX_FRAG_SRC}"
"${SHADER_UPSCALE_FRAG_SRC}"
"${SHADER_DOWNSCALE_FRAG_SRC}"
"${SHADER_CRTPI_FRAG_SRC}"
)
if(GLSLC_EXE) if(GLSLC_EXE)
add_custom_command( add_custom_command(
OUTPUT "${SHADER_VERT_H}" "${SHADER_FRAG_H}" OUTPUT ${ALL_SHADER_HEADERS}
COMMAND "${CMAKE_SOURCE_DIR}/tools/shaders/compile_spirv.sh" COMMAND ${CMAKE_COMMAND}
DEPENDS "${SHADER_VERT_SRC}" "${SHADER_FRAG_SRC}" -D GLSLC=${GLSLC_EXE}
-D SHADERS_DIR=${SHADERS_DIR}
-D HEADERS_DIR=${HEADERS_DIR}
-P ${CMAKE_SOURCE_DIR}/tools/shaders/compile_spirv.cmake
DEPENDS ${ALL_SHADER_SOURCES}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
COMMENT "Compilando shaders SPIR-V..." COMMENT "Compilando shaders SPIR-V..."
) )
add_custom_target(shaders DEPENDS "${SHADER_VERT_H}" "${SHADER_FRAG_H}") add_custom_target(shaders DEPENDS ${ALL_SHADER_HEADERS})
message(STATUS "glslc encontrado: shaders se compilarán automáticamente") message(STATUS "glslc encontrado: shaders se compilarán automáticamente")
else() else()
if(NOT EXISTS "${SHADER_VERT_H}" OR NOT EXISTS "${SHADER_FRAG_H}") foreach(HDR ${ALL_SHADER_HEADERS})
message(FATAL_ERROR if(NOT EXISTS "${HDR}")
"glslc no encontrado y headers SPIR-V no existen.\n" message(FATAL_ERROR
" Instala glslc: sudo apt install glslang-tools (Linux)\n" "glslc no encontrado y header SPIR-V no existe: ${HDR}\n"
" choco install vulkan-sdk (Windows)\n" " Instala glslc: sudo apt install glslang-tools (Linux)\n"
" O genera los headers manualmente: tools/shaders/compile_spirv.sh" " choco install vulkan-sdk (Windows)\n"
) " O genera los headers manualmente: tools/shaders/compile_spirv.sh"
else() )
message(STATUS "glslc no encontrado - usando headers SPIR-V precompilados") endif()
endif() endforeach()
message(STATUS "glslc no encontrado - usando headers SPIR-V precompilados")
endif() endif()
else() else()
message(STATUS "macOS: shaders SPIR-V omitidos (usa Metal)") message(STATUS "macOS: shaders SPIR-V omitidos (usa Metal)")

View File

@@ -7,23 +7,23 @@ assets:
- type: BITMAP - type: BITMAP
path: ${PREFIX}/data/font/smb2.gif path: ${PREFIX}/data/font/smb2.gif
- type: FONT - type: FONT
path: ${PREFIX}/data/font/smb2.txt path: ${PREFIX}/data/font/smb2.fnt
- type: BITMAP - type: BITMAP
path: ${PREFIX}/data/font/aseprite.gif path: ${PREFIX}/data/font/aseprite.gif
- type: FONT - type: FONT
path: ${PREFIX}/data/font/aseprite.txt path: ${PREFIX}/data/font/aseprite.fnt
- type: BITMAP - type: BITMAP
path: ${PREFIX}/data/font/gauntlet.gif path: ${PREFIX}/data/font/gauntlet.gif
- type: FONT - type: FONT
path: ${PREFIX}/data/font/gauntlet.txt path: ${PREFIX}/data/font/gauntlet.fnt
- type: BITMAP - type: BITMAP
path: ${PREFIX}/data/font/subatomic.gif path: ${PREFIX}/data/font/subatomic.gif
- type: FONT - type: FONT
path: ${PREFIX}/data/font/subatomic.txt path: ${PREFIX}/data/font/subatomic.fnt
- type: BITMAP - type: BITMAP
path: ${PREFIX}/data/font/8bithud.gif path: ${PREFIX}/data/font/8bithud.gif
- type: FONT - type: FONT
path: ${PREFIX}/data/font/8bithud.txt path: ${PREFIX}/data/font/8bithud.fnt
# PALETTES # PALETTES
palettes: palettes:
@@ -56,6 +56,13 @@ assets:
- type: PALETTE - type: PALETTE
path: ${PREFIX}/data/palette/steam-lords.pal path: ${PREFIX}/data/palette/steam-lords.pal
# LOCALE
locale:
- type: DATA
path: ${PREFIX}/data/locale/en.yaml
- type: DATA
path: ${PREFIX}/data/locale/ca.yaml
# INPUT # INPUT
input: input:
- type: DATA - type: DATA
@@ -67,6 +74,10 @@ assets:
path: ${SYSTEM_FOLDER}/config.yaml path: ${SYSTEM_FOLDER}/config.yaml
required: false required: false
absolute: true absolute: true
- type: DATA
path: ${SYSTEM_FOLDER}/debug.yaml
required: false
absolute: true
- type: DATA - type: DATA
path: ${SYSTEM_FOLDER}/stats_buffer.csv path: ${SYSTEM_FOLDER}/stats_buffer.csv
required: false required: false
@@ -80,7 +91,11 @@ assets:
required: false required: false
absolute: true absolute: true
- type: DATA - type: DATA
path: ${SYSTEM_FOLDER}/postfx.yaml path: ${SYSTEM_FOLDER}/shaders/postfx.yaml
required: false
absolute: true
- type: DATA
path: ${SYSTEM_FOLDER}/shaders/crtpi.yaml
required: false required: false
absolute: true absolute: true

132
data/font/8bithud.fnt Normal file
View File

@@ -0,0 +1,132 @@
# Font: 8bithud — generado desde 8-bit-hud.ttf size 5
# Generado con tools/font_gen/font_gen.py
box_width 8
box_height 8
columns 15
# codepoint_decimal ancho_visual
32 3 # U+0020
33 2 # !
34 5 # "
35 6 # #
36 6 # $
37 6 # %
38 6 # &
39 2 # '
40 3 # (
41 3 # )
42 4 # *
43 3 # +
44 2 # ,
45 3 # -
46 2 # .
47 4 # /
48 6 # 0
49 3 # 1
50 6 # 2
51 6 # 3
52 6 # 4
53 6 # 5
54 6 # 6
55 6 # 7
56 6 # 8
57 6 # 9
58 2 # :
59 2 # ;
60 4 # <
61 3 # =
62 4 # >
63 6 # ?
64 8 # @
65 6 # A
66 6 # B
67 6 # C
68 6 # D
69 6 # E
70 6 # F
71 6 # G
72 6 # H
73 6 # I
74 6 # J
75 6 # K
76 6 # L
77 6 # M
78 6 # N
79 6 # O
80 6 # P
81 6 # Q
82 6 # R
83 6 # S
84 6 # T
85 6 # U
86 5 # V
87 6 # W
88 6 # X
89 6 # Y
90 6 # Z
91 3 # [
92 4 # \
93 3 # ]
94 4 # ^
95 6 # _
96 2 # `
97 5 # a
98 5 # b
99 5 # c
100 5 # d
101 5 # e
102 5 # f
103 5 # g
104 5 # h
105 4 # i
106 5 # j
107 5 # k
108 5 # l
109 6 # m
110 5 # n
111 5 # o
112 5 # p
113 5 # q
114 5 # r
115 5 # s
116 4 # t
117 5 # u
118 5 # v
119 6 # w
120 4 # x
121 4 # y
122 5 # z
123 4 # {
124 1 # |
125 4 # }
126 4 # ~
192 6 # À
193 6 # Á
200 6 # È
201 6 # É
204 6 # Ì
205 6 # Í
210 6 # Ò
211 6 # Ó
219 6 # Ù
218 6 # Ú
209 6 # Ñ
199 6 # Ç
224 5 # à
225 5 # á
232 5 # è
233 5 # é
236 4 # ì
237 4 # í
242 5 # ò
243 5 # ó
249 5 # ù
250 5 # ú
241 5 # ñ
231 5 # ç
161 2 # ¡
191 6 # ¿
171 4 # «
187 4 # »
183 2 # ·

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 837 B

View File

@@ -1,194 +0,0 @@
# box width
8
# box height
8
# 32 espacio ( )
2
# 33 !
2
# 34 "
5
# 35 #
6
# 36 $
6
# 37 %
6
# 38 &
6
# 39 '
2
# 40 (
3
# 41 )
3
# 42 *
4
# 43 +
3
# 44 ,
2
# 45 -
3
# 46 .
2
# 47 /
4
# 48 0
6
# 49 1
6
# 50 2
6
# 51 3
6
# 52 4
6
# 53 5
6
# 54 6
6
# 55 7
6
# 56 8
6
# 57 9
6
# 58 :
2
# 59 ;
2
# 60 <
4
# 61 =
3
# 62 >
4
# 63 ?
6
# 64 @
8
# 65 A
6
# 66 B
6
# 67 C
6
# 68 D
6
# 69 E
6
# 70 F
6
# 71 G
6
# 72 H
6
# 73 I
6
# 74 J
6
# 75 K
6
# 76 L
6
# 77 M
6
# 78 N
6
# 79 O
6
# 80 P
6
# 81 Q
6
# 82 R
6
# 83 S
6
# 84 T
6
# 85 U
6
# 86 V
5
# 87 W
6
# 88 X
6
# 89 Y
6
# 90 Z
6
# 91 [
3
# 92 \
5
# 93 ]
3
# 94 ^
4
# 95 _
6
# 96 `
2
# 97 a
5
# 98 b
5
# 99 c
5
# 100 d
5
# 101 e
5
# 102 f
5
# 103 g
5
# 104 h
5
# 105 i
4
# 106 j
5
# 107 k
5
# 108 l
5
# 109 m
6
# 110 n
5
# 111 o
5
# 112 p
5
# 113 q
5
# 114 r
5
# 115 s
5
# 116 t
4
# 117 u
5
# 118 v
5
# 119 w
6
# 120 x
4
# 121 y
4
# 122 z
5
# 123 {
3
# 124 |
2
# 125 }
3
# 126 ~
3

134
data/font/aseprite.fnt Normal file
View File

@@ -0,0 +1,134 @@
# Font: aseprite — generado desde aseprite_font.gif
# Generado con tools/font_gen/font_gen.py
box_width 10
box_height 7
columns 16
cell_spacing 1
row_spacing 4
# codepoint_decimal ancho_visual
32 3 # U+0020
33 1 # !
34 3 # "
35 5 # #
36 4 # $
37 5 # %
38 5 # &
39 2 # '
40 2 # (
41 2 # )
42 5 # *
43 5 # +
44 2 # ,
45 3 # -
46 1 # .
47 3 # /
48 4 # 0
49 2 # 1
50 4 # 2
51 4 # 3
52 4 # 4
53 4 # 5
54 4 # 6
55 4 # 7
56 4 # 8
57 4 # 9
58 1 # :
59 2 # ;
60 3 # <
61 4 # =
62 3 # >
63 4 # ?
64 8 # @
65 4 # A
66 4 # B
67 4 # C
68 4 # D
69 4 # E
70 4 # F
71 4 # G
72 4 # H
73 1 # I
74 2 # J
75 4 # K
76 4 # L
77 5 # M
78 4 # N
79 5 # O
80 4 # P
81 5 # Q
82 4 # R
83 4 # S
84 5 # T
85 4 # U
86 5 # V
87 7 # W
88 5 # X
89 5 # Y
90 4 # Z
91 2 # [
92 3 # \
93 2 # ]
94 5 # ^
95 5 # _
96 3 # `
97 4 # a
98 4 # b
99 4 # c
100 4 # d
101 4 # e
102 2 # f
103 4 # g
104 4 # h
105 1 # i
106 2 # j
107 4 # k
108 1 # l
109 7 # m
110 4 # n
111 4 # o
112 4 # p
113 4 # q
114 3 # r
115 3 # s
116 2 # t
117 4 # u
118 4 # v
119 5 # w
120 5 # x
121 4 # y
122 4 # z
123 3 # {
124 1 # |
125 3 # }
126 4 # ~
192 5 # À
193 5 # Á
200 5 # È
201 5 # É
205 5 # Í
207 5 # Ï
210 5 # Ò
211 5 # Ó
218 5 # Ú
220 5 # Ü
209 5 # Ñ
199 5 # Ç
224 5 # à
225 5 # á
232 5 # è
233 5 # é
237 5 # í
239 5 # ï
242 5 # ò
243 5 # ó
250 5 # ú
252 5 # ü
241 5 # ñ
231 5 # ç
161 5 # ¡
191 5 # ¿
171 5 # «
187 5 # »
183 5 # ·

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,194 +0,0 @@
# box width
8
# box height
8
# 32 espacio ( )
3
# 33 !
1
# 34 "
3
# 35 #
3
# 36 $
4
# 37 %
5
# 38 &
5
# 39 '
2
# 40 (
2
# 41 )
2
# 42 *
5
# 43 +
5
# 44 ,
3
# 45 -
3
# 46 .
1
# 47 /
4
# 48 0
4
# 49 1
2
# 50 2
4
# 51 3
4
# 52 4
4
# 53 5
4
# 54 6
4
# 55 7
4
# 56 8
4
# 57 9
4
# 58 :
1
# 59 ;
1
# 60 <
3
# 61 =
4
# 62 >
4
# 63 ?
4
# 64 @
7
# 65 A
4
# 66 B
4
# 67 C
4
# 68 D
4
# 69 E
4
# 70 F
4
# 71 G
4
# 72 H
4
# 73 I
2
# 74 J
2
# 75 K
4
# 76 L
4
# 77 M
5
# 78 N
4
# 79 O
5
# 80 P
4
# 81 Q
5
# 82 R
4
# 83 S
4
# 84 T
5
# 85 U
4
# 86 V
5
# 87 W
7
# 88 X
5
# 89 Y
5
# 90 Z
4
# 91 [
2
# 92 \
3
# 93 ]
2
# 94 ^
5
# 95 _
5
# 96 `
3
# 97 a
4
# 98 b
4
# 99 c
4
# 100 d
4
# 101 e
4
# 102 f
2
# 103 g
4
# 104 h
4
# 105 i
1
# 106 j
2
# 107 k
4
# 108 l
1
# 109 m
7
# 110 n
4
# 111 o
4
# 112 p
4
# 113 q
4
# 114 r
3
# 115 s
3
# 116 t
2
# 117 u
4
# 118 v
4
# 119 w
5
# 120 x
5
# 121 y
4
# 122 z
4
# 123 {
3
# 124 |
3
# 125 }
3
# 126 ~
5

128
data/font/gauntlet.fnt Normal file
View File

@@ -0,0 +1,128 @@
# Font: gauntlet — generado desde Gauntlet.ttf size 7
# Generado con tools/font_gen/font_gen.py
box_width 8
box_height 8
columns 15
# codepoint_decimal ancho_visual
32 3 # U+0020
33 2 # !
34 5 # "
35 6 # #
36 6 # $
37 7 # %
38 7 # &
39 2 # '
40 4 # (
41 4 # )
42 6 # *
43 8 # +
44 2 # ,
45 7 # -
46 2 # .
47 7 # /
48 7 # 0
49 6 # 1
50 6 # 2
51 6 # 3
52 7 # 4
53 6 # 5
54 6 # 6
55 6 # 7
56 6 # 8
57 6 # 9
58 2 # :
59 3 # ;
60 5 # <
61 6 # =
62 5 # >
63 6 # ?
64 6 # @
65 6 # A
66 7 # B
67 7 # C
68 7 # D
69 7 # E
70 7 # F
71 7 # G
72 6 # H
73 6 # I
74 7 # J
75 7 # K
76 7 # L
77 7 # M
78 7 # N
79 7 # O
80 7 # P
81 7 # Q
82 7 # R
83 6 # S
84 6 # T
85 6 # U
86 6 # V
87 7 # W
88 7 # X
89 6 # Y
90 7 # Z
91 8 # [
92 3 # \
93 7 # ]
94 7 # ^
95 8 # _
97 6 # a
98 7 # b
99 7 # c
100 7 # d
101 7 # e
102 7 # f
103 7 # g
104 6 # h
105 6 # i
106 7 # j
107 7 # k
108 7 # l
109 7 # m
110 7 # n
111 7 # o
112 7 # p
113 7 # q
114 7 # r
115 6 # s
116 6 # t
117 6 # u
118 6 # v
119 7 # w
120 7 # x
121 6 # y
122 7 # z
126 6 # ~
192 6 # À
193 6 # Á
200 7 # È
201 7 # É
204 6 # Ì
205 6 # Í
210 7 # Ò
211 7 # Ó
217 6 # Ù
218 6 # Ú
209 7 # Ñ
199 7 # Ç
224 6 # à
225 6 # á
232 7 # è
233 7 # é
236 6 # ì
237 6 # í
242 7 # ò
243 7 # ó
249 6 # ù
250 6 # ú
241 7 # ñ
231 7 # ç
161 2 # ¡
191 6 # ¿
171 5 # «
187 5 # »
183 2 # ·

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 959 B

View File

@@ -1,194 +0,0 @@
# box width
8
# box height
8
# 32 espacio ( )
6
# 33 !
2
# 34 "
5
# 35 #
6
# 36 $
6
# 37 %
7
# 38 &
7
# 39 '
2
# 40 (
4
# 41 )
4
# 42 *
6
# 43 +
8
# 44 ,
2
# 45 -
7
# 46 .
2
# 47 /
7
# 48 0
7
# 49 1
6
# 50 2
6
# 51 3
6
# 52 4
7
# 53 5
6
# 54 6
6
# 55 7
6
# 56 8
6
# 57 9
6
# 58 :
2
# 59 ;
2
# 60 <
5
# 61 =
6
# 62 >
5
# 63 ?
6
# 64 @
6
# 65 A
6
# 66 B
7
# 67 C
7
# 68 D
7
# 69 E
7
# 70 F
7
# 71 G
7
# 72 H
6
# 73 I
6
# 74 J
7
# 75 K
7
# 76 L
7
# 77 M
7
# 78 N
7
# 79 O
7
# 80 P
7
# 81 Q
7
# 82 R
7
# 83 S
6
# 84 T
6
# 85 U
6
# 86 V
6
# 87 W
7
# 88 X
7
# 89 Y
6
# 90 Z
7
# 91 [
8
# 92 \
3
# 93 ]
7
# 94 ^
7
# 95 _
8
# 96 `
0
# 97 a
6
# 98 b
7
# 99 c
7
# 100 d
7
# 101 e
7
# 102 f
7
# 103 g
7
# 104 h
6
# 105 i
6
# 106 j
7
# 107 k
7
# 108 l
7
# 109 m
7
# 110 n
7
# 111 o
7
# 112 p
7
# 113 q
7
# 114 r
7
# 115 s
6
# 116 t
6
# 117 u
6
# 118 v
6
# 119 w
7
# 120 x
7
# 121 y
6
# 122 z
7
# 123 {
0
# 124 |
0
# 125 }
0
# 126 ~
0

133
data/font/smb2.fnt Normal file
View File

@@ -0,0 +1,133 @@
# Font: smb2 — generado desde Super Mario Bros. 2.ttf size 8
# Generado con tools/font_gen/font_gen.py
box_width 8
box_height 8
columns 15
# codepoint_decimal ancho_visual
32 7 # U+0020
33 7 # !
34 7 # "
35 7 # #
36 7 # $
37 7 # %
38 7 # &
39 7 # '
40 7 # (
41 7 # )
42 7 # *
43 7 # +
44 7 # ,
45 7 # -
46 7 # .
47 7 # /
48 7 # 0
49 7 # 1
50 7 # 2
51 7 # 3
52 7 # 4
53 7 # 5
54 7 # 6
55 7 # 7
56 7 # 8
57 7 # 9
58 7 # :
59 7 # ;
60 7 # <
61 7 # =
62 7 # >
63 7 # ?
64 7 # @
65 7 # A
66 7 # B
67 7 # C
68 7 # D
69 7 # E
70 7 # F
71 7 # G
72 7 # H
73 7 # I
74 7 # J
75 7 # K
76 7 # L
77 7 # M
78 7 # N
79 7 # O
80 7 # P
81 7 # Q
82 7 # R
83 7 # S
84 7 # T
85 7 # U
86 7 # V
87 7 # W
88 7 # X
89 7 # Y
90 7 # Z
91 7 # [
92 7 # \
93 7 # ]
94 7 # ^
95 7 # _
96 7 # `
97 7 # a
98 7 # b
99 7 # c
100 7 # d
101 7 # e
102 7 # f
103 7 # g
104 7 # h
105 7 # i
106 7 # j
107 7 # k
108 7 # l
109 7 # m
110 7 # n
111 7 # o
112 7 # p
113 7 # q
114 7 # r
115 7 # s
116 7 # t
117 7 # u
118 7 # v
119 7 # w
120 7 # x
121 7 # y
122 7 # z
123 7 # {
124 7 # |
125 7 # }
126 7 # ~
192 7 # À
193 7 # Á
200 7 # È
201 7 # É
204 7 # Ì
205 7 # Í
210 7 # Ò
211 7 # Ó
217 7 # Ù
218 7 # Ú
209 7 # Ñ
199 7 # Ç
224 7 # à
225 7 # á
232 7 # è
233 7 # é
236 7 # ì
237 7 # í
242 7 # ò
243 7 # ó
249 7 # ù
250 7 # ú
241 7 # ñ
231 7 # ç
161 7 # ¡
191 7 # ¿
171 7 # «
187 7 # »
183 7 # ·
228 7 # ä (corazón)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

After

Width:  |  Height:  |  Size: 1001 B

View File

@@ -1,194 +0,0 @@
# box width
8
# box height
8
# 32 espacio ( )
7
# 33 !
7
# 34 "
7
# 35 #
7
# 36 $
7
# 37 %
7
# 38 &
7
# 39 '
7
# 40 (
7
# 41 )
7
# 42 *
7
# 43 +
7
# 44 ,
7
# 45 -
7
# 46 .
7
# 47 /
7
# 48 0
7
# 49 1
7
# 50 2
7
# 51 3
7
# 52 4
7
# 53 5
7
# 54 6
7
# 55 7
7
# 56 8
7
# 57 9
7
# 58 :
7
# 59 ;
7
# 60 <
7
# 61 =
7
# 62 >
7
# 63 ?
7
# 64 @
7
# 65 A
7
# 66 B
7
# 67 C
7
# 68 D
7
# 69 E
7
# 70 F
7
# 71 G
7
# 72 H
7
# 73 I
7
# 74 J
7
# 75 K
7
# 76 L
7
# 77 M
7
# 78 N
7
# 79 O
7
# 80 P
7
# 81 Q
7
# 82 R
7
# 83 S
7
# 84 T
7
# 85 U
7
# 86 V
7
# 87 W
7
# 88 X
7
# 89 Y
7
# 90 Z
7
# 91 [
7
# 92 \
7
# 93 ]
7
# 94 ^
7
# 95 _
7
# 96 `
7
# 97 a
7
# 98 b
7
# 99 c
7
# 100 d
7
# 101 e
7
# 102 f
7
# 103 g
7
# 104 h
7
# 105 i
7
# 106 j
7
# 107 k
7
# 108 l
7
# 109 m
7
# 110 n
7
# 111 o
7
# 112 p
7
# 113 q
7
# 114 r
7
# 115 s
7
# 116 t
7
# 117 u
7
# 118 v
7
# 119 w
7
# 120 x
7
# 121 y
7
# 122 z
7
# 123 {
7
# 124 |
7
# 125 }
7
# 126 ~
7

132
data/font/subatomic.fnt Normal file
View File

@@ -0,0 +1,132 @@
# Font: subatomic — generado desde atomics.TTF size 6
# Generado con tools/font_gen/font_gen.py
box_width 7
box_height 7
columns 15
# codepoint_decimal ancho_visual
32 4 # U+0020
33 1 # !
34 3 # "
35 5 # #
36 5 # $
37 5 # %
38 6 # &
39 1 # '
40 2 # (
41 2 # )
42 5 # *
43 5 # +
44 1 # ,
45 5 # -
46 1 # .
47 5 # /
48 5 # 0
49 2 # 1
50 5 # 2
51 5 # 3
52 5 # 4
53 5 # 5
54 5 # 6
55 5 # 7
56 5 # 8
57 5 # 9
58 1 # :
59 1 # ;
60 3 # <
61 5 # =
62 3 # >
63 4 # ?
64 5 # @
65 5 # A
66 5 # B
67 5 # C
68 5 # D
69 4 # E
70 5 # F
71 5 # G
72 5 # H
73 1 # I
74 5 # J
75 5 # K
76 4 # L
77 5 # M
78 5 # N
79 5 # O
80 5 # P
81 5 # Q
82 5 # R
83 5 # S
84 5 # T
85 5 # U
86 5 # V
87 5 # W
88 5 # X
89 5 # Y
90 5 # Z
91 2 # [
92 5 # \
93 2 # ]
94 3 # ^
95 5 # _
96 2 # `
97 4 # a
98 4 # b
99 3 # c
100 4 # d
101 4 # e
102 3 # f
103 4 # g
104 4 # h
105 1 # i
106 2 # j
107 3 # k
108 1 # l
109 5 # m
110 4 # n
111 4 # o
112 4 # p
113 4 # q
114 3 # r
115 4 # s
116 2 # t
117 4 # u
118 4 # v
119 5 # w
120 3 # x
121 4 # y
122 4 # z
123 3 # {
124 1 # |
125 3 # }
126 4 # ~
192 5 # À
193 5 # Á
200 4 # È
201 4 # É
204 1 # Ì
205 1 # Í
210 5 # Ò
211 5 # Ó
217 5 # Ù
218 5 # Ú
209 5 # Ñ
199 5 # Ç
224 4 # à
225 4 # á
232 4 # è
233 4 # é
236 1 # ì
237 1 # í
242 4 # ò
243 4 # ó
249 4 # ù
250 4 # ú
241 4 # ñ
231 3 # ç
161 1 # ¡
191 4 # ¿
171 3 # «
187 3 # »
183 1 # ·

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 648 B

View File

@@ -1,194 +0,0 @@
# box width
7
# box height
7
# 32 espacio ( )
4
# 33 !
1
# 34 "
3
# 35 #
5
# 36 $
5
# 37 %
5
# 38 &
6
# 39 '
1
# 40 (
2
# 41 )
2
# 42 *
5
# 43 +
5
# 44 ,
1
# 45 -
5
# 46 .
1
# 47 /
5
# 48 0
5
# 49 1
2
# 50 2
5
# 51 3
5
# 52 4
5
# 53 5
5
# 54 6
5
# 55 7
5
# 56 8
5
# 57 9
5
# 58 :
1
# 59 ;
2
# 60 <
3
# 61 =
5
# 62 >
3
# 63 ?
4
# 64 @
5
# 65 A
5
# 66 B
5
# 67 C
5
# 68 D
5
# 69 E
4
# 70 F
5
# 71 G
5
# 72 H
5
# 73 I
1
# 74 J
5
# 75 K
5
# 76 L
2
# 77 M
5
# 78 N
5
# 79 O
5
# 80 P
5
# 81 Q
5
# 82 R
5
# 83 S
5
# 84 T
5
# 85 U
5
# 86 V
5
# 87 W
5
# 88 X
5
# 89 Y
5
# 90 Z
5
# 91 [
2
# 92 \
5
# 93 ]
2
# 94 ^
3
# 95 _
5
# 96 `
2
# 97 a
4
# 98 b
4
# 99 c
3
# 100 d
4
# 101 e
4
# 102 f
3
# 103 g
4
# 104 h
4
# 105 i
1
# 106 j
2
# 107 k
3
# 108 l
1
# 109 m
5
# 110 n
4
# 111 o
4
# 112 p
4
# 113 q
4
# 114 r
3
# 115 s
4
# 116 t
2
# 117 u
4
# 118 v
4
# 119 w
5
# 120 x
3
# 121 y
4
# 122 z
4
# 123 {
0
# 124 |
0
# 125 }
0
# 126 ~
0

140
data/locale/ca.yaml Normal file
View File

@@ -0,0 +1,140 @@
# JailDoctor's Dilemma - Catalan Locale
# lang: ca
title:
marquee: "EI JAILERS!! ESTEM EN 2022 I ENCARA HO PETEM COM EN 1998!! QUÉ, HO HEU SENTIT O NO? ELS JAILGAMES HAN TORNAT!! SÍ, COLLONS, HAN TORNAT!! MÉS DE 10 TÍTOLS QUE EL JAILDOC TÉ EN LA CUINA A FOC LENT!! MOLT LENT!! AIXÒ ÉS UNA BARBARITAT, PERÒ... QUIN EIXIRÀ PRIMER? I ATENCIÓ, QUE HI HA UN APARELLET NOU QUE VOS FARÀ VOLAR EL CAP: EL P.A.C.O.! PERÒ UN MOMENT... QUÈ ÉS AQUELLA COSETA QUE VE PER ALLÀ? OOOH, AQUELLA MINIASCII ÉS AMOR DEL BO!! LI PEGARIA UNA LLEPAETA A CADA BYTE! OSTRES! I NO VOS OBLIDEU DE PUJAR AQUELLS JAILGAMES VELLS I PANXUTS DE MS-DOS A GITHUB, QUE SI NO ES PERDRAN!! QUIN SERÀ EL PRÒXIM PROJECTE DE JAILDOC? SERÀ UN PROJECTE DE MERDA? AI MARE... NI IDEA, PERÒ ACÍ PODEU SABER-HO SI RESOLEU EL DILEMA DEL JAILDOCTOR... VOS ATREVIU O QUÈ? VAAAAA!!!"
menu:
play: "1. JUGAR"
keyboard: "2. REDEFINIR TECLES"
joystick: "3. REDEFINIR MANDO"
projects: "4. PROJECTES"
keys:
prompt0: "PREM UNA TECLA PER A ESQUERRA"
prompt1: "PREM UNA TECLA PER A DRETA"
prompt2: "PREM UNA TECLA PER A SALTAR"
defined: "TECLES DEFINIDES"
label0: "ESQUERRA: "
label1: "DRETA: "
label2: "SALTAR: "
invalid: "TECLA INVÀLIDA! PROVA'N UNA ALTRA"
already_used: "TECLA JA USADA! PROVA'N UNA ALTRA"
buttons:
prompt0: "PREM UN BOTÓ PER A ESQUERRA"
prompt1: "PREM UN BOTÓ PER A DRETA"
prompt2: "PREM UN BOTÓ PER A SALTAR"
defined: "BOTONS DEFINITS"
already_used: "BOTÓ JA USAT! PROVA'N UN ALTRE"
projects: "PROJECTES"
game_over:
title: "G A M E O V E R"
items: "OBJECTES: "
rooms: "SALES: "
worst_nightmare: "EL TEU PITJOR MALSON ÉS"
ending:
t0: "FINALMENT HO VA ACONSEGUIR"
t1: "ARRIBAR A LA JAIL"
t2: "AMB TOTS ELS SEUS PROJECTES"
t3: "A PUNT D'ALLIBERAR-LOS"
t4: "ALLÍ ESTAVEN TOTS ELS JAILERS"
t5: "ESPERANT QUE ELS JAILGAMES"
t6: "FOREN ALLIBERATS"
t7: "HI HAVIA FINS I TOT BARRULLS"
t8: "I BEGGINERS ENTRE LA GENT"
t9: "BRY ESTAVA PLORANT..."
t10: "PERÒ DE SOBTE ALGUNA COSA"
t11: "LI VA CRIDAR L'ATENCIÓ"
t12: "UN MUNT DE FERRALLA!"
t13: "PLE DE TRASTOS QUE NI ANAVEN!!"
t14: "I ALESHORES,"
t15: "QUARANTA PROJECTES NOUS"
t16: "VAN NÀIXER..."
ending2:
starring: "PROTAGONISTES"
jaildoctor: "JAILDOCTOR"
thank_you: "GRÀCIES"
for_playing: "PER JUGAR!"
credits:
instructions: "INSTRUCCIONS:"
l0: "AJUDA A JAILDOC A RECUPERAR"
l1: "ELS SEUS PROJECTES I ARRIBAR"
l2: "A LA JAIL PER ACABAR-LOS"
keys: "TECLES:"
keys_move: "CURSORS PER A MOURE I SALTAR"
f8: "F8 ACTIVAR/DESACTIVAR MÚSICA"
f11: "F11 PAUSAR EL JOC"
f1f2: "F1-F2 MIDA DE LA FINESTRA"
f3: "F3 PANTALLA COMPLETA"
f9: "F9 VORA DE LA PANTALLA"
author: "UN JOC DE JAILDESIGNER"
date: "FET A L'ESTIU/TARDOR DEL 2022"
love: "I LOVE JAILGAMES! "
achievements:
header: "ASSOLIMENT DESBLOQUEJAT!"
c1: "COSES BRILLANTS"
d1: "Aconseguiu el 25% dels objectes"
c2: "A MITJAN CAMÍ"
d2: "Aconseguiu el 50% dels objectes"
c3: "QUASI HI SOM"
d3: "Aconseguiu el 75% dels objectes"
c4: "EL COL·LECCIONISTA"
d4: "Aconseguiu el 100% dels objectes"
c5: "PASSEJANT PER ACÍ"
d5: "Visiteu 20 sales"
c6: "M'HE PERDUT"
d6: "Visiteu 40 sales"
c7: "M'AGRADA EXPLORAR"
d7: "Visiteu totes les sales"
c8: "JA ESTÀ?"
d8: "Completeu el joc"
c9: "UN FORAT EM VA ENGOLIR"
d9: "Completeu el joc sense entrar a la presó"
c10: "ELS MEUS PROJECTES"
d10: "Completeu el joc amb tots els objectes"
c11: "M'AGRADEN ELS MEUS AMICS DE COLORS"
d11: "Completeu el joc sense morir"
c12: "PROJECTES A CORRE-CUITA"
d12: "Completeu el joc en menys de 30 minuts"
ui:
press_again_menu: "PREM DE NOU PER TORNAR AL MENÚ"
press_again_exit: "PREM DE NOU PER EIXIR"
border_enabled: "VORA ACTIVADA"
border_disabled: "VORA DESACTIVADA"
fullscreen_enabled: "PANTALLA COMPLETA ACTIVADA"
fullscreen_disabled: "PANTALLA COMPLETA DESACTIVADA"
window_zoom: "ZOOM FINESTRA x"
shaders_enabled: "SHADERS ACTIVATS"
shaders_disabled: "SHADERS DESACTIVATS"
shader: "SHADER"
postfx: "POSTFX"
crtpi: "CRTPI"
supersampling_enabled: "SUPERMOSTREIG ACTIVAT"
supersampling_disabled: "SUPERMOSTREIG DESACTIVAT"
palette: "PALETA"
integer_scale_enabled: "ESCALAT SENCER ACTIVAT"
integer_scale_disabled: "ESCALAT SENCER DESACTIVAT"
vsync_enabled: "V-SYNC ACTIVAT"
vsync_disabled: "V-SYNC DESACTIVAT"
scoreboard:
items: "TRESORS PILLATS "
time: " HORA "
rooms: "SALES"
game:
music_enabled: "MÚSICA ACTIVADA"
music_disabled: "MÚSICA DESACTIVADA"
paused: "JOC EN PAUSA"
running: "JOC EN MARXA"
enabled: " ACTIVAT"
disabled: " DESACTIVAT"
cheat_infinite_lives: "VIDES INFINITES"
cheat_invincible: "INVENCIBLE"
cheat_jail_open: "JAIL OBERTA"
debug_enabled: "DEBUG ACTIVAT"
debug_disabled: "DEBUG DESACTIVAT"

140
data/locale/en.yaml Normal file
View File

@@ -0,0 +1,140 @@
# JailDoctor's Dilemma - English Locale
# lang: en
title:
marquee: "HEY JAILERS!! IT'S 2022 AND WE'RE STILL ROCKING LIKE IT'S 1998!!! HAVE YOU HEARD IT? JAILGAMES ARE BACK!! YEEESSS BACK!! MORE THAN 10 TITLES ON JAILDOC'S KITCHEN!! THATS A LOOOOOOT OF JAILGAMES, BUT WHICH ONE WILL STRIKE FIRST? THERE IS ALSO A NEW DEVICE TO COME THAT WILL BLOW YOUR MIND WITH JAILGAMES ON THE GO: P.A.C.O. BUT WAIT! WHAT'S THAT BEAUTY I'M SEEING RIGHT OVER THERE?? OOOH THAT TINY MINIASCII IS PURE LOVE!! I WANT TO LICK EVERY BYTE OF IT!! OH SHIT! AND DON'T FORGET TO BRING BACK THOSE OLD AND FAT MS-DOS JAILGAMES TO GITHUB TO KEEP THEM ALIVE!! WHAT WILL BE THE NEXT JAILDOC RELEASE? WHAT WILL BE THE NEXT PROJECT TO COME ALIVE?? OH BABY WE DON'T KNOW BUT HERE YOU CAN FIND THE ANSWER, YOU JUST HAVE TO COMPLETE JAILDOCTOR'S DILEMMA ... COULD YOU?"
menu:
play: "1. PLAY"
keyboard: "2. REDEFINE KEYBOARD"
joystick: "3. REDEFINE JOYSTICK"
projects: "4. PROJECTS"
keys:
prompt0: "PRESS KEY FOR LEFT"
prompt1: "PRESS KEY FOR RIGHT"
prompt2: "PRESS KEY FOR JUMP"
defined: "KEYS DEFINED"
label0: "LEFT: "
label1: "RIGHT: "
label2: "JUMP: "
invalid: "INVALID KEY! TRY ANOTHER"
already_used: "KEY ALREADY USED! TRY ANOTHER"
buttons:
prompt0: "PRESS BUTTON FOR LEFT"
prompt1: "PRESS BUTTON FOR RIGHT"
prompt2: "PRESS BUTTON FOR JUMP"
defined: "BUTTONS DEFINED"
already_used: "BUTTON ALREADY USED! TRY ANOTHER"
projects: "PROJECTS"
game_over:
title: "G A M E O V E R"
items: "ITEMS: "
rooms: "ROOMS: "
worst_nightmare: "YOUR WORST NIGHTMARE IS"
ending:
t0: "HE FINALLY MANAGED"
t1: "TO GET TO THE JAIL"
t2: "WITH ALL HIS PROJECTS"
t3: "READY TO BE FREED"
t4: "ALL THE JAILERS WERE THERE"
t5: "WAITING FOR THE JAILGAMES"
t6: "TO BE RELEASED"
t7: "THERE WERE EVEN BARRULLS AND"
t8: "BEGINNERS AMONG THE CROWD"
t9: "BRY WAS CRYING..."
t10: "BUT SUDDENLY SOMETHING"
t11: "CAUGHT HIS ATTENTION"
t12: "A PILE OF JUNK!"
t13: "FULL OF NON WORKING TRASH!!"
t14: "AND THEN,"
t15: "FOURTY NEW PROJECTS"
t16: "WERE BORN..."
ending2:
starring: "STARRING"
jaildoctor: "JAILDOCTOR"
thank_you: "THANK YOU"
for_playing: "FOR PLAYING!"
credits:
instructions: "INSTRUCTIONS:"
l0: "HELP JAILDOC TO GET BACK ALL"
l1: "HIS PROJECTS AND GO TO THE"
l2: "JAIL TO FINISH THEM"
keys: "KEYS:"
keys_move: "CURSORS TO MOVE AND JUMP"
f8: "F8 TOGGLE THE MUSIC"
f11: "F11 PAUSE THE GAME"
f1f2: "F1-F2 WINDOWS SIZE"
f3: "F3 TOGGLE FULLSCREEN"
f9: "F9 TOOGLE BORDER SCREEN"
author: "A GAME BY JAILDESIGNER"
date: "MADE ON SUMMER/FALL 2022"
love: "I LOVE JAILGAMES! "
achievements:
header: "ACHIEVEMENT UNLOCKED!"
c1: "SHINY THINGS"
d1: "Get 25% of the items"
c2: "HALF THE WORK"
d2: "Get 50% of the items"
c3: "GETTING THERE"
d3: "Get 75% of the items"
c4: "THE COLLECTOR"
d4: "Get 100% of the items"
c5: "WANDERING AROUND"
d5: "Visit 20 rooms"
c6: "I GOT LOST"
d6: "Visit 40 rooms"
c7: "I LIKE TO EXPLORE"
d7: "Visit all rooms"
c8: "FINISH THE GAME"
d8: "Complete the game"
c9: "I WAS SUCKED BY A HOLE"
d9: "Complete the game without entering the jail"
c10: "MY LITTLE PROJECTS"
d10: "Complete the game with all items"
c11: "I LIKE MY MULTICOLOURED FRIENDS"
d11: "Complete the game without dying"
c12: "SHIT PROJECTS DONE FAST"
d12: "Complete the game in under 30 minutes"
ui:
press_again_menu: "PRESS AGAIN TO RETURN TO MENU"
press_again_exit: "PRESS AGAIN TO EXIT"
border_enabled: "BORDER ENABLED"
border_disabled: "BORDER DISABLED"
fullscreen_enabled: "FULLSCREEN ENABLED"
fullscreen_disabled: "FULLSCREEN DISABLED"
window_zoom: "WINDOW ZOOM x"
shaders_enabled: "SHADERS ON"
shaders_disabled: "SHADERS OFF"
shader: "SHADER"
postfx: "POSTFX"
crtpi: "CRTPI"
supersampling_enabled: "SUPERSAMPLING ON"
supersampling_disabled: "SUPERSAMPLING OFF"
palette: "PALETTE"
integer_scale_enabled: "INTEGER SCALE ENABLED"
integer_scale_disabled: "INTEGER SCALE DISABLED"
vsync_enabled: "V-SYNC ENABLED"
vsync_disabled: "V-SYNC DISABLED"
scoreboard:
items: "ITEMS COLLECTED "
time: " TIME "
rooms: "ROOMS"
game:
music_enabled: "MUSIC ENABLED"
music_disabled: "MUSIC DISABLED"
paused: "GAME PAUSED"
running: "GAME RUNNING"
enabled: " ENABLED"
disabled: " DISABLED"
cheat_infinite_lives: "INFINITE LIVES"
cheat_invincible: "INVINCIBLE"
cheat_jail_open: "JAIL IS OPEN"
debug_enabled: "DEBUG ENABLED"
debug_disabled: "DEBUG DISABLED"

View File

@@ -1,6 +1,7 @@
# THE JAIL # THE JAIL
room: room:
name: "THE JAIL" name_en: "THE JAIL"
name_ca: "LA JAIL"
bgColor: bright_blue bgColor: bright_blue
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# ROAD TO THE JAIL # ROAD TO THE JAIL
room: room:
name: "ROAD TO THE JAIL" name_en: "ROAD TO THE JAIL"
name_ca: "CAMI A LA JAIL"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# VOID MAIN # VOID MAIN
room: room:
name: "VOID MAIN" name_en: "VOID MAIN"
name_ca: "VOID MAIN"
bgColor: black bgColor: black
border: magenta border: magenta
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# JUMP THROUGH # JUMP THROUGH
room: room:
name: "JUMP THROUGH" name_en: "JUMP THROUGH"
name_ca: "SALTA A TRAVES"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# BIG JUMP # BIG JUMP
room: room:
name: "BIG JUMP" name_en: "BIG JUMP"
name_ca: "EL GRAN BOT"
bgColor: black bgColor: black
border: red border: red
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# WELCOME TO MY ABBEY # WELCOME TO MY ABBEY
room: room:
name: "WELCOME TO MY ABBEY" name_en: "WELCOME TO MY ABBEY"
name_ca: "BENVINGUT A LA MEUA ABADIA"
bgColor: blue bgColor: blue
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# SIGMASUA > TELEGRAM # SIGMASUA > TELEGRAM
room: room:
name: "SIGMASUA > TELEGRAM" name_en: "SIGMASUA > TELEGRAM"
name_ca: "SIGMASUA > TELEGRAM"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE GARDEN # THE GARDEN
room: room:
name: "THE GARDEN" name_en: "THE GARDEN"
name_ca: "EL JARDI"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE BIG TREE # THE BIG TREE
room: room:
name: "THE BIG TREE" name_en: "THE BIG TREE"
name_ca: "EL GRAN ARBRE"
bgColor: black bgColor: black
border: bright_blue border: bright_blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# TREE TOP # TREE TOP
room: room:
name: "TREE TOP" name_en: "TREE TOP"
name_ca: "DALT DE L'ARBRE"
bgColor: bright_black bgColor: bright_black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# LAZY ROOM # LAZY ROOM
room: room:
name: "LAZY ROOM" name_en: "LAZY ROOM"
name_ca: "LA SALA GOSSA"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE PASSAGE # THE PASSAGE
room: room:
name: "THE PASSAGE" name_en: "THE PASSAGE"
name_ca: "EL PASSATGE"
bgColor: black bgColor: black
border: green border: green
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# TUNO KILLER # TUNO KILLER
room: room:
name: "TUNO KILLER" name_en: "TUNO KILLER"
name_ca: "MATATUNOS"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# KILLING SPREE # KILLING SPREE
room: room:
name: "KILLING SPREE" name_en: "KILLING SPREE"
name_ca: "MATANÇA INDISCRIMINADA"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# NOW THIS IS THE BATCAVE! # NOW THIS IS THE BATCAVE!
room: room:
name: "NOW THIS IS THE BATCAVE!" name_en: "NOW THIS IS THE BATCAVE!"
name_ca: "ESTA SI QUE ES LA BATCOVA!"
bgColor: black bgColor: black
border: black border: black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE FRIDGE # THE FRIDGE
room: room:
name: "THE FRIDGE" name_en: "THE FRIDGE"
name_ca: "EL FRIGO"
bgColor: blue bgColor: blue
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# I DID NOT COPY THIS ONE # I DID NOT COPY THIS ONE
room: room:
name: "I DID NOT COPY THIS ONE" name_en: "I DID NOT COPY THIS ONE"
name_ca: "ESTA NO LA HE COPIADA"
bgColor: black bgColor: black
border: magenta border: magenta
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# MAKE MONEY # MAKE MONEY
room: room:
name: "MAKE MONEY" name_en: "MAKE MONEY"
name_ca: "INHERITEDS!"
bgColor: black bgColor: black
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THIS CAN'T BE THE BATCAVE # THIS CAN'T BE THE BATCAVE
room: room:
name: "THIS CAN'T BE THE BATCAVE" name_en: "THIS CAN'T BE THE BATCAVE"
name_ca: "ESTA NO POT SER LA BATCOVA"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# ENTRANCE TO THE VALLEY # ENTRANCE TO THE VALLEY
room: room:
name: "ENTRANCE TO THE VALLEY" name_en: "ENTRANCE TO THE VALLEY"
name_ca: "ENTRADA A LA VALL"
bgColor: black bgColor: black
border: red border: red
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# ENTER PAKU SIMBEL # ENTER PAKU SIMBEL
room: room:
name: "ENTER PAKU SIMBEL" name_en: "ENTER PAKU SIMBEL"
name_ca: "ACCEDINT A PAKU SIMBEL"
bgColor: bright_black bgColor: bright_black
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# AEE REMAKE, PLEASE # AEE REMAKE, PLEASE
room: room:
name: "AEE REMAKE, PLEASE" name_en: "AEE REMAKE, PLEASE"
name_ca: "AEE REMAKE, PERFAPLIS"
bgColor: bright_black bgColor: bright_black
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# INNER CHAMBER # INNER CHAMBER
room: room:
name: "INNER CHAMBER" name_en: "INNER CHAMBER"
name_ca: "CAMBRA INTERIOR"
bgColor: black bgColor: black
border: bright_yellow border: bright_yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# PLAY IT AGAIN, SAM # PLAY IT AGAIN, SAM
room: room:
name: "PLAY IT AGAIN, SAM" name_en: "PLAY IT AGAIN, SAM"
name_ca: "TORNA-LA A TOCAR, SAM"
bgColor: black bgColor: black
border: bright_yellow border: bright_yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE CHAPPEL # THE CHAPPEL
room: room:
name: "THE CHAPPEL" name_en: "THE CHAPPEL"
name_ca: "LA CAPELLA"
bgColor: blue bgColor: blue
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# JINGLE BELLS # JINGLE BELLS
room: room:
name: "JINGLE BELLS" name_en: "JINGLE BELLS"
name_ca: "CAMPANETES"
bgColor: blue bgColor: blue
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE BACKYARD # THE BACKYARD
room: room:
name: "THE BACKYARD" name_en: "THE BACKYARD"
name_ca: "EL PATI DE DARRERE"
bgColor: blue bgColor: blue
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# YOU SHALL NOT PASS # YOU SHALL NOT PASS
room: room:
name: "YOU SHALL NOT PASS" name_en: "YOU SHALL NOT PASS"
name_ca: "NO PASSARAS"
bgColor: bright_black bgColor: bright_black
border: black border: black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# QUO VOIDIS # QUO VOIDIS
room: room:
name: "QUO VOIDIS" name_en: "QUO VOIDIS"
name_ca: "QUO VOIDIS"
bgColor: blue bgColor: blue
border: bright_black border: bright_black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# QVOID IS A JAILGAME! # QVOID IS A JAILGAME!
room: room:
name: "QVOID IS A JAILGAME!" name_en: "QVOID IS A JAILGAME!"
name_ca: "QVOID ES UN JAILGAME!"
bgColor: blue bgColor: blue
border: bright_black border: bright_black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# 256 COLORS # 256 COLORS
room: room:
name: "256 COLORS" name_en: "256 COLORS"
name_ca: "256 COLORS"
bgColor: black bgColor: black
border: bright_magenta border: bright_magenta
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# ...? # ...?
room: room:
name: "...?" name_en: "...?"
name_ca: "...?"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# } WE ALL LOVE JAILGAMES } # } WE ALL LOVE JAILGAMES }
room: room:
name: "} WE ALL LOVE JAILGAMES }" name_en: "ä WE ALL LOVE JAILGAMES ä"
name_ca: "ä AMOR PELS JAILGAMES ä"
bgColor: black bgColor: black
border: bright_black border: bright_black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# ULA HOP! # ULA HOP!
room: room:
name: "ULA HOP!" name_en: "ULA HOP!"
name_ca: "ULA HOP!"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# SILICON BOOBS # SILICON BOOBS
room: room:
name: "SILICON BOOBS" name_en: "SILICON BOOBS"
name_ca: "MAMELLES DE SILICI"
bgColor: black bgColor: black
border: bright_green border: bright_green
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# BE CAREFUL WITH THE FUSE # BE CAREFUL WITH THE FUSE
room: room:
name: "BE CAREFUL WITH THE FUSE" name_en: "BE CAREFUL WITH THE FUSE"
name_ca: "COMPTE AMB EL FUSIBLE"
bgColor: black bgColor: black
border: bright_cyan border: bright_cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# CHIP'N CHIP # CHIP'N CHIP
room: room:
name: "CHIP'N CHIP" name_en: "CHIP'N CHIP"
name_ca: "CHIP'N CHIP"
bgColor: black bgColor: black
border: bright_green border: bright_green
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE FINAL CROSSOVER # THE FINAL CROSSOVER
room: room:
name: "THE FINAL CROSSOVER" name_en: "THE FINAL CROSSOVER"
name_ca: "EL CROSSOVER DEFINITIU"
bgColor: bright_black bgColor: bright_black
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# YOU'LL BELIEVE AROUNDER CAN FLY # YOU'LL BELIEVE AROUNDER CAN FLY
room: room:
name: "YOU'LL BELIEVE AROUNDER CAN FLY" name_en: "YOU'LL BELIEVE AROUNDER CAN FLY"
name_ca: "CREURAS QUE ELS AROUNDERS VOLEN"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# PREVENT THE CRISIS # PREVENT THE CRISIS
room: room:
name: "PREVENT THE CRISIS" name_en: "PREVENT THE CRISIS"
name_ca: "EVITA LA CRISI"
bgColor: black bgColor: black
border: bright_magenta border: bright_magenta
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# AROUND WITH ME # AROUND WITH ME
room: room:
name: "AROUND WITH ME" name_en: "AROUND WITH ME"
name_ca: "AROUNDA AMB MI"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# P.A.C.O. ON THE GO # P.A.C.O. ON THE GO
room: room:
name: "P.A.C.O. ON THE GO" name_en: "P.A.C.O. ON THE GO"
name_ca: "P.A.C.O. EN MARXA"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE TUBE # THE TUBE
room: room:
name: "THE TUBE" name_en: "THE TUBE"
name_ca: "EL TUB"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# SANDWITCH AND COUNTER # SANDWITCH AND COUNTER
room: room:
name: "SANDWITCH AND COUNTER" name_en: "SANDWITCH AND COUNTER"
name_ca: "SANDVITX I COUNTER STRIKE"
bgColor: black bgColor: black
border: cyan border: cyan
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# FEEL THE PRESSURE # FEEL THE PRESSURE
room: room:
name: "FEEL THE PRESSURE" name_en: "FEEL THE PRESSURE"
name_ca: "NOTA LA PRESSIO"
bgColor: bright_black bgColor: bright_black
border: bright_yellow border: bright_yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# FEEL THE HEAT # FEEL THE HEAT
room: room:
name: "FEEL THE HEAT" name_en: "FEEL THE HEAT"
name_ca: "NOTA EL CALORET"
bgColor: bright_black bgColor: bright_black
border: bright_yellow border: bright_yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE BATTLE NEVER ENDS # THE BATTLE NEVER ENDS
room: room:
name: "THE BATTLE NEVER ENDS" name_en: "THE BATTLE NEVER ENDS"
name_ca: "LA BATALLA MAI ACABA"
bgColor: black bgColor: black
border: white border: white
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# WELCOME TO THE JAILBATTLE # WELCOME TO THE JAILBATTLE
room: room:
name: "WELCOME TO THE JAILBATTLE" name_en: "WELCOME TO THE JAILBATTLE"
name_ca: "BENVINGUTS A JAILBATTLE"
bgColor: green bgColor: green
border: bright_green border: bright_green
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# WE NEED A ROBOT # WE NEED A ROBOT
room: room:
name: "WE NEED A ROBOT" name_en: "WE NEED A JAILROBOT"
name_ca: "NECESSITEM UN JAILROBOT"
bgColor: black bgColor: black
border: red border: red
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# STORED JAILGAMES # STORED JAILGAMES
room: room:
name: "STORED JAILGAMES" name_en: "STORED JAILGAMES"
name_ca: "EL MAGATZEM DE JAILGAMES"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# MINI ASCII # MINI ASCII
room: room:
name: "MINI ASCII" name_en: "MINI ASCII"
name_ca: "MINI ASCII"
bgColor: black bgColor: black
border: black border: black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# BREAKOUT.LUA # BREAKOUT.LUA
room: room:
name: "BREAKOUT.LUA" name_en: "BREAKOUT.LUA"
name_ca: "BREAKOUT.LUA"
bgColor: black bgColor: black
border: black border: black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# P.A.C.O. WORKSHOP # P.A.C.O. WORKSHOP
room: room:
name: "P.A.C.O. WORKSHOP" name_en: "P.A.C.O. WORKSHOP"
name_ca: "EL TALLER DE P.A.C.O."
bgColor: black bgColor: black
border: yellow border: yellow
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THE BASEMENT # THE BASEMENT
room: room:
name: "THE BASEMENT" name_en: "THE BASEMENT"
name_ca: "EL SOTAN"
bgColor: black bgColor: black
border: blue border: blue
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# THAT'S A GUITAR # THAT'S A GUITAR
room: room:
name: "THAT'S A GUITAR" name_en: "THAT'S A GUITAR"
name_ca: "AIXO ES UNA GUITARRA"
bgColor: black bgColor: black
border: black border: black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# HEAVY DEMONS ON LEGGINS # HEAVY DEMONS ON LEGGINS
room: room:
name: "HEAVY DEMONS ON LEGGINS" name_en: "HEAVY DEMONS ON LEGGINS"
name_ca: "DIMONIS HEAVIES AMB MALLES"
bgColor: black bgColor: black
border: black border: black
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# JAILGAMES GO TO HELL # JAILGAMES GO TO HELL
room: room:
name: "JAILGAMES GO TO HELL" name_en: "JAILGAMES GO TO HELL"
name_ca: "JAILGAMES A L'INFERN"
bgColor: red bgColor: red
border: bright_red border: bright_red
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# CHIRPING # CHIRPING
room: room:
name: "CHIRPING" name_en: "CHIRPING"
name_ca: "CHIRPING"
bgColor: black bgColor: black
border: magenta border: magenta
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# STATIC # STATIC
room: room:
name: "STATIC" name_en: "STATIC"
name_ca: "ESTATICA"
bgColor: black bgColor: black
border: bright_magenta border: bright_magenta
tileSetFile: standard.gif tileSetFile: standard.gif

View File

@@ -1,6 +1,7 @@
# MAGNETIC FIELDS # MAGNETIC FIELDS
room: room:
name: "MAGNETIC FIELDS" name_en: "MAGNETIC FIELDS"
name_ca: "CAMPS MAGNETICS"
bgColor: black bgColor: black
border: bright_red border: bright_red
tileSetFile: standard.gif tileSetFile: standard.gif

157
data/shaders/crtpi.glsl Normal file
View File

@@ -0,0 +1,157 @@
#version 330 core
// Configuración
#define SCANLINES
#define MULTISAMPLE
#define GAMMA
//#define FAKE_GAMMA
//#define CURVATURE
//#define SHARPER
#define MASK_TYPE 2
#define CURVATURE_X 0.05
#define CURVATURE_Y 0.1
#define MASK_BRIGHTNESS 0.80
#define SCANLINE_WEIGHT 6.0
#define SCANLINE_GAP_BRIGHTNESS 0.12
#define BLOOM_FACTOR 3.5
#define INPUT_GAMMA 2.4
#define OUTPUT_GAMMA 2.2
// Inputs desde vertex shader
in vec2 vTexCoord;
in float vFilterWidth;
#if defined(CURVATURE)
in vec2 vScreenScale;
#endif
// Output
out vec4 FragColor;
// Uniforms
uniform sampler2D Texture;
uniform vec2 TextureSize;
#if defined(CURVATURE)
vec2 Distort(vec2 coord)
{
vec2 CURVATURE_DISTORTION = vec2(CURVATURE_X, CURVATURE_Y);
vec2 barrelScale = 1.0 - (0.23 * CURVATURE_DISTORTION);
coord *= vScreenScale;
coord -= vec2(0.5);
float rsq = coord.x * coord.x + coord.y * coord.y;
coord += coord * (CURVATURE_DISTORTION * rsq);
coord *= barrelScale;
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5)
coord = vec2(-1.0);
else
{
coord += vec2(0.5);
coord /= vScreenScale;
}
return coord;
}
#endif
float CalcScanLineWeight(float dist)
{
return max(1.0 - dist * dist * SCANLINE_WEIGHT, SCANLINE_GAP_BRIGHTNESS);
}
float CalcScanLine(float dy)
{
float scanLineWeight = CalcScanLineWeight(dy);
#if defined(MULTISAMPLE)
scanLineWeight += CalcScanLineWeight(dy - vFilterWidth);
scanLineWeight += CalcScanLineWeight(dy + vFilterWidth);
scanLineWeight *= 0.3333333;
#endif
return scanLineWeight;
}
void main()
{
#if defined(CURVATURE)
vec2 texcoord = Distort(vTexCoord);
if (texcoord.x < 0.0) {
FragColor = vec4(0.0);
return;
}
#else
vec2 texcoord = vTexCoord;
#endif
vec2 texcoordInPixels = texcoord * TextureSize;
#if defined(SHARPER)
vec2 tempCoord = floor(texcoordInPixels) + 0.5;
vec2 coord = tempCoord / TextureSize;
vec2 deltas = texcoordInPixels - tempCoord;
float scanLineWeight = CalcScanLine(deltas.y);
vec2 signs = sign(deltas);
deltas.x *= 2.0;
deltas = deltas * deltas;
deltas.y = deltas.y * deltas.y;
deltas.x *= 0.5;
deltas.y *= 8.0;
deltas /= TextureSize;
deltas *= signs;
vec2 tc = coord + deltas;
#else
float tempY = floor(texcoordInPixels.y) + 0.5;
float yCoord = tempY / TextureSize.y;
float dy = texcoordInPixels.y - tempY;
float scanLineWeight = CalcScanLine(dy);
float signY = sign(dy);
dy = dy * dy;
dy = dy * dy;
dy *= 8.0;
dy /= TextureSize.y;
dy *= signY;
vec2 tc = vec2(texcoord.x, yCoord + dy);
#endif
vec3 colour = texture(Texture, tc).rgb;
#if defined(SCANLINES)
#if defined(GAMMA)
#if defined(FAKE_GAMMA)
colour = colour * colour;
#else
colour = pow(colour, vec3(INPUT_GAMMA));
#endif
#endif
scanLineWeight *= BLOOM_FACTOR;
colour *= scanLineWeight;
#if defined(GAMMA)
#if defined(FAKE_GAMMA)
colour = sqrt(colour);
#else
colour = pow(colour, vec3(1.0 / OUTPUT_GAMMA));
#endif
#endif
#endif
#if MASK_TYPE == 0
FragColor = vec4(colour, 1.0);
#elif MASK_TYPE == 1
float whichMask = fract(gl_FragCoord.x * 0.5);
vec3 mask;
if (whichMask < 0.5)
mask = vec3(MASK_BRIGHTNESS, 1.0, MASK_BRIGHTNESS);
else
mask = vec3(1.0, MASK_BRIGHTNESS, 1.0);
FragColor = vec4(colour * mask, 1.0);
#elif MASK_TYPE == 2
float whichMask = fract(gl_FragCoord.x * 0.3333333);
vec3 mask = vec3(MASK_BRIGHTNESS, MASK_BRIGHTNESS, MASK_BRIGHTNESS);
if (whichMask < 0.3333333)
mask.x = 1.0;
else if (whichMask < 0.6666666)
mask.y = 1.0;
else
mask.z = 1.0;
FragColor = vec4(colour * mask, 1.0);
#endif
}

48
data/shaders/crtpi.vert Normal file
View File

@@ -0,0 +1,48 @@
#version 330 core
// Configuración
#define SCANLINES
#define MULTISAMPLE
#define GAMMA
//#define FAKE_GAMMA
//#define CURVATURE
//#define SHARPER
#define MASK_TYPE 2
#define CURVATURE_X 0.05
#define CURVATURE_Y 0.1
#define MASK_BRIGHTNESS 0.80
#define SCANLINE_WEIGHT 6.0
#define SCANLINE_GAP_BRIGHTNESS 0.12
#define BLOOM_FACTOR 3.5
#define INPUT_GAMMA 2.4
#define OUTPUT_GAMMA 2.2
// Inputs (desde VAO)
layout(location = 0) in vec2 aPosition;
layout(location = 1) in vec2 aTexCoord;
// Outputs al fragment shader
out vec2 vTexCoord;
out float vFilterWidth;
#if defined(CURVATURE)
out vec2 vScreenScale;
#endif
// Uniforms
uniform vec2 TextureSize;
void main()
{
#if defined(CURVATURE)
vScreenScale = vec2(1.0, 1.0);
#endif
// Calcula filterWidth dinámicamente basándose en la altura de la textura
vFilterWidth = (768.0 / TextureSize.y) / 3.0;
// Pasar coordenadas de textura (invertir Y para SDL)
vTexCoord = vec2(aTexCoord.x, 1.0 - aTexCoord.y) * 1.0001;
// Posición del vértice (ya en espacio de clip [-1, 1])
gl_Position = vec4(aPosition, 0.0, 1.0);
}

View File

@@ -0,0 +1,152 @@
#version 450
// Vulkan GLSL fragment shader — CRT-Pi PostFX
// Algoritmo de scanlines continuas con pesos gaussianos, bloom y máscara de fósforo.
// Basado en el shader CRT-Pi original (GLSL 3.3), portado a GLSL 4.50 con parámetros uniformes.
//
// Compile: glslc -fshader-stage=frag --target-env=vulkan1.0 crtpi_frag.glsl -o crtpi_frag.spv
// xxd -i crtpi_frag.spv > ../../source/core/rendering/sdl3gpu/crtpi_frag_spv.h
layout(location = 0) in vec2 v_uv;
layout(location = 0) out vec4 out_color;
layout(set = 2, binding = 0) uniform sampler2D Texture;
layout(set = 3, binding = 0) uniform CrtPiBlock {
// vec4 #0
float scanline_weight; // Ajuste gaussiano de scanlines (default 6.0)
float scanline_gap_brightness; // Brillo mínimo entre scanlines (default 0.12)
float bloom_factor; // Factor de brillo en zonas iluminadas (default 3.5)
float input_gamma; // Gamma de entrada — linealización (default 2.4)
// vec4 #1
float output_gamma; // Gamma de salida — codificación (default 2.2)
float mask_brightness; // Brillo sub-píxeles de la máscara (default 0.80)
float curvature_x; // Distorsión barrel eje X (default 0.05)
float curvature_y; // Distorsión barrel eje Y (default 0.10)
// vec4 #2
int mask_type; // 0=ninguna, 1=verde/magenta, 2=RGB fósforo
int enable_scanlines; // 0 = off, 1 = on
int enable_multisample; // 0 = off, 1 = on (antialiasing analítico de scanlines)
int enable_gamma; // 0 = off, 1 = on
// vec4 #3
int enable_curvature; // 0 = off, 1 = on
int enable_sharper; // 0 = off, 1 = on
float texture_width; // Ancho del canvas lógico en píxeles
float texture_height; // Alto del canvas lógico en píxeles
} u;
// Distorsión barrel CRT
vec2 distort(vec2 coord, vec2 screen_scale) {
vec2 curvature = vec2(u.curvature_x, u.curvature_y);
vec2 barrel_scale = 1.0 - (0.23 * curvature);
coord *= screen_scale;
coord -= vec2(0.5);
float rsq = coord.x * coord.x + coord.y * coord.y;
coord += coord * (curvature * rsq);
coord *= barrel_scale;
if (abs(coord.x) >= 0.5 || abs(coord.y) >= 0.5) {
return vec2(-1.0); // fuera de pantalla
}
coord += vec2(0.5);
coord /= screen_scale;
return coord;
}
float calcScanLineWeight(float dist) {
return max(1.0 - dist * dist * u.scanline_weight, u.scanline_gap_brightness);
}
float calcScanLine(float dy, float filter_width) {
float weight = calcScanLineWeight(dy);
if (u.enable_multisample != 0) {
weight += calcScanLineWeight(dy - filter_width);
weight += calcScanLineWeight(dy + filter_width);
weight *= 0.3333333;
}
return weight;
}
void main() {
vec2 tex_size = vec2(u.texture_width, u.texture_height);
// filterWidth: equivalente al original (768.0 / TextureSize.y) / 3.0
float filter_width = (768.0 / u.texture_height) / 3.0;
vec2 texcoord = v_uv;
// Curvatura barrel opcional
if (u.enable_curvature != 0) {
texcoord = distort(texcoord, vec2(1.0, 1.0));
if (texcoord.x < 0.0) {
out_color = vec4(0.0, 0.0, 0.0, 1.0);
return;
}
}
vec2 texcoord_in_pixels = texcoord * tex_size;
vec2 tc;
float scan_line_weight;
if (u.enable_sharper != 0) {
// Modo SHARPER: filtrado bicúbico-like con subpixel sharpen
vec2 temp_coord = floor(texcoord_in_pixels) + 0.5;
tc = temp_coord / tex_size;
vec2 deltas = texcoord_in_pixels - temp_coord;
scan_line_weight = calcScanLine(deltas.y, filter_width);
vec2 signs = sign(deltas);
deltas.x *= 2.0;
deltas = deltas * deltas;
deltas.y = deltas.y * deltas.y;
deltas.x *= 0.5;
deltas.y *= 8.0;
deltas /= tex_size;
deltas *= signs;
tc = tc + deltas;
} else {
// Modo estándar
float temp_y = floor(texcoord_in_pixels.y) + 0.5;
float y_coord = temp_y / tex_size.y;
float dy = texcoord_in_pixels.y - temp_y;
scan_line_weight = calcScanLine(dy, filter_width);
float sign_y = sign(dy);
dy = dy * dy;
dy = dy * dy;
dy *= 8.0;
dy /= tex_size.y;
dy *= sign_y;
tc = vec2(texcoord.x, y_coord + dy);
}
vec3 colour = texture(Texture, tc).rgb;
if (u.enable_scanlines != 0) {
if (u.enable_gamma != 0) {
colour = pow(colour, vec3(u.input_gamma));
}
colour *= scan_line_weight * u.bloom_factor;
if (u.enable_gamma != 0) {
colour = pow(colour, vec3(1.0 / u.output_gamma));
}
}
// Máscara de fósforo
if (u.mask_type == 1) {
float which_mask = fract(gl_FragCoord.x * 0.5);
vec3 mask = (which_mask < 0.5)
? vec3(u.mask_brightness, 1.0, u.mask_brightness)
: vec3(1.0, u.mask_brightness, 1.0);
colour *= mask;
} else if (u.mask_type == 2) {
float which_mask = fract(gl_FragCoord.x * 0.3333333);
vec3 mask = vec3(u.mask_brightness);
if (which_mask < 0.3333333)
mask.x = 1.0;
else if (which_mask < 0.6666666)
mask.y = 1.0;
else
mask.z = 1.0;
colour *= mask;
}
out_color = vec4(colour, 1.0);
}

BIN
data/shaders/crtpi_frag.spv Normal file

Binary file not shown.

View File

@@ -0,0 +1,48 @@
#version 450
layout(location = 0) in vec2 v_uv;
layout(location = 0) out vec4 out_color;
layout(set = 2, binding = 0) uniform sampler2D source;
layout(set = 3, binding = 0) uniform DownscaleUniforms {
int algorithm; // 0 = Lanczos2 (ventana 2, ±2 taps), 1 = Lanczos3 (ventana 3, ±3 taps)
float pad0;
float pad1;
float pad2;
} u;
// Kernel Lanczos normalizado: sinc(t) * sinc(t/a) para |t| < a, 0 fuera.
float lanczos(float t, float a) {
t = abs(t);
if (t < 0.0001) { return 1.0; }
if (t >= a) { return 0.0; }
const float PI = 3.14159265358979;
float pt = PI * t;
return (a * sin(pt) * sin(pt / a)) / (pt * pt);
}
void main() {
vec2 src_size = vec2(textureSize(source, 0));
// Posición en coordenadas de texel (centros de texel en N+0.5)
vec2 p = v_uv * src_size;
vec2 p_floor = floor(p);
float a = (u.algorithm == 0) ? 2.0 : 3.0;
int win = int(a);
vec4 color = vec4(0.0);
float weight_sum = 0.0;
for (int j = -win; j <= win; j++) {
for (int i = -win; i <= win; i++) {
// Centro del texel (i,j) relativo a p_floor
vec2 tap_center = p_floor + vec2(float(i), float(j)) + 0.5;
vec2 offset = tap_center - p;
float w = lanczos(offset.x, a) * lanczos(offset.y, a);
color += texture(source, tap_center / src_size) * w;
weight_sum += w;
}
}
out_color = (weight_sum > 0.0) ? (color / weight_sum) : vec4(0.0, 0.0, 0.0, 1.0);
}

View File

@@ -22,6 +22,10 @@ layout(set = 3, binding = 0) uniform PostFXUniforms {
float gamma_strength; float gamma_strength;
float curvature; float curvature;
float bleeding; float bleeding;
float pixel_scale; // physical pixels per logical pixel (vh / tex_height_)
float time; // seconds since SDL init
float oversample; // supersampling factor (1.0 = off, 3.0 = 3×SS)
float flicker; // 0 = off, 1 = phosphor flicker ~50 Hz — 48 bytes total (3 × 16)
} u; } u;
// YCbCr helpers for NTSC bleeding // YCbCr helpers for NTSC bleeding
@@ -64,23 +68,25 @@ void main() {
// Muestra base // Muestra base
vec3 base = texture(scene, uv).rgb; vec3 base = texture(scene, uv).rgb;
// Sangrado NTSC — difuminado horizontal de crominancia // Sangrado NTSC — difuminado horizontal de crominancia.
// step = 1 pixel lógico de juego en UV (corrige SS: textureSize.x = game_w * oversample).
vec3 colour; vec3 colour;
if (u.bleeding > 0.0) { if (u.bleeding > 0.0) {
float tw = float(textureSize(scene, 0).x); float tw = float(textureSize(scene, 0).x);
float step = u.oversample / tw; // 1 pixel lógico en UV
vec3 ycc = rgb_to_ycc(base); vec3 ycc = rgb_to_ycc(base);
vec3 ycc_l2 = rgb_to_ycc(texture(scene, uv - vec2(2.0/tw, 0.0)).rgb); vec3 ycc_l2 = rgb_to_ycc(texture(scene, uv - vec2(2.0*step, 0.0)).rgb);
vec3 ycc_l1 = rgb_to_ycc(texture(scene, uv - vec2(1.0/tw, 0.0)).rgb); vec3 ycc_l1 = rgb_to_ycc(texture(scene, uv - vec2(1.0*step, 0.0)).rgb);
vec3 ycc_r1 = rgb_to_ycc(texture(scene, uv + vec2(1.0/tw, 0.0)).rgb); vec3 ycc_r1 = rgb_to_ycc(texture(scene, uv + vec2(1.0*step, 0.0)).rgb);
vec3 ycc_r2 = rgb_to_ycc(texture(scene, uv + vec2(2.0/tw, 0.0)).rgb); vec3 ycc_r2 = rgb_to_ycc(texture(scene, uv + vec2(2.0*step, 0.0)).rgb);
ycc.yz = (ycc_l2.yz + ycc_l1.yz*2.0 + ycc.yz*2.0 + ycc_r1.yz*2.0 + ycc_r2.yz) / 8.0; ycc.yz = (ycc_l2.yz + ycc_l1.yz*2.0 + ycc.yz*2.0 + ycc_r1.yz*2.0 + ycc_r2.yz) / 8.0;
colour = mix(base, ycc_to_rgb(ycc), u.bleeding); colour = mix(base, ycc_to_rgb(ycc), u.bleeding);
} else { } else {
colour = base; colour = base;
} }
// Aberración cromática // Aberración cromática (drift animado con time para efecto NTSC real)
float ca = u.chroma_strength * 0.005; float ca = u.chroma_strength * 0.005 * (1.0 + 0.15 * sin(u.time * 7.3));
colour.r = texture(scene, uv + vec2(ca, 0.0)).r; colour.r = texture(scene, uv + vec2(ca, 0.0)).r;
colour.b = texture(scene, uv - vec2(ca, 0.0)).b; colour.b = texture(scene, uv - vec2(ca, 0.0)).b;
@@ -90,14 +96,24 @@ void main() {
colour = mix(colour, lin, u.gamma_strength); colour = mix(colour, lin, u.gamma_strength);
} }
// Scanlines // Scanlines — proporción 2/3 brillantes + 1/3 oscuras por fila lógica.
float texHeight = float(textureSize(scene, 0).y); // Casos especiales: 1 subfila → sin efecto; 2 subfilas → 1+1 (50/50).
float scaleY = u.screen_height / texHeight; // Constantes ajustables:
float screenY = uv.y * u.screen_height; const float SCAN_DARK_RATIO = 0.333; // fracción de subfilas oscuras (ps >= 3)
float posInRow = mod(screenY, scaleY); const float SCAN_DARK_FLOOR = 0.42; // multiplicador de brillo de subfilas oscuras
float scanLineDY = posInRow / scaleY - 0.5; if (u.scanline_strength > 0.0) {
float scan = max(1.0 - scanLineDY * scanLineDY * 6.0, 0.12) * 3.5; float ps = max(1.0, round(u.pixel_scale));
colour *= mix(1.0, scan, u.scanline_strength); float frac_in_row = fract(uv.y * u.screen_height);
float row_pos = floor(frac_in_row * ps);
// bright_rows: cuántas subfilas son brillantes
// ps==1 → ps (todo brillante → is_dark nunca se activa)
// ps==2 → 1 brillante + 1 oscura
// ps>=3 → floor(ps * (1 - DARK_RATIO)) brillantes
float bright_rows = (ps < 2.0) ? ps : ((ps < 3.0) ? 1.0 : floor(ps * (1.0 - SCAN_DARK_RATIO)));
float is_dark = step(bright_rows, row_pos);
float scan = mix(1.0, SCAN_DARK_FLOOR, is_dark);
colour *= mix(1.0, scan, u.scanline_strength);
}
if (u.gamma_strength > 0.0) { if (u.gamma_strength > 0.0) {
vec3 enc = pow(colour, vec3(1.0 / 2.2)); vec3 enc = pow(colour, vec3(1.0 / 2.2));
@@ -109,7 +125,8 @@ void main() {
float vignette = 1.0 - dot(d, d) * u.vignette_strength; float vignette = 1.0 - dot(d, d) * u.vignette_strength;
colour *= clamp(vignette, 0.0, 1.0); colour *= clamp(vignette, 0.0, 1.0);
// Máscara de fósforo RGB // Máscara de fósforo RGB — después de scanlines (orden original):
// filas brillantes saturadas → máscara invisible, filas oscuras → RGB visible.
if (u.mask_strength > 0.0) { if (u.mask_strength > 0.0) {
float whichMask = fract(gl_FragCoord.x * 0.3333333); float whichMask = fract(gl_FragCoord.x * 0.3333333);
vec3 mask = vec3(0.80); vec3 mask = vec3(0.80);
@@ -122,5 +139,11 @@ void main() {
colour = mix(colour, colour * mask, u.mask_strength); colour = mix(colour, colour * mask, u.mask_strength);
} }
// Parpadeo de fósforo CRT (~50 Hz)
if (u.flicker > 0.0) {
float flicker_wave = sin(u.time * 100.0) * 0.5 + 0.5;
colour *= 1.0 - u.flicker * 0.04 * flicker_wave;
}
out_color = vec4(colour, 1.0); out_color = vec4(colour, 1.0);
} }

Binary file not shown.

15
data/shaders/upscale.frag Normal file
View File

@@ -0,0 +1,15 @@
#version 450
// Vulkan GLSL fragment shader — Nearest-neighbour upscale pass
// Used as the first render pass when supersampling is active.
// Compile: glslc upscale.frag -o upscale.frag.spv
// xxd -i upscale.frag.spv > ../../source/core/rendering/sdl3gpu/upscale_frag_spv.h
layout(location = 0) in vec2 v_uv;
layout(location = 0) out vec4 out_color;
layout(set = 2, binding = 0) uniform sampler2D scene;
void main() {
out_color = texture(scene, v_uv);
}

Binary file not shown.

View File

@@ -41,7 +41,7 @@ void Audio::update() {
} }
// Reproduce la música // Reproduce la música
void Audio::playMusic(const std::string& name, const int loop) { void Audio::playMusic(const std::string& name, const int loop) { // NOLINT(readability-convert-member-functions-to-static)
bool new_loop = (loop != 0); bool new_loop = (loop != 0);
// Si ya está sonando exactamente la misma pista y mismo modo loop, no hacemos nada // Si ya está sonando exactamente la misma pista y mismo modo loop, no hacemos nada
@@ -71,7 +71,7 @@ void Audio::playMusic(const std::string& name, const int loop) {
} }
// Pausa la música // Pausa la música
void Audio::pauseMusic() { void Audio::pauseMusic() { // NOLINT(readability-convert-member-functions-to-static)
if (music_enabled_ && music_.state == MusicState::PLAYING) { if (music_enabled_ && music_.state == MusicState::PLAYING) {
JA_PauseMusic(); JA_PauseMusic();
music_.state = MusicState::PAUSED; music_.state = MusicState::PAUSED;
@@ -79,7 +79,7 @@ void Audio::pauseMusic() {
} }
// Continua la música pausada // Continua la música pausada
void Audio::resumeMusic() { void Audio::resumeMusic() { // NOLINT(readability-convert-member-functions-to-static)
if (music_enabled_ && music_.state == MusicState::PAUSED) { if (music_enabled_ && music_.state == MusicState::PAUSED) {
JA_ResumeMusic(); JA_ResumeMusic();
music_.state = MusicState::PLAYING; music_.state = MusicState::PLAYING;
@@ -87,7 +87,7 @@ void Audio::resumeMusic() {
} }
// Detiene la música // Detiene la música
void Audio::stopMusic() { void Audio::stopMusic() { // NOLINT(readability-make-member-function-const)
if (music_enabled_) { if (music_enabled_) {
JA_StopMusic(); JA_StopMusic();
music_.state = MusicState::STOPPED; music_.state = MusicState::STOPPED;
@@ -177,6 +177,18 @@ void Audio::initSDLAudio() {
JA_Init(FREQUENCY, SDL_AUDIO_S16LE, 2); JA_Init(FREQUENCY, SDL_AUDIO_S16LE, 2);
enable(Options::audio.enabled); enable(Options::audio.enabled);
// Aplicar estado de música y sonido guardado en las opciones.
// enable() ya aplica los volúmenes, pero no toca music_enabled_/sound_enabled_.
// Si alguno está desactivado, hay que forzar el volumen a 0 en el backend.
if (!Options::audio.music.enabled) {
setMusicVolume(0.0F); // music_enabled_=true aún → llega a JA
enableMusic(false);
}
if (!Options::audio.sound.enabled) {
setSoundVolume(0.0F); // sound_enabled_=true aún → llega a JA
enableSound(false);
}
std::cout << "\n** AUDIO SYSTEM **\n"; std::cout << "\n** AUDIO SYSTEM **\n";
std::cout << "Audio system initialized successfully\n"; std::cout << "Audio system initialized successfully\n";
} }

View File

@@ -5,16 +5,15 @@
#include <string> // Para allocator, operator+, char_traits, string #include <string> // Para allocator, operator+, char_traits, string
#include <vector> // Para vector #include <vector> // Para vector
#include "core/input/input.hpp" // Para Input, InputAction, Input::DO_NOT_ALLOW_REPEAT #include "core/input/input.hpp" // Para Input, InputAction, Input::DO_NOT_ALLOW_REPEAT
#include "core/rendering/screen.hpp" // Para Screen #include "core/locale/locale.hpp" // Para Locale
#include "game/options.hpp" // Para Options, options, OptionsVideo, Section #include "core/rendering/render_info.hpp" // Para RenderInfo
#include "game/scene_manager.hpp" // Para SceneManager #include "core/rendering/screen.hpp" // Para Screen
#include "game/ui/notifier.hpp" // Para Notifier, NotificationText #include "game/options.hpp" // Para Options, options, OptionsVideo, Section
#include "utils/utils.hpp" // Para stringInVector #include "game/scene_manager.hpp" // Para SceneManager
#include "game/ui/console.hpp" // Para Console
#ifdef _DEBUG #include "game/ui/notifier.hpp" // Para Notifier, NotificationText
#include "core/system/debug.hpp" // Para Debug #include "utils/utils.hpp" // Para stringInVector
#endif
namespace GlobalInputs { namespace GlobalInputs {
@@ -27,7 +26,7 @@ namespace GlobalInputs {
if (stringInVector(Notifier::get()->getCodes(), CODE)) { if (stringInVector(Notifier::get()->getCodes(), CODE)) {
SceneManager::current = SceneManager::Scene::TITLE; SceneManager::current = SceneManager::Scene::TITLE;
} else { } else {
Notifier::get()->show({CODE}, Notifier::Style::DEFAULT, -1, true, CODE); Notifier::get()->show({Locale::get()->get("ui.press_again_menu")}, Notifier::Style::DEFAULT, -1, true, CODE); // NOLINT(readability-static-accessed-through-instance)
} }
return; return;
} }
@@ -47,7 +46,7 @@ namespace GlobalInputs {
if (stringInVector(Notifier::get()->getCodes(), CODE)) { if (stringInVector(Notifier::get()->getCodes(), CODE)) {
SceneManager::current = SceneManager::Scene::QUIT; SceneManager::current = SceneManager::Scene::QUIT;
} else { } else {
Notifier::get()->show({CODE}, Notifier::Style::DEFAULT, -1, true, CODE); Notifier::get()->show({Locale::get()->get("ui.press_again_exit")}, Notifier::Style::DEFAULT, -1, true, CODE); // NOLINT(readability-static-accessed-through-instance)
} }
} }
@@ -71,73 +70,74 @@ namespace GlobalInputs {
void handleToggleBorder() { void handleToggleBorder() {
Screen::get()->toggleBorder(); Screen::get()->toggleBorder();
Notifier::get()->show({"BORDER " + std::string(Options::video.border.enabled ? "ENABLED" : "DISABLED")}); Notifier::get()->show({Locale::get()->get(Options::video.border.enabled ? "ui.border_enabled" : "ui.border_disabled")}); // NOLINT(readability-static-accessed-through-instance)
} }
void handleToggleVideoMode() { void handleToggleVideoMode() {
Screen::get()->toggleVideoMode(); Screen::get()->toggleVideoMode();
Notifier::get()->show({"FULLSCREEN " + std::string(static_cast<int>(Options::video.fullscreen) == 0 ? "DISABLED" : "ENABLED")}); Notifier::get()->show({Locale::get()->get(static_cast<int>(Options::video.fullscreen) == 0 ? "ui.fullscreen_disabled" : "ui.fullscreen_enabled")}); // NOLINT(readability-static-accessed-through-instance)
} }
void handleDecWindowZoom() { void handleDecWindowZoom() {
if (Screen::get()->decWindowZoom()) { if (Screen::get()->decWindowZoom()) {
Notifier::get()->show({"WINDOW ZOOM x" + std::to_string(Options::window.zoom)}); Notifier::get()->show({Locale::get()->get("ui.window_zoom") + std::to_string(Options::window.zoom)}); // NOLINT(readability-static-accessed-through-instance)
} }
} }
void handleIncWindowZoom() { void handleIncWindowZoom() {
if (Screen::get()->incWindowZoom()) { if (Screen::get()->incWindowZoom()) {
Notifier::get()->show({"WINDOW ZOOM x" + std::to_string(Options::window.zoom)}); Notifier::get()->show({Locale::get()->get("ui.window_zoom") + std::to_string(Options::window.zoom)}); // NOLINT(readability-static-accessed-through-instance)
} }
} }
void handleTogglePostFX() { void handleToggleShaders() {
Screen::get()->togglePostFX(); Screen::get()->toggleShaders();
Notifier::get()->show({"POSTFX " + std::string(Options::video.postfx ? "ENABLED" : "DISABLED")}); Notifier::get()->show({Locale::get()->get(Options::video.postfx ? "ui.shaders_enabled" : "ui.shaders_disabled")}); // NOLINT(readability-static-accessed-through-instance)
} }
void handleNextPostFXPreset() { void handleNextShaderPreset() {
if (!Options::postfx_presets.empty()) { if (Options::current_shader == Rendering::ShaderType::CRTPI) {
Options::current_postfx_preset = (Options::current_postfx_preset + 1) % static_cast<int>(Options::postfx_presets.size()); if (!Options::crtpi_presets.empty()) {
Screen::get()->reloadPostFX(); Options::current_crtpi_preset = (Options::current_crtpi_preset + 1) % static_cast<int>(Options::crtpi_presets.size());
Notifier::get()->show({"POSTFX " + Options::postfx_presets[static_cast<size_t>(Options::current_postfx_preset)].name}); Screen::get()->reloadCrtPi();
Notifier::get()->show({Locale::get()->get("ui.crtpi") + " " + Options::crtpi_presets[static_cast<size_t>(Options::current_crtpi_preset)].name}); // NOLINT(readability-static-accessed-through-instance)
}
} else {
if (!Options::postfx_presets.empty()) {
Options::current_postfx_preset = (Options::current_postfx_preset + 1) % static_cast<int>(Options::postfx_presets.size());
Screen::get()->reloadPostFX();
Notifier::get()->show({Locale::get()->get("ui.postfx") + " " + Options::postfx_presets[static_cast<size_t>(Options::current_postfx_preset)].name}); // NOLINT(readability-static-accessed-through-instance)
}
} }
} }
void handleNextShader() {
Screen::get()->nextShader();
Notifier::get()->show({Locale::get()->get("ui.shader") + " " + // NOLINT(readability-static-accessed-through-instance)
(Options::current_shader == Rendering::ShaderType::CRTPI ? "CRTPI" : "POSTFX")});
}
void handleNextPalette() { void handleNextPalette() {
Screen::get()->nextPalette(); Screen::get()->nextPalette();
Notifier::get()->show({"PALETTE " + Options::video.palette}); Notifier::get()->show({Locale::get()->get("ui.palette") + " " + Options::video.palette}); // NOLINT(readability-static-accessed-through-instance)
} }
void handlePreviousPalette() { void handlePreviousPalette() {
Screen::get()->previousPalette(); Screen::get()->previousPalette();
Notifier::get()->show({"PALETTE " + Options::video.palette}); Notifier::get()->show({Locale::get()->get("ui.palette") + " " + Options::video.palette}); // NOLINT(readability-static-accessed-through-instance)
} }
void handleToggleIntegerScale() { void handleToggleIntegerScale() {
Screen::get()->toggleIntegerScale(); Screen::get()->toggleIntegerScale();
Screen::get()->setVideoMode(Options::video.fullscreen); Screen::get()->setVideoMode(Options::video.fullscreen);
Notifier::get()->show({"INTEGER SCALE " + std::string(Options::video.integer_scale ? "ENABLED" : "DISABLED")}); Notifier::get()->show({Locale::get()->get(Options::video.integer_scale ? "ui.integer_scale_enabled" : "ui.integer_scale_disabled")}); // NOLINT(readability-static-accessed-through-instance)
} }
void handleToggleVSync() { void handleToggleVSync() {
Screen::get()->toggleVSync(); Screen::get()->toggleVSync();
Notifier::get()->show({"V-SYNC " + std::string(Options::video.vertical_sync ? "ENABLED" : "DISABLED")}); Notifier::get()->show({Locale::get()->get(Options::video.vertical_sync ? "ui.vsync_enabled" : "ui.vsync_disabled")}); // NOLINT(readability-static-accessed-through-instance)
} }
#ifdef _DEBUG
void handleShowDebugInfo() {
Screen::get()->toggleDebugInfo();
}
/*
void handleToggleDebug() {
Debug::get()->toggleEnabled();
Notifier::get()->show({"DEBUG " + std::string(Debug::get()->isEnabled() ? "ENABLED" : "DISABLED")}, Notifier::TextAlign::CENTER);
}
*/
#endif
// Detecta qué acción global ha sido presionada (si alguna) // Detecta qué acción global ha sido presionada (si alguna)
auto getPressedAction() -> InputAction { auto getPressedAction() -> InputAction {
if (Input::get()->checkAction(InputAction::EXIT, Input::DO_NOT_ALLOW_REPEAT)) { if (Input::get()->checkAction(InputAction::EXIT, Input::DO_NOT_ALLOW_REPEAT)) {
@@ -161,10 +161,13 @@ void handleToggleDebug() {
} }
} }
if (Input::get()->checkAction(InputAction::TOGGLE_POSTFX, Input::DO_NOT_ALLOW_REPEAT)) { if (Input::get()->checkAction(InputAction::TOGGLE_POSTFX, Input::DO_NOT_ALLOW_REPEAT)) {
if (Options::video.postfx && ((SDL_GetModState() & SDL_KMOD_SHIFT) != 0U)) { if ((SDL_GetModState() & SDL_KMOD_CTRL) != 0U) {
return InputAction::NEXT_POSTFX_PRESET; return InputAction::TOGGLE_SUPERSAMPLING; // Ctrl+F4
} }
return InputAction::TOGGLE_POSTFX; if (Options::video.postfx && ((SDL_GetModState() & SDL_KMOD_SHIFT) != 0U)) {
return InputAction::NEXT_POSTFX_PRESET; // Shift+F4
}
return InputAction::TOGGLE_POSTFX; // F4
} }
if (Input::get()->checkAction(InputAction::NEXT_PALETTE, Input::DO_NOT_ALLOW_REPEAT)) { if (Input::get()->checkAction(InputAction::NEXT_PALETTE, Input::DO_NOT_ALLOW_REPEAT)) {
return InputAction::NEXT_PALETTE; return InputAction::NEXT_PALETTE;
@@ -184,6 +187,9 @@ void handleToggleDebug() {
if (Input::get()->checkAction(InputAction::SHOW_DEBUG_INFO, Input::DO_NOT_ALLOW_REPEAT)) { if (Input::get()->checkAction(InputAction::SHOW_DEBUG_INFO, Input::DO_NOT_ALLOW_REPEAT)) {
return InputAction::SHOW_DEBUG_INFO; return InputAction::SHOW_DEBUG_INFO;
} }
if (Input::get()->checkAction(InputAction::TOGGLE_CONSOLE, Input::DO_NOT_ALLOW_REPEAT)) {
return InputAction::TOGGLE_CONSOLE;
}
return InputAction::NONE; return InputAction::NONE;
} }
@@ -193,19 +199,35 @@ void handleToggleDebug() {
// Comprueba los inputs que se pueden introducir en cualquier sección del juego // Comprueba los inputs que se pueden introducir en cualquier sección del juego
void handle() { void handle() {
// Salida de administrador en modo kiosko (Ctrl+Shift+Alt+Q) const bool CONSOLE_ACTIVE = Console::get() != nullptr && Console::get()->isActive();
if (Options::kiosk.enabled) {
SDL_Keymod mod = SDL_GetModState(); if (CONSOLE_ACTIVE) {
const bool* ks = SDL_GetKeyboardState(nullptr); // TAB/ESC cierran la consola en lugar de ejecutar sus acciones normales
if (((mod & SDL_KMOD_CTRL) != 0U) && ((mod & SDL_KMOD_SHIFT) != 0U) && ((mod & SDL_KMOD_ALT) != 0U) && ks[SDL_SCANCODE_Q]) { if (Input::get()->checkAction(InputAction::TOGGLE_CONSOLE, Input::DO_NOT_ALLOW_REPEAT) ||
SceneManager::current = SceneManager::Scene::QUIT; Input::get()->checkAction(InputAction::EXIT, Input::DO_NOT_ALLOW_REPEAT)) {
Console::get()->toggle();
return; return;
} }
} else {
// Salida de administrador en modo kiosko (Ctrl+Shift+Alt+Q)
if (Options::kiosk.enabled) {
SDL_Keymod mod = SDL_GetModState();
const bool* ks = SDL_GetKeyboardState(nullptr);
if (((mod & SDL_KMOD_CTRL) != 0U) && ((mod & SDL_KMOD_SHIFT) != 0U) && ((mod & SDL_KMOD_ALT) != 0U) && ks[SDL_SCANCODE_Q]) {
SceneManager::current = SceneManager::Scene::QUIT;
return;
}
}
} }
// Detectar qué acción global está siendo presionada // Detectar qué acción global está siendo presionada
InputAction action = getPressedAction(); InputAction action = getPressedAction();
// Con consola activa, ACCEPT (saltar sección) y EXIT están bloqueados
if (CONSOLE_ACTIVE && (action == InputAction::ACCEPT || action == InputAction::EXIT)) {
return;
}
// Ejecutar el handler correspondiente usando switch statement // Ejecutar el handler correspondiente usando switch statement
switch (action) { switch (action) {
case InputAction::EXIT: case InputAction::EXIT:
@@ -233,11 +255,15 @@ void handleToggleDebug() {
break; break;
case InputAction::TOGGLE_POSTFX: case InputAction::TOGGLE_POSTFX:
handleTogglePostFX(); handleToggleShaders();
break; break;
case InputAction::NEXT_POSTFX_PRESET: case InputAction::NEXT_POSTFX_PRESET:
handleNextPostFXPreset(); handleNextShaderPreset();
break;
case InputAction::TOGGLE_SUPERSAMPLING:
handleNextShader();
break; break;
case InputAction::NEXT_PALETTE: case InputAction::NEXT_PALETTE:
@@ -256,13 +282,16 @@ void handleToggleDebug() {
handleToggleVSync(); handleToggleVSync();
break; break;
case InputAction::TOGGLE_DEBUG: case InputAction::TOGGLE_CONSOLE:
// handleToggleDebug(); if (Console::get() != nullptr) { Console::get()->toggle(); }
break; break;
#ifdef _DEBUG #ifdef _DEBUG
case InputAction::TOGGLE_DEBUG:
if (RenderInfo::get() != nullptr) { RenderInfo::get()->toggle(); }
break;
case InputAction::SHOW_DEBUG_INFO: case InputAction::SHOW_DEBUG_INFO:
handleShowDebugInfo();
break; break;
#endif #endif

View File

@@ -14,7 +14,7 @@
Input* Input::instance = nullptr; Input* Input::instance = nullptr;
// Inicializa la instancia única del singleton // Inicializa la instancia única del singleton
void Input::init(const std::string& game_controller_db_path) { void Input::init(const std::string& game_controller_db_path) { // NOLINT(readability-convert-member-functions-to-static)
Input::instance = new Input(game_controller_db_path); Input::instance = new Input(game_controller_db_path);
} }
@@ -51,7 +51,8 @@ Input::Input(std::string game_controller_db_path)
{Action::TOGGLE_BORDER, KeyState{.scancode = SDL_SCANCODE_F9}}, {Action::TOGGLE_BORDER, KeyState{.scancode = SDL_SCANCODE_F9}},
{Action::TOGGLE_VSYNC, KeyState{.scancode = SDL_SCANCODE_F10}}, {Action::TOGGLE_VSYNC, KeyState{.scancode = SDL_SCANCODE_F10}},
{Action::PAUSE, KeyState{.scancode = SDL_SCANCODE_F11}}, {Action::PAUSE, KeyState{.scancode = SDL_SCANCODE_F11}},
{Action::TOGGLE_DEBUG, KeyState{.scancode = SDL_SCANCODE_F12}}}; {Action::TOGGLE_DEBUG, KeyState{.scancode = SDL_SCANCODE_F12}},
{Action::TOGGLE_CONSOLE, KeyState{.scancode = SDL_SCANCODE_TAB}}};
initSDLGamePad(); // Inicializa el subsistema SDL_INIT_GAMEPAD initSDLGamePad(); // Inicializa el subsistema SDL_INIT_GAMEPAD
} }
@@ -69,7 +70,7 @@ void Input::applyKeyboardBindingsFromOptions() {
} }
// Aplica configuración de botones del gamepad desde Options al primer gamepad conectado // Aplica configuración de botones del gamepad desde Options al primer gamepad conectado
void Input::applyGamepadBindingsFromOptions() { void Input::applyGamepadBindingsFromOptions() { // NOLINT(readability-convert-member-functions-to-static)
// Si no hay gamepads conectados, no hay nada que hacer // Si no hay gamepads conectados, no hay nada que hacer
if (gamepads_.empty()) { if (gamepads_.empty()) {
return; return;
@@ -90,21 +91,21 @@ void Input::applyGamepadBindingsFromOptions() {
} }
// Asigna inputs a botones del mando // Asigna inputs a botones del mando
void Input::bindGameControllerButton(const std::shared_ptr<Gamepad>& gamepad, Action action, SDL_GamepadButton button) { void Input::bindGameControllerButton(const std::shared_ptr<Gamepad>& gamepad, Action action, SDL_GamepadButton button) { // NOLINT(readability-convert-member-functions-to-static)
if (gamepad != nullptr) { if (gamepad != nullptr) {
gamepad->bindings[action].button = button; gamepad->bindings[action].button = button;
} }
} }
// Asigna inputs a botones del mando // Asigna inputs a botones del mando
void Input::bindGameControllerButton(const std::shared_ptr<Gamepad>& gamepad, Action action_target, Action action_source) { void Input::bindGameControllerButton(const std::shared_ptr<Gamepad>& gamepad, Action action_target, Action action_source) { // NOLINT(readability-convert-member-functions-to-static)
if (gamepad != nullptr) { if (gamepad != nullptr) {
gamepad->bindings[action_target].button = gamepad->bindings[action_source].button; gamepad->bindings[action_target].button = gamepad->bindings[action_source].button;
} }
} }
// Comprueba si alguna acción está activa // Comprueba si alguna acción está activa
auto Input::checkAction(Action action, bool repeat, bool check_keyboard, const std::shared_ptr<Gamepad>& gamepad) -> bool { auto Input::checkAction(Action action, bool repeat, bool check_keyboard, const std::shared_ptr<Gamepad>& gamepad) -> bool { // NOLINT(readability-convert-member-functions-to-static)
bool success_keyboard = false; bool success_keyboard = false;
bool success_controller = false; bool success_controller = false;
@@ -142,7 +143,7 @@ auto Input::checkAction(Action action, bool repeat, bool check_keyboard, const s
} }
// Comprueba si hay almenos una acción activa // Comprueba si hay almenos una acción activa
auto Input::checkAnyInput(bool check_keyboard, const std::shared_ptr<Gamepad>& gamepad) -> bool { auto Input::checkAnyInput(bool check_keyboard, const std::shared_ptr<Gamepad>& gamepad) -> bool { // NOLINT(readability-convert-member-functions-to-static)
// Obtenemos el número total de acciones posibles para iterar sobre ellas. // Obtenemos el número total de acciones posibles para iterar sobre ellas.
// --- Comprobación del Teclado --- // --- Comprobación del Teclado ---
@@ -179,7 +180,7 @@ auto Input::checkAnyInput(bool check_keyboard, const std::shared_ptr<Gamepad>& g
} }
// Comprueba si hay algún botón pulsado // Comprueba si hay algún botón pulsado
auto Input::checkAnyButton(bool repeat) -> bool { auto Input::checkAnyButton(bool repeat) -> bool { // NOLINT(readability-convert-member-functions-to-static)
// Solo comprueba los botones definidos previamente // Solo comprueba los botones definidos previamente
for (auto bi : BUTTON_INPUTS) { for (auto bi : BUTTON_INPUTS) {
// Comprueba el teclado // Comprueba el teclado
@@ -219,7 +220,7 @@ auto Input::getControllerNames() const -> std::vector<std::string> {
auto Input::getNumGamepads() const -> int { return gamepads_.size(); } auto Input::getNumGamepads() const -> int { return gamepads_.size(); }
// Obtiene el gamepad a partir de un event.id // Obtiene el gamepad a partir de un event.id
auto Input::getGamepad(SDL_JoystickID id) const -> std::shared_ptr<Input::Gamepad> { auto Input::getGamepad(SDL_JoystickID id) const -> std::shared_ptr<Input::Gamepad> { // NOLINT(readability-convert-member-functions-to-static)
for (const auto& gamepad : gamepads_) { for (const auto& gamepad : gamepads_) {
if (gamepad->instance_id == id) { if (gamepad->instance_id == id) {
return gamepad; return gamepad;
@@ -228,7 +229,7 @@ auto Input::getGamepad(SDL_JoystickID id) const -> std::shared_ptr<Input::Gamepa
return nullptr; return nullptr;
} }
auto Input::getGamepadByName(const std::string& name) const -> std::shared_ptr<Input::Gamepad> { auto Input::getGamepadByName(const std::string& name) const -> std::shared_ptr<Input::Gamepad> { // NOLINT(readability-convert-member-functions-to-static)
for (const auto& gamepad : gamepads_) { for (const auto& gamepad : gamepads_) {
if (gamepad && gamepad->name == name) { if (gamepad && gamepad->name == name) {
return gamepad; return gamepad;
@@ -238,12 +239,12 @@ auto Input::getGamepadByName(const std::string& name) const -> std::shared_ptr<I
} }
// Obtiene el SDL_GamepadButton asignado a un action // Obtiene el SDL_GamepadButton asignado a un action
auto Input::getControllerBinding(const std::shared_ptr<Gamepad>& gamepad, Action action) -> SDL_GamepadButton { auto Input::getControllerBinding(const std::shared_ptr<Gamepad>& gamepad, Action action) -> SDL_GamepadButton { // NOLINT(readability-convert-member-functions-to-static)
return static_cast<SDL_GamepadButton>(gamepad->bindings[action].button); return static_cast<SDL_GamepadButton>(gamepad->bindings[action].button);
} }
// Comprueba el eje del mando // Comprueba el eje del mando
auto Input::checkAxisInput(Action action, const std::shared_ptr<Gamepad>& gamepad, bool repeat) -> bool { auto Input::checkAxisInput(Action action, const std::shared_ptr<Gamepad>& gamepad, bool repeat) -> bool { // NOLINT(readability-convert-member-functions-to-static)
// Obtener el binding configurado para esta acción // Obtener el binding configurado para esta acción
auto& binding = gamepad->bindings[action]; auto& binding = gamepad->bindings[action];
@@ -286,7 +287,7 @@ auto Input::checkAxisInput(Action action, const std::shared_ptr<Gamepad>& gamepa
} }
// Comprueba los triggers del mando como botones digitales // Comprueba los triggers del mando como botones digitales
auto Input::checkTriggerInput(Action action, const std::shared_ptr<Gamepad>& gamepad, bool repeat) -> bool { auto Input::checkTriggerInput(Action action, const std::shared_ptr<Gamepad>& gamepad, bool repeat) -> bool { // NOLINT(readability-convert-member-functions-to-static)
// Solo manejamos botones específicos que pueden ser triggers // Solo manejamos botones específicos que pueden ser triggers
if (gamepad->bindings[action].button != static_cast<int>(SDL_GAMEPAD_BUTTON_INVALID)) { if (gamepad->bindings[action].button != static_cast<int>(SDL_GAMEPAD_BUTTON_INVALID)) {
// Solo procesamos L2 y R2 como triggers // Solo procesamos L2 y R2 como triggers
@@ -333,13 +334,13 @@ auto Input::checkTriggerInput(Action action, const std::shared_ptr<Gamepad>& gam
return false; return false;
} }
void Input::addGamepadMappingsFromFile() { void Input::addGamepadMappingsFromFile() { // NOLINT(readability-convert-member-functions-to-static)
if (SDL_AddGamepadMappingsFromFile(gamepad_mappings_file_.c_str()) < 0) { if (SDL_AddGamepadMappingsFromFile(gamepad_mappings_file_.c_str()) < 0) {
std::cout << "Error, could not load " << gamepad_mappings_file_.c_str() << " file: " << SDL_GetError() << '\n'; std::cout << "Error, could not load " << gamepad_mappings_file_.c_str() << " file: " << SDL_GetError() << '\n';
} }
} }
void Input::discoverGamepads() { void Input::discoverGamepads() { // NOLINT(readability-convert-member-functions-to-static)
SDL_Event event; SDL_Event event;
while (SDL_PollEvent(&event)) { while (SDL_PollEvent(&event)) {
handleEvent(event); // Comprueba mandos conectados handleEvent(event); // Comprueba mandos conectados
@@ -375,7 +376,7 @@ void Input::resetInputStates() {
} }
} }
void Input::update() { void Input::update() { // NOLINT(readability-convert-member-functions-to-static)
// --- TECLADO --- // --- TECLADO ---
const bool* key_states = SDL_GetKeyboardState(nullptr); const bool* key_states = SDL_GetKeyboardState(nullptr);
@@ -399,7 +400,7 @@ void Input::update() {
} }
} }
auto Input::handleEvent(const SDL_Event& event) -> std::string { auto Input::handleEvent(const SDL_Event& event) -> std::string { // NOLINT(readability-convert-member-functions-to-static)
switch (event.type) { switch (event.type) {
case SDL_EVENT_GAMEPAD_ADDED: case SDL_EVENT_GAMEPAD_ADDED:
return addGamepad(event.gdevice.which); return addGamepad(event.gdevice.which);
@@ -409,7 +410,7 @@ auto Input::handleEvent(const SDL_Event& event) -> std::string {
return {}; return {};
} }
auto Input::addGamepad(int device_index) -> std::string { auto Input::addGamepad(int device_index) -> std::string { // NOLINT(readability-convert-member-functions-to-static)
SDL_Gamepad* pad = SDL_OpenGamepad(device_index); SDL_Gamepad* pad = SDL_OpenGamepad(device_index);
if (pad == nullptr) { if (pad == nullptr) {
std::cerr << "Error al abrir el gamepad: " << SDL_GetError() << '\n'; std::cerr << "Error al abrir el gamepad: " << SDL_GetError() << '\n';
@@ -423,8 +424,8 @@ auto Input::addGamepad(int device_index) -> std::string {
return name + " CONNECTED"; return name + " CONNECTED";
} }
auto Input::removeGamepad(SDL_JoystickID id) -> std::string { auto Input::removeGamepad(SDL_JoystickID id) -> std::string { // NOLINT(readability-convert-member-functions-to-static)
auto it = std::ranges::find_if(gamepads_, [id](const std::shared_ptr<Gamepad>& gamepad) { auto it = std::ranges::find_if(gamepads_, [id](const std::shared_ptr<Gamepad>& gamepad) -> bool {
return gamepad->instance_id == id; return gamepad->instance_id == id;
}); });
@@ -438,7 +439,7 @@ auto Input::removeGamepad(SDL_JoystickID id) -> std::string {
return {}; return {};
} }
void Input::printConnectedGamepads() const { void Input::printConnectedGamepads() const { // NOLINT(readability-convert-member-functions-to-static)
if (gamepads_.empty()) { if (gamepads_.empty()) {
std::cout << "No hay gamepads conectados." << '\n'; std::cout << "No hay gamepads conectados." << '\n';
return; return;
@@ -452,7 +453,7 @@ void Input::printConnectedGamepads() const {
} }
} }
auto Input::findAvailableGamepadByName(const std::string& gamepad_name) -> std::shared_ptr<Input::Gamepad> { auto Input::findAvailableGamepadByName(const std::string& gamepad_name) -> std::shared_ptr<Input::Gamepad> { // NOLINT(readability-convert-member-functions-to-static)
// Si no hay gamepads disponibles, devolver gamepad por defecto // Si no hay gamepads disponibles, devolver gamepad por defecto
if (gamepads_.empty()) { if (gamepads_.empty()) {
return nullptr; return nullptr;

View File

@@ -101,12 +101,12 @@ class Input {
// --- Gestión de gamepads --- // --- Gestión de gamepads ---
[[nodiscard]] auto gameControllerFound() const -> bool; [[nodiscard]] auto gameControllerFound() const -> bool;
[[nodiscard]] auto getNumGamepads() const -> int; [[nodiscard]] auto getNumGamepads() const -> int;
auto getGamepad(SDL_JoystickID id) const -> std::shared_ptr<Gamepad>; [[nodiscard]] auto getGamepad(SDL_JoystickID id) const -> std::shared_ptr<Gamepad>;
auto getGamepadByName(const std::string& name) const -> std::shared_ptr<Input::Gamepad>; [[nodiscard]] auto getGamepadByName(const std::string& name) const -> std::shared_ptr<Input::Gamepad>;
auto getGamepads() const -> const Gamepads& { return gamepads_; } [[nodiscard]] auto getGamepads() const -> const Gamepads& { return gamepads_; }
auto findAvailableGamepadByName(const std::string& gamepad_name) -> std::shared_ptr<Gamepad>; auto findAvailableGamepadByName(const std::string& gamepad_name) -> std::shared_ptr<Gamepad>;
static auto getControllerName(const std::shared_ptr<Gamepad>& gamepad) -> std::string; static auto getControllerName(const std::shared_ptr<Gamepad>& gamepad) -> std::string;
auto getControllerNames() const -> std::vector<std::string>; [[nodiscard]] auto getControllerNames() const -> std::vector<std::string>;
[[nodiscard]] static auto getControllerBinding(const std::shared_ptr<Gamepad>& gamepad, Action action) -> SDL_GamepadButton; [[nodiscard]] static auto getControllerBinding(const std::shared_ptr<Gamepad>& gamepad, Action action) -> SDL_GamepadButton;
void printConnectedGamepads() const; void printConnectedGamepads() const;

View File

@@ -26,12 +26,14 @@ enum class InputAction : int { // Acciones de entrada posibles en el juego
TOGGLE_INTEGER_SCALE, TOGGLE_INTEGER_SCALE,
TOGGLE_POSTFX, TOGGLE_POSTFX,
NEXT_POSTFX_PRESET, NEXT_POSTFX_PRESET,
TOGGLE_SUPERSAMPLING,
TOGGLE_BORDER, TOGGLE_BORDER,
TOGGLE_MUSIC, TOGGLE_MUSIC,
NEXT_PALETTE, NEXT_PALETTE,
PREVIOUS_PALETTE, PREVIOUS_PALETTE,
SHOW_DEBUG_INFO, SHOW_DEBUG_INFO,
TOGGLE_DEBUG, TOGGLE_DEBUG,
TOGGLE_CONSOLE,
// Input obligatorio // Input obligatorio
NONE, NONE,

View File

@@ -0,0 +1,90 @@
#include "core/locale/locale.hpp"
#include <fstream>
#include <iostream>
#include <string>
#include "external/fkyaml_node.hpp" // Para fkyaml::node
#include "game/options.hpp" // Para Options::console
// [SINGLETON]
Locale* Locale::instance = nullptr;
// [SINGLETON] Crea el objeto con esta función estática
void Locale::init(const std::string& file_path) { // NOLINT(readability-convert-member-functions-to-static)
Locale::instance = new Locale();
Locale::instance->loadFromFile(file_path);
}
// [SINGLETON] Destruye el objeto con esta función estática
void Locale::destroy() {
delete Locale::instance;
Locale::instance = nullptr;
}
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
auto Locale::get() -> Locale* {
return Locale::instance;
}
// Devuelve la traducción de la clave o la clave como fallback
auto Locale::get(const std::string& key) const -> std::string { // NOLINT(readability-convert-member-functions-to-static)
auto it = strings_.find(key);
if (it != strings_.end()) {
return it->second;
}
if (Options::console) {
std::cerr << "Locale: clave no encontrada: " << key << '\n';
}
return key;
}
// Aplana un nodo YAML de forma recursiva: {a: {b: "val"}} -> {"a.b" -> "val"}
void Locale::flatten(const void* node_ptr, const std::string& prefix) { // NOLINT(readability-convert-member-functions-to-static)
const auto& node = *static_cast<const fkyaml::node*>(node_ptr);
for (auto itr = node.begin(); itr != node.end(); ++itr) {
const std::string KEY = prefix.empty()
? itr.key().get_value<std::string>()
: prefix + "." + itr.key().get_value<std::string>();
const auto& value = itr.value();
if (value.is_mapping()) {
flatten(&value, KEY);
} else if (value.is_string()) {
strings_[KEY] = value.get_value<std::string>();
}
}
}
// Carga las traducciones desde el fichero YAML indicado
void Locale::loadFromFile(const std::string& file_path) { // NOLINT(readability-convert-member-functions-to-static)
if (file_path.empty()) {
if (Options::console) {
std::cerr << "Locale: ruta de fichero vacía, sin traducciones cargadas\n";
}
return;
}
std::ifstream file(file_path);
if (!file.is_open()) {
if (Options::console) {
std::cerr << "Locale: no se puede abrir " << file_path << '\n';
}
return;
}
try {
auto yaml = fkyaml::node::deserialize(file);
flatten(&yaml, "");
if (Options::console) {
std::cout << "Locale: " << strings_.size() << " traducciones cargadas desde " << file_path << '\n';
}
} catch (const fkyaml::exception& e) {
if (Options::console) {
std::cerr << "Locale: error al parsear YAML: " << e.what() << '\n';
}
}
}

View File

@@ -0,0 +1,26 @@
#pragma once
#include <string>
#include <unordered_map>
// Clase Locale: gestiona las traducciones del juego (singleton)
// Las traducciones se cargan desde un fichero YAML en el inicio.
// No se permite cambio de idioma en caliente.
class Locale {
public:
static void init(const std::string& file_path); // Crea e inicializa el singleton
static void destroy(); // Destruye el singleton
static auto get() -> Locale*; // Devuelve el singleton
// Devuelve la traducción de la clave dada.
// Si la clave no existe, devuelve la propia clave como fallback.
[[nodiscard]] auto get(const std::string& key) const -> std::string;
private:
Locale() = default;
void loadFromFile(const std::string& file_path);
void flatten(const void* node_ptr, const std::string& prefix); // Aplana nodos YAML anidados
static Locale* instance;
std::unordered_map<std::string, std::string> strings_;
};

View File

@@ -15,7 +15,7 @@ namespace GIF {
} }
// Inicializa el diccionario LZW con los valores iniciales // Inicializa el diccionario LZW con los valores iniciales
inline void initializeDictionary(std::vector<DictionaryEntry>& dictionary, int code_length, int& dictionary_ind) { inline void initializeDictionary(std::vector<DictionaryEntry>& dictionary, int code_length, int& dictionary_ind) { // NOLINT(readability-identifier-naming)
int size = 1 << code_length; int size = 1 << code_length;
dictionary.resize(1 << (code_length + 1)); dictionary.resize(1 << (code_length + 1));
for (dictionary_ind = 0; dictionary_ind < size; dictionary_ind++) { for (dictionary_ind = 0; dictionary_ind < size; dictionary_ind++) {
@@ -55,7 +55,7 @@ namespace GIF {
} }
// Agrega una nueva entrada al diccionario // Agrega una nueva entrada al diccionario
inline void addDictionaryEntry(std::vector<DictionaryEntry>& dictionary, int& dictionary_ind, int& code_length, int prev, int code) { inline void addDictionaryEntry(std::vector<DictionaryEntry>& dictionary, int& dictionary_ind, int& code_length, int prev, int code) { // NOLINT(readability-identifier-naming)
uint8_t first_byte; uint8_t first_byte;
if (code == dictionary_ind) { if (code == dictionary_ind) {
first_byte = findFirstByte(dictionary, prev); first_byte = findFirstByte(dictionary, prev);
@@ -90,7 +90,7 @@ namespace GIF {
return match_len; return match_len;
} }
void Gif::decompress(int code_length, const uint8_t* input, int input_length, uint8_t* out) { void Gif::decompress(int code_length, const uint8_t* input, int input_length, uint8_t* out) { // NOLINT(readability-convert-member-functions-to-static)
// Verifica que el code_length tenga un rango razonable. // Verifica que el code_length tenga un rango razonable.
if (code_length < 2 || code_length > 12) { if (code_length < 2 || code_length > 12) {
throw std::runtime_error("Invalid LZW code length"); throw std::runtime_error("Invalid LZW code length");
@@ -146,7 +146,7 @@ namespace GIF {
} }
} }
auto Gif::readSubBlocks(const uint8_t*& buffer) -> std::vector<uint8_t> { auto Gif::readSubBlocks(const uint8_t*& buffer) -> std::vector<uint8_t> { // NOLINT(readability-convert-member-functions-to-static)
std::vector<uint8_t> data; std::vector<uint8_t> data;
uint8_t block_size = *buffer; uint8_t block_size = *buffer;
buffer++; buffer++;
@@ -159,7 +159,7 @@ namespace GIF {
return data; return data;
} }
auto Gif::processImageDescriptor(const uint8_t*& buffer, const std::vector<RGB>& gct, int resolution_bits) -> std::vector<uint8_t> { auto Gif::processImageDescriptor(const uint8_t*& buffer, const std::vector<RGB>& gct, int resolution_bits) -> std::vector<uint8_t> { // NOLINT(readability-convert-member-functions-to-static)
ImageDescriptor image_descriptor; ImageDescriptor image_descriptor;
// Lee 9 bytes para el image descriptor. // Lee 9 bytes para el image descriptor.
readBytes(buffer, &image_descriptor, sizeof(ImageDescriptor)); readBytes(buffer, &image_descriptor, sizeof(ImageDescriptor));
@@ -175,7 +175,7 @@ namespace GIF {
return uncompressed_data; return uncompressed_data;
} }
auto Gif::loadPalette(const uint8_t* buffer) -> std::vector<uint32_t> { auto Gif::loadPalette(const uint8_t* buffer) -> std::vector<uint32_t> { // NOLINT(readability-convert-member-functions-to-static)
uint8_t header[6]; uint8_t header[6];
std::memcpy(header, buffer, 6); std::memcpy(header, buffer, 6);
buffer += 6; buffer += 6;
@@ -186,7 +186,7 @@ namespace GIF {
std::vector<uint32_t> global_color_table; std::vector<uint32_t> global_color_table;
if ((screen_descriptor.fields & 0x80) != 0) { if ((screen_descriptor.fields & 0x80) != 0) {
int global_color_table_size = 1 << (((screen_descriptor.fields & 0x07) + 1)); int global_color_table_size = 1 << ((screen_descriptor.fields & 0x07) + 1);
global_color_table.resize(global_color_table_size); global_color_table.resize(global_color_table_size);
for (int i = 0; i < global_color_table_size; ++i) { for (int i = 0; i < global_color_table_size; ++i) {
uint8_t r = buffer[0]; uint8_t r = buffer[0];
@@ -199,7 +199,7 @@ namespace GIF {
return global_color_table; return global_color_table;
} }
auto Gif::processGifStream(const uint8_t* buffer, uint16_t& w, uint16_t& h) -> std::vector<uint8_t> { auto Gif::processGifStream(const uint8_t* buffer, uint16_t& w, uint16_t& h) -> std::vector<uint8_t> { // NOLINT(readability-convert-member-functions-to-static)
// Leer la cabecera de 6 bytes ("GIF87a" o "GIF89a") // Leer la cabecera de 6 bytes ("GIF87a" o "GIF89a")
uint8_t header[6]; uint8_t header[6];
std::memcpy(header, buffer, 6); std::memcpy(header, buffer, 6);
@@ -222,7 +222,7 @@ namespace GIF {
int color_resolution_bits = ((screen_descriptor.fields & 0x70) >> 4) + 1; int color_resolution_bits = ((screen_descriptor.fields & 0x70) >> 4) + 1;
std::vector<RGB> global_color_table; std::vector<RGB> global_color_table;
if ((screen_descriptor.fields & 0x80) != 0) { if ((screen_descriptor.fields & 0x80) != 0) {
int global_color_table_size = 1 << (((screen_descriptor.fields & 0x07) + 1)); int global_color_table_size = 1 << ((screen_descriptor.fields & 0x07) + 1);
global_color_table.resize(global_color_table_size); global_color_table.resize(global_color_table_size);
std::memcpy(global_color_table.data(), buffer, 3 * global_color_table_size); std::memcpy(global_color_table.data(), buffer, 3 * global_color_table_size);
buffer += 3 * global_color_table_size; buffer += 3 * global_color_table_size;

View File

@@ -65,11 +65,8 @@ PixelReveal::PixelReveal(int width, int height, float pixels_per_second, float s
} }
} }
// Destructor
PixelReveal::~PixelReveal() = default;
// Actualiza el estado del revelado // Actualiza el estado del revelado
void PixelReveal::update(float time_active) { void PixelReveal::update(float time_active) { // NOLINT(readability-make-member-function-const)
// En modo normal revela (pone transparente); en modo inverso cubre (pone negro) // En modo normal revela (pone transparente); en modo inverso cubre (pone negro)
const auto PIXEL_COLOR = reverse_ ? static_cast<Uint8>(PaletteColor::BLACK) : static_cast<Uint8>(PaletteColor::TRANSPARENT); const auto PIXEL_COLOR = reverse_ ? static_cast<Uint8>(PaletteColor::BLACK) : static_cast<Uint8>(PaletteColor::TRANSPARENT);
@@ -106,5 +103,5 @@ void PixelReveal::render(int dst_x, int dst_y) const {
// Indica si el revelado ha completado todas las filas // Indica si el revelado ha completado todas las filas
auto PixelReveal::isComplete() const -> bool { auto PixelReveal::isComplete() const -> bool {
return std::ranges::all_of(row_step_, [this](int s) { return s >= num_steps_; }); return std::ranges::all_of(row_step_, [this](int s) -> bool { return s >= num_steps_; });
} }

View File

@@ -16,8 +16,7 @@ class PixelReveal {
// Constructor // Constructor
PixelReveal(int width, int height, float pixels_per_second, float step_duration, int num_steps = 4, bool reverse = false, RevealMode mode = RevealMode::RANDOM); PixelReveal(int width, int height, float pixels_per_second, float step_duration, int num_steps = 4, bool reverse = false, RevealMode mode = RevealMode::RANDOM);
// Destructor definido en el .cpp para que unique_ptr<Surface> funcione con forward declaration ~PixelReveal() = default;
~PixelReveal();
// Actualiza el estado del revelado según el tiempo transcurrido // Actualiza el estado del revelado según el tiempo transcurrido
void update(float time_active); void update(float time_active);

View File

@@ -0,0 +1,129 @@
#include "core/rendering/render_info.hpp"
#include <SDL3/SDL.h>
#include <algorithm> // Para transform
#include <cmath> // Para round, floor
#include <iomanip> // Para setprecision
#include <sstream> // Para ostringstream
#include <string> // Para string
#include "core/rendering/screen.hpp" // Para Screen
#include "core/rendering/surface.hpp" // Para Surface
#include "core/rendering/text.hpp" // Para Text
#include "game/options.hpp" // Para Options
#include "game/ui/console.hpp" // Para Console
#include "game/ui/notifier.hpp" // Para Notifier
// [SINGLETON]
RenderInfo* RenderInfo::render_info = nullptr;
// [SINGLETON] Crearemos el objeto con esta función estática
void RenderInfo::init() {
RenderInfo::render_info = new RenderInfo();
}
// [SINGLETON] Destruiremos el objeto con esta función estática
void RenderInfo::destroy() {
delete RenderInfo::render_info;
RenderInfo::render_info = nullptr;
}
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
auto RenderInfo::get() -> RenderInfo* {
return RenderInfo::render_info;
}
// Constructor: en DEBUG se activa inmediatamente (notifica a Notifier del offset)
RenderInfo::RenderInfo() {
#ifdef _DEBUG
toggle();
#endif
}
// Renderiza el overlay de información por pantalla
void RenderInfo::render() const {
if (!active_) { return; }
// FPS
std::string line = std::to_string(Screen::get()->getLastFPS()) + " fps";
// Driver GPU
const auto& driver = Screen::get()->getGPUDriver();
line += " | " + (driver.empty() ? std::string("sdl") : driver);
// Zoom calculado (alto físico / alto lógico), con coma decimal y sin ceros innecesarios
const float ROUNDED = std::round(Screen::get()->getZoomFactor() * 100.0F) / 100.0F;
std::string zoom_str;
if (ROUNDED == std::floor(ROUNDED)) {
zoom_str = std::to_string(static_cast<int>(ROUNDED));
} else {
std::ostringstream oss;
oss << std::fixed << std::setprecision(2) << ROUNDED;
zoom_str = oss.str();
if (zoom_str.back() == '0') { zoom_str.pop_back(); }
std::replace(zoom_str.begin(), zoom_str.end(), '.', ',');
}
line += " | " + zoom_str + "x";
// PostFX: muestra shader + preset y supersampling, o nada si está desactivado
if (Options::video.postfx) {
const bool IS_CRTPI = (Options::current_shader == Rendering::ShaderType::CRTPI);
const std::string SHADER_NAME = IS_CRTPI ? "crtpi" : "postfx";
std::string preset_name = "-";
if (IS_CRTPI) {
if (!Options::crtpi_presets.empty()) {
preset_name = Options::crtpi_presets[static_cast<size_t>(Options::current_crtpi_preset)].name;
}
} else {
if (!Options::postfx_presets.empty()) {
preset_name = Options::postfx_presets[static_cast<size_t>(Options::current_postfx_preset)].name;
}
}
const bool SHOW_SS = Options::video.supersampling && !IS_CRTPI;
line += " | " + SHADER_NAME + " " + preset_name + (SHOW_SS ? " (ss)" : "");
}
// Todo en lowercase
std::transform(line.begin(), line.end(), line.begin(), [](unsigned char c) { return std::tolower(c); });
// Constantes visuales (igual que Console)
static constexpr Uint8 BG_COLOR = 0; // PaletteColor::BLACK
static constexpr Uint8 MSG_COLOR = 9; // PaletteColor::BRIGHT_GREEN
static constexpr int TEXT_SIZE = 6;
static constexpr int PADDING_V = TEXT_SIZE / 2 - 1;
// Fuente: preferir la de la consola si está disponible
auto text_obj = (Console::get() != nullptr) ? Console::get()->getText() : Screen::get()->getText();
// Posición Y (debajo de la consola si está visible)
const int Y = (Console::get() != nullptr) ? Console::get()->getVisibleHeight() : 0;
// Rectángulo de fondo: ancho completo, alto ajustado al texto
const SDL_FRect RECT = {
.x = 0.0F,
.y = static_cast<float>(Y),
.w = Options::game.width,
.h = static_cast<float>(TEXT_SIZE + (PADDING_V * 2))};
auto game_surface = Screen::get()->getGameSurface();
game_surface->fillRect(&RECT, BG_COLOR);
// game_surface->drawRectBorder(&RECT, BORDER_COLOR);
text_obj->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG,
static_cast<int>(Options::game.width / 2),
Y + PADDING_V,
line,
1,
MSG_COLOR);
}
// Activa o desactiva el overlay y notifica a Notifier del cambio de offset
void RenderInfo::toggle() {
active_ = !active_;
if (active_) {
Screen::get()->updateZoomFactor();
if (Notifier::get() != nullptr) { Notifier::get()->addYOffset(HEIGHT); }
} else {
if (Notifier::get() != nullptr) { Notifier::get()->removeYOffset(HEIGHT); }
}
}

View File

@@ -0,0 +1,29 @@
#pragma once
class RenderInfo {
public:
// Singleton
static void init();
static void destroy();
static auto get() -> RenderInfo*;
// Métodos principales
void render() const;
void toggle();
// Consultas
[[nodiscard]] auto isActive() const -> bool { return active_; }
// Altura fija del overlay (TEXT_SIZE(6) + PADDING_V(2) * 2)
static constexpr int HEIGHT = 10;
private:
// Singleton
static RenderInfo* render_info;
// Constructor y destructor privados [SINGLETON]
RenderInfo();
~RenderInfo() = default;
bool active_{false}; // Estado del overlay
};

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