Debian Codegraph @

prboom2/src/am_map.h

raw
1 /* Emacs style mode select -*- C -*-
2 *-----------------------------------------------------------------------------
3 *
4 *
5 * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2000 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 * Copyright 2005, 2006 by
12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 * 02111-1307, USA.
28 *
29 * DESCRIPTION:
30 * AutoMap module.
31 *
32 *-----------------------------------------------------------------------------*/
33
34 #ifndef __AMMAP_H__
35 #define __AMMAP_H__
36
37 #ifdef HAVE_CONFIG_H
38 #include "config.h"
39 #endif
40
41 #include "d_event.h"
42 #include "m_fixed.h"
43 #include "m_misc.h"
44
45 typedef struct
46 {
47 int back;
48 int grid;
49 int wall;
50 int fchg;
51 int cchg;
52 int clsd;
53 int rkey;
54 int bkey;
55 int ykey;
56 int rdor;
57 int bdor;
58 int ydor;
59 int tele;
60 int secr;
61 int revsecr;
62 int tagfinder;
63 int exit;
64 int exitsecr;
65 int unsn;
66 int flat;
67 int sprt;
68 int item;
69 int frnd;
70 int enemy;
71 int hair;
72 int sngl;
73 int me;
74 int plyr[8];
75 int trail_1;
76 int trail_2;
77 int pickup;
78 } mapcolor_t;
79
80 typedef struct map_point_s
81 {
82 float x, y;
83 unsigned char r, g, b, a;
84 } PACKEDATTR map_point_t;
85
86 typedef struct map_line_s
87 {
88 map_point_t point[2];
89 } PACKEDATTR map_line_t;
90
91 extern array_t map_lines;
92
93 #define MAPBITS 12
94 #define FRACTOMAPBITS (FRACBITS-MAPBITS)
95
96 // Called by main loop.
97 dboolean AM_Responder (event_t* ev);
98
99 // Called by main loop.
100 void AM_Ticker (void);
101
102 // Called by main loop,
103 // called instead of view drawer if automap active.
104 void AM_Drawer (dboolean minimap);
105
106 // Called to force the automap to quit
107 // if the level is completed while it is up.
108 void AM_Stop (dboolean minimap);
109
110 // killough 2/22/98: for saving automap information in savegame:
111
112 void AM_Start(dboolean full_automap);
113
114 //jff 4/16/98 make externally available
115
116 void AM_clearMarks(void);
117
118 void AM_setMarkParams(int num);
119
120 void AM_SetResolution(void);
121
122 typedef struct
123 {
124 fixed_t x,y;
125 float fx,fy;
126 } mpoint_t;
127
128 typedef struct
129 {
130 fixed_t x, y;
131 fixed_t w, h;
132
133 char label[16];
134 int widths[16];
135 } markpoint_t;
136
137 extern markpoint_t *markpoints;
138 extern int markpointnum, markpointnum_max;
139
140 // end changes -- killough 2/22/98
141
142 extern mapcolor_t mapcolor;
143
144 void M_ChangeMapTextured(void);
145 void M_ChangeMapMultisamling(void);
146 void AM_ResetIDDTcheat(void);
147 void AM_SetMapCenter(fixed_t x, fixed_t y);
148
149 typedef struct am_frame_s
150 {
151 fixed_t centerx, centery;
152 fixed_t sin, cos;
153
154 float centerx_f, centery_f;
155 float sin_f, cos_f;
156
157 fixed_t bbox[4];
158
159 int precise;
160 } am_frame_t;
161 extern am_frame_t am_frame;
162
163 typedef enum
164 {
165 map_things_appearance_classic,
166 map_things_appearance_scaled,
167 #if defined(HAVE_LIBSDL2_IMAGE)
168 map_things_appearance_icon,
169 #endif
170 map_things_appearance_box,
171
172 map_things_appearance_max
173 } map_things_appearance_t;
174
175 typedef enum
176 {
177 map_trail_mode_off,
178 map_trail_mode_ignore_collisions,
179 map_trail_mode_include_collisions,
180 map_trail_mode_max
181 } map_trail_mode_t;
182
183 extern map_trail_mode_t map_trail_mode;
184
185 void AM_updatePlayerTrail(fixed_t x, fixed_t y);
186
187 #endif