aboutsummaryrefslogtreecommitdiff
path: root/src/parsec/include/net_game_peer.h
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
committerFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
commitc068f22329d5cc722622a2183bbb22eef2093df7 (patch)
tree12d56c1aede67988a55e241364606bfbb4dba933 /src/parsec/include/net_game_peer.h
downloadopenparsec-main.tar.xz
openparsec-main.zip
initial importHEADmain
Diffstat (limited to 'src/parsec/include/net_game_peer.h')
-rw-r--r--src/parsec/include/net_game_peer.h60
1 files changed, 60 insertions, 0 deletions
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_
+
+