DEADSOFTWARE

grid: slightly faster cell skipping
[d2df-sdl.git] / src / shared / MAPDEF.pas
1 (* Copyright (C) DooM 2D:Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *)
16 {$INCLUDE a_modes.inc}
17 {$M+}
18 unit MAPDEF;
20 {
21 -----------------------------------
22 MAPDEF.PAS ÂÅÐÑÈß ÎÒ 22.03.09
24 Ïîääåðæêà êàðò âåðñèè 1
25 -----------------------------------
26 }
28 interface
30 uses
31 MAPSTRUCT;
33 // *** WARNING! ***
34 // keep all constants in sync with "mapdesc.txt"!
35 // or even better: regenerate this part directly from "mapdesc.txt".
36 const
37 PANEL_NONE = 0;
38 PANEL_WALL = 1;
39 PANEL_BACK = 2;
40 PANEL_FORE = 4;
41 PANEL_WATER = 8;
42 PANEL_ACID1 = 16;
43 PANEL_ACID2 = 32;
44 PANEL_STEP = 64;
45 PANEL_LIFTUP = 128;
46 PANEL_LIFTDOWN = 256;
47 PANEL_OPENDOOR = 512;
48 PANEL_CLOSEDOOR = 1024;
49 PANEL_BLOCKMON = 2048;
50 PANEL_LIFTLEFT = 4096;
51 PANEL_LIFTRIGHT = 8192;
53 PANEL_FLAG_BLENDING = 1;
54 PANEL_FLAG_HIDE = 2;
55 PANEL_FLAG_WATERTEXTURES = 4;
57 EFFECT_NONE = 0;
58 EFFECT_TELEPORT = 1;
59 EFFECT_RESPAWN = 2;
60 EFFECT_FIRE = 3;
62 ITEM_NONE = 0;
63 ITEM_MEDKIT_SMALL = 1;
64 ITEM_MEDKIT_LARGE = 2;
65 ITEM_MEDKIT_BLACK = 3;
66 ITEM_ARMOR_GREEN = 4;
67 ITEM_ARMOR_BLUE = 5;
68 ITEM_SPHERE_BLUE = 6;
69 ITEM_SPHERE_WHITE = 7;
70 ITEM_SUIT = 8;
71 ITEM_OXYGEN = 9;
72 ITEM_INVUL = 10;
73 ITEM_WEAPON_SAW = 11;
74 ITEM_WEAPON_SHOTGUN1 = 12;
75 ITEM_WEAPON_SHOTGUN2 = 13;
76 ITEM_WEAPON_CHAINGUN = 14;
77 ITEM_WEAPON_ROCKETLAUNCHER = 15;
78 ITEM_WEAPON_PLASMA = 16;
79 ITEM_WEAPON_BFG = 17;
80 ITEM_WEAPON_SUPERPULEMET = 18;
81 ITEM_AMMO_BULLETS = 19;
82 ITEM_AMMO_BULLETS_BOX = 20;
83 ITEM_AMMO_SHELLS = 21;
84 ITEM_AMMO_SHELLS_BOX = 22;
85 ITEM_AMMO_ROCKET = 23;
86 ITEM_AMMO_ROCKET_BOX = 24;
87 ITEM_AMMO_CELL = 25;
88 ITEM_AMMO_CELL_BIG = 26;
89 ITEM_AMMO_BACKPACK = 27;
90 ITEM_KEY_RED = 28;
91 ITEM_KEY_GREEN = 29;
92 ITEM_KEY_BLUE = 30;
93 ITEM_WEAPON_KASTET = 31;
94 ITEM_WEAPON_PISTOL = 32;
95 ITEM_BOTTLE = 33;
96 ITEM_HELMET = 34;
97 ITEM_JETPACK = 35;
98 ITEM_INVIS = 36;
99 ITEM_WEAPON_FLAMETHROWER = 37;
100 ITEM_AMMO_FUELCAN = 38;
102 ITEM_MAX = 38; // store the last item's id in here
103 // use this in for loops
105 ITEM_OPTION_ONLYDM = 1;
106 ITEM_OPTION_FALL = 2;
108 AREA_NONE = 0;
109 AREA_PLAYERPOINT1 = 1;
110 AREA_PLAYERPOINT2 = 2;
111 AREA_DMPOINT = 3;
112 AREA_REDFLAG = 4;
113 AREA_BLUEFLAG = 5;
114 AREA_DOMFLAG = 6;
115 AREA_REDTEAMPOINT = 7;
116 AREA_BLUETEAMPOINT = 8;
118 MONSTER_NONE = 0;
119 MONSTER_DEMON = 1;
120 MONSTER_IMP = 2;
121 MONSTER_ZOMBY = 3;
122 MONSTER_SERG = 4;
123 MONSTER_CYBER = 5;
124 MONSTER_CGUN = 6;
125 MONSTER_BARON = 7;
126 MONSTER_KNIGHT = 8;
127 MONSTER_CACO = 9;
128 MONSTER_SOUL = 10;
129 MONSTER_PAIN = 11;
130 MONSTER_SPIDER = 12;
131 MONSTER_BSP = 13;
132 MONSTER_MANCUB = 14;
133 MONSTER_SKEL = 15;
134 MONSTER_VILE = 16;
135 MONSTER_FISH = 17;
136 MONSTER_BARREL = 18;
137 MONSTER_ROBO = 19;
138 MONSTER_MAN = 20;
140 TRIGGER_NONE = 0;
141 TRIGGER_EXIT = 1;
142 TRIGGER_TELEPORT = 2;
143 TRIGGER_OPENDOOR = 3;
144 TRIGGER_CLOSEDOOR = 4;
145 TRIGGER_DOOR = 5;
146 TRIGGER_DOOR5 = 6;
147 TRIGGER_CLOSETRAP = 7;
148 TRIGGER_TRAP = 8;
149 TRIGGER_PRESS = 9;
150 TRIGGER_SECRET = 10;
151 TRIGGER_LIFTUP = 11;
152 TRIGGER_LIFTDOWN = 12;
153 TRIGGER_LIFT = 13;
154 TRIGGER_TEXTURE = 14;
155 TRIGGER_ON = 15;
156 TRIGGER_OFF = 16;
157 TRIGGER_ONOFF = 17;
158 TRIGGER_SOUND = 18;
159 TRIGGER_SPAWNMONSTER = 19;
160 TRIGGER_SPAWNITEM = 20;
161 TRIGGER_MUSIC = 21;
162 TRIGGER_PUSH = 22;
163 TRIGGER_SCORE = 23;
164 TRIGGER_MESSAGE = 24;
165 TRIGGER_DAMAGE = 25;
166 TRIGGER_HEALTH = 26;
167 TRIGGER_SHOT = 27;
168 TRIGGER_EFFECT = 28;
169 TRIGGER_SCRIPT = 29;
170 TRIGGER_MAX = 29;
172 TRIGGER_SHOT_PISTOL = 0;
173 TRIGGER_SHOT_BULLET = 1;
174 TRIGGER_SHOT_SHOTGUN = 2;
175 TRIGGER_SHOT_SSG = 3;
176 TRIGGER_SHOT_IMP = 4;
177 TRIGGER_SHOT_PLASMA = 5;
178 TRIGGER_SHOT_SPIDER = 6;
179 TRIGGER_SHOT_CACO = 7;
180 TRIGGER_SHOT_BARON = 8;
181 TRIGGER_SHOT_MANCUB = 9;
182 TRIGGER_SHOT_REV = 10;
183 TRIGGER_SHOT_ROCKET = 11;
184 TRIGGER_SHOT_BFG = 12;
185 TRIGGER_SHOT_EXPL = 13;
186 TRIGGER_SHOT_BFGEXPL = 14;
187 TRIGGER_SHOT_MAX = 14;
189 TRIGGER_SHOT_TARGET_NONE = 0;
190 TRIGGER_SHOT_TARGET_MON = 1;
191 TRIGGER_SHOT_TARGET_PLR = 2;
192 TRIGGER_SHOT_TARGET_RED = 3;
193 TRIGGER_SHOT_TARGET_BLUE = 4;
194 TRIGGER_SHOT_TARGET_MONPLR = 5;
195 TRIGGER_SHOT_TARGET_PLRMON = 6;
197 TRIGGER_SHOT_AIM_DEFAULT = 0;
198 TRIGGER_SHOT_AIM_ALLMAP = 1;
199 TRIGGER_SHOT_AIM_TRACE = 2;
200 TRIGGER_SHOT_AIM_TRACEALL = 3;
202 TRIGGER_EFFECT_PARTICLE = 0;
203 TRIGGER_EFFECT_ANIMATION = 1;
205 TRIGGER_EFFECT_SLIQUID = 0;
206 TRIGGER_EFFECT_LLIQUID = 1;
207 TRIGGER_EFFECT_DLIQUID = 2;
208 TRIGGER_EFFECT_BLOOD = 3;
209 TRIGGER_EFFECT_SPARK = 4;
210 TRIGGER_EFFECT_BUBBLE = 5;
211 TRIGGER_EFFECT_MAX = 5;
213 TRIGGER_EFFECT_POS_CENTER = 0;
214 TRIGGER_EFFECT_POS_AREA = 1;
216 ACTIVATE_PLAYERCOLLIDE = 1;
217 ACTIVATE_MONSTERCOLLIDE = 2;
218 ACTIVATE_PLAYERPRESS = 4;
219 ACTIVATE_MONSTERPRESS = 8;
220 ACTIVATE_SHOT = 16;
221 ACTIVATE_NOMONSTER = 32;
222 ACTIVATE_CUSTOM = 255;
224 KEY_RED = 1;
225 KEY_GREEN = 2;
226 KEY_BLUE = 4;
227 KEY_REDTEAM = 8;
228 KEY_BLUETEAM = 16;
230 TEXTURE_NAME_WATER = '_water_0';
231 TEXTURE_NAME_ACID1 = '_water_1';
232 TEXTURE_NAME_ACID2 = '_water_2';
234 TEXTURE_SPECIAL_WATER = DWORD(-1);
235 TEXTURE_SPECIAL_ACID1 = DWORD(-2);
236 TEXTURE_SPECIAL_ACID2 = DWORD(-3);
237 TEXTURE_NONE = DWORD(-4);
239 type
240 TPoint = packed record
241 X, Y: LongInt;
242 end;
244 TTriggerData = record
245 case Byte of
246 0: (Default: Byte128);
247 TRIGGER_EXIT: (MapName: Char16);
248 TRIGGER_TELEPORT: (TargetPoint: TPoint;
249 d2d_teleport: Boolean;
250 silent_teleport: Boolean;
251 TlpDir: Byte);
252 TRIGGER_OPENDOOR,
253 TRIGGER_CLOSEDOOR,
254 TRIGGER_DOOR,
255 TRIGGER_DOOR5,
256 TRIGGER_CLOSETRAP,
257 TRIGGER_TRAP,
258 TRIGGER_LIFTUP,
259 TRIGGER_LIFTDOWN,
260 TRIGGER_LIFT: (PanelID: Integer;
261 NoSound: Boolean;
262 d2d_doors: Boolean);
263 TRIGGER_PRESS,
264 TRIGGER_ON,
265 TRIGGER_OFF,
266 TRIGGER_ONOFF: (tX, tY: Integer;
267 tWidth, tHeight: Word;
268 Wait: Word;
269 Count: Word;
270 MonsterID: Integer;
271 ExtRandom: Boolean);
272 TRIGGER_SECRET: ();
273 TRIGGER_TEXTURE: (ActivateOnce: Boolean;
274 AnimOnce: Boolean);
275 TRIGGER_SOUND: (SoundName: Char64;
276 Volume: Byte;
277 Pan: Byte;
278 Local: Boolean;
279 PlayCount: Byte;
280 SoundSwitch: Boolean);
281 TRIGGER_SPAWNMONSTER: (MonPos: TPoint;
282 MonType: Byte;
283 MonHealth: Integer;
284 MonDir: Byte;
285 MonActive: Boolean;
286 MonCount: Integer;
287 MonEffect: Byte;
288 MonMax: Word;
289 MonDelay: Word;
290 MonBehav: Byte);
291 TRIGGER_SPAWNITEM: (ItemPos: TPoint;
292 ItemType: Byte;
293 ItemFalls: Boolean;
294 ItemOnlyDM: Boolean;
295 ItemCount: Integer;
296 ItemEffect: Byte;
297 ItemMax: Word;
298 ItemDelay: Word);
299 TRIGGER_MUSIC: (MusicName: Char64;
300 MusicAction: Byte);
301 TRIGGER_PUSH: (PushAngle: Word;
302 PushForce: Byte;
303 ResetVel: Boolean);
304 TRIGGER_SCORE: (ScoreAction: Byte;
305 ScoreCount: Byte;
306 ScoreTeam: Byte;
307 ScoreCon,
308 ScoreMsg: Boolean);
309 TRIGGER_MESSAGE: (MessageKind: Byte;
310 MessageSendTo: Byte;
311 MessageText: Char100;
312 MessageTime: Word);
313 TRIGGER_DAMAGE: (DamageValue: Word;
314 DamageInterval: Word);
315 TRIGGER_HEALTH: (HealValue: Word;
316 HealInterval: Word;
317 HealMax: Boolean;
318 HealSilent: Boolean);
319 TRIGGER_SHOT: (ShotPos: TPoint;
320 ShotType: Byte;
321 ShotTarget: Byte;
322 ShotSound: Boolean;
323 ShotAim: Byte;
324 ShotPanelID: Integer;
325 ShotIntSight: Word;
326 ShotAngle: Word;
327 ShotWait: Word;
328 ShotAccuracy: Word;
329 ShotAmmo: Word;
330 ShotIntReload: Word);
331 TRIGGER_EFFECT: (FXCount: Byte;
332 FXType: Byte;
333 FXSubType: Byte;
334 FXColorR: Byte;
335 FXColorG: Byte;
336 FXColorB: Byte;
337 FXPos: Byte;
338 FXWait: Word;
339 FXVelX: ShortInt;
340 FXVelY: ShortInt;
341 FXSpreadL: Byte;
342 FXSpreadR: Byte;
343 FXSpreadU: Byte;
344 FXSpreadD: Byte);
345 TRIGGER_SCRIPT: (SCRProc: Char64;
346 SCRArg: Integer);
347 end;
349 {$INCLUDE mapstructsizes.inc}
351 implementation
353 uses SysUtils;
355 {$INCLUDE mapstructio.inc}
357 end.