Debian Codegraph @

Descent3/config.cpp

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/config.cpp $
21 * $Revision: 178 $
22 * $Date: 9/14/01 4:47p $
23 * $Author: Matt $
24 *
25 * source to configuration functions (video,sound,etc)
26 *
27 * $Log: /DescentIII/Main/config.cpp $
28 *
29 * 178 9/14/01 4:47p Matt
30 * Cleaned up problems when screen bit depth set to 32.
31 *
32 * 177 9/14/01 12:47p Matt
33 * Took out center window missile view option since it didn't really work
34 * (& wasn't supposed to be in the game).
35 *
36 * 176 9/14/01 11:06a Matt
37 * Removed the mission goals item from the HUD config, since there's no
38 * mission goal HUD item to be controlled.
39 *
40 * 175 4/25/00 3:15p Matt
41 * Fixed math error (incorrect literal constant) in terrain detail
42 * computation.
43 *
44 * 174 4/19/00 5:10p Matt
45 * From Duane for 1.4
46 * Added checks, asserts, and fixes for bad return values
47 * Mac pragmas
48 *
49 * 173 3/20/00 12:02p Matt
50 * Merge of Duane's post-1.3 changes.
51 * Made some text localizable and changed default level settings (Mac
52 * only)
53 *
54 * 172 10/29/99 5:25p Jeff
55 * fixed for Linux (no gamma or 32/16 bit options)
56 *
57 * 171 10/25/99 11:56a Jeff
58 * ifdef'd some Macintosh pragmas
59 *
60 * 170 10/22/99 10:42a Matt
61 * Mac merge
62 *
63 * 169 5/22/99 1:16a Jason
64 * change terrain detail level settings
65 *
66 * 168 5/11/99 4:37p Jason
67 * made opengl work with 32 bit
68 *
69 * 167 5/11/99 1:44p Jason
70 * fixed config screen bug
71 *
72 * 166 5/06/99 1:40a Samir
73 * adjusted some text.
74 *
75 * 165 5/01/99 9:41a Kevin
76 * FIxed compiler error
77 *
78 * 164 5/01/99 1:57a Samir
79 * small change to where STAT_SCORE gets set.
80 *
81 * 163 5/01/99 1:56a Samir
82 * STAT_SCORE for hud is always set now.
83 *
84 * 162 4/30/99 12:12p Samir
85 * added strings for key ramping, other buttons in general config menu.
86 *
87 * 161 4/24/99 8:39p Samir
88 * added ship sounds toggle.
89 *
90 * 160 4/21/99 3:46p Jason
91 * made opengl only work with 16bit
92 *
93 * 159 4/20/99 11:44a Samir
94 * brightness menu has default focus on the slider.
95 *
96 * 158 4/17/99 8:25p Samir
97 * took out graphical option for inventory display. no time.
98 *
99 * 157 4/14/99 2:50a Jeff
100 * fixed some case mismatched #includes
101 *
102 * 156 4/13/99 11:15a Samir
103 *
104 * 155 4/13/99 10:28a Samir
105 * don't call SetLLSoundPlayed if value doesn't change.
106 *
107 * 154 4/12/99 7:15p Samir
108 * added ability to configure number of sounds played at one time.
109 *
110 * 153 3/29/99 7:29p Jason
111 * made renderer handle default resolution more gracefully
112 *
113 * 152 3/23/99 9:03p Samir
114 * fixed a bunch of sound mixer problems when configing mixer to none.
115 *
116 * 151 3/22/99 4:26p Samir
117 * added toggles for guided missile view and reticle.
118 *
119 * 150 3/17/99 4:19p Samir
120 * change music volume on the fly.
121 *
122 * 149 3/08/99 9:05p Samir
123 * dont allow user to swtich sound quality while in game.
124 *
125 * 148 3/05/99 2:40p Samir
126 * fixed potential bug
127 *
128 * 147 3/05/99 12:25p Jason
129 * changed maximum terrain detail
130 *
131 * 146 3/04/99 6:08p Samir
132 * added wait message for config screen.
133 *
134 * 145 3/03/99 5:07p Samir
135 * music volume will shutoff music if 0, restart if greater only after a
136 * change in vollume.
137 *
138 * 144 3/02/99 1:14p Samir
139 * added joystick/mouse enable and gamma help.
140 *
141 * 143 3/02/99 12:27p Jason
142 * changed terrain distance settings for the different details
143 *
144 * 142 3/01/99 8:11p Samir
145 * adjust current stream volume with sound slider.
146 *
147 * 141 3/01/99 5:52p Samir
148 * fixed slider bars and added render distance.
149 *
150 * 140 3/01/99 5:01a Samir
151 * made sure NEWUIRES_FORCEQUIT was added to all new interfaces.
152 *
153 * 139 2/28/99 3:22a Samir
154 * reformatted video menu.
155 *
156 * 138 2/26/99 2:09a Samir
157 * gamma menu revised.
158 *
159 * 137 2/25/99 11:18a Jason
160 * fixed gamma zbuffer problem
161 *
162 * 136 2/24/99 6:23p Samir
163 * forgot to save default detail level var.
164 *
165 * 135 2/22/99 9:08p Samir
166 * added AddSimpleOption to replace NULL sheet options.
167 *
168 * 134 2/22/99 7:12p Doug
169 * temporarily removed txt_hudwarnings and replaced with a literal string
170 * until Samir can make the fix needed (Jeff)
171 *
172 * 133 2/22/99 5:52p Samir
173 * fixed another weird thing.
174 *
175 * 132 2/22/99 4:24p Samir
176 * took out remaining powerupvoices code.
177 *
178 * 131 2/20/99 7:08p Matt
179 * Removed a few items, and change the resolution strings to not be
180 * localizable
181 *
182 * 130 2/19/99 10:31p Samir
183 * added music volume.
184 *
185 * 129 2/19/99 6:56p Samir
186 * fixed bug in video menu in options screen (resolution switch
187 * sequencing.)
188 *
189 * 128 2/17/99 3:56p Jason
190 * FROM SAMIR: Upped video optios gadget count
191 *
192 * 127 2/16/99 12:05p Samir
193 * revamped ui for config menus.
194 *
195 * 126 2/15/99 7:47p Jeff
196 * new pilot file class and read/write system checked in...should be more
197 * robust than old
198 *
199 * 125 2/15/99 12:03p Jason
200 * changed word "Gamma" to "Brightness"
201 *
202 * 124 2/07/99 1:17a Jeff
203 * peppered UI dialogs that were missing NEWUIRES_FORCEQUIT to handle it
204 *
205 * 123 1/31/99 7:25p Matt
206 * Renamed a bunch of functions to have HUD capitalized
207 *
208 * 122 1/28/99 3:58p Jeff
209 * localization update
210 *
211 * 121 1/27/99 2:58p Jason
212 * fixed center small view
213 *
214 * 120 1/24/99 3:13a Jason
215 * changed max terrain detail
216 *
217 * 119 1/21/99 10:46a Jason
218 * changed "weapon corona" text to "weapon effects"
219 *
220 * 118 1/12/99 5:29p Jason
221 * another pass at getting this gamma stuff done
222 *
223 * 117 1/12/99 12:55p Jason
224 * added gamma contrast boxes
225 *
226 * 116 1/11/99 5:52p Samir
227 * added Creative EAX option.
228 *
229 * 115 1/11/99 11:18a Jason
230 * first pass at autogamma
231 *
232 * 114 12/23/98 11:48a Samir
233 * changed name of aureal mixer.
234 *
235 * 113 12/10/98 3:41p Jeff
236 * implemented settings for 16 or 32 bit depth (in config)
237 *
238 * 112 12/09/98 6:54p Jason
239 * changed default config settings
240 *
241 * 111 12/09/98 6:46p Jeff
242 * added scorch marks and weapon coronas to detail menu
243 *
244 * 110 12/03/98 11:06a Samir
245 * added axis sensitivity
246 *
247 * 109 12/02/98 11:36a Samir
248 * readded joystick sensitivity.
249 *
250 * 108 11/30/98 6:00p Jeff
251 * max terrain detail setting is now 26 (to the user...6 internally)
252 *
253 * 107 11/30/98 3:25p Jeff
254 * fixed bug where game will crash if they enter graphics config with a
255 * hacked resolution
256 *
257 * 106 11/30/98 3:12p Jeff
258 * gamma goes 1->3 now
259 *
260 * 105 11/23/98 12:32p Jeff
261 * no decimal on the gain slider of forcefeedback
262 *
263 * 104 11/10/98 5:14p Jeff
264 * added Force Feedback configuration
265 *
266 * 103 10/22/98 4:37p Jeff
267 * removed missile view for demo
268 *
269 * 102 10/22/98 2:40p Samir
270 * took out joystick sensitivity for demo.
271 *
272 * 101 10/21/98 11:55p Samir
273 * added sensitivity slider functionality.
274 *
275 * 100 10/21/98 4:48p Jeff
276 * changed slider menu click sound
277 *
278 *
279 * $NoKeywords: $
280 */
281
282 #include "ConfigItem.h"cxx . . $ `<file>/Descent3/ConfigItem.h`/
283 #include "player.h"cxx . . $ `<file>/Descent3/player.h`/
284 #include "config.h"cxx . . $ `<file>/Descent3/config.h`/
285 #include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/
286 #include "newui.h"cxx . . $ `<file>/Descent3/newui.h`/
287 #include "3d.h"cxx . . $ `<file>/lib/3d.h`/
288 #include "polymodel.h"cxx . . $ `<file>/model/polymodel.h`/
289 #include "application.h"cxx . . $ `<file>/lib/application.h`/
290 #include "descent.h"cxx . . $ `<file>/Descent3/descent.h`/
291 #include "mono.h"cxx . . $ `<file>/ddebug/mono.h`/
292 #include "Mission.h"cxx . . $ `<file>/Descent3/Mission.h`/
293 #include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/
294 #include "gamefont.h"cxx . . $ `<file>/Descent3/gamefont.h`/
295 #include "multi_ui.h"cxx . . $ `<file>/Descent3/multi_ui.h`/
296 #include "cinematics.h"cxx . . $ `<file>/Descent3/cinematics.h`/
297 #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/
298 #include "terrain.h"cxx . . $ `<file>/Descent3/terrain.h`/
299 #include "cfile.h"cxx . . $ `<file>/cfile/cfile.h`/
300 #include "mem.h"cxx . . $ `<file>/mem/mem.h`/
301 #include "lighting.h"cxx . . $ `<file>/Descent3/lighting.h`/
302 #include "physics.h"cxx . . $ `<file>/physics/physics.h`/
303 #include "pilot.h"cxx . . $ `<file>/Descent3/pilot.h`/
304 #include "hud.h"cxx . . $ `<file>/Descent3/hud.h`/
305 #include "voice.h"cxx . . $ `<file>/Descent3/voice.h`/
306 #include "bitmap.h"cxx . . $ `<file>/lib/bitmap.h`/
307 #include "game.h"cxx . . $ `<file>/Descent3/game.h`/
308 #include "render.h"cxx . . $ `<file>/Descent3/render.h`/
309 #include "stringtable.h"cxx . . $ `<file>/Descent3/stringtable.h`/
310 #include "SmallViews.h"cxx . . $ `<file>/Descent3/SmallViews.h`/
311 #include "D3ForceFeedback.h"cxx . . $ `<file>/Descent3/D3ForceFeedback.h`/
312 #include "descent.h"cxx . . $ `<file>/Descent3/descent.h`/
313 #include "appdatabase.h"cxx . . $ `<file>/lib/appdatabase.h`/
314 #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/
315 #include "soundload.h"cxx . . $ `<file>/sndlib/soundload.h`/
316 #include "sounds.h"cxx . . $ `<file>/Descent3/sounds.h`/
317 #include "ctlconfig.h"cxx . . $ `<file>/Descent3/ctlconfig.h`/
318 #include "d3music.h"cxx . . $ `<file>/Descent3/d3music.h`/
319
320 #include <string.h>
321 #include <stdlib.h>
322 #include <stdarg.h>
323
324 #define STAT_SCOREcxx . . $ `Descent3/config.cpp:324:9`! STAT_TIMERcxx . . $ `Descent3/hud.h:286:9`!
325
326 tVideoResolutioncxx . . $ tVideoResolution# Video_res_listcxx . . $ Video_res_list.[N_SUPPORTED_VIDREScxx . . $ `Descent3/config.h:134:9`!] = {
327 {512, 384}, {640, 480}, {800, 600}, {960, 720}, {1024, 768}, {1280, 960}, {1600, 1200}, {640, 480} // custom
328 };
329
330 int Game_video_resolutioncxx . . $ Game_video_resolution. = 1;
331
332 tDetailSettingscxx . . $ tDetailSettings# Detail_settingscxx . . $ Detail_settings.;
333 int Default_detail_levelcxx . . $ Default_detail_level. = DETAIL_LEVEL_MEDcxx . . $ `Descent3/config.h:180:9`!;
334
335 tGameTogglescxx . . $ tGameToggles# Game_togglescxx . . $ Game_toggles. = { // toggles specified in general settings.
336 true, false, true};
337
338 #define IDV_VCONFIGcxx . . $ `Descent3/config.cpp:338:9`! 12 // video config
339 #define IDV_GCONFIGcxx . . $ `Descent3/config.cpp:339:9`! 13 // general config
340 #define IDV_SCONFIGcxx . . $ `Descent3/config.cpp:340:9`! 14 // audio config
341 #define IDV_DCONFIGcxx . . $ `Descent3/config.cpp:341:9`! 15 // detail level config
342 #define IDV_HCONFIGcxx . . $ `Descent3/config.cpp:342:9`! 16 // hud config
343 #define IDV_CCONFIGcxx . . $ `Descent3/config.cpp:343:9`! 17 // controller config
344 #define IDV_QUITcxx . . $ `Descent3/config.cpp:344:9`! 0xff
345
346 #define UID_GAMMASLIDERcxx . . $ `Descent3/config.cpp:346:9`! 0x1000
347
348 /////////////////////////////////////////////////////////////////////////////
349 // Defines
350 #define IDV_OKcxx . . $ `Descent3/config.cpp:350:9`! 1
351 #define IDV_CANCELcxx . . $ `Descent3/config.cpp:351:9`! 2
352
353 // video defines
354 #define VID_D3Dcxx . . $ `Descent3/config.cpp:354:9`! 0
355 #define VID_GLIDEcxx . . $ `Descent3/config.cpp:355:9`! 1 // Unused
356 #define VID_OPENGLcxx . . $ `Descent3/config.cpp:356:9`! 2
357
358 // small view settings
359 #define SMVS_NONEcxx . . $ `Descent3/config.cpp:359:9`! 0
360 #define SMVS_MISSLEcxx . . $ `Descent3/config.cpp:360:9`! 1
361
362 // these are the default settings for each detail level
363 #define DL_LOW_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:363:9`! (MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`! * TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!)
364 #define DL_LOW_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:364:9`! 25.0
365 #define DL_LOW_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:365:9`! false
366 #define DL_LOW_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:366:9`! false
367 #define DL_LOW_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:367:9`! true
368 #define DL_LOW_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:368:9`! false
369 #define DL_LOW_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:369:9`! false
370 #define DL_LOW_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:370:9`! false
371 #define DL_LOW_PROCEDURALScxx . . $ `Descent3/config.cpp:371:9`! false
372 #define DL_LOW_POWERUP_HALOScxx . . $ `Descent3/config.cpp:372:9`! false
373 #define DL_LOW_SCORCH_MARKScxx . . $ `Descent3/config.cpp:373:9`! false
374 #define DL_LOW_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:374:9`! false
375 #define DL_LOW_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:375:9`! 1
376 #define DL_LOW_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:376:9`! 0
377
378 #define DL_MED_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:378:9`! (90 * TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!)
379 #define DL_MED_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:379:9`! 18.0
380 #define DL_MED_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:380:9`! false
381 #define DL_MED_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:381:9`! false
382 #define DL_MED_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:382:9`! true
383 #define DL_MED_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:383:9`! false
384 #define DL_MED_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:384:9`! true
385 #define DL_MED_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:385:9`! true
386 #define DL_MED_PROCEDURALScxx . . $ `Descent3/config.cpp:386:9`! false
387 #define DL_MED_POWERUP_HALOScxx . . $ `Descent3/config.cpp:387:9`! true
388 #define DL_MED_SCORCH_MARKScxx . . $ `Descent3/config.cpp:388:9`! true
389 #define DL_MED_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:389:9`! false
390 #define DL_MED_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:390:9`! 1
391 #define DL_MED_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:391:9`! 1
392
393 #define DL_HIGH_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:393:9`! (100 * TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!)
394 #define DL_HIGH_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:394:9`! 12.0
395 #define DL_HIGH_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:395:9`! false
396 #define DL_HIGH_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:396:9`! true
397 #define DL_HIGH_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:397:9`! true
398 #define DL_HIGH_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:398:9`! true
399 #define DL_HIGH_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:399:9`! true
400 #define DL_HIGH_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:400:9`! true
401 #define DL_HIGH_PROCEDURALScxx . . $ `Descent3/config.cpp:401:9`! true
402 #define DL_HIGH_POWERUP_HALOScxx . . $ `Descent3/config.cpp:402:9`! true
403 #define DL_HIGH_SCORCH_MARKScxx . . $ `Descent3/config.cpp:403:9`! true
404 #define DL_HIGH_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:404:9`! true
405 #define DL_HIGH_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:405:9`! 1
406 #define DL_HIGH_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:406:9`! 2
407
408 #define DL_VHI_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:408:9`! (120.0 * TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!)
409 #define DL_VHI_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:409:9`! 10.0
410 #define DL_VHI_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:410:9`! true
411 #define DL_VHI_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:411:9`! true
412 #define DL_VHI_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:412:9`! true
413 #define DL_VHI_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:413:9`! true
414 #define DL_VHI_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:414:9`! true
415 #define DL_VHI_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:415:9`! true
416 #define DL_VHI_PROCEDURALScxx . . $ `Descent3/config.cpp:416:9`! true
417 #define DL_VHI_POWERUP_HALOScxx . . $ `Descent3/config.cpp:417:9`! true
418 #define DL_VHI_SCORCH_MARKScxx . . $ `Descent3/config.cpp:418:9`! true
419 #define DL_VHI_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:419:9`! true
420 #define DL_VHI_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:420:9`! 1
421 #define DL_VHI_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:421:9`! 2
422
423 #define MINIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:423:9`! 4
424 #define MAXIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:424:9`! 28
425 #define MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`! 80
426 #define MAXIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:426:9`! 200
427
428 static const tDetailSettingscxx . . $ tDetailSettings# DetailPresetLowcxx . . $ DetailPresetLow. = {
429 DL_LOW_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:363:9`!, DL_LOW_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:364:9`!, DL_LOW_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:365:9`!, DL_LOW_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:366:9`!,
430 DL_LOW_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:367:9`!, DL_LOW_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:368:9`!, DL_LOW_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:369:9`!, DL_LOW_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:370:9`!,
431 DL_LOW_PROCEDURALScxx . . $ `Descent3/config.cpp:371:9`!, DL_LOW_POWERUP_HALOScxx . . $ `Descent3/config.cpp:372:9`!, DL_LOW_SCORCH_MARKScxx . . $ `Descent3/config.cpp:373:9`!, DL_LOW_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:374:9`!,
432 DL_LOW_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:375:9`!, DL_LOW_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:376:9`!};
433 static const tDetailSettingscxx . . $ tDetailSettings# DetailPresetMedcxx . . $ DetailPresetMed. = {
434 DL_MED_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:378:9`!, DL_MED_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:379:9`!, DL_MED_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:380:9`!, DL_MED_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:381:9`!,
435 DL_MED_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:382:9`!, DL_MED_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:383:9`!, DL_MED_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:384:9`!, DL_MED_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:385:9`!,
436 DL_MED_PROCEDURALScxx . . $ `Descent3/config.cpp:386:9`!, DL_MED_POWERUP_HALOScxx . . $ `Descent3/config.cpp:387:9`!, DL_MED_SCORCH_MARKScxx . . $ `Descent3/config.cpp:388:9`!, DL_MED_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:389:9`!,
437 DL_MED_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:390:9`!, DL_MED_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:391:9`!};
438 static const tDetailSettingscxx . . $ tDetailSettings# DetailPresetHighcxx . . $ DetailPresetHigh. = {
439 DL_HIGH_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:393:9`!, DL_HIGH_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:394:9`!, DL_HIGH_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:395:9`!, DL_HIGH_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:396:9`!,
440 DL_HIGH_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:397:9`!, DL_HIGH_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:398:9`!, DL_HIGH_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:399:9`!, DL_HIGH_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:400:9`!,
441 DL_HIGH_PROCEDURALScxx . . $ `Descent3/config.cpp:401:9`!, DL_HIGH_POWERUP_HALOScxx . . $ `Descent3/config.cpp:402:9`!, DL_HIGH_SCORCH_MARKScxx . . $ `Descent3/config.cpp:403:9`!, DL_HIGH_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:404:9`!,
442 DL_HIGH_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:405:9`!, DL_HIGH_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:406:9`!};
443 static const tDetailSettingscxx . . $ tDetailSettings# DetailPresetVHicxx . . $ DetailPresetVHi. = {
444 DL_VHI_TERRAIN_DISTANCEcxx . . $ `Descent3/config.cpp:408:9`!, DL_VHI_PIXEL_ERRORcxx . . $ `Descent3/config.cpp:409:9`!, DL_VHI_SPECULAR_LIGHTcxx . . $ `Descent3/config.cpp:410:9`!, DL_VHI_DYNAMIC_LIGHTINGcxx . . $ `Descent3/config.cpp:411:9`!,
445 DL_VHI_FAST_HEADLIGHTcxx . . $ `Descent3/config.cpp:412:9`!, DL_VHI_MIRRORED_SURFACEScxx . . $ `Descent3/config.cpp:413:9`!, DL_VHI_FOG_ENABLEDcxx . . $ `Descent3/config.cpp:414:9`!, DL_VHI_CORONAS_ENABLEScxx . . $ `Descent3/config.cpp:415:9`!,
446 DL_VHI_PROCEDURALScxx . . $ `Descent3/config.cpp:416:9`!, DL_VHI_POWERUP_HALOScxx . . $ `Descent3/config.cpp:417:9`!, DL_VHI_SCORCH_MARKScxx . . $ `Descent3/config.cpp:418:9`!, DL_VHI_WEAPON_CORONAScxx . . $ `Descent3/config.cpp:419:9`!,
447 DL_VHI_SPEC_MAPPING_TYPEcxx . . $ `Descent3/config.cpp:420:9`!, DL_VHI_OBJECT_COMPLEXITYcxx . . $ `Descent3/config.cpp:421:9`!};
448
449 void ConfigSetDetailLevelcxx . . $ ConfigSetDetailLevel(d4f767463ce0a6b3).(int level) {
450 switch (level) {
451 case DETAIL_LEVEL_LOWcxx . . $ `Descent3/config.h:179:9`!:
452 memcpy(&Detail_settingscxx . . $ Detail_settings., &DetailPresetLowcxx . . $ DetailPresetLow., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
453 break;
454 case DETAIL_LEVEL_MEDcxx . . $ `Descent3/config.h:180:9`!:
455 memcpy(&Detail_settingscxx . . $ Detail_settings., &DetailPresetMedcxx . . $ DetailPresetMed., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
456 break;
457 case DETAIL_LEVEL_HIGHcxx . . $ `Descent3/config.h:181:9`!:
458 memcpy(&Detail_settingscxx . . $ Detail_settings., &DetailPresetHighcxx . . $ DetailPresetHigh., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
459 break;
460 case DETAIL_LEVEL_VERY_HIGHcxx . . $ `Descent3/config.h:182:9`!:
461 memcpy(&Detail_settingscxx . . $ Detail_settings., &DetailPresetVHicxx . . $ DetailPresetVHi., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
462 break;
463 };
464
465 Default_detail_levelcxx . . $ Default_detail_level. = level;
466 }
467
468 //////////////////////////////////////////////////////////////////////////////
469 // Gamma settings
470
471 // gamma configuration, window placement
472 #define GAMMA_MENU_Hcxx . . $ `Descent3/config.cpp:472:9`! 320
473 #define GAMMA_MENU_Wcxx . . $ `Descent3/config.cpp:473:9`! 416
474
475 #define GAMMA_SLICEScxx . . $ `Descent3/config.cpp:475:9`! 32
476 #define GAMMA_SLICE_WIDTHcxx . . $ `Descent3/config.cpp:476:9`! 256
477 #define GAMMA_SLICE_HEIGHTcxx . . $ `Descent3/config.cpp:477:9`! 128
478 #define GAMMA_SLICE_Xcxx . . $ `Descent3/config.cpp:478:9`! ((GAMMA_MENU_Wcxx . . $ `Descent3/config.cpp:473:9`! - GAMMA_SLICE_WIDTHcxx . . $ `Descent3/config.cpp:476:9`!) / 2);
479 #define GAMMA_SLICE_Ycxx . . $ `Descent3/config.cpp:479:9`! 64
480 #define GAMMA_SLIDER_UNITScxx . . $ `Descent3/config.cpp:480:9`! 100
481
482 #define IDV_GAMMAAPPLYcxx . . $ `Descent3/config.cpp:482:9`! 5
483 #define IDV_AUTOGAMMAcxx . . $ `Descent3/config.cpp:483:9`! 6
484
485
486 static void gamma_callbackcxx . . $ gamma_callback(ea6308bbb4c73cea).(newuiTiledWindowcxx . . $ newuiTiledWindow# *wnd, void *data) {
487 int bm_handle = *((int *)data);
488
489 g3Pointcxx . . $ g3Point# pnts[4], *pntlist[4];
490 rend_SetColorModelcxx . . $ rend_SetColorModel(e3c5062d5af601c7).(CM_RGBcxx . . $ CM_RGB.);
491 rend_SetAlphaTypecxx . . $ rend_SetAlphaType(4af4fd0e2b26c4ac).(AT_ALWAYScxx . . $ `lib/renderer.h:399:9`!);
492 rend_SetTextureTypecxx . . $ rend_SetTextureType(cccd9781d96f97ff).(TT_LINEARcxx . . $ TT_LINEAR.);
493 rend_SetLightingcxx . . $ rend_SetLighting(e55526c9d3dd1656).(LS_NONEcxx . . $ LS_NONE.);
494 rend_SetOverlayTypecxx . . $ rend_SetOverlayType(ac50b47256ae7414).(OT_NONEcxx . . $ `lib/renderer.h:333:9`!);
495 rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_WRAPcxx . . $ WT_WRAP.);
496 rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(0);
497
498 // First draw checkboard
499 int startx = GAMMA_SLICE_Xcxx . . $ `Descent3/config.cpp:478:9`!;
500
501 for (int i = 0; i < 4; i++) {
502 pntlist[i] = &pnts[i];
503 pnts[i].p3_zcxx . . $ `lib/3d.h:247:9`! = 0;
504 pnts[i].p3_rcxx . . $ `lib/3d.h:253:9`! = 1;
505 pnts[i].p3_gcxx . . $ `lib/3d.h:254:9`! = 1;
506 pnts[i].p3_bcxx . . $ `lib/3d.h:255:9`! = 1;
507 pnts[i].p3_flagscxx . . $ g3Point#p3_flags. = PF_PROJECTEDcxx . . $ `lib/3d.h:214:9`!;
508 }
509
510 pnts[0].p3_sxcxx . . $ g3Point#p3_sx. = startx;
511 pnts[0].p3_sycxx . . $ g3Point#p3_sy. = GAMMA_SLICE_Ycxx . . $ `Descent3/config.cpp:479:9`!;
512 pnts[0].p3_ucxx . . $ `lib/3d.h:250:9`! = 0;
513 pnts[0].p3_vcxx . . $ `lib/3d.h:251:9`! = 0;
514
515 pnts[1].p3_sxcxx . . $ g3Point#p3_sx. = startx + GAMMA_SLICE_WIDTHcxx . . $ `Descent3/config.cpp:476:9`!;
516 pnts[1].p3_sycxx . . $ g3Point#p3_sy. = GAMMA_SLICE_Ycxx . . $ `Descent3/config.cpp:479:9`!;
517 pnts[1].p3_ucxx . . $ `lib/3d.h:250:9`! = 2;
518 pnts[1].p3_vcxx . . $ `lib/3d.h:251:9`! = 0;
519
520 pnts[2].p3_sxcxx . . $ g3Point#p3_sx. = startx + GAMMA_SLICE_WIDTHcxx . . $ `Descent3/config.cpp:476:9`!;
521 pnts[2].p3_sycxx . . $ g3Point#p3_sy. = GAMMA_SLICE_Ycxx . . $ `Descent3/config.cpp:479:9`! + GAMMA_SLICE_HEIGHTcxx . . $ `Descent3/config.cpp:477:9`!;
522 pnts[2].p3_ucxx . . $ `lib/3d.h:250:9`! = 2;
523 pnts[2].p3_vcxx . . $ `lib/3d.h:251:9`! = 1;
524
525 pnts[3].p3_sxcxx . . $ g3Point#p3_sx. = startx;
526 pnts[3].p3_sycxx . . $ g3Point#p3_sy. = GAMMA_SLICE_Ycxx . . $ `Descent3/config.cpp:479:9`! + GAMMA_SLICE_HEIGHTcxx . . $ `Descent3/config.cpp:477:9`!;
527 pnts[3].p3_ucxx . . $ `lib/3d.h:250:9`! = 0;
528 pnts[3].p3_vcxx . . $ `lib/3d.h:251:9`! = 1;
529
530 rend_DrawPolygon2Dcxx . . $ rend_DrawPolygon2D(1464bdba6025a51).(bm_handle, pntlist, 4);
531
532 // Now draw grey in the center
533 int int_val = 8;
534 rend_SetFlatColorcxx . . $ rend_SetFlatColor(cb2f890c2fdad230).(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(int_val, int_val, int_val));
535 rend_SetTextureTypecxx . . $ rend_SetTextureType(cccd9781d96f97ff).(TT_FLATcxx . . $ TT_FLAT.);
536
537 pnts[0].p3_sxcxx . . $ g3Point#p3_sx. += 64;
538 pnts[0].p3_sycxx . . $ g3Point#p3_sy. += 32;
539
540 pnts[1].p3_sxcxx . . $ g3Point#p3_sx. -= 64;
541 pnts[1].p3_sycxx . . $ g3Point#p3_sy. += 32;
542
543 pnts[2].p3_sxcxx . . $ g3Point#p3_sx. -= 64;
544 pnts[2].p3_sycxx . . $ g3Point#p3_sy. -= 32;
545
546 pnts[3].p3_sxcxx . . $ g3Point#p3_sx. += 64;
547 pnts[3].p3_sycxx . . $ g3Point#p3_sy. -= 32;
548
549 rend_DrawPolygon2Dcxx . . $ rend_DrawPolygon2D(1464bdba6025a51).(0, pntlist, 4);
550
551 rend_SetWrapTypecxx . . $ rend_SetWrapType(da524b148887c0e7).(WT_CLAMPcxx . . $ WT_CLAMP.);
552 rend_SetZBufferStatecxx . . $ rend_SetZBufferState(4af4fd0e2b26c4ac).(1);
553 }
554
555 static void config_gammacxx . . $ config_gamma(49f6e7a06ebc5aa8).() {
556 newuiTiledWindowcxx . . $ newuiTiledWindow# gamma_wndcxx . . $ newuiTiledWindow#newuiTiledWindow(49f6e7a06ebc5aa8).;
557 newuiSheetcxx . . $ newuiSheet# *sheet;
558 tSliderSettingscxx . . $ tSliderSettings# slider_set;
559 int16_tcxx . . $ int16_t# *gamma_slider;
560 int16_tcxx . . $ int16_t# curpos;
561 int res, gamma_bitmap = -1;
562 float init_gamma;
563
564 // Make gamma bitmap
565 gamma_bitmap = bm_AllocBitmapcxx . . $ bm_AllocBitmap(2326284602b0bb2d).(128, 128, 0);
566 if (gamma_bitmap <= 0) {
567 gamma_bitmap = 0;
568 } else {
569 uint16_tcxx . . $ uint16_t# *dest_data = (uint16_tcxx . . $ uint16_t# *)bm_datacxx . . $ bm_data(501e1bc9f482c6bd).(gamma_bitmap, 0);
570 int addval = 0;
571 int i, t;
572
573 // This loop makes the checkerboard
574 for (i = 0; i < 128; i++) {
575 addval = (i & 1) ? 1 : 0;
576
577 for (t = 0; t < 128; t++) {
578 if (((t + addval) % 2) == 0) {
579 dest_data[i * 128 + t] = OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`! | (1 << 10) | (1 << 5) | (1);
580 } else {
581 dest_data[i * 128 + t] = OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`!;
582 }
583 }
584 }
585 }
586
587 // create ui.
588 gamma_wnd.Createcxx . . $ newuiTiledWindow#Create(9860cac3d762132).(TXT_AUTO_GAMMAcxx . . $ `Descent3/stringtable.h:476:9`!, 0, 0, GAMMA_MENU_Wcxx . . $ `Descent3/config.cpp:473:9`!, GAMMA_MENU_Hcxx . . $ `Descent3/config.cpp:472:9`!);
589 gamma_wnd.SetDatacxx . . $ newuiTiledWindow#SetData(5d22bdacc48458e8).(&gamma_bitmap);
590 gamma_wnd.SetOnDrawCBcxx . . $ newuiTiledWindow#SetOnDrawCB(af93e79073e6e663).(gamma_callbackcxx . . $ gamma_callback(ea6308bbb4c73cea).);
591
592 sheet = gamma_wnd.GetSheetcxx . . $ newuiTiledWindow#GetSheet(661381a276e5b628).();
593
594 // ok, cancel buttons.
595 sheet->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 130, 224, NEWUI_ALIGN_HORIZcxx . . $ NEWUI_ALIGN_HORIZ.);
596 sheet->AddButtoncxx . . $ newuiSheet#AddButton(680bf41633375800).(TXT_APPLYcxx . . $ `Descent3/stringtable.h:81:9`!, IDV_GAMMAAPPLYcxx . . $ `Descent3/config.cpp:482:9`!);
597 sheet->AddTextcxx . . $ newuiSheet#AddText(326aeb464d16410c).(" ");
598 sheet->AddButtoncxx . . $ newuiSheet#AddButton(680bf41633375800).(TXT_OKcxx . . $ `Descent3/stringtable.h:34:9`!, UID_OKcxx . . $ `ui/ui.h:368:9`!);
599 sheet->AddButtoncxx . . $ newuiSheet#AddButton(680bf41633375800).(TXT_CANCELcxx . . $ `Descent3/stringtable.h:35:9`!, UID_CANCELcxx . . $ `ui/ui.h:369:9`!);
600
601 sheet->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0, 145);
602 sheet->AddTextcxx . . $ newuiSheet#AddText(326aeb464d16410c).(TXT_GAMMAADJUSTAcxx . . $ `Descent3/stringtable.h:502:9`!);
603 sheet->AddTextcxx . . $ newuiSheet#AddText(326aeb464d16410c).(TXT_GAMMAADJUSTBcxx . . $ `Descent3/stringtable.h:503:9`!);
604
605 // add slider!
606 sheet->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0, 175);
607 slider_set.min_valcxx . . $ tSliderSettings#min_val..fcxx . . $ tSliderSettings#$anonymous_type_0#f. = 1.0f;
608 slider_set.max_valcxx . . $ tSliderSettings#max_val..fcxx . . $ tSliderSettings#$anonymous_type_1#f. = 3.0f;
609 slider_set.typecxx . . $ tSliderSettings#type. = SLIDER_UNITS_FLOATcxx . . $ `Descent3/newui_core.h:165:9`!;
610
611 init_gamma = Render_preferred_statecxx . . $ Render_preferred_state..gammacxx . . $ renderer_preferred_state#gamma.;
612 curpos = CALC_SLIDER_POS_FLOATcxx . . $ CALC_SLIDER_POS_FLOAT(e0a034531ef5a7c4).(init_gamma, &slider_set, GAMMA_SLIDER_UNITScxx . . $ `Descent3/config.cpp:480:9`!);
613 gamma_slider = sheet->AddSlidercxx . . $ newuiSheet#AddSlider(8ed53311be8e1fab).(TXT_GAMMAcxx . . $ `Descent3/stringtable.h:82:9`!, 100, curpos, &slider_set, UID_GAMMASLIDERcxx . . $ `Descent3/config.cpp:346:9`!);
614 sheet->SetInitialFocusedGadgetcxx . . $ newuiSheet#SetInitialFocusedGadget(68e3ae50fe6578a9).(UID_GAMMASLIDERcxx . . $ `Descent3/config.cpp:346:9`!);
615
616 // do ui.
617 gamma_wnd.Opencxx . . $ UIWindow#Open(49f6e7a06ebc5aa8).();
618
619 do {
620 res = gamma_wnd.DoUIcxx . . $ newuiTiledWindow#DoUI(b126dc7c1de90089).();
621 if (res == NEWUIRES_FORCEQUITcxx . . $ `Descent3/newui_core.h:131:9`!) {
622 break;
623 }
624 if (res == IDV_GAMMAAPPLYcxx . . $ `Descent3/config.cpp:482:9`!) {
625 // get & set the gamma
626 Render_preferred_statecxx . . $ Render_preferred_state..gammacxx . . $ renderer_preferred_state#gamma. =
627 CALC_SLIDER_FLOAT_VALUEcxx . . $ CALC_SLIDER_FLOAT_VALUE(da32870243b99ecb).(*gamma_slider, slider_set.min_valcxx . . $ tSliderSettings#min_val..fcxx . . $ tSliderSettings#$anonymous_type_0#f., slider_set.max_valcxx . . $ tSliderSettings#max_val..fcxx . . $ tSliderSettings#$anonymous_type_1#f., GAMMA_SLIDER_UNITScxx . . $ `Descent3/config.cpp:480:9`!);
628 rend_SetPreferredStatecxx . . $ rend_SetPreferredState(9d6d139eb250c11d).(&Render_preferred_statecxx . . $ Render_preferred_state.);
629 }
630 } while (res != UID_OKcxx . . $ `ui/ui.h:368:9`! && res != UID_CANCELcxx . . $ `ui/ui.h:369:9`!);
631
632 // handle results.
633 if (res == UID_OKcxx . . $ `ui/ui.h:368:9`!) {
634 Render_preferred_statecxx . . $ Render_preferred_state..gammacxx . . $ renderer_preferred_state#gamma. =
635 CALC_SLIDER_FLOAT_VALUEcxx . . $ CALC_SLIDER_FLOAT_VALUE(da32870243b99ecb).(*gamma_slider, slider_set.min_valcxx . . $ tSliderSettings#min_val..fcxx . . $ tSliderSettings#$anonymous_type_0#f., slider_set.max_valcxx . . $ tSliderSettings#max_val..fcxx . . $ tSliderSettings#$anonymous_type_1#f., GAMMA_SLIDER_UNITScxx . . $ `Descent3/config.cpp:480:9`!);
636 } else {
637 Render_preferred_statecxx . . $ Render_preferred_state..gammacxx . . $ renderer_preferred_state#gamma. = init_gamma;
638 }
639
640 rend_SetPreferredStatecxx . . $ rend_SetPreferredState(9d6d139eb250c11d).(&Render_preferred_statecxx . . $ Render_preferred_state.);
641
642 // cleanup
643 gamma_wnd.Closecxx . . $ UIWindow#Close(49f6e7a06ebc5aa8).();
644 gamma_wnd.Destroycxx . . $ UIWindow#Destroy(49f6e7a06ebc5aa8).();
645
646 if (gamma_bitmap != 0) {
647 bm_FreeBitmapcxx . . $ bm_FreeBitmap(d4f767463ce0a6b3).(gamma_bitmap);
648 }
649 }
650
651
652 //////////////////////////////////////////////////////////////////
653 // VIDEO MENU
654 //
655 struct video_menucxx . . $ video_menu# {
656 newuiSheetcxx . . $ newuiSheet# *sheetcxx . . $ video_menu#sheet.;
657
658 bool *filteringcxx . . $ video_menu#filtering.; // settings
659 bool *mipmappingcxx . . $ video_menu#mipmapping.;
660 bool *vsynccxx . . $ video_menu#vsync.;
661
662 int *bitdepthcxx . . $ video_menu#bitdepth.; // bitdepths
663 int *resolutioncxx . . $ video_menu#resolution.; // all resolutions
664
665 // sets the menu up.
666 newuiSheetcxx . . $ newuiSheet# *setupcxx . . $ video_menu#setup(58668faa82d4e94e).(newuiMenucxx . . $ newuiMenu# *menu) {
667 int iTemp;
668 sheetcxx . . $ video_menu#sheet. = menu->AddOptioncxx . . $ newuiMenu#AddOption(f02bcd29588925e6).(IDV_VCONFIGcxx . . $ `Descent3/config.cpp:338:9`!, TXT_OPTVIDEOcxx . . $ `Descent3/stringtable.h:169:9`!, NEWUIMENU_MEDIUMcxx . . $ `Descent3/newui_core.h:555:9`!);
669
670 // video resolution
671 iTemp = Game_video_resolutioncxx . . $ Game_video_resolution.;
672 sheetcxx . . $ video_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_RESOLUTIONcxx . . $ `Descent3/stringtable.h:87:9`!, 0, 0);
673 resolutioncxx . . $ video_menu#resolution. = sheetcxx . . $ video_menu#sheet.->AddFirstLongRadioButtoncxx . . $ newuiSheet#AddFirstLongRadioButton(c0389c32fb6fc938).("512x384");
674 sheetcxx . . $ video_menu#sheet.->AddLongRadioButtoncxx . . $ newuiSheet#AddLongRadioButton(9a5cb738bb1a644).("640x480");
675 sheetcxx . . $ video_menu#sheet.->AddLongRadioButtoncxx . . $ newuiSheet#AddLongRadioButton(9a5cb738bb1a644).("800x600");
676 sheetcxx . . $ video_menu#sheet.->AddLongRadioButtoncxx . . $ newuiSheet#AddLongRadioButton(9a5cb738bb1a644).("960x720");
677 sheetcxx . . $ video_menu#sheet.->AddLongRadioButtoncxx . . $ newuiSheet#AddLongRadioButton(9a5cb738bb1a644).("1024x768");
678 sheetcxx . . $ video_menu#sheet.->AddLongRadioButtoncxx . . $ newuiSheet#AddLongRadioButton(9a5cb738bb1a644).("1280x960");
679 sheetcxx . . $ video_menu#sheet.->AddLongRadioButtoncxx . . $ newuiSheet#AddLongRadioButton(9a5cb738bb1a644).("1600x1200");
680 *resolutioncxx . . $ video_menu#resolution. = iTemp;
681
682 #if !defined(POSIXcxx . . $ `<built-in>:480:9`!)
683 // renderer bit depth
684 switch (Render_preferred_bitdepth) {
685 case 16:
686 iTemp = 0;
687 break;
688 case 32:
689 iTemp = 1;
690 break;
691 default:
692 iTemp = -1;
693 }
694
695 if ((PreferredRenderer == RENDERER_DIRECT3D || PreferredRenderer == RENDERER_OPENGL) && iTemp != -1) {
696 sheet->NewGroup(TXT_CFG_BITDEPTH, 200, 0);
697 bitdepth = sheet->AddFirstRadioButton(TXT_CFG_SIXTEENBIT);
698 sheet->AddRadioButton(TXT_CFG_THIRTYTWOBIT);
699 *bitdepth = iTemp;
700 } else {
701 bitdepth = NULL;
702 }
703 #endif
704 // video settings
705 sheetcxx . . $ video_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_TOGGLEScxx . . $ `Descent3/stringtable.h:749:9`!, 0, 120);
706 filteringcxx . . $ video_menu#filtering. = sheetcxx . . $ video_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_BILINEARcxx . . $ `Descent3/stringtable.h:91:9`!, (Render_preferred_statecxx . . $ Render_preferred_state..filteringcxx . . $ renderer_preferred_state#filtering. != 0));
707 mipmappingcxx . . $ video_menu#mipmapping. = sheetcxx . . $ video_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_MIPMAPPINGcxx . . $ `Descent3/stringtable.h:92:9`!, (Render_preferred_statecxx . . $ Render_preferred_state..mippingcxx . . $ renderer_preferred_state#mipping. != 0));
708
709 sheetcxx . . $ video_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_MONITORcxx . . $ `Descent3/stringtable.h:751:9`!, 0, 180);
710 vsynccxx . . $ video_menu#vsync. = sheetcxx . . $ video_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_VSYNCENABLEDcxx . . $ `Descent3/stringtable.h:507:9`!, (Render_preferred_statecxx . . $ Render_preferred_state..vsync_oncxx . . $ renderer_preferred_state#vsync_on. != 0));
711 #if !defined(POSIXcxx . . $ `<built-in>:480:9`!)
712 sheet->AddText("");
713 sheet->AddLongButton(TXT_AUTO_GAMMA, IDV_AUTOGAMMA);
714 #endif
715 return sheetcxx . . $ video_menu#sheet.;
716 };
717
718 // retreive values from property sheet here.
719 void finishcxx . . $ video_menu#finish(49f6e7a06ebc5aa8).() {
720 if (filteringcxx . . $ video_menu#filtering.)
721 Render_preferred_statecxx . . $ Render_preferred_state..filteringcxx . . $ renderer_preferred_state#filtering. = (*filteringcxx . . $ video_menu#filtering.) ? 1 : 0;
722 if (mipmappingcxx . . $ video_menu#mipmapping.)
723 Render_preferred_statecxx . . $ Render_preferred_state..mippingcxx . . $ renderer_preferred_state#mipping. = (*mipmappingcxx . . $ video_menu#mipmapping.) ? 1 : 0;
724 if (vsynccxx . . $ video_menu#vsync.)
725 Render_preferred_statecxx . . $ Render_preferred_state..vsync_oncxx . . $ renderer_preferred_state#vsync_on. = (*vsynccxx . . $ video_menu#vsync.) ? 1 : 0;
726 #if !defined(POSIXcxx . . $ `<built-in>:480:9`!)
727 if (bitdepth)
728 Render_preferred_bitdepth = (*bitdepth) == 1 ? 32 : 16;
729 #endif
730 if (GetScreenModecxx . . $ GetScreenMode(b126dc7c1de90089).() == SM_GAMEcxx . . $ SM_GAME.) {
731 Render_preferred_statecxx . . $ Render_preferred_state..bit_depthcxx . . $ renderer_preferred_state#bit_depth. = Render_preferred_bitdepthcxx . . $ Render_preferred_bitdepth.;
732 rend_SetPreferredStatecxx . . $ rend_SetPreferredState(9d6d139eb250c11d).(&Render_preferred_statecxx . . $ Render_preferred_state.);
733 }
734
735 if ((*resolutioncxx . . $ video_menu#resolution.) != Game_video_resolutioncxx . . $ Game_video_resolution.) {
736 // if in game, do resolution change.
737 int temp_w, temp_h;
738 int old_sm = GetScreenModecxx . . $ GetScreenMode(b126dc7c1de90089).();
739
740 Game_video_resolutioncxx . . $ Game_video_resolution. = *resolutioncxx . . $ video_menu#resolution.;
741
742 if (old_sm == SM_GAMEcxx . . $ SM_GAME.) {
743 SetScreenModecxx . . $ SetScreenMode(918ebd27a9ddbad3).(SM_NULLcxx . . $ SM_NULL.);
744 SetScreenModecxx . . $ SetScreenMode(918ebd27a9ddbad3).(old_sm, true);
745 }
746 temp_w = Video_res_listcxx . . $ Video_res_list.[Game_video_resolutioncxx . . $ Game_video_resolution.].widthcxx . . $ tVideoResolution#width.;
747 temp_h = Video_res_listcxx . . $ Video_res_list.[Game_video_resolutioncxx . . $ Game_video_resolution.].heightcxx . . $ tVideoResolution#height.;
748 Current_pilotcxx . . $ Current_pilot..set_hud_datacxx . . $ pilot#set_hud_data(c4a38c24677fe9fd).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, &temp_w, &temp_h);
749 }
750
751 sheetcxx . . $ video_menu#sheet. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
752 };
753
754 // process
755 void processcxx . . $ video_menu#process(d4f767463ce0a6b3).(int res) {
756 #if !defined(POSIXcxx . . $ `<built-in>:480:9`!)
757 switch (res) {
758 case IDV_AUTOGAMMA:
759 config_gamma();
760 break;
761 }
762 #endif
763 };
764 };
765
766
767 //////////////////////////////////////////////////////////////////
768 // SOUND MENU
769 //
770 struct sound_menucxx . . $ sound_menu# {
771 newuiSheetcxx . . $ newuiSheet# *sheetcxx . . $ sound_menu#sheet.;
772 newuiMenucxx . . $ newuiMenu# *parent_menucxx . . $ sound_menu#parent_menu.;
773 int ls_sound_idcxx . . $ sound_menu#ls_sound_id., sound_idcxx . . $ sound_menu#sound_id.;
774
775 int16_tcxx . . $ int16_t# *fxvolumecxx . . $ sound_menu#fxvolume., *musicvolumecxx . . $ sound_menu#musicvolume.; // volume sliders
776 int16_tcxx . . $ int16_t# *fxquantitycxx . . $ sound_menu#fxquantity.; // sound fx quantity limit
777 int *fxqualitycxx . . $ sound_menu#fxquality.; // sfx quality low/high
778
779 int16_tcxx . . $ int16_t# old_fxquantitycxx . . $ sound_menu#old_fxquantity.;
780
781 #ifdef _DEBUGcxx . . $ `<built-in>:482:9`!
782 int *sndmixercxx . . $ sound_menu#sndmixer.;
783 #endif
784
785 // sets the menu up.
786 newuiSheetcxx . . $ newuiSheet# *setupcxx . . $ sound_menu#setup(58668faa82d4e94e).(newuiMenucxx . . $ newuiMenu# *menu) {
787 tSliderSettingscxx . . $ tSliderSettings# slider_set;
788
789 sheetcxx . . $ sound_menu#sheet. = menu->AddOptioncxx . . $ newuiMenu#AddOption(f02bcd29588925e6).(IDV_SCONFIGcxx . . $ `Descent3/config.cpp:340:9`!, TXT_OPTSOUNDcxx . . $ `Descent3/stringtable.h:170:9`!, NEWUIMENU_MEDIUMcxx . . $ `Descent3/newui_core.h:555:9`!);
790 parent_menucxx . . $ sound_menu#parent_menu. = menu;
791 ls_sound_idcxx . . $ sound_menu#ls_sound_id. = -1;
792 sound_idcxx . . $ sound_menu#sound_id. = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("Menu Slider Click");
793 ASSERTcxx . . $ `misc/pserror.h:246:9`!(sound_id != -1); // DAJ -1FIX
794
795 // volume sliders
796 sheetcxx . . $ sound_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0, 0);
797
798 slider_set.typecxx . . $ tSliderSettings#type. = SLIDER_UNITS_PERCENTcxx . . $ `Descent3/newui_core.h:164:9`!;
799 fxvolumecxx . . $ sound_menu#fxvolume. = sheetcxx . . $ sound_menu#sheet.->AddSlidercxx . . $ newuiSheet#AddSlider(8ed53311be8e1fab).(TXT_SOUNDVOLcxx . . $ `Descent3/stringtable.h:97:9`!, 10, (int16_tcxx . . $ int16_t#)(Sound_systemcxx . . $ Sound_system..GetMasterVolumecxx . . $ hlsSystem#GetMasterVolume(9b8c9e39889c762c).() * 10), &slider_set);
800
801 slider_set.typecxx . . $ tSliderSettings#type. = SLIDER_UNITS_PERCENTcxx . . $ `Descent3/newui_core.h:164:9`!;
802 musicvolumecxx . . $ sound_menu#musicvolume. = sheetcxx . . $ sound_menu#sheet.->AddSlidercxx . . $ newuiSheet#AddSlider(8ed53311be8e1fab).(TXT_SNDMUSVOLcxx . . $ `Descent3/stringtable.h:317:9`!, 10, (int16_tcxx . . $ int16_t#)(D3MusicGetVolumecxx . . $ D3MusicGetVolume(9b8c9e39889c762c).() * 10), &slider_set);
803
804 // sound fx quality radio list.
805 if (GetFunctionModecxx . . $ GetFunctionMode(4270339a2fa9f0f5).() != GAME_MODEcxx . . $ GAME_MODE. && GetFunctionModecxx . . $ GetFunctionMode(4270339a2fa9f0f5).() != EDITOR_GAME_MODEcxx . . $ EDITOR_GAME_MODE.) {
806 sheetcxx . . $ sound_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_SNDQUALITYcxx . . $ `Descent3/stringtable.h:323:9`!, 0, 95);
807 fxqualitycxx . . $ sound_menu#fxquality. = sheetcxx . . $ sound_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_SNDNORMALcxx . . $ `Descent3/stringtable.h:325:9`!);
808 sheetcxx . . $ sound_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_SNDHIGHcxx . . $ `Descent3/stringtable.h:324:9`!);
809 *fxqualitycxx . . $ sound_menu#fxquality. = Sound_systemcxx . . $ Sound_system..GetSoundQualitycxx . . $ hlsSystem#GetSoundQuality(6e9c618e4dd2eafc).() == SQT_HIGHcxx . . $ `sndlib/ssl_lib.h:352:9`! ? 1 : 0;
810 slider_set.min_valcxx . . $ tSliderSettings#min_val..icxx . . $ tSliderSettings#$anonymous_type_0#i. = MIN_SOUNDS_MIXEDcxx . . $ `sndlib/hlsoundlib.h:216:9`!;
811 slider_set.max_valcxx . . $ tSliderSettings#max_val..icxx . . $ tSliderSettings#$anonymous_type_1#i. = MAX_SOUNDS_MIXEDcxx . . $ `sndlib/hlsoundlib.h:215:9`!;
812 slider_set.typecxx . . $ tSliderSettings#type. = SLIDER_UNITS_INTcxx . . $ `Descent3/newui_core.h:163:9`!;
813 fxquantitycxx . . $ sound_menu#fxquantity. = sheetcxx . . $ sound_menu#sheet.->AddSlidercxx . . $ newuiSheet#AddSlider(8ed53311be8e1fab).(TXT_SNDCFG_SFXQUANTITYcxx . . $ `Descent3/stringtable.h:848:9`!, (slider_set.max_valcxx . . $ tSliderSettings#max_val..icxx . . $ tSliderSettings#$anonymous_type_1#i. - slider_set.min_valcxx . . $ tSliderSettings#min_val..icxx . . $ tSliderSettings#$anonymous_type_0#i.),
814 Sound_systemcxx . . $ Sound_system..GetLLSoundQuantitycxx . . $ hlsSystem#GetLLSoundQuantity(b126dc7c1de90089).() - MIN_SOUNDS_MIXEDcxx . . $ `sndlib/hlsoundlib.h:216:9`!, &slider_set);
815 old_fxquantitycxx . . $ sound_menu#old_fxquantity. = (Sound_systemcxx . . $ Sound_system..GetLLSoundQuantitycxx . . $ hlsSystem#GetLLSoundQuantity(b126dc7c1de90089).() - MIN_SOUNDS_MIXEDcxx . . $ `sndlib/hlsoundlib.h:216:9`!);
816
817 } else {
818 fxqualitycxx . . $ sound_menu#fxquality. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
819 fxquantitycxx . . $ sound_menu#fxquantity. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
820 }
821
822 #if defined(_DEBUGcxx . . $ `<built-in>:482:9`!)
823 int iTemp;
824 // add sound stats group
825 sheetcxx . . $ sound_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).("MIXER SETTINGS", 180, 85);
826 switch (Sound_systemcxx . . $ Sound_system..GetSoundMixercxx . . $ hlsSystem#GetSoundMixer(6e9c618e4dd2eafc).()) {
827 case SOUND_MIXER_NONEcxx . . $ `sndlib/ssl_lib.h:348:9`!:
828 iTemp = 0;
829 break;
830 case SOUND_MIXER_SOFTWARE_16cxx . . $ `sndlib/ssl_lib.h:342:9`!:
831 iTemp = 1;
832 break;
833 case SOUND_MIXER_DS_8cxx . . $ `sndlib/ssl_lib.h:344:9`!:
834 iTemp = 2;
835 break;
836 case SOUND_MIXER_DS_16cxx . . $ `sndlib/ssl_lib.h:343:9`!:
837 iTemp = 3;
838 break;
839 case SOUND_MIXER_DS3D_16cxx . . $ `sndlib/ssl_lib.h:345:9`!:
840 iTemp = 4;
841 break;
842 case SOUND_MIXER_CREATIVE_EAXcxx . . $ `sndlib/ssl_lib.h:347:9`!:
843 iTemp = 5;
844 break;
845 default:
846 Int3cxx . . $ `misc/pserror.h:247:9`!(); //-wtf?
847 }
848 sndmixercxx . . $ sound_menu#sndmixer. = sheetcxx . . $ sound_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).("NONE");
849 sheetcxx . . $ sound_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).("SOFTWARE");
850 sheetcxx . . $ sound_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).("DS 8");
851 sheetcxx . . $ sound_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).("DS 16");
852 sheetcxx . . $ sound_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).("DS 3D");
853 sheetcxx . . $ sound_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).("EAX");
854 *sndmixercxx . . $ sound_menu#sndmixer. = iTemp;
855 #endif
856
857 return sheetcxx . . $ sound_menu#sheet.;
858 };
859
860 // retreive values from property sheet here.
861 void finishcxx . . $ sound_menu#finish(49f6e7a06ebc5aa8).() {
862 int iTemp;
863 char mixer_type = SOUND_MIXER_NONEcxx . . $ `sndlib/ssl_lib.h:348:9`!;
864
865 #if defined(_DEBUGcxx . . $ `<built-in>:482:9`!)
866 iTemp = *sndmixercxx . . $ sound_menu#sndmixer.;
867
868 switch (iTemp) {
869 case 0:
870 mixer_type = SOUND_MIXER_NONEcxx . . $ `sndlib/ssl_lib.h:348:9`!;
871 break;
872 case 1:
873 mixer_type = SOUND_MIXER_SOFTWARE_16cxx . . $ `sndlib/ssl_lib.h:342:9`!;
874 break;
875 case 2:
876 mixer_type = SOUND_MIXER_DS_8cxx . . $ `sndlib/ssl_lib.h:344:9`!;
877 break;
878 case 3:
879 mixer_type = SOUND_MIXER_DS_16cxx . . $ `sndlib/ssl_lib.h:343:9`!;
880 break;
881 case 4:
882 mixer_type = SOUND_MIXER_DS3D_16cxx . . $ `sndlib/ssl_lib.h:345:9`!;
883 break;
884 case 5:
885 mixer_type = SOUND_MIXER_CREATIVE_EAXcxx . . $ `sndlib/ssl_lib.h:347:9`!;
886 break;
887 default:
888 Int3cxx . . $ `misc/pserror.h:247:9`!(); // -wtf?
889 }
890
891 if (Sound_systemcxx . . $ Sound_system..GetSoundMixercxx . . $ hlsSystem#GetSoundMixer(6e9c618e4dd2eafc).() == SOUND_MIXER_NONEcxx . . $ `sndlib/ssl_lib.h:348:9`!) {
892 Sound_systemcxx . . $ Sound_system..InitSoundLibcxx . . $ hlsSystem#InitSoundLib(bc2f84f4176dee7e).(Descentcxx . . $ Descent., mixer_type, Sound_qualitycxx . . $ Sound_quality., false);
893 } else {
894 Sound_systemcxx . . $ Sound_system..SetSoundMixercxx . . $ hlsSystem#SetSoundMixer(b5fd09639b7a0261).(mixer_type);
895 }
896 #endif
897
898 Sound_systemcxx . . $ Sound_system..SetMasterVolumecxx . . $ hlsSystem#SetMasterVolume(9364e6e7bff7660).((*fxvolumecxx . . $ sound_menu#fxvolume.) / 10.0f);
899 D3MusicSetVolumecxx . . $ D3MusicSetVolume(9364e6e7bff7660).((*musicvolumecxx . . $ sound_menu#musicvolume.) / 10.0f);
900
901 if (fxquantitycxx . . $ sound_menu#fxquantity.) {
902 mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "oldquant %d newquant %d\n", old_fxquantity, *fxquantity);
903 if (old_fxquantitycxx . . $ sound_menu#old_fxquantity. != (*fxquantitycxx . . $ sound_menu#fxquantity.)) {
904 Sound_systemcxx . . $ Sound_system..SetLLSoundQuantitycxx . . $ hlsSystem#SetLLSoundQuantity(d4f767463ce0a6b3).((*fxquantitycxx . . $ sound_menu#fxquantity.) + MIN_SOUNDS_MIXEDcxx . . $ `sndlib/hlsoundlib.h:216:9`!);
905 }
906 }
907
908 if (fxqualitycxx . . $ sound_menu#fxquality.) {
909 Sound_systemcxx . . $ Sound_system..SetSoundQualitycxx . . $ hlsSystem#SetSoundQuality(b5fd09639b7a0261).((*fxqualitycxx . . $ sound_menu#fxquality. == 1) ? SQT_HIGHcxx . . $ `sndlib/ssl_lib.h:352:9`! : SQT_NORMALcxx . . $ `sndlib/ssl_lib.h:351:9`!);
910 }
911
912 //@@ iTemp = (*powerupvoices);
913 //@@ if (iTemp == 2) {
914 //@@ PlayVoices = true;
915 //@@ PlayPowerupVoice = true;
916 //@@ }
917 //@@ else if (iTemp == 1) {
918 //@@ PlayPowerupVoice = false;
919 //@@ PlayVoices = true;
920 //@@ }
921 //@@ else {
922 //@@ PlayVoices = false;
923 //@@ PlayPowerupVoice = false;
924 //@@ }
925 };
926
927 // process output and do stuff accordintly
928 void processcxx . . $ sound_menu#process(d4f767463ce0a6b3).(int res) {
929 if (sheetcxx . . $ sound_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(2c92555bf46fdf74).(fxvolumecxx . . $ sound_menu#fxvolume.)) {
930 Sound_systemcxx . . $ Sound_system..SetMasterVolumecxx . . $ hlsSystem#SetMasterVolume(9364e6e7bff7660).((*fxvolumecxx . . $ sound_menu#fxvolume.) / 10.0f);
931 Sound_systemcxx . . $ Sound_system..BeginSoundFramecxx . . $ hlsSystem#BeginSoundFrame(b45ddcbc8423892c).(false);
932 Sound_systemcxx . . $ Sound_system..StopSoundImmediatecxx . . $ hlsSystem#StopSoundImmediate(d4f767463ce0a6b3).(ls_sound_idcxx . . $ sound_menu#ls_sound_id.);
933 ls_sound_idcxx . . $ sound_menu#ls_sound_id. = Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(sound_idcxx . . $ sound_menu#sound_id.);
934 Sound_systemcxx . . $ Sound_system..EndSoundFramecxx . . $ hlsSystem#EndSoundFrame(49f6e7a06ebc5aa8).();
935 }
936 if (sheetcxx . . $ sound_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(2c92555bf46fdf74).(musicvolumecxx . . $ sound_menu#musicvolume.)) {
937 D3MusicSetVolumecxx . . $ D3MusicSetVolume(9364e6e7bff7660).((*musicvolumecxx . . $ sound_menu#musicvolume.) / 10.0f);
938 }
939 };
940 };
941
942
943 //////////////////////////////////////////////////////////////////
944 // GENERAL SETTINGS (TOGGLES) MENU
945 //
946
947 #define UID_SHORTCUT_JOYSETTINGScxx . . $ `Descent3/config.cpp:947:9`! 0x1000
948 #define UID_SHORTCUT_KEYSETTINGScxx . . $ `Descent3/config.cpp:948:9`! 0x1001
949 #define UID_SHORTCUT_FORCEFEEDcxx . . $ `Descent3/config.cpp:949:9`! 0x1002
950
951 struct toggles_menucxx . . $ toggles_menu# {
952 newuiSheetcxx . . $ newuiSheet# *sheetcxx . . $ toggles_menu#sheet.;
953 newuiMenucxx . . $ newuiMenu# *parent_menucxx . . $ toggles_menu#parent_menu.;
954
955 int *terrain_autolevelcxx . . $ toggles_menu#terrain_autolevel.; // auto leveling radios
956 int *mine_autolevelcxx . . $ toggles_menu#mine_autolevel.;
957 int *missile_viewcxx . . $ toggles_menu#missile_view.; // missile view radio
958 bool *joy_enabledcxx . . $ toggles_menu#joy_enabled., *mse_enabledcxx . . $ toggles_menu#mse_enabled.;
959 bool *reticle_togglecxx . . $ toggles_menu#reticle_toggle., *guided_togglecxx . . $ toggles_menu#guided_toggle.;
960 bool *shipsnd_togglecxx . . $ toggles_menu#shipsnd_toggle.;
961
962 // sets the menu up.
963 newuiSheetcxx . . $ newuiSheet# *setupcxx . . $ toggles_menu#setup(58668faa82d4e94e).(newuiMenucxx . . $ newuiMenu# *menu) {
964 sheetcxx . . $ toggles_menu#sheet. = menu->AddOptioncxx . . $ newuiMenu#AddOption(f02bcd29588925e6).(IDV_GCONFIGcxx . . $ `Descent3/config.cpp:339:9`!, TXT_OPTGENERALcxx . . $ `Descent3/stringtable.h:171:9`!, NEWUIMENU_MEDIUMcxx . . $ `Descent3/newui_core.h:555:9`!);
965 parent_menucxx . . $ toggles_menu#parent_menu. = menu;
966 bool ff_found = false;
967
968 sheetcxx . . $ toggles_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_TERRAUTOLEVcxx . . $ `Descent3/stringtable.h:99:9`!, 0, 0);
969 terrain_autolevelcxx . . $ toggles_menu#terrain_autolevel. = sheetcxx . . $ toggles_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_NONEcxx . . $ `Descent3/stringtable.h:102:9`!);
970 sheetcxx . . $ toggles_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_MEDIUMcxx . . $ `Descent3/stringtable.h:509:9`!);
971 sheetcxx . . $ toggles_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_HIGHcxx . . $ `Descent3/stringtable.h:530:9`!);
972 *terrain_autolevelcxx . . $ toggles_menu#terrain_autolevel. = Default_player_terrain_levelingcxx . . $ Default_player_terrain_leveling.;
973
974 sheetcxx . . $ toggles_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_MINEAUTOLEVcxx . . $ `Descent3/stringtable.h:100:9`!, 0, 70);
975 mine_autolevelcxx . . $ toggles_menu#mine_autolevel. = sheetcxx . . $ toggles_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_NONEcxx . . $ `Descent3/stringtable.h:102:9`!);
976 sheetcxx . . $ toggles_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_MEDIUMcxx . . $ `Descent3/stringtable.h:509:9`!);
977 sheetcxx . . $ toggles_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_HIGHcxx . . $ `Descent3/stringtable.h:530:9`!);
978 *mine_autolevelcxx . . $ toggles_menu#mine_autolevel. = Default_player_room_levelingcxx . . $ Default_player_room_leveling.;
979
980 sheetcxx . . $ toggles_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_MISSILEVIEWcxx . . $ `Descent3/stringtable.h:105:9`!, 0, 140);
981 missile_viewcxx . . $ toggles_menu#missile_view. = sheetcxx . . $ toggles_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_NONEcxx . . $ `Descent3/stringtable.h:102:9`!);
982 sheetcxx . . $ toggles_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_LEFTcxx . . $ `Descent3/stringtable.h:101:9`!);
983 //@@ sheet->AddRadioButton(TXT_CENTER);
984 sheetcxx . . $ toggles_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_RIGHTcxx . . $ `Descent3/stringtable.h:104:9`!);
985 //@@ *missile_view = (Missile_camera_window==SVW_LEFT) ? 1 : (Missile_camera_window==SVW_CENTER) ? 2
986 //: (Missile_camera_window==SVW_RIGHT) ? 3 : 0;
987 *missile_viewcxx . . $ toggles_menu#missile_view. = (Missile_camera_windowcxx . . $ Missile_camera_window. == SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`!) ? 1 : (Missile_camera_windowcxx . . $ Missile_camera_window. == SVW_RIGHTcxx . . $ `Descent3/SmallViews.h:74:9`!) ? 2 : 0;
988
989 sheetcxx . . $ toggles_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_CONTROL_TOGGLEScxx . . $ `Descent3/stringtable.h:775:9`!, 110, 0);
990 joy_enabledcxx . . $ toggles_menu#joy_enabled. = sheetcxx . . $ toggles_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_JOYENABLEDcxx . . $ `Descent3/stringtable.h:535:9`!);
991 mse_enabledcxx . . $ toggles_menu#mse_enabled. = sheetcxx . . $ toggles_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_MOUSEENABLEDcxx . . $ `Descent3/stringtable.h:510:9`!);
992 *joy_enabledcxx . . $ toggles_menu#joy_enabled. = CHECK_FLAGcxx . . $ `lib/Macros.h:63:9`!(Current_pilot.read_controller, READF_JOYcxx . . $ `Descent3/controls.h:178:9`!) ? true : false;
993 *mse_enabledcxx . . $ toggles_menu#mse_enabled. = CHECK_FLAGcxx . . $ `lib/Macros.h:63:9`!(Current_pilot.read_controller, READF_MOUSEcxx . . $ `Descent3/controls.h:177:9`!) ? true : false;
994
995 sheetcxx . . $ toggles_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_TOGGLEScxx . . $ `Descent3/stringtable.h:749:9`!, 110, 70);
996 reticle_togglecxx . . $ toggles_menu#reticle_toggle. = sheetcxx . . $ toggles_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_TOG_SHOWRETICLEcxx . . $ `Descent3/stringtable.h:846:9`!);
997 guided_togglecxx . . $ toggles_menu#guided_toggle. = sheetcxx . . $ toggles_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_TOG_GUIDEDMISSILEcxx . . $ `Descent3/stringtable.h:845:9`!);
998 shipsnd_togglecxx . . $ toggles_menu#shipsnd_toggle. = sheetcxx . . $ toggles_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_TOG_SHIPSOUNDScxx . . $ `Descent3/stringtable.h:847:9`!);
999 *reticle_togglecxx . . $ toggles_menu#reticle_toggle. = Game_togglescxx . . $ Game_toggles..show_reticlecxx . . $ tGameToggles#show_reticle.;
1000 *guided_togglecxx . . $ toggles_menu#guided_toggle. = Game_togglescxx . . $ Game_toggles..guided_mainviewcxx . . $ tGameToggles#guided_mainview.;
1001 *shipsnd_togglecxx . . $ toggles_menu#shipsnd_toggle. = Game_togglescxx . . $ Game_toggles..ship_noisescxx . . $ tGameToggles#ship_noises.;
1002
1003 ddio_ff_GetInfocxx . . $ ddio_ff_GetInfo(4bbb0be6c29741a8).(&ff_found, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1004 sheetcxx . . $ toggles_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_ADJUSTCONTROLSETTINGScxx . . $ `Descent3/stringtable.h:876:9`!, 110, 140);
1005 sheetcxx . . $ toggles_menu#sheet.->AddLongButtoncxx . . $ newuiSheet#AddLongButton(680bf41633375800).(TXT_JOYSENSBTNcxx . . $ `Descent3/stringtable.h:877:9`!, UID_SHORTCUT_JOYSETTINGScxx . . $ `Descent3/config.cpp:947:9`!);
1006 sheetcxx . . $ toggles_menu#sheet.->AddLongButtoncxx . . $ newuiSheet#AddLongButton(680bf41633375800).(TXT_KEYRAMPINGcxx . . $ `Descent3/stringtable.h:878:9`!, UID_SHORTCUT_KEYSETTINGScxx . . $ `Descent3/config.cpp:948:9`!);
1007
1008 if (ff_found) {
1009 sheetcxx . . $ toggles_menu#sheet.->AddLongButtoncxx . . $ newuiSheet#AddLongButton(680bf41633375800).(TXT_CFG_CONFIGFORCEFEEDBACKcxx . . $ `Descent3/stringtable.h:514:9`!, UID_SHORTCUT_FORCEFEEDcxx . . $ `Descent3/config.cpp:949:9`!);
1010 }
1011 return sheetcxx . . $ toggles_menu#sheet.;
1012 };
1013
1014 // retreive values from property sheet here.
1015 void finishcxx . . $ toggles_menu#finish(49f6e7a06ebc5aa8).() {
1016 int iTemp;
1017
1018 Default_player_terrain_levelingcxx . . $ Default_player_terrain_leveling. = *terrain_autolevelcxx . . $ toggles_menu#terrain_autolevel.;
1019 Default_player_room_levelingcxx . . $ Default_player_room_leveling. = *mine_autolevelcxx . . $ toggles_menu#mine_autolevel.;
1020
1021 iTemp = (*missile_viewcxx . . $ toggles_menu#missile_view.);
1022 //@@ Missile_camera_window = (iTemp==1) ? SVW_LEFT : (iTemp==2) ? SVW_CENTER : (iTemp==3) ? SVW_RIGHT
1023 //: -1;
1024 Missile_camera_windowcxx . . $ Missile_camera_window. = (iTemp == 1) ? SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`! : (iTemp == 2) ? SVW_RIGHTcxx . . $ `Descent3/SmallViews.h:74:9`! : -1;
1025 Current_pilotcxx . . $ Current_pilot..read_controllercxx . . $ pilot#read_controller. = (*joy_enabledcxx . . $ toggles_menu#joy_enabled.) ? READF_JOYcxx . . $ `Descent3/controls.h:178:9`! : 0;
1026 Current_pilotcxx . . $ Current_pilot..read_controllercxx . . $ pilot#read_controller. |= (*mse_enabledcxx . . $ toggles_menu#mse_enabled.) ? READF_MOUSEcxx . . $ `Descent3/controls.h:177:9`! : 0;
1027 Game_togglescxx . . $ Game_toggles..show_reticlecxx . . $ tGameToggles#show_reticle. = (*reticle_togglecxx . . $ toggles_menu#reticle_toggle.);
1028 Game_togglescxx . . $ Game_toggles..guided_mainviewcxx . . $ tGameToggles#guided_mainview. = (*guided_togglecxx . . $ toggles_menu#guided_toggle.);
1029 Game_togglescxx . . $ Game_toggles..ship_noisescxx . . $ tGameToggles#ship_noises. = (*shipsnd_togglecxx . . $ toggles_menu#shipsnd_toggle.);
1030 };
1031
1032 // process
1033 void processcxx . . $ toggles_menu#process(d4f767463ce0a6b3).(int res) {
1034 switch (res) {
1035 case UID_SHORTCUT_JOYSETTINGScxx . . $ `Descent3/config.cpp:947:9`!:
1036 case UID_SHORTCUT_FORCEFEEDcxx . . $ `Descent3/config.cpp:949:9`!:
1037 LoadControlConfigcxx . . $ LoadControlConfig(1794bc617d3f3266).();
1038 joystick_settings_dialogcxx . . $ joystick_settings_dialog(49f6e7a06ebc5aa8).();
1039 SaveControlConfigcxx . . $ SaveControlConfig(1794bc617d3f3266).();
1040 break;
1041 case UID_SHORTCUT_KEYSETTINGScxx . . $ `Descent3/config.cpp:948:9`!:
1042 LoadControlConfigcxx . . $ LoadControlConfig(1794bc617d3f3266).();
1043 key_settings_dialogcxx . . $ key_settings_dialog(49f6e7a06ebc5aa8).();
1044 SaveControlConfigcxx . . $ SaveControlConfig(1794bc617d3f3266).();
1045 break;
1046 }
1047 };
1048 };
1049
1050
1051 //////////////////////////////////////////////////////////////////
1052 // HUD CONFIG MENU
1053 //
1054 struct hud_menucxx . . $ hud_menu# {
1055 newuiSheetcxx . . $ newuiSheet# *sheetcxx . . $ hud_menu#sheet.;
1056 newuiMenucxx . . $ newuiMenu# *parent_menucxx . . $ hud_menu#parent_menu.;
1057
1058 int *ship_statuscxx . . $ hud_menu#ship_status.;
1059 int *shield_energycxx . . $ hud_menu#shield_energy.;
1060 int *weapon_loadscxx . . $ hud_menu#weapon_loads.;
1061 int *afterburnercxx . . $ hud_menu#afterburner.;
1062 int *inventorycxx . . $ hud_menu#inventory.;
1063 int *warningscxx . . $ hud_menu#warnings.;
1064 int *countermeasurescxx . . $ hud_menu#countermeasures.;
1065 // int *goals;
1066
1067 int add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(const char *title, int **ptr, int y, int sel, bool graphical) {
1068 const int y_line = 29;
1069
1070 sheetcxx . . $ hud_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(title, 0, y, NEWUI_ALIGN_HORIZcxx . . $ NEWUI_ALIGN_HORIZ.);
1071 *ptr = sheetcxx . . $ hud_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_OFFcxx . . $ `Descent3/stringtable.h:110:9`!);
1072 if (graphical) {
1073 sheetcxx . . $ hud_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_TEXTcxx . . $ `Descent3/stringtable.h:328:9`!);
1074 sheetcxx . . $ hud_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_GRAPHICALcxx . . $ `Descent3/stringtable.h:329:9`!);
1075 } else {
1076 sheetcxx . . $ hud_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_ONcxx . . $ `Descent3/stringtable.h:111:9`!);
1077 }
1078 *(*ptr) = sel;
1079 return y + y_line;
1080 };
1081
1082 // sets the menu up.
1083 newuiSheetcxx . . $ newuiSheet# *setupcxx . . $ hud_menu#setup(58668faa82d4e94e).(newuiMenucxx . . $ newuiMenu# *menu) {
1084 int y, sel;
1085 uint16_tcxx . . $ uint16_t# stat, grstat;
1086
1087 sheetcxx . . $ hud_menu#sheet. = menu->AddOptioncxx . . $ newuiMenu#AddOption(f02bcd29588925e6).(IDV_HCONFIGcxx . . $ `Descent3/config.cpp:342:9`!, TXT_OPTHUDcxx . . $ `Descent3/stringtable.h:326:9`!, NEWUIMENU_MEDIUMcxx . . $ `Descent3/newui_core.h:555:9`!);
1088 parent_menucxx . . $ hud_menu#parent_menu. = menu;
1089
1090 Current_pilotcxx . . $ Current_pilot..get_hud_datacxx . . $ pilot#get_hud_data(c4a38c24677fe9fd).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, &stat, &grstat);
1091
1092 sel = (stat & STAT_SHIPcxx . . $ `Descent3/hud.h:282:9`!) ? 1 : (grstat & STAT_SHIPcxx . . $ `Descent3/hud.h:282:9`!) ? 2 : 0;
1093 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDSHIPSTATUScxx . . $ `Descent3/stringtable.h:330:9`!, &ship_statuscxx . . $ hud_menu#ship_status., 0, sel, true);
1094
1095 sel = (stat & (STAT_SHIELDScxx . . $ `Descent3/hud.h:276:9`! + STAT_ENERGYcxx . . $ `Descent3/hud.h:277:9`!)) ? 1 : (grstat & (STAT_SHIELDScxx . . $ `Descent3/hud.h:276:9`! + STAT_ENERGYcxx . . $ `Descent3/hud.h:277:9`!)) ? 2 : 0;
1096 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDSHIELDENERGYcxx . . $ `Descent3/stringtable.h:331:9`!, &shield_energycxx . . $ hud_menu#shield_energy., y, sel, true);
1097
1098 sel = (stat & (STAT_PRIMARYLOADcxx . . $ `Descent3/hud.h:278:9`! + STAT_SECONDARYLOADcxx . . $ `Descent3/hud.h:279:9`!)) ? 1
1099 : (grstat & (STAT_PRIMARYLOADcxx . . $ `Descent3/hud.h:278:9`! + STAT_SECONDARYLOADcxx . . $ `Descent3/hud.h:279:9`!)) ? 2
1100 : 0;
1101 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDWEAPONScxx . . $ `Descent3/stringtable.h:332:9`!, &weapon_loadscxx . . $ hud_menu#weapon_loads., y, sel, true);
1102
1103 sel = (stat & STAT_AFTERBURNcxx . . $ `Descent3/hud.h:283:9`!) ? 1 : (grstat & STAT_AFTERBURNcxx . . $ `Descent3/hud.h:283:9`!) ? 2 : 0;
1104 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDAFTERBURNcxx . . $ `Descent3/stringtable.h:333:9`!, &afterburnercxx . . $ hud_menu#afterburner., y, sel, true);
1105
1106 sel = (stat & STAT_WARNINGcxx . . $ `Descent3/hud.h:284:9`!) ? 1 : (grstat & STAT_WARNINGcxx . . $ `Descent3/hud.h:284:9`!) ? 2 : 0;
1107 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDWARNINGScxx . . $ `Descent3/stringtable.h:760:9`!, &warningscxx . . $ hud_menu#warnings., y, sel, true);
1108
1109 sel = (stat & STAT_CNTRMEASUREcxx . . $ `Descent3/hud.h:288:9`!) ? 1 : (grstat & STAT_CNTRMEASUREcxx . . $ `Descent3/hud.h:288:9`!) ? 2 : 0;
1110 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDCNTRMEASUREcxx . . $ `Descent3/stringtable.h:342:9`!, &countermeasurescxx . . $ hud_menu#countermeasures., y, sel, true);
1111
1112 // sel = (stat & STAT_GOALS) ? 1 : 0;
1113 // y = add_hud_option(TXT_HUDMISSIONSTATUS, &goals, y, sel, false);
1114
1115 sel = (stat & STAT_INVENTORYcxx . . $ `Descent3/hud.h:281:9`!) ? 1 : 0;
1116 y = add_hud_optioncxx . . $ hud_menu#add_hud_option(ff466e5096526e99).(TXT_HUDINVENTORYcxx . . $ `Descent3/stringtable.h:336:9`!, &inventorycxx . . $ hud_menu#inventory., y, sel, false);
1117
1118 return sheetcxx . . $ hud_menu#sheet.;
1119 };
1120
1121 // retreive values from property sheet here.
1122 void finishcxx . . $ hud_menu#finish(49f6e7a06ebc5aa8).() {
1123 int sel;
1124 uint16_tcxx . . $ uint16_t# hud_new_stat = STAT_MESSAGEScxx . . $ `Descent3/hud.h:280:9`! + STAT_CUSTOMcxx . . $ `Descent3/hud.h:287:9`!;
1125 uint16_tcxx . . $ uint16_t# hud_new_grstat = 0;
1126
1127 sel = *ship_statuscxx . . $ hud_menu#ship_status.;
1128 if (sel == 1)
1129 hud_new_stat |= STAT_SHIPcxx . . $ `Descent3/hud.h:282:9`!;
1130 else if (sel == 2)
1131 hud_new_grstat |= STAT_SHIPcxx . . $ `Descent3/hud.h:282:9`!;
1132 sel = *shield_energycxx . . $ hud_menu#shield_energy.;
1133 if (sel == 1)
1134 hud_new_stat |= (STAT_SHIELDScxx . . $ `Descent3/hud.h:276:9`! + STAT_ENERGYcxx . . $ `Descent3/hud.h:277:9`!);
1135 else if (sel == 2)
1136 hud_new_grstat |= (STAT_SHIELDScxx . . $ `Descent3/hud.h:276:9`! + STAT_ENERGYcxx . . $ `Descent3/hud.h:277:9`!);
1137 sel = *weapon_loadscxx . . $ hud_menu#weapon_loads.;
1138 if (sel == 1)
1139 hud_new_stat |= (STAT_PRIMARYLOADcxx . . $ `Descent3/hud.h:278:9`! + STAT_SECONDARYLOADcxx . . $ `Descent3/hud.h:279:9`!);
1140 else if (sel == 2)
1141 hud_new_grstat |= (STAT_PRIMARYLOADcxx . . $ `Descent3/hud.h:278:9`! + STAT_SECONDARYLOADcxx . . $ `Descent3/hud.h:279:9`!);
1142 sel = *afterburnercxx . . $ hud_menu#afterburner.;
1143 if (sel == 1)
1144 hud_new_stat |= STAT_AFTERBURNcxx . . $ `Descent3/hud.h:283:9`!;
1145 else if (sel == 2)
1146 hud_new_grstat |= STAT_AFTERBURNcxx . . $ `Descent3/hud.h:283:9`!;
1147 sel = *warningscxx . . $ hud_menu#warnings.;
1148 if (sel == 1)
1149 hud_new_stat |= STAT_WARNINGcxx . . $ `Descent3/hud.h:284:9`!;
1150 else if (sel == 2)
1151 hud_new_grstat |= STAT_WARNINGcxx . . $ `Descent3/hud.h:284:9`!;
1152 sel = *countermeasurescxx . . $ hud_menu#countermeasures.;
1153 if (sel == 1)
1154 hud_new_stat |= STAT_CNTRMEASUREcxx . . $ `Descent3/hud.h:288:9`!;
1155 else if (sel == 2)
1156 hud_new_grstat |= STAT_CNTRMEASUREcxx . . $ `Descent3/hud.h:288:9`!;
1157 // sel = *goals;
1158 // if (sel==1) hud_new_stat |= STAT_GOALS;
1159 sel = *inventorycxx . . $ hud_menu#inventory.;
1160 if (sel == 1)
1161 hud_new_stat |= STAT_INVENTORYcxx . . $ `Descent3/hud.h:281:9`!;
1162
1163 Current_pilotcxx . . $ Current_pilot..set_hud_datacxx . . $ pilot#set_hud_data(c4a38c24677fe9fd).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, &hud_new_stat, &hud_new_grstat);
1164
1165 // mprintf(0, "pilot hud stat=%x\n", Current_pilot.hud_stat);
1166 // mprintf(0, "pilot hud grstat=%x\n", Current_pilot.hud_graphical_stat);
1167
1168 // modify current hud stats if in game.
1169 if ((GetFunctionModecxx . . $ GetFunctionMode(4270339a2fa9f0f5).() == EDITOR_GAME_MODEcxx . . $ EDITOR_GAME_MODE. || GetFunctionModecxx . . $ GetFunctionMode(4270339a2fa9f0f5).() == GAME_MODEcxx . . $ GAME_MODE.) && GetHUDModecxx . . $ GetHUDMode(d2d05048dda10524).() == HUD_FULLSCREENcxx . . $ HUD_FULLSCREEN.) {
1170 SetHUDStatecxx . . $ SetHUDState(161476d40f03fa8c).(hud_new_stat | STAT_SCOREcxx . . $ `Descent3/config.cpp:324:9`! | (Hud_stat_maskcxx . . $ Hud_stat_mask. & STAT_FPScxx . . $ `Descent3/hud.h:275:9`!), hud_new_grstat);
1171 }
1172 };
1173 };
1174
1175
1176 //////////////////////////////////////////////////////////////////
1177 // DETAILS MENU
1178 //
1179 struct details_menucxx . . $ details_menu# {
1180 newuiSheetcxx . . $ newuiSheet# *sheetcxx . . $ details_menu#sheet.;
1181 newuiMenucxx . . $ newuiMenu# *parent_menucxx . . $ details_menu#parent_menu.;
1182
1183 int *detail_levelcxx . . $ details_menu#detail_level.; // detail level radio
1184 int *objcompcxx . . $ details_menu#objcomp.; // object complexity radio
1185 bool *specmapcxx . . $ details_menu#specmap., *headlightcxx . . $ details_menu#headlight., *mirrorcxx . . $ details_menu#mirror., // check boxes
1186 *dynamiccxx . . $ details_menu#dynamic., *fogcxx . . $ details_menu#fog., *coronascxx . . $ details_menu#coronas., *proceduralscxx . . $ details_menu#procedurals., *powerup_halocxx . . $ details_menu#powerup_halo., *scorchescxx . . $ details_menu#scorches., *weapon_coronascxx . . $ details_menu#weapon_coronas.;
1187 int16_tcxx . . $ int16_t# *pixel_errcxx . . $ details_menu#pixel_err., // 0-27 (1-28)
1188 *rend_distcxx . . $ details_menu#rend_dist.; // 0-120 (80-200)
1189
1190 int *texture_qualitycxx . . $ details_menu#texture_quality.;
1191
1192 // sets the menu up.
1193 newuiSheetcxx . . $ newuiSheet# *setupcxx . . $ details_menu#setup(58668faa82d4e94e).(newuiMenucxx . . $ newuiMenu# *menu) {
1194 int iTemp;
1195 sheetcxx . . $ details_menu#sheet. = menu->AddOptioncxx . . $ newuiMenu#AddOption(f02bcd29588925e6).(IDV_DCONFIGcxx . . $ `Descent3/config.cpp:341:9`!, TXT_OPTDETAILcxx . . $ `Descent3/stringtable.h:172:9`!, NEWUIMENU_MEDIUMcxx . . $ `Descent3/newui_core.h:555:9`!);
1196 parent_menucxx . . $ details_menu#parent_menu. = menu;
1197
1198 // detail level radio
1199 Databasecxx . . $ Database.->read_intcxx . . $ `lib/linux/lnxdatabase.h:71:9`!("PredefDetailSetting", &Default_detail_level);
1200 iTemp = Default_detail_levelcxx . . $ Default_detail_level.;
1201 sheetcxx . . $ details_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_CFG_PRESETDETAILScxx . . $ `Descent3/stringtable.h:515:9`!, 0, 0);
1202 detail_levelcxx . . $ details_menu#detail_level. = sheetcxx . . $ details_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_LOWcxx . . $ `Descent3/stringtable.h:516:9`!);
1203 sheetcxx . . $ details_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_MEDIUMcxx . . $ `Descent3/stringtable.h:509:9`!);
1204 sheetcxx . . $ details_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_HIGHcxx . . $ `Descent3/stringtable.h:530:9`!);
1205 sheetcxx . . $ details_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_VERYHIGHcxx . . $ `Descent3/stringtable.h:517:9`!);
1206 sheetcxx . . $ details_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_CUSTOMcxx . . $ `Descent3/stringtable.h:518:9`!);
1207 *detail_levelcxx . . $ details_menu#detail_level. = iTemp;
1208
1209 // toggles
1210 sheetcxx . . $ details_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_TOGGLEScxx . . $ `Descent3/stringtable.h:749:9`!, 0, 87);
1211 specmapcxx . . $ details_menu#specmap. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_SPECMAPPINGcxx . . $ `Descent3/stringtable.h:338:9`!, Detail_settingscxx . . $ Detail_settings..Specular_lightingcxx . . $ tDetailSettings#Specular_lighting.);
1212 headlightcxx . . $ details_menu#headlight. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_FASTHEADLIGHTcxx . . $ `Descent3/stringtable.h:374:9`!, Detail_settingscxx . . $ Detail_settings..Fast_headlight_oncxx . . $ tDetailSettings#Fast_headlight_on.);
1213 mirrorcxx . . $ details_menu#mirror. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_MIRRORSURFcxx . . $ `Descent3/stringtable.h:375:9`!, Detail_settingscxx . . $ Detail_settings..Mirrored_surfacescxx . . $ tDetailSettings#Mirrored_surfaces.);
1214 dynamiccxx . . $ details_menu#dynamic. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_DYNLIGHTINGcxx . . $ `Descent3/stringtable.h:93:9`!, Detail_settingscxx . . $ Detail_settings..Dynamic_lightingcxx . . $ tDetailSettings#Dynamic_lighting.);
1215 fogcxx . . $ details_menu#fog. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_ENABLEFOGcxx . . $ `Descent3/stringtable.h:520:9`!, Detail_settingscxx . . $ Detail_settings..Fog_enabledcxx . . $ tDetailSettings#Fog_enabled.);
1216 coronascxx . . $ details_menu#coronas. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_ENABLELIGHTCORONAcxx . . $ `Descent3/stringtable.h:521:9`!, Detail_settingscxx . . $ Detail_settings..Coronas_enabledcxx . . $ tDetailSettings#Coronas_enabled.);
1217 proceduralscxx . . $ details_menu#procedurals. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_PROCEDURALScxx . . $ `Descent3/stringtable.h:522:9`!, Detail_settingscxx . . $ Detail_settings..Procedurals_enabledcxx . . $ tDetailSettings#Procedurals_enabled.);
1218 powerup_halocxx . . $ details_menu#powerup_halo. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_POWERUPHALOScxx . . $ `Descent3/stringtable.h:523:9`!, Detail_settingscxx . . $ Detail_settings..Powerup_haloscxx . . $ tDetailSettings#Powerup_halos.);
1219 scorchescxx . . $ details_menu#scorches. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_SCORCHMARKScxx . . $ `Descent3/stringtable.h:524:9`!, Detail_settingscxx . . $ Detail_settings..Scorches_enabledcxx . . $ tDetailSettings#Scorches_enabled.);
1220 weapon_coronascxx . . $ details_menu#weapon_coronas. = sheetcxx . . $ details_menu#sheet.->AddLongCheckBoxcxx . . $ newuiSheet#AddLongCheckBox(b1b99af17a84c782).(TXT_CFG_WEAPONEFFECTScxx . . $ `Descent3/stringtable.h:525:9`!, Detail_settingscxx . . $ Detail_settings..Weapon_coronas_enabledcxx . . $ tDetailSettings#Weapon_coronas_enabled.);
1221
1222 // sliders
1223 tSliderSettingscxx . . $ tSliderSettings# slider_set;
1224 sheetcxx . . $ details_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_GEOMETRYcxx . . $ `Descent3/stringtable.h:750:9`!, 90, 0);
1225 iTemp = MAXIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:424:9`! - Detail_settingscxx . . $ Detail_settings..Pixel_errorcxx . . $ tDetailSettings#Pixel_error. - MINIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:423:9`!;
1226 if (iTemp < 0)
1227 iTemp = 0;
1228 slider_set.min_valcxx . . $ tSliderSettings#min_val..icxx . . $ tSliderSettings#$anonymous_type_0#i. = MINIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:423:9`!;
1229 slider_set.max_valcxx . . $ tSliderSettings#max_val..icxx . . $ tSliderSettings#$anonymous_type_1#i. = MAXIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:424:9`!;
1230 slider_set.typecxx . . $ tSliderSettings#type. = SLIDER_UNITS_INTcxx . . $ `Descent3/newui_core.h:163:9`!;
1231 pixel_errcxx . . $ details_menu#pixel_err. = sheetcxx . . $ details_menu#sheet.->AddSlidercxx . . $ newuiSheet#AddSlider(8ed53311be8e1fab).(TXT_TERRDETAILcxx . . $ `Descent3/stringtable.h:107:9`!, MAXIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:424:9`! - MINIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:423:9`!, iTemp, &slider_set);
1232
1233 slider_set.min_valcxx . . $ tSliderSettings#min_val..icxx . . $ tSliderSettings#$anonymous_type_0#i. = MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`! / 2;
1234 slider_set.max_valcxx . . $ tSliderSettings#max_val..icxx . . $ tSliderSettings#$anonymous_type_1#i. = MAXIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:426:9`! / 2;
1235 slider_set.typecxx . . $ tSliderSettings#type. = SLIDER_UNITS_INTcxx . . $ `Descent3/newui_core.h:163:9`!;
1236 iTemp = (int)(Detail_settingscxx . . $ Detail_settings..Terrain_render_distancecxx . . $ tDetailSettings#Terrain_render_distance. / ((float)TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!)) - MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`!;
1237 if (iTemp < 0)
1238 iTemp = 0;
1239 rend_distcxx . . $ details_menu#rend_dist. = sheetcxx . . $ details_menu#sheet.->AddSlidercxx . . $ newuiSheet#AddSlider(8ed53311be8e1fab).(TXT_RENDDISTcxx . . $ `Descent3/stringtable.h:108:9`!, (MAXIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:426:9`! - MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`!) / 2, iTemp / 2, &slider_set);
1240
1241 // object complexity radio
1242 sheetcxx . . $ details_menu#sheet.->NewGroupcxx . . $ newuiSheet#NewGroup(465b27e37ce794b1).(TXT_CFG_OBJECTCOMPLEXITYcxx . . $ `Descent3/stringtable.h:519:9`!, 174, 87);
1243 objcompcxx . . $ details_menu#objcomp. = sheetcxx . . $ details_menu#sheet.->AddFirstRadioButtoncxx . . $ newuiSheet#AddFirstRadioButton(c0389c32fb6fc938).(TXT_LOWcxx . . $ `Descent3/stringtable.h:516:9`!);
1244 sheetcxx . . $ details_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_MEDIUMcxx . . $ `Descent3/stringtable.h:509:9`!);
1245 sheetcxx . . $ details_menu#sheet.->AddRadioButtoncxx . . $ newuiSheet#AddRadioButton(9a5cb738bb1a644).(TXT_CFG_HIGHcxx . . $ `Descent3/stringtable.h:530:9`!);
1246 *objcompcxx . . $ details_menu#objcomp. = Detail_settingscxx . . $ Detail_settings..Object_complexitycxx . . $ tDetailSettings#Object_complexity.;
1247
1248 return sheetcxx . . $ details_menu#sheet.;
1249 };
1250
1251 // retreive values from property sheet here.
1252 void finishcxx . . $ details_menu#finish(49f6e7a06ebc5aa8).() {
1253 Detail_settingscxx . . $ Detail_settings..Coronas_enabledcxx . . $ tDetailSettings#Coronas_enabled. = *coronascxx . . $ details_menu#coronas.;
1254 Detail_settingscxx . . $ Detail_settings..Dynamic_lightingcxx . . $ tDetailSettings#Dynamic_lighting. = *dynamiccxx . . $ details_menu#dynamic.;
1255 Detail_settingscxx . . $ Detail_settings..Fast_headlight_oncxx . . $ tDetailSettings#Fast_headlight_on. = *headlightcxx . . $ details_menu#headlight.;
1256 Detail_settingscxx . . $ Detail_settings..Fog_enabledcxx . . $ tDetailSettings#Fog_enabled. = *fogcxx . . $ details_menu#fog.;
1257 Detail_settingscxx . . $ Detail_settings..Mirrored_surfacescxx . . $ tDetailSettings#Mirrored_surfaces. = *mirrorcxx . . $ details_menu#mirror.;
1258 Detail_settingscxx . . $ Detail_settings..Object_complexitycxx . . $ tDetailSettings#Object_complexity. = *objcompcxx . . $ details_menu#objcomp.;
1259 Detail_settingscxx . . $ Detail_settings..Pixel_errorcxx . . $ tDetailSettings#Pixel_error. = MAXIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:424:9`! - ((*pixel_errcxx . . $ details_menu#pixel_err.) + MINIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:423:9`!);
1260 Detail_settingscxx . . $ Detail_settings..Powerup_haloscxx . . $ tDetailSettings#Powerup_halos. = *powerup_halocxx . . $ details_menu#powerup_halo.;
1261 Detail_settingscxx . . $ Detail_settings..Procedurals_enabledcxx . . $ tDetailSettings#Procedurals_enabled. = *proceduralscxx . . $ details_menu#procedurals.;
1262 Detail_settingscxx . . $ Detail_settings..Scorches_enabledcxx . . $ tDetailSettings#Scorches_enabled. = *scorchescxx . . $ details_menu#scorches.;
1263 Detail_settingscxx . . $ Detail_settings..Specular_lightingcxx . . $ tDetailSettings#Specular_lighting. = *specmapcxx . . $ details_menu#specmap.;
1264 Detail_settingscxx . . $ Detail_settings..Terrain_render_distancecxx . . $ tDetailSettings#Terrain_render_distance. = (((*rend_distcxx . . $ details_menu#rend_dist.) * 2) + MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`!) * ((float)TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!);
1265 Detail_settingscxx . . $ Detail_settings..Weapon_coronas_enabledcxx . . $ tDetailSettings#Weapon_coronas_enabled. = *weapon_coronascxx . . $ details_menu#weapon_coronas.;
1266
1267 Default_detail_levelcxx . . $ Default_detail_level. = *detail_levelcxx . . $ details_menu#detail_level.;
1268 Databasecxx . . $ Database.->writecxx . . $ oeAppDatabase#write(2551bed5d6fc04f6).("PredefDetailSetting", Default_detail_levelcxx . . $ Default_detail_level.);
1269
1270 sheetcxx . . $ details_menu#sheet. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
1271 };
1272
1273 // process output and do stuff accordintly
1274 void processcxx . . $ details_menu#process(d4f767463ce0a6b3).(int res) {
1275 bool changed;
1276
1277 // check here if the detail level currently set should be custom
1278 changed = sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(specmapcxx . . $ details_menu#specmap.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(headlightcxx . . $ details_menu#headlight.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(mirrorcxx . . $ details_menu#mirror.) ||
1279 sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(dynamiccxx . . $ details_menu#dynamic.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(fogcxx . . $ details_menu#fog.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(coronascxx . . $ details_menu#coronas.) ||
1280 sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(proceduralscxx . . $ details_menu#procedurals.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(powerup_halocxx . . $ details_menu#powerup_halo.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(scorchescxx . . $ details_menu#scorches.) ||
1281 sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(78ac5d2f3d401626).(weapon_coronascxx . . $ details_menu#weapon_coronas.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(18a3c31ed0aa5760).(objcompcxx . . $ details_menu#objcomp.) || sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(2c92555bf46fdf74).(pixel_errcxx . . $ details_menu#pixel_err.) ||
1282 sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(2c92555bf46fdf74).(rend_distcxx . . $ details_menu#rend_dist.);
1283
1284 if (changed) {
1285 // enable custom radio button
1286 *detail_levelcxx . . $ details_menu#detail_level. = DETAIL_LEVEL_CUSTOMcxx . . $ `Descent3/config.h:183:9`!;
1287 } else {
1288 // check if any preset detail has been selected.
1289 if (sheetcxx . . $ details_menu#sheet.->HasChangedcxx . . $ newuiSheet#HasChanged(18a3c31ed0aa5760).(detail_levelcxx . . $ details_menu#detail_level.)) {
1290 set_preset_detailscxx . . $ details_menu#set_preset_details(d4f767463ce0a6b3).(*detail_levelcxx . . $ details_menu#detail_level.);
1291 }
1292 }
1293 };
1294
1295 // sets detail presets
1296 void set_preset_detailscxx . . $ details_menu#set_preset_details(d4f767463ce0a6b3).(int setting);
1297 };
1298
1299 // sets detail presets
1300 void details_menucxx . . $ details_menu#::set_preset_detailscxx . . $ details_menu#set_preset_details(d4f767463ce0a6b3).(int setting) {
1301 tDetailSettingscxx . . $ tDetailSettings# ds;
1302
1303 switch (setting) {
1304 case DETAIL_LEVEL_LOWcxx . . $ `Descent3/config.h:179:9`!:
1305 memcpy(&ds, &DetailPresetLowcxx . . $ DetailPresetLow., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
1306 break;
1307 case DETAIL_LEVEL_MEDcxx . . $ `Descent3/config.h:180:9`!:
1308 memcpy(&ds, &DetailPresetMedcxx . . $ DetailPresetMed., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
1309 break;
1310 case DETAIL_LEVEL_HIGHcxx . . $ `Descent3/config.h:181:9`!:
1311 memcpy(&ds, &DetailPresetHighcxx . . $ DetailPresetHigh., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
1312 break;
1313 case DETAIL_LEVEL_VERY_HIGHcxx . . $ `Descent3/config.h:182:9`!:
1314 memcpy(&ds, &DetailPresetVHicxx . . $ DetailPresetVHi., sizeof(tDetailSettingscxx . . $ tDetailSettings#));
1315 break;
1316 default:
1317 return;
1318 };
1319
1320 // now go through all the config items and set to the new values
1321 int iTemp;
1322
1323 iTemp = MAXIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:424:9`! - ds.Pixel_errorcxx . . $ tDetailSettings#Pixel_error. - MINIMUM_TERRAIN_DETAILcxx . . $ `Descent3/config.cpp:423:9`!;
1324 if (iTemp < 0)
1325 iTemp = 0;
1326 *pixel_errcxx . . $ details_menu#pixel_err. = (int16_tcxx . . $ int16_t#)(iTemp);
1327 iTemp = (int)((ds.Terrain_render_distancecxx . . $ tDetailSettings#Terrain_render_distance. / ((float)TERRAIN_SIZEcxx . . $ `Descent3/terrain.h:33:9`!)) - MINIMUM_RENDER_DISTcxx . . $ `Descent3/config.cpp:425:9`!);
1328 if (iTemp < 0)
1329 iTemp = 0;
1330 iTemp = iTemp / 2;
1331 *rend_distcxx . . $ details_menu#rend_dist. = (int16_tcxx . . $ int16_t#)(iTemp);
1332 *objcompcxx . . $ details_menu#objcomp. = ds.Object_complexitycxx . . $ tDetailSettings#Object_complexity.;
1333 *specmapcxx . . $ details_menu#specmap. = ds.Specular_lightingcxx . . $ tDetailSettings#Specular_lighting.;
1334 *headlightcxx . . $ details_menu#headlight. = ds.Fast_headlight_oncxx . . $ tDetailSettings#Fast_headlight_on.;
1335 *mirrorcxx . . $ details_menu#mirror. = ds.Mirrored_surfacescxx . . $ tDetailSettings#Mirrored_surfaces.;
1336 *dynamiccxx . . $ details_menu#dynamic. = ds.Dynamic_lightingcxx . . $ tDetailSettings#Dynamic_lighting.;
1337 *fogcxx . . $ details_menu#fog. = ds.Fog_enabledcxx . . $ tDetailSettings#Fog_enabled.;
1338 *coronascxx . . $ details_menu#coronas. = ds.Coronas_enabledcxx . . $ tDetailSettings#Coronas_enabled.;
1339 *proceduralscxx . . $ details_menu#procedurals. = ds.Procedurals_enabledcxx . . $ tDetailSettings#Procedurals_enabled.;
1340 *powerup_halocxx . . $ details_menu#powerup_halo. = ds.Powerup_haloscxx . . $ tDetailSettings#Powerup_halos.;
1341 *scorchescxx . . $ details_menu#scorches. = ds.Scorches_enabledcxx . . $ tDetailSettings#Scorches_enabled.;
1342 *weapon_coronascxx . . $ details_menu#weapon_coronas. = ds.Weapon_coronas_enabledcxx . . $ tDetailSettings#Weapon_coronas_enabled.;
1343 }
1344
1345 //////////////////////////////////////////////////////////////////
1346 // new Gamma menu
1347 //
1348
1349 //////////////////////////////////////////////////////////////////
1350 // new Options menu
1351 //
1352
1353 #include "init.h"cxx . . $ `<file>/Descent3/init.h`/
1354
1355 void OptionsMenucxx . . $ OptionsMenu(49f6e7a06ebc5aa8).() {
1356 newuiMenucxx . . $ newuiMenu# menucxx . . $ newuiMenu#newuiMenu(49f6e7a06ebc5aa8).;
1357 video_menucxx . . $ video_menu# video;
1358 details_menucxx . . $ details_menu# details;
1359 sound_menucxx . . $ sound_menu# sound;
1360 toggles_menucxx . . $ toggles_menu# toggles;
1361 hud_menucxx . . $ hud_menu# hud;
1362
1363 int res = -1, state = 0; // state = 0, options menu, 1 = controller config, 2 = quitting.
1364
1365 while (state != 2) {
1366 if (state == 1) {
1367 // enter controller config menu
1368 mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "CONTROLLER CONFIG MENU HERE!\n");
1369 CtlConfigcxx . . $ CtlConfig(d4f767463ce0a6b3).(CTLCONFIG_KEYBOARDcxx . . $ `Descent3/ctlconfig.h:58:9`!);
1370 state = 0; // goto options menu.
1371 } else {
1372 // open menu
1373
1374 DoWaitMessagecxx . . $ DoWaitMessage(ee90985596e8b4f9).(true);
1375
1376 menu.Createcxx . . $ newuiMenu#Create(49f6e7a06ebc5aa8).();
1377 menu.Opencxx . . $ UIWindow#Open(49f6e7a06ebc5aa8).();
1378
1379 video.setupcxx . . $ video_menu#setup(58668faa82d4e94e).(&menu); // setup video menu IDV_VCONFIG
1380 details.setupcxx . . $ details_menu#setup(58668faa82d4e94e).(&menu); // setup details menu. IDV_DCONFIG
1381 sound.setupcxx . . $ sound_menu#setup(58668faa82d4e94e).(&menu); // setup sound menu. IDV_SCONFIG
1382 toggles.setupcxx . . $ toggles_menu#setup(58668faa82d4e94e).(&menu); // setup general menu. IDV_GCONFIG
1383 hud.setupcxx . . $ hud_menu#setup(58668faa82d4e94e).(&menu); // setup hud menu. IDV_HCONFIG
1384
1385 menu.AddSimpleOptioncxx . . $ newuiMenu#AddSimpleOption(6ed0a7151bf51ed1).(IDV_CCONFIGcxx . . $ `Descent3/config.cpp:343:9`!, TXT_OPTCONFIGcxx . . $ `Descent3/stringtable.h:748:9`!);
1386 menu.AddSimpleOptioncxx . . $ newuiMenu#AddSimpleOption(6ed0a7151bf51ed1).(UID_CANCELcxx . . $ `ui/ui.h:369:9`!, TXT_DONEcxx . . $ `Descent3/stringtable.h:173:9`!);
1387
1388 menu.SetCurrentOptioncxx . . $ newuiMenu#SetCurrentOption(68e3ae50fe6578a9).(IDV_VCONFIGcxx . . $ `Descent3/config.cpp:338:9`!);
1389
1390 DoWaitMessagecxx . . $ DoWaitMessage(ee90985596e8b4f9).(false);
1391
1392 // run menu
1393 do {
1394 res = menu.DoUIcxx . . $ newuiMenu#DoUI(b126dc7c1de90089).();
1395
1396 // immediate checking of any option ids.
1397 if (res == UID_CANCELcxx . . $ `ui/ui.h:369:9`! || res == NEWUIRES_FORCEQUITcxx . . $ `Descent3/newui_core.h:131:9`!) {
1398 state = 2;
1399 break; // next pass will quit
1400 } else if (res == IDV_CCONFIGcxx . . $ `Descent3/config.cpp:343:9`!) {
1401 state = 1;
1402 break; // next pass will enter controller menu
1403 }
1404
1405 // handle any processing needed by current option.
1406 switch (menu.GetCurrentOptioncxx . . $ newuiMenu#GetCurrentOption(524863554b4a534e).()) {
1407 case IDV_DCONFIGcxx . . $ `Descent3/config.cpp:341:9`!:
1408 details.processcxx . . $ details_menu#process(d4f767463ce0a6b3).(res);
1409 break;
1410 case IDV_SCONFIGcxx . . $ `Descent3/config.cpp:340:9`!:
1411 sound.processcxx . . $ sound_menu#process(d4f767463ce0a6b3).(res);
1412 break;
1413 case IDV_VCONFIGcxx . . $ `Descent3/config.cpp:338:9`!:
1414 video.processcxx . . $ video_menu#process(d4f767463ce0a6b3).(res);
1415 break;
1416 case IDV_GCONFIGcxx . . $ `Descent3/config.cpp:339:9`!:
1417 toggles.processcxx . . $ toggles_menu#process(d4f767463ce0a6b3).(res);
1418 break;
1419 }
1420 } while (1);
1421
1422 // get settings
1423 hud.finishcxx . . $ hud_menu#finish(49f6e7a06ebc5aa8).();
1424 toggles.finishcxx . . $ toggles_menu#finish(49f6e7a06ebc5aa8).();
1425 sound.finishcxx . . $ sound_menu#finish(49f6e7a06ebc5aa8).();
1426 details.finishcxx . . $ details_menu#finish(49f6e7a06ebc5aa8).();
1427 video.finishcxx . . $ video_menu#finish(49f6e7a06ebc5aa8).();
1428
1429 // write them out and close.
1430 PltWriteFilecxx . . $ PltWriteFile(98d330f13870b5ba).(&Current_pilotcxx . . $ Current_pilot.);
1431
1432 menu.Closecxx . . $ UIWindow#Close(49f6e7a06ebc5aa8).();
1433 menu.Destroycxx . . $ UIWindow#Destroy(49f6e7a06ebc5aa8).();
1434 }
1435 }
1436
1437 SaveGameSettingscxx . . $ SaveGameSettings(49f6e7a06ebc5aa8).();
1438 }