afegits els presets de shaders

This commit is contained in:
2026-04-04 19:57:04 +02:00
parent 2a774f777f
commit eb3f449a1e
6 changed files with 268 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <string>
#include <vector>
#include "game/defaults.hpp"
#include "game/defines.hpp"
@@ -63,6 +64,38 @@ namespace Options {
int vides{Defaults::Game::VIDES};
};
// Preset PostFX
struct PostFXPreset {
std::string name;
float vignette{0.6F};
float scanlines{0.7F};
float chroma{0.15F};
float mask{0.0F};
float gamma{0.0F};
float curvature{0.0F};
float bleeding{0.0F};
float flicker{0.0F};
};
// Preset CrtPi
struct CrtPiPreset {
std::string name;
float scanline_weight{6.0F};
float scanline_gap_brightness{0.12F};
float bloom_factor{3.5F};
float input_gamma{2.4F};
float output_gamma{2.2F};
float mask_brightness{0.80F};
float curvature_x{0.05F};
float curvature_y{0.10F};
int mask_type{2};
bool enable_scanlines{true};
bool enable_multisample{true};
bool enable_gamma{true};
bool enable_curvature{false};
bool enable_sharper{false};
};
// --- Variables globals ---
inline std::string version{};
inline KeysGUI keys_gui{};
@@ -73,9 +106,24 @@ namespace Options {
inline Game game{};
inline std::string config_file_path{};
// Presets de shaders
inline std::vector<PostFXPreset> postfx_presets{};
inline std::string postfx_file_path{};
inline int current_postfx_preset{0};
inline std::vector<CrtPiPreset> crtpi_presets{};
inline std::string crtpi_file_path{};
inline int current_crtpi_preset{0};
// --- API ---
void setConfigFile(const std::string& path);
auto loadFromFile() -> bool;
auto saveToFile() -> bool;
void setPostFXFile(const std::string& path);
auto loadPostFXFromFile() -> bool;
void setCrtPiFile(const std::string& path);
auto loadCrtPiFromFile() -> bool;
} // namespace Options