PCG-FPS
v2 m0.22.4
Simple First Person Shooter with Procedurally Generated Level
|
Go to the documentation of this file. 1 #ifndef SKR_FPS2_SETTINGS_H
2 #define SKR_FPS2_SETTINGS_H
7 #include <unordered_map>
38 #pragma region Integer type Settings
49 #pragma warning(disable:4251) // only using types from standard library, warning can be ignored. Source: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4251
76 #pragma warning(default:4251)
79 #pragma region Float type Settings
88 #pragma warning(disable:4251) // only using types from standard library, warning can be ignored. Source: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4251
113 #pragma warning(default:4251)
116 #pragma region Boolean type Settings
128 #pragma warning(disable:4251) // only using types from standard library, warning can be ignored. Source: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4251
154 #pragma warning(default:4251)
158 #pragma region RunTime Settings
239 #endif // !SKR_FPS2_SETTINGS_H
@ RND_GAMMACORRECTION
use gamma correction of/off
@ ShadowMappingPCFDisk
shadow mapping with Percentage-closer filtering with fixed samples
Settings operator=(const Settings &)=delete
copy assignment constructor is deleted
std::unordered_map< SettingBool, std::string > SettingBoolToStringMap
typedef mapping a setting of type boolean to a string
Definition: Settings.h:144
managing and handling of settings for program
Definition: Settings.h:18
@ RNG_PRINTSEED
print seed to cmd and log on/off
Settings(const Settings &)=delete
copy constructor is deleted
ShadowType _shadowRenderingMode
type of shadow mapping currently used
Definition: Settings.h:189
static const std::unordered_map< SettingUInt32t, std::string > MapSettingIntToString
mapping table for settings of type unsigned integer to a string
Definition: Settings.h:74
std::string _settingsFilePath
Definition: Settings.h:32
std::unordered_map< std::string, SettingBool > StringToSettinBoolMap
typedef mapping a string to a setting of type boolean
Definition: Settings.h:150
SettingUInt32t
identifiers for settings of type unsigned integer
Definition: Settings.h:42
std::unordered_map< std::string, SettingFloat > StringToSettingFloatMap
typedef to map a string to a setting of type float
Definition: Settings.h:108
@ RND_NEAR
distance of near plane
static const std::unordered_map< std::string, SettingFloat > MapStringToSettingFloat
mapping table from a string to setting of type float
Definition: Settings.h:111
Settings()
default constructor empty as OpenGL-Renderer object is a global object an requiers one at launch,...
Definition: Settings.h:22
RuntimeBoolSetting
identifiers for settings of type bool only relevant during runtime, they are not written to the setti...
Definition: Settings.h:162
std::unordered_map< SettingUInt32t, uint32_t > _settings_uint32t
map keeping settings of type unsigned integer and their values
Definition: Settings.h:53
static const std::unordered_map< SettingFloat, std::string > MapSettingFloatToString
mapping table from a setting of type float to a string
Definition: Settings.h:105
@ GhostMode
flag indicating if ghost mode is active (no collision + fly)
@ SCR_WIDTH
viewport width
@ RNG_MODE
mode of procedural generation
std::string PrintSettingsToString()
write all settings into a single string used to write everything in one big chunk
Definition: Settings.cpp:166
bool GetSettingsFromFile(const std::string path, std::vector< std::string > &settings)
read settings from a file into a list of strings
Definition: Settings.cpp:199
@ UseNormalMapping
flag indicating if normal mapping is active
@ RND_VSYNC
vertical synchronization on/off
SettingBool
identifiers for settings of type boolean
Definition: Settings.h:121
@ MoveLights
flag indicating if lights are moving or static
std::unordered_map< SettingBool, bool > _settings_bool
map keeping settings of type boolean and their values
Definition: Settings.h:132
static const std::unordered_map< SettingBool, std::string > MapSettingBoolToString
mapping table to map a setting of type boolean to a string
Definition: Settings.h:147
std::unordered_map< SettingFloat, std::string > SettingFloatToStringMap
typedef to map a setting of type flaot to a string
Definition: Settings.h:102
std::unordered_map< RuntimeBoolSetting, bool > _runtime_bool
map keeping settings of type bool only relevant during runtime
Definition: Settings.h:172
@ ShadowMappingPCF
shadow mapping with Percentage-closer filtering
@ SCR_HEIGHT
viewport height
@ ShadowMapping
simple shadow mapping
std::string GetHumanReadableBool(bool v)
Get boolean value in human readable form: true/false instead of 1/0.
Definition: Settings.cpp:272
@ DrawBoundingBox
flag indicating if bounding boxes of geometry are draw
static const std::unordered_map< std::string, SettingBool > MapStringToSettingBool
mapping table from a string to a setting of type boolean
Definition: Settings.h:153
@ DrawDebugLight
flag indicating to draw a cube at position of every light
Definition: AssetPath.h:10
@ RND_COLORCODEDROOMS
color code rooms on/off
@ RNG_SEED
seed for random number generator used in procedural generation
@ RND_FAR
distance of far plane
std::unordered_map< SettingUInt32t, std::string > SettingIntToStringMap
typedef to map settings of type unsigned integer to a string
Definition: Settings.h:71
bool ReadSettingsFromFile()
read settings from path set in _settingsFilePath
Definition: Settings.cpp:130
static const std::unordered_map< std::string, SettingUInt32t > MapStringToSettingInt
mapping table for string to setting of type unsinged integer
Definition: Settings.h:68
std::unordered_map< std::string, SettingUInt32t > StringToSettingIntMap
typedef to map a string to a setting of type unsigned integer
Definition: Settings.h:65
bool SetSettingsFromString(std::vector< std::string > settings)
set settings from a list of strings goes through a list of settings, one per element,...
Definition: Settings.cpp:223
static Settings & GetInstance()
Get only instance of this class Implements Scott Meyers' singleton pattern.
Definition: Settings.cpp:60
std::unordered_map< SettingFloat, float > _settings_float
map keeping settings of type float and their values
Definition: Settings.h:92
bool WriteSettingsToFile()
write settings to path in _settingsFilePath
Definition: Settings.cpp:66
ShadowType
type identifies for shadow mapping types
Definition: Settings.h:182
SettingFloat
identifies for settings of type float
Definition: Settings.h:83