]> git.pond.sub.org Git - empserver/blob - include/treaty.h
Update copyright notice.
[empserver] / include / treaty.h
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                           Ken Stevens, Steve McClure
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  *  ---
21  *
22  *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23  *  related information and legal notices. It is expected that any future
24  *  projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  treaty.h: Definitions for treaties
29  * 
30  *  Known contributors to this file:
31  *      Steve McClure, 1998
32  *     
33  */
34
35 #ifndef _TREATY_H_
36 #define _TREATY_H_
37
38 struct trtstr {
39     natid trt_cna;              /* proposer */
40     natid trt_cnb;              /* acceptor */
41     s_char trt_status;          /* treaty status */
42     s_char trt_fill;
43     short trt_acond;            /* conditions for proposer */
44     short trt_bcond;            /* conditions for accepter */
45     float trt_bond;             /* amount of bond involved (unused) */
46     time_t trt_exp;             /* expiration date */
47 };
48
49 struct tchrstr {
50     int t_cond;                 /* bit to indicate this clause */
51     s_char *t_name;             /* description of clause */
52 };
53
54 #define TS_FREE         0
55 #define TS_PROPOSED     1
56 #define TS_SIGNED       2
57
58         /* treaty clauses */
59 #define LNDATT  bit(0)          /* no attacks on land units */
60 #define SEAATT  bit(1)          /* no attacks on ships */
61 #define SEAFIR  bit(2)          /* no shelling ships */
62 #define LANATT  bit(3)          /* no attacks on sectors */
63 #define LANFIR  bit(4)          /* no shelling sectors */
64 #define NEWSHP  bit(5)          /* no new ships */
65 #define NEWNUK  bit(6)          /* no new nuclear weapons */
66 #define NEWPLN  bit(7)          /* no new planes */
67 #define NEWLND  bit(8)          /* no new land units */
68 #define TRTENL  bit(9)          /* no enlistment */
69 #define SUBFIR  bit(10)         /* no depth-charging submarines */
70
71 /* global treaty variables */
72
73 #define gettre(n, p) \
74         ef_read(EF_TREATY, n, p)
75 #define puttre(n, p) \
76         ef_write(EF_TREATY, n, p)
77 #define gettrep(n) \
78         (struct trtstr *) ef_ptr(EF_TREATY, n)
79
80 extern struct tchrstr tchr[];
81
82 #endif /* _TREATY_H_ */