| 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/lanclient/lanclient.cpp $ |
| 21 | * $Revision: 1.3 $ |
| 22 | * $Date: 2004/02/25 00:04:06 $ |
| 23 | * $Author: ryan $ |
| 24 | * |
| 25 | * LAN Client DLL |
| 26 | * |
| 27 | * $Log: lanclient.cpp,v $ |
| 28 | * Revision 1.3 2004/02/25 00:04:06 ryan |
| 29 | * Removed loki_utils dependency and ported to MacOS X (runs, but incomplete). |
| 30 | * |
| 31 | * Revision 1.2 2000/05/29 05:30:46 icculus |
| 32 | * support for static linking into main executable. |
| 33 | * |
| 34 | * Revision 1.1.1.1 2000/04/18 00:00:38 icculus |
| 35 | * initial checkin |
| 36 | * |
| 37 | * |
| 38 | * 75 10/21/99 9:27p Jeff |
| 39 | * B.A. Macintosh code merge |
| 40 | * |
| 41 | * 74 8/24/99 5:47p Kevin |
| 42 | * Macintosh crap |
| 43 | * |
| 44 | * 73 5/23/99 2:38a Kevin |
| 45 | * fixed text overlapping thingy |
| 46 | * |
| 47 | * 72 5/20/99 9:18p Kevin |
| 48 | * removed invisible hotspot |
| 49 | * |
| 50 | * 71 5/04/99 5:39p Kevin |
| 51 | * connection dll & pxo game tracking improvements (added server type to |
| 52 | * list) |
| 53 | * |
| 54 | * 70 5/01/99 3:16p Kevin |
| 55 | * |
| 56 | * 69 4/29/99 11:49a Kevin |
| 57 | * enabled the 'i' key in the game list |
| 58 | * |
| 59 | * 68 4/28/99 6:39p Kevin |
| 60 | * Build 182 fixes |
| 61 | * |
| 62 | * 67 4/25/99 5:20p Kevin |
| 63 | * fixed a bug where the last item would never dissapear |
| 64 | * |
| 65 | * 66 4/25/99 5:02p Kevin |
| 66 | * Bunches of multiplayer UI improvements |
| 67 | * |
| 68 | * 65 4/22/99 3:43p Kevin |
| 69 | * Training missions show controls on screen |
| 70 | * |
| 71 | * 64 4/18/99 3:12p Jeff |
| 72 | * got working for linux |
| 73 | * |
| 74 | * 63 4/17/99 3:44p Kevin |
| 75 | * Demo2 changes & fixes |
| 76 | * |
| 77 | * 62 4/14/99 1:22a Jeff |
| 78 | * fixed case mismatched #includes |
| 79 | * |
| 80 | * 61 4/03/99 9:26p Jeff |
| 81 | * changed dialogs that weren't using UID_OK and UID_CANCEL to use and |
| 82 | * handle them properly |
| 83 | * |
| 84 | * 60 3/17/99 4:08p Kevin |
| 85 | * Changed the way games appear and timeout in the game list. |
| 86 | * |
| 87 | * 59 2/19/99 5:21p Kevin |
| 88 | * Fixed some connection DLLs and a Direct Sound bug with threads. |
| 89 | * |
| 90 | * 58 2/08/99 11:44p Kevin |
| 91 | * Fixed a bug with entering addresses |
| 92 | * |
| 93 | * 57 2/03/99 4:20p Kevin |
| 94 | * Got multiplayer working with .mn3 files, and setup autodownloading |
| 95 | * |
| 96 | * 56 1/23/99 3:19p Kevin |
| 97 | * Made gamelist boxes not sort |
| 98 | * |
| 99 | * 55 1/07/99 11:51a Kevin |
| 100 | * Added support for joining servers on alternate ports and hosting behind |
| 101 | * a proxy/firewall |
| 102 | * |
| 103 | * 54 12/30/98 12:16p Kevin |
| 104 | * Auto Mission Download system |
| 105 | * |
| 106 | * 53 12/14/98 10:53a Jason |
| 107 | * added bright player ships option |
| 108 | * |
| 109 | * 52 12/04/98 4:37p Kevin |
| 110 | * Fixed selection being reset in game lists... |
| 111 | * |
| 112 | * 51 12/01/98 12:47p Jason |
| 113 | * got rid of NF_DROPMISORDERED and added NF_USE_SMOOTHING |
| 114 | * |
| 115 | * 50 11/18/98 3:26p Kevin |
| 116 | * Put multiplayer options into con_dll.h |
| 117 | * |
| 118 | * 49 10/19/98 2:48p Kevin |
| 119 | * Added accurate weapon thingy for Chris |
| 120 | * |
| 121 | * 48 10/17/98 2:32p Kevin |
| 122 | * FIxed problem with banned users getting stuck on the ban message |
| 123 | * screen. |
| 124 | * |
| 125 | * 47 10/15/98 12:08p Kevin |
| 126 | * Changed game list to line up differently |
| 127 | * |
| 128 | * 46 10/13/98 3:41p Kevin |
| 129 | * bug fixes |
| 130 | * |
| 131 | * 45 10/12/98 8:39p Kevin |
| 132 | * removed mprintf's and fixed some smallish bugs |
| 133 | * |
| 134 | * 44 10/08/98 3:37p Jeff |
| 135 | * removed time_left from Netgame |
| 136 | * |
| 137 | * 43 10/01/98 11:37a Kevin |
| 138 | * UI fixes and stuff |
| 139 | * |
| 140 | * 42 9/29/98 2:23p Kevin |
| 141 | * More UI tweaks |
| 142 | * |
| 143 | * 41 9/28/98 4:21p Kevin |
| 144 | * Redesigned game list menus |
| 145 | * |
| 146 | * 40 9/28/98 11:25a Kevin |
| 147 | * |
| 148 | * 39 9/28/98 11:24a Kevin |
| 149 | * More UI improvements |
| 150 | * |
| 151 | * 38 9/28/98 11:02a Kevin |
| 152 | * added Networking defer, and fixed some UI issues |
| 153 | * |
| 154 | * 37 9/28/98 9:53a Kevin |
| 155 | * Fixing misc UI problems, and fixed some bugs that VC 6 found |
| 156 | * |
| 157 | * 36 9/25/98 11:07a Kevin |
| 158 | * fixed columns to line up and cleaned up some PXO bugs |
| 159 | * |
| 160 | * 35 9/24/98 12:50p Kevin |
| 161 | * Added UI for rotational velocity and drop out of order packets in net |
| 162 | * games |
| 163 | * |
| 164 | * 34 9/23/98 6:33p Kevin |
| 165 | * Fixed load settings |
| 166 | * |
| 167 | * 33 9/23/98 2:55p Kevin |
| 168 | * Saved multi config and changed UI to conform |
| 169 | * |
| 170 | * 32 9/22/98 3:55p Kevin |
| 171 | * Removed obsolete function |
| 172 | * |
| 173 | * 31 9/22/98 2:29p Kevin |
| 174 | * moved ships allowed code out of dll and into main app. Also added |
| 175 | * powerup exclusions |
| 176 | * |
| 177 | * 30 9/21/98 11:19a Kevin |
| 178 | * check protocol before entering multiplayer screens |
| 179 | * |
| 180 | * 29 9/15/98 12:42p Jason |
| 181 | * got dedicated server actually working |
| 182 | * |
| 183 | * 28 9/14/98 2:36p Kevin |
| 184 | * fixed some UI issues |
| 185 | * |
| 186 | * 27 9/09/98 12:41p Kevin |
| 187 | * Fixed up some UI issues |
| 188 | * |
| 189 | * 26 9/04/98 3:46p Kevin |
| 190 | * Added ping_time to Netplayers struct. It's updated in peer-peer and |
| 191 | * client server |
| 192 | * |
| 193 | * 25 8/27/98 5:03p Kevin |
| 194 | * Prettied up multiplayer screens and fixed some bugs. |
| 195 | * |
| 196 | * 24 8/24/98 5:04p Kevin |
| 197 | * Made msn files have the option to not be playable in multiplayer |
| 198 | * |
| 199 | * 23 8/24/98 12:37p Kevin |
| 200 | * added background bmp things |
| 201 | * |
| 202 | * 22 8/19/98 11:49a Kevin |
| 203 | * Got DirectPlay IPX working, and localized connection DLLs |
| 204 | * |
| 205 | * 21 8/17/98 11:00a Kevin |
| 206 | * Moved DLLs into subdirectories |
| 207 | * |
| 208 | * 20 8/07/98 12:39p Jeff |
| 209 | * added "allowed ships" to multiplayer options |
| 210 | * |
| 211 | * 19 8/04/98 10:26a Kevin |
| 212 | * Custom sound and bmp exchange system |
| 213 | * |
| 214 | * 18 7/21/98 1:49p Kevin |
| 215 | * IPX support and peer-peer option for multi |
| 216 | * |
| 217 | * 17 7/20/98 6:20p Kevin |
| 218 | * peer-peer stuff |
| 219 | * |
| 220 | * 16 7/20/98 2:34p Kevin |
| 221 | * Re-wrote the DLL wrapper, to allow for better expandability |
| 222 | * |
| 223 | * 13 7/02/98 4:52p Kevin |
| 224 | * direct ip list fixes |
| 225 | * |
| 226 | * 12 7/02/98 12:19p Kevin |
| 227 | * misc network fixes |
| 228 | * |
| 229 | * 11 6/30/98 3:20p Kevin |
| 230 | * fixed ping time |
| 231 | * |
| 232 | * 10 6/25/98 10:03a Kevin |
| 233 | * Minor chat fixes in PXO |
| 234 | * |
| 235 | * 9 6/24/98 6:40p Kevin |
| 236 | * Added help to main dll menu |
| 237 | * |
| 238 | * 8 6/24/98 5:12p Kevin |
| 239 | * Fixed bug with main menu crashing |
| 240 | * |
| 241 | * 7 6/24/98 3:24p Kevin |
| 242 | * Updated PXO screens with chat, etc. |
| 243 | * |
| 244 | * 6 6/18/98 4:49p Kevin |
| 245 | * Updated multiplayer menus |
| 246 | * |
| 247 | * 5 6/11/98 1:56p Jeff |
| 248 | * looks for d3m files instead of dll |
| 249 | * |
| 250 | * 4 6/05/98 2:58p Jeff |
| 251 | * changes made for new module library |
| 252 | * |
| 253 | * 3 6/01/98 3:52p Kevin |
| 254 | * changed listbox item to be white |
| 255 | * |
| 256 | * 2 6/01/98 10:10a Kevin |
| 257 | * Added DLL connection interface and auto update DLL |
| 258 | * |
| 259 | * 1 5/28/98 12:14p Kevin |
| 260 | * |
| 261 | * 1 5/18/98 12:47p Kevin |
| 262 | * |
| 263 | * $NoKeywords: $ |
| 264 | */ |
| 265 | |
| 266 | #include "ui.h"cxx . . $ `<file>/ui/ui.h`/ |
| 267 | #include "newui.h"cxx . . $ `<file>/Descent3/newui.h`/ |
| 268 | #include "grdefs.h"cxx . . $ `<file>/lib/grdefs.h`/ |
| 269 | #include "player.h"cxx . . $ `<file>/Descent3/player.h`/ |
| 270 | #include "game.h"cxx . . $ `<file>/Descent3/game.h`/ |
| 271 | #include "pilot.h"cxx . . $ `<file>/Descent3/pilot.h`/ |
| 272 | #include "module.h"cxx . . $ `<file>/lib/module.h`/ |
| 273 | #include "ddio_common.h"cxx . . $ `<file>/ddio/ddio_common.h`/ |
| 274 | |
| 275 | #include "inetgetfile.h"cxx . . $ `<file>/netcon/includes/inetgetfile.h`/ |
| 276 | |
| 277 | #ifdef __STATIC_NETWORK_CLIENTS |
| 278 | #define DLLMultiCall DLLMultiCall_LAN |
| 279 | #define DLLMultiInit DLLMultiInit_LAN |
| 280 | #define DLLMultiClose DLLMultiClose_LAN |
| 281 | #define MainMultiplayerMenu MainMultiplayerMenu_LAN |
| 282 | #define AutoLoginAndJoinGame AutoLoginAndJoinGame_LAN |
| 283 | #endif |
| 284 | |
| 285 | #define TXT_DLL_SAVESETTINGScxx . . $ `netcon/lanclient/lanclient.cpp:285:9`! TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(27) |
| 286 | #define TXT_DLL_LOADSETTINGScxx . . $ `netcon/lanclient/lanclient.cpp:286:9`! TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(28) |
| 287 | |
| 288 | /////////////////////////////////////////////// |
| 289 | // localization header |
| 290 | #include "lanstrings.h"cxx . . $ `<file>/netcon/lanclient/lanstrings.h`/ |
| 291 | |
| 292 | #define TXT_GEN_MPLYROPTIONScxx . . $ `netcon/lanclient/lanclient.cpp:292:9`! TXT_LC_MPLYROPTIONS |
| 293 | #define TXT_GEN_TIMELIMITcxx . . $ `netcon/lanclient/lanclient.cpp:293:9`! TXT_LC_TIMELIMIT |
| 294 | #define TXT_GEN_KILLGOALcxx . . $ `netcon/lanclient/lanclient.cpp:294:9`! TXT_LC_KILLGOAL |
| 295 | #define TXT_GEN_PPScxx . . $ `netcon/lanclient/lanclient.cpp:295:9`! TXT_LC_PPS |
| 296 | #define TXT_GEN_RESPAWNRATEcxx . . $ `netcon/lanclient/lanclient.cpp:296:9`! TXT_LC_RESPAWNRATE |
| 297 | #define TXT_GEN_MAXPLAYERScxx . . $ `netcon/lanclient/lanclient.cpp:297:9`! TXT_LC_MAXPLAYERS |
| 298 | #define TXT_GEN_PREVMENUcxx . . $ `netcon/lanclient/lanclient.cpp:298:9`! TXT_LC_PREVMENU |
| 299 | #define TXT_GEN_CANCELcxx . . $ `netcon/lanclient/lanclient.cpp:299:9`! TXT_LC_CANCEL |
| 300 | #define TXT_GEN_CFGALLOWEDSHIPcxx . . $ `netcon/lanclient/lanclient.cpp:300:9`! TXT_LC_CFGALLOWEDSHIP |
| 301 | #define TXT_GEN_USEROTVELcxx . . $ `netcon/lanclient/lanclient.cpp:301:9`! TXT_LC_USEROTVEL |
| 302 | #define TXT_GEN_USEROTVELcxx . . $ `netcon/lanclient/lanclient.cpp:302:9`! TXT_LC_USEROTVEL |
| 303 | #define TXT_GEN_USESMOOTHINGcxx . . $ `netcon/lanclient/lanclient.cpp:303:9`! TXT_LC_USESMOOTHING |
| 304 | #define TXT_GEN_CLIENTSERVERcxx . . $ `netcon/lanclient/lanclient.cpp:304:9`! TXT_LC_CLIENTSERVER |
| 305 | #define TXT_GEN_PEERPEERcxx . . $ `netcon/lanclient/lanclient.cpp:305:9`! TXT_LC_PEERPEER |
| 306 | #define TXT_GEN_ACC_WEAP_COLLcxx . . $ `netcon/lanclient/lanclient.cpp:306:9`! TXT_LC_ACC_WEAP_COLL |
| 307 | #define TXT_GEN_BRIGHT_PLAYERScxx . . $ `netcon/lanclient/lanclient.cpp:307:9`! TXT_LC_BRIGHT_PLAYERS |
| 308 | |
| 309 | #define MULTI_USE_ALL_OPTIONScxx . . $ `netcon/lanclient/lanclient.cpp:309:9`! 1 |
| 310 | |
| 311 | #include "lanclient.h"cxx . . $ `<file>/netcon/lanclient/lanclient.h`/ |
| 312 | #include "DLLUiItems.h"cxx . . $ `<file>/netcon/includes/DLLUiItems.h`/ |
| 313 | |
| 314 | using namespace lanclient; |
| 315 | |
| 316 | // int DLLUIClass_CurrID = 0xD0; |
| 317 | |
| 318 | #define MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`! 100 |
| 319 | #define JEFF_REDcxx . . $ `netcon/lanclient/lanclient.cpp:319:9`! GR_RGB(255, 40, 40) |
| 320 | #define JEFF_BLUEcxx . . $ `netcon/lanclient/lanclient.cpp:320:9`! GR_RGB(40, 40, 255) |
| 321 | #define JEFF_GREENcxx . . $ `netcon/lanclient/lanclient.cpp:321:9`! GR_RGB(40, 255, 40) |
| 322 | #define NETPOLLINTERVALcxx . . $ `netcon/lanclient/lanclient.cpp:322:9`! 10.0 |
| 323 | |
| 324 | extern int MTAVersionCheckcxx . . $ MTAVersionCheck(fa84e865f2d62ca9).(uint32_tcxx . . $ uint32_t# oldver, char *URL); |
| 325 | ///////////////////////////// |
| 326 | // Defines |
| 327 | |
| 328 | // These next two function prototypes MUST appear in the extern "C" block if called |
| 329 | // from a CPP file. |
| 330 | extern "C" { |
| 331 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiInit(int *api_func); |
| 332 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiCall(int eventnum); |
| 333 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiClose(); |
| 334 | } |
| 335 | |
| 336 | static bool All_okcxx . . $ All_ok. = true; |
| 337 | // Initializes the game function pointers |
| 338 | void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiInitcxx . . $ DLLMultiInit(11b0e290e57a7e53).(int *api_func) { |
| 339 | Use_netgame_flagscxx . . $ Use_netgame_flags. = 1; |
| 340 | #include "mdllinit.h"cxx . . $ `<file>/netcon/includes/mdllinit.h`/ |
| 341 | DLLCreateStringTablecxx . . $ DLLCreateStringTable.("lanclient.str", &StringTablecxx . . $ StringTable., &StringTableSizecxx . . $ StringTableSize.); |
| 342 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "%d strings loaded from string table\n", StringTableSize); |
| 343 | if (!StringTableSizecxx . . $ StringTableSize.) { |
| 344 | All_okcxx . . $ All_ok. = false; |
| 345 | return; |
| 346 | } |
| 347 | *DLLUse_DirectPlaycxx . . $ DLLUse_DirectPlay. = false; |
| 348 | } |
| 349 | |
| 350 | // Called when the DLL is shutdown |
| 351 | void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiClosecxx . . $ DLLMultiClose(49f6e7a06ebc5aa8).() { DLLDestroyStringTablecxx . . $ DLLDestroyStringTable.(StringTablecxx . . $ StringTable., StringTableSizecxx . . $ StringTableSize.); } |
| 352 | |
| 353 | // The main entry point where the game calls the dll |
| 354 | void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLMultiCallcxx . . $ DLLMultiCall(d4f767463ce0a6b3).(int eventnum) { |
| 355 | |
| 356 | switch (eventnum) { |
| 357 | case MT_EVT_GET_HELPcxx . . $ `Descent3/multi_external.h:141:9`!: |
| 358 | strcpy(DLLHelpText1cxx . . $ DLLHelpText1., TXT_LC_HELP1cxx . . $ `netcon/lanclient/lanstrings.h:24:9`!); |
| 359 | strcpy(DLLHelpText2cxx . . $ DLLHelpText2., TXT_LC_HELP2cxx . . $ `netcon/lanclient/lanstrings.h:25:9`!); |
| 360 | strcpy(DLLHelpText3cxx . . $ DLLHelpText3., TXT_LC_HELP3cxx . . $ `netcon/lanclient/lanstrings.h:28:9`!); |
| 361 | strcpy(DLLHelpText4cxx . . $ DLLHelpText4., TXT_LC_HELP4cxx . . $ `netcon/lanclient/lanstrings.h:29:9`!); |
| 362 | break; |
| 363 | case MT_AUTO_STARTcxx . . $ `Descent3/multi_external.h:143:9`!: |
| 364 | if (!All_okcxx . . $ All_ok.) |
| 365 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0; |
| 366 | else |
| 367 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 1; |
| 368 | break; |
| 369 | case MT_RETURN_TO_GAME_LISTcxx . . $ `Descent3/multi_external.h:144:9`!: |
| 370 | case MT_EVT_LOGINcxx . . $ `Descent3/multi_external.h:137:9`!: |
| 371 | if (!DLLTCP_activecxx . . $ DLLTCP_active.) { |
| 372 | DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_LC_ERRORcxx . . $ `netcon/lanclient/lanstrings.h:51:9`!, TXT_LC_NO_TCPIPcxx . . $ `netcon/lanclient/lanstrings.h:52: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`!); |
| 373 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0; |
| 374 | break; |
| 375 | } |
| 376 | if (!All_okcxx . . $ All_ok.) |
| 377 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0; |
| 378 | else |
| 379 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = MainMultiplayerMenucxx . . $ lanclient/MainMultiplayerMenu(b126dc7c1de90089).(); |
| 380 | break; |
| 381 | case MT_EVT_FRAMEcxx . . $ `Descent3/multi_external.h:139:9`!: |
| 382 | |
| 383 | break; |
| 384 | case MT_EVT_FIRST_FRAMEcxx . . $ `Descent3/multi_external.h:138:9`!: |
| 385 | |
| 386 | break; |
| 387 | case MT_EVT_GAME_OVERcxx . . $ `Descent3/multi_external.h:140:9`!: |
| 388 | break; |
| 389 | case MT_AUTO_LOGINcxx . . $ `Descent3/multi_external.h:142:9`!: |
| 390 | if (!DLLTCP_activecxx . . $ DLLTCP_active.) { |
| 391 | DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_LC_ERRORcxx . . $ `netcon/lanclient/lanstrings.h:51:9`!, TXT_LC_NO_TCPIPcxx . . $ `netcon/lanclient/lanstrings.h:52: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`!); |
| 392 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0; |
| 393 | break; |
| 394 | } |
| 395 | if (All_okcxx . . $ All_ok.) |
| 396 | AutoLoginAndJoinGamecxx . . $ lanclient/AutoLoginAndJoinGame(49f6e7a06ebc5aa8).(); |
| 397 | break; |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | namespace lanclientcxx . . $ lanclient/ { |
| 402 | #define GET_INFO_IDcxx . . $ `netcon/lanclient/lanclient.cpp:402:9`! 50 |
| 403 | // The first multiplayer menu that the user will see...all multiplayer stuff is |
| 404 | // reached from this menu |
| 405 | // Returns true if we're starting a multiplayer game |
| 406 | int MainMultiplayerMenucxx . . $ lanclient/MainMultiplayerMenu(b126dc7c1de90089).() { |
| 407 | |
| 408 | char selgame[200] = ""; |
| 409 | void *join_LC_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_RETURNMAINcxx . . $ `netcon/lanclient/lanstrings.h:26:9`!, GR_BLACKcxx . . $ GR_BLACK.); // return_menu |
| 410 | void *list_head_txt = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_GAMELISTHDRcxx . . $ `netcon/lanclient/lanstrings.h:27:9`!, UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!); |
| 411 | void *exit_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_EXITcxx . . $ `netcon/lanclient/lanstrings.h:31:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!); |
| 412 | void *exit_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_EXITcxx . . $ `netcon/lanclient/lanstrings.h:31:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!); |
| 413 | void *join_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_JOINSELcxx . . $ `netcon/lanclient/lanstrings.h:32:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!); |
| 414 | void *join_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_JOINSELcxx . . $ `netcon/lanclient/lanstrings.h:32:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!); |
| 415 | void *start_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_STARTNEWcxx . . $ `netcon/lanclient/lanstrings.h:33:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!); |
| 416 | void *start_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_STARTNEWcxx . . $ `netcon/lanclient/lanstrings.h:33:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!); |
| 417 | void *srch_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_SRCHADDRcxx . . $ `netcon/lanclient/lanstrings.h:34:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!); |
| 418 | void *srch_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_SRCHADDRcxx . . $ `netcon/lanclient/lanstrings.h:34:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!); |
| 419 | void *scan_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_SCANLOCALcxx . . $ `netcon/lanclient/lanstrings.h:35:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!); |
| 420 | void *scan_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_SCANLOCALcxx . . $ `netcon/lanclient/lanstrings.h:35:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!); |
| 421 | void *game_hdr_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_LC_GAMEHEADERcxx . . $ `netcon/lanclient/lanstrings.h:57:9`!, UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, DLL_BIG_BRIEFING_FONTcxx . . $ `netcon/includes/con_dll.h:302:9`!); |
| 422 | |
| 423 | int exit_menu = 0; |
| 424 | void *net_game_txt_items[MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!]; |
| 425 | int a; |
| 426 | for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!; a++) |
| 427 | net_game_txt_items[a] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 428 | int ret = 0; |
| 429 | uint8_tcxx . . $ uint8_t# oldalpha = *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha.; |
| 430 | int cury = 40; |
| 431 | |
| 432 | DLLSetScreenModecxx . . $ DLLSetScreenMode.(SM_MENUcxx . . $ SM_MENU.); |
| 433 | *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha. = 255; |
| 434 | |
| 435 | void *main_wnd = DLLNewUIWindowCreatecxx . . $ DLLNewUIWindowCreate.(0, 0, 640, 480, UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`!); |
| 436 | |
| 437 | void *info_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).("", UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!); |
| 438 | void *info_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, GET_INFO_IDcxx . . $ `netcon/lanclient/lanclient.cpp:402:9`!, KEY_Icxx . . $ `ddio/ddio_common.h:237:9`!, info_on_text, info_on_text, 1, 1, 1, 1, 0); |
| 439 | |
| 440 | void *screen_header = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, game_hdr_text, 45, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 441 | cury += 35; |
| 442 | 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`!); |
| 443 | cury += 25; |
| 444 | void *srch_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 9, KEY_Acxx . . $ `ddio/ddio_common.h:229:9`!, srch_off_text, srch_on_text, 320, cury, 250, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 445 | cury += 25; |
| 446 | void *edit_box = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, 9, 10, cury, 300, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 447 | cury += 35; |
| 448 | void *scan_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, 8, KEY_Lcxx . . $ `ddio/ddio_common.h:240:9`!, scan_off_text, scan_on_text, 320, cury, 200, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 449 | cury += 50; |
| 450 | void *list_header = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, list_head_txt, 45, cury, 0); |
| 451 | cury += 13; |
| 452 | void *main_list = DLLListCreatecxx . . $ DLLListCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, 10, cury, 600, 170, UIF_CENTERcxx . . $ `ui/ui.h:342:9`! | UILB_NOSORTcxx . . $ `ui/ui.h:356:9`!); |
| 453 | cury += 200; |
| 454 | void *join_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, join_off_text, join_on_text, 100, cury, 130, 15, 0); |
| 455 | void *exit_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_CANCELcxx . . $ `ui/ui.h:369:9`!, KEY_ESCcxx . . $ `ddio/ddio_common.h:267:9`!, exit_off_text, exit_on_text, 400, cury, 70, 15, 0); |
| 456 | char szdip[30] = ""; |
| 457 | int diplen = 29; |
| 458 | DLLDatabaseReadcxx . . $ DLLDatabaseRead.("DirectIP", szdip, &diplen); |
| 459 | DLLEditSetTextcxx . . $ DLLEditSetText.(edit_box, szdip); |
| 460 | |
| 461 | DLLNewUIWindowLoadBackgroundImagecxx . . $ DLLNewUIWindowLoadBackgroundImage.(main_wnd, "multimain.ogf"); |
| 462 | DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd); |
| 463 | *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known. = 0; |
| 464 | int lastgamesfound = 0; |
| 465 | int itemp; |
| 466 | int looklocal = 1; |
| 467 | void *selti = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 468 | |
| 469 | float lastpoll = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.(); |
| 470 | DLLSearchForLocalGamesTCPcxx . . $ DLLSearchForLocalGamesTCP.(0xffffffffl, htons(DEFAULT_GAME_PORTcxx . . $ `lib/networking.h:323:9`!)); |
| 471 | // Menu loop |
| 472 | while (!exit_menu) { |
| 473 | int res; |
| 474 | int selno; |
| 475 | DLLUpdateAndPackGameListcxx . . $ DLLUpdateAndPackGameList.(); |
| 476 | |
| 477 | if (((itemp = DLLSearchForLocalGamesTCPcxx . . $ DLLSearchForLocalGamesTCP.(0, 0)) != 0) || (*DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed.)) { |
| 478 | // if(itemp != lastgamesfound) |
| 479 | if (*DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed.) { |
| 480 | // We found a new game! |
| 481 | *DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed. = false; |
| 482 | selti = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 483 | lastgamesfound = itemp; |
| 484 | // Get the currently selected item |
| 485 | // char * psel = DLLListGetItem(main_list,DLLListGetSelectedIndex(main_list)) ; |
| 486 | // selno = DLLListGetSelectedIndex(main_list); |
| 487 | // strcpy(selgame,DLLNetwork_games[selno].name); |
| 488 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Selected item = %s\n", selgame); |
| 489 | selti = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 490 | DLLListRemoveAllcxx . . $ DLLListRemoveAll.(main_list); |
| 491 | for (int k = 0; k < *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; k++) { |
| 492 | char fmtline[200]; |
| 493 | char server_mode[20]; |
| 494 | |
| 495 | if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].flagscxx . . $ network_game#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!) { |
| 496 | strcpy(server_mode, "PP"); |
| 497 | } else if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].flagscxx . . $ network_game#flags. & NF_PERMISSABLEcxx . . $ `Descent3/multi_external.h:239:9`!) { |
| 498 | strcpy(server_mode, "PS"); |
| 499 | } else { |
| 500 | strcpy(server_mode, "CS"); |
| 501 | } |
| 502 | |
| 503 | if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].flagscxx . . $ network_game#flags. & NF_ALLOW_MLOOKcxx . . $ `Descent3/multi_external.h:242:9`!) { |
| 504 | strcat(server_mode, "-ML"); |
| 505 | } |
| 506 | |
| 507 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Found game: %s\n", DLLNetwork_games[k].name); |
| 508 | snprintf(fmtline, sizeof(fmtline), "%.20s\t\x02\x02b%s %.10s\x02\x45%.15s\x02\x63%d\x02\x6d%d/%d\x02\x7e%.3f", |
| 509 | DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].namecxx . . $ network_game#name., server_mode, DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].scriptnamecxx . . $ network_game#scriptname., |
| 510 | DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].mission_namecxx . . $ network_game#mission_name., DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].level_numcxx . . $ network_game#level_num., |
| 511 | 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., |
| 512 | DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].server_response_timecxx . . $ network_game#server_response_time.); |
| 513 | |
| 514 | if (DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].dedicated_servercxx . . $ network_game#dedicated_server.) { |
| 515 | net_game_txt_items[k] = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtline, GR_WHITEcxx . . $ GR_WHITE.); |
| 516 | } else { |
| 517 | net_game_txt_items[k] = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(fmtline, GR_LIGHTGRAYcxx . . $ GR_LIGHTGRAY.); |
| 518 | } |
| 519 | |
| 520 | selgame[20] = '\0'; |
| 521 | if (strncmp(selgame, DLLNetwork_gamescxx . . $ DLLNetwork_games.[k].namecxx . . $ network_game#name., 19) == 0) { |
| 522 | selti = net_game_txt_items[k]; |
| 523 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Found previously selected game in list, reselecting...\n"); |
| 524 | } |
| 525 | DLLListAddItemcxx . . $ DLLListAddItem.(main_list, net_game_txt_items[k]); |
| 526 | } |
| 527 | if (selti) { |
| 528 | DLLListSelectItemcxx . . $ DLLListSelectItem.(main_list, selti); |
| 529 | } |
| 530 | } |
| 531 | } |
| 532 | if ((looklocal) && ((DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.() - lastpoll) > NETPOLLINTERVALcxx . . $ `netcon/lanclient/lanclient.cpp:322:9`!)) { |
| 533 | DLLSearchForLocalGamesTCPcxx . . $ DLLSearchForLocalGamesTCP.(0xffffffffl, htons(DEFAULT_GAME_PORTcxx . . $ `lib/networking.h:323:9`!)); |
| 534 | //*DLLNum_network_games_known = 0; |
| 535 | // DLLListRemoveAll(main_list); |
| 536 | lastgamesfound = 0; |
| 537 | lastpoll = DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.(); |
| 538 | selno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(main_list); |
| 539 | if (selno >= 0) |
| 540 | strcpy(selgame, DLLNetwork_gamescxx . . $ DLLNetwork_games.[selno].namecxx . . $ network_game#name.); |
| 541 | else |
| 542 | selgame[0] = '\0'; |
| 543 | } |
| 544 | res = DLLPollUIcxx . . $ DLLPollUI.(); |
| 545 | |
| 546 | if (res == -1) { |
| 547 | continue; |
| 548 | } |
| 549 | // handle all UI results. |
| 550 | switch (res) { |
| 551 | |
| 552 | case UID_CANCELcxx . . $ `ui/ui.h:369:9`!: |
| 553 | DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd); |
| 554 | exit_menu = 1; |
| 555 | break; |
| 556 | case UID_OKcxx . . $ `ui/ui.h:368:9`!: |
| 557 | // Double click on listbox, or join selected hit. |
| 558 | if (*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.) { |
| 559 | // Get the appropriate game address |
| 560 | int gameno; |
| 561 | gameno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(main_list); |
| 562 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Selected item is %d\n", gameno); |
| 563 | network_addresscxx . . $ network_address# s_address; |
| 564 | memcpy(&s_address, &DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].addrcxx . . $ network_game#addr., sizeof(network_addresscxx . . $ network_address#)); |
| 565 | s_address.connection_typecxx . . $ network_address#connection_type. = NP_TCPcxx . . $ NP_TCP.; |
| 566 | // s_address.port=&DLLNetwork_games[gameno].addr.port;//DEFAULT_GAME_PORT; |
| 567 | *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 0; |
| 568 | DLLMultiStartClientcxx . . $ DLLMultiStartClient.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 569 | if (DLLDoPlayerMouselookCheckcxx . . $ DLLDoPlayerMouselookCheck.(DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].flagscxx . . $ network_game#flags.)) { |
| 570 | if (DLLmsn_CheckGetMissioncxx . . $ DLLmsn_CheckGetMission.(&s_address, DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno].missioncxx . . $ network_game#mission.)) { |
| 571 | if ((DLLTryToJoinServercxx . . $ DLLTryToJoinServer.(&s_address))) { |
| 572 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Menu: Game joined!\n"); |
| 573 | DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd); |
| 574 | exit_menu = 1; |
| 575 | ret = 1; |
| 576 | } else { |
| 577 | DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd); |
| 578 | DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd); |
| 579 | } |
| 580 | } |
| 581 | } |
| 582 | } else { |
| 583 | DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(TXT_LC_ERRORcxx . . $ `netcon/lanclient/lanstrings.h:51:9`!, TXT_LC_NO_GAMEScxx . . $ `netcon/lanclient/lanstrings.h:56: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`!); |
| 584 | } |
| 585 | break; |
| 586 | case 7: |
| 587 | // Start a new game |
| 588 | // Start a netgame |
| 589 | DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd); |
| 590 | *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 0; |
| 591 | if (StartMultiplayerGameMenucxx . . $ StartMultiplayerGameMenu(b126dc7c1de90089).()) { |
| 592 | exit_menu = 1; |
| 593 | ret = 1; |
| 594 | } else { |
| 595 | DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd); |
| 596 | } |
| 597 | break; |
| 598 | case 8: |
| 599 | // Scan for local games |
| 600 | *DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed. = true; |
| 601 | *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known. = 0; |
| 602 | looklocal = 1; |
| 603 | lastgamesfound = 0; |
| 604 | selno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(main_list); |
| 605 | if (selno >= 0) |
| 606 | strcpy(selgame, DLLNetwork_gamescxx . . $ DLLNetwork_games.[selno].namecxx . . $ network_game#name.); |
| 607 | else |
| 608 | selgame[0] = '\0'; |
| 609 | |
| 610 | DLLSearchForLocalGamesTCPcxx . . $ DLLSearchForLocalGamesTCP.(0xffffffffl, htons(DEFAULT_GAME_PORTcxx . . $ `lib/networking.h:323:9`!)); |
| 611 | DLLListRemoveAllcxx . . $ DLLListRemoveAll.(main_list); |
| 612 | for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!; a++) |
| 613 | if (net_game_txt_items[a]) |
| 614 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(net_game_txt_items[a]); |
| 615 | for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!; a++) |
| 616 | net_game_txt_items[a] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 617 | break; |
| 618 | case 9: { |
| 619 | // Scan a specific IP |
| 620 | uint16_tcxx . . $ uint16_t# iport = DEFAULT_GAME_PORTcxx . . $ `lib/networking.h:323:9`!; |
| 621 | looklocal = 0; |
| 622 | uint32_tcxx . . $ uint32_t# iaddr; |
| 623 | lastgamesfound = 0; |
| 624 | DLLEditGetTextcxx . . $ DLLEditGetText.(edit_box, szdip, 25); |
| 625 | // Make this IP the default |
| 626 | DLLDatabaseWritecxx . . $ DLLDatabaseWrite.("DirectIP", szdip, strlen(szdip) + 1); |
| 627 | |
| 628 | char *pport = strchr(szdip, ':'); |
| 629 | if (pport) { |
| 630 | *pport = '\0'; |
| 631 | pport++; |
| 632 | iport = atoicxx . . $ atoi(f5ecf3191ed0cd93).(pport); |
| 633 | } |
| 634 | |
| 635 | iaddr = inet_addr(szdip); |
| 636 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Local inet_addr %x\n", iaddr); |
| 637 | if (iaddr && (INADDR_NONEcxx . . $ `<external>/9581057695539925927/in.h:202:9`! != iaddr)) |
| 638 | DLLSearchForLocalGamesTCPcxx . . $ DLLSearchForLocalGamesTCP.(iaddr, htons(iport)); |
| 639 | else |
| 640 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Invalid IP for local search\n"); |
| 641 | DLLListRemoveAllcxx . . $ DLLListRemoveAll.(main_list); |
| 642 | for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!; a++) |
| 643 | if (net_game_txt_items[a]) |
| 644 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(net_game_txt_items[a]); |
| 645 | for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!; a++) |
| 646 | net_game_txt_items[a] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 647 | } break; |
| 648 | case GET_INFO_IDcxx . . $ `netcon/lanclient/lanclient.cpp:402:9`!: { |
| 649 | if (*DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.) { |
| 650 | int gameno; |
| 651 | gameno = DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(main_list); |
| 652 | DLLShowNetgameInfocxx . . $ DLLShowNetgameInfo.(&DLLNetwork_gamescxx . . $ DLLNetwork_games.[gameno]); |
| 653 | } |
| 654 | } break; |
| 655 | } |
| 656 | } |
| 657 | DLLNewUIWindowDestroycxx . . $ DLLNewUIWindowDestroy.(main_wnd); |
| 658 | |
| 659 | *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha. = oldalpha; |
| 660 | for (a = 0; a < MAX_NET_GAMEScxx . . $ `netcon/lanclient/lanclient.cpp:318:9`!; a++) |
| 661 | if (net_game_txt_items[a]) |
| 662 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(net_game_txt_items[a]); |
| 663 | // Cleanup |
| 664 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(screen_header); |
| 665 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd); |
| 666 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_list); |
| 667 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(list_header); |
| 668 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(exit_hs); |
| 669 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(join_hs); |
| 670 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(start_hs); |
| 671 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(srch_hs); |
| 672 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(scan_hs); |
| 673 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(edit_box); |
| 674 | |
| 675 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(info_hs); |
| 676 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(info_on_text); |
| 677 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(game_hdr_text); |
| 678 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_LC_text); |
| 679 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(list_head_txt); |
| 680 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_on_text); |
| 681 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_off_text); |
| 682 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_on_text); |
| 683 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(join_off_text); |
| 684 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_on_text); |
| 685 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_off_text); |
| 686 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(srch_on_text); |
| 687 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(srch_off_text); |
| 688 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(scan_on_text); |
| 689 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(scan_off_text); |
| 690 | return ret; |
| 691 | } |
| 692 | |
| 693 | // MTS: only used in this file |
| 694 | void AutoLoginAndJoinGamecxx . . $ lanclient/AutoLoginAndJoinGame(49f6e7a06ebc5aa8).(void) { |
| 695 | uint16_tcxx . . $ uint16_t# port; |
| 696 | uint32_tcxx . . $ uint32_t# iaddr; |
| 697 | |
| 698 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 0; |
| 699 | |
| 700 | if (!*DLLAuto_login_addrcxx . . $ DLLAuto_login_addr.) { |
| 701 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Can't autostart because no IP address was specified!!\n"); |
| 702 | return; |
| 703 | } |
| 704 | if (*DLLAuto_login_portcxx . . $ DLLAuto_login_port.) { |
| 705 | port = atoicxx . . $ atoi(f5ecf3191ed0cd93).(DLLAuto_login_portcxx . . $ DLLAuto_login_port.); |
| 706 | } else { |
| 707 | port = DEFAULT_GAME_PORTcxx . . $ `lib/networking.h:323:9`!; |
| 708 | } |
| 709 | |
| 710 | // Now actually connect to the server! |
| 711 | |
| 712 | network_addresscxx . . $ network_address# s_address; |
| 713 | iaddr = inet_addr(DLLAuto_login_addrcxx . . $ DLLAuto_login_addr.); |
| 714 | memcpy(&s_address.addresscxx . . $ network_address#address., &iaddr, sizeof(uint32_tcxx . . $ uint32_t#)); |
| 715 | s_address.portcxx . . $ network_address#port. = port; |
| 716 | s_address.connection_typecxx . . $ network_address#connection_type. = NP_TCPcxx . . $ NP_TCP.; |
| 717 | *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game. = 0; |
| 718 | DLLMultiStartClientcxx . . $ DLLMultiStartClient.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 719 | |
| 720 | if ((DLLTryToJoinServercxx . . $ DLLTryToJoinServer.(&s_address))) { |
| 721 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Menu: Game joined!\n"); |
| 722 | *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting. = 1; |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | } // namespace lanclient |