Debian Codegraph @

Descent3/screens.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/screens.cpp $
21 * $Revision: 52 $
22 * $Date: 10/21/99 9:29p $
23 * $Author: Jeff $
24 *
25 *
26 *
27 * $Log: /DescentIII/main/screens.cpp $
28 *
29 * 52 10/21/99 9:29p Jeff
30 * B.A. Macintosh code merge
31 *
32 * 51 5/24/99 4:16a Jeff
33 * fixed screenshot bug for multiplayer
34 *
35 * 50 5/23/99 7:22p Samir
36 * flush keyboard and mouse when entering screen!
37 *
38 * 49 5/23/99 3:53a Samir
39 * fixed printscreen.
40 *
41 * 47 5/20/99 6:14p Kevin
42 * fixed mouse button to close PLR
43 *
44 * 46 5/11/99 6:33p Kevin
45 * fixed problem with sound being played as 3d and view position not being
46 * equal to the player position! Doh
47 *
48 * 45 5/07/99 5:38p Jeff
49 * use new multiplayer plr screen
50 *
51 * 44 5/07/99 2:51p Jason
52 * fixed a bunch of endlevel multiplayer issues
53 *
54 * 43 5/05/99 7:46p Kevin
55 * Fixed some post level results things
56 *
57 * 42 5/02/99 5:30p Kevin
58 * fixed shield and energy ratings.
59 *
60 * 41 4/30/99 3:03p Kevin
61 * improved times restored count
62 *
63 * 40 4/26/99 11:34a Samir
64 * wrap startframe and endframe around plrresults UI callback.
65 *
66 * 39 4/23/99 1:56a Matt
67 * Added system for counting kills of friendly objects
68 *
69 * 38 4/21/99 4:49p Kevin
70 *
71 * 37 4/20/99 8:58p Jeff
72 * included joystick.h so it compiles in Linux
73 *
74 * 36 4/20/99 2:34p Kevin
75 * multiplayer post level results will automatically go to the next level
76 * after 30 seconds so the client doesn't timeout in the reliable code.
77 * This number should never be higher than the timeout for the reliable
78 * networking code in networking.cpp (currently 2 minutes)
79 *
80 * 35 4/20/99 2:00p Kevin
81 * Improved post level results screens
82 *
83 * 34 4/20/99 12:45a Matt
84 * Use briefing font instead of HUD font for post-level results screen.
85 *
86 * 33 4/18/99 2:48p Kevin
87 * lock PLR at 30 fps
88 *
89 * 32 4/14/99 3:57a Jeff
90 * fixed case mismatch in #includes
91 *
92 * 31 4/07/99 12:41p Kevin
93 * New strings
94 *
95 * 30 4/07/99 12:31p Matt
96 * Added code for failed missions.
97 *
98 * 29 4/07/99 11:31a Kevin
99 * Added success/failure to Post level results
100 *
101 * 28 4/06/99 6:02p Matt
102 * Added score system
103 *
104 * 27 3/28/99 4:11p Kevin
105 * Fixed compiler warning
106 *
107 * 26 3/23/99 5:04p Kevin
108 * Post level results stuff.
109 *
110 * 25 3/23/99 12:33p Kevin
111 * More post level results improvements
112 *
113 * 24 3/22/99 7:02p Kevin
114 * New post level results screens.... not done.
115 *
116 * 23 3/09/99 6:36p Samir
117 * space bar to quit
118 *
119 * 22 2/15/99 9:17p Jeff
120 * table parse for plr screens
121 *
122 * 21 1/08/99 2:56p Samir
123 * Ripped out OSIRIS1.
124 *
125 * 20 10/22/98 10:50a Samir
126 * only register kill for robots so accuracy rating can be closer.
127 *
128 * 19 10/18/98 12:15p Jeff
129 * set multi_bail_ui_menu to false when starting PLR screen, else it bails
130 * immediatly
131 *
132 * 18 10/17/98 7:26p Samir
133 * destroy window after closing.
134 *
135 * 17 10/14/98 1:02p Jason
136 * fixed FindSoundName issues
137 *
138 * 16 10/07/98 12:08p Samir
139 * took out buttons.
140 *
141 * 15 10/02/98 5:46p Samir
142 * took out mission file objective text and replaced with level goals.
143 *
144 * 14 9/15/98 5:44p Jason
145 * more work on dedicated server
146 *
147 * 13 9/15/98 4:31p Jason
148 * added more functionality for the dedicated server
149 *
150 * 12 6/17/98 3:27p Jeff
151 * Changes made for localization
152 *
153 * 11 6/16/98 10:54a Jeff
154 *
155 * 10 6/11/98 1:56p Jeff
156 * use d3m files instead of dll
157 *
158 * 9 6/10/98 2:08p Samir
159 * multiplayer screens loaded.
160 *
161 * 8 5/25/98 8:19p Samir
162 * Added E3 speed demo to pass through screens.
163 *
164 * 7 5/15/98 2:22p Jeff
165 * Sets default colors for Post level results screen
166 *
167 * 6 5/14/98 5:27p Jason
168 * fixed some more sequencing bugs
169 *
170 * 5 5/14/98 3:18p Jason
171 * finished multiplayer sequencing issues
172 *
173 * 4 5/11/98 7:45p Samir
174 * hopefully fixed some flash in bugs.
175 *
176 * 3 4/18/98 7:18a Samir
177 * added level objectives text to result screen.
178 *
179 * 2 4/18/98 2:08a Samir
180 * update.
181 *
182 * 1 4/14/98 8:18p Samir
183 * initial revision.
184 *
185 * $NoKeywords: $
186 */
187
188 #include "screens.h"cxx . . $ `<file>/Descent3/screens.h`/
189 #include "newui.h"cxx . . $ `<file>/Descent3/newui.h`/
190 #include "game.h"cxx . . $ `<file>/Descent3/game.h`/
191 #include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/
192 #include "descent.h"cxx . . $ `<file>/Descent3/descent.h`/
193 #include "application.h"cxx . . $ `<file>/lib/application.h`/
194 #include "gamefont.h"cxx . . $ `<file>/Descent3/gamefont.h`/
195 #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/
196 #include "soundload.h"cxx . . $ `<file>/sndlib/soundload.h`/
197 #include "player.h"cxx . . $ `<file>/Descent3/player.h`/
198 #include "Mission.h"cxx . . $ `<file>/Descent3/Mission.h`/
199 #include "game2dll.h"cxx . . $ `<file>/lib/game2dll.h`/
200 #include "stringtable.h"cxx . . $ `<file>/Descent3/stringtable.h`/
201 #include "dedicated_server.h"cxx . . $ `<file>/lib/dedicated_server.h`/
202 #include "levelgoal.h"cxx . . $ `<file>/Descent3/levelgoal.h`/
203 #include "sounds.h"cxx . . $ `<file>/Descent3/sounds.h`/
204 #include "pilot.h"cxx . . $ `<file>/Descent3/pilot.h`/
205 #include "joystick.h"cxx . . $ `<file>/lib/joystick.h`/
206
207 #define LVLRES_FADEIN_TIMEcxx . . $ `Descent3/screens.cpp:207:9`! 0.50f
208 #define TEXT_REDRAW_COUNTcxx . . $ `Descent3/screens.cpp:208:9`! 6.0f
209 #define LVLRES_STATScxx . . $ `Descent3/screens.cpp:209:9`! 7
210
211 /*
212 $$TABLE_GAMEFILE "mplvlr1.ogf"
213 $$TABLE_GAMEFILE "lvlres0.ogf"
214 $$TABLE_GAMEFILE "mplvlr2.ogf"
215 $$TABLE_GAMEFILE "lvlres1.ogf"
216 $$TABLE_GAMEFILE "mplvlr3.ogf"
217 $$TABLE_GAMEFILE "lvlres2.ogf"
218 */
219 #define BACKGROUND_VIScxx . . $ `Descent3/screens.cpp:219:9`! 0
220 #define OVERLAY_VIScxx . . $ `Descent3/screens.cpp:220:9`! 1
221
222 static int Stat_ratingscxx . . $ Stat_ratings.[] = {TXI_SCRNNONEcxx . . $ `Descent3/stringtable.h:197:9`!, TXI_SCRNFEEBLEcxx . . $ `Descent3/stringtable.h:198:9`!, TXI_SCRNPOORcxx . . $ `Descent3/stringtable.h:199:9`!, TXI_SCRNAVGcxx . . $ `Descent3/stringtable.h:200:9`!,
223 TXI_SCRNGOODcxx . . $ `Descent3/stringtable.h:201:9`!, TXI_SCRNEXCELLENTcxx . . $ `Descent3/stringtable.h:202:9`!, TXI_SCRNSUPREMEcxx . . $ `Descent3/stringtable.h:203:9`!};
224
225 static structcxx . . $ $anonymous_type_ea669b0da7c465b0_0# {
226 int statecxx . . $ $anonymous_type_ea669b0da7c465b0_0#state.;
227 float state_timecxx . . $ $anonymous_type_ea669b0da7c465b0_0#state_time., this_frame_timecxx . . $ $anonymous_type_ea669b0da7c465b0_0#this_frame_time., last_frame_timecxx . . $ $anonymous_type_ea669b0da7c465b0_0#last_frame_time.;
228
229 tLargeBitmapcxx . . $ tLargeBitmap# first_backcxx . . $ $anonymous_type_ea669b0da7c465b0_0#first_back.;
230 tLargeBitmapcxx . . $ tLargeBitmap# glow_backcxx . . $ $anonymous_type_ea669b0da7c465b0_0#glow_back.;
231 tLargeBitmapcxx . . $ tLargeBitmap# shade_backcxx . . $ $anonymous_type_ea669b0da7c465b0_0#shade_back.;
232
233 structcxx . . $ $anonymous_type_ea669b0da7c465b0_0#$anonymous_type_1# {
234 tLargeBitmapcxx . . $ tLargeBitmap# *bmpcxx . . $ $anonymous_type_ea669b0da7c465b0_0#$anonymous_type_1#bmp.;
235 } vis_listcxx . . $ $anonymous_type_ea669b0da7c465b0_0#vis_list.[2];
236
237 int16_tcxx . . $ int16_t# time_mincxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_min., time_seccxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_sec.;
238 float shield_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#shield_rating., energy_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#energy_rating.;
239 float accuracy_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#accuracy_rating.;
240 } PLRcxx . . $ PLR.;
241
242 void PLResultsFramecxx . . $ PLResultsFrame(49f6e7a06ebc5aa8).();
243 void PLResultsTextcxx . . $ PLResultsText(9364e6e7bff7660).(float draw_mag);
244 void PLResultsVisFramecxx . . $ PLResultsVisFrame(49f6e7a06ebc5aa8).();
245 const char *GetNormalizedRatingcxx . . $ GetNormalizedRating(928e2d948eb79d9e).(float mag);
246 void PaintPLRSinglePlayerTextcxx . . $ PaintPLRSinglePlayerText(49f6e7a06ebc5aa8).();
247 void SinglePlayerPostLevelResultscxx . . $ SinglePlayerPostLevelResults(49f6e7a06ebc5aa8).();
248
249 static tLargeBitmapcxx . . $ tLargeBitmap# level_bmpcxx . . $ level_bmp.;
250 bool background_loadedcxx . . $ background_loaded. = false;
251 bool PLR_successcxx . . $ PLR_success. = true;
252
253 void PLResultsFramecxx . . $ PLResultsFrame(49f6e7a06ebc5aa8).() {
254 StartFramecxx . . $ StartFrame(3285c9bef785d51c).(0, 0, Max_window_wcxx . . $ Max_window_w., Max_window_hcxx . . $ Max_window_h.);
255 Sound_systemcxx . . $ Sound_system..BeginSoundFramecxx . . $ hlsSystem#BeginSoundFrame(b45ddcbc8423892c).(false);
256 // Right now we don't want you to do anything
257 if (background_loadedcxx . . $ background_loaded.)
258 DrawLargeBitmapcxx . . $ DrawLargeBitmap(a00f4917c93a8455).(&level_bmpcxx . . $ level_bmp., 0, 0, 1.0f);
259 // Call the DLL so it can do it's thing
260 if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) {
261 CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_CLIENT_GAMEPOSTLEVELRESULTScxx . . $ `lib/d3events.h:109:9`!, &DLLInfocxx . . $ DLLInfo.);
262 } else {
263 // Draw the text here
264 PaintPLRSinglePlayerTextcxx . . $ PaintPLRSinglePlayerText(49f6e7a06ebc5aa8).();
265 }
266 grtext_Flushcxx . . $ grtext_Flush(49f6e7a06ebc5aa8).();
267 Sound_systemcxx . . $ Sound_system..EndSoundFramecxx . . $ hlsSystem#EndSoundFrame(49f6e7a06ebc5aa8).();
268 EndFramecxx . . $ EndFrame(49f6e7a06ebc5aa8).();
269 }
270
271 float paint_startcxx . . $ paint_start. = 0.0f;
272 #define MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`! 20
273 bool val_printedcxx . . $ val_printed.[MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!];
274
275 int paint_in_sound_idcxx . . $ paint_in_sound_id. = -1;
276 int paint_in_sound_handlecxx . . $ paint_in_sound_handle. = -1;
277 int chunk_sound_idcxx . . $ chunk_sound_id. = -1;
278
279 #define MAX_PLR_FPS_TIMEcxx . . $ `Descent3/screens.cpp:279:9`! .033
280 extern void DoScreenshotcxx . . $ DoScreenshot(49f6e7a06ebc5aa8).();
281 bool PostLevelResultscxx . . $ PostLevelResults(efaadfb7dc14930a).(bool success) {
282 PLR_successcxx . . $ PLR_success. = success;
283
284 if (Dedicated_servercxx . . $ Dedicated_server.)
285 return true;
286
287 paint_in_sound_idcxx . . $ paint_in_sound_id. = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("PPR paint in");
288 chunk_sound_idcxx . . $ chunk_sound_id. = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("PPR chunk");
289
290 float timelast = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
291
292 int old_mode = GetScreenModecxx . . $ GetScreenMode(b126dc7c1de90089).();
293 SetScreenModecxx . . $ SetScreenMode(918ebd27a9ddbad3).(SM_MENUcxx . . $ SM_MENU.);
294 SetUICallbackcxx . . $ SetUICallback(964b12a25712bdc3).(PLResultsFramecxx . . $ PLResultsFrame(49f6e7a06ebc5aa8).);
295 ui_HideCursorcxx . . $ ui_HideCursor(c9857a73d68e59ba).();
296 ddio_KeyFlushcxx . . $ ddio_KeyFlush(49f6e7a06ebc5aa8).();
297 ddio_MouseQueueFlushcxx . . $ ddio_MouseQueueFlush(49f6e7a06ebc5aa8).();
298
299 // Do the multiplayer stuff
300 if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) {
301 // Draw the background
302 if (!LoadLargeBitmapcxx . . $ LoadLargeBitmap(df64d18e3909f364).("mplvlr.ogf", &level_bmpcxx . . $ level_bmp.))
303 Errorcxx . . $ Error(326aeb464d16410c).("Unable to load %s.", "mplvlr.ogf");
304 else
305 background_loadedcxx . . $ background_loaded. = true;
306
307 // Play a sound
308 Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(SOUND_LIGHTNINGcxx . . $ `Descent3/sounds.h:130:9`!);
309
310 float start_time = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
311 float time_to_wait;
312
313 if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
314 time_to_wait = 10;
315 else
316 time_to_wait = 15;
317
318 while ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - start_time) < time_to_wait) {
319 Multi_bail_ui_menucxx . . $ Multi_bail_ui_menu. = 0;
320 Descentcxx . . $ Descent.->defercxx . . $ oeApplication#defer(db52760e79bf9054).();
321 DoUIFramecxx . . $ DoUIFrame(49f6e7a06ebc5aa8).();
322 rend_Flipcxx . . $ rend_Flip(49f6e7a06ebc5aa8).();
323 GetUIFrameResultcxx . . $ GetUIFrameResult(b126dc7c1de90089).();
324 }
325
326 int keypressed = ddio_KeyInKeycxx . . $ ddio_KeyInKey(b126dc7c1de90089).();
327 if (keypressed == KEY_PRINT_SCREENcxx . . $ `ddio/ddio_common.h:322:9`!) {
328 DoScreenshotcxx . . $ DoScreenshot(49f6e7a06ebc5aa8).();
329 }
330 ddio_KeyFlushcxx . . $ ddio_KeyFlush(49f6e7a06ebc5aa8).();
331 } else {
332 // Do the single player stuff
333 if (!background_loadedcxx . . $ background_loaded.) {
334 if (LoadLargeBitmapcxx . . $ LoadLargeBitmap(df64d18e3909f364).("multimain.ogf", &level_bmpcxx . . $ level_bmp.)) {
335 background_loadedcxx . . $ background_loaded. = true;
336 }
337 SinglePlayerPostLevelResultscxx . . $ SinglePlayerPostLevelResults(49f6e7a06ebc5aa8).();
338 float start_time = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
339 float time_to_wait = 2;
340
341 while ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - start_time) < time_to_wait) {
342 while ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - timelast) < MAX_PLR_FPS_TIMEcxx . . $ `Descent3/screens.cpp:279:9`!) {
343 Descentcxx . . $ Descent.->delaycxx . . $ oeApplication#delay(9364e6e7bff7660).(0);
344 }
345 timelast = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
346
347 Descentcxx . . $ Descent.->defercxx . . $ oeApplication#defer(db52760e79bf9054).();
348 DoUIFramecxx . . $ DoUIFrame(49f6e7a06ebc5aa8).();
349 rend_Flipcxx . . $ rend_Flip(49f6e7a06ebc5aa8).();
350 GetUIFrameResultcxx . . $ GetUIFrameResult(b126dc7c1de90089).();
351 }
352 }
353 }
354
355 bool rval = true;
356 float max_wait_time = 10;
357 float start_time = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
358 // Wait for input and move on
359 while (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
360 if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) {
361 if ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - start_time) > max_wait_time) {
362 break;
363 }
364 }
365 while ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - timelast) < MAX_PLR_FPS_TIMEcxx . . $ `Descent3/screens.cpp:279:9`!) {
366 Descentcxx . . $ Descent.->delaycxx . . $ oeApplication#delay(9364e6e7bff7660).(0);
367 }
368 timelast = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
369
370 Multi_bail_ui_menucxx . . $ Multi_bail_ui_menu. = 0;
371 Descentcxx . . $ Descent.->defercxx . . $ oeApplication#defer(db52760e79bf9054).();
372 int x, y, dx, dy;
373 if (ddio_MouseGetStatecxx . . $ ddio_MouseGetState(150f8a26046a094b).(&x, &y, &dx, &dy)) {
374 rval = true;
375 break;
376 }
377
378 DoUIFramecxx . . $ DoUIFrame(49f6e7a06ebc5aa8).();
379 rend_Flipcxx . . $ rend_Flip(49f6e7a06ebc5aa8).();
380 GetUIFrameResultcxx . . $ GetUIFrameResult(b126dc7c1de90089).();
381
382 int key = ddio_KeyInKeycxx . . $ ddio_KeyInKey(b126dc7c1de90089).();
383
384 tJoyPoscxx . . $ tJoyPos# jp;
385 joy_GetPoscxx . . $ joy_GetPos(47f0a1b684eacd68).((tJoystickcxx . . $ tJoystick#)JOYSTICK_1cxx . . $ `lib/joystick.h:99:9`!, &jp);
386 if (jp.buttonscxx . . $ tJoyPos#buttons.) {
387 rval = true;
388 break;
389 }
390
391 if ((key == KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!) || (key == KEY_SPACEBARcxx . . $ `ddio/ddio_common.h:271:9`!)) {
392 rval = true;
393 break;
394 } else if (key == KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!) {
395 rval = false;
396 break;
397 } else if (key == KEY_PRINT_SCREENcxx . . $ `ddio/ddio_common.h:322:9`!) {
398 DoScreenshotcxx . . $ DoScreenshot(49f6e7a06ebc5aa8).();
399 }
400 #ifndef RELEASE
401 else if (key == KEY_Rcxx . . $ `ddio/ddio_common.h:246:9`!) {
402 paint_startcxx . . $ paint_start. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
403 for (int a = 0; a < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!; a++) {
404 val_printedcxx . . $ val_printed.[a] = false;
405 }
406 if (paint_in_sound_handlecxx . . $ paint_in_sound_handle. != -1) {
407 Sound_systemcxx . . $ Sound_system..StopSoundImmediatecxx . . $ hlsSystem#StopSoundImmediate(d4f767463ce0a6b3).(paint_in_sound_handlecxx . . $ paint_in_sound_handle.);
408 paint_in_sound_handlecxx . . $ paint_in_sound_handle. = -1;
409 }
410 if (paint_in_sound_idcxx . . $ paint_in_sound_id. != -1) {
411 paint_in_sound_handlecxx . . $ paint_in_sound_handle. = Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(paint_in_sound_idcxx . . $ paint_in_sound_id., &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.]);
412 }
413 }
414 #endif
415 }
416
417 if (background_loadedcxx . . $ background_loaded.)
418 FreeLargeBitmapcxx . . $ FreeLargeBitmap(99797d0c91a30e0c).(&level_bmpcxx . . $ level_bmp.);
419
420 ui_ShowCursorcxx . . $ ui_ShowCursor(c9857a73d68e59ba).();
421 background_loadedcxx . . $ background_loaded. = false;
422 SetScreenModecxx . . $ SetScreenMode(918ebd27a9ddbad3).(old_mode);
423 SetUICallbackcxx . . $ SetUICallback(964b12a25712bdc3).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
424 return rval;
425 }
426
427 #define PLR_COLScxx . . $ `Descent3/screens.cpp:427:9`! 100
428
429 char PLRHeadercxx . . $ PLRHeader.[PLR_COLScxx . . $ `Descent3/screens.cpp:427:9`!];
430 char PLRLevelcxx . . $ PLRLevel.[PLR_COLScxx . . $ `Descent3/screens.cpp:427:9`!];
431
432 char PLRTextcxx . . $ PLRText.[MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!][PLR_COLScxx . . $ `Descent3/screens.cpp:427:9`!];
433 char PLRValcxx . . $ PLRVal.[MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!][PLR_COLScxx . . $ `Descent3/screens.cpp:427:9`!];
434
435 extern int Times_game_restoredcxx . . $ Times_game_restored.;
436
437 void SinglePlayerPostLevelResultscxx . . $ SinglePlayerPostLevelResults(49f6e7a06ebc5aa8).() {
438 const char *difficulty_levels[] = {TXT_TRAINEEcxx . . $ `Descent3/stringtable.h:53:9`!, TXT_ROOKIEcxx . . $ `Descent3/stringtable.h:54:9`!, TXT_HOTSHOTcxx . . $ `Descent3/stringtable.h:55:9`!, TXT_ACEcxx . . $ `Descent3/stringtable.h:56:9`!, TXT_INSANEcxx . . $ `Descent3/stringtable.h:57:9`!};
439
440 // Setup all the text to display
441 // Initialize all the characters
442
443 if (paint_in_sound_idcxx . . $ paint_in_sound_id. != -1) {
444 paint_in_sound_handlecxx . . $ paint_in_sound_handle. = Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(paint_in_sound_idcxx . . $ paint_in_sound_id., (float)1.0);
445 }
446
447 memset(PLRTextcxx . . $ PLRText., 0, sizeof(PLRTextcxx . . $ PLRText.));
448 memset(PLRValcxx . . $ PLRVal., 0, sizeof(PLRValcxx . . $ PLRVal.));
449 for (int a = 0; a < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!; a++) {
450 val_printedcxx . . $ val_printed.[a] = false;
451 }
452 paint_startcxx . . $ paint_start. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
453
454 int curline = 0;
455 int j;
456 PLRcxx . . $ PLR..time_mincxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_min. = (int16_tcxx . . $ int16_t#)Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].time_levelcxx . . $ player#time_level. / 60.0f;
457 PLRcxx . . $ PLR..time_seccxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_sec. = (int16_tcxx . . $ int16_t#)(Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].time_levelcxx . . $ player#time_level. - ((float)PLRcxx . . $ PLR..time_mincxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_min. * 60.0f));
458 PLRcxx . . $ PLR..shield_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#shield_rating. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields.;
459 PLRcxx . . $ PLR..energy_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#energy_rating. = Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].energycxx . . $ player#energy.;
460 if (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_discharges_levelcxx . . $ player#num_discharges_level. > 0)
461 PLRcxx . . $ PLR..accuracy_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#accuracy_rating. = (float)Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_hits_levelcxx . . $ player#num_hits_level. / (float)Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_discharges_levelcxx . . $ player#num_discharges_level.;
462 else
463 PLRcxx . . $ PLR..accuracy_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#accuracy_rating. = 0.5f;
464
465 // strcpy(PLRHeader,PLR_success?"Mission Successfull":"Mission Failed");
466 strcpy(PLRHeadercxx . . $ PLRHeader., PLR_successcxx . . $ PLR_success. ? TXT_PLR_MSN_SUCCESScxx . . $ `Descent3/stringtable.h:798:9`! : TXT_PLR_MSN_FAILEDcxx . . $ `Descent3/stringtable.h:799:9`!);
467
468 snprintf(PLRLevelcxx . . $ PLRLevel., sizeof(PLRLevelcxx . . $ PLRLevel.), "%s", Level_infocxx . . $ Level_info..namecxx . . $ level_info#name.);
469 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLTDIFFICULTcxx . . $ `Descent3/stringtable.h:52:9`!);
470 uint8_tcxx . . $ uint8_t# dif;
471 Current_pilotcxx . . $ Current_pilot..get_difficultycxx . . $ pilot#get_difficulty(f25546b61a629de7).(&dif);
472 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%s", difficulty_levels[dif]);
473 curline++;
474 curline++;
475
476 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_SCOREcxx . . $ `Descent3/stringtable.h:797:9`!);
477 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%d", Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].scorecxx . . $ player#score.);
478 curline++;
479 curline++;
480
481 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLRTIMEcxx . . $ `Descent3/stringtable.h:284:9`!);
482 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%d:%.2d", PLRcxx . . $ PLR..time_mincxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_min., PLRcxx . . $ PLR..time_seccxx . . $ $anonymous_type_ea669b0da7c465b0_0#time_sec.);
483 curline++;
484 curline++;
485
486 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLRENEMIESKILLcxx . . $ `Descent3/stringtable.h:282:9`!);
487 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%d", Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_kills_levelcxx . . $ player#num_kills_level.);
488 curline++;
489 curline++;
490
491 if (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].friendly_kills_levelcxx . . $ player#friendly_kills_level.) {
492 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLRFRIENDSKILLcxx . . $ `Descent3/stringtable.h:837:9`!);
493 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%d", Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].friendly_kills_levelcxx . . $ player#friendly_kills_level.);
494 curline++;
495 curline++;
496 }
497
498 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLRSHIELDcxx . . $ `Descent3/stringtable.h:280:9`!);
499 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%.0f", PLRcxx . . $ PLR..shield_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#shield_rating.);
500 curline++;
501 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLRENERGYcxx . . $ `Descent3/stringtable.h:281:9`!);
502 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%.0f", PLRcxx . . $ PLR..energy_ratingcxx . . $ $anonymous_type_ea669b0da7c465b0_0#energy_rating.);
503 curline++;
504 curline++;
505
506 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_NUMDEATHScxx . . $ `Descent3/stringtable.h:38:9`!);
507 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%d", Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_deaths_levelcxx . . $ player#num_deaths_level.);
508 curline++;
509 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_PLRSAVERESRATcxx . . $ `Descent3/stringtable.h:285:9`!);
510 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%d", Times_game_restoredcxx . . $ Times_game_restored.);
511 curline++;
512 curline++;
513
514 bool has_objectives = false;
515 for (j = 0; (j < Level_goalscxx . . $ Level_goals..GetNumGoalscxx . . $ levelgoals#GetNumGoals(b126dc7c1de90089).()) && (curline < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!); j++) {
516 int goal_status;
517
518 if (Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(j, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, &goal_status)) {
519 if ((goal_status & LGF_ENABLEDcxx . . $ `Descent3/levelgoal_external.h:40:9`!) && (goal_status & LGF_TELCOM_LISTScxx . . $ `Descent3/levelgoal_external.h:42:9`!)) {
520 has_objectives = true;
521 break;
522 }
523 }
524 }
525
526 if (has_objectives) {
527 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), "%s", TXT_OBJECTIVES1cxx . . $ `Descent3/stringtable.h:272:9`!);
528 curline++;
529 curline++;
530 }
531
532 for (j = 0; (j < Level_goalscxx . . $ Level_goals..GetNumGoalscxx . . $ levelgoals#GetNumGoals(b126dc7c1de90089).()) && (curline < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!); j++) {
533 int goal_status;
534
535 if (Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(j, LO_GET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:34:9`!, &goal_status)) {
536 if ((goal_status & LGF_ENABLEDcxx . . $ `Descent3/levelgoal_external.h:40:9`!) && (goal_status & LGF_TELCOM_LISTScxx . . $ `Descent3/levelgoal_external.h:42:9`!))
537 // if(goal_status & LGF_ENABLED)
538 {
539 char txt[64];
540 Level_goalscxx . . $ Level_goals..GoalGetNamecxx . . $ levelgoals#GoalGetName(6836bd73a290bb97).(j, txt, sizeof(txt));
541 if (goal_status & LGF_COMPLETEDcxx . . $ `Descent3/levelgoal_external.h:41:9`!) {
542 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), " %s:", txt);
543 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%s", TXT_COMPLETEDcxx . . $ `Descent3/stringtable.h:88:9`!);
544 } else {
545 snprintf(PLRTextcxx . . $ PLRText.[curline], sizeof(PLRTextcxx . . $ PLRText.[curline]), " %s:", txt);
546 snprintf(PLRValcxx . . $ PLRVal.[curline], sizeof(PLRValcxx . . $ PLRVal.[curline]), "%s", TXT_NOTCOMPLETEDYETcxx . . $ `Descent3/stringtable.h:89:9`!);
547 }
548 curline++;
549 }
550 }
551 }
552 }
553
554 #define PLR_PAINT_TIMEcxx . . $ `Descent3/screens.cpp:554:9`! .8 // Seconds it takes to paint the text across the screen
555 #define PLR_START_VAL_TIMEcxx . . $ `Descent3/screens.cpp:555:9`! 2.0
556 #define PLR_VAL_INTERVALcxx . . $ `Descent3/screens.cpp:556:9`! .20
557
558 int paint_progresscxx . . $ paint_progress. = 0;
559
560 #define PLR_VALUE_TOPcxx . . $ `Descent3/screens.cpp:560:9`! 125
561
562 int line_progresscxx . . $ line_progress.[MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!]; // This is where we currently are
563 char line_replacecxx . . $ line_replace.[MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!]; // The character we replaced with a NULL. Draw this bright
564
565 void PaintPLRSinglePlayerTextcxx . . $ PaintPLRSinglePlayerText(49f6e7a06ebc5aa8).() {
566
567 const int TEXT_HEIGHT = 14;
568 const int LEFT_COL = 50;
569 const int RIGHT_COL = 450;
570 char hi[3] = "\0\0";
571
572 #define PLR_TXT_HEADERcxx . . $ `Descent3/screens.cpp:572:9`! TXT_PLRTITLEcxx . . $ `Descent3/stringtable.h:286:9`!
573 int i;
574
575 // Put everything back where it was...
576 for (i = 0; i < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!; i++) {
577 if (line_replacecxx . . $ line_replace.[i]) {
578 PLRTextcxx . . $ PLRText.[i][line_progresscxx . . $ line_progress.[i]] = line_replacecxx . . $ line_replace.[i];
579 }
580 line_progresscxx . . $ line_progress.[i] = 0;
581 line_replacecxx . . $ line_replace.[i] = 0;
582 }
583
584 paint_progresscxx . . $ paint_progress. = 25 * ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - paint_startcxx . . $ paint_start.) / PLR_PAINT_TIMEcxx . . $ `Descent3/screens.cpp:554:9`!);
585
586 bool all_done_painting = true;
587
588 for (i = 0; i < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!; i++) {
589 int curpos = paint_progresscxx . . $ paint_progress. + (-2 * i);
590 if (curpos < 0)
591 curpos = 0;
592 int tlen = strlen(PLRTextcxx . . $ PLRText.[i]);
593 if (tlen > curpos) {
594 line_progresscxx . . $ line_progress.[i] = curpos;
595 line_replacecxx . . $ line_replace.[i] = PLRTextcxx . . $ PLRText.[i][curpos];
596 PLRTextcxx . . $ PLRText.[i][curpos] = '\0';
597 all_done_painting = false;
598 }
599 }
600
601 if (all_done_painting) {
602 if (paint_in_sound_handlecxx . . $ paint_in_sound_handle. != -1) {
603 mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Stopping paint in sound\n");
604 Sound_systemcxx . . $ Sound_system..StopSoundImmediatecxx . . $ hlsSystem#StopSoundImmediate(d4f767463ce0a6b3).(paint_in_sound_handlecxx . . $ paint_in_sound_handle.);
605 paint_in_sound_handlecxx . . $ paint_in_sound_handle. = -1;
606 }
607 }
608
609 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(255);
610
611 grtext_SetFlagscxx . . $ grtext_SetFlags(d4f767463ce0a6b3).(GRTEXTFLAG_SHADOWcxx . . $ `grtext/grtext.h:120:9`!);
612
613 grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
614 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(BIG_BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:112:9`!);
615 int centerx = (Max_window_wcxx . . $ Max_window_w. / 2) - (grtext_GetTextLineWidthcxx . . $ grtext_GetTextLineWidth(5c4306d8553b3696).(PLR_TXT_HEADERcxx . . $ `Descent3/screens.cpp:572:9`!) / 2);
616 if (centerx < 0)
617 centerx = 0;
618 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(centerx, 30, PLR_TXT_HEADERcxx . . $ `Descent3/screens.cpp:572:9`!);
619
620 grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
621 centerx = (Max_window_wcxx . . $ Max_window_w. / 2) - (grtext_GetTextLineWidthcxx . . $ grtext_GetTextLineWidth(5c4306d8553b3696).(PLRLevelcxx . . $ PLRLevel.) / 2);
622 if (centerx < 0)
623 centerx = 0;
624 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(centerx, 55, PLRLevelcxx . . $ PLRLevel.);
625
626 centerx = (Max_window_wcxx . . $ Max_window_w. / 2) - (grtext_GetTextLineWidthcxx . . $ grtext_GetTextLineWidth(5c4306d8553b3696).(PLRHeadercxx . . $ PLRHeader.) / 2);
627 if (centerx < 0)
628 centerx = 0;
629 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(centerx, 80, PLRHeadercxx . . $ PLRHeader.);
630
631 grtext_SetFontcxx . . $ grtext_SetFont(d4f767463ce0a6b3).(BRIEFING_FONTcxx . . $ `Descent3/gamefont.h:111:9`!);
632 int adjusted_line_no = 0;
633 // depending on where we are paint part or all of the text.
634 for (i = 0; i < MAX_PLR_LINEScxx . . $ `Descent3/screens.cpp:272:9`!; i++) {
635 // This way we paint the values at better interval
636 if (*PLRValcxx . . $ PLRVal.[i])
637 adjusted_line_no++;
638
639 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(255);
640 grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
641 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(LEFT_COL, (TEXT_HEIGHT * i) + PLR_VALUE_TOPcxx . . $ `Descent3/screens.cpp:560:9`!, PLRTextcxx . . $ PLRText.[i]);
642 if (line_replacecxx . . $ line_replace.[i] && (line_progresscxx . . $ line_progress.[i] > 0)) {
643 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(64);
644 hi[0] = line_replacecxx . . $ line_replace.[i];
645 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(LEFT_COL + grtext_GetTextLineWidthcxx . . $ grtext_GetTextLineWidth(5c4306d8553b3696).(PLRTextcxx . . $ PLRText.[i]), (TEXT_HEIGHT * i) + PLR_VALUE_TOPcxx . . $ `Descent3/screens.cpp:560:9`!, hi);
646 }
647 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(255);
648 float now = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!();
649 if ((now - paint_startcxx . . $ paint_start.) > (PLR_START_VAL_TIMEcxx . . $ `Descent3/screens.cpp:555:9`! + (adjusted_line_no * PLR_VAL_INTERVALcxx . . $ `Descent3/screens.cpp:556:9`!))) {
650 if (!val_printedcxx . . $ val_printed.[i]) {
651 if ((chunk_sound_idcxx . . $ chunk_sound_id. != -1) && (*PLRValcxx . . $ PLRVal.[i]))
652 Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(chunk_sound_idcxx . . $ chunk_sound_id., (float)1.0);
653 }
654 val_printedcxx . . $ val_printed.[i] = true;
655 grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
656 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(RIGHT_COL, (TEXT_HEIGHT * i) + PLR_VALUE_TOPcxx . . $ `Descent3/screens.cpp:560:9`!, PLRValcxx . . $ PLRVal.[i]);
657 }
658 }
659
660 grtext_SetAlphacxx . . $ grtext_SetAlpha(ac50b47256ae7414).(255);
661 grtext_SetColorcxx . . $ grtext_SetColor(cb2f890c2fdad230).(UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
662 centerx = (Max_window_wcxx . . $ Max_window_w. / 2) - (grtext_GetTextLineWidthcxx . . $ grtext_GetTextLineWidth(5c4306d8553b3696).(TXT_HITAKEYORBUTTONcxx . . $ `Descent3/stringtable.h:834:9`!) / 2);
663 if (centerx < 0)
664 centerx = 0;
665 grtext_Printfcxx . . $ grtext_Printf(9514e36549094170).(centerx, Max_window_hcxx . . $ Max_window_h. - (TEXT_HEIGHT * 1.2), TXT_HITAKEYORBUTTONcxx . . $ `Descent3/stringtable.h:834:9`!);
666 }
667
668 /*
669
670 const char *GetNormalizedRating(float mag)
671 {
672 int rating;
673
674 // determine rating.
675 rating = (int)(mag*5.0f);
676
677 if (rating < 0)
678 rating = 0;
679 else if (rating >= LVLRES_STATS)
680 rating = LVLRES_STATS-1;
681
682 return TXT(Stat_ratings[rating]);
683 }
684
685 */