1 //
2 // Copyright(C) 1993-1996 Id Software, Inc.
3 // Copyright(C) 1993-2008 Raven Software
4 // Copyright(C) 2005-2014 Simon Howard
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (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 
17 
18 #ifndef __AMMAP_H__
19 #define __AMMAP_H__
20 
21 // For use if I do walls with outsides/insides
22 #define REDS		12*8
23 #define REDRANGE	1       //16
24 #define BLUES		(256-4*16+8)
25 #define BLUERANGE	1       //8
26 #define GREENS		(33*8)
27 #define GREENRANGE	1       //16
28 #define GRAYS		(5*8)
29 #define GRAYSRANGE	1       //16
30 #define BROWNS		(14*8)
31 #define BROWNRANGE	1       //16
32 #define YELLOWS		10*8
33 #define YELLOWRANGE	1
34 #define BLACK		0
35 #define WHITE		4*8
36 #define PARCH		13*8-1
37 #define BLOODRED  	177
38 #define BLUEKEY 	157
39 #define YELLOWKEY 	137
40 #define GREENKEY  	198
41 
42 // Automap colors
43 
44 #define AM_PLR1_COLOR 157       // Blue
45 #define AM_PLR2_COLOR 177       // Red
46 #define AM_PLR3_COLOR 137       // Yellow
47 #define AM_PLR4_COLOR 198       // Green
48 #define AM_PLR5_COLOR 215       // Jade
49 #define AM_PLR6_COLOR 32        // White
50 #define AM_PLR7_COLOR 106       // Hazel
51 #define AM_PLR8_COLOR 234       // Purple
52 
53 #define BACKGROUND	PARCH
54 #define YOURCOLORS	WHITE
55 #define YOURRANGE	0
56 #define WALLCOLORS	REDS
57 #define WALLRANGE	REDRANGE
58 #define TSWALLCOLORS	GRAYS
59 #define TSWALLRANGE	GRAYSRANGE
60 #define FDWALLCOLORS	BROWNS
61 #define FDWALLRANGE	BROWNRANGE
62 #define CDWALLCOLORS	YELLOWS
63 #define CDWALLRANGE	YELLOWRANGE
64 #define THINGCOLORS	GREENS
65 #define THINGRANGE	GREENRANGE
66 #define SECRETWALLCOLORS WALLCOLORS
67 #define SECRETWALLRANGE WALLRANGE
68 #define GRIDCOLORS	(GRAYS + GRAYSRANGE/2)
69 #define GRIDRANGE	0
70 #define XHAIRCOLORS	GRAYS
71 
72 // drawing stuff
73 
74 #define AM_NUMMARKPOINTS 10
75 
76 #define AM_MSGHEADER (('a'<<24)+('m'<<16))
77 #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
78 #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
79 
80 #define INITSCALEMTOF (.2*FRACUNIT)     // scale on entry
81 // how much the automap moves window per tic in frame-buffer coordinates
82 #define F_PANINC	4       // moves 140 pixels in 1 second
83 // how much zoom-in per tic
84 #define M_ZOOMIN        ((int) (1.02*FRACUNIT)) // goes to 2x in 1 second
85 // how much zoom-out per tic
86 #define M_ZOOMOUT       ((int) (FRACUNIT/1.02)) // pulls out to 0.5x in 1 second
87 
88 // translates between frame-buffer and map distances
89 #define FTOM(x) FixedMul(((x)<<16),scale_ftom)
90 #define MTOF(x) (FixedMul((x),scale_mtof)>>16)
91 // translates between frame-buffer and map coordinates
92 #define CXMTOF(x)  (f_x + MTOF((x)-m_x))
93 #define CYMTOF(y)  (f_y + (f_h - MTOF((y)-m_y)))
94 
95 // the following is crap
96 #define LINE_NEVERSEE ML_DONTDRAW
97 
98 typedef struct
99 {
100     int x, y;
101 } fpoint_t;
102 
103 typedef struct
104 {
105     fpoint_t a, b;
106 } fline_t;
107 
108 typedef vertex_t mpoint_t;
109 
110 typedef struct
111 {
112     mpoint_t a, b;
113 } mline_t;
114 
115 typedef struct
116 {
117     fixed_t slp, islp;
118 } islope_t;
119 
120 // extern int f_x, f_y, f_w, f_h;
121 
122 #endif
123