Debian Codegraph @

netcon/mtclient/mtclient.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/mtclient/mtclient.cpp $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003-08-26 03:58:40 $
23 * $Author: kevinb $
24 *
25 * Mastertracker Client DLL
26 *
27 * $Log: not supported by cvs2svn $
28 *
29 * 127 10/03/01 12:44a Kevin
30 * Smaller version of pxo packets
31 *
32 * 126 3/26/00 10:30p Kevin
33 * MOD Downloader for 1.4 patch.
34 *
35 * 125 3/20/00 12:29p Matt
36 * Merge of Duane's post-1.3 changes.
37 * Deleted Mac-only stricmp() function.
38 *
39 * 124 2/18/00 11:33p Kevin
40 * Fixed crash when sorting ping list bug, and clear the game list when
41 * joining a private lobby.
42 *
43 * 123 9/07/99 2:21p Kevin
44 * more CR/LF issues for the mac
45 *
46 * 122 9/07/99 10:24a Kevin
47 * Macintosh fixes!
48 *
49 * 121 9/02/99 3:16p Kevin
50 * Macintosh byte ordering fixes
51 *
52 * 120 8/24/99 5:47p Kevin
53 * Macintosh crap
54 *
55 * 119 8/24/99 10:39a Kevin
56 * Hopefully fixed the PXO return to chat bug
57 *
58 * 118 8/17/99 3:35p Kevin
59 * inverse sorts wouldn't show the last item! Doh!
60 *
61 * 117 8/17/99 1:52p Kevin
62 * fixed potential crash bugs as well as formatting for "CS Team Anarchy"
63 *
64 * 116 8/12/99 10:15a Kevin
65 * debugging stuff
66 *
67 * 115 8/10/99 12:53p Kevin
68 * fixed bug with return to chat & sorted gamelist
69 *
70 * 114 7/30/99 1:20p Kevin
71 * Fixed problems with sorted game list
72 *
73 * 113 7/26/99 11:45a Kevin
74 * possible return to chat crash fix
75 *
76 * 112 7/21/99 9:11a Kevin
77 * bandwidth reduction act #1
78 *
79 * 111 7/12/99 4:15p Kevin
80 * Changed the way we determine if we should report stats or not in PXO
81 *
82 * 110 7/07/99 3:38p Kevin
83 * Sorting in PXO gamelist!
84 *
85 * 109 7/06/99 5:52p Kevin
86 * PXO & multiplayer fixes for the patch
87 *
88 * 108 5/23/99 3:04a Jason
89 * fixed bug with player rankings not being updated correctly
90 *
91 * 107 5/23/99 2:38a Kevin
92 * fixed text overlapping thingy
93 *
94 * 106 5/20/99 9:17p Kevin
95 * removed invisible hotspot
96 *
97 * 105 5/17/99 5:19p Samir
98 * added ability for edit box to autoselect when hitting the max number of
99 * characters typable.
100 *
101 * 104 5/08/99 11:32a Kevin
102 * increased the gamelist update interval from pxo
103 *
104 * 103 5/05/99 5:23p Kevin
105 * fixed some bugs on the gamelist
106 *
107 * 102 5/05/99 11:04a Kevin
108 * added defer call to game over (previously it was only happening while
109 * writing stats
110 *
111 * 101 5/04/99 10:16p Kevin
112 * Fixed problem with 'set default screen'
113 *
114 * 100 5/04/99 5:39p Kevin
115 * connection dll & pxo game tracking improvements (added server type to
116 * list)
117 *
118 * 99 4/28/99 6:39p Kevin
119 * Build 182 fixes
120 *
121 * 98 4/27/99 1:54p Kevin
122 * Added pilot name to stats dialog
123 *
124 * 97 4/27/99 10:23a Kevin
125 * nifty titles for dialogs
126 *
127 * 96 4/25/99 5:02p Kevin
128 * Bunches of multiplayer UI improvements
129 *
130 * 95 4/24/99 11:59p Kevin
131 * game info dialog stuff
132 *
133 * 94 4/23/99 11:49p Kevin
134 *
135 * 93 4/22/99 3:43p Kevin
136 * Training missions show controls on screen
137 *
138 * 92 4/20/99 8:57p Jeff
139 * compile for Linux
140 *
141 * 91 4/19/99 7:56p Kevin
142 * ifdef'd out some win32 specific stuff
143 *
144 * 90 4/18/99 1:18p Kevin
145 * Demo2 build changes
146 *
147 * 89 4/17/99 3:44p Kevin
148 * Demo2 changes & fixes
149 *
150 * 88 4/16/99 6:00p Kevin
151 * Bunches of Demo stuff
152 *
153 * 87 4/14/99 1:37a Jeff
154 * fixed case mismatched #includes
155 *
156 * 86 4/02/99 12:19p Kevin
157 * Fixed chat server failed to connect
158 *
159 * 85 3/25/99 3:26p Kevin
160 * Made PXO games be based on your chat channel
161 *
162 * 84 3/17/99 4:08p Kevin
163 * Changed the way games appear and timeout in the game list.
164 *
165 * 83 3/05/99 11:35a Kevin
166 * new screens
167 *
168 * 82 3/04/99 12:07p Kevin
169 * Fixed stupid bug if you cancel out of connecting.
170 *
171 * 81 3/02/99 5:50p Kevin
172 * Ouch. Duplicate structures existed and were conflicting.
173 *
174 * 80 2/19/99 5:21p Kevin
175 * Fixed some connection DLLs and a Direct Sound bug with threads.
176 *
177 * 79 2/15/99 7:47p Jeff
178 * new pilot file class and read/write system checked in...should be more
179 * robust than old
180 *
181 * 78 2/03/99 4:20p Kevin
182 * Got multiplayer working with .mn3 files, and setup autodownloading
183 *
184 * 77 2/02/99 7:06p Jason
185 * added ranking system
186 *
187 * 76 1/23/99 3:20p Kevin
188 * Made gamelist boxes not sort
189 *
190 * 75 1/11/99 12:29p Jeff
191 * changes made not to call the module library directly
192 *
193 * 74 1/07/99 11:51a Kevin
194 * Added support for joining servers on alternate ports and hosting behind
195 * a proxy/firewall
196 *
197 * 73 1/04/99 5:43p Kevin
198 * new command line args
199 *
200 * 72 12/30/98 5:24p Kevin
201 * Added +name to specify a default pilot (for gamespy) fixed a gamespy
202 * bug, and improved the pxo dll game list screen
203 *
204 * 71 12/30/98 12:16p Kevin
205 * Auto Mission Download system
206 *
207 * 70 12/23/98 6:38p Kevin
208 * All UDP data (except gamespy) now uses one (registered) port number
209 *
210 * 69 12/14/98 10:53a Jason
211 * added bright player ships option
212 *
213 * 68 12/04/98 4:37p Kevin
214 * Fixed selection being reset in game lists...
215 *
216 * 67 12/01/98 12:47p Jason
217 * got rid of NF_DROPMISORDERED and added NF_USE_SMOOTHING
218 *
219 * 66 11/18/98 3:26p Kevin
220 * Put multiplayer options into con_dll.h
221 *
222 * 65 11/03/98 9:27a Kevin
223 * Added PXO message of the day
224 *
225 * 64 10/30/98 11:25a Kevin
226 * Message of the day for PXO
227 *
228 * 63 10/23/98 10:12a Kevin
229 * fixed bug when you hit cancel in the login screen
230 *
231 * 62 10/22/98 10:14a Kevin
232 * Made Stats dialog bigger
233 *
234 * 61 10/20/98 5:46p Kevin
235 * Gunboy and other fixes
236 *
237 * 60 10/20/98 2:07p Kevin
238 * changed tab order of login dialog, and changed strings
239 *
240 * 59 10/19/98 11:07p Kevin
241 * fixed bug
242 *
243 * 58 10/19/98 2:48p Kevin
244 * Added accurate weapon thingy for Chris
245 *
246 * 57 10/19/98 11:24a Kevin
247 * Fixed problem with help
248 *
249 * 56 10/17/98 2:32p Kevin
250 * FIxed problem with banned users getting stuck on the ban message
251 * screen.
252 *
253 * 55 10/17/98 12:46p Kevin
254 * Beta 4 fixes
255 *
256 * 54 10/15/98 3:29p Kevin
257 * Fixed dlls to not require runtime debug libraries in release builds
258 *
259 * 53 10/15/98 12:08p Kevin
260 * Changed game list to line up differently
261 *
262 * 52 10/13/98 3:42p Kevin
263 * bug fixes
264 *
265 * 51 10/12/98 8:39p Kevin
266 * removed mprintf's and fixed some smallish bugs
267 *
268 * 50 10/12/98 11:02a Kevin
269 * Changed directory of mtav file
270 *
271 * 49 10/09/98 2:56p Kevin
272 * Changed IP addresses for PXO demo
273 *
274 * 48 10/08/98 3:37p Jeff
275 * removed time_left from Netgame
276 *
277 * 47 10/05/98 11:00a Kevin
278 * Fixed bug with uninitialized variable
279 *
280 * 46 10/01/98 11:37a Kevin
281 * UI fixes and stuff
282 *
283 * 45 9/30/98 12:33p Kevin
284 * Added web launching support
285 *
286 * 44 9/29/98 2:23p Kevin
287 * More UI tweaks
288 *
289 * 43 9/28/98 4:55p Kevin
290 *
291 * 42 9/28/98 4:21p Kevin
292 * Redesigned game list menus
293 *
294 * 41 9/28/98 11:10a Kevin
295 * fuxed returning onf uninitialized variable
296 *
297 * 40 9/28/98 9:53a Kevin
298 * Fixing misc UI problems, and fixed some bugs that VC 6 found
299 *
300 * 39 9/25/98 11:07a Kevin
301 * fixed columns to line up and cleaned up some PXO bugs
302 *
303 * 38 9/24/98 12:50p Kevin
304 * Added UI for rotational velocity and drop out of order packets in net
305 * games
306 *
307 * 37 9/23/98 6:33p Kevin
308 * Fixed load settings
309 *
310 * 36 9/23/98 2:55p Kevin
311 * Saved multi config and changed UI to conform
312 *
313 * 35 9/22/98 3:55p Kevin
314 * Removed obsolete function
315 *
316 * 34 9/22/98 2:29p Kevin
317 * moved ships allowed code out of dll and into main app. Also added
318 * powerup exclusions
319 *
320 * 33 9/21/98 11:19a Kevin
321 * check protocol before entering multiplayer screens
322 *
323 * 32 9/16/98 8:06p Jason
324 * got mastertracker working with the dedicated server
325 *
326 * 31 9/14/98 12:34p Kevin
327 * Fixed problems with using strtok and grtext functions.
328 *
329 * 30 9/09/98 12:41p Kevin
330 * Fixed up some UI issues
331 *
332 * 29 9/04/98 1:51p Kevin
333 * implemented asyncronous gethostbyname
334 *
335 * 28 9/02/98 6:54p Kevin
336 * Fixed general directplay support up, and got modem-modem working
337 *
338 * 27 8/31/98 10:14a Kevin
339 * Misc. multi-UI fixes
340 *
341 * 26 8/27/98 5:03p Kevin
342 * Prettied up multiplayer screens and fixed some bugs.
343 *
344 * 25 8/26/98 3:28p Samir
345 * put focus thing back in
346 *
347 * 24 8/25/98 6:33p Kevin
348 * PXO screens
349 *
350 * 23 8/24/98 5:04p Kevin
351 * Made msn files have the option to not be playable in multiplayer
352 *
353 * 22 8/24/98 10:42a Kevin
354 * Updated DLL for directplay and PXO background
355 *
356 * 21 8/19/98 11:50a Kevin
357 * Got DirectPlay IPX working, and localized connection DLLs
358 *
359 * 20 8/17/98 2:26p Kevin
360 * fixed auto update dll directory
361 *
362 * 19 8/17/98 11:00a Kevin
363 * Moved DLLs into subdirectories
364 *
365 * 18 8/07/98 12:39p Jeff
366 * added "allowed ships" to multiplayer options
367 *
368 * 17 7/27/98 5:31p Kevin
369 * Sound/Bitmap exchange system
370 *
371 * 16 7/22/98 4:34p Kevin
372 * fixed bug in MT gamelist with >10 games
373 *
374 * 15 7/21/98 1:49p Kevin
375 * IPX support and peer-peer option for multi
376 *
377 * 14 7/20/98 2:34p Kevin
378 * Re-wrote the DLL wrapper, to allow for better expandability
379 *
380 * 11 6/30/98 3:20p Kevin
381 * fixed ping time
382 *
383 * 10 6/25/98 10:03a Kevin
384 * Minor chat fixes in PXO
385 *
386 * 9 6/24/98 6:40p Kevin
387 * Added help to main dll menu
388 *
389 * 8 6/24/98 3:24p Kevin
390 * Updated PXO screens with chat, etc.
391 *
392 * 7 6/18/98 4:49p Kevin
393 * Updated multiplayer menus
394 *
395 * 6 6/11/98 1:56p Jeff
396 * looks for d3m files instead of dll
397 *
398 * 5 6/05/98 2:16p Jeff
399 * Changes made so Dynamic loading of DLLs done through module library
400 *
401 * 4 6/05/98 12:40p Kevin
402 *
403 * 3 6/01/98 3:52p Kevin
404 * changed listbox item to be white
405 *
406 * 2 6/01/98 10:10a Kevin
407 * Added DLL connection interface and auto update DLL
408 *
409 * 1 5/18/98 12:47p Kevin
410 *
411 * $NoKeywords: $
412 */
413
414 #include "ui.h"cxx . . $ `<file>/ui/ui.h`/
415 #include "newui.h"cxx . . $ `<file>/Descent3/newui.h`/
416 #include "grdefs.h"cxx . . $ `<file>/lib/grdefs.h`/
417 #include "player.h"cxx . . $ `<file>/Descent3/player.h`/
418 #include "game.h"cxx . . $ `<file>/Descent3/game.h`/
419 #include "pilot.h"cxx . . $ `<file>/Descent3/pilot.h`/
420 #include "ddio_common.h"cxx . . $ `<file>/ddio/ddio_common.h`/
421 #include "mt_net.h"cxx . . $ `<file>/netcon/mtclient/mt_net.h`/
422 #include "mtgametrack.h"cxx . . $ `<file>/netcon/mtclient/mtgametrack.h`/
423 #include "module.h"cxx . . $ `<file>/lib/module.h`/
424 #include "inetgetfile.h"cxx . . $ `<file>/netcon/includes/inetgetfile.h`/
425 #include "chat_api.h"cxx . . $ `<file>/netcon/mtclient/chat_api.h`/
426 #include "mtstrings.h"cxx . . $ `<file>/netcon/mtclient/mtstrings.h`/
427
428 #define TXT_DLL_SAVESETTINGScxx . . $ `netcon/mtclient/mtclient.cpp:428:9`! TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(79)
429 #define TXT_DLL_LOADSETTINGScxx . . $ `netcon/mtclient/mtclient.cpp:429:9`! TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(80)
430
431 #define TXT_GEN_MPLYROPTIONScxx . . $ `netcon/mtclient/mtclient.cpp:431:9`! TXT_PXO_MPLYROPTIONS
432 #define TXT_GEN_TIMELIMITcxx . . $ `netcon/mtclient/mtclient.cpp:432:9`! TXT_PXO_TIMELIMIT
433 #define TXT_GEN_KILLGOALcxx . . $ `netcon/mtclient/mtclient.cpp:433:9`! TXT_PXO_KILLGOAL
434 #define TXT_GEN_PPScxx . . $ `netcon/mtclient/mtclient.cpp:434:9`! TXT_PXO_PPS
435 #define TXT_GEN_RESPAWNRATEcxx . . $ `netcon/mtclient/mtclient.cpp:435:9`! TXT_PXO_RESPAWNRATE
436 #define TXT_GEN_MAXPLAYERScxx . . $ `netcon/mtclient/mtclient.cpp:436:9`! TXT_PXO_MAXPLAYERS
437 #define TXT_GEN_PREVMENUcxx . . $ `netcon/mtclient/mtclient.cpp:437:9`! TXT_PXO_PREVMENU
438 #define TXT_GEN_CANCELcxx . . $ `netcon/mtclient/mtclient.cpp:438:9`! TXT_PXO_CANCEL
439 #define TXT_GEN_CFGALLOWEDSHIPcxx . . $ `netcon/mtclient/mtclient.cpp:439:9`! TXT_PXO_CFGALLOWEDSHIP
440 #define TXT_GEN_USEROTVELcxx . . $ `netcon/mtclient/mtclient.cpp:440:9`! TXT_PXO_USEROTVEL
441 #define TXT_GEN_USEROTVELcxx . . $ `netcon/mtclient/mtclient.cpp:441:9`! TXT_PXO_USEROTVEL
442 #define TXT_GEN_USESMOOTHINGcxx . . $ `netcon/mtclient/mtclient.cpp:442:9`! TXT_PXO_USESMOOTHING
443 #define TXT_GEN_CLIENTSERVERcxx . . $ `netcon/mtclient/mtclient.cpp:443:9`! TXT_PXO_CLIENTSERVER
444 #define TXT_GEN_PEERPEERcxx . . $ `netcon/mtclient/mtclient.cpp:444:9`! TXT_PXO_PEERPEER
445 #define TXT_GEN_ACC_WEAP_COLLcxx . . $ `netcon/mtclient/mtclient.cpp:445:9`! TXT_PXO_ACC_WEAP_COLL
446 #define TXT_GEN_BRIGHT_PLAYERScxx . . $ `netcon/mtclient/mtclient.cpp:446:9`! TXT_PXO_BRIGHT_PLAYERS
447
448 #define MULTI_USE_ALL_OPTIONScxx . . $ `netcon/mtclient/mtclient.cpp:448:9`! 1
449
450 #include "mtclient.h"cxx . . $ `<file>/netcon/mtclient/mtclient.h`/
451 #include "mtpilottrack.h"cxx . . $ `<file>/netcon/mtclient/mtpilottrack.h`/
452
453 #include "DLLUiItems.h"cxx . . $ `<file>/netcon/includes/DLLUiItems.h`/
454
455 char Ourlobbycxx . . $ Ourlobby.[50] = "";
456 bool Login_abortedcxx . . $ Login_aborted. = false;
457 bool Auto_startcxx . . $ Auto_start. = false;
458 int Bypass_chatcxx . . $ Bypass_chat. = 0;
459 int ChatStartedcxx . . $ ChatStarted. = 0;
460 extern int Motd_versioncxx . . $ Motd_version.;
461
462 d3_net_game_data_tinycxx . . $ d3_net_game_data_tiny# DLLD3_tracker_infocxx . . $ DLLD3_tracker_info.;
463
464 #define MTADDNEWURLcxx . . $ `netcon/mtclient/mtclient.cpp:464:9`! TXT_PXO_REGURL
465
466 #define MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`! 300
467
468 pxo_game_listcxx . . $ pxo_game_list# PXOGamelistcxx . . $ PXOGamelist.[MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!];
469 int NextGameItemNocxx . . $ NextGameItemNo. = 0;
470 uint16_tcxx . . $ uint16_t# DLLPXOPortcxx . . $ DLLPXOPort. = 0;
471
472 void AutoLoginAndStartGamecxx . . $ AutoLoginAndStartGame(49f6e7a06ebc5aa8).();
473
474 int GetGameByHandlecxx . . $ GetGameByHandle(4c679297bf94b9eb).(uint32_tcxx . . $ uint32_t# handle) {
475 int j;
476 for (j = 0; j < *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; j++) {
477 if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[j].handlecxx . . $ network_game#handle. == handle) {
478 return j;
479 }
480 }
481 return -1;
482 }
483
484 int GetPXOItemByHandlecxx . . $ GetPXOItemByHandle(4c679297bf94b9eb).(uint32_tcxx . . $ uint32_t# handle) {
485 for (int i = 0; i < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; i++) {
486 if (PXOGamelistcxx . . $ PXOGamelist.[i].usedcxx . . $ s_pxo_game_list#used.) {
487 if (PXOGamelistcxx . . $ PXOGamelist.[i].handlecxx . . $ s_pxo_game_list#handle. == handle) {
488 return i;
489 }
490 }
491 }
492 return -1;
493 }
494
495 int GetGameByLBNocxx . . $ GetGameByLBNo(7864480464b09eea).(int selno) {
496 for (int i = 0; i < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; i++) {
497 if (PXOGamelistcxx . . $ PXOGamelist.[i].usedcxx . . $ s_pxo_game_list#used.) {
498 if (PXOGamelistcxx . . $ PXOGamelist.[i].lb_nocxx . . $ s_pxo_game_list#lb_no. == selno) {
499 return GetGameByHandlecxx . . $ GetGameByHandle(4c679297bf94b9eb).(PXOGamelistcxx . . $ PXOGamelist.[i].handlecxx . . $ s_pxo_game_list#handle.);
500 }
501 }
502 }
503 return -1;
504 }
505
506 void FormatServerLinecxx . . $ FormatServerLine(dcbbfe1ffd04514b).(char *fmt, int servernum, int pxonum) {
507 int k = servernum;
508 char server_mode[20];
509 char server_type[200];
510
511 if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].flagscxx . . $ network_game#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!) {
512 strcpy(server_mode, "PP");
513 } else if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].flagscxx . . $ network_game#flags. & NF_PERMISSABLEcxx . . $ `Descent3/multi_external.h:239:9`!) {
514 strcpy(server_mode, "PS");
515 } else {
516 strcpy(server_mode, "CS");
517 }
518
519 if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].flagscxx . . $ network_game#flags. & NF_ALLOW_MLOOKcxx . . $ `Descent3/multi_external.h:242:9`!) {
520 strcat(server_mode, "-ML");
521 }
522
523 snprintf(server_type, sizeof(server_type), "%s %s", server_mode, DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].scriptnamecxx . . $ network_game#scriptname.);
524
525 int game_type_pos = strlen(server_type);
526
527 #define SERVER_TYPE_MAX_LENcxx . . $ `netcon/mtclient/mtclient.cpp:527:9`! 100
528 while (DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(server_type) > SERVER_TYPE_MAX_LENcxx . . $ `netcon/mtclient/mtclient.cpp:527:9`!) {
529 server_type[game_type_pos] = 0;
530 game_type_pos--;
531 }
532
533 sprintf(fmt, "%.20s\t\x02\x02b%s\x02\x45%.15s\x02\x63%d\x02\x6d%d/%d\x02\x7e%.3f", DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].namecxx . . $ network_game#name.,
534 server_type, DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].mission_namecxx . . $ network_game#mission_name., DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].level_numcxx . . $ network_game#level_num.,
535 DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].curr_num_playerscxx . . $ network_game#curr_num_players., DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].max_num_playerscxx . . $ network_game#max_num_players.,
536 DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].server_response_timecxx . . $ network_game#server_response_time.);
537 }
538
539 void UpdateGamelistcxx . . $ UpdateGamelist(5d22bdacc48458e8).(void *lb) {
540
541 int i, j;
542
543 // Look for items that we need to remove
544 for (i = 0; i < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; i++) {
545 bool found = false;
546 if (PXOGamelistcxx . . $ PXOGamelist.[i].usedcxx . . $ s_pxo_game_list#used.) {
547 for (j = 0; j < *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; j++) {
548 if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[j].handlecxx . . $ network_game#handle. == PXOGamelistcxx . . $ PXOGamelist.[i].handlecxx . . $ s_pxo_game_list#handle.) {
549 found = true;
550 }
551 }
552 if (!found) {
553 // Remove this item!
554 /*
555 int gameid = GetGameByHandle(PXOGamelist[i].handle);
556
557 if(gameid!=-1)
558 {
559 DLLmprintf(0,"Removing %s\n",DLLNetwork_games[gameid].name);
560 }
561 */
562
563 // Now we need to fix up the lb_no items because we removed this one!
564 int k = 0;
565 for (k = 0; k < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; k++) {
566 if (!PXOGamelistcxx . . $ PXOGamelist.[k].usedcxx . . $ s_pxo_game_list#used.)
567 continue;
568
569 // This is yucky, but it accounts for the shifting up of the game items in the list
570 if (PXOGamelistcxx . . $ PXOGamelist.[i].lb_nocxx . . $ s_pxo_game_list#lb_no. < PXOGamelistcxx . . $ PXOGamelist.[k].lb_nocxx . . $ s_pxo_game_list#lb_no.)
571 PXOGamelistcxx . . $ PXOGamelist.[k].lb_nocxx . . $ s_pxo_game_list#lb_no.--;
572 }
573 NextGameItemNocxx . . $ NextGameItemNo.--;
574 PXOGamelistcxx . . $ PXOGamelist.[i].usedcxx . . $ s_pxo_game_list#used. = false;
575 PXOGamelistcxx . . $ PXOGamelist.[i].handlecxx . . $ s_pxo_game_list#handle. = -1;
576 DLLListRemoveItemcxx . . $ DLLListRemoveItem.(lb, PXOGamelistcxx . . $ PXOGamelist.[i].ticxx . . $ s_pxo_game_list#ti.);
577 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(PXOGamelistcxx . . $ PXOGamelist.[i].ticxx . . $ s_pxo_game_list#ti.);
578 }
579 }
580 }
581
582 // Look for items to add
583 for (i = 0; i < *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; i++) {
584 bool found = false;
585 for (j = 0; j < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; j++) {
586 if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[i].handlecxx . . $ network_game#handle. == PXOGamelistcxx . . $ PXOGamelist.[j].handlecxx . . $ s_pxo_game_list#handle.) {
587 found = true;
588 }
589 }
590 if (!found) {
591 // Add this item!
592 // Update PXOGamelist[i].ti
593 for (j = 0; j < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; j++) {
594 if (!PXOGamelistcxx . . $ PXOGamelist.[j].usedcxx . . $ s_pxo_game_list#used.) {
595 // Aha! an empty slot
596 break;
597 }
598 }
599
600 int k = i;
601 if (j < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!) {
602 char fmtline[200];
603
604 PXOGamelistcxx . . $ PXOGamelist.[j].lb_nocxx . . $ s_pxo_game_list#lb_no. = NextGameItemNocxx . . $ NextGameItemNo.;
605 NextGameItemNocxx . . $ NextGameItemNo.++;
606 PXOGamelistcxx . . $ PXOGamelist.[j].handlecxx . . $ s_pxo_game_list#handle. = DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].handlecxx . . $ network_game#handle.;
607 PXOGamelistcxx . . $ PXOGamelist.[j].usedcxx . . $ s_pxo_game_list#used. = true;
608 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Adding %s\n", DLLNetwork_games[k].name);
609
610 // DLLmprintf(0,"Found game: %s\n",DLLNetwork_games[k].name);
611 FormatServerLinecxx . . $ FormatServerLine(dcbbfe1ffd04514b).(fmtline, k, j);
612
613 if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].dedicated_servercxx . . $ network_game#dedicated_server.) {
614 PXOGamelistcxx . . $ PXOGamelist.[j].ticxx . . $ s_pxo_game_list#ti. = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtline, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
615 } else {
616 PXOGamelistcxx . . $ PXOGamelist.[j].ticxx . . $ s_pxo_game_list#ti. = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtline, GR_LIGHTGRAYcxx . . $ GR_LIGHTGRAY.);
617 }
618 DLLListAddItemcxx . . $ DLLListAddItem.(lb, PXOGamelistcxx . . $ PXOGamelist.[j].ticxx . . $ s_pxo_game_list#ti.);
619 } else {
620 // DLLInt3();
621 // Out of slots???
622 }
623 }
624 }
625
626 for (j = 0; j < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; j++) {
627 if (PXOGamelistcxx . . $ PXOGamelist.[j].usedcxx . . $ s_pxo_game_list#used. && (PXOGamelistcxx . . $ PXOGamelist.[j].handlecxx . . $ s_pxo_game_list#handle. != -1)) {
628 int gameid = GetGameByHandlecxx . . $ GetGameByHandle(4c679297bf94b9eb).(PXOGamelistcxx . . $ PXOGamelist.[j].handlecxx . . $ s_pxo_game_list#handle.);
629
630 if (gameid != -1) {
631 int k = gameid;
632 // DLLmprintf(0,"Updating %s\n",DLLNetwork_games[gameid].name);
633 char fmtline[200];
634 FormatServerLinecxx . . $ FormatServerLine(dcbbfe1ffd04514b).(fmtline, k, j);
635 DLLSetUITextItemTextcxx . . $ DLLSetUITextItemText.(PXOGamelistcxx . . $ PXOGamelist.[j].ticxx . . $ s_pxo_game_list#ti., fmtline,
636 DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].dedicated_servercxx . . $ network_game#dedicated_server. ? UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`! : GR_LIGHTGRAYcxx . . $ GR_LIGHTGRAY.);
637 }
638 }
639 }
640 }
641
642 #ifdef MACINTOSH
643 #pragma export on
644 #endif
645
646 // These next two function prototypes MUST appear in the extern "C" block if called
647 // from a CPP file.
648 extern "C" {
649 DLLEXPORTcxx . . $ `lib/module.h:114:9`! void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiInit(int *api_func);
650 DLLEXPORTcxx . . $ `lib/module.h:114:9`! void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiCall(int eventnum);
651 DLLEXPORTcxx . . $ `lib/module.h:114:9`! void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiClose();
652 }
653
654 bool All_okcxx . . $ All_ok. = true;
655 bool MT_Sock_initedcxx . . $ MT_Sock_inited. = false;
656
657 // Initializes the game function pointers
658 void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiInitcxx . . $ DLLMultiInit(11b0e290e57a7e53).(int *api_func) {
659 Use_netgame_flagscxx . . $ Use_netgame_flags. = 1;
660 #ifdef MACINTOSH
661 InitOTSockets();
662 #endif
663 #include "mdllinit.h"cxx . . $ `<file>/netcon/includes/mdllinit.h`/
664 DLLPXOPortcxx . . $ DLLPXOPort. = (uint16_tcxx . . $ uint16_t#)((size_t)APIcxx . . $ API..vpcxx . . $ multi_api#vp.[32] & 0xffff);
665 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Inside DLLMultiInit...\n");
666 *DLLUse_DirectPlaycxx . . $ DLLUse_DirectPlay. = false;
667 Auto_startcxx . . $ Auto_start. = false;
668 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "About to create string table...\n");
669 DLLCreateStringTablecxx . . $ DLLCreateStringTable.("mtclient.str", &StringTablecxx . . $ StringTable., &StringTableSizecxx . . $ StringTableSize.);
670 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "%d strings loaded from string table\n", StringTableSize);
671 if (!StringTableSizecxx . . $ StringTableSize.) {
672 All_okcxx . . $ All_ok. = false;
673 return;
674 }
675
676 memset(PXOGamelistcxx . . $ PXOGamelist., 0, sizeof(PXOGamelistcxx . . $ PXOGamelist.));
677 }
678
679 // Called when the DLL is shutdown
680 void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiClosecxx . . $ DLLMultiClose(49f6e7a06ebc5aa8).() {
681 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Closing down PXO DLL\n");
682 DLLDestroyStringTablecxx . . $ DLLDestroyStringTable.(StringTablecxx . . $ StringTable., StringTableSizecxx . . $ StringTableSize.);
683 DLLnw_UnRegisterCallbackcxx . . $ DLLnw_UnRegisterCallback.(PXO_NETID_USER_TRACKERcxx . . $ `netcon/mtclient/mt_net.h:53:9`!);
684 DLLnw_UnRegisterCallbackcxx . . $ DLLnw_UnRegisterCallback.(PXO_NETID_GAME_TRACKERcxx . . $ `netcon/mtclient/mt_net.h:52:9`!);
685 if (MT_Sock_initedcxx . . $ MT_Sock_inited.) {
686 CloseMTSocketscxx . . $ CloseMTSockets(49f6e7a06ebc5aa8).();
687 }
688 #ifdef MACINTOSH
689 ShutdownOTSockets();
690 #endif
691 }
692
693 // The main entry point where the game calls the dll
694 void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiCallcxx . . $ DLLMultiCall(d4f767463ce0a6b3).(int eventnum) {
695 // We don't need eventnum right now.
696
697 switch (eventnum) {
698 case MT_EVT_GET_HELPcxx . . $ `Descent3/multi_external.h:141:9`!:
699 strcpy(DLLHelpText1cxx . . $ DLLHelpText1., TXT_PXO_HELP1cxx . . $ `netcon/mtclient/mtstrings.h:24:9`!);
700 strcpy(DLLHelpText2cxx . . $ DLLHelpText2., TXT_PXO_HELP2cxx . . $ `netcon/mtclient/mtstrings.h:25:9`!);
701 strcpy(DLLHelpText3cxx . . $ DLLHelpText3., TXT_PXO_HELP3cxx . . $ `netcon/mtclient/mtstrings.h:50:9`!);
702 strcpy(DLLHelpText4cxx . . $ DLLHelpText4., TXT_PXO_HELP4cxx . . $ `netcon/mtclient/mtstrings.h:51:9`!);
703 break;
704 case MT_EVT_LOGINcxx . . $ `Descent3/multi_external.h:137:9`!:
705 DLLDatabaseReadIntcxx . . $ DLLDatabaseReadInt.("BypassChat", &Bypass_chatcxx . . $ Bypass_chat.);
706 if (!DLLTCP_activecxx . . $ DLLTCP_active.) {
707 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_ERRORcxx . . $ `netcon/mtclient/mtstrings.h:102:9`!, TXT_PXO_NO_TCPIPcxx . . $ `netcon/mtclient/mtstrings.h:101:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
708 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
709 break;
710 }
711
712 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
713 if (*DLLDedicated_servercxx . . $ DLLDedicated_server.) {
714 InitMTSocketscxx . . $ InitMTSockets(49f6e7a06ebc5aa8).();
715 } else {
716 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, 1);
717 InitMTSocketscxx . . $ InitMTSockets(49f6e7a06ebc5aa8).();
718 MT_Sock_initedcxx . . $ MT_Sock_inited. = true;
719 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
720 }
721 if (!All_okcxx . . $ All_ok.) {
722 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
723 return;
724 }
725 {
726 UnvalidatedDLLcxx . . $ UnvalidatedDLL. = 0;
727 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, 1);
728 DLLPollUIcxx . . $ DLLPollUI.();
729 if (MT_Initializedcxx . . $ MT_Initialized.) {
730 DLLPollUIcxx . . $ DLLPollUI.();
731 if (!MTVersionCheckcxx . . $ MTVersionCheck(b126dc7c1de90089).()) {
732 if (Login_abortedcxx . . $ Login_aborted.) {
733 MT_Initializedcxx . . $ MT_Initialized. = 0;
734 } else {
735 // If the first call fails, try again
736 DLLPollUIcxx . . $ DLLPollUI.();
737 if (!MTVersionCheckcxx . . $ MTVersionCheck(b126dc7c1de90089).()) {
738 DLLPollUIcxx . . $ DLLPollUI.();
739 if (!MTVersionCheckcxx . . $ MTVersionCheck(b126dc7c1de90089).()) {
740 // If this call fails, we have a problem, and when MT_EVT_LOGIN is called we will let the user know.
741 UnvalidatedDLLcxx . . $ UnvalidatedDLL. = 1;
742 }
743 }
744 }
745 }
746 }
747 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
748 if (!MT_Initializedcxx . . $ MT_Initialized.) {
749 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_CANTCONNECTcxx . . $ `netcon/mtclient/mtstrings.h:53:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
750 return;
751 }
752 // Start off with a login to tracker dialog
753 if (UnvalidatedDLLcxx . . $ UnvalidatedDLL.) {
754 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_CANTAUTOVALIDATEcxx . . $ `netcon/mtclient/mtstrings.h:55:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!,
755 UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
756 return;
757 }
758
759 if (LoginMasterTrackercxx . . $ LoginMasterTracker(b126dc7c1de90089).()) {
760 // menu.... start a game, or join a game
761 if (MainMultiplayerMenucxx . . $ MainMultiplayerMenu(b126dc7c1de90089).()) {
762 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 1;
763 } else {
764 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
765 }
766 } else {
767 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Login failed!\n");
768 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
769 return;
770 }
771 }
772 break;
773 case MT_EVT_FRAMEcxx . . $ `Descent3/multi_external.h:139:9`!:
774 DoMTFramecxx . . $ DoMTFrame(49f6e7a06ebc5aa8).();
775 break;
776 case MT_EVT_FIRST_FRAMEcxx . . $ `Descent3/multi_external.h:138:9`!:
777 MTWritingPilotcxx . . $ MTWritingPilot. = -1;
778 MTReadingPilotcxx . . $ MTReadingPilot. = -1;
779 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
780 // strcpy(DLLD3_tracker_info.game_name,DLLNetgame->name);
781 // strcpy(DLLD3_tracker_info.mission_name,DLLNetgame->mission);
782 strcpy(DLLD3_tracker_infocxx . . $ DLLD3_tracker_info..lobbycxx . . $ d3_net_game_data_tiny#lobby., DLLPXO_hosted_lobby_namecxx . . $ DLLPXO_hosted_lobby_name.);
783 StartTrackerGamecxx . . $ StartTrackerGame(5d22bdacc48458e8).(&DLLD3_tracker_infocxx . . $ DLLD3_tracker_info.);
784 break;
785 case MT_EVT_GAME_OVERcxx . . $ `Descent3/multi_external.h:140:9`!:
786 DoMTGameOvercxx . . $ DoMTGameOver(49f6e7a06ebc5aa8).();
787 /*
788 if(!All_ok)
789 break;
790 //menu.... start a game, or join a game
791 if(MainMultiplayerMenu())
792 {
793 *DLLMultiGameStarting = 1;
794 }
795 else
796 {
797 *DLLMultiGameStarting = 0;
798 }
799 */
800 break;
801 case MT_AUTO_LOGINcxx . . $ `Descent3/multi_external.h:142:9`!:
802 if (!DLLTCP_activecxx . . $ DLLTCP_active.) {
803 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_ERRORcxx . . $ `netcon/mtclient/mtstrings.h:102:9`!, TXT_PXO_NO_TCPIPcxx . . $ `netcon/mtclient/mtstrings.h:101:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
804 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
805 break;
806 }
807 InitMTSocketscxx . . $ InitMTSockets(49f6e7a06ebc5aa8).();
808 if (!All_okcxx . . $ All_ok.) {
809 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
810 return;
811 }
812 AutoLoginAndJoinGamecxx . . $ AutoLoginAndJoinGame(49f6e7a06ebc5aa8).();
813 break;
814 case MT_AUTO_STARTcxx . . $ `Descent3/multi_external.h:143:9`!:
815 InitMTSocketscxx . . $ InitMTSockets(49f6e7a06ebc5aa8).();
816 if (!All_okcxx . . $ All_ok.) {
817 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
818 return;
819 }
820 Auto_startcxx . . $ Auto_start. = true;
821 AutoLoginAndStartGamecxx . . $ AutoLoginAndStartGame(49f6e7a06ebc5aa8).();
822 break;
823 case MT_RETURN_TO_GAME_LISTcxx . . $ `Descent3/multi_external.h:144:9`!:
824 Bypass_chatcxx . . $ Bypass_chat. = 1;
825
826 // menu.... start a game, or join a game
827 if (MainMultiplayerMenucxx . . $ MainMultiplayerMenu(b126dc7c1de90089).()) {
828 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 1;
829 } else {
830 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
831 }
832 break;
833 }
834 }
835
836 #ifdef MACINTOSH
837 #pragma export off
838 #endif
839
840 int LoginMasterTrackercxx . . $ LoginMasterTracker(b126dc7c1de90089).() {
841
842 void *title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_LOGINMASTERTRKRcxx . . $ `netcon/mtclient/mtstrings.h:56:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
843 void *cancel_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
844 void *login_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_LOGINcxx . . $ `netcon/mtclient/mtstrings.h:58:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
845
846 void *cancel_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
847 void *login_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_LOGINcxx . . $ `netcon/mtclient/mtstrings.h:58:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
848
849 void *login_id_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_LOGINIDcxx . . $ `netcon/mtclient/mtstrings.h:59:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
850 void *tracker_id_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_TRACKERIDcxx . . $ `netcon/mtclient/mtstrings.h:60:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
851 void *password_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PASSWORDcxx . . $ `netcon/mtclient/mtstrings.h:61:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
852
853 void *new_prof_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CREATENEWPROFILEcxx . . $ `netcon/mtclient/mtstrings.h:62:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
854 void *new_prof_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CREATENEWPROFILEcxx . . $ `netcon/mtclient/mtstrings.h:62:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
855
856 void *blank_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_BLANKcxx . . $ `netcon/mtclient/mtstrings.h:28:9`!, GR_BLACKcxx . . $ GR_BLACK.);
857
858 int exit_menu = 0;
859 int ret = 0;
860
861 int loginlen = LOGIN_LENcxx . . $ `netcon/includes/con_dll.h:718:9`!;
862 int passlen = PASSWORD_LENcxx . . $ `netcon/includes/con_dll.h:720:9`!;
863
864 void *main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(TRACKER_MENU_Xcxx . . $ `netcon/mtclient/mtclient.h:89:9`!, TRACKER_MENU_Ycxx . . $ `netcon/mtclient/mtclient.h:90:9`!, TRACKER_MENU_Wcxx . . $ `netcon/mtclient/mtclient.h:87:9`!, TRACKER_MENU_Hcxx . . $ `netcon/mtclient/mtclient.h:88:9`!,
865 UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | NUWF_TITLEMEDcxx . . $ `Descent3/newui.h:199:9`!);
866
867 void *title = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, title_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
868
869 void *password = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, password_text, 30, 130, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
870 void *login_id = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, login_id_text, 50, 80, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
871
872 void *pass_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, 100, 140, 130, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | UIED_PASSWORDcxx . . $ `ui/ui.h:361:9`!);
873
874 void *login_hs =
875 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, login_off_text, login_on_text, 60, TRACKER_MENU_Hcxx . . $ `netcon/mtclient/mtclient.h:88:9`! - 80, 60, 20, 0);
876
877 void *cancel_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_CANCELcxx . . $ `ui/ui.h:369:9`!, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, cancel_off_text, cancel_on_text, 130,
878 TRACKER_MENU_Hcxx . . $ `netcon/mtclient/mtclient.h:88:9`! - 80, 60, 20, 0);
879
880 void *new_id_hs =
881 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 4, KEY_Ncxx . . $ `ddio/ddio_common.h:242:9`!, new_prof_off_text, new_prof_on_text, 0, 45, 120, 20, UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | UIF_FITcxx . . $ `ui/ui.h:343:9`!);
882
883 void *login_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, 3, 100, 90, 130, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
884
885 // Read defaults
886
887 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("TrackerLogin", szloginidcxx . . $ szloginid., &loginlen);
888 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("TrackerPassword", szpasswordcxx . . $ szpassword., &passlen);
889
890 DLLEditSetTextcxx . . $ DLLEditSetText.(login_edit, szloginidcxx . . $ szloginid.);
891 DLLEditSetTextcxx . . $ DLLEditSetText.(pass_edit, szpasswordcxx . . $ szpassword.);
892
893 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
894
895 while (!exit_menu) {
896 int res;
897
898 res = DLLDoUIcxx . . $ DLLDoUI.();
899
900 // handle all UI results.
901
902 switch (res) {
903 case 3:
904 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Got event 3!\n");
905 break;
906 case 4:
907 #ifdef WIN32
908 // TODO: reacivate for site opening
909 // ShellExecute(NULL, "open", MTADDNEWURL, NULL, NULL, SW_SHOW);
910 #endif
911 break;
912 case UID_OKcxx . . $ `ui/ui.h:368:9`!: {
913 DLLEditGetTextcxx . . $ DLLEditGetText.(login_edit, szloginidcxx . . $ szloginid., LOGIN_LENcxx . . $ `netcon/includes/con_dll.h:718:9`!);
914 DLLEditGetTextcxx . . $ DLLEditGetText.(pass_edit, szpasswordcxx . . $ szpassword., PASSWORD_LENcxx . . $ `netcon/includes/con_dll.h:720:9`!);
915
916 DLLDatabaseWritecxx . . $ DLLDatabaseWrite.("TrackerLogin", szloginidcxx . . $ szloginid., strlen(szloginidcxx . . $ szloginid.) + 1);
917 DLLDatabaseWritecxx . . $ DLLDatabaseWrite.("TrackerPassword", szpasswordcxx . . $ szpassword., strlen(szpasswordcxx . . $ szpassword.) + 1);
918
919 if ((!*szloginidcxx . . $ szloginid.) || (!*szpasswordcxx . . $ szpassword.)) {
920 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_BADLOGINcxx . . $ `netcon/mtclient/mtstrings.h:63:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
921 break;
922 }
923
924 // Fill out the validate struct and send off the packet
925 validate_id_requestcxx . . $ validate_id_request# val_user{};
926 strcpy(val_user.tracker_idcxx . . $ validate_id_request#tracker_id., sztrackeridcxx . . $ sztrackerid.);
927 strcpy(val_user.logincxx . . $ validate_id_request#login., szloginidcxx . . $ szloginid.);
928 strcpy(val_user.passwordcxx . . $ validate_id_request#password., szpasswordcxx . . $ szpassword.);
929
930 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, 1);
931
932 int valret = ValidateUsercxx . . $ ValidateUser(1b54b1e9ed0f18f2).(&val_user, sztrackeridcxx . . $ sztrackerid.);
933
934 while (valret == 0) {
935 valret = ValidateUsercxx . . $ ValidateUser(1b54b1e9ed0f18f2).(nullptr, nullptr);
936 res = DLLPollUIcxx . . $ DLLPollUI.();
937 if (res == 99) {
938 valret = -2;
939 }
940 DLLDescentDefercxx . . $ DLLDescentDefer.();
941 }
942 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
943 if (valret == 1) {
944 // User was validated
945 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker user validated!\n");
946 // Run this to make sure we properly ACK the server.
947 for (int j = 0; j < 10; j++)
948 PollPTrackNetcxx . . $ PollPTrackNet(49f6e7a06ebc5aa8).();
949 strcpy(DLLTracker_idcxx . . $ DLLTracker_id., sztrackeridcxx . . $ sztrackerid.);
950 strcpy(DLLMPlayerscxx . . $ DLLMPlayers.[DLLPlayer_numcxx . . $ DLLPlayer_num.].tracker_idcxx . . $ player#tracker_id., sztrackeridcxx . . $ sztrackerid.);
951 exit_menu = 1;
952 ret = 1;
953
954 break;
955 } else if (valret == -1) {
956 // User invalid!
957 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker user not validated!\n");
958 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_BADLOGINcxx . . $ `netcon/mtclient/mtstrings.h:63:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
959 // Run this to make sure we properly ACK the server.
960 for (int j = 0; j < 10; j++)
961 PollPTrackNetcxx . . $ PollPTrackNet(49f6e7a06ebc5aa8).();
962 break;
963 } else {
964 // timeout waiting for tracker!
965 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker timeout!\n");
966 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_TIMEOUTMTcxx . . $ `netcon/mtclient/mtstrings.h:64:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
967 // Run this to make sure we properly ACK the server.
968 for (int j = 0; j < 10; j++)
969 PollPTrackNetcxx . . $ PollPTrackNet(49f6e7a06ebc5aa8).();
970 break;
971 }
972 }
973 case UID_CANCELcxx . . $ `ui/ui.h:369:9`!:
974 exit_menu = 1;
975 ret = 0;
976 break;
977 }
978 }
979
980 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
981 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
982
983 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
984 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_on_text);
985 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(login_on_text);
986 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_off_text);
987 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(login_off_text);
988 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(login_id_text);
989 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(tracker_id_text);
990 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(password_text);
991 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(new_prof_on_text);
992 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(new_prof_off_text);
993 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(blank_text);
994
995 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
996 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title);
997 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(cancel_hs);
998 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(login_hs);
999 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(new_id_hs);
1000 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(login_edit);
1001 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(password);
1002 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(login_id);
1003 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(pass_edit);
1004
1005 return ret;
1006 }
1007
1008 // The first multiplayer menu that the user will see...all multiplayer stuff is
1009 // reached from this menu
1010 // Returns true if we're starting a multiplayer game
1011 #define CONNECT_PXO_TIMEOUTcxx . . $ `netcon/mtclient/mtclient.cpp:1011:9`! 60.0
1012 #define MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`! 200
1013 #define MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`! 50
1014 #define CHAT_INFO_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1014:9`! 200
1015 #define CHAT_COUNT_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1015:9`! 10
1016 #define CHAT_MAX_USERLISTcxx . . $ `netcon/mtclient/mtclient.cpp:1016:9`! 200
1017 #define CHAT_USER_REFRESH_TIMEcxx . . $ `netcon/mtclient/mtclient.cpp:1017:9`! 5
1018 #define CHAT_LIST_REFRESH_TIMEcxx . . $ `netcon/mtclient/mtclient.cpp:1018:9`! 10
1019
1020 structcxx . . $ $anonymous_type_c3e44a1656db32d5_0# {
1021 char namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.[CHAT_INFO_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1014:9`!];
1022 char orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname.[CHAT_INFO_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1014:9`!];
1023 char topiccxx . . $ $anonymous_type_c3e44a1656db32d5_0#topic.[CHAT_INFO_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1014:9`!];
1024 char countcxx . . $ $anonymous_type_c3e44a1656db32d5_0#count.[CHAT_COUNT_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1015:9`!];
1025 char gamescxx . . $ $anonymous_type_c3e44a1656db32d5_0#games.[CHAT_COUNT_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1015:9`!];
1026 } chan_infocxx . . $ chan_info.[MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!];
1027
1028 int MainMultiplayerMenucxx . . $ MainMultiplayerMenu(b126dc7c1de90089).() {
1029
1030 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "%d", DESCENT3_BLOCK_SIZEcxx . . $ `netcon/includes/con_dll.h:747:9`!);
1031 if (!ShowMessageOfTheDaycxx . . $ ShowMessageOfTheDay(b126dc7c1de90089).()) {
1032 return 0;
1033 }
1034
1035 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Inside MainMultiplayerMenu()\n");
1036 if (Bypass_chatcxx . . $ Bypass_chat. && !ChatStartedcxx . . $ ChatStarted.) {
1037 int rcode1 = SearchMasterTrackerGameMenucxx . . $ SearchMasterTrackerGameMenu(b126dc7c1de90089).();
1038 if (rcode1 == -1)
1039 rcode1 = 0;
1040 return rcode1;
1041 }
1042
1043 DLLToggleUICallbackcxx . . $ DLLToggleUICallback.(0);
1044 ChatStartedcxx . . $ ChatStarted. = 1;
1045 void *title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
1046
1047 void *cancel_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1048 void *cancel_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1049
1050 void *exit_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_EXITcxx . . $ `netcon/mtclient/mtstrings.h:29:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1051 void *exit_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_EXITcxx . . $ `netcon/mtclient/mtstrings.h:29:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1052
1053 void *priv_msg_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SENDPRIVcxx . . $ `netcon/mtclient/mtstrings.h:65:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1054 void *priv_msg_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SENDPRIVcxx . . $ `netcon/mtclient/mtstrings.h:65:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1055
1056 void *join_lobby_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINPRIVcxx . . $ `netcon/mtclient/mtstrings.h:66:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1057 void *join_lobby_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINPRIVcxx . . $ `netcon/mtclient/mtstrings.h:66:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1058
1059 void *join_chan_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINCHANcxx . . $ `netcon/mtclient/mtstrings.h:67:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1060 void *join_chan_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINCHANcxx . . $ `netcon/mtclient/mtstrings.h:67:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1061
1062 void *find_pilot_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_FINDPILOTcxx . . $ `netcon/mtclient/mtstrings.h:68:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1063 void *find_pilot_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_FINDPILOTcxx . . $ `netcon/mtclient/mtstrings.h:68:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1064
1065 void *get_pilot_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GETPILOTINFOcxx . . $ `netcon/mtclient/mtstrings.h:69:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1066 void *get_pilot_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GETPILOTINFOcxx . . $ `netcon/mtclient/mtstrings.h:69:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1067
1068 void *game_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINSTARTGAMEcxx . . $ `netcon/mtclient/mtstrings.h:70:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1069 void *game_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINSTARTGAMEcxx . . $ `netcon/mtclient/mtstrings.h:70:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1070
1071 void *send_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SENDcxx . . $ `netcon/mtclient/mtstrings.h:77:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1072 void *send_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SENDcxx . . $ `netcon/mtclient/mtstrings.h:77:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1073
1074 char fmtlobbytext[200];
1075 snprintf(fmtlobbytext, sizeof(fmtlobbytext), TXT_PXO_YOUAREINLOBBYcxx . . $ `netcon/mtclient/mtstrings.h:98:9`!, Ourlobbycxx . . $ Ourlobby.);
1076 void *lobby_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtlobbytext, UICOL_TEXT_AUXcxx . . $ `Descent3/newui.h:220:9`!);
1077
1078 void *blank_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_BLANKcxx . . $ `netcon/mtclient/mtstrings.h:28:9`!, UICOL_TEXT_AUXcxx . . $ `Descent3/newui.h:220:9`!);
1079 char sendline[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
1080 int exit_menu = 0;
1081 int ret = 0;
1082 int res;
1083 const char *p;
1084 int i;
1085 float lastlisttime = 0;
1086 float lastchanlisttime = 0;
1087 void *chan_ti[MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!];
1088 void *user_ti[CHAT_MAX_USERLISTcxx . . $ `netcon/mtclient/mtclient.cpp:1016:9`!];
1089 char selpilot[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
1090 char oldselchan[200];
1091 for (i = 0; i < MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!; i++)
1092 chan_ti[i] = nullptr;
1093 for (i = 0; i < CHAT_MAX_USERLISTcxx . . $ `netcon/mtclient/mtclient.cpp:1016:9`!; i++)
1094 user_ti[i] = nullptr;
1095
1096 uint8_tcxx . . $ uint8_t# oldalpha = *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha.;
1097
1098 int colx1 = 0;
1099 int colx2 = 148;
1100 DLLSetScreenModecxx . . $ DLLSetScreenMode.(SM_MENUcxx . . $ SM_MENU.);
1101 *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha. = 255;
1102
1103 for (i = 0; i < MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!; i++) {
1104 chan_infocxx . . $ chan_info.[i].orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname.[0] = '\0';
1105 }
1106
1107 // Create our buttons
1108 void *main_wnd = DLLNewUIWindowCreatecxx . . $ DLLNewUIWindowCreate.(0, 0, 640, 480, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`!);
1109
1110 // void HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w,
1111 // int h, int flags,int winnum)
1112 void *exit_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 5, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, exit_off_text, exit_on_text, 33, 427, 70, 15, 0);
1113
1114 void *priv_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0);
1115
1116 #define JOIN_ROWcxx . . $ `netcon/mtclient/mtclient.cpp:1116:9`! 131
1117 void *join_lobby_hs =
1118 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 7, 0, join_lobby_off_text, join_lobby_on_text, 400, JOIN_ROWcxx . . $ `netcon/mtclient/mtclient.cpp:1116:9`!, 170, 15, 0);
1119 void *join_chan_hs =
1120 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 14, 0, join_chan_off_text, join_chan_on_text, 178, JOIN_ROWcxx . . $ `netcon/mtclient/mtclient.cpp:1116:9`!, 170, 15, 0);
1121
1122 void *find_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0);
1123 void *get_pilot_hs =
1124 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 10, 0, get_pilot_off_text, get_pilot_on_text, colx1 + 10, 372, 130, 15, 0);
1125 void *game_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0);
1126
1127 void *enter_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 15, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, send_off_text, send_on_text, 550, 370, 70, 15, 0);
1128
1129 // lobby_text
1130 void *lobby_txt_gadget = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, lobby_text, 200, 450, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1131
1132 // User list box, id #10
1133 void *user_list = DLLOldListCreatecxx . . $ DLLOldListCreate.(main_wnd, 10, colx1 + 20, 100, 108, 265, 0);
1134 // Channel list box, id #14
1135 void *chan_list = DLLOldListCreatecxx . . $ DLLOldListCreate.(main_wnd, 14, colx2, 25, 470, 96, 0);
1136
1137 // Edit box for typing in chat, id # 15
1138 void *send_edit = DLLOldEditCreatecxx . . $ DLLOldEditCreate.(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECTcxx . . $ `ui/ui.h:363:9`!);
1139 DLLNewUIWindowLoadBackgroundImagecxx . . $ DLLNewUIWindowLoadBackgroundImage.(main_wnd, "pxomain.ogf");
1140 DLLSetOldEditBufferLencxx . . $ DLLSetOldEditBufferLen.(send_edit, 100);
1141 void *console_item = DLLUIConsoleGadgetCreatecxx . . $ DLLUIConsoleGadgetCreate.(main_wnd, 16, colx2, 165, 0, 51, 16, 0);
1142 pconsolecxx . . $ pconsole. = console_item;
1143
1144 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1145 // Menu loop
1146 // Create status window while we are connecting
1147
1148 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, 1);
1149 Chat_commandcxx . . $ Chat_command# *cmd;
1150 int gotcancel = 0;
1151 int chat_connected = 0;
1152 float chat_conn_time = 0;
1153 char oldseluser[100];
1154 char chat_whois_info[PILOT_NAME_LENcxx . . $ `netcon/includes/con_dll.h:723:9`! + TRACKER_ID_LENcxx . . $ `netcon/includes/con_dll.h:722:9`! + 4];
1155
1156 char pilot_name[PILOT_STRING_SIZEcxx . . $ `Descent3/pilot_class.h:124:9`!];
1157 CurrentPilotNamecxx . . $ CurrentPilotName.(pilot_name);
1158
1159 snprintf(chat_whois_info, sizeof(chat_whois_info), "%s %s", sztrackeridcxx . . $ sztrackerid., pilot_name);
1160 chat_conn_time = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.();
1161 // DLLNewUIWindowSetFocusOnEditGadget(send_edit,main_wnd);
1162 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "About to connect...\n");
1163 do {
1164 chat_connected = ConnectToChatServercxx . . $ ConnectToChatServer(1abe9d7d0dbf60ed).(CHATTRACKERNAMEcxx . . $ `netcon/mtclient/mtclient.h:84:9`!, CHATPORTcxx . . $ `netcon/mtclient/mtclient.h:85:9`!, pilot_name, chat_whois_info);
1165 // chat_connected = ConnectToChatServer("plasma.outrage.com:7000",pilot_name,chat_whois_info);
1166 p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
1167 if (p) {
1168 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, p);
1169 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, "\x0a\x0d");
1170 }
1171 if ((chat_connected == -1) || ((DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - chat_conn_time) > CONNECT_PXO_TIMEOUTcxx . . $ `netcon/mtclient/mtclient.cpp:1011:9`!)) {
1172 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_CANTCONNECTcxx . . $ `netcon/mtclient/mtstrings.h:53:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
1173 // Go ahead to the game screen.
1174 // SearchMasterTrackerGameMenu();
1175 int rcode1 = SearchMasterTrackerGameMenucxx . . $ SearchMasterTrackerGameMenu(b126dc7c1de90089).();
1176 if (rcode1 == -1)
1177 rcode1 = 0;
1178 ret = rcode1;
1179 exit_menu = 1;
1180 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
1181 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1182 goto shutdownpxo;
1183 // gotcancel = 1;
1184 break;
1185 }
1186 res = DLLPollUIcxx . . $ DLLPollUI.();
1187 if (res == 99) {
1188 SearchMasterTrackerGameMenucxx . . $ SearchMasterTrackerGameMenu(b126dc7c1de90089).();
1189 gotcancel = 1;
1190 }
1191
1192 } while ((!gotcancel) && (chat_connected == 0));
1193 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
1194
1195 if (gotcancel) {
1196 ret = 0;
1197 exit_menu = 1;
1198 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1199 goto shutdownpxo;
1200 }
1201 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Connected to chat server!\n");
1202 if (!JoinNewLobbycxx . . $ JoinNewLobby(5c4306d8553b3696).("#autoselect")) {
1203 ret = 0;
1204 exit_menu = 1;
1205 }
1206 SendChatStringcxx . . $ SendChatString(223c544933887702).("/list");
1207 // DLLNewUIWindowSetFocusOnEditGadget(send_edit,main_wnd);
1208 while (!exit_menu) {
1209
1210 // Handle commands...
1211 cmd = GetChatCommandFromQueuecxx . . $ GetChatCommandFromQueue(c516c7a03995079d).();
1212 if (cmd) {
1213 switch (cmd->commandcxx . . $ Chat_command#command.) {
1214 case CC_USER_JOININGcxx . . $ `netcon/mtclient/chat_api.h:22:9`!:
1215 case CC_USER_LEAVINGcxx . . $ `netcon/mtclient/chat_api.h:23:9`!:
1216 case CC_KICKEDcxx . . $ `netcon/mtclient/chat_api.h:25:9`!:
1217 case CC_NICKCHANGEDcxx . . $ `netcon/mtclient/chat_api.h:26:9`!:
1218 // We will ignore all these things for now
1219 break;
1220 case CC_YOURCHANNELcxx . . $ `netcon/mtclient/chat_api.h:27:9`!: {
1221 strcpy(Ourlobbycxx . . $ Ourlobby., cmd->datacxx . . $ Chat_command#data.);
1222 char fmtlobbytext[200];
1223 char cleanlobby[50];
1224 memset(cleanlobby, 0, 29);
1225 strcpy(cleanlobby, Ourlobbycxx . . $ Ourlobby. + 1);
1226 for (int l = 0; l < 18; l++) {
1227 if (cleanlobby[l] == '_')
1228 cleanlobby[l] = ' ';
1229 // if(cleanlobby[l]==NULL) cleanlobby[l]= ' ';
1230 }
1231 snprintf(fmtlobbytext, sizeof(fmtlobbytext), TXT_PXO_YOUAREINLOBBYcxx . . $ `netcon/mtclient/mtstrings.h:98:9`!, cleanlobby);
1232
1233 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(lobby_text);
1234 DLLGadgetDestroycxx . . $ DLLGadgetDestroy.(lobby_txt_gadget);
1235 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(lobby_txt_gadget);
1236 lobby_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtlobbytext, UICOL_TEXT_AUXcxx . . $ `Descent3/newui.h:220:9`!);
1237 lobby_txt_gadget = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, lobby_text, 0, 450, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1238 // Now update the text on the bottom of the screen
1239 } break;
1240 case CC_DISCONNECTEDcxx . . $ `netcon/mtclient/chat_api.h:24:9`!:
1241 // Display a message box letting the user know we are disconnected.
1242 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_CHATDISCONNECTEDcxx . . $ `netcon/mtclient/mtstrings.h:97:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!,
1243 UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
1244 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1245 exit_menu = 1;
1246 break;
1247 default:
1248 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Warning: Received an unknown chat command!\n");
1249 break;
1250 }
1251 }
1252 if (exit_menu)
1253 break;
1254 p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
1255 if (p) {
1256 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, p);
1257 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, "\x0a\x0d");
1258 }
1259 // refresh the userlist
1260 if ((DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - lastlisttime) > CHAT_USER_REFRESH_TIMEcxx . . $ `netcon/mtclient/mtclient.cpp:1017:9`!) {
1261 lastlisttime = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.();
1262 p = GetChatUserListcxx . . $ GetChatUserList(41208ce6ca65dd58).();
1263 if (p) {
1264
1265 char *oldsel = DLLOldListGetItemcxx . . $ DLLOldListGetItem.(user_list, DLLOldListGetSelectedIndexcxx . . $ DLLOldListGetSelectedIndex.(user_list));
1266 oldseluser[0] = 0;
1267 if (oldsel)
1268 strcpy(oldseluser, oldsel);
1269 void *old_ti = nullptr; // = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME,GR_WHITE);
1270 // int oldsel = DLLOldListGetSelectedIndex(user_list);
1271 // void * old_ti =
1272
1273 DLLOldListRemoveAllcxx . . $ DLLOldListRemoveAll.(user_list);
1274 for (i = 0; i < CHAT_MAX_USERLISTcxx . . $ `netcon/mtclient/mtclient.cpp:1016:9`!; i++) {
1275 if (user_ti[i] != nullptr)
1276 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(user_ti[i]);
1277 user_ti[i] = nullptr;
1278 }
1279 char seps[] = " ";
1280 char *tokp;
1281 tokp = strtok((char *)p, seps);
1282 if (tokp) {
1283 for (i = 0; i < CHAT_MAX_USERLISTcxx . . $ `netcon/mtclient/mtclient.cpp:1016:9`!; i++) {
1284 user_ti[i] = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tokp, GR_WHITEcxx . . $ GR_WHITE.);
1285 DLLOldListAddItemcxx . . $ DLLOldListAddItem.(user_list, user_ti[i]);
1286 if (strcmp(tokp, oldseluser) == 0)
1287 old_ti = user_ti[i];
1288 tokp = strtok(nullptr, seps);
1289 if (!tokp)
1290 break;
1291 }
1292 if (old_ti)
1293 DLLOldListSelectItemcxx . . $ DLLOldListSelectItem.(user_list, old_ti);
1294 }
1295 }
1296 }
1297 // refresh the channellist
1298 if ((DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - lastchanlisttime) > CHAT_LIST_REFRESH_TIMEcxx . . $ `netcon/mtclient/mtclient.cpp:1018:9`!) {
1299 lastchanlisttime = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.();
1300 SendChatStringcxx . . $ SendChatString(223c544933887702).("/list");
1301 }
1302 p = GetChannelListcxx . . $ GetChannelList(41208ce6ca65dd58).();
1303 if (p) {
1304 char *pchanlist;
1305 pchanlist = (char *)DLLmem_malloccxx . . $ DLLmem_malloc.(strlen(p) + 1);
1306 memset(pchanlist, 0, strlen(p));
1307 strcpy(pchanlist, p);
1308 char *tokp = nullptr;
1309 char *nexttok;
1310 // tokp = strtok(pchanlist,seps);
1311 nexttok = strchr(pchanlist, '$');
1312 if (nexttok) {
1313 *nexttok = '\0';
1314 nexttok++;
1315 tokp = nexttok;
1316 if (nexttok) {
1317 nexttok = strchr(nexttok, '$');
1318 if (nexttok) {
1319 *nexttok = '\0';
1320 nexttok++;
1321 }
1322 }
1323 }
1324
1325 if (tokp) {
1326 // Remove all previous items
1327 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Refreshing channel list\n");
1328 // get the text of the currently selected channel.
1329 // char * oldsel = DLLOldListGetItem(chan_list,DLLOldListGetSelectedIndex(chan_list));
1330 //
1331 int selitem = DLLOldListGetSelectedIndexcxx . . $ DLLOldListGetSelectedIndex.(chan_list);
1332 char *oldsel = nullptr;
1333 oldselchan[0] = 0;
1334
1335 if ((selitem > 0) && (selitem < MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!)) {
1336 oldsel = chan_infocxx . . $ chan_info.[selitem].orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname.;
1337 strcpy(oldselchan, oldsel);
1338 }
1339
1340 DLLOldListRemoveAllcxx . . $ DLLOldListRemoveAll.(chan_list);
1341 for (i = 0; i < MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!; i++) {
1342 if (chan_ti[i] != nullptr)
1343 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(chan_ti[i]);
1344 chan_ti[i] = nullptr;
1345 }
1346 for (i = 0; i < MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!; i++) {
1347 char fmtchan[500];
1348 char *pcount = strchr(tokp, ' ');
1349 // if(pcount)
1350 {
1351 if (!pcount) {
1352 pcount = (char *)"";
1353 } else {
1354 // pcount++;
1355 *pcount = '\0';
1356 }
1357
1358 // 17 is the magic number we want all channel names to align with
1359 memset(chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name., 0, 19);
1360 strcpy(chan_infocxx . . $ chan_info.[i].orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname., tokp);
1361 strcpy(chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name., tokp + 1); // skip the #
1362 for (int l = 0; l < 18; l++) {
1363 if (chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.[l] == '_')
1364 chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.[l] = ' ';
1365 if (chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.[l] == '\0')
1366 chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.[l] = ' ';
1367 }
1368 pcount++;
1369 char *ptopic = pcount;
1370 while (isdigit(*ptopic)) {
1371 ptopic++;
1372 }
1373 *ptopic = '\0';
1374 ptopic++;
1375 // count
1376 strcpy(chan_infocxx . . $ chan_info.[i].countcxx . . $ $anonymous_type_c3e44a1656db32d5_0#count., pcount);
1377 // topic
1378 strcpy(chan_infocxx . . $ chan_info.[i].topiccxx . . $ $anonymous_type_c3e44a1656db32d5_0#topic., ptopic);
1379 // Now we want it formatted nicely.....
1380 char chan_name[100];
1381 memset(chan_name, ' ', 99);
1382 chan_name[99] = '\0';
1383 char count_list[10];
1384 memset(count_list, ' ', 9);
1385 count_list[9] = '\0';
1386
1387 memset(fmtchan, 0, 500);
1388
1389 int textx = 0;
1390 int charpos = 0;
1391 int endpos;
1392 #define LIST_ROW1cxx . . $ `netcon/mtclient/mtclient.cpp:1392:9`! 90
1393 #define LIST_ROW2cxx . . $ `netcon/mtclient/mtclient.cpp:1393:9`! 130
1394
1395 strcpy(chan_name, chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.);
1396 endpos = strlen(chan_infocxx . . $ chan_info.[i].namecxx . . $ $anonymous_type_c3e44a1656db32d5_0#name.);
1397 chan_name[endpos] = ' ';
1398
1399 strcpy(count_list, chan_infocxx . . $ chan_info.[i].countcxx . . $ $anonymous_type_c3e44a1656db32d5_0#count.);
1400 endpos = strlen(chan_infocxx . . $ chan_info.[i].countcxx . . $ $anonymous_type_c3e44a1656db32d5_0#count.);
1401 count_list[endpos] = ' ';
1402
1403 while (DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(fmtchan) < LIST_ROW1cxx . . $ `netcon/mtclient/mtclient.cpp:1392:9`!) {
1404 endpos = strlen(fmtchan);
1405 fmtchan[endpos] = chan_name[charpos];
1406 fmtchan[endpos + 1] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
1407 charpos++;
1408 }
1409 strcat(fmtchan, "\t\0");
1410 charpos = 0;
1411 while (DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(fmtchan) < LIST_ROW2cxx . . $ `netcon/mtclient/mtclient.cpp:1393:9`!) {
1412 endpos = strlen(fmtchan);
1413 fmtchan[endpos] = count_list[charpos];
1414 fmtchan[endpos + 1] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!;
1415 charpos++;
1416 }
1417 strcat(fmtchan, "\t\0");
1418
1419 strcat(fmtchan, chan_infocxx . . $ chan_info.[i].topiccxx . . $ $anonymous_type_c3e44a1656db32d5_0#topic.);
1420 // sprintf(fmtchan,"%.15s\t%s\t%s",chan_info[i].name,chan_info[i].count,chan_info[i].topic);
1421 chan_ti[i] = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtchan, GR_WHITEcxx . . $ GR_WHITE.);
1422 DLLOldListAddItemcxx . . $ DLLOldListAddItem.(chan_list, chan_ti[i]);
1423 if (strcmp(oldselchan, chan_infocxx . . $ chan_info.[i].orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname.) == 0) {
1424 DLLOldListSelectItemcxx . . $ DLLOldListSelectItem.(chan_list, chan_ti[i]);
1425 }
1426 }
1427 tokp = nexttok;
1428 if (nexttok) {
1429 nexttok = strchr(nexttok, '$');
1430 if (nexttok) {
1431 *nexttok = '\0';
1432 nexttok++;
1433 }
1434 }
1435 // tokp = strtok(NULL,seps);
1436 if (!tokp)
1437 break;
1438 }
1439 }
1440 DLLmem_freecxx . . $ DLLmem_free.(pchanlist);
1441 }
1442
1443 res = DLLPollUIcxx . . $ DLLPollUI.();
1444 if (res != -1) {
1445 // DLLNewUIWindowSetFocusOnEditGadget(send_edit,main_wnd);
1446 }
1447 // handle all UI results.
1448 switch (res) {
1449 case -1:
1450 break;
1451 case 3:
1452 // Join Mastertracker game
1453 {
1454 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending Mastertracker game list request.\n");
1455 RequestGameListcxx . . $ RequestGameList(49f6e7a06ebc5aa8).();
1456 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Calling SearchMasterTrackerGameMenu().\n");
1457 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1458 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
1459 int gamestart = SearchMasterTrackerGameMenucxx . . $ SearchMasterTrackerGameMenu(b126dc7c1de90089).();
1460 if (gamestart == 1) {
1461 exit_menu = 1;
1462 ret = 1;
1463 } else if (gamestart == 0) {
1464 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1465 } else if (gamestart == -1) {
1466 exit_menu = 1;
1467 ret = 0;
1468 }
1469 break;
1470 }
1471
1472 case 4:
1473
1474 // Start Mastertracker game
1475 // Start a netgame
1476 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1477 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
1478 if (StartMultiplayerGameMenucxx . . $ StartMultiplayerGameMenu(b126dc7c1de90089).()) {
1479 exit_menu = 1;
1480 ret = 1;
1481 } else {
1482 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1483 }
1484 break;
1485 case 5:
1486 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1487 exit_menu = 1;
1488 ret = 0;
1489 break;
1490 case 6:
1491 // Send a private message
1492 // Create new dialog box, prompt for user and message, then send message
1493 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending private Message\n");
1494 // Get the currently selected pilot name
1495 strcpy(selpilot, DLLOldListGetItemcxx . . $ DLLOldListGetItem.(user_list, DLLOldListGetSelectedIndexcxx . . $ DLLOldListGetSelectedIndex.(user_list)));
1496 SendWhispercxx . . $ SendWhisper(fb58d2e09a2a1ce6).(selpilot);
1497 break;
1498 case 7:
1499 // Join a private channel
1500 if (!JoinPrivateLobbycxx . . $ JoinPrivateLobby(b126dc7c1de90089).()) {
1501 ret = 0;
1502 exit_menu = 0;
1503 }
1504 break;
1505 case 8:
1506 // Join a channel
1507 // unused
1508 break;
1509 case 9:
1510 // Find a pilot
1511 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Finding a pilot\n");
1512 FindPilotcxx . . $ FindPilot(b126dc7c1de90089).();
1513 break;
1514 case 10:
1515 // Get pilot stats
1516 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Getting pilot statistics\n");
1517 strcpy(selpilot, DLLOldListGetItemcxx . . $ DLLOldListGetItem.(user_list, DLLOldListGetSelectedIndexcxx . . $ DLLOldListGetSelectedIndex.(user_list)));
1518 GetPilotStatscxx . . $ GetPilotStats(5c4306d8553b3696).(selpilot);
1519 break;
1520 case 11: {
1521 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending Mastertracker game list request.\n");
1522 RequestGameListcxx . . $ RequestGameList(49f6e7a06ebc5aa8).();
1523 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Calling SearchMasterTrackerGameMenu().\n");
1524 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1525 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
1526 int gamestart = SearchMasterTrackerGameMenucxx . . $ SearchMasterTrackerGameMenu(b126dc7c1de90089).();
1527 if (gamestart == 1) {
1528 exit_menu = 1;
1529 ret = 1;
1530 } else if (gamestart == 0) {
1531 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1532 } else if (gamestart == -1) {
1533 exit_menu = 1;
1534 ret = 0;
1535 }
1536 break;
1537 } break;
1538 case 14:
1539 // Channel list box
1540 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Joining new public channel\n");
1541 {
1542 int selitem = 0;
1543 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Joining new public channel\n");
1544 selitem = DLLOldListGetSelectedIndexcxx . . $ DLLOldListGetSelectedIndex.(chan_list);
1545 if (!JoinNewLobbycxx . . $ JoinNewLobby(5c4306d8553b3696).(chan_infocxx . . $ chan_info.[selitem].orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname.)) {
1546 ret = 0;
1547 exit_menu = 0;
1548 } else {
1549 char txtmessage[200];
1550 char cleanlobby[50];
1551 memset(cleanlobby, 0, 29);
1552 strcpy(cleanlobby, chan_infocxx . . $ chan_info.[selitem].orignamecxx . . $ $anonymous_type_c3e44a1656db32d5_0#origname. + 1);
1553 for (int l = 0; l < 18; l++) {
1554 if (cleanlobby[l] == '_')
1555 cleanlobby[l] = ' ';
1556 }
1557 snprintf(txtmessage, sizeof(txtmessage), TXT_PXO_INNEWLOBBYcxx . . $ `netcon/mtclient/mtstrings.h:71:9`!, cleanlobby);
1558 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, txtmessage, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
1559 }
1560 }
1561
1562 break;
1563 case 15:
1564 // Send a message
1565 DLLOldEditGetTextcxx . . $ DLLOldEditGetText.(send_edit, sendline, MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`! - 1);
1566 if (*sendline == '\0') {
1567 break;
1568 }
1569 DLLOldEditSetTextcxx . . $ DLLOldEditSetText.(send_edit, "");
1570 p = SendChatStringcxx . . $ SendChatString(223c544933887702).(sendline);
1571 if (p) {
1572 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, p);
1573 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, "\x0a\x0d");
1574 }
1575 DLLNewUIWindowSetFocusOnEditGadgetcxx . . $ DLLNewUIWindowSetFocusOnEditGadget.(send_edit, main_wnd);
1576 break;
1577 }
1578 }
1579 shutdownpxo:
1580
1581 DLLNewUIWindowDestroycxx . . $ DLLNewUIWindowDestroy.(main_wnd);
1582 DLLOldListRemoveAllcxx . . $ DLLOldListRemoveAll.(chan_list);
1583 DLLOldListRemoveAllcxx . . $ DLLOldListRemoveAll.(user_list);
1584 for (i = 0; i < MAX_CHAT_CHANNELScxx . . $ `netcon/mtclient/mtclient.cpp:1013:9`!; i++) {
1585 if (chan_ti[i] != nullptr)
1586 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(chan_ti[i]);
1587 chan_ti[i] = nullptr;
1588 }
1589 for (i = 0; i < CHAT_MAX_USERLISTcxx . . $ `netcon/mtclient/mtclient.cpp:1016:9`!; i++) {
1590 if (user_ti[i] != nullptr)
1591 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(user_ti[i]);
1592 user_ti[i] = nullptr;
1593 }
1594 *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha. = oldalpha;
1595 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Disconnecting from PXO.\n");
1596 DisconnectFromChatServercxx . . $ DisconnectFromChatServer(49f6e7a06ebc5aa8).();
1597 ChatStartedcxx . . $ ChatStarted. = 0;
1598 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Disconnected.\n");
1599 DLLToggleUICallbackcxx . . $ DLLToggleUICallback.(1);
1600
1601 // Delete all those items we created
1602 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
1603 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(priv_hs);
1604 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(join_lobby_hs);
1605 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(join_chan_hs);
1606 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(find_hs);
1607 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(get_pilot_hs);
1608 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(game_hs);
1609 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(enter_hs);
1610 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(user_list);
1611 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(chan_list);
1612 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(send_edit);
1613 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(console_item);
1614 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(lobby_txt_gadget);
1615
1616 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
1617 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(lobby_text);
1618 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_on_text);
1619 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_off_text);
1620 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_on_text);
1621 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_off_text);
1622 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(priv_msg_on_text);
1623 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(priv_msg_off_text);
1624 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_lobby_on_text);
1625 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_lobby_off_text);
1626 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_chan_on_text);
1627 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_chan_off_text);
1628 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(find_pilot_on_text);
1629 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(find_pilot_off_text);
1630 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(get_pilot_on_text);
1631 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(get_pilot_off_text);
1632 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(game_on_text);
1633 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(game_off_text);
1634 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(blank_text);
1635 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(send_on_text);
1636 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(send_off_text);
1637 return ret;
1638 }
1639
1640 #define SORT_GAMENAMEcxx . . $ `netcon/mtclient/mtclient.cpp:1640:9`! 30
1641 #define SORT_GAMETYPEcxx . . $ `netcon/mtclient/mtclient.cpp:1641:9`! 31
1642 #define SORT_MISSIONcxx . . $ `netcon/mtclient/mtclient.cpp:1642:9`! 32
1643 #define SORT_LEVELcxx . . $ `netcon/mtclient/mtclient.cpp:1643:9`! 33
1644 #define SORT_PLAYERScxx . . $ `netcon/mtclient/mtclient.cpp:1644:9`! 34
1645 #define SORT_PINGcxx . . $ `netcon/mtclient/mtclient.cpp:1645:9`! 35
1646
1647 int sort_typecxx . . $ sort_type.;
1648
1649 bool invert_sort_gamenamecxx . . $ invert_sort_gamename. = true;
1650 bool invert_sort_gametypecxx . . $ invert_sort_gametype. = true;
1651 bool invert_sort_missioncxx . . $ invert_sort_mission. = true;
1652 bool invert_sort_levelscxx . . $ invert_sort_levels. = true;
1653 bool invert_sort_playerscxx . . $ invert_sort_players. = true;
1654 bool invert_sort_pingcxx . . $ invert_sort_ping. = true;
1655
1656 int net_game_comparecxx . . $ net_game_compare(9148c8c3ff42c9d8).(const void *arg1, const void *arg2) {
1657
1658 network_gamecxx . . $ network_game# *net1 = (network_gamecxx . . $ network_game# *)arg1;
1659 network_gamecxx . . $ network_game# *net2 = (network_gamecxx . . $ network_game# *)arg2;
1660
1661 if ((!arg1) || (!arg2))
1662 return 0;
1663
1664 switch (sort_typecxx . . $ sort_type.) {
1665 case SORT_GAMENAMEcxx . . $ `netcon/mtclient/mtclient.cpp:1640:9`!: {
1666 return stricmpcxx . . $ `linux/linux_fix.h:43:9`!(net1->name, net2->name);
1667 } break;
1668 case SORT_GAMETYPEcxx . . $ `netcon/mtclient/mtclient.cpp:1641:9`!: {
1669 return stricmpcxx . . $ `linux/linux_fix.h:43:9`!(net1->scriptname, net2->scriptname);
1670 } break;
1671 case SORT_MISSIONcxx . . $ `netcon/mtclient/mtclient.cpp:1642:9`!: {
1672 return stricmpcxx . . $ `linux/linux_fix.h:43:9`!(net1->mission_name, net2->mission_name);
1673 } break;
1674 case SORT_LEVELcxx . . $ `netcon/mtclient/mtclient.cpp:1643:9`!: {
1675 if (net1->level_numcxx . . $ network_game#level_num. == net2->level_numcxx . . $ network_game#level_num.)
1676 return 0;
1677 else
1678 return (net1->level_numcxx . . $ network_game#level_num. - net2->level_numcxx . . $ network_game#level_num.);
1679 } break;
1680 case SORT_PLAYERScxx . . $ `netcon/mtclient/mtclient.cpp:1644:9`!: {
1681 if (net1->curr_num_playerscxx . . $ network_game#curr_num_players. == net2->curr_num_playerscxx . . $ network_game#curr_num_players.)
1682 return 0;
1683 else
1684 return (net1->curr_num_playerscxx . . $ network_game#curr_num_players. - net2->curr_num_playerscxx . . $ network_game#curr_num_players.);
1685 } break;
1686 case SORT_PINGcxx . . $ `netcon/mtclient/mtclient.cpp:1645:9`!: {
1687 if (net1->server_response_timecxx . . $ network_game#server_response_time. == net2->server_response_timecxx . . $ network_game#server_response_time.)
1688 return 0;
1689 else
1690 return (net1->server_response_timecxx . . $ network_game#server_response_time. < net2->server_response_timecxx . . $ network_game#server_response_time.) ? 1 : -1;
1691 } break;
1692 }
1693 return 0;
1694 }
1695
1696 void ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(void *lb, int type, bool invert) {
1697
1698 if (!*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.) {
1699 return;
1700 }
1701 // Make a copy of the games list
1702 network_gamecxx . . $ network_game# *net_game_copy;
1703 net_game_copy = (network_gamecxx . . $ network_game# *)DLLmem_malloccxx . . $ DLLmem_malloc.(sizeof(network_gamecxx . . $ network_game#) * (*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.));
1704 memcpy(net_game_copy, &DLLNetwork_gamescxx . . $ DLLNetwork_games.[0], sizeof(network_gamecxx . . $ network_game#) * (*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.));
1705
1706 // Set the sort type
1707 sort_typecxx . . $ sort_type. = type;
1708
1709 // Do the actual sort
1710 qsort(net_game_copy, *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known., sizeof(network_gamecxx . . $ network_game#), net_game_comparecxx . . $ net_game_compare(9148c8c3ff42c9d8).);
1711
1712 // Now populate the list in the order sorted...
1713 NextGameItemNocxx . . $ NextGameItemNo. = 0;
1714 DLLListRemoveAllcxx . . $ DLLListRemoveAll.(lb);
1715 int i;
1716 if (!invert) {
1717 for (i = 0; i < *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; i++) {
1718 int pxo_item = GetPXOItemByHandlecxx . . $ GetPXOItemByHandle(4c679297bf94b9eb).(net_game_copy[i].handlecxx . . $ network_game#handle.);
1719 if (pxo_item != -1) {
1720 PXOGamelistcxx . . $ PXOGamelist.[pxo_item].lb_nocxx . . $ s_pxo_game_list#lb_no. = NextGameItemNocxx . . $ NextGameItemNo.;
1721 NextGameItemNocxx . . $ NextGameItemNo.++;
1722 DLLListAddItemcxx . . $ DLLListAddItem.(lb, PXOGamelistcxx . . $ PXOGamelist.[pxo_item].ticxx . . $ s_pxo_game_list#ti.);
1723 }
1724 }
1725 } else {
1726 for (i = *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; i >= 0; i--) {
1727 int pxo_item = GetPXOItemByHandlecxx . . $ GetPXOItemByHandle(4c679297bf94b9eb).(net_game_copy[i].handlecxx . . $ network_game#handle.);
1728 if (pxo_item != -1) {
1729 PXOGamelistcxx . . $ PXOGamelist.[pxo_item].lb_nocxx . . $ s_pxo_game_list#lb_no. = NextGameItemNocxx . . $ NextGameItemNo.;
1730 NextGameItemNocxx . . $ NextGameItemNo.++;
1731 DLLListAddItemcxx . . $ DLLListAddItem.(lb, PXOGamelistcxx . . $ PXOGamelist.[pxo_item].ticxx . . $ s_pxo_game_list#ti.);
1732 }
1733 }
1734 }
1735
1736 DLLmem_freecxx . . $ DLLmem_free.(net_game_copy);
1737 }
1738
1739 #define GET_MT_GAME_TIMEcxx . . $ `netcon/mtclient/mtclient.cpp:1739:9`! 5
1740 #define REQ_GAME_LIST_INTERVALcxx . . $ `netcon/mtclient/mtclient.cpp:1740:9`! 8
1741
1742 #define GET_INFO_IDcxx . . $ `netcon/mtclient/mtclient.cpp:1742:9`! 50
1743
1744 int SearchMasterTrackerGameMenucxx . . $ SearchMasterTrackerGameMenu(b126dc7c1de90089).() {
1745
1746 int exit_menu = 0;
1747 int cury = 40;
1748 int ret = 0;
1749 int res;
1750
1751 game_listcxx . . $ game_list# *games = nullptr;
1752 int i = 0;
1753 float last_req_time;
1754 char selgame[200];
1755 void *selti = nullptr;
1756 void *return_text_on = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_RETURNTOCHATcxx . . $ `netcon/mtclient/mtstrings.h:100:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1757 void *return_text_off = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_RETURNTOCHATcxx . . $ `netcon/mtclient/mtstrings.h:100:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1758 void *game_head_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GAMELISTHDRcxx . . $ `netcon/mtclient/mtstrings.h:27:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
1759 void *exit_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_EXITcxx . . $ `netcon/mtclient/mtstrings.h:29:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1760 void *exit_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_EXITcxx . . $ `netcon/mtclient/mtstrings.h:29:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1761 void *join_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINSELcxx . . $ `netcon/mtclient/mtstrings.h:30:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1762 void *join_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINSELcxx . . $ `netcon/mtclient/mtstrings.h:30:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1763 void *start_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_STARTNEWcxx . . $ `netcon/mtclient/mtstrings.h:31:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1764 void *start_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_STARTNEWcxx . . $ `netcon/mtclient/mtstrings.h:31:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1765
1766 void *gname_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GAMENAME2cxx . . $ `netcon/mtclient/mtstrings.h:114:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1767 void *gname_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GAMENAME2cxx . . $ `netcon/mtclient/mtstrings.h:114:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1768 void *gtype_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GAMETYPEcxx . . $ `netcon/mtclient/mtstrings.h:115:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1769 void *gtype_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GAMETYPEcxx . . $ `netcon/mtclient/mtstrings.h:115:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1770 void *msn_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_MISSIONcxx . . $ `netcon/mtclient/mtstrings.h:116:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1771 void *msn_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_MISSIONcxx . . $ `netcon/mtclient/mtstrings.h:116:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1772 void *lvl_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_LEVELcxx . . $ `netcon/mtclient/mtstrings.h:117:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1773 void *lvl_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_LEVELcxx . . $ `netcon/mtclient/mtstrings.h:117:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1774 void *plrs_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PLAYERScxx . . $ `netcon/mtclient/mtstrings.h:118:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1775 void *plrs_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PLAYERScxx . . $ `netcon/mtclient/mtstrings.h:118:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1776 void *ping_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PINGcxx . . $ `netcon/mtclient/mtstrings.h:119:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1777 void *ping_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PINGcxx . . $ `netcon/mtclient/mtstrings.h:119:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1778
1779 char fmt_textstr[200];
1780 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 28);
1781 void *default_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1782 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 28);
1783
1784 void *default_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1785 void *game_hdr_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_GAME_HDRcxx . . $ `netcon/mtclient/mtstrings.h:107:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
1786
1787 void *info_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).("", UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1788 void *info_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).("", UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1789
1790 memset(PXOGamelistcxx . . $ PXOGamelist., 0, sizeof(PXOGamelistcxx . . $ PXOGamelist.));
1791 NextGameItemNocxx . . $ NextGameItemNo. = 0;
1792
1793 void *return_hs;
1794 void *set_dft_hs;
1795
1796 void *net_game_txt_items[MAX_NET_GAMEScxx . . $ `netcon/includes/con_dll.h:710:9`!];
1797 int a;
1798 bool hardexit = false;
1799 for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/includes/con_dll.h:710:9`!; a++)
1800 net_game_txt_items[a] = nullptr;
1801 uint8_tcxx . . $ uint8_t# oldalpha = *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha.;
1802
1803 DLLSetScreenModecxx . . $ DLLSetScreenMode.(SM_MENUcxx . . $ SM_MENU.);
1804 *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha. = 255;
1805
1806 void *main_wnd = DLLNewUIWindowCreatecxx . . $ DLLNewUIWindowCreate.(0, 0, 640, 480, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`!);
1807
1808 void *screen_header = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, game_hdr_text, 5, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1809 cury += 30;
1810 void *start_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 7, KEY_Scxx . . $ `ddio/ddio_common.h:247:9`!, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1811 cury += 30; // 25;
1812
1813 int setdfty;
1814
1815 return_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 8, KEY_Rcxx . . $ `ddio/ddio_common.h:246:9`!, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1816 cury += 20;
1817
1818 if (Bypass_chatcxx . . $ Bypass_chat.) {
1819
1820 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 29);
1821 default_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1822 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 29);
1823 default_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1824 setdfty = cury;
1825 set_dft_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 9, 0, default_off_text, default_on_text, 490, cury, 300, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1826 cury += 20;
1827 } else {
1828 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 28);
1829 default_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
1830 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 28);
1831 default_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
1832 setdfty = cury;
1833 set_dft_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 9, 0, default_off_text, default_on_text, 490, cury, 300, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
1834 cury += 30;
1835 }
1836 // void * game_head = DLLTextCreate(main_wnd,game_head_text,45,cury,0);
1837
1838 void *gname_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, SORT_GAMENAMEcxx . . $ `netcon/mtclient/mtclient.cpp:1640:9`!, 0, gname_off_text, gname_on_text, 44, cury,
1839 DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(TXT_PXO_GAMENAME2cxx . . $ `netcon/mtclient/mtstrings.h:114:9`!) + 1, 15, 0);
1840 void *gtype_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, SORT_GAMETYPEcxx . . $ `netcon/mtclient/mtclient.cpp:1641:9`!, 0, gtype_off_text, gtype_on_text, 215, cury,
1841 DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(TXT_PXO_GAMETYPEcxx . . $ `netcon/mtclient/mtstrings.h:115:9`!) + 1, 15, 0);
1842 void *msn_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, SORT_MISSIONcxx . . $ `netcon/mtclient/mtclient.cpp:1642:9`!, 0, msn_off_text, msn_on_text, 320, cury,
1843 DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(TXT_PXO_MISSIONcxx . . $ `netcon/mtclient/mtstrings.h:116:9`!) + 1, 15, 0);
1844 void *lvl_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, SORT_LEVELcxx . . $ `netcon/mtclient/mtclient.cpp:1643:9`!, 0, lvl_off_text, lvl_on_text, 428, cury,
1845 DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(TXT_PXO_LEVELcxx . . $ `netcon/mtclient/mtstrings.h:117:9`!) + 1, 15, 0);
1846 void *players_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, SORT_PLAYERScxx . . $ `netcon/mtclient/mtclient.cpp:1644:9`!, 0, plrs_off_text, plrs_on_text, 479, cury,
1847 DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(TXT_PXO_PLAYERScxx . . $ `netcon/mtclient/mtstrings.h:118:9`!) + 1, 15, 0);
1848 void *ping_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, SORT_PINGcxx . . $ `netcon/mtclient/mtclient.cpp:1645:9`!, 0, ping_off_text, ping_on_text, 549, cury,
1849 DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.(TXT_PXO_PINGcxx . . $ `netcon/mtclient/mtstrings.h:119:9`!) + 1, 15, 0);
1850
1851 cury += 15;
1852 void *game_list = DLLListCreatecxx . . $ DLLListCreate.(main_wnd, 6, 10, cury, 600, 230, UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | UILB_NOSORTcxx . . $ `ui/ui.h:356:9`!);
1853 cury += 260;
1854 void *join_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 6, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, join_off_text, join_on_text, 100, cury, 130, 15, 0);
1855 void *exit_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 5, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, exit_off_text, exit_on_text, 400, cury, 70, 15, 0);
1856
1857 void *info_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, GET_INFO_IDcxx . . $ `netcon/mtclient/mtclient.cpp:1742:9`!, KEY_Icxx . . $ `ddio/ddio_common.h:237:9`!, info_off_text, info_on_text, 1, 1, 1, 1, 0);
1858
1859 DLLNewUIWindowLoadBackgroundImagecxx . . $ DLLNewUIWindowLoadBackgroundImage.(main_wnd, "pxogame.ogf");
1860 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1861 *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known. = 0;
1862 int lastgamesfound = 0;
1863 int itemp;
1864 last_req_time = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.();
1865 RequestGameListcxx . . $ RequestGameList(49f6e7a06ebc5aa8).();
1866 *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known. = 0;
1867 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Waiting for Mastertracker response.\n");
1868
1869 // Menu loop
1870 while (!exit_menu) {
1871 if (ChatStartedcxx . . $ ChatStarted.)
1872 const char *p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
1873
1874 DLLDescentDefercxx . . $ DLLDescentDefer.();
1875 IdleGameTrackercxx . . $ IdleGameTracker(49f6e7a06ebc5aa8).();
1876 games = GetGameListcxx . . $ GetGameList(ba3d2dc53e6909a7).();
1877 res = DLLPollUIcxx . . $ DLLPollUI.();
1878 if (games) {
1879 // DLLmprintf(0,"GetGameList() returned a gamedata.\n");
1880 for (i = 0; i < (MAX_GAME_LISTS_PER_PACKETcxx . . $ `netcon/mtclient/mtgametrack.h:116:9`! * 4); i++) {
1881 // char *gn = games->game_name[i];
1882 if (games->game_typecxx . . $ game_list#game_type. == GT_D3TNGcxx . . $ `netcon/mtclient/mtgametrack.h:141:9`!) {
1883 DLLSearchForGamesPXOcxx . . $ DLLSearchForGamesPXO.(games->game_servercxx . . $ game_list#game_server.[i], games->game_portcxx . . $ game_list#game_port.[i]);
1884 } else {
1885 if (games->game_servercxx . . $ game_list#game_server.[i] && games->game_portcxx . . $ game_list#game_port.[i]) {
1886 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Bad bad bad!!!!\n");
1887 DLLSearchForGamesPXOcxx . . $ DLLSearchForGamesPXO.(games->game_servercxx . . $ game_list#game_server.[i], games->game_portcxx . . $ game_list#game_port.[i]);
1888 }
1889 }
1890 }
1891 games = nullptr;
1892 }
1893 if ((DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - last_req_time) > REQ_GAME_LIST_INTERVALcxx . . $ `netcon/mtclient/mtclient.cpp:1740:9`!) {
1894 last_req_time = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.();
1895 RequestGameListcxx . . $ RequestGameList(49f6e7a06ebc5aa8).();
1896 *DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed. = true;
1897 int selno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(game_list);
1898 if (selno >= 0) {
1899 strcpy(selgame, DLLNetwork_gamescxx . . $ DLLNetwork_games.[selno].namecxx . . $ network_game#name.);
1900 } else {
1901 selgame[0] = '\0';
1902 }
1903 }
1904 DLLUpdateAndPackGameListcxx . . $ DLLUpdateAndPackGameList.();
1905
1906 if ((itemp = DLLSearchForGamesPXOcxx . . $ DLLSearchForGamesPXO.(0, 0)) || *DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed.) {
1907 UpdateGamelistcxx . . $ UpdateGamelist(5d22bdacc48458e8).(game_list);
1908 }
1909
1910 if (res == -1) {
1911 continue;
1912 }
1913 // handle all UI results.
1914 switch (res) {
1915
1916 case 5:
1917 // Hard exit. Don't return to chat if in bypass chat mode
1918 hardexit = true;
1919 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1920 exit_menu = 1;
1921 break;
1922 case 6:
1923 // Double click on listbox, or join selected hit.
1924 if (*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.) {
1925 // Get the appropriate game address
1926 int gameno;
1927 gameno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(game_list);
1928
1929 int gameid = GetGameByLBNocxx . . $ GetGameByLBNo(7864480464b09eea).(gameno);
1930
1931 if (gameid == -1)
1932 break;
1933 gameno = gameid;
1934
1935 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Selected item is %s\n", DLLNetwork_games[gameno].name);
1936
1937 network_addresscxx . . $ network_address# s_address;
1938 s_address.connection_typecxx . . $ network_address#connection_type. = NP_TCPcxx . . $ NP_TCP.;
1939 memcpy(&s_address.addresscxx . . $ network_address#address., &DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].addrcxx . . $ network_game#addr., sizeof(network_addresscxx . . $ network_address#));
1940 s_address.portcxx . . $ network_address#port. = DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].addrcxx . . $ network_game#addr..portcxx . . $ network_address#port.;
1941 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
1942 DLLMultiStartClientcxx . . $ DLLMultiStartClient.(nullptr);
1943
1944 if (DLLDoPlayerMouselookCheckcxx . . $ DLLDoPlayerMouselookCheck.(DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].flagscxx . . $ network_game#flags.)) {
1945 char script_file[500];
1946 snprintf(script_file, sizeof(script_file), "%s.d3m", DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].scriptnamecxx . . $ network_game#scriptname.);
1947 if (DLLCheckGetD3Mcxx . . $ DLLCheckGetD3M.(script_file)) {
1948 // Check to see if this mission exists!
1949 if (DLLmsn_CheckGetMissioncxx . . $ DLLmsn_CheckGetMission.(&s_address, DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].missioncxx . . $ network_game#mission.)) {
1950 if ((DLLTryToJoinServercxx . . $ DLLTryToJoinServer.(&s_address))) {
1951 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Menu: Game joined!\n");
1952 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1953 exit_menu = 1;
1954 ret = 1;
1955 } else {
1956 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1957 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1958 }
1959 }
1960 }
1961 }
1962 } else {
1963 DLLListRemoveAllcxx . . $ DLLListRemoveAll.(game_list);
1964 last_req_time = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - (REQ_GAME_LIST_INTERVALcxx . . $ `netcon/mtclient/mtclient.cpp:1740:9`! * 2);
1965 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_ERRORcxx . . $ `netcon/mtclient/mtstrings.h:102:9`!, TXT_PXO_NO_GAMEScxx . . $ `netcon/mtclient/mtstrings.h:108:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
1966 }
1967 break;
1968 case 7:
1969 // Start a new game
1970
1971 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1972 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
1973 if (StartMultiplayerGameMenucxx . . $ StartMultiplayerGameMenu(b126dc7c1de90089).()) {
1974 exit_menu = 1;
1975 ret = 1;
1976 } else {
1977 DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd);
1978 }
1979 break;
1980 case 8:
1981 // We just want to return to chat, not totally exit PXO
1982 DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd);
1983 exit_menu = 1;
1984 ret = 0;
1985 break;
1986 case 9:
1987 // Change the current selection
1988 {
1989 int bypass_chat_curr_val;
1990 DLLDatabaseReadIntcxx . . $ DLLDatabaseReadInt.("BypassChat", &bypass_chat_curr_val);
1991
1992 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(default_on_text);
1993 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(default_off_text);
1994 DLLGadgetDestroycxx . . $ DLLGadgetDestroy.(set_dft_hs);
1995 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(set_dft_hs);
1996 if (bypass_chat_curr_val) {
1997 bypass_chat_curr_val = 0;
1998 DLLDatabaseWriteIntcxx . . $ DLLDatabaseWriteInt.("BypassChat", bypass_chat_curr_val);
1999 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 28);
2000 default_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2001 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 28);
2002 default_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2003 set_dft_hs =
2004 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 9, 0, default_off_text, default_on_text, 490, setdfty, 300, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2005 } else {
2006 bypass_chat_curr_val = 1;
2007 DLLDatabaseWriteIntcxx . . $ DLLDatabaseWriteInt.("BypassChat", bypass_chat_curr_val);
2008 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 29);
2009 default_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2010 snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULTcxx . . $ `netcon/mtclient/mtstrings.h:99:9`!, 29);
2011 default_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmt_textstr, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2012 set_dft_hs =
2013 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 9, 0, default_off_text, default_on_text, 490, setdfty, 300, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2014 }
2015 }
2016 break;
2017 case GET_INFO_IDcxx . . $ `netcon/mtclient/mtclient.cpp:1742:9`!: {
2018 if (*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.) {
2019 int gameno;
2020 gameno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(game_list);
2021 int gameid = GetGameByLBNocxx . . $ GetGameByLBNo(7864480464b09eea).(gameno);
2022 gameno = gameid;
2023 if (gameid == -1)
2024 break;
2025 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Selected item is %s\n", DLLNetwork_games[gameno].name);
2026 DLLShowNetgameInfocxx . . $ DLLShowNetgameInfo.(&DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno]);
2027 }
2028 } break;
2029
2030 case SORT_GAMENAMEcxx . . $ `netcon/mtclient/mtclient.cpp:1640:9`!: {
2031 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sorting by game name.\n");
2032 invert_sort_gamenamecxx . . $ invert_sort_gamename. = !invert_sort_gamenamecxx . . $ invert_sort_gamename.;
2033 ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(game_list, res, invert_sort_gamenamecxx . . $ invert_sort_gamename.);
2034 } break;
2035 case SORT_GAMETYPEcxx . . $ `netcon/mtclient/mtclient.cpp:1641:9`!: {
2036 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sorting by game type.\n");
2037 invert_sort_gametypecxx . . $ invert_sort_gametype. = !invert_sort_gametypecxx . . $ invert_sort_gametype.;
2038 ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(game_list, res, invert_sort_gametypecxx . . $ invert_sort_gametype.);
2039 } break;
2040 case SORT_MISSIONcxx . . $ `netcon/mtclient/mtclient.cpp:1642:9`!: {
2041 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sorting by mission.\n");
2042 invert_sort_missioncxx . . $ invert_sort_mission. = !invert_sort_missioncxx . . $ invert_sort_mission.;
2043 ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(game_list, res, invert_sort_missioncxx . . $ invert_sort_mission.);
2044 } break;
2045 case SORT_LEVELcxx . . $ `netcon/mtclient/mtclient.cpp:1643:9`!: {
2046 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sorting by level.\n");
2047 invert_sort_levelscxx . . $ invert_sort_levels. = !invert_sort_levelscxx . . $ invert_sort_levels.;
2048 ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(game_list, res, invert_sort_levelscxx . . $ invert_sort_levels.);
2049 } break;
2050 case SORT_PLAYERScxx . . $ `netcon/mtclient/mtclient.cpp:1644:9`!: {
2051 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sorting by players.\n");
2052 invert_sort_playerscxx . . $ invert_sort_players. = !invert_sort_playerscxx . . $ invert_sort_players.;
2053 ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(game_list, res, invert_sort_playerscxx . . $ invert_sort_players.);
2054 } break;
2055 case SORT_PINGcxx . . $ `netcon/mtclient/mtclient.cpp:1645:9`!: {
2056 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sorting by ping.\n");
2057 invert_sort_pingcxx . . $ invert_sort_ping. = !invert_sort_pingcxx . . $ invert_sort_ping.;
2058 ResortGameListcxx . . $ ResortGameList(457e125b06d2cde5).(game_list, res, invert_sort_pingcxx . . $ invert_sort_ping.);
2059 } break;
2060 }
2061 }
2062 DLLNewUIWindowDestroycxx . . $ DLLNewUIWindowDestroy.(main_wnd);
2063
2064 *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha. = oldalpha;
2065
2066 // Look for items that we need to remove
2067 for (i = 0; i < MAX_GAMELIST_ITEMScxx . . $ `netcon/mtclient/mtclient.cpp:466:9`!; i++) {
2068 if (PXOGamelistcxx . . $ PXOGamelist.[i].usedcxx . . $ s_pxo_game_list#used.) {
2069 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(PXOGamelistcxx . . $ PXOGamelist.[i].ticxx . . $ s_pxo_game_list#ti.);
2070 PXOGamelistcxx . . $ PXOGamelist.[i].usedcxx . . $ s_pxo_game_list#used. = false;
2071 }
2072 }
2073
2074 /*
2075 for(a=0;a<MAX_NET_GAMES;a++)
2076 if(net_game_txt_items[a])
2077 DLLRemoveUITextItem(net_game_txt_items[a]);
2078 */
2079
2080 // Clean up
2081 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
2082 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(game_list);
2083 // DLLDeleteUIItem(game_head);
2084 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(exit_hs);
2085 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(join_hs);
2086 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(start_hs);
2087 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(screen_header);
2088 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(set_dft_hs);
2089 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(return_hs);
2090 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(info_hs);
2091 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(gname_hs);
2092 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(gtype_hs);
2093 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(msn_hs);
2094 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(lvl_hs);
2095 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(players_hs);
2096 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(ping_hs);
2097
2098 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(info_on_text);
2099 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(info_off_text);
2100 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(game_hdr_text);
2101 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(return_text_on);
2102 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(return_text_off);
2103 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(game_head_text);
2104 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_on_text);
2105 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_off_text);
2106 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_on_text);
2107 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_off_text);
2108 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_on_text);
2109 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_off_text);
2110 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(default_on_text);
2111 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(default_off_text);
2112
2113 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(gname_on_text);
2114 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(gname_off_text);
2115 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(gtype_on_text);
2116 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(gtype_off_text);
2117 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(msn_on_text);
2118 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(msn_off_text);
2119 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(lvl_on_text);
2120 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(lvl_off_text);
2121 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(plrs_on_text);
2122 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(plrs_off_text);
2123 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(ping_on_text);
2124 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(ping_off_text);
2125
2126 if (hardexit)
2127 return -1;
2128
2129 if (!ret && !ChatStartedcxx . . $ ChatStarted. && Bypass_chatcxx . . $ Bypass_chat.) {
2130 ChatStartedcxx . . $ ChatStarted. = 1;
2131 ret = MainMultiplayerMenucxx . . $ MainMultiplayerMenu(b126dc7c1de90089).();
2132 }
2133 return ret;
2134 }
2135
2136 // This is just a function that does some debugging
2137 void CheckPXOForAnomaliescxx . . $ CheckPXOForAnomalies(49f6e7a06ebc5aa8).() {
2138 int i, j;
2139 for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) {
2140 if (!(DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!))
2141 continue;
2142 for (j = 0; j < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; j++) {
2143 if (!(DLLMNetPlayerscxx . . $ DLLMNetPlayers.[j].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!))
2144 continue;
2145 if (i == j)
2146 continue;
2147 if (stricmpcxx . . $ `linux/linux_fix.h:43:9`!(DLLMPlayers[i].tracker_id, DLLMPlayers[j].tracker_id) == 0) {
2148 // Ok, what we have here is multiple users with the same tracker ID.
2149 // This is bad. It could be user error, but it could be something worse.
2150 FILEcxx . . $ FILE# *errfile;
2151 char errfilepath[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!];
2152 DLLddio_MakePathcxx . . $ DLLddio_MakePath.(errfilepath, DLLLocalD3Dircxx . . $ DLLLocalD3Dir., "pxo.err", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!);
2153 errfile = fopen(errfilepath, "at");
2154 if (errfile) {
2155 fprintf(errfile, "Dup TID: %s & %s / %s\n", DLLMPlayerscxx . . $ DLLMPlayers.[j].callsigncxx . . $ player#callsign., DLLMPlayerscxx . . $ DLLMPlayers.[i].callsigncxx . . $ player#callsign.,
2156 DLLMPlayerscxx . . $ DLLMPlayers.[i].tracker_idcxx . . $ player#tracker_id.);
2157 fclose(errfile);
2158 }
2159 }
2160 }
2161 }
2162 }
2163
2164 #define MT_DATA_UPDATE_INTERVALcxx . . $ `netcon/mtclient/mtclient.cpp:2164:9`! 10 // 30 seconds
2165 void DoMTFramecxx . . $ DoMTFrame(49f6e7a06ebc5aa8).() {
2166 int i;
2167 int rcode;
2168 IdleGameTrackercxx . . $ IdleGameTracker(49f6e7a06ebc5aa8).();
2169 PollPTrackNetcxx . . $ PollPTrackNet(49f6e7a06ebc5aa8).();
2170 // Periodically update the master tracker's info.
2171 if ((DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - LastTrackerDataUpdatecxx . . $ LastTrackerDataUpdate.) > MT_DATA_UPDATE_INTERVALcxx . . $ `netcon/mtclient/mtclient.cpp:2164:9`!) {
2172 UpdateGameDatacxx . . $ UpdateGameData(5d22bdacc48458e8).(&DLLD3_tracker_infocxx . . $ DLLD3_tracker_info.);
2173 LastTrackerDataUpdatecxx . . $ LastTrackerDataUpdate. = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.();
2174 }
2175
2176 if (DLLNetgamecxx . . $ DLLNetgame.->flagscxx . . $ netgame_info#flags. & NF_TRACK_RANKcxx . . $ `Descent3/multi_external.h:243:9`!) {
2177 // Loop through all DLLMNetPlayers looking to see if we need to send or receive
2178 if (MTWritingPilotcxx . . $ MTWritingPilot. != -1) {
2179 // We are already sending a pilot
2180 rcode = SendD3PilotDatacxx . . $ SendD3PilotData(1eb61746e1114d84).(nullptr);
2181 if (rcode != 0) {
2182 if (rcode == 1) {
2183 // Copy data from the DLLMTPilotinfo[MTReadingPilot] struct here
2184 DLLMNetPlayerscxx . . $ DLLMNetPlayers.[MTWritingPilotcxx . . $ MTWritingPilot.].flagscxx . . $ netplayer#flags. &= ~NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!;
2185 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Pilot data wrote to the Mastertracker for Player[%d] %s (tid=%s).\n", MTWritingPilot,
2186 DLLMTPilotinfo[MTWritingPilot].pilot_name, DLLMTPilotinfo[MTWritingPilot].tracker_id);
2187 MTWritingPilotcxx . . $ MTWritingPilot. = -1;
2188
2189 } else {
2190 DLLMNetPlayerscxx . . $ DLLMNetPlayers.[MTWritingPilotcxx . . $ MTWritingPilot.].flagscxx . . $ netplayer#flags. &= ~NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!;
2191 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Pilot write to the mastertracker failed. Error code %d.\n", rcode);
2192 MTWritingPilotcxx . . $ MTWritingPilot. = -1;
2193 }
2194 }
2195 } else {
2196 // See if se need to look for another
2197 for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) {
2198
2199 if (DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!) {
2200 if ((!(DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`!)) &&
2201 (DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_HAS_PILOT_DATAcxx . . $ `Descent3/multi_external.h:170:9`!)) {
2202 strcpy(DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].tracker_idcxx . . $ vmt_descent3_struct#tracker_id., DLLMPlayerscxx . . $ DLLMPlayers.[i].tracker_idcxx . . $ player#tracker_id.);
2203 strcpy(DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].pilot_namecxx . . $ vmt_descent3_struct#pilot_name., DLLMPlayerscxx . . $ DLLMPlayers.[i].callsigncxx . . $ player#callsign.);
2204 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].killscxx . . $ vmt_descent3_struct#kills. = DLLMPlayerscxx . . $ DLLMPlayers.[i].killscxx . . $ player#kills.;
2205 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].deathscxx . . $ vmt_descent3_struct#deaths. = DLLMPlayerscxx . . $ DLLMPlayers.[i].deathscxx . . $ player#deaths.;
2206 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].suicidescxx . . $ vmt_descent3_struct#suicides. = DLLMPlayerscxx . . $ DLLMPlayers.[i].suicidescxx . . $ player#suicides.;
2207 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].rankcxx . . $ vmt_descent3_struct#rank. = (DLLMPlayerscxx . . $ DLLMPlayers.[i].rankcxx . . $ player#rank. * 65536.0);
2208 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending pilot %d rank of %f\n", i, DLLMTPilotinfo[i].rank / 65536.0);
2209
2210 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].lateral_thrustcxx . . $ vmt_descent3_struct#lateral_thrust. = DLLMPlayerscxx . . $ DLLMPlayers.[i].lateral_thrustcxx . . $ player#lateral_thrust.;
2211 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].rotational_thrustcxx . . $ vmt_descent3_struct#rotational_thrust. = DLLMPlayerscxx . . $ DLLMPlayers.[i].rotational_thrustcxx . . $ player#rotational_thrust.;
2212 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].online_timecxx . . $ vmt_descent3_struct#online_time. += DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - DLLMPlayerscxx . . $ DLLMPlayers.[i].time_in_gamecxx . . $ player#time_in_game.;
2213 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].sliding_pctcxx . . $ vmt_descent3_struct#sliding_pct. = 0; // FIXME
2214 DLLMPlayerscxx . . $ DLLMPlayers.[i].time_in_gamecxx . . $ player#time_in_game. = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.(); // when we write this data multiple times we need this
2215
2216 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending User info to the Mastertracker for Player[%d] %s (tid=%s).\n", i,
2217 DLLMTPilotinfo[i].pilot_name, DLLMTPilotinfo[i].tracker_id);
2218 SendD3PilotDatacxx . . $ SendD3PilotData(1eb61746e1114d84).(&DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i]);
2219
2220 MTWritingPilotcxx . . $ MTWritingPilot. = i;
2221 i = MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`! + 1;
2222 break;
2223 } else {
2224 // If we never read this pilot's stats, we really don't care what they were.
2225 DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. &= ~NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`!;
2226 DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. &= ~NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!;
2227 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Didn't write Mastertracker stats for %s because we never received any from the tracker!\n",
2228 DLLMPlayers[i].callsign);
2229 }
2230 }
2231 }
2232 }
2233 // Don't want to read and write at the same time at this point
2234 if (MTWritingPilotcxx . . $ MTWritingPilot. == -1) {
2235 if (MTReadingPilotcxx . . $ MTReadingPilot. != -1) {
2236 // We are already waiting on a pilot
2237 rcode = GetD3PilotDatacxx . . $ GetD3PilotData(dd34ac9befeb2967).(nullptr, nullptr, nullptr);
2238 if (rcode != 0) {
2239 if (rcode == 1) {
2240 DLLMNetPlayerscxx . . $ DLLMNetPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].flagscxx . . $ netplayer#flags. &= ~NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`!;
2241 // Copy data into the DLLMTPilotinfo[MTReadingPilot] struct here
2242 DLLMPlayerscxx . . $ DLLMPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].killscxx . . $ player#kills. = DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[MTReadingPilotcxx . . $ MTReadingPilot.].killscxx . . $ vmt_descent3_struct#kills.;
2243 DLLMPlayerscxx . . $ DLLMPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].deathscxx . . $ player#deaths. = DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[MTReadingPilotcxx . . $ MTReadingPilot.].deathscxx . . $ vmt_descent3_struct#deaths.;
2244 DLLMPlayerscxx . . $ DLLMPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].suicidescxx . . $ player#suicides. = DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[MTReadingPilotcxx . . $ MTReadingPilot.].suicidescxx . . $ vmt_descent3_struct#suicides.;
2245 DLLMPlayerscxx . . $ DLLMPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].rankcxx . . $ player#rank. = DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[MTReadingPilotcxx . . $ MTReadingPilot.].rankcxx . . $ vmt_descent3_struct#rank. / 65536.0;
2246 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Read pilot %s rank of %f\n", DLLMPlayers[MTReadingPilot].callsign,
2247 DLLMPlayers[MTReadingPilot].rank);
2248 DLLMPlayerscxx . . $ DLLMPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].lateral_thrustcxx . . $ player#lateral_thrust. = DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[MTReadingPilotcxx . . $ MTReadingPilot.].lateral_thrustcxx . . $ vmt_descent3_struct#lateral_thrust.;
2249 DLLMPlayerscxx . . $ DLLMPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].rotational_thrustcxx . . $ player#rotational_thrust. = DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[MTReadingPilotcxx . . $ MTReadingPilot.].rotational_thrustcxx . . $ vmt_descent3_struct#rotational_thrust.;
2250 // DLLMPlayers[MTReadingPilot].time_in_game = DLLMTPilotinfo[MTReadingPilot].online_time;
2251 // Something = DLLMTPilotinfo[i].sliding_pct;//FIXME
2252
2253 DLLMNetPlayerscxx . . $ DLLMNetPlayers.[MTReadingPilotcxx . . $ MTReadingPilot.].flagscxx . . $ netplayer#flags. |= NPF_MT_HAS_PILOT_DATAcxx . . $ `Descent3/multi_external.h:170:9`!;
2254 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Pilot data received from the Mastertracker for Player[%d] %s (tid=%s).\n", MTReadingPilot,
2255 DLLMTPilotinfo[MTReadingPilot].pilot_name, DLLMTPilotinfo[MTReadingPilot].tracker_id);
2256 MTReadingPilotcxx . . $ MTReadingPilot. = -1;
2257 } else {
2258 // DLLMNetPlayers[MTReadingPilot].flags &= ~NPF_MT_READING_PILOT;
2259 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Pilot read from mastertracker failed. Error code %d.\n", rcode);
2260 MTReadingPilotcxx . . $ MTReadingPilot. = -1;
2261 }
2262 }
2263 } else {
2264 // See if se need to look for another
2265 for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) {
2266 if (DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`!) {
2267 MTReadingPilotcxx . . $ MTReadingPilot. = i;
2268 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Requesting User info from the Mastertracker for Player[%d] %s (tid=%s).\n", i,
2269 DLLMTPilotinfo[i].pilot_name, DLLMTPilotinfo[i].tracker_id);
2270 GetD3PilotDatacxx . . $ GetD3PilotData(dd34ac9befeb2967).(&DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i], DLLMPlayerscxx . . $ DLLMPlayers.[i].callsigncxx . . $ player#callsign., DLLMPlayerscxx . . $ DLLMPlayers.[i].tracker_idcxx . . $ player#tracker_id.);
2271 CheckPXOForAnomaliescxx . . $ CheckPXOForAnomalies(49f6e7a06ebc5aa8).();
2272 break;
2273 }
2274 }
2275 }
2276 }
2277 }
2278 }
2279
2280 void DoMTGameOvercxx . . $ DoMTGameOver(49f6e7a06ebc5aa8).(void) {
2281 int i;
2282
2283 DLLShowProgressScreencxx . . $ DLLShowProgressScreen.(TXT_PXO_WRITINGGAMESTATScxx . . $ `netcon/mtclient/mtstrings.h:72:9`!, nullptr);
2284
2285 if (DLLNetgamecxx . . $ DLLNetgame.->local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) {
2286 return;
2287 }
2288 // Send all player info to the mastertracker
2289 for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) {
2290 if ((DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) || (DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!)) {
2291 if (!(DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`!)) {
2292 if (DLLMNetPlayerscxx . . $ DLLMNetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_MT_HAS_PILOT_DATAcxx . . $ `Descent3/multi_external.h:170:9`!) // Security will do this for us
2293 {
2294 strcpy(DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].tracker_idcxx . . $ vmt_descent3_struct#tracker_id., DLLMPlayerscxx . . $ DLLMPlayers.[i].tracker_idcxx . . $ player#tracker_id.);
2295 strcpy(DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].pilot_namecxx . . $ vmt_descent3_struct#pilot_name., DLLMPlayerscxx . . $ DLLMPlayers.[i].callsigncxx . . $ player#callsign.);
2296 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].killscxx . . $ vmt_descent3_struct#kills. = DLLMPlayerscxx . . $ DLLMPlayers.[i].killscxx . . $ player#kills.;
2297 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].deathscxx . . $ vmt_descent3_struct#deaths. = DLLMPlayerscxx . . $ DLLMPlayers.[i].deathscxx . . $ player#deaths.;
2298 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].suicidescxx . . $ vmt_descent3_struct#suicides. = DLLMPlayerscxx . . $ DLLMPlayers.[i].suicidescxx . . $ player#suicides.;
2299 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].rankcxx . . $ vmt_descent3_struct#rank. = DLLMPlayerscxx . . $ DLLMPlayers.[i].rankcxx . . $ player#rank. * 65536.0;
2300 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].lateral_thrustcxx . . $ vmt_descent3_struct#lateral_thrust. = DLLMPlayerscxx . . $ DLLMPlayers.[i].lateral_thrustcxx . . $ player#lateral_thrust.;
2301 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].rotational_thrustcxx . . $ vmt_descent3_struct#rotational_thrust. = DLLMPlayerscxx . . $ DLLMPlayers.[i].rotational_thrustcxx . . $ player#rotational_thrust.;
2302 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].online_timecxx . . $ vmt_descent3_struct#online_time. += DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - DLLMPlayerscxx . . $ DLLMPlayers.[i].time_in_gamecxx . . $ player#time_in_game.;
2303 DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i].sliding_pctcxx . . $ vmt_descent3_struct#sliding_pct. = 0; // FIXME
2304 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending User info to the Mastertracker for Player[%d] %s (tid=%s).\n", i,
2305 DLLMTPilotinfo[i].pilot_name, DLLMTPilotinfo[i].tracker_id);
2306 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Sending pilot %d rank of %f\n", i, DLLMTPilotinfo[i].rank / 65536.0);
2307 SendD3PilotDatacxx . . $ SendD3PilotData(1eb61746e1114d84).(&DLLMTPilotinfocxx . . $ DLLMTPilotinfo.[i]);
2308 while (SendD3PilotDatacxx . . $ SendD3PilotData(1eb61746e1114d84).(nullptr) == 0) {
2309 DLLDescentDefercxx . . $ DLLDescentDefer.();
2310 }
2311 }
2312 }
2313 }
2314 }
2315 DLLShowProgressScreencxx . . $ DLLShowProgressScreen.(TXT_PXO_SENDINGGAMEOVERcxx . . $ `netcon/mtclient/mtstrings.h:73:9`!, nullptr);
2316 while (!SendGameOvercxx . . $ SendGameOver(b126dc7c1de90089).())
2317 DLLDescentDefercxx . . $ DLLDescentDefer.();
2318 }
2319
2320 int MTVersionCheckcxx . . $ MTVersionCheck(b126dc7c1de90089).() {
2321 #ifdef WIN32
2322 int rcode;
2323 InetGetFile *inetfile;
2324 char sznewdll[_MAX_PATH], szolddll[_MAX_PATH], szbakdll[_MAX_PATH];
2325 char fulldllpath[_MAX_PATH * 2];
2326 // char dllpath[_MAX_PATH];
2327 DLLAVInit = NULL;
2328 DLLAVCall = NULL;
2329 DLLAVClose = NULL;
2330 DLLAVGetVersion = NULL;
2331 DLLRunCheck = NULL;
2332 // Start by getting the current MT version and see if a newer is needed
2333 // Load the DLL and get it's version
2334
2335 // Specify the correct path
2336 DLLddio_MakePath(fulldllpath, DLLLocalD3Dir, "mtav.dll", NULL);
2337 if (!DLLmod_LoadModule(&MTAVDLLHandle, fulldllpath, MODF_LAZY)) {
2338 DLLmprintf(0, "Unable to load Mastertracker Auto version update DLL (mtav.dll)\n");
2339 // Try restoring a backup of the DLL
2340 DLLddio_MakePath(szolddll, DLLLocalD3Dir, "mtav.dll", NULL);
2341 DLLddio_MakePath(szbakdll, DLLLocalD3Dir, "mtav.bak", NULL);
2342 CopyFile(szbakdll, szolddll, FALSE);
2343 return 0;
2344 }
2345 DLLAVInit = (DLLAVInit_fp *)DLLmod_GetSymbol(&MTAVDLLHandle, "DLLAVInit", 4);
2346 if (!DLLAVInit) {
2347 DLLmprintf(0, "Unable to Find DLLAVInit() function in mtav.dll\n");
2348 DLLmod_FreeModule(&MTAVDLLHandle);
2349 // Try restoring a backup of the DLL
2350 DLLddio_MakePath(szolddll, DLLLocalD3Dir, "mtav.dll", NULL);
2351 DLLddio_MakePath(szbakdll, DLLLocalD3Dir, "mtav.bak", NULL);
2352 CopyFile(szbakdll, szolddll, FALSE);
2353 return 0;
2354 }
2355 DLLAVGetVersion = (DLLAVGetVersion_fp *)DLLmod_GetSymbol(&MTAVDLLHandle, "DLLAVGetVersion", 4);
2356 if (!DLLAVGetVersion) {
2357 DLLmprintf(0, "Unable to Find DLLAVGetVersion() function in mtav.dll\n");
2358 DLLmod_FreeModule(&MTAVDLLHandle);
2359 // Try restoring a backup of the DLL
2360 DLLddio_MakePath(szolddll, DLLLocalD3Dir, "mtav.dll", NULL);
2361 DLLddio_MakePath(szbakdll, DLLLocalD3Dir, "mtav.bak", NULL);
2362 CopyFile(szbakdll, szolddll, FALSE);
2363 return 0;
2364 }
2365 DLLRunCheck = (DLLRunCheck_fp *)DLLmod_GetSymbol(&MTAVDLLHandle, "DLLRunCheck", 4);
2366 if (!DLLRunCheck) {
2367 DLLmprintf(0, "Unable to Find DLLRunCheck() function in mtav.dll\n");
2368 DLLmod_FreeModule(&MTAVDLLHandle);
2369 // Try restoring a backup of the DLL
2370 DLLddio_MakePath(szolddll, DLLLocalD3Dir, "mtav.dll", NULL);
2371 DLLddio_MakePath(szbakdll, DLLLocalD3Dir, "mtav.bak", NULL);
2372 CopyFile(szbakdll, szolddll, FALSE);
2373 return 0;
2374 }
2375 uint32_t mtver;
2376 DLLAVGetVersion((int *)&mtver);
2377 if (MTAVersionCheck(mtver, MTUpdateURL)) {
2378 DLLmprintf(0, "VersionCheck() returned an unexpected return code!\n");
2379 DLLmod_FreeModule(&MTAVDLLHandle);
2380 return 0;
2381 }
2382 DLLmprintf(0, "Getting Version # from Mastertracker.\n");
2383 do {
2384 //
2385 rcode = MTAVersionCheck(0, NULL);
2386 } while (rcode == 0);
2387
2388 if (rcode == -2) {
2389 // Don't try anymore... it timed out.
2390 Login_aborted = true;
2391 }
2392 if (rcode == 1) {
2393 if (MTUpdateURL[0]) {
2394 // We need to get a new DLL
2395 DLLmprintf(0, "Mastertracker says we need a new version, which is at %s.\n", MTUpdateURL);
2396 sprintf(sznewdll, "%s\\newmtav.dll", DLLLocalD3Dir);
2397 DLLddio_MakePath(sznewdll, DLLLocalD3Dir, "newmtav.dll", NULL);
2398 inetfile = new InetGetFile(MTUpdateURL, sznewdll);
2399 while (1) {
2400 DLLPollUI();
2401 if (inetfile->IsFileError()) {
2402 // Error here
2403 DLLmprintf(0, "Mastertracker update DLL not received. Error code: %d.\n", inetfile->GetErrorCode());
2404 DLLmod_FreeModule(&MTAVDLLHandle);
2405 return 0;
2406 }
2407 if (inetfile->IsFileReceived()) {
2408 DLLmprintf(0, "Mastertracker update DLL received.\n");
2409 DLLmod_FreeModule(&MTAVDLLHandle);
2410 DLLddio_MakePath(szolddll, DLLLocalD3Dir, "mtav.dll", NULL);
2411 DLLddio_MakePath(szbakdll, DLLLocalD3Dir, "mtav.bak", NULL);
2412
2413 // We have the file, now backup & copy it and try to reload.
2414 CopyFile(szolddll, szbakdll, FALSE);
2415 CopyFile(sznewdll, szolddll, FALSE);
2416 return 0;
2417 }
2418 };
2419 } else {
2420 DLLmprintf(0, "Mastertracker says we are up to date\n");
2421 // Here is where we call into the DLL so it can do it's magic
2422 DLLAVInit(0);
2423 DLLmod_FreeModule(&MTAVDLLHandle);
2424 return 1;
2425 }
2426 } else {
2427 DLLmprintf(0, "Mastertracker timeout while getting version\n");
2428 DLLmod_FreeModule(&MTAVDLLHandle);
2429 return 0;
2430 }
2431 #endif
2432 return 1;
2433 }
2434
2435 int JoinNewLobbycxx . . $ JoinNewLobby(5c4306d8553b3696).(const char *lobby) {
2436 int rcode;
2437 const char *p;
2438 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Entering new lobby");
2439 void *title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_ENTERINGLOBBYcxx . . $ `netcon/mtclient/mtstrings.h:74:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
2440
2441 void *cancel_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2442 void *cancel_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2443
2444 void *main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(0, 256, 128, 128, UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | NUWF_TITLEMEDcxx . . $ `Descent3/newui.h:199:9`!);
2445 void *title = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, title_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2446 void *cancel_hs =
2447 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 5, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, cancel_off_text, cancel_on_text, 20, 100, 70, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2448 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
2449 do {
2450 rcode = SetNewChatChannelcxx . . $ SetNewChatChannel(5c4306d8553b3696).(lobby);
2451 p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
2452 if (p && pconsolecxx . . $ pconsole.) {
2453 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., p);
2454 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., "\x0a\x0d");
2455 }
2456 } while (rcode == 0);
2457
2458 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
2459 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
2460
2461 if (rcode == 1) {
2462 strcpy(DLLPXO_hosted_lobby_namecxx . . $ DLLPXO_hosted_lobby_name., lobby);
2463 return 1;
2464 } else {
2465 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Unable to join lobby: %d\n", rcode);
2466 char txtmessage[200];
2467 char cleanlobby[50];
2468 memset(cleanlobby, 0, 29);
2469 strcpy(cleanlobby, lobby + 1);
2470 for (int l = 0; l < 18; l++) {
2471 if (cleanlobby[l] == '_')
2472 cleanlobby[l] = ' ';
2473 }
2474 snprintf(txtmessage, sizeof(txtmessage), TXT_PXO_CANTJOINLOBBYcxx . . $ `netcon/mtclient/mtstrings.h:75:9`!, cleanlobby);
2475 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, txtmessage, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2476 return 0;
2477 }
2478
2479 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
2480 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title);
2481 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(cancel_hs);
2482
2483 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
2484 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_on_text);
2485 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_off_text);
2486 }
2487
2488 const char *SendWhispercxx . . $ SendWhisper(fb58d2e09a2a1ce6).(const char *name) {
2489
2490 int exit_menu = 0;
2491 const char *p;
2492 char message[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2493 char pilot_name[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2494 static char fmt_msg[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`! * 2];
2495 void *title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PRIVATEMESSAGEcxx . . $ `netcon/mtclient/mtstrings.h:76:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
2496
2497 void *cancel_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2498 void *cancel_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2499 void *send_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SENDcxx . . $ `netcon/mtclient/mtstrings.h:77:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2500 void *send_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SENDcxx . . $ `netcon/mtclient/mtstrings.h:77:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2501
2502 void *pilot_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PILOTNAMEcxx . . $ `netcon/mtclient/mtstrings.h:78:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2503 void *message_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_MESSAGEcxx . . $ `netcon/mtclient/mtstrings.h:79:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2504
2505 void *main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(0, 0, 384, 256, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | NUWF_TITLEMEDcxx . . $ `Descent3/newui.h:199:9`!);
2506
2507 void *title = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, title_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2508 void *pilot = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, pilot_text, 50, 55, 0);
2509 void *message_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, message_text, 50, 110, 0);
2510 void *user_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, 10, 50, 75, 130, 15, 0);
2511 void *msg_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, 3, 50, 130, 200, 15, 0);
2512
2513 // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
2514 // int flags,int winnum)
2515 void *cancel_hs =
2516 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_CANCELcxx . . $ `ui/ui.h:369:9`!, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
2517 void *send_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0);
2518 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
2519 // DLLNewUIWindowSetFocusOnEditGadget(msg_edit,main_wnd);
2520 DLLEditSetTextcxx . . $ DLLEditSetText.(user_edit, name);
2521 while (!exit_menu) {
2522 int res;
2523
2524 res = DLLDoUIcxx . . $ DLLDoUI.();
2525
2526 // handle all UI results.
2527
2528 switch (res) {
2529
2530 case 3:
2531 case UID_OKcxx . . $ `ui/ui.h:368:9`!:
2532 DLLEditGetTextcxx . . $ DLLEditGetText.(user_edit, pilot_name, MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!);
2533 DLLEditGetTextcxx . . $ DLLEditGetText.(msg_edit, message, MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!);
2534 snprintf(fmt_msg, sizeof(fmt_msg), "/msg %s %s", pilot_name, message);
2535 p = SendChatStringcxx . . $ SendChatString(223c544933887702).(fmt_msg);
2536 if (p && pconsolecxx . . $ pconsole.) {
2537 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., p);
2538 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., "\x0a\x0d");
2539 }
2540 exit_menu = 1;
2541 break;
2542 case UID_CANCELcxx . . $ `ui/ui.h:369:9`!:
2543 exit_menu = 1;
2544 break;
2545 }
2546 }
2547
2548 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
2549 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
2550
2551 // Clean up
2552 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
2553 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_on_text);
2554 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_off_text);
2555 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(send_on_text);
2556 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(send_off_text);
2557 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(pilot_text);
2558 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(message_text);
2559
2560 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
2561 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title);
2562 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(pilot);
2563 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(message_t);
2564 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(user_edit);
2565 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(msg_edit);
2566 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(cancel_hs);
2567 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(send_hs);
2568
2569 return "";
2570 }
2571
2572 int JoinPrivateLobbycxx . . $ JoinPrivateLobby(b126dc7c1de90089).() {
2573 int exit_menu = 0;
2574 int ret = 0;
2575 char message[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2576 char priv_channel[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2577
2578 void *title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINPRIVcxx . . $ `netcon/mtclient/mtstrings.h:66:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
2579
2580 void *cancel_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2581 void *cancel_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2582 void *join_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINcxx . . $ `netcon/mtclient/mtstrings.h:80:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2583 void *join_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_JOINcxx . . $ `netcon/mtclient/mtstrings.h:80:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2584
2585 void *channel_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CHANNELNAMEcxx . . $ `netcon/mtclient/mtstrings.h:81:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2586
2587 void *main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(0, 0, 256, 256, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | NUWF_TITLELARGEcxx . . $ `Descent3/newui.h:200:9`!);
2588
2589 void *title = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, title_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2590 void *channel_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, channel_text, 50, 95, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2591 void *chan_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, 3, 50, 115, 130, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2592
2593 // DLLNewUIWindowSetFocusOnEditGadget(chan_edit,main_wnd);
2594 // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
2595 // int flags,int winnum)
2596 void *cancel_hs =
2597 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_CANCELcxx . . $ `ui/ui.h:369:9`!, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
2598 void *join_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0);
2599 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
2600 while (!exit_menu) {
2601 int res;
2602
2603 res = DLLDoUIcxx . . $ DLLDoUI.();
2604
2605 // handle all UI results.
2606
2607 switch (res) {
2608 case 3:
2609 case UID_OKcxx . . $ `ui/ui.h:368:9`!: {
2610 DLLEditGetTextcxx . . $ DLLEditGetText.(chan_edit, priv_channel, MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!);
2611 for (uint32_tcxx . . $ uint32_t# i = 0; i < strlen(priv_channel); i++) {
2612 if (priv_channel[i] == ' ') {
2613 priv_channel[i] = '_';
2614 }
2615 }
2616 snprintf(message, sizeof(message), "+%s", priv_channel);
2617 ret = JoinNewLobbycxx . . $ JoinNewLobby(5c4306d8553b3696).(message);
2618 exit_menu = 1;
2619 if (ret) {
2620 char txtmessage[200];
2621 char cleanlobby[50];
2622 memset(cleanlobby, 0, 29);
2623 strcpy(cleanlobby, message + 1);
2624 for (int l = 0; l < 18; l++) {
2625 if (cleanlobby[l] == '_')
2626 cleanlobby[l] = ' ';
2627 }
2628 snprintf(txtmessage, sizeof(txtmessage), TXT_PXO_INNEWLOBBYcxx . . $ `netcon/mtclient/mtstrings.h:71:9`!, cleanlobby);
2629 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, txtmessage, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2630 *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known. = 0;
2631 }
2632 } break;
2633 case UID_CANCELcxx . . $ `ui/ui.h:369:9`!:
2634 exit_menu = 1;
2635 break;
2636 }
2637 }
2638
2639 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
2640 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
2641
2642 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
2643 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_on_text);
2644 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_off_text);
2645 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_on_text);
2646 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_off_text);
2647 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(channel_text);
2648
2649 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
2650 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title);
2651 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(channel_t);
2652 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(chan_edit);
2653 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(cancel_hs);
2654 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(join_hs);
2655 return ret;
2656 }
2657
2658 int FindPilotcxx . . $ FindPilot(b126dc7c1de90089).() {
2659
2660 int exit_menu = 0;
2661 const char *p;
2662 char message[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2663 char pilot_name[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2664 static char fmt_msg[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`! * 2];
2665 void *title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_FINDPILOTcxx . . $ `netcon/mtclient/mtstrings.h:68:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
2666
2667 void *cancel_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2668 void *cancel_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CANCELcxx . . $ `netcon/mtclient/mtstrings.h:57:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2669 void *search_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SEARCHcxx . . $ `netcon/mtclient/mtstrings.h:82:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2670 void *search_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_SEARCHcxx . . $ `netcon/mtclient/mtstrings.h:82:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2671
2672 void *pilot_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PILOTNAMEcxx . . $ `netcon/mtclient/mtstrings.h:78:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2673
2674 void *main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(0, 0, 256, 256, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | NUWF_TITLEMEDcxx . . $ `Descent3/newui.h:199:9`!);
2675
2676 void *title_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, title_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2677 void *pilot_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, pilot_text, 50, 95, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2678 void *pilot_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, 3, 50, 115, 130, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2679
2680 // DLLNewUIWindowSetFocusOnEditGadget(pilot_edit,main_wnd);
2681 // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h,
2682 // int flags,int winnum)
2683 void *cancel_hs =
2684 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_CANCELcxx . . $ `ui/ui.h:369:9`!, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0);
2685 void *search_hs =
2686 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, search_on_text, search_off_text, 60, 256 - 80, 60, 20, 0);
2687 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
2688 while (!exit_menu) {
2689 int res;
2690
2691 res = DLLDoUIcxx . . $ DLLDoUI.();
2692
2693 // handle all UI results.
2694
2695 switch (res) {
2696 case 3:
2697 case UID_OKcxx . . $ `ui/ui.h:368:9`!: {
2698 DLLEditGetTextcxx . . $ DLLEditGetText.(pilot_edit, pilot_name, MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!);
2699 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_SEARCHINGPILOTcxx . . $ `netcon/mtclient/mtstrings.h:83:9`!, 1);
2700 p = GetChannelByUsercxx . . $ GetChannelByUser(a8b8e32347182212).(pilot_name);
2701 while (p == nullptr) {
2702 int sres = DLLPollUIcxx . . $ DLLPollUI.();
2703 // Detect if cancel is hit
2704 if (sres == 99) {
2705 p = nullptr;
2706 // Cancel the lookup
2707 GetChannelByUsercxx . . $ GetChannelByUser(a8b8e32347182212).((char *)-1);
2708 break;
2709 }
2710 DLLDescentDefercxx . . $ DLLDescentDefer.();
2711 p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
2712 if (p && pconsolecxx . . $ pconsole.) {
2713 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., p);
2714 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., "\x0a\x0d");
2715 }
2716 p = GetChannelByUsercxx . . $ GetChannelByUser(a8b8e32347182212).(pilot_name);
2717 }
2718 if ((p == nullptr) || (p == (char *)-1)) {
2719 exit_menu = 1;
2720 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
2721 break;
2722 }
2723 strcpy(message, p + 1);
2724 for (uint32_tcxx . . $ uint32_t# i = 0; i < strlen(message); i++)
2725 if (message[i] == '_')
2726 message[i] = ' ';
2727 snprintf(fmt_msg, sizeof(fmt_msg), TXT_PXO_CANBEFOUNDINcxx . . $ `netcon/mtclient/mtstrings.h:84:9`!, pilot_name, message);
2728 if (pconsolecxx . . $ pconsole.) {
2729 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., fmt_msg);
2730 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., "\x0a\x0d");
2731 }
2732 exit_menu = 1;
2733 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
2734 break;
2735 }
2736 case UID_CANCELcxx . . $ `ui/ui.h:369:9`!:
2737 exit_menu = 1;
2738 break;
2739 }
2740 }
2741
2742 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
2743 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
2744
2745 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
2746 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_on_text);
2747 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(cancel_off_text);
2748 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(search_on_text);
2749 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(search_off_text);
2750 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(pilot_text);
2751
2752 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
2753 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title_t);
2754 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(pilot_t);
2755 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(pilot_edit);
2756 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(cancel_hs);
2757 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(search_hs);
2758
2759 return 1;
2760 }
2761
2762 const char *GetRankStringcxx . . $ GetRankString(928e2d948eb79d9e).(float ranking) {
2763 int val = 0;
2764
2765 if (ranking >= 0 && ranking < 600)
2766 val = 0;
2767 else if (ranking >= 600 && ranking < 900)
2768 val = 1;
2769 else if (ranking >= 900 && ranking < 1200)
2770 val = 2;
2771 else if (ranking >= 1200 && ranking < 1500)
2772 val = 3;
2773 else if (ranking >= 1500 && ranking < 1800)
2774 val = 4;
2775 else if (ranking >= 1800 && ranking < 2100)
2776 val = 5;
2777 else if (ranking >= 2100 && ranking < 2400)
2778 val = 6;
2779 else if (ranking >= 2400 && ranking < 2600)
2780 val = 7;
2781 else if (ranking >= 2600 && ranking < 3000)
2782 val = 8;
2783 else if (ranking >= 3000)
2784 val = 9;
2785 return TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(TXT_RANKING0cxx . . $ `netcon/mtclient/mtstrings.h:112:9`! + val);
2786 }
2787
2788 int GetNextRankcxx . . $ GetNextRank(1bb0578f3efdc255).(float ranking) {
2789 int val = 0;
2790
2791 if (ranking >= 0 && ranking < 600)
2792 val = 600;
2793 else if (ranking >= 600 && ranking < 900)
2794 val = 900;
2795 else if (ranking >= 900 && ranking < 1200)
2796 val = 1200;
2797 else if (ranking >= 1200 && ranking < 1500)
2798 val = 1500;
2799 else if (ranking >= 1500 && ranking < 1800)
2800 val = 1800;
2801 else if (ranking >= 1800 && ranking < 2100)
2802 val = 2100;
2803 else if (ranking >= 2100 && ranking < 2400)
2804 val = 2400;
2805 else if (ranking >= 2400 && ranking < 2600)
2806 val = 2600;
2807 else if (ranking >= 2600 && ranking < 3000)
2808 val = 3000;
2809 else if (ranking >= 3000)
2810 val = 3000;
2811 return val;
2812 }
2813
2814 int GetPilotStatscxx . . $ GetPilotStats(5c4306d8553b3696).(const char *pilot) {
2815 int res;
2816 const char *p;
2817 char *tokp;
2818 char tid[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2819 char real_pilot[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2820 char tmp_text[MAX_CHAT_SEND_LENcxx . . $ `netcon/mtclient/mtclient.cpp:1012:9`!];
2821 vmt_descent3_structcxx . . $ vmt_descent3_struct# d3_pilot_info;
2822
2823 void *eff_text;
2824 void *time_text;
2825 void *main_wnd;
2826 void *title_t;
2827 void *kill_t;
2828 void *death_t;
2829 void *suicide_t;
2830 void *eff_t;
2831 void *time_in_game_t;
2832 void *pilot_t;
2833 void *rank_t;
2834
2835 void *title_text;
2836 void *pilot_name_text;
2837 void *close_on_text;
2838 void *close_off_text;
2839 void *kills_text;
2840 void *deaths_text;
2841 void *suicide_text;
2842 void *rank_text;
2843
2844 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_GETTINGPILOTSTATcxx . . $ `netcon/mtclient/mtstrings.h:85:9`!, 1);
2845 // Cancel previously active lookups
2846 // GetD3PilotData((vmt_descent3_struct *)-1, NULL, NULL);
2847 GetD3PilotDataCancelcxx . . $ GetD3PilotDataCancel(b126dc7c1de90089).();
2848 GetTrackerIdByUsercxx . . $ GetTrackerIdByUser(a8b8e32347182212).((char *)-1);
2849 p = GetTrackerIdByUsercxx . . $ GetTrackerIdByUser(a8b8e32347182212).(pilot);
2850 while (p == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {
2851 res = DLLPollUIcxx . . $ DLLPollUI.();
2852 DLLDescentDefercxx . . $ DLLDescentDefer.();
2853 p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
2854 if (p && pconsolecxx . . $ pconsole.) {
2855 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., p);
2856 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., "\x0a\x0d");
2857 }
2858 p = GetTrackerIdByUsercxx . . $ GetTrackerIdByUser(a8b8e32347182212).(pilot);
2859 if (res == 99) {
2860 // cancel was hit
2861 // Cancel the look
2862 GetTrackerIdByUsercxx . . $ GetTrackerIdByUser(a8b8e32347182212).((char *)-1);
2863 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
2864 }
2865 }
2866 if (p == (char *)-1) {
2867 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Timeout looking for user\n");
2868 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_TIMEOUTMTcxx . . $ `netcon/mtclient/mtstrings.h:64:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2869 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
2870 return 0;
2871 }
2872 tokp = strchr((char *)p, ' ');
2873 if (tokp) {
2874 *tokp = '\0';
2875 tokp++;
2876 strcpy(tid, p);
2877 strcpy(real_pilot, tokp);
2878 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Requesting pilot info for %s %s\n", tid, real_pilot);
2879 memset(&d3_pilot_info, 0, sizeof(vmt_descent3_structcxx . . $ vmt_descent3_struct#));
2880 GetD3PilotDatacxx . . $ GetD3PilotData(dd34ac9befeb2967).(&d3_pilot_info, real_pilot, tid);
2881 int iresult = 0;
2882 while (iresult == 0) {
2883 iresult = GetD3PilotDatacxx . . $ GetD3PilotData(dd34ac9befeb2967).(nullptr, nullptr, nullptr);
2884 res = DLLPollUIcxx . . $ DLLPollUI.();
2885 if (res == 99) {
2886 // cancel was hit
2887 // GetD3PilotData((vmt_descent3_struct *)-1, NULL, NULL);
2888 GetD3PilotDataCancelcxx . . $ GetD3PilotDataCancel(b126dc7c1de90089).();
2889 iresult = -1;
2890 }
2891 DLLDescentDefercxx . . $ DLLDescentDefer.();
2892 p = GetChatTextcxx . . $ GetChatText(33a1f659e94feb42).();
2893 if (p && pconsolecxx . . $ pconsole.) {
2894 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., p);
2895 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(pconsolecxx . . $ pconsole., "\x0a\x0d");
2896 }
2897 }
2898 if (iresult == 1) {
2899 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Got pilot info for %s %s\n", tid, real_pilot);
2900
2901 // Do rank thingy here.
2902 snprintf(tmp_text, sizeof(tmp_text), "Rank: %s (%d) Next Advance at %d",
2903 GetRankStringcxx . . $ GetRankString(928e2d948eb79d9e).(d3_pilot_info.rankcxx . . $ vmt_descent3_struct#rank. / 65536), d3_pilot_info.rankcxx . . $ vmt_descent3_struct#rank. / 65536,
2904 GetNextRankcxx . . $ GetNextRank(1bb0578f3efdc255).(d3_pilot_info.rankcxx . . $ vmt_descent3_struct#rank. / 65536));
2905 rank_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tmp_text, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2906
2907 title_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_PILOTSTATScxx . . $ `netcon/mtclient/mtstrings.h:86:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
2908
2909 pilot_name_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(real_pilot, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, DLL_BIG_BRIEFING_FONTcxx . . $ `netcon/includes/con_dll.h:302:9`!);
2910
2911 close_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CLOSEcxx . . $ `netcon/mtclient/mtstrings.h:87:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
2912 close_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CLOSEcxx . . $ `netcon/mtclient/mtstrings.h:87:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
2913
2914 snprintf(tmp_text, sizeof(tmp_text), TXT_PXO_TOTALKILLScxx . . $ `netcon/mtclient/mtstrings.h:88:9`!, d3_pilot_info.killscxx . . $ vmt_descent3_struct#kills.);
2915 kills_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tmp_text, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2916
2917 snprintf(tmp_text, sizeof(tmp_text), TXT_PXO_TOTALDEATHScxx . . $ `netcon/mtclient/mtstrings.h:89:9`!, d3_pilot_info.deathscxx . . $ vmt_descent3_struct#deaths.);
2918 deaths_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tmp_text, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2919
2920 snprintf(tmp_text, sizeof(tmp_text), TXT_PXO_SUICIDEScxx . . $ `netcon/mtclient/mtstrings.h:90:9`!, d3_pilot_info.suicidescxx . . $ vmt_descent3_struct#suicides.);
2921 suicide_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tmp_text, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2922
2923 int leff = 0;
2924 int cury;
2925 if (d3_pilot_info.killscxx . . $ vmt_descent3_struct#kills. && d3_pilot_info.deathscxx . . $ vmt_descent3_struct#deaths.) {
2926 // leff = d3_pilot_info.kills/d3_pilot_info.deaths+d3_pilot_info.suicides+d3_pilot_info.kills;
2927 leff = (int)((float)((float)d3_pilot_info.killscxx . . $ vmt_descent3_struct#kills. / ((float)d3_pilot_info.deathscxx . . $ vmt_descent3_struct#deaths. + (float)d3_pilot_info.killscxx . . $ vmt_descent3_struct#kills. +
2928 (float)d3_pilot_info.suicidescxx . . $ vmt_descent3_struct#suicides.)) *
2929 100.0);
2930 }
2931
2932 snprintf(tmp_text, sizeof(tmp_text), TXT_PXO_EFFECIENCYcxx . . $ `netcon/mtclient/mtstrings.h:91:9`!, leff);
2933 eff_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tmp_text, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2934 snprintf(tmp_text, sizeof(tmp_text), TXT_PXO_TIMEINGAMEcxx . . $ `netcon/mtclient/mtstrings.h:92:9`!, d3_pilot_info.online_timecxx . . $ vmt_descent3_struct#online_time. / 60);
2935 time_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(tmp_text, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
2936
2937 main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(0, 0, 384, 256, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | NUWF_TITLEMEDcxx . . $ `Descent3/newui.h:199:9`!);
2938
2939 title_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, title_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2940 cury = 30;
2941 pilot_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, pilot_name_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2942 cury += 30;
2943
2944 rank_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, rank_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2945 cury += 20;
2946 kill_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, kills_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2947 cury += 20;
2948 death_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, deaths_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2949 cury += 20;
2950 suicide_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, suicide_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2951 cury += 20;
2952 eff_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, eff_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2953 cury += 20;
2954 time_in_game_t = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, time_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2955 cury += 30;
2956
2957 // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int
2958 // h, int flags,int winnum)
2959 DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_CANCELcxx . . $ `ui/ui.h:369:9`!, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, close_on_text, close_off_text, 130, cury, 60, 20, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
2960 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
2961 int exit_menu = 0;
2962 while (!exit_menu) {
2963 int res;
2964
2965 res = DLLDoUIcxx . . $ DLLDoUI.();
2966 if (res == UID_CANCELcxx . . $ `ui/ui.h:369:9`!) {
2967 exit_menu = 1;
2968 }
2969 }
2970 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
2971 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
2972 // Cleanup
2973 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(rank_text);
2974 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(title_text);
2975 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(close_on_text);
2976 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(close_off_text);
2977 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(kills_text);
2978 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(deaths_text);
2979 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(suicide_text);
2980 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(eff_text);
2981 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(time_text);
2982 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(pilot_name_text);
2983
2984 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(pilot_t);
2985 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
2986 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title_t);
2987 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(kill_t);
2988 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(death_t);
2989 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(suicide_t);
2990 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(eff_t);
2991 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(rank_t);
2992 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(time_in_game_t);
2993 }
2994 }
2995 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
2996
2997 return 1;
2998 }
2999
3000 void AutoLoginAndJoinGamecxx . . $ AutoLoginAndJoinGame(49f6e7a06ebc5aa8).() {
3001
3002 int loginlen = LOGIN_LENcxx . . $ `netcon/includes/con_dll.h:718:9`!;
3003 int passlen = PASSWORD_LENcxx . . $ `netcon/includes/con_dll.h:720:9`!;
3004 int valret;
3005 uint16_tcxx . . $ uint16_t# port;
3006 uint32_tcxx . . $ uint32_t# iaddr;
3007
3008 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
3009 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, 0);
3010 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("TrackerLogin", szloginidcxx . . $ szloginid., &loginlen);
3011 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("TrackerPassword", szpasswordcxx . . $ szpassword., &passlen);
3012 if (!*DLLAuto_login_addrcxx . . $ DLLAuto_login_addr.) {
3013 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Can't autostart because no IP address was specified!!\n");
3014 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
3015 goto failed_login;
3016 }
3017 if (*DLLAuto_login_portcxx . . $ DLLAuto_login_port.) {
3018 port = atoi(DLLAuto_login_portcxx . . $ DLLAuto_login_port.);
3019 } else {
3020 port = DEFAULT_GAME_PORTcxx . . $ `lib/networking.h:323:9`!;
3021 }
3022 if (!*szloginidcxx . . $ szloginid. || !*szpasswordcxx . . $ szpassword.) {
3023 if (LoginMasterTrackercxx . . $ LoginMasterTracker(b126dc7c1de90089).()) {
3024 // Uh... now connect to the server
3025 } else {
3026 goto failed_login;
3027 }
3028 }
3029
3030 // Fill out the validate struct and send off the packet
3031 validate_id_requestcxx . . $ validate_id_request# val_user;
3032 strcpy(val_user.tracker_idcxx . . $ validate_id_request#tracker_id., sztrackeridcxx . . $ sztrackerid.);
3033 strcpy(val_user.logincxx . . $ validate_id_request#login., szloginidcxx . . $ szloginid.);
3034 strcpy(val_user.passwordcxx . . $ validate_id_request#password., szpasswordcxx . . $ szpassword.);
3035
3036 valret = ValidateUsercxx . . $ ValidateUser(1b54b1e9ed0f18f2).(&val_user, sztrackeridcxx . . $ sztrackerid.);
3037 while (valret == 0) {
3038 valret = ValidateUsercxx . . $ ValidateUser(1b54b1e9ed0f18f2).(nullptr, nullptr);
3039 DLLDescentDefercxx . . $ DLLDescentDefer.();
3040 }
3041 if (valret == 1) {
3042 // User was validated
3043 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker user validated!\n");
3044 strcpy(DLLTracker_idcxx . . $ DLLTracker_id., sztrackeridcxx . . $ sztrackerid.);
3045 strcpy(DLLMPlayerscxx . . $ DLLMPlayers.[DLLPlayer_numcxx . . $ DLLPlayer_num.].tracker_idcxx . . $ player#tracker_id., sztrackeridcxx . . $ sztrackerid.);
3046
3047 } else if (valret == -1) {
3048 // User invalid!
3049 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker user not validated!\n");
3050 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_BADLOGINcxx . . $ `netcon/mtclient/mtstrings.h:63:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
3051 goto failed_login;
3052 } else {
3053 // timeout waiting for tracker!
3054 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker timeout!\n");
3055 DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_PXO_MASTERTRACKERcxx . . $ `netcon/mtclient/mtstrings.h:54:9`!, TXT_PXO_TIMEOUTMTcxx . . $ `netcon/mtclient/mtstrings.h:64:9`!, MSGBOX_OKcxx . . $ `Descent3/newui_core.h:78:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!);
3056 goto failed_login;
3057 }
3058
3059 // Now actually connect to the server!
3060
3061 network_addresscxx . . $ network_address# s_address;
3062 iaddr = inet_addr(DLLAuto_login_addrcxx . . $ DLLAuto_login_addr.);
3063 memcpy(&s_address.addresscxx . . $ network_address#address., &iaddr, sizeof(uint32_tcxx . . $ uint32_t#));
3064 s_address.portcxx . . $ network_address#port. = port;
3065 s_address.connection_typecxx . . $ network_address#connection_type. = NP_TCPcxx . . $ NP_TCP.;
3066 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
3067 DLLMultiStartClientcxx . . $ DLLMultiStartClient.(nullptr);
3068
3069 if ((DLLTryToJoinServercxx . . $ DLLTryToJoinServer.(&s_address))) {
3070 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Menu: Game joined!\n");
3071 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 1;
3072 }
3073
3074 failed_login:
3075 // Run this to make sure we properly ACK the server.
3076 for (int j = 0; j < 10; j++)
3077 PollPTrackNetcxx . . $ PollPTrackNet(49f6e7a06ebc5aa8).();
3078 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
3079 }
3080
3081 void AutoLoginAndStartGamecxx . . $ AutoLoginAndStartGame(49f6e7a06ebc5aa8).() {
3082 int loginlen = LOGIN_LENcxx . . $ `netcon/includes/con_dll.h:718:9`!;
3083 int passlen = PASSWORD_LENcxx . . $ `netcon/includes/con_dll.h:720:9`!;
3084 int valret;
3085
3086 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0;
3087
3088 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("TrackerLogin", szloginidcxx . . $ szloginid., &loginlen);
3089 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("TrackerPassword", szpasswordcxx . . $ szpassword., &passlen);
3090
3091 if (!*szloginidcxx . . $ szloginid. || !*szpasswordcxx . . $ szpassword.) {
3092 if (LoginMasterTrackercxx . . $ LoginMasterTracker(b126dc7c1de90089).()) {
3093 // Uh... now connect to the server
3094 } else {
3095 goto failed_login;
3096 }
3097 }
3098
3099 // Fill out the validate struct and send off the packet
3100 validate_id_requestcxx . . $ validate_id_request# val_user;
3101 strcpy(val_user.tracker_idcxx . . $ validate_id_request#tracker_id., sztrackeridcxx . . $ sztrackerid.);
3102 strcpy(val_user.logincxx . . $ validate_id_request#login., szloginidcxx . . $ szloginid.);
3103 strcpy(val_user.passwordcxx . . $ validate_id_request#password., szpasswordcxx . . $ szpassword.);
3104
3105 valret = ValidateUsercxx . . $ ValidateUser(1b54b1e9ed0f18f2).(&val_user, sztrackeridcxx . . $ sztrackerid.);
3106 while (valret == 0) {
3107 valret = ValidateUsercxx . . $ ValidateUser(1b54b1e9ed0f18f2).(nullptr, nullptr);
3108 DLLDescentDefercxx . . $ DLLDescentDefer.();
3109 }
3110 if (valret == 1) {
3111 // User was validated
3112 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker user validated!\n");
3113 DLLPrintDedicatedMessagecxx . . $ DLLPrintDedicatedMessage.("Mastertracker user validated.\n");
3114 strcpy(DLLTracker_idcxx . . $ DLLTracker_id., sztrackeridcxx . . $ sztrackerid.);
3115 strcpy(DLLMPlayerscxx . . $ DLLMPlayers.[DLLPlayer_numcxx . . $ DLLPlayer_num.].tracker_idcxx . . $ player#tracker_id., sztrackeridcxx . . $ sztrackerid.);
3116
3117 } else if (valret == -1) {
3118 // User invalid!
3119 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker user not validated!\n");
3120 DLLPrintDedicatedMessagecxx . . $ DLLPrintDedicatedMessage.("Mastertracker user not validated!\n");
3121 goto failed_login;
3122 } else {
3123 // timeout waiting for tracker!
3124 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mastertracker timeout!\n");
3125 DLLPrintDedicatedMessagecxx . . $ DLLPrintDedicatedMessage.("Mastertracker timeout!\n");
3126 goto failed_login;
3127 }
3128
3129 *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 1;
3130 *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 1;
3131 // strcpy(DLLD3_tracker_info.game_name,DLLNetgame->name);
3132 // strcpy(DLLD3_tracker_info.mission_name,DLLNetgame->mission);
3133 strcpy(DLLD3_tracker_infocxx . . $ DLLD3_tracker_info..lobbycxx . . $ d3_net_game_data_tiny#lobby., DLLPXO_hosted_lobby_namecxx . . $ DLLPXO_hosted_lobby_name.);
3134
3135 failed_login:
3136 // Run this to make sure we properly ACK the server.
3137 for (int j = 0; j < 10; j++)
3138 PollPTrackNetcxx . . $ PollPTrackNet(49f6e7a06ebc5aa8).();
3139 }
3140
3141 #define MAX_MOTD_LENcxx . . $ `netcon/mtclient/mtclient.cpp:3141:9`! 400
3142 #define NUM_MOTD_LINEScxx . . $ `netcon/mtclient/mtclient.cpp:3142:9`! 6
3143 #define MOTD_WIDTHcxx . . $ `netcon/mtclient/mtclient.cpp:3143:9`! 384
3144 #define MOTD_HEIGHTcxx . . $ `netcon/mtclient/mtclient.cpp:3144:9`! 256
3145
3146 int ShowMessageOfTheDaycxx . . $ ShowMessageOfTheDay(b126dc7c1de90089).(void) {
3147 static char szlastmotd[MAX_MOTD_LENcxx . . $ `netcon/mtclient/mtclient.cpp:3141:9`!];
3148 static char sznewmotd[MAX_MOTD_LENcxx . . $ `netcon/mtclient/mtclient.cpp:3141:9`!];
3149 int motdlen = MAX_MOTD_LENcxx . . $ `netcon/mtclient/mtclient.cpp:3141:9`!;
3150 int res;
3151 int rval = 0;
3152 static void *main_wnd;
3153 void *close_hs;
3154
3155 int last_motd_version = 0;
3156
3157 DLLDatabaseReadIntcxx . . $ DLLDatabaseReadInt.("MOTDVersion", &last_motd_version);
3158
3159 if (Motd_versioncxx . . $ Motd_version. == last_motd_version) {
3160 // MOTD is old....
3161 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "MOTD is old, skipping\n");
3162 return 1;
3163 }
3164
3165 DLLDatabaseWriteIntcxx . . $ DLLDatabaseWriteInt.("MOTDVersion", Motd_versioncxx . . $ Motd_version.);
3166
3167 void *close_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CLOSEcxx . . $ `netcon/mtclient/mtstrings.h:87:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!);
3168 void *close_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_PXO_CLOSEcxx . . $ `netcon/mtclient/mtstrings.h:87:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!);
3169 void *motd_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).("PXO Message of the day", UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!);
3170
3171 main_wnd = DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.(0, 0, MOTD_WIDTHcxx . . $ `netcon/mtclient/mtclient.cpp:3143:9`!, MOTD_HEIGHTcxx . . $ `netcon/mtclient/mtclient.cpp:3144:9`!, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | NUWF_TITLELARGEcxx . . $ `Descent3/newui.h:200:9`!);
3172
3173 void *console_item = DLLUIConsoleGadgetCreatecxx . . $ DLLUIConsoleGadgetCreate.(main_wnd, 15, 20, 30, 0, 40, 20, 0);
3174 void *title = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, motd_text, 0, 7, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
3175
3176 close_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, close_off_text, close_on_text, 60, MOTD_HEIGHTcxx . . $ `netcon/mtclient/mtclient.cpp:3144:9`! - 60, 60, 20,
3177 UIF_CENTERcxx . . $ `ui/ui.h:342:9`!);
3178
3179 DLLDatabaseReadcxx . . $ DLLDatabaseRead.("LastMOTD", szlastmotd, &motdlen);
3180
3181 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Getting message of the day...\n");
3182 DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.(TXT_PXO_CONNECTINGcxx . . $ `netcon/mtclient/mtstrings.h:52:9`!, 1);
3183 int mcode = GetD3MOTDcxx . . $ GetD3MOTD(6abd07ddb1a912f0).(sznewmotd, MAX_MOTD_LENcxx . . $ `netcon/mtclient/mtclient.cpp:3141:9`!);
3184 do {
3185 mcode = GetD3MOTDcxx . . $ GetD3MOTD(6abd07ddb1a912f0).(nullptr, 0);
3186 res = DLLPollUIcxx . . $ DLLPollUI.();
3187 if (res == 99) {
3188 GetD3MOTDCancelcxx . . $ GetD3MOTDCancel(b126dc7c1de90089).();
3189 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
3190 goto close_motd;
3191 }
3192 DLLDescentDefercxx . . $ DLLDescentDefer.();
3193 } while (mcode == 0);
3194
3195 DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.();
3196
3197 if (mcode == 1) {
3198 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Message of the day: %s\n", sznewmotd);
3199 if (strcmp(szlastmotd, sznewmotd) != 0) {
3200 DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.(main_wnd);
3201 DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.(console_item, sznewmotd);
3202 DLLDatabaseWritecxx . . $ DLLDatabaseWrite.("LastMOTD", sznewmotd, strlen(sznewmotd) + 1);
3203 do {
3204 res = DLLPollUIcxx . . $ DLLPollUI.();
3205 DLLDescentDefercxx . . $ DLLDescentDefer.();
3206 } while (res != UID_OKcxx . . $ `ui/ui.h:368:9`!);
3207 DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.(main_wnd);
3208 rval = 1;
3209 goto close_motd;
3210 } else {
3211 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Message of the day is old, ignoring!\n");
3212 rval = 1;
3213 goto close_motd;
3214 }
3215 } else {
3216 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Get message of the day failed (%d)!\n", mcode);
3217 goto close_motd;
3218 }
3219
3220 close_motd:
3221 DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Ending motd\n");
3222 DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.(main_wnd);
3223 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(motd_text);
3224 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(close_on_text);
3225 DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(close_off_text);
3226
3227 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(console_item);
3228 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(title);
3229 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(close_hs);
3230 DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd);
3231 return rval;
3232 }