]> git.pond.sub.org Git - empserver/blob - include/treaty.h
COPYING duplicates information from README. Remove. Move GPL from
[empserver] / include / treaty.h
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2006, 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 files README, COPYING and CREDITS in the root of the source
23  *  tree for related information and legal notices.  It is expected
24  *  that future 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     short ef_type;
40     natid trt_cna;              /* proposer */
41     short trt_uid;
42     natid trt_cnb;              /* acceptor */
43     s_char trt_status;          /* treaty status */
44     s_char trt_fill;
45     short trt_acond;            /* conditions for proposer */
46     short trt_bcond;            /* conditions for accepter */
47     float trt_bond;             /* amount of bond involved (unused) */
48     time_t trt_exp;             /* expiration date */
49 };
50
51 #define TS_FREE         AGREE_FREE
52 #define TS_PROPOSED     AGREE_PROPOSED
53 #define TS_SIGNED       AGREE_SIGNED
54
55         /* treaty clauses */
56 #define LNDATT  bit(0)          /* no attacks on land units */
57 #define SEAATT  bit(1)          /* no attacks on ships */
58 #define SEAFIR  bit(2)          /* no shelling ships */
59 #define LANATT  bit(3)          /* no attacks on sectors */
60 #define LANFIR  bit(4)          /* no shelling sectors */
61 #define NEWSHP  bit(5)          /* no new ships */
62 #define NEWNUK  bit(6)          /* no new nuclear weapons */
63 #define NEWPLN  bit(7)          /* no new planes */
64 #define NEWLND  bit(8)          /* no new land units */
65 #define TRTENL  bit(9)          /* no enlistment */
66 #define SUBFIR  bit(10)         /* no depth-charging submarines */
67
68 #define gettre(n, p) \
69         ef_read(EF_TREATY, n, p)
70 #define puttre(n, p) \
71         ef_write(EF_TREATY, n, p)
72 #define gettrep(n) \
73         (struct trtstr *) ef_ptr(EF_TREATY, n)
74
75 #endif