feat(postfx): debug HUD mostra PostFX, overrides persistents al ciclar, --postfx sense valor

- HUD (F1) afegeix línia PostFX: OFF o PostFX: <preset> [V:x.xx C:x.xx S:x.xx]
- applyPostFXPreset reaaplica overrides de CLI per preservar-los en ciclar amb X
- setPostFXParamOverrides guarda els valors en membres privats per persistència
- --postfx sense valor ja no dona error i utilitza complet (preset 3) per defecte

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 12:20:30 +01:00
parent d76c7f75a2
commit e3f29c864b
4 changed files with 64 additions and 3 deletions

View File

@@ -80,6 +80,7 @@ class Engine {
void handlePostFXCycle();
void handlePostFXToggle();
void setInitialPostFX(int mode);
void setPostFXParamOverrides(float vignette, float chroma);
// Modo kiosko
void setKioskMode(bool enabled) { kiosk_mode_ = enabled; }
@@ -124,6 +125,11 @@ class Engine {
int getBaseScreenHeight() const { return base_screen_height_; }
int getMaxAutoScenario() const { return max_auto_scenario_; }
size_t getCurrentTextureIndex() const { return current_texture_index_; }
bool isPostFXEnabled() const { return postfx_enabled_; }
int getPostFXMode() const { return postfx_effect_mode_; }
float getPostFXVignette() const { return postfx_uniforms_.vignette_strength; }
float getPostFXChroma() const { return postfx_uniforms_.chroma_strength; }
float getPostFXScanline() const { return postfx_uniforms_.scanline_strength; }
private:
// === Componentes del sistema (Composición) ===
@@ -175,6 +181,8 @@ class Engine {
PostFXUniforms postfx_uniforms_ = {0.0f, 0.0f, 0.0f, 0.0f};
int postfx_effect_mode_ = 0;
bool postfx_enabled_ = false;
float postfx_override_vignette_ = -1.f; // -1 = sin override
float postfx_override_chroma_ = -1.f;
// Sistema de zoom dinámico
int current_window_zoom_ = DEFAULT_WINDOW_ZOOM;