Debian Codegraph @

netcon/includes/mdllinit.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/lib/mdllinit.h $
21 * $Revision: 1.1.1.1 $
22 * $Date: 2003/08/26 03:58:12 $
23 * $Author: kevinb $
24 *
25 * Multiplayer DLL function pointer init
26 *
27 * $Log: mdllinit.h,v $
28 * Revision 1.1.1.1 2003/08/26 03:58:12 kevinb
29 * initial 1.5 import
30 *
31 *
32 * 40 10/03/01 1:06a Kevin
33 * pxo bandwidth reduction and nat fix
34 *
35 * 39 3/26/00 10:30p Kevin
36 * MOD Downloader for 1.4 patch.
37 *
38 * 38 7/12/99 4:15p Kevin
39 * Changed the way we determine if we should report stats or not in PXO
40 *
41 * 37 7/06/99 5:52p Kevin
42 * PXO & multiplayer fixes for the patch
43 *
44 * 36 4/25/99 12:11a Kevin
45 * game info dialog stuff
46 *
47 * 35 4/23/99 3:33p Kevin
48 * mission file/multiplayer mod keyword system
49 *
50 * 34 4/19/99 3:57a Jeff
51 * got compiling for Linux
52 *
53 * 33 4/18/99 3:13p Jeff
54 * got working with linux
55 *
56 * 32 4/16/99 3:17p Kevin
57 * More mouselook support
58 *
59 * 31 4/08/99 4:54p Kevin
60 * Display level warp dialog for multiplayer
61 *
62 * 30 4/08/99 3:42p Kevin
63 * Added some stuff for the scoring API. Not functional yet.
64 *
65 * 29 3/25/99 3:26p Kevin
66 * Made PXO games be based on your chat channel
67 *
68 * 28 3/17/99 4:08p Kevin
69 * Changed the way games appear and timeout in the game list.
70 *
71 * 27 2/15/99 7:48p Jeff
72 * new pilot file class and read/write system checked in...should be more
73 * robust than old
74 *
75 * 26 1/11/99 12:29p Jeff
76 * changes made not to call the module library directly
77 *
78 * 25 1/07/99 11:51a Kevin
79 * Added support for joining servers on alternate ports and hosting behind
80 * a proxy/firewall
81 *
82 * 24 12/30/98 3:49p Kevin
83 * Moved multiplayer options out of DLL and into main app
84 *
85 * 23 12/30/98 12:16p Kevin
86 * Auto Mission Download system
87 *
88 * 22 12/23/98 6:38p Kevin
89 * All UDP data (except gamespy) now uses one (registered) port number
90 *
91 * 21 10/01/98 11:37a Kevin
92 * UI fixes and stuff
93 *
94 * 20 9/23/98 2:55p Kevin
95 * Saved multi config and changed UI to conform
96 *
97 * 19 9/22/98 2:29p Kevin
98 * moved ships allowed code out of dll and into main app. Also added
99 * powerup exclusions
100 *
101 * 18 9/21/98 11:19a Kevin
102 * check protocol before entering multiplayer screens
103 *
104 * 17 9/16/98 8:06p Jason
105 * got mastertracker working with the dedicated server
106 *
107 * 16 9/04/98 1:51p Kevin
108 * implemented asyncronous gethostbyname
109 *
110 * 15 9/02/98 6:54p Kevin
111 * Fixed general directplay support up, and got modem-modem working
112 *
113 * 14 8/27/98 5:03p Kevin
114 * Prettied up multiplayer screens and fixed some bugs.
115 *
116 * 13 8/25/98 6:33p Kevin
117 * pxo
118 *
119 * 12 8/24/98 5:04p Kevin
120 * Made msn files have the option to not be playable in multiplayer
121 *
122 * 11 8/24/98 10:42a Kevin
123 * Updated DLL for directplay and PXO background
124 *
125 * 10 8/19/98 11:50a Kevin
126 * Got DirectPlay IPX working, and localized connection DLLs
127 *
128 * 9 8/07/98 12:39p Jeff
129 * added "allowed ships" to multiplayer options
130 *
131 * 8 7/21/98 1:49p Kevin
132 * IPX support and peer-peer option for multi
133 *
134 * 7 7/20/98 2:34p Kevin
135 * Re-wrote the DLL wrapper, to allow for better expandability
136 *
137 * 6 7/10/98 10:47a Kevin
138 * Added command line connecting to games
139 *
140 * 5 6/24/98 6:40p Kevin
141 * Added help to main dll menu
142 *
143 * 4 6/24/98 3:24p Kevin
144 * Updated PXO screens with chat, etc.
145 *
146 * 3 6/18/98 4:49p Kevin
147 * Updated multiplayer menus
148 *
149 * 2 6/01/98 10:10a Kevin
150 * Added DLL connection interface and auto update DLL
151 *
152 * 1 5/18/98 2:26p Kevin
153 *
154 * $NoKeywords: $
155 */
156
157 // Do functions, variables
158 // Note, these must match the ordering on the D3 side (multi_dll_mgr.cpp)
159
160 DLLGetMultiAPI = (GetMultiAPI_fp)api_func;
161 DLLGetMultiAPI(&API);
162 DLLSetUITextItemText = (SetUITextItemText_fp)API.fp[0];
163 DLLNewUIWindowCreate = (NewUIWindowCreate_fp)API.fp[1];
164 DLLNewUIWindowDestroy = (NewUIWindowDestroy_fp)API.fp[2];
165 DLLNewUIWindowOpen = (NewUIWindowOpen_fp)API.fp[3];
166 DLLNewUIWindowClose = (NewUIWindowClose_fp)API.fp[4];
167 DLLTextCreate = (TextCreate_fp)API.fp[5];
168 DLLEditCreate = (EditCreate_fp)API.fp[6];
169 DLLButtonCreate = (ButtonCreate_fp)API.fp[7];
170 DLLListCreate = (ListCreate_fp)API.fp[8];
171 DLLListRemoveAll = (ListRemoveAll_fp)API.fp[9];
172 DLLListAddItem = (ListAddItem_fp)API.fp[10];
173 DLLListRemoveItem = (ListRemoveItem_fp)API.fp[11];
174 DLLListSelectItem = (ListSelectItem_fp)API.fp[12];
175 DLLListGetItem = (ListGetItem_fp)API.fp[13];
176 DLLListGetSelectedIndex = (ListGetSelectedIndex_fp)API.fp[14];
177 DLLEditSetText = (EditSetText_fp)API.fp[15];
178 DLLEditGetText = (EditGetText_fp)API.fp[16];
179 DLLDatabaseWrite = (DatabaseWrite_fp)API.fp[17];
180 DLLDatabaseRead = (DatabaseRead_fp)API.fp[18];
181 DLLDoUI = (DoUI_fp)API.fp[19];
182 DLLDoMessageBoxFP = (DoMessageBox_fp)API.fp[20];
183 DLLDescentDefer = (DescentDefer_fp)API.fp[21];
184 DLLDebug_ConsolePrintf = (Debug_ConsolePrintf_fp)API.fp[22];
185 DLLDestroyStringTable = (DestroyStringTable_fp)API.fp[23];
186 DLLCreateStringTable = (CreateStringTable_fp)API.fp[24];
187 DLLNewUIGameWindowCreate = (NewUIGameWindowCreate_fp)API.fp[25];
188 DLLNewUIGameWindowDestroy = (NewUIGameWindowDestroy_fp)API.fp[26];
189 DLLNewUIGameWindowOpen = (NewUIGameWindowOpen_fp)API.fp[27];
190 DLLNewUIGameWindowClose = (NewUIGameWindowClose_fp)API.fp[28];
191 DLLSetScreenMode = (SetScreenMode_fp)API.fp[29];
192 DLLtimer_GetTime = (timer_GetTime_fp)API.fp[30];
193 DLLTryToJoinServer = (TryToJoinServer_fp)API.fp[31];
194 DLLMultiStartClient = (MultiStartClient_fp)API.fp[32];
195 DLLrend_GetRenderState = (rend_GetRenderState_fp)API.fp[33];
196 DLLLoadMission = (LoadMission_fp)API.fp[34];
197 DLLddio_MakePath = (ddio_MakePath_fp)API.fp[35];
198 DLLddio_FindFileStart = (ddio_FindFileStart_fp)API.fp[36];
199 DLLddio_FindFileClose = (ddio_FindFileClose_fp)API.fp[37];
200 DLLddio_FindNextFile = (ddio_FindNextFile_fp)API.fp[38];
201 DLLMultiStartServerFP = (MultiStartServer_fp)API.fp[39];
202 DLLShowProgressScreen = (ShowProgressScreen_fp)API.fp[40];
203 DLLSearchForLocalGamesTCP = (SearchForLocalGamesTCP_fp)API.fp[41];
204 DLLnw_GetHostAddressFromNumbers = (nw_GetHostAddressFromNumbers_fp)API.fp[42];
205 DLLnw_GetProtocolType = (nw_GetProtocolType_fp)API.fp[43];
206 DLLHotSpotCreate = (HotSpotCreate_fp)API.fp[44];
207 DLLPollUI = (PollUI_fp)API.fp[45];
208 DLLGetMissionName = (GetMissionName_fp)API.fp[46];
209 DLLRemoveUITextItem = (RemoveUITextItem_fp)API.fp[47];
210 DLLCreateNewUITextItemFP = (CreateNewUITextItem_fp)API.fp[48];
211 DLLmem_malloc = (mem_malloc_fp)API.fp[49];
212 DLLmem_free = (mem_free_fp)API.fp[50];
213 DLLCreateSplashScreen = (CreateSplashScreen_fp)API.fp[51];
214 DLLCloseSplashScreen = (CloseSplashScreen_fp)API.fp[52];
215 DLLUIConsoleGadgetCreate = (UIConsoleGadgetCreate_fp)API.fp[53];
216 DLLUIConsoleGadgetputs = (UIConsoleGadgetputs_fp)API.fp[54];
217 DLLNewUIWindowSetFocusOnEditGadget = (NewUIWindowSetFocusOnEditGadget_fp)API.fp[55];
218 DLLOldEditCreate = (OldEditCreate_fp)API.fp[56];
219 DLLOldListCreate = (OldListCreate_fp)API.fp[57];
220 DLLOldListRemoveAll = (OldListRemoveAll_fp)API.fp[58];
221 DLLOldListAddItem = (OldListAddItem_fp)API.fp[59];
222 DLLOldListRemoveItem = (OldListRemoveItem_fp)API.fp[60];
223 DLLOldListSelectItem = (OldListSelectItem_fp)API.fp[61];
224 DLLOldListGetItem = (OldListGetItem_fp)API.fp[62];
225 DLLOldListGetSelectedIndex = (OldListGetSelectedIndex_fp)API.fp[63];
226 DLLOldEditSetText = (OldEditSetText_fp)API.fp[64];
227 DLLOldEditGetText = (OldEditGetText_fp)API.fp[65];
228 DLLToggleUICallback = (ToggleUICallback_fp)API.fp[66];
229 DLLSearchForGamesPXO = (SearchForGamesPXO_fp)API.fp[67];
230 DLLSetOldEditBufferLen = (SetOldEditBufferLen_fp)API.fp[68];
231 DLLNewUIWindowLoadBackgroundImage = (NewUIWindowLoadBackgroundImage_fp)API.fp[69];
232 DLLDeleteUIItem = (DeleteUIItem_fp)API.fp[70];
233 DLLSearchForLocalGamesIPX = (SearchForLocalGamesIPX_fp)API.fp[71];
234 DLLHotSpotSetStates = (HotSpotSetStates_fp)API.fp[72];
235 DLLPlayerSetShipPermission = (PlayerSetShipPermission_fp)API.fp[73];
236 DLLPlayerIsShipAllowed = (PlayerIsShipAllowed_fp)API.fp[74];
237 #ifdef WIN32
238 DLLdp_InitDirectPlay = (dp_InitDirectPlay_fp)API.fp[75];
239 DLLdp_ListDirectPlayGames = (dp_ListDirectPlayGames_fp)API.fp[76];
240 DLLdp_GetModemChoices = (dp_GetModemChoices_fp)API.fp[77];
241 #endif
242 DLLDatabaseReadInt = (DatabaseReadInt_fp)API.fp[78];
243 DLLDatabaseWriteInt = (DatabaseWriteInt_fp)API.fp[79];
244 DLLDoScreenshot = (DoScreenshot_fp)API.fp[80];
245 DLLIsMissionMultiPlayable = (IsMissionMultiPlayable_fp)API.fp[81];
246 DLLgrtext_GetTextLineWidth = (grtext_GetTextLineWidth_fp)API.fp[82];
247 DLLGadgetDestroy = (GadgetDestroy_fp)API.fp[83];
248 #ifdef WIN32
249 DLLdp_StartGame = (dp_StartGame_fp)API.fp[84];
250 DLLdp_EndGame = (dp_EndGame_fp)API.fp[85];
251 #endif
252 DLLnw_Asyncgethostbyname = (nw_Asyncgethostbyname_fp)API.fp[86];
253 DLLPrintDedicatedMessage = (DedicatedServerPrintf_fp)API.fp[87];
254 DLLnw_ReccomendPPS = (nw_ReccomendPPS_fp)API.fp[88];
255 DLLDoMultiAllowed = (DoMultiAllowed_fp)API.fp[89];
256 DLLMultiDoConfigSave = (MultiDoConfigSave_fp)API.fp[90];
257 DLLMultiDoConfigLoad = (MultiDoConfigLoad_fp)API.fp[91];
258 DLLMultiLoadSettings = (MultiLoadSettings_fp)API.fp[92];
259 DLLnw_DoReceiveCallbacks = (nw_DoReceiveCallbacks_fp)API.fp[93];
260 DLLnw_SendWithID = (nw_SendWithID_fp)API.fp[94];
261 DLLnw_UnRegisterCallback = (nw_UnRegisterCallback_fp)API.fp[95];
262 DLLnw_RegisterCallback = (nw_RegisterCallback_fp)API.fp[96];
263 DLLmsn_CheckGetMission = (msn_CheckGetMission_fp)API.fp[97];
264 DLLMultiGameOptionsMenu = (MultiGameOptionsMenu_fp)API.fp[98];
265 DLLmod_FreeModule = (mod_FreeModule_fp)API.fp[99];
266 DLLmod_GetLastError = (mod_GetLastError_fp)API.fp[100];
267 DLLmod_GetSymbol = (mod_GetSymbol_fp)API.fp[101];
268 DLLmod_LoadModule = (mod_LoadModule_fp)API.fp[102];
269 CurrentPilotName = (CurrentPilotName_fp)API.fp[103];
270 DLLUpdateAndPackGameList = (UpdateAndPackGameList_fp)API.fp[104];
271 DLLMultiLevelSelection = (MultiLevelSelection_fp)API.fp[105];
272 DLLDoPlayerMouselookCheck = (DoPlayerMouselookCheck_fp)API.fp[106];
273 DLLCheckMissionForScript = (CheckMissionForScript_fp)API.fp[107];
274 DLLShowNetgameInfo = (ShowNetgameInfo_fp)API.fp[108];
275 // API.fp[109]; // Not used
276 DLLCheckGetD3M = (CheckGetD3M_fp)API.fp[110];
277
278 DLLMPlayers = (player *)API.players;
279 DLLNetgame = (netgame_info *)API.netgame;
280 DLLMNetPlayers = (netplayer *)API.netplayers;
281 DLLShips = (ship *)API.ships;
282
283 DLLPlayer_num = *API.vp[0];
284 DLLTracker_id = (char *)API.vp[1];
285 DLLGame_is_master_tracker_game = API.vp[2];
286 DLLGame_mode = *API.vp[3];
287 // DLLCurrent_pilot = (pilot *)API.vp[4];
288 DLLLocalD3Dir = (char *)(pilot *)API.vp[5];
289 DLLMultiGameStarting = (int *)API.vp[6];
290 DLLMTPilotinfo = (vmt_descent3_struct *)API.vp[7];
291 DLLNum_network_games_known = API.vp[8];
292 DLLNetwork_games = (network_game *)API.vp[9];
293 DLLNewUIWindow_alpha = (uint8_t *)API.vp[10];
294 DLLHelpText1 = (char *)API.vp[11];
295 DLLHelpText2 = (char *)API.vp[12];
296 DLLHelpText3 = (char *)API.vp[13];
297 DLLHelpText4 = (char *)API.vp[14];
298 DLLAuto_login_name = (char *)API.vp[15];
299 DLLAuto_login_pass = (char *)API.vp[16];
300 DLLAuto_login_addr = (char *)API.vp[17];
301 DLLAuto_login_port = (char *)API.vp[18];
302 #ifdef WIN32
303 DLLNum_directplay_games = (int *)API.vp[19];
304 DLLDirectplay_sessions = (LPDPSESSIONDESC2)API.vp[20];
305 DLLDP_active = (bool *)API.vp[21];
306 DLLUse_DirectPlay = (bool *)API.vp[22];
307 DLLModems_found = (modem_list *)API.vp[23];
308 DLLNum_modems_found = (int *)API.vp[24];
309 #else
310 DLLUse_DirectPlay = (bool *)API.vp[22];
311 #endif
312 DLLDedicated_server = (bool *)API.vp[25];
313 DLLTCP_active = (BOOL)*API.vp[26];
314 DLLIPX_active = (BOOL)*API.vp[27];
315 DLLnw_ListenPort = (uint16_t)((size_t)API.vp[28] & 0xffff);
316 DLLMulti_Gamelist_changed = (bool *)API.vp[29];
317 DLLPXO_hosted_lobby_name = (char *)API.vp[30];
318 DLLSupports_score_api = (bool *)API.vp[31];
319 // DLLPXOPort = (bool *)API.vp[32]; // only defined for mtclient because I'm lazy...
320
321 *DLLSupports_score_api = false;