mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-29 08:12:52 -04:00
Merge branch 'main' into feature/time-stones
This commit is contained in:
@@ -146,6 +146,12 @@ concept ConfigValue =
|
||||
template <ConfigValue T>
|
||||
const ConfigImplBase* GetConfigImpl();
|
||||
|
||||
template <typename T>
|
||||
struct ConfigEnumRange {
|
||||
static constexpr auto min = std::numeric_limits<std::underlying_type_t<T>>::min();
|
||||
static constexpr auto max = std::numeric_limits<std::underlying_type_t<T>>::max();
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief A CVar storing values.
|
||||
*
|
||||
@@ -189,6 +195,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr const T& getDefaultValue() const noexcept {
|
||||
checkRegistered();
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Change the value of a CVar.
|
||||
*
|
||||
|
||||
+15
-1
@@ -7,6 +7,20 @@ namespace dusk {
|
||||
|
||||
using namespace config;
|
||||
|
||||
enum class BloomMode : int {
|
||||
Off = 0,
|
||||
Classic = 1,
|
||||
Dusk = 2,
|
||||
};
|
||||
|
||||
namespace config {
|
||||
template <>
|
||||
struct ConfigEnumRange<BloomMode> {
|
||||
static constexpr auto min = BloomMode::Off;
|
||||
static constexpr auto max = BloomMode::Dusk;
|
||||
};
|
||||
}
|
||||
|
||||
// Persistent user settings
|
||||
|
||||
struct UserSettings {
|
||||
@@ -54,7 +68,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> invertCameraXAxis;
|
||||
|
||||
// Graphics
|
||||
ConfigVar<bool> enableBloom;
|
||||
ConfigVar<BloomMode> bloomMode;
|
||||
ConfigVar<bool> enableWaterRefraction;
|
||||
ConfigVar<bool> enableFrameInterpolation;
|
||||
ConfigVar<int> shadowResolutionMultiplier;
|
||||
|
||||
Reference in New Issue
Block a user