1 /*
2 * Seven Kingdoms: Ancient Adversaries
3 *
4 * Copyright 1997,1998 Enlight Software Ltd.
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, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 // Filename : WALLTILE.H
22 // Description: constant for wall tiles
23 // Ownership : Gilbert
24
25
26 #ifndef __WALLTILE_H
27 #define __WALLTILE_H
28
29 // North gate, west tower
30 #define NGATE_WTOWER_NW 0x01
31 #define NGATE_WTOWER_NE 0x02
32 #define NGATE_WTOWER_SW 0x03
33 #define NGATE_WTOWER_SE 0x04
34
35 // North gate, east tower
36 #define NGATE_ETOWER_NW 0x05
37 #define NGATE_ETOWER_NE 0x06
38 #define NGATE_ETOWER_SW 0x07
39 #define NGATE_ETOWER_SE 0x08
40
41 // South gate, east tower
42 #define SGATE_WTOWER_NW 0x09
43 #define SGATE_WTOWER_NE 0x0a
44 #define SGATE_WTOWER_SW 0x0b
45 #define SGATE_WTOWER_SE 0x0c
46
47 // South gate, west tower
48 #define SGATE_ETOWER_NW 0x0d
49 #define SGATE_ETOWER_NE 0x0e
50 #define SGATE_ETOWER_SW 0x0f
51 #define SGATE_ETOWER_SE 0x10
52
53 // West gate, north tower
54 #define WGATE_NTOWER_NW 0x11
55 #define WGATE_NTOWER_NE 0x12
56 #define WGATE_NTOWER_SW 0x13
57 #define WGATE_NTOWER_SE 0x14
58
59 // West gate, south tower
60 #define WGATE_STOWER_NW 0x15
61 #define WGATE_STOWER_NE 0x16
62 #define WGATE_STOWER_SW 0x17
63 #define WGATE_STOWER_SE 0x18
64
65 // East gate, north tower
66 #define EGATE_NTOWER_NW 0x19
67 #define EGATE_NTOWER_NE 0x1a
68 #define EGATE_NTOWER_SW 0x1b
69 #define EGATE_NTOWER_SE 0x1c
70
71 // East gate, south tower
72 #define EGATE_STOWER_NW 0x1d
73 #define EGATE_STOWER_NE 0x1e
74 #define EGATE_STOWER_SW 0x1f
75 #define EGATE_STOWER_SE 0x20
76
77 // Guard tower
78 #define NWTOWER 0x21
79 #define NETOWER 0x22
80 #define SWTOWER 0x23
81 #define SETOWER 0x24
82 #define NTOWER 0x21
83 #define STOWER 0x23
84 #define WTOWER 0x23
85 #define ETOWER 0x24
86 #define SINGLE_TOWER 0x23
87
88 // Wall tiles
89 #define NSWALL 0x25
90 #define NSWALL_SHADOW 0x26
91 #define EWWALL 0x27
92 #define EWWALL_SHADOW 0x28
93
94 // constructing wall tiles
95 #define NSWALL_CON1 0x51
96 #define NSWALL_CON2 0x52
97 #define NSWALL_CON3 0x53
98 #define EWWALL_CON1 0x54
99 #define EWWALL_CON2 0x55
100 #define EWWALL_CON3 0x56
101 #define TOWER_CON1 0x57
102 #define TOWER_CON2 0x58
103 #define TOWER_CON3 0x59
104
105 // destructing wall tiles
106 #define NSWALL_DES1 0x5a
107 #define NSWALL_DES2 0x5b
108 #define NSWALL_DES3 0x5c
109 #define EWWALL_DES1 0x5d
110 #define EWWALL_DES2 0x5e
111 #define EWWALL_DES3 0x5f
112 #define TOWER_DES1 0x60
113 #define TOWER_DES2 0x61
114 #define TOWER_DES3 0x62
115
is_wall_rubble(int w)116 inline int is_wall_rubble(int w)
117 {
118 return (w >= 0x51 && w <= 0x62);
119 }
120
121 // Gate tiles
122
123 /*inline int is_gate(char wallId)
124 {
125 return wallId > 0x30;
126 }
127 */
128
129 // north gate 31-38
130 #define NGATE_BASE 0x31
131 #define NGATE_W 0x35
132 #define NGATE_E 0x38
133
134 // south gate 39-40
135 #define SGATE_BASE 0x39
136 #define SGATE_W 0x39
137 #define SGATE_E 0x3c
138
139 // west gate 41-48
140 #define WGATE_BASE 0x41
141 #define WGATE_N 0x42
142 #define WGATE_S 0x48
143
144 // east gate 49-50
145 #define EGATE_BASE 0x49
146 #define EGATE_N 0x49
147 #define EGATE_S 0x4f
148
149
150 #define GATE_LENGTH 8
151 #define GATE_WIDTH 2
152
153 #endif