Debian Codegraph @

netgames/dmfc/dmfcbase.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/dmfc/dmfcbase.cpp $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003/08/26 03:57:20 $
23 * $Author: kevinb $
24 *
25 * Base functions for DMFC implementation
26 *
27 * $Log: dmfcbase.cpp,v $
28 * Revision 1.1.1.1 2003/08/26 03:57:20 kevinb
29 * initial 1.5 import
30 *
31 *
32 * 170 9/28/01 2:09p Matt
33 * Don't show ping/loss info on HUD if peer-to-peer game.
34 *
35 * 169 9/07/01 8:57a Matt
36 * Fixed hud name bug from previous change.
37 *
38 * 168 9/05/01 6:04p Matt
39 * Added code to save the user's preferred HUD name level setting even if
40 * the server bashes it down.
41 *
42 * 167 10/26/99 10:31a Jeff
43 * fixed COM interface bug
44 *
45 * 166 10/21/99 9:27p Jeff
46 * B.A. Macintosh code merge
47 *
48 * 165 8/21/99 12:33a Jeff
49 * Changed the name of the GetRealGametime function to
50 * GetRealGametimePacket since it was confusing some compilers with the
51 * other GetRealGametime function.
52 *
53 * 164 8/15/99 4:36p Jeff
54 * finished exporting all inventory class functions. export object_info
55 * array. added check for -nooutragelogo to display Outrage logo display.
56 *
57 * 163 8/11/99 6:36p Jeff
58 * don't set input command list root to NULL when creating input commands
59 * (it would create a memleak and ignore any ICs added by a custom mod)
60 *
61 * 162 8/11/99 1:21p Jeff
62 * exported needed functions for camera windows
63 *
64 * 161 7/30/99 11:59a Jeff
65 * fixed bug with autobalance being turned off
66 *
67 * 160 7/14/99 11:47a Jeff
68 * localized text for patch fixes
69 *
70 * 159 7/13/99 10:05a Jeff
71 * text taunt token decoding
72 *
73 * 158 7/11/99 3:31p Jeff
74 * exported game arguments, made command line option to specify
75 * autoexec.dmfc
76 *
77 * 157 7/09/99 7:02p Jeff
78 * put in countdown timer for when a level is about to end
79 *
80 * 156 7/09/99 6:17p Jeff
81 * added $remoteadminlogout and $wait commands
82 *
83 * 155 7/09/99 2:53p Jeff
84 * handle gametime better (pause it when needed) if the server is 'waiting
85 * for players'
86 *
87 * 154 7/08/99 6:25p Jeff
88 * remote admin in and working
89 *
90 * 153 7/08/99 2:39a Jeff
91 * rough implementation of remote administration checked in. Still needs
92 * some polishing, but should work basically.
93 *
94 * 152 7/07/99 5:00p Jeff
95 * removed vararg functions from interface functions, just made different
96 * versions of them
97 *
98 * 151 6/11/99 5:36p Jeff
99 * removed ai_info #ifdefs (better way of doing it)
100 *
101 * 150 6/10/99 12:34p Jeff
102 * GetCounterMeasureOwner doesn't use ->ai_info for non-Outrage versions
103 *
104 * 149 6/10/99 11:10a Jeff
105 * don't display the Outrage logo for non-Outrage games
106 *
107 * 148 5/22/99 1:12a Jeff
108 * correctly handle Viewer_object
109 *
110 * 147 5/20/99 5:32p Jeff
111 * called PlayerStopSounds if respawning a player
112 *
113 * 146 5/20/99 3:51p Jeff
114 * for apply damage to player, server says should be 1 (so it works in
115 * peer-peer)
116 *
117 * 145 5/13/99 4:55p Ardussi
118 * changes for compiling on the Mac
119 *
120 * 144 5/12/99 11:04p Jeff
121 * dmfc and multiplayer games now have endian friendly packets (*whew*)
122 *
123 * 143 5/10/99 2:43a Jeff
124 * handle new scheme of player's joining in a team game, where the team is
125 * set before player enters game in the main code, but the team is
126 * determined via event call to dmfc
127 *
128 * 142 5/09/99 6:20a Jeff
129 * improved Entropy (added sounds, max virii per room). Fixed rendering
130 * bugs for other multiplayer dlls.
131 *
132 * 141 5/08/99 11:06a Jeff
133 *
134 * 140 5/07/99 4:34p Jason
135 * fixed audio taunt icon
136 *
137 * 139 5/07/99 12:52p Jeff
138 * audio taunt icon is ppic if available. coop has hard max team set of 4
139 *
140 * 138 5/04/99 8:46p Jeff
141 * display icon when someone plays an audio taunt
142 *
143 * 137 5/03/99 8:39a Jeff
144 * fixed apply damage to player
145 *
146 * 136 4/30/99 10:52p Jeff
147 * added $warp command
148 *
149 * 135 4/30/99 7:36p Jeff
150 * exported vis_effects to dmfc
151 *
152 * 134 4/27/99 1:56p Jeff
153 * audio taunts stuff in pilot menu, added stringtables
154 *
155 * 133 4/26/99 3:41p Jeff
156 * put in debug multiplayer command dump to file
157 *
158 * 132 4/25/99 7:18p Jeff
159 * added code to handle suicides in pinfo
160 *
161 * 131 4/23/99 6:15p Jeff
162 * fixed double calls to GameClose
163 *
164 * 130 4/23/99 4:49p Jason
165 * played with loss colors a bit
166 *
167 * 129 4/23/99 4:24p Jason
168 * fixed ping display bug
169 *
170 * 128 4/23/99 12:46p Jeff
171 * lag loss indicator on by default
172 *
173 * 127 4/22/99 11:28a Jeff
174 * changed percent sign as a result of Samir's change
175 *
176 * 126 4/21/99 10:35p Jeff
177 * fixed lag/loss displays
178 *
179 * 125 4/20/99 8:57p Jeff
180 * compile for Linux
181 *
182 * 124 4/14/99 3:03p Jeff
183 *
184 * 123 4/12/99 11:39a Jeff
185 * removed movement smoothing, added permissable cs to netgame info
186 *
187 * 122 4/04/99 4:55p Jeff
188 * added functionality to call osiris functions from multiplayer d3ms
189 *
190 * 121 4/03/99 4:06p Jeff
191 * added loss/ping gauge
192 *
193 * 120 4/02/99 9:02p Jeff
194 * fixed crashes if there was an error initializing module
195 *
196 * 119 3/30/99 9:01p Jeff
197 * exported polymodels
198 *
199 * 118 3/30/99 7:42p Jeff
200 * fixed a misspelling on a function name
201 *
202 * 117 3/22/99 6:20p Jeff
203 * added 2 more audio taunts. a mulitplayer event when someone plays an
204 * audio taunt. option to disable audio taunts.
205 *
206 * 116 3/22/99 1:55p Jeff
207 * make sure initialization happens (possible crashing)
208 *
209 * 115 3/17/99 12:23p Jeff
210 * converted DMFC to be COM interface
211 *
212 * 114 3/09/99 1:13p Jeff
213 * fixed control packet for wait being overflowed out and accidently sent
214 * by the client
215 *
216 * 113 3/05/99 1:29p Jeff
217 * fixed 99% of the high res issues
218 *
219 * 112 3/01/99 8:48p Jeff
220 * fixed banning bug (when not a master tracker game)
221 *
222 * 111 2/25/99 8:54p Jeff
223 * Inventory supports level change persistant items. Inventory supports
224 * time-out objects. Inventory Reset changed (takes a level of reset
225 * now). Quad lasers stay across level change (single player). Guidebot
226 * bug fixed (now back in ship on level start). Quads time out when
227 * spewed. Invulnerability and cloak powerups no longer use game
228 * event/callbacks, so they can be saved in game saves (moved to
229 * MakePlayerInvulnerable and MakeObjectInvisible)
230 *
231 * 110 2/11/99 12:50a Jeff
232 * changed names of exported variables
233 *
234 * 109 2/10/99 1:47p Matt
235 * Changed object handle symbolic constants
236 *
237 * 108 2/09/99 3:32p Jeff
238 * table file parser takes quotes strings for force keywords
239 *
240 * 107 2/07/99 2:06a Jeff
241 * updated coop...fixed bug when getting countermeasure owner, if owner is
242 * observer
243 *
244 * 106 2/07/99 1:19a Jeff
245 * added new multiplayer game events EVT_GAMEOBJKILLED and
246 * EVT_GAMEOBJDESTROYED
247 *
248 * 105 2/05/99 8:24p Jeff
249 * added table file parser macros
250 *
251 * 104 2/03/99 4:09p Jeff
252 * moved function pointers to seperate file. created autoexec.dmfc
253 *
254 * 103 2/02/99 8:43a Chris
255 * I made buildings with AI work correctly (ie really big robots should be
256 * buildings)
257 * anim to and from states are now shorts instead of bytes
258 *
259 * 102 1/31/99 7:26p Matt
260 * Renamed a bunch of functions to have HUD capitalized
261 *
262 * 101 1/21/99 11:16p Jeff
263 * exported vecmat functions
264 *
265 * 100 1/20/99 8:06p Jeff
266 * added members into DLLinfo struct for game change segment events, pass
267 * them over on execute dll packets
268 *
269 * 99 1/19/99 5:34p Jeff
270 * updated monsterball
271 *
272 * 98 1/18/99 7:27p Jeff
273 * localized strings in dmfcbase.cpp
274 *
275 * 97 1/17/99 11:52p Jeff
276 * added some new events, and changed a couple event handlers
277 *
278 * 96 1/15/99 8:29p Jeff
279 * updates to powerball
280 *
281 * 95 1/15/99 7:52p Chris
282 * Updated ObjSetPos() to include a f_update_attach_children flag
283 *
284 * 94 1/15/99 3:53a Jeff
285 * exported a couple more functions. Added event handlers for Weapon
286 * collide event
287 *
288 * 93 1/12/99 2:55p Jeff
289 * added/finished the waiting for player's to join dialog
290 *
291 * 92 1/12/99 11:29a Jason
292 * fixed a broken externed function
293 *
294 * 91 1/07/99 5:01p Jeff
295 * added Int3's and updated all net games to use stats manager...correctly
296 * too
297 *
298 * 90 1/06/99 7:02p Jeff
299 * added a multiplayer event for game controls
300 *
301 * 89 1/06/99 12:53a Jeff
302 * put in support for $piggyback and $observer
303 *
304 * 88 1/04/99 8:11p Jason
305 * fixed packet loss tracking problem
306 *
307 * 87 1/04/99 2:19p Jeff
308 * exported table file management functions
309 *
310 * 86 1/04/99 12:21p Jeff
311 * added support for hosts.allow/deny and updates stats manager a little
312 *
313 * 85 12/13/98 5:32p Jeff
314 * fixed ugly crash due to freeing memory allocated in another heap
315 *
316 * 84 12/09/98 12:38p Jeff
317 * removed possible security bug displaying a player's ip address (now
318 * server only can see it)
319 *
320 * 83 12/08/98 4:47p Jeff
321 * umm, various changes, fixed pilot pics so that they work for everyone
322 * now
323 *
324 * 82 12/08/98 3:29p Jeff
325 * updated the team control dialog so the server can determine if they
326 * want to make the clients wait
327 *
328 * 81 12/08/98 12:17p Jeff
329 * various changes that include an improved Team Control dialog (doesn't
330 * switch teams until exit..) and spew/respawn players that change teams
331 *
332 * 80 12/04/98 7:04p Jeff
333 * almost finished up dmfc stat manager
334 *
335 * 79 12/01/98 6:56p Jeff
336 * put in quick and dirty implementation of pilot pics for testing
337 *
338 * 78 11/19/98 5:56p Jeff
339 * added slider exported and improved Hoard
340 *
341 * 77 11/17/98 6:29p Jeff
342 * mod can specify whether or not to display the team setup dialog on team
343 * game start. Added a menu item to display team setup dialog in mid-game
344 *
345 * 76 11/17/98 12:36p Jeff
346 * fixed dedicated server detection and display a dprintf for setting new
347 * team
348 *
349 * 75 11/16/98 5:35p Jeff
350 * removed log functions, added support for changing team names, fixed ctf
351 * to work better with different team names
352 *
353 * 74 11/13/98 6:36p Jeff
354 * created dmfc_dll (a DLL version of DMFC) and converted current mods to
355 * use it
356 *
357 * 73 11/12/98 12:16p Jeff
358 * more changes to handle (ignore) dedicated server
359 *
360 * 72 11/11/98 7:19p Jeff
361 * changes made so that a dedicated server's team is always -1 (team game
362 * or not)
363 *
364 * 71 11/02/98 4:38p Jeff
365 * added ability to sort and display by efficiency
366 *
367 * 70 11/01/98 1:59a Jeff
368 * made a $help inputcommand for help in a dedicated server environment
369 *
370 * 69 10/30/98 12:47p Jeff
371 * cut down a couple bytes on memory usage
372 *
373 * 68 10/29/98 7:01p Jeff
374 * creation of team placement dialog. Moved TranslateEvent into DMFC
375 *
376 * 67 10/24/98 2:35p Matt
377 * Changed "callsign" to "name" or "player name" in the multiplayer menus
378 * and commands.
379 *
380 * 66 10/24/98 2:18p Jeff
381 *
382 * 65 10/23/98 6:51p Jeff
383 * fixed hud num of teams sort in ctf, and memory overwrite in registry
384 *
385 * 64 10/23/98 11:22a Jeff
386 * changes to handle mixcase, and display the client netgame info
387 * correctly
388 *
389 * 63 10/21/98 5:02p Jeff
390 * removed player from HUD if in observer nide
391 *
392 * 62 10/20/98 4:35p Jeff
393 * added a flag for menu to add a <None> to MIT_PLIST...
394 *
395 * 61 10/20/98 12:16p Jeff
396 * added death message filter, hud callsign filter
397 *
398 * 60 10/19/98 7:19p Matt
399 * Added system to support different types of damage to the player and
400 * have these different types make different sounds.
401 *
402 * 59 10/18/98 7:59p Jeff
403 * functions added to dmfc for client->server objnum matching. Banning
404 * now uses tracker id when available.
405 *
406 * 58 10/17/98 7:30p Jeff
407 * network_address compares don't compare port on somethings
408 *
409 * 57 10/15/98 6:18p Jeff
410 * created the is player banned event, removed prejoin event
411 *
412 * 56 10/15/98 1:34p Jeff
413 * added scrollable onscreen menu. Remove ban in dmfc. prejoin event
414 *
415 * 55 10/13/98 6:01p Jeff
416 * added attaching
417 *
418 * 54 10/13/98 2:15a Jeff
419 * created new event for when a player leaves a multiplayer game. Fixed
420 * some 'english' bugs in the network games.
421 *
422 * 53 10/08/98 3:37p Jeff
423 * general improvements (Netgame info things, save to registry). Changes
424 * so it would send packets on NETSEQ_OBJECTS
425 *
426 * 51 10/05/98 2:49p Jeff
427 *
428 * 50 10/02/98 6:10p Jeff
429 *
430 * 49 10/01/98 11:30a Jeff
431 * made the observer mode events into just a client event
432 *
433 * 48 9/30/98 4:21p Jeff
434 * team changing is handled correctly
435 *
436 * 47 9/30/98 3:50p Jeff
437 * general improvements (many)
438 *
439 * 46 9/29/98 3:04p Jeff
440 * added time in game and start_time support
441 *
442 * 45 9/28/98 5:05p Jeff
443 * made the statisitical death messages an option in the menu
444 *
445 * 44 9/25/98 7:25p Jeff
446 *
447 * 43 9/25/98 4:50p Jeff
448 *
449 * 42 9/24/98 6:54p Jeff
450 * added DisconnectMe() and made use of it when you get kicked/banned
451 *
452 * 41 9/24/98 6:29p Jeff
453 *
454 * 40 9/24/98 5:52p Jeff
455 * starting adding statistical death messages, checked in for testing
456 *
457 * 39 9/23/98 5:27p Jeff
458 * fixed death message bug (using objnum instead of pnum)
459 *
460 * 38 9/23/98 4:17p Jeff
461 * basic changes/improvements, started changing death messages
462 *
463 * 37 9/21/98 7:11p Jeff
464 * made InputCommand interface API and moved existing input commands to
465 * the interface. Changed mprintf/ASSERT so they are valid in DMFC
466 *
467 * $NoKeywords: $
468 */
469
470 #include "gamedll_header.h"cxx . . $ `<file>/netgames/includes/gamedll_header.h`/
471 #include "DMFC.h"cxx . . $ `<file>/netgames/includes/DMFC.h`/
472 #include "dmfcinternal.h"cxx . . $ `<file>/netgames/dmfc/dmfcinternal.h`/
473 #include "dmfcinputcommands.h"cxx . . $ `<file>/netgames/dmfc/dmfcinputcommands.h`/
474
475 #include <stdlib.h>
476 #include <stdarg.h>
477 #include <algorithm>
478
479 char **DMFCStringTablecxx . . $ DMFCStringTable.;
480 int DMFCStringTableSizecxx . . $ DMFCStringTableSize. = 0;
481 const char *_DMFCErrorStringcxx . . $ _DMFCErrorString. = "DMFC Missing String";
482 uint8_tcxx . . $ uint8_t# seeds1cxx . . $ seeds1.[31] = {49, 73, 0, 44, 87, 253, 35, 74, 62, 250, 4, 247, 251, 72, 244, 30,
483 59, 61, 60, 52, 50, 237, 23, 48, 56, 55, 65, 232, 231, 230, 0};
484 uint8_tcxx . . $ uint8_t# seeds2cxx . . $ seeds2.[6] = {70, 95, 103, 102, 112, 0};
485
486 const char *DMFCGetStringcxx . . $ DMFCGetString(f7ae7e56280f18ae).(int d) {
487 if ((d < 0) || (d >= DMFCStringTableSizecxx . . $ DMFCStringTableSize.))
488 return _DMFCErrorStringcxx . . $ _DMFCErrorString.;
489 else
490 return DMFCStringTablecxx . . $ DMFCStringTable.[d];
491 }
492
493 DMFCBasecxx . . $ DMFCBase#::DMFCBasecxx . . $ DMFCBase#DMFCBase(49f6e7a06ebc5aa8).(void) {
494 m_cPtrscxx . . $ DMFCBase#m_cPtrs. = 0;
495
496 m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel. = HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!;
497 m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel. = m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel. = HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!;
498 m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. = 0;
499 m_bHasInitializedcxx . . $ DMFCBase#m_bHasInitialized. = false;
500 LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled. = true;
501 DMFCInitcxx . . $ DMFCBase#DMFCInit. = false;
502 RealGametimecxx . . $ DMFCBase#RealGametime. = 0;
503 DedicatedLevelWaitcxx . . $ DMFCBase#DedicatedLevelWait. = 0;
504 m_bDisplayTimelimitCountdowncxx . . $ DMFCBase#m_bDisplayTimelimitCountdown. = true;
505 m_iTimeLimitCountdowncxx . . $ DMFCBase#m_iTimeLimitCountdown. = 10;
506
507 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_PLRFIRSTTIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2374:9`! | DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!);
508 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`!);
509 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags,
510 DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`! | DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`! | DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`! | DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!);
511 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_INOPTIONScxx . . $ `netgames/dmfc/dmfcinternal.h:2384:9`! | DMFC_PRF_DISPPLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2378:9`! | DMFC_PRF_DISPNETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2379:9`!);
512 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`! | DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`! | DMFC_PRF_PAUSETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2391:9`!);
513
514 m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers. = 0;
515 m_bMakeClientsWaitcxx . . $ DMFCBase#m_bMakeClientsWait. = false;
516 m_iPlayerDisplayedcxx . . $ DMFCBase#m_iPlayerDisplayed. = 0;
517
518 DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[0] = '\0';
519
520 SPRootcxx . . $ DMFCBase#SPRoot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; // no special packet handlers yet
521
522 int i;
523
524 for (i = 0; i < MAX_DEATH_MSGScxx . . $ `netgames/includes/DMFC.h:523:9`!; i++) {
525 DeathMsgscxx . . $ DMFCBase#DeathMsgs.[i].inusecxx . . $ tDeathMsg#inuse. = false;
526 DeathMsgscxx . . $ DMFCBase#DeathMsgs.[i].messagecxx . . $ tDeathMsg#message. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
527 SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[i].inusecxx . . $ tDeathMsg#inuse. = false;
528 SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[i].messagecxx . . $ tDeathMsg#message. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
529 }
530
531 for (i = 0; i < MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!; i++) {
532 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[i].inusecxx . . $ tWeaponKillMsg#inuse. = false;
533 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[i].messagecxx . . $ tWeaponKillMsg#message. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
534 WeaponHashcxx . . $ DMFCBase#WeaponHash.[i] = -1;
535 }
536
537 m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount. = 0;
538 m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount. = 0;
539 m_iUIWindowIDcxx . . $ DMFCBase#m_iUIWindowID. = -1;
540 m_UIUserDatacxx . . $ DMFCBase#m_UIUserData. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
541
542 m_DenyListcxx . . $ DMFCBase#m_DenyList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
543 m_AllowListcxx . . $ DMFCBase#m_AllowList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
544 m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
545 Hard_max_playerscxx . . $ DMFCBase#Hard_max_players. = DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!;
546
547 DecryptDatacxx . . $ DMFCBase#DecryptData(fc0f0e1646c32816).(seeds2cxx . . $ seeds2., 5);
548
549 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
550 AutoBalanceItemcxx . . $ DMFCBase#AutoBalanceItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
551 AllowTeamChangeItemcxx . . $ DMFCBase#AllowTeamChangeItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
552 ObserverItemcxx . . $ DMFCBase#ObserverItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
553 m_BanListcxx . . $ DMFCBase#m_BanList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
554 StatisticMessagesItemcxx . . $ DMFCBase#StatisticMessagesItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
555 SaveStatsLevelEndItemcxx . . $ DMFCBase#SaveStatsLevelEndItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
556 SaveStatsDisconnectItemcxx . . $ DMFCBase#SaveStatsDisconnectItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
557 NetGameInfoItemcxx . . $ DMFCBase#NetGameInfoItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
558 MenuBackgroundItemcxx . . $ DMFCBase#MenuBackgroundItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
559 ServerHUDCallsignsItemcxx . . $ DMFCBase#ServerHUDCallsignsItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
560 HUDCallsignsItemcxx . . $ DMFCBase#HUDCallsignsItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
561 DeathMessageFilterItemcxx . . $ DMFCBase#DeathMessageFilterItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
562 ShipLogosItemcxx . . $ DMFCBase#ShipLogosItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
563 HUDIndicatorItemcxx . . $ DMFCBase#HUDIndicatorItem. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
564
565 DisplayTauntIndicatorcxx . . $ DMFCBase#DisplayTauntIndicator. = false;
566 TauntIndicatorPlayerNumcxx . . $ DMFCBase#TauntIndicatorPlayerNum. = -1;
567 TauntIndicatorStartTimecxx . . $ DMFCBase#TauntIndicatorStartTime. = 0;
568 TauntIndicatorBMPcxx . . $ DMFCBase#TauntIndicatorBMP. = -1;
569
570 for (i = 0; i < DLLMAX_TEAMScxx . . $ `netgames/includes/DMFC.h:426:9`!; i++)
571 DMFC_team_namescxx . . $ DMFCBase#DMFC_team_names.[i][0] = '\0';
572
573 for (i = 0; i < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; i++) {
574 PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.[i] = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!;
575 }
576
577 InitializeVirtualHandlescxx . . $ DMFCBase#InitializeVirtualHandles(49f6e7a06ebc5aa8).();
578 }
579
580 DMFCBasecxx . . $ DMFCBase#::~cxx . . $ DMFCBase#`~DMFCBase`(ced63f7c635d850d).DMFCBasecxx . . $ DMFCBase#(void) {
581 int i;
582
583 ResetPInfocxx . . $ DMFCBase#ResetPInfo(49f6e7a06ebc5aa8).();
584
585 RemoveAllBanscxx . . $ DMFCBase#RemoveAllBans(49f6e7a06ebc5aa8).();
586
587 for (i = 0; i < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; i++) {
588 if (PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.[i] > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
589 DLLbm_FreeBitmap(PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.[i]);
590 PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.[i] = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!;
591 }
592 }
593
594 if (TauntIndicatorBMPcxx . . $ DMFCBase#TauntIndicatorBMP. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
595 DLLbm_FreeBitmap(TauntIndicatorBMPcxx . . $ DMFCBase#TauntIndicatorBMP.);
596 TauntIndicatorBMPcxx . . $ DMFCBase#TauntIndicatorBMP. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!;
597 }
598
599 for (i = 0; i < MAX_DEATH_MSGScxx . . $ `netgames/includes/DMFC.h:523:9`!; i++) {
600 if (DeathMsgscxx . . $ DMFCBase#DeathMsgs.[i].inusecxx . . $ tDeathMsg#inuse.) {
601 if (DeathMsgscxx . . $ DMFCBase#DeathMsgs.[i].messagecxx . . $ tDeathMsg#message.)
602 free(DeathMsgscxx . . $ DMFCBase#DeathMsgs.[i].messagecxx . . $ tDeathMsg#message.);
603 DeathMsgscxx . . $ DMFCBase#DeathMsgs.[i].inusecxx . . $ tDeathMsg#inuse. = false;
604 }
605 if (SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[i].inusecxx . . $ tDeathMsg#inuse.) {
606 if (SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[i].messagecxx . . $ tDeathMsg#message.)
607 free(SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[i].messagecxx . . $ tDeathMsg#message.);
608 SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[i].inusecxx . . $ tDeathMsg#inuse. = false;
609 }
610 }
611
612 for (i = 0; i < MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!; i++) {
613 if (WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[i].inusecxx . . $ tWeaponKillMsg#inuse.) {
614 if (WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[i].messagecxx . . $ tWeaponKillMsg#message.) {
615 free(WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[i].messagecxx . . $ tWeaponKillMsg#message.);
616 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[i].messagecxx . . $ tWeaponKillMsg#message. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
617 }
618 }
619 }
620
621 // remove all the special packet handlers
622 tSPHandlercxx . . $ tSPHandler# *current, *next;
623 current = next = SPRootcxx . . $ DMFCBase#SPRoot.;
624 while (current) {
625 next = current->nextcxx . . $ tSPHandler#next.;
626 free(current);
627 current = next;
628 }
629 SPRootcxx . . $ DMFCBase#SPRoot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
630 }
631
632 // ##################Setup and processing functions#######################
633
634 // DMFCBase::InitializeForLevel
635 //
636 //
637 void DMFCBasecxx . . $ DMFCBase#::InitializeForLevelcxx . . $ DMFCBase#InitializeForLevel(49f6e7a06ebc5aa8).(void) {
638 if (m_bHasInitializedcxx . . $ DMFCBase#m_bHasInitialized.)
639 return;
640
641 // Reset the timers
642 InitTimerscxx . . $ DMFCBase#InitTimers(49f6e7a06ebc5aa8).();
643
644 m_bHasInitializedcxx . . $ DMFCBase#m_bHasInitialized. = true;
645 }
646
647 // DMFCBase::LoadSettings
648 //
649 // Loads the settings of DMFC from the registry and initializes those variables
650 void DMFCBasecxx . . $ DMFCBase#::LoadSettingscxx . . $ DMFCBase#LoadSettings(49f6e7a06ebc5aa8).(void) {
651 // set default values
652 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags,
653 DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`! | DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`! | DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`! | DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!);
654 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`! | DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!);
655 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`! | DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!);
656 m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel. = HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!;
657 m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel. = m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel. = HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!;
658 m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter. = DM_FILTER_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2780:9`!;
659 LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled. = true;
660
661 bool bTemp;
662
663 if (DatabaseRead3("DMFCAutoTimeLimit", &bTemp)) {
664 if (bTemp)
665 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`!);
666 else
667 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`!);
668 }
669
670 if (DatabaseRead3("DMFCAutoDeathMessage", &bTemp)) {
671 if (bTemp)
672 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`!);
673 else
674 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`!);
675 }
676
677 if (DatabaseRead3("DMFCAutoTeamSelect", &bTemp)) {
678 if (bTemp)
679 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!);
680 else
681 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!);
682 }
683
684 if (DatabaseRead3("DMFCStatHUDMessages", &bTemp)) {
685 if (bTemp)
686 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!);
687 else
688 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!);
689 }
690
691 if (DatabaseRead3("DMFCAutoSaveStatLevelEnd", &bTemp)) {
692 if (bTemp)
693 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`!);
694 else
695 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`!);
696 }
697
698 if (DatabaseRead3("DMFCAutoSaveStatDisconnect", &bTemp)) {
699 if (bTemp)
700 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`!);
701 else
702 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`!);
703 }
704
705 if (DatabaseRead3("DMFCMenuBackground", &bTemp)) {
706 if (bTemp)
707 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!);
708 else
709 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!);
710 }
711
712 if (DatabaseRead3("DMFCCanChangeTeams", &bTemp)) {
713 if (bTemp)
714 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!);
715 else
716 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!);
717 }
718
719 DatabaseRead3("DMFCLagLossIndicator", &LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled.);
720
721 DatabaseRead2("DMFCShowHudCallsigns", &m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel., sizeof(m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel.));
722 DatabaseRead2("DMFCServerShowHudCallsigns", &m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel., sizeof(m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel.));
723 DatabaseRead2("DMFCDeathMessageFilter", &m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter., sizeof(m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter.));
724
725 m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel. = m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel.;
726 }
727
728 // DMFCBase::SaveSettings
729 //
730 // Saves out the settings of DMFC to the registry
731 void DMFCBasecxx . . $ DMFCBase#::SaveSettingscxx . . $ DMFCBase#SaveSettings(49f6e7a06ebc5aa8).(void) {
732 bool bTemp;
733
734 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`!) != 0);
735 DatabaseWrite2("DMFCAutoTimeLimit", bTemp);
736
737 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`!) != 0);
738 DatabaseWrite2("DMFCAutoDeathMessage", bTemp);
739
740 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!) != 0);
741 DatabaseWrite2("DMFCAutoTeamSelect", bTemp);
742
743 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!) != 0);
744 DatabaseWrite2("DMFCStatHUDMessages", bTemp);
745
746 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`!) != 0);
747 DatabaseWrite2("DMFCAutoSaveStatLevelEnd", bTemp);
748
749 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`!) != 0);
750 DatabaseWrite2("DMFCAutoSaveStatDisconnect", bTemp);
751
752 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!) != 0);
753 DatabaseWrite2("DMFCMenuBackground", bTemp);
754
755 bTemp = (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!) != 0);
756 DatabaseWrite2("DMFCCanChangeTeams", bTemp);
757
758 DatabaseWrite2("DMFCLagLossIndicator", LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled.);
759
760 DatabaseWrite2("DMFCShowHudCallsigns", m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel.);
761 DatabaseWrite2("DMFCServerShowHudCallsigns", m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel.);
762 DatabaseWrite2("DMFCDeathMessageFilter", m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter.);
763 }
764
765 // DMFCBase::LoadFunctions
766 //
767 // Initialized all the functions for a multiplayer game...must be first thing called
768 void DMFCBasecxx . . $ DMFCBase#::LoadFunctionscxx . . $ DMFCBase#LoadFunctions(11b0e290e57a7e53).(int *api_func) {
769 DLLGetGameAPI = (GetGameAPI_fpcxx . . $ GetGameAPI_fp#)api_func;
770 DLLGetGameAPI(&APIcxx . . $ DMFCBase#API.);
771
772 Objectscxx . . $ DMFCBase#Objects. = (objectcxx . . $ object# *)APIcxx . . $ DMFCBase#API..objscxx . . $ game_api#objs.;
773 Roomscxx . . $ DMFCBase#Rooms. = (roomcxx . . $ room# *)APIcxx . . $ DMFCBase#API..roomscxx . . $ game_api#rooms.;
774 Terrain_segcxx . . $ DMFCBase#Terrain_seg. = (terrain_segmentcxx . . $ terrain_segment# *)APIcxx . . $ DMFCBase#API..terraincxx . . $ game_api#terrain.;
775 Playerscxx . . $ DMFCBase#Players. = (playercxx . . $ player# *)APIcxx . . $ DMFCBase#API..playerscxx . . $ game_api#players.;
776 Netgamecxx . . $ DMFCBase#Netgame. = (netgame_infocxx . . $ netgame_info# *)APIcxx . . $ DMFCBase#API..netgamecxx . . $ game_api#netgame.;
777 NetPlayerscxx . . $ DMFCBase#NetPlayers. = (netplayercxx . . $ netplayer# *)APIcxx . . $ DMFCBase#API..netplayerscxx . . $ game_api#netplayers.;
778 Shipscxx . . $ DMFCBase#Ships. = (shipcxx . . $ ship# *)APIcxx . . $ DMFCBase#API..shipscxx . . $ game_api#ships.;
779 Weaponscxx . . $ DMFCBase#Weapons. = (weaponcxx . . $ weapon# *)APIcxx . . $ DMFCBase#API..weaponscxx . . $ game_api#weapons.;
780 Current_missioncxx . . $ DMFCBase#Current_mission. = (tMissioncxx . . $ tMission# *)APIcxx . . $ DMFCBase#API..Current_missioncxx . . $ game_api#Current_mission.;
781 GameTexturescxx . . $ DMFCBase#GameTextures. = (texturecxx . . $ texture# *)APIcxx . . $ DMFCBase#API..GameTexturescxx . . $ game_api#GameTextures.;
782 GameVClipscxx . . $ DMFCBase#GameVClips. = (vclipcxx . . $ vclip# *)APIcxx . . $ DMFCBase#API..GameVClipscxx . . $ game_api#GameVClips.;
783
784 // Do functions, variables
785 // Note, these must match the ordering on the D3 side (Game2DLL.cpp)
786 DLLAddHUDMessage = (AddHUDMessage_fpcxx . . $ AddHUDMessage_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[0];
787 DLLMultiSendClientExecuteDLL = (MultiSendClientExecuteDLL_fpcxx . . $ MultiSendClientExecuteDLL_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[1];
788 DLLFindObjectIDName = (FindObjectIDName_fpcxx . . $ FindObjectIDName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[2];
789 DLLGetGoalRoomForTeam = (GetGoalRoomForTeam_fpcxx . . $ GetGoalRoomForTeam_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[3];
790 DLLSetMaxTeams = (SetMaxTeams_fpcxx . . $ SetMaxTeams_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[4];
791 DLLComputeRoomCenter = (ComputeRoomCenter_fpcxx . . $ ComputeRoomCenter_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[5];
792 DLLObjCreate = (ObjCreate_fpcxx . . $ ObjCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[6];
793 DLLMultiSendObject = (MultiSendObject_fpcxx . . $ MultiSendObject_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[7];
794 DLLMultiPaintGoalRooms = (MultiPaintGoalRooms_fpcxx . . $ MultiPaintGoalRooms_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[8];
795 DLLMultiSendSpecialPacket = (MultiSendSpecialPacket_fpcxx . . $ MultiSendSpecialPacket_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[9];
796 DLLIncTeamScore = (IncTeamScore_fpcxx . . $ IncTeamScore_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[10];
797 DLLDebug_ConsolePrintf = (Debug_ConsolePrintf_fpcxx . . $ Debug_ConsolePrintf_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[11];
798 DLLObjSetPosNoMark = (ObjSetPosNoMark_fpcxx . . $ ObjSetPosNoMark_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[12];
799 DLLInvCheckItem = (InvCheckItem_fpcxx . . $ InvCheckItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[13];
800 DLLInvAddTypeID = (InvAddTypeID_fpcxx . . $ InvAddTypeID_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[14];
801 DLLInvRemove = (InvRemove_fpcxx . . $ InvRemove_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[15];
802 DLLPlayerSetLighting = (PlayerSetLighting_fpcxx . . $ PlayerSetLighting_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[16];
803 DLLFindShipName = (FindShipName_fpcxx . . $ FindShipName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[17];
804 DLLPlayerSetRotatingBall = (PlayerSetRotatingBall_fpcxx . . $ PlayerSetRotatingBall_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[18];
805 DLLPlayerChangeShip = (PlayerChangeShip_fpcxx . . $ PlayerChangeShip_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[19];
806 DLLInvGetTypeIDCount = (InvGetTypeIDCount_fpcxx . . $ InvGetTypeIDCount_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[20];
807 DLLPlay3dSound = (D3W_Play3dSound_fpcxx . . $ D3W_Play3dSound_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[21];
808 DLLFindSoundName = (FindSoundName_fpcxx . . $ FindSoundName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[22];
809 DLLSpewCreate = (SpewCreate_fpcxx . . $ SpewCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[23];
810 DLLSpewClearEvent = (SpewClearEvent_fpcxx . . $ SpewClearEvent_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[24];
811 DLLbm_AllocLoadFileBitmap = (bm_AllocLoadFileBitmap_fpcxx . . $ bm_AllocLoadFileBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[25];
812 DLLbm_FreeBitmap = (bm_FreeBitmap_fpcxx . . $ bm_FreeBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[26];
813 DLLrend_DrawScaledBitmap = (rend_DrawScaledBitmap_fpcxx . . $ rend_DrawScaledBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[27];
814 DLLgrtext_Printf = (grtext_Printf_fpcxx . . $ grtext_Printf_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[28];
815 DLLgrtext_Flush = (grtext_Flush_fpcxx . . $ grtext_Flush_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[29];
816 DLLgrtext_SetColor = (grtext_SetColor_fpcxx . . $ grtext_SetColor_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[30];
817 DLLgrtext_SetFancyColor = (grtext_SetFancyColor_fpcxx . . $ grtext_SetFancyColor_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[31];
818 DLLgrtext_SetAlpha = (grtext_SetAlpha_fpcxx . . $ grtext_SetAlpha_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[32];
819 DLLgrtext_GetAlpha = (grtext_GetAlpha_fpcxx . . $ grtext_GetAlpha_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[33];
820 DLLgrtext_SetFont = (grtext_SetFont_fpcxx . . $ grtext_SetFont_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[34];
821 DLLgrtext_GetFont = (grtext_GetFont_fpcxx . . $ grtext_GetFont_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[35];
822 DLLgrtext_GetTextLineWidth = (grtext_GetTextLineWidth_fpcxx . . $ grtext_GetTextLineWidth_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[36];
823 DLLgrfont_GetHeight = (grfont_GetHeight_fpcxx . . $ grfont_GetHeight_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[37];
824 DLLgrtext_CenteredPrintf = (grtext_CenteredPrintf_fpcxx . . $ grtext_CenteredPrintf_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[38];
825 DLLAddColoredHUDMessage = (AddColoredHUDMessage_fpcxx . . $ AddColoredHUDMessage_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[39];
826 DLLbm_w = (bm_w_fpcxx . . $ bm_w_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[40];
827 DLLbm_h = (bm_h_fpcxx . . $ bm_h_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[41];
828 DLLrend_DrawSimpleBitmap = (rend_DrawSimpleBitmap_fpcxx . . $ rend_DrawSimpleBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[42];
829 DLLMultiClientSendSpecialPacket = (MultiClientSendSpecialPacket_fpcxx . . $ MultiClientSendSpecialPacket_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[43];
830 DLLAddBlinkingHUDMessage = (AddBlinkingHUDMessage_fpcxx . . $ AddBlinkingHUDMessage_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[44];
831 DLLInvReset = (InvReset_fpcxx . . $ InvReset_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[45];
832 DLLAddHUDItem = (AddHUDItem_fpcxx . . $ AddHUDItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[46];
833 DLLRenderHUDQuad = (RenderHUDQuad_fpcxx . . $ RenderHUDQuad_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[47];
834 DLLRenderHUDText = (RenderHUDText_fpcxx . . $ RenderHUDText_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[48];
835 DLLMultiEndLevel = (MultiEndLevel_fpcxx . . $ MultiEndLevel_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[49];
836 DLLbm_data = (bm_data_fpcxx . . $ bm_data_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[50];
837 DLLbm_AllocBitmap = (bm_AllocBitmap_fpcxx . . $ bm_AllocBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[51];
838 DLLrend_FillRect = (rend_FillRect_fpcxx . . $ rend_FillRect_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[52];
839 DLLbm_CreateChunkedBitmap = (bm_CreateChunkedBitmap_fpcxx . . $ bm_CreateChunkedBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[53];
840 DLLbm_DestroyChunkedBitmap = (bm_DestroyChunkedBitmap_fpcxx . . $ bm_DestroyChunkedBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[54];
841 DLLrend_DrawChunkedBitmap = (rend_DrawChunkedBitmap_fpcxx . . $ rend_DrawChunkedBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[55];
842 DLLrend_DrawScaledChunkedBitmap = (rend_DrawScaledChunkedBitmap_fpcxx . . $ rend_DrawScaledChunkedBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[56];
843 DLLOpenCFILE = (OpenCFILE_fpcxx . . $ OpenCFILE_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[57];
844 DLLcfclose = (cfclose_fpcxx . . $ cfclose_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[58];
845 DLLcfeof = (cfeof_fpcxx . . $ cfeof_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[59];
846 DLLcfexist = (cfexist_fpcxx . . $ cfexist_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[60];
847 DLLcf_ReadBytes = (cf_ReadBytes_fpcxx . . $ cf_ReadBytes_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[61];
848 DLLcf_ReadInt = (cf_ReadInt_fpcxx . . $ cf_ReadInt_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[62];
849 DLLcf_ReadShort = (cf_ReadShort_fpcxx . . $ cf_ReadShort_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[63];
850 DLLcf_ReadByte = (cf_ReadByte_fpcxx . . $ cf_ReadByte_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[64];
851 DLLcf_ReadFloat = (cf_ReadFloat_fpcxx . . $ cf_ReadFloat_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[65];
852 DLLcf_ReadDouble = (cf_ReadDouble_fpcxx . . $ cf_ReadDouble_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[66];
853 DLLcf_ReadString = (cf_ReadString_fpcxx . . $ cf_ReadString_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[67];
854 DLLcf_WriteBytes = (cf_WriteBytes_fpcxx . . $ cf_WriteBytes_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[68];
855 DLLcf_WriteString = (cf_WriteString_fpcxx . . $ cf_WriteString_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[69];
856 DLLcf_WriteInt = (cf_WriteInt_fpcxx . . $ cf_WriteInt_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[70];
857 DLLcf_WriteShort = (cf_WriteShort_fpcxx . . $ cf_WriteShort_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[71];
858 DLLcf_WriteByte = (cf_WriteByte_fpcxx . . $ cf_WriteByte_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[72];
859 DLLcf_WriteFloat = (cf_WriteFloat_fpcxx . . $ cf_WriteFloat_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[73];
860 DLLcf_WriteDouble = (cf_WriteDouble_fpcxx . . $ cf_WriteDouble_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[74];
861 DLLcf_CopyFile = (cf_CopyFile_fpcxx . . $ cf_CopyFile_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[75];
862 DLLcf_Diff = (cf_Diff_fpcxx . . $ cf_Diff_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[76];
863 DLLMultiDisconnectPlayer = (MultiDisconnectPlayer_fpcxx . . $ MultiDisconnectPlayer_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[77];
864 DLLnw_GetNumbersFromHostAddress = (nw_GetNumbersFromHostAddress_fpcxx . . $ nw_GetNumbersFromHostAddress_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[78];
865 DLLnw_GetThisIP = (nw_GetThisIP_fpcxx . . $ nw_GetThisIP_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[79];
866 DLLCreateStringTable = (CreateStringTable_fpcxx . . $ CreateStringTable_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[80];
867 DLLDestroyStringTable = (DestroyStringTable_fpcxx . . $ DestroyStringTable_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[81];
868 DLLRenderHUDTextFlags = (RenderHUDTextFlags_fpcxx . . $ RenderHUDTextFlags_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[82];
869 DLLPlayerSpewInventory = (PlayerSpewInventory_fpcxx . . $ PlayerSpewInventory_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[83];
870 DLLPlayerSetHUDNameFOV = (PlayerSetHUDNameFOV_fpcxx . . $ PlayerSetHUDNameFOV_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[84];
871 DLLGetUltimateParentForObject = (GetUltimateParentForObject_fpcxx . . $ GetUltimateParentForObject_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[85];
872 DLLSetObjectDeadFlagRaw = (SetObjectDeadFlagRaw_fpcxx . . $ SetObjectDeadFlagRaw_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[86];
873 FatalError = (DLLFatalError_fpcxx . . $ DLLFatalError_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[87];
874 DLLassert = (assertdll_fpcxx . . $ assertdll_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[88];
875 DLLMultiMatchWeapon = (MultiMatchWeapon_fpcxx . . $ MultiMatchWeapon_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[89];
876 DLLMultiGetMatchChecksum = (MultiGetMatchChecksum_fpcxx . . $ MultiGetMatchChecksum_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[90];
877 DLLFindWeaponName = (FindWeaponName_fpcxx . . $ FindWeaponName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[91];
878 DLLcf_OpenLibrary = (cf_OpenLibrary_fpcxx . . $ cf_OpenLibrary_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[92];
879 DLLcf_CloseLibrary = (cf_CloseLibrary_fpcxx . . $ cf_CloseLibrary_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[93];
880 DLLMultiSendRequestToObserve = (MultiSendRequestToObserve_fpcxx . . $ MultiSendRequestToObserve_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[94];
881 DLLFindTextureName = (FindTextureName_fpcxx . . $ FindTextureName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[95];
882 DLLApplyDamageToPlayer = (ApplyDamageToPlayer_fpcxx . . $ ApplyDamageToPlayer_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[96];
883 DLLMultiMatchGeneric = (MultiMatchGeneric_fpcxx . . $ MultiMatchGeneric_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[97];
884 DLLSetUITextItemText = (SetUITextItemText_fpcxx . . $ SetUITextItemText_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[98];
885 DLLNewUIWindowCreate = (NewUIWindowCreate_fpcxx . . $ NewUIWindowCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[99];
886 DLLNewUIWindowDestroy = (NewUIWindowDestroy_fpcxx . . $ NewUIWindowDestroy_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[100];
887 DLLNewUIWindowOpen = (NewUIWindowOpen_fpcxx . . $ NewUIWindowOpen_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[101];
888 DLLNewUIWindowClose = (NewUIWindowClose_fpcxx . . $ NewUIWindowClose_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[102];
889 DLLTextCreate = (TextCreate_fpcxx . . $ TextCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[103];
890 DLLEditCreate = (EditCreate_fpcxx . . $ EditCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[104];
891 DLLButtonCreate = (ButtonCreate_fpcxx . . $ ButtonCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[105];
892 DLLListCreate = (ListCreate_fpcxx . . $ ListCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[106];
893 DLLListRemoveAll = (ListRemoveAll_fpcxx . . $ ListRemoveAll_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[107];
894 DLLListAddItem = (ListAddItem_fpcxx . . $ ListAddItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[108];
895 DLLListRemoveItem = (ListRemoveItem_fpcxx . . $ ListRemoveItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[109];
896 DLLListSelectItem = (ListSelectItem_fpcxx . . $ ListSelectItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[110];
897 DLLListGetItem = (ListGetItem_fpcxx . . $ ListGetItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[111];
898 DLLListGetSelectedIndex = (ListGetSelectedIndex_fpcxx . . $ ListGetSelectedIndex_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[112];
899 DLLEditSetText = (EditSetText_fpcxx . . $ EditSetText_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[113];
900 DLLEditGetText = (EditGetText_fpcxx . . $ EditGetText_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[114];
901 DLLDoUI = (DoUI_fpcxx . . $ DoUI_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[115];
902 DLLDoMessageBox = (DoMessageBox_fpcxx . . $ DoMessageBox_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[116];
903 DLLDescentDefer = (DescentDefer_fpcxx . . $ DescentDefer_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[117];
904 DLLNewUIGameWindowCreate = (NewUIGameWindowCreate_fpcxx . . $ NewUIGameWindowCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[118];
905 DLLNewUIGameWindowDestroy = (NewUIGameWindowDestroy_fpcxx . . $ NewUIGameWindowDestroy_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[119];
906 DLLNewUIGameWindowOpen = (NewUIGameWindowOpen_fpcxx . . $ NewUIGameWindowOpen_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[120];
907 DLLNewUIGameWindowClose = (NewUIGameWindowClose_fpcxx . . $ NewUIGameWindowClose_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[121];
908 DLLHotSpotCreate = (HotSpotCreate_fpcxx . . $ HotSpotCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[122];
909 DLLPollUI = (PollUI_fpcxx . . $ PollUI_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[123];
910 DLLRemoveUITextItem = (RemoveUITextItem_fpcxx . . $ RemoveUITextItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[124];
911 DLLCreateNewUITextItem = (CreateNewUITextItem_fpcxx . . $ CreateNewUITextItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[125];
912 DLLUIConsoleGadgetCreate = (UIConsoleGadgetCreate_fpcxx . . $ UIConsoleGadgetCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[126];
913 DLLUIConsoleGadgetputs = (UIConsoleGadgetputs_fpcxx . . $ UIConsoleGadgetputs_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[127];
914 DLLNewUIWindowSetFocusOnEditGadget = (NewUIWindowSetFocusOnEditGadget_fpcxx . . $ NewUIWindowSetFocusOnEditGadget_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[128];
915 DLLOldEditCreate = (OldEditCreate_fpcxx . . $ OldEditCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[129];
916 DLLOldListCreate = (OldListCreate_fpcxx . . $ OldListCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[130];
917 DLLOldListRemoveAll = (OldListRemoveAll_fpcxx . . $ OldListRemoveAll_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[131];
918 DLLOldListAddItem = (OldListAddItem_fpcxx . . $ OldListAddItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[132];
919 DLLOldListRemoveItem = (OldListRemoveItem_fpcxx . . $ OldListRemoveItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[133];
920 DLLOldListSelectItem = (OldListSelectItem_fpcxx . . $ OldListSelectItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[134];
921 DLLOldListGetItem = (OldListGetItem_fpcxx . . $ OldListGetItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[135];
922 DLLOldListGetSelectedIndex = (OldListGetSelectedIndex_fpcxx . . $ OldListGetSelectedIndex_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[136];
923 DLLOldEditSetText = (OldEditSetText_fpcxx . . $ OldEditSetText_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[137];
924 DLLOldEditGetText = (OldEditGetText_fpcxx . . $ OldEditGetText_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[138];
925 DLLToggleUICallback = (ToggleUICallback_fpcxx . . $ ToggleUICallback_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[139];
926 DLLSetOldEditBufferLen = (SetOldEditBufferLen_fpcxx . . $ SetOldEditBufferLen_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[140];
927 DLLNewUIWindowLoadBackgroundImage = (NewUIWindowLoadBackgroundImage_fpcxx . . $ NewUIWindowLoadBackgroundImage_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[141];
928 DLLDeleteUIItem = (DeleteUIItem_fpcxx . . $ DeleteUIItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[142];
929 DLLHotSpotSetStates = (HotSpotSetStates_fpcxx . . $ HotSpotSetStates_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[143];
930 DLLSetUICallback = (SetUICallback_fpcxx . . $ SetUICallback_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[144];
931 DLLGetUICallback = (RetrieveUICallback_fpcxx . . $ RetrieveUICallback_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[145];
932 DLLSuspendControls = (SuspendControls_fpcxx . . $ SuspendControls_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[146];
933 DLLResumeControls = (ResumeControls_fpcxx . . $ ResumeControls_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[147];
934 DLLShowCursor = (ui_ShowCursor_fpcxx . . $ ui_ShowCursor_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[148];
935 DLLHideCursor = (ui_HideCursor_fpcxx . . $ ui_HideCursor_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[149];
936 DLLGameFrame = (GameFrame_fpcxx . . $ GameFrame_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[150];
937 DPrintf = (DPrintf_fpcxx . . $ DPrintf_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[151];
938 DLLddio_MakePath = (ddio_MakePath_fpcxx . . $ ddio_MakePath_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[152];
939 DLLddio_SplitPath = (ddio_SplitPath_fpcxx . . $ ddio_SplitPath_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[153];
940 DLLPlay2dSound = (Play2dSound_fpcxx . . $ Play2dSound_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[154];
941 DLLTouchSound = (TouchSound_fpcxx . . $ TouchSound_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[155];
942 DatabaseRead1 = (dDatabaseRead_fp1cxx . . $ dDatabaseRead_fp1#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[156];
943 DatabaseRead2 = (dDatabaseRead_fp2cxx . . $ dDatabaseRead_fp2#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[157];
944 DatabaseRead3 = (dDatabaseRead_fp3cxx . . $ dDatabaseRead_fp3#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[158];
945 DatabaseWrite1 = (dDatabaseWrite_fp1cxx . . $ dDatabaseWrite_fp1#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[159];
946 DatabaseWrite2 = (dDatabaseWrite_fp2cxx . . $ dDatabaseWrite_fp2#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[160];
947 DLLAttachObject = (AttachObject_fpcxx . . $ AttachObject_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[161];
948 DLLObjGet = (ObjGet_fpcxx . . $ ObjGet_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[162];
949 DLLListSetSelectedIndex = (ListSetSelectedIndex_fpcxx . . $ ListSetSelectedIndex_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[163];
950 DLLRemoveUIBmpItem = (RemoveUIBmpItem_fpcxx . . $ RemoveUIBmpItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[164];
951 DLLCreateNewUIBmpItem = (CreateNewUIBmpItem_fpcxx . . $ CreateNewUIBmpItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[165];
952 DLLGetUIItemWidth = (GetUIItemWidth_fpcxx . . $ GetUIItemWidth_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[166];
953 DLLGetUIItemHeight = (GetUIItemHeight_fpcxx . . $ GetUIItemHeight_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[167];
954 DLLSliderCreate = (SliderCreate_fpcxx . . $ SliderCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[168];
955 DLLSliderSetRange = (SliderSetRange_fpcxx . . $ SliderSetRange_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[169];
956 DLLSliderGetRange = (SliderGetRange_fpcxx . . $ SliderGetRange_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[170];
957 DLLSliderSetPos = (SliderSetPos_fpcxx . . $ SliderSetPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[171];
958 DLLSliderGetPos = (SliderGetPos_fpcxx . . $ SliderGetPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[172];
959 DLLSliderSetSelectChangeCallback = (SliderSetSelectChangeCallback_fpcxx . . $ SliderSetSelectChangeCallback_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[173];
960 DLLSliderSetSelectChangeCallbackWData = (SliderSetSelectChangeCallbackWData_fpcxx . . $ SliderSetSelectChangeCallbackWData_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[174];
961 DLLTextSetTitle = (TextSetTitle_fpcxx . . $ TextSetTitle_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[175];
962 DLLPPic_GetPilot = (PPic_GetPilot_fpcxx . . $ PPic_GetPilot_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[176];
963 DLLPPic_GetBitmapHandle = (PPic_GetBitmapHandle_fpcxx . . $ PPic_GetBitmapHandle_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[177];
964 DLLrend_DrawLine = (rend_DrawLine_fpcxx . . $ rend_DrawLine_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[178];
965 DLLrend_SetFlatColor = (rend_SetFlatColor_fpcxx . . $ rend_SetFlatColor_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[179];
966 DLLMultiSetLogoState = (MultiSetLogoState_fpcxx . . $ MultiSetLogoState_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[180];
967 DLLPlayerGetRandomStartPosition = (PlayerGetRandomStartPosition_fpcxx . . $ PlayerGetRandomStartPosition_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[181];
968 DLLInitPlayerNewShip = (InitPlayerNewShip_fpcxx . . $ InitPlayerNewShip_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[182];
969 DLLCheckBoxCreate = (CheckBoxCreate_fpcxx . . $ CheckBoxCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[183];
970 DLLCheckBoxSetCheck = (CheckBoxSetCheck_fpcxx . . $ CheckBoxSetCheck_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[184];
971 DLLCheckBoxIsChecked = (CheckBoxIsChecked_fpcxx . . $ CheckBoxIsChecked_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[185];
972 DLLnw_GetHostAddressFromNumbers = (nw_GetHostAddressFromNumbers_fpcxx . . $ nw_GetHostAddressFromNumbers_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[186];
973 TableFilesClear = (TableFilesClear_fpcxx . . $ TableFilesClear_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[187];
974 TableFileAdd = (TableFileAdd_fpcxx . . $ TableFileAdd_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[188];
975 DLLDebugBreak_callback_stop = (DebugBreak_callback_stop_fpcxx . . $ DebugBreak_callback_stop_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[189];
976 DLLDebugBreak_callback_resume = (DebugBreak_callback_resume_fpcxx . . $ DebugBreak_callback_resume_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[190];
977 DLLInt3MessageBox = (Int3MessageBox_fpcxx . . $ Int3MessageBox_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[191];
978 DLLGetUIItemPosition = (GetUIItemPosition_fpcxx . . $ GetUIItemPosition_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[192];
979 DLLAttachObjectRadius = (AttachObjectRadius_fpcxx . . $ AttachObjectRadius_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[193];
980 DLLUnattachChildren = (UnattachChildren_fpcxx . . $ UnattachChildren_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[194];
981 DLLUnattachChild = (UnattachChild_fpcxx . . $ UnattachChild_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[195];
982 DLLUnattachFromParent = (UnattachFromParent_fpcxx . . $ UnattachFromParent_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[196];
983 DLLvm_GetMagnitude = (vm_GetMagnitude_fpcxx . . $ vm_GetMagnitude_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[197];
984 DLLvm_MatrixMulVector = (vm_MatrixMulVector_fpcxx . . $ vm_MatrixMulVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[198];
985 DLLphys_apply_force = (phys_apply_force_fpcxx . . $ phys_apply_force_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[199];
986 DLLphys_apply_rot = (phys_apply_rot_fpcxx . . $ phys_apply_rot_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[200];
987 DLLvm_TransposeMatrix = (vm_TransposeMatrix_fpcxx . . $ vm_TransposeMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[201];
988 DLLvm_CrossProduct = (vm_CrossProduct_fpcxx . . $ vm_CrossProduct_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[202];
989 DLLvm_NormalizeVector = (vm_NormalizeVector_fpcxx . . $ vm_NormalizeVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[203];
990 DLLConvertEulerToAxisAmount = (ConvertEulerToAxisAmount_fpcxx . . $ ConvertEulerToAxisAmount_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[204];
991 DLLConvertAxisAmountToEuler = (ConvertAxisAmountToEuler_fpcxx . . $ ConvertAxisAmountToEuler_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[205];
992 DLLvm_GetMagnitudeFast = (vm_GetMagnitudeFast_fpcxx . . $ vm_GetMagnitudeFast_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[206];
993 DLLvm_MakeIdentity = (vm_MakeIdentity_fpcxx . . $ vm_MakeIdentity_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[207];
994 DLLvm_MakeVectorZero = (vm_MakeVectorZero_fpcxx . . $ vm_MakeVectorZero_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[208];
995 DLLvm_MakeAngleZero = (vm_MakeAngleZero_fpcxx . . $ vm_MakeAngleZero_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[209];
996 DLLvm_VectorMulTMatrix = (vm_VectorMulTMatrix_fpcxx . . $ vm_VectorMulTMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[210];
997 DLLvm_MatrixMul = (vm_MatrixMul_fpcxx . . $ vm_MatrixMul_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[211];
998 DLLvm_MatrixMulTMatrix = (vm_MatrixMulTMatrix_fpcxx . . $ vm_MatrixMulTMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[212];
999 DLLvm_DotProduct = (vm_DotProduct_fpcxx . . $ vm_DotProduct_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[213];
1000 DLLvm_SubVectors = (vm_SubVectors_fpcxx . . $ vm_SubVectors_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[214];
1001 DLLvm_AddVectors = (vm_AddVectors_fpcxx . . $ vm_AddVectors_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[215];
1002 DLLvm_AverageVector = (vm_AverageVector_fpcxx . . $ vm_AverageVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[216];
1003 DLLvm_ScaleVector = (vm_ScaleVector_fpcxx . . $ vm_ScaleVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[217];
1004 DLLvm_ScaleAddVector = (vm_ScaleAddVector_fpcxx . . $ vm_ScaleAddVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[218];
1005 DLLvm_DivVector = (vm_DivVector_fpcxx . . $ vm_DivVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[219];
1006 DLLvm_NormalizeVectorFast = (vm_NormalizeVectorFast_fpcxx . . $ vm_NormalizeVectorFast_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[220];
1007 DLLvm_ClearMatrix = (vm_ClearMatrix_fpcxx . . $ vm_ClearMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[221];
1008 DLLvm_AnglesToMatrix = (vm_AnglesToMatrix_fpcxx . . $ vm_AnglesToMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[222];
1009 DLLvm_Orthogonalize = (vm_Orthogonalize_fpcxx . . $ vm_Orthogonalize_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[223];
1010 DLLvm_VectorToMatrix = (vm_VectorToMatrix_fpcxx . . $ vm_VectorToMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[224];
1011 DLLvm_VectorAngleToMatrix = (vm_VectorAngleToMatrix_fpcxx . . $ vm_VectorAngleToMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[225];
1012 DLLvm_SinCos = (vm_SinCos_fpcxx . . $ vm_SinCos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[226];
1013 DLLvm_GetSlope = (vm_GetSlope_fpcxx . . $ vm_GetSlope_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[227];
1014 DLLvm_GetPerp = (vm_GetPerp_fpcxx . . $ vm_GetPerp_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[228];
1015 DLLvm_GetNormal = (vm_GetNormal_fpcxx . . $ vm_GetNormal_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[229];
1016 DLLvm_VectorDistance = (vm_VectorDistance_fpcxx . . $ vm_VectorDistance_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[230];
1017 DLLvm_VectorDistanceQuick = (vm_VectorDistanceQuick_fpcxx . . $ vm_VectorDistanceQuick_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[231];
1018 DLLvm_GetNormalizedDir = (vm_GetNormalizedDir_fpcxx . . $ vm_GetNormalizedDir_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[232];
1019 DLLvm_GetNormalizedDirFast = (vm_GetNormalizedDirFast_fpcxx . . $ vm_GetNormalizedDirFast_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[233];
1020 DLLvm_ExtractAnglesFromMatrix = (vm_ExtractAnglesFromMatrix_fpcxx . . $ vm_ExtractAnglesFromMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[234];
1021 DLLvm_DeltaAngVec = (vm_DeltaAngVec_fpcxx . . $ vm_DeltaAngVec_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[235];
1022 DLLvm_DeltaAngVecNorm = (vm_DeltaAngVecNorm_fpcxx . . $ vm_DeltaAngVecNorm_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[236];
1023 DLLvm_DistToPlane = (vm_DistToPlane_fpcxx . . $ vm_DistToPlane_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[237];
1024 DLLvm_CalcDetValue = (vm_CalcDetValue_fpcxx . . $ vm_CalcDetValue_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[238];
1025 DLLvm_MakeInverseMatrix = (vm_MakeInverseMatrix_fpcxx . . $ vm_MakeInverseMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[239];
1026 DLLvm_SinCosToMatrix = (vm_SinCosToMatrix_fpcxx . . $ vm_SinCosToMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[240];
1027 DLLvm_GetCentroid = (vm_GetCentroid_fpcxx . . $ vm_GetCentroid_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[241];
1028 DLLvm_MakeRandomVector = (vm_MakeRandomVector_fpcxx . . $ vm_MakeRandomVector_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[242];
1029 DLLvm_ComputeBoundingSphere = (vm_ComputeBoundingSphere_fpcxx . . $ vm_ComputeBoundingSphere_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[243];
1030 DLLvm_GetCentroidFast = (vm_GetCentroidFast_fpcxx . . $ vm_GetCentroidFast_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[244];
1031 DLLRenderHUDGetTextLineWidth = (RenderHUDGetTextLineWidth_fpcxx . . $ RenderHUDGetTextLineWidth_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[245];
1032 DLLRenderHUDGetTextHeight = (RenderHUDGetTextHeight_fpcxx . . $ RenderHUDGetTextHeight_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[246];
1033 DLLStartFrame = (StartFrame_fpcxx . . $ StartFrame_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[247];
1034 DLLEndFrame = (EndFrame_fpcxx . . $ EndFrame_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[248];
1035 DLLResetFacings = (ResetFacings_fpcxx . . $ ResetFacings_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[249];
1036 DLLGameRenderWorld = (GameRenderWorld_fpcxx . . $ GameRenderWorld_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[250];
1037 DLLGetFrameParameters = (GetFrameParameters_fpcxx . . $ GetFrameParameters_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[251];
1038 DLLrend_SetZBufferState = (rend_SetZBufferState_fpcxx . . $ rend_SetZBufferState_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[252];
1039 DLLrend_SetLighting = (rend_SetLighting_fpcxx . . $ rend_SetLighting_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[253];
1040 DLLrend_SetColorModel = (rend_SetColorModel_fpcxx . . $ rend_SetColorModel_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[254];
1041 DLLrend_SetTextureType = (rend_SetTextureType_fpcxx . . $ rend_SetTextureType_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[255];
1042 DLLrend_DrawPolygon = (rend_DrawPolygon_fpcxx . . $ rend_DrawPolygon_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[256];
1043 DLLrend_SetMipState = (rend_SetMipState_fpcxx . . $ rend_SetMipState_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[257];
1044 DLLrend_SetFogState = (rend_SetFogState_fpcxx . . $ rend_SetFogState_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[258];
1045 DLLrend_SetFiltering = (rend_SetFiltering_fpcxx . . $ rend_SetFiltering_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[259];
1046 DLLrend_SetOverlayMap = (rend_SetOverlayMap_fpcxx . . $ rend_SetOverlayMap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[260];
1047 DLLrend_SetOverlayType = (rend_SetOverlayType_fpcxx . . $ rend_SetOverlayType_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[261];
1048 DLLrend_ClearScreen = (rend_ClearScreen_fpcxx . . $ rend_ClearScreen_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[262];
1049 DLLrend_SetPixel = (rend_SetPixel_fpcxx . . $ rend_SetPixel_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[263];
1050 DLLrend_GetPixel = (rend_GetPixel_fpcxx . . $ rend_GetPixel_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[264];
1051 DLLrend_FillCircle = (rend_FillCircle_fpcxx . . $ rend_FillCircle_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[265];
1052 DLLrend_DrawCircle = (rend_DrawCircle_fpcxx . . $ rend_DrawCircle_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[266];
1053 DLLrend_SetAlphaType = (rend_SetAlphaType_fpcxx . . $ rend_SetAlphaType_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[267];
1054 DLLrend_SetAlphaValue = (rend_SetAlphaValue_fpcxx . . $ rend_SetAlphaValue_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[268];
1055 DLLrend_SetWrapType = (rend_SetWrapType_fpcxx . . $ rend_SetWrapType_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[269];
1056 DLLrend_SetZBias = (rend_SetZBias_fpcxx . . $ rend_SetZBias_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[270];
1057 DLLrend_SetZBufferWriteMask = (rend_SetZBufferWriteMask_fpcxx . . $ rend_SetZBufferWriteMask_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[271];
1058 DLLrend_GetLFBLock = (rend_GetLFBLock_fpcxx . . $ rend_GetLFBLock_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[272];
1059 DLLrend_ReleaseLFBLock = (rend_ReleaseLFBLock_fpcxx . . $ rend_ReleaseLFBLock_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[273];
1060 DLLrend_DrawLFBBitmap = (rend_DrawLFBBitmap_fpcxx . . $ rend_DrawLFBBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[274];
1061 DLLrend_DrawSpecialLine = (rend_DrawSpecialLine_fpcxx . . $ rend_DrawSpecialLine_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[275];
1062 DLLfvi_FindIntersection = (fvi_FindIntersection_fpcxx . . $ fvi_FindIntersection_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[276];
1063 DLLfvi_QuickDistFaceList = (fvi_QuickDistFaceList_fpcxx . . $ fvi_QuickDistFaceList_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[277];
1064 DLLfvi_QuickDistCellList = (fvi_QuickDistCellList_fpcxx . . $ fvi_QuickDistCellList_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[278];
1065 DLLfvi_QuickDistObjectList = (fvi_QuickDistObjectList_fpcxx . . $ fvi_QuickDistObjectList_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[279];
1066 DLLfvi_QuickRoomCheck = (fvi_QuickRoomCheck_fpcxx . . $ fvi_QuickRoomCheck_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[280];
1067 DLLObjSetPos = (ObjSetPos_fpcxx . . $ ObjSetPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[281];
1068 DLLSetObjectDeadFlag = (SetObjectDeadFlag_fpcxx . . $ SetObjectDeadFlag_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[282];
1069 DLLtaunt_AreEnabled = (taunt_AreEnabled_fpcxx . . $ taunt_AreEnabled_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[283];
1070 DLLtaunt_Enable = (taunt_Enable_fpcxx . . $ taunt_Enable_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[284];
1071 GetPlayerRankIndex = (GetPlayerRankIndex_fpcxx . . $ GetPlayerRankIndex_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[285];
1072 DLLVisEffectAllocate = (VisEffectAllocate_fpcxx . . $ VisEffectAllocate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[286];
1073 DLLVisEffectFree = (VisEffectFree_fpcxx . . $ VisEffectFree_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[287];
1074 DLLVisEffectInitType = (VisEffectInitType_fpcxx . . $ VisEffectInitType_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[288];
1075 DLLVisEffectCreate = (VisEffectCreate_fpcxx . . $ VisEffectCreate_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[289];
1076 DLLVisEffectLink = (VisEffectLink_fpcxx . . $ VisEffectLink_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[290];
1077 DLLVisEffectUnlink = (VisEffectUnlink_fpcxx . . $ VisEffectUnlink_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[291];
1078 DLLVisEffectRelink = (VisEffectRelink_fpcxx . . $ VisEffectRelink_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[292];
1079 DLLVisEffectDelete = (VisEffectDelete_fpcxx . . $ VisEffectDelete_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[293];
1080 DLLCreateRandomSparks = (CreateRandomSparks_fpcxx . . $ CreateRandomSparks_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[294];
1081 DLLCreateRandomLineSparks = (CreateRandomLineSparks_fpcxx . . $ CreateRandomLineSparks_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[295];
1082 DLLVisEffectCreateControlled = (VisEffectCreateControlled_fpcxx . . $ VisEffectCreateControlled_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[296];
1083 DLLCreateRandomParticles = (CreateRandomParticles_fpcxx . . $ CreateRandomParticles_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[297];
1084 DLLAttachRandomNapalmEffectsToObject = (AttachRandomNapalmEffectsToObject_fpcxx . . $ AttachRandomNapalmEffectsToObject_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[298];
1085 DLLInitObjectScripts = (InitObjectScripts_fpcxx . . $ InitObjectScripts_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[299];
1086 DLLg3_StartFrame = (g3_StartFrame_fpcxx . . $ g3_StartFrame_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[300];
1087 DLLg3_EndFrame = (g3_EndFrame_fpcxx . . $ g3_EndFrame_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[301];
1088 DLLg3_GetViewPosition = (g3_GetViewPosition_fpcxx . . $ g3_GetViewPosition_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[302];
1089 DLLg3_GetViewMatrix = (g3_GetViewMatrix_fpcxx . . $ g3_GetViewMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[303];
1090 DLLg3_GetUnscaledMatrix = (g3_GetUnscaledMatrix_fpcxx . . $ g3_GetUnscaledMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[304];
1091 DLLg3_StartInstanceMatrix = (g3_StartInstanceMatrix_fpcxx . . $ g3_StartInstanceMatrix_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[305];
1092 DLLg3_StartInstanceAngles = (g3_StartInstanceAngles_fpcxx . . $ g3_StartInstanceAngles_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[306];
1093 DLLg3_DoneInstance = (g3_DoneInstance_fpcxx . . $ g3_DoneInstance_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[307];
1094 DLLg3_CheckNormalFacing = (g3_CheckNormalFacing_fpcxx . . $ g3_CheckNormalFacing_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[308];
1095 DLLg3_RotatePoint = (g3_RotatePoint_fpcxx . . $ g3_RotatePoint_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[309];
1096 DLLg3_ProjectPoint = (g3_ProjectPoint_fpcxx . . $ g3_ProjectPoint_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[310];
1097 DLLg3_CalcPointDepth = (g3_CalcPointDepth_fpcxx . . $ g3_CalcPointDepth_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[311];
1098 DLLg3_Point2Vec = (g3_Point2Vec_fpcxx . . $ g3_Point2Vec_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[312];
1099 DLLg3_CodePoint = (g3_CodePoint_fpcxx . . $ g3_CodePoint_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[313];
1100 DLLg3_RotateDeltaX = (g3_RotateDeltaX_fpcxx . . $ g3_RotateDeltaX_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[314];
1101 DLLg3_RotateDeltaY = (g3_RotateDeltaY_fpcxx . . $ g3_RotateDeltaY_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[315];
1102 DLLg3_RotateDeltaZ = (g3_RotateDeltaZ_fpcxx . . $ g3_RotateDeltaZ_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[316];
1103 DLLg3_RotateDeltaVec = (g3_RotateDeltaVec_fpcxx . . $ g3_RotateDeltaVec_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[317];
1104 DLLg3_AddDeltaVec = (g3_AddDeltaVec_fpcxx . . $ g3_AddDeltaVec_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[318];
1105 DLLg3_DrawPoly = (g3_DrawPoly_fpcxx . . $ g3_DrawPoly_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[319];
1106 DLLg3_DrawSphere = (g3_DrawSphere_fpcxx . . $ g3_DrawSphere_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[320];
1107 DLLg3_CheckAndDrawPoly = (g3_CheckAndDrawPoly_fpcxx . . $ g3_CheckAndDrawPoly_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[321];
1108 DLLg3_DrawLine = (g3_DrawLine_fpcxx . . $ g3_DrawLine_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[322];
1109 DLLg3_DrawBitmap = (g3_DrawBitmap_fpcxx . . $ g3_DrawBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[323];
1110 DLLg3_DrawRotatedBitmap = (g3_DrawRotatedBitmap_fpcxx . . $ g3_DrawRotatedBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[324];
1111 DLLg3_DrawBox = (g3_DrawBox_fpcxx . . $ g3_DrawBox_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[325];
1112 DLLg3_SetCustomClipPlane = (g3_SetCustomClipPlane_fpcxx . . $ g3_SetCustomClipPlane_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[326];
1113 DLLg3_SetFarClipZ = (g3_SetFarClipZ_fpcxx . . $ g3_SetFarClipZ_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[327];
1114 DLLg3_ClipPolygon = (g3_ClipPolygon_fpcxx . . $ g3_ClipPolygon_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[328];
1115 DLLg3_FreeTempPoints = (g3_FreeTempPoints_fpcxx . . $ g3_FreeTempPoints_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[329];
1116 DLLg3_GetMatrixScale = (g3_GetMatrixScale_fpcxx . . $ g3_GetMatrixScale_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[330];
1117 DLLg3_SetTriangulationTest = (g3_SetTriangulationTest_fpcxx . . $ g3_SetTriangulationTest_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[331];
1118 DLLg3_DrawSpecialLine = (g3_DrawSpecialLine_fpcxx . . $ g3_DrawSpecialLine_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[332];
1119 DLLg3_DrawPlanarRotatedBitmap = (g3_DrawPlanarRotatedBitmap_fpcxx . . $ g3_DrawPlanarRotatedBitmap_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[333];
1120 DLLPlayerStopSounds = (PlayerStopSounds_fpcxx . . $ PlayerStopSounds_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[334];
1121 DLLFindArg = (FindArg_fpcxx . . $ FindArg_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[335];
1122 DLLFireWeaponFromObject = (FireWeaponFromObject_fpcxx . . $ FireWeaponFromObject_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[336];
1123 DLLCreateAndFireWeapon = (CreateAndFireWeapon_fpcxx . . $ CreateAndFireWeapon_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[337];
1124 DLLSelectNextCameraView = (SelectNextCameraView_fpcxx . . $ SelectNextCameraView_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[338];
1125 Inven_Add = (dInven_Add_fpcxx . . $ dInven_Add_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[339];
1126 Inven_AddObject = (dInven_AddObject_fpcxx . . $ dInven_AddObject_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[340];
1127 Inven_AddCounterMeasure = (dInven_AddCounterMeasure_fpcxx . . $ dInven_AddCounterMeasure_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[341];
1128 Inven_Remove = (dInven_Remove_fpcxx . . $ dInven_Remove_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[342];
1129 Inven_Use = (dInven_Use_fpcxx . . $ dInven_Use_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[343];
1130 Inven_UseObjHandle = (dInven_UseObjHandle_fpcxx . . $ dInven_UseObjHandle_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[344];
1131 Inven_Size = (dInven_Size_fpcxx . . $ dInven_Size_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[345];
1132 Inven_CheckItem = (dInven_CheckItem_fpcxx . . $ dInven_CheckItem_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[346];
1133 Inven_Reset = (dInven_Reset_fpcxx . . $ dInven_Reset_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[347];
1134 Inven_ResetPos = (dInven_ResetPos_fpcxx . . $ dInven_ResetPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[348];
1135 Inven_NextPos = (dInven_NextPos_fpcxx . . $ dInven_NextPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[349];
1136 Inven_PrevPos = (dInven_PrevPos_fpcxx . . $ dInven_PrevPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[350];
1137 Inven_GetPosTypeID = (dInven_GetPosTypeID_fpcxx . . $ dInven_GetPosTypeID_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[351];
1138 Inven_GetAuxPosTypeID = (dInven_GetAuxPosTypeID_fpcxx . . $ dInven_GetAuxPosTypeID_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[352];
1139 Inven_GetPosDescription = (dInven_GetPosDescription_fpcxx . . $ dInven_GetPosDescription_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[353];
1140 Inven_GetPosIconName = (dInven_GetPosIconName_fpcxx . . $ dInven_GetPosIconName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[354];
1141 Inven_GetPosName = (dInven_GetPosName_fpcxx . . $ dInven_GetPosName_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[355];
1142 Inven_GetPosInfo = (dInven_GetPosInfo_fpcxx . . $ dInven_GetPosInfo_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[356];
1143 Inven_GetPosCount = (dInven_GetPosCount_fpcxx . . $ dInven_GetPosCount_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[357];
1144 Inven_AtBeginning = (dInven_AtBeginning_fpcxx . . $ dInven_AtBeginning_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[358];
1145 Inven_AtEnd = (dInven_AtEnd_fpcxx . . $ dInven_AtEnd_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[359];
1146 Inven_GotoPos = (dInven_GotoPos_fpcxx . . $ dInven_GotoPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[360];
1147 Inven_GotoPosTypeID = (dInven_GotoPosTypeID_fpcxx . . $ dInven_GotoPosTypeID_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[361];
1148 Inven_UsePos = (dInven_UsePos_fpcxx . . $ dInven_UsePos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[362];
1149 Inven_GetPos = (dInven_GetPos_fpcxx . . $ dInven_GetPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[363];
1150 Inven_ValidatePos = (dInven_ValidatePos_fpcxx . . $ dInven_ValidatePos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[364];
1151 Inven_IsSelectable = (dInven_IsSelectable_fpcxx . . $ dInven_IsSelectable_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[365];
1152 Inven_IsUsable = (dInven_IsUsable_fpcxx . . $ dInven_IsUsable_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[366];
1153 Inven_GetTypeIDCount = (dInven_GetTypeIDCount_fpcxx . . $ dInven_GetTypeIDCount_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[367];
1154 Inven_FindPos = (dInven_FindPos_fpcxx . . $ dInven_FindPos_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[368];
1155 Inven_GetInventoryItemList = (dInven_GetInventoryItemList_fpcxx . . $ dInven_GetInventoryItemList_fp#)APIcxx . . $ DMFCBase#API..fpcxx . . $ game_api#fp.[369];
1156
1157 // Do variables
1158 Player_numcxx . . $ DMFCBase#Player_num. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[0];
1159 Highest_room_indexcxx . . $ DMFCBase#Highest_room_index. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[1];
1160 Game_window_wcxx . . $ DMFCBase#Game_window_w. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[2];
1161 Game_window_hcxx . . $ DMFCBase#Game_window_h. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[3];
1162 Game_fontscxx . . $ DMFCBase#Game_fonts. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[4];
1163 Frametimecxx . . $ DMFCBase#Frametime. = (float *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[5];
1164 Gametimecxx . . $ DMFCBase#Gametime. = (float *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[6];
1165 ShieldDeltacxx . . $ DMFCBase#ShieldDelta. = (float *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[7];
1166 Game_interface_modecxx . . $ DMFCBase#Game_interface_mode. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[8];
1167 LocalD3Dircxx . . $ DMFCBase#LocalD3Dir. = (char *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[9];
1168 m_bTrackerGamecxx . . $ DMFCBase#m_bTrackerGame. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[10];
1169 Local_object_listcxx . . $ DMFCBase#Local_object_list. = (uint16_tcxx . . $ uint16_t# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[11];
1170 Server_object_listcxx . . $ DMFCBase#Server_object_list. = (uint16_tcxx . . $ uint16_t# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[12];
1171 Dedicated_servercxx . . $ DMFCBase#Dedicated_server. = (bool *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[13];
1172 Player_colorscxx . . $ DMFCBase#Player_colors. = (ddgr_colorcxx . . $ ddgr_color# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[14];
1173 Hud_aspect_xcxx . . $ DMFCBase#Hud_aspect_x. = (float *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[15];
1174 Hud_aspect_ycxx . . $ DMFCBase#Hud_aspect_y. = (float *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[16];
1175 Viewer_objectcxx . . $ DMFCBase#Viewer_object. = (objectcxx . . $ object# **)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[17];
1176 Render_zoomcxx . . $ DMFCBase#Render_zoom. = (float *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[18];
1177 Game_window_xcxx . . $ DMFCBase#Game_window_x. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[19];
1178 Game_window_ycxx . . $ DMFCBase#Game_window_y. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[20];
1179 Poly_modelscxx . . $ DMFCBase#Poly_models. = (poly_modelcxx . . $ poly_model# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[21];
1180 VisEffectscxx . . $ DMFCBase#VisEffects. = (vis_effectcxx . . $ vis_effect# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[22];
1181 Highest_vis_effect_indexcxx . . $ DMFCBase#Highest_vis_effect_index. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[23];
1182 Multi_next_levelcxx . . $ DMFCBase#Multi_next_level. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[24];
1183 Level_infocxx . . $ DMFCBase#Level_info. = (level_infocxx . . $ level_info# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[25];
1184 GameArgscxx . . $ DMFCBase#GameArgs. = (void *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[26];
1185 Camera_view_modecxx . . $ DMFCBase#Camera_view_mode. = (int *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[27];
1186 Object_infocxx . . $ DMFCBase#Object_info. = (object_infocxx . . $ object_info# *)APIcxx . . $ DMFCBase#API..vpcxx . . $ game_api#vp.[28];
1187 }
1188
1189 // DMFCBase::GameInit
1190 //
1191 // Sets up all the DLL functions and pointers and preps the class for use. This ABSOLUTLY must be
1192 // called, so if you override DMFCApp::GameInit, make sure that you put a call to this somewhere in
1193 // the override.
1194 void DMFCBasecxx . . $ DMFCBase#::GameInitcxx . . $ DMFCBase#GameInit(d4f767463ce0a6b3).(int teams) {
1195 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(!DMFCInit);
1196 DMFCInitcxx . . $ DMFCBase#DMFCInit. = true;
1197
1198 LoadSettingscxx . . $ DMFCBase#LoadSettings(49f6e7a06ebc5aa8).();
1199
1200 DLLCreateStringTable("dmfc.str", &DMFCStringTablecxx . . $ DMFCStringTable., &DMFCStringTableSizecxx . . $ DMFCStringTableSize.);
1201 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Note: %d strings loaded from string table\n", DMFCStringTableSize);
1202
1203 // initialize player records
1204 PRec_Initcxx . . $ PRec_Init(49f6e7a06ebc5aa8).();
1205
1206 // initialize remote administration
1207 Remote_Initializecxx . . $ Remote_Initialize(49f6e7a06ebc5aa8).();
1208
1209 // see if we should display Outrage logo at all
1210 if (DLLFindArg("-nooutragelogo"))
1211 m_bDisplayOutrageLogocxx . . $ DMFCBase#m_bDisplayOutrageLogo. = false;
1212 else
1213 m_bDisplayOutrageLogocxx . . $ DMFCBase#m_bDisplayOutrageLogo. = true;
1214
1215 SetNumberOfTeamscxx . . $ DMFCBase#SetNumberOfTeams(d4f767463ce0a6b3).(teams);
1216
1217 SetTeamNamecxx . . $ DMFCBase#SetTeamName(dc3004c27659fe3).(RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!, DTXT_REDcxx . . $ `netgames/dmfc/dmfcinternal.h:2413:9`!, false);
1218 SetTeamNamecxx . . $ DMFCBase#SetTeamName(dc3004c27659fe3).(BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!, DTXT_BLUEcxx . . $ `netgames/dmfc/dmfcinternal.h:2414:9`!, false);
1219 SetTeamNamecxx . . $ DMFCBase#SetTeamName(dc3004c27659fe3).(GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!, DTXT_GREENcxx . . $ `netgames/dmfc/dmfcinternal.h:2415:9`!, false);
1220 SetTeamNamecxx . . $ DMFCBase#SetTeamName(dc3004c27659fe3).(YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!, DTXT_YELLOWcxx . . $ `netgames/dmfc/dmfcinternal.h:2416:9`!, false);
1221
1222 // Load bitmaps
1223 hBitmapObservercxx . . $ DMFCBase#hBitmapObserver. = DLLbm_AllocLoadFileBitmap("observer icon.ogf", 0, BITMAP_FORMAT_1555cxx . . $ `lib/bitmap.h:56:9`!);
1224 if (hBitmapObservercxx . . $ DMFCBase#hBitmapObserver. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!)
1225 hBitmapObservercxx . . $ DMFCBase#hBitmapObserver. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!;
1226
1227 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_TEAMASSIGNMENTcxx . . $ `netgames/dmfc/dmfcinternal.h:2760:9`!, &DMFCBasecxx . . $ DMFCBase#::GetTeamAssignmentPacketcxx . . $ DMFCBase#GetTeamAssignmentPacket(f25546b61a629de7).);
1228 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_CHANGETEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2761:9`!, &DMFCBasecxx . . $ DMFCBase#::GetChangeTeamPacketcxx . . $ DMFCBase#GetChangeTeamPacket(f25546b61a629de7).);
1229 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_REQGAMESTATEcxx . . $ `netgames/dmfc/dmfcinternal.h:2762:9`!, &DMFCBasecxx . . $ DMFCBase#::GetGameStateRequestcxx . . $ DMFCBase#GetGameStateRequest(f25546b61a629de7).);
1230 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_DMFCGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2763:9`!, &DMFCBasecxx . . $ DMFCBase#::GetDMFCGameInfocxx . . $ DMFCBase#GetDMFCGameInfo(f25546b61a629de7).);
1231 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_VERSIONIDcxx . . $ `netgames/dmfc/dmfcinternal.h:2764:9`!, &DMFCBasecxx . . $ DMFCBase#::GetDMFCVersionCheckcxx . . $ DMFCBase#GetDMFCVersionCheck(f25546b61a629de7).);
1232 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(6efe5766e3bef270).(SPID_PRECORDcxx . . $ `netgames/dmfc/dmfcinternal.h:2765:9`!, PRec_ReceivePRecFromServercxx . . $ PRec_ReceivePRecFromServer(f25546b61a629de7).);
1233 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_PRECORDREQcxx . . $ `netgames/dmfc/dmfcinternal.h:2766:9`!, &DMFCBasecxx . . $ DMFCBase#::ReceiveRequestForPlayerRecordscxx . . $ DMFCBase#ReceiveRequestForPlayerRecords(f25546b61a629de7).);
1234 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_CONTROLMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2767:9`!, &DMFCBasecxx . . $ DMFCBase#::ReceiveControlMessagecxx . . $ DMFCBase#ReceiveControlMessage(f25546b61a629de7).);
1235 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_NETGAMESYNCcxx . . $ `netgames/dmfc/dmfcinternal.h:2768:9`!, &DMFCBasecxx . . $ DMFCBase#::ReceiveNetGameInfoSynccxx . . $ DMFCBase#ReceiveNetGameInfoSync(f25546b61a629de7).);
1236 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_NEWTEAMNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2769:9`!, &DMFCBasecxx . . $ DMFCBase#::ReceiveNewTeamNamecxx . . $ DMFCBase#ReceiveNewTeamName(f25546b61a629de7).);
1237 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_REMOTEKEYcxx . . $ `netgames/dmfc/dmfcinternal.h:2773:9`!, &DMFCBasecxx . . $ DMFCBase#::GetRemoteKeycxx . . $ DMFCBase#GetRemoteKey(f25546b61a629de7).);
1238 RegisterPacketReceivercxx . . $ DMFCBase#RegisterPacketReceiver(9b94200667d08e70).(SPID_REALGAMETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2774:9`!, &DMFCBasecxx . . $ DMFCBase#::GetRealGametimePacketcxx . . $ DMFCBase#GetRealGametimePacket(f25546b61a629de7).);
1239 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Laser", "Laser Level 1 - Red", "Laser Level 2 - Blue", "Laser Level 3 - Purple",
1240 "Laser Level 4 - Green", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1241 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Vauss", "Vauss Spark", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1242 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Raygun", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1243 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Plasma", "plasma sparks", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1244 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Fusion", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1245 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Super Laser", "Laser Level 5 -Yellow", "Laser Level 6 -White", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1246 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Mass Driver", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1247 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Napalm", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1248 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("EMDyellowleft", "EMDyellowright", "EMDgreenleft", "EMDgreenright", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1249 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Omega", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1250 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Concussion", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1251 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Homing", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1252 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Smart", "SmartPlasmaHomers", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1253 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Mega", "MegaExplosion", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1254 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Frag", "frag particles", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1255 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Guided", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1256 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("NapalmRocket", "NapalmBlob", "NapalmParticles", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1257 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Cyclone Pack", "Swarm", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1258 AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).("Yellow Flare", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1259
1260 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Laser", DTXT_DEATHLASERcxx . . $ `netgames/dmfc/dmfcinternal.h:2432:9`!, false);
1261 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Vauss", DTXT_DEATHVAUSScxx . . $ `netgames/dmfc/dmfcinternal.h:2433:9`!, false);
1262 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("RayGun", DTXT_DEATHMICROWAVEcxx . . $ `netgames/dmfc/dmfcinternal.h:2434:9`!, true);
1263 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Plasma", DTXT_DEATHPLASMAcxx . . $ `netgames/dmfc/dmfcinternal.h:2435:9`!, false);
1264 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Fusion", DTXT_DEATHFUSIONcxx . . $ `netgames/dmfc/dmfcinternal.h:2436:9`!, false);
1265 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Super Laser", DTXT_DEATHSUPERLASERcxx . . $ `netgames/dmfc/dmfcinternal.h:2437:9`!, false);
1266 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Mass Driver", DTXT_DEATHMASScxx . . $ `netgames/dmfc/dmfcinternal.h:2438:9`!, false);
1267 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Napalm", DTXT_DEATHNAPALMcxx . . $ `netgames/dmfc/dmfcinternal.h:2439:9`!, false);
1268 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("EMDyellowleft", DTXT_DEATHEMDcxx . . $ `netgames/dmfc/dmfcinternal.h:2440:9`!, false);
1269 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Omega", DTXT_DEATHOMEGAcxx . . $ `netgames/dmfc/dmfcinternal.h:2441:9`!, false);
1270 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Concussion", DTXT_DEATHCONCcxx . . $ `netgames/dmfc/dmfcinternal.h:2442:9`!, true);
1271 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Homing", DTXT_DEATHHOMINGcxx . . $ `netgames/dmfc/dmfcinternal.h:2443:9`!, false);
1272 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Smart", DTXT_DEATHSMARTcxx . . $ `netgames/dmfc/dmfcinternal.h:2444:9`!, true);
1273 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Mega", DTXT_DEATHMEGAcxx . . $ `netgames/dmfc/dmfcinternal.h:2445:9`!, false);
1274 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Frag", DTXT_DEATHFRAGcxx . . $ `netgames/dmfc/dmfcinternal.h:2446:9`!, true);
1275 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Guided", DTXT_DEATHGUIDEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2447:9`!, false);
1276 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("NapalmRocket", DTXT_DEATHNAPALMROCKETcxx . . $ `netgames/dmfc/dmfcinternal.h:2448:9`!, true);
1277 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Cyclone Pack", DTXT_DEATHCYCLONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2449:9`!, false);
1278 SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).("Yellow Flare", DTXT_DEATHFLAREcxx . . $ `netgames/dmfc/dmfcinternal.h:2450:9`!, false);
1279
1280 /*
1281 $$TABLE_WEAPON "Laser"
1282 $$TABLE_WEAPON "Laser Level 1 - Red"
1283 $$TABLE_WEAPON "Laser Level 2 - Blue"
1284 $$TABLE_WEAPON "Laser Level 3 - Purple"
1285 $$TABLE_WEAPON "Laser Level 4 - Green"
1286 $$TABLE_WEAPON "Vauss"
1287 $$TABLE_WEAPON "Vauss Spark"
1288 $$TABLE_WEAPON "Raygun"
1289 $$TABLE_WEAPON "Plasma"
1290 $$TABLE_WEAPON "plasma sparks"
1291 $$TABLE_WEAPON "Fusion"
1292 $$TABLE_WEAPON "Super Laser"
1293 $$TABLE_WEAPON "Laser Level 5 -Yellow"
1294 $$TABLE_WEAPON "Laser Level 6 -White"
1295 $$TABLE_WEAPON "Mass Driver"
1296 $$TABLE_WEAPON "Napalm"
1297 $$TABLE_WEAPON "EMDyellowleft"
1298 $$TABLE_WEAPON "EMDyellowright"
1299 $$TABLE_WEAPON "EMDgreenleft"
1300 $$TABLE_WEAPON "EMDgreenright"
1301 $$TABLE_WEAPON "Omega"
1302 $$TABLE_WEAPON "Concussion"
1303 $$TABLE_WEAPON "Homing"
1304 $$TABLE_WEAPON "Smart"
1305 $$TABLE_WEAPON "SmartPlasmaHomers"
1306 $$TABLE_WEAPON "Mega"
1307 $$TABLE_WEAPON "MegaExplosion"
1308 $$TABLE_WEAPON "Frag"
1309 $$TABLE_WEAPON "frag particles"
1310 $$TABLE_WEAPON "Guided"
1311 $$TABLE_WEAPON "NapalmRocket"
1312 $$TABLE_WEAPON "NapalmBlob"
1313 $$TABLE_WEAPON "NapalmParticles"
1314 $$TABLE_WEAPON "Cyclone Pack"
1315 $$TABLE_WEAPON "Swarm"
1316 $$TABLE_WEAPON "Yellow Flare"
1317 */
1318
1319 // Set up default messages so we have something
1320 AddDeathMessagecxx . . $ DMFCBase#AddDeathMessage(90ef5b561fbcb8de).(DTXT_KILLED1cxx . . $ `netgames/dmfc/dmfcinternal.h:2398:9`!, true);
1321 AddSuicideMessagecxx . . $ DMFCBase#AddSuicideMessage(85c52e162fed56f9).(DTXT_SUICIDE1cxx . . $ `netgames/dmfc/dmfcinternal.h:2399:9`!);
1322
1323 // Setup InputCommand handlers
1324 InputCommandInitcxx . . $ DMFCBase#InputCommandInit(49f6e7a06ebc5aa8).();
1325
1326 ParseStartupScriptcxx . . $ DMFCBase#ParseStartupScript(49f6e7a06ebc5aa8).();
1327
1328 TauntIndicatorBMPcxx . . $ DMFCBase#TauntIndicatorBMP. = DLLbm_AllocLoadFileBitmap("Taunt.ogf", 0, BITMAP_FORMAT_1555cxx . . $ `lib/bitmap.h:56:9`!);
1329
1330 MenuBackgroundBMPcxx . . $ DMFCBase#MenuBackgroundBMP. = DLLbm_AllocBitmap(32, 32, 0);
1331 if (MenuBackgroundBMPcxx . . $ DMFCBase#MenuBackgroundBMP. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
1332 uint16_tcxx . . $ uint16_t# *data = DLLbm_data(MenuBackgroundBMPcxx . . $ DMFCBase#MenuBackgroundBMP., 0);
1333 int j;
1334 for (j = 0; j < 32 * 32; j++)
1335 data[j] = OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`! | GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(0, 0, 0);
1336 }
1337
1338 MenuItemcxx . . $ MenuItem# *lev1, *lev2, *lev3;
1339
1340 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
1341 // Start Server Commands Menu
1342 lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUSRVRCOMMANDcxx . . $ `netgames/dmfc/dmfcinternal.h:2400:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); // Server
1343 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUKICKcxx . . $ `netgames/dmfc/dmfcinternal.h:2401:9`!, MIT_PLISTcxx . . $ `netgames/includes/DMFC.h:514:9`!, 0, KickPlayercxx . . $ KickPlayer(d4f767463ce0a6b3).); // |- Kick
1344 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1345 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUBANcxx . . $ `netgames/dmfc/dmfcinternal.h:2402:9`!, MIT_PLISTcxx . . $ `netgames/includes/DMFC.h:514:9`!, 0, BanPlayercxx . . $ BanPlayer(d4f767463ce0a6b3).); // |- Ban
1346 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1347
1348 tCustomMenucxx . . $ tCustomMenu# cm;
1349 cm.GetItemcxx . . $ tCustomMenu#GetItem. = GetBannedPlayerStringcxx . . $ GetBannedPlayerString(ff224f080444ee45).;
1350 cm.GetListCountcxx . . $ tCustomMenu#GetListCount. = GetBanPlayerListcxx . . $ GetBanPlayerList(b126dc7c1de90089).;
1351 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_REMOVEBANcxx . . $ `netgames/dmfc/dmfcinternal.h:2451:9`!, MIT_CUSTOMcxx . . $ `netgames/includes/DMFC.h:517:9`!, 0, RemoveBanByIndexcxx . . $ RemoveBanByIndex(d4f767463ce0a6b3)., &cm);
1352 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1353
1354 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_REHASHLISTcxx . . $ `netgames/dmfc/dmfcinternal.h:2452:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, RehashAllowDenyListscxx . . $ RehashAllowDenyLists(d4f767463ce0a6b3).);
1355 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1356
1357 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUENDLEVELcxx . . $ `netgames/dmfc/dmfcinternal.h:2403:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, EndMultiLevelcxx . . $ EndMultiLevel(d4f767463ce0a6b3).); // |- End Level
1358 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1359 ServerHUDCallsignsItemcxx . . $ DMFCBase#ServerHUDCallsignsItem. = lev2 =
1360 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_MAXHUDNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2453:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchServerHudPlayerNamecxx . . $ SwitchServerHudPlayerName(d4f767463ce0a6b3)., 3, m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel.,
1361 DTXT_PLAIN_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2454:9`!, DTXT_OSM_TEAMONLYcxx . . $ `netgames/dmfc/dmfcinternal.h:2455:9`!, DTXT_OSM_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2456:9`!);
1362 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1363 if (teams > 1) {
1364 // Team Game Stuff here
1365 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUTEAMCONTROLcxx . . $ `netgames/dmfc/dmfcinternal.h:2404:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); // |- Team Control
1366 lev3 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUBALANCEcxx . . $ `netgames/dmfc/dmfcinternal.h:2405:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, BalanceTeamscxx . . $ BalanceTeams(d4f767463ce0a6b3).); // |- Balance Teams
1367 lev2->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev3); // |- AutoTeam Balance Off/On
1368 AutoBalanceItemcxx . . $ DMFCBase#AutoBalanceItem. = lev3 =
1369 new MenuItemcxx . . $ MenuItem#(DTXT_MNUAUTOBALANCEcxx . . $ `netgames/dmfc/dmfcinternal.h:2406:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchAutoTeamSelectcxx . . $ SwitchAutoTeamSelect(d4f767463ce0a6b3)., 2,
1370 (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!) ? 1 : 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1371 lev2->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev3);
1372 AllowTeamChangeItemcxx . . $ DMFCBase#AllowTeamChangeItem. = lev3 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUALLOWTEAMCNGcxx . . $ `netgames/dmfc/dmfcinternal.h:2407:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchTeamChangecxx . . $ SwitchTeamChange(d4f767463ce0a6b3)., 2,
1373 AllowTeamChangecxx . . $ DMFCBase#AllowTeamChange(c9857a73d68e59ba).() ? 1 : 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1374 lev2->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev3);
1375 lev3 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_TEAMCONFIGcxx . . $ `netgames/dmfc/dmfcinternal.h:2457:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, OnScreenDisplayTeamConfigcxx . . $ OnScreenDisplayTeamConfig(d4f767463ce0a6b3).);
1376 lev2->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev3);
1377 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1378 }
1379
1380 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1381
1382 // End Server Commands Menu
1383 }
1384
1385 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) {
1386 // Start Client Commands Menu
1387 bool peertopeer = (bool)((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!) != 0);
1388 if (!peertopeer) {
1389 lev1 = HUDIndicatorItemcxx . . $ DMFCBase#HUDIndicatorItem. = new MenuItemcxx . . $ MenuItem#(DTXT_LOSSPINGINDcxx . . $ `netgames/dmfc/dmfcinternal.h:2712:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchLossPingIndicatorcxx . . $ SwitchLossPingIndicator(d4f767463ce0a6b3)., 2,
1390 (LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled.) ? 1 : 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1391 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1392 }
1393 // End Client Commands Menu
1394 }
1395
1396 // Do General stuff here
1397 lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUOBSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2411:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1398 ObserverItemcxx . . $ DMFCBase#ObserverItem. = lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUOBSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2411:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchObserverModecxx . . $ SwitchObserverMode(d4f767463ce0a6b3)., 2, 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1399 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1400
1401 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_PIGGYBACKcxx . . $ `netgames/dmfc/dmfcinternal.h:2458:9`!, MIT_PLISTcxx . . $ `netgames/includes/DMFC.h:514:9`!, 0, SwitchPiggyBackcxx . . $ SwitchPiggyBack(d4f767463ce0a6b3).);
1402 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1403 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1404
1405 /*
1406 lev1 = new MenuItem("OnScreen Menu Options",MIT_NORMAL,0,NULL);
1407 lev2 = MenuBackgroundItem = new MenuItem("Background",MIT_STATE,0,SwitchMenuBackground,2,0,DTXT_MNUOFF,DTXT_MNUON);
1408 lev1->AddSubMenu(lev2);
1409 Menu.AddSubMenu(lev1);
1410 */
1411 lev1 = MenuBackgroundItemcxx . . $ DMFCBase#MenuBackgroundItem. =
1412 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_BACKGROUNDcxx . . $ `netgames/dmfc/dmfcinternal.h:2459:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchMenuBackgroundcxx . . $ SwitchMenuBackground(d4f767463ce0a6b3)., 2, 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1413 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1414
1415 HUDCallsignsItemcxx . . $ DMFCBase#HUDCallsignsItem. = lev1 =
1416 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_HUDNAMELEVELcxx . . $ `netgames/dmfc/dmfcinternal.h:2460:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchHudPlayerNumcxx . . $ SwitchHudPlayerNum(d4f767463ce0a6b3)., 3, m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel.,
1417 DTXT_PLAIN_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2454:9`!, DTXT_OSM_TEAMONLYcxx . . $ `netgames/dmfc/dmfcinternal.h:2455:9`!, DTXT_OSM_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2456:9`!);
1418 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1419
1420 ShipLogosItemcxx . . $ DMFCBase#ShipLogosItem. = lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_SHIPLOGOScxx . . $ `netgames/dmfc/dmfcinternal.h:2461:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchShipLogoEnablecxx . . $ SwitchShipLogoEnable(d4f767463ce0a6b3)., 2,
1421 (AreLogosEnabledcxx . . $ DMFCBase#AreLogosEnabled(c9857a73d68e59ba).()) ? 1 : 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1422 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1423
1424 AudioTauntsItemcxx . . $ DMFCBase#AudioTauntsItem. = lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_AUDIOTAUNTScxx . . $ `netgames/dmfc/dmfcinternal.h:2707:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchAudioTauntsEnablecxx . . $ SwitchAudioTauntsEnable(d4f767463ce0a6b3)., 2,
1425 (AreTauntsEnabledcxx . . $ DMFCBase#AreTauntsEnabled(c9857a73d68e59ba).()) ? 1 : 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1426 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1427
1428 // File Statitics menu
1429 lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_STATSTOFILEcxx . . $ `netgames/dmfc/dmfcinternal.h:2462:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1430
1431 lev2 = new MenuItemcxx . . $ MenuItem#(DTXT_SAVESTATScxx . . $ `netgames/dmfc/dmfcinternal.h:2425:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, SaveStatsToFilecxx . . $ SaveStatsToFile(d4f767463ce0a6b3).);
1432 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1433
1434 SaveStatsLevelEndItemcxx . . $ DMFCBase#SaveStatsLevelEndItem. = lev2 =
1435 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_STATLEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2463:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchSaveStatsLevelEndcxx . . $ SwitchSaveStatsLevelEnd(d4f767463ce0a6b3)., 2, 1, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1436 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1437
1438 SaveStatsDisconnectItemcxx . . $ DMFCBase#SaveStatsDisconnectItem. = lev2 =
1439 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_STATDISCONNECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2464:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchSaveStatsDisconnectcxx . . $ SwitchSaveStatsDisconnect(d4f767463ce0a6b3)., 2, 1, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1440 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1441
1442 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1443
1444 lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUGETPLYRINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2410:9`!, MIT_PLISTcxx . . $ `netgames/includes/DMFC.h:514:9`!, MIF_INCLUDENONEcxx . . $ `netgames/includes/DMFC.h:571:9`!, SwitchPlayerInfocxx . . $ SwitchPlayerInfo(d4f767463ce0a6b3).);
1445 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1446
1447 NetGameInfoItemcxx . . $ DMFCBase#NetGameInfoItem. = lev1 =
1448 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_NETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2465:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchNetGameInfocxx . . $ SwitchNetGameInfo(d4f767463ce0a6b3)., 2,
1449 (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPNETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2379:9`!) ? 1 : 0, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1450 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1451
1452 lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_HUDFILTERcxx . . $ `netgames/dmfc/dmfcinternal.h:2466:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1453 lev2 = DeathMessageFilterItemcxx . . $ DMFCBase#DeathMessageFilterItem. = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_KILLMESSAGEScxx . . $ `netgames/dmfc/dmfcinternal.h:2467:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchDeathMessageFiltercxx . . $ SwitchDeathMessageFilter(d4f767463ce0a6b3)., 3,
1454 m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter., DTXT_PLAIN_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2454:9`!, DTXT_OSM_SIMPLEcxx . . $ `netgames/dmfc/dmfcinternal.h:2468:9`!, DTXT_OSM_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2456:9`!);
1455 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1456
1457 lev2 = StatisticMessagesItemcxx . . $ DMFCBase#StatisticMessagesItem. =
1458 new MenuItemcxx . . $ MenuItem#(DTXT_OSM_STATMESSAGEScxx . . $ `netgames/dmfc/dmfcinternal.h:2469:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchStatHUDMessagescxx . . $ SwitchStatHUDMessages(d4f767463ce0a6b3)., 2, 1, DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!, DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`!);
1459 lev1->AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2);
1460 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1461
1462 if (teams > 1) {
1463 // Team Game Stuff here
1464 char names[DLLMAX_TEAMScxx . . $ `netgames/includes/DMFC.h:426:9`!][MAX_TEAMNAME_LENcxx . . $ `netgames/includes/DMFC.h:443:9`!];
1465 strcpy(names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!));
1466 strcpy(names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!));
1467 switch (teams) {
1468 case 2:
1469 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem. = lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_MNUCHANGETEAMScxx . . $ `netgames/dmfc/dmfcinternal.h:2412:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, ChangeTeamscxx . . $ ChangeTeams(d4f767463ce0a6b3)., 2,
1470 GetPlayerTeamcxx . . $ DMFCBase#GetPlayerTeam(7864480464b09eea).(GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()), names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!]);
1471 break;
1472 case 3:
1473 strcpy(names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!));
1474 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem. = lev1 =
1475 new MenuItemcxx . . $ MenuItem#(DTXT_MNUCHANGETEAMScxx . . $ `netgames/dmfc/dmfcinternal.h:2412:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, ChangeTeamscxx . . $ ChangeTeams(d4f767463ce0a6b3)., 3, GetPlayerTeamcxx . . $ DMFCBase#GetPlayerTeam(7864480464b09eea).(GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()),
1476 names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!], names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!]);
1477 break;
1478 case 4:
1479 strcpy(names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!));
1480 strcpy(names[YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!));
1481 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem. = lev1 =
1482 new MenuItemcxx . . $ MenuItem#(DTXT_MNUCHANGETEAMScxx . . $ `netgames/dmfc/dmfcinternal.h:2412:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, ChangeTeamscxx . . $ ChangeTeams(d4f767463ce0a6b3)., 4, GetPlayerTeamcxx . . $ DMFCBase#GetPlayerTeam(7864480464b09eea).(GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()),
1483 names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!], names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!], names[YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!]);
1484 break;
1485 }
1486 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1487 }
1488
1489 lev1 = new MenuItemcxx . . $ MenuItem#(DTXT_OSM_EXITcxx . . $ `netgames/dmfc/dmfcinternal.h:2470:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, MenuExitMenucxx . . $ MenuExitMenu(d4f767463ce0a6b3).);
1490 Menucxx . . $ DMFCBase#Menu..AddSubMenucxx . . $ MenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1);
1491
1492 // save the hud level var
1493 int curr_call_level = m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel.;
1494 m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel. = -1; // set this to -1 so it definitly gets changes/set
1495 SwitchShowHudCallsignLevelcxx . . $ DMFCBase#SwitchShowHudCallsignLevel(f2ac3508b56cd10).(curr_call_level, false);
1496
1497 Menucxx . . $ DMFCBase#Menu..SetInputFocuscxx . . $ MenuItem#SetInputFocus(49f6e7a06ebc5aa8).();
1498
1499 EnableShipLogoscxx . . $ DMFCBase#EnableShipLogos(b45ddcbc8423892c).(true);
1500
1501 ReadInHostsAllowDenycxx . . $ DMFCBase#ReadInHostsAllowDeny(49f6e7a06ebc5aa8).();
1502
1503 InitializeForLevelcxx . . $ DMFCBase#InitializeForLevel(49f6e7a06ebc5aa8).();
1504 }
1505
1506 // DMFCBase::GameClose
1507 //
1508 // Closes up any needed DLL and DMFC tasks. This ABSOLUTLY must be called, so if you override
1509 // DMFCApp::GameClose, make sure that you put a call to this somewhere in the override
1510 void DMFCBasecxx . . $ DMFCBase#::GameClosecxx . . $ DMFCBase#GameClose(49f6e7a06ebc5aa8).(void) {
1511 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(DMFCInit);
1512 DMFCInitcxx . . $ DMFCBase#DMFCInit. = false;
1513
1514 SaveSettingscxx . . $ DMFCBase#SaveSettings(49f6e7a06ebc5aa8).();
1515
1516 // Free bitmaps
1517 if (hBitmapObservercxx . . $ DMFCBase#hBitmapObserver. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
1518 DLLbm_FreeBitmap(hBitmapObservercxx . . $ DMFCBase#hBitmapObserver.);
1519 hBitmapObservercxx . . $ DMFCBase#hBitmapObserver. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!;
1520 }
1521
1522 FreeHostsListscxx . . $ DMFCBase#FreeHostsLists(49f6e7a06ebc5aa8).();
1523
1524 // Close up InputCommands
1525 InputCommandFreecxx . . $ DMFCBase#InputCommandFree(49f6e7a06ebc5aa8).();
1526
1527 // close up and free player records
1528 PRec_Closecxx . . $ PRec_Close(49f6e7a06ebc5aa8).();
1529
1530 if (MenuBackgroundBMPcxx . . $ DMFCBase#MenuBackgroundBMP. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!)
1531 DLLbm_FreeBitmap(MenuBackgroundBMPcxx . . $ DMFCBase#MenuBackgroundBMP.);
1532
1533 DLLDestroyStringTable(DMFCStringTablecxx . . $ DMFCStringTable., DMFCStringTableSizecxx . . $ DMFCStringTableSize.);
1534 }
1535
1536 void DMFCBasecxx . . $ DMFCBase#::DrawMenucxx . . $ DMFCBase#DrawMenu(49f6e7a06ebc5aa8).(void) {
1537 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
1538
1539 // Menu.Draw(10,100,DLLgrfont_GetHeight(Game_fonts[HUD_FONT_INDEX])+1,this,(m_iProtectedFlags&DMFC_PRF_DISPMENUBACKGR)?MenuBackgroundBMP:-1);
1540 // Menu.Draw(10,100,DLLRenderHUDGetTextHeight("X")+1,this,(m_iProtectedFlags&DMFC_PRF_DISPMENUBACKGR)?MenuBackgroundBMP:-1);
1541 int font_height = DLLgrfont_GetHeight(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
1542
1543 Menucxx . . $ DMFCBase#Menu..Drawcxx . . $ MenuItem#Draw(d0909ec2d84ff198).(10, (font_height * 8) + 10, font_height + 1,
1544 (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!) ? MenuBackgroundBMPcxx . . $ DMFCBase#MenuBackgroundBMP. : -1);
1545 }
1546
1547 char DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[6][100];
1548 void DMFCBasecxx . . $ DMFCBase#::SetPlayerInfocxx . . $ DMFCBase#SetPlayerInfo(d4f767463ce0a6b3).(int pnum) {
1549 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum)) {
1550 return;
1551 }
1552
1553 m_iPlayerDisplayedcxx . . $ DMFCBase#m_iPlayerDisplayed. = pnum;
1554
1555 int x, y;
1556 char buffer[100];
1557 y = 0;
1558 x = 15;
1559 int index = 0;
1560 bool display_addr = false;
1561
1562 // Print out callsign
1563 snprintf(buffer, sizeof(buffer), "%s (%s)", Playerscxx . . $ DMFCBase#Players.[pnum].callsigncxx . . $ player#callsign., (0 == pnum) ? DTXT_SERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2417:9`! : DTXT_CLIENTcxx . . $ `netgames/dmfc/dmfcinternal.h:2418:9`!);
1564 strcpy(DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index], buffer);
1565 index++;
1566
1567 if (m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams. > 1 && Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. != -1) {
1568 snprintf(buffer, sizeof(buffer), DTXT_TEAMFORMATcxx . . $ `netgames/dmfc/dmfcinternal.h:2419:9`!, GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(GetPlayerTeamcxx . . $ DMFCBase#GetPlayerTeam(7864480464b09eea).(pnum)));
1569 strcpy(DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index], buffer);
1570 index++;
1571 }
1572
1573 // Print out playernum
1574 snprintf(buffer, sizeof(buffer), DTXT_PLRNUMFORMATcxx . . $ `netgames/dmfc/dmfcinternal.h:2420:9`!, pnum);
1575 strcpy(DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index], buffer);
1576 index++;
1577
1578 #ifdef _DEBUGcxx . . $ `<built-in>:480:9`!
1579 display_addr = true;
1580 #endif
1581 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
1582 display_addr = true;
1583
1584 // Print out net address
1585 if (display_addr) {
1586 network_protocolcxx . . $ network_protocol# proto = NP_NONEcxx . . $ NP_NONE.;
1587
1588 if (pnum != GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).())
1589 proto = NetPlayerscxx . . $ DMFCBase#NetPlayers.[pnum].addrcxx . . $ netplayer#addr..connection_typecxx . . $ network_address#connection_type.;
1590 else
1591 proto = NP_TCPcxx . . $ NP_TCP.;
1592
1593 if (proto != NP_NONEcxx . . $ NP_NONE.) {
1594 char string[32];
1595 if (pnum != 0) {
1596 DLLnw_GetNumbersFromHostAddress(&NetPlayerscxx . . $ DMFCBase#NetPlayers.[pnum].addrcxx . . $ netplayer#addr., string);
1597 } else {
1598 int addr = DLLnw_GetThisIP();
1599 network_addresscxx . . $ network_address# local_addr;
1600 memset(&local_addr, 0, sizeof(network_addresscxx . . $ network_address#));
1601 memcpy(local_addr.addresscxx . . $ network_address#address., &addr, sizeof(int));
1602 local_addr.connection_typecxx . . $ network_address#connection_type. = NP_TCPcxx . . $ NP_TCP.;
1603
1604 DLLnw_GetNumbersFromHostAddress(&local_addr, string);
1605 }
1606 strcpy(DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index], string);
1607 index++;
1608 }
1609 }
1610
1611 // Print out Ship info
1612 snprintf(buffer, sizeof(buffer), DTXT_SHIPFORMcxx . . $ `netgames/dmfc/dmfcinternal.h:2422:9`!, Shipscxx . . $ DMFCBase#Ships.[Playerscxx . . $ DMFCBase#Players.[pnum].ship_indexcxx . . $ player#ship_index.].namecxx . . $ ship#name.);
1613 strcpy(DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index], buffer);
1614 index++;
1615
1616 for (; index < 5; index++) {
1617 DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index][0] = '\0';
1618 }
1619 }
1620
1621 void DMFCBasecxx . . $ DMFCBase#::DisplayPlayerInfocxx . . $ DMFCBase#DisplayPlayerInfo(918ebd27a9ddbad3).(int background_bmp, bool dedicated_server) {
1622 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
1623
1624 int height = DLLgrfont_GetHeight(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]) + 1;
1625 // int height = DLLRenderHUDGetTextHeight("X")+1;
1626 ddgr_colorcxx . . $ ddgr_color# color = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(180, 255, 180);
1627 int x, y;
1628 y = 0;
1629 x = 15;
1630 int index = 0;
1631
1632 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(m_iPlayerDisplayedcxx . . $ DMFCBase#m_iPlayerDisplayed.)) {
1633 m_iPlayerDisplayedcxx . . $ DMFCBase#m_iPlayerDisplayed. = -1;
1634 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPPLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2378:9`!);
1635 return;
1636 }
1637
1638 if ((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!) && background_bmp > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
1639 // draw the background bitmap
1640 DLLrend_SetAlphaValue(255 * 0.85f);
1641 DLLrend_SetZBufferState(0);
1642 DLLrend_SetTextureType(TT_LINEARcxx . . $ TT_LINEAR.);
1643 DLLrend_SetLighting(LS_NONEcxx . . $ LS_NONE.);
1644 DLLrend_SetAlphaType(AT_CONSTANT_TEXTUREcxx . . $ `lib/renderer.h:402:9`!);
1645 DLLrend_DrawScaledBitmap(0, 0, *Game_window_wcxx . . $ DMFCBase#Game_window_w., 6 * height, background_bmp, 0, 0, 1, 1, 1.0, -1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1646 DLLrend_SetZBufferState(1);
1647 }
1648
1649 // Print out callsign
1650 // DLLRenderHUDText(color,255,0,x,y,DMFCPlayerInfo[index]); y+=height;
1651 DLLgrtext_SetColor(color);
1652 DLLgrtext_SetAlpha(255);
1653 DLLgrtext_Printf(x, y, DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index]);
1654 y += height;
1655
1656 if (dedicated_server)
1657 DPrintf("%s\n", DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index]);
1658 index++;
1659 color = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(40, 255, 40);
1660
1661 for (; index < 5; index++) {
1662 // DLLRenderHUDText(color,255,0,x,y,DMFCPlayerInfo[index]);
1663 DLLgrtext_SetColor(color);
1664 DLLgrtext_SetAlpha(255);
1665 DLLgrtext_Printf(x, y, DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index]);
1666
1667 if (DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index][0] != '\0')
1668 y += height;
1669 if (dedicated_server)
1670 DPrintf("%s\n", DMFCPlayerInfocxx . . $ DMFCPlayerInfo.[index]);
1671 }
1672
1673 // print out the volatile information
1674 player_recordcxx . . $ player_record# *pr = PRec_GetPRecordByPnumcxx . . $ PRec_GetPRecordByPnum(6359c6f28dd028ae).(m_iPlayerDisplayedcxx . . $ DMFCBase#m_iPlayerDisplayed.);
1675 char temp[150];
1676
1677 if (!pr || pr->statecxx . . $ player_record#state. != STATE_INGAMEcxx . . $ STATE_INGAME.)
1678 return;
1679
1680 int precindex = translate_precptr_to_indexcxx . . $ translate_precptr_to_index(94a7156e227b3396).(pr);
1681 float ti = GetTimeInGamecxx . . $ DMFCBase#GetTimeInGame(5cde91ea12d43f46).(precindex);
1682
1683 snprintf(temp, sizeof(temp), DTXT_PI_TIMEINGAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2471:9`!, GetTimeStringcxx . . $ DMFCBase#GetTimeString(3b344d7a46e3c2ff).(ti));
1684 // DLLRenderHUDText(color,255,0,x,y,temp); y+=height;
1685 DLLgrtext_SetColor(color);
1686 DLLgrtext_SetAlpha(255);
1687 DLLgrtext_Printf(x, y, temp);
1688 y += height;
1689
1690 if (dedicated_server)
1691 DPrintf("%s\n", temp);
1692 }
1693
1694 // DMFCBase::SwitchPlayerInfoDisplay
1695 //
1696 // Switches on/off displaying a Playerinfo
1697 void DMFCBasecxx . . $ DMFCBase#::SwitchPlayerInfoDisplaycxx . . $ DMFCBase#SwitchPlayerInfoDisplay(d4f767463ce0a6b3).(int pnum) {
1698 m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. ^= DMFC_PRF_DISPPLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2378:9`!;
1699 if (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPPLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2378:9`!) {
1700
1701 if (IsDisplayingNetGameInfocxx . . $ DMFCBase#IsDisplayingNetGameInfo(c9857a73d68e59ba).()) // if we are displaying netgame info, turn it off
1702 SwitchNetGameInfoDisplaycxx . . $ DMFCBase#SwitchNetGameInfoDisplay(d4f767463ce0a6b3).(0);
1703
1704 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum)) {
1705 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPPLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2378:9`!);
1706 return;
1707 }
1708 SetPlayerInfocxx . . $ DMFCBase#SetPlayerInfo(d4f767463ce0a6b3).(pnum);
1709 }
1710 }
1711
1712 // DMFCBase::SwitchNetGameInfoDisplay
1713 //
1714 // Switches on/off displaying netgame info
1715 void DMFCBasecxx . . $ DMFCBase#::SwitchNetGameInfoDisplaycxx . . $ DMFCBase#SwitchNetGameInfoDisplay(d4f767463ce0a6b3).(int on) {
1716 if (on)
1717 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_DISPNETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2379:9`!);
1718 else
1719 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPNETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2379:9`!);
1720
1721 if (on) {
1722 if (DisplayingPlayerInfocxx . . $ DMFCBase#DisplayingPlayerInfo(b126dc7c1de90089).() != -1) {
1723 // turn on displaying of player info before displaying netgame info
1724 SwitchPlayerInfoDisplaycxx . . $ DMFCBase#SwitchPlayerInfoDisplay(d4f767463ce0a6b3).(-1);
1725 }
1726 }
1727 }
1728
1729 // DMFCBase::IsDisplayingNetGameInfo
1730 //
1731 // returns true if we are currently displaying netgame info
1732 bool DMFCBasecxx . . $ DMFCBase#::IsDisplayingNetGameInfocxx . . $ DMFCBase#IsDisplayingNetGameInfo(c9857a73d68e59ba).(void) { return (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPNETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2379:9`!) ? true : false; }
1733
1734 // DMFCBase::DisplayingPlayerInfo
1735 //
1736 // Returns the pnum of the player info being displayed, -1 if none
1737 int DMFCBasecxx . . $ DMFCBase#::DisplayingPlayerInfocxx . . $ DMFCBase#DisplayingPlayerInfo(b126dc7c1de90089).(void) {
1738 if (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPPLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2378:9`!)
1739 return m_iPlayerDisplayedcxx . . $ DMFCBase#m_iPlayerDisplayed.;
1740 else
1741 return -1;
1742 }
1743
1744 // DMFCBase::SetTeamName
1745 //
1746 // Sets the team name for a given team
1747 // team: integer value of the team to change
1748 // name: new name for the team
1749 // announce: if this is true, and we are the server, it will tell all the clients about the change
1750 bool DMFCBasecxx . . $ DMFCBase#::SetTeamNamecxx . . $ DMFCBase#SetTeamName(dc3004c27659fe3).(int team, const char *name, bool announce) {
1751 if (team < 0 || team > DLLMAX_TEAMScxx . . $ `netgames/includes/DMFC.h:426:9`!)
1752 return false;
1753 if (!name)
1754 return false;
1755
1756 char old_teamname[MAX_TEAMNAME_LENcxx . . $ `netgames/includes/DMFC.h:443:9`!];
1757 strcpy(old_teamname, DMFC_team_namescxx . . $ DMFCBase#DMFC_team_names.[team]);
1758
1759 strncpy(DMFC_team_namescxx . . $ DMFCBase#DMFC_team_names.[team], name, MAX_TEAMNAME_LENcxx . . $ `netgames/includes/DMFC.h:443:9`! - 1);
1760 DMFC_team_namescxx . . $ DMFCBase#DMFC_team_names.[team][MAX_TEAMNAME_LENcxx . . $ `netgames/includes/DMFC.h:443:9`! - 1] = '\0';
1761
1762 CallOnTeamChangeNamecxx . . $ DMFCBase#CallOnTeamChangeName(5665db83c1ca01b7).(team, old_teamname, DMFC_team_namescxx . . $ DMFCBase#DMFC_team_names.[team]);
1763
1764 if (announce && GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
1765 // tell the clients about the new team name
1766 SendNewTeamNamecxx . . $ DMFCBase#SendNewTeamName(d4f767463ce0a6b3).(team);
1767 DPrintf(DTXT_SETTEAMNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2472:9`!, old_teamname, name);
1768 }
1769
1770 return true;
1771 }
1772
1773 // DMFCBase::GetTeamFromString
1774 //
1775 // Returns the int value of a team based on a string, -1 if not a team
1776 int DMFCBasecxx . . $ DMFCBase#::GetTeamFromStringcxx . . $ DMFCBase#GetTeamFromString(1ef8e6ec083aabb9).(char *str) {
1777 if (!str)
1778 return -1;
1779 for (int i = 0; i < DLLMAX_TEAMScxx . . $ `netgames/includes/DMFC.h:426:9`!; i++) {
1780 if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(str, DMFC_team_names[i]))
1781 return i;
1782 }
1783 return -1;
1784 }
1785
1786 // DMFCBase::GetPlayerNum
1787 //
1788 // Returns your playernum, useful when finding out if an event is referring to you (by looking at
1789 // the playernum passed to the event handler, compared to your playernum
1790 int DMFCBasecxx . . $ DMFCBase#::GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).(void) { return *Player_numcxx . . $ DMFCBase#Player_num.; }
1791
1792 // DMFCBase::GetLocalRole
1793 //
1794 // Returns your role in the multiplayer game. The result returned will be either LR_SERVER or LR_CLIENT
1795 int DMFCBasecxx . . $ DMFCBase#::GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).(void) { return Netgamecxx . . $ DMFCBase#Netgame.->local_rolecxx . . $ netgame_info#local_role.; }
1796
1797 // DMFCBase::CheckPlayerNum
1798 //
1799 // Returns true if the player number passed in is a valid player number (the player is connected)
1800 bool DMFCBasecxx . . $ DMFCBase#::CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(int player_num) {
1801 if ((player_num < 0) || (player_num >= DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!))
1802 return false;
1803 if ((NetPlayerscxx . . $ DMFCBase#NetPlayers.[player_num].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) && (NetPlayerscxx . . $ DMFCBase#NetPlayers.[player_num].sequencecxx . . $ netplayer#sequence. >= NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!))
1804 return true;
1805 else
1806 return false;
1807 }
1808
1809 // DMFCBase::PacketCheckPlayerNum
1810 //
1811 // Returns true if it's ok to send a packet to this player
1812 bool DMFCBasecxx . . $ DMFCBase#::PacketCheckPlayerNumcxx . . $ DMFCBase#PacketCheckPlayerNum(83c267b20bac841a).(int player_num) {
1813 if ((player_num < 0) || (player_num >= DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!))
1814 return false;
1815 if ((NetPlayerscxx . . $ DMFCBase#NetPlayers.[player_num].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) && (NetPlayerscxx . . $ DMFCBase#NetPlayers.[player_num].sequencecxx . . $ netplayer#sequence. >= NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!))
1816 return true;
1817 else
1818 return false;
1819 }
1820
1821 // DMFCBase::CallClientEvent
1822 //
1823 // Server Only. This will send an event to a client for it to execute.
1824 // event = An EVT_CLIENT_*
1825 // me_objnum,it_objnum = Object numbers of the objects to be me and it for the event
1826 // destination = Player number of the client to send to, 0or -1 if to send to all
1827 void DMFCBasecxx . . $ DMFCBase#::CallClientEventcxx . . $ DMFCBase#CallClientEvent(d7a7761809021567).(int event, int me_objnum, int it_objnum, int destination, bool parms) {
1828 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
1829 return;
1830 if ((destination < -1) || (destination > DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!))
1831 return;
1832 DLLMultiSendClientExecuteDLL(event, me_objnum, it_objnum, destination, parms ? Datacxx . . $ DMFCBase#Data. : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
1833 }
1834
1835 // DMFCBase::GetTimeLeft
1836 //
1837 // Server Only. This will fill in the float pointer passed to it with how much time is
1838 // left in the multiplayer game. The value placed in the float is only valid if GetTimeLeft
1839 // returns true. If it returns false it was because either it is not a game with a time limit
1840 // or it is being called on a client.
1841 bool DMFCBasecxx . . $ DMFCBase#::GetTimeLeftcxx . . $ DMFCBase#GetTimeLeft(7f1546a85f5329ec).(float *time) {
1842 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
1843 return false;
1844 if (Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_TIMERcxx . . $ `Descent3/multi_external.h:226:9`!) {
1845 *time = (Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit. * 60.0f) - RealGametimecxx . . $ DMFCBase#RealGametime.;
1846 return true;
1847 }
1848 return false;
1849 }
1850
1851 // DMFCBase::EndLevel
1852 //
1853 // Server Only. This will end the current multiplayer level, and will go on to the next level.
1854 void DMFCBasecxx . . $ DMFCBase#::EndLevelcxx . . $ DMFCBase#EndLevel(49f6e7a06ebc5aa8).(void) {
1855 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
1856 return;
1857 DLLMultiEndLevel();
1858 }
1859
1860 // DMFCBase::GetScoreLimit
1861 //
1862 // Server Only. This will fill in the int pointer passed to it with what the scoring limit
1863 // is, set in in the multiplayer options. The value point into the int is only valid if
1864 // GetScoreLimit returns true. If it returns false it is because you are either not the
1865 // server or this option wasn't set in the multiplayer options
1866 bool DMFCBasecxx . . $ DMFCBase#::GetScoreLimitcxx . . $ DMFCBase#GetScoreLimit(18a3c31ed0aa5760).(int *limit) {
1867 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
1868 return false;
1869 if (Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_KILLGOALcxx . . $ `Descent3/multi_external.h:227:9`!) {
1870 *limit = Netgamecxx . . $ DMFCBase#Netgame.->killgoalcxx . . $ netgame_info#killgoal.;
1871 return true;
1872 }
1873 return false;
1874 }
1875
1876 // DMFCBase::AutoTimeLimit
1877 //
1878 // Server Only. This turns off or on the automatic level ending by DMFC of a timed multiplayer game.
1879 // If you turn it off, it is your responsibility to end a time multiplayer game when it's time
1880 // is up. If it is turned on, DMFC will automatically handle ending the game. By default it is on.
1881 void DMFCBasecxx . . $ DMFCBase#::AutoTimeLimitcxx . . $ DMFCBase#AutoTimeLimit(b45ddcbc8423892c).(bool turnon) {
1882 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
1883 return;
1884 if ((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_TIMERcxx . . $ `Descent3/multi_external.h:226:9`!) == 0)
1885 return;
1886 if (turnon)
1887 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`!);
1888 else
1889 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2375:9`!);
1890 }
1891
1892 // DMFCBase::AutoDeathMessage
1893 //
1894 // This turns on or off DMFC's automatic handling of death messages. If it is turned on (Default)
1895 // then when a player dies it will display a random death message from the list added by you using
1896 // AddDeathMessage. If it is turned off, then it is your responsibility to handle the messages, you
1897 // can use DoRandomDeathMessage to display one when appropriate.
1898 void DMFCBasecxx . . $ DMFCBase#::AutoDeathMessagecxx . . $ DMFCBase#AutoDeathMessage(b45ddcbc8423892c).(bool turnon) {
1899 if (turnon)
1900 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`!);
1901 else
1902 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTODEATHMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2376:9`!);
1903 }
1904
1905 // DMFCBase::AddDeathMessage
1906 //
1907 // This will add a death message to DMFC.
1908 // format = string in a "printf" type format (using %s for player callsigns) of the message
1909 // victim_first = Set this to true if the victim is listed first in the format
1910 void DMFCBasecxx . . $ DMFCBase#::AddDeathMessagecxx . . $ DMFCBase#AddDeathMessage(90ef5b561fbcb8de).(const char *string, bool victim_first) {
1911 if ((m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount. >= 0) && (m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount. < MAX_DEATH_MSGScxx . . $ `netgames/includes/DMFC.h:523:9`!)) {
1912 DeathMsgscxx . . $ DMFCBase#DeathMsgs.[m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount.].messagecxx . . $ tDeathMsg#message. = (char *)malloc(strlen(string) + 1);
1913 if (DeathMsgscxx . . $ DMFCBase#DeathMsgs.[m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount.].messagecxx . . $ tDeathMsg#message.) {
1914 DeathMsgscxx . . $ DMFCBase#DeathMsgs.[m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount.].inusecxx . . $ tDeathMsg#inuse. = true;
1915 DeathMsgscxx . . $ DMFCBase#DeathMsgs.[m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount.].victim_firstcxx . . $ tDeathMsg#victim_first. = victim_first;
1916 strcpy(DeathMsgscxx . . $ DMFCBase#DeathMsgs.[m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount.].messagecxx . . $ tDeathMsg#message., string);
1917 m_iDeathMsgCountcxx . . $ DMFCBase#m_iDeathMsgCount.++;
1918 }
1919 }
1920 }
1921
1922 // DMFCBase::AddSuicideMessage
1923 //
1924 // This will add a death message to DMFC.
1925 // format = string in a "printf" type format (using %s for player callsigns) of the message
1926 void DMFCBasecxx . . $ DMFCBase#::AddSuicideMessagecxx . . $ DMFCBase#AddSuicideMessage(85c52e162fed56f9).(const char *string) {
1927 if ((m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount. >= 0) && (m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount. < MAX_DEATH_MSGScxx . . $ `netgames/includes/DMFC.h:523:9`!)) {
1928 SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount.].messagecxx . . $ tDeathMsg#message. = (char *)malloc(strlen(string) + 1);
1929 if (SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount.].messagecxx . . $ tDeathMsg#message.) {
1930 SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount.].inusecxx . . $ tDeathMsg#inuse. = true;
1931 strcpy(SuicideMsgscxx . . $ DMFCBase#SuicideMsgs.[m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount.].messagecxx . . $ tDeathMsg#message., string);
1932 m_iSuicideMsgCountcxx . . $ DMFCBase#m_iSuicideMsgCount.++;
1933 }
1934 }
1935 }
1936
1937 // DMFCBase::GetItObjNum
1938 //
1939 // Returns the it object number of the current event for use.
1940 int DMFCBasecxx . . $ DMFCBase#::GetItObjNumcxx . . $ DMFCBase#GetItObjNum(b126dc7c1de90089).(void) {
1941 if (Datacxx . . $ DMFCBase#Data.->it_handlecxx . . $ dllinfo#it_handle. == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!)
1942 return -1;
1943
1944 return Datacxx . . $ DMFCBase#Data.->it_handlecxx . . $ dllinfo#it_handle. & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!;
1945 }
1946
1947 // DMFCBase::GetMeObjNum
1948 //
1949 // Returns the me object number of the current event for use.
1950 int DMFCBasecxx . . $ DMFCBase#::GetMeObjNumcxx . . $ DMFCBase#GetMeObjNum(b126dc7c1de90089).(void) {
1951 if (Datacxx . . $ DMFCBase#Data.->me_handlecxx . . $ dllinfo#me_handle. == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!)
1952 return -1;
1953 return Datacxx . . $ DMFCBase#Data.->me_handlecxx . . $ dllinfo#me_handle. & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!;
1954 }
1955
1956 // DMFCBase::OnGameStateRequest
1957 //
1958 // Server only. Override this to listen for Game state requests from the clients
1959 // When this function is called a client (who's player number is passed in) is requesting
1960 // game state information. Do what you need to do to send game state information to that player
1961 void DMFCBasecxx . . $ DMFCBase#::OnGameStateRequestcxx . . $ DMFCBase#OnGameStateRequest(d4f767463ce0a6b3).(int pnum) {
1962 if (pnum == -1)
1963 return;
1964 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "%s is requesting Game State information\n", Players[pnum].callsign);
1965 }
1966
1967 // DMFCBase::GetTeamForNewPlayer
1968 //
1969 // A Helper function (Server only), which will give you the optimum team assignment (whoever has the
1970 // lowest amount of players on their team, for a new player.
1971 // player_num = player number of the new player
1972 // num_teams = The number of teams in your game
1973 int DMFCBasecxx . . $ DMFCBase#::GetTeamForNewPlayercxx . . $ DMFCBase#GetTeamForNewPlayer(9b79fb6aee4c0440).(int player_num, int num_teams) {
1974 if ((player_num < 0) || (player_num >= DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!))
1975 return 0;
1976
1977 // see if it's a dedicated server game, and if so, are we the server
1978 if (IAmDedicatedServercxx . . $ DMFCBase#IAmDedicatedServer(c9857a73d68e59ba).() && (player_num == GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).())) {
1979 return -1; // place on the special "no team"
1980 }
1981
1982 int i;
1983 int *Teams;
1984 Teams = (int *)malloc(sizeof(int) * num_teams);
1985 if (!Teams)
1986 return 0;
1987
1988 for (i = 0; i < num_teams; i++)
1989 Teams[i] = 0;
1990
1991 for (i = 0; i < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; i++) {
1992 if ((i != player_num) && (CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(i)) && (Playerscxx . . $ DMFCBase#Players.[i].teamcxx . . $ player#team. != -1)) {
1993 if (Playerscxx . . $ DMFCBase#Players.[i].teamcxx . . $ player#team. < num_teams)
1994 Teams[Playerscxx . . $ DMFCBase#Players.[i].teamcxx . . $ player#team.]++;
1995 }
1996 }
1997
1998 int low_team, low_count;
1999
2000 low_count = Teams[0];
2001 low_team = 0;
2002
2003 for (i = 0; i < num_teams; i++) {
2004 if (low_count > Teams[i]) {
2005 low_count = Teams[i];
2006 low_team = i;
2007 }
2008 }
2009 free(Teams);
2010 return low_team;
2011 }
2012
2013 // DMFCBase::SetNumberOfTeams
2014 //
2015 // Sets the number of teams to be used in the game. By default there is 1 team (everyone against everyone).
2016 // You can set up to a maximum of 4 teams. Call this function as soon as possible.
2017 // teams = number of teams
2018 void DMFCBasecxx . . $ DMFCBase#::SetNumberOfTeamscxx . . $ DMFCBase#SetNumberOfTeams(d4f767463ce0a6b3).(int teams) {
2019 if ((teams < 1) || (teams > 4))
2020 return;
2021
2022 DLLSetMaxTeams(teams);
2023 DLLMultiPaintGoalRooms(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
2024
2025 m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams. = teams;
2026
2027 char names[DLLMAX_TEAMScxx . . $ `netgames/includes/DMFC.h:426:9`!][MAX_TEAMNAME_LENcxx . . $ `netgames/includes/DMFC.h:443:9`!];
2028 strcpy(names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!));
2029 strcpy(names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!));
2030 if (TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem.) {
2031 switch (m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams.) {
2032 case 2:
2033 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem.->SetStateItemListcxx . . $ MenuItem#SetStateItemList(d49b86907ad5c83b).(m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams., names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!]);
2034 break;
2035 case 3:
2036 strcpy(names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!));
2037 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem.->SetStateItemListcxx . . $ MenuItem#SetStateItemList(d49b86907ad5c83b).(m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams., names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!], names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!]);
2038 break;
2039 case 4:
2040 strcpy(names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!));
2041 strcpy(names[YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!], GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!));
2042 TeamMenuItemcxx . . $ DMFCBase#TeamMenuItem.->SetStateItemListcxx . . $ MenuItem#SetStateItemList(d49b86907ad5c83b).(m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams., names[RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!], names[BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!], names[GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!],
2043 names[YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!]);
2044 break;
2045 }
2046 }
2047 }
2048
2049 // DMFCBase::AutoTeamSelect
2050 //
2051 // Turns on or off DMFC's auto team assignment. If it is on, then when a new player joins, they will
2052 // be placed on the team with fewest players. If it is off, then you must handle that. Defualt on.
2053 void DMFCBasecxx . . $ DMFCBase#::AutoTeamSelectcxx . . $ DMFCBase#AutoTeamSelect(b45ddcbc8423892c).(bool turnon) {
2054 if (turnon)
2055 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!);
2056 else
2057 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!);
2058 }
2059
2060 // DMFCBase::RequestChangeTeams
2061 //
2062 // If you are the server it will make the player change teams. If you
2063 // are a client then it sends a request to the server to change teams
2064 void DMFCBasecxx . . $ DMFCBase#::RequestTeamChangecxx . . $ DMFCBase#RequestTeamChange(6908015b96d379c0).(int team, int pnum, bool spew_on_respawn) {
2065 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum))
2066 return;
2067 if (Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. == -1) // Dedicated server can't change teams
2068 return;
2069 if ((team < 0) || (team >= m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams.))
2070 return;
2071 if (Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. == team)
2072 return;
2073
2074 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
2075 if (!AllowTeamChangecxx . . $ DMFCBase#AllowTeamChange(c9857a73d68e59ba).()) {
2076 return;
2077 }
2078 if (!CallOnCanChangeTeamcxx . . $ DMFCBase#CallOnCanChangeTeam(cf9ef193275fa6d8).(pnum, team)) {
2079 return;
2080 }
2081
2082 Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. = team;
2083 CallOnPlayerChangeTeamcxx . . $ DMFCBase#CallOnPlayerChangeTeam(23bb497e4fbd6c85).(pnum, team, true, spew_on_respawn);
2084 SendTeamAssignmentcxx . . $ DMFCBase#SendTeamAssignment(6908015b96d379c0).(pnum, team, spew_on_respawn);
2085 } else {
2086 if (pnum != GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).())
2087 return;
2088 SendChangeTeamRequestcxx . . $ DMFCBase#SendChangeTeamRequest(918ebd27a9ddbad3).(team, spew_on_respawn);
2089 }
2090 }
2091
2092 // DMFCBase::AddHudItemCallback
2093 //
2094 // Adds an item to the hud. Everytime the hud needs to be updated, it will call the
2095 // handler passed in. The handler must be declared as:
2096 // void func(struct tHUDItem *item);
2097 // type = HI_BITMAP for bitmap, HI_TEXT for a text item
2098 // func = function callback
2099 void DMFCBasecxx . . $ DMFCBase#::AddHUDItemCallbackcxx . . $ DMFCBase#AddHUDItemCallback(97c9b33f56b4265c).(int type, void (*func)(struct tHUDItemcxx . . $ tHUDItem# *)) {
2100 // add all the needed Hud Items
2101 tHUDItemcxx . . $ tHUDItem# item;
2102 switch (type) {
2103 case HI_TEXTcxx . . $ `netgames/includes/DMFC.h:440:9`!:
2104 item.typecxx . . $ tHUDItem#type. = HUD_ITEM_CUSTOMTEXTcxx . . $ `Descent3/hud.h:444:9`!;
2105 break;
2106 case HI_BITMAPcxx . . $ `netgames/includes/DMFC.h:441:9`!:
2107 item.typecxx . . $ tHUDItem#type. = HUD_ITEM_CUSTOMIMAGEcxx . . $ `Descent3/hud.h:445:9`!;
2108 break;
2109 default:
2110 item.typecxx . . $ tHUDItem#type. = HUD_ITEM_CUSTOMTEXTcxx . . $ `Descent3/hud.h:444:9`!;
2111 break;
2112 }
2113 item.statcxx . . $ tHUDItem#stat. = STAT_CUSTOMcxx . . $ `Descent3/hud.h:287:9`!;
2114 item.flagscxx . . $ tHUDItem#flags. = HUD_FLAG_PERSISTANTcxx . . $ `Descent3/hud.h:449:9`!;
2115 item.datacxx . . $ tHUDItem#data..textcxx . . $ tHUDItem#$anonymous_type_1#text. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2116 item.render_fncxx . . $ tHUDItem#render_fn. = func;
2117 item.ycxx . . $ tHUDItem#y. = 0;
2118 item.xcxx . . $ tHUDItem#x. = 0;
2119 DLLAddHUDItem(&item);
2120 }
2121
2122 // DMFCBase::GetMyTeam
2123 //
2124 // Returns the int value of the team you are on...only useful in a team game.
2125 int DMFCBasecxx . . $ DMFCBase#::GetMyTeamcxx . . $ DMFCBase#GetMyTeam(b126dc7c1de90089).(void) { return Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].teamcxx . . $ player#team.; }
2126
2127 // DMFCBase::GetTeamString
2128 //
2129 // Returns a pointer to a string name of a team
2130 // team = integer value of the team
2131 const char *DMFCBasecxx . . $ DMFCBase#::GetTeamStringcxx . . $ DMFCBase#GetTeamString(f7ae7e56280f18ae).(int team) {
2132 static char name[20];
2133
2134 if (team >= 0 && team < DLLMAX_TEAMScxx . . $ `netgames/includes/DMFC.h:426:9`!)
2135 strcpy(name, DMFC_team_namescxx . . $ DMFCBase#DMFC_team_names.[team]);
2136 else
2137 strcpy(name, DTXT_LONERcxx . . $ `netgames/dmfc/dmfcinternal.h:2424:9`!);
2138
2139 return name;
2140 }
2141
2142 // DMFCBase::GetTeamColor
2143 //
2144 // Returns the color components of a team
2145 // team = integer value of the team
2146 ddgr_colorcxx . . $ ddgr_color# DMFCBasecxx . . $ DMFCBase#::GetTeamColorcxx . . $ DMFCBase#GetTeamColor(46cc46841198e427).(int team) {
2147 switch (team) {
2148 case RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!:
2149 return GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 40, 40);
2150 break;
2151 case BLUE_TEAMcxx . . $ `netgames/includes/DMFC.h:428:9`!:
2152 return GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(40, 40, 255);
2153 break;
2154 case GREEN_TEAMcxx . . $ `netgames/includes/DMFC.h:429:9`!:
2155 return GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(40, 255, 40);
2156 break;
2157 case YELLOW_TEAMcxx . . $ `netgames/includes/DMFC.h:430:9`!:
2158 return GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 255, 40);
2159 break;
2160 default:
2161 return GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 255, 255);
2162 break;
2163 }
2164 }
2165
2166 // DMFCBase::GetNumTeams
2167 //
2168 // Returns the number of teams in the game
2169 int DMFCBasecxx . . $ DMFCBase#::GetNumTeamscxx . . $ DMFCBase#GetNumTeams(b126dc7c1de90089).(void) { return m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams.; }
2170
2171 // DMFCBase::AllowTeamChange
2172 //
2173 // Returns true if team changing is allowed
2174 bool DMFCBasecxx . . $ DMFCBase#::AllowTeamChangecxx . . $ DMFCBase#AllowTeamChange(c9857a73d68e59ba).(void) { return (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!) ? true : false; }
2175
2176 // DMFCBase::SwitchAllowTeamChange
2177 //
2178 // Turns on/off allowing of team changing
2179 void DMFCBasecxx . . $ DMFCBase#::SwitchAllowTeamChangecxx . . $ DMFCBase#SwitchAllowTeamChange(b45ddcbc8423892c).(bool turnon) {
2180 if (turnon)
2181 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!);
2182 else
2183 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_CANTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2385:9`!);
2184 }
2185
2186 // DMFCBase::IsMenuUp
2187 //
2188 // Returns true if the on screen menu is being shown
2189 bool DMFCBasecxx . . $ DMFCBase#::IsMenuUpcxx . . $ DMFCBase#IsMenuUp(c9857a73d68e59ba).(void) { return (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_INOPTIONScxx . . $ `netgames/dmfc/dmfcinternal.h:2384:9`!) ? true : false; }
2190
2191 // DMFCBase::ClipString
2192 //
2193 // Given a width, the string will be clipped to that width. If you pass true for arrow, then an arrow will be
2194 // appended if the string has been clipped. Based off current font
2195 void DMFCBasecxx . . $ DMFCBase#::ClipStringcxx . . $ DMFCBase#ClipString(8677479218165cd4).(int width, char *string, bool arrow) {
2196 if (!string)
2197 return;
2198
2199 // float ratio = DEFAULT_HUD_WIDTH / ((float)*Game_window_w);
2200
2201 int string_length = strlen(string);
2202 char arrow_string[2];
2203 int arrow_length = 0;
2204 snprintf(arrow_string, sizeof(arrow_string), "%c", CHAR_RIGHT_ARROWcxx . . $ `netgames/includes/DMFC.h:462:9`!);
2205 if (arrow) {
2206 // arrow_length = ratio * ((float)DLLRenderHUDGetTextLineWidth(arrow_string));
2207 arrow_length = DLLgrtext_GetTextLineWidth(arrow_string);
2208 }
2209
2210 if (width < arrow_length) {
2211 // Nothing can fit
2212 strcpy(string, "");
2213 return;
2214 }
2215
2216 // adjust width based on the arrow
2217 width -= arrow_length;
2218
2219 int size = 0;
2220 char save = string[0];
2221 while (size < string_length) {
2222 string[size] = '\0';
2223 // if((((float)DLLRenderHUDGetTextLineWidth(string))*ratio)>=width){
2224 if (DLLgrtext_GetTextLineWidth(string) >= width) {
2225 // We have to clip
2226 size--;
2227 if (arrow) {
2228 string[size] = CHAR_RIGHT_ARROWcxx . . $ `netgames/includes/DMFC.h:462:9`!;
2229 string[size + 1] = '\0';
2230 }
2231 return;
2232 }
2233 // replace the char and move to the next
2234 string[size] = save;
2235 size++;
2236 save = string[size];
2237 }
2238 // The string didn't need to be clipped
2239 }
2240
2241 // DMFCBase::ConvertHUDAlpha
2242 //
2243 // Returns a converted alpha based on what you give, it will be a more transparent if the onscreen menu is up
2244 float DMFCBasecxx . . $ DMFCBase#::ConvertHUDAlphacxx . . $ DMFCBase#ConvertHUDAlpha(fbcf3211dfe1bfd1).(float normal) {
2245 if (!IsMenuUpcxx . . $ DMFCBase#IsMenuUp(c9857a73d68e59ba).())
2246 return normal;
2247 return normal * 0.3f;
2248 }
2249 uint8_tcxx . . $ uint8_t# DMFCBasecxx . . $ DMFCBase#::ConvertHUDAlphacxx . . $ DMFCBase#ConvertHUDAlpha(50106d451684defa).(uint8_tcxx . . $ uint8_t# normal) {
2250 if (!IsMenuUpcxx . . $ DMFCBase#IsMenuUp(c9857a73d68e59ba).())
2251 return normal;
2252
2253 float conv = ((float)normal);
2254 conv = conv * 0.3f;
2255 return (uint8_tcxx . . $ uint8_t#)conv;
2256 }
2257
2258 bool DMFCBasecxx . . $ DMFCBase#::DMFC_compare_slotscxx . . $ DMFCBase#DMFC_compare_slots(cf9ef193275fa6d8).(int a, int b) {
2259 int ascore, bscore;
2260 player_recordcxx . . $ player_record# *apr, *bpr;
2261 apr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(a);
2262 bpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(b);
2263 if (!apr)
2264 return true;
2265 if (!bpr)
2266 return false;
2267 if (apr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.)
2268 return true;
2269 if (bpr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.)
2270 return false;
2271 if ((apr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) && (bpr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)) {
2272 // both players were in the game
2273 ascore = apr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] - apr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!];
2274 bscore = bpr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] - bpr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!];
2275 return (ascore < bscore);
2276 }
2277 if ((apr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) && (bpr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.)) {
2278 // apr gets priority since he was in the game on exit
2279 return false;
2280 }
2281 if ((apr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) && (bpr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)) {
2282 // bpr gets priority since he was in the game on exit
2283 return true;
2284 }
2285 // if we got here then both players were disconnected
2286 ascore = apr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] - apr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!];
2287 bscore = bpr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] - bpr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!];
2288 return (ascore < bscore);
2289 }
2290
2291 // kills/(kills+deaths+suicides)
2292 bool DMFCBasecxx . . $ DMFCBase#::DMFC_compare_slots_efficiencycxx . . $ DMFCBase#DMFC_compare_slots_efficiency(cf9ef193275fa6d8).(int a, int b) {
2293 int ascore, bscore;
2294 player_recordcxx . . $ player_record# *apr, *bpr;
2295 float atemp, btemp;
2296
2297 apr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(a);
2298 bpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(b);
2299 if (!apr)
2300 return true;
2301 if (!bpr)
2302 return false;
2303 if (apr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.)
2304 return true;
2305 if (bpr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.)
2306 return false;
2307 if ((apr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) && (bpr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)) {
2308 // both players were in the game
2309 atemp =
2310 (float)(apr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + apr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + apr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]);
2311 ascore = (float)(apr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]) / ((atemp) ? atemp : 0.0000001f);
2312
2313 btemp =
2314 (float)(bpr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + bpr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + bpr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]);
2315 bscore = (float)(bpr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]) / ((btemp) ? btemp : 0.0000001f);
2316 return (ascore < bscore);
2317 }
2318 if ((apr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) && (bpr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.)) {
2319 // apr gets priority since he was in the game on exit
2320 return false;
2321 }
2322 if ((apr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) && (bpr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)) {
2323 // bpr gets priority since he was in the game on exit
2324 return true;
2325 }
2326 // if we got here then both players were disconnected
2327 atemp = (float)(apr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + apr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + apr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]);
2328 ascore = (float)(apr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]) / ((atemp) ? atemp : 0.0000001f);
2329
2330 btemp = (float)(bpr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + bpr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] + bpr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]);
2331 bscore = (float)(bpr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!]) / ((btemp) ? btemp : 0.0000001f);
2332 return (ascore < bscore);
2333 }
2334
2335 // DMFCBase::GetSortedPlayerSlots
2336 //
2337 // Fills in the passed array (of size maxsize) with the playernums sorted by (kills-suicides)
2338 void DMFCBasecxx . . $ DMFCBase#::GetSortedPlayerSlotscxx . . $ DMFCBase#GetSortedPlayerSlots(621ccea12ecf5b06).(int *sortedindex, int maxsize) {
2339 int t;
2340 int i, j;
2341 int tempsort[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!];
2342
2343 // copy scores into scoreinfo array
2344 for (i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) {
2345 tempsort[i] = i;
2346 }
2347
2348 for (i = 1; i <= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! - 1; i++) {
2349 t = tempsort[i];
2350
2351 // Shift elements down until
2352 // insertion point found.
2353 for (j = i - 1; j >= 0 && DMFC_compare_slotscxx . . $ DMFCBase#DMFC_compare_slots(cf9ef193275fa6d8).(tempsort[j], t); j--) {
2354 tempsort[j + 1] = tempsort[j];
2355 }
2356
2357 // insert
2358 tempsort[j + 1] = t;
2359 }
2360
2361 if (maxsize < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!)
2362 memcpy(sortedindex, tempsort, maxsize * sizeof(int));
2363 else
2364 memcpy(sortedindex, tempsort, MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! * sizeof(int));
2365 }
2366
2367 // DMFCBase::GetSortedPlayerSlotsByEfficiency
2368 //
2369 // Fills in the passed array (of size maxsize) with the playernums sorted by kills/(kills+deaths+suicides)
2370 void DMFCBasecxx . . $ DMFCBase#::GetSortedPlayerSlotsByEfficiencycxx . . $ DMFCBase#GetSortedPlayerSlotsByEfficiency(621ccea12ecf5b06).(int *sortedindex, int maxsize) {
2371 int t;
2372 int i, j;
2373 int tempsort[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!];
2374
2375 // copy scores into scoreinfo array
2376 for (i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) {
2377 tempsort[i] = i;
2378 }
2379
2380 for (i = 1; i <= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! - 1; i++) {
2381 t = tempsort[i];
2382
2383 // Shift elements down until
2384 // insertion point found.
2385 for (j = i - 1; j >= 0 && DMFC_compare_slots_efficiencycxx . . $ DMFCBase#DMFC_compare_slots_efficiency(cf9ef193275fa6d8).(tempsort[j], t); j--) {
2386 tempsort[j + 1] = tempsort[j];
2387 }
2388
2389 // insert
2390 tempsort[j + 1] = t;
2391 }
2392
2393 if (maxsize < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!)
2394 memcpy(sortedindex, tempsort, maxsize * sizeof(int));
2395 else
2396 memcpy(sortedindex, tempsort, MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! * sizeof(int));
2397 }
2398
2399 // DMFCBase::DisplayOutrageLogo(void)
2400 //
2401 // Displays the Outrage Logo for 5 seconds (call repeatedly, after 5 seconds it will just short circuit)
2402 // Doesn't do anything for non-Outrage games
2403 void DMFCBasecxx . . $ DMFCBase#::DisplayOutrageLogocxx . . $ DMFCBase#DisplayOutrageLogo(49f6e7a06ebc5aa8).(void) {
2404 if (!m_bDisplayOutrageLogocxx . . $ DMFCBase#m_bDisplayOutrageLogo.)
2405 return;
2406
2407 #ifdef OUTRAGE_VERSIONcxx . . $ `<built-in>:477:9`!
2408 static bool done = false;
2409 static float time = 0;
2410 static bool loadflag = true;
2411 static chunked_bitmapcxx . . $ chunked_bitmap# bmp;
2412
2413 if (done)
2414 return;
2415
2416 if (loadflag) {
2417 // We need to load the handle
2418 loadflag = false;
2419 int temp = DLLbm_AllocLoadFileBitmap("Outlogo.ogf", 0, BITMAP_FORMAT_1555cxx . . $ `lib/bitmap.h:56:9`!);
2420 DLLbm_CreateChunkedBitmap(temp, &bmp);
2421 DLLbm_FreeBitmap(temp);
2422 time = 0;
2423 }
2424
2425 // draw the Outrage Logo if its time
2426 if (time < 5.0) {
2427 int x, y;
2428 x = (*Game_window_wcxx . . $ DMFCBase#Game_window_w.) - bmp.pwcxx . . $ chunked_bitmap#pw.;
2429 y = (*Game_window_hcxx . . $ DMFCBase#Game_window_h.) - bmp.phcxx . . $ chunked_bitmap#ph.;
2430 DLLrend_DrawScaledChunkedBitmap(&bmp, x, y, bmp.pwcxx . . $ chunked_bitmap#pw., bmp.phcxx . . $ chunked_bitmap#ph., 128);
2431 time += (*Frametimecxx . . $ DMFCBase#Frametime.);
2432 } else {
2433 // we are done
2434 done = true;
2435 DLLbm_DestroyChunkedBitmap(&bmp);
2436 }
2437 #endif
2438 }
2439
2440 // DMFCBase::SwitchShowHudCallsignLevel
2441 //
2442 //
2443 // Sets the level for displaying of Player's Callsigns on the HUD
2444 void DMFCBasecxx . . $ DMFCBase#::SwitchShowHudCallsignLevelcxx . . $ DMFCBase#SwitchShowHudCallsignLevel(f2ac3508b56cd10).(uint8_tcxx . . $ uint8_t# level, bool announce) {
2445 m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel. = level;
2446
2447 if (level > m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel.)
2448 level = m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel.;
2449
2450 if (m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel. == level)
2451 return;
2452
2453 m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel. = level;
2454
2455 switch (level) {
2456 case HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!:
2457 DLLPlayerSetHUDNameFOV(10);
2458 if (announce)
2459 DLLAddHUDMessage(DTXT_HUDLEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2473:9`!);
2460 break;
2461 case HUD_CALLSIGN_LEVEL_TEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2777:9`!:
2462 DLLPlayerSetHUDNameFOV(10);
2463 if (announce)
2464 DLLAddHUDMessage(DTXT_HUDLEVEL_TEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2474:9`!);
2465 break;
2466 case HUD_CALLSIGN_LEVEL_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2778:9`!:
2467 DLLPlayerSetHUDNameFOV(-1);
2468 if (announce)
2469 DLLAddHUDMessage(DTXT_HUDLEVEL_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2475:9`!);
2470 break;
2471 default:
2472 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC: Invalid HUD Name Level\n");
2473 return;
2474 break;
2475 };
2476 }
2477
2478 // DMFCBase::SwitchServerHudCallsignLevel
2479 //
2480 //
2481 // Sets the max level of HUD callsign displayage...determined by the server
2482 void DMFCBasecxx . . $ DMFCBase#::SwitchServerHudCallsignLevelcxx . . $ DMFCBase#SwitchServerHudCallsignLevel(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# level) {
2483 switch (level) {
2484 case HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!:
2485 m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel. = level;
2486 DLLAddHUDMessage(DTXT_SHUDLEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2476:9`!);
2487 break;
2488 case HUD_CALLSIGN_LEVEL_TEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2777:9`!:
2489 m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel. = level;
2490 DLLAddHUDMessage(DTXT_SHUDLEVEL_TEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2477:9`!);
2491 break;
2492 case HUD_CALLSIGN_LEVEL_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2778:9`!:
2493 m_iServerHUDCallsignLevelcxx . . $ DMFCBase#m_iServerHUDCallsignLevel. = level;
2494 DLLAddHUDMessage(DTXT_SHUDLEVEL_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2478:9`!);
2495 break;
2496 default:
2497 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC: Invalid Server HUD Name Level\n");
2498 return;
2499 break;
2500 }
2501
2502 // make sure we're not set higher than the server allows
2503 SwitchShowHudCallsignLevelcxx . . $ DMFCBase#SwitchShowHudCallsignLevel(f2ac3508b56cd10).(m_iMyPreferredHUDCallsignLevelcxx . . $ DMFCBase#m_iMyPreferredHUDCallsignLevel.);
2504
2505 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
2506 SendDMFCGameInfocxx . . $ DMFCBase#SendDMFCGameInfo(d4f767463ce0a6b3).(SP_ALLcxx . . $ `netgames/includes/DMFC.h:435:9`!);
2507 }
2508
2509 // DMFCBase::ShouldIDisplayHUDName
2510 //
2511 // Given a player num, it will determine if the callsign should be drawn on the HUD
2512 bool DMFCBasecxx . . $ DMFCBase#::ShouldIDisplayHUDNamecxx . . $ DMFCBase#ShouldIDisplayHUDName(83c267b20bac841a).(int pnum) {
2513 switch (m_iMyCurrentHUDCallsignLevelcxx . . $ DMFCBase#m_iMyCurrentHUDCallsignLevel.) {
2514 case HUD_CALLSIGN_LEVEL_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2776:9`!:
2515 return true;
2516 break;
2517 case HUD_CALLSIGN_LEVEL_TEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2777:9`!: {
2518 // see if this is a team game
2519 if (GetNumTeamscxx . . $ DMFCBase#GetNumTeams(b126dc7c1de90089).() >= 2) {
2520 // ok it's a team game, see if this player is on my team, if so, than disply
2521 if (Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. == GetMyTeamcxx . . $ DMFCBase#GetMyTeam(b126dc7c1de90089).()) {
2522 return true;
2523 } else {
2524 return false;
2525 }
2526 }
2527 return false;
2528 } break;
2529 case HUD_CALLSIGN_LEVEL_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2778:9`!:
2530 return false;
2531 break;
2532 }
2533 return false;
2534 }
2535
2536 // DMFCBase::GetCounterMeasureOwner
2537 //
2538 //
2539 // Given a counter measure it will determine the pnum of it's owner...if it can't find it, it returns -1
2540 int DMFCBasecxx . . $ DMFCBase#::GetCounterMeasureOwnercxx . . $ DMFCBase#GetCounterMeasureOwner(2da2a862cad4c994).(objectcxx . . $ object# *robot) {
2541 if (!robot)
2542 return -1;
2543
2544 if (robot->typecxx . . $ object#type. != OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`! && (!(robot->typecxx . . $ object#type. == OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`! && robot->ai_infocxx . . $ object#ai_info.)))
2545 return -1;
2546
2547 objectcxx . . $ object# *killer;
2548 DLLGetUltimateParentForObject(&killer, robot);
2549
2550 if (killer == robot)
2551 return -1;
2552
2553 if ((killer->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) && (killer->typecxx . . $ object#type. != OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!))
2554 return -1;
2555
2556 return killer->idcxx . . $ object#id.;
2557 }
2558
2559 // DMFCBase::EncryptData
2560 //
2561 // Encrypts (weak) a buffer of data
2562 void DMFCBasecxx . . $ DMFCBase#::EncryptDatacxx . . $ DMFCBase#EncryptData(fc0f0e1646c32816).(uint8_tcxx . . $ uint8_t# *data, int size) {
2563 if (!data)
2564 return;
2565 if (size <= 0)
2566 return;
2567
2568 int offset = size;
2569
2570 for (int i = 0; i < size; i++) {
2571 data[i] = data[i] + i - (offset + i);
2572 offset++;
2573 }
2574 }
2575
2576 // DMFCBase::DecryptData
2577 //
2578 // Decrypts a buffer of data
2579 void DMFCBasecxx . . $ DMFCBase#::DecryptDatacxx . . $ DMFCBase#DecryptData(fc0f0e1646c32816).(uint8_tcxx . . $ uint8_t# *data, int size) {
2580 if (!data)
2581 return;
2582 if (size <= 0)
2583 return;
2584
2585 int offset = size;
2586
2587 for (int i = 0; i < size; i++) {
2588 data[i] = data[i] - i + (offset + i);
2589 offset++;
2590 }
2591 }
2592
2593 void DMFCBasecxx . . $ DMFCBase#::VersionCheckcxx . . $ DMFCBase#VersionCheck(d4f767463ce0a6b3).(int pnum) { SendVersionToClientcxx . . $ DMFCBase#SendVersionToClient(d4f767463ce0a6b3).(pnum); }
2594
2595 // DMFCBase::FindPInfo
2596 //
2597 // Given a player number it will search the list and find that player, returning the pointer, or NULL if it
2598 // can't be found or created
2599 PInfocxx . . $ PInfo# *DMFCBasecxx . . $ DMFCBase#::FindPInfocxx . . $ DMFCBase#FindPInfo(63a4ce93a6a08762).(int pnum) {
2600 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!((pnum >= 0) && (pnum < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!));
2601 player_recordcxx . . $ player_record# *pr = GetPlayerRecordByPnumcxx . . $ DMFCBase#GetPlayerRecordByPnum(6359c6f28dd028ae).(pnum);
2602 if (!pr)
2603 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2604 return pr->pinfocxx . . $ player_record#pinfo.;
2605 }
2606
2607 // DMFCBase::UpdatePInfo
2608 //
2609 //
2610 // Updates a victim's pinfo stat (pass in player nums)
2611 void DMFCBasecxx . . $ DMFCBase#::UpdatePInfocxx . . $ DMFCBase#UpdatePInfo(b1146eedae1e1d0b).(int victim, int killer, int amount) {
2612 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!((victim >= 0) || (victim < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!) || (killer >= 0) || (killer < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!));
2613 if ((victim < 0) || (victim >= DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!) || (killer < 0) || (killer >= DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!)) {
2614
2615 return;
2616 }
2617
2618 PInfocxx . . $ PInfo# *id;
2619 int victim_slot = PRec_GetPlayerSlotcxx . . $ PRec_GetPlayerSlot(7864480464b09eea).(victim);
2620 tPKillerInfocxx . . $ tPKillerInfo# ki;
2621
2622 memset(&ki, 0, sizeof(tPKillerInfocxx . . $ tPKillerInfo#));
2623 id = FindPInfocxx . . $ DMFCBase#FindPInfo(63a4ce93a6a08762).(killer);
2624
2625 if ((id == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) || (victim_slot == -1)) {
2626 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to find PInfos\n");
2627 return;
2628 }
2629
2630 // update killer
2631 ki.killscxx . . $ tPKillerInfo#kills. = amount;
2632 id->Updatecxx . . $ PInfo#Update(5b087d8044ce5dfc).(victim_slot, &ki);
2633
2634 PInfocxx . . $ PInfo# *kpi, *vpi;
2635 kpi = id;
2636 vpi = FindPInfocxx . . $ DMFCBase#FindPInfo(63a4ce93a6a08762).(victim);
2637 int killer_slot = PRec_GetPlayerSlotcxx . . $ PRec_GetPlayerSlot(7864480464b09eea).(killer);
2638
2639 if ((vpi == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) || (killer_slot == -1)) {
2640 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to find PInfos\n");
2641 return;
2642 }
2643
2644 if (victim != killer) {
2645 // regular kill
2646 kpi->HandleKillcxx . . $ PInfo#HandleKill(d4f767463ce0a6b3).(victim_slot);
2647 vpi->HandleDeathcxx . . $ PInfo#HandleDeath(d4f767463ce0a6b3).(killer_slot);
2648 } else {
2649 // suicide
2650 kpi->HandleSuicidecxx . . $ PInfo#HandleSuicide(49f6e7a06ebc5aa8).();
2651 }
2652 }
2653
2654 // DMFCBase::ResetPInfo
2655 //
2656 //
2657 // Resets all the PInfo stats (and frees memory)
2658 void DMFCBasecxx . . $ DMFCBase#::ResetPInfocxx . . $ DMFCBase#ResetPInfo(49f6e7a06ebc5aa8).(void) {
2659 for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) {
2660 player_recordcxx . . $ player_record# *pr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(i);
2661 if (pr && pr->pinfocxx . . $ player_record#pinfo.) {
2662 pr->pinfocxx . . $ player_record#pinfo.->ResetAllcxx . . $ PInfo#ResetAll(49f6e7a06ebc5aa8).();
2663 }
2664 }
2665 }
2666
2667 // DMFCBase::WriteDMFCStatsToFile
2668 //
2669 //
2670 // This function will write out DMFC's stats to the file given (it must be opened for writing)
2671 void DMFCBasecxx . . $ DMFCBase#::WriteDMFCStatsToFilecxx . . $ DMFCBase#WriteDMFCStatsToFile(3639e799710acb68).(CFILEcxx . . $ CFILE# *file) {
2672 #define BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`! 150
2673 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(file != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
2674 char buffer[BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`!];
2675 player_recordcxx . . $ player_record# *pr, *dpr;
2676 tPInfoStatcxx . . $ tPInfoStat# stat;
2677 int count, length;
2678
2679 count = 1;
2680
2681 for (int p = 0; p < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; p++) {
2682 pr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(p);
2683 if (pr && pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.) {
2684 // Write out header
2685 snprintf(buffer, sizeof(buffer), "%d) %s%s", count, (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) ? "" : "*", pr->callsigncxx . . $ player_record#callsign.);
2686 DLLcf_WriteString(file, buffer);
2687 length = strlen(buffer);
2688 memset(buffer, '=', length);
2689 buffer[length] = '\0';
2690 DLLcf_WriteString(file, buffer);
2691
2692 if (FindPInfoStatFirstcxx . . $ DMFCBase#FindPInfoStatFirst(e8124cb919632806).(p, &stat)) {
2693 char tempbuffer[25];
2694 snprintf(buffer, sizeof(buffer), "%s", DTXT_DMFC_STAT_HEADERcxx . . $ `netgames/dmfc/dmfcinternal.h:2479:9`!);
2695 DLLcf_WriteString(file, buffer);
2696 memset(buffer, ' ', BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`!);
2697 dpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(stat.slotcxx . . $ tPInfoStat#slot.);
2698
2699 snprintf(tempbuffer, sizeof(tempbuffer), "%s", dpr->callsigncxx . . $ player_record#callsign.);
2700 memcpy(buffer, tempbuffer, strlen(tempbuffer));
2701
2702 snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.killscxx . . $ tPInfoStat#kills.);
2703 memcpy(&buffer[30], tempbuffer, strlen(tempbuffer));
2704
2705 snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.deathscxx . . $ tPInfoStat#deaths.);
2706 memcpy(&buffer[40], tempbuffer, strlen(tempbuffer));
2707
2708 int pos;
2709 pos = 40 + strlen(tempbuffer) + 1;
2710 if (pos < BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`!)
2711 buffer[pos] = '\0';
2712
2713 buffer[BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`! - 1] = '\0';
2714 DLLcf_WriteString(file, buffer);
2715
2716 while (FindPInfoStatNextcxx . . $ DMFCBase#FindPInfoStatNext(4ead3766c292904).(&stat)) {
2717 memset(buffer, ' ', BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`!);
2718 dpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(stat.slotcxx . . $ tPInfoStat#slot.);
2719
2720 snprintf(tempbuffer, sizeof(tempbuffer), "%s", dpr->callsigncxx . . $ player_record#callsign.);
2721 memcpy(buffer, tempbuffer, strlen(tempbuffer));
2722
2723 snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.killscxx . . $ tPInfoStat#kills.);
2724 memcpy(&buffer[30], tempbuffer, strlen(tempbuffer));
2725
2726 snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.deathscxx . . $ tPInfoStat#deaths.);
2727 memcpy(&buffer[40], tempbuffer, strlen(tempbuffer));
2728
2729 int pos;
2730 pos = 40 + strlen(tempbuffer) + 1;
2731 if (pos < BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`!)
2732 buffer[pos] = '\0';
2733
2734 buffer[BUFSIZEcxx . . $ `netgames/dmfc/dmfcbase.cpp:2672:9`! - 1] = '\0';
2735 DLLcf_WriteString(file, buffer);
2736 }
2737 }
2738 FindPInfoStatClosecxx . . $ DMFCBase#FindPInfoStatClose(49f6e7a06ebc5aa8).();
2739 DLLcf_WriteString(file, ""); // skip a line
2740 count++;
2741 }
2742 }
2743 }
2744
2745 tPInfoStatcxx . . $ tPInfoStat# _CurrentPInfoStatcxx . . $ _CurrentPInfoStat.;
2746 int _CurrentPInfoSlotcxx . . $ _CurrentPInfoSlot. = -1;
2747 bool _DoneWithKillscxx . . $ _DoneWithKills. = false;
2748 bool _SlotsUsedcxx . . $ _SlotsUsed.[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!];
2749
2750 // DMFCBase::FindPInfoStatFirst
2751 //
2752 // Fills in a tPInfoStat that contains information about a given player record slot. Returns true on success, false
2753 // if there is no information available for the given slot. Call this first, then follow with repeated calls to
2754 // FindPInfoStatNext until you get a false value returned...call FindPInfoStatClose when done.
2755 bool DMFCBasecxx . . $ DMFCBase#::FindPInfoStatFirstcxx . . $ DMFCBase#FindPInfoStatFirst(e8124cb919632806).(int slot, tPInfoStatcxx . . $ tPInfoStat# *stat) {
2756 for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++)
2757 _SlotsUsedcxx . . $ _SlotsUsed.[i] = false;
2758
2759 if (slot < 0 || slot >= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!)
2760 return false;
2761
2762 if (!stat)
2763 return false;
2764
2765 FindPInfoStatClosecxx . . $ DMFCBase#FindPInfoStatClose(49f6e7a06ebc5aa8).();
2766
2767 player_recordcxx . . $ player_record# *pr, *dpr;
2768 tPKillerInfocxx . . $ tPKillerInfo# *killer, *victim;
2769 int deaths;
2770
2771 _SlotsUsedcxx . . $ _SlotsUsed.[slot] = true;
2772 _CurrentPInfoSlotcxx . . $ _CurrentPInfoSlot. = slot;
2773 memset(&_CurrentPInfoStatcxx . . $ _CurrentPInfoStat., 0, sizeof(tPInfoStatcxx . . $ tPInfoStat#));
2774
2775 // return the given slot
2776 pr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(slot);
2777 if (!pr || pr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY. || !pr->pinfocxx . . $ player_record#pinfo.)
2778 return false;
2779
2780 killer = pr->pinfocxx . . $ player_record#pinfo.->GetFirstKillercxx . . $ PInfo#GetFirstKiller(b31d3e412c1354e2).();
2781 victim = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2782
2783 if (!killer) {
2784 _DoneWithKillscxx . . $ _DoneWithKills. = true;
2785 // go through the slots looking for deaths
2786 for (int p = 0; p < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; p++) {
2787 if (!_SlotsUsedcxx . . $ _SlotsUsed.[p]) {
2788 _SlotsUsedcxx . . $ _SlotsUsed.[p] = true;
2789 dpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(p);
2790 deaths = 0;
2791 if (dpr && dpr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY. && dpr->pinfocxx . . $ player_record#pinfo.) {
2792 victim = ((PInfocxx . . $ PInfo# *)dpr->pinfocxx . . $ player_record#pinfo.)->GetKillerInfocxx . . $ PInfo#GetKillerInfo(ffb103d8d7d108f5).(slot);
2793 if (victim)
2794 deaths = victim->killscxx . . $ tPKillerInfo#kills.;
2795 }
2796 if (deaths > 0) {
2797 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..slotcxx . . $ tPInfoStat#slot. = p;
2798 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..killscxx . . $ tPInfoStat#kills. = 0;
2799 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..deathscxx . . $ tPInfoStat#deaths. = deaths;
2800 memcpy(stat, &_CurrentPInfoStatcxx . . $ _CurrentPInfoStat., sizeof(tPInfoStatcxx . . $ tPInfoStat#));
2801 return true;
2802 }
2803 }
2804 }
2805 return false;
2806 }
2807
2808 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..slotcxx . . $ tPInfoStat#slot. = killer->slotcxx . . $ tPKillerInfo#slot.;
2809 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..killscxx . . $ tPInfoStat#kills. = killer->killscxx . . $ tPKillerInfo#kills.;
2810
2811 deaths = 0;
2812 dpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(killer->slotcxx . . $ tPKillerInfo#slot.);
2813 if (dpr && dpr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY. && dpr->pinfocxx . . $ player_record#pinfo.) {
2814 victim = ((PInfocxx . . $ PInfo# *)dpr->pinfocxx . . $ player_record#pinfo.)->GetKillerInfocxx . . $ PInfo#GetKillerInfo(ffb103d8d7d108f5).(slot);
2815 }
2816
2817 if (victim)
2818 deaths = victim->killscxx . . $ tPKillerInfo#kills.;
2819
2820 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..deathscxx . . $ tPInfoStat#deaths. = deaths;
2821 _SlotsUsedcxx . . $ _SlotsUsed.[killer->slotcxx . . $ tPKillerInfo#slot.] = true;
2822
2823 memcpy(stat, &_CurrentPInfoStatcxx . . $ _CurrentPInfoStat., sizeof(tPInfoStatcxx . . $ tPInfoStat#));
2824 return true;
2825 }
2826
2827 // DMFCBase::FindPInfoStatNext
2828 //
2829 // Call this repeatedly until you get a value of false, finish by calling FindPInfoStatClose
2830 bool DMFCBasecxx . . $ DMFCBase#::FindPInfoStatNextcxx . . $ DMFCBase#FindPInfoStatNext(4ead3766c292904).(tPInfoStatcxx . . $ tPInfoStat# *stat) {
2831 if (_CurrentPInfoSlotcxx . . $ _CurrentPInfoSlot. == -1)
2832 return false;
2833 if (!stat)
2834 return false;
2835
2836 int slot;
2837 player_recordcxx . . $ player_record# *pr, *dpr;
2838 slot = _CurrentPInfoSlotcxx . . $ _CurrentPInfoSlot.;
2839 tPKillerInfocxx . . $ tPKillerInfo# *killer, *victim;
2840 int deaths = 0;
2841 memset(&_CurrentPInfoStatcxx . . $ _CurrentPInfoStat., 0, sizeof(tPInfoStatcxx . . $ tPInfoStat#));
2842
2843 // return the given slot
2844 pr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(slot);
2845 if (!pr || pr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY. || !pr->pinfocxx . . $ player_record#pinfo.)
2846 return false;
2847
2848 killer = pr->pinfocxx . . $ player_record#pinfo.->GetNextKillercxx . . $ PInfo#GetNextKiller(b31d3e412c1354e2).();
2849 victim = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2850
2851 if (!killer) {
2852 _DoneWithKillscxx . . $ _DoneWithKills. = true;
2853 // go through the slots looking for deaths
2854 for (int p = 0; p < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; p++) {
2855 if (!_SlotsUsedcxx . . $ _SlotsUsed.[p]) {
2856 _SlotsUsedcxx . . $ _SlotsUsed.[p] = true;
2857 dpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(p);
2858 deaths = 0;
2859 if (dpr && dpr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY. && dpr->pinfocxx . . $ player_record#pinfo.) {
2860 victim = ((PInfocxx . . $ PInfo# *)dpr->pinfocxx . . $ player_record#pinfo.)->GetKillerInfocxx . . $ PInfo#GetKillerInfo(ffb103d8d7d108f5).(slot);
2861 if (victim)
2862 deaths = victim->killscxx . . $ tPKillerInfo#kills.;
2863 }
2864 if (deaths > 0) {
2865 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..slotcxx . . $ tPInfoStat#slot. = p;
2866 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..killscxx . . $ tPInfoStat#kills. = 0;
2867 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..deathscxx . . $ tPInfoStat#deaths. = deaths;
2868 memcpy(stat, &_CurrentPInfoStatcxx . . $ _CurrentPInfoStat., sizeof(tPInfoStatcxx . . $ tPInfoStat#));
2869 return true;
2870 }
2871 }
2872 }
2873 return false;
2874 }
2875
2876 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..slotcxx . . $ tPInfoStat#slot. = killer->slotcxx . . $ tPKillerInfo#slot.;
2877 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..killscxx . . $ tPInfoStat#kills. = killer->killscxx . . $ tPKillerInfo#kills.;
2878
2879 deaths = 0;
2880 dpr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(killer->slotcxx . . $ tPKillerInfo#slot.);
2881 if (dpr && dpr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY. && dpr->pinfocxx . . $ player_record#pinfo.) {
2882 victim = dpr->pinfocxx . . $ player_record#pinfo.->GetKillerInfocxx . . $ PInfo#GetKillerInfo(ffb103d8d7d108f5).(slot);
2883 }
2884
2885 if (victim)
2886 deaths = victim->killscxx . . $ tPKillerInfo#kills.;
2887
2888 _CurrentPInfoStatcxx . . $ _CurrentPInfoStat..deathscxx . . $ tPInfoStat#deaths. = deaths;
2889 _SlotsUsedcxx . . $ _SlotsUsed.[killer->slotcxx . . $ tPKillerInfo#slot.] = true;
2890
2891 memcpy(stat, &_CurrentPInfoStatcxx . . $ _CurrentPInfoStat., sizeof(tPInfoStatcxx . . $ tPInfoStat#));
2892 return true;
2893 }
2894
2895 // DMFCBase::FindPInfoStatClose
2896 //
2897 // Closes up a FindPInfo series of calls
2898 void DMFCBasecxx . . $ DMFCBase#::FindPInfoStatClosecxx . . $ DMFCBase#FindPInfoStatClose(49f6e7a06ebc5aa8).(void) {
2899 _CurrentPInfoSlotcxx . . $ _CurrentPInfoSlot. = -1;
2900 _DoneWithKillscxx . . $ _DoneWithKills. = false;
2901 }
2902
2903 // DMFCBase::SetWeaponDeathMessage
2904 //
2905 // Sets a death message for a weapon kill
2906 bool DMFCBasecxx . . $ DMFCBase#::SetWeaponDeathMessagecxx . . $ DMFCBase#SetWeaponDeathMessage(567fbfac950d45).(const char *weapon_name, const char *message, bool victim_first) {
2907 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(weapon_name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
2908 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(message != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
2909
2910 int weapon_index = DLLFindWeaponName(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(weapon_name));
2911 if (weapon_index == -1) {
2912 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to set WeaponMessage for %s...can't find it\n", weapon_name);
2913 return false;
2914 }
2915
2916 int real_weapon = WeaponHashcxx . . $ DMFCBase#WeaponHash.[weapon_index];
2917
2918 if (real_weapon == -1) {
2919 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "You forgot to call AddWeaponHash before adding this Message\n");
2920 return false;
2921 }
2922
2923 if ((WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].inusecxx . . $ tWeaponKillMsg#inuse.) && (WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message.)) {
2924 free(WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message.);
2925 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2926 }
2927
2928 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message. = (char *)malloc(strlen(message) + 1);
2929 if (WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message.) {
2930 strcpy(WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message., message);
2931 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].inusecxx . . $ tWeaponKillMsg#inuse. = true;
2932 WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].victim_firstcxx . . $ tWeaponKillMsg#victim_first. = victim_first;
2933 }
2934
2935 return WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].inusecxx . . $ tWeaponKillMsg#inuse.;
2936 }
2937
2938 // DMFCBase::GetWeaponDeathMessage
2939 //
2940 // Returns the format string for a weapon death message, NULL if it doesn't exist
2941 char *DMFCBasecxx . . $ DMFCBase#::GetWeaponDeathMessagecxx . . $ DMFCBase#GetWeaponDeathMessage(1a27f55e060209c1).(int index, bool *victim_first) {
2942 if ((index < 0) || (index >= MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!))
2943 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2944
2945 int real_weapon;
2946
2947 real_weapon = WeaponHashcxx . . $ DMFCBase#WeaponHash.[index];
2948
2949 if (real_weapon == -1)
2950 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2951
2952 if (!WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].inusecxx . . $ tWeaponKillMsg#inuse.)
2953 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
2954
2955 *victim_first = WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].victim_firstcxx . . $ tWeaponKillMsg#victim_first.;
2956 return WeaponMessagescxx . . $ DMFCBase#WeaponMessages.[real_weapon].messagecxx . . $ tWeaponKillMsg#message.;
2957 }
2958
2959 // DMFCBase::AddWeaponHash
2960 //
2961 // Since one weapon may actually consist of many weapons, in order to save space you can create
2962 // one weapon where all those other weapon id's will be mapped to it...use WeaponHash[id] to
2963 // get the actual weapon. End list of children with a NULL
2964 void DMFCBasecxx . . $ DMFCBase#::AddWeaponHashcxx . . $ DMFCBase#AddWeaponHash(326aeb464d16410c).(const char *parent, ...) {
2965 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(parent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
2966
2967 int parent_id = DLLFindWeaponName(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(parent));
2968 if (parent_id == -1) {
2969 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to find parent weapon ID in AddWeaponHash (%s)\n", parent);
2970 return;
2971 }
2972
2973 va_listcxx . . $ va_list# marker;
2974 va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, parent);
2975
2976 WeaponHashcxx . . $ DMFCBase#WeaponHash.[parent_id] = parent_id;
2977
2978 bool done = false;
2979
2980 while (!done) {
2981 int id;
2982 char *name;
2983 name = va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, char *);
2984 if (name)
2985 id = DLLFindWeaponName(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name));
2986 else
2987 id = -1;
2988
2989 if (id == -1) {
2990 done = true;
2991 } else {
2992 if ((id < 0) || (id >= MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!))
2993 done = true;
2994 else {
2995 WeaponHashcxx . . $ DMFCBase#WeaponHash.[id] = parent_id;
2996 }
2997 }
2998 }
2999
3000 va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker);
3001 }
3002
3003 // DMFCBase::AddWeaponHashArray
3004 //
3005 // Since one weapon may actually consist of many weapons, in order to save space you can create
3006 // one weapon where all those other weapon id's will be mapped to it...use WeaponHash[id] to
3007 // get the actual weapon.
3008 void DMFCBasecxx . . $ DMFCBase#::AddWeaponHashArraycxx . . $ DMFCBase#AddWeaponHashArray(9f647276e7804368).(const char *parent, int count, char **array) {
3009 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(parent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
3010
3011 int parent_id = DLLFindWeaponName(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(parent));
3012 if (parent_id == -1) {
3013 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to find parent weapon ID in AddWeaponHash (%s)\n", parent);
3014 return;
3015 }
3016
3017 WeaponHashcxx . . $ DMFCBase#WeaponHash.[parent_id] = parent_id;
3018
3019 int index = 0;
3020 while (index < count) {
3021 int id;
3022 char *name;
3023 name = array[index++];
3024 if (name)
3025 id = DLLFindWeaponName(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(name));
3026 else
3027 break;
3028
3029 if (id >= 0 && id < MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!) {
3030 WeaponHashcxx . . $ DMFCBase#WeaponHash.[id] = parent_id;
3031 }
3032 }
3033 }
3034
3035 // DMFCBase::SetupPlayerRecord
3036 //
3037 // Sets up memory for multiplayer mod user defined data in the Player Records. Pass in the size (in bytes)
3038 // of 1 struct (each player will get one). Use GetPlayerRecordData to retrieve a pointer to the data.
3039 //
3040 // pack_callback : callback function called when data from the struct needs to be packed
3041 // into a packet. It is SUPER important that this function packs the data
3042 // in little endian format. This function gets a pointer to the struct that
3043 // needs to be packed (user_info), and a buffer in which to pack it to. This
3044 // function is to return the number of bytes it has packed.
3045 // unpack_callback : callback function called when data from the struct needs to be unpacket
3046 // from a packet. This data will be in little endian format. Returns the number of
3047 // bytes unpacked.
3048 // returns: 1 if size given was <=0 (if so all previous user stats will be removed)
3049 // 0 all went ok
3050 // -1 out of memory (all user stats memory will be freed)
3051 int DMFCBasecxx . . $ DMFCBase#::SetupPlayerRecordcxx . . $ DMFCBase#SetupPlayerRecord(7df49e8a00e47932).(int sizeof_individual_data, int (*pack_callback)(void *user_info, uint8_tcxx . . $ uint8_t# *data),
3052 int (*unpack_callback)(void *user_info, uint8_tcxx . . $ uint8_t# *data)) {
3053 return PRec_SetupUserPReccxx . . $ PRec_SetupUserPRec(7df49e8a00e47932).(sizeof_individual_data, pack_callback, unpack_callback);
3054 }
3055
3056 // DMFCBase::GetPlayerRecordData
3057 //
3058 // Returns a pointer to the memory set aside for a particular player (NULL on error)
3059 void *DMFCBasecxx . . $ DMFCBase#::GetPlayerRecordDatacxx . . $ DMFCBase#GetPlayerRecordData(d1680a912d714170).(int pnum) {
3060 int slot;
3061 slot = PRec_GetPlayerSlotcxx . . $ PRec_GetPlayerSlot(7864480464b09eea).(pnum);
3062 if (slot == -1)
3063 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3064 return PRec_GetUserStatscxx . . $ PRec_GetUserStats(d1680a912d714170).(slot);
3065 }
3066
3067 // DMFCBase::GetPlayerRecord
3068 //
3069 // Returns a pointer to the player record at the given slot (passed in slot must be in the range
3070 // 0<=slot<MAX_PLAYER_RECORDS)
3071 player_recordcxx . . $ player_record# *DMFCBasecxx . . $ DMFCBase#::GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(int slot) { return PRec_GetPRecordcxx . . $ PRec_GetPRecord(6359c6f28dd028ae).(slot); }
3072
3073 // DMFCBase::GetPlayerRecordByPnum
3074 //
3075 // Same as above, but you can specify by a player's pnum, return NULL on error
3076 player_recordcxx . . $ player_record# *DMFCBasecxx . . $ DMFCBase#::GetPlayerRecordByPnumcxx . . $ DMFCBase#GetPlayerRecordByPnum(6359c6f28dd028ae).(int pnum) {
3077 int slot;
3078 slot = PRec_GetPlayerSlotcxx . . $ PRec_GetPlayerSlot(7864480464b09eea).(pnum);
3079 if (slot == -1)
3080 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3081 return PRec_GetPRecordcxx . . $ PRec_GetPRecord(6359c6f28dd028ae).(slot);
3082 }
3083
3084 // DMFCBase::BanPlayerFromGame
3085 //
3086 // Puts a temp ban on a player which will only last the duration of the game
3087 void DMFCBasecxx . . $ DMFCBase#::BanPlayerFromGamecxx . . $ DMFCBase#BanPlayerFromGame(d4f767463ce0a6b3).(int pnum) {
3088 if (pnum >= 0 && pnum < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!) {
3089 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Banning %s\n", Players[pnum].callsign);
3090 DPrintf(DTXT_DEDS_BANcxx . . $ `netgames/dmfc/dmfcinternal.h:2480:9`!, Playerscxx . . $ DMFCBase#Players.[pnum].callsigncxx . . $ player#callsign.);
3091 tBanItemcxx . . $ tBanItem# *c;
3092 c = m_BanListcxx . . $ DMFCBase#m_BanList.;
3093 if (!m_BanListcxx . . $ DMFCBase#m_BanList.) {
3094 c = m_BanListcxx . . $ DMFCBase#m_BanList. = (tBanItemcxx . . $ tBanItem# *)malloc(sizeof(tBanItemcxx . . $ tBanItem#));
3095 if (!c)
3096 return;
3097 } else {
3098 while (c->nextcxx . . $ tBanItem#next.) {
3099 c = c->nextcxx . . $ tBanItem#next.;
3100 }
3101 c->nextcxx . . $ tBanItem#next. = (tBanItemcxx . . $ tBanItem# *)malloc(sizeof(tBanItemcxx . . $ tBanItem#));
3102 c = c->nextcxx . . $ tBanItem#next.;
3103 if (!c)
3104 return;
3105 }
3106 c->nextcxx . . $ tBanItem#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3107 memcpy(&c->addrcxx . . $ tBanItem#addr., &NetPlayerscxx . . $ DMFCBase#NetPlayers.[pnum].addrcxx . . $ netplayer#addr., sizeof(network_addresscxx . . $ network_address#));
3108 strncpy(c->callsigncxx . . $ tBanItem#callsign., Playerscxx . . $ DMFCBase#Players.[pnum].callsigncxx . . $ player#callsign., MAX_CALLSIGN_SIZEcxx . . $ `netgames/includes/DMFC.h:525:9`! - 1);
3109 c->callsigncxx . . $ tBanItem#callsign.[MAX_CALLSIGN_SIZEcxx . . $ `netgames/includes/DMFC.h:525:9`! - 1] = '\0';
3110 c->tracker_idcxx . . $ tBanItem#tracker_id.[0] = '\0';
3111
3112 if (IsMasterTrackerGamecxx . . $ DMFCBase#IsMasterTrackerGame(c9857a73d68e59ba).()) {
3113 strcpy(c->tracker_idcxx . . $ tBanItem#tracker_id., Playerscxx . . $ DMFCBase#Players.[pnum].tracker_idcxx . . $ player#tracker_id.);
3114 }
3115
3116 m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers.++;
3117 } else {
3118 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to ban player...pnum not valid\n");
3119 DPrintf(DTXT_DEDS_BAN_ERRORcxx . . $ `netgames/dmfc/dmfcinternal.h:2481:9`!);
3120 }
3121 }
3122
3123 // DMFCBase::RemoveAllBans
3124 //
3125 // Removes all the temp bans
3126 void DMFCBasecxx . . $ DMFCBase#::RemoveAllBanscxx . . $ DMFCBase#RemoveAllBans(49f6e7a06ebc5aa8).(void) {
3127 tBanItemcxx . . $ tBanItem# *c, *n;
3128 c = n = m_BanListcxx . . $ DMFCBase#m_BanList.;
3129 while (c) {
3130 n = c->nextcxx . . $ tBanItem#next.;
3131 free(c);
3132 c = n;
3133 }
3134 m_BanListcxx . . $ DMFCBase#m_BanList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3135 m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers. = 0;
3136 }
3137
3138 // DMFCBase::GetNumBannedPlayers
3139 //
3140 // Returns the number of players banned from the server
3141 int DMFCBasecxx . . $ DMFCBase#::GetNumBannedPlayerscxx . . $ DMFCBase#GetNumBannedPlayers(b126dc7c1de90089).(void) { return m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers.; }
3142
3143 // DMCBase::GetBannedPlayerCallsign
3144 //
3145 // Returns the callsign of the banned player at position index, NULL on error
3146 char *DMFCBasecxx . . $ DMFCBase#::GetBannedPlayerCallsigncxx . . $ DMFCBase#GetBannedPlayerCallsign(ff224f080444ee45).(int index) {
3147 if (index < 0 || index >= m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers.)
3148 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3149
3150 tBanItemcxx . . $ tBanItem# *c;
3151 c = m_BanListcxx . . $ DMFCBase#m_BanList.;
3152 while (c) {
3153 if (index == 0) {
3154 return c->callsigncxx . . $ tBanItem#callsign.;
3155 }
3156 index--;
3157 c = c->nextcxx . . $ tBanItem#next.;
3158 }
3159 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3160 }
3161
3162 // DMFCBase::RemoveBan
3163 //
3164 // Removes a temp ban on given the ban #...returns true on success
3165 bool DMFCBasecxx . . $ DMFCBase#::RemoveBancxx . . $ DMFCBase#RemoveBan(83c267b20bac841a).(int index) {
3166 if (index < 0 || index >= m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers.)
3167 return false;
3168
3169 tBanItemcxx . . $ tBanItem# *c, *p;
3170 c = m_BanListcxx . . $ DMFCBase#m_BanList.;
3171 p = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3172 while (c) {
3173 if (!index) {
3174 // we found em, remove em
3175 if (p) {
3176 p->nextcxx . . $ tBanItem#next. = c->nextcxx . . $ tBanItem#next.;
3177 free(c);
3178 m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers.--;
3179 } else {
3180 m_BanListcxx . . $ DMFCBase#m_BanList. = c->nextcxx . . $ tBanItem#next.;
3181 free(c);
3182 m_iNumBanPlayerscxx . . $ DMFCBase#m_iNumBanPlayers.--;
3183 }
3184 return true;
3185 }
3186 p = c;
3187 c = c->nextcxx . . $ tBanItem#next.;
3188 index--;
3189 }
3190 return false;
3191 }
3192
3193 // DMFCBase::IsPlayerBanned
3194 //
3195 // returns true is the given pnum is banned from the game
3196 bool DMFCBasecxx . . $ DMFCBase#::IsPlayerBannedcxx . . $ DMFCBase#IsPlayerBanned(83c267b20bac841a).(int pnum) {
3197 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Checking a ban on a player...");
3198
3199 if (pnum < 0 || pnum >= DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!) {
3200 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Playernum not valid\n");
3201 return false;
3202 }
3203
3204 if (IsAddressBannedcxx . . $ DMFCBase#IsAddressBanned(46e1c72e52d9c94a).(&NetPlayerscxx . . $ DMFCBase#NetPlayers.[pnum].addrcxx . . $ netplayer#addr., Playerscxx . . $ DMFCBase#Players.[pnum].tracker_idcxx . . $ player#tracker_id.)) {
3205 return true;
3206 }
3207
3208 return false;
3209 }
3210
3211 // DMFCBase::IsAddressBanned
3212 //
3213 // returns true if the given address is banned from the game
3214 bool DMFCBasecxx . . $ DMFCBase#::IsAddressBannedcxx . . $ DMFCBase#IsAddressBanned(46e1c72e52d9c94a).(network_addresscxx . . $ network_address# *addr, const char *tracker_id) {
3215 tBanItemcxx . . $ tBanItem# *c;
3216 c = m_BanListcxx . . $ DMFCBase#m_BanList.;
3217
3218 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Checking a ban on an address...");
3219
3220 while (c) {
3221 if (addr && CompareNetworkAddresscxx . . $ DMFCBase#CompareNetworkAddress(3c6f311cdf2181f2).(&c->addrcxx . . $ tBanItem#addr., addr, false)) {
3222 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player addr IS BANNED\n");
3223 return true;
3224 }
3225 if (*m_bTrackerGamecxx . . $ DMFCBase#m_bTrackerGame.) {
3226 if (tracker_id && !strcmp(tracker_id, c->tracker_idcxx . . $ tBanItem#tracker_id.)) {
3227 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player tid IS BANNED\n");
3228 return true;
3229 }
3230 }
3231
3232 c = c->nextcxx . . $ tBanItem#next.;
3233 }
3234
3235 if (!addr) {
3236 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player not banned\n");
3237 return false;
3238 }
3239
3240 // ok, the player doesn't have a temp ban on him, now, if it's tcp/ip, check
3241 // the hosts.allow/.deny
3242
3243 if (addr->connection_typecxx . . $ network_address#connection_type. != NP_TCPcxx . . $ NP_TCP.) {
3244 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player not banned\n");
3245 return false;
3246 }
3247
3248 uint32_tcxx . . $ uint32_t# address;
3249 tHostsNodecxx . . $ tHostsNode# *curr;
3250
3251 memcpy(&address, &addr->addresscxx . . $ network_address#address., 4);
3252
3253 // check the allow list, if the address is specified on this list,
3254 // than it isn't banned
3255 curr = m_AllowListcxx . . $ DMFCBase#m_AllowList.;
3256 while (curr) {
3257 if ((address & curr->maskcxx . . $ tHostsNode#mask.) == (curr->ipcxx . . $ tHostsNode#ip. & curr->maskcxx . . $ tHostsNode#mask.)) {
3258 // its a match
3259 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player not banned\n");
3260 return false;
3261 }
3262 curr = curr->nextcxx . . $ tHostsNode#next.;
3263 }
3264
3265 // check the deny list, if the address is specified on this list,
3266 // than it is banned
3267 curr = m_DenyListcxx . . $ DMFCBase#m_DenyList.;
3268 while (curr) {
3269 if ((address & curr->maskcxx . . $ tHostsNode#mask.) == (curr->ipcxx . . $ tHostsNode#ip. & curr->maskcxx . . $ tHostsNode#mask.)) {
3270 // its a match
3271 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player IS banned\n");
3272 return true;
3273 }
3274 curr = curr->nextcxx . . $ tHostsNode#next.;
3275 }
3276
3277 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Player not banned\n");
3278 return false;
3279 }
3280
3281 // DMFCBase::DoDamageToPlayer
3282 //
3283 // Server only...applies damage to player
3284 void DMFCBasecxx . . $ DMFCBase#::DoDamageToPlayercxx . . $ DMFCBase#DoDamageToPlayer(c583259905cf10b6).(int pnum, int type, float amount, bool playsound) {
3285 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
3286 return;
3287 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum))
3288 return;
3289 if (pnum == GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()) {
3290 // apply it to myself
3291 if (amount <= 0) {
3292 // just add it...no damage sound
3293 Objectscxx . . $ DMFCBase#Objects.[Playerscxx . . $ DMFCBase#Players.[pnum].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields. -= amount;
3294 } else {
3295 DLLApplyDamageToPlayer(&Objectscxx . . $ DMFCBase#Objects.[Playerscxx . . $ DMFCBase#Players.[pnum].objnumcxx . . $ player#objnum.], NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, type, amount, 1, 255, playsound);
3296 }
3297 } else {
3298 // add it to additional damage
3299 DLLApplyDamageToPlayer(&Objectscxx . . $ DMFCBase#Objects.[Playerscxx . . $ DMFCBase#Players.[pnum].objnumcxx . . $ player#objnum.], NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, type, amount, 1, 255, playsound);
3300 }
3301 }
3302
3303 // DMFCBase::StartUIWindow
3304 //
3305 // Prepares the game so that you can display UI stuff
3306 void DMFCBasecxx . . $ DMFCBase#::StartUIWindowcxx . . $ DMFCBase#StartUIWindow(6ca3d68f5c5f0975).(int id, void *user_data) {
3307 if (m_iUIWindowIDcxx . . $ DMFCBase#m_iUIWindowID. != -1) {
3308 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFCBase::StartUIWindow(): A Window ID (0x%X) is already defined\n", m_iUIWindowID);
3309 return;
3310 }
3311
3312 *Game_interface_modecxx . . $ DMFCBase#Game_interface_mode. = GAME_DLL_INTERFACEcxx . . $ `netgames/dmfc/dmfcinternal.h:2757:9`!;
3313 m_iUIWindowIDcxx . . $ DMFCBase#m_iUIWindowID. = id;
3314 m_UIUserDatacxx . . $ DMFCBase#m_UIUserData. = user_data;
3315 }
3316
3317 // DMFCBase::EnableStatisticalMessages
3318 //
3319 // Turns on or off the statistical HUD messages that appear due to a player death
3320 void DMFCBasecxx . . $ DMFCBase#::EnableStatisticalMessagescxx . . $ DMFCBase#EnableStatisticalMessages(b45ddcbc8423892c).(bool on) {
3321 if (on)
3322 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!);
3323 else
3324 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPSTATHUDMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2380:9`!);
3325 }
3326
3327 // DMFCBase::GetTimeInGame
3328 //
3329 // Returns the totaltime the player has been in the game at the moment you call
3330 // this function. Pass in the player record slot.
3331 float DMFCBasecxx . . $ DMFCBase#::GetTimeInGamecxx . . $ DMFCBase#GetTimeInGame(5cde91ea12d43f46).(int slot) {
3332 if (slot < 0 || slot >= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!)
3333 return 0;
3334
3335 player_recordcxx . . $ player_record# *pr = PRec_GetPRecordcxx . . $ PRec_GetPRecord(6359c6f28dd028ae).(slot);
3336
3337 if (!pr || pr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.)
3338 return 0;
3339
3340 float ti = pr->total_time_in_gamecxx . . $ player_record#total_time_in_game.;
3341
3342 if (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)
3343 ti += RealGametimecxx . . $ DMFCBase#RealGametime. - pr->start_timecxx . . $ player_record#$anonymous_type_0#start_time.;
3344
3345 return ti;
3346 }
3347
3348 // DMFCBase::GetTimeString
3349 //
3350 // Returns a string that contains a formated time (i.e. 32 seconds, 1:15 minutes, 3:21:23 hours)
3351 char *DMFCBasecxx . . $ DMFCBase#::GetTimeStringcxx . . $ DMFCBase#GetTimeString(3b344d7a46e3c2ff).(float sec) {
3352 static char buffer[20];
3353 int minutes, seconds, hours;
3354 minutes = seconds = hours = 0;
3355
3356 seconds = (int)sec;
3357
3358 // we have seconds, so convert to minutes:seconds
3359 minutes = seconds / 60;
3360 seconds = seconds % 60;
3361
3362 // now we have minutes and seconds, so convert minutes to hours:minutes
3363 hours = minutes / 60;
3364 minutes = minutes % 60;
3365
3366 // now form our string hh:mm:ss
3367 if (hours) {
3368 if (hours == 1 && minutes == 0 && seconds == 0)
3369 snprintf(buffer, sizeof(buffer), "%s", DTXT_TIME_HOURcxx . . $ `netgames/dmfc/dmfcinternal.h:2482:9`!);
3370 else
3371 snprintf(buffer, sizeof(buffer), DTXT_TIME_HOURScxx . . $ `netgames/dmfc/dmfcinternal.h:2483:9`!, hours, minutes, seconds);
3372 } else if (minutes) {
3373 if (minutes == 1 && seconds == 0)
3374 snprintf(buffer, sizeof(buffer), "%s", DTXT_TIME_MINUTEcxx . . $ `netgames/dmfc/dmfcinternal.h:2484:9`!);
3375 else
3376 snprintf(buffer, sizeof(buffer), DTXT_TIME_MINUTEScxx . . $ `netgames/dmfc/dmfcinternal.h:2485:9`!, minutes, seconds);
3377 } else {
3378 if (seconds == 1)
3379 snprintf(buffer, sizeof(buffer), "%s", DTXT_TIME_SECONDcxx . . $ `netgames/dmfc/dmfcinternal.h:2486:9`!);
3380 else
3381 snprintf(buffer, sizeof(buffer), DTXT_TIME_SECONDScxx . . $ `netgames/dmfc/dmfcinternal.h:2487:9`!, seconds);
3382 }
3383 return buffer;
3384 }
3385
3386 // DMFCBase::PauseRealGameTime
3387 //
3388 // Pauses/unpauses the realgame time
3389 void DMFCBasecxx . . $ DMFCBase#::PauseRealGameTimecxx . . $ DMFCBase#PauseRealGameTime(b45ddcbc8423892c).(bool enable) {
3390 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
3391 return;
3392
3393 if (enable) {
3394 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_PAUSETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2391:9`!);
3395 SendControlMessageToPlayercxx . . $ DMFCBase#SendControlMessageToPlayer(9633529ce3c4ff50).(SP_ALLcxx . . $ `netgames/includes/DMFC.h:435:9`!, CM_PAUSETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:286:9`!);
3396 } else {
3397 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_PAUSETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2391:9`!);
3398 SendControlMessageToPlayercxx . . $ DMFCBase#SendControlMessageToPlayer(9633529ce3c4ff50).(SP_ALLcxx . . $ `netgames/includes/DMFC.h:435:9`!, CM_UNPAUSETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:287:9`!);
3399 }
3400 }
3401
3402 /*
3403 ********************************************************************************
3404 * *
3405 * Input Command Functions
3406 **
3407 * *
3408 ********************************************************************************
3409 *
3410 */
3411
3412 // DMFCBase::InputCommandHandle
3413 //
3414 // Goes through the list of input commands and calls the associated handle (if it exists). Returns
3415 // true if it called a handler, else false.
3416 bool DMFCBasecxx . . $ DMFCBase#::InputCommandHandlecxx . . $ DMFCBase#InputCommandHandle(c6b7e35ff6de5671).(char *command_string) {
3417 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(command_string != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
3418
3419 // make sure it's a valid command (starts with a $)
3420 if (command_string[0] != '$')
3421 return false;
3422
3423 /*
3424 if(!stricmp(command_string,"$help dump"))
3425 {
3426 mprintf(0,"Dumping help commands to file\n");
3427 tInputCommandNode *node = m_InputCommandRootNode;
3428
3429 CFILE *file;
3430 DLLOpenCFILE(&file,"C:\\DMFCHelp.txt","wt");
3431
3432 if(!file)
3433 return false;
3434
3435 char buffer[1024];
3436
3437 while(node){
3438
3439 sprintf(buffer,"$%s",node->data);
3440 DLLcf_WriteString(file,buffer);
3441 DLLcf_WriteString(file,"-------------------------------------------");
3442 sprintf(buffer,"%s\n",node->desc);
3443 DLLcf_WriteString(file,buffer);
3444 node = node->next;
3445 }
3446
3447 DLLcfclose(file);
3448 }
3449 */
3450
3451 // now extract the command
3452 char command[64], index = 0;
3453 char *p = &command_string[1];
3454
3455 // lowercase the command_string
3456 while (*p && *p != ' ') {
3457 if ((*p >= 'A') && (*p <= 'Z')) {
3458 *p = tolower(*p);
3459 }
3460 p++;
3461 }
3462
3463 p = &command_string[1];
3464
3465 // break off the first string
3466 while ((*p) && (*p != ' ')) {
3467 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(index < 64);
3468 command[index] = *p;
3469 p++;
3470 index++;
3471 }
3472 command[index] = '\0'; // tack on an ending NULL
3473
3474 // now go through our list and see if we can find the command added by the user
3475 tInputCommandNodecxx . . $ tInputCommandNode# *node = m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode.;
3476 while (node) {
3477 if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(node->data, command)) {
3478 // we found a match!
3479 if (node->handlercxx . . $ tInputCommandNode#handler.) {
3480 (*node->handlercxx . . $ tInputCommandNode#handler.)(command_string);
3481 return true;
3482 }
3483 return false; // for some reason the handler is NULL (it should never happen)
3484 }
3485 node = node->nextcxx . . $ tInputCommandNode#next.;
3486 }
3487
3488 // if we got here than no nodes match
3489 return false;
3490 }
3491
3492 // DMFCBase::InputCommandFree
3493 //
3494 // Frees up all memory allocated for the input commands ($ messages)
3495 void DMFCBasecxx . . $ DMFCBase#::InputCommandFreecxx . . $ DMFCBase#InputCommandFree(49f6e7a06ebc5aa8).(void) {
3496 tInputCommandNodecxx . . $ tInputCommandNode# *next, *node = m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode.;
3497
3498 // Destroy the linked list of nodes
3499 while (node) {
3500 next = node->nextcxx . . $ tInputCommandNode#next.;
3501 if (node->datacxx . . $ tInputCommandNode#data.)
3502 free(node->datacxx . . $ tInputCommandNode#data.);
3503 if (node->desccxx . . $ tInputCommandNode#desc.)
3504 free(node->desccxx . . $ tInputCommandNode#desc.);
3505 free(node);
3506 node = next;
3507 }
3508
3509 // set the root to NULL to finish up
3510 m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3511 }
3512
3513 // DMFCBase::InputCommandInit
3514 //
3515 // Initializes the variables and data for the input commands. Default DMFC commands are to
3516 // be placed in here.
3517 void DMFCBasecxx . . $ DMFCBase#::InputCommandInitcxx . . $ DMFCBase#InputCommandInit(49f6e7a06ebc5aa8).(void) {
3518 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_ALLOWTEAMCHANGEcxx . . $ `netgames/dmfc/dmfcinternal.h:2488:9`!, DTXT_IC_ALLOWTEAMCHANGEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2489:9`!, DMFCInputCommand_AllowTeamChangecxx . . $ DMFCInputCommand_AllowTeamChange(85c52e162fed56f9)., true) < 1)
3519 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3520
3521 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_AUTOBALANCEcxx . . $ `netgames/dmfc/dmfcinternal.h:2491:9`!, DTXT_IC_AUTOBALANCEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2492:9`!, DMFCInputCommand_AutoBalancecxx . . $ DMFCInputCommand_AutoBalance(85c52e162fed56f9)., true) < 1)
3522 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3523
3524 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2495:9`!, DTXT_IC_AUTOSAVEDISCDcxx . . $ `netgames/dmfc/dmfcinternal.h:2496:9`!, DMFCInputCommand_AutoSaveDisconnectcxx . . $ DMFCInputCommand_AutoSaveDisconnect(85c52e162fed56f9)., true) < 1)
3525 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3526
3527 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_AUTOSAVELEVELcxx . . $ `netgames/dmfc/dmfcinternal.h:2499:9`!, DTXT_IC_AUTOSAVELEVELDcxx . . $ `netgames/dmfc/dmfcinternal.h:2500:9`!, DMFCInputCommand_AutoSaveLevelcxx . . $ DMFCInputCommand_AutoSaveLevel(85c52e162fed56f9)., true) < 1)
3528 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3529
3530 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_BALANCEcxx . . $ `netgames/dmfc/dmfcinternal.h:2503:9`!, DTXT_IC_BALANCEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2504:9`!, DMFCInputCommand_Balancecxx . . $ DMFCInputCommand_Balance(85c52e162fed56f9)., true) < 1)
3531 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3532
3533 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_BANcxx . . $ `netgames/dmfc/dmfcinternal.h:2506:9`!, DTXT_IC_BANDcxx . . $ `netgames/dmfc/dmfcinternal.h:2507:9`!, DMFCInputCommand_Bancxx . . $ DMFCInputCommand_Ban(85c52e162fed56f9)., true) < 1)
3534 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3535
3536 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_BANLISTcxx . . $ `netgames/dmfc/dmfcinternal.h:2508:9`!, DTXT_IC_BANLISTDcxx . . $ `netgames/dmfc/dmfcinternal.h:2509:9`!, DMFCInputCommand_BanListcxx . . $ DMFCInputCommand_BanList(85c52e162fed56f9).) < 1)
3537 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3538
3539 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_CHANGETEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2512:9`!, DTXT_IC_CHANGETEAMDcxx . . $ `netgames/dmfc/dmfcinternal.h:2513:9`!, DMFCInputCommand_ChangeTeamcxx . . $ DMFCInputCommand_ChangeTeam(85c52e162fed56f9)., true) < 1)
3540 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3541
3542 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_ENDLEVELcxx . . $ `netgames/dmfc/dmfcinternal.h:2515:9`!, DTXT_IC_ENDLEVELDcxx . . $ `netgames/dmfc/dmfcinternal.h:2516:9`!, DMFCInputCommand_EndLevelcxx . . $ DMFCInputCommand_EndLevel(85c52e162fed56f9)., true) < 1)
3543 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3544
3545 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_HELPcxx . . $ `netgames/dmfc/dmfcinternal.h:2517:9`!, DTXT_IC_HELPDcxx . . $ `netgames/dmfc/dmfcinternal.h:2518:9`!, DMFCInputCommand_Helpcxx . . $ DMFCInputCommand_Help(85c52e162fed56f9).) < 1)
3546 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3547
3548 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_HUDNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2519:9`!, DTXT_IC_HUDNAMEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2520:9`!, DMFCInputCommand_HudCallsignscxx . . $ DMFCInputCommand_HudCallsigns(85c52e162fed56f9).) < 1)
3549 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3550
3551 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_KICKcxx . . $ `netgames/dmfc/dmfcinternal.h:2524:9`!, DTXT_IC_KICKDcxx . . $ `netgames/dmfc/dmfcinternal.h:2525:9`!, DMFCInputCommand_Kickcxx . . $ DMFCInputCommand_Kick(85c52e162fed56f9)., true) < 1)
3552 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3553
3554 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_KILLMSGFILTERcxx . . $ `netgames/dmfc/dmfcinternal.h:2526:9`!, DTXT_IC_KILLMSGFILTERDcxx . . $ `netgames/dmfc/dmfcinternal.h:2527:9`!, DMFCInputCommand_KillMsgFiltercxx . . $ DMFCInputCommand_KillMsgFilter(85c52e162fed56f9).) < 1)
3555 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3556
3557 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_NETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2530:9`!, DTXT_IC_NETGAMEINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2530:9`!, DMFCInputCommand_NetGameInfocxx . . $ DMFCInputCommand_NetGameInfo(85c52e162fed56f9).) < 1)
3558 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3559
3560 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_OBSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2532:9`!, DTXT_IC_OBSERVERDcxx . . $ `netgames/dmfc/dmfcinternal.h:2533:9`!, DMFCInputCommand_Observercxx . . $ DMFCInputCommand_Observer(85c52e162fed56f9).) < 1)
3561 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3562
3563 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_PIGGYBACKcxx . . $ `netgames/dmfc/dmfcinternal.h:2536:9`!, DTXT_IC_PIGGYBACKDcxx . . $ `netgames/dmfc/dmfcinternal.h:2537:9`!, DMFCInputCommand_Piggybackcxx . . $ DMFCInputCommand_Piggyback(85c52e162fed56f9).) < 1)
3564 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3565
3566 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_PLAYERINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2538:9`!, DTXT_IC_PLAYERINFODcxx . . $ `netgames/dmfc/dmfcinternal.h:2539:9`!, DMFCInputCommand_PlayerInfocxx . . $ DMFCInputCommand_PlayerInfo(85c52e162fed56f9).) < 1)
3567 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3568
3569 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_PLAYERScxx . . $ `netgames/dmfc/dmfcinternal.h:2540:9`!, DTXT_IC_PLAYERSDcxx . . $ `netgames/dmfc/dmfcinternal.h:2541:9`!, DMFCInputCommand_Playerscxx . . $ DMFCInputCommand_Players(85c52e162fed56f9).) < 1)
3570 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3571
3572 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_REHASHcxx . . $ `netgames/dmfc/dmfcinternal.h:2544:9`!, DTXT_IC_REHASHDcxx . . $ `netgames/dmfc/dmfcinternal.h:2545:9`!, DMFCInputCommand_Rehashcxx . . $ DMFCInputCommand_Rehash(85c52e162fed56f9)., true) < 1)
3573 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3574
3575 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_REMOTEcxx . . $ `netgames/dmfc/dmfcinternal.h:2736:9`!, DTXT_IC_REMOTEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2737:9`!, DMFCInputCommand_Remotecxx . . $ DMFCInputCommand_Remote(85c52e162fed56f9).) < 1)
3576 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3577
3578 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_REMOTEADMINcxx . . $ `netgames/dmfc/dmfcinternal.h:2739:9`!, DTXT_IC_REMOTEADMINDcxx . . $ `netgames/dmfc/dmfcinternal.h:2740:9`!, DMFCInputCommand_RemoteAdmincxx . . $ DMFCInputCommand_RemoteAdmin(85c52e162fed56f9)., true) < 1)
3579 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3580
3581 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_REMOTEADMINLOGOUTcxx . . $ `netgames/dmfc/dmfcinternal.h:2742:9`!, DTXT_IC_REMOTEADMINLOGOUTDcxx . . $ `netgames/dmfc/dmfcinternal.h:2743:9`!, DMFCInputCommand_RemoteAdminLogoutcxx . . $ DMFCInputCommand_RemoteAdminLogout(85c52e162fed56f9).) < 1)
3582 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3583
3584 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_REMOTEADMINPASScxx . . $ `netgames/dmfc/dmfcinternal.h:2747:9`!, DTXT_IC_REMOTEADMINPASSDcxx . . $ `netgames/dmfc/dmfcinternal.h:2748:9`!, DMFCInputCommand_RemoteAdminPasscxx . . $ DMFCInputCommand_RemoteAdminPass(85c52e162fed56f9)., true) < 1)
3585 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3586
3587 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_REMOVEBANcxx . . $ `netgames/dmfc/dmfcinternal.h:2548:9`!, DTXT_IC_REMOVEBANDcxx . . $ `netgames/dmfc/dmfcinternal.h:2549:9`!, DMFCInputCommand_RemoveBancxx . . $ DMFCInputCommand_RemoveBan(85c52e162fed56f9)., true) < 1)
3588 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3589
3590 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SAVESTATScxx . . $ `netgames/dmfc/dmfcinternal.h:2552:9`!, DTXT_IC_SAVESTATSDcxx . . $ `netgames/dmfc/dmfcinternal.h:2553:9`!, DMFCInputCommand_SaveStatscxx . . $ DMFCInputCommand_SaveStats(85c52e162fed56f9)., true) < 1)
3591 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3592
3593 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SCOREScxx . . $ `netgames/dmfc/dmfcinternal.h:2554:9`!, DTXT_IC_SCORESDcxx . . $ `netgames/dmfc/dmfcinternal.h:2555:9`!, DMFCInputCommand_Scorescxx . . $ DMFCInputCommand_Scores(85c52e162fed56f9).) < 1)
3594 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3595
3596 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SERVERHUDNAMEScxx . . $ `netgames/dmfc/dmfcinternal.h:2556:9`!, DTXT_IC_SERVERHUDNAMESDcxx . . $ `netgames/dmfc/dmfcinternal.h:2557:9`!, DMFCInputCommand_ServerHudCallsignscxx . . $ DMFCInputCommand_ServerHudCallsigns(85c52e162fed56f9)., true) < 1)
3597 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3598
3599 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SETGOALLIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2560:9`!, DTXT_IC_SETGOALLIMITDcxx . . $ `netgames/dmfc/dmfcinternal.h:2561:9`!, DMFCInputCommand_SetGoalLimitcxx . . $ DMFCInputCommand_SetGoalLimit(85c52e162fed56f9)., true) < 1)
3600 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3601
3602 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SETMAXPLAYERScxx . . $ `netgames/dmfc/dmfcinternal.h:2563:9`!, DTXT_IC_SETMAXPLAYERSDcxx . . $ `netgames/dmfc/dmfcinternal.h:2564:9`!, DMFCInputCommand_SetMaxPlayerscxx . . $ DMFCInputCommand_SetMaxPlayers(85c52e162fed56f9)., true) < 1)
3603 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3604
3605 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SETPPScxx . . $ `netgames/dmfc/dmfcinternal.h:2567:9`!, DTXT_IC_SETPPSDcxx . . $ `netgames/dmfc/dmfcinternal.h:2568:9`!, DMFCInputCommand_SetPPScxx . . $ DMFCInputCommand_SetPPS(85c52e162fed56f9)., true) < 1)
3606 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3607
3608 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SETRESPAWNTIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2570:9`!, DTXT_IC_SETRESPAWNTIMEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2571:9`!, DMFCInputCommand_SetRespawnTimecxx . . $ DMFCInputCommand_SetRespawnTime(85c52e162fed56f9)., true) < 1)
3609 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3610
3611 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SETTEAMNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2574:9`!, DTXT_IC_SETTEAMNAMEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2575:9`!, DMFCInputCommand_SetTeamNamecxx . . $ DMFCInputCommand_SetTeamName(85c52e162fed56f9)., true) < 1)
3612 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3613
3614 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_SETTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2577:9`!, DTXT_IC_SETTIMELIMITDcxx . . $ `netgames/dmfc/dmfcinternal.h:2578:9`!, DMFCInputCommand_SetTimeLimitcxx . . $ DMFCInputCommand_SetTimeLimit(85c52e162fed56f9)., true) < 1)
3615 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3616
3617 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_STATMSGScxx . . $ `netgames/dmfc/dmfcinternal.h:2580:9`!, DTXT_IC_STATMSGSDcxx . . $ `netgames/dmfc/dmfcinternal.h:2581:9`!, DMFCInputCommand_StatMsgscxx . . $ DMFCInputCommand_StatMsgs(85c52e162fed56f9).) < 1)
3618 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3619
3620 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_TEAMcxx . . $ `netgames/dmfc/dmfcinternal.h:2582:9`!, DTXT_IC_TEAMDcxx . . $ `netgames/dmfc/dmfcinternal.h:2583:9`!, DMFCInputCommand_Teamcxx . . $ DMFCInputCommand_Team(85c52e162fed56f9).) < 1)
3621 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3622
3623 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_WAITcxx . . $ `netgames/dmfc/dmfcinternal.h:2751:9`!, DTXT_IC_WAITDcxx . . $ `netgames/dmfc/dmfcinternal.h:2752:9`!, DMFCInputCommand_Waitcxx . . $ DMFCInputCommand_Wait(85c52e162fed56f9)., true) < 1)
3624 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3625
3626 if (AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(DTXT_IC_WARPcxx . . $ `netgames/dmfc/dmfcinternal.h:2715:9`!, DTXT_IC_WARPDcxx . . $ `netgames/dmfc/dmfcinternal.h:2716:9`!, DMFCInputCommand_Warpcxx . . $ DMFCInputCommand_Warp(85c52e162fed56f9)., true) < 1)
3627 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "DMFC Warning: Error Adding Input Command\n");
3628 }
3629
3630 // Returns true if the input command can be called remotely
3631 //
3632 // Returns 1 if the input command can be called remotely
3633 // Returns -1 if the input command is not found
3634 // Returns 0 if the input command can be called remotely
3635 int DMFCBasecxx . . $ DMFCBase#::CanInputCommandBeUsedRemotelycxx . . $ DMFCBase#CanInputCommandBeUsedRemotely(1ef8e6ec083aabb9).(char *command) {
3636 tInputCommandNodecxx . . $ tInputCommandNode# *node = m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode.;
3637
3638 while (node) {
3639 if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(node->data, command)) {
3640 // we found a match!
3641 return (node->allow_remotecxx . . $ tInputCommandNode#allow_remote.) ? 1 : 0;
3642 }
3643 node = node->nextcxx . . $ tInputCommandNode#next.;
3644 }
3645
3646 return -1;
3647 }
3648
3649 // Displays dedicated server help
3650 void DMFCBasecxx . . $ DMFCBase#::DisplayInputCommandHelpcxx . . $ DMFCBase#DisplayInputCommandHelp(85c52e162fed56f9).(const char *s) {
3651 if (!IAmDedicatedServercxx . . $ DMFCBase#IAmDedicatedServer(c9857a73d68e59ba).())
3652 return;
3653
3654 tInputCommandNodecxx . . $ tInputCommandNode# *node = m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode.;
3655
3656 if (s[0] == '\0') {
3657 char buffer[80];
3658 DPrintf(DTXT_IC_HEADEERLISTcxx . . $ `netgames/dmfc/dmfcinternal.h:2584:9`!);
3659 DPrintf(DTXT_IC_HEADERINSTRUCTcxx . . $ `netgames/dmfc/dmfcinternal.h:2585:9`!);
3660 // just display the list of commands
3661 while (node) {
3662 memset(buffer, ' ', 80);
3663 memcpy(&buffer[0], node->datacxx . . $ tInputCommandNode#data., strlen(node->datacxx . . $ tInputCommandNode#data.));
3664 node = node->nextcxx . . $ tInputCommandNode#next.;
3665 if (node) {
3666 memcpy(&buffer[30], node->datacxx . . $ tInputCommandNode#data., strlen(node->datacxx . . $ tInputCommandNode#data.));
3667 int pos = 30 + strlen(node->datacxx . . $ tInputCommandNode#data.);
3668 if (pos <= 78) {
3669 buffer[pos] = '\n';
3670 buffer[pos + 1] = '\0';
3671 }
3672 }
3673 buffer[78] = '\n';
3674 buffer[79] = '\0';
3675
3676 DPrintf(buffer);
3677
3678 if (node)
3679 node = node->nextcxx . . $ tInputCommandNode#next.;
3680 }
3681
3682 return;
3683 }
3684
3685 // display help description
3686 while (node) {
3687 if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(node->data, s)) {
3688 // we found a match!
3689 DPrintf("%s:\n", node->datacxx . . $ tInputCommandNode#data.);
3690 if (node->desccxx . . $ tInputCommandNode#desc.)
3691 DPrintf("%s\n", node->desccxx . . $ tInputCommandNode#desc.);
3692 else
3693 DPrintf(DTXT_IC_NOADDITIONALINFOcxx . . $ `netgames/dmfc/dmfcinternal.h:2588:9`!);
3694 return;
3695 }
3696 node = node->nextcxx . . $ tInputCommandNode#next.;
3697 }
3698
3699 DPrintf(DTXT_IC_COMMANDNOTFOUNDcxx . . $ `netgames/dmfc/dmfcinternal.h:2589:9`!);
3700 }
3701
3702 // copies a string from src to dest, making dest all lower case
3703 void strlowcpycxx . . $ strlowcpy(72c91e5e80d20bae).(char *dest, const char *src) {
3704 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!((dest != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) && (src != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!));
3705 char *s, *d;
3706 s = (char *)src;
3707 d = dest;
3708
3709 while (*s) {
3710 *d = tolower(*s);
3711 s++;
3712 d++;
3713 }
3714 // do the final NULL
3715 *d = '\0';
3716 }
3717
3718 // DMFCBase::AddInputCommand
3719 //
3720 // When the client (or dedicated server) types a message that begins with a $, DMFC will look through
3721 // all the values you passed to AddInputCommand() and see if any match. If so it passes the entire
3722 // command string to the given function handler. Returns 1 on success, -1 if out of memory, 0 if it already
3723 // exists. These commands are not case sensitive.
3724 // Ex. AddInputCommand("team"); //this handles all the '$team' passed in
3725 int8_t DMFCBasecxx . . $ DMFCBase#::AddInputCommandcxx . . $ DMFCBase#AddInputCommand(e7187a5a7118c77f).(const char *command, const char *description, void (*handler)(const char *), bool allow_remotely) {
3726 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(command != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
3727 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(handler != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
3728
3729 // traverse to the end of the list checking for duplicates along the way
3730 tInputCommandNodecxx . . $ tInputCommandNode# *node = m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode.;
3731
3732 if (!node) {
3733 // there is none currently in the list, add it now
3734 node = (tInputCommandNodecxx . . $ tInputCommandNode# *)malloc(sizeof(tInputCommandNodecxx . . $ tInputCommandNode#));
3735 if (!node) {
3736 return -1;
3737 }
3738 // fill in data
3739 node->nextcxx . . $ tInputCommandNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3740 node->handlercxx . . $ tInputCommandNode#handler. = handler;
3741 node->allow_remotecxx . . $ tInputCommandNode#allow_remote. = allow_remotely;
3742 node->datacxx . . $ tInputCommandNode#data. = (char *)malloc(strlen(command) + 1);
3743 if (!node->datacxx . . $ tInputCommandNode#data.) { // out of memory
3744 free(node);
3745 return -1;
3746 }
3747 strlowcpycxx . . $ strlowcpy(72c91e5e80d20bae).(node->datacxx . . $ tInputCommandNode#data., command);
3748
3749 node->desccxx . . $ tInputCommandNode#desc. = (char *)malloc(strlen(description) + 1);
3750 if (node->desccxx . . $ tInputCommandNode#desc.)
3751 strcpy(node->desccxx . . $ tInputCommandNode#desc., description);
3752
3753 // all went ok
3754 m_InputCommandRootNodecxx . . $ DMFCBase#m_InputCommandRootNode. = node;
3755 return 1;
3756 }
3757
3758 while (node->nextcxx . . $ tInputCommandNode#next.) {
3759 // check this node to make sure it's not a duplicate
3760 if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(node->data, command)) {
3761 // we found a duplicate
3762 return 0;
3763 }
3764 node = node->nextcxx . . $ tInputCommandNode#next.;
3765 }
3766
3767 // we need to check the current node since while(node->next) breaks out before checking the last node
3768 if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(node->data, command)) {
3769 // we found a duplicate
3770 return 0;
3771 }
3772
3773 // it looks like everything went ok, now just create a new node and tack it on to the end
3774 // of the list. All that can go wrong now is an out of memory error.
3775 tInputCommandNodecxx . . $ tInputCommandNode# *temp;
3776 temp = (tInputCommandNodecxx . . $ tInputCommandNode# *)malloc(sizeof(tInputCommandNodecxx . . $ tInputCommandNode#));
3777 if (!temp) { // out of memory
3778 return -1;
3779 }
3780 temp->nextcxx . . $ tInputCommandNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
3781 temp->handlercxx . . $ tInputCommandNode#handler. = handler;
3782 temp->allow_remotecxx . . $ tInputCommandNode#allow_remote. = allow_remotely;
3783 temp->datacxx . . $ tInputCommandNode#data. = (char *)malloc(strlen(command) + 1);
3784 if (!temp->datacxx . . $ tInputCommandNode#data.) { // out of memory
3785 free(temp);
3786 return -1;
3787 }
3788 strlowcpycxx . . $ strlowcpy(72c91e5e80d20bae).(temp->datacxx . . $ tInputCommandNode#data., command);
3789
3790 temp->desccxx . . $ tInputCommandNode#desc. = (char *)malloc(strlen(description) + 1);
3791 if (temp->desccxx . . $ tInputCommandNode#desc.)
3792 strcpy(temp->desccxx . . $ tInputCommandNode#desc., description);
3793
3794 // now tack it on the end of the list and thats all
3795 node->nextcxx . . $ tInputCommandNode#next. = temp;
3796 return 1;
3797 }
3798
3799 // DMFCBase::DisconnectMe
3800 //
3801 // Disconnects yourself from the game. It should be called when you are kicked or banned to make the
3802 // whole process a bit nicer/cleaner. Even if it doesn't get called when kicked, you will still
3803 // eventually disconnect.
3804 void DMFCBasecxx . . $ DMFCBase#::DisconnectMecxx . . $ DMFCBase#DisconnectMe(49f6e7a06ebc5aa8).(void) { Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. |= NF_EXIT_NOWcxx . . $ `Descent3/multi_external.h:229:9`!; }
3805
3806 // Does a check on on the pinfo info making sure it is valid
3807 void DMFCBasecxx . . $ DMFCBase#::CheckPInfocxx . . $ DMFCBase#CheckPInfo(49f6e7a06ebc5aa8).() {
3808 for (int slot = 0; slot < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; slot++) {
3809 player_recordcxx . . $ player_record# *pr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(slot);
3810 if (pr && pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.) {
3811 // now go through the victim list and check
3812 tPKillerInfocxx . . $ tPKillerInfo# *node;
3813
3814 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(pr->pinfo != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
3815 node = pr->pinfocxx . . $ player_record#pinfo.->GetFirstKillercxx . . $ PInfo#GetFirstKiller(b31d3e412c1354e2).();
3816
3817 while (node) {
3818 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(node->slot >= 0 && node->slot < 64);
3819 node = node->nextcxx . . $ tPKillerInfo#next.;
3820 }
3821 }
3822 }
3823 }
3824
3825 // DMFCBase::EnableOnScreenMenu
3826 //
3827 // Turns on/off the onscreen menu
3828 void DMFCBasecxx . . $ DMFCBase#::EnableOnScreenMenucxx . . $ DMFCBase#EnableOnScreenMenu(b45ddcbc8423892c).(bool enable) {
3829 if (enable)
3830 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_INOPTIONScxx . . $ `netgames/dmfc/dmfcinternal.h:2384:9`!);
3831 else
3832 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_INOPTIONScxx . . $ `netgames/dmfc/dmfcinternal.h:2384:9`!);
3833 }
3834
3835 // DMFCBase::EnableAutoSaveLevelEnd
3836 //
3837 // Disables/Enables the autosaving of game stats to file on level end
3838 void DMFCBasecxx . . $ DMFCBase#::EnableAutoSaveLevelEndcxx . . $ DMFCBase#EnableAutoSaveLevelEnd(b45ddcbc8423892c).(bool enable) {
3839 if (enable)
3840 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`!);
3841 else
3842 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVELEVELENDcxx . . $ `netgames/dmfc/dmfcinternal.h:2381:9`!);
3843 }
3844
3845 // DMFCBase::EnableAutoSaveDisconnect
3846 //
3847 // Disables/Enables the autosaving of game stats to file on disconnect from the game
3848 void DMFCBasecxx . . $ DMFCBase#::EnableAutoSaveDisconnectcxx . . $ DMFCBase#EnableAutoSaveDisconnect(b45ddcbc8423892c).(bool enable) {
3849 if (enable)
3850 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`!);
3851 else
3852 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_AUTOSAVEDISCcxx . . $ `netgames/dmfc/dmfcinternal.h:2382:9`!);
3853 }
3854
3855 // DMFCBase::GenerateStatFilename
3856 //
3857 // Given the following information it will return a full path to what
3858 // the recommended filename to save stats to should be.
3859 // root = Multiplayer DLL Name (filename will start with this)
3860 // end_of_level = pass true if this is the end of a level stats
3861 void DMFCBasecxx . . $ DMFCBase#::GenerateStatFilenamecxx . . $ DMFCBase#GenerateStatFilename(4d4dad76095ad7d8).(char *filename, const char *root, bool end_of_level) {
3862 int level = Current_missioncxx . . $ DMFCBase#Current_mission.->cur_levelcxx . . $ tMission#cur_level.;
3863 char *name = Netgamecxx . . $ DMFCBase#Netgame.->namecxx . . $ netgame_info#name.;
3864 struct tmcxx . . $ tm# *newtime;
3865 time_t long_time;
3866
3867 time(&long_time);
3868 newtime = localtime(&long_time);
3869
3870 char fname[256];
3871 char timestr[100];
3872 char day[8], month[8];
3873
3874 switch (newtime->tm_wdaycxx . . $ tm#tm_wday.) {
3875 case 0:
3876 strcpy(day, DTXT_SUNDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2590:9`!);
3877 break;
3878 case 1:
3879 strcpy(day, DTXT_MONDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2591:9`!);
3880 break;
3881 case 2:
3882 strcpy(day, DTXT_TUESDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2592:9`!);
3883 break;
3884 case 3:
3885 strcpy(day, DTXT_WEDNESDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2593:9`!);
3886 break;
3887 case 4:
3888 strcpy(day, DTXT_THURSDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2594:9`!);
3889 break;
3890 case 5:
3891 strcpy(day, DTXT_FRIDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2595:9`!);
3892 break;
3893 case 6:
3894 strcpy(day, DTXT_SATURDAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2596:9`!);
3895 break;
3896 }
3897
3898 switch (newtime->tm_moncxx . . $ tm#tm_mon.) {
3899 case 0:
3900 strcpy(month, DTXT_JANUARYcxx . . $ `netgames/dmfc/dmfcinternal.h:2597:9`!);
3901 break;
3902 case 1:
3903 strcpy(month, DTXT_FEBRUARYcxx . . $ `netgames/dmfc/dmfcinternal.h:2598:9`!);
3904 break;
3905 case 2:
3906 strcpy(month, DTXT_MARCHcxx . . $ `netgames/dmfc/dmfcinternal.h:2599:9`!);
3907 break;
3908 case 3:
3909 strcpy(month, DTXT_APRILcxx . . $ `netgames/dmfc/dmfcinternal.h:2600:9`!);
3910 break;
3911 case 4:
3912 strcpy(month, DTXT_MAYcxx . . $ `netgames/dmfc/dmfcinternal.h:2601:9`!);
3913 break;
3914 case 5:
3915 strcpy(month, DTXT_JUNEcxx . . $ `netgames/dmfc/dmfcinternal.h:2602:9`!);
3916 break;
3917 case 6:
3918 strcpy(month, DTXT_JULYcxx . . $ `netgames/dmfc/dmfcinternal.h:2603:9`!);
3919 break;
3920 case 7:
3921 strcpy(month, DTXT_AUGUSTcxx . . $ `netgames/dmfc/dmfcinternal.h:2604:9`!);
3922 break;
3923 case 8:
3924 strcpy(month, DTXT_SEPTEMBERcxx . . $ `netgames/dmfc/dmfcinternal.h:2605:9`!);
3925 break;
3926 case 9:
3927 strcpy(month, DTXT_OCTOBERcxx . . $ `netgames/dmfc/dmfcinternal.h:2606:9`!);
3928 break;
3929 case 10:
3930 strcpy(month, DTXT_NOVEMBERcxx . . $ `netgames/dmfc/dmfcinternal.h:2607:9`!);
3931 break;
3932 case 11:
3933 strcpy(month, DTXT_DECEMBERcxx . . $ `netgames/dmfc/dmfcinternal.h:2608:9`!);
3934 break;
3935 }
3936
3937 snprintf(timestr, sizeof(timestr), "%s._%s._%d_%d_%02d%02d", day, month, newtime->tm_mdaycxx . . $ tm#tm_mday., newtime->tm_yearcxx . . $ tm#tm_year. + 1900,
3938 newtime->tm_hourcxx . . $ tm#tm_hour., newtime->tm_mincxx . . $ tm#tm_min.);
3939 snprintf(fname, sizeof(fname), "%s_%s_%d_%s%s.stats", root, name, level, (end_of_level) ? DTXT_ENDOFLEVELCONCATcxx . . $ `netgames/dmfc/dmfcinternal.h:2609:9`! : "",
3940 timestr);
3941
3942 // remove all spaces (convert to _)
3943 char *p = fname;
3944 while ((*p)) {
3945 if (*p == ' ')
3946 *p = '_';
3947 p++;
3948 }
3949
3950 // build the path info here
3951 DLLddio_MakePath(filename, LocalD3Dircxx . . $ DMFCBase#LocalD3Dir., "netgames", fname, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
3952 }
3953
3954 // DMFCBase::IsPlayerObserver
3955 //
3956 // Returns true if the given pnum is currently an observer in the game, else returns false.
3957 // If an invalid pnum is given, then it returns false
3958 bool DMFCBasecxx . . $ DMFCBase#::IsPlayerObservercxx . . $ DMFCBase#IsPlayerObserver(83c267b20bac841a).(int pnum) {
3959 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum))
3960 return false;
3961
3962 if (Objectscxx . . $ DMFCBase#Objects.[Playerscxx . . $ DMFCBase#Players.[pnum].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!)
3963 return true;
3964
3965 return false;
3966 }
3967
3968 // DMFCBase::EnableOnScreenMenuBackground
3969 //
3970 // Enables/disables the onscreen menu background
3971 void DMFCBasecxx . . $ DMFCBase#::EnableOnScreenMenuBackgroundcxx . . $ DMFCBase#EnableOnScreenMenuBackground(b45ddcbc8423892c).(bool enable) {
3972 if (enable)
3973 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!);
3974 else
3975 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!);
3976 }
3977
3978 // DMFCBase::DisplayNetGameInfo
3979 //
3980 // Displays information about the Netgame that is currently being played
3981 // on to the screen.
3982 void DMFCBasecxx . . $ DMFCBase#::DisplayNetGameInfocxx . . $ DMFCBase#DisplayNetGameInfo(918ebd27a9ddbad3).(int background_bmp, bool dedicated_server) {
3983 // char server_config_name[PAGENAME_LEN];
3984 // char connection_name[PAGENAME_LEN];
3985 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
3986
3987 int height = DLLgrfont_GetHeight(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]) + 1;
3988 // int height = DLLRenderHUDGetTextHeight("X")+1;
3989 ddgr_colorcxx . . $ ddgr_color# color = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(180, 255, 180);
3990 int x, y;
3991 y = 0;
3992 x = 15;
3993 int w, maxx = 0;
3994 char fullbuffer[1024];
3995
3996 int topy = 0;
3997 bool peertopeer = (bool)((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!) != 0);
3998 bool permissable = (bool)((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_PERMISSABLEcxx . . $ `Descent3/multi_external.h:239:9`!) != 0);
3999
4000 if ((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_DISPMENUBACKGRcxx . . $ `netgames/dmfc/dmfcinternal.h:2383:9`!) && background_bmp > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
4001 // draw the background bitmap
4002 DLLrend_SetAlphaValue(255 * 0.85f);
4003 DLLrend_SetZBufferState(0);
4004 DLLrend_SetTextureType(TT_LINEARcxx . . $ TT_LINEAR.);
4005 DLLrend_SetLighting(LS_NONEcxx . . $ LS_NONE.);
4006 DLLrend_SetAlphaType(AT_CONSTANT_TEXTUREcxx . . $ `lib/renderer.h:402:9`!);
4007 DLLrend_DrawScaledBitmap(0, 0, *Game_window_wcxx . . $ DMFCBase#Game_window_w., 8 * height, background_bmp, 0, 0, 1, 1, 1.0, -1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
4008 DLLrend_SetZBufferState(1);
4009 }
4010
4011 // Print out Title
4012 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_HEADING); y+=height;
4013 DLLgrtext_SetColor(color);
4014 DLLgrtext_SetAlpha(255);
4015 snprintf(fullbuffer, sizeof(fullbuffer), "%s", DTXT_NGI_HEADINGcxx . . $ `netgames/dmfc/dmfcinternal.h:2610:9`!);
4016 DLLgrtext_Printf(x, y, fullbuffer);
4017 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4018 maxx = (w > maxx) ? w : maxx;
4019 y += height;
4020
4021 if (dedicated_server)
4022 DPrintf(DTXT_NGI_HEADINGcxx . . $ `netgames/dmfc/dmfcinternal.h:2610:9`!);
4023 color = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(0, 255, 0);
4024 topy = y; // save this position
4025
4026 // Print out Game name
4027 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_GAMENAME,Netgame->name); y+=height;
4028 DLLgrtext_SetColor(color);
4029 DLLgrtext_SetAlpha(255);
4030 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_GAMENAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2611:9`!, Netgamecxx . . $ DMFCBase#Netgame.->namecxx . . $ netgame_info#name.);
4031 DLLgrtext_Printf(x, y, fullbuffer);
4032 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4033 maxx = (w > maxx) ? w : maxx;
4034 y += height;
4035
4036 if (dedicated_server)
4037 DPrintf(DTXT_NGI_GAMENAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2611:9`!, Netgamecxx . . $ DMFCBase#Netgame.->namecxx . . $ netgame_info#name.);
4038
4039 // Print out Mission name
4040 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_MISSIONNAME,Netgame->mission); y+=height;
4041 DLLgrtext_SetColor(color);
4042 DLLgrtext_SetAlpha(255);
4043 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_MISSIONNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2612:9`!, Netgamecxx . . $ DMFCBase#Netgame.->missioncxx . . $ netgame_info#mission.);
4044 DLLgrtext_Printf(x, y, fullbuffer);
4045 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4046 maxx = (w > maxx) ? w : maxx;
4047 y += height;
4048
4049 if (dedicated_server)
4050 DPrintf(DTXT_NGI_MISSIONNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2612:9`!, Netgamecxx . . $ DMFCBase#Netgame.->missioncxx . . $ netgame_info#mission.);
4051
4052 // Print out Script name
4053 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_SCRIPTNAME,Netgame->scriptname); y+=height;
4054 DLLgrtext_SetColor(color);
4055 DLLgrtext_SetAlpha(255);
4056 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_SCRIPTNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2613:9`!, Netgamecxx . . $ DMFCBase#Netgame.->scriptnamecxx . . $ netgame_info#scriptname.);
4057 DLLgrtext_Printf(x, y, fullbuffer);
4058 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4059 maxx = (w > maxx) ? w : maxx;
4060 y += height;
4061
4062 if (dedicated_server)
4063 DPrintf(DTXT_NGI_SCRIPTNAMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2613:9`!, Netgamecxx . . $ DMFCBase#Netgame.->scriptnamecxx . . $ netgame_info#scriptname.);
4064
4065 // Print out PPS
4066 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
4067 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_PPS,Netgame->packets_per_second); y+=height;
4068 DLLgrtext_SetColor(color);
4069 DLLgrtext_SetAlpha(255);
4070 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_PPScxx . . $ `netgames/dmfc/dmfcinternal.h:2614:9`!, Netgamecxx . . $ DMFCBase#Netgame.->packets_per_secondcxx . . $ netgame_info#packets_per_second.);
4071 DLLgrtext_Printf(x, y, fullbuffer);
4072 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4073 maxx = (w > maxx) ? w : maxx;
4074 y += height;
4075
4076 if (dedicated_server)
4077 DPrintf(DTXT_NGI_PPScxx . . $ `netgames/dmfc/dmfcinternal.h:2614:9`!, Netgamecxx . . $ DMFCBase#Netgame.->packets_per_secondcxx . . $ netgame_info#packets_per_second.);
4078 } else {
4079 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_PPSSERVER,Netgame->packets_per_second,NetPlayers[GetPlayerNum()].pps);
4080 // y+=height;
4081 DLLgrtext_SetColor(color);
4082 DLLgrtext_SetAlpha(255);
4083 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_PPSSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2615:9`!, Netgamecxx . . $ DMFCBase#Netgame.->packets_per_secondcxx . . $ netgame_info#packets_per_second.,
4084 NetPlayerscxx . . $ DMFCBase#NetPlayers.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].ppscxx . . $ netplayer#pps.);
4085 DLLgrtext_Printf(x, y, fullbuffer);
4086 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4087 maxx = (w > maxx) ? w : maxx;
4088 y += height;
4089
4090 if (dedicated_server)
4091 DPrintf(DTXT_NGI_PPSSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2615:9`!, Netgamecxx . . $ DMFCBase#Netgame.->packets_per_secondcxx . . $ netgame_info#packets_per_second., NetPlayerscxx . . $ DMFCBase#NetPlayers.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].ppscxx . . $ netplayer#pps.);
4092 }
4093
4094 // Print out Max Players
4095 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_MAXPLAYERS,Netgame->max_players); y+=height;
4096 DLLgrtext_SetColor(color);
4097 DLLgrtext_SetAlpha(255);
4098 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_MAXPLAYERScxx . . $ `netgames/dmfc/dmfcinternal.h:2616:9`!, Netgamecxx . . $ DMFCBase#Netgame.->max_playerscxx . . $ netgame_info#max_players.);
4099 DLLgrtext_Printf(x, y, fullbuffer);
4100 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4101 maxx = (w > maxx) ? w : maxx;
4102 y += height;
4103
4104 if (dedicated_server)
4105 DPrintf(DTXT_NGI_MAXPLAYERScxx . . $ `netgames/dmfc/dmfcinternal.h:2616:9`!, Netgamecxx . . $ DMFCBase#Netgame.->max_playerscxx . . $ netgame_info#max_players.);
4106
4107 // Accurate Collision Detection
4108 bool use_acc_weap = (bool)((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_USE_ACC_WEAPcxx . . $ `Descent3/multi_external.h:236:9`!) != 0);
4109 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_ACCURATECOLL,(use_acc_weap)?DTXT_MNUON:DTXT_MNUOFF); y+=height;
4110 DLLgrtext_SetColor(color);
4111 DLLgrtext_SetAlpha(255);
4112 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_ACCURATECOLLcxx . . $ `netgames/dmfc/dmfcinternal.h:2617:9`!, (use_acc_weap) ? DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`! : DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!);
4113 DLLgrtext_Printf(x, y, fullbuffer);
4114 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4115 maxx = (w > maxx) ? w : maxx;
4116 y += height;
4117
4118 if (dedicated_server)
4119 DPrintf(DTXT_NGI_ACCURATECOLLcxx . . $ `netgames/dmfc/dmfcinternal.h:2617:9`!, (use_acc_weap) ? DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`! : DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!);
4120
4121 // move to second column
4122 y = topy;
4123 x += (maxx + 10);
4124
4125 // Rotatitional Velocity
4126 bool rot_vel_sent = (bool)((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_SENDROTVELcxx . . $ `Descent3/multi_external.h:231:9`!) != 0);
4127 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_SENDROTATIONAL,(rot_vel_sent)?DTXT_MNUON:DTXT_MNUOFF); y+=height;
4128 DLLgrtext_SetColor(color);
4129 DLLgrtext_SetAlpha(255);
4130 snprintf(fullbuffer, sizeof(fullbuffer), DTXT_NGI_SENDROTATIONALcxx . . $ `netgames/dmfc/dmfcinternal.h:2618:9`!, (rot_vel_sent) ? DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`! : DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!);
4131 DLLgrtext_Printf(x, y, fullbuffer);
4132 w = DLLgrtext_GetTextLineWidth(fullbuffer);
4133 y += height;
4134
4135 if (dedicated_server)
4136 DPrintf(DTXT_NGI_SENDROTATIONALcxx . . $ `netgames/dmfc/dmfcinternal.h:2618:9`!, (rot_vel_sent) ? DTXT_MNUONcxx . . $ `netgames/dmfc/dmfcinternal.h:2408:9`! : DTXT_MNUOFFcxx . . $ `netgames/dmfc/dmfcinternal.h:2409:9`!);
4137
4138 // Print out time limit
4139 if (Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_TIMERcxx . . $ `Descent3/multi_external.h:226:9`!) {
4140 DLLgrtext_SetColor(color);
4141 DLLgrtext_SetAlpha(255);
4142 DLLgrtext_Printf(x, y, DTXT_NGI_TIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2619:9`!, Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit.,
4143 (Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit. == 1) ? DTXT_MINUTEcxx . . $ `netgames/dmfc/dmfcinternal.h:2620:9`! : DTXT_MINUTEScxx . . $ `netgames/dmfc/dmfcinternal.h:2621:9`!);
4144 y += height;
4145
4146 if (dedicated_server)
4147 DPrintf(DTXT_NGI_TIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2619:9`!, Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit., (Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit. == 1) ? DTXT_MINUTEcxx . . $ `netgames/dmfc/dmfcinternal.h:2620:9`! : DTXT_MINUTEScxx . . $ `netgames/dmfc/dmfcinternal.h:2621:9`!);
4148
4149 float t_left = 0;
4150 t_left = (Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit. * 60.0f) - RealGametimecxx . . $ DMFCBase#RealGametime.;
4151
4152 // Print out time left
4153 DLLgrtext_SetColor(color);
4154 DLLgrtext_SetAlpha(255);
4155 DLLgrtext_Printf(x, y, DTXT_NGI_TIMELEFTcxx . . $ `netgames/dmfc/dmfcinternal.h:2622:9`!, GetTimeStringcxx . . $ DMFCBase#GetTimeString(3b344d7a46e3c2ff).(t_left));
4156 y += height;
4157
4158 if (dedicated_server)
4159 DPrintf(DTXT_NGI_TIMELEFTcxx . . $ `netgames/dmfc/dmfcinternal.h:2622:9`!, GetTimeStringcxx . . $ DMFCBase#GetTimeString(3b344d7a46e3c2ff).(t_left));
4160 } else {
4161 DLLgrtext_SetColor(color);
4162 DLLgrtext_SetAlpha(255);
4163 DLLgrtext_Printf(x, y, DTXT_NGI_NOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2623:9`!);
4164 y += height;
4165
4166 if (dedicated_server)
4167 DPrintf(DTXT_NGI_NOTIMELIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2623:9`!);
4168 }
4169
4170 // Print out Goal
4171 if (Netgamecxx . . $ DMFCBase#Netgame.->killgoalcxx . . $ netgame_info#killgoal. > 0) {
4172 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_GOALLIMIT,Netgame->killgoal); y+=height;
4173 DLLgrtext_SetColor(color);
4174 DLLgrtext_SetAlpha(255);
4175 DLLgrtext_Printf(x, y, DTXT_NGI_GOALLIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2624:9`!, Netgamecxx . . $ DMFCBase#Netgame.->killgoalcxx . . $ netgame_info#killgoal.);
4176 y += height;
4177
4178 if (dedicated_server)
4179 DPrintf(DTXT_NGI_GOALLIMITcxx . . $ `netgames/dmfc/dmfcinternal.h:2624:9`!, Netgamecxx . . $ DMFCBase#Netgame.->killgoalcxx . . $ netgame_info#killgoal.);
4180 } else {
4181 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_NOGOAL); y+=height;
4182 DLLgrtext_SetColor(color);
4183 DLLgrtext_SetAlpha(255);
4184 DLLgrtext_Printf(x, y, DTXT_NGI_NOGOALcxx . . $ `netgames/dmfc/dmfcinternal.h:2625:9`!);
4185 y += height;
4186
4187 if (dedicated_server)
4188 DPrintf(DTXT_NGI_NOGOALcxx . . $ `netgames/dmfc/dmfcinternal.h:2625:9`!);
4189 }
4190
4191 // Print out Respawn time
4192 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_RESPAWNTIME,GetTimeString(Netgame->respawn_time)); y+=height;
4193 DLLgrtext_SetColor(color);
4194 DLLgrtext_SetAlpha(255);
4195 DLLgrtext_Printf(x, y, DTXT_NGI_RESPAWNTIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2626:9`!, GetTimeStringcxx . . $ DMFCBase#GetTimeString(3b344d7a46e3c2ff).(Netgamecxx . . $ DMFCBase#Netgame.->respawn_timecxx . . $ netgame_info#respawn_time.));
4196 y += height;
4197
4198 if (dedicated_server)
4199 DPrintf(DTXT_NGI_RESPAWNTIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2626:9`!, GetTimeStringcxx . . $ DMFCBase#GetTimeString(3b344d7a46e3c2ff).(Netgamecxx . . $ DMFCBase#Netgame.->respawn_timecxx . . $ netgame_info#respawn_time.));
4200
4201 // Print out Client/Server Packet Loss
4202 if ((GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).() == 0) || peertopeer) {
4203 // packet loss info not available
4204 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_PACKETLOSSNA); y+= height;
4205 DLLgrtext_SetColor(color);
4206 DLLgrtext_SetAlpha(255);
4207 DLLgrtext_Printf(x, y, DTXT_NGI_PACKETLOSSNAcxx . . $ `netgames/dmfc/dmfcinternal.h:2627:9`!);
4208 y += height;
4209
4210 if (dedicated_server)
4211 DPrintf(DTXT_NGI_PACKETLOSSNAcxx . . $ `netgames/dmfc/dmfcinternal.h:2627:9`!);
4212 } else {
4213 float packetloss = NetPlayerscxx . . $ DMFCBase#NetPlayers.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].percent_losscxx . . $ netplayer#percent_loss.;
4214
4215 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_PACKETLOSS,packetloss); y+=height;
4216 DLLgrtext_SetColor(color);
4217 DLLgrtext_SetAlpha(255);
4218 DLLgrtext_Printf(x, y, DTXT_NGI_PACKETLOSScxx . . $ `netgames/dmfc/dmfcinternal.h:2628:9`!, packetloss);
4219 y += height;
4220
4221 if (dedicated_server)
4222 DPrintf(DTXT_NGI_PACKETLOSScxx . . $ `netgames/dmfc/dmfcinternal.h:2628:9`!, packetloss);
4223 }
4224
4225 // Print out Architecture
4226 // DLLRenderHUDText(color,255,0,x,y,DTXT_NGI_NETWORKMODEL,(peertopeer)?DTXT_PEERTOPEER:DTXT_CLIENTSERVER); y+=height;
4227 DLLgrtext_SetColor(color);
4228 DLLgrtext_SetAlpha(255);
4229 DLLgrtext_Printf(x, y, DTXT_NGI_NETWORKMODELcxx . . $ `netgames/dmfc/dmfcinternal.h:2629:9`!,
4230 (peertopeer) ? DTXT_PEERTOPEERcxx . . $ `netgames/dmfc/dmfcinternal.h:2630:9`! : ((permissable) ? DTXT_PERMISSABLEcxx . . $ `netgames/dmfc/dmfcinternal.h:2714:9`! : DTXT_CLIENTSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2631:9`!));
4231 y += height;
4232
4233 if (dedicated_server)
4234 DPrintf(DTXT_NGI_NETWORKMODELcxx . . $ `netgames/dmfc/dmfcinternal.h:2629:9`!,
4235 (peertopeer) ? DTXT_PEERTOPEERcxx . . $ `netgames/dmfc/dmfcinternal.h:2630:9`! : ((permissable) ? DTXT_PERMISSABLEcxx . . $ `netgames/dmfc/dmfcinternal.h:2714:9`! : DTXT_CLIENTSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2631:9`!));
4236 }
4237
4238 /*
4239 ****************************************************************
4240 * Registry Database Functions *
4241 ****************************************************************
4242 */
4243
4244 // DatabaseRegister
4245 // Registers your multiplayer game with the database. This must be
4246 // called before any other database function, or they will fail until this
4247 // is called.
4248 void DMFCBasecxx . . $ DMFCBase#::DatabaseRegistercxx . . $ DMFCBase#DatabaseRegister(fda57c8427c60377).(char *name) {
4249 if (name) {
4250 strncpy(DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName., name, MAX_DBNAME_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:277:9`! - 1);
4251 DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[MAX_DBNAME_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:277:9`! - 1] = '\0';
4252 }
4253 }
4254
4255 // DatabaseRead
4256 // Reads a string from the database
4257 bool DMFCBasecxx . . $ DMFCBase#::DatabaseReadcxx . . $ DMFCBase#DatabaseRead(3bcbb53201fcdcb8).(const char *label, char *entry, int *entrylen) {
4258 if (DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[0] == '\0')
4259 return false;
4260 if (!label || !entry || !entrylen)
4261 return false;
4262
4263 int reg_len = strlen(DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4264 int copy = MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1 - reg_len;
4265 char buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`!];
4266
4267 strcpy(buffer, DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4268 strncpy(&buffer[reg_len], label, copy);
4269 buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1] = '\0';
4270
4271 return DatabaseRead1(buffer, entry, entrylen);
4272 }
4273
4274 // DatabaseRead
4275 // Reads wordsize bytes from the database
4276 bool DMFCBasecxx . . $ DMFCBase#::DatabaseReadcxx . . $ DMFCBase#DatabaseRead(340cb0a925eda13d).(const char *label, void *entry, int wordsize) {
4277 if (DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[0] == '\0')
4278 return false;
4279 if (!label || !entry)
4280 return false;
4281
4282 int reg_len = strlen(DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4283 int copy = MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1 - reg_len;
4284 char buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`!];
4285
4286 strcpy(buffer, DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4287 strncpy(&buffer[reg_len], label, copy);
4288 buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1] = '\0';
4289
4290 return DatabaseRead2(buffer, entry, wordsize);
4291 }
4292
4293 // DatabaseRead
4294 // Reads a bool from the database
4295 bool DMFCBasecxx . . $ DMFCBase#::DatabaseReadcxx . . $ DMFCBase#DatabaseRead(c1ce79fc3dc965f1).(const char *label, bool *entry) {
4296 if (DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[0] == '\0')
4297 return false;
4298 if (!label || !entry)
4299 return false;
4300
4301 int reg_len = strlen(DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4302 int copy = MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1 - reg_len;
4303 char buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`!];
4304
4305 strcpy(buffer, DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4306 strncpy(&buffer[reg_len], label, copy);
4307 buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1] = '\0';
4308
4309 return DatabaseRead3(buffer, entry);
4310 }
4311
4312 // DatabaseWrite
4313 // Writes/Updates a string to the database
4314 bool DMFCBasecxx . . $ DMFCBase#::DatabaseWritecxx . . $ DMFCBase#DatabaseWrite(f827cee075336303).(const char *label, const char *entry, int entrylen) {
4315 if (DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[0] == '\0')
4316 return false;
4317 if (!label || !entry)
4318 return false;
4319
4320 int reg_len = strlen(DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4321 int copy = MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1 - reg_len;
4322 char buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`!];
4323
4324 strcpy(buffer, DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4325 strncpy(&buffer[reg_len], label, copy);
4326 buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1] = '\0';
4327
4328 return DatabaseWritecxx . . $ DMFCBase#DatabaseWrite(f827cee075336303).(buffer, entry, entrylen);
4329 }
4330
4331 // DatabaseWrite
4332 // Writes/Updates a value to the database
4333 bool DMFCBasecxx . . $ DMFCBase#::DatabaseWritecxx . . $ DMFCBase#DatabaseWrite(2551bed5d6fc04f6).(const char *label, int entry) {
4334 if (DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.[0] == '\0')
4335 return false;
4336 if (!label)
4337 return false;
4338
4339 int reg_len = strlen(DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4340 int copy = MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1 - reg_len;
4341 char buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`!];
4342
4343 strcpy(buffer, DatabaseRegisteredNamecxx . . $ DMFCBase#DatabaseRegisteredName.);
4344 strncpy(&buffer[reg_len], label, copy);
4345 buffer[MAX_DBLABEL_SIZEcxx . . $ `netgames/dmfc/dmfcinternal.h:278:9`! - 1] = '\0';
4346
4347 return DatabaseWritecxx . . $ DMFCBase#DatabaseWrite(2551bed5d6fc04f6).(buffer, entry);
4348 }
4349
4350 // CompareNetworkAddress
4351 //
4352 // Compare's two network addresses, returns true if they are the same, false if not.
4353 // use_port: if this is true, than it will consider the port part of the network address
4354 bool DMFCBasecxx . . $ DMFCBase#::CompareNetworkAddresscxx . . $ DMFCBase#CompareNetworkAddress(3c6f311cdf2181f2).(network_addresscxx . . $ network_address# *one, network_addresscxx . . $ network_address# *two, bool use_port) {
4355 if (use_port) {
4356 // compare the whole darned thing
4357 if (!memcmp(one, two, sizeof(network_addresscxx . . $ network_address#)))
4358 return true;
4359 else
4360 return false;
4361 } else {
4362 // compare all but the port
4363 if (!memcmp(one->addresscxx . . $ network_address#address., two->addresscxx . . $ network_address#address., 6) && !memcmp(one->net_idcxx . . $ network_address#net_id., two->net_idcxx . . $ network_address#net_id., 4) &&
4364 !memcmp(&one->connection_typecxx . . $ network_address#connection_type., &two->connection_typecxx . . $ network_address#connection_type., sizeof(network_protocolcxx . . $ network_protocol#))) {
4365 // looks the same to me
4366 return true;
4367 } else {
4368 // something didn't match
4369 return false;
4370 }
4371 }
4372
4373 return false;
4374 }
4375
4376 // IsMasterTrackerGame
4377 //
4378 // returns true if this game is being played on the master tracker
4379 bool DMFCBasecxx . . $ DMFCBase#::IsMasterTrackerGamecxx . . $ DMFCBase#IsMasterTrackerGame(c9857a73d68e59ba).(void) { return (bool)((*m_bTrackerGamecxx . . $ DMFCBase#m_bTrackerGame.) != 0); }
4380
4381 // ConvertLocalToServerObjnum
4382 //
4383 // Given an objnum, it will convert the number from your local objnum to the server's objnum
4384 // It will return -1 on error
4385 int DMFCBasecxx . . $ DMFCBase#::ConvertLocalToServerObjnumcxx . . $ DMFCBase#ConvertLocalToServerObjnum(7864480464b09eea).(int objnum) {
4386 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
4387 return (objnum < 0 || objnum >= MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!) ? -1 : objnum;
4388
4389 if (objnum < 0 || objnum >= MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!)
4390 return -1;
4391
4392 int s = Local_object_listcxx . . $ DMFCBase#Local_object_list.[objnum];
4393
4394 return (s == 65535) ? -1 : s;
4395 }
4396
4397 // ConvertServerToLocalObjnum
4398 //
4399 // Given an objnum from the server, this function will convert the objnum to your local objnum
4400 // It will return -1 on error
4401 int DMFCBasecxx . . $ DMFCBase#::ConvertServerToLocalObjnumcxx . . $ DMFCBase#ConvertServerToLocalObjnum(7864480464b09eea).(int objnum) {
4402 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
4403 return (objnum < 0 || objnum >= MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!) ? -1 : objnum;
4404
4405 if (objnum < 0 || objnum >= MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!)
4406 return -1;
4407
4408 int s = Server_object_listcxx . . $ DMFCBase#Server_object_list.[objnum];
4409
4410 return (s == 65535) ? -1 : s;
4411 }
4412
4413 // DMFCBase::AnnounceTeamChangeDeny
4414 //
4415 // Tells a player that team change request was denied
4416 void DMFCBasecxx . . $ DMFCBase#::AnnounceTeamChangeDenycxx . . $ DMFCBase#AnnounceTeamChangeDeny(d4f767463ce0a6b3).(int pnum) {
4417 if (pnum == *Player_numcxx . . $ DMFCBase#Player_num.) {
4418 DLLAddHUDMessage(DTXT_CHANGETEAMDENIEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2633:9`!);
4419 } else {
4420 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
4421 // tell the client the change has been denied
4422 SendControlMessageToPlayercxx . . $ DMFCBase#SendControlMessageToPlayer(9633529ce3c4ff50).(pnum, CM_TEAMCHANGEDENIEDcxx . . $ `netgames/dmfc/dmfcinternal.h:283:9`!);
4423 }
4424 }
4425 }
4426
4427 // DMFCBase::SetDeathMessageFilter
4428 //
4429 // Sets the death message filter
4430 void DMFCBasecxx . . $ DMFCBase#::SetDeathMessageFiltercxx . . $ DMFCBase#SetDeathMessageFilter(d4f767463ce0a6b3).(int level) {
4431 if (level < 0)
4432 level = 0;
4433 if (level > 2)
4434 level = 2;
4435
4436 if (level == m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter.)
4437 return;
4438
4439 m_iDeathMessageFiltercxx . . $ DMFCBase#m_iDeathMessageFilter. = level;
4440 switch (level) {
4441 case DM_FILTER_FULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2780:9`!:
4442 DLLAddHUDMessage(DTXT_KILLMSGFULLcxx . . $ `netgames/dmfc/dmfcinternal.h:2634:9`!);
4443 break;
4444 case DM_FILTER_SIMPLEcxx . . $ `netgames/dmfc/dmfcinternal.h:2781:9`!:
4445 DLLAddHUDMessage(DTXT_KILLMSGSIMPLEcxx . . $ `netgames/dmfc/dmfcinternal.h:2635:9`!);
4446 break;
4447 case DM_FILTER_NONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2782:9`!:
4448 DLLAddHUDMessage(DTXT_KILLMSGNONEcxx . . $ `netgames/dmfc/dmfcinternal.h:2636:9`!);
4449 break;
4450 };
4451 }
4452
4453 // DMFCBase::MakeClientsWait
4454 //
4455 // If passed true than all joining clients are forced to wait until they are given the signal to
4456 // join, either through SignalClientStart() or by passing false to MakeClientsWait
4457 void DMFCBasecxx . . $ DMFCBase#::MakeClientsWaitcxx . . $ DMFCBase#MakeClientsWait(b45ddcbc8423892c).(bool wait) {
4458 m_bMakeClientsWaitcxx . . $ DMFCBase#m_bMakeClientsWait. = wait;
4459
4460 if (!wait) {
4461 // tell all the clients it's time to start
4462 for (int i = 0; i < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; i++) {
4463 if (CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(i)) {
4464 SignalClientStartcxx . . $ DMFCBase#SignalClientStart(d4f767463ce0a6b3).(i);
4465 }
4466 }
4467 } else {
4468 // tell all the clients to hold up
4469 WaitForServercxx . . $ DMFCBase#WaitForServer(b45ddcbc8423892c).(true);
4470 }
4471 }
4472
4473 // DMFCBase::SignalClientStart
4474 //
4475 // Given a player num, it tells the client that they can start moving and playing
4476 void DMFCBasecxx . . $ DMFCBase#::SignalClientStartcxx . . $ DMFCBase#SignalClientStart(d4f767463ce0a6b3).(int pnum) {
4477 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
4478 return;
4479 }
4480
4481 SendControlMessageToPlayercxx . . $ DMFCBase#SendControlMessageToPlayer(9633529ce3c4ff50).(pnum, CM_SIGNALSTARTcxx . . $ `netgames/dmfc/dmfcinternal.h:284:9`!);
4482 if (pnum == GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).())
4483 WaitForServercxx . . $ DMFCBase#WaitForServer(b45ddcbc8423892c).(false);
4484 }
4485
4486 // DMFCBase::WaitForServer
4487 //
4488 // Call this to start waiting, until the server tells us to stop (by passing false as a parm)
4489 void DMFCBasecxx . . $ DMFCBase#::WaitForServercxx . . $ DMFCBase#WaitForServer(b45ddcbc8423892c).(bool wait) {
4490 if (wait) {
4491 Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].movement_scalarcxx . . $ player#movement_scalar. = 0;
4492 Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar. = 99999.9f;
4493 m_bMakeClientsWaitcxx . . $ DMFCBase#m_bMakeClientsWait. = true;
4494 } else {
4495 Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].movement_scalarcxx . . $ player#movement_scalar. = 1.0f;
4496 Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar. = 1.0f;
4497 m_bMakeClientsWaitcxx . . $ DMFCBase#m_bMakeClientsWait. = false;
4498 }
4499
4500 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
4501 return;
4502
4503 if (!wait)
4504 return;
4505
4506 for (int i = 0; i < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; i++) {
4507 if (CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(i)) {
4508 SendControlMessageToPlayercxx . . $ DMFCBase#SendControlMessageToPlayer(9633529ce3c4ff50).(i, CM_SIGNALWAITcxx . . $ `netgames/dmfc/dmfcinternal.h:285:9`!);
4509 }
4510 }
4511 }
4512
4513 // DMFCBase::WaitingForServerLoop
4514 //
4515 // Called per frame while waiting for the server to signal go
4516 void DMFCBasecxx . . $ DMFCBase#::WaitingForServerLoopcxx . . $ DMFCBase#WaitingForServerLoop(49f6e7a06ebc5aa8).(void) {
4517 static float time_ac = 0;
4518 static bool show = true;
4519
4520 time_ac += *Frametimecxx . . $ DMFCBase#Frametime.;
4521
4522 if (time_ac > 0.5) {
4523 time_ac = 0;
4524 show = !show;
4525 }
4526
4527 if (show) {
4528 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[MENU_FONT_INDEXcxx . . $ `Descent3/gamefont.h:98:9`!]);
4529
4530 int height = DLLgrfont_GetHeight(Game_fontscxx . . $ DMFCBase#Game_fonts.[MENU_FONT_INDEXcxx . . $ `Descent3/gamefont.h:98:9`!]);
4531
4532 DLLRenderHUDTextFlags(HUDTEXT_CENTEREDcxx . . $ `Descent3/hud.h:604:9`!, GR_WHITEcxx . . $ GR_WHITE., 255, 0, 0, 240 - (height / 2), DTXT_WAITFORSERVERcxx . . $ `netgames/dmfc/dmfcinternal.h:2637:9`!);
4533 DLLgrtext_Flush();
4534 }
4535
4536 // Make sure we stay waiting...
4537 Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].movement_scalarcxx . . $ player#movement_scalar. = 0;
4538 Playerscxx . . $ DMFCBase#Players.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar. = 99999.9f;
4539 }
4540
4541 // DMFCBase::IAmDedicatedServer
4542 //
4543 // Returns true if we are a dedicated server
4544 bool DMFCBasecxx . . $ DMFCBase#::IAmDedicatedServercxx . . $ DMFCBase#IAmDedicatedServer(c9857a73d68e59ba).(void) { return *Dedicated_servercxx . . $ DMFCBase#Dedicated_server.; }
4545
4546 // DMFCBase::IsPlayerDedicatedServer
4547 //
4548 // Returns true if the passed in pnum/player_record is a dedicated server
4549 bool DMFCBasecxx . . $ DMFCBase#::IsPlayerDedicatedServercxx . . $ DMFCBase#IsPlayerDedicatedServer(83c267b20bac841a).(int pnum) {
4550 // since we are looking for a server, the pnum must be 0
4551 if (pnum != 0)
4552 return false;
4553
4554 if (Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. == -1)
4555 return true;
4556
4557 return false;
4558 }
4559 bool DMFCBasecxx . . $ DMFCBase#::IsPlayerDedicatedServercxx . . $ DMFCBase#IsPlayerDedicatedServer(6a9c0d4ad435bebf).(player_recordcxx . . $ player_record# *pr) {
4560 if (pr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.)
4561 return false;
4562
4563 if (pr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.)
4564 return (pr->teamcxx . . $ player_record#team. == -1) ? true : false;
4565
4566 return IsPlayerDedicatedServercxx . . $ DMFCBase#IsPlayerDedicatedServer(83c267b20bac841a).(pr->pnumcxx . . $ player_record#pnum.);
4567 }
4568
4569 // DMFCBase::GetPlayerTeam
4570 //
4571 // Returns the team of the player...call this instead of accessing .team directly
4572 int DMFCBasecxx . . $ DMFCBase#::GetPlayerTeamcxx . . $ DMFCBase#GetPlayerTeam(7864480464b09eea).(int pnum) { return (Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team. == -1) ? 0 : Playerscxx . . $ DMFCBase#Players.[pnum].teamcxx . . $ player#team.; }
4573
4574 // DMFCBase::ConvertHUDCoord
4575 //
4576 // Given an x,y based on a virtual 640x480 screen, this will convert it to the x,y that should be
4577 // used based on the current screen size
4578 void DMFCBasecxx . . $ DMFCBase#::ConvertHUDCoordcxx . . $ DMFCBase#ConvertHUDCoord(d9d96f10f2d1e5b).(int x, int y, int *rx, int *ry) {
4579 *rx = ((float)(x) * (*Hud_aspect_xcxx . . $ DMFCBase#Hud_aspect_x.));
4580 *ry = ((float)(y) * (*Hud_aspect_ycxx . . $ DMFCBase#Hud_aspect_y.));
4581 }
4582
4583 // DMFCBase::GetPlayerLogoBmp
4584 //
4585 // Given a player_num, it will return a bitmap handle to that player's ship logo, or
4586 // -1 if they don't have a logo for their ship.
4587 // if is_vclip comes back as true, than it is not a bitmap handle, but a handle
4588 // to a vclip (animated bitmap). It is an index into the DLLGameVClips[].
4589 int DMFCBasecxx . . $ DMFCBase#::GetPlayerLogoBmpcxx . . $ DMFCBase#GetPlayerLogoBmp(87ec94c72a760af5).(int player_num, bool *is_vclip) {
4590 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(player_num))
4591 return -1; // invalid pnum
4592
4593 int texture_handle = Playerscxx . . $ DMFCBase#Players.[player_num].custom_texture_handlecxx . . $ player#custom_texture_handle.;
4594
4595 if (GameTexturescxx . . $ DMFCBase#GameTextures.[texture_handle].bm_handlecxx . . $ texture#bm_handle. <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!)
4596 return -1;
4597
4598 *is_vclip = (GameTexturescxx . . $ DMFCBase#GameTextures.[texture_handle].flagscxx . . $ texture#flags. & TF_ANIMATEDcxx . . $ `Descent3/gametexture.h:207:9`!) ? true : false;
4599
4600 return GameTexturescxx . . $ DMFCBase#GameTextures.[texture_handle].bm_handlecxx . . $ texture#bm_handle.;
4601 }
4602
4603 // DMFCBase::EnableShipLogos
4604 //
4605 // Disables or enables logo displaying for the client
4606 void DMFCBasecxx . . $ DMFCBase#::EnableShipLogoscxx . . $ DMFCBase#EnableShipLogos(b45ddcbc8423892c).(bool enable) {
4607 if (enable) {
4608 ENABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2371:9`!(m_iProtectedFlags, DMFC_PRF_SHIPLOGOSENABLEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2388:9`!);
4609 } else {
4610 DISABLE_FLAGScxx . . $ `netgames/dmfc/dmfcinternal.h:2372:9`!(m_iProtectedFlags, DMFC_PRF_SHIPLOGOSENABLEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2388:9`!);
4611 }
4612
4613 DLLMultiSetLogoState(enable);
4614 }
4615
4616 // DMFCBase::AreLogosEnabled
4617 //
4618 // returns true if ship logos are enabled
4619 bool DMFCBasecxx . . $ DMFCBase#::AreLogosEnabledcxx . . $ DMFCBase#AreLogosEnabled(c9857a73d68e59ba).(void) { return (bool)((m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_SHIPLOGOSENABLEDcxx . . $ `netgames/dmfc/dmfcinternal.h:2388:9`!) != 0); }
4620
4621 // DMFCBase::EnableAudioTaunts
4622 //
4623 // Disables or enables audio taunts
4624 void DMFCBasecxx . . $ DMFCBase#::EnableAudioTauntscxx . . $ DMFCBase#EnableAudioTaunts(b45ddcbc8423892c).(bool enable) { DLLtaunt_Enable(enable); }
4625
4626 // DMFCBase::AreTauntsEnabled(void)
4627 //
4628 // returns true if audio taunts are enabled
4629 bool DMFCBasecxx . . $ DMFCBase#::AreTauntsEnabledcxx . . $ DMFCBase#AreTauntsEnabled(c9857a73d68e59ba).(void) { return DLLtaunt_AreEnabled(); }
4630
4631 // DMFCBase::RespawnPlayer
4632 //
4633 // Takes the given player and respawns his at a random start point (in a team game, team respawn
4634 // points are taken into consideration, so make sure the player is on the correct team before you
4635 // respawn him. spew_everything, if false, will override spew_energy_and_shields
4636 void DMFCBasecxx . . $ DMFCBase#::RespawnPlayercxx . . $ DMFCBase#RespawnPlayer(d06ec138c316ab3d).(int pnum, bool spew_energy_and_shields, bool spew_everything) {
4637 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum))
4638 return;
4639
4640 objectcxx . . $ object# *obj = &Objectscxx . . $ DMFCBase#Objects.[Playerscxx . . $ DMFCBase#Players.[pnum].objnumcxx . . $ player#objnum.];
4641
4642 if (spew_everything)
4643 DLLPlayerSpewInventory(obj, spew_energy_and_shields, spew_everything);
4644
4645 DLLPlayerStopSounds(pnum);
4646
4647 DLLInitPlayerNewShip(pnum, (spew_everything) ? INVRESET_ALLcxx . . $ `Descent3/Inventory.h:201:9`! : INVRESET_DEATHSPEWcxx . . $ `Descent3/Inventory.h:203:9`!);
4648
4649 if (pnum != GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).())
4650 return;
4651
4652 int slot = DLLPlayerGetRandomStartPosition(pnum);
4653
4654 DLLObjSetPos(obj, &Playerscxx . . $ DMFCBase#Players.[slot].start_poscxx . . $ player#start_pos., Playerscxx . . $ DMFCBase#Players.[slot].start_roomnumcxx . . $ player#start_roomnum., &Playerscxx . . $ DMFCBase#Players.[slot].start_orientcxx . . $ player#start_orient., false);
4655 }
4656
4657 // If you are going to create submenus you MUST use this function. along with:
4658 // void SetState(int state);
4659 // bool SetStateItemList(int count, ... ); for MIT_STATE items
4660 MenuItemcxx . . $ MenuItem# *DMFCBasecxx . . $ DMFCBase#::CreateMenuItemcxx . . $ DMFCBase#CreateMenuItem(c2d9b916734a716c).(const char *title, char type, uint8_tcxx . . $ uint8_t# flags, void (*fp)(int), ...) {
4661 MenuItemcxx . . $ MenuItem# *p;
4662
4663 if (type != MIT_CUSTOMcxx . . $ `netgames/includes/DMFC.h:517:9`! && type != MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!) {
4664 p = new MenuItemcxx . . $ MenuItem#(title, type, flags, fp);
4665 return p;
4666 } else {
4667 if (type == MIT_CUSTOMcxx . . $ `netgames/includes/DMFC.h:517:9`!) {
4668 tCustomMenucxx . . $ tCustomMenu# cm;
4669
4670 va_listcxx . . $ va_list# marker;
4671 va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, fp);
4672 memcpy(&cm, va_argcxx . . $ `<external>/8105065126723003039/stdarg.h:53:9`!(marker, tCustomMenu *), sizeof(tCustomMenucxx . . $ tCustomMenu#));
4673 va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker);
4674
4675 p = new MenuItemcxx . . $ MenuItem#(title, type, flags, fp, &cm);
4676 return p;
4677 } else {
4678 p = new MenuItemcxx . . $ MenuItem#(title, type, flags, fp, 0, 0); // set initially to 0 state items
4679 return p;
4680 }
4681 }
4682
4683 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
4684 }
4685
4686 void ParseHostsFilecxx . . $ ParseHostsFile(c5a66ce4c98151e2).(char *filename, tHostsNodecxx . . $ tHostsNode# **root) {
4687 CFILEcxx . . $ CFILE# *file;
4688 DLLOpenCFILE(&file, filenamecxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., "rt");
4689
4690 tHostsNodecxx . . $ tHostsNode# *curr = *root;
4691
4692 if (!file)
4693 return;
4694
4695 char buffer[256];
4696 char save_buffer[256];
4697
4698 char s_ip[16], s_mask[16];
4699 uint32_tcxx . . $ uint32_t# ip_address;
4700 uint32_tcxx . . $ uint32_t# mask;
4701 char *ptr;
4702
4703 while (!DLLcfeof(file)) {
4704 DLLcf_ReadString(buffer, 256, file);
4705
4706 // handle the buffer of data
4707 ptr = buffer;
4708
4709 // parse white space
4710 while (*ptr && (*ptr == ' ' || *ptr == '\t'))
4711 ptr++;
4712 strcpy(save_buffer, ptr);
4713
4714 if (*ptr) {
4715 // attempt to parse the dotted ip address (only 0-9,'.' and '*' allowed)
4716 char *start = ptr;
4717
4718 // check to make sure its in a valid form
4719
4720 int dot_count = 0;
4721 while (*ptr) {
4722 if (*ptr == '.')
4723 dot_count++;
4724 if ((*ptr < '0' || *ptr > '9') && *ptr != '*' && *ptr != '.')
4725 goto error_parse; // invalid character
4726 ptr++;
4727 }
4728 if (dot_count != 3)
4729 goto error_parse; // not enough dots
4730 ptr = start;
4731
4732 // check the string length, no matter what it shouldn't be more than 15
4733 if (strlen(ptr) > 15)
4734 goto error_parse;
4735
4736 // break up the string into seperate strings
4737 while (*ptr) {
4738 if (*ptr == '.')
4739 *ptr = '\0';
4740 ptr++;
4741 }
4742 ptr = start;
4743
4744 // check to make sure the string length of each string isn't more than 3
4745 int length, count;
4746
4747 for (count = 0; count < 4; count++) {
4748 length = strlen(ptr);
4749 if (length > 3 || length == 0)
4750 goto error_parse;
4751
4752 if (length != 1) {
4753 // make sure it's a pure number
4754 char *save = ptr;
4755 while (*ptr) {
4756 if (!isdigit(*ptr))
4757 goto error_parse;
4758 ptr++;
4759 }
4760 ptr = save;
4761 int value = atoi(ptr);
4762 if (value < 0 || value > 255)
4763 goto error_parse;
4764 }
4765
4766 ptr += length + 1;
4767 }
4768 ptr = start;
4769
4770 // Its a valid IP address mask! yeah...*whew* that was fun
4771
4772 int value;
4773 char temp_str[16];
4774 s_ip[0] = s_mask[0] = '\0';
4775
4776 for (count = 0; count < 4; count++) {
4777 length = strlen(ptr);
4778
4779 // Mask
4780 if (*ptr == '*') {
4781 value = 0;
4782 } else {
4783 value = 255;
4784 }
4785 snprintf(temp_str, sizeof(temp_str), "%d", value);
4786 strcat(s_mask, temp_str);
4787 if (count != 3)
4788 strcat(s_mask, ".");
4789
4790 // IP Address
4791 if (*ptr == '*') {
4792 value = 0;
4793 } else {
4794 value = atoi(ptr);
4795 }
4796 snprintf(temp_str, sizeof(temp_str), "%d", value);
4797 strcat(s_ip, temp_str);
4798 if (count != 3)
4799 strcat(s_ip, ".");
4800
4801 ptr += length + 1;
4802 }
4803
4804 // we now have a valid mask (s_mask) and a valid ip (s_ip)
4805 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "IP: %s Mask: %s\n", s_ip, s_mask);
4806 ip_address = DLLnw_GetHostAddressFromNumbers(s_ip);
4807 mask = DLLnw_GetHostAddressFromNumbers(s_mask);
4808
4809 // add the node
4810 if (!curr) {
4811 curr = *root = (tHostsNodecxx . . $ tHostsNode# *)malloc(sizeof(tHostsNodecxx . . $ tHostsNode#));
4812 } else {
4813 curr->nextcxx . . $ tHostsNode#next. = (tHostsNodecxx . . $ tHostsNode# *)malloc(sizeof(tHostsNodecxx . . $ tHostsNode#));
4814 curr = curr->nextcxx . . $ tHostsNode#next.;
4815 }
4816 if (curr) {
4817 curr->nextcxx . . $ tHostsNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
4818 curr->ipcxx . . $ tHostsNode#ip. = ip_address;
4819 curr->maskcxx . . $ tHostsNode#mask. = mask;
4820 }
4821
4822 goto noerror_parse;
4823 }
4824
4825 error_parse:
4826 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Error parsing IP Address Mask: %s\n", save_buffer);
4827
4828 noerror_parse:;
4829 }
4830
4831 DLLcfclose(file);
4832 }
4833
4834 // DMFCBase::ReadInHostsAllowDeny
4835 //
4836 // Reads in the hosts.allow and hosts.deny files (if available)
4837 void DMFCBasecxx . . $ DMFCBase#::ReadInHostsAllowDenycxx . . $ DMFCBase#ReadInHostsAllowDeny(49f6e7a06ebc5aa8).(void) {
4838 char allow_fn[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!], deny_fn[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!];
4839 bool allow_exist, deny_exist;
4840
4841 // build the path info here
4842 DLLddio_MakePath(allow_fn, LocalD3Dircxx . . $ DMFCBase#LocalD3Dir., "netgames", "hosts.allow", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
4843 DLLddio_MakePath(deny_fn, LocalD3Dircxx . . $ DMFCBase#LocalD3Dir., "netgames", "hosts.deny", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
4844
4845 allow_exist = (bool)(DLLcfexist(allow_fncxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).) != 0);
4846 deny_exist = (bool)(DLLcfexist(deny_fncxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).) != 0);
4847
4848 m_DenyListcxx . . $ DMFCBase#m_DenyList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
4849 m_AllowListcxx . . $ DMFCBase#m_AllowList. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
4850
4851 // parse away
4852 if (deny_exist) {
4853 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Parsing hosts.deny\n");
4854 ParseHostsFilecxx . . $ ParseHostsFile(c5a66ce4c98151e2).(deny_fn, &m_DenyListcxx . . $ DMFCBase#m_DenyList.);
4855 }
4856 if (allow_exist) {
4857 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Parsing hosts.allow\n");
4858 ParseHostsFilecxx . . $ ParseHostsFile(c5a66ce4c98151e2).(allow_fn, &m_AllowListcxx . . $ DMFCBase#m_AllowList.);
4859 }
4860 }
4861
4862 // DMFCBase::FreeHostsLists
4863 //
4864 // Frees all the memory allocated for the host allow/deny lists
4865 void DMFCBasecxx . . $ DMFCBase#::FreeHostsListscxx . . $ DMFCBase#FreeHostsLists(49f6e7a06ebc5aa8).(void) {
4866 tHostsNodecxx . . $ tHostsNode# *curr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, *next;
4867
4868 curr = m_DenyListcxx . . $ DMFCBase#m_DenyList.;
4869 while (curr) {
4870 next = curr->nextcxx . . $ tHostsNode#next.;
4871 free(curr);
4872 curr = next;
4873 }
4874
4875 curr = m_AllowListcxx . . $ DMFCBase#m_AllowList.;
4876 while (curr) {
4877 next = curr->nextcxx . . $ tHostsNode#next.;
4878 free(curr);
4879 curr = next;
4880 }
4881 }
4882
4883 // DMFCBase::RehashAllowDeny
4884 //
4885 // Flushes and reloads the hosts.allow/.deny lists
4886 void DMFCBasecxx . . $ DMFCBase#::RehashAllowDenycxx . . $ DMFCBase#RehashAllowDeny(49f6e7a06ebc5aa8).(void) {
4887 FreeHostsListscxx . . $ DMFCBase#FreeHostsLists(49f6e7a06ebc5aa8).();
4888 ReadInHostsAllowDenycxx . . $ DMFCBase#ReadInHostsAllowDeny(49f6e7a06ebc5aa8).();
4889 }
4890
4891 // DMFCBase::IsPlayerAlive
4892 //
4893 // Returns true is the given pnum is a player, flying around the level (not dying, dead or observing)
4894 bool DMFCBasecxx . . $ DMFCBase#::IsPlayerAlivecxx . . $ DMFCBase#IsPlayerAlive(83c267b20bac841a).(int pnum) {
4895 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum))
4896 return false;
4897
4898 if (Objectscxx . . $ DMFCBase#Objects.[Playerscxx . . $ DMFCBase#Players.[pnum].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)
4899 return false;
4900
4901 if (Playerscxx . . $ DMFCBase#Players.[pnum].flagscxx . . $ player#flags. & (PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`! | PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!))
4902 return false;
4903 return true;
4904 }
4905
4906 // DMFCBase::ParseStartupScript
4907 //
4908 //
4909 // Loads up the startup script and sets variables accordingly
4910 void DMFCBasecxx . . $ DMFCBase#::ParseStartupScriptcxx . . $ DMFCBase#ParseStartupScript(49f6e7a06ebc5aa8).(void) {
4911 CFILEcxx . . $ CFILE# *file;
4912 char path[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!];
4913 char buffer[256];
4914 int size;
4915 bool ok_to_read;
4916
4917 int autoexec_arg = -1;
4918
4919 if ((autoexec_arg = DLLFindArg("-autoexec")) != 0) {
4920 // a specific autoexec.dmfc file was specified, use that
4921 strcpy(path, GetGameArgcxx . . $ DMFCBase#GetGameArg(ff224f080444ee45).(autoexec_arg + 1));
4922 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Override AUTOEXEC.DMFC to %s\n", path);
4923 } else {
4924 // use the default autoexec.dmfc
4925 DLLddio_MakePath(path, LocalD3Dircxx . . $ DMFCBase#LocalD3Dir., "netgames", "autoexec.dmfc", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
4926 }
4927
4928 DLLOpenCFILE(&file, pathcxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., "rt");
4929 if (!file)
4930 return;
4931
4932 while (!DLLcfeof(file)) {
4933 ok_to_read = true;
4934
4935 size = DLLcf_ReadString(&buffer[1], 254, file);
4936 buffer[255] = '\0';
4937
4938 if (size >= 254) {
4939 // invalid string, too long..trash the rest of the line
4940 ok_to_read = false;
4941 while (size >= 254) {
4942 size = DLLcf_ReadString(buffer, 254, file);
4943 }
4944 }
4945
4946 if (!ok_to_read) {
4947 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "AUTOEXEC.DMFC: Line too long\n");
4948 } else {
4949 if (buffer[1] == '$') {
4950 InputCommandHandlecxx . . $ DMFCBase#InputCommandHandle(c6b7e35ff6de5671).(&buffer[1]);
4951 } else {
4952 buffer[0] = '$'; // insert starting $ sign for input command
4953 InputCommandHandlecxx . . $ DMFCBase#InputCommandHandle(c6b7e35ff6de5671).(buffer);
4954 }
4955 }
4956 }
4957
4958 DLLcfclose(file);
4959 }
4960
4961 dllinfocxx . . $ dllinfo# *DMFCBasecxx . . $ DMFCBase#::GetDLLInfoCallDatacxx . . $ DMFCBase#GetDLLInfoCallData(4458c5bdce97a5c3).(void) { return Datacxx . . $ DMFCBase#Data.; }
4962
4963 int DMFCBasecxx . . $ DMFCBase#::GetHighestRoomIndexcxx . . $ DMFCBase#GetHighestRoomIndex(b126dc7c1de90089).(void) { return *Highest_room_indexcxx . . $ DMFCBase#Highest_room_index.; }
4964
4965 int DMFCBasecxx . . $ DMFCBase#::GetGameWindowWcxx . . $ DMFCBase#GetGameWindowW(b126dc7c1de90089).(void) { return *Game_window_wcxx . . $ DMFCBase#Game_window_w.; }
4966
4967 int DMFCBasecxx . . $ DMFCBase#::GetGameWindowHcxx . . $ DMFCBase#GetGameWindowH(b126dc7c1de90089).(void) { return *Game_window_hcxx . . $ DMFCBase#Game_window_h.; }
4968
4969 int DMFCBasecxx . . $ DMFCBase#::GetGameWindowXcxx . . $ DMFCBase#GetGameWindowX(b126dc7c1de90089).(void) { return *Game_window_xcxx . . $ DMFCBase#Game_window_x.; }
4970
4971 int DMFCBasecxx . . $ DMFCBase#::GetGameWindowYcxx . . $ DMFCBase#GetGameWindowY(b126dc7c1de90089).(void) { return *Game_window_ycxx . . $ DMFCBase#Game_window_y.; }
4972
4973 int *DMFCBasecxx . . $ DMFCBase#::GetGameFontTranslateArraycxx . . $ DMFCBase#GetGameFontTranslateArray(a7741f82f5fc3640).(void) { return Game_fontscxx . . $ DMFCBase#Game_fonts.; }
4974
4975 int DMFCBasecxx . . $ DMFCBase#::GetObserverModeBitmapcxx . . $ DMFCBase#GetObserverModeBitmap(b126dc7c1de90089).(void) { return hBitmapObservercxx . . $ DMFCBase#hBitmapObserver.; }
4976
4977 float DMFCBasecxx . . $ DMFCBase#::GetFrametimecxx . . $ DMFCBase#GetFrametime(9b8c9e39889c762c).(void) { return *Frametimecxx . . $ DMFCBase#Frametime.; }
4978
4979 float DMFCBasecxx . . $ DMFCBase#::GetGametimecxx . . $ DMFCBase#GetGametime(9b8c9e39889c762c).(void) { return *Gametimecxx . . $ DMFCBase#Gametime.; }
4980
4981 float DMFCBasecxx . . $ DMFCBase#::GetRealGametimecxx . . $ DMFCBase#GetRealGametime(a493af64c7bc6d09).(bool *ispaused) {
4982 if (ispaused) {
4983 *ispaused = (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_PAUSETIMEcxx . . $ `netgames/dmfc/dmfcinternal.h:2391:9`!) ? true : false;
4984 }
4985
4986 return RealGametimecxx . . $ DMFCBase#RealGametime.;
4987 }
4988
4989 float *DMFCBasecxx . . $ DMFCBase#::GetShieldDeltaArraycxx . . $ DMFCBase#GetShieldDeltaArray(a3aba87f01dec7c2).(void) { return ShieldDeltacxx . . $ DMFCBase#ShieldDelta.; }
4990
4991 float DMFCBasecxx . . $ DMFCBase#::GetHudAspectXcxx . . $ DMFCBase#GetHudAspectX(9b8c9e39889c762c).(void) { return *Hud_aspect_xcxx . . $ DMFCBase#Hud_aspect_x.; }
4992
4993 float DMFCBasecxx . . $ DMFCBase#::GetHudAspectYcxx . . $ DMFCBase#GetHudAspectY(9b8c9e39889c762c).(void) { return *Hud_aspect_ycxx . . $ DMFCBase#Hud_aspect_y.; }
4994
4995 const char *DMFCBasecxx . . $ DMFCBase#::GetLocalD3Dircxx . . $ DMFCBase#GetLocalD3Dir(33a1f659e94feb42).(void) { return LocalD3Dircxx . . $ DMFCBase#LocalD3Dir.; }
4996
4997 const tMissioncxx . . $ tMission# *DMFCBasecxx . . $ DMFCBase#::GetCurrentMissioncxx . . $ DMFCBase#GetCurrentMission(d7a4f7ca6f9cb411).(void) { return Current_missioncxx . . $ DMFCBase#Current_mission.; }
4998
4999 roomcxx . . $ room# *DMFCBasecxx . . $ DMFCBase#::GetRoomscxx . . $ DMFCBase#GetRooms(80f895f1fc5a89de).(void) { return Roomscxx . . $ DMFCBase#Rooms.; }
5000
5001 objectcxx . . $ object# *DMFCBasecxx . . $ DMFCBase#::GetObjectscxx . . $ DMFCBase#GetObjects(26f25deff401d7e4).(void) { return Objectscxx . . $ DMFCBase#Objects.; }
5002
5003 terrain_segmentcxx . . $ terrain_segment# *DMFCBasecxx . . $ DMFCBase#::GetTerrainSegscxx . . $ DMFCBase#GetTerrainSegs(a12f615691f159d5).(void) { return Terrain_segcxx . . $ DMFCBase#Terrain_seg.; }
5004
5005 netgame_infocxx . . $ netgame_info# *DMFCBasecxx . . $ DMFCBase#::GetNetgameInfocxx . . $ DMFCBase#GetNetgameInfo(242e78cd5130aa12).(void) { return Netgamecxx . . $ DMFCBase#Netgame.; }
5006
5007 playercxx . . $ player# *DMFCBasecxx . . $ DMFCBase#::GetPlayerscxx . . $ DMFCBase#GetPlayers(51ff8e716a252304).(void) { return Playerscxx . . $ DMFCBase#Players.; }
5008
5009 netplayercxx . . $ netplayer# *DMFCBasecxx . . $ DMFCBase#::GetNetPlayerscxx . . $ DMFCBase#GetNetPlayers(d09959b2d64446dd).(void) { return NetPlayerscxx . . $ DMFCBase#NetPlayers.; }
5010
5011 shipcxx . . $ ship# *DMFCBasecxx . . $ DMFCBase#::GetShipscxx . . $ DMFCBase#GetShips(2cf117cef444fd19).(void) { return Shipscxx . . $ DMFCBase#Ships.; }
5012
5013 weaponcxx . . $ weapon# *DMFCBasecxx . . $ DMFCBase#::GetWeaponscxx . . $ DMFCBase#GetWeapons(9275e64180ea11c0).(void) { return Weaponscxx . . $ DMFCBase#Weapons.; }
5014
5015 texturecxx . . $ texture# *DMFCBasecxx . . $ DMFCBase#::GetGameTexturescxx . . $ DMFCBase#GetGameTextures(204733a467239a0f).(void) { return GameTexturescxx . . $ DMFCBase#GameTextures.; }
5016
5017 vclipcxx . . $ vclip# *DMFCBasecxx . . $ DMFCBase#::GetGameVClipscxx . . $ DMFCBase#GetGameVClips(cfd7d5be6fb491e1).(void) { return GameVClipscxx . . $ DMFCBase#GameVClips.; }
5018
5019 poly_modelcxx . . $ poly_model# *DMFCBasecxx . . $ DMFCBase#::GetGamePolyModelscxx . . $ DMFCBase#GetGamePolyModels(4cb3338b82435ee4).(void) { return Poly_modelscxx . . $ DMFCBase#Poly_models.; }
5020
5021 ddgr_colorcxx . . $ ddgr_color# *DMFCBasecxx . . $ DMFCBase#::GetPlayerColorscxx . . $ DMFCBase#GetPlayerColors(ac695d451f96e4aa).(void) { return Player_colorscxx . . $ DMFCBase#Player_colors.; }
5022
5023 game_controlscxx . . $ game_controls# DMFCBasecxx . . $ DMFCBase#::GetLastGameControlscxx . . $ DMFCBase#GetLastGameControls(edc1f1d10c57b232).(void) { return Last_game_controlscxx . . $ DMFCBase#Last_game_controls.; }
5024
5025 int *DMFCBasecxx . . $ DMFCBase#::GetPilotPicBitmapHandlescxx . . $ DMFCBase#GetPilotPicBitmapHandles(a7741f82f5fc3640).(void) { return PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.; }
5026
5027 void DMFCBasecxx . . $ DMFCBase#::GetViewerObjectPtrcxx . . $ DMFCBase#GetViewerObjectPtr(9d86e21909d749d5).(objectcxx . . $ object# **v_obj) { *v_obj = *Viewer_objectcxx . . $ DMFCBase#Viewer_object.; }
5028
5029 void DMFCBasecxx . . $ DMFCBase#::SetViewerObjectPtrcxx . . $ DMFCBase#SetViewerObjectPtr(419c470199a90a97).(objectcxx . . $ object# *v_obj) { *Viewer_objectcxx . . $ DMFCBase#Viewer_object. = v_obj; }
5030
5031 float DMFCBasecxx . . $ DMFCBase#::GetRenderZoomcxx . . $ DMFCBase#GetRenderZoom(9b8c9e39889c762c).(void) { return *Render_zoomcxx . . $ DMFCBase#Render_zoom.; }
5032
5033 IMenuItemcxx . . $ IMenuItem# *DMFCBasecxx . . $ DMFCBase#::GetOnScreenMenucxx . . $ DMFCBase#GetOnScreenMenu(8efbf9c7cdf9c614).(void) { return &Menucxx . . $ DMFCBase#Menu.; }
5034
5035 tOSIRISModuleInitcxx . . $ tOSIRISModuleInit# *DMFCBasecxx . . $ DMFCBase#::GetOsirisModuleDatacxx . . $ DMFCBase#GetOsirisModuleData(f70108f55cb05e1f).(void) { return APIcxx . . $ DMFCBase#API..osiris_functionscxx . . $ game_api#osiris_functions.; }
5036
5037 vis_effectcxx . . $ vis_effect# *DMFCBasecxx . . $ DMFCBase#::GetVisEffectArraycxx . . $ DMFCBase#GetVisEffectArray(cbc3a0d74bd34739).(int **Highviseptr) {
5038 if (Highviseptr)
5039 *Highviseptr = Highest_vis_effect_indexcxx . . $ DMFCBase#Highest_vis_effect_index.;
5040
5041 return VisEffectscxx . . $ DMFCBase#VisEffects.;
5042 }
5043
5044 char *DMFCBasecxx . . $ DMFCBase#::GetGameArgcxx . . $ DMFCBase#GetGameArg(ff224f080444ee45).(int arg) {
5045 static char EMPTY_ARG[1] = "";
5046
5047 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(arg >= 0 && arg < MAX_ARGScxx . . $ `Descent3/args.h:22:9`!);
5048 if (arg < 0 || arg >= MAX_ARGScxx . . $ `Descent3/args.h:22:9`!)
5049 return (char *)EMPTY_ARG;
5050
5051 char *arguments = (char *)GameArgscxx . . $ DMFCBase#GameArgs.;
5052
5053 int position = arg * MAX_CHARS_PER_ARGcxx . . $ `Descent3/args.h:23:9`!;
5054
5055 return &arguments[position];
5056 }
5057
5058 // DMFCBase::EnableLossGuage
5059 //
5060 // Turns on/off the Loss guage on the screen
5061 void DMFCBasecxx . . $ DMFCBase#::EnableLossGuagecxx . . $ DMFCBase#EnableLossGuage(b45ddcbc8423892c).(bool enable) {
5062 bool peertopeer = (bool)((Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!) != 0);
5063
5064 if ((GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) || peertopeer) {
5065 return;
5066 }
5067
5068 LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled. = enable;
5069 }
5070
5071 ddgr_colorcxx . . $ ddgr_color# GetTriLinColorcxx . . $ GetTriLinColor(97a042e1f60d5cf).(float val, float low, float med, float hi, ddgr_colorcxx . . $ ddgr_color# lowc, ddgr_colorcxx . . $ ddgr_color# medc, ddgr_colorcxx . . $ ddgr_color# hic) {
5072 ddgr_colorcxx . . $ ddgr_color# low_col, hi_col;
5073 float perc;
5074
5075 if (val <= low) {
5076 // we're pure lowc
5077 perc = 1.0f;
5078 low_col = hi_col = lowc;
5079 } else if (val <= med) {
5080 // we're between lowc and medc
5081 low_col = lowc;
5082 hi_col = medc;
5083
5084 perc = (val - low) / (med - low);
5085 } else if (val <= hi) {
5086 // we're between medc and hic
5087 low_col = medc;
5088 hi_col = hic;
5089 perc = (val - med) / (hi - med);
5090 } else {
5091 // we're pure hic
5092 perc = 1.0f;
5093 low_col = hi_col = hic;
5094 }
5095
5096 if (perc < 0.0f)
5097 perc = 0.0f;
5098 if (perc > 1.0f)
5099 perc = 1.0f;
5100
5101 ddgr_colorcxx . . $ ddgr_color# color_to_use;
5102 int r, g, b;
5103 float amount_low, amount_hi;
5104
5105 amount_low = 1.0 - perc;
5106 amount_hi = perc;
5107
5108 r = GR_COLOR_REDcxx . . $ GR_COLOR_RED(4c679297bf94b9eb).(low_col) * amount_low + GR_COLOR_REDcxx . . $ GR_COLOR_RED(4c679297bf94b9eb).(hi_col) * amount_hi;
5109 g = GR_COLOR_GREENcxx . . $ GR_COLOR_GREEN(4c679297bf94b9eb).(low_col) * amount_low + GR_COLOR_GREENcxx . . $ GR_COLOR_GREEN(4c679297bf94b9eb).(hi_col) * amount_hi;
5110 b = GR_COLOR_BLUEcxx . . $ GR_COLOR_BLUE(4c679297bf94b9eb).(low_col) * amount_low + GR_COLOR_BLUEcxx . . $ GR_COLOR_BLUE(4c679297bf94b9eb).(hi_col) * amount_hi;
5111
5112 color_to_use = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(r, g, b);
5113
5114 return color_to_use;
5115 }
5116
5117 // DMFCBase::LossGuageFrame
5118 //
5119 // Processes the Loss guage for the frame
5120 void DMFCBasecxx . . $ DMFCBase#::LossGuageFramecxx . . $ DMFCBase#LossGuageFrame(49f6e7a06ebc5aa8).(void) {
5121 if (!LossGuageEnabledcxx . . $ DMFCBase#LossGuageEnabled.)
5122 return;
5123
5124 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
5125 return;
5126
5127 // Don't show if peer-to-peer
5128 if (Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!)
5129 return;
5130
5131 #define LOW_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5131:9`! GR_RGB(20, 255, 20)
5132 #define MED_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5132:9`! GR_RGB(255, 255, 40)
5133 #define HI_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5133:9`! GR_RGB(255, 20, 20)
5134 #define LOW_LOSScxx . . $ `netgames/dmfc/dmfcbase.cpp:5134:9`! 1.0f
5135 #define MED_LOSScxx . . $ `netgames/dmfc/dmfcbase.cpp:5135:9`! 5.0f
5136 #define HI_LOSScxx . . $ `netgames/dmfc/dmfcbase.cpp:5136:9`! 10.0f
5137
5138 float packetloss = NetPlayerscxx . . $ DMFCBase#NetPlayers.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].percent_losscxx . . $ netplayer#percent_loss.;
5139
5140 ddgr_colorcxx . . $ ddgr_color# loss_color = GetTriLinColorcxx . . $ GetTriLinColor(97a042e1f60d5cf).(packetloss, LOW_LOSScxx . . $ `netgames/dmfc/dmfcbase.cpp:5134:9`!, MED_LOSScxx . . $ `netgames/dmfc/dmfcbase.cpp:5135:9`!, HI_LOSScxx . . $ `netgames/dmfc/dmfcbase.cpp:5136:9`!, LOW_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5131:9`!, MED_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5132:9`!, HI_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5133:9`!);
5141 ddgr_colorcxx . . $ ddgr_color# ping_color =
5142 GetTriLinColorcxx . . $ GetTriLinColor(97a042e1f60d5cf).(NetPlayerscxx . . $ DMFCBase#NetPlayers.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].ping_timecxx . . $ netplayer#ping_time. * 1000.0f, 0, 200.0f, 400.0f, LOW_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5131:9`!, MED_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5132:9`!, HI_COLORcxx . . $ `netgames/dmfc/dmfcbase.cpp:5133:9`!);
5143
5144 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
5145
5146 int max_x = 0;
5147 int y = 2;
5148
5149 DLLRenderHUDText(loss_color, 255, 2, 0, y, DTXT_NETWORK_LOSScxx . . $ `netgames/dmfc/dmfcinternal.h:2710:9`!);
5150 max_x = DLLRenderHUDGetTextLineWidth(DTXT_NETWORK_LOSScxx . . $ `netgames/dmfc/dmfcinternal.h:2710:9`!);
5151
5152 DLLRenderHUDText(ping_color, 255, 2, 0, y + 10, DTXT_NETWORK_PINGcxx . . $ `netgames/dmfc/dmfcinternal.h:2711:9`!);
5153 max_x = stdcxx . . $ std/::maxcxx . . $ std/max(2a338fce5842aa6a).(max_x, DLLRenderHUDGetTextLineWidth(DTXT_NETWORK_PINGcxx . . $ `netgames/dmfc/dmfcinternal.h:2711:9`!));
5154
5155 max_x += 10;
5156 DLLRenderHUDText(loss_color, 255, 0, 2 + max_x, y, "%.2f%%", packetloss);
5157 DLLRenderHUDText(ping_color, 255, 0, 2 + max_x, y + 10, "%dms",
5158 (int)(NetPlayerscxx . . $ DMFCBase#NetPlayers.[GetPlayerNumcxx . . $ DMFCBase#GetPlayerNum(b126dc7c1de90089).()].ping_timecxx . . $ netplayer#ping_time. * 1000.0f));
5159 }
5160
5161 level_infocxx . . $ level_info# *DMFCBasecxx . . $ DMFCBase#::GetLevelInfocxx . . $ DMFCBase#GetLevelInfo(9783071b1a9aeb74).(void) { return Level_infocxx . . $ DMFCBase#Level_info.; }
5162
5163 // 1 - (num_levels)
5164 void DMFCBasecxx . . $ DMFCBase#::WarpToLevelcxx . . $ DMFCBase#WarpToLevel(d4f767463ce0a6b3).(int lev) {
5165 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
5166 return;
5167
5168 if (lev < 1 || lev > Current_missioncxx . . $ DMFCBase#Current_mission.->num_levelscxx . . $ tMission#num_levels.)
5169 return;
5170
5171 *Multi_next_levelcxx . . $ DMFCBase#Multi_next_level. = lev;
5172 EndLevelcxx . . $ DMFCBase#EndLevel(49f6e7a06ebc5aa8).();
5173 }
5174
5175 void DMFCBasecxx . . $ DMFCBase#::SetPlayerTauntIndicatorcxx . . $ DMFCBase#SetPlayerTauntIndicator(d4f767463ce0a6b3).(int pnum) {
5176 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(pnum))
5177 return;
5178
5179 DisplayTauntIndicatorcxx . . $ DMFCBase#DisplayTauntIndicator. = true;
5180 TauntIndicatorStartTimecxx . . $ DMFCBase#TauntIndicatorStartTime. = *Gametimecxx . . $ DMFCBase#Gametime.;
5181 TauntIndicatorPlayerNumcxx . . $ DMFCBase#TauntIndicatorPlayerNum. = pnum;
5182 }
5183
5184 void DMFCBasecxx . . $ DMFCBase#::DisplayTauntIndicatorFramecxx . . $ DMFCBase#DisplayTauntIndicatorFrame(49f6e7a06ebc5aa8).(void) {
5185 if (!DisplayTauntIndicatorcxx . . $ DMFCBase#DisplayTauntIndicator.)
5186 return;
5187
5188 if (!CheckPlayerNumcxx . . $ DMFCBase#CheckPlayerNum(83c267b20bac841a).(TauntIndicatorPlayerNumcxx . . $ DMFCBase#TauntIndicatorPlayerNum.)) {
5189 DisplayTauntIndicatorcxx . . $ DMFCBase#DisplayTauntIndicator. = false;
5190 return;
5191 }
5192
5193 float alpha, perc;
5194 int igt = floorcxx . . $ floor(fbcf3211dfe1bfd1).((*Gametimecxx . . $ DMFCBase#Gametime.));
5195 float igth = (*Gametimecxx . . $ DMFCBase#Gametime.) - igt;
5196 if (igth > 0.5f) {
5197 igth -= 0.5f;
5198 }
5199
5200 if (igth > 0.25f) {
5201 perc = 1.0f - ((igth - 0.25) / 0.25f);
5202 } else {
5203 perc = (igth / 0.25f);
5204 }
5205
5206 float base_alpha = 0.40f;
5207 float range = 1.0f - base_alpha;
5208
5209 alpha = base_alpha + (perc * range);
5210 if (alpha < base_alpha)
5211 alpha = base_alpha;
5212 if (alpha > 1.0f)
5213 alpha = 1.0f;
5214
5215 int bmp = TauntIndicatorBMPcxx . . $ DMFCBase#TauntIndicatorBMP.;
5216 if (PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.[TauntIndicatorPlayerNumcxx . . $ DMFCBase#TauntIndicatorPlayerNum.] > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
5217 bmp = PilotPicBmpHandlescxx . . $ DMFCBase#PilotPicBmpHandles.[TauntIndicatorPlayerNumcxx . . $ DMFCBase#TauntIndicatorPlayerNum.];
5218 }
5219
5220 if (bmp <= BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) {
5221 DisplayTauntIndicatorcxx . . $ DMFCBase#DisplayTauntIndicator. = false;
5222 return;
5223 }
5224
5225 int bmh = 32;
5226 int bmw = 32;
5227 int x, y;
5228
5229 x = 10;
5230 y = 200;
5231
5232 DLLrend_SetAlphaType(AT_CONSTANT_TEXTUREcxx . . $ `lib/renderer.h:402:9`!);
5233 DLLrend_SetAlphaValue(alpha * 255);
5234 DLLrend_SetLighting(LS_NONEcxx . . $ LS_NONE.);
5235 DLLrend_SetColorModel(CM_MONOcxx . . $ CM_MONO.);
5236 DLLrend_SetOverlayType(OT_NONEcxx . . $ `lib/renderer.h:333:9`!);
5237 DLLrend_SetFiltering(0);
5238 DLLrend_SetWrapType(WT_CLAMPcxx . . $ WT_CLAMP.);
5239 DLLrend_SetZBufferState(0);
5240 DLLrend_SetTextureType(TT_LINEARcxx . . $ TT_LINEAR.);
5241
5242 DLLrend_DrawScaledBitmap(x, y, x + bmw, y + bmh, bmp, 0, 0, 1, 1, 1, -1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
5243 DLLrend_SetFiltering(1);
5244 DLLrend_SetZBufferState(1);
5245
5246 int font_height;
5247
5248 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
5249 font_height = DLLgrfont_GetHeight(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
5250
5251 x = 15 + bmw;
5252 y = (y + (bmh / 2)) - (font_height / 2);
5253
5254 DLLgrtext_SetColor(GR_GREENcxx . . $ GR_GREEN.);
5255 DLLgrtext_SetAlpha(alpha * 255.0f);
5256 DLLgrtext_Printf(x, y, Playerscxx . . $ DMFCBase#Players.[TauntIndicatorPlayerNumcxx . . $ DMFCBase#TauntIndicatorPlayerNum.].callsigncxx . . $ player#callsign.);
5257
5258 if ((*Gametimecxx . . $ DMFCBase#Gametime. - TauntIndicatorStartTimecxx . . $ DMFCBase#TauntIndicatorStartTime.) > 3.0f)
5259 DisplayTauntIndicatorcxx . . $ DMFCBase#DisplayTauntIndicator. = false;
5260 }
5261
5262 // DMFCBase::SetMaxPlayerHardLimit
5263 //
5264 // Sets a hard limit to the max number of players allowed in the game
5265 // changing the number of players can never go above this...defaults
5266 // to DLLMAX_PLAYERS
5267 void DMFCBasecxx . . $ DMFCBase#::SetMaxPlayerHardLimitcxx . . $ DMFCBase#SetMaxPlayerHardLimit(d4f767463ce0a6b3).(int max) {
5268 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
5269 return;
5270 if (max > DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`! || max < 1)
5271 return;
5272
5273 Hard_max_playerscxx . . $ DMFCBase#Hard_max_players. = max;
5274 if (Netgamecxx . . $ DMFCBase#Netgame.->max_playerscxx . . $ netgame_info#max_players. > Hard_max_playerscxx . . $ DMFCBase#Hard_max_players.) {
5275 Netgamecxx . . $ DMFCBase#Netgame.->max_playerscxx . . $ netgame_info#max_players. = max;
5276 DLLAddHUDMessage(DTXT_MAXPLAYERSSETMSGcxx . . $ `netgames/dmfc/dmfcinternal.h:2666:9`!, max);
5277 SendNetGameInfoSynccxx . . $ DMFCBase#SendNetGameInfoSync(d4f767463ce0a6b3).();
5278 }
5279 }
5280
5281 // DMFCBase::MarkPlayersInGame
5282 //
5283 // Goes through all the player records and marks those that are in the game
5284 // This is needed because at level end, all clients disconnect, so we lose
5285 // that information.
5286 void DMFCBasecxx . . $ DMFCBase#::MarkPlayersInGamecxx . . $ DMFCBase#MarkPlayersInGame(49f6e7a06ebc5aa8).(void) {
5287 player_recordcxx . . $ player_record# *pr;
5288 for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) {
5289 pr = GetPlayerRecordcxx . . $ DMFCBase#GetPlayerRecord(6359c6f28dd028ae).(i);
5290
5291 if (pr && pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) {
5292 players_in_gamecxx . . $ DMFCBase#players_in_game.[i] = pr->pnumcxx . . $ player_record#pnum.;
5293 } else {
5294 players_in_gamecxx . . $ DMFCBase#players_in_game.[i] = -1;
5295 }
5296 }
5297 }
5298
5299 // DMFCBase::ResetPlayersInGame
5300 //
5301 // Resets the Players-in-game list
5302 void DMFCBasecxx . . $ DMFCBase#::ResetPlayersInGamecxx . . $ DMFCBase#ResetPlayersInGame(49f6e7a06ebc5aa8).(void) {
5303 for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) {
5304 players_in_gamecxx . . $ DMFCBase#players_in_game.[i] = -1;
5305 }
5306 }
5307
5308 // DMFCBase::WasPlayerInGameAtLevelEnd
5309 //
5310 // Given a player record it returns true/false whether
5311 // the player was in the game at the time the level ended.
5312 int DMFCBasecxx . . $ DMFCBase#::WasPlayerInGameAtLevelEndcxx . . $ DMFCBase#WasPlayerInGameAtLevelEnd(7864480464b09eea).(int prec) {
5313 if (prec < 0 || prec >= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!)
5314 return -1;
5315
5316 return players_in_gamecxx . . $ DMFCBase#players_in_game.[prec];
5317 }
5318
5319 // DMFCBase::GetConnectingPlayerTeam
5320 //
5321 // Returns the team of a player just connecting, this is to be set by the
5322 // game and is DMFC assumes that all players have the correct team on join
5323 int DMFCBasecxx . . $ DMFCBase#::GetConnectingPlayerTeamcxx . . $ DMFCBase#GetConnectingPlayerTeam(7864480464b09eea).(int slot) {
5324 if (GetLocalRolecxx . . $ DMFCBase#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)
5325 return -2;
5326
5327 int prec_num;
5328 if (IsMasterTrackerGamecxx . . $ DMFCBase#IsMasterTrackerGame(c9857a73d68e59ba).())
5329 prec_num = PRec_FindPlayercxx . . $ PRec_FindPlayer(4f784f6a1e751a10).(Playerscxx . . $ DMFCBase#Players.[slot].callsigncxx . . $ player#callsign., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, Playerscxx . . $ DMFCBase#Players.[slot].tracker_idcxx . . $ player#tracker_id.);
5330 else
5331 prec_num = PRec_FindPlayercxx . . $ PRec_FindPlayer(4f784f6a1e751a10).(Playerscxx . . $ DMFCBase#Players.[slot].callsigncxx . . $ player#callsign., &NetPlayerscxx . . $ DMFCBase#NetPlayers.[slot].addrcxx . . $ netplayer#addr., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
5332
5333 int team = -2;
5334
5335 if (prec_num != -1) {
5336 // we have a reconnecting player
5337
5338 // we need to reconnect the player to the player records before we get the team
5339 if (!PRec_ReconnectPlayerToSlotcxx . . $ PRec_ReconnectPlayerToSlot(a983d75b38abae39).(slot, prec_num, Playerscxx . . $ DMFCBase#Players., NetPlayerscxx . . $ DMFCBase#NetPlayers.)) {
5340 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Unable to reassign reconnecting player (%s) to Player Record slot #%d\n",
5341 Players[slot].callsign,
5342 prec_num);
5343 Int3cxx . . $ `netgames/includes/DMFC.h:378:9`!();
5344 } else {
5345 team = PRec_GetPlayerTeamcxx . . $ PRec_GetPlayerTeam(7864480464b09eea).(slot);
5346
5347 // disconnect the player again since he isn't in the game just yet
5348 PRec_DisconnectPlayercxx . . $ PRec_DisconnectPlayer(83c267b20bac841a).(slot);
5349 }
5350 } else {
5351 // we have a new player
5352
5353 if (slot == 0 && IAmDedicatedServercxx . . $ DMFCBase#IAmDedicatedServer(c9857a73d68e59ba).()) {
5354 team = -1;
5355 } else {
5356 // get team assignment
5357 if (m_iProtectedFlagscxx . . $ DMFCBase#m_iProtectedFlags. & DMFC_PRF_AUTOTEAMSELECTcxx . . $ `netgames/dmfc/dmfcinternal.h:2377:9`!) {
5358 team = GetTeamForNewPlayercxx . . $ DMFCBase#GetTeamForNewPlayer(9b79fb6aee4c0440).(slot, m_iNumTeamscxx . . $ DMFCBase#m_iNumTeams.);
5359 } else {
5360 team = RED_TEAMcxx . . $ `netgames/includes/DMFC.h:427:9`!;
5361 }
5362 }
5363 }
5364
5365 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "CONNECTING PLAYER (%s): Team assigned to %d\n", Players[slot].callsign, team);
5366
5367 return team;
5368 }
5369
5370 // DMFCBase::SetDedicatedWait
5371 //
5372 // Sets the level wait time for the dedicated server. A dedicated server will make all
5373 // clients wait until this time (in seconds) is up each level.
5374 void DMFCBasecxx . . $ DMFCBase#::SetDedicatedWaitcxx . . $ DMFCBase#SetDedicatedWait(9364e6e7bff7660).(float time_secs) {
5375 if (time_secs < 0)
5376 time_secs = 0;
5377
5378 DedicatedLevelWaitcxx . . $ DMFCBase#DedicatedLevelWait. = time_secs;
5379 }
5380
5381 // DMFCBase::EnableTimelimitCountdown
5382 //
5383 // Enables/Disables the timelimit countdown (if there is a level time limit)
5384 // Optionally you can specify what time to start the count down. (default 10)
5385 void DMFCBasecxx . . $ DMFCBase#::EnableTimelimitCountdowncxx . . $ DMFCBase#EnableTimelimitCountdown(b994e01f1c45a386).(bool enable, int seconds) {
5386 m_bDisplayTimelimitCountdowncxx . . $ DMFCBase#m_bDisplayTimelimitCountdown. = enable;
5387
5388 if (enable && seconds > 0) {
5389 m_iTimeLimitCountdowncxx . . $ DMFCBase#m_iTimeLimitCountdown. = seconds;
5390 }
5391 }
5392
5393 // DMFCBase::DisplayTimelimitCountdown
5394 //
5395 // Displays (if needed) the time limit countdown
5396 void DMFCBasecxx . . $ DMFCBase#::DisplayTimelimitCountdowncxx . . $ DMFCBase#DisplayTimelimitCountdown(49f6e7a06ebc5aa8).(void) {
5397 if (!m_bDisplayTimelimitCountdowncxx . . $ DMFCBase#m_bDisplayTimelimitCountdown.)
5398 return;
5399
5400 if (!(Netgamecxx . . $ DMFCBase#Netgame.->flagscxx . . $ netgame_info#flags. & NF_TIMERcxx . . $ `Descent3/multi_external.h:226:9`!))
5401 return;
5402
5403 float time_left = (Netgamecxx . . $ DMFCBase#Netgame.->timelimitcxx . . $ netgame_info#timelimit. * 60.0f) - RealGametimecxx . . $ DMFCBase#RealGametime.;
5404
5405 if (time_left > m_iTimeLimitCountdowncxx . . $ DMFCBase#m_iTimeLimitCountdown. || time_left < 0)
5406 return;
5407
5408 // display a countdown!
5409 DLLgrtext_SetFont(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
5410 DLLgrtext_SetColor(GR_WHITEcxx . . $ GR_WHITE.);
5411 DLLgrtext_SetAlpha(255);
5412
5413 char buffer[256];
5414 snprintf(buffer, sizeof(buffer), "Time Left: T - %d", (int)time_left);
5415
5416 int font_height = DLLgrfont_GetHeight(Game_fontscxx . . $ DMFCBase#Game_fonts.[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]);
5417 DLLgrtext_CenteredPrintf(0, font_height * 10, buffer);
5418 }
5419
5420 // DMFCBase::TranslateTextMacro
5421 //
5422 // Given a macro with tokens, this function will replace the tokens
5423 // and create a new string for display.
5424 // All tokens begin with $$ (i.e. $$TEAMBASE)
5425 void DMFCBasecxx . . $ DMFCBase#::TranslateTextMacrocxx . . $ DMFCBase#TranslateTextMacro(a1cf99d6bd92bbc4).(const char *src, char *destination, int dest_size) {
5426 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(destination != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
5427 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(src != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
5428 ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(dest_size >= 0);
5429
5430 if (dest_size <= 0)
5431 return;
5432
5433 char token[128];
5434 char token_string[512];
5435
5436 char *curr_dest = destination;
5437 int src_idx = 0;
5438 bool done = false;
5439
5440 // now we need to go through the src and copy to destination
5441 // while looking for tokens, and making sure we don't go over our size
5442 while (dest_size > 1 && !done) {
5443 switch (src[src_idx]) {
5444 case '$': {
5445 // possible token!, check the next character
5446 if (src[src_idx + 1] == '$') {
5447 // TOKEN!!!
5448 src_idx += 2; // move to the beginning of the token
5449 if (src[src_idx] == ' ' || src[src_idx] == '\0') {
5450 // ok, maybe it isn't a token
5451 *curr_dest = src[src_idx - 2];
5452 curr_dest++;
5453 dest_size--;
5454 *curr_dest = src[src_idx - 1];
5455 curr_dest++;
5456 dest_size--;
5457 *curr_dest = src[src_idx];
5458 if (*curr_dest == '\0') {
5459 done = true;
5460 } else {
5461 src_idx++;
5462 }
5463 curr_dest++;
5464 dest_size--;
5465 } else {
5466 // process it, it's gotta be a token
5467
5468 // extract the token out
5469 char *ptr = token;
5470 while (src[src_idx] != ' ' && src[src_idx] != '\0') {
5471 *ptr = src[src_idx];
5472 ptr++;
5473 src_idx++;
5474 }
5475 *ptr = '\0';
5476
5477 // now replace the token...
5478 *token_string = '\0';
5479 mprintfcxx . . $ `netgames/dmfc/dmfcinternal.h:275:9`!(0, "Looking for token for %s\n", token);
5480 CallOnGetTokenStringcxx . . $ DMFCBase#CallOnGetTokenString(655c4eff246c5519).(token, token_string, 512);
5481
5482 // make sure we don't go too far
5483 int len = strlen(token_string);
5484 if (len > (dest_size - 1))
5485 len = dest_size - 1;
5486
5487 ptr = token_string;
5488
5489 while (len > 0) {
5490 *curr_dest = *ptr;
5491 curr_dest++;
5492 dest_size--;
5493 ptr++;
5494 len--;
5495 }
5496 }
5497 } else {
5498 // just copy the character over
5499 *curr_dest = src[src_idx];
5500 src_idx++;
5501 curr_dest++;
5502 dest_size--;
5503 }
5504 } break;
5505 case '\0':
5506 done = true;
5507 break;
5508 default: {
5509 // just copy the character over
5510 *curr_dest = src[src_idx];
5511 src_idx++;
5512 curr_dest++;
5513 dest_size--;
5514 } break;
5515 }
5516 }
5517
5518 *curr_dest = '\0'; // NULL terminate
5519 }
5520
5521 // DMFCBase::SelectNextCameraView
5522 //
5523 // This function, given which window (corresponds to left, middle, right), switches the
5524 // current view of the small camera windows on the screen
5525 void DMFCBasecxx . . $ DMFCBase#::SelectNextCameraViewcxx . . $ DMFCBase#SelectNextCameraView(d4f767463ce0a6b3).(int window) {
5526 if (window < 0 || window >= NUM_CAMERA_VIEWScxx . . $ `netgames/includes/DMFC.h:457:9`!)
5527 return;
5528 DLLSelectNextCameraView(window);
5529 }
5530
5531 int DMFCBasecxx . . $ DMFCBase#::GetCameraViewTypecxx . . $ DMFCBase#GetCameraViewType(7864480464b09eea).(int window) {
5532 if (window < 0 || window >= NUM_CAMERA_VIEWScxx . . $ `netgames/includes/DMFC.h:457:9`!)
5533 return -1;
5534 return Camera_view_modecxx . . $ DMFCBase#Camera_view_mode.[window];
5535 }
5536
5537 // Given a generic object (OBJ_POWERUP,OBJ_ROBOT,OBJ_BUILDING or OBJ_CLUTTER) id
5538 // in the range of 0 to MAX_OBJECT_IDS, this returns a pointer to it's information (see objinfo.h)
5539 // It returns NULL if an invalid id is given (or it's not used)
5540 object_infocxx . . $ object_info# *DMFCBasecxx . . $ DMFCBase#::GetObjectInfocxx . . $ DMFCBase#GetObjectInfo(7edd0c317fb06c23).(int objinfo_id) {
5541 if (objinfo_id < 0 || objinfo_id >= MAX_OBJECT_IDScxx . . $ `Descent3/objinfo.h:327:9`!)
5542 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
5543
5544 if (Object_infocxx . . $ DMFCBase#Object_info.[objinfo_id].typecxx . . $ object_info#type. == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!)
5545 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
5546
5547 return &Object_infocxx . . $ DMFCBase#Object_info.[objinfo_id];
5548 }