| 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/multi_dll_mgr.h $ |
| 21 | * $Revision: 19 $ |
| 22 | * $Date: 4/25/99 5:02p $ |
| 23 | * $Author: Kevin $ |
| 24 | * |
| 25 | * Multi player DLL interface manager |
| 26 | * |
| 27 | * $Log: /DescentIII/main/multi_dll_mgr.h $ |
| 28 | * |
| 29 | * 19 4/25/99 5:02p Kevin |
| 30 | * Bunches of multiplayer UI improvements |
| 31 | * |
| 32 | * 18 4/08/99 3:41p Kevin |
| 33 | * Added some stuff for the scoring API. Not functional yet. |
| 34 | * |
| 35 | * 17 1/12/99 2:55p Jeff |
| 36 | * added/finished the waiting for player's to join dialog |
| 37 | * |
| 38 | * 16 12/08/98 3:28p Jeff |
| 39 | * created and exported UI Checkbox wrappers |
| 40 | * |
| 41 | * 15 11/19/98 5:56p Jeff |
| 42 | * created Slider wrappers |
| 43 | * |
| 44 | * 14 10/29/98 7:00p Jeff |
| 45 | * create some new UI function wrappers |
| 46 | * |
| 47 | * 13 9/15/98 12:42p Jason |
| 48 | * got dedicated server actually working |
| 49 | * |
| 50 | * 12 8/31/98 10:14a Kevin |
| 51 | * Misc. multi-UI fixes |
| 52 | * |
| 53 | * 11 8/27/98 5:03p Kevin |
| 54 | * Prettied up multiplayer screens and fixed some bugs. |
| 55 | * |
| 56 | * 10 8/24/98 10:55a Kevin |
| 57 | * new directplay stuff |
| 58 | * |
| 59 | * 9 8/07/98 12:40p Jeff |
| 60 | * added some functions |
| 61 | * |
| 62 | * 8 7/20/98 2:34p Kevin |
| 63 | * Re-wrote the DLL wrapper, to allow for better expandability |
| 64 | * |
| 65 | * 6 6/24/98 6:40p Kevin |
| 66 | * Added help to main dll menu |
| 67 | * |
| 68 | * 5 6/24/98 3:24p Kevin |
| 69 | * Updated PXO screens with chat, etc. |
| 70 | * |
| 71 | * 4 6/18/98 4:49p Kevin |
| 72 | * Updated multiplayer menus |
| 73 | * |
| 74 | * 3 6/01/98 10:09a Kevin |
| 75 | * Added DLL connection interface and auto update DLL |
| 76 | * |
| 77 | * 2 5/18/98 12:16p Kevin |
| 78 | * Initial version |
| 79 | * |
| 80 | * 1 5/18/98 12:07p Kevin |
| 81 | * |
| 82 | * $NoKeywords: $ |
| 83 | */ |
| 84 | |
| 85 | #ifndef _multi_dll_header |
| 86 | #define _multi_dll_headercxx . . $ `Descent3/multi_dll_mgr.h:86:9`! |
| 87 | |
| 88 | #define MT_EVT_LOGINcxx . . $ `Descent3/multi_dll_mgr.h:88:9`! 1 |
| 89 | #define MT_EVT_FIRST_FRAMEcxx . . $ `Descent3/multi_dll_mgr.h:89:9`! 2 |
| 90 | #define MT_EVT_FRAMEcxx . . $ `Descent3/multi_dll_mgr.h:90:9`! 3 |
| 91 | #define MT_EVT_GAME_OVERcxx . . $ `Descent3/multi_dll_mgr.h:91:9`! 4 |
| 92 | #define MT_EVT_GET_HELPcxx . . $ `Descent3/multi_dll_mgr.h:92:9`! 5 |
| 93 | #define MT_AUTO_LOGINcxx . . $ `Descent3/multi_dll_mgr.h:93:9`! 6 |
| 94 | #define MT_AUTO_STARTcxx . . $ `Descent3/multi_dll_mgr.h:94:9`! 7 // A dedicated server is starting this DLL |
| 95 | |
| 96 | struct multi_apicxx . . $ multi_api# { |
| 97 | int *objscxx . . $ multi_api#objs.; |
| 98 | int *roomscxx . . $ multi_api#rooms.; |
| 99 | int *terraincxx . . $ multi_api#terrain.; |
| 100 | int *playerscxx . . $ multi_api#players.; |
| 101 | int *netgamecxx . . $ multi_api#netgame.; |
| 102 | int *netplayerscxx . . $ multi_api#netplayers.; |
| 103 | int *shipscxx . . $ multi_api#ships.; |
| 104 | int *fpcxx . . $ multi_api#fp.[200]; // function pointers |
| 105 | int *vpcxx . . $ multi_api#vp.[200]; // variable pointers |
| 106 | }; |
| 107 | |
| 108 | #define MAX_AUTO_LOGIN_STUFF_LENcxx . . $ `Descent3/multi_dll_mgr.h:108:9`! 50 |
| 109 | extern char Auto_login_namecxx . . $ Auto_login_name.[MAX_AUTO_LOGIN_STUFF_LENcxx . . $ `Descent3/multi_dll_mgr.h:108:9`!]; |
| 110 | extern char Auto_login_passcxx . . $ Auto_login_pass.[MAX_AUTO_LOGIN_STUFF_LENcxx . . $ `Descent3/multi_dll_mgr.h:108:9`!]; |
| 111 | extern char Auto_login_addrcxx . . $ Auto_login_addr.[MAX_AUTO_LOGIN_STUFF_LENcxx . . $ `Descent3/multi_dll_mgr.h:108:9`!]; |
| 112 | extern char Auto_login_portcxx . . $ Auto_login_port.[MAX_AUTO_LOGIN_STUFF_LENcxx . . $ `Descent3/multi_dll_mgr.h:108:9`!]; |
| 113 | |
| 114 | void GetMultiAPIcxx . . $ GetMultiAPI(ce88f427848516e7).(multi_apicxx . . $ multi_api# *api); |
| 115 | void FreeMultiDLLcxx . . $ FreeMultiDLL(49f6e7a06ebc5aa8).(); |
| 116 | int LoadMultiDLLcxx . . $ LoadMultiDLL(5c4306d8553b3696).(const char *name); |
| 117 | void CallMultiDLLcxx . . $ CallMultiDLL(d4f767463ce0a6b3).(int eventnum); |
| 118 | |
| 119 | void SetUITextItemTextcxx . . $ SetUITextItemText(ee114b9bb7b54720).(UITextItemcxx . . $ UITextItem# *uit, char *newtext, uint32_tcxx . . $ uint32_t# color); |
| 120 | void *NewUIWindowCreatecxx . . $ NewUIWindowCreate(76d7789468b01f1d).(int x, int y, int w, int h, int flags); |
| 121 | void NewUIWindowDestroycxx . . $ NewUIWindowDestroy(488f24e0e2cc986e).(NewUIWindowcxx . . $ NewUIWindow# *deswin); |
| 122 | void NewUIWindowOpencxx . . $ NewUIWindowOpen(488f24e0e2cc986e).(NewUIWindowcxx . . $ NewUIWindow# *deswin); |
| 123 | void NewUIWindowClosecxx . . $ NewUIWindowClose(488f24e0e2cc986e).(NewUIWindowcxx . . $ NewUIWindow# *deswin); |
| 124 | void *TextCreatecxx . . $ TextCreate(d84f16cfa0f2f434).(UIWindowcxx . . $ UIWindow# *parentwin, UITextItemcxx . . $ UITextItem# *textitem, int x, int y, int flags); |
| 125 | void TextSetTitlecxx . . $ TextSetTitle(7d1fdf7ee91fa5be).(UITextcxx . . $ UIText# *text, UITextItemcxx . . $ UITextItem# *textitem); |
| 126 | void *EditCreatecxx . . $ EditCreate(dc9115cd522defea).(UIWindowcxx . . $ UIWindow# *parentwin, int id, int x, int y, int w, int h, int flags); |
| 127 | void *ButtonCreatecxx . . $ ButtonCreate(2e17589279eb4159).(UIWindowcxx . . $ UIWindow# *parentwin, int id, UITextItemcxx . . $ UITextItem# *titleitem, int x, int y, int w, int h, int flags); |
| 128 | void *ListCreatecxx . . $ ListCreate(dc9115cd522defea).(UIWindowcxx . . $ UIWindow# *parentwin, int id, int x, int y, int w, int h, int flags); |
| 129 | void ListRemoveAllcxx . . $ ListRemoveAll(fcba45fc1ebcb8ea).(UIListBoxcxx . . $ UIListBox# *item); |
| 130 | void ListAddItemcxx . . $ ListAddItem(3a3c474e41982a6c).(UIListBoxcxx . . $ UIListBox# *item, UITextItemcxx . . $ UITextItem# *uitext); |
| 131 | void ListRemoveItemcxx . . $ ListRemoveItem(3a3c474e41982a6c).(UIListBoxcxx . . $ UIListBox# *item, UITextItemcxx . . $ UITextItem# *txtitem); |
| 132 | void ListSelectItemcxx . . $ ListSelectItem(3a3c474e41982a6c).(UIListBoxcxx . . $ UIListBox# *item, UITextItemcxx . . $ UITextItem# *txtitem); |
| 133 | const char *ListGetItemcxx . . $ ListGetItem(5cae7221e1e66c1a).(UIListBoxcxx . . $ UIListBox# *item, int index); |
| 134 | int ListGetSelectedIndexcxx . . $ ListGetSelectedIndex(ad4162047d52fa6e).(UIListBoxcxx . . $ UIListBox# *item); |
| 135 | void ListSetSelectedIndexcxx . . $ ListSetSelectedIndex(7c3831b64a90417).(UIListBoxcxx . . $ UIListBox# *item, int index); |
| 136 | void EditSetTextcxx . . $ EditSetText(32f521072cbd7203).(NewUIEditcxx . . $ NewUIEdit# *item, const char *buff); |
| 137 | void EditGetTextcxx . . $ EditGetText(fb5eddf017e01723).(NewUIEditcxx . . $ NewUIEdit# *item, char *buff, int len); |
| 138 | void DatabaseReadcxx . . $ DatabaseRead(f474874004d4a6ab).(const char *label, char *entry, int *entrylen); |
| 139 | void DatabaseWritecxx . . $ DatabaseWrite(5e891a9f77bb0eff).(const char *label, const char *entry, int entrylen); |
| 140 | void DescentDefercxx . . $ DescentDefer(49f6e7a06ebc5aa8).(void); |
| 141 | void *NewUIGameWindowCreatecxx . . $ NewUIGameWindowCreate(76d7789468b01f1d).(int x, int y, int w, int h, int flags = UIF_PROCESS_ALLcxx . . $ `ui/ui.h:348:9`!); |
| 142 | void NewUIGameWindowDestroycxx . . $ NewUIGameWindowDestroy(17abec7eb822a749).(NewUIGameWindowcxx . . $ NewUIGameWindow# *item); |
| 143 | void NewUIGameWindowOpencxx . . $ NewUIGameWindowOpen(17abec7eb822a749).(NewUIGameWindowcxx . . $ NewUIGameWindow# *item); |
| 144 | void NewUIGameWindowClosecxx . . $ NewUIGameWindowClose(17abec7eb822a749).(NewUIGameWindowcxx . . $ NewUIGameWindow# *item); |
| 145 | void *HotSpotCreatecxx . . $ HotSpotCreate(c0fba4599935b27e).(UIWindowcxx . . $ UIWindow# *parentwin, int id, int key, UIItemcxx . . $ UIItem# *txtitemoff, UIItemcxx . . $ UIItem# *txtitemon, int x, int y, int w, |
| 146 | int h, int flags); |
| 147 | void HotSpotSetStatescxx . . $ HotSpotSetStates(586da350ab5f7284).(UIHotspotcxx . . $ UIHotspot# *hs, UIItemcxx . . $ UIItem# *texton, UIItemcxx . . $ UIItem# *textoff); |
| 148 | int PollUIcxx . . $ PollUI(b126dc7c1de90089).(void); |
| 149 | void RemoveUITextItemcxx . . $ RemoveUITextItem(5d22bdacc48458e8).(void *item); |
| 150 | void *CreateNewUITextItemcxx . . $ CreateNewUITextItem(265f30871222eac8).(const char *newtext, uint32_tcxx . . $ uint32_t# color, int font = -1); |
| 151 | void RemoveUIBmpItemcxx . . $ RemoveUIBmpItem(5d22bdacc48458e8).(void *item); |
| 152 | void *CreateNewUIBmpItemcxx . . $ CreateNewUIBmpItem(a331bfa9aba4cd9d).(int handle, uint8_tcxx . . $ uint8_t# alpha); |
| 153 | void CloseSplashScreencxx . . $ CloseSplashScreen(49f6e7a06ebc5aa8).(void); |
| 154 | void CreateSplashScreencxx . . $ CreateSplashScreen(34d26762b42c433a).(const char *msg, int usecancel); |
| 155 | void *UIConsoleGadgetCreatecxx . . $ UIConsoleGadgetCreate(a14cc48659c6db1c).(UIWindowcxx . . $ UIWindow# *parentid, int id, int x, int y, int font, int cols, int rows, int flags); |
| 156 | void UIConsoleGadgetputscxx . . $ UIConsoleGadgetputs(451ab6a730b562ff).(UIConsoleGadgetcxx . . $ UIConsoleGadget# *item, const char *str); |
| 157 | void NewUIWindowSetFocusOnEditGadgetcxx . . $ NewUIWindowSetFocusOnEditGadget(57798f7f932dfa81).(UIEditcxx . . $ UIEdit# *item, UIWindowcxx . . $ UIWindow# *parent); |
| 158 | void *OldListCreatecxx . . $ OldListCreate(dc9115cd522defea).(UIWindowcxx . . $ UIWindow# *parentitem, int id, int x, int y, int w, int h, int flags); |
| 159 | void OldListRemoveAllcxx . . $ OldListRemoveAll(fcba45fc1ebcb8ea).(UIListBoxcxx . . $ UIListBox# *item); |
| 160 | void OldListAddItemcxx . . $ OldListAddItem(3a3c474e41982a6c).(UIListBoxcxx . . $ UIListBox# *item, UITextItemcxx . . $ UITextItem# *uitext); |
| 161 | void OldListRemoveItemcxx . . $ OldListRemoveItem(3a3c474e41982a6c).(UIListBoxcxx . . $ UIListBox# *item, UITextItemcxx . . $ UITextItem# *txtitem); |
| 162 | void OldListSelectItemcxx . . $ OldListSelectItem(3a3c474e41982a6c).(UIListBoxcxx . . $ UIListBox# *item, UITextItemcxx . . $ UITextItem# *txtitem); |
| 163 | void *OldEditCreatecxx . . $ OldEditCreate(dc9115cd522defea).(UIWindowcxx . . $ UIWindow# *parentitem, int id, int x, int y, int w, int h, int flags); |
| 164 | void OldEditGetTextcxx . . $ OldEditGetText(d7408c567151c92e).(UIEditcxx . . $ UIEdit# *item, char *buff, int len); |
| 165 | void OldEditSetTextcxx . . $ OldEditSetText(5bf538048a323648).(UIEditcxx . . $ UIEdit# *item, const char *newtext); |
| 166 | const char *OldListGetItemcxx . . $ OldListGetItem(5cae7221e1e66c1a).(UIListBoxcxx . . $ UIListBox# *item, int index); |
| 167 | int OldListGetSelectedIndexcxx . . $ OldListGetSelectedIndex(ad4162047d52fa6e).(UIListBoxcxx . . $ UIListBox# *item); |
| 168 | void ToggleUICallbackcxx . . $ ToggleUICallback(d4f767463ce0a6b3).(int state); |
| 169 | void SetOldEditBufferLencxx . . $ SetOldEditBufferLen(526e54c5ffa2af90).(UIEditcxx . . $ UIEdit# *item, int len); |
| 170 | void NewUIWindowLoadBackgroundImagecxx . . $ NewUIWindowLoadBackgroundImage(a519a360beb3a806).(NewUIWindowcxx . . $ NewUIWindow# *item, const char *image_name); |
| 171 | void DeleteUIItemcxx . . $ DeleteUIItem(5d22bdacc48458e8).(void *delitem); |
| 172 | void DatabaseReadIntcxx . . $ DatabaseReadInt(73e4a7b7b8bfbc8c).(const char *label, int *val); |
| 173 | void DatabaseWriteIntcxx . . $ DatabaseWriteInt(34d26762b42c433a).(const char *label, int val); |
| 174 | void GadgetDestroycxx . . $ GadgetDestroy(627f6e6cf27f18b7).(UIGadgetcxx . . $ UIGadget# *item); |
| 175 | int GetUIItemWidthcxx . . $ GetUIItemWidth(dedf1e9b1c614a07).(void *item); |
| 176 | int GetUIItemHeightcxx . . $ GetUIItemHeight(dedf1e9b1c614a07).(void *item); |
| 177 | void *SliderCreatecxx . . $ SliderCreate(c523cb0d7b2eb40).(UIWindowcxx . . $ UIWindow# *parent, int id, int x, int y, int flags = 0); |
| 178 | void SliderSetRangecxx . . $ SliderSetRange(b5ace6dd40cfcb4).(UISlidercxx . . $ UISlider# *slider, int range); |
| 179 | int SliderGetRangecxx . . $ SliderGetRange(83c9e7654e8a412e).(UISlidercxx . . $ UISlider# *slider); |
| 180 | void SliderSetPoscxx . . $ SliderSetPos(b5ace6dd40cfcb4).(UISlidercxx . . $ UISlider# *slider, int pos); |
| 181 | int SliderGetPoscxx . . $ SliderGetPos(83c9e7654e8a412e).(UISlidercxx . . $ UISlider# *slider); |
| 182 | void SliderSetSelectChangeCallbackcxx . . $ SliderSetSelectChangeCallback(d7144a2c71be4d1).(UISlidercxx . . $ UISlider# *slider, void (*fn)(int)); |
| 183 | void SliderSetSelectChangeCallbackWDatacxx . . $ SliderSetSelectChangeCallbackWData(93b30d159758dcb2).(UISlidercxx . . $ UISlider# *slider, void (*fn)(int, void *), void *ptr); |
| 184 | void *CheckBoxCreatecxx . . $ CheckBoxCreate(1098cf25cefcbd24).(UIWindowcxx . . $ UIWindow# *parent, int id, UIItemcxx . . $ UIItem# *title, int x, int y, int w, int h, int flags); |
| 185 | void CheckBoxSetCheckcxx . . $ CheckBoxSetCheck(e6528bc9b3818265).(UICheckBoxcxx . . $ UICheckBox# *cb, bool state); |
| 186 | bool CheckBoxIsCheckedcxx . . $ CheckBoxIsChecked(56ac38d13748a35d).(UICheckBoxcxx . . $ UICheckBox# *cb); |
| 187 | void GetUIItemPositioncxx . . $ GetUIItemPosition(963a1ffce8afd46a).(UIObjectcxx . . $ UIObject# *item, int *x, int *y, int *w, int *h); |
| 188 | |
| 189 | void ScoreAPIFrameIntervalcxx . . $ ScoreAPIFrameInterval(49f6e7a06ebc5aa8).(); |
| 190 | void ScoreAPIGameOvercxx . . $ ScoreAPIGameOver(49f6e7a06ebc5aa8).(); |
| 191 | void ScoreAPIPlayerJoincxx . . $ ScoreAPIPlayerJoin(d4f767463ce0a6b3).(int playernum); |
| 192 | void ScoreAPIPlayerLeftcxx . . $ ScoreAPIPlayerLeft(d4f767463ce0a6b3).(int playernum); |
| 193 | void ScoreAPIPlayerEnteredcxx . . $ ScoreAPIPlayerEntered(d4f767463ce0a6b3).(int playernum); |
| 194 | void ScoreAPIPlayerKilledcxx . . $ ScoreAPIPlayerKilled(3e454b8ccf442868).(int killer, int killed); |
| 195 | |
| 196 | #endif |