DEADSOFTWARE

added preview background
[d2df-editor.git] / src / shared / MAPDEF.pas
1 unit MAPDEF;
3 {$MODE Delphi}
5 {
6 -----------------------------------
7 MAPDEF.PAS ВЕРСИЯ ОТ 22.03.09
9 Поддержка карт версии 1
10 -----------------------------------
11 }
13 interface
15 uses
16 MAPSTRUCT;
18 const
19 PANEL_NONE = 0;
20 PANEL_WALL = 1;
21 PANEL_BACK = 2;
22 PANEL_FORE = 4;
23 PANEL_WATER = 8;
24 PANEL_ACID1 = 16;
25 PANEL_ACID2 = 32;
26 PANEL_STEP = 64;
27 PANEL_LIFTUP = 128;
28 PANEL_LIFTDOWN = 256;
29 PANEL_OPENDOOR = 512;
30 PANEL_CLOSEDOOR = 1024;
31 PANEL_BLOCKMON = 2048;
32 PANEL_LIFTLEFT = 4096;
33 PANEL_LIFTRIGHT = 8192;
35 PANEL_FLAG_BLENDING = 1;
36 PANEL_FLAG_HIDE = 2;
37 PANEL_FLAG_WATERTEXTURES = 4;
39 EFFECT_NONE = 0;
40 EFFECT_TELEPORT = 1;
41 EFFECT_RESPAWN = 2;
42 EFFECT_FIRE = 3;
44 ITEM_NONE = 0;
45 ITEM_MEDKIT_SMALL = 1;
46 ITEM_MEDKIT_LARGE = 2;
47 ITEM_MEDKIT_BLACK = 3;
48 ITEM_ARMOR_GREEN = 4;
49 ITEM_ARMOR_BLUE = 5;
50 ITEM_SPHERE_BLUE = 6;
51 ITEM_SPHERE_WHITE = 7;
52 ITEM_SUIT = 8;
53 ITEM_OXYGEN = 9;
54 ITEM_INVUL = 10;
55 ITEM_WEAPON_SAW = 11;
56 ITEM_WEAPON_SHOTGUN1 = 12;
57 ITEM_WEAPON_SHOTGUN2 = 13;
58 ITEM_WEAPON_CHAINGUN = 14;
59 ITEM_WEAPON_ROCKETLAUNCHER = 15;
60 ITEM_WEAPON_PLASMA = 16;
61 ITEM_WEAPON_BFG = 17;
62 ITEM_WEAPON_SUPERPULEMET = 18;
63 ITEM_AMMO_BULLETS = 19;
64 ITEM_AMMO_BULLETS_BOX = 20;
65 ITEM_AMMO_SHELLS = 21;
66 ITEM_AMMO_SHELLS_BOX = 22;
67 ITEM_AMMO_ROCKET = 23;
68 ITEM_AMMO_ROCKET_BOX = 24;
69 ITEM_AMMO_CELL = 25;
70 ITEM_AMMO_CELL_BIG = 26;
71 ITEM_AMMO_BACKPACK = 27;
72 ITEM_KEY_RED = 28;
73 ITEM_KEY_GREEN = 29;
74 ITEM_KEY_BLUE = 30;
75 ITEM_WEAPON_KASTET = 31;
76 ITEM_WEAPON_PISTOL = 32;
77 ITEM_BOTTLE = 33;
78 ITEM_HELMET = 34;
79 ITEM_JETPACK = 35;
80 ITEM_INVIS = 36;
82 ITEM_MAX = 36; // store the last item's id in here
83 // use this in for loops
85 ITEM_OPTION_ONLYDM = 1;
86 ITEM_OPTION_FALL = 2;
88 AREA_NONE = 0;
89 AREA_PLAYERPOINT1 = 1;
90 AREA_PLAYERPOINT2 = 2;
91 AREA_DMPOINT = 3;
92 AREA_REDFLAG = 4;
93 AREA_BLUEFLAG = 5;
94 AREA_DOMFLAG = 6;
95 AREA_REDTEAMPOINT = 7;
96 AREA_BLUETEAMPOINT = 8;
98 MONSTER_NONE = 0;
99 MONSTER_DEMON = 1;
100 MONSTER_IMP = 2;
101 MONSTER_ZOMBY = 3;
102 MONSTER_SERG = 4;
103 MONSTER_CYBER = 5;
104 MONSTER_CGUN = 6;
105 MONSTER_BARON = 7;
106 MONSTER_KNIGHT = 8;
107 MONSTER_CACO = 9;
108 MONSTER_SOUL = 10;
109 MONSTER_PAIN = 11;
110 MONSTER_SPIDER = 12;
111 MONSTER_BSP = 13;
112 MONSTER_MANCUB = 14;
113 MONSTER_SKEL = 15;
114 MONSTER_VILE = 16;
115 MONSTER_FISH = 17;
116 MONSTER_BARREL = 18;
117 MONSTER_ROBO = 19;
118 MONSTER_MAN = 20;
120 TRIGGER_NONE = 0;
121 TRIGGER_EXIT = 1;
122 TRIGGER_TELEPORT = 2;
123 TRIGGER_OPENDOOR = 3;
124 TRIGGER_CLOSEDOOR = 4;
125 TRIGGER_DOOR = 5;
126 TRIGGER_DOOR5 = 6;
127 TRIGGER_CLOSETRAP = 7;
128 TRIGGER_TRAP = 8;
129 TRIGGER_PRESS = 9;
130 TRIGGER_SECRET = 10;
131 TRIGGER_LIFTUP = 11;
132 TRIGGER_LIFTDOWN = 12;
133 TRIGGER_LIFT = 13;
134 TRIGGER_TEXTURE = 14;
135 TRIGGER_ON = 15;
136 TRIGGER_OFF = 16;
137 TRIGGER_ONOFF = 17;
138 TRIGGER_SOUND = 18;
139 TRIGGER_SPAWNMONSTER = 19;
140 TRIGGER_SPAWNITEM = 20;
141 TRIGGER_MUSIC = 21;
142 TRIGGER_PUSH = 22;
143 TRIGGER_SCORE = 23;
144 TRIGGER_MESSAGE = 24;
145 TRIGGER_DAMAGE = 25;
146 TRIGGER_HEALTH = 26;
147 TRIGGER_SHOT = 27;
148 TRIGGER_EFFECT = 28;
149 TRIGGER_MAX = 28;
151 TRIGGER_SHOT_PISTOL = 0;
152 TRIGGER_SHOT_BULLET = 1;
153 TRIGGER_SHOT_SHOTGUN = 2;
154 TRIGGER_SHOT_SSG = 3;
155 TRIGGER_SHOT_IMP = 4;
156 TRIGGER_SHOT_PLASMA = 5;
157 TRIGGER_SHOT_SPIDER = 6;
158 TRIGGER_SHOT_CACO = 7;
159 TRIGGER_SHOT_BARON = 8;
160 TRIGGER_SHOT_MANCUB = 9;
161 TRIGGER_SHOT_REV = 10;
162 TRIGGER_SHOT_ROCKET = 11;
163 TRIGGER_SHOT_BFG = 12;
164 TRIGGER_SHOT_EXPL = 13;
165 TRIGGER_SHOT_BFGEXPL = 14;
166 TRIGGER_SHOT_MAX = 14;
168 TRIGGER_SHOT_TARGET_NONE = 0;
169 TRIGGER_SHOT_TARGET_MON = 1;
170 TRIGGER_SHOT_TARGET_PLR = 2;
171 TRIGGER_SHOT_TARGET_RED = 3;
172 TRIGGER_SHOT_TARGET_BLUE = 4;
173 TRIGGER_SHOT_TARGET_MONPLR = 5;
174 TRIGGER_SHOT_TARGET_PLRMON = 6;
176 TRIGGER_EFFECT_PARTICLE = 0;
177 TRIGGER_EFFECT_ANIMATION = 1;
179 TRIGGER_EFFECT_SLIQUID = 0;
180 TRIGGER_EFFECT_LLIQUID = 1;
181 TRIGGER_EFFECT_DLIQUID = 2;
182 TRIGGER_EFFECT_BLOOD = 3;
183 TRIGGER_EFFECT_SPARK = 4;
184 TRIGGER_EFFECT_BUBBLE = 5;
185 TRIGGER_EFFECT_MAX = 5;
187 TRIGGER_EFFECT_POS_CENTER = 0;
188 TRIGGER_EFFECT_POS_AREA = 1;
190 ACTIVATE_PLAYERCOLLIDE = 1;
191 ACTIVATE_MONSTERCOLLIDE = 2;
192 ACTIVATE_PLAYERPRESS = 4;
193 ACTIVATE_MONSTERPRESS = 8;
194 ACTIVATE_SHOT = 16;
195 ACTIVATE_NOMONSTER = 32;
196 ACTIVATE_CUSTOM = 255;
198 KEY_RED = 1;
199 KEY_GREEN = 2;
200 KEY_BLUE = 4;
201 KEY_REDTEAM = 8;
202 KEY_BLUETEAM = 16;
204 TEXTURE_NAME_WATER = '_water_0';
205 TEXTURE_NAME_ACID1 = '_water_1';
206 TEXTURE_NAME_ACID2 = '_water_2';
208 TEXTURE_SPECIAL_WATER = DWORD(-1);
209 TEXTURE_SPECIAL_ACID1 = DWORD(-2);
210 TEXTURE_SPECIAL_ACID2 = DWORD(-3);
211 TEXTURE_NONE = DWORD(-4);
213 Type
214 TPoint = packed record
215 X, Y: LongInt;
216 end;
218 TTriggerData = record
219 case Byte of
220 0: (Default: Byte128);
221 TRIGGER_EXIT: (MapName: Char16);
222 TRIGGER_TELEPORT: (TargetPoint: TPoint;
223 d2d_teleport: Boolean;
224 silent_teleport: Boolean;
225 TlpDir: Byte);
226 TRIGGER_OPENDOOR,
227 TRIGGER_CLOSEDOOR,
228 TRIGGER_DOOR,
229 TRIGGER_DOOR5,
230 TRIGGER_CLOSETRAP,
231 TRIGGER_TRAP,
232 TRIGGER_LIFTUP,
233 TRIGGER_LIFTDOWN,
234 TRIGGER_LIFT: (PanelID: Integer;
235 NoSound: Boolean;
236 d2d_doors: Boolean);
237 TRIGGER_PRESS,
238 TRIGGER_ON,
239 TRIGGER_OFF,
240 TRIGGER_ONOFF: (tX, tY: Integer;
241 tWidth, tHeight: Word;
242 Wait: Word;
243 Count: Word;
244 MonsterID: Integer;
245 ExtRandom: Boolean);
246 TRIGGER_SECRET: ();
247 TRIGGER_TEXTURE: (ActivateOnce: Boolean;
248 AnimOnce: Boolean);
249 TRIGGER_SOUND: (SoundName: Char64;
250 Volume: Byte;
251 Pan: Byte;
252 Local: Boolean;
253 PlayCount: Byte;
254 SoundSwitch: Boolean);
255 TRIGGER_SPAWNMONSTER: (MonPos: TPoint;
256 MonType: Byte;
257 MonHealth: Integer;
258 MonDir: Byte;
259 MonActive: Boolean;
260 MonCount: Integer;
261 MonEffect: Byte;
262 MonMax: Word;
263 MonDelay: Word;
264 MonBehav: Byte);
265 TRIGGER_SPAWNITEM: (ItemPos: TPoint;
266 ItemType: Byte;
267 ItemFalls: Boolean;
268 ItemOnlyDM: Boolean;
269 ItemCount: Integer;
270 ItemEffect: Byte;
271 ItemMax: Word;
272 ItemDelay: Word);
273 TRIGGER_MUSIC: (MusicName: Char64;
274 MusicAction: Byte);
275 TRIGGER_PUSH: (PushAngle: Word;
276 PushForce: Byte;
277 ResetVel: Boolean);
278 TRIGGER_SCORE: (ScoreAction: Byte;
279 ScoreCount: Byte;
280 ScoreTeam: Byte;
281 ScoreCon,
282 ScoreMsg: Boolean);
283 TRIGGER_MESSAGE: (MessageKind: Byte;
284 MessageSendTo: Byte;
285 MessageText: Char100;
286 MessageTime: Word);
287 TRIGGER_DAMAGE: (DamageValue: Word;
288 DamageInterval: Word);
289 TRIGGER_HEALTH: (HealValue: Word;
290 HealInterval: Word;
291 HealMax: Boolean;
292 HealSilent: Boolean);
293 TRIGGER_SHOT: (ShotPos: TPoint;
294 ShotType: Byte;
295 ShotTarget: Byte;
296 ShotSound: Boolean;
297 ShotAllMap: Boolean;
298 ShotPanelID: Integer;
299 ShotIntSight: Word;
300 ShotAngle: Word;
301 ShotWait: Word;
302 ShotAccuracy: Word;
303 ShotAmmo: Word;
304 ShotIntReload: Word);
305 TRIGGER_EFFECT: (FXCount: Byte;
306 FXType: Byte;
307 FXSubType: Byte;
308 FXColorR: Byte;
309 FXColorG: Byte;
310 FXColorB: Byte;
311 FXPos: Byte;
312 FXWait: Word;
313 FXVelX: ShortInt;
314 FXVelY: ShortInt;
315 FXSpreadL: Byte;
316 FXSpreadR: Byte;
317 FXSpreadU: Byte;
318 FXSpreadD: Byte);
319 end;
321 implementation
323 end.