12 std::shared_ptr<EngineConfig> EngineConfigFactory::CreateDefaultConfiguration() {
13 auto cfg = std::make_shared<EngineConfig>();
15 if (!cfg->no_walk_sound) {
18 if (!cfg->always_run) {
29 cfg->turn_speed = 128;
43 cfg->sound_level = std::min(4,
OS_GetAppInt(
"soundflag", 9));
44 cfg->music_level = std::min(3,
OS_GetAppInt(
"musicflag", 9));
45 cfg->voice_level = std::min(4,
OS_GetAppInt(
"CharVoices", 9));
50 cfg->flags2 |= GAME_FLAGS_2_DRAW_BLOODSPLATS;
52 cfg->flags2 &= ~GAME_FLAGS_2_DRAW_BLOODSPLATS;
53 cfg->no_bloodsplats = !(cfg->flags2 & GAME_FLAGS_2_DRAW_BLOODSPLATS);
61 haystack.begin(), haystack.end(),
62 needle.begin(), needle.end(),
63 [](
char c1,
char c2) {return std::toupper(c1) == std::toupper(c2); });
65 return i != haystack.end();
70 return std::make_shared<EngineConfig>(*other.get());
74 std::shared_ptr<const EngineConfig>
config,
75 std::function<
void(std::shared_ptr<EngineConfig> &)> mutator
77 auto new_config = std::make_shared<EngineConfig>(*
config.get());
93 config->dword_6BE368_debug_settings_2 |= DEBUG_SETTINGS_RUN_IN_WIDOW;
108 config->no_walk_sound =
true;
111 config->no_margareth =
true;
115 config->renderer_name =
"DirectDraw";
118 config->renderer_name =
"OpenGL";