Refactor Dusk settings out to common interface used by game and UI code

This commit is contained in:
Max Roncace
2026-04-02 23:58:38 -04:00
parent ffa958a75d
commit 3b895609d3
20 changed files with 215 additions and 130 deletions
+66
View File
@@ -0,0 +1,66 @@
#include "dusk/settings.h"
namespace dusk {
UserSettings g_userSettings = {
// Program settings
// Video
.video = {
.enableFullscreen = false,
},
// Audio
.audio = {
.masterVolume = 1.0f,
.mainMusicVolume = 1.0f,
.subMusicVolume = 1.0f,
.soundEffectsVolume = 1.0f,
.fanfareVolume = 1.0f,
},
// Game settings
.game = {
// Quality of Life
.enableQuickTransform = false,
// Preferences
.enableMirrorMode = false,
.invertCameraXAxis = false,
// Graphics
.enableBloom = true,
.useWaterProjectionOffset = false,
// Cheats
.enableFastIronBoots = false,
// Technical
.restoreWiiGlitches = false,
}
};
UserSettings& getSettings() {
return g_userSettings;
}
// Transient settings
static TransientSettings g_transientSettings = {
.collisionView = {
.enableTerrainView = false,
.enableWireframe = false,
.enableAtView = false,
.enableTgView = false,
.enableCoView = false,
.terrainViewOpacity = 50.0f,
.colliderViewOpacity = 50.0f,
.drawRange = 100.0f,
},
};
TransientSettings& getTransientSettings() {
return g_transientSettings;
}
}