From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- src/parsec/include/net_game_peer.h | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/parsec/include/net_game_peer.h (limited to 'src/parsec/include/net_game_peer.h') diff --git a/src/parsec/include/net_game_peer.h b/src/parsec/include/net_game_peer.h new file mode 100644 index 0000000..c17c9d1 --- /dev/null +++ b/src/parsec/include/net_game_peer.h @@ -0,0 +1,60 @@ +/* + * PARSEC HEADER: net_game_peer.h + */ + +#ifndef _NET_GAME_PEER_H_ +#define _NET_GAME_PEER_H_ + + +// net_game_peer.c implements the following functions +// -------------------------------------------------- +// size_t NETs_RmEvList_GetMaxSize(); +// void NETs_UpdateKillStats( RE_KillStats* killstats ); + + +// external functions --------------------------------------------------------- +// + + +// declare prototypes when we do not compile for shared lib gamecode support -- +// +int NET_AcquireRemoteSlot ( node_t *node ); +int NET_AddSlotRequest ( node_t *node, char *name, int timetag ); +int NET_DelSlotRequest ( node_t *node ); +int NET_MergeSlotRequests ( NetPacket_PEER* gamepacket, int timetag ); +void NET_ResetSlotReqQueue (); +void NET_RmEvSinglePlayerTable ( NetPacket_PEER* gamepacket ); +void NET_RmEvSingleConnectQueue ( NetPacket_PEER* gamepacket ); +void NET_SetPacketKillStats ( NetPacket_PEER* gamepacket ); +void NET_Translate_PKTP_JOIN ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus ); +void NET_Translate_PKTP_GAME_STATE ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus, RE_KillStats* pKillStats ); +void NET_Translate_PKTP_UNJOIN ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus, RE_KillStats* pKillStats ); +void NET_Translate_PKTP_NODE_ALIVE ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus, RE_KillStats* pKillStats ); + + +// special slotrequest timetags ----------------------------------------------- +// +#define TIMETAG_LOCALHOST -1 +#define TIMETAG_REPLYNOW -2 + + +// slot request structure (entry in slot request queue) ----------------------- +// +struct slotrequest_s { + + int slotid; + int timetag; + node_t node; + char name[ MAX_PLAYER_NAME + 1 ]; +}; + + +// external variables --------------------------------------------------------- +// +extern int NumSlotRequests; +extern slotrequest_s SlotReqQueue[]; + + +#endif // _NET_PEER_H_ + + -- cgit v1.2.3