1 /*
2  * XPilot NG, a multiplayer space war game.
3  *
4  * Copyright (C) 1991-2001 by
5  *
6  *      Bj�rn Stabell        <bjoern@xpilot.org>
7  *      Ken Ronny Schouten   <ken@xpilot.org>
8  *      Bert Gijsbers        <bert@xpilot.org>
9  *      Dick Balaska         <dick@xpilot.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25 
26 #ifndef RULES_H
27 #define RULES_H
28 
29 /*
30  * Bitfield definitions for playing mode.
31  */
32 #define CRASH_WITH_PLAYER	(1<<0)
33 #define BOUNCE_WITH_PLAYER	(1<<1)
34 #define PLAYER_KILLINGS		(1<<2)
35 #define LIMITED_LIVES		(1<<3)
36 #define TIMING			(1<<4)
37 #define PLAYER_SHIELDING	(1<<6)
38 #define LIMITED_VISIBILITY	(1<<7)
39 #define TEAM_PLAY		(1<<8)
40 #define WRAP_PLAY		(1<<9)
41 #define ALLOW_NUKES		(1<<10)
42 #define ALLOW_CLUSTERS		(1<<11)
43 #define ALLOW_MODIFIERS		(1<<12)
44 #define ALLOW_LASER_MODIFIERS	(1<<13)
45 #define ALLIANCES		(1<<14)
46 
47 /*
48  * Client uses only a subset of them:
49  */
50 #define CLIENT_RULES_MASK	(WRAP_PLAY|TEAM_PLAY|TIMING|LIMITED_LIVES|\
51 				 ALLIANCES)
52 /*
53  * Old player status bits, currently only used in network protocol.
54  * The bits that the client needs must fit into a byte,
55  * so the first 8 bitvalues are reserved for that purpose.
56  */
57 #define OLD_PLAYING		(1U<<0)		/* alive or killed */
58 #define OLD_PAUSE		(1U<<1) 	/* paused */
59 #define OLD_GAME_OVER		(1U<<2)		/* waiting or dead */
60 
61 typedef struct {
62     int		lives;
63     long	mode;
64 } rules_t;
65 
66 #endif
67