MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / create

Function create

src/Engine/Options.cpp:57–271  ·  view source on GitHub ↗

* Sets up the options by creating their OptionInfo metadata. */

Source from the content-addressed store, hash-verified

55 * Sets up the options by creating their OptionInfo metadata.
56 */
57void create()
58{
59#ifdef DINGOO
60 _info.push_back(OptionInfo("displayWidth", &displayWidth, Screen::ORIGINAL_WIDTH));
61 _info.push_back(OptionInfo("displayHeight", &displayHeight, Screen::ORIGINAL_HEIGHT));
62 _info.push_back(OptionInfo("fullscreen", &fullscreen, true));
63 _info.push_back(OptionInfo("asyncBlit", &asyncBlit, false));
64 _info.push_back(OptionInfo("keyboardMode", (int*)&keyboardMode, KEYBOARD_OFF));
65#else
66 _info.push_back(OptionInfo("displayWidth", &displayWidth, Screen::ORIGINAL_WIDTH*2));
67 _info.push_back(OptionInfo("displayHeight", &displayHeight, Screen::ORIGINAL_HEIGHT*2));
68 _info.push_back(OptionInfo("fullscreen", &fullscreen, false));
69 _info.push_back(OptionInfo("asyncBlit", &asyncBlit, true));
70 _info.push_back(OptionInfo("keyboardMode", (int*)&keyboardMode, KEYBOARD_ON));
71#endif
72
73 _info.push_back(OptionInfo("maxFrameSkip", &maxFrameSkip, 0));
74 _info.push_back(OptionInfo("traceAI", &traceAI, false));
75 _info.push_back(OptionInfo("baseXResolution", &baseXResolution, Screen::ORIGINAL_WIDTH));
76 _info.push_back(OptionInfo("baseYResolution", &baseYResolution, Screen::ORIGINAL_HEIGHT));
77 _info.push_back(OptionInfo("baseXGeoscape", &baseXGeoscape, Screen::ORIGINAL_WIDTH));
78 _info.push_back(OptionInfo("baseYGeoscape", &baseYGeoscape, Screen::ORIGINAL_HEIGHT));
79 _info.push_back(OptionInfo("baseXBattlescape", &baseXBattlescape, Screen::ORIGINAL_WIDTH));
80 _info.push_back(OptionInfo("baseYBattlescape", &baseYBattlescape, Screen::ORIGINAL_HEIGHT));
81 _info.push_back(OptionInfo("geoscapeScale", &geoscapeScale, 0));
82 _info.push_back(OptionInfo("battlescapeScale", &battlescapeScale, 0));
83 _info.push_back(OptionInfo("useScaleFilter", &useScaleFilter, false));
84 _info.push_back(OptionInfo("useHQXFilter", &useHQXFilter, false));
85 _info.push_back(OptionInfo("useOpenGL", &useOpenGL, false));
86 _info.push_back(OptionInfo("checkOpenGLErrors", &checkOpenGLErrors, false));
87 _info.push_back(OptionInfo("useOpenGLShader", &useOpenGLShader, "Shaders/Openxcom.OpenGL.shader"));
88 _info.push_back(OptionInfo("vSyncForOpenGL", &vSyncForOpenGL, true));
89 _info.push_back(OptionInfo("useOpenGLSmoothing", &useOpenGLSmoothing, true));
90 _info.push_back(OptionInfo("debug", &debug, false));
91 _info.push_back(OptionInfo("debugUi", &debugUi, false));
92 _info.push_back(OptionInfo("soundVolume", &soundVolume, MIX_MAX_VOLUME));
93 _info.push_back(OptionInfo("musicVolume", &musicVolume, MIX_MAX_VOLUME));
94 _info.push_back(OptionInfo("uiVolume", &uiVolume, MIX_MAX_VOLUME/2));
95 _info.push_back(OptionInfo("language", &language, ""));
96 _info.push_back(OptionInfo("battleScrollSpeed", &battleScrollSpeed, 8));
97 _info.push_back(OptionInfo("battleEdgeScroll", (int*)&battleEdgeScroll, SCROLL_AUTO));
98 _info.push_back(OptionInfo("battleDragScrollButton", &battleDragScrollButton, SDL_BUTTON_MIDDLE));
99 _info.push_back(OptionInfo("dragScrollTimeTolerance", &dragScrollTimeTolerance, 300)); // miliSecond
100 _info.push_back(OptionInfo("dragScrollPixelTolerance", &dragScrollPixelTolerance, 10)); // count of pixels
101 _info.push_back(OptionInfo("battleFireSpeed", &battleFireSpeed, 6));
102 _info.push_back(OptionInfo("battleXcomSpeed", &battleXcomSpeed, 30));
103 _info.push_back(OptionInfo("battleAlienSpeed", &battleAlienSpeed, 30));
104 _info.push_back(OptionInfo("battleNewPreviewPath", (int*)&battleNewPreviewPath, PATH_NONE)); // requires double-click to confirm moves
105 _info.push_back(OptionInfo("fpsCounter", &fpsCounter, false));
106 _info.push_back(OptionInfo("globeDetail", &globeDetail, true));
107 _info.push_back(OptionInfo("globeRadarLines", &globeRadarLines, true));
108 _info.push_back(OptionInfo("globeFlightPaths", &globeFlightPaths, true));
109 _info.push_back(OptionInfo("globeAllRadarsOnBaseBuild", &globeAllRadarsOnBaseBuild, true));
110 _info.push_back(OptionInfo("audioSampleRate", &audioSampleRate, 22050));
111 _info.push_back(OptionInfo("audioBitDepth", &audioBitDepth, 16));
112 _info.push_back(OptionInfo("pauseMode", &pauseMode, 0));
113 _info.push_back(OptionInfo("battleNotifyDeath", &battleNotifyDeath, false));
114 _info.push_back(OptionInfo("showFundsOnGeoscape", &showFundsOnGeoscape, false));

Callers 3

initFunction · 0.85
loadMethod · 0.85
ErrorMessageStateMethod · 0.85

Calls 1

OptionInfoClass · 0.85

Tested by

no test coverage detected