]> icculus.org git repositories - theoddone33/hhexen.git/blob - include/am_map.h
Fix stupid wadfile problem
[theoddone33/hhexen.git] / include / am_map.h
1
2 //**************************************************************************
3 //**
4 //** am_map.h : Heretic 2 : Raven Software, Corp.
5 //**
6 //** $RCSfile$
7 //** $Revision$
8 //** $Date$
9 //** $Author$
10 //**
11 //**************************************************************************
12
13 #ifndef __AMMAP_H__
14 #define __AMMAP_H__
15
16 #ifndef __linux
17 #pragma once
18 #endif
19
20 // For use if I do walls with outsides/insides
21 #define REDS            12*8
22 #define REDRANGE        1//16
23 #define BLUES           (256-4*16+8)
24 #define BLUERANGE       1//8
25 #define GREENS          (33*8)
26 #define GREENRANGE      1//16
27 #define GRAYS           (5*8)
28 #define GRAYSRANGE      1//16
29 #define BROWNS          (14*8)
30 #define BROWNRANGE      1//16
31 #define YELLOWS         10*8
32 #define YELLOWRANGE     1
33 #define BLACK           0
34 #define WHITE           4*8
35 #define PARCH           13*8-1
36 #define BLOODRED        177
37 #define BLUEKEY         157
38 #define YELLOWKEY       137
39 #define GREENKEY        198
40
41 // Automap colors
42
43 #define AM_PLR1_COLOR 157 // Blue
44 #define AM_PLR2_COLOR 177 // Red
45 #define AM_PLR3_COLOR 137 // Yellow
46 #define AM_PLR4_COLOR 198 // Green
47 #define AM_PLR5_COLOR 215 // Jade
48 #define AM_PLR6_COLOR 32  // White
49 #define AM_PLR7_COLOR 106 // Hazel
50 #define AM_PLR8_COLOR 234 // Purple
51
52 #define BACKGROUND      PARCH
53 #define YOURCOLORS      WHITE
54 #define YOURRANGE       0
55 #define WALLCOLORS      REDS
56 #define WALLRANGE       REDRANGE
57 #define TSWALLCOLORS    GRAYS
58 #define TSWALLRANGE     GRAYSRANGE
59 #define FDWALLCOLORS    BROWNS
60 #define FDWALLRANGE     BROWNRANGE
61 #define CDWALLCOLORS    YELLOWS
62 #define CDWALLRANGE     YELLOWRANGE
63 #define THINGCOLORS     GREENS
64 #define THINGRANGE      GREENRANGE
65 #define SECRETWALLCOLORS WALLCOLORS
66 #define SECRETWALLRANGE WALLRANGE
67 #define GRIDCOLORS      (GRAYS + GRAYSRANGE/2)
68 #define GRIDRANGE       0
69 #define XHAIRCOLORS     GRAYS
70
71 // drawing stuff
72 #define FB              0
73
74 #define KEY_TAB 9
75 #define AM_PANDOWNKEY   KEY_DOWNARROW
76 #define AM_PANUPKEY     KEY_UPARROW
77 #define AM_PANRIGHTKEY  KEY_RIGHTARROW
78 #define AM_PANLEFTKEY   KEY_LEFTARROW
79 //#define AM_PANDOWNKEY SC_DOWNARROW
80 //#define AM_PANUPKEY           SC_UPARROW
81 //#define AM_PANRIGHTKEY        SC_RIGHTARROW
82 //#define AM_PANLEFTKEY SC_LEFTARROW
83
84 #define AM_ZOOMINKEY    '='
85 //#define AM_ZOOMINKEY          13
86 //#define AM_ZOOMOUTKEY         12
87  #define AM_ZOOMOUTKEY  '-'
88 #define AM_STARTKEY     KEY_TAB
89 #define AM_ENDKEY       KEY_TAB
90 #define AM_GOBIGKEY     '0'
91 //#define AM_GOBIGKEY           11
92 //#define AM_FOLLOWKEY  33
93 //#define AM_GRIDKEY            34
94 #define AM_FOLLOWKEY    'f'
95 #define AM_GRIDKEY      'g'
96
97 #define AM_NUMMARKPOINTS 10
98
99 #define AM_MSGHEADER (('a'<<24)+('m'<<16))
100 #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
101 #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
102
103 #define INITSCALEMTOF (.2*FRACUNIT) // scale on entry
104 // how much the automap moves window per tic in frame-buffer coordinates
105 #define F_PANINC        4 // moves 140 pixels in 1 second
106 // how much zoom-in per tic
107 #define M_ZOOMIN        ((int) (1.02*FRACUNIT)) // goes to 2x in 1 second
108 // how much zoom-out per tic
109 #define M_ZOOMOUT       ((int) (FRACUNIT/1.02)) // pulls out to 0.5x in 1 second
110
111 // translates between frame-buffer and map distances
112 #define FTOM(x) FixedMul(((x)<<16),scale_ftom)
113 #define MTOF(x) (FixedMul((x),scale_mtof)>>16)
114 // translates between frame-buffer and map coordinates
115 #define CXMTOF(x)  (f_x + MTOF((x)-m_x))
116 #define CYMTOF(y)  (f_y + (f_h - MTOF((y)-m_y)))
117
118 // the following is crap
119 #define LINE_NEVERSEE ML_DONTDRAW
120
121 typedef struct
122 {
123   int x, y;
124 } fpoint_t;
125
126 typedef struct
127 {
128   fpoint_t a, b;
129 } fline_t;
130
131 typedef vertex_t mpoint_t;
132
133 typedef struct
134 {
135   mpoint_t a, b;
136 } mline_t;
137
138 typedef struct
139 {
140   fixed_t slp, islp;
141 } islope_t;
142
143 // extern int f_x, f_y, f_w, f_h;
144
145 #endif
146