| 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/idmfc.h $ |
| 21 | * $Revision: 1.1.1.1 $ |
| 22 | * $Date: 2003/08/26 03:56:29 $ |
| 23 | * $Author: kevinb $ |
| 24 | * |
| 25 | * DMFC COM Interface header |
| 26 | * |
| 27 | * $Log: idmfc.h,v $ |
| 28 | * Revision 1.1.1.1 2003/08/26 03:56:29 kevinb |
| 29 | * initial 1.5 import |
| 30 | * |
| 31 | * |
| 32 | * 33 11/10/99 3:03p Jeff |
| 33 | * fixed c interface for register packet receiver |
| 34 | * |
| 35 | * 32 8/15/99 4:36p Jeff |
| 36 | * finished exporting all inventory class functions. export object_info |
| 37 | * array. added check for -nooutragelogo to display Outrage logo display. |
| 38 | * |
| 39 | * 31 8/11/99 1:46p Jeff |
| 40 | * interface functions |
| 41 | * |
| 42 | * 30 8/11/99 1:22p Jeff |
| 43 | * exported needed functions for camera windows |
| 44 | * |
| 45 | * 29 7/16/99 2:43p Jeff |
| 46 | * changed CreateMenuItemWArgs function |
| 47 | * |
| 48 | * 28 7/13/99 5:38p Jeff |
| 49 | * fixes for Linux compile |
| 50 | * |
| 51 | * 27 7/13/99 10:03a Jeff |
| 52 | * text taunt token decoding |
| 53 | * |
| 54 | * 26 7/11/99 3:32p Jeff |
| 55 | * exported game arguments, made command line option to specify |
| 56 | * autoexec.dmfc |
| 57 | * |
| 58 | * 25 7/09/99 7:02p Jeff |
| 59 | * put in countdown timer for when a level is about to end |
| 60 | * |
| 61 | * 24 7/09/99 2:53p Jeff |
| 62 | * handle gametime better (pause it when needed) if the server is 'waiting |
| 63 | * for players' |
| 64 | * |
| 65 | * 23 7/08/99 9:56p Jeff |
| 66 | * added event handler for weapon fired event |
| 67 | * |
| 68 | * 22 7/08/99 6:25p Jeff |
| 69 | * remote admin in and working |
| 70 | * |
| 71 | * 21 7/07/99 5:00p Jeff |
| 72 | * removed vararg functions from interface functions, just made different |
| 73 | * versions of them |
| 74 | * |
| 75 | * 20 7/07/99 12:16p Jeff |
| 76 | * all mangles symbol names fixed. Finished making interface functions. |
| 77 | * |
| 78 | * 19 7/06/99 7:37p Jeff |
| 79 | * added IDMFC 1.0 interface functions |
| 80 | * |
| 81 | * 18 6/10/99 11:10a Jeff |
| 82 | * don't display the Outrage logo for non-Outrage games |
| 83 | * |
| 84 | * 17 5/22/99 1:12a Jeff |
| 85 | * correctly handle Viewer_object |
| 86 | * |
| 87 | * 16 5/12/99 11:04p Jeff |
| 88 | * dmfc and multiplayer games now have endian friendly packets (*whew*) |
| 89 | * |
| 90 | * 15 5/09/99 6:20a Jeff |
| 91 | * improved Entropy (added sounds, max virii per room). Fixed rendering |
| 92 | * bugs for other multiplayer dlls. |
| 93 | * |
| 94 | * 14 5/08/99 11:06a Jeff |
| 95 | * |
| 96 | * 13 5/07/99 12:52p Jeff |
| 97 | * audio taunt icon is ppic if available. coop has hard max team set of 4 |
| 98 | * |
| 99 | * 12 5/02/99 8:40a Jeff |
| 100 | * fixed syntax error |
| 101 | * |
| 102 | * 11 4/30/99 10:52p Jeff |
| 103 | * added $warp command |
| 104 | * |
| 105 | * 10 4/30/99 7:36p Jeff |
| 106 | * exported vis_effects to dmfc |
| 107 | * |
| 108 | * 9 4/14/99 3:56a Jeff |
| 109 | * fixed case mismatch in #includes |
| 110 | * |
| 111 | * 8 4/04/99 4:55p Jeff |
| 112 | * added functionality to call osiris functions from multiplayer d3ms |
| 113 | * |
| 114 | * 7 3/30/99 9:01p Jeff |
| 115 | * exported polymodels |
| 116 | * |
| 117 | * 6 3/30/99 7:42p Jeff |
| 118 | * fixed a misspelling on a function name |
| 119 | * |
| 120 | * 5 3/22/99 6:21p Jeff |
| 121 | * added 2 more audio taunts. a mulitplayer event when someone plays an |
| 122 | * audio taunt. option to disable audio taunts. |
| 123 | * |
| 124 | * 4 3/22/99 5:51p Matt |
| 125 | * Removed some includes from one file and added some to other files, to |
| 126 | * reduce the amount of rebuilding when headers change. |
| 127 | * |
| 128 | * 3 3/22/99 1:55p Jeff |
| 129 | * make sure initialization happens (possible crashing) |
| 130 | * |
| 131 | * 2 3/17/99 12:23p Jeff |
| 132 | * converted DMFC to be COM interface |
| 133 | * |
| 134 | * 1 3/17/99 11:54a Jeff |
| 135 | * |
| 136 | * $NoKeywords: $ |
| 137 | */ |
| 138 | |
| 139 | #ifndef __IDMFC_H_ |
| 140 | #define __IDMFC_H_ |
| 141 | |
| 142 | #include <stdio.h> |
| 143 | #include <stdarg.h> |
| 144 | #include <time.h> |
| 145 | #include "gamedll_header.h" |
| 146 | #include "DMFC.h" |
| 147 | #include "controls.h" |
| 148 | #include "Mission.h" |
| 149 | #include "weapon.h" |
| 150 | #include "player.h" |
| 151 | #include "ship.h" |
| 152 | #include "vclip.h" |
| 153 | |
| 154 | #ifdef __cplusplus |
| 155 | // C++ compiler, should we use classes? |
| 156 | #define USECLASSES |
| 157 | #endif |
| 158 | |
| 159 | #ifdef USECLASSES |
| 160 | class IDMFC; |
| 161 | class IMenuItem; |
| 162 | class IDmfcStats; |
| 163 | #else |
| 164 | typedef void IDMFC; |
| 165 | typedef void IMenuItem; |
| 166 | typedef void IDmfcStats; |
| 167 | #endif |
| 168 | |
| 169 | #ifdef USECLASSES |
| 170 | /* |
| 171 | IObject |
| 172 | This is the base class that all DMFC classes are derived from. |
| 173 | */ |
| 174 | class IObject { |
| 175 | public: |
| 176 | virtual ~IObject() = default; |
| 177 | virtual void Delete(void) = 0; |
| 178 | virtual void *Dynamic_Cast(const char *pszType) = 0; |
| 179 | virtual void DuplicatePointer(void) = 0; |
| 180 | virtual void DestroyPointer(void) = 0; |
| 181 | }; |
| 182 | |
| 183 | //=========================================================================================== |
| 184 | |
| 185 | /* |
| 186 | IDMFC |
| 187 | The interface class to Version 1.0 of DMFC |
| 188 | */ |
| 189 | class IDMFC : public IObject { |
| 190 | public: |
| 191 | // DMGFBase::LoadFunctions |
| 192 | // |
| 193 | // Initializes all the functions for a multiplayer game...must be first thing called |
| 194 | virtual void LoadFunctions(int *api_func) = 0; |
| 195 | |
| 196 | // DMFCBase::GameInit |
| 197 | // |
| 198 | // Sets up all the DLL functions and pointers and preps the class for use. This ABSOLUTLY must be |
| 199 | // called, so if you override DMFCApp::GameInit, make sure that you put a call to this somewhere in |
| 200 | // the override. |
| 201 | virtual void GameInit(int teams) = 0; |
| 202 | |
| 203 | // DMFCBase::GameClose |
| 204 | // |
| 205 | // Closes up any needed DLL and DMFC tasks. This ABSOLUTLY must be called, so if you override |
| 206 | // DMFCApp::GameClose, make sure that you put a call to this somewhere in the override |
| 207 | virtual void GameClose(void) = 0; |
| 208 | |
| 209 | // ###################Server Only functions################################ |
| 210 | |
| 211 | // DMFCBase::OnServerPlayerKilled |
| 212 | // |
| 213 | // Event handler for when a player gets killed, either by another player or some other way |
| 214 | // killer_obj = object pointer to the object that killed the player |
| 215 | // victim_pnum = player number of the player that got killed |
| 216 | virtual void OnServerPlayerKilled(object *killer_obj, int victim_pnum) = 0; |
| 217 | |
| 218 | // DMFCBase::OnServerPlayerExploded |
| 219 | // |
| 220 | // Event handler for when a player explodes. Gets called after a EVT_GAMEPLAYERKILLED event. |
| 221 | // player_num = player number of the player exploding |
| 222 | virtual void OnServerPlayerExploded(int player_num) = 0; |
| 223 | |
| 224 | // DMFCBase::OnServerCollide |
| 225 | // |
| 226 | // Event handler for when two objects collide. At least one of the two objects is a player or a robot. |
| 227 | // Be aware that this event will be called twice per collision, the second time it is called the me and |
| 228 | // it objects will be flipped. |
| 229 | // me_obj = object pointer to the me object |
| 230 | // it_obj = object pointer to the it object |
| 231 | virtual void OnServerCollide(object *me_obj, object *it_obj) = 0; |
| 232 | virtual void OnServerCollide(object *me_obj, object *it_obj, vector *point, vector *normal) = 0; |
| 233 | |
| 234 | // DMFCBase::OnServerPlayerChangeSegment |
| 235 | // |
| 236 | // Event handler for when a player changes rooms or a "large" terrain cell |
| 237 | // (8x8 Terrain block). |
| 238 | // player_num = player number of the player who just changed the room/segment |
| 239 | // newseg = New room/cell location |
| 240 | // oldseg = Old room/cell location |
| 241 | virtual void OnServerPlayerChangeSegment(int player_num, int newseg, int oldseg) = 0; |
| 242 | |
| 243 | // DMFCBase::OnServerObjectChangeSegment (Only called if server tells client to execute) |
| 244 | // |
| 245 | // Event handler for when a player changes rooms or a "large" terrain cell |
| 246 | // (8x8 Terrain block). |
| 247 | // obj = Object pointer of the object who just changed the room/segment |
| 248 | // newseg = New room/cell location |
| 249 | // oldseg = Old room/cell location |
| 250 | virtual void OnServerObjectChangeSegment(object *obj, int newseg, int oldseg) = 0; |
| 251 | |
| 252 | // DMFCBase::OnServerPlayerEntersGame |
| 253 | // |
| 254 | // Event handler for when a player enters the game. This will only get called once per |
| 255 | // player, it usually gets called right after they connect to the server to start playing. |
| 256 | // player_num = player number of the player entering the game |
| 257 | virtual void OnServerPlayerEntersGame(int player_num) = 0; |
| 258 | |
| 259 | // DMFCBase::OnServerPlayerDisconnect |
| 260 | // |
| 261 | // Event handler for when a player disconnects from the server. |
| 262 | // player_num = player number of the player that just disconnected |
| 263 | virtual void OnServerPlayerDisconnect(int player_num) = 0; |
| 264 | |
| 265 | // DMFCBase::OnServerGameCreated |
| 266 | // |
| 267 | // Event handler when the server's game first gets started. This will only be called once |
| 268 | // while the server is running, and that is when the server first starts up. |
| 269 | virtual void OnServerGameCreated(void) = 0; |
| 270 | |
| 271 | // DMFCBase::OnServerLevelChange |
| 272 | // |
| 273 | // Event handler when the server changes levels. This will get called after a level ends and a server |
| 274 | // is starting a new level. |
| 275 | virtual void OnServerLevelChange(void) = 0; |
| 276 | |
| 277 | // DMFCBase::OnServerLevelStart |
| 278 | // |
| 279 | // Event handler for when a multiplayer level is starting up. This will get called right before the level |
| 280 | // starts. |
| 281 | virtual void OnServerLevelStart(void) = 0; |
| 282 | |
| 283 | // DMFCBase::OnServerLevelEnd |
| 284 | // |
| 285 | // Event handler for when a multiplayer level is ending. |
| 286 | virtual void OnServerLevelEnd(void) = 0; |
| 287 | |
| 288 | // DMFCBase::OnServerObjectShieldsChanged |
| 289 | // |
| 290 | // Event handler for when an objects shield's change |
| 291 | virtual void OnServerObjectShieldsChanged(object *obj, float amount) = 0; |
| 292 | |
| 293 | // DMFCBase::OnServerIsAddressBanned |
| 294 | // |
| 295 | // Called by the game to determine if the given network address is banned from the game |
| 296 | virtual bool OnServerIsAddressBanned(network_address *addr, const char *tracker_id) = 0; |
| 297 | |
| 298 | // DMFCBase::OnServerWallCollide |
| 299 | // |
| 300 | // Called by the game when their is a collision between an object and a wall |
| 301 | virtual void OnServerWallCollide(object *obj, float hitspeed, int hitseg, int hitwall, vector *hitpt, |
| 302 | vector *wall_normal, float hit_dot) = 0; |
| 303 | |
| 304 | // DMFCBase::OnServerObjectKilled |
| 305 | // |
| 306 | // Called when an object is being killed |
| 307 | // Not automatically sent to clients (OnClientObjectKilled) |
| 308 | // killer might not be valid (NULL) |
| 309 | virtual void OnServerObjectKilled(object *obj, object *killer) = 0; |
| 310 | |
| 311 | // DMFCBase::OnServerObjectDestroyed |
| 312 | // |
| 313 | // Called when an object is about to be deleted |
| 314 | // Not automatically sent to clients |
| 315 | virtual void OnServerObjectDestroyed(object *obj) = 0; |
| 316 | |
| 317 | // ######################### Client allowed event handlers############################ |
| 318 | |
| 319 | // DMFCBase::OnClientPlayerKilled (Only called if server tells client to execute) |
| 320 | // |
| 321 | // Event handler for when a player gets killed, either by another player or some other way. |
| 322 | // killer_obj = object pointer to the object that killed the player |
| 323 | // victim_pnum = player number of the player that got killed |
| 324 | virtual void OnClientPlayerKilled(object *killer_obj, int victim_pnum) = 0; |
| 325 | |
| 326 | // DMFCBase::OnClientPlayerExploded (Only called if server tells client to execute) |
| 327 | // |
| 328 | // Event handler for when a player explodes. Gets called after a EVT_GAMEPLAYERKILLED event. |
| 329 | // player_num = player number of the player exploding |
| 330 | virtual void OnClientPlayerExploded(int player_num) = 0; |
| 331 | |
| 332 | // DMFCBase::OnClientCollide (Only called if server tells client to execute) |
| 333 | // |
| 334 | // Event handler for when two objects collide. At least one of the two objects is a player or a robot. |
| 335 | // Be aware that this event will be called twice per collision, the second time it is called the me and |
| 336 | // it objects will be flipped. |
| 337 | // ALSO NOTE: In order for the OnClientCollide() that passes the point and normal to have valid values |
| 338 | // the server must pass true to the parameter to send arguments in CallClientEvent(). |
| 339 | // me_obj = object pointer to the me object |
| 340 | // it_obj = object pointer to the it object |
| 341 | virtual void OnClientCollide(object *me_obj, object *it_obj) = 0; |
| 342 | virtual void OnClientCollide(object *me_obj, object *it_obj, vector *point, vector *normal) = 0; |
| 343 | |
| 344 | // DMFCBase::OnClientPlayerChangeSegment (Only called if server tells client to execute) |
| 345 | // |
| 346 | // Event handler for when a player changes rooms or a "large" terrain cell |
| 347 | // (8x8 Terrain block). |
| 348 | // player_num = player number of the player who just changed the room/segment |
| 349 | // newseg = New room/cell location |
| 350 | // oldseg = Old room/cell location |
| 351 | virtual void OnClientPlayerChangeSegment(int player_num, int newseg, int oldseg) = 0; |
| 352 | |
| 353 | // DMFCBase::OnClientObjectChangeSegment (Only called if server tells client to execute) |
| 354 | // |
| 355 | // Event handler for when a player changes rooms or a "large" terrain cell |
| 356 | // (8x8 Terrain block). |
| 357 | // obj = Object pointer of the object who just changed the room/segment |
| 358 | // newseg = New room/cell location |
| 359 | // oldseg = Old room/cell location |
| 360 | virtual void OnClientObjectChangeSegment(object *obj, int newseg, int oldseg) = 0; |
| 361 | |
| 362 | // DMFCBase::OnClientPlayerEntersGame (Only called if server tells client to execute) |
| 363 | // |
| 364 | // Event handler for when a player enters the game. This will only get called once per |
| 365 | // player, it usually gets called right after they connect to the server to start playing. |
| 366 | // player_num = player number of the player entering the game |
| 367 | virtual void OnClientPlayerEntersGame(int player_num) = 0; |
| 368 | |
| 369 | // DMFCBase::OnClientPlayerDisconnect (Only called if server tells client to execute) |
| 370 | // |
| 371 | // Event handler for when a player disconnects from the server. |
| 372 | // player_num = player number of the player that just disconnected |
| 373 | virtual void OnClientPlayerDisconnect(int player_num) = 0; |
| 374 | |
| 375 | // DMFCBase::OnMeDisconnectFromServer |
| 376 | // |
| 377 | // Event handler that gets called if we disconnect from the server for some reason (not purposesly quit) |
| 378 | virtual void OnMeDisconnectFromServer(void) = 0; |
| 379 | |
| 380 | // DMFCBase::OnClientGameCreated (Only called if server tells client to execute) |
| 381 | // |
| 382 | // Event handler when the server's game first gets started. This will only be called once |
| 383 | // while the server is running, and that is when the server first starts up. |
| 384 | virtual void OnClientGameCreated(void) = 0; |
| 385 | |
| 386 | // DMFCBase::OnClientObjectShieldsChanged |
| 387 | // |
| 388 | // Event handler for when an objects shield's change |
| 389 | virtual void OnClientObjectShieldsChanged(object *obj, float amount) = 0; |
| 390 | |
| 391 | // DMFCBase::OnWeaponFired |
| 392 | // |
| 393 | // Event handler for when an object fires a weapon |
| 394 | virtual void OnWeaponFired(object *weapon_obj, object *shooter) = 0; |
| 395 | |
| 396 | // DMFCBase::OnClientLevelChange (Only called if server tells client to execute) |
| 397 | // |
| 398 | // Event handler when the server changes levels. This will get called after a level ends and a server |
| 399 | // is starting a new level. |
| 400 | virtual void OnClientLevelChange(void) = 0; |
| 401 | |
| 402 | // DMFCBase::OnClientLevelStart (Only called if server tells client to execute) |
| 403 | // |
| 404 | // Event handler for when a multiplayer level is starting up. This will get called right before the level |
| 405 | // starts. |
| 406 | virtual void OnClientLevelStart(void) = 0; |
| 407 | |
| 408 | // DMFCBase::OnClientLevelEnd (Only called if server tells client to execute) |
| 409 | // |
| 410 | // Event handler for when a multiplayer level is ending. |
| 411 | virtual void OnClientLevelEnd(void) = 0; |
| 412 | |
| 413 | // DMFCBase::OnClientWallCollide |
| 414 | // |
| 415 | // Called by the game when their is a collision between an object and a wall |
| 416 | virtual void OnClientWallCollide(object *obj, float hitspeed, int hitseg, int hitwall, vector *hitpt, |
| 417 | vector *wall_normal, float hit_dot) = 0; |
| 418 | |
| 419 | // DMFCBase::OnClientObjectKilled |
| 420 | // |
| 421 | // Called when an object is being killed |
| 422 | // Not automatically sent to clients (OnClientObjectKilled) |
| 423 | // killer might not be valid (NULL) |
| 424 | virtual void OnClientObjectKilled(object *obj, object *killer) = 0; |
| 425 | |
| 426 | // DMFCBase::OnClientObjectDestroyed |
| 427 | // |
| 428 | // Called when an object is about to be deleted |
| 429 | // Not automatically sent to clients |
| 430 | virtual void OnClientObjectDestroyed(object *obj) = 0; |
| 431 | |
| 432 | // DMFCBase::OnPlayerEntersObserver |
| 433 | // |
| 434 | // Event handler when a player becomes an observer mode |
| 435 | // If they are piggybacking another player than piggy is the object pointer, else it's NULL |
| 436 | virtual void OnPlayerEntersObserver(int pnum, object *piggy) = 0; |
| 437 | |
| 438 | // DMFCBase::OnPlayerExitsObserver |
| 439 | // |
| 440 | // Event handler when a player is leaving observer mode |
| 441 | virtual void OnPlayerExitsObserver(int pnum) = 0; |
| 442 | |
| 443 | // DMFCBase::OnCanChangeTeam |
| 444 | // |
| 445 | // Called to determine if a player can change teams, you can override this so the server won't |
| 446 | // let a player change teams if it is not desired (for that player) |
| 447 | virtual bool OnCanChangeTeam(int pnum, int newteam) = 0; |
| 448 | |
| 449 | // DMFCBase::OnSpecialPacket |
| 450 | // |
| 451 | // Event handler for when a special packet arrives and needs to be processed. |
| 452 | // Both the server and client can get this event, although it is more common for the |
| 453 | // client to recieve these. |
| 454 | virtual void OnSpecialPacket(void) = 0; |
| 455 | |
| 456 | // DMFCBase::OnInterval |
| 457 | // |
| 458 | // Event handler that gets called once a frame |
| 459 | virtual void OnInterval(void) = 0; |
| 460 | |
| 461 | // DMFCBase::OnHUDInterval |
| 462 | // |
| 463 | // Event handler that gets called once a frame when it's time to render the HUD images |
| 464 | virtual void OnHUDInterval(void) = 0; |
| 465 | |
| 466 | // DMFCBase::OnPLRInterval |
| 467 | // |
| 468 | // Event handler that gets called once a frame when the Post Level Results screen is being display |
| 469 | virtual void OnPLRInterval(void) = 0; |
| 470 | |
| 471 | // DMFCBase::OnPLRInit |
| 472 | // |
| 473 | // Event handler that gets called the first frame of the PLR screen for each level |
| 474 | virtual void OnPLRInit(void) = 0; |
| 475 | |
| 476 | // DMFCBase::OnKeypress |
| 477 | // |
| 478 | // Event handler for when a user presses a key while in the game |
| 479 | // key = Key code of the key being pressed |
| 480 | virtual void OnKeypress(int key) = 0; |
| 481 | |
| 482 | // DMFCBase::OnInputString |
| 483 | // |
| 484 | // Event handler for when the user types a message at the console (F8) that begins with a $ |
| 485 | // input_string = string that was typed |
| 486 | virtual void OnInputString(char *input_string) = 0; |
| 487 | |
| 488 | // DMFCBase::OnPlayerChangeTeam |
| 489 | // |
| 490 | // Called when a player changes team |
| 491 | // if announce is true than it is a change in the middle of the game, else it's an initial assignment change |
| 492 | virtual void OnPlayerChangeTeam(int player_num, int newteam, bool announce, bool spew_everything) = 0; |
| 493 | |
| 494 | // DMFCBase::OnGameStateRequest |
| 495 | // |
| 496 | // Server only. Override this to listen for Game state requests from the clients |
| 497 | // When this function is called a client (who's player number is passed in) is requesting |
| 498 | // game state information. Do what you need to do to send game state information to that player |
| 499 | virtual void OnGameStateRequest(int pnum) = 0; |
| 500 | |
| 501 | // DMFCBase::OnSaveStatsToFile |
| 502 | // |
| 503 | // |
| 504 | // The user is requesting the game stats to be saved to file, you must handle this completly on |
| 505 | // the game's side, nothing is done in DMFC |
| 506 | virtual void OnSaveStatsToFile(void) = 0; |
| 507 | |
| 508 | // DMFCBase::OnPlayerReconnect |
| 509 | // |
| 510 | // |
| 511 | // This player is reconnecting to the game |
| 512 | virtual void OnPlayerReconnect(int player_num) = 0; |
| 513 | |
| 514 | // DMFCBase::OnPlayerConnect |
| 515 | // |
| 516 | // |
| 517 | // This player is connecting to the game for the first time |
| 518 | virtual void OnPlayerConnect(int player_num) = 0; |
| 519 | |
| 520 | // DMFCBase::OnControlMessage |
| 521 | // |
| 522 | // |
| 523 | // There is a control message sent from someone |
| 524 | virtual void OnControlMessage(uint8_t msg, int from_pnum) = 0; |
| 525 | |
| 526 | // DMFCBase::OnAllowObserverChange |
| 527 | // |
| 528 | // |
| 529 | // returns true if the requested change for observer mode should go through |
| 530 | virtual bool OnAllowObserverChange(bool turnonobserver) = 0; |
| 531 | |
| 532 | // DMFCBase::OnClientShowUI |
| 533 | // |
| 534 | // |
| 535 | // The game is saying it's ok to do any UI. Only handle the id's that belong to you and pass the rest |
| 536 | // to DMFCBase::OnClientShowUI(). |
| 537 | virtual void OnClientShowUI(int id, void *user_data) = 0; |
| 538 | |
| 539 | // DMFCBase::OnPrintScores |
| 540 | // |
| 541 | // |
| 542 | // The user is requesting that the scores be printed out (For Dedicated Server use). Use DPrintf |
| 543 | // level: -1 Requesting all the available scores |
| 544 | // n Print only the top n scores |
| 545 | // Override this to how you see fit, but it should conform to the above. |
| 546 | virtual void OnPrintScores(int level) = 0; |
| 547 | |
| 548 | // DMFCBase::OnDisconnectSaveStatsToFile |
| 549 | // |
| 550 | // |
| 551 | // The game should save the stats because the player (only ourself as the client in the game), |
| 552 | // has disconnected. |
| 553 | virtual void OnDisconnectSaveStatsToFile(void) = 0; |
| 554 | |
| 555 | // DMFCBase::OnLevelEndSaveStatsToFile |
| 556 | // |
| 557 | // |
| 558 | // The game should save the "End of Level" stats to file. You must handle this completly on |
| 559 | // the game's side, nothing is done in DMFC |
| 560 | virtual void OnLevelEndSaveStatsToFile(void) = 0; |
| 561 | |
| 562 | // DMFCBase::OnGetHudCallSignColor |
| 563 | // |
| 564 | // This is an event sent in by the game requesting what color it should draw the HUD callsign |
| 565 | // of the passed in playernum. Using GR_RGB return the color from the function. This function |
| 566 | // gets called every frame that the player is on the clients HUD. |
| 567 | virtual ddgr_color OnGetHudCallSignColor(int playernum) = 0; |
| 568 | |
| 569 | // DMFCBase::TranslateEvent |
| 570 | // |
| 571 | // Translates the event passed in to handle, calls the appropriate handler function. If a function isn't |
| 572 | // created to handle the event, then it calls the default handler. Handler functions should call the default |
| 573 | // handler unless it absolutly shouldn't |
| 574 | virtual void TranslateEvent(int eventnum, dllinfo *data) = 0; |
| 575 | |
| 576 | // DMFCBase::OnTeamChangeName |
| 577 | // |
| 578 | // This event occurs on the client when a team's name has just changed |
| 579 | virtual void OnTeamChangeName(int team, char *oldname, char *newname) = 0; |
| 580 | |
| 581 | // DMFCBase::OnDoControls |
| 582 | // |
| 583 | // This event occurs when there is a new back of game controls data |
| 584 | virtual void OnDoControls(game_controls *controls) = 0; |
| 585 | |
| 586 | // DMFCBase::OnPlayAudioTaunt |
| 587 | // |
| 588 | // This event occurs when a player plays an audio taunt |
| 589 | virtual void OnPlayAudioTaunt(int pnum) = 0; |
| 590 | |
| 591 | // DMFCBase::OnGetTokenString |
| 592 | // |
| 593 | // This event occurs when a text macro is being used that has tokens |
| 594 | // in it, if you have a specific token, override this event to handle it. |
| 595 | virtual void OnGetTokenString(char *src, char *dest, int dest_size) = 0; |
| 596 | |
| 597 | virtual void DrawMenu(void) = 0; |
| 598 | |
| 599 | virtual void DisplayPlayerInfo(int background_bmp = -1, bool dedicated_server = false) = 0; |
| 600 | |
| 601 | // DMFCBase::SwitchPlayerInfoDisplay |
| 602 | // |
| 603 | // Switches on/off displaying a Playerinfo |
| 604 | virtual void SwitchPlayerInfoDisplay(int pnum) = 0; |
| 605 | |
| 606 | // DMFCBase::DisplayingPlayerInfo |
| 607 | // |
| 608 | // Returns the pnum of who you are currently displaying, -1 if noone |
| 609 | virtual int DisplayingPlayerInfo(void) = 0; |
| 610 | |
| 611 | // DMFCBase::GetTeamFromString |
| 612 | // |
| 613 | // Returns the int value of a team based on a string, -1 if not a team |
| 614 | virtual int GetTeamFromString(char *str) = 0; |
| 615 | |
| 616 | // DMFCBase::GetPlayerNum |
| 617 | // |
| 618 | // Returns your playernum, useful when finding out if an event is referring to you (by looking at |
| 619 | // the playernum passed to the event handler, compared to your playernum |
| 620 | virtual int GetPlayerNum(void) = 0; |
| 621 | |
| 622 | // DMFCBase::GetLocalRole |
| 623 | // |
| 624 | // Returns your role in the multiplayer game. The result returned will be either LR_SERVER or LR_CLIENT |
| 625 | virtual int GetLocalRole(void) = 0; |
| 626 | |
| 627 | // DMFCBase::CheckPlayerNum |
| 628 | // |
| 629 | // Returns true if the player number passed in is a valid player number (the player is connected) |
| 630 | virtual bool CheckPlayerNum(int player_num) = 0; |
| 631 | |
| 632 | // DMFCBase::PacketCheckPlayerNum |
| 633 | // |
| 634 | // Returns true if it's ok to send a packet to this player |
| 635 | virtual bool PacketCheckPlayerNum(int player_num) = 0; |
| 636 | |
| 637 | // DMFCBase::CallClientEvent |
| 638 | // |
| 639 | // Server Only. This will send an event to a client for it to execute. |
| 640 | // event = An EVT_CLIENT_* |
| 641 | // me_objnum,it_objnum = Object numbers of the objects to be me and it for the event |
| 642 | // destination = Player number of the client to send to, or -1 if to send to all |
| 643 | virtual void CallClientEvent(int event, int me_objnum, int it_objnum, int destination, bool parms = false) = 0; |
| 644 | |
| 645 | // DMFCBase::GetTimeLeft |
| 646 | // |
| 647 | // Server Only. This will fill in the float pointer passed to it with how much time is |
| 648 | // left in the multiplayer game. The value placed in the float is only valid if GetTimeLeft |
| 649 | // returns true. If it returns false it was because either it is not a game with a time limit |
| 650 | // or it is being called on a client. |
| 651 | virtual bool GetTimeLeft(float *time) = 0; |
| 652 | |
| 653 | // DMFCBase::EndLevel |
| 654 | // |
| 655 | // Server Only. This will end the current multiplayer level, and will go on to the next level. |
| 656 | virtual void EndLevel(void) = 0; |
| 657 | |
| 658 | // DMFCBase::WarpToLevel |
| 659 | // |
| 660 | // Warps to another level in the mission. Pass a level number (1 to Current_mission.num_levels) |
| 661 | // It will end the level and go to that level. |
| 662 | virtual void WarpToLevel(int lev) = 0; |
| 663 | |
| 664 | // DMFCBase::GetScoreLimit |
| 665 | // |
| 666 | // Server Only. This will fill in the int pointer passed to it with what the scoring limit |
| 667 | // is, set in in the multiplayer options. The value point into the int is only valid if |
| 668 | // GetScoreLimit returns true. If it returns false it is because you are either not the |
| 669 | // server or this option wasn't set in the multiplayer options |
| 670 | virtual bool GetScoreLimit(int *limit) = 0; |
| 671 | |
| 672 | // DMFCBase::AutoTimeLimit |
| 673 | // |
| 674 | // Server Only. This turns off or on the automatic level ending by DMFC of a timed multiplayer game. |
| 675 | // If you turn it off, it is your responsibility to end a time multiplayer game when it's time |
| 676 | // is up. If it is turned on, DMFC will automatically handle ending the game. By default it is on. |
| 677 | virtual void AutoTimeLimit(bool turnon) = 0; |
| 678 | |
| 679 | // DMFCBase::AutoDeathMessage |
| 680 | // |
| 681 | // This turns on or off DMFC's automatic handling of death messages. If it is turned on (Default) |
| 682 | // then when a player dies it will display a random death message from the list added by you using |
| 683 | // AddDeathMessage. If it is turned off, then it is your responsibility to handle the messages, you |
| 684 | // can use DoRandomDeathMessage to display one when appropriate. |
| 685 | virtual void AutoDeathMessage(bool turnon) = 0; |
| 686 | |
| 687 | // DMFCBase::AddDeathMessage |
| 688 | // |
| 689 | // This will add a death message to DMFC. |
| 690 | // format = string in a "printf" type format (using %s for player callsigns) of the message |
| 691 | // victim_first = Set this to true if the victim is listed first in the format |
| 692 | virtual void AddDeathMessage(const char *string, bool victim_first = true) = 0; |
| 693 | |
| 694 | // DMFCBase::AddSuicideMessage |
| 695 | // |
| 696 | // This will add a death message to DMFC. |
| 697 | // format = string in a "printf" type format (using %s for player callsigns) of the message |
| 698 | virtual void AddSuicideMessage(const char *string) = 0; |
| 699 | |
| 700 | // DMFCBase::DoRandomDeathMessage |
| 701 | // |
| 702 | // DMFC will display a death message (or suicide message if killer and victim are the same) when |
| 703 | // this function is called, based on the strings added with AddDeathMessage or AddSuicideMessage. |
| 704 | // killernum = object number of the killer |
| 705 | // victimnum = object number of the victim |
| 706 | // hash = hash index of the weapon killer, -1 if none |
| 707 | virtual void DoRandomDeathMessage(int killernum, int victimnum, uint32_t hash = -1) = 0; |
| 708 | |
| 709 | // DMFCBase::GetItObjNum |
| 710 | // |
| 711 | // Returns the it object number of the current event for use. |
| 712 | virtual int GetItObjNum(void) = 0; |
| 713 | |
| 714 | // DMFCBase::GetMeObjNum |
| 715 | // |
| 716 | // Returns the me object number of the current event for use. |
| 717 | virtual int GetMeObjNum(void) = 0; |
| 718 | |
| 719 | // DMFCBase::RegisterPacketReceiver |
| 720 | // |
| 721 | // Sets up a handler for a Special Packet ID. When a special packet is recieved it's ID is compared |
| 722 | // to the ID's given to this function. If any match than it calls the handler given to process |
| 723 | // the packet. |
| 724 | // id = ID of the packet |
| 725 | // func = Function handler to handle the packet. Must be declared like void MyFunction(uint8_t *data); |
| 726 | virtual void RegisterPacketReceiver(uint8_t id, void (*func)(uint8_t *)) = 0; |
| 727 | //@@@@virtual void RegisterPacketReceiver(uint8_t id,void (DMFCBase::*func)(uint8_t *)) = 0; |
| 728 | |
| 729 | // DMFCBase::StartPacket |
| 730 | // |
| 731 | // Initializes a packet so it is ready to be sent out. |
| 732 | // data = pointer to buffer of data for packet. This buffer should be MAX_GAME_DATA_SIZE in size, even |
| 733 | // if you don't plan on using all that data, there is header information that is added |
| 734 | // in this function. |
| 735 | // id = ID of the Special packet. When the packet is recieved by whomever, this is the ID that determines which |
| 736 | // handler to |
| 737 | // call. |
| 738 | // count = pointer to your packet index pointer |
| 739 | virtual void StartPacket(uint8_t *data, uint8_t id, int *count) = 0; |
| 740 | |
| 741 | // DMFCBase::SendPacket |
| 742 | // |
| 743 | // Ships a Special Packet away to the destination. This call must be preceeded by a StartPacket call |
| 744 | // data = buffer of data to be sent out (same buffer that was passed to StartPacket |
| 745 | // size = size (in bytes) of the packet |
| 746 | // destination = either a player number, SP_ALL for all the players or SP_SERVER to send to the server (if you are a |
| 747 | // client) |
| 748 | virtual void SendPacket(uint8_t *data, int size, int destination) = 0; |
| 749 | |
| 750 | // DMFCBase::GetTeamForNewPlayer |
| 751 | // |
| 752 | // A Helper function (Server only), which will give you the optimum team assignment (whoever has the |
| 753 | // lowest amount of players on their team, for a new player. |
| 754 | // player_num = player number of the new player |
| 755 | // num_teams = The number of teams in your game |
| 756 | virtual int GetTeamForNewPlayer(int player_num, int num_teams) = 0; |
| 757 | |
| 758 | // DMFCBase::SetNumberOfTeams |
| 759 | // |
| 760 | // Sets the number of teams to be used in the game. By default there is 1 team (everyone against everyone). |
| 761 | // You can set up to a maximum of 4 teams. Call this function as soon as possible. |
| 762 | // teams = number of teams |
| 763 | virtual void SetNumberOfTeams(int teams) = 0; |
| 764 | |
| 765 | // DMFCBase::AutoTeamSelect |
| 766 | // |
| 767 | // Turns on or off DMFC's auto team assignment. If it is on, then when a new player joins, they will |
| 768 | // be placed on the team with fewest players. If it is off, then you must handle that. Defualt on. |
| 769 | virtual void AutoTeamSelect(bool turnon) = 0; |
| 770 | |
| 771 | // DMFCBase::SendTeamAssignment |
| 772 | // |
| 773 | // A DMFC Special Packet function, this sends a team assignment packet to all the players. Server only. |
| 774 | // playernum = player to change teams |
| 775 | // team = new team |
| 776 | virtual void SendTeamAssignment(int playernum, int team, bool spew_on_respawn) = 0; |
| 777 | |
| 778 | // DMFCBase::GetTeamAssignmentPacket |
| 779 | // |
| 780 | // Reciever for the team assignment packet. |
| 781 | virtual void GetTeamAssignmentPacket(uint8_t *data) = 0; |
| 782 | |
| 783 | // DMFCBase::GetChangeTeamPacket |
| 784 | // |
| 785 | // Reciever for the change team packet.(Server Only) |
| 786 | virtual void GetChangeTeamPacket(uint8_t *data) = 0; |
| 787 | |
| 788 | // DMFCBase::GetGameStateRequest |
| 789 | // |
| 790 | // Receiver for the server from a client asking for the state of the game |
| 791 | virtual void GetGameStateRequest(uint8_t *data) = 0; |
| 792 | |
| 793 | // DMFCBase::SendChangeTeamRequest |
| 794 | // |
| 795 | // Sends a request to the server to change teams (Client Only) |
| 796 | // spew_onchange should be true if you want the client the spew his inventory on the change |
| 797 | virtual void SendChangeTeamRequest(int newteam, bool spew_onchange) = 0; |
| 798 | |
| 799 | // DMFCBase::GetDMFCGameInfo |
| 800 | // |
| 801 | // Receives information about the DMFC game |
| 802 | virtual void GetDMFCGameInfo(uint8_t *data) = 0; |
| 803 | |
| 804 | // DMFCBase::SendDMFCGameInfo |
| 805 | // |
| 806 | // Sends information about the DMFC game |
| 807 | virtual void SendDMFCGameInfo(int player) = 0; |
| 808 | |
| 809 | // DMFCBase::ChangeTeams |
| 810 | // |
| 811 | // If you are the server it will make the player change teams. If you |
| 812 | // are a client then it sends a request to the server to change teams |
| 813 | // spew_on_repsawn is true if the player should spew his inventory before he respawns |
| 814 | virtual void RequestTeamChange(int team, int pnum, bool spew_on_respawn) = 0; |
| 815 | |
| 816 | // DMFCBase::RequestGameState |
| 817 | // |
| 818 | // Sends a request to the server for the game state |
| 819 | virtual void RequestGameState(void) = 0; |
| 820 | |
| 821 | // DMFCBase::AddHudItemCallback |
| 822 | // |
| 823 | // Adds an item to the hud. Everytime the hud needs to be updated, it will call the |
| 824 | // handler passed in. The handler must be declared as: |
| 825 | // void func(struct tHudItem *item); |
| 826 | // type = HI_BITMAP for bitmap, HI_TEXT for a text item |
| 827 | // func = function callback |
| 828 | virtual void AddHUDItemCallback(int type, void (*func)(struct tHUDItem *)) = 0; |
| 829 | |
| 830 | // DMFCBase::GetMyTeam |
| 831 | // |
| 832 | // Returns the int value of the team you are on...only useful in a team game. |
| 833 | virtual int GetMyTeam(void) = 0; |
| 834 | |
| 835 | // DMFCBase::GetTeamString |
| 836 | // |
| 837 | // Returns a pointer to a string name of a team |
| 838 | // team = integer value of the team |
| 839 | virtual const char *GetTeamString(int team) = 0; |
| 840 | |
| 841 | // DMFCBase::GetTeamColor |
| 842 | // |
| 843 | // Returns the color components of a team |
| 844 | // team = integer value of the team |
| 845 | virtual ddgr_color GetTeamColor(int team) = 0; |
| 846 | |
| 847 | // DMFCBase::GetNumTeams |
| 848 | // |
| 849 | // Returns the number of teams in the game |
| 850 | virtual int GetNumTeams(void) = 0; |
| 851 | |
| 852 | // DMFCBase::AllowTeamChange |
| 853 | // |
| 854 | // Returns true if team changing is allowed |
| 855 | virtual bool AllowTeamChange(void) = 0; |
| 856 | |
| 857 | // DMFCBase::SwitchAllowTeamChange |
| 858 | // |
| 859 | // Turns on/off allowing of team changing |
| 860 | virtual void SwitchAllowTeamChange(bool turnon) = 0; |
| 861 | |
| 862 | // DMFCBase::GetSortedPlayerSlots |
| 863 | // |
| 864 | // Fills in the passed array (of size maxsize) with the playernums sorted by (kills-suicides) |
| 865 | virtual void GetSortedPlayerSlots(int *sortedindex, int maxsize) = 0; |
| 866 | |
| 867 | // DMFCBase::GetSortedPlayerSlotsByEfficiency |
| 868 | // |
| 869 | // Fills in the passed array (of size maxsize) with the playernums sorted by kills/(kills+deaths+suicides) |
| 870 | virtual void GetSortedPlayerSlotsByEfficiency(int *sortedindex, int maxsize) = 0; |
| 871 | |
| 872 | // DMFCBase::IsMenuUp |
| 873 | // |
| 874 | // Returns true if the on screen menu is being shown |
| 875 | virtual bool IsMenuUp(void) = 0; |
| 876 | |
| 877 | // DMFCBase::ConvertHUDAlpha |
| 878 | // |
| 879 | // Returns a converted alpha based on what you give, it will be a more transparent if the onscreen menu is up |
| 880 | virtual float ConvertHUDAlpha(float normal) = 0; |
| 881 | virtual uint8_t ConvertHUDAlpha(uint8_t normal) = 0; |
| 882 | |
| 883 | // DMFCBase::ClipString |
| 884 | // |
| 885 | // Given a width, the string will be clipped to that width. If you pass true for arrow, then an arrow will be |
| 886 | // appended if the string has been clipped. Based off current font |
| 887 | virtual void ClipString(int width, char *string, bool arrow) = 0; |
| 888 | |
| 889 | // DMFCBase::DisplayOutrageLogo(void) |
| 890 | // |
| 891 | // Displays the Outrage Logo for 5 seconds (call repeatedly, after 5 seconds it will just short circuit) |
| 892 | // Does nothing for non-Outrage releases |
| 893 | virtual void DisplayOutrageLogo(void) = 0; |
| 894 | |
| 895 | // DMFCBase::KillAllTimers |
| 896 | // |
| 897 | // Kills all running timers |
| 898 | virtual void KillAllTimers(void) = 0; |
| 899 | |
| 900 | // DMFCBase::SetTimerInterval |
| 901 | // |
| 902 | // Starts a timer event running |
| 903 | virtual int SetTimerInterval(void (*func)(void), float intval, float longevity, void (*onkill)(void) = NULL) = 0; |
| 904 | |
| 905 | // DMFCBase::KillTimer |
| 906 | // |
| 907 | // Kills a timer |
| 908 | virtual void KillTimer(int handle) = 0; |
| 909 | |
| 910 | // DMFCBase::SwitchShowHudCallsignLevel |
| 911 | // |
| 912 | // |
| 913 | // Sets the level for displaying of Player's Callsigns on the HUD |
| 914 | virtual void SwitchShowHudCallsignLevel(uint8_t level, bool announce = true) = 0; |
| 915 | |
| 916 | // DMFCBase::SwitchServerHudCallsignLevel |
| 917 | // |
| 918 | // |
| 919 | // Sets the max level of HUD callsign displayage...determined by the server |
| 920 | virtual void SwitchServerHudCallsignLevel(uint8_t level) = 0; |
| 921 | |
| 922 | // DMFCBase::GetCounterMeasureOwner |
| 923 | // |
| 924 | // |
| 925 | // Given a counter measure it will determine the pnum of it's owner...if it can't find it, it returns -1 |
| 926 | virtual int GetCounterMeasureOwner(object *robot) = 0; |
| 927 | |
| 928 | // DMFCBase::CFGOpen |
| 929 | // |
| 930 | // Opens the registry/cfg information for the DMFC game, see error codes for return values |
| 931 | virtual int CFGOpen(char *filename) = 0; |
| 932 | |
| 933 | // DMFCBase::CFGClose |
| 934 | // |
| 935 | // Closes the registry information for the game. |
| 936 | virtual void CFGClose(void) = 0; |
| 937 | |
| 938 | // DMFCBase::CFGFlush |
| 939 | // |
| 940 | // Flushes out the registry information to fall |
| 941 | virtual int CFGFlush(void) = 0; |
| 942 | |
| 943 | // DMFCBase::CFGCreateKey |
| 944 | // |
| 945 | // Creates a key in the registry |
| 946 | virtual int CFGCreateKey(char *name) = 0; |
| 947 | |
| 948 | // DMFCBase::CFGLookupKey |
| 949 | // |
| 950 | // Sets the active key in the registry |
| 951 | virtual int CFGLookupKey(char *name) = 0; |
| 952 | |
| 953 | // DMFCBase::CFGLookupRecord |
| 954 | // |
| 955 | // Looks up a record in the active key |
| 956 | virtual int CFGLookupRecord(char *record, void *data) = 0; |
| 957 | |
| 958 | // DMFCBase::CFGCreateRecord |
| 959 | // |
| 960 | // Create/overwrites a record in the active key. Type is either REGT_DWORD or REGT_STRING |
| 961 | virtual int CFGCreateRecord(char *name, char type, void *data) = 0; |
| 962 | |
| 963 | // DMFCBase::DecryptData |
| 964 | // |
| 965 | // Decrypts a buffer of data |
| 966 | virtual void DecryptData(uint8_t *data, int size) = 0; |
| 967 | |
| 968 | // DMFCBase::EncryptData |
| 969 | // |
| 970 | // Encrypts (weak) a buffer of data |
| 971 | virtual void EncryptData(uint8_t *data, int size) = 0; |
| 972 | |
| 973 | // DMFCBase::VersionCheck |
| 974 | // |
| 975 | // Makes sure Client has same DMFC version |
| 976 | virtual void VersionCheck(int pnum) = 0; |
| 977 | |
| 978 | // DMFCBase::UpdatePInfo |
| 979 | // |
| 980 | // |
| 981 | // Updates a victim's pinfo stat |
| 982 | virtual void UpdatePInfo(int victim, int killer, int amount) = 0; |
| 983 | |
| 984 | // DMFCBase::ResetPInfo |
| 985 | // |
| 986 | // |
| 987 | // Resets all the PInfo stats (and frees memory) |
| 988 | virtual void ResetPInfo(void) = 0; |
| 989 | |
| 990 | // DMFCBase::WriteDMFCStatsToFile |
| 991 | // |
| 992 | // |
| 993 | // This function will write out DMFC's stats to the file given (it must be opened for writing) |
| 994 | virtual void WriteDMFCStatsToFile(CFILE *file) = 0; |
| 995 | |
| 996 | // DMFCBase::SetWeaponDeathMessage |
| 997 | // |
| 998 | // Sets a death message for a weapon kill (you only need to pass in one version of the weapon if it |
| 999 | // consists of multiple weapons...make sure AddWeaponHash has been called before this for this weapon) |
| 1000 | virtual bool SetWeaponDeathMessage(const char *weapon_name, const char *message, bool victim_first) = 0; |
| 1001 | |
| 1002 | // DMFCBase::GetWeaponDeathMessage |
| 1003 | // |
| 1004 | // Returns the format string for a weapon death message, NULL if it doesn't exist |
| 1005 | virtual char *GetWeaponDeathMessage(int index, bool *victim_first) = 0; |
| 1006 | |
| 1007 | // DMFCBase::AddWeaponHash |
| 1008 | // |
| 1009 | // Since one weapon may actually consist of many weapons, in order to save space you can create |
| 1010 | // one weapon where all those other weapon id's will be mapped to it...use WeaponHash[id] to |
| 1011 | // get the actual weapon. End list of children with a NULL |
| 1012 | virtual void AddWeaponHash(const char *parent, ...) = 0; |
| 1013 | |
| 1014 | // DMFCBase::AddWeaponHashArray |
| 1015 | // |
| 1016 | // Since one weapon may actually consist of many weapons, in order to save space you can create |
| 1017 | // one weapon where all those other weapon id's will be mapped to it...use WeaponHash[id] to |
| 1018 | // get the actual weapon. |
| 1019 | virtual void AddWeaponHashArray(const char *parent, int count, char **array) = 0; |
| 1020 | |
| 1021 | // DMFCBase::SetupPlayerRecord |
| 1022 | // |
| 1023 | // Sets up memory for multiplayer mod user defined data in the Player Records. Pass in the size (in bytes) |
| 1024 | // of 1 struct (each player will get one). Use GetPlayerRecordData to retrieve a pointer to the data. |
| 1025 | // |
| 1026 | // pack_callback : callback function called when data from the struct needs to be packed |
| 1027 | // into a packet. It is SUPER important that this function packs the data |
| 1028 | // in little endian format. This function gets a pointer to the struct that |
| 1029 | // needs to be packed (user_info), and a buffer in which to pack it to. This |
| 1030 | // function is to return the number of bytes it has packed. |
| 1031 | // unpack_callback : callback function called when data from the struct needs to be unpacket |
| 1032 | // from a packet. This data will be in little endian format. Returns the number of |
| 1033 | // bytes unpacked. |
| 1034 | // returns: 1 if size given was <=0 (if so all previous user stats will be removed) |
| 1035 | // 0 all went ok |
| 1036 | // -1 out of memory (all user stats memory will be freed) |
| 1037 | virtual int SetupPlayerRecord(int sizeof_individual_data, int (*pack_callback)(void *user_info, uint8_t *data), |
| 1038 | int (*unpack_callback)(void *user_info, uint8_t *data)) = 0; |
| 1039 | |
| 1040 | // DMFCBase::GetPlayerRecordData |
| 1041 | // |
| 1042 | // Returns a pointer to the memory set aside for a particular player (NULL on error) |
| 1043 | virtual void *GetPlayerRecordData(int pnum) = 0; |
| 1044 | |
| 1045 | // DMFCBase::GetPlayerRecord |
| 1046 | // |
| 1047 | // Returns a pointer to the player record at the given slot (passed in slot must be in the range |
| 1048 | // 0<=slot<MAX_PLAYER_RECORDS) |
| 1049 | virtual player_record *GetPlayerRecord(int slot) = 0; |
| 1050 | |
| 1051 | // DMFCBase::GetPlayerRecordByPnum |
| 1052 | // |
| 1053 | // Same as above, but you can specify by a player's pnum, return NULL on error |
| 1054 | virtual player_record *GetPlayerRecordByPnum(int pnum) = 0; |
| 1055 | |
| 1056 | // DMFCBase::SendRequestForPlayerRecords |
| 1057 | // |
| 1058 | // |
| 1059 | // Sends a request to the server to send the player records |
| 1060 | virtual void SendRequestForPlayerRecords(void) = 0; |
| 1061 | |
| 1062 | // DMFCBase::ReceiveRequestForPlayerRecords |
| 1063 | // |
| 1064 | // |
| 1065 | // Recieves and processes a request for a player record |
| 1066 | virtual void ReceiveRequestForPlayerRecords(uint8_t *data) = 0; |
| 1067 | |
| 1068 | // DMFCBase::IsPlayerBanned |
| 1069 | // |
| 1070 | // returns true is the given pnum is banned from the game |
| 1071 | virtual bool IsPlayerBanned(int pnum) = 0; |
| 1072 | |
| 1073 | // DMFCBase::IsAddressBanned |
| 1074 | // |
| 1075 | // returns true if the given address is banned from the game |
| 1076 | virtual bool IsAddressBanned(network_address *addr, const char *tracker_id) = 0; |
| 1077 | |
| 1078 | // DMFCBase::RemoveAllBans |
| 1079 | // |
| 1080 | // Removes all the temp bans |
| 1081 | virtual void RemoveAllBans(void) = 0; |
| 1082 | |
| 1083 | // DMFCBase::RemoveBan |
| 1084 | // |
| 1085 | // Removes a temp ban on given the ban #...returns true on success |
| 1086 | virtual bool RemoveBan(int index) = 0; |
| 1087 | |
| 1088 | // DMCBase::GetBannedPlayerCallsign |
| 1089 | // |
| 1090 | // Returns the callsign of the banned player at position index, NULL on error |
| 1091 | virtual char *GetBannedPlayerCallsign(int index) = 0; |
| 1092 | |
| 1093 | // DMFCBase::GetNumBannedPlayers |
| 1094 | // |
| 1095 | // Returns the number of players banned from the server |
| 1096 | virtual int GetNumBannedPlayers(void) = 0; |
| 1097 | |
| 1098 | // DMFCBase::BanPlayerFromGame |
| 1099 | // |
| 1100 | // Puts a temp ban on a player which will only last the duration of the game |
| 1101 | virtual void BanPlayerFromGame(int pnum) = 0; |
| 1102 | |
| 1103 | // DMFCBase::IsPlayerAlive |
| 1104 | // |
| 1105 | // Returns true is the given pnum is a player, flying around the level (not dying, |
| 1106 | // dead or observing) |
| 1107 | virtual bool IsPlayerAlive(int pnum) = 0; |
| 1108 | |
| 1109 | // DMFCBase::SendControlMessageToPlayer |
| 1110 | // |
| 1111 | // |
| 1112 | // Sends a [1 byte] control message to a player |
| 1113 | virtual void SendControlMessageToPlayer(int pnum, uint8_t msg) = 0; |
| 1114 | |
| 1115 | // DMFCBase::ReceiveControlMessage |
| 1116 | // |
| 1117 | // |
| 1118 | // Handles a control message |
| 1119 | virtual void ReceiveControlMessage(uint8_t *data) = 0; |
| 1120 | |
| 1121 | // DMFCBase::FindPInfoStatFirst |
| 1122 | // |
| 1123 | // Fills in a tPInfoStat that contains information about a given player record slot. Returns true on success, false |
| 1124 | // if there is no information available for the given slot. Call this first, then follow with repeated calls to |
| 1125 | // FindPInfoStatNext until you get a false value returned...call FindPInfoStatClose when done. |
| 1126 | virtual bool FindPInfoStatFirst(int slot, tPInfoStat *stat) = 0; |
| 1127 | |
| 1128 | // DMFCBase::FindPInfoStatNext |
| 1129 | // |
| 1130 | // Call this repeatedly until you get a value of false, finish by calling FindPInfoStatClose |
| 1131 | virtual bool FindPInfoStatNext(tPInfoStat *stat) = 0; |
| 1132 | |
| 1133 | // DMFCBase::FindPInfoStatClose |
| 1134 | // |
| 1135 | // Closes up a FindPInfo series of calls |
| 1136 | virtual void FindPInfoStatClose(void) = 0; |
| 1137 | |
| 1138 | // DMFCBase::DoDamageToPlayer |
| 1139 | // |
| 1140 | // Server only...applies damage to player |
| 1141 | virtual void DoDamageToPlayer(int pnum, int type, float amount, bool playsound = true) = 0; |
| 1142 | |
| 1143 | // DMFCBase::StartUIWindow |
| 1144 | // |
| 1145 | // Prepares the game so that you can display UI stuff, give a unique id in which will be passed |
| 1146 | // to the OnClientShowUI(). In your OnClientShowUI() you must ONLY handle id's which belong to you |
| 1147 | // and pass the others to DMFCBase::OnClientShowUI(). |
| 1148 | virtual void StartUIWindow(int id, void *user_data) = 0; |
| 1149 | |
| 1150 | // DMFCBase::DisconnectMe |
| 1151 | // |
| 1152 | // Disconnects yourself from the game. It should be called when you are kicked or banned to make the |
| 1153 | // whole process a bit nicer/cleaner. Even if it doesn't get called when kicked, you will still |
| 1154 | // eventually disconnect. |
| 1155 | virtual void DisconnectMe(void) = 0; |
| 1156 | |
| 1157 | /* Input Command Functions */ |
| 1158 | // DMFCBase::AddInputCommand |
| 1159 | // |
| 1160 | // When the client (or dedicated server) types a message that begins with a $, DMFC will look through |
| 1161 | // all the values you passed to AddInputCommand() and see if any match. If so it passes the entire |
| 1162 | // command string to the given function handler. Returns 1 on success, -1 if out of memory, 0 if it already |
| 1163 | // exists. These commands are not case sensitive. |
| 1164 | // Ex. AddInputCommand("team"); //this handles all the '$team' passed in |
| 1165 | // allow_remotely : if set true, this input command can be called remotely via remote administration |
| 1166 | virtual int8_t AddInputCommand(const char *command, const char *description, void (*handler)(const char *), |
| 1167 | bool allow_remotely = false) = 0; |
| 1168 | |
| 1169 | // Does a check on on the pinfo info making sure it is valid |
| 1170 | virtual void CheckPInfo() = 0; |
| 1171 | |
| 1172 | // DMFCBase::EnableStatisticalMessages |
| 1173 | // |
| 1174 | // Turns on or off the statistical HUD messages that appear due to a player death |
| 1175 | virtual void EnableStatisticalMessages(bool on) = 0; |
| 1176 | |
| 1177 | // DMFCBase::EnableOnScreenMenu |
| 1178 | // |
| 1179 | // Turns on/off the onscreen menu |
| 1180 | virtual void EnableOnScreenMenu(bool turn_on) = 0; |
| 1181 | |
| 1182 | // DMFCBase::EnableAutoSaveLevelEnd |
| 1183 | // |
| 1184 | // Disables/Enables the autosaving of game stats to file on level end |
| 1185 | virtual void EnableAutoSaveLevelEnd(bool enable) = 0; |
| 1186 | |
| 1187 | // DMFCBase::EnableAutoSaveDisconnect |
| 1188 | // |
| 1189 | // Disables/Enables the autosaving of game stats to file on disconnect from the game |
| 1190 | virtual void EnableAutoSaveDisconnect(bool enable) = 0; |
| 1191 | |
| 1192 | // DMFCBase::GenerateStatFilename |
| 1193 | // |
| 1194 | // Given the following information it will return a full path to what |
| 1195 | // the recommended filename to save stats to should be. |
| 1196 | // root = Multiplayer DLL Name (filename will start with this) |
| 1197 | // end_of_level = pass true if this is the end of a level stats |
| 1198 | virtual void GenerateStatFilename(char *filename, const char *root, bool end_of_level) = 0; |
| 1199 | |
| 1200 | // DMFCBase::IsPlayerObserver |
| 1201 | // |
| 1202 | // Returns true if the given pnum is currently an observer in the game, else returns false. |
| 1203 | // If an invalid pnum is given, then it returns false |
| 1204 | virtual bool IsPlayerObserver(int pnum) = 0; |
| 1205 | |
| 1206 | // DMFCBase::EnableOnScreenMenuBackground |
| 1207 | // |
| 1208 | // Enables/disables the onscreen menu background |
| 1209 | virtual void EnableOnScreenMenuBackground(bool enable) = 0; |
| 1210 | |
| 1211 | // DMFCBase::GetTimeInGame |
| 1212 | // |
| 1213 | // Returns the totaltime the player has been in the game at the moment you call |
| 1214 | // this function. Pass in the player record slot. |
| 1215 | virtual float GetTimeInGame(int slot) = 0; |
| 1216 | |
| 1217 | // DMFCBase::GetTimeString |
| 1218 | // |
| 1219 | // Returns a string that contains a formated time (i.e. 32 seconds, 1:15 minutes, 3:21:23 hours) |
| 1220 | virtual char *GetTimeString(float sec) = 0; |
| 1221 | |
| 1222 | // DMFCBase::DisplayNetGameInfo |
| 1223 | // |
| 1224 | // Displays information about the Netgame that is currently being played |
| 1225 | // on to the screen. |
| 1226 | virtual void DisplayNetGameInfo(int background_bmp = -1, bool dedicated_server = false) = 0; |
| 1227 | |
| 1228 | // DMFCBase::SwitchNetGameInfoDisplay |
| 1229 | // |
| 1230 | // Switches on/off displaying netgame info |
| 1231 | virtual void SwitchNetGameInfoDisplay(int on) = 0; |
| 1232 | |
| 1233 | // DMFCBase::IsDisplayingNetGameInfo |
| 1234 | // |
| 1235 | // returns true if we are currently displaying netgame info |
| 1236 | virtual bool IsDisplayingNetGameInfo(void) = 0; |
| 1237 | |
| 1238 | // DatabaseRegister |
| 1239 | // Registers your multiplayer game with the database. This must be |
| 1240 | // called before any other database function, or they will fail until this |
| 1241 | // is called. |
| 1242 | virtual void DatabaseRegister(char *name) = 0; |
| 1243 | // DatabaseRead |
| 1244 | // Reads a string from the database |
| 1245 | virtual bool DatabaseRead(const char *label, char *entry, int *entrylen) = 0; |
| 1246 | // DatabaseRead |
| 1247 | // Reads wordsize bytes from the database |
| 1248 | virtual bool DatabaseRead(const char *label, void *entry, int wordsize) = 0; |
| 1249 | // DatabaseRead |
| 1250 | // Reads a bool from the database |
| 1251 | virtual bool DatabaseRead(const char *label, bool *entry) = 0; |
| 1252 | // DatabaseWrite |
| 1253 | // Writes/Updates a string to the database |
| 1254 | virtual bool DatabaseWrite(const char *label, const char *entry, int entrylen) = 0; |
| 1255 | // DatabaseWrite |
| 1256 | // Writes/Updates a value to the database |
| 1257 | virtual bool DatabaseWrite(const char *label, int entry) = 0; |
| 1258 | // DMFCBase::SendNetGameInfoSync |
| 1259 | // |
| 1260 | // Sends out a NetGame info sync packet to all the players |
| 1261 | virtual void SendNetGameInfoSync(int to_who = SP_ALL) = 0; |
| 1262 | |
| 1263 | // CompareNetworkAddress |
| 1264 | // |
| 1265 | // Compare's two network addresses, returns true if they are the same, false if not. |
| 1266 | // use_port: if this is true, than it will consider the port part of the network address |
| 1267 | virtual bool CompareNetworkAddress(network_address *one, network_address *two, bool use_port = true) = 0; |
| 1268 | |
| 1269 | // IsMasterTrackerGame |
| 1270 | // |
| 1271 | // returns true if this game is being played on the master tracker |
| 1272 | virtual bool IsMasterTrackerGame(void) = 0; |
| 1273 | |
| 1274 | // ConvertLocalToServerObjnum |
| 1275 | // |
| 1276 | // Given an objnum, it will convert the number from your local objnum to the server's objnum |
| 1277 | // It will return -1 on error |
| 1278 | virtual int ConvertLocalToServerObjnum(int objnum) = 0; |
| 1279 | |
| 1280 | // ConvertServerToLocalObjnum |
| 1281 | // |
| 1282 | // Given an objnum from the server, this function will convert the objnum to your local objnum |
| 1283 | // It will return -1 on error |
| 1284 | virtual int ConvertServerToLocalObjnum(int objnum) = 0; |
| 1285 | |
| 1286 | // DMFCBase::ShouldIDisplayHUDName |
| 1287 | // |
| 1288 | // Given a player num, it will determine if the callsign should be drawn on the HUD |
| 1289 | virtual bool ShouldIDisplayHUDName(int pnum) = 0; |
| 1290 | |
| 1291 | // DMFCBase::SetDeathMessageFilter |
| 1292 | // |
| 1293 | // Sets the death message filter |
| 1294 | virtual void SetDeathMessageFilter(int level) = 0; |
| 1295 | |
| 1296 | // DMFCBase::IAmDedicatedServer |
| 1297 | // |
| 1298 | // Returns true if we are a dedicated server |
| 1299 | virtual bool IAmDedicatedServer(void) = 0; |
| 1300 | |
| 1301 | // DMFCBase::IsPlayerDedicatedServer |
| 1302 | // |
| 1303 | // Returns true if the passed in pnum/playerrecord is a dedicated server |
| 1304 | virtual bool IsPlayerDedicatedServer(int pnum) = 0; |
| 1305 | virtual bool IsPlayerDedicatedServer(player_record *pr) = 0; |
| 1306 | |
| 1307 | // Displays dedicated server help |
| 1308 | virtual void DisplayInputCommandHelp(const char *s) = 0; |
| 1309 | |
| 1310 | // DMFCBase::GetPlayerTeam |
| 1311 | // |
| 1312 | // Returns the team of the player...call this instead of accessing .team directly |
| 1313 | virtual int GetPlayerTeam(int pnum) = 0; |
| 1314 | |
| 1315 | // DMFCBase::SetTeamName |
| 1316 | // |
| 1317 | // Sets the team name for a given team |
| 1318 | // team: integer value of the team to change |
| 1319 | // name: new name for the team |
| 1320 | // announce: if this is true, and we are the server, it will tell all the clients about the change |
| 1321 | virtual bool SetTeamName(int team, const char *name, bool announce) = 0; |
| 1322 | |
| 1323 | // DMFCBase::ConvertHUDCoord |
| 1324 | // |
| 1325 | // Given an x,y based on a virtual 640x480 screen, this will convert it to the x,y that should be |
| 1326 | // used based on the current screen size |
| 1327 | virtual void ConvertHUDCoord(int x, int y, int *rx, int *ry) = 0; |
| 1328 | |
| 1329 | // DMFCBase::GetPlayerLogoBmp |
| 1330 | // |
| 1331 | // Given a player_num, it will return a bitmap handle to that player's ship logo, or |
| 1332 | // -1 if they don't have a logo for their ship. |
| 1333 | // if is_vclip comes back as true, than it is not a bitmap handle, but a handle |
| 1334 | // to a vclip (animated bitmap). It is an index into the DLLGameVClips[]. |
| 1335 | virtual int GetPlayerLogoBmp(int player_num, bool *is_vclip) = 0; |
| 1336 | |
| 1337 | // DMFCBase::EnableShipLogos |
| 1338 | // |
| 1339 | // Disables or enables logo displaying for the client |
| 1340 | virtual void EnableShipLogos(bool enable) = 0; |
| 1341 | |
| 1342 | // DMFCBase::AreLogosEnabled |
| 1343 | // |
| 1344 | // returns true if ship logos are enabled |
| 1345 | virtual bool AreLogosEnabled(void) = 0; |
| 1346 | |
| 1347 | // DMFCBase::EnableAudioTaunts |
| 1348 | // |
| 1349 | // Disables or enables audio taunts |
| 1350 | virtual void EnableAudioTaunts(bool enable) = 0; |
| 1351 | |
| 1352 | // DMFCBase::AreTauntsEnabled(void) |
| 1353 | // |
| 1354 | // returns true if audio taunts are enabled |
| 1355 | virtual bool AreTauntsEnabled(void) = 0; |
| 1356 | |
| 1357 | // DMFCBase::EnableTimelimitCountdown |
| 1358 | // |
| 1359 | // Enables/Disables the timelimit countdown (if there is a level time limit) |
| 1360 | // Optionally you can specify what time to start the count down. |
| 1361 | virtual void EnableTimelimitCountdown(bool enable, int seconds = 10) = 0; |
| 1362 | |
| 1363 | // DMFCBase::RespawnPlayer |
| 1364 | // |
| 1365 | // Takes the given player and respawns his at a random start point (in a team game, team respawn |
| 1366 | // points are taken into consideration, so make sure the player is on the correct team before you |
| 1367 | // respawn him. spew_everything, if false, will override spew_energy_and_shields |
| 1368 | virtual void RespawnPlayer(int pnum, bool spew_energy_and_shield, bool spew_everything) = 0; |
| 1369 | |
| 1370 | // If you are going to create submenus you MUST use this function. along with: |
| 1371 | // void SetState(int state); |
| 1372 | // bool SetStateItemList(int count, ... ); for MIT_STATE items |
| 1373 | // or |
| 1374 | // bool SetStateItemListArray(int count, char **array); for MIT_STATE items |
| 1375 | // virtual MenuItem *CreateMenuItem(const char *title,char type,uint8_t flags,void (*fp)(int), ... ) = 0; |
| 1376 | |
| 1377 | // DMFCBase::ReadInHostsAllowDeny |
| 1378 | // |
| 1379 | // Reads in the hosts.allow and hosts.deny files (if available) |
| 1380 | virtual void ReadInHostsAllowDeny(void) = 0; |
| 1381 | |
| 1382 | // DMFCBase::FreeHostsLists |
| 1383 | // |
| 1384 | // Frees all the memory allocated for the host allow/deny lists |
| 1385 | virtual void FreeHostsLists(void) = 0; |
| 1386 | |
| 1387 | // DMFCBase::RehashAllowDeny |
| 1388 | // |
| 1389 | // Flushes and reloads the hosts.allow/.deny lists |
| 1390 | virtual void RehashAllowDeny(void) = 0; |
| 1391 | |
| 1392 | // DMFCBase::AnnounceTeamChangeDeny |
| 1393 | // |
| 1394 | // Tells a player that team change request was denied |
| 1395 | virtual void AnnounceTeamChangeDeny(int pnum) = 0; |
| 1396 | |
| 1397 | // DMFCBase::SetMaxPlayerHardLimit |
| 1398 | // |
| 1399 | // Sets a hard limit to the max number of players allowed in the game |
| 1400 | // changing the number of players can never go above this...defaults |
| 1401 | // to DLLMAX_PLAYERS |
| 1402 | virtual void SetMaxPlayerHardLimit(int max) = 0; |
| 1403 | |
| 1404 | // DMFCBase::WasPlayerInGameAtLevelEnd |
| 1405 | // |
| 1406 | // Given a player record it returns the pnum of the player at that slot |
| 1407 | // IF (and only if) the player was in the game at level end, else it |
| 1408 | // returns -1. |
| 1409 | virtual int WasPlayerInGameAtLevelEnd(int prec) = 0; |
| 1410 | |
| 1411 | // DMFCBase::SelectNextCameraView |
| 1412 | // |
| 1413 | // This function, given which window (corresponds to left, middle, right), switches the |
| 1414 | // current view of the small camera windows on the screen |
| 1415 | virtual void SelectNextCameraView(int window) = 0; |
| 1416 | |
| 1417 | // ======================================================= |
| 1418 | // The following Set_ functions are to be used to set callback |
| 1419 | // to event handlers. If you set a callback for an event handler |
| 1420 | // the callback will be called instead of the default handler. |
| 1421 | // It is your responsibility to also call the default handler |
| 1422 | // inside of your callback, to insure proper processesing. |
| 1423 | // ======================================================== |
| 1424 | virtual void Set_OnServerPlayerKilled(void (*callback)(object *killer_obj, int victim_pnum)) = 0; |
| 1425 | virtual void Set_OnServerPlayerExploded(void (*callback)(int player_num)) = 0; |
| 1426 | virtual void Set_OnServerCollide(void (*callback)(object *me_obj, object *it_obj)) = 0; |
| 1427 | virtual void Set_OnServerCollide(void (*callback)(object *me_obj, object *it_obj, vector *point, vector *normal)) = 0; |
| 1428 | virtual void Set_OnServerPlayerChangeSegment(void (*callback)(int player_num, int newseg, int oldseg)) = 0; |
| 1429 | virtual void Set_OnServerObjectChangeSegment(void (*callback)(object *obj, int newseg, int oldseg)) = 0; |
| 1430 | virtual void Set_OnServerPlayerEntersGame(void (*callback)(int player_num)) = 0; |
| 1431 | virtual void Set_OnServerPlayerDisconnect(void (*callback)(int player_num)) = 0; |
| 1432 | virtual void Set_OnServerGameCreated(void (*callback)(void)) = 0; |
| 1433 | virtual void Set_OnServerLevelChange(void (*callback)(void)) = 0; |
| 1434 | virtual void Set_OnServerLevelStart(void (*callback)(void)) = 0; |
| 1435 | virtual void Set_OnServerLevelEnd(void (*callback)(void)) = 0; |
| 1436 | virtual void Set_OnServerObjectShieldsChanged(void (*callback)(object *obj, float amount)) = 0; |
| 1437 | virtual void Set_OnServerIsAddressBanned(bool (*callback)(network_address *addr, const char *tracker_id)) = 0; |
| 1438 | virtual void Set_OnServerWallCollide(void (*callback)(object *obj, float hitspeed, int hitseg, int hitwall, |
| 1439 | vector *hitpt, vector *wall_normal, float hit_dot)) = 0; |
| 1440 | virtual void Set_OnServerObjectKilled(void (*callback)(object *obj, object *killer)) = 0; |
| 1441 | virtual void Set_OnServerObjectDestroyed(void (*callback)(object *obj)) = 0; |
| 1442 | virtual void Set_OnClientPlayerKilled(void (*callback)(object *killer_obj, int victim_pnum)) = 0; |
| 1443 | virtual void Set_OnClientPlayerExploded(void (*callback)(int player_num)) = 0; |
| 1444 | virtual void Set_OnClientCollide(void (*callback)(object *me_obj, object *it_obj)) = 0; |
| 1445 | virtual void Set_OnClientCollide(void (*callback)(object *me_obj, object *it_obj, vector *point, vector *normal)) = 0; |
| 1446 | virtual void Set_OnClientPlayerChangeSegment(void (*callback)(int player_num, int newseg, int oldseg)) = 0; |
| 1447 | virtual void Set_OnClientObjectChangeSegment(void (*callback)(object *obj, int newseg, int oldseg)) = 0; |
| 1448 | virtual void Set_OnClientPlayerEntersGame(void (*callback)(int player_num)) = 0; |
| 1449 | virtual void Set_OnClientPlayerDisconnect(void (*callback)(int player_num)) = 0; |
| 1450 | virtual void Set_OnMeDisconnectFromServer(void (*callback)(void)) = 0; |
| 1451 | virtual void Set_OnClientGameCreated(void (*callback)(void)) = 0; |
| 1452 | virtual void Set_OnClientObjectShieldsChanged(void (*callback)(object *obj, float amount)) = 0; |
| 1453 | virtual void Set_OnWeaponFired(void (*callback)(object *weapon_obj, object *shooter)) = 0; |
| 1454 | virtual void Set_OnClientLevelChange(void (*callback)(void)) = 0; |
| 1455 | virtual void Set_OnClientLevelStart(void (*callback)(void)) = 0; |
| 1456 | virtual void Set_OnClientLevelEnd(void (*callback)(void)) = 0; |
| 1457 | virtual void Set_OnClientWallCollide(void (*callback)(object *obj, float hitspeed, int hitseg, int hitwall, |
| 1458 | vector *hitpt, vector *wall_normal, float hit_dot)) = 0; |
| 1459 | virtual void Set_OnClientObjectKilled(void (*callback)(object *obj, object *killer)) = 0; |
| 1460 | virtual void Set_OnClientObjectDestroyed(void (*callback)(object *obj)) = 0; |
| 1461 | virtual void Set_OnPlayerEntersObserver(void (*callback)(int pnum, object *piggy)) = 0; |
| 1462 | virtual void Set_OnPlayerExitsObserver(void (*callback)(int pnum)) = 0; |
| 1463 | virtual void Set_OnCanChangeTeam(bool (*callback)(int pnum, int newteam)) = 0; |
| 1464 | virtual void Set_OnSpecialPacket(void (*callback)(void)) = 0; |
| 1465 | virtual void Set_OnInterval(void (*callback)(void)) = 0; |
| 1466 | virtual void Set_OnHUDInterval(void (*callback)(void)) = 0; |
| 1467 | virtual void Set_OnPLRInterval(void (*callback)(void)) = 0; |
| 1468 | virtual void Set_OnPLRInit(void (*callback)(void)) = 0; |
| 1469 | virtual void Set_OnKeypress(void (*callback)(int key)) = 0; |
| 1470 | virtual void Set_OnInputString(void (*callback)(char *input_string)) = 0; |
| 1471 | virtual void Set_OnPlayerChangeTeam(void (*callback)(int player_num, int newteam, bool announce, |
| 1472 | bool spew_everything)) = 0; |
| 1473 | virtual void Set_OnGameStateRequest(void (*callback)(int pnum)) = 0; |
| 1474 | virtual void Set_OnSaveStatsToFile(void (*callback)(void)) = 0; |
| 1475 | virtual void Set_OnPlayerReconnect(void (*callback)(int player_num)) = 0; |
| 1476 | virtual void Set_OnPlayerConnect(void (*callback)(int player_num)) = 0; |
| 1477 | virtual void Set_OnControlMessage(void (*callback)(uint8_t msg, int from_pnum)) = 0; |
| 1478 | virtual void Set_OnAllowObserverChange(bool (*callback)(bool turnonobserver)) = 0; |
| 1479 | virtual void Set_OnClientShowUI(void (*callback)(int id, void *user_data)) = 0; |
| 1480 | virtual void Set_OnPrintScores(void (*callback)(int level)) = 0; |
| 1481 | virtual void Set_OnDisconnectSaveStatsToFile(void (*callback)(void)) = 0; |
| 1482 | virtual void Set_OnLevelEndSaveStatsToFile(void (*callback)(void)) = 0; |
| 1483 | virtual void Set_OnGetHudCallSignColor(ddgr_color (*callback)(int playernum)) = 0; |
| 1484 | virtual void Set_OnTeamChangeName(void (*callback)(int team, char *oldname, char *newname)) = 0; |
| 1485 | virtual void Set_OnDoControls(void (*callback)(game_controls *controls)) = 0; |
| 1486 | virtual void Set_OnPlayAudioTaunt(void (*callback)(int pnum)) = 0; |
| 1487 | virtual void Set_OnGetTokenString(void (*callback)(char *src, char *dest, int dest_size)) = 0; |
| 1488 | |
| 1489 | // ======================================================== |
| 1490 | // The following Call functions are to be used to simulate |
| 1491 | // an event, you can call them wherever, if there is a call |
| 1492 | // back set for what you call, it will executed, else the |
| 1493 | // default handler will be called. DO NOT CALL THE |
| 1494 | // CORRESPONDING Call FUNCTION INSIDE OF AN EVENT HANDLER |
| 1495 | // FOR THAT EVENT, AN INFINITE LOOP WILL RESULT. |
| 1496 | // ======================================================== |
| 1497 | virtual void CallOnServerPlayerKilled(object *killer_obj, int victim_pnum) = 0; |
| 1498 | virtual void CallOnServerPlayerExploded(int player_num) = 0; |
| 1499 | virtual void CallOnServerCollide(object *me_obj, object *it_obj) = 0; |
| 1500 | virtual void CallOnServerCollide(object *me_obj, object *it_obj, vector *point, vector *normal) = 0; |
| 1501 | virtual void CallOnServerPlayerChangeSegment(int player_num, int newseg, int oldseg) = 0; |
| 1502 | virtual void CallOnServerObjectChangeSegment(object *obj, int newseg, int oldseg) = 0; |
| 1503 | virtual void CallOnServerPlayerEntersGame(int player_num) = 0; |
| 1504 | virtual void CallOnServerPlayerDisconnect(int player_num) = 0; |
| 1505 | virtual void CallOnServerGameCreated(void) = 0; |
| 1506 | virtual void CallOnServerLevelChange(void) = 0; |
| 1507 | virtual void CallOnServerLevelStart(void) = 0; |
| 1508 | virtual void CallOnServerLevelEnd(void) = 0; |
| 1509 | virtual void CallOnServerObjectShieldsChanged(object *obj, float amount) = 0; |
| 1510 | virtual bool CallOnServerIsAddressBanned(network_address *addr, const char *tracker_id) = 0; |
| 1511 | virtual void CallOnServerWallCollide(object *obj, float hitspeed, int hitseg, int hitwall, vector *hitpt, |
| 1512 | vector *wall_normal, float hit_dot) = 0; |
| 1513 | virtual void CallOnServerObjectKilled(object *obj, object *killer) = 0; |
| 1514 | virtual void CallOnServerObjectDestroyed(object *obj) = 0; |
| 1515 | virtual void CallOnClientPlayerKilled(object *killer_obj, int victim_pnum) = 0; |
| 1516 | virtual void CallOnClientPlayerExploded(int player_num) = 0; |
| 1517 | virtual void CallOnClientCollide(object *me_obj, object *it_obj) = 0; |
| 1518 | virtual void CallOnClientCollide(object *me_obj, object *it_obj, vector *point, vector *normal) = 0; |
| 1519 | virtual void CallOnClientPlayerChangeSegment(int player_num, int newseg, int oldseg) = 0; |
| 1520 | virtual void CallOnClientObjectChangeSegment(object *obj, int newseg, int oldseg) = 0; |
| 1521 | virtual void CallOnClientPlayerEntersGame(int player_num) = 0; |
| 1522 | virtual void CallOnClientPlayerDisconnect(int player_num) = 0; |
| 1523 | virtual void CallOnMeDisconnectFromServer(void) = 0; |
| 1524 | virtual void CallOnClientGameCreated(void) = 0; |
| 1525 | virtual void CallOnClientObjectShieldsChanged(object *obj, float amount) = 0; |
| 1526 | virtual void CallOnWeaponFired(object *weapon_obj, object *shooter) = 0; |
| 1527 | virtual void CallOnClientLevelChange(void) = 0; |
| 1528 | virtual void CallOnClientLevelStart(void) = 0; |
| 1529 | virtual void CallOnClientLevelEnd(void) = 0; |
| 1530 | virtual void CallOnClientWallCollide(object *obj, float hitspeed, int hitseg, int hitwall, vector *hitpt, |
| 1531 | vector *wall_normal, float hit_dot) = 0; |
| 1532 | virtual void CallOnClientObjectKilled(object *obj, object *killer) = 0; |
| 1533 | virtual void CallOnClientObjectDestroyed(object *obj) = 0; |
| 1534 | virtual void CallOnPlayerEntersObserver(int pnum, object *piggy) = 0; |
| 1535 | virtual void CallOnPlayerExitsObserver(int pnum) = 0; |
| 1536 | virtual bool CallOnCanChangeTeam(int pnum, int newteam) = 0; |
| 1537 | virtual void CallOnSpecialPacket(void) = 0; |
| 1538 | virtual void CallOnInterval(void) = 0; |
| 1539 | virtual void CallOnHUDInterval(void) = 0; |
| 1540 | virtual void CallOnPLRInterval(void) = 0; |
| 1541 | virtual void CallOnPLRInit(void) = 0; |
| 1542 | virtual void CallOnKeypress(int key) = 0; |
| 1543 | virtual void CallOnInputString(char *input_string) = 0; |
| 1544 | virtual void CallOnPlayerChangeTeam(int player_num, int newteam, bool announce, bool spew_everything) = 0; |
| 1545 | virtual void CallOnGameStateRequest(int pnum) = 0; |
| 1546 | virtual void CallOnSaveStatsToFile(void) = 0; |
| 1547 | virtual void CallOnPlayerReconnect(int player_num) = 0; |
| 1548 | virtual void CallOnPlayerConnect(int player_num) = 0; |
| 1549 | virtual void CallOnControlMessage(uint8_t msg, int from_pnum) = 0; |
| 1550 | virtual bool CallOnAllowObserverChange(bool turnonobserver) = 0; |
| 1551 | virtual void CallOnClientShowUI(int id, void *user_data) = 0; |
| 1552 | virtual void CallOnPrintScores(int level) = 0; |
| 1553 | virtual void CallOnDisconnectSaveStatsToFile(void) = 0; |
| 1554 | virtual void CallOnLevelEndSaveStatsToFile(void) = 0; |
| 1555 | virtual ddgr_color CallOnGetHudCallSignColor(int playernum) = 0; |
| 1556 | virtual void CallOnTeamChangeName(int team, char *oldname, char *newname) = 0; |
| 1557 | virtual void CallOnDoControls(game_controls *controls) = 0; |
| 1558 | virtual void CallOnPlayAudioTaunt(int pnum) = 0; |
| 1559 | virtual void CallOnGetTokenString(char *src, char *dest, int dest_size) = 0; |
| 1560 | |
| 1561 | public: |
| 1562 | /* |
| 1563 | ************************************************************* |
| 1564 | NEW INTERFACE STUFF |
| 1565 | ************************************************************* |
| 1566 | */ |
| 1567 | // dllinfo *Data; //Current event's data |
| 1568 | virtual dllinfo *GetDLLInfoCallData(void) = 0; |
| 1569 | // int *Highest_room_index; //the highest room index (for room number validation) |
| 1570 | virtual int GetHighestRoomIndex(void) = 0; |
| 1571 | // int *Game_window_w; //visible screen width |
| 1572 | virtual int GetGameWindowW(void) = 0; |
| 1573 | // int *Game_window_h; //visible screen height |
| 1574 | virtual int GetGameWindowH(void) = 0; |
| 1575 | // int *Game_window_x; //visible screen top-left x |
| 1576 | virtual int GetGameWindowX(void) = 0; |
| 1577 | // int *Game_window_y; //visible screen top-left y |
| 1578 | virtual int GetGameWindowY(void) = 0; |
| 1579 | // int *Game_fonts; //array of fonts |
| 1580 | virtual int *GetGameFontTranslateArray(void) = 0; |
| 1581 | // int hBitmapObserver; //Bitmap handle for the 'in observer mode' icon |
| 1582 | virtual int GetObserverModeBitmap(void) = 0; |
| 1583 | // float *Frametime; //how long it took the last frame to display |
| 1584 | virtual float GetFrametime(void) = 0; |
| 1585 | // float *Gametime; //how long the game has been running |
| 1586 | // gametime doesn't pause in the wait for players dialogs |
| 1587 | virtual float GetGametime(void) = 0; |
| 1588 | // Gets the 'true' gametime...which maybe paused if the server is in the wait for players |
| 1589 | // dialog |
| 1590 | virtual float GetRealGametime(bool *ispaused = NULL) = 0; |
| 1591 | // float *ShieldDelta; //array of player's...server update's their shields based on this array |
| 1592 | virtual float *GetShieldDeltaArray(void) = 0; |
| 1593 | // float *Hud_aspect_x,*Hud_aspect_y; |
| 1594 | virtual float GetHudAspectX(void) = 0; |
| 1595 | virtual float GetHudAspectY(void) = 0; |
| 1596 | // char *LocalD3Dir; //Path to the root of the Descent3 installation directory |
| 1597 | virtual const char *GetLocalD3Dir(void) = 0; |
| 1598 | // tMission *Current_mission; //the current mission |
| 1599 | virtual const tMission *GetCurrentMission(void) = 0; |
| 1600 | // room *Rooms; //rooms array |
| 1601 | virtual room *GetRooms(void) = 0; |
| 1602 | // object *Objects; //objects array |
| 1603 | virtual object *GetObjects(void) = 0; |
| 1604 | // terrain_segment *Terrain_seg; //Terrain segment array |
| 1605 | virtual terrain_segment *GetTerrainSegs(void) = 0; |
| 1606 | // netgame_info *Netgame; //Netgame info |
| 1607 | virtual netgame_info *GetNetgameInfo(void) = 0; |
| 1608 | // player *Players; //Player's array |
| 1609 | virtual player *GetPlayers(void) = 0; |
| 1610 | // netplayer *NetPlayers; //NetPlayer's array |
| 1611 | virtual netplayer *GetNetPlayers(void) = 0; |
| 1612 | // ship *Ships; //Ship's array |
| 1613 | virtual ship *GetShips(void) = 0; |
| 1614 | // weapon *Weapons; //Weapon's array |
| 1615 | virtual weapon *GetWeapons(void) = 0; |
| 1616 | // texture *GameTextures; //Texture's array |
| 1617 | virtual texture *GetGameTextures(void) = 0; |
| 1618 | // poly_model *Poly_models |
| 1619 | virtual poly_model *GetGamePolyModels(void) = 0; |
| 1620 | // vclip *GameVClips; //VClip array |
| 1621 | virtual vclip *GetGameVClips(void) = 0; |
| 1622 | // ddgr_color *Player_colors; |
| 1623 | virtual ddgr_color *GetPlayerColors(void) = 0; |
| 1624 | // game_controls Last_game_controls; // The last frame's set of control data |
| 1625 | virtual game_controls GetLastGameControls(void) = 0; |
| 1626 | // int PilotPicBmpHandles[DLLMAX_PLAYERS]; |
| 1627 | virtual int *GetPilotPicBitmapHandles(void) = 0; |
| 1628 | // object *Viewer_object; //object the player's view is from |
| 1629 | virtual void GetViewerObjectPtr(object **v_obj) = 0; |
| 1630 | virtual void SetViewerObjectPtr(object *v_obj) = 0; |
| 1631 | // float *Render_zoom; |
| 1632 | virtual float GetRenderZoom(void) = 0; |
| 1633 | |
| 1634 | // MenuItem Menu;??? |
| 1635 | virtual IMenuItem *GetOnScreenMenu(void) = 0; |
| 1636 | // game_api API;?? |
| 1637 | virtual tOSIRISModuleInit *GetOsirisModuleData(void) = 0; |
| 1638 | // get viseffect data |
| 1639 | virtual vis_effect *GetVisEffectArray(int **Highviseptr = NULL) = 0; |
| 1640 | // get current level information (watch for NULL return), although it should never be |
| 1641 | virtual level_info *GetLevelInfo() = 0; |
| 1642 | // gets the argument at the index passed |
| 1643 | virtual char *GetGameArg(int arg) = 0; |
| 1644 | // returns the current state of the camera window |
| 1645 | virtual int GetCameraViewType(int window) = 0; |
| 1646 | // Given a generic object (OBJ_POWERUP,OBJ_ROBOT,OBJ_BUILDING or OBJ_CLUTTER) id |
| 1647 | // in the range of 0 to MAX_OBJECT_IDS, this returns a pointer to it's information (see objinfo.h) |
| 1648 | // It returns NULL if an invalid id is given (or it's not used) |
| 1649 | virtual object_info *GetObjectInfo(int objinfo_id) = 0; |
| 1650 | virtual ~IDMFC() = default; |
| 1651 | }; |
| 1652 | |
| 1653 | //=========================================================================================== |
| 1654 | /* |
| 1655 | IMenuItem |
| 1656 | This is the interface class to Version 1.0 of MenuItem class (for OnScreenMenus) |
| 1657 | */ |
| 1658 | class IMenuItem : public IObject { |
| 1659 | public: |
| 1660 | virtual bool AddSubMenu(IMenuItem *p) = 0; |
| 1661 | virtual bool DetachSubMenu(IMenuItem *p) = 0; |
| 1662 | |
| 1663 | virtual bool Forward(void) = 0; |
| 1664 | virtual bool Back(void) = 0; |
| 1665 | virtual bool Up(void) = 0; |
| 1666 | virtual bool Down(void) = 0; |
| 1667 | |
| 1668 | virtual void Execute(void) = 0; |
| 1669 | virtual void Draw(int x, int y, int height, int backgroundbmp, float *ratio = NULL) = 0; |
| 1670 | |
| 1671 | virtual void SetInputFocus(void) = 0; |
| 1672 | virtual void LoseInputFocus(void) = 0; |
| 1673 | virtual bool GetFocus(void) = 0; |
| 1674 | |
| 1675 | virtual const char *GetTitle(void) = 0; |
| 1676 | virtual int GetCustomSubMenuCount(void) = 0; |
| 1677 | |
| 1678 | virtual void CallFunc(int value) = 0; |
| 1679 | virtual bool HasSubMenus(void) = 0; |
| 1680 | virtual char GetType(void) = 0; |
| 1681 | |
| 1682 | virtual void SetState(int state) = 0; |
| 1683 | virtual bool SetStateItemList(int count, ...) = 0; |
| 1684 | virtual bool SetStateItemListArray(int count, char **array) = 0; |
| 1685 | virtual ~IMenuItem() = default; |
| 1686 | }; |
| 1687 | |
| 1688 | //=========================================================================================== |
| 1689 | /* |
| 1690 | IDmfcStats |
| 1691 | This is the interface class to Version 1.0 of the CDmfcStats class |
| 1692 | */ |
| 1693 | class IDmfcStats : public IObject { |
| 1694 | public: |
| 1695 | // initialization member function, must be called first |
| 1696 | virtual bool Initialize(tDmfcStatsInit *init_info) = 0; |
| 1697 | |
| 1698 | // enables/disables the displaying of the stats screen |
| 1699 | virtual void Enable(bool enable) = 0; |
| 1700 | // returns the state of the stats manager |
| 1701 | virtual bool IsEnabled() = 0; |
| 1702 | |
| 1703 | // the do-it-all function, call once per frame |
| 1704 | virtual void DoFrame() = 0; |
| 1705 | // scrolls the player list down one |
| 1706 | virtual void ScrollDown() = 0; |
| 1707 | // scrolls the player list up one |
| 1708 | virtual void ScrollUp() = 0; |
| 1709 | // returns true if the player list can scroll down any more |
| 1710 | virtual bool CanScrollDown() = 0; |
| 1711 | // returns true if the player list can scroll up any more |
| 1712 | virtual bool CanScrollUp() = 0; |
| 1713 | virtual ~IDmfcStats() = default; |
| 1714 | }; |
| 1715 | |
| 1716 | #endif // #ifdef USECLASSES |
| 1717 | |
| 1718 | //=========================================================================================== |
| 1719 | #ifdef __cplusplus |
| 1720 | extern "C" { |
| 1721 | #endif |
| 1722 | |
| 1723 | /* |
| 1724 | Class creation interface functions |
| 1725 | */ |
| 1726 | DLLEXPORT IDMFC DLLFUNCCALLPTR CreateDMFC(void); |
| 1727 | DLLEXPORT IMenuItem DLLFUNCCALLPTR CreateMenuItem(void); |
| 1728 | DLLEXPORT IMenuItem DLLFUNCCALLPTR CreateMenuItemWArgs(const char *title, char type, uint8_t flags, void (*fp)(int), |
| 1729 | tCustomMenu *custom_menu = NULL); |
| 1730 | DLLEXPORT IDmfcStats DLLFUNCCALLPTR CreateDmfcStats(void); |
| 1731 | |
| 1732 | /*************************** |
| 1733 | IDMFC 1.0 Interface functions |
| 1734 | ****************************/ |
| 1735 | DLLEXPORT void DLLFUNCCALL IDMFC_Delete(IDMFC *instance); |
| 1736 | DLLEXPORT void DLLFUNCCALLPTR IDMFC_Dynamic_Cast(IDMFC *instance, const char *pszType); |
| 1737 | DLLEXPORT void DLLFUNCCALL IDMFC_DuplicatePointer(IDMFC *instance); |
| 1738 | DLLEXPORT void DLLFUNCCALL IDMFC_DestroyPointer(IDMFC *instance); |
| 1739 | DLLEXPORT void DLLFUNCCALL IDMFC_LoadFunctions(IDMFC *instance, int *api_func); |
| 1740 | DLLEXPORT void DLLFUNCCALL IDMFC_GameInit(IDMFC *instance, int teams); |
| 1741 | DLLEXPORT void DLLFUNCCALL IDMFC_GameClose(IDMFC *instance); |
| 1742 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerPlayerKilled(IDMFC *instance, object *killer_obj, int victim_pnum); |
| 1743 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerPlayerExploded(IDMFC *instance, int player_num); |
| 1744 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerCollideA(IDMFC *instance, object *me_obj, object *it_obj); |
| 1745 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerCollideB(IDMFC *instance, object *me_obj, object *it_obj, vector *point, |
| 1746 | vector *normal); |
| 1747 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerPlayerChangeSegment(IDMFC *instance, int player_num, int newseg, |
| 1748 | int oldseg); |
| 1749 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerObjectChangeSegment(IDMFC *instance, object *obj, int newseg, |
| 1750 | int oldseg); |
| 1751 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerPlayerEntersGame(IDMFC *instance, int player_num); |
| 1752 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerPlayerDisconnect(IDMFC *instance, int player_num); |
| 1753 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerGameCreated(IDMFC *instance); |
| 1754 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerLevelChange(IDMFC *instance); |
| 1755 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerLevelStart(IDMFC *instance); |
| 1756 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerLevelEnd(IDMFC *instance); |
| 1757 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerObjectShieldsChanged(IDMFC *instance, object *obj, float amount); |
| 1758 | DLLEXPORT bool DLLFUNCCALL IDMFC_OnServerIsAddressBanned(IDMFC *instance, network_address *addr, |
| 1759 | char *tracker_id); |
| 1760 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerWallCollide(IDMFC *instance, object *obj, float hitspeed, int hitseg, |
| 1761 | int hitwall, vector *hitpt, vector *wall_normal, |
| 1762 | float hit_dot); |
| 1763 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerObjectKilled(IDMFC *instance, object *obj, object *killer); |
| 1764 | DLLEXPORT void DLLFUNCCALL IDMFC_OnServerObjectDestroyed(IDMFC *instance, object *obj); |
| 1765 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientPlayerKilled(IDMFC *instance, object *killer_obj, int victim_pnum); |
| 1766 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientPlayerExploded(IDMFC *instance, int player_num); |
| 1767 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientCollideA(IDMFC *instance, object *me_obj, object *it_obj); |
| 1768 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientCollideB(IDMFC *instance, object *me_obj, object *it_obj, vector *point, |
| 1769 | vector *normal); |
| 1770 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientPlayerChangeSegment(IDMFC *instance, int player_num, int newseg, |
| 1771 | int oldseg); |
| 1772 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientObjectChangeSegment(IDMFC *instance, object *obj, int newseg, |
| 1773 | int oldseg); |
| 1774 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientPlayerEntersGame(IDMFC *instance, int player_num); |
| 1775 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientPlayerDisconnect(IDMFC *instance, int player_num); |
| 1776 | DLLEXPORT void DLLFUNCCALL IDMFC_OnMeDisconnectFromServer(IDMFC *instance); |
| 1777 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientGameCreated(IDMFC *instance); |
| 1778 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientObjectShieldsChanged(IDMFC *instance, object *obj, float amount); |
| 1779 | DLLEXPORT void DLLFUNCCALL IDMFC_OnWeaponFired(IDMFC *instance, object *weapon_obj, object *shooter); |
| 1780 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientLevelChange(IDMFC *instance); |
| 1781 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientLevelStart(IDMFC *instance); |
| 1782 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientLevelEnd(IDMFC *instance); |
| 1783 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientWallCollide(IDMFC *instance, object *obj, float hitspeed, int hitseg, |
| 1784 | int hitwall, vector *hitpt, vector *wall_normal, |
| 1785 | float hit_dot); |
| 1786 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientObjectKilled(IDMFC *instance, object *obj, object *killer); |
| 1787 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientObjectDestroyed(IDMFC *instance, object *obj); |
| 1788 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPlayerEntersObserver(IDMFC *instance, int pnum, object *piggy); |
| 1789 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPlayerExitsObserver(IDMFC *instance, int pnum); |
| 1790 | DLLEXPORT bool DLLFUNCCALL IDMFC_OnCanChangeTeam(IDMFC *instance, int pnum, int newteam); |
| 1791 | DLLEXPORT void DLLFUNCCALL IDMFC_OnSpecialPacket(IDMFC *instance); |
| 1792 | DLLEXPORT void DLLFUNCCALL IDMFC_OnInterval(IDMFC *instance); |
| 1793 | DLLEXPORT void DLLFUNCCALL IDMFC_OnHUDInterval(IDMFC *instance); |
| 1794 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPLRInterval(IDMFC *instance); |
| 1795 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPLRInit(IDMFC *instance); |
| 1796 | DLLEXPORT void DLLFUNCCALL IDMFC_OnKeypress(IDMFC *instance, int key); |
| 1797 | DLLEXPORT void DLLFUNCCALL IDMFC_OnInputString(IDMFC *instance, char *input_string); |
| 1798 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPlayerChangeTeam(IDMFC *instance, int player_num, int newteam, bool announce, |
| 1799 | bool spew_everything); |
| 1800 | DLLEXPORT void DLLFUNCCALL IDMFC_OnGameStateRequest(IDMFC *instance, int pnum); |
| 1801 | DLLEXPORT void DLLFUNCCALL IDMFC_OnSaveStatsToFile(IDMFC *instance); |
| 1802 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPlayerReconnect(IDMFC *instance, int player_num); |
| 1803 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPlayerConnect(IDMFC *instance, int player_num); |
| 1804 | DLLEXPORT void DLLFUNCCALL IDMFC_OnControlMessage(IDMFC *instance, uint8_t msg, int from_pnum); |
| 1805 | DLLEXPORT bool DLLFUNCCALL IDMFC_OnAllowObserverChange(IDMFC *instance, bool turnonobserver); |
| 1806 | DLLEXPORT void DLLFUNCCALL IDMFC_OnClientShowUI(IDMFC *instance, int id, void *user_data); |
| 1807 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPrintScores(IDMFC *instance, int level); |
| 1808 | DLLEXPORT void DLLFUNCCALL IDMFC_OnDisconnectSaveStatsToFile(IDMFC *instance); |
| 1809 | DLLEXPORT void DLLFUNCCALL IDMFC_OnLevelEndSaveStatsToFile(IDMFC *instance); |
| 1810 | DLLEXPORT ddgr_color DLLFUNCCALL IDMFC_OnGetHudCallSignColor(IDMFC *instance, int playernum); |
| 1811 | DLLEXPORT void DLLFUNCCALL IDMFC_TranslateEvent(IDMFC *instance, int eventnum, dllinfo *data); |
| 1812 | DLLEXPORT void DLLFUNCCALL IDMFC_OnTeamChangeName(IDMFC *instance, int team, char *oldname, char *newname); |
| 1813 | DLLEXPORT void DLLFUNCCALL IDMFC_OnDoControls(IDMFC *instance, game_controls *controls); |
| 1814 | DLLEXPORT void DLLFUNCCALL IDMFC_OnPlayAudioTaunt(IDMFC *instance, int pnum); |
| 1815 | DLLEXPORT void DLLFUNCCALL IDMFC_DrawMenu(IDMFC *instance); |
| 1816 | DLLEXPORT void DLLFUNCCALL IDMFC_DisplayPlayerInfo(IDMFC *instance, int background_bmp = -1, |
| 1817 | bool dedicated_server = false); |
| 1818 | DLLEXPORT void DLLFUNCCALL IDMFC_SwitchPlayerInfoDisplay(IDMFC *instance, int pnum); |
| 1819 | DLLEXPORT int DLLFUNCCALL IDMFC_DisplayingPlayerInfo(IDMFC *instance); |
| 1820 | DLLEXPORT int DLLFUNCCALL IDMFC_GetTeamFromString(IDMFC *instance, char *str); |
| 1821 | DLLEXPORT int DLLFUNCCALL IDMFC_GetPlayerNum(IDMFC *instance); |
| 1822 | DLLEXPORT int DLLFUNCCALL IDMFC_GetLocalRole(IDMFC *instance); |
| 1823 | DLLEXPORT bool DLLFUNCCALL IDMFC_CheckPlayerNum(IDMFC *instance, int player_num); |
| 1824 | DLLEXPORT bool DLLFUNCCALL IDMFC_PacketCheckPlayerNum(IDMFC *instance, int player_num); |
| 1825 | DLLEXPORT void DLLFUNCCALL IDMFC_CallClientEvent(IDMFC *instance, int event, int me_objnum, int it_objnum, |
| 1826 | int destination, bool parms = false); |
| 1827 | DLLEXPORT bool DLLFUNCCALL IDMFC_GetTimeLeft(IDMFC *instance, float *time); |
| 1828 | DLLEXPORT void DLLFUNCCALL IDMFC_EndLevel(IDMFC *instance); |
| 1829 | DLLEXPORT void DLLFUNCCALL IDMFC_WarpToLevel(IDMFC *instance, int lev); |
| 1830 | DLLEXPORT bool DLLFUNCCALL IDMFC_GetScoreLimit(IDMFC *instance, int *limit); |
| 1831 | DLLEXPORT void DLLFUNCCALL IDMFC_AutoTimeLimit(IDMFC *instance, bool turnon); |
| 1832 | DLLEXPORT void DLLFUNCCALL IDMFC_AutoDeathMessage(IDMFC *instance, bool turnon); |
| 1833 | DLLEXPORT void DLLFUNCCALL IDMFC_AddDeathMessage(IDMFC *instance, const char *string, bool victim_first = true); |
| 1834 | DLLEXPORT void DLLFUNCCALL IDMFC_AddSuicideMessage(IDMFC *instance, const char *string); |
| 1835 | DLLEXPORT void DLLFUNCCALL IDMFC_DoRandomDeathMessage(IDMFC *instance, int killernum, int victimnum, |
| 1836 | uint32_t hash = -1); |
| 1837 | DLLEXPORT int DLLFUNCCALL IDMFC_GetItObjNum(IDMFC *instance); |
| 1838 | DLLEXPORT int DLLFUNCCALL IDMFC_GetMeObjNum(IDMFC *instance); |
| 1839 | DLLEXPORT void DLLFUNCCALL IDMFC_RegisterPacketReceiver(IDMFC *instance, uint8_t id, void (*func)(uint8_t *)); |
| 1840 | DLLEXPORT void DLLFUNCCALL IDMFC_StartPacket(IDMFC *instance, uint8_t *data, uint8_t id, int *count); |
| 1841 | DLLEXPORT void DLLFUNCCALL IDMFC_SendPacket(IDMFC *instance, uint8_t *data, int size, int destination); |
| 1842 | DLLEXPORT int DLLFUNCCALL IDMFC_GetTeamForNewPlayer(IDMFC *instance, int player_num, int num_teams); |
| 1843 | DLLEXPORT void DLLFUNCCALL IDMFC_SetNumberOfTeams(IDMFC *instance, int teams); |
| 1844 | DLLEXPORT void DLLFUNCCALL IDMFC_AutoTeamSelect(IDMFC *instance, bool turnon); |
| 1845 | DLLEXPORT void DLLFUNCCALL IDMFC_SendTeamAssignment(IDMFC *instance, int playernum, int team, |
| 1846 | bool spew_on_respawn); |
| 1847 | DLLEXPORT void DLLFUNCCALL IDMFC_GetTeamAssignmentPacket(IDMFC *instance, uint8_t *data); |
| 1848 | DLLEXPORT void DLLFUNCCALL IDMFC_GetChangeTeamPacket(IDMFC *instance, uint8_t *data); |
| 1849 | DLLEXPORT void DLLFUNCCALL IDMFC_GetGameStateRequest(IDMFC *instance, uint8_t *data); |
| 1850 | DLLEXPORT void DLLFUNCCALL IDMFC_SendChangeTeamRequest(IDMFC *instance, int newteam, bool spew_onchange); |
| 1851 | DLLEXPORT void DLLFUNCCALL IDMFC_GetDMFCGameInfo(IDMFC *instance, uint8_t *data); |
| 1852 | DLLEXPORT void DLLFUNCCALL IDMFC_SendDMFCGameInfo(IDMFC *instance, int player); |
| 1853 | DLLEXPORT void DLLFUNCCALL IDMFC_RequestTeamChange(IDMFC *instance, int team, int pnum, bool spew_on_respawn); |
| 1854 | DLLEXPORT void DLLFUNCCALL IDMFC_RequestGameState(IDMFC *instance); |
| 1855 | DLLEXPORT void DLLFUNCCALL IDMFC_AddHUDItemCallback(IDMFC *instance, int type, void (*func)(struct tHUDItem *)); |
| 1856 | DLLEXPORT int DLLFUNCCALL IDMFC_GetMyTeam(IDMFC *instance); |
| 1857 | DLLEXPORT char DLLFUNCCALLPTR IDMFC_GetTeamString(IDMFC *instance, int team); |
| 1858 | DLLEXPORT ddgr_color DLLFUNCCALL IDMFC_GetTeamColor(IDMFC *instance, int team); |
| 1859 | DLLEXPORT int DLLFUNCCALL IDMFC_GetNumTeams(IDMFC *instance); |
| 1860 | DLLEXPORT bool DLLFUNCCALL IDMFC_AllowTeamChange(IDMFC *instance); |
| 1861 | DLLEXPORT void DLLFUNCCALL IDMFC_SwitchAllowTeamChange(IDMFC *instance, bool turnon); |
| 1862 | DLLEXPORT void DLLFUNCCALL IDMFC_GetSortedPlayerSlots(IDMFC *instance, int *sortedindex, int maxsize); |
| 1863 | DLLEXPORT void DLLFUNCCALL IDMFC_GetSortedPlayerSlotsByEfficiency(IDMFC *instance, int *sortedindex, |
| 1864 | int maxsize); |
| 1865 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsMenuUp(IDMFC *instance); |
| 1866 | DLLEXPORT float DLLFUNCCALL IDMFC_ConvertHUDAlphaFloat(IDMFC *instance, float normal); |
| 1867 | DLLEXPORT uint8_t DLLFUNCCALL IDMFC_ConvertHUDAlphaByte(IDMFC *instance, uint8_t normal); |
| 1868 | DLLEXPORT void DLLFUNCCALL IDMFC_ClipString(IDMFC *instance, int width, char *string, bool arrow); |
| 1869 | DLLEXPORT void DLLFUNCCALL IDMFC_DisplayOutrageLogo(IDMFC *instance); |
| 1870 | DLLEXPORT void DLLFUNCCALL IDMFC_KillAllTimers(IDMFC *instance); |
| 1871 | DLLEXPORT int DLLFUNCCALL IDMFC_SetTimerInterval(IDMFC *instance, void (*func)(void), float intval, |
| 1872 | float longevity, void (*onkill)(void) = NULL); |
| 1873 | DLLEXPORT void DLLFUNCCALL IDMFC_KillTimer(IDMFC *instance, int handle); |
| 1874 | DLLEXPORT void DLLFUNCCALL IDMFC_SwitchShowHudCallsignLevel(IDMFC *instance, uint8_t level, bool announce = true); |
| 1875 | DLLEXPORT void DLLFUNCCALL IDMFC_SwitchServerHudCallsignLevel(IDMFC *instance, uint8_t level); |
| 1876 | DLLEXPORT int DLLFUNCCALL IDMFC_GetCounterMeasureOwner(IDMFC *instance, object *robot); |
| 1877 | DLLEXPORT int DLLFUNCCALL IDMFC_CFGOpen(IDMFC *instance, char *filename); |
| 1878 | DLLEXPORT void DLLFUNCCALL IDMFC_CFGClose(IDMFC *instance); |
| 1879 | DLLEXPORT int DLLFUNCCALL IDMFC_CFGFlush(IDMFC *instance); |
| 1880 | DLLEXPORT int DLLFUNCCALL IDMFC_CFGCreateKey(IDMFC *instance, char *name); |
| 1881 | DLLEXPORT int DLLFUNCCALL IDMFC_CFGLookupKey(IDMFC *instance, char *name); |
| 1882 | DLLEXPORT int DLLFUNCCALL IDMFC_CFGLookupRecord(IDMFC *instance, char *record, void *data); |
| 1883 | DLLEXPORT int DLLFUNCCALL IDMFC_CFGCreateRecord(IDMFC *instance, char *name, char type, void *data); |
| 1884 | DLLEXPORT void DLLFUNCCALL IDMFC_DecryptData(IDMFC *instance, uint8_t *data, int size); |
| 1885 | DLLEXPORT void DLLFUNCCALL IDMFC_EncryptData(IDMFC *instance, uint8_t *data, int size); |
| 1886 | DLLEXPORT void DLLFUNCCALL IDMFC_VersionCheck(IDMFC *instance, int pnum); |
| 1887 | DLLEXPORT void DLLFUNCCALL IDMFC_UpdatePInfo(IDMFC *instance, int victim, int killer, int amount); |
| 1888 | DLLEXPORT void DLLFUNCCALL IDMFC_ResetPInfo(IDMFC *instance); |
| 1889 | DLLEXPORT void DLLFUNCCALL IDMFC_WriteDMFCStatsToFile(IDMFC *instance, CFILE *file); |
| 1890 | DLLEXPORT bool DLLFUNCCALL IDMFC_SetWeaponDeathMessage(IDMFC *instance, const char *weapon_name, const char *message, bool victim_first); |
| 1891 | DLLEXPORT char DLLFUNCCALLPTR IDMFC_GetWeaponDeathMessage(IDMFC *instance, int index, bool *victim_first); |
| 1892 | DLLEXPORT void DLLFUNCCALL IDMFC_AddWeaponHash(IDMFC *instance, const char *parent, int count, char **array); |
| 1893 | DLLEXPORT int DLLFUNCCALL IDMFC_SetupPlayerRecord(IDMFC *instance, int sizeof_individual_data, |
| 1894 | int (*pack_callback)(void *user_info, uint8_t *data), |
| 1895 | int (*unpack_callback)(void *user_info, uint8_t *data)); |
| 1896 | DLLEXPORT void DLLFUNCCALLPTR IDMFC_GetPlayerRecordData(IDMFC *instance, int pnum); |
| 1897 | DLLEXPORT player_record DLLFUNCCALLPTR IDMFC_GetPlayerRecord(IDMFC *instance, int slot); |
| 1898 | DLLEXPORT player_record DLLFUNCCALLPTR IDMFC_GetPlayerRecordByPnum(IDMFC *instance, int pnum); |
| 1899 | DLLEXPORT void DLLFUNCCALL IDMFC_SendRequestForPlayerRecords(IDMFC *instance); |
| 1900 | DLLEXPORT void DLLFUNCCALL IDMFC_ReceiveRequestForPlayerRecords(IDMFC *instance, uint8_t *data); |
| 1901 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsPlayerBanned(IDMFC *instance, int pnum); |
| 1902 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsAddressBanned(IDMFC *instance, network_address *addr, const char *tracker_id); |
| 1903 | DLLEXPORT void DLLFUNCCALL IDMFC_RemoveAllBans(IDMFC *instance); |
| 1904 | DLLEXPORT bool DLLFUNCCALL IDMFC_RemoveBan(IDMFC *instance, int index); |
| 1905 | DLLEXPORT char DLLFUNCCALLPTR IDMFC_GetBannedPlayerCallsign(IDMFC *instance, int index); |
| 1906 | DLLEXPORT int DLLFUNCCALL IDMFC_GetNumBannedPlayers(IDMFC *instance); |
| 1907 | DLLEXPORT void DLLFUNCCALL IDMFC_BanPlayerFromGame(IDMFC *instance, int pnum); |
| 1908 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsPlayerAlive(IDMFC *instance, int pnum); |
| 1909 | DLLEXPORT void DLLFUNCCALL IDMFC_SendControlMessageToPlayer(IDMFC *instance, int pnum, uint8_t msg); |
| 1910 | DLLEXPORT void DLLFUNCCALL IDMFC_ReceiveControlMessage(IDMFC *instance, uint8_t *data); |
| 1911 | DLLEXPORT bool DLLFUNCCALL IDMFC_FindPInfoStatFirst(IDMFC *instance, int slot, tPInfoStat *stat); |
| 1912 | DLLEXPORT bool DLLFUNCCALL IDMFC_FindPInfoStatNext(IDMFC *instance, tPInfoStat *stat); |
| 1913 | DLLEXPORT void DLLFUNCCALL IDMFC_FindPInfoStatClose(IDMFC *instance); |
| 1914 | DLLEXPORT void DLLFUNCCALL IDMFC_DoDamageToPlayer(IDMFC *instance, int pnum, int type, float amount, |
| 1915 | bool playsound = true); |
| 1916 | DLLEXPORT void DLLFUNCCALL IDMFC_StartUIWindow(IDMFC *instance, int id, void *user_data); |
| 1917 | DLLEXPORT void DLLFUNCCALL IDMFC_DisconnectMe(IDMFC *instance); |
| 1918 | DLLEXPORT int8_t DLLFUNCCALL IDMFC_AddInputCommand(IDMFC *instance, const char *command, const char *description, |
| 1919 | void (*handler)(const char *)); |
| 1920 | DLLEXPORT void DLLFUNCCALL IDMFC_CheckPInfo(IDMFC *instance); |
| 1921 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableStatisticalMessages(IDMFC *instance, bool on); |
| 1922 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableOnScreenMenu(IDMFC *instance, bool turn_on); |
| 1923 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableAutoSaveLevelEnd(IDMFC *instance, bool enable); |
| 1924 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableAutoSaveDisconnect(IDMFC *instance, bool enable); |
| 1925 | DLLEXPORT void DLLFUNCCALL IDMFC_GenerateStatFilename(IDMFC *instance, char *filename, const char *root, |
| 1926 | bool end_of_level); |
| 1927 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsPlayerObserver(IDMFC *instance, int pnum); |
| 1928 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableOnScreenMenuBackground(IDMFC *instance, bool enable); |
| 1929 | DLLEXPORT float DLLFUNCCALL IDMFC_GetTimeInGame(IDMFC *instance, int slot); |
| 1930 | DLLEXPORT char DLLFUNCCALLPTR IDMFC_GetTimeString(IDMFC *instance, float sec); |
| 1931 | DLLEXPORT void DLLFUNCCALL IDMFC_DisplayNetGameInfo(IDMFC *instance, int background_bmp = -1, |
| 1932 | bool dedicated_server = false); |
| 1933 | DLLEXPORT void DLLFUNCCALL IDMFC_SwitchNetGameInfoDisplay(IDMFC *instance, int on); |
| 1934 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsDisplayingNetGameInfo(IDMFC *instance); |
| 1935 | DLLEXPORT void DLLFUNCCALL IDMFC_DatabaseRegister(IDMFC *instance, char *name); |
| 1936 | DLLEXPORT bool DLLFUNCCALL IDMFC_DatabaseReadA(IDMFC *instance, const char *label, char *entry, int *entrylen); |
| 1937 | DLLEXPORT bool DLLFUNCCALL IDMFC_DatabaseReadB(IDMFC *instance, const char *label, void *entry, int wordsize); |
| 1938 | DLLEXPORT bool DLLFUNCCALL IDMFC_DatabaseReadC(IDMFC *instance, const char *label, bool *entry); |
| 1939 | DLLEXPORT bool DLLFUNCCALL IDMFC_DatabaseWriteA(IDMFC *instance, const char *label, const char *entry, |
| 1940 | int entrylen); |
| 1941 | DLLEXPORT bool DLLFUNCCALL IDMFC_DatabaseWriteB(IDMFC *instance, const char *label, int entry); |
| 1942 | DLLEXPORT void DLLFUNCCALL IDMFC_SendNetGameInfoSync(IDMFC *instance, int to_who = SP_ALL); |
| 1943 | DLLEXPORT bool DLLFUNCCALL IDMFC_CompareNetworkAddress(IDMFC *instance, network_address *one, |
| 1944 | network_address *two, bool use_port = true); |
| 1945 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsMasterTrackerGame(IDMFC *instance); |
| 1946 | DLLEXPORT int DLLFUNCCALL IDMFC_ConvertLocalToServerObjnum(IDMFC *instance, int objnum); |
| 1947 | DLLEXPORT int DLLFUNCCALL IDMFC_ConvertServerToLocalObjnum(IDMFC *instance, int objnum); |
| 1948 | DLLEXPORT bool DLLFUNCCALL IDMFC_ShouldIDisplayHUDName(IDMFC *instance, int pnum); |
| 1949 | DLLEXPORT void DLLFUNCCALL IDMFC_SetDeathMessageFilter(IDMFC *instance, int level); |
| 1950 | DLLEXPORT bool DLLFUNCCALL IDMFC_IAmDedicatedServer(IDMFC *instance); |
| 1951 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsPlayerDedicatedServerPnum(IDMFC *instance, int pnum); |
| 1952 | DLLEXPORT bool DLLFUNCCALL IDMFC_IsPlayerDedicatedServer(IDMFC *instance, player_record *pr); |
| 1953 | DLLEXPORT void DLLFUNCCALL IDMFC_DisplayInputCommandHelp(IDMFC *instance, const char *s); |
| 1954 | DLLEXPORT int DLLFUNCCALL IDMFC_GetPlayerTeam(IDMFC *instance, int pnum); |
| 1955 | DLLEXPORT bool DLLFUNCCALL IDMFC_SetTeamName(IDMFC *instance, int team, const char *name, bool announce); |
| 1956 | DLLEXPORT void DLLFUNCCALL IDMFC_ConvertHUDCoord(IDMFC *instance, int x, int y, int *rx, int *ry); |
| 1957 | DLLEXPORT int DLLFUNCCALL IDMFC_GetPlayerLogoBmp(IDMFC *instance, int player_num, bool *is_vclip); |
| 1958 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableShipLogos(IDMFC *instance, bool enable); |
| 1959 | DLLEXPORT bool DLLFUNCCALL IDMFC_AreLogosEnabled(IDMFC *instance); |
| 1960 | DLLEXPORT void DLLFUNCCALL IDMFC_EnableAudioTaunts(IDMFC *instance, bool enable); |
| 1961 | DLLEXPORT bool DLLFUNCCALL IDMFC_AreTauntsEnabled(IDMFC *instance); |
| 1962 | DLLEXPORT void DLLFUNCCALL IDMFC_RespawnPlayer(IDMFC *instance, int pnum, bool spew_energy_and_shield, |
| 1963 | bool spew_everything); |
| 1964 | DLLEXPORT void DLLFUNCCALL IDMFC_ReadInHostsAllowDeny(IDMFC *instance); |
| 1965 | DLLEXPORT void DLLFUNCCALL IDMFC_FreeHostsLists(IDMFC *instance); |
| 1966 | DLLEXPORT void DLLFUNCCALL IDMFC_RehashAllowDeny(IDMFC *instance); |
| 1967 | DLLEXPORT void DLLFUNCCALL IDMFC_AnnounceTeamChangeDeny(IDMFC *instance, int pnum); |
| 1968 | DLLEXPORT void DLLFUNCCALL IDMFC_SetMaxPlayerHardLimit(IDMFC *instance, int max); |
| 1969 | DLLEXPORT int DLLFUNCCALL IDMFC_WasPlayerInGameAtLevelEnd(IDMFC *instance, int prec); |
| 1970 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerPlayerKilled(IDMFC *instance, |
| 1971 | void (*callback)(object *killer_obj, int victim_pnum)); |
| 1972 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerPlayerExploded(IDMFC *instance, void (*callback)(int player_num)); |
| 1973 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerCollideA(IDMFC *instance, |
| 1974 | void (*callback)(object *me_obj, object *it_obj)); |
| 1975 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerCollideB(IDMFC *instance, |
| 1976 | void (*callback)(object *me_obj, object *it_obj, |
| 1977 | vector *point, vector *normal)); |
| 1978 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerPlayerChangeSegment(IDMFC *instance, |
| 1979 | void (*callback)(int player_num, int newseg, |
| 1980 | int oldseg)); |
| 1981 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerObjectChangeSegment(IDMFC *instance, |
| 1982 | void (*callback)(object *obj, int newseg, |
| 1983 | int oldseg)); |
| 1984 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerPlayerEntersGame(IDMFC *instance, void (*callback)(int player_num)); |
| 1985 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerPlayerDisconnect(IDMFC *instance, void (*callback)(int player_num)); |
| 1986 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerGameCreated(IDMFC *instance, void (*callback)(void)); |
| 1987 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerLevelChange(IDMFC *instance, void (*callback)(void)); |
| 1988 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerLevelStart(IDMFC *instance, void (*callback)(void)); |
| 1989 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerLevelEnd(IDMFC *instance, void (*callback)(void)); |
| 1990 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerObjectShieldsChanged(IDMFC *instance, |
| 1991 | void (*callback)(object *obj, float amount)); |
| 1992 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerIsAddressBanned(IDMFC *instance, |
| 1993 | bool (*callback)(network_address *addr, |
| 1994 | char *tracker_id)); |
| 1995 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerWallCollide(IDMFC *instance, |
| 1996 | void (*callback)(object *obj, float hitspeed, |
| 1997 | int hitseg, int hitwall, vector *hitpt, |
| 1998 | vector *wall_normal, float hit_dot)); |
| 1999 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerObjectKilled(IDMFC *instance, |
| 2000 | void (*callback)(object *obj, object *killer)); |
| 2001 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnServerObjectDestroyed(IDMFC *instance, void (*callback)(object *obj)); |
| 2002 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientPlayerKilled(IDMFC *instance, |
| 2003 | void (*callback)(object *killer_obj, int victim_pnum)); |
| 2004 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientPlayerExploded(IDMFC *instance, void (*callback)(int player_num)); |
| 2005 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientCollideA(IDMFC *instance, |
| 2006 | void (*callback)(object *me_obj, object *it_obj)); |
| 2007 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientCollideB(IDMFC *instance, |
| 2008 | void (*callback)(object *me_obj, object *it_obj, |
| 2009 | vector *point, vector *normal)); |
| 2010 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientPlayerChangeSegment(IDMFC *instance, |
| 2011 | void (*callback)(int player_num, int newseg, |
| 2012 | int oldseg)); |
| 2013 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientObjectChangeSegment(IDMFC *instance, |
| 2014 | void (*callback)(object *obj, int newseg, |
| 2015 | int oldseg)); |
| 2016 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientPlayerEntersGame(IDMFC *instance, void (*callback)(int player_num)); |
| 2017 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientPlayerDisconnect(IDMFC *instance, void (*callback)(int player_num)); |
| 2018 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnMeDisconnectFromServer(IDMFC *instance, void (*callback)(void)); |
| 2019 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientGameCreated(IDMFC *instance, void (*callback)(void)); |
| 2020 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientObjectShieldsChanged(IDMFC *instance, |
| 2021 | void (*callback)(object *obj, float amount)); |
| 2022 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnWeaponFired(IDMFC *instance, |
| 2023 | void (*callback)(object *weapon_obj, object *shooter)); |
| 2024 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientLevelChange(IDMFC *instance, void (*callback)(void)); |
| 2025 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientLevelStart(IDMFC *instance, void (*callback)(void)); |
| 2026 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientLevelEnd(IDMFC *instance, void (*callback)(void)); |
| 2027 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientWallCollide(IDMFC *instance, |
| 2028 | void (*callback)(object *obj, float hitspeed, |
| 2029 | int hitseg, int hitwall, vector *hitpt, |
| 2030 | vector *wall_normal, float hit_dot)); |
| 2031 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientObjectKilled(IDMFC *instance, |
| 2032 | void (*callback)(object *obj, object *killer)); |
| 2033 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientObjectDestroyed(IDMFC *instance, void (*callback)(object *obj)); |
| 2034 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPlayerEntersObserver(IDMFC *instance, |
| 2035 | void (*callback)(int pnum, object *piggy)); |
| 2036 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPlayerExitsObserver(IDMFC *instance, void (*callback)(int pnum)); |
| 2037 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnCanChangeTeam(IDMFC *instance, bool (*callback)(int pnum, int newteam)); |
| 2038 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnSpecialPacket(IDMFC *instance, void (*callback)(void)); |
| 2039 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnInterval(IDMFC *instance, void (*callback)(void)); |
| 2040 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnHUDInterval(IDMFC *instance, void (*callback)(void)); |
| 2041 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPLRInterval(IDMFC *instance, void (*callback)(void)); |
| 2042 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPLRInit(IDMFC *instance, void (*callback)(void)); |
| 2043 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnKeypress(IDMFC *instance, void (*callback)(int key)); |
| 2044 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnInputString(IDMFC *instance, void (*callback)(char *input_string)); |
| 2045 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPlayerChangeTeam(IDMFC *instance, |
| 2046 | void (*callback)(int player_num, int newteam, |
| 2047 | bool announce, bool spew_everything)); |
| 2048 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnGameStateRequest(IDMFC *instance, void (*callback)(int pnum)); |
| 2049 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnSaveStatsToFile(IDMFC *instance, void (*callback)(void)); |
| 2050 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPlayerReconnect(IDMFC *instance, void (*callback)(int player_num)); |
| 2051 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPlayerConnect(IDMFC *instance, void (*callback)(int player_num)); |
| 2052 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnControlMessage(IDMFC *instance, |
| 2053 | void (*callback)(uint8_t msg, int from_pnum)); |
| 2054 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnAllowObserverChange(IDMFC *instance, |
| 2055 | bool (*callback)(bool turnonobserver)); |
| 2056 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnClientShowUI(IDMFC *instance, void (*callback)(int id, void *user_data)); |
| 2057 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPrintScores(IDMFC *instance, void (*callback)(int level)); |
| 2058 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnDisconnectSaveStatsToFile(IDMFC *instance, void (*callback)(void)); |
| 2059 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnLevelEndSaveStatsToFile(IDMFC *instance, void (*callback)(void)); |
| 2060 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnGetHudCallSignColor(IDMFC *instance, |
| 2061 | ddgr_color (*callback)(int playernum)); |
| 2062 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnTeamChangeName(IDMFC *instance, |
| 2063 | void (*callback)(int team, char *oldname, char *newname)); |
| 2064 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnDoControls(IDMFC *instance, void (*callback)(game_controls *controls)); |
| 2065 | DLLEXPORT void DLLFUNCCALL IDMFC_Set_OnPlayAudioTaunt(IDMFC *instance, void (*callback)(int pnum)); |
| 2066 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerPlayerKilled(IDMFC *instance, object *killer_obj, int victim_pnum); |
| 2067 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerPlayerExploded(IDMFC *instance, int player_num); |
| 2068 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerCollideA(IDMFC *instance, object *me_obj, object *it_obj); |
| 2069 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerCollideB(IDMFC *instance, object *me_obj, object *it_obj, |
| 2070 | vector *point, vector *normal); |
| 2071 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerPlayerChangeSegment(IDMFC *instance, int player_num, int newseg, |
| 2072 | int oldseg); |
| 2073 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerObjectChangeSegment(IDMFC *instance, object *obj, int newseg, |
| 2074 | int oldseg); |
| 2075 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerPlayerEntersGame(IDMFC *instance, int player_num); |
| 2076 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerPlayerDisconnect(IDMFC *instance, int player_num); |
| 2077 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerGameCreated(IDMFC *instance); |
| 2078 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerLevelChange(IDMFC *instance); |
| 2079 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerLevelStart(IDMFC *instance); |
| 2080 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerLevelEnd(IDMFC *instance); |
| 2081 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerObjectShieldsChanged(IDMFC *instance, object *obj, float amount); |
| 2082 | DLLEXPORT bool DLLFUNCCALL IDMFC_CallOnServerIsAddressBanned(IDMFC *instance, network_address *addr, |
| 2083 | char *tracker_id); |
| 2084 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerWallCollide(IDMFC *instance, object *obj, float hitspeed, |
| 2085 | int hitseg, int hitwall, vector *hitpt, |
| 2086 | vector *wall_normal, float hit_dot); |
| 2087 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerObjectKilled(IDMFC *instance, object *obj, object *killer); |
| 2088 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnServerObjectDestroyed(IDMFC *instance, object *obj); |
| 2089 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientPlayerKilled(IDMFC *instance, object *killer_obj, int victim_pnum); |
| 2090 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientPlayerExploded(IDMFC *instance, int player_num); |
| 2091 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientCollideA(IDMFC *instance, object *me_obj, object *it_obj); |
| 2092 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientCollideB(IDMFC *instance, object *me_obj, object *it_obj, |
| 2093 | vector *point, vector *normal); |
| 2094 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientPlayerChangeSegment(IDMFC *instance, int player_num, int newseg, |
| 2095 | int oldseg); |
| 2096 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientObjectChangeSegment(IDMFC *instance, object *obj, int newseg, |
| 2097 | int oldseg); |
| 2098 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientPlayerEntersGame(IDMFC *instance, int player_num); |
| 2099 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientPlayerDisconnect(IDMFC *instance, int player_num); |
| 2100 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnMeDisconnectFromServer(IDMFC *instance); |
| 2101 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientGameCreated(IDMFC *instance); |
| 2102 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientObjectShieldsChanged(IDMFC *instance, object *obj, float amount); |
| 2103 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnWeaponFired(IDMFC *instance, object *weapon_obj, object *shooter); |
| 2104 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientLevelChange(IDMFC *instance); |
| 2105 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientLevelStart(IDMFC *instance); |
| 2106 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientLevelEnd(IDMFC *instance); |
| 2107 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientWallCollide(IDMFC *instance, object *obj, float hitspeed, |
| 2108 | int hitseg, int hitwall, vector *hitpt, |
| 2109 | vector *wall_normal, float hit_dot); |
| 2110 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientObjectKilled(IDMFC *instance, object *obj, object *killer); |
| 2111 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientObjectDestroyed(IDMFC *instance, object *obj); |
| 2112 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPlayerEntersObserver(IDMFC *instance, int pnum, object *piggy); |
| 2113 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPlayerExitsObserver(IDMFC *instance, int pnum); |
| 2114 | DLLEXPORT bool DLLFUNCCALL IDMFC_CallOnCanChangeTeam(IDMFC *instance, int pnum, int newteam); |
| 2115 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnSpecialPacket(IDMFC *instance); |
| 2116 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnInterval(IDMFC *instance); |
| 2117 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnHUDInterval(IDMFC *instance); |
| 2118 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPLRInterval(IDMFC *instance); |
| 2119 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPLRInit(IDMFC *instance); |
| 2120 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnKeypress(IDMFC *instance, int key); |
| 2121 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnInputString(IDMFC *instance, char *input_string); |
| 2122 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPlayerChangeTeam(IDMFC *instance, int player_num, int newteam, |
| 2123 | bool announce, bool spew_everything); |
| 2124 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnGameStateRequest(IDMFC *instance, int pnum); |
| 2125 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnSaveStatsToFile(IDMFC *instance); |
| 2126 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPlayerReconnect(IDMFC *instance, int player_num); |
| 2127 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPlayerConnect(IDMFC *instance, int player_num); |
| 2128 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnControlMessage(IDMFC *instance, uint8_t msg, int from_pnum); |
| 2129 | DLLEXPORT bool DLLFUNCCALL IDMFC_CallOnAllowObserverChange(IDMFC *instance, bool turnonobserver); |
| 2130 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnClientShowUI(IDMFC *instance, int id, void *user_data); |
| 2131 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPrintScores(IDMFC *instance, int level); |
| 2132 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnDisconnectSaveStatsToFile(IDMFC *instance); |
| 2133 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnLevelEndSaveStatsToFile(IDMFC *instance); |
| 2134 | DLLEXPORT ddgr_color DLLFUNCCALL IDMFC_CallOnGetHudCallSignColor(IDMFC *instance, int playernum); |
| 2135 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnTeamChangeName(IDMFC *instance, int team, char *oldname, char *newname); |
| 2136 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnDoControls(IDMFC *instance, game_controls *controls); |
| 2137 | DLLEXPORT void DLLFUNCCALL IDMFC_CallOnPlayAudioTaunt(IDMFC *instance, int pnum); |
| 2138 | DLLEXPORT dllinfo DLLFUNCCALLPTR IDMFC_GetDLLInfoCallData(IDMFC *instance); |
| 2139 | DLLEXPORT int DLLFUNCCALL IDMFC_GetHighestRoomIndex(IDMFC *instance); |
| 2140 | DLLEXPORT int DLLFUNCCALL IDMFC_GetGameWindowW(IDMFC *instance); |
| 2141 | DLLEXPORT int DLLFUNCCALL IDMFC_GetGameWindowH(IDMFC *instance); |
| 2142 | DLLEXPORT int DLLFUNCCALL IDMFC_GetGameWindowX(IDMFC *instance); |
| 2143 | DLLEXPORT int DLLFUNCCALL IDMFC_GetGameWindowY(IDMFC *instance); |
| 2144 | DLLEXPORT int DLLFUNCCALLPTR IDMFC_GetGameFontTranslateArray(IDMFC *instance); |
| 2145 | DLLEXPORT int DLLFUNCCALL IDMFC_GetObserverModeBitmap(IDMFC *instance); |
| 2146 | DLLEXPORT float DLLFUNCCALL IDMFC_GetFrametime(IDMFC *instance); |
| 2147 | DLLEXPORT float DLLFUNCCALL IDMFC_GetGametime(IDMFC *instance); |
| 2148 | DLLEXPORT float DLLFUNCCALL IDMFC_GetRealGametime(IDMFC *instance, bool *ispaused = NULL); |
| 2149 | DLLEXPORT float DLLFUNCCALLPTR IDMFC_GetShieldDeltaArray(IDMFC *instance); |
| 2150 | DLLEXPORT float DLLFUNCCALL IDMFC_GetHudAspectX(IDMFC *instance); |
| 2151 | DLLEXPORT float DLLFUNCCALL IDMFC_GetHudAspectY(IDMFC *instance); |
| 2152 | DLLEXPORT char DLLFUNCCALLPTR IDMFC_GetLocalD3Dir(IDMFC *instance); |
| 2153 | DLLEXPORT tMission DLLFUNCCALLPTR IDMFC_GetCurrentMission(IDMFC *instance); |
| 2154 | DLLEXPORT room DLLFUNCCALLPTR IDMFC_GetRooms(IDMFC *instance); |
| 2155 | DLLEXPORT object DLLFUNCCALLPTR IDMFC_GetObjects(IDMFC *instance); |
| 2156 | DLLEXPORT terrain_segment DLLFUNCCALLPTR IDMFC_GetTerrainSegs(IDMFC *instance); |
| 2157 | DLLEXPORT netgame_info DLLFUNCCALLPTR IDMFC_GetNetgameInfo(IDMFC *instance); |
| 2158 | DLLEXPORT player DLLFUNCCALLPTR IDMFC_GetPlayers(IDMFC *instance); |
| 2159 | DLLEXPORT netplayer DLLFUNCCALLPTR IDMFC_GetNetPlayers(IDMFC *instance); |
| 2160 | DLLEXPORT ship DLLFUNCCALLPTR IDMFC_GetShips(IDMFC *instance); |
| 2161 | DLLEXPORT weapon DLLFUNCCALLPTR IDMFC_GetWeapons(IDMFC *instance); |
| 2162 | DLLEXPORT texture DLLFUNCCALLPTR IDMFC_GetGameTextures(IDMFC *instance); |
| 2163 | DLLEXPORT poly_model DLLFUNCCALLPTR IDMFC_GetGamePolyModels(IDMFC *instance); |
| 2164 | DLLEXPORT vclip DLLFUNCCALLPTR IDMFC_GetGameVClips(IDMFC *instance); |
| 2165 | DLLEXPORT ddgr_color DLLFUNCCALLPTR IDMFC_GetPlayerColors(IDMFC *instance); |
| 2166 | DLLEXPORT game_controls DLLFUNCCALL IDMFC_GetLastGameControls(IDMFC *instance); |
| 2167 | DLLEXPORT int DLLFUNCCALLPTR IDMFC_GetPilotPicBitmapHandles(IDMFC *instance); |
| 2168 | DLLEXPORT void DLLFUNCCALL IDMFC_GetViewerObjectPtr(IDMFC *instance, object **v_obj); |
| 2169 | DLLEXPORT void DLLFUNCCALL IDMFC_SetViewerObjectPtr(IDMFC *instance, object *v_obj); |
| 2170 | DLLEXPORT float DLLFUNCCALL IDMFC_GetRenderZoom(IDMFC *instance); |
| 2171 | DLLEXPORT IMenuItem DLLFUNCCALLPTR IDMFC_GetOnScreenMenu(IDMFC *instance); |
| 2172 | DLLEXPORT tOSIRISModuleInit DLLFUNCCALLPTR IDMFC_GetOsirisModuleData(IDMFC *instance); |
| 2173 | DLLEXPORT vis_effect DLLFUNCCALLPTR IDMFC_GetVisEffectArray(IDMFC *instance, int **Highviseptr = NULL); |
| 2174 | DLLEXPORT level_info DLLFUNCCALLPTR IDMFC_GetLevelInfo(IDMFC *instance); |
| 2175 | DLLEXPORT void DLLFUNCCALL IDMFC_SelectNextCameraView(IDMFC *instance, int window); |
| 2176 | DLLEXPORT int DLLFUNCCALL IDMFC_GetCameraViewType(IDMFC *instance, int window); |
| 2177 | DLLEXPORT object_info DLLFUNCCALLPTR IDMFC_GetObjectInfo(IDMFC *instance, int objinfo_id); |
| 2178 | |
| 2179 | /******************************** |
| 2180 | IMenuItem 1.0 Interface functions |
| 2181 | *********************************/ |
| 2182 | DLLEXPORT void DLLFUNCCALL IMenuItem_Delete(IMenuItem *instance); |
| 2183 | DLLEXPORT void DLLFUNCCALLPTR IMenuItem_Dynamic_Cast(IMenuItem *instance, const char *pszType); |
| 2184 | DLLEXPORT void DLLFUNCCALL IMenuItem_DuplicatePointer(IMenuItem *instance); |
| 2185 | DLLEXPORT void DLLFUNCCALL IMenuItem_DestroyPointer(IMenuItem *instance); |
| 2186 | DLLEXPORT bool DLLFUNCCALL IMenuItem_AddSubMenu(IMenuItem *instance, IMenuItem *p); |
| 2187 | DLLEXPORT bool DLLFUNCCALL IMenuItem_DetachSubMenu(IMenuItem *instance, IMenuItem *p); |
| 2188 | DLLEXPORT bool DLLFUNCCALL IMenuItem_Forward(IMenuItem *instance); |
| 2189 | DLLEXPORT bool DLLFUNCCALL IMenuItem_Back(IMenuItem *instance); |
| 2190 | DLLEXPORT bool DLLFUNCCALL IMenuItem_Up(IMenuItem *instance); |
| 2191 | DLLEXPORT bool DLLFUNCCALL IMenuItem_Down(IMenuItem *instance); |
| 2192 | DLLEXPORT void DLLFUNCCALL IMenuItem_Execute(IMenuItem *instance); |
| 2193 | DLLEXPORT void DLLFUNCCALL IMenuItem_Draw(IMenuItem *instance, int x, int y, int height, int backgroundbmp, |
| 2194 | float *ratio = NULL); |
| 2195 | DLLEXPORT void DLLFUNCCALL IMenuItem_SetInputFocus(IMenuItem *instance); |
| 2196 | DLLEXPORT void DLLFUNCCALL IMenuItem_LoseInputFocus(IMenuItem *instance); |
| 2197 | DLLEXPORT bool DLLFUNCCALL IMenuItem_GetFocus(IMenuItem *instance); |
| 2198 | DLLEXPORT const char DLLFUNCCALLPTR IMenuItem_GetTitle(IMenuItem *instance); |
| 2199 | DLLEXPORT int DLLFUNCCALL IMenuItem_GetCustomSubMenuCount(IMenuItem *instance); |
| 2200 | DLLEXPORT void DLLFUNCCALL IMenuItem_CallFunc(IMenuItem *instance, int value); |
| 2201 | DLLEXPORT bool DLLFUNCCALL IMenuItem_HasSubMenus(IMenuItem *instance); |
| 2202 | DLLEXPORT char DLLFUNCCALL IMenuItem_GetType(IMenuItem *instance); |
| 2203 | DLLEXPORT void DLLFUNCCALL IMenuItem_SetState(IMenuItem *instance, int state); |
| 2204 | DLLEXPORT bool DLLFUNCCALL IMenuItem_SetStateItemList(IMenuItem *instance, int count, char **array); |
| 2205 | |
| 2206 | /******************************** |
| 2207 | IDmfcStats 1.0 Interface functions |
| 2208 | *********************************/ |
| 2209 | DLLEXPORT void DLLFUNCCALL IDmfcStats_Delete(IDmfcStats *instance); |
| 2210 | DLLEXPORT void DLLFUNCCALLPTR IDmfcStats_Dynamic_Cast(IDmfcStats *instance, const char *pszType); |
| 2211 | DLLEXPORT void DLLFUNCCALL IDmfcStats_DuplicatePointer(IDmfcStats *instance); |
| 2212 | DLLEXPORT void DLLFUNCCALL IDmfcStats_DestroyPointer(IDmfcStats *instance); |
| 2213 | DLLEXPORT bool DLLFUNCCALL IDmfcStats_Initialize(IDmfcStats *instance, tDmfcStatsInit *init_info); |
| 2214 | DLLEXPORT void DLLFUNCCALL IDmfcStats_Enable(IDmfcStats *instance, bool enable); |
| 2215 | DLLEXPORT bool DLLFUNCCALL IDmfcStats_IsEnabled(IDmfcStats *instance); |
| 2216 | DLLEXPORT void DLLFUNCCALL IDmfcStats_DoFrame(IDmfcStats *instance); |
| 2217 | DLLEXPORT void DLLFUNCCALL IDmfcStats_ScrollDown(IDmfcStats *instance); |
| 2218 | DLLEXPORT void DLLFUNCCALL IDmfcStats_ScrollUp(IDmfcStats *instance); |
| 2219 | DLLEXPORT bool DLLFUNCCALL IDmfcStats_CanScrollDown(IDmfcStats *instance); |
| 2220 | DLLEXPORT bool DLLFUNCCALL IDmfcStats_CanScrollUp(IDmfcStats *instance); |
| 2221 | #ifdef __cplusplus |
| 2222 | } |
| 2223 | #endif |
| 2224 | |
| 2225 | #endif |