# Correct the needed linklibs in curl-config also.
[AROS-Contrib.git] / Games / Doom / d_net.h
blob6f4aae92ae7f5fa94cd098016a4af6b2785733ef
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
15 // for more details.
17 // DESCRIPTION:
18 // Networking stuff.
20 //-----------------------------------------------------------------------------
23 #ifndef __D_NET__
24 #define __D_NET__
26 #include "d_player.h"
29 #ifdef __GNUG__
30 #pragma interface
31 #endif
35 // Network play related stuff.
36 // There is a data struct that stores network
37 // communication related stuff, and another
38 // one that defines the actual packets to
39 // be transmitted.
42 #define DOOMCOM_ID 0x12345678l
44 // Max computers/players in a game.
45 #define MAXNETNODES 8
48 // Networking and tick handling related.
49 #define BACKUPTICS 12
51 typedef enum
53 CMD_SEND = 1,
54 CMD_GET = 2
56 } command_t;
58 #ifdef __GNUC__
59 #define PACKED __attribute__((packed))
60 #else
61 #pragma options align=mac68k
62 #define PACKED
63 #endif
66 // Network packet data.
68 typedef struct
70 // High bit is retransmit request.
71 unsigned checksum;
72 // Only valid if NCMD_RETRANSMIT.
73 byte retransmitfrom;
75 byte starttic;
76 byte player;
77 byte numtics;
78 ticcmd_t cmds[BACKUPTICS];
80 } PACKED doomdata_t;
85 typedef struct
87 // Supposed to be DOOMCOM_ID?
88 long id;
90 // DOOM executes an int to execute commands.
91 short intnum;
92 // Communication between DOOM and the driver.
93 // Is CMD_SEND or CMD_GET.
94 short command;
95 // Is dest for send, set by get (-1 = no packet).
96 short remotenode;
98 // Number of bytes in doomdata to be sent
99 short datalength;
101 // Info common to all nodes.
102 // Console is allways node 0.
103 short numnodes;
104 // Flag: 1 = no duplication, 2-5 = dup for slow nets.
105 short ticdup;
106 // Flag: 1 = send a backup tic in every packet.
107 short extratics;
108 // Flag: 1 = deathmatch.
109 short deathmatch;
110 // Flag: -1 = new game, 0-5 = load savegame
111 short savegame;
112 short episode; // 1-3
113 short map; // 1-9
114 short skill; // 1-5
116 // Info specific to this node.
117 short consoleplayer;
118 short numplayers;
120 // These are related to the 3-display mode,
121 // in which two drones looking left and right
122 // were used to render two additional views
123 // on two additional computers.
124 // Probably not operational anymore.
125 // 1 = left, 0 = center, -1 = right
126 short angleoffset;
127 // 1 = drone
128 short drone;
130 // The packet data to be sent.
131 doomdata_t data;
133 } doomcom_t;
135 #ifndef __GNUC__
136 #pragma options align=power
137 #endif
140 // Create any new ticcmds and broadcast to other players.
141 void NetUpdate (void);
143 // Broadcasts special packets to other players
144 // to notify of game exit
145 void D_QuitNetGame (void);
147 //? how many ticks to run?
148 void TryRunTics (void);
151 #endif
153 //-----------------------------------------------------------------------------
155 // $Log$
156 // Revision 1.1 2000/02/29 18:21:05 stegerg
157 // Doom port based on ADoomPPC. Read README.AROS!
160 //-----------------------------------------------------------------------------