MCPcopy Create free account
hub / github.com/OpenMC2/OpenMC2 / save_settings_force

Method save_settings_force

src/Settings.cpp:215–246  ·  view source on GitHub ↗

mc2: 0x0053B370

Source from the content-addressed store, hash-verified

213
214//mc2: 0x0053B370
215bool Settings::save_settings_force() {
216 FileHandler::FuncTable *fileFuncs = glo_679810;
217 glo_679810 = &glo_679884;
218 FileHandler* file = glo_860220->vir_20("userdata\\options.cfg", "", 0);
219 glo_679810 = fileFuncs;
220
221 if (file == nullptr) {
222 return false;
223 }
224
225 unk_616420 option("options", file);
226
227 sub_615740(&option, "Audio Driver: %s\n", this->get_audio_driver());
228 sub_615740(&option, "ScreenWidth: %d\n", this->get_screen_width());
229 sub_615740(&option, "ScreenHeight: %d\n", this->get_screen_height());
230 sub_615740(&option, "ScreenDepth: %d\n", this->get_screen_depth());
231 sub_615740(&option, "DrawDistance: %d\n", this->get_draw_distance());
232 sub_615740(&option, "EnvironmentMapping: %d\n", this->get_environment_mapping());
233 sub_615740(&option, "Reflections: %d\n", this->get_reflections());
234 sub_615740(&option, "Shadows: %d\n", this->get_shadows());
235 sub_615740(&option, "FullscreenEffects: %d\n", this->get_fullscreen_effects());
236 const char *language = get_language_string(this->language_id);
237 if (language != nullptr) {
238 sub_615740(&option, "Language: %s\n", language);
239 }
240 sub_615740(&option, "InputDevice: %d %d\n", this->get_input_device_1(), this->get_input_device_2());
241
242 set_require_saving(false);
243
244 file->sub_617FB0();
245 return true;
246}
247
248MC2_DEF_GLOBAL(glo_Settings, 0x006C3250);
249

Callers

nothing calls this directly

Calls 15

get_audio_driverMethod · 0.95
get_screen_widthMethod · 0.95
get_screen_heightMethod · 0.95
get_screen_depthMethod · 0.95
get_draw_distanceMethod · 0.95
get_reflectionsMethod · 0.95
get_shadowsMethod · 0.95
get_input_device_1Method · 0.95
get_input_device_2Method · 0.95
sub_615740Function · 0.85

Tested by

no test coverage detected