/
am_map.h
340 lines (280 loc) · 9.1 KB
/
am_map.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id$
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
// published by id Software. All rights reserved.
//
// The source is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
// for more details.
//
// DESCRIPTION:
// AutoMap module.
//
// Based on code by ID and Raven, modified by Skyjake
//
// 08/01/2005 DJS - First pass. Combined all game/am_map src files. Lots of hacky compiler directives...
//-----------------------------------------------------------------------------
#ifndef __AMMAP_H__
#define __AMMAP_H__
// DJS - Common\f_infine.c is calling here when compiling jHexen looking for this...
#ifdef __JHEXEN__
# include "jhexen.h"
#elif __JSTRIFE__
#include "p_local.h"
#endif
#ifndef __JDOOM__
extern boolean automapactive; // Common\f_infine.c is looking for this if not jDoom... ??
// DJS - defined in Include\jDoom\Mn_def.h in all games but jDoom
#define LINEHEIGHT_A 10
#endif
// Caleld by Menu
void M_DrawMAP(void);
// Called by Init
void AM_Register(void);
// Called by main loop.
void AM_Ticker(void);
// called instead of view drawer if automap active.
void AM_Drawer(void);
// Called to force the automap to quit
// if the level is completed while it is up.
void AM_Stop(void);
// Used by ST StatusBar stuff.
#define AM_MSGHEADER (('a'<<24)+('m'<<16))
#define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
#define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
// Keys
#define AM_STARTKEY DDKEY_TAB
#define AM_ENDKEY DDKEY_TAB
#define AM_NUMMARKPOINTS 10
// the following is crap
#define LINE_NEVERSEE ML_DONTDRAW
// Counter Cheat flags.
#define CCH_KILLS 0x1
#define CCH_ITEMS 0x2
#define CCH_SECRET 0x4
#define CCH_KILLS_PRCNT 0x8
#define CCH_ITEMS_PRCNT 0x10
#define CCH_SECRET_PRCNT 0x20
#ifdef __JDOOM__
// For use if I do walls with outsides/insides
#define BLUES (256-4*16+8)
#define YELLOWRANGE 1
#define BLACK 0
#define REDS (256-5*16)
#define REDRANGE 16
#define BLUERANGE 8
#define GREENS (7*16)
#define GREENRANGE 16
#define GRAYS (6*16)
#define GRAYSRANGE 16
#define BROWNS (4*16)
#define BROWNRANGE 16
#define YELLOWS (256-32+7)
#define WHITE (256-47)
#define YOURCOLORS WHITE
#define YOURRANGE 0
#define WALLRANGE REDRANGE
#define TSWALLCOLORS GRAYS
#define TSWALLRANGE GRAYSRANGE
#define FDWALLRANGE BROWNRANGE
#define CDWALLRANGE YELLOWRANGE
#define THINGCOLORS GREENS
#define THINGRANGE GREENRANGE
#define SECRETWALLCOLORS WALLCOLORS
#define SECRETWALLRANGE WALLRANGE
#define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
#define GRIDRANGE 0
#define XHAIRCOLORS GRAYS
#define WALLCOLORS REDS
#define FDWALLCOLORS BROWNS
#define CDWALLCOLORS YELLOWS
#define BORDEROFFSET 3
// Automap colors
#define BACKGROUND BLACK
// Keys for Baby Mode
#define KEY1 197 // Blue Key
#define KEY2 (256-5*16) // Red Key
#define KEY3 (256-32+7) // Yellow Key
#define KEY4 (256-32+7) // Yellow Skull
#define KEY5 (256-5*16) // Red Skull
#define KEY6 197 // Blue Skull
#define NUMBEROFKEYS 6
#define BORDERGRAPHIC "brdr_b"
#define MARKERPATCHES (sprintf(namebuf, "AMMNUM%d", i)) // DJS - Patches used for marking the automap, a bit of a hack I suppose
#endif
#ifdef __JHERETIC__
// For use if I do walls with outsides/insides
#define REDS 12*8
#define REDRANGE 1 //16
#define BLUES (256-4*16+8)
#define BLUERANGE 1 //8
#define GREENS (33*8)
#define GREENRANGE 1 //16
#define GRAYS (5*8)
#define GRAYSRANGE 1 //16
#define BROWNS (14*8)
#define BROWNRANGE 1 //16
#define YELLOWS 10*8
#define YELLOWRANGE 1
#define BLACK 0
#define WHITE 4*8
#define PARCH 13*8-1
#define WALLCOLORS REDS
#define FDWALLCOLORS BROWNS
#define CDWALLCOLORS YELLOWS
#define YOURCOLORS WHITE
#define YOURRANGE 0
#define WALLRANGE REDRANGE
#define TSWALLCOLORS GRAYS
#define TSWALLRANGE GRAYSRANGE
#define FDWALLRANGE BROWNRANGE
#define CDWALLRANGE YELLOWRANGE
#define THINGCOLORS GREENS
#define THINGRANGE GREENRANGE
#define SECRETWALLCOLORS WALLCOLORS
#define SECRETWALLRANGE WALLRANGE
#define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
#define GRIDRANGE 0
#define XHAIRCOLORS GRAYS
#define BLOODRED 150
// Automap colors
#define BACKGROUND PARCH
#define YOURCOLORS WHITE
#define YOURRANGE 0
#define WALLRANGE REDRANGE
#define TSWALLCOLORS GRAYS
#define TSWALLRANGE GRAYSRANGE
#define FDWALLRANGE BROWNRANGE
#define CDWALLRANGE YELLOWRANGE
#define THINGCOLORS GREENS
#define THINGRANGE GREENRANGE
#define SECRETWALLCOLORS WALLCOLORS
#define SECRETWALLRANGE WALLRANGE
#define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
#define GRIDRANGE 0
#define XHAIRCOLORS GRAYS
#define BORDEROFFSET 4
// Keys for Baby Mode
#define KEY1 144 // HERETIC - Green Key
#define KEY2 197 // HERETIC - Yellow Key
#define KEY3 220 // HERETIC - Blue Key
#define NUMBEROFKEYS 3
#define BORDERGRAPHIC "bordb"
#define MARKERPATCHES (sprintf(namebuf, "FONTA%d", (16 +i) )) // DJS - Patches used for marking the automap, a bit of a hack I suppose
#endif
#ifdef __JHEXEN__
// For use if I do walls with outsides/insides
#define REDS 12*8
#define REDRANGE 1 //16
#define BLUES (256-4*16+8)
#define BLUERANGE 1 //8
#define GREENS (33*8)
#define GREENRANGE 1 //16
#define GRAYS (5*8)
#define GRAYSRANGE 1 //16
#define BROWNS (14*8)
#define BROWNRANGE 1 //16
#define YELLOWS 10*8
#define YELLOWRANGE 1
#define BLACK 0
#define WHITE 4*8
#define PARCH 13*8-1
#define BLOODRED 177
// Automap colors
#define BACKGROUND PARCH
#define YOURCOLORS WHITE
#define YOURRANGE 0
#define WALLCOLORS 83 // REDS
#define WALLRANGE REDRANGE
#define TSWALLCOLORS GRAYS
#define TSWALLRANGE GRAYSRANGE
#define FDWALLCOLORS 96 // BROWNS
#define FDWALLRANGE BROWNRANGE
#define CDWALLCOLORS 107 // YELLOWS
#define CDWALLRANGE YELLOWRANGE
#define THINGCOLORS GREENS
#define THINGRANGE GREENRANGE
#define SECRETWALLCOLORS WALLCOLORS
#define SECRETWALLRANGE WALLRANGE
#define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
#define GRIDRANGE 0
#define XHAIRCOLORS GRAYS
#define BORDEROFFSET 4
// Automap colors
#define AM_PLR1_COLOR 157 // Blue
#define AM_PLR2_COLOR 177 // Red
#define AM_PLR3_COLOR 137 // Yellow
#define AM_PLR4_COLOR 198 // Green
#define AM_PLR5_COLOR 215 // Jade
#define AM_PLR6_COLOR 32 // White
#define AM_PLR7_COLOR 106 // Hazel
#define AM_PLR8_COLOR 234 // Purple
#define KEY1 197 // HEXEN -
#define KEY2 144 // HEXEN -
#define KEY3 220 // HEXEN -
#define NUMBEROFKEYS 3
#define BORDERGRAPHIC "bordb"
#define MARKERPATCHES (sprintf(namebuf, "FONTA%d", (16 +i) )) // DJS - Patches used for marking the automap, a bit of a hack I suppose
#endif
#ifdef __JSTRIFE__
// For use if I do walls with outsides/insides
#define REDS 12*8
#define REDRANGE 1 //16
#define BLUES (256-4*16+8)
#define BLUERANGE 1 //8
#define GREENS (33*8)
#define GREENRANGE 1 //16
#define GRAYS (5*8)
#define GRAYSRANGE 1 //16
#define BROWNS (14*8)
#define BROWNRANGE 1 //16
#define YELLOWS 10*8
#define YELLOWRANGE 1
#define BLACK 0
#define WHITE 4*8
#define PARCH 13*8-1
#define BLOODRED 177
// Automap colors
#define BACKGROUND PARCH
#define YOURCOLORS WHITE
#define YOURRANGE 0
#define WALLCOLORS 83 // REDS
#define WALLRANGE REDRANGE
#define TSWALLCOLORS GRAYS
#define TSWALLRANGE GRAYSRANGE
#define FDWALLCOLORS 96 // BROWNS
#define FDWALLRANGE BROWNRANGE
#define CDWALLCOLORS 107 // YELLOWS
#define CDWALLRANGE YELLOWRANGE
#define THINGCOLORS GREENS
#define THINGRANGE GREENRANGE
#define SECRETWALLCOLORS WALLCOLORS
#define SECRETWALLRANGE WALLRANGE
#define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
#define GRIDRANGE 0
#define XHAIRCOLORS GRAYS
#define BORDEROFFSET 4
// Automap colors
#define AM_PLR1_COLOR 157 // Blue
#define AM_PLR2_COLOR 177 // Red
#define AM_PLR3_COLOR 137 // Yellow
#define AM_PLR4_COLOR 198 // Green
#define AM_PLR5_COLOR 215 // Jade
#define AM_PLR6_COLOR 32 // White
#define AM_PLR7_COLOR 106 // Hazel
#define AM_PLR8_COLOR 234 // Purple
#define KEY1 197 // HEXEN -
#define KEY2 144 // HEXEN -
#define KEY3 220 // HEXEN -
#define NUMBEROFKEYS 3
#define BORDERGRAPHIC "bordb"
#define MARKERPATCHES (sprintf(namebuf, "FONTA%d", (16 +i) )) // DJS - Patches used for marking the automap, a bit of a hack I suppose
#endif
#endif