Subversion Repositories Games.Carmageddon

Rev

Rev 18 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #ifndef _PD_NET_H_
  2. #define _PD_NET_H_
  3.  
  4. // Jeff:
  5. // Header files are generated from information in the original symbol dump, but we don't exactly know what this used to look like or be called.
  6. // Each platform build included a platform-dependant `sys` and `net` files. From the symbol dump and debug/error messages in the binaries,
  7. // we know of at least `pc-dos/dossys.c`, `pc-dos/dosnet.c`, `Win95sys.c`.
  8. // Functions contained within these files are prefixed with `PD` - we assume that is short for something like `Platform Dependant`.
  9.  
  10. #include "brender/br_types.h"
  11. #include "dr_types.h"
  12.  
  13. void ClearupPDNetworkStuff(void);
  14.  
  15. void MATTMessageCheck(char* pFunction_name, tNet_message* pMessage, int pAlleged_size);
  16.  
  17. int GetMessageTypeFromMessage(char* pMessage_str);
  18.  
  19. void MakeMessageToSend(int pMessage_type);
  20.  
  21. int ReceiveHostResponses(void);
  22.  
  23. int BroadcastMessage(void);
  24.  
  25. int PDNetInitialise(void);
  26.  
  27. int PDNetShutdown(void);
  28.  
  29. void PDNetStartProducingJoinList(void);
  30.  
  31. void PDNetEndJoinList(void);
  32.  
  33. int PDNetGetNextJoinGame(tNet_game_details* pGame, int pIndex);
  34.  
  35. void PDNetDisposeGameDetails(tNet_game_details* pDetails);
  36.  
  37. int PDNetHostGame(tNet_game_details* pDetails, char* pHost_name, void** pHost_address);
  38.  
  39. int PDNetJoinGame(tNet_game_details* pDetails, char* pPlayer_name);
  40.  
  41. void PDNetLeaveGame(tNet_game_details* pDetails);
  42.  
  43. void PDNetHostFinishGame(tNet_game_details* pDetails);
  44.  
  45. tU32 PDNetExtractGameID(tNet_game_details* pDetails);
  46.  
  47. tPlayer_ID PDNetExtractPlayerID(tNet_game_details* pDetails);
  48.  
  49. void PDNetObtainSystemUserName(char* pName, int pMax_length);
  50.  
  51. int PDNetSendMessageToPlayer(tNet_game_details* pDetails, tNet_message* pMessage, tPlayer_ID pPlayer);
  52.  
  53. int PDNetSendMessageToAllPlayers(tNet_game_details* pDetails, tNet_message* pMessage);
  54.  
  55. tNet_message* PDNetGetNextMessage(tNet_game_details* pDetails, void** pSender_address);
  56.  
  57. tNet_message* PDNetAllocateMessage(tU32 pSize, tS32 pSize_decider);
  58.  
  59. void PDNetDisposeMessage(tNet_game_details* pDetails, tNet_message* pMessage);
  60.  
  61. void PDNetSetPlayerSystemInfo(tNet_game_player_info* pPlayer, void* pSender_address);
  62.  
  63. void PDNetDisposePlayer(tNet_game_player_info* pPlayer);
  64.  
  65. int PDNetSendMessageToAddress(tNet_game_details* pDetails, tNet_message* pMessage, void* pAddress);
  66.  
  67. int PDNetInitClient(tNet_game_details* pDetails);
  68.  
  69. int PDNetGetHeaderSize(void);
  70.  
  71. #endif
  72.