- eliminats accents en titols d'habitacions
- corregits fitxers .fnt (falta aseprite) - corregint font_gent.py - revisades algunes traduccions
This commit is contained in:
@@ -105,24 +105,24 @@ columns 15
|
||||
193 6 # Á
|
||||
200 6 # È
|
||||
201 6 # É
|
||||
204 6 # Ì
|
||||
205 6 # Í
|
||||
207 6 # Ï
|
||||
210 6 # Ò
|
||||
211 6 # Ó
|
||||
219 6 # Ù
|
||||
218 6 # Ú
|
||||
220 6 # Ü
|
||||
209 6 # Ñ
|
||||
199 6 # Ç
|
||||
224 5 # à
|
||||
225 5 # á
|
||||
232 5 # è
|
||||
233 5 # é
|
||||
236 4 # ì
|
||||
237 4 # í
|
||||
239 4 # ï
|
||||
242 5 # ò
|
||||
243 5 # ó
|
||||
249 5 # ù
|
||||
250 5 # ú
|
||||
252 5 # ü
|
||||
241 5 # ñ
|
||||
231 5 # ç
|
||||
161 2 # ¡
|
||||
|
||||
@@ -101,24 +101,24 @@ columns 15
|
||||
193 6 # Á
|
||||
200 7 # È
|
||||
201 7 # É
|
||||
204 6 # Ì
|
||||
205 6 # Í
|
||||
207 6 # Ï
|
||||
210 7 # Ò
|
||||
211 7 # Ó
|
||||
217 6 # Ù
|
||||
218 6 # Ú
|
||||
220 6 # Ü
|
||||
209 7 # Ñ
|
||||
199 7 # Ç
|
||||
224 6 # à
|
||||
225 6 # á
|
||||
232 7 # è
|
||||
233 7 # é
|
||||
236 6 # ì
|
||||
237 6 # í
|
||||
239 6 # ï
|
||||
242 7 # ò
|
||||
243 7 # ó
|
||||
249 6 # ù
|
||||
250 6 # ú
|
||||
252 6 # ü
|
||||
241 7 # ñ
|
||||
231 7 # ç
|
||||
161 2 # ¡
|
||||
|
||||
@@ -105,24 +105,24 @@ columns 15
|
||||
193 7 # Á
|
||||
200 7 # È
|
||||
201 7 # É
|
||||
204 7 # Ì
|
||||
205 7 # Í
|
||||
207 7 # Ï
|
||||
210 7 # Ò
|
||||
211 7 # Ó
|
||||
217 7 # Ù
|
||||
218 7 # Ú
|
||||
220 7 # Ü
|
||||
209 7 # Ñ
|
||||
199 7 # Ç
|
||||
224 7 # à
|
||||
225 7 # á
|
||||
232 7 # è
|
||||
233 7 # é
|
||||
236 7 # ì
|
||||
237 7 # í
|
||||
239 7 # ï
|
||||
242 7 # ò
|
||||
243 7 # ó
|
||||
249 7 # ù
|
||||
250 7 # ú
|
||||
252 7 # ü
|
||||
241 7 # ñ
|
||||
231 7 # ç
|
||||
161 7 # ¡
|
||||
|
||||
@@ -105,24 +105,24 @@ columns 15
|
||||
193 5 # Á
|
||||
200 4 # È
|
||||
201 4 # É
|
||||
204 1 # Ì
|
||||
205 1 # Í
|
||||
207 1 # Ï
|
||||
210 5 # Ò
|
||||
211 5 # Ó
|
||||
217 5 # Ù
|
||||
218 5 # Ú
|
||||
220 5 # Ü
|
||||
209 5 # Ñ
|
||||
199 5 # Ç
|
||||
224 4 # à
|
||||
225 4 # á
|
||||
232 4 # è
|
||||
233 4 # é
|
||||
236 1 # ì
|
||||
237 1 # í
|
||||
239 1 # ï
|
||||
242 4 # ò
|
||||
243 4 # ó
|
||||
249 4 # ù
|
||||
250 4 # ú
|
||||
252 4 # ü
|
||||
241 4 # ñ
|
||||
231 3 # ç
|
||||
161 1 # ¡
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# 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É A FOC 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!!!"
|
||||
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"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ROAD TO THE JAIL
|
||||
room:
|
||||
name_en: "ROAD TO THE JAIL"
|
||||
name_ca: "CAMÍ A LA JAIL"
|
||||
name_ca: "CAMI A LA JAIL"
|
||||
bgColor: black
|
||||
border: blue
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# JUMP THROUGH
|
||||
room:
|
||||
name_en: "JUMP THROUGH"
|
||||
name_ca: "SALTA A TRAVÉS"
|
||||
name_ca: "SALTA A TRAVES"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# THE GARDEN
|
||||
room:
|
||||
name_en: "THE GARDEN"
|
||||
name_ca: "EL JARDÍ"
|
||||
name_ca: "EL JARDI"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# YOU SHALL NOT PASS
|
||||
room:
|
||||
name_en: "YOU SHALL NOT PASS"
|
||||
name_ca: "NO PASSARÀS"
|
||||
name_ca: "NO PASSARAS"
|
||||
bgColor: bright_black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# QVOID IS A JAILGAME!
|
||||
room:
|
||||
name_en: "QVOID IS A JAILGAME!"
|
||||
name_ca: "QVOID ÉS UN JAILGAME!"
|
||||
name_ca: "QVOID ES UN JAILGAME!"
|
||||
bgColor: blue
|
||||
border: bright_black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# YOU'LL BELIEVE AROUNDER CAN FLY
|
||||
room:
|
||||
name_en: "YOU'LL BELIEVE AROUNDER CAN FLY"
|
||||
name_ca: "CREURÀS QUE ELS AROUNDERS VOLEN"
|
||||
name_ca: "CREURAS QUE ELS AROUNDERS VOLEN"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# PREVENT THE CRISIS
|
||||
room:
|
||||
name_en: "PREVENT THE CRISIS"
|
||||
name_ca: "PREVÉ LA CRISI"
|
||||
name_ca: "EVITA LA CRISI"
|
||||
bgColor: black
|
||||
border: bright_magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SANDWITCH AND COUNTER
|
||||
room:
|
||||
name_en: "SANDWITCH AND COUNTER"
|
||||
name_ca: "SANDVITX I COUNTER S."
|
||||
name_ca: "SANDVITX I COUNTER STRIKE"
|
||||
bgColor: black
|
||||
border: cyan
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# FEEL THE PRESSURE
|
||||
room:
|
||||
name_en: "FEEL THE PRESSURE"
|
||||
name_ca: "NOTA LA PRESSIÓ"
|
||||
name_ca: "NOTA LA PRESSIO"
|
||||
bgColor: bright_black
|
||||
border: bright_yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# P.A.C.O. WORKSHOP
|
||||
room:
|
||||
name_en: "P.A.C.O. WORKSHOP"
|
||||
name_ca: "TALLER DE P.A.C.O."
|
||||
name_ca: "EL TALLER DE P.A.C.O."
|
||||
bgColor: black
|
||||
border: yellow
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# THAT'S A GUITAR
|
||||
room:
|
||||
name_en: "THAT'S A GUITAR"
|
||||
name_ca: "AIXÒ ÉS UNA GUITARRA"
|
||||
name_ca: "AIXO ES UNA GUITARRA"
|
||||
bgColor: black
|
||||
border: black
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# STATIC
|
||||
room:
|
||||
name_en: "STATIC"
|
||||
name_ca: "ESTÀTICA"
|
||||
name_ca: "ESTATICA"
|
||||
bgColor: black
|
||||
border: bright_magenta
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# MAGNETIC FIELDS
|
||||
room:
|
||||
name_en: "MAGNETIC FIELDS"
|
||||
name_ca: "CAMPS MAGNÈTICS"
|
||||
name_ca: "CAMPS MAGNETICS"
|
||||
bgColor: black
|
||||
border: bright_red
|
||||
tileSetFile: standard.gif
|
||||
|
||||
@@ -573,20 +573,20 @@ void Screen::applyCurrentCrtPiPreset() { // NOLINT(readability-convert-member-f
|
||||
if (shader_backend_ && !Options::crtpi_presets.empty()) {
|
||||
const auto& p = Options::crtpi_presets[static_cast<size_t>(Options::current_crtpi_preset)];
|
||||
Rendering::CrtPiParams params{
|
||||
.scanline_weight = p.scanline_weight,
|
||||
.scanline_weight = p.scanline_weight,
|
||||
.scanline_gap_brightness = p.scanline_gap_brightness,
|
||||
.bloom_factor = p.bloom_factor,
|
||||
.input_gamma = p.input_gamma,
|
||||
.output_gamma = p.output_gamma,
|
||||
.mask_brightness = p.mask_brightness,
|
||||
.curvature_x = p.curvature_x,
|
||||
.curvature_y = p.curvature_y,
|
||||
.mask_type = p.mask_type,
|
||||
.enable_scanlines = p.enable_scanlines,
|
||||
.enable_multisample = p.enable_multisample,
|
||||
.enable_gamma = p.enable_gamma,
|
||||
.enable_curvature = p.enable_curvature,
|
||||
.enable_sharper = p.enable_sharper,
|
||||
.bloom_factor = p.bloom_factor,
|
||||
.input_gamma = p.input_gamma,
|
||||
.output_gamma = p.output_gamma,
|
||||
.mask_brightness = p.mask_brightness,
|
||||
.curvature_x = p.curvature_x,
|
||||
.curvature_y = p.curvature_y,
|
||||
.mask_type = p.mask_type,
|
||||
.enable_scanlines = p.enable_scanlines,
|
||||
.enable_multisample = p.enable_multisample,
|
||||
.enable_gamma = p.enable_gamma,
|
||||
.enable_curvature = p.enable_curvature,
|
||||
.enable_sharper = p.enable_sharper,
|
||||
};
|
||||
shader_backend_->setCrtPiParams(params);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "core/rendering/shader_backend.hpp" // Para Rendering::ShaderType, ShaderBackend
|
||||
#include "utils/utils.hpp" // Para Color
|
||||
#include "utils/utils.hpp" // Para Color
|
||||
class Surface;
|
||||
class Text;
|
||||
|
||||
@@ -52,17 +52,17 @@ class Screen {
|
||||
void toggleBorder(); // Cambia entre borde visible y no visible
|
||||
|
||||
// Paletas y PostFX
|
||||
void nextPalette(); // Cambia a la siguiente paleta
|
||||
void previousPalette(); // Cambia a la paleta anterior
|
||||
void setPalete(); // Establece la paleta actual
|
||||
void toggleShaders(); // Activa/desactiva todos los shaders respetando current_shader
|
||||
void toggleSupersampling(); // Activa/desactiva el supersampling global
|
||||
void reloadPostFX(); // Recarga el shader del preset actual sin toggle
|
||||
void reloadCrtPi(); // Recarga el shader CrtPi del preset actual sin toggle
|
||||
void setLinearUpscale(bool linear); // Upscale NEAREST (false) o LINEAR (true) en el paso SS
|
||||
void setDownscaleAlgo(int algo); // 0=bilinear legacy, 1=Lanczos2, 2=Lanczos3
|
||||
void setActiveShader(Rendering::ShaderType type); // Cambia el shader de post-procesado activo
|
||||
void nextShader(); // Cicla al siguiente shader disponible (para futura UI)
|
||||
void nextPalette(); // Cambia a la siguiente paleta
|
||||
void previousPalette(); // Cambia a la paleta anterior
|
||||
void setPalete(); // Establece la paleta actual
|
||||
void toggleShaders(); // Activa/desactiva todos los shaders respetando current_shader
|
||||
void toggleSupersampling(); // Activa/desactiva el supersampling global
|
||||
void reloadPostFX(); // Recarga el shader del preset actual sin toggle
|
||||
void reloadCrtPi(); // Recarga el shader CrtPi del preset actual sin toggle
|
||||
void setLinearUpscale(bool linear); // Upscale NEAREST (false) o LINEAR (true) en el paso SS
|
||||
void setDownscaleAlgo(int algo); // 0=bilinear legacy, 1=Lanczos2, 2=Lanczos3
|
||||
void setActiveShader(Rendering::ShaderType type); // Cambia el shader de post-procesado activo
|
||||
void nextShader(); // Cicla al siguiente shader disponible (para futura UI)
|
||||
|
||||
// Surfaces y notificaciones
|
||||
void setRendererSurface(const std::shared_ptr<Surface>& surface = nullptr); // Establece el renderizador para las surfaces
|
||||
|
||||
@@ -1123,20 +1123,20 @@ namespace Rendering {
|
||||
}
|
||||
|
||||
void SDL3GPUShader::setCrtPiParams(const CrtPiParams& p) {
|
||||
crtpi_uniforms_.scanline_weight = p.scanline_weight;
|
||||
crtpi_uniforms_.scanline_weight = p.scanline_weight;
|
||||
crtpi_uniforms_.scanline_gap_brightness = p.scanline_gap_brightness;
|
||||
crtpi_uniforms_.bloom_factor = p.bloom_factor;
|
||||
crtpi_uniforms_.input_gamma = p.input_gamma;
|
||||
crtpi_uniforms_.output_gamma = p.output_gamma;
|
||||
crtpi_uniforms_.mask_brightness = p.mask_brightness;
|
||||
crtpi_uniforms_.curvature_x = p.curvature_x;
|
||||
crtpi_uniforms_.curvature_y = p.curvature_y;
|
||||
crtpi_uniforms_.mask_type = p.mask_type;
|
||||
crtpi_uniforms_.enable_scanlines = p.enable_scanlines ? 1 : 0;
|
||||
crtpi_uniforms_.enable_multisample = p.enable_multisample ? 1 : 0;
|
||||
crtpi_uniforms_.enable_gamma = p.enable_gamma ? 1 : 0;
|
||||
crtpi_uniforms_.enable_curvature = p.enable_curvature ? 1 : 0;
|
||||
crtpi_uniforms_.enable_sharper = p.enable_sharper ? 1 : 0;
|
||||
crtpi_uniforms_.bloom_factor = p.bloom_factor;
|
||||
crtpi_uniforms_.input_gamma = p.input_gamma;
|
||||
crtpi_uniforms_.output_gamma = p.output_gamma;
|
||||
crtpi_uniforms_.mask_brightness = p.mask_brightness;
|
||||
crtpi_uniforms_.curvature_x = p.curvature_x;
|
||||
crtpi_uniforms_.curvature_y = p.curvature_y;
|
||||
crtpi_uniforms_.mask_type = p.mask_type;
|
||||
crtpi_uniforms_.enable_scanlines = p.enable_scanlines ? 1 : 0;
|
||||
crtpi_uniforms_.enable_multisample = p.enable_multisample ? 1 : 0;
|
||||
crtpi_uniforms_.enable_gamma = p.enable_gamma ? 1 : 0;
|
||||
crtpi_uniforms_.enable_curvature = p.enable_curvature ? 1 : 0;
|
||||
crtpi_uniforms_.enable_sharper = p.enable_sharper ? 1 : 0;
|
||||
// texture_width/height se inyectan en render() cada frame
|
||||
}
|
||||
|
||||
|
||||
@@ -33,20 +33,20 @@ struct CrtPiUniforms {
|
||||
float bloom_factor; // Factor brillo zonas iluminadas (default 3.5)
|
||||
float input_gamma; // Gamma de entrada (default 2.4)
|
||||
// vec4 #1
|
||||
float output_gamma; // Gamma de salida (default 2.2)
|
||||
float mask_brightness; // Brillo sub-píxeles máscara (default 0.80)
|
||||
float curvature_x; // Distorsión barrel X (default 0.05)
|
||||
float curvature_y; // Distorsión barrel Y (default 0.10)
|
||||
float output_gamma; // Gamma de salida (default 2.2)
|
||||
float mask_brightness; // Brillo sub-píxeles máscara (default 0.80)
|
||||
float curvature_x; // Distorsión barrel X (default 0.05)
|
||||
float curvature_y; // Distorsión barrel 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)
|
||||
int enable_gamma; // 0 = off, 1 = on
|
||||
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)
|
||||
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 en píxeles (inyectado en render)
|
||||
float texture_height; // Alto del canvas en píxeles (inyectado en render)
|
||||
int enable_curvature; // 0 = off, 1 = on
|
||||
int enable_sharper; // 0 = off, 1 = on
|
||||
float texture_width; // Ancho del canvas en píxeles (inyectado en render)
|
||||
float texture_height; // Alto del canvas en píxeles (inyectado en render)
|
||||
};
|
||||
|
||||
// Downscale uniforms pushed to the Lanczos downscale fragment stage.
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
namespace Rendering {
|
||||
|
||||
/** @brief Identificador del shader de post-procesado activo */
|
||||
enum class ShaderType { POSTFX, CRTPI };
|
||||
enum class ShaderType { POSTFX,
|
||||
CRTPI };
|
||||
|
||||
/**
|
||||
* @brief Parámetros de intensidad de los efectos PostFX
|
||||
@@ -38,12 +39,12 @@ namespace Rendering {
|
||||
float mask_brightness{0.80F}; // Sub-píxeles tenues en la máscara de fósforo
|
||||
float curvature_x{0.05F}; // Distorsión barrel eje X
|
||||
float curvature_y{0.10F}; // Distorsión barrel eje Y
|
||||
int mask_type{2}; // 0=ninguna, 1=verde/magenta, 2=RGB fósforo
|
||||
bool enable_scanlines{true}; // Activar efecto de scanlines
|
||||
bool enable_multisample{true}; // Antialiasing analítico de scanlines
|
||||
bool enable_gamma{true}; // Corrección gamma
|
||||
bool enable_curvature{false}; // Distorsión barrel CRT
|
||||
bool enable_sharper{false}; // Submuestreo más nítido (modo SHARPER)
|
||||
int mask_type{2}; // 0=ninguna, 1=verde/magenta, 2=RGB fósforo
|
||||
bool enable_scanlines{true}; // Activar efecto de scanlines
|
||||
bool enable_multisample{true}; // Antialiasing analítico de scanlines
|
||||
bool enable_gamma{true}; // Corrección gamma
|
||||
bool enable_curvature{false}; // Distorsión barrel CRT
|
||||
bool enable_sharper{false}; // Submuestreo más nítido (modo SHARPER)
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,10 +95,10 @@ void Debug::setDebugFile(const std::string& path) {
|
||||
// Carga la configuración de debug desde debug.yaml
|
||||
void Debug::loadFromFile() {
|
||||
// Inicializar con valores de release por defecto
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.spawn_x = Defaults::Game::Player::SPAWN_X;
|
||||
spawn_settings_.spawn_y = Defaults::Game::Player::SPAWN_Y;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
|
||||
std::ifstream file(debug_file_path_);
|
||||
if (!file.good()) {
|
||||
@@ -126,10 +126,10 @@ void Debug::loadFromFile() {
|
||||
}
|
||||
} catch (...) {
|
||||
// YAML inválido: resetear a defaults y sobreescribir
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.room = Defaults::Game::Room::INITIAL;
|
||||
spawn_settings_.spawn_x = Defaults::Game::Player::SPAWN_X;
|
||||
spawn_settings_.spawn_y = Defaults::Game::Player::SPAWN_Y;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
spawn_settings_.flip = Defaults::Game::Player::SPAWN_FLIP;
|
||||
saveToFile();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,21 +28,21 @@ class Debug {
|
||||
|
||||
[[nodiscard]] auto isEnabled() const -> bool { return enabled_; } // Obtiene si el debug está activo
|
||||
|
||||
void add(const std::string& text) { slot_.push_back(text); } // Añade texto one-shot al slot (se limpia cada frame)
|
||||
void clear() { slot_.clear(); } // Limpia el slot one-shot (no afecta a watches)
|
||||
void addToLog(const std::string& text) { log_.push_back(text); } // Añade texto al log
|
||||
void clearLog() { log_.clear(); } // Limpia el log
|
||||
void set(const std::string& key, const std::string& value); // Establece/actualiza un valor persistente en el watch window
|
||||
void unset(const std::string& key); // Elimina un valor del watch window
|
||||
void clearWatches() { watches_.clear(); } // Limpia todos los watches
|
||||
void add(const std::string& text) { slot_.push_back(text); } // Añade texto one-shot al slot (se limpia cada frame)
|
||||
void clear() { slot_.clear(); } // Limpia el slot one-shot (no afecta a watches)
|
||||
void addToLog(const std::string& text) { log_.push_back(text); } // Añade texto al log
|
||||
void clearLog() { log_.clear(); } // Limpia el log
|
||||
void set(const std::string& key, const std::string& value); // Establece/actualiza un valor persistente en el watch window
|
||||
void unset(const std::string& key); // Elimina un valor del watch window
|
||||
void clearWatches() { watches_.clear(); } // Limpia todos los watches
|
||||
void setEnabled(bool value) { enabled_ = value; } // Establece si el debug está activo
|
||||
void toggleEnabled() { enabled_ = !enabled_; } // Alterna el estado del debug
|
||||
|
||||
void setDebugFile(const std::string& path); // Establece la ruta del archivo debug.yaml
|
||||
void loadFromFile(); // Carga la configuración de debug desde debug.yaml
|
||||
void saveToFile() const; // Guarda la configuración de debug en debug.yaml
|
||||
[[nodiscard]] auto getSpawnSettings() const -> const SpawnSettings& { return spawn_settings_; } // Obtiene los valores de spawn
|
||||
void setSpawnSettings(const SpawnSettings& s) { spawn_settings_ = s; } // Establece los valores de spawn
|
||||
void setDebugFile(const std::string& path); // Establece la ruta del archivo debug.yaml
|
||||
void loadFromFile(); // Carga la configuración de debug desde debug.yaml
|
||||
void saveToFile() const; // Guarda la configuración de debug en debug.yaml
|
||||
[[nodiscard]] auto getSpawnSettings() const -> const SpawnSettings& { return spawn_settings_; } // Obtiene los valores de spawn
|
||||
void setSpawnSettings(const SpawnSettings& s) { spawn_settings_ = s; } // Establece los valores de spawn
|
||||
|
||||
private:
|
||||
static Debug* debug; // [SINGLETON] Objeto privado
|
||||
@@ -54,11 +54,11 @@ class Debug {
|
||||
std::map<std::string, std::string> watches_; // Watch window: valores persistentes (key→value)
|
||||
std::vector<std::string> slot_; // One-shot: textos que se limpian cada frame
|
||||
std::vector<std::string> log_; // Log persistente
|
||||
int x_ = 0; // Posicion donde escribir el texto de debug
|
||||
int y_ = 0; // Posición donde escribir el texto de debug
|
||||
bool enabled_ = false; // Indica si esta activo el modo debug
|
||||
std::string debug_file_path_; // Ruta del archivo debug.yaml
|
||||
SpawnSettings spawn_settings_; // Configuración de spawn para debug
|
||||
int x_ = 0; // Posicion donde escribir el texto de debug
|
||||
int y_ = 0; // Posición donde escribir el texto de debug
|
||||
bool enabled_ = false; // Indica si esta activo el modo debug
|
||||
std::string debug_file_path_; // Ruta del archivo debug.yaml
|
||||
SpawnSettings spawn_settings_; // Configuración de spawn para debug
|
||||
};
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -84,8 +84,8 @@ void Player::move(float delta_time) {
|
||||
}
|
||||
syncSpriteAndCollider(); // Actualiza la posición del sprite y las colisiones
|
||||
#ifdef _DEBUG
|
||||
Debug::get()->set("P.X", std::to_string(static_cast<int>(x_)));
|
||||
Debug::get()->set("P.Y", std::to_string(static_cast<int>(y_)));
|
||||
Debug::get()->set("P.X", std::to_string(static_cast<int>(x_)));
|
||||
Debug::get()->set("P.Y", std::to_string(static_cast<int>(y_)));
|
||||
Debug::get()->set("P.LGP", std::to_string(last_grounded_position_));
|
||||
switch (state_) {
|
||||
case State::ON_GROUND:
|
||||
@@ -288,9 +288,9 @@ void Player::moveOnSlope(float delta_time) {
|
||||
const bool OUT_OF_BOUNDS = (X < MIN_X) || (X > MAX_X);
|
||||
|
||||
#ifdef _DEBUG
|
||||
Debug::get()->set("sl.foot", std::to_string(X));
|
||||
Debug::get()->set("sl.y_c", std::to_string(static_cast<int>(y_)));
|
||||
Debug::get()->set("sl.oob", OUT_OF_BOUNDS ? "YES" : "ok");
|
||||
Debug::get()->set("sl.foot", std::to_string(X));
|
||||
Debug::get()->set("sl.y_c", std::to_string(static_cast<int>(y_)));
|
||||
Debug::get()->set("sl.oob", OUT_OF_BOUNDS ? "YES" : "ok");
|
||||
#endif
|
||||
|
||||
if (OUT_OF_BOUNDS) {
|
||||
@@ -593,7 +593,6 @@ void Player::updateCurrentSlope() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (current_slope_ != nullptr) {
|
||||
Debug::get()->set("sl.type", isLeftSlope() ? "L\\" : "R/");
|
||||
|
||||
@@ -14,5 +14,5 @@ namespace GameControl {
|
||||
inline std::function<std::string()> set_initial_room;
|
||||
// Registrada por Game::Game() — guarda la posición/flip actuales del jugador como posición de inicio en debug.yaml
|
||||
inline std::function<std::string()> set_initial_pos;
|
||||
}
|
||||
} // namespace GameControl
|
||||
#endif
|
||||
|
||||
@@ -998,9 +998,9 @@ namespace Options {
|
||||
}
|
||||
// Cargar defaults en memoria aunque no se pueda escribir
|
||||
crtpi_presets.push_back({"DEFAULT", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, true, true, false, false});
|
||||
crtpi_presets.push_back({"CURVED", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, true, true, true, false});
|
||||
crtpi_presets.push_back({"SHARP", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, false, true, false, true});
|
||||
crtpi_presets.push_back({"MINIMAL", 8.0F, 0.05F, 2.0F, 2.4F, 2.2F, 1.00F, 0.0F, 0.0F, 0, true, false, false, false, false});
|
||||
crtpi_presets.push_back({"CURVED", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, true, true, true, false});
|
||||
crtpi_presets.push_back({"SHARP", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, false, true, false, true});
|
||||
crtpi_presets.push_back({"MINIMAL", 8.0F, 0.05F, 2.0F, 2.4F, 2.2F, 1.00F, 0.0F, 0.0F, 0, true, false, false, false, false});
|
||||
current_crtpi_preset = 0;
|
||||
return true;
|
||||
}
|
||||
@@ -1081,9 +1081,9 @@ namespace Options {
|
||||
std::cout << "CrtPi file created with defaults: " << crtpi_file_path << '\n';
|
||||
}
|
||||
crtpi_presets.push_back({"DEFAULT", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, true, true, false, false});
|
||||
crtpi_presets.push_back({"CURVED", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, true, true, true, false});
|
||||
crtpi_presets.push_back({"SHARP", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, false, true, false, true});
|
||||
crtpi_presets.push_back({"MINIMAL", 8.0F, 0.05F, 2.0F, 2.4F, 2.2F, 1.00F, 0.0F, 0.0F, 0, true, false, false, false, false});
|
||||
crtpi_presets.push_back({"CURVED", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, true, true, true, false});
|
||||
crtpi_presets.push_back({"SHARP", 6.0F, 0.12F, 3.5F, 2.4F, 2.2F, 0.80F, 0.05F, 0.10F, 2, true, false, true, false, true});
|
||||
crtpi_presets.push_back({"MINIMAL", 8.0F, 0.05F, 2.0F, 2.4F, 2.2F, 1.00F, 0.0F, 0.0F, 0, true, false, false, false, false});
|
||||
current_crtpi_preset = 0;
|
||||
return true;
|
||||
}
|
||||
@@ -1110,22 +1110,34 @@ namespace Options {
|
||||
parseFloatField(p, "curvature_x", preset.curvature_x);
|
||||
parseFloatField(p, "curvature_y", preset.curvature_y);
|
||||
if (p.contains("mask_type")) {
|
||||
try { preset.mask_type = p["mask_type"].get_value<int>(); } catch (...) {}
|
||||
try {
|
||||
preset.mask_type = p["mask_type"].get_value<int>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (p.contains("enable_scanlines")) {
|
||||
try { preset.enable_scanlines = p["enable_scanlines"].get_value<bool>(); } catch (...) {}
|
||||
if (p.contains("enable_scanlines")) {
|
||||
try {
|
||||
preset.enable_scanlines = p["enable_scanlines"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (p.contains("enable_multisample")) {
|
||||
try { preset.enable_multisample = p["enable_multisample"].get_value<bool>(); } catch (...) {}
|
||||
try {
|
||||
preset.enable_multisample = p["enable_multisample"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (p.contains("enable_gamma")) {
|
||||
try { preset.enable_gamma = p["enable_gamma"].get_value<bool>(); } catch (...) {}
|
||||
try {
|
||||
preset.enable_gamma = p["enable_gamma"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (p.contains("enable_curvature")) {
|
||||
try { preset.enable_curvature = p["enable_curvature"].get_value<bool>(); } catch (...) {}
|
||||
try {
|
||||
preset.enable_curvature = p["enable_curvature"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
if (p.contains("enable_sharper")) {
|
||||
try { preset.enable_sharper = p["enable_sharper"].get_value<bool>(); } catch (...) {}
|
||||
try {
|
||||
preset.enable_sharper = p["enable_sharper"].get_value<bool>();
|
||||
} catch (...) {}
|
||||
}
|
||||
crtpi_presets.push_back(preset);
|
||||
}
|
||||
@@ -1133,7 +1145,9 @@ namespace Options {
|
||||
|
||||
if (!crtpi_presets.empty()) {
|
||||
current_crtpi_preset = std::clamp(
|
||||
current_crtpi_preset, 0, static_cast<int>(crtpi_presets.size()) - 1);
|
||||
current_crtpi_preset,
|
||||
0,
|
||||
static_cast<int>(crtpi_presets.size()) - 1);
|
||||
} else {
|
||||
current_crtpi_preset = 0;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <utility>
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "core/rendering/screen.hpp" // Para Screen::Filter
|
||||
#include "core/rendering/screen.hpp" // Para Screen::Filter
|
||||
#include "core/rendering/shader_backend.hpp" // Para Rendering::ShaderType
|
||||
#include "game/defaults.hpp"
|
||||
#include "utils/defines.hpp" // Para WINDOW_CAPTION
|
||||
@@ -143,12 +143,12 @@ namespace Options {
|
||||
float mask_brightness{0.80F}; // Brillo sub-píxeles en la máscara de fósforo
|
||||
float curvature_x{0.05F}; // Distorsión barrel eje X
|
||||
float curvature_y{0.10F}; // Distorsión barrel eje Y
|
||||
int mask_type{2}; // 0=ninguna, 1=verde/magenta, 2=RGB fósforo
|
||||
bool enable_scanlines{true}; // Activar efecto de scanlines
|
||||
bool enable_multisample{true}; // Antialiasing analítico de scanlines
|
||||
bool enable_gamma{true}; // Corrección gamma
|
||||
bool enable_curvature{false}; // Distorsión barrel CRT
|
||||
bool enable_sharper{false}; // Submuestreo más nítido (modo SHARPER)
|
||||
int mask_type{2}; // 0=ninguna, 1=verde/magenta, 2=RGB fósforo
|
||||
bool enable_scanlines{true}; // Activar efecto de scanlines
|
||||
bool enable_multisample{true}; // Antialiasing analítico de scanlines
|
||||
bool enable_gamma{true}; // Corrección gamma
|
||||
bool enable_curvature{false}; // Distorsión barrel CRT
|
||||
bool enable_sharper{false}; // Submuestreo más nítido (modo SHARPER)
|
||||
};
|
||||
|
||||
// --- Variables globales ---
|
||||
@@ -176,9 +176,9 @@ namespace Options {
|
||||
inline std::string postfx_file_path{}; // Ruta del fichero postfx.yaml
|
||||
|
||||
// --- Variables CrtPi ---
|
||||
inline std::vector<CrtPiPreset> crtpi_presets{}; // Lista de presets del shader CRT-Pi
|
||||
inline int current_crtpi_preset{0}; // Índice del preset CRT-Pi actual
|
||||
inline std::string crtpi_file_path{}; // Ruta del fichero crtpi.yaml
|
||||
inline std::vector<CrtPiPreset> crtpi_presets{}; // Lista de presets del shader CRT-Pi
|
||||
inline int current_crtpi_preset{0}; // Índice del preset CRT-Pi actual
|
||||
inline std::string crtpi_file_path{}; // Ruta del fichero crtpi.yaml
|
||||
|
||||
// --- Shader activo ---
|
||||
inline Rendering::ShaderType current_shader{Rendering::ShaderType::POSTFX}; // Shader de post-procesado activo
|
||||
@@ -188,10 +188,10 @@ namespace Options {
|
||||
void setConfigFile(const std::string& path); // Establece la ruta del fichero de configuración
|
||||
auto loadFromFile() -> bool; // Carga las opciones desde el fichero configurado
|
||||
auto saveToFile() -> bool; // Guarda las opciones al fichero configurado
|
||||
void setPostFXFile(const std::string& path); // Establece la ruta del fichero de PostFX
|
||||
auto loadPostFXFromFile() -> bool; // Carga los presets de PostFX desde el fichero
|
||||
auto savePostFXToFile() -> bool; // Guarda los presets de PostFX por defecto
|
||||
void setCrtPiFile(const std::string& path); // Establece la ruta del fichero de CrtPi
|
||||
auto loadCrtPiFromFile() -> bool; // Carga los presets de CrtPi desde el fichero (crea defaults si no existe)
|
||||
void setPostFXFile(const std::string& path); // Establece la ruta del fichero de PostFX
|
||||
auto loadPostFXFromFile() -> bool; // Carga los presets de PostFX desde el fichero
|
||||
auto savePostFXToFile() -> bool; // Guarda los presets de PostFX por defecto
|
||||
void setCrtPiFile(const std::string& path); // Establece la ruta del fichero de CrtPi
|
||||
auto loadCrtPiFromFile() -> bool; // Carga los presets de CrtPi desde el fichero (crea defaults si no existe)
|
||||
|
||||
} // namespace Options
|
||||
@@ -39,7 +39,7 @@ class Logo {
|
||||
static constexpr float SINCE_1998_FADE_DURATION = 0.5F; // Duración del fade-in de "Since 1998"
|
||||
static constexpr float DISPLAY_DURATION = 3.5F; // Tiempo que el logo permanece visible
|
||||
static constexpr float FADE_OUT_DURATION = 0.5F; // Duración del fade-out final
|
||||
static constexpr float BLACK_SCREEN_DURATION = 1.0F; // Duración de la pantalla negra final
|
||||
static constexpr float BLACK_SCREEN_DURATION = 1.0F; // Duración de la pantalla negra final
|
||||
|
||||
// --- Constantes de animación ---
|
||||
static constexpr float JAILGAMES_SLIDE_DURATION = 0.8F; // Duración de la animación de slide-in (segundos)
|
||||
|
||||
@@ -490,7 +490,7 @@ static const std::vector<ConsoleCommand> COMMANDS = {
|
||||
if (args.empty() || args[0] != "INITIAL") { return "Usage: SET INITIAL [ROOM|POS] | SET SHADER [POSTFX|CRTPI]"; }
|
||||
|
||||
const bool DO_ROOM = args.size() == 1 || (args.size() >= 2 && args[1] == "ROOM");
|
||||
const bool DO_POS = args.size() == 1 || (args.size() >= 2 && args[1] == "POS");
|
||||
const bool DO_POS = args.size() == 1 || (args.size() >= 2 && args[1] == "POS");
|
||||
|
||||
if (!DO_ROOM && !DO_POS) { return "Usage: SET INITIAL [ROOM|POS]"; }
|
||||
if (!GameControl::set_initial_room || !GameControl::set_initial_pos) { return "Game not initialized"; }
|
||||
|
||||
@@ -36,20 +36,20 @@ except ImportError:
|
||||
|
||||
# Conjunto de caracteres en el mismo orden que los ficheros .fnt del juego.
|
||||
# ASCII 32-126 primero, luego extensiones para castellano, catalán y valenciano.
|
||||
_ASCII_CHARS = [chr(i) for i in range(32, 127)] # 95 chars: espacio … ~
|
||||
_EXTENDED_CHARS = list("ÀÁÈÉÍÏÒÓÚÜÑÇàáèéíïòóúüñç¡¿«»·") # 29 chars ES/CA/VA
|
||||
ALL_CHARS = _ASCII_CHARS + _EXTENDED_CHARS # 124 total
|
||||
_ASCII_CHARS = [chr(i) for i in range(32, 127)] # 95 chars: espacio … ~
|
||||
_EXTENDED_CHARS = list("ÀÁÈÉÌÍÒÓÙÚÑÇàáèéìíòóùúñç¡¿«»·") # 29 chars ES/CA/VA
|
||||
ALL_CHARS = _ASCII_CHARS + _EXTENDED_CHARS # 124 total
|
||||
|
||||
# Caracteres de fallback para TTFs sin soporte de acentos/especiales.
|
||||
# Si el TTF no tiene el char, se dibuja el fallback en su celda del bitmap.
|
||||
# El .fnt sigue registrando el codepoint original → texto localizado funciona.
|
||||
CHAR_FALLBACKS: dict[str, str] = {
|
||||
"À": "A", "Á": "A", "È": "E", "É": "E",
|
||||
"Í": "I", "Ï": "I", "Ò": "O", "Ó": "O",
|
||||
"Ú": "U", "Ü": "U", "Ñ": "N", "Ç": "C",
|
||||
"Ì": "I", "Í": "I", "Ò": "O", "Ó": "O",
|
||||
"Ù": "U", "Ú": "U", "Ñ": "N", "Ç": "C",
|
||||
"à": "a", "á": "a", "è": "e", "é": "e",
|
||||
"í": "i", "ï": "i", "ò": "o", "ó": "o",
|
||||
"ú": "u", "ü": "u", "ñ": "n", "ç": "c",
|
||||
"ì": "i", "í": "i", "ò": "o", "ó": "o",
|
||||
"ù": "u", "ú": "u", "ñ": "n", "ç": "c",
|
||||
"¡": "!", "¿": "?", "«": "<", "»": ">", "·": ".",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user