| 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 | |
| 19 | |
| 20 | /* |
| 21 | * $Logfile: /DescentIII/Main/lib/con_dll.h $ |
| 22 | * $Revision: 1.1.1.1 $ |
| 23 | * $Date: 2003/08/26 03:58:12 $ |
| 24 | * $Author: kevinb $ |
| 25 | * |
| 26 | * Common header for connection DLLs. |
| 27 | * |
| 28 | * $Log: con_dll.h,v $ |
| 29 | * Revision 1.1.1.1 2003/08/26 03:58:12 kevinb |
| 30 | * initial 1.5 import |
| 31 | * |
| 32 | * |
| 33 | * 78 5/09/00 5:11p Jeff |
| 34 | * fixed struct packing bug |
| 35 | * |
| 36 | * 77 3/26/00 10:30p Kevin |
| 37 | * MOD Downloader for 1.4 patch. |
| 38 | * |
| 39 | * 75 10/21/99 9:27p Jeff |
| 40 | * B.A. Macintosh code merge |
| 41 | * |
| 42 | * 74 8/02/99 11:47a Kevin |
| 43 | * don't display the d3 single mission twice! |
| 44 | * |
| 45 | * 73 7/12/99 4:15p Kevin |
| 46 | * Changed the way we determine if we should report stats or not in PXO |
| 47 | * |
| 48 | * 72 7/06/99 5:52p Kevin |
| 49 | * PXO & multiplayer fixes for the patch |
| 50 | * |
| 51 | * 71 6/23/99 3:35p Samir |
| 52 | * added pstypes.h |
| 53 | * |
| 54 | * 70 6/03/99 8:48a Kevin |
| 55 | * fixes for new OEM version.... |
| 56 | * |
| 57 | * 69 5/24/99 4:21p Jason |
| 58 | * fixed difficultly level problem |
| 59 | * |
| 60 | * 68 4/28/99 6:39p Kevin |
| 61 | * Build 182 fixes |
| 62 | * |
| 63 | * 67 4/26/99 2:54p Kevin |
| 64 | * fixed team count & keyword system to work with dedicated server |
| 65 | * |
| 66 | * 66 4/25/99 5:02p Kevin |
| 67 | * Bunches of multiplayer UI improvements |
| 68 | * |
| 69 | * 65 4/25/99 12:11a Kevin |
| 70 | * game info dialog stuff |
| 71 | * |
| 72 | * 64 4/23/99 5:32p Kevin |
| 73 | * Fixed a few mission bugs. |
| 74 | * |
| 75 | * 63 4/23/99 3:33p Kevin |
| 76 | * mission file/multiplayer mod keyword system |
| 77 | * |
| 78 | * 62 4/19/99 7:56p Kevin |
| 79 | * ifdef'd out some win32 specific stuff |
| 80 | * |
| 81 | * 61 4/19/99 6:10p Kevin |
| 82 | * Demo now only has one multiplayer level |
| 83 | * |
| 84 | * 60 4/18/99 3:12p Jeff |
| 85 | * got working with linux |
| 86 | * |
| 87 | * 59 4/16/99 3:17p Kevin |
| 88 | * More mouselook support |
| 89 | * |
| 90 | * 58 4/14/99 3:06p Kevin |
| 91 | * Force main mission to list even on small installations |
| 92 | * |
| 93 | * 57 4/08/99 4:54p Kevin |
| 94 | * Display level warp dialog for multiplayer |
| 95 | * |
| 96 | * 56 4/08/99 3:42p Kevin |
| 97 | * Added some stuff for the scoring API. Not functional yet. |
| 98 | * |
| 99 | * 55 4/03/99 9:26p Jeff |
| 100 | * changed dialogs that weren't using UID_OK and UID_CANCEL to use and |
| 101 | * handle them properly |
| 102 | * |
| 103 | * 54 3/25/99 3:29p Jason |
| 104 | * added option to randomize powerup respawn points |
| 105 | * |
| 106 | * 53 3/25/99 3:26p Kevin |
| 107 | * Made PXO games be based on your chat channel |
| 108 | * |
| 109 | * 52 3/24/99 1:41p Jeff |
| 110 | * some dedicated server fixups...ability to set number of teams |
| 111 | * |
| 112 | * 51 3/17/99 4:08p Kevin |
| 113 | * Changed the way games appear and timeout in the game list. |
| 114 | * |
| 115 | * 50 3/04/99 6:11p Kevin |
| 116 | * Fixed mission name for OEM |
| 117 | * |
| 118 | * 49 3/02/99 5:50p Kevin |
| 119 | * Ouch. Duplicate structures existed and were conflicting. |
| 120 | * |
| 121 | * 48 3/02/99 1:18a Kevin |
| 122 | * |
| 123 | * 47 3/02/99 1:11a Kevin |
| 124 | * |
| 125 | * 46 3/01/99 9:37p Jeff |
| 126 | * fixed missing semicolon |
| 127 | * |
| 128 | * 45 3/01/99 9:03p Kevin |
| 129 | * OEM Beta 4 |
| 130 | * |
| 131 | * 44 2/28/99 11:04p Jeff |
| 132 | * handle Capture The Flag->CTF in Demo/OEM |
| 133 | * |
| 134 | * 43 2/19/99 5:21p Kevin |
| 135 | * Fixed some connection DLLs and a Direct Sound bug with threads. |
| 136 | * |
| 137 | * 42 2/15/99 7:47p Jeff |
| 138 | * new pilot file class and read/write system checked in...should be more |
| 139 | * robust than old |
| 140 | * |
| 141 | * 41 2/04/99 11:40a Kevin |
| 142 | * Made listboxes sort |
| 143 | * |
| 144 | * 40 2/03/99 6:14p Kevin |
| 145 | * OEM changes |
| 146 | * |
| 147 | * 39 2/03/99 4:20p Kevin |
| 148 | * Got multiplayer working with .mn3 files, and setup autodownloading |
| 149 | * |
| 150 | * 38 1/11/99 12:29p Jeff |
| 151 | * changes made not to call the module library directly |
| 152 | * |
| 153 | * 37 1/07/99 11:51a Kevin |
| 154 | * Added support for joining servers on alternate ports and hosting behind |
| 155 | * a proxy/firewall |
| 156 | * |
| 157 | * 36 12/30/98 3:49p Kevin |
| 158 | * Moved multiplayer options out of DLL and into main app |
| 159 | * |
| 160 | * 35 12/30/98 12:16p Kevin |
| 161 | * Auto Mission Download system |
| 162 | * |
| 163 | * 34 12/23/98 6:38p Kevin |
| 164 | * All UDP data (except gamespy) now uses one (registered) port number |
| 165 | * |
| 166 | * 33 12/18/98 11:00a Jason |
| 167 | * |
| 168 | * 32 12/15/98 10:53a Jason |
| 169 | * yet more changes for 1.1 |
| 170 | * |
| 171 | * 31 12/14/98 10:53a Jason |
| 172 | * added bright player ships option |
| 173 | * |
| 174 | * 30 12/01/98 12:47p Jason |
| 175 | * got rid of NF_DROPMISORDERED and added NF_USE_SMOOTHING |
| 176 | * |
| 177 | * 29 11/18/98 3:26p Kevin |
| 178 | * Put multiplayer options into con_dll.h |
| 179 | * |
| 180 | * 28 10/19/98 11:07p Kevin |
| 181 | * fixed bug |
| 182 | * |
| 183 | * 27 10/19/98 7:51p Kevin |
| 184 | * performance testing |
| 185 | * |
| 186 | * 26 10/19/98 1:08p Kevin |
| 187 | * Removed single player level from demo build |
| 188 | * |
| 189 | * 25 10/15/98 1:36p Jeff |
| 190 | * updated dllinfo struct |
| 191 | * |
| 192 | * 24 10/13/98 12:03p Kevin |
| 193 | * Changed use of preprocessors for debug, etc. |
| 194 | * |
| 195 | * 23 10/12/98 8:39p Kevin |
| 196 | * removed mprintf's and fixed some smallish bugs |
| 197 | * |
| 198 | * 22 10/08/98 12:05p Kevin |
| 199 | * Moved some start menu stuff around for Luke |
| 200 | * |
| 201 | * 21 10/07/98 11:45a Kevin |
| 202 | * changed demo mission name |
| 203 | * |
| 204 | * 20 10/06/98 11:00a Kevin |
| 205 | * Updated mission names for demo |
| 206 | * |
| 207 | * 19 10/01/98 11:37a Kevin |
| 208 | * UI fixes and stuff |
| 209 | * |
| 210 | * 18 9/29/98 2:23p Kevin |
| 211 | * More UI tweaks |
| 212 | * |
| 213 | * 17 9/28/98 9:53a Kevin |
| 214 | * Fixing misc UI problems, and fixed some bugs that VC 6 found |
| 215 | * |
| 216 | * 16 9/24/98 12:50p Kevin |
| 217 | * Added UI for rotational velocity and drop out of order packets in net |
| 218 | * games |
| 219 | * |
| 220 | * 15 9/23/98 6:33p Kevin |
| 221 | * Fixed load settings |
| 222 | * |
| 223 | * 14 9/23/98 2:55p Kevin |
| 224 | * Saved multi config and changed UI to conform |
| 225 | * |
| 226 | * 13 9/22/98 3:55p Kevin |
| 227 | * Removed obsolete function |
| 228 | * |
| 229 | * 12 9/22/98 2:29p Kevin |
| 230 | * moved ships allowed code out of dll and into main app. Also added |
| 231 | * powerup exclusions |
| 232 | * |
| 233 | * 11 9/21/98 11:19a Kevin |
| 234 | * check protocol before entering multiplayer screens |
| 235 | * |
| 236 | * 10 9/16/98 8:06p Jason |
| 237 | * got mastertracker working with the dedicated server |
| 238 | * |
| 239 | * 9 9/04/98 1:51p Kevin |
| 240 | * implemented asyncronous gethostbyname |
| 241 | * |
| 242 | * 8 9/02/98 6:54p Kevin |
| 243 | * Fixed general directplay support up, and got modem-modem working |
| 244 | * |
| 245 | * 7 8/31/98 10:14a Kevin |
| 246 | * Misc. multi-UI fixes |
| 247 | * |
| 248 | * 6 8/27/98 5:03p Kevin |
| 249 | * Prettied up multiplayer screens and fixed some bugs. |
| 250 | * |
| 251 | * 5 8/25/98 6:33p Kevin |
| 252 | * pxo |
| 253 | * |
| 254 | * 4 8/24/98 5:04p Kevin |
| 255 | * Made msn files have the option to not be playable in multiplayer |
| 256 | * |
| 257 | * 3 8/24/98 10:42a Kevin |
| 258 | * Updated DLL for directplay and PXO background |
| 259 | * |
| 260 | * 2 8/19/98 11:50a Kevin |
| 261 | * Got DirectPlay IPX working, and localized connection DLLs |
| 262 | * |
| 263 | * $NoKeywords: $ |
| 264 | */ |
| 265 | /////////////////////////////////////////////// |
| 266 | |
| 267 | #include "ship.h"cxx . . $ `<file>/Descent3/ship.h`/ |
| 268 | #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/ |
| 269 | |
| 270 | #if defined(POSIXcxx . . $ `<built-in>:478:9`!) |
| 271 | #include <string.h> |
| 272 | #include "linux_fix.h"cxx . . $ `<file>/linux/linux_fix.h`/ |
| 273 | #endif |
| 274 | |
| 275 | // Uncomment out this line of code to build the demo version of the multiplayer connection dlls |
| 276 | // #define DEMO 1 |
| 277 | |
| 278 | // localization info |
| 279 | char **StringTablecxx . . $ StringTable.; |
| 280 | int StringTableSizecxx . . $ StringTableSize. = 0; |
| 281 | const char *_ErrorStringcxx . . $ _ErrorString. = "Missing String"; |
| 282 | const char *GetStringcxx . . $ GetString(f7ae7e56280f18ae).(int d) { |
| 283 | if ((d < 0) || (d >= StringTableSizecxx . . $ StringTableSize.)) |
| 284 | return _ErrorStringcxx . . $ _ErrorString.; |
| 285 | else |
| 286 | return StringTablecxx . . $ StringTable.[d]; |
| 287 | } |
| 288 | #define TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(d) GetString(d) |
| 289 | /////////////////////////////////////////////// |
| 290 | #define CHAR_LEFT_ARROWcxx . . $ `netcon/includes/con_dll.h:290:9`! 24 |
| 291 | #define CHAR_UP_ARROWcxx . . $ `netcon/includes/con_dll.h:291:9`! 25 |
| 292 | #define CHAR_RIGHT_ARROWcxx . . $ `netcon/includes/con_dll.h:292:9`! 26 |
| 293 | #define CHAR_DOWN_ARROWcxx . . $ `netcon/includes/con_dll.h:293:9`! 27 |
| 294 | #define CHAR_CHECKBOX_OFFcxx . . $ `netcon/includes/con_dll.h:294:9`! 28 |
| 295 | #define CHAR_CHECKBOX_ONcxx . . $ `netcon/includes/con_dll.h:295:9`! 29 |
| 296 | #define CHAR_RADIO_OFFcxx . . $ `netcon/includes/con_dll.h:296:9`! 30 |
| 297 | #define CHAR_RADIO_ONcxx . . $ `netcon/includes/con_dll.h:297:9`! 31 |
| 298 | |
| 299 | #define DLL_UI_CANCELcxx . . $ `netcon/includes/con_dll.h:299:9`! 99 |
| 300 | |
| 301 | #define DLL_BRIEFING_FONTcxx . . $ `netcon/includes/con_dll.h:301:9`! 1 |
| 302 | #define DLL_BIG_BRIEFING_FONTcxx . . $ `netcon/includes/con_dll.h:302:9`! 2 |
| 303 | |
| 304 | struct dllinfocxx . . $ dllinfo# { |
| 305 | int me_handlecxx . . $ dllinfo#me_handle.; |
| 306 | int it_handlecxx . . $ dllinfo#it_handle.; |
| 307 | uint8_tcxx . . $ uint8_t# *special_datacxx . . $ dllinfo#special_data.; |
| 308 | char *input_stringcxx . . $ dllinfo#input_string.; |
| 309 | int input_keycxx . . $ dllinfo#input_key.; |
| 310 | unioncxx . . $ dllinfo#$anonymous_type_0# { |
| 311 | int iRetcxx . . $ dllinfo#$anonymous_type_0#iRet.; |
| 312 | float fRetcxx . . $ dllinfo#$anonymous_type_0#fRet.; |
| 313 | }; |
| 314 | float fParamcxx . . $ dllinfo#fParam.; |
| 315 | ptrdiff_t iParamcxx . . $ dllinfo#iParam.; |
| 316 | }; |
| 317 | |
| 318 | struct multi_apicxx . . $ multi_api# { |
| 319 | int *objscxx . . $ multi_api#objs.; |
| 320 | int *roomscxx . . $ multi_api#rooms.; |
| 321 | int *terraincxx . . $ multi_api#terrain.; |
| 322 | int *playerscxx . . $ multi_api#players.; |
| 323 | int *netgamecxx . . $ multi_api#netgame.; |
| 324 | int *netplayerscxx . . $ multi_api#netplayers.; |
| 325 | int *shipscxx . . $ multi_api#ships.; |
| 326 | int *fpcxx . . $ multi_api#fp.[200]; // function pointers |
| 327 | int *vpcxx . . $ multi_api#vp.[200]; // variable pointers |
| 328 | }; |
| 329 | |
| 330 | typedef void (*GetMultiAPI_fpcxx . . $ GetMultiAPI_fp#)(multi_apicxx . . $ multi_api# *api); |
| 331 | GetMultiAPI_fpcxx . . $ GetMultiAPI_fp# DLLGetMultiAPIcxx . . $ DLLGetMultiAPI.; |
| 332 | |
| 333 | typedef void (*SetUITextItemText_fpcxx . . $ SetUITextItemText_fp#)(void *uit, char *newtext, uint32_tcxx . . $ uint32_t# color); |
| 334 | SetUITextItemText_fpcxx . . $ SetUITextItemText_fp# DLLSetUITextItemTextcxx . . $ DLLSetUITextItemText.; |
| 335 | |
| 336 | typedef void *(*NewUIWindowCreate_fpcxx . . $ NewUIWindowCreate_fp#)(int x, int y, int w, int h, int flags); |
| 337 | NewUIWindowCreate_fpcxx . . $ NewUIWindowCreate_fp# DLLNewUIWindowCreatecxx . . $ DLLNewUIWindowCreate.; |
| 338 | |
| 339 | typedef void (*NewUIWindowDestroy_fpcxx . . $ NewUIWindowDestroy_fp#)(void *deswin); |
| 340 | NewUIWindowDestroy_fpcxx . . $ NewUIWindowDestroy_fp# DLLNewUIWindowDestroycxx . . $ DLLNewUIWindowDestroy.; |
| 341 | |
| 342 | typedef void (*NewUIWindowOpen_fpcxx . . $ NewUIWindowOpen_fp#)(void *deswin); |
| 343 | NewUIWindowOpen_fpcxx . . $ NewUIWindowOpen_fp# DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.; |
| 344 | |
| 345 | typedef void (*NewUIWindowClose_fpcxx . . $ NewUIWindowClose_fp#)(void *deswin); |
| 346 | NewUIWindowClose_fpcxx . . $ NewUIWindowClose_fp# DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.; |
| 347 | |
| 348 | typedef void *(*TextCreate_fpcxx . . $ TextCreate_fp#)(void *parentwin, void *textitem, int x, int y, int flags); |
| 349 | TextCreate_fpcxx . . $ TextCreate_fp# DLLTextCreatecxx . . $ DLLTextCreate.; |
| 350 | |
| 351 | typedef void *(*EditCreate_fpcxx . . $ EditCreate_fp#)(void *parentwin, int id, int x, int y, int w, int h, int flags); |
| 352 | EditCreate_fpcxx . . $ EditCreate_fp# DLLEditCreatecxx . . $ DLLEditCreate.; |
| 353 | |
| 354 | typedef void *(*ButtonCreate_fpcxx . . $ ButtonCreate_fp#)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); |
| 355 | ButtonCreate_fpcxx . . $ ButtonCreate_fp# DLLButtonCreatecxx . . $ DLLButtonCreate.; |
| 356 | |
| 357 | typedef void *(*ListCreate_fpcxx . . $ ListCreate_fp#)(void *parentwin, int id, int x, int y, int w, int h, int flags); |
| 358 | ListCreate_fpcxx . . $ ListCreate_fp# DLLListCreatecxx . . $ DLLListCreate.; |
| 359 | |
| 360 | typedef void (*ListRemoveAll_fpcxx . . $ ListRemoveAll_fp#)(void *item); |
| 361 | ListRemoveAll_fpcxx . . $ ListRemoveAll_fp# DLLListRemoveAllcxx . . $ DLLListRemoveAll.; |
| 362 | |
| 363 | typedef void (*ListAddItem_fpcxx . . $ ListAddItem_fp#)(void *item, void *uitext); |
| 364 | ListAddItem_fpcxx . . $ ListAddItem_fp# DLLListAddItemcxx . . $ DLLListAddItem.; |
| 365 | |
| 366 | typedef void (*ListRemoveItem_fpcxx . . $ ListRemoveItem_fp#)(void *item, void *txtitem); |
| 367 | ListRemoveItem_fpcxx . . $ ListRemoveItem_fp# DLLListRemoveItemcxx . . $ DLLListRemoveItem.; |
| 368 | |
| 369 | typedef void (*ListSelectItem_fpcxx . . $ ListSelectItem_fp#)(void *item, void *txtitem); |
| 370 | ListSelectItem_fpcxx . . $ ListSelectItem_fp# DLLListSelectItemcxx . . $ DLLListSelectItem.; |
| 371 | |
| 372 | typedef char *(*ListGetItem_fpcxx . . $ ListGetItem_fp#)(void *item, int index); |
| 373 | ListGetItem_fpcxx . . $ ListGetItem_fp# DLLListGetItemcxx . . $ DLLListGetItem.; |
| 374 | |
| 375 | typedef int (*ListGetSelectedIndex_fpcxx . . $ ListGetSelectedIndex_fp#)(void *item); |
| 376 | ListGetSelectedIndex_fpcxx . . $ ListGetSelectedIndex_fp# DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.; |
| 377 | |
| 378 | typedef void (*EditSetText_fpcxx . . $ EditSetText_fp#)(void *item, const char *buff); |
| 379 | EditSetText_fpcxx . . $ EditSetText_fp# DLLEditSetTextcxx . . $ DLLEditSetText.; |
| 380 | |
| 381 | typedef void (*EditGetText_fpcxx . . $ EditGetText_fp#)(void *item, char *buff, int len); |
| 382 | EditGetText_fpcxx . . $ EditGetText_fp# DLLEditGetTextcxx . . $ DLLEditGetText.; |
| 383 | |
| 384 | typedef void (*DatabaseWrite_fpcxx . . $ DatabaseWrite_fp#)(const char *label, const char *entry, int entrylen); |
| 385 | DatabaseWrite_fpcxx . . $ DatabaseWrite_fp# DLLDatabaseWritecxx . . $ DLLDatabaseWrite.; |
| 386 | |
| 387 | typedef void (*DatabaseRead_fpcxx . . $ DatabaseRead_fp#)(const char *label, char *entry, int *entrylen); |
| 388 | DatabaseRead_fpcxx . . $ DatabaseRead_fp# DLLDatabaseReadcxx . . $ DLLDatabaseRead.; |
| 389 | |
| 390 | typedef void (*DescentDefer_fpcxx . . $ DescentDefer_fp#)(void); |
| 391 | DescentDefer_fpcxx . . $ DescentDefer_fp# DLLDescentDefercxx . . $ DLLDescentDefer.; |
| 392 | |
| 393 | typedef void (*DoMessageBox_fpcxx . . $ DoMessageBox_fp#)(const char *title, const char *msg, int type, ddgr_colorcxx . . $ ddgr_color# title_color, |
| 394 | ddgr_colorcxx . . $ ddgr_color# text_color); |
| 395 | DoMessageBox_fpcxx . . $ DoMessageBox_fp# DLLDoMessageBoxFPcxx . . $ DLLDoMessageBoxFP.; |
| 396 | static inline void DLLDoMessageBoxcxx . . $ DLLDoMessageBox(ca35412340c03573).(const char *title, const char *msg, int type, ddgr_colorcxx . . $ ddgr_color# title_color = GR_WHITEcxx . . $ GR_WHITE., |
| 397 | ddgr_colorcxx . . $ ddgr_color# text_color = GR_WHITEcxx . . $ GR_WHITE.) { |
| 398 | DLLDoMessageBoxFPcxx . . $ DLLDoMessageBoxFP.(title, msg, type, title_color, text_color); |
| 399 | } |
| 400 | |
| 401 | typedef int (*DoUI_fpcxx . . $ DoUI_fp#)(void); |
| 402 | DoUI_fpcxx . . $ DoUI_fp# DLLDoUIcxx . . $ DLLDoUI.; |
| 403 | |
| 404 | typedef void (*Debug_ConsolePrintf_fpcxx . . $ Debug_ConsolePrintf_fp#)(int n, const char *format, ...); |
| 405 | Debug_ConsolePrintf_fpcxx . . $ Debug_ConsolePrintf_fp# DLLDebug_ConsolePrintfcxx . . $ DLLDebug_ConsolePrintf.; |
| 406 | |
| 407 | typedef void (*DedicatedServerPrintf_fpcxx . . $ DedicatedServerPrintf_fp#)(const char *format, ...); |
| 408 | DedicatedServerPrintf_fpcxx . . $ DedicatedServerPrintf_fp# DLLPrintDedicatedMessagecxx . . $ DLLPrintDedicatedMessage.; |
| 409 | /* |
| 410 | typedef int( *ValidateUser_fp) (validate_id_request *valid_id, char *trackerid); |
| 411 | ValidateUser_fp DLLValidateUser; |
| 412 | |
| 413 | typedef void( *PollPTrackNet_fp) (); |
| 414 | PollPTrackNet_fp DLLPollPTrackNet; |
| 415 | */ |
| 416 | typedef void *(*NewUIGameWindowCreate_fpcxx . . $ NewUIGameWindowCreate_fp#)(int x, int y, int w, int h, int flags); |
| 417 | NewUIGameWindowCreate_fpcxx . . $ NewUIGameWindowCreate_fp# DLLNewUIGameWindowCreatecxx . . $ DLLNewUIGameWindowCreate.; |
| 418 | |
| 419 | typedef void (*NewUIGameWindowDestroy_fpcxx . . $ NewUIGameWindowDestroy_fp#)(void *item); |
| 420 | NewUIGameWindowDestroy_fpcxx . . $ NewUIGameWindowDestroy_fp# DLLNewUIGameWindowDestroycxx . . $ DLLNewUIGameWindowDestroy.; |
| 421 | |
| 422 | typedef void (*NewUIGameWindowOpen_fpcxx . . $ NewUIGameWindowOpen_fp#)(void *item); |
| 423 | NewUIGameWindowOpen_fpcxx . . $ NewUIGameWindowOpen_fp# DLLNewUIGameWindowOpencxx . . $ DLLNewUIGameWindowOpen.; |
| 424 | |
| 425 | typedef void (*NewUIGameWindowClose_fpcxx . . $ NewUIGameWindowClose_fp#)(void *item); |
| 426 | NewUIGameWindowClose_fpcxx . . $ NewUIGameWindowClose_fp# DLLNewUIGameWindowClosecxx . . $ DLLNewUIGameWindowClose.; |
| 427 | |
| 428 | typedef void (*SetScreenMode_fpcxx . . $ SetScreenMode_fp#)(int); |
| 429 | SetScreenMode_fpcxx . . $ SetScreenMode_fp# DLLSetScreenModecxx . . $ DLLSetScreenMode.; |
| 430 | |
| 431 | typedef float (*timer_GetTime_fpcxx . . $ timer_GetTime_fp#)(void); |
| 432 | timer_GetTime_fpcxx . . $ timer_GetTime_fp# DLLtimer_GetTimecxx . . $ DLLtimer_GetTime.; |
| 433 | |
| 434 | typedef int (*TryToJoinServer_fpcxx . . $ TryToJoinServer_fp#)(network_addresscxx . . $ network_address# *addr); |
| 435 | TryToJoinServer_fpcxx . . $ TryToJoinServer_fp# DLLTryToJoinServercxx . . $ DLLTryToJoinServer.; |
| 436 | |
| 437 | typedef void (*MultiStartClient_fpcxx . . $ MultiStartClient_fp#)(char *scriptname); |
| 438 | MultiStartClient_fpcxx . . $ MultiStartClient_fp# DLLMultiStartClientcxx . . $ DLLMultiStartClient.; |
| 439 | |
| 440 | typedef void (*rend_GetRenderState_fpcxx . . $ rend_GetRenderState_fp#)(rendering_statecxx . . $ rendering_state# *rstate); |
| 441 | rend_GetRenderState_fpcxx . . $ rend_GetRenderState_fp# DLLrend_GetRenderStatecxx . . $ DLLrend_GetRenderState.; |
| 442 | |
| 443 | typedef bool (*LoadMission_fpcxx . . $ LoadMission_fp#)(char *msn); |
| 444 | LoadMission_fpcxx . . $ LoadMission_fp# DLLLoadMissioncxx . . $ DLLLoadMission.; |
| 445 | |
| 446 | typedef void (*ddio_MakePath_fpcxx . . $ ddio_MakePath_fp#)(char *newPath, const char *absolutePathHeader, const char *subDir, ...); |
| 447 | ddio_MakePath_fpcxx . . $ ddio_MakePath_fp# DLLddio_MakePathcxx . . $ DLLddio_MakePath.; |
| 448 | |
| 449 | typedef bool (*ddio_FindFileStart_fpcxx . . $ ddio_FindFileStart_fp#)(const char *wildcard, char *namebuf); |
| 450 | ddio_FindFileStart_fpcxx . . $ ddio_FindFileStart_fp# DLLddio_FindFileStartcxx . . $ DLLddio_FindFileStart.; |
| 451 | |
| 452 | typedef void (*ddio_FindFileClose_fpcxx . . $ ddio_FindFileClose_fp#)(); |
| 453 | ddio_FindFileClose_fpcxx . . $ ddio_FindFileClose_fp# DLLddio_FindFileClosecxx . . $ DLLddio_FindFileClose.; |
| 454 | |
| 455 | typedef bool (*ddio_FindNextFile_fpcxx . . $ ddio_FindNextFile_fp#)(char *namebuf); |
| 456 | ddio_FindNextFile_fpcxx . . $ ddio_FindNextFile_fp# DLLddio_FindNextFilecxx . . $ DLLddio_FindNextFile.; |
| 457 | |
| 458 | // typedef void( *MultiStartServer_fp) (int playing,char *scriptname,int dedicated_num_teams=-1); |
| 459 | typedef void (*MultiStartServer_fpcxx . . $ MultiStartServer_fp#)(int playing, char *scriptname, int dedicated_num_teams); |
| 460 | MultiStartServer_fpcxx . . $ MultiStartServer_fp# DLLMultiStartServerFPcxx . . $ DLLMultiStartServerFP.; |
| 461 | static inline void DLLMultiStartServercxx . . $ DLLMultiStartServer(99469d7ff9a1485a).(int playing, char *scriptname, int dedicated_num_teams = -1) { |
| 462 | DLLMultiStartServerFPcxx . . $ DLLMultiStartServerFP.(playing, scriptname, dedicated_num_teams); |
| 463 | } |
| 464 | |
| 465 | typedef void (*ShowProgressScreen_fpcxx . . $ ShowProgressScreen_fp#)(const char *, const char *); |
| 466 | ShowProgressScreen_fpcxx . . $ ShowProgressScreen_fp# DLLShowProgressScreencxx . . $ DLLShowProgressScreen.; |
| 467 | |
| 468 | typedef int (*SearchForLocalGamesTCP_fpcxx . . $ SearchForLocalGamesTCP_fp#)(uint32_tcxx . . $ uint32_t#, uint16_tcxx . . $ uint16_t#); |
| 469 | SearchForLocalGamesTCP_fpcxx . . $ SearchForLocalGamesTCP_fp# DLLSearchForLocalGamesTCPcxx . . $ DLLSearchForLocalGamesTCP.; |
| 470 | |
| 471 | typedef int (*nw_GetHostAddressFromNumbers_fpcxx . . $ nw_GetHostAddressFromNumbers_fp#)(char *str); |
| 472 | nw_GetHostAddressFromNumbers_fpcxx . . $ nw_GetHostAddressFromNumbers_fp# DLLnw_GetHostAddressFromNumberscxx . . $ DLLnw_GetHostAddressFromNumbers.; |
| 473 | |
| 474 | typedef int (*nw_GetProtocolType_fpcxx . . $ nw_GetProtocolType_fp#)(void); |
| 475 | nw_GetProtocolType_fpcxx . . $ nw_GetProtocolType_fp# DLLnw_GetProtocolTypecxx . . $ DLLnw_GetProtocolType.; |
| 476 | |
| 477 | typedef void *(*HotSpotCreate_fpcxx . . $ HotSpotCreate_fp#)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, int y, |
| 478 | int w, int h, int flags); |
| 479 | HotSpotCreate_fpcxx . . $ HotSpotCreate_fp# DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.; |
| 480 | |
| 481 | typedef int (*PollUI_fpcxx . . $ PollUI_fp#)(void); |
| 482 | PollUI_fpcxx . . $ PollUI_fp# DLLPollUIcxx . . $ DLLPollUI.; |
| 483 | |
| 484 | typedef const char *(*GetMissionName_fpcxx . . $ GetMissionName_fp#)(const char *mission); |
| 485 | GetMissionName_fpcxx . . $ GetMissionName_fp# DLLGetMissionNamecxx . . $ DLLGetMissionName.; |
| 486 | |
| 487 | typedef void (*RemoveUITextItem_fpcxx . . $ RemoveUITextItem_fp#)(void *item); |
| 488 | RemoveUITextItem_fpcxx . . $ RemoveUITextItem_fp# DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.; |
| 489 | |
| 490 | typedef void *(*CreateNewUITextItem_fpcxx . . $ CreateNewUITextItem_fp#)(const char *newtext, uint32_tcxx . . $ uint32_t# color, int font); |
| 491 | CreateNewUITextItem_fpcxx . . $ CreateNewUITextItem_fp# DLLCreateNewUITextItemFPcxx . . $ DLLCreateNewUITextItemFP.; |
| 492 | static inline void *DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(const char *newtext, uint32_tcxx . . $ uint32_t# color, int font = -1) { |
| 493 | return DLLCreateNewUITextItemFPcxx . . $ DLLCreateNewUITextItemFP.(newtext, color, font); |
| 494 | } |
| 495 | |
| 496 | typedef void *(*mem_malloc_fpcxx . . $ mem_malloc_fp#)(int size); |
| 497 | mem_malloc_fpcxx . . $ mem_malloc_fp# DLLmem_malloccxx . . $ DLLmem_malloc.; |
| 498 | |
| 499 | typedef void (*mem_free_fpcxx . . $ mem_free_fp#)(void *memblock); |
| 500 | mem_free_fpcxx . . $ mem_free_fp# DLLmem_freecxx . . $ DLLmem_free.; |
| 501 | |
| 502 | typedef void (*CreateSplashScreen_fpcxx . . $ CreateSplashScreen_fp#)(const char *msg, int usecancel); |
| 503 | CreateSplashScreen_fpcxx . . $ CreateSplashScreen_fp# DLLCreateSplashScreencxx . . $ DLLCreateSplashScreen.; |
| 504 | |
| 505 | typedef void (*CloseSplashScreen_fpcxx . . $ CloseSplashScreen_fp#)(void); |
| 506 | CloseSplashScreen_fpcxx . . $ CloseSplashScreen_fp# DLLCloseSplashScreencxx . . $ DLLCloseSplashScreen.; |
| 507 | |
| 508 | typedef void *(*UIConsoleGadgetCreate_fpcxx . . $ UIConsoleGadgetCreate_fp#)(void *parentid, int id, int x, int y, int font, int cols, int rows, |
| 509 | int flags); |
| 510 | UIConsoleGadgetCreate_fpcxx . . $ UIConsoleGadgetCreate_fp# DLLUIConsoleGadgetCreatecxx . . $ DLLUIConsoleGadgetCreate.; |
| 511 | |
| 512 | typedef void (*UIConsoleGadgetputs_fpcxx . . $ UIConsoleGadgetputs_fp#)(void *item, const char *str); |
| 513 | UIConsoleGadgetputs_fpcxx . . $ UIConsoleGadgetputs_fp# DLLUIConsoleGadgetputscxx . . $ DLLUIConsoleGadgetputs.; |
| 514 | |
| 515 | typedef void (*NewUIWindowSetFocusOnEditGadget_fpcxx . . $ NewUIWindowSetFocusOnEditGadget_fp#)(void *item, void *parent); |
| 516 | NewUIWindowSetFocusOnEditGadget_fpcxx . . $ NewUIWindowSetFocusOnEditGadget_fp# DLLNewUIWindowSetFocusOnEditGadgetcxx . . $ DLLNewUIWindowSetFocusOnEditGadget.; |
| 517 | |
| 518 | typedef void *(*OldEditCreate_fpcxx . . $ OldEditCreate_fp#)(void *parentitem, int id, int x, int y, int w, int h, int flags); |
| 519 | OldEditCreate_fpcxx . . $ OldEditCreate_fp# DLLOldEditCreatecxx . . $ DLLOldEditCreate.; |
| 520 | |
| 521 | typedef void *(*OldListCreate_fpcxx . . $ OldListCreate_fp#)(void *parentitem, int id, int x, int y, int w, int h, int flags); |
| 522 | OldListCreate_fpcxx . . $ OldListCreate_fp# DLLOldListCreatecxx . . $ DLLOldListCreate.; |
| 523 | |
| 524 | typedef void (*OldListRemoveAll_fpcxx . . $ OldListRemoveAll_fp#)(void *item); |
| 525 | OldListRemoveAll_fpcxx . . $ OldListRemoveAll_fp# DLLOldListRemoveAllcxx . . $ DLLOldListRemoveAll.; |
| 526 | |
| 527 | typedef void (*OldListAddItem_fpcxx . . $ OldListAddItem_fp#)(void *item, void *uitext); |
| 528 | OldListAddItem_fpcxx . . $ OldListAddItem_fp# DLLOldListAddItemcxx . . $ DLLOldListAddItem.; |
| 529 | |
| 530 | typedef void (*OldListRemoveItem_fpcxx . . $ OldListRemoveItem_fp#)(void *item, void *txtitem); |
| 531 | OldListRemoveItem_fpcxx . . $ OldListRemoveItem_fp# DLLOldListRemoveItemcxx . . $ DLLOldListRemoveItem.; |
| 532 | |
| 533 | typedef void (*OldListSelectItem_fpcxx . . $ OldListSelectItem_fp#)(void *item, void *txtitem); |
| 534 | OldListSelectItem_fpcxx . . $ OldListSelectItem_fp# DLLOldListSelectItemcxx . . $ DLLOldListSelectItem.; |
| 535 | |
| 536 | typedef char *(*OldListGetItem_fpcxx . . $ OldListGetItem_fp#)(void *item, int index); |
| 537 | OldListGetItem_fpcxx . . $ OldListGetItem_fp# DLLOldListGetItemcxx . . $ DLLOldListGetItem.; |
| 538 | |
| 539 | typedef int (*OldListGetSelectedIndex_fpcxx . . $ OldListGetSelectedIndex_fp#)(void *item); |
| 540 | OldListGetSelectedIndex_fpcxx . . $ OldListGetSelectedIndex_fp# DLLOldListGetSelectedIndexcxx . . $ DLLOldListGetSelectedIndex.; |
| 541 | |
| 542 | typedef void (*OldEditSetText_fpcxx . . $ OldEditSetText_fp#)(void *item, const char *newtext); |
| 543 | OldEditSetText_fpcxx . . $ OldEditSetText_fp# DLLOldEditSetTextcxx . . $ DLLOldEditSetText.; |
| 544 | |
| 545 | typedef void (*OldEditGetText_fpcxx . . $ OldEditGetText_fp#)(void *item, char *buff, int len); |
| 546 | OldEditGetText_fpcxx . . $ OldEditGetText_fp# DLLOldEditGetTextcxx . . $ DLLOldEditGetText.; |
| 547 | |
| 548 | typedef void (*ToggleUICallback_fpcxx . . $ ToggleUICallback_fp#)(int state); |
| 549 | ToggleUICallback_fpcxx . . $ ToggleUICallback_fp# DLLToggleUICallbackcxx . . $ DLLToggleUICallback.; |
| 550 | |
| 551 | typedef int (*SearchForGamesPXO_fpcxx . . $ SearchForGamesPXO_fp#)(uint32_tcxx . . $ uint32_t# ask, uint16_tcxx . . $ uint16_t# port); |
| 552 | SearchForGamesPXO_fpcxx . . $ SearchForGamesPXO_fp# DLLSearchForGamesPXOcxx . . $ DLLSearchForGamesPXO.; |
| 553 | |
| 554 | typedef void (*SetOldEditBufferLen_fpcxx . . $ SetOldEditBufferLen_fp#)(void *item, int len); |
| 555 | SetOldEditBufferLen_fpcxx . . $ SetOldEditBufferLen_fp# DLLSetOldEditBufferLencxx . . $ DLLSetOldEditBufferLen.; |
| 556 | |
| 557 | typedef void (*NewUIWindowLoadBackgroundImage_fpcxx . . $ NewUIWindowLoadBackgroundImage_fp#)(void *item, const char *image_name); |
| 558 | NewUIWindowLoadBackgroundImage_fpcxx . . $ NewUIWindowLoadBackgroundImage_fp# DLLNewUIWindowLoadBackgroundImagecxx . . $ DLLNewUIWindowLoadBackgroundImage.; |
| 559 | |
| 560 | typedef void (*DeleteUIItem_fpcxx . . $ DeleteUIItem_fp#)(void *delitem); |
| 561 | DeleteUIItem_fpcxx . . $ DeleteUIItem_fp# DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.; |
| 562 | |
| 563 | typedef int (*SearchForLocalGamesIPX_fpcxx . . $ SearchForLocalGamesIPX_fp#)(network_addresscxx . . $ network_address# *check_addr); |
| 564 | SearchForLocalGamesIPX_fpcxx . . $ SearchForLocalGamesIPX_fp# DLLSearchForLocalGamesIPXcxx . . $ DLLSearchForLocalGamesIPX.; |
| 565 | |
| 566 | typedef void (*HotSpotSetStates_fpcxx . . $ HotSpotSetStates_fp#)(void *hotspot, void *texton, void *textoff); |
| 567 | HotSpotSetStates_fpcxx . . $ HotSpotSetStates_fp# DLLHotSpotSetStatescxx . . $ DLLHotSpotSetStates.; |
| 568 | |
| 569 | typedef bool (*PlayerSetShipPermission_fpcxx . . $ PlayerSetShipPermission_fp#)(int pnum, char *ship_name, bool allowed); |
| 570 | PlayerSetShipPermission_fpcxx . . $ PlayerSetShipPermission_fp# DLLPlayerSetShipPermissioncxx . . $ DLLPlayerSetShipPermission.; |
| 571 | |
| 572 | typedef bool (*PlayerIsShipAllowed_fpcxx . . $ PlayerIsShipAllowed_fp#)(int pnum, int ship_index); |
| 573 | PlayerIsShipAllowed_fpcxx . . $ PlayerIsShipAllowed_fp# DLLPlayerIsShipAllowedcxx . . $ DLLPlayerIsShipAllowed.; |
| 574 | |
| 575 | #ifdef WIN32 |
| 576 | typedef int (*dp_ListDirectPlayGames_fp)(); |
| 577 | dp_ListDirectPlayGames_fp DLLdp_ListDirectPlayGames; |
| 578 | |
| 579 | typedef int (*dp_InitDirectPlay_fp)(char *conn_name, void *parms, int num_elements); |
| 580 | dp_InitDirectPlay_fp DLLdp_InitDirectPlay; |
| 581 | |
| 582 | typedef int (*dp_GetModemChoices_fp)(char *buffer, uint32_t *size); |
| 583 | dp_GetModemChoices_fp DLLdp_GetModemChoices; |
| 584 | #endif |
| 585 | |
| 586 | // Given a filename, pointer to a char * array and a pointer to an int, |
| 587 | // it will load the string table and fill in the information |
| 588 | // returns true on success |
| 589 | typedef bool (*CreateStringTable_fpcxx . . $ CreateStringTable_fp#)(const char *filename, char ***table, int *size); |
| 590 | CreateStringTable_fpcxx . . $ CreateStringTable_fp# DLLCreateStringTablecxx . . $ DLLCreateStringTable.; |
| 591 | |
| 592 | // Given a string table and it's count of strings, it will free up it's memory |
| 593 | typedef void (*DestroyStringTable_fpcxx . . $ DestroyStringTable_fp#)(char **table, int size); |
| 594 | DestroyStringTable_fpcxx . . $ DestroyStringTable_fp# DLLDestroyStringTablecxx . . $ DLLDestroyStringTable.; |
| 595 | |
| 596 | typedef void (*DatabaseReadInt_fpcxx . . $ DatabaseReadInt_fp#)(const char *label, int *val); |
| 597 | DatabaseReadInt_fpcxx . . $ DatabaseReadInt_fp# DLLDatabaseReadIntcxx . . $ DLLDatabaseReadInt.; |
| 598 | |
| 599 | typedef void (*DatabaseWriteInt_fpcxx . . $ DatabaseWriteInt_fp#)(const char *label, int val); |
| 600 | DatabaseWriteInt_fpcxx . . $ DatabaseWriteInt_fp# DLLDatabaseWriteIntcxx . . $ DLLDatabaseWriteInt.; |
| 601 | |
| 602 | typedef void (*DoScreenshot_fpcxx . . $ DoScreenshot_fp#)(); |
| 603 | DoScreenshot_fpcxx . . $ DoScreenshot_fp# DLLDoScreenshotcxx . . $ DLLDoScreenshot.; |
| 604 | |
| 605 | typedef bool (*IsMissionMultiPlayable_fpcxx . . $ IsMissionMultiPlayable_fp#)(char *mission); |
| 606 | IsMissionMultiPlayable_fpcxx . . $ IsMissionMultiPlayable_fp# DLLIsMissionMultiPlayablecxx . . $ DLLIsMissionMultiPlayable.; |
| 607 | |
| 608 | // returns width of text in current font. |
| 609 | typedef int (*grtext_GetTextLineWidth_fpcxx . . $ grtext_GetTextLineWidth_fp#)(const char *str); |
| 610 | grtext_GetTextLineWidth_fpcxx . . $ grtext_GetTextLineWidth_fp# DLLgrtext_GetTextLineWidthcxx . . $ DLLgrtext_GetTextLineWidth.; |
| 611 | |
| 612 | typedef void (*GadgetDestroy_fpcxx . . $ GadgetDestroy_fp#)(void *item); |
| 613 | GadgetDestroy_fpcxx . . $ GadgetDestroy_fp# DLLGadgetDestroycxx . . $ DLLGadgetDestroy.; |
| 614 | |
| 615 | #ifdef WIN32 |
| 616 | typedef int (*dp_StartGame_fp)(char *gamename); |
| 617 | dp_StartGame_fp DLLdp_StartGame; |
| 618 | |
| 619 | typedef void (*dp_EndGame_fp)(); |
| 620 | dp_EndGame_fp DLLdp_EndGame; |
| 621 | #endif |
| 622 | |
| 623 | typedef int (*nw_Asyncgethostbyname_fpcxx . . $ nw_Asyncgethostbyname_fp#)(uint32_tcxx . . $ uint32_t# *ip, int command, const char *hostname); |
| 624 | nw_Asyncgethostbyname_fpcxx . . $ nw_Asyncgethostbyname_fp# DLLnw_Asyncgethostbynamecxx . . $ DLLnw_Asyncgethostbyname.; |
| 625 | |
| 626 | typedef int (*nw_ReccomendPPS_fpcxx . . $ nw_ReccomendPPS_fp#)(); |
| 627 | nw_ReccomendPPS_fpcxx . . $ nw_ReccomendPPS_fp# DLLnw_ReccomendPPScxx . . $ DLLnw_ReccomendPPS.; |
| 628 | |
| 629 | typedef void (*DoMultiAllowed_fpcxx . . $ DoMultiAllowed_fp#)(void); |
| 630 | DoMultiAllowed_fpcxx . . $ DoMultiAllowed_fp# DLLDoMultiAllowedcxx . . $ DLLDoMultiAllowed.; |
| 631 | |
| 632 | typedef void (*MultiDoConfigSave_fpcxx . . $ MultiDoConfigSave_fp#)(void); |
| 633 | MultiDoConfigSave_fpcxx . . $ MultiDoConfigSave_fp# DLLMultiDoConfigSavecxx . . $ DLLMultiDoConfigSave.; |
| 634 | |
| 635 | typedef void (*MultiDoConfigLoad_fpcxx . . $ MultiDoConfigLoad_fp#)(void); |
| 636 | MultiDoConfigLoad_fpcxx . . $ MultiDoConfigLoad_fp# DLLMultiDoConfigLoadcxx . . $ DLLMultiDoConfigLoad.; |
| 637 | |
| 638 | typedef int (*MultiLoadSettings_fpcxx . . $ MultiLoadSettings_fp#)(const char *filename); |
| 639 | MultiLoadSettings_fpcxx . . $ MultiLoadSettings_fp# DLLMultiLoadSettingscxx . . $ DLLMultiLoadSettings.; |
| 640 | |
| 641 | typedef void *(*NetworkReceiveCallbackcxx . . $ NetworkReceiveCallback#)(uint8_tcxx . . $ uint8_t# *data, int len, network_addresscxx . . $ network_address# *from); |
| 642 | |
| 643 | typedef void (*HandleGamePacket_fpcxx . . $ HandleGamePacket_fp#)(uint8_tcxx . . $ uint8_t# *data, int len, network_addresscxx . . $ network_address# *from); |
| 644 | |
| 645 | typedef int (*nw_RegisterCallback_fpcxx . . $ nw_RegisterCallback_fp#)(HandleGamePacket_fpcxx . . $ HandleGamePacket_fp#, uint8_tcxx . . $ uint8_t# id); |
| 646 | nw_RegisterCallback_fpcxx . . $ nw_RegisterCallback_fp# DLLnw_RegisterCallbackcxx . . $ DLLnw_RegisterCallback.; |
| 647 | |
| 648 | typedef NetworkReceiveCallbackcxx . . $ NetworkReceiveCallback# (*nw_UnRegisterCallback_fpcxx . . $ nw_UnRegisterCallback_fp#)(uint8_tcxx . . $ uint8_t# id); |
| 649 | nw_UnRegisterCallback_fpcxx . . $ nw_UnRegisterCallback_fp# DLLnw_UnRegisterCallbackcxx . . $ DLLnw_UnRegisterCallback.; |
| 650 | |
| 651 | typedef int (*nw_SendWithID_fpcxx . . $ nw_SendWithID_fp#)(uint8_tcxx . . $ uint8_t# id, uint8_tcxx . . $ uint8_t# *data, int len, network_addresscxx . . $ network_address# *who_to); |
| 652 | nw_SendWithID_fpcxx . . $ nw_SendWithID_fp# DLLnw_SendWithIDcxx . . $ DLLnw_SendWithID.; |
| 653 | |
| 654 | typedef int (*nw_DoReceiveCallbacks_fpcxx . . $ nw_DoReceiveCallbacks_fp#)(void); |
| 655 | nw_DoReceiveCallbacks_fpcxx . . $ nw_DoReceiveCallbacks_fp# DLLnw_DoReceiveCallbackscxx . . $ DLLnw_DoReceiveCallbacks.; |
| 656 | |
| 657 | typedef int (*msn_CheckGetMission_fpcxx . . $ msn_CheckGetMission_fp#)(network_addresscxx . . $ network_address# *net_addr, char *filename); |
| 658 | msn_CheckGetMission_fpcxx . . $ msn_CheckGetMission_fp# DLLmsn_CheckGetMissioncxx . . $ DLLmsn_CheckGetMission.; |
| 659 | |
| 660 | typedef void (*MultiGameOptionsMenu_fpcxx . . $ MultiGameOptionsMenu_fp#)(int alloptions); |
| 661 | MultiGameOptionsMenu_fpcxx . . $ MultiGameOptionsMenu_fp# DLLMultiGameOptionsMenucxx . . $ DLLMultiGameOptionsMenu.; |
| 662 | |
| 663 | // Loads a dynamic module into memory for use. |
| 664 | // Returns true on success, false otherwise |
| 665 | // typedef bool (*mod_LoadModule_fp)(module *handle,const char *modfilename,int flags=MODF_NOW); |
| 666 | typedef bool (*mod_LoadModule_fpcxx . . $ mod_LoadModule_fp#)(modulecxx . . $ module# *handle, const char *modfilename, int flags); |
| 667 | mod_LoadModule_fpcxx . . $ mod_LoadModule_fp# DLLmod_LoadModulecxx . . $ DLLmod_LoadModule.; |
| 668 | |
| 669 | // Frees a previously loaded module from memory, it can no longer be used |
| 670 | // Returns true on success, false otherwise |
| 671 | typedef bool (*mod_FreeModule_fpcxx . . $ mod_FreeModule_fp#)(modulecxx . . $ module# *handle); |
| 672 | mod_FreeModule_fpcxx . . $ mod_FreeModule_fp# DLLmod_FreeModulecxx . . $ DLLmod_FreeModule.; |
| 673 | |
| 674 | // Returns a pointer to a function within a loaded module. If it returns NULL there was an error. Check |
| 675 | // mod_GetLastError to see if there was an error symstr is the name of the function you want to get the symbol for (Do |
| 676 | // NOT give any pre/suffix to this name) parmbytes is the size (in bytes) of the parameter list the function should have |
| 677 | typedef MODPROCADDRESScxx . . $ `lib/module.h:111:9`! (*mod_GetSymbol_fpcxx . . $ mod_GetSymbol_fp#)(modulecxx . . $ module# *handle, const char *symstr, uint8_tcxx . . $ uint8_t# parmbytes); |
| 678 | mod_GetSymbol_fpcxx . . $ mod_GetSymbol_fp# DLLmod_GetSymbolcxx . . $ DLLmod_GetSymbol.; |
| 679 | |
| 680 | // Returns an error code to what the last error was. When this function is called the last error is cleared, so by |
| 681 | // calling this function it not only returns the last error, but it removes it, so if you were to call this function |
| 682 | // again, it would return no error |
| 683 | typedef int (*mod_GetLastError_fpcxx . . $ mod_GetLastError_fp#)(void); |
| 684 | mod_GetLastError_fpcxx . . $ mod_GetLastError_fp# DLLmod_GetLastErrorcxx . . $ DLLmod_GetLastError.; |
| 685 | |
| 686 | // "Current Pilot" name access function |
| 687 | typedef void (*CurrentPilotName_fpcxx . . $ CurrentPilotName_fp#)(char *buffer); |
| 688 | CurrentPilotName_fpcxx . . $ CurrentPilotName_fp# CurrentPilotNamecxx . . $ CurrentPilotName.; |
| 689 | |
| 690 | typedef void (*UpdateAndPackGameList_fpcxx . . $ UpdateAndPackGameList_fp#)(void); |
| 691 | UpdateAndPackGameList_fpcxx . . $ UpdateAndPackGameList_fp# DLLUpdateAndPackGameListcxx . . $ DLLUpdateAndPackGameList.; |
| 692 | |
| 693 | typedef int (*MultiLevelSelection_fpcxx . . $ MultiLevelSelection_fp#)(void); |
| 694 | MultiLevelSelection_fpcxx . . $ MultiLevelSelection_fp# DLLMultiLevelSelectioncxx . . $ DLLMultiLevelSelection.; |
| 695 | |
| 696 | typedef bool (*DoPlayerMouselookCheck_fpcxx . . $ DoPlayerMouselookCheck_fp#)(uint32_tcxx . . $ uint32_t# flags); |
| 697 | DoPlayerMouselookCheck_fpcxx . . $ DoPlayerMouselookCheck_fp# DLLDoPlayerMouselookCheckcxx . . $ DLLDoPlayerMouselookCheck.; |
| 698 | |
| 699 | typedef int (*CheckMissionForScript_fpcxx . . $ CheckMissionForScript_fp#)(char *mission, char *script, int dedicated_server_num_teams); |
| 700 | CheckMissionForScript_fpcxx . . $ CheckMissionForScript_fp# DLLCheckMissionForScriptcxx . . $ DLLCheckMissionForScript.; |
| 701 | |
| 702 | typedef void (*ShowNetgameInfo_fpcxx . . $ ShowNetgameInfo_fp#)(network_gamecxx . . $ network_game# *game); |
| 703 | ShowNetgameInfo_fpcxx . . $ ShowNetgameInfo_fp# DLLShowNetgameInfocxx . . $ DLLShowNetgameInfo.; |
| 704 | |
| 705 | typedef int (*CheckGetD3M_fpcxx . . $ CheckGetD3M_fp#)(char *d3m); |
| 706 | CheckGetD3M_fpcxx . . $ CheckGetD3M_fp# DLLCheckGetD3Mcxx . . $ DLLCheckGetD3M.; |
| 707 | |
| 708 | int DLLUIClass_CurrIDcxx . . $ DLLUIClass_CurrID. = 0xD0; |
| 709 | |
| 710 | #define MAX_NET_GAMEScxx . . $ `netcon/includes/con_dll.h:710:9`! 100 |
| 711 | #define JEFF_REDcxx . . $ `netcon/includes/con_dll.h:711:9`! GR_RGB(255, 40, 40) |
| 712 | #define JEFF_BLUEcxx . . $ `netcon/includes/con_dll.h:712:9`! GR_RGB(40, 40, 255) |
| 713 | #define JEFF_GREENcxx . . $ `netcon/includes/con_dll.h:713:9`! GR_RGB(40, 255, 40) |
| 714 | #define NETPOLLINTERVALcxx . . $ `netcon/includes/con_dll.h:714:9`! 10.0 |
| 715 | |
| 716 | extern int MTAVersionCheckcxx . . $ MTAVersionCheck(fa84e865f2d62ca9).(uint32_tcxx . . $ uint32_t# oldver, char *URL); |
| 717 | |
| 718 | #define LOGIN_LENcxx . . $ `netcon/includes/con_dll.h:718:9`! 33 |
| 719 | #define REAL_NAME_LENcxx . . $ `netcon/includes/con_dll.h:719:9`! 66 |
| 720 | #define PASSWORD_LENcxx . . $ `netcon/includes/con_dll.h:720:9`! 17 |
| 721 | #define EMAIL_LENcxx . . $ `netcon/includes/con_dll.h:721:9`! 100 |
| 722 | #define TRACKER_ID_LENcxx . . $ `netcon/includes/con_dll.h:722:9`! 10 |
| 723 | #define PILOT_NAME_LENcxx . . $ `netcon/includes/con_dll.h:723:9`! 20 |
| 724 | |
| 725 | #ifdef WIN32 |
| 726 | #pragma pack(push, pxo) |
| 727 | #endif |
| 728 | #pragma pack(1) |
| 729 | struct vmt_descent3_structcxx . . $ vmt_descent3_struct# { |
| 730 | char tracker_idcxx . . $ vmt_descent3_struct#tracker_id.[TRACKER_ID_LENcxx . . $ `netcon/includes/con_dll.h:722:9`!]; |
| 731 | char pilot_namecxx . . $ vmt_descent3_struct#pilot_name.[PILOT_NAME_LENcxx . . $ `netcon/includes/con_dll.h:723:9`!]; |
| 732 | int rankcxx . . $ vmt_descent3_struct#rank.; |
| 733 | |
| 734 | int killscxx . . $ vmt_descent3_struct#kills.; |
| 735 | int deathscxx . . $ vmt_descent3_struct#deaths.; |
| 736 | int suicidescxx . . $ vmt_descent3_struct#suicides.; |
| 737 | int online_timecxx . . $ vmt_descent3_struct#online_time.; |
| 738 | int games_playedcxx . . $ vmt_descent3_struct#games_played.; |
| 739 | uint32_tcxx . . $ uint32_t# securitycxx . . $ vmt_descent3_struct#security.; |
| 740 | uint8_tcxx . . $ uint8_t# virgin_pilotcxx . . $ vmt_descent3_struct#virgin_pilot.; // This pilot was just created if TRUE |
| 741 | uint32_tcxx . . $ uint32_t# lateral_thrustcxx . . $ vmt_descent3_struct#lateral_thrust.; |
| 742 | uint32_tcxx . . $ uint32_t# rotational_thrustcxx . . $ vmt_descent3_struct#rotational_thrust.; |
| 743 | uint32_tcxx . . $ uint32_t# sliding_pctcxx . . $ vmt_descent3_struct#sliding_pct.; // Percentage of the time you were sliding |
| 744 | uint32_tcxx . . $ uint32_t# checksumcxx . . $ vmt_descent3_struct#checksum.; // This value needs to be equal to whatever the checksum is once the packet is decoded |
| 745 | uint32_tcxx . . $ uint32_t# padcxx . . $ vmt_descent3_struct#pad.; // just to provide room for out 4 byte encryption boundry only needed on the client side for now |
| 746 | }; |
| 747 | #define DESCENT3_BLOCK_SIZEcxx . . $ `netcon/includes/con_dll.h:747:9`! (sizeof(vmt_descent3_struct) - 4) |
| 748 | #ifdef WIN32 |
| 749 | #pragma pack(pop, pxo) |
| 750 | #else |
| 751 | #pragma pack() |
| 752 | #endif |
| 753 | |
| 754 | ///////////////////////////// |
| 755 | // Defines |
| 756 | #ifndef RELEASE |
| 757 | #define DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(...) DLLDebug_ConsolePrintf(__VA_ARGS__) |
| 758 | #else |
| 759 | #define DLLmprintf(...) |
| 760 | #endif |
| 761 | |
| 762 | uint32_tcxx . . $ uint32_t# MTClientVercxx . . $ MTClientVer. = 100; |
| 763 | |
| 764 | char MTUpdateURLcxx . . $ MTUpdateURL.[300] = ""; |
| 765 | |
| 766 | multi_apicxx . . $ multi_api# APIcxx . . $ API.; |
| 767 | |
| 768 | playercxx . . $ player# *DLLMPlayerscxx . . $ DLLMPlayers.; |
| 769 | shipcxx . . $ ship# *DLLShipscxx . . $ DLLShips.; |
| 770 | vmt_descent3_structcxx . . $ vmt_descent3_struct# *DLLMTPilotinfocxx . . $ DLLMTPilotinfo.; |
| 771 | int DLLPlayer_numcxx . . $ DLLPlayer_num.; |
| 772 | int *DLLGame_is_master_tracker_gamecxx . . $ DLLGame_is_master_tracker_game.; |
| 773 | int DLLGame_modecxx . . $ DLLGame_mode.; |
| 774 | char *DLLTracker_idcxx . . $ DLLTracker_id.; |
| 775 | int *DLLNum_directplay_gamescxx . . $ DLLNum_directplay_games.; |
| 776 | netgame_infocxx . . $ netgame_info# *DLLNetgamecxx . . $ DLLNetgame.; |
| 777 | char *DLLLocalD3Dircxx . . $ DLLLocalD3Dir.; |
| 778 | int *DLLMultiGameStartingcxx . . $ DLLMultiGameStarting.; |
| 779 | netplayercxx . . $ netplayer# *DLLMNetPlayerscxx . . $ DLLMNetPlayers.; |
| 780 | int MTWritingPilotcxx . . $ MTWritingPilot., MTReadingPilotcxx . . $ MTReadingPilot.; |
| 781 | int UnvalidatedDLLcxx . . $ UnvalidatedDLL. = 0; |
| 782 | int *DLLNum_network_games_knowncxx . . $ DLLNum_network_games_known.; |
| 783 | bool *DLLDedicated_servercxx . . $ DLLDedicated_server.; |
| 784 | network_gamecxx . . $ network_game# *DLLNetwork_gamescxx . . $ DLLNetwork_games.; |
| 785 | int MT_Initializedcxx . . $ MT_Initialized. = 0; |
| 786 | uint8_tcxx . . $ uint8_t# *DLLNewUIWindow_alphacxx . . $ DLLNewUIWindow_alpha.; |
| 787 | float LastTrackerDataUpdatecxx . . $ LastTrackerDataUpdate.; |
| 788 | void *pconsolecxx . . $ pconsole. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 789 | bool *DLLDP_activecxx . . $ DLLDP_active.; |
| 790 | bool *DLLUse_DirectPlaycxx . . $ DLLUse_DirectPlay.; |
| 791 | bool *DLLMulti_Gamelist_changedcxx . . $ DLLMulti_Gamelist_changed.; |
| 792 | bool *DLLSupports_score_apicxx . . $ DLLSupports_score_api.; |
| 793 | // bool * DLLMulti_no_stats_saved; |
| 794 | uint16_tcxx . . $ uint16_t# DLLnw_ListenPortcxx . . $ DLLnw_ListenPort.; |
| 795 | |
| 796 | char szloginidcxx . . $ szloginid.[LOGIN_LENcxx . . $ `netcon/includes/con_dll.h:718:9`!] = ""; |
| 797 | char sztrackeridcxx . . $ sztrackerid.[TRACKER_ID_LENcxx . . $ `netcon/includes/con_dll.h:722:9`!] = ""; |
| 798 | char szpasswordcxx . . $ szpassword.[PASSWORD_LENcxx . . $ `netcon/includes/con_dll.h:720:9`!] = ""; |
| 799 | |
| 800 | char *DLLHelpText1cxx . . $ DLLHelpText1.; |
| 801 | char *DLLHelpText2cxx . . $ DLLHelpText2.; |
| 802 | char *DLLHelpText3cxx . . $ DLLHelpText3.; |
| 803 | char *DLLHelpText4cxx . . $ DLLHelpText4.; |
| 804 | |
| 805 | char *DLLPXO_hosted_lobby_namecxx . . $ DLLPXO_hosted_lobby_name. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 806 | |
| 807 | #define DLLMAX_SHIPScxx . . $ `netcon/includes/con_dll.h:807:9`! 30 |
| 808 | |
| 809 | #define PARENT0cxx . . $ `netcon/includes/con_dll.h:809:9`! 0 |
| 810 | #define PARENT1cxx . . $ `netcon/includes/con_dll.h:810:9`! 1 |
| 811 | #define PARENT2cxx . . $ `netcon/includes/con_dll.h:811:9`! 2 |
| 812 | #define PARENT3cxx . . $ `netcon/includes/con_dll.h:812:9`! 3 |
| 813 | #define PARENT4cxx . . $ `netcon/includes/con_dll.h:813:9`! 4 |
| 814 | |
| 815 | char *DLLAuto_login_namecxx . . $ DLLAuto_login_name.; |
| 816 | char *DLLAuto_login_passcxx . . $ DLLAuto_login_pass.; |
| 817 | char *DLLAuto_login_addrcxx . . $ DLLAuto_login_addr.; |
| 818 | char *DLLAuto_login_portcxx . . $ DLLAuto_login_port.; |
| 819 | |
| 820 | bool Use_netgame_flagscxx . . $ Use_netgame_flags.; |
| 821 | |
| 822 | modulecxx . . $ module# MTAVDLLHandlecxx . . $ MTAVDLLHandle. = {NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!}; |
| 823 | |
| 824 | #if defined(WIN32) |
| 825 | typedef void(DLLFUNCCALL DLLAVInit_fp)(int *ptr); |
| 826 | typedef void(DLLFUNCCALL DLLAVCall_fp)(int eventnum); |
| 827 | typedef void(DLLFUNCCALL DLLAVClose_fp)(); |
| 828 | typedef void(DLLFUNCCALL DLLAVGetVersion_fp)(int *version); |
| 829 | typedef void(DLLFUNCCALL DLLRunCheck_fp)(char *d3_path); |
| 830 | #elif defined(POSIXcxx . . $ `<built-in>:478:9`!) |
| 831 | typedef void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`!(DLLAVInit_fpcxx . . $ DLLAVInit_fp#)(int *ptr); |
| 832 | typedef void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`!(DLLAVCall_fpcxx . . $ DLLAVCall_fp#)(int eventnum); |
| 833 | typedef void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`!(DLLAVClose_fpcxx . . $ DLLAVClose_fp#)(); |
| 834 | typedef void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`!(DLLAVGetVersion_fpcxx . . $ DLLAVGetVersion_fp#)(int *version); |
| 835 | typedef void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`!(DLLRunCheck_fpcxx . . $ DLLRunCheck_fp#)(char *d3_path); |
| 836 | #endif |
| 837 | |
| 838 | DLLAVInit_fpcxx . . $ DLLAVInit_fp# *DLLAVInitcxx . . $ DLLAVInit. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 839 | DLLAVCall_fpcxx . . $ DLLAVCall_fp# *DLLAVCallcxx . . $ DLLAVCall. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 840 | DLLAVClose_fpcxx . . $ DLLAVClose_fp# *DLLAVClosecxx . . $ DLLAVClose. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 841 | DLLAVGetVersion_fpcxx . . $ DLLAVGetVersion_fp# *DLLAVGetVersioncxx . . $ DLLAVGetVersion. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 842 | DLLRunCheck_fpcxx . . $ DLLRunCheck_fp# *DLLRunCheckcxx . . $ DLLRunCheck. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 843 | |
| 844 | struct msn_listcxx . . $ msn_list# { |
| 845 | char msn_namecxx . . $ msn_list#msn_name.[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 846 | char msn_filecxx . . $ msn_list#msn_file.[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 847 | void *ticxx . . $ msn_list#ti.; |
| 848 | struct msn_listcxx . . $ msn_list# *nextcxx . . $ msn_list#next.; |
| 849 | }; |
| 850 | |
| 851 | msn_listcxx . . $ msn_list# *FirstMsncxx . . $ FirstMsn., *CurrMsncxx . . $ CurrMsn., *TmpMsncxx . . $ TmpMsn.; |
| 852 | |
| 853 | #ifdef WIN32 |
| 854 | #include "directplay.h" |
| 855 | |
| 856 | modem_list *DLLModems_found; |
| 857 | int *DLLNum_modems_found; |
| 858 | |
| 859 | LPDPSESSIONDESC2 DLLDirectplay_sessions; |
| 860 | #endif |
| 861 | |
| 862 | BOOLcxx . . $ `netcon/includes/inetgetfile.h:108:9`! DLLTCP_activecxx . . $ DLLTCP_active.; |
| 863 | BOOLcxx . . $ `netcon/includes/inetgetfile.h:108:9`! DLLIPX_activecxx . . $ DLLIPX_active.; |
| 864 | |
| 865 | void AddMsnItemcxx . . $ AddMsnItem(b56b984d2e7fc727).(msn_listcxx . . $ msn_list# *new_msn) { |
| 866 | CurrMsncxx . . $ CurrMsn. = FirstMsncxx . . $ FirstMsn.; |
| 867 | if (CurrMsncxx . . $ CurrMsn.) { |
| 868 | while (CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.) { |
| 869 | CurrMsncxx . . $ CurrMsn. = CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.; |
| 870 | } |
| 871 | CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next. = new_msn; |
| 872 | CurrMsncxx . . $ CurrMsn. = CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.; |
| 873 | } else { |
| 874 | FirstMsncxx . . $ FirstMsn. = new_msn; |
| 875 | CurrMsncxx . . $ CurrMsn. = FirstMsncxx . . $ FirstMsn.; |
| 876 | } |
| 877 | CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 878 | } |
| 879 | void RemoveAllMsnItemscxx . . $ RemoveAllMsnItems(49f6e7a06ebc5aa8).(void) { |
| 880 | CurrMsncxx . . $ CurrMsn. = FirstMsncxx . . $ FirstMsn.; |
| 881 | if (CurrMsncxx . . $ CurrMsn.) { |
| 882 | while (CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.) { |
| 883 | TmpMsncxx . . $ TmpMsn. = CurrMsncxx . . $ CurrMsn.; |
| 884 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(CurrMsncxx . . $ CurrMsn.->ticxx . . $ msn_list#ti.); |
| 885 | CurrMsncxx . . $ CurrMsn. = CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.; |
| 886 | DLLmem_freecxx . . $ DLLmem_free.(TmpMsncxx . . $ TmpMsn.); |
| 887 | } |
| 888 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(CurrMsncxx . . $ CurrMsn.->ticxx . . $ msn_list#ti.); |
| 889 | DLLmem_freecxx . . $ DLLmem_free.(CurrMsncxx . . $ CurrMsn.); |
| 890 | } |
| 891 | FirstMsncxx . . $ FirstMsn. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 892 | } |
| 893 | |
| 894 | msn_listcxx . . $ msn_list# *FindMsnItemcxx . . $ FindMsnItem(4285e9dd1698e350).(const char *name) { |
| 895 | CurrMsncxx . . $ CurrMsn. = FirstMsncxx . . $ FirstMsn.; |
| 896 | if (CurrMsncxx . . $ CurrMsn.) { |
| 897 | while (CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.) { |
| 898 | if (strcmp(CurrMsncxx . . $ CurrMsn.->msn_namecxx . . $ msn_list#msn_name., name) == 0) |
| 899 | return CurrMsncxx . . $ CurrMsn.; |
| 900 | CurrMsncxx . . $ CurrMsn. = CurrMsncxx . . $ CurrMsn.->nextcxx . . $ msn_list#next.; |
| 901 | } |
| 902 | if (strcmp(CurrMsncxx . . $ CurrMsn.->msn_namecxx . . $ msn_list#msn_name., name) == 0) |
| 903 | return CurrMsncxx . . $ CurrMsn.; |
| 904 | } |
| 905 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 906 | } |
| 907 | |
| 908 | void MultiplayerOptionsMenucxx . . $ MultiplayerOptionsMenu(49f6e7a06ebc5aa8).(); |
| 909 | |
| 910 | // Draws a menu that inputs multiplayer game options |
| 911 | // Returns true if we are starting a game |
| 912 | #define MAX_DLLScxx . . $ `netcon/includes/con_dll.h:912:9`! 40 |
| 913 | char dll_textcxx . . $ dll_text.[MAX_DLLScxx . . $ `netcon/includes/con_dll.h:912:9`!][_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 914 | |
| 915 | int StartMultiplayerGameMenucxx . . $ StartMultiplayerGameMenu(b126dc7c1de90089).() { |
| 916 | void *game_name_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(10), UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!, -1); // TXT_LC_GAMENAME |
| 917 | void *mission_name_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(11), UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!, -1); // TXT_LC_MSNNAME |
| 918 | void *script_name_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(12), UICOL_TEXT_NORMALcxx . . $ `Descent3/newui.h:218:9`!, -1); // TXT_LC_SCRIPTNAME |
| 919 | |
| 920 | void *start_game_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(13), UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!, -1); // TXT_LC_STARTGAME |
| 921 | void *multiplayer_opts_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(14), UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!, -1); // TXT_LC_MPLYROPTIONS |
| 922 | void *exit_on_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(5), UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!, -1); // TXT_LC_PREVMENU |
| 923 | |
| 924 | void *start_game_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(13), UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!, -1); // TXT_LC_STARTGAME |
| 925 | void *multiplayer_opts_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(14), UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!, -1); // TXT_LC_MPLYROPTIONS |
| 926 | void *exit_off_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(5), UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!, -1); // TXT_LC_PREVMENU |
| 927 | |
| 928 | void *save_settings_txt_on = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_DLL_SAVESETTINGScxx . . $ `netcon/lanclient/lanclient.cpp:285:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!, -1); |
| 929 | void *save_settings_txt_off = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_DLL_SAVESETTINGScxx . . $ `netcon/lanclient/lanclient.cpp:285:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!, -1); |
| 930 | |
| 931 | void *load_settings_txt_on = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_DLL_LOADSETTINGScxx . . $ `netcon/lanclient/lanclient.cpp:286:9`!, UICOL_HOTSPOT_HIcxx . . $ `Descent3/newui.h:217:9`!, -1); |
| 932 | void *load_settings_txt_off = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXT_DLL_LOADSETTINGScxx . . $ `netcon/lanclient/lanclient.cpp:286:9`!, UICOL_HOTSPOT_LOcxx . . $ `Descent3/newui.h:214:9`!, -1); |
| 933 | |
| 934 | void *start_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(TXTcxx . . $ `netcon/includes/con_dll.h:288:9`!(13), UICOL_WINDOW_TITLEcxx . . $ `Descent3/newui.h:219:9`!, DLL_BIG_BRIEFING_FONTcxx . . $ `netcon/includes/con_dll.h:302:9`!); |
| 935 | |
| 936 | void *blank_text = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).("", GR_BLACKcxx . . $ GR_BLACK., -1); |
| 937 | void *dll_txt_items[MAX_DLLScxx . . $ `netcon/includes/con_dll.h:912:9`!]; |
| 938 | int a; |
| 939 | for (a = 0; a < MAX_DLLScxx . . $ `netcon/includes/con_dll.h:912:9`!; a++) |
| 940 | dll_txt_items[a] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 941 | char str[100]; |
| 942 | int exit_menu = 0; |
| 943 | int cury = 40; |
| 944 | int ret = 0; |
| 945 | int dllcount = 0; |
| 946 | int id = 100; |
| 947 | |
| 948 | rendering_statecxx . . $ rendering_state# rs; |
| 949 | DLLrend_GetRenderStatecxx . . $ DLLrend_GetRenderState.(&rs); |
| 950 | |
| 951 | void *main_wnd = DLLNewUIWindowCreatecxx . . $ DLLNewUIWindowCreate.(0, 0, rs.screen_widthcxx . . $ rendering_state#screen_width., rs.screen_heightcxx . . $ rendering_state#screen_height., UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`!); |
| 952 | |
| 953 | void *start_title = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, start_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 954 | cury += 35; |
| 955 | |
| 956 | // Mission name |
| 957 | void *mission_text = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, game_name_text, 0, cury, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 958 | cury += 15; |
| 959 | void *mission_name_edit = DLLEditCreatecxx . . $ DLLEditCreate.(main_wnd, id++, 10, cury, 300, 15, UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 960 | cury += 18; |
| 961 | cury += 30; |
| 962 | |
| 963 | // mission name |
| 964 | void *game_name = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, mission_name_text, 45, cury, 0); |
| 965 | cury += 15; |
| 966 | |
| 967 | void *list_1 = DLLListCreatecxx . . $ DLLListCreate.(main_wnd, id++, 40, cury, 200, 100, 0); |
| 968 | |
| 969 | // Back up the the same line! |
| 970 | cury -= 15; |
| 971 | |
| 972 | // Script box |
| 973 | void *script_name = DLLTextCreatecxx . . $ DLLTextCreate.(main_wnd, script_name_text, 370, cury, 0); |
| 974 | cury += 18; |
| 975 | void *script_list = DLLListCreatecxx . . $ DLLListCreate.(main_wnd, id++, 360, cury, 200, 100, 0); |
| 976 | cury += 118; |
| 977 | cury += 40; |
| 978 | |
| 979 | // Start button |
| 980 | int start_button = UID_OKcxx . . $ `ui/ui.h:368:9`!; |
| 981 | void *start_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, UID_OKcxx . . $ `ui/ui.h:368:9`!, KEY_ENTERcxx . . $ `ddio/ddio_common.h:268:9`!, start_game_off_text, start_game_on_text, 10, cury, 180, |
| 982 | 30, UIF_FITcxx . . $ `ui/ui.h:343:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 983 | cury += 18; |
| 984 | |
| 985 | // Option button |
| 986 | int option_button = id; |
| 987 | void *option_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, id++, KEY_Ocxx . . $ `ddio/ddio_common.h:243:9`!, multiplayer_opts_off_text, multiplayer_opts_on_text, 10, |
| 988 | cury, 180, 30, UIF_FITcxx . . $ `ui/ui.h:343:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 989 | cury += 18; |
| 990 | |
| 991 | // cancel button |
| 992 | |
| 993 | int save_button = id; |
| 994 | void *save_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, id++, 0, save_settings_txt_off, save_settings_txt_on, 10, cury, 180, 30, |
| 995 | UIF_FITcxx . . $ `ui/ui.h:343:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 996 | cury += 18; |
| 997 | int load_button = id; |
| 998 | void *load_hs = DLLHotSpotCreatecxx . . $ DLLHotSpotCreate.(main_wnd, id++, 0, load_settings_txt_off, load_settings_txt_on, 10, cury, 180, 30, |
| 999 | UIF_FITcxx . . $ `ui/ui.h:343:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 1000 | cury += 18; |
| 1001 | |
| 1002 | int cancel_button = UID_CANCELcxx . . $ `ui/ui.h:369:9`!; |
| 1003 | void *cancel_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, 10, cury, 180, 30, |
| 1004 | UIF_FITcxx . . $ `ui/ui.h:343:9`! | UIF_CENTERcxx . . $ `ui/ui.h:342:9`!); |
| 1005 | // put the multiplayer dll's into the listbox |
| 1006 | dllcount = 1; |
| 1007 | char buffer[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 1008 | |
| 1009 | #if (!(defined(OEM) || defined(DEMO))) |
| 1010 | char search[256]; |
| 1011 | DLLddio_MakePathcxx . . $ DLLddio_MakePath.(search, DLLLocalD3Dircxx . . $ DLLLocalD3Dir., "netgames", "*.d3m", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1012 | if (DLLddio_FindFileStartcxx . . $ DLLddio_FindFileStart.(search, buffer)) { |
| 1013 | dllcount = 1; |
| 1014 | buffer[strlen(buffer) - 4] = '\0'; // Strip out the extention |
| 1015 | strcpy(dll_textcxx . . $ dll_text.[dllcount - 1], buffer); |
| 1016 | while ((DLLddio_FindNextFilecxx . . $ DLLddio_FindNextFile.(buffer)) && (dllcount < MAX_DLLScxx . . $ `netcon/includes/con_dll.h:912:9`!)) { |
| 1017 | buffer[strlen(buffer) - 4] = '\0'; // Strip out the extention |
| 1018 | strcpy(dll_textcxx . . $ dll_text.[dllcount], buffer); |
| 1019 | dllcount++; |
| 1020 | } |
| 1021 | } else { |
| 1022 | dllcount = 0; |
| 1023 | } |
| 1024 | DLLddio_FindFileClosecxx . . $ DLLddio_FindFileClose.(); |
| 1025 | #else |
| 1026 | strcpy(dll_text[0], "Anarchy"); |
| 1027 | strcpy(dll_text[1], "Capture The Flag"); |
| 1028 | dllcount = 2; |
| 1029 | #endif |
| 1030 | DLLListRemoveAllcxx . . $ DLLListRemoveAll.(script_list); |
| 1031 | |
| 1032 | int index; |
| 1033 | |
| 1034 | for (index = 0; index < dllcount; index++) { |
| 1035 | dll_txt_items[index] = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(dll_textcxx . . $ dll_text.[index], UICOL_LISTBOX_LOcxx . . $ `Descent3/newui.h:221:9`!, -1); |
| 1036 | DLLListAddItemcxx . . $ DLLListAddItem.(script_list, dll_txt_items[index]); |
| 1037 | } |
| 1038 | #if (!(defined(OEM) || defined(DEMO))) |
| 1039 | msn_listcxx . . $ msn_list# *mi; |
| 1040 | |
| 1041 | DLLddio_MakePathcxx . . $ DLLddio_MakePath.(search, DLLLocalD3Dircxx . . $ DLLLocalD3Dir., "data", "levels", "*.msn", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1042 | // DLLmprintf((0,search)); |
| 1043 | if (DLLddio_FindFileStartcxx . . $ DLLddio_FindFileStart.(search, buffer)) { |
| 1044 | if (DLLIsMissionMultiPlayablecxx . . $ DLLIsMissionMultiPlayable.(buffer)) { |
| 1045 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Found a mission: %s\n", buffer); |
| 1046 | mi = (msn_listcxx . . $ msn_list# *)DLLmem_malloccxx . . $ DLLmem_malloc.(sizeof(msn_listcxx . . $ msn_list#)); |
| 1047 | strcpy(mi->msn_namecxx . . $ msn_list#msn_name., DLLGetMissionNamecxx . . $ DLLGetMissionName.(buffer)); |
| 1048 | strcpy(mi->msn_filecxx . . $ msn_list#msn_file., buffer); |
| 1049 | mi->ticxx . . $ msn_list#ti. = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(mi->msn_namecxx . . $ msn_list#msn_name., UICOL_LISTBOX_LOcxx . . $ `Descent3/newui.h:221:9`!, -1); |
| 1050 | AddMsnItemcxx . . $ AddMsnItem(b56b984d2e7fc727).(mi); |
| 1051 | DLLListAddItemcxx . . $ DLLListAddItem.(list_1, mi->ticxx . . $ msn_list#ti.); |
| 1052 | } |
| 1053 | while (DLLddio_FindNextFilecxx . . $ DLLddio_FindNextFile.(buffer)) { |
| 1054 | if (DLLIsMissionMultiPlayablecxx . . $ DLLIsMissionMultiPlayable.(buffer)) { |
| 1055 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Found a mission: %s\n", buffer); |
| 1056 | mi = (msn_listcxx . . $ msn_list# *)DLLmem_malloccxx . . $ DLLmem_malloc.(sizeof(msn_listcxx . . $ msn_list#)); |
| 1057 | strcpy(mi->msn_namecxx . . $ msn_list#msn_name., DLLGetMissionNamecxx . . $ DLLGetMissionName.(buffer)); |
| 1058 | strcpy(mi->msn_filecxx . . $ msn_list#msn_file., buffer); |
| 1059 | mi->ticxx . . $ msn_list#ti. = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(mi->msn_namecxx . . $ msn_list#msn_name., UICOL_LISTBOX_LOcxx . . $ `Descent3/newui.h:221:9`!, -1); |
| 1060 | AddMsnItemcxx . . $ AddMsnItem(b56b984d2e7fc727).(mi); |
| 1061 | DLLListAddItemcxx . . $ DLLListAddItem.(list_1, mi->ticxx . . $ msn_list#ti.); |
| 1062 | } |
| 1063 | } |
| 1064 | } |
| 1065 | DLLddio_FindFileClosecxx . . $ DLLddio_FindFileClose.(); |
| 1066 | |
| 1067 | // char mn3_path[_MAX_PATH*2]; |
| 1068 | DLLddio_MakePathcxx . . $ DLLddio_MakePath.(search, DLLLocalD3Dircxx . . $ DLLLocalD3Dir., "missions", "*.mn3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1069 | // DLLmprintf(0,search); |
| 1070 | if (DLLddio_FindFileStartcxx . . $ DLLddio_FindFileStart.(search, buffer)) { |
| 1071 | // DLLddio_MakePath(mn3_path,DLLLocalD3Dir,"missions",buffer,NULL); |
| 1072 | |
| 1073 | if (DLLIsMissionMultiPlayablecxx . . $ DLLIsMissionMultiPlayable.(buffer) && (stricmpcxx . . $ `linux/linux_fix.h:43:9`!("d3_2.mn3", buffer) != 0)) { |
| 1074 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Found a mission: %s\n", buffer); |
| 1075 | mi = (msn_listcxx . . $ msn_list# *)DLLmem_malloccxx . . $ DLLmem_malloc.(sizeof(msn_listcxx . . $ msn_list#)); |
| 1076 | strcpy(mi->msn_namecxx . . $ msn_list#msn_name., DLLGetMissionNamecxx . . $ DLLGetMissionName.(buffer)); |
| 1077 | strcpy(mi->msn_filecxx . . $ msn_list#msn_file., buffer); |
| 1078 | mi->ticxx . . $ msn_list#ti. = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(mi->msn_namecxx . . $ msn_list#msn_name., UICOL_LISTBOX_LOcxx . . $ `Descent3/newui.h:221:9`!, -1); |
| 1079 | AddMsnItemcxx . . $ AddMsnItem(b56b984d2e7fc727).(mi); |
| 1080 | DLLListAddItemcxx . . $ DLLListAddItem.(list_1, mi->ticxx . . $ msn_list#ti.); |
| 1081 | } |
| 1082 | while (DLLddio_FindNextFilecxx . . $ DLLddio_FindNextFile.(buffer)) { |
| 1083 | if (stricmpcxx . . $ `linux/linux_fix.h:43:9`!("d3_2.mn3", buffer) == 0) |
| 1084 | continue; |
| 1085 | // DLLddio_MakePath(mn3_path,DLLLocalD3Dir,"missions",buffer,NULL); |
| 1086 | if (DLLIsMissionMultiPlayablecxx . . $ DLLIsMissionMultiPlayable.(buffer)) { |
| 1087 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Found a mission: %s\n", buffer); |
| 1088 | mi = (msn_listcxx . . $ msn_list# *)DLLmem_malloccxx . . $ DLLmem_malloc.(sizeof(msn_listcxx . . $ msn_list#)); |
| 1089 | strcpy(mi->msn_namecxx . . $ msn_list#msn_name., DLLGetMissionNamecxx . . $ DLLGetMissionName.(buffer)); |
| 1090 | strcpy(mi->msn_filecxx . . $ msn_list#msn_file., buffer); |
| 1091 | mi->ticxx . . $ msn_list#ti. = DLLCreateNewUITextItemcxx . . $ DLLCreateNewUITextItem(265f30871222eac8).(mi->msn_namecxx . . $ msn_list#msn_name., UICOL_LISTBOX_LOcxx . . $ `Descent3/newui.h:221:9`!, -1); |
| 1092 | AddMsnItemcxx . . $ AddMsnItem(b56b984d2e7fc727).(mi); |
| 1093 | DLLListAddItemcxx . . $ DLLListAddItem.(list_1, mi->ticxx . . $ msn_list#ti.); |
| 1094 | } |
| 1095 | } |
| 1096 | } |
| 1097 | DLLddio_FindFileClosecxx . . $ DLLddio_FindFileClose.(); |
| 1098 | #ifdef RELEASE |
| 1099 | // TODO: Make sure the main mission is always listed -- even on a minimal install |
| 1100 | if (!FindMsnItem("Descent 3: Retribution")) { |
| 1101 | mi = (msn_list *)DLLmem_malloc(sizeof(msn_list)); |
| 1102 | |
| 1103 | strcpy(mi->msn_name, "Descent 3: Retribution"); |
| 1104 | strcpy(mi->msn_file, "d3.mn3"); |
| 1105 | AddMsnItem(mi); |
| 1106 | mi->ti = DLLCreateNewUITextItem(mi->msn_name, UICOL_LISTBOX_LO); |
| 1107 | DLLListAddItem(list_1, mi->ti); |
| 1108 | } |
| 1109 | #endif |
| 1110 | const char *p; |
| 1111 | #else |
| 1112 | void *msn_single_ti = DLLCreateNewUITextItem("Polaris", UICOL_LISTBOX_LO); |
| 1113 | void *msn_multi_ti = DLLCreateNewUITextItem("The Core", UICOL_LISTBOX_LO); |
| 1114 | void *msn_multi_2 = DLLCreateNewUITextItem("Taurus", UICOL_LISTBOX_LO); |
| 1115 | DLLListAddItem(list_1, msn_single_ti); |
| 1116 | DLLListAddItem(list_1, msn_multi_ti); |
| 1117 | DLLListAddItem(list_1, msn_multi_2); |
| 1118 | #endif |
| 1119 | // Bash some values to default |
| 1120 | char pilot_name[PILOT_STRING_SIZEcxx . . $ `Descent3/pilot_class.h:124:9`!]; |
| 1121 | CurrentPilotNamecxx . . $ CurrentPilotName.(pilot_name); |
| 1122 | |
| 1123 | strcpy(DLLMPlayerscxx . . $ DLLMPlayers.[DLLPlayer_numcxx . . $ DLLPlayer_num.].callsigncxx . . $ player#callsign., pilot_name); |
| 1124 | snprintf(str, sizeof(str), "%s's Game", DLLMPlayerscxx . . $ DLLMPlayers.[DLLPlayer_numcxx . . $ DLLPlayer_num.].callsigncxx . . $ player#callsign.); |
| 1125 | DLLEditSetTextcxx . . $ DLLEditSetText.(mission_name_edit, str); |
| 1126 | |
| 1127 | DLLNetgamecxx . . $ DLLNetgame.->max_playerscxx . . $ netgame_info#max_players. = 8; |
| 1128 | DLLNetgamecxx . . $ DLLNetgame.->packets_per_secondcxx . . $ netgame_info#packets_per_second. = DLLnw_ReccomendPPScxx . . $ DLLnw_ReccomendPPS.(); |
| 1129 | DLLNetgamecxx . . $ DLLNetgame.->respawn_timecxx . . $ netgame_info#respawn_time. = 60; |
| 1130 | DLLNetgamecxx . . $ DLLNetgame.->difficultycxx . . $ netgame_info#difficulty. = 2; |
| 1131 | DLLNetgamecxx . . $ DLLNetgame.->flagscxx . . $ netgame_info#flags. = NF_RANDOMIZE_RESPAWNcxx . . $ `Descent3/multi_external.h:241:9`!; |
| 1132 | DLLNewUIWindowLoadBackgroundImagecxx . . $ DLLNewUIWindowLoadBackgroundImage.(main_wnd, "multimain.ogf"); |
| 1133 | DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd); |
| 1134 | char dftset[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 1135 | DLLddio_MakePathcxx . . $ DLLddio_MakePath.(dftset, DLLLocalD3Dircxx . . $ DLLLocalD3Dir., "custom", "settings", "default.mps", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1136 | if (DLLMultiLoadSettingscxx . . $ DLLMultiLoadSettings.(dftset)) { |
| 1137 | DLLEditSetTextcxx . . $ DLLEditSetText.(mission_name_edit, DLLNetgamecxx . . $ DLLNetgame.->namecxx . . $ netgame_info#name.); |
| 1138 | #if (!(defined(OEM) || defined(DEMO))) |
| 1139 | p = DLLGetMissionNamecxx . . $ DLLGetMissionName.(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission.); |
| 1140 | mi = FindMsnItemcxx . . $ FindMsnItem(4285e9dd1698e350).(p); |
| 1141 | |
| 1142 | if (mi) |
| 1143 | DLLListSelectItemcxx . . $ DLLListSelectItem.(list_1, mi->ticxx . . $ msn_list#ti.); |
| 1144 | #endif |
| 1145 | for (index = 0; index < dllcount; index++) { |
| 1146 | if (stricmpcxx . . $ `linux/linux_fix.h:43:9`!(dll_text[index], DLLNetgame->scriptname) == 0) { |
| 1147 | DLLListSelectItemcxx . . $ DLLListSelectItem.(script_list, dll_txt_items[index]); |
| 1148 | break; |
| 1149 | } |
| 1150 | } |
| 1151 | } |
| 1152 | while (!exit_menu) { |
| 1153 | int res; |
| 1154 | |
| 1155 | res = DLLDoUIcxx . . $ DLLDoUI.(); |
| 1156 | |
| 1157 | // handle all UI results. |
| 1158 | |
| 1159 | if (res == option_button) { |
| 1160 | DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd); |
| 1161 | MultiplayerOptionsMenucxx . . $ MultiplayerOptionsMenu(49f6e7a06ebc5aa8).(); |
| 1162 | DLLNewUIWindowOpencxx . . $ DLLNewUIWindowOpen.(main_wnd); |
| 1163 | } else if (res == start_button) { |
| 1164 | // Get Game name |
| 1165 | DLLEditGetTextcxx . . $ DLLEditGetText.(mission_name_edit, DLLNetgamecxx . . $ DLLNetgame.->namecxx . . $ netgame_info#name., NETGAME_NAME_LENcxx . . $ `Descent3/multi_external.h:125:9`!); |
| 1166 | // Get mission name |
| 1167 | #if (!(defined(OEM) || defined(DEMO))) |
| 1168 | mi = FindMsnItemcxx . . $ FindMsnItem(4285e9dd1698e350).(DLLListGetItemcxx . . $ DLLListGetItem.(list_1, DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(list_1))); |
| 1169 | if (!mi) |
| 1170 | break; |
| 1171 | strncpy(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission., mi->msn_filecxx . . $ msn_list#msn_file., MSN_NAMELENcxx . . $ `Descent3/descent.h:181:9`!); |
| 1172 | DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission.[MSN_NAMELENcxx . . $ `Descent3/descent.h:181:9`! - 1] = '\0'; |
| 1173 | strncpy(DLLNetgamecxx . . $ DLLNetgame.->mission_namecxx . . $ netgame_info#mission_name., mi->msn_namecxx . . $ msn_list#msn_name., MISSION_NAME_LENcxx . . $ `Descent3/multi_external.h:206:9`!); |
| 1174 | DLLNetgamecxx . . $ DLLNetgame.->mission_namecxx . . $ netgame_info#mission_name.[MISSION_NAME_LENcxx . . $ `Descent3/multi_external.h:206:9`! - 1] = '\0'; |
| 1175 | #else |
| 1176 | // strcpy(DLLNetgame->mission,DLLListGetSelectedIndex(list_1)?"thecore.d3l":"polaris.d3l"); |
| 1177 | |
| 1178 | switch (DLLListGetSelectedIndex(list_1)) { |
| 1179 | case 0: |
| 1180 | strcpy(DLLNetgame->mission, "polaris.d3l"); |
| 1181 | strncpy(DLLNetgame->mission_name, "Polaris", MISSION_NAME_LEN); |
| 1182 | break; |
| 1183 | case 1: |
| 1184 | strcpy(DLLNetgame->mission, "thecore.d3l"); |
| 1185 | strncpy(DLLNetgame->mission_name, "The Core", MISSION_NAME_LEN); |
| 1186 | break; |
| 1187 | case 2: |
| 1188 | |
| 1189 | strcpy(DLLNetgame->mission, "taurus.d3l"); |
| 1190 | strncpy(DLLNetgame->mission_name, "Taurus", MISSION_NAME_LEN); |
| 1191 | |
| 1192 | break; |
| 1193 | default:; |
| 1194 | } |
| 1195 | |
| 1196 | // strcpy(DLLNetgame->name,DLLListGetSelectedIndex(list_1)?"The Core":"Polaris"); |
| 1197 | #endif |
| 1198 | // Get script |
| 1199 | strcpy(buffer, DLLListGetItemcxx . . $ DLLListGetItem.(script_list, DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(script_list))); |
| 1200 | if (strcmp(buffer, "None")) { |
| 1201 | // remove file extension |
| 1202 | for (int d = strlen(buffer) - 1; d >= 0; d--) { |
| 1203 | if (buffer[d] == '.') { |
| 1204 | buffer[d] = '\0'; |
| 1205 | break; |
| 1206 | } |
| 1207 | } |
| 1208 | |
| 1209 | #if (defined(OEM) || defined(DEMO)) |
| 1210 | if (!stricmp(buffer, "Capture The Flag")) |
| 1211 | strcpy(buffer, "CTF"); |
| 1212 | #endif |
| 1213 | |
| 1214 | strcpy(DLLNetgamecxx . . $ DLLNetgame.->scriptnamecxx . . $ netgame_info#scriptname., buffer); |
| 1215 | } |
| 1216 | |
| 1217 | // Actually start the game |
| 1218 | // DAJ commen out next line if problems |
| 1219 | int teams = DLLCheckMissionForScriptcxx . . $ DLLCheckMissionForScript.(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission., DLLNetgamecxx . . $ DLLNetgame.->scriptnamecxx . . $ netgame_info#scriptname., 0); |
| 1220 | // int teams = 1; |
| 1221 | if (teams >= 0) |
| 1222 | #if (!(defined(OEM) || defined(DEMO))) |
| 1223 | { |
| 1224 | if (DLLLoadMissioncxx . . $ DLLLoadMission.(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission.)) |
| 1225 | #else |
| 1226 | { |
| 1227 | if (DLLLoadMission(DLLNetgame->mission)) |
| 1228 | #endif |
| 1229 | { |
| 1230 | // Do warp dialog here if needed |
| 1231 | if (-1 != DLLMultiLevelSelectioncxx . . $ DLLMultiLevelSelection.()) { |
| 1232 | DLLmprintfcxx . . $ `netcon/includes/con_dll.h:757:9`!(0, "Mission loaded successfully!\n"); |
| 1233 | DLLMultiStartServercxx . . $ DLLMultiStartServer(99469d7ff9a1485a).(1, DLLNetgamecxx . . $ DLLNetgame.->scriptnamecxx . . $ netgame_info#scriptname., teams); |
| 1234 | exit_menu = 1; |
| 1235 | ret = 1; |
| 1236 | } |
| 1237 | } |
| 1238 | } |
| 1239 | } else if (res == cancel_button) { |
| 1240 | exit_menu = 1; |
| 1241 | } else if (res == save_button) { |
| 1242 | // Get Game name |
| 1243 | DLLEditGetTextcxx . . $ DLLEditGetText.(mission_name_edit, DLLNetgamecxx . . $ DLLNetgame.->namecxx . . $ netgame_info#name., NETGAME_NAME_LENcxx . . $ `Descent3/multi_external.h:125:9`!); |
| 1244 | #if (!(defined(OEM) || defined(DEMO))) |
| 1245 | // Get mission name |
| 1246 | mi = FindMsnItemcxx . . $ FindMsnItem(4285e9dd1698e350).(DLLListGetItemcxx . . $ DLLListGetItem.(list_1, DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(list_1))); |
| 1247 | if (!mi) |
| 1248 | break; |
| 1249 | strcpy(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission., mi->msn_filecxx . . $ msn_list#msn_file.); |
| 1250 | #endif |
| 1251 | // Get script |
| 1252 | strcpy(buffer, DLLListGetItemcxx . . $ DLLListGetItem.(script_list, DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(script_list))); |
| 1253 | if (strcmp(buffer, "None")) { |
| 1254 | // remove file extension |
| 1255 | for (int d = strlen(buffer) - 1; d >= 0; d--) { |
| 1256 | if (buffer[d] == '.') { |
| 1257 | buffer[d] = '\0'; |
| 1258 | break; |
| 1259 | } |
| 1260 | } |
| 1261 | |
| 1262 | strcpy(DLLNetgamecxx . . $ DLLNetgame.->scriptnamecxx . . $ netgame_info#scriptname., buffer); |
| 1263 | } |
| 1264 | DLLMultiDoConfigSavecxx . . $ DLLMultiDoConfigSave.(); |
| 1265 | } else if (res == load_button) { |
| 1266 | // Get Game name |
| 1267 | DLLEditGetTextcxx . . $ DLLEditGetText.(mission_name_edit, DLLNetgamecxx . . $ DLLNetgame.->namecxx . . $ netgame_info#name., NETGAME_NAME_LENcxx . . $ `Descent3/multi_external.h:125:9`!); |
| 1268 | #if (!(defined(OEM) || defined(DEMO))) |
| 1269 | // Get mission name |
| 1270 | mi = FindMsnItemcxx . . $ FindMsnItem(4285e9dd1698e350).(DLLListGetItemcxx . . $ DLLListGetItem.(list_1, DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(list_1))); |
| 1271 | if (!mi) |
| 1272 | break; |
| 1273 | strcpy(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission., mi->msn_filecxx . . $ msn_list#msn_file.); |
| 1274 | #endif |
| 1275 | // Get script |
| 1276 | strcpy(buffer, DLLListGetItemcxx . . $ DLLListGetItem.(script_list, DLLListGetSelectedIndexcxx . . $ DLLListGetSelectedIndex.(script_list))); |
| 1277 | if (strcmp(buffer, "None")) { |
| 1278 | // remove file extension |
| 1279 | for (int d = strlen(buffer) - 1; d >= 0; d--) { |
| 1280 | if (buffer[d] == '.') { |
| 1281 | buffer[d] = '\0'; |
| 1282 | break; |
| 1283 | } |
| 1284 | } |
| 1285 | |
| 1286 | strcpy(DLLNetgamecxx . . $ DLLNetgame.->scriptnamecxx . . $ netgame_info#scriptname., buffer); |
| 1287 | } |
| 1288 | DLLMultiDoConfigLoadcxx . . $ DLLMultiDoConfigLoad.(); |
| 1289 | if (!Use_netgame_flagscxx . . $ Use_netgame_flags.) { |
| 1290 | DLLNetgamecxx . . $ DLLNetgame.->flagscxx . . $ netgame_info#flags. = 0; |
| 1291 | } |
| 1292 | DLLEditSetTextcxx . . $ DLLEditSetText.(mission_name_edit, DLLNetgamecxx . . $ DLLNetgame.->namecxx . . $ netgame_info#name.); |
| 1293 | #if (!(defined(OEM) || defined(DEMO))) |
| 1294 | p = DLLGetMissionNamecxx . . $ DLLGetMissionName.(DLLNetgamecxx . . $ DLLNetgame.->missioncxx . . $ netgame_info#mission.); |
| 1295 | mi = FindMsnItemcxx . . $ FindMsnItem(4285e9dd1698e350).(p); |
| 1296 | |
| 1297 | if (mi) |
| 1298 | DLLListSelectItemcxx . . $ DLLListSelectItem.(list_1, mi->ticxx . . $ msn_list#ti.); |
| 1299 | #endif |
| 1300 | for (index = 0; index < dllcount; index++) { |
| 1301 | if (stricmpcxx . . $ `linux/linux_fix.h:43:9`!(dll_text[index], DLLNetgame->scriptname) == 0) { |
| 1302 | DLLListSelectItemcxx . . $ DLLListSelectItem.(script_list, dll_txt_items[index]); |
| 1303 | break; |
| 1304 | } |
| 1305 | } |
| 1306 | } |
| 1307 | } |
| 1308 | |
| 1309 | DLLNewUIWindowClosecxx . . $ DLLNewUIWindowClose.(main_wnd); |
| 1310 | DLLNewUIWindowDestroycxx . . $ DLLNewUIWindowDestroy.(main_wnd); |
| 1311 | for (a = 0; a < MAX_DLLScxx . . $ `netcon/includes/con_dll.h:912:9`!; a++) |
| 1312 | if (dll_txt_items[a]) |
| 1313 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(dll_txt_items[a]); |
| 1314 | RemoveAllMsnItemscxx . . $ RemoveAllMsnItems(49f6e7a06ebc5aa8).(); |
| 1315 | // cleanup |
| 1316 | #ifdef DEMO |
| 1317 | DLLRemoveUITextItem(msn_multi_ti); |
| 1318 | DLLRemoveUITextItem(msn_single_ti); |
| 1319 | DLLRemoveUITextItem(msn_multi_2); |
| 1320 | #endif |
| 1321 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(game_name_text); |
| 1322 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(mission_name_text); |
| 1323 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(script_name_text); |
| 1324 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_game_on_text); |
| 1325 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(multiplayer_opts_on_text); |
| 1326 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_on_text); |
| 1327 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_game_off_text); |
| 1328 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(multiplayer_opts_off_text); |
| 1329 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(exit_off_text); |
| 1330 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(blank_text); |
| 1331 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(save_settings_txt_on); |
| 1332 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(save_settings_txt_off); |
| 1333 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(load_settings_txt_on); |
| 1334 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(load_settings_txt_off); |
| 1335 | |
| 1336 | DLLRemoveUITextItemcxx . . $ DLLRemoveUITextItem.(start_text); |
| 1337 | |
| 1338 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(start_title); |
| 1339 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(save_hs); |
| 1340 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(load_hs); |
| 1341 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(main_wnd); |
| 1342 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(game_name); |
| 1343 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(list_1); |
| 1344 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(mission_text); |
| 1345 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(mission_name_edit); |
| 1346 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(script_name); |
| 1347 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(script_list); |
| 1348 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(option_hs); |
| 1349 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(start_hs); |
| 1350 | DLLDeleteUIItemcxx . . $ DLLDeleteUIItem.(cancel_hs); |
| 1351 | |
| 1352 | return ret; |
| 1353 | } |
| 1354 | |
| 1355 | void MultiplayerOptionsMenucxx . . $ MultiplayerOptionsMenu(49f6e7a06ebc5aa8).() { |
| 1356 | #ifndef MULTI_USE_ALL_OPTIONScxx . . $ `netcon/lanclient/lanclient.cpp:309:9`! |
| 1357 | DLLMultiGameOptionsMenu(0); |
| 1358 | #else |
| 1359 | DLLMultiGameOptionsMenucxx . . $ DLLMultiGameOptionsMenu.(1); |
| 1360 | #endif |
| 1361 | } |