decorate: added `HasSpecialPowerup(type)` function (use `PWRT_BUDDHA`, `PWRT_REGEN...
[k8vavoom.git] / progs / common / linespec / actor / Actor.Decorate.Const.vc
blob4a352ec01226f0221e0bcb73108b878e12d614ab
1 //**************************************************************************
2 //**
3 //**    ##   ##    ##    ##   ##   ####     ####   ###     ###
4 //**    ##   ##  ##  ##  ##   ##  ##  ##   ##  ##  ####   ####
5 //**     ## ##  ##    ##  ## ##  ##    ## ##    ## ## ## ## ##
6 //**     ## ##  ########  ## ##  ##    ## ##    ## ##  ###  ##
7 //**      ###   ##    ##   ###    ##  ##   ##  ##  ##       ##
8 //**       #    ##    ##    #      ####     ####   ##       ##
9 //**
10 //**  Copyright (C) 1999-2006 Jānis Legzdiņš
11 //**  Copyright (C) 2018-2023 Ketmar Dark
12 //**
13 //**  This program is free software: you can redistribute it and/or modify
14 //**  it under the terms of the GNU General Public License as published by
15 //**  the Free Software Foundation, version 3 of the License ONLY.
16 //**
17 //**  This program is distributed in the hope that it will be useful,
18 //**  but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 //**  GNU General Public License for more details.
21 //**
22 //**  You should have received a copy of the GNU General Public License
23 //**  along with this program.  If not, see <http://www.gnu.org/licenses/>.
24 //**
25 //**************************************************************************
26 //**
27 //**  Class for Actor state action methods.
28 //**
29 //**************************************************************************
31 // flags for A_Chase
32 const [decorate] int CHF_FASTCHASE        = 1;
33 const [decorate] int CHF_NOPLAYACTIVE     = 2;
34 const [decorate] int CHF_NIGHTMAREFAST    = 4;
35 const [decorate] int CHF_RESURRECT        = 8;
36 const [decorate] int CHF_DONTMOVE         = 16;
37 const [decorate] int CHF_NORANDOMTURN     = 32;
38 const [decorate] int CHF_NODIRECTIONTURN  = 64;
39 const [decorate] int CHF_NOPOSTATTACKTURN = 128;
40 const [decorate] int CHF_STOPIFBLOCKED    = 256;
41 const [decorate] int CHF_DONTIDLE         = 512;
43 const [decorate] int CHF_DONTTURN = CHF_NORANDOMTURN|CHF_NOPOSTATTACKTURN|CHF_STOPIFBLOCKED;
45 // flags for A_CustomMissile
46 const [decorate] int CMF_AIMOFFSET       = 1;
47 const [decorate] int CMF_AIMDIRECTION    = 2;
48 const [decorate] int CMF_TRACKOWNER      = 4;
49 const [decorate] int CMF_CHECKTARGETDEAD = 8;
51 const [decorate] int CMF_ABSOLUTEPITCH   = 16;
52 const [decorate] int CMF_OFFSETPITCH     = 32;
53 const [decorate] int CMF_SAVEPITCH       = 64;
54 const [decorate] int CMF_ABSOLUTEANGLE   = 128;
56 //const [decorate] int CMF_BADPITCH        = 256; // for compatibility handling only - avoid!
58 // NOT IMPLEMENTED!
59 const [decorate] int CMF_ABSOLUTEPITCH = 16;
60 const [decorate] int CMF_OFFSETPITCH   = 32;
61 const [decorate] int CMF_SAVEPITCH     = 64;
62 const [decorate] int CMF_ABSOLUTEANGLE = 128;
63 const [decorate] int CMF_BADPITCH      = 256; // for compatibility handling only - avoid!
65 //  Flags for A_SeekerMissile
66 const [decorate] int SMF_LOOK     = 1;
67 const [decorate] int SMF_PRECISE  = 2;
68 const [decorate] int SMF_CURSPEED = 4;
70 //  Flags for A_SpawnItemEx
71 const [decorate] int SXF_TRANSFERTRANSLATION = 1;
72 const [decorate] int SXF_ABSOLUTEPOSITION    = 2;
73 const [decorate] int SXF_ABSOLUTEANGLE       = 4;
74 const [decorate] int SXF_ABSOLUTEMOMENTUM    = 8;
75 const [decorate] int SXF_ABSOLUTEVELOCITY    = 8; // "momentum" is deprecated by gozzo
76 const [decorate] int SXF_SETMASTER           = 16;
77 const [decorate] int SXF_NOCHECKPOSITION     = 32;
78 const [decorate] int SXF_TELEFRAG            = 64;
79 const [decorate] int SXF_CLIENTSPAWN         = 128;  // only used by Skulltag
80 const [decorate] int SXF_CLIENTSIDE          = 128;  // only used by Skulltag
81 const [decorate] int SXF_TRANSFERAMBUSHFLAG  = 256;
82 const [decorate] int SXF_TRANSFERPITCH       = 512;
83 const [decorate] int SXF_TRANSFERPOINTERS    = 1024;
85 const [decorate] int SXF_USEBLOODCOLOR       = 1<<11;
86 const [decorate] int SXF_CLEARCALLERTID      = 1<<12;
87 const [decorate] int SXF_MULTIPLYSPEED       = 1<<13;
88 const [decorate] int SXF_TRANSFERSCALE       = 1<<14;
89 const [decorate] int SXF_TRANSFERSPECIAL     = 1<<15; // maybe implemented
90 const [decorate] int SXF_CLEARCALLERSPECIAL  = 1<<16; // maybe implemented
91 const [decorate] int SXF_TRANSFERSTENCILCOL  = 1<<17; // maybe implemented
92 const [decorate] int SXF_TRANSFERALPHA       = 1<<18;
93 const [decorate] int SXF_TRANSFERRENDERSTYLE = 1<<19;
94 const [decorate] int SXF_SETTARGET           = 1<<20;
95 const [decorate] int SXF_SETTRACER           = 1<<21;
96 const [decorate] int SXF_NOPOINTERS          = 1<<22;
97 const [decorate] int SXF_ORIGINATOR          = 1<<23;
98 const [decorate] int SXF_TRANSFERSPRITEFRAME = 1<<24; // not implemented
99 const [decorate] int SXF_TRANSFERROLL        = 1<<25;
100 const [decorate] int SXF_ISTARGET            = 1<<26;
101 const [decorate] int SXF_ISMASTER            = 1<<27;
102 const [decorate] int SXF_ISTRACER            = 1<<28;
103 // perform line trace, to not spawn the thing inside wall or something
104 const [decorate] int SXF_MUZZLE_TRACE        = 1<<31;
106 // morph constants
107 const [decorate] int MRF_ADDSTAMINA        = 1;
108 const [decorate] int MRF_FULLHEALTH        = 2;
109 const [decorate] int MRF_UNDOBYTOMEOFPOWER = 4;
110 const [decorate] int MRF_UNDOBYCHAOSDEVICE = 8;
111 const [decorate] int MRF_FAILNOTELEFRAG    = 16;
112 const [decorate] int MRF_FAILNOLAUGH       = 32;
113 const [decorate] int MRF_WHENINVULNERABLE  = 64;
114 const [decorate] int MRF_LOSEACTUALWEAPON  = 128;
115 const [decorate] int MRF_NEWTIDBEHAVIOUR   = 256;
116 const [decorate] int MRF_UNDOBYDEATH       = 512;
117 const [decorate] int MRF_UNDOBYDEATHFORCED = 1024;
118 const [decorate] int MRF_UNDOBYDEATHSAVES  = 2048;
120 // flags for A_CustomBulletAttack
121 const [decorate] int CBAF_AIMFACING     = 1;
122 const [decorate] int CBAF_NORANDOM      = 2;
123 const [decorate] int CBAF_EXPLICITANGLE = 4;
124 const [decorate] int CBAF_NOPITCH       = 8;
125 const [decorate] int CBAF_NORANDOMPUFFZ = 16;
126 const [decorate] int CBAF_PUFFTARGET    = 32;
127 const [decorate] int CBAF_PUFFMASTER    = 64;
128 const [decorate] int CBAF_PUFFTRACER    = 128;
129 // k8vavoom special
130 const [decorate] int CBAF_DISABLEMISSILE = 0x100_0000; // do not spawn missile even if it is specified
131 const [decorate] int CBAF_NOMISSILENO3D  = 0x200_0000; // do not spawn missile if 3d models are disabled
132 const [decorate] int CBAF_MISSILEHRANDOM = 0x400_0000; // move missile left or right a little (but aim it at hit destination)
134 // flags for A_FireBullets
135 const [decorate] int FBF_USEAMMO       = 1;
136 const [decorate] int FBF_NORANDOM      = 2;
137 const [decorate] int FBF_EXPLICITANGLE = 4;
138 const [decorate] int FBF_NOPITCH       = 8;
139 const [decorate] int FBF_NOFLASH       = 16;
140 const [decorate] int FBF_NORANDOMPUFFZ = 32;
141 const [decorate] int FBF_PUFFTARGET    = 64;
142 const [decorate] int FBF_PUFFMASTER    = 128;
143 const [decorate] int FBF_PUFFTRACER    = 256;
144 // k8vavoom special
145 const [decorate] int FBF_DISABLEMISSILE   = 0x100_0000; // do not spawn missile even if it is specified
146 const [decorate] int FBF_NOMISSILENO3D    = 0x200_0000; // do not spawn missile if 3d models are disabled
147 const [decorate] int FBF_MISSILEHRANDOM   = 0x400_0000; // move missile left or right a little (but aim it at hit destination)
148 const [decorate] int FBF_MISSILEEXSCATTER = 0x800_0000; // extra scatter for multiple shots
150 // flags for A_LookEx
151 const [decorate] int LOF_NOSIGHTCHECK    = 1;
152 const [decorate] int LOF_NOSOUNDCHECK    = 2;
153 const [decorate] int LOF_DONTCHASEGOAL   = 4;
154 const [decorate] int LOF_NOSEESOUND      = 8;
155 const [decorate] int LOF_FULLVOLSEESOUND = 16;
156 const [decorate] int LOF_NOJUMP          = 32;
158 // flags for A_Respawn
159 const [decorate] int RSF_FOG        = 1;
160 const [decorate] int RSF_KEEPTARGET = 2;
161 const [decorate] int RSF_TELEFRAG   = 4;
163 // flags for A_ChangeVelocity
164 const [decorate] int CVF_RELATIVE = 1;
165 const [decorate] int CVF_REPLACE = 2;
167 // flags for A_WeaponReady
169 const [decorate] int WRF_NOBOB       = 1;
170 const [decorate] int WRF_NOSWITCH    = 2;
171 const [decorate] int WRF_NOPRIMARY   = 4;
172 const [decorate] int WRF_NOSECONDARY = 8;
173 const [decorate] int WRF_NOFIRE      = 12;
174 const [decorate] int WRF_ALLOWRELOAD = 16;
175 const [decorate] int WRF_ALLOWZOOM   = 32;
176 const [decorate] int WRF_DISABLESWITCH = 64;
177 const [decorate] int WRF_ALLOWUSER1 = 128;
178 const [decorate] int WRF_ALLOWUSER2 = 256;
179 const [decorate] int WRF_ALLOWUSER3 = 512;
180 const [decorate] int WRF_ALLOWUSER4 = 1024;
181 // k8vavoom extensions
182 // use primary ammo for secondary fire?
183 const [decorate] int WRF_SECONDARY_SAME_AMMO = 1<<24;
185 // flags for A_RailAttack and A_CustomRailgun
186 const [decorate] int RGF_SILENT        = 1;
187 const [decorate] int RGF_NOPIERCING    = 2;
188 // not implemented
189 const [decorate] int RGF_EXPLICITANGLE = 4;
190 const [decorate] int RGF_FULLBRIGHT    = 8;
191 const [decorate] int RGF_CENTERZ       = 16;
192 const [decorate] int RGF_NORANDOMPUFFZ = 32;
194 // flags for A_Mushroom
195 const [decorate] int MSF_Standard = 0;
196 const [decorate] int MSF_Classic  = 1;
197 const [decorate] int MSF_DontHurt = 2;
199 // flags for A_Blast
200 const [decorate] int BF_USEAMMO      = 1;
201 const [decorate] int BF_DONTWARN     = 2;
202 const [decorate] int BF_AFFECTBOSSES = 4;
203 const [decorate] int BF_NOIMPACTDAMAGE = 8;
205 // flags for A_CustomPunch
206 const [decorate] int CPF_USEAMMO       = 1;
207 const [decorate] int CPF_DAGGER        = 2;
208 const [decorate] int CPF_PULLIN        = 4;
209 const [decorate] int CPF_NORANDOMPUFFZ = 8;
210 const [decorate] int CPF_NOTURN        = 16;
211 const [decorate] int CPF_STEALARMOR    = 32; // partially implemented (not tested!)
212 // k8vavoom flag: set player pawn Tracer field to the monster we just attacket (or none)
213 const [decorate] int CPF_SETTRACER     = 1<<16;
215 // A_PlaySound constants
216 const [decorate] int CHAN_AUTO = 0;
217 const [decorate] int CHAN_VOICE = 1;
218 const [decorate] int CHAN_WEAPON = 2;
219 const [decorate] int CHAN_ITEM = 3;
220 const [decorate] int CHAN_BODY = 4;
222 // channel 8 is "auto"
223 const [decorate] int CHAN_0 = 0;
224 const [decorate] int CHAN_1 = 1;
225 const [decorate] int CHAN_2 = 2;
226 const [decorate] int CHAN_3 = 3;
227 const [decorate] int CHAN_4 = 4;
228 const [decorate] int CHAN_5 = 5;
229 const [decorate] int CHAN_6 = 6;
230 const [decorate] int CHAN_7 = 7;
231 const [decorate] int CHAN_8 = 0;
232 const [decorate] int CHAN_9 = 0;
234 const [decorate] int CHAN_SLOT0 = 0;
235 const [decorate] int CHAN_SLOT1 = 1;
236 const [decorate] int CHAN_SLOT2 = 2;
237 const [decorate] int CHAN_SLOT3 = 3;
238 const [decorate] int CHAN_SLOT4 = 4;
239 const [decorate] int CHAN_SLOT5 = 5;
240 const [decorate] int CHAN_SLOT6 = 6;
241 const [decorate] int CHAN_SLOT7 = 7;
242 const [decorate] int CHAN_SLOT8 = 0;
243 const [decorate] int CHAN_SLOT9 = 0;
245 const [decorate] int CHAN_SLOT_0 = 0;
246 const [decorate] int CHAN_SLOT_1 = 1;
247 const [decorate] int CHAN_SLOT_2 = 2;
248 const [decorate] int CHAN_SLOT_3 = 3;
249 const [decorate] int CHAN_SLOT_4 = 4;
250 const [decorate] int CHAN_SLOT_5 = 5;
251 const [decorate] int CHAN_SLOT_6 = 6;
252 const [decorate] int CHAN_SLOT_7 = 7;
253 const [decorate] int CHAN_SLOT_8 = 0;
254 const [decorate] int CHAN_SLOT_9 = 0;
256 // modifier flags; they are here, but completely ignored
257 const [decorate] int CHAN_LISTENERZ = 0; //(8): Sound is played from the listener's Z-height. (Needs verifying)
258 const [decorate] int CHAN_MAYBE_LOCAL = 0; //(16): Sound is subject to compat_silentpickup and will not play if the sound is made by an actor other than the local player's camera when compatibility flag is enabled.
259 const [decorate] int CHAN_UI = 0; //(32): Sound is considered an interface sound and is not recorded into savegames.
260 const [decorate] int CHAN_NOPAUSE = 0; //(64): Sound is not paused by menus and will play through time-stopping powerup effects.
261 const [decorate] int CHAN_AREA = 0; //(128): Sound plays from all around. Only valid with sector sounds.
262 const [decorate] int CHAN_LOOP = 256; //(256): Sound loops.
263 const [decorate] int CHAN_NOSTOP = 0; //(4096): Do not override the sound that is currently playing on the same channel with this one. This is only the case if both sounds are the same. If they are different, the playing sound is overridden regardless.
264 const [decorate] int CHAN_PICKUP = (CHAN_ITEM|CHAN_MAYBE_LOCAL); // Do not use this with A_StartSound! It would not do what is expected.
265 const [decorate] int CHAN_OVERLAP = 0; //(8192)
267 // A_StartSound constants
268 const [decorate] int CHANF_DEFAULT = 0; // just to make the code look better and avoid literal 0's.
269 const [decorate] int CHANF_LISTENERZ = CHAN_LISTENERZ;
270 const [decorate] int CHANF_MAYBE_LOCAL = CHAN_MAYBE_LOCAL;
271 const [decorate] int CHANF_UI = CHAN_UI;
272 const [decorate] int CHANF_NOPAUSE = CHAN_NOPAUSE;
273 const [decorate] int CHANF_LOOP = CHAN_LOOP;
274 const [decorate] int CHANF_NOSTOP = CHAN_NOSTOP;
275 const [decorate] int CHANF_OVERLAP = CHAN_OVERLAP;
276 const [decorate] int CHANF_LOCAL = 16384;
277 const [decorate] int CHANF_LOOPING = CHANF_LOOP|CHANF_NOSTOP; // convenience value for replicating the old 'looping' boolean
281 const [decorate] int XF_HURTSOURCE         = 0x01; // Hurts the source: if set, the source can be damaged by the explosion. Note that the source is not necessarily the calling actor. This flag is set by default.
282 const [decorate] int XF_NOTMISSILE         = 0x04; // Not a missile: if set, the calling actor is considered to be the source. By default, the calling actor is assumed to be a projectile, and the source is therefore considered to be the calling actor's target.
283 const [decorate] int XF_EXPLICITDAMAGETYPE = 0x08; // The damagetype parameter will never change to the actor's damagetype.
284 const [decorate] int XF_NOSPLASH           = 0x10; // No splash: if set, the explosion does not create any terrain splashes.
285 const [decorate] int XF_THRUSTZ            = 0x02; // this is new in GZDoom 4.1.3, and we don't care (orig: 0x20; 0x02: unused)
286 const [decorate] int XF_THRUSTLESS         = 0x40;
287 const [decorate] int XF_NOALLIES           = 0x80;
288 const [decorate] int XF_CIRCULAR           = 0x02; // we don't care (orig: 0x100; 0x02: unused)
291 const [decorate] int SPF_FORCECLAMP  = 0x01; // for player, this is always set
292 const [decorate] int SPF_INTERPOLATE = 0x02; // in k8vavoom, this is always set for player
293 const [decorate] int SPF_NO_INTERPOLATE = 0x80; // k8vavoom flag
296 // flags for A_Fade*
297 enum [decorate] /*EFadeFlags*/ {
298   FTF_REMOVE = 1<<0,
299   FTF_CLAMP  = 1<<1,
303 const [decorate] int GFF_NOEXTCHANGE = 1;
306 // flags for A_VileAttack
307 enum [decorate] /*EVileAttackFlags*/ {
308   VAF_DMGTYPEAPPLYTODIRECT = 1,
312 // flags for A_TakeInventory and A_TakeFromTarget
313 enum [decorate] /*ETakeFlags*/ {
314   TIF_NOTAKEINFINITE = 1,
318 // flags for A_Remove*
319 enum [decorate] /*ERemoveFlags*/ {
320   RMVF_MISSILES   = 0x00000001,
321   RMVF_NOMONSTERS = 0x00000002,
322   RMVF_MISC       = 0x00000004,
323   RMVF_EVERYTHING = 0x00000008,
324   RMVF_EXFILTER   = 0x00000010,
325   RMVF_EXSPECIES  = 0x00000020,
326   RMVF_EITHER     = 0x00000040,
330 // flags for A_RadiusGive
331 enum [decorate] /*ERadiusGiveFlags*/ {
332   RGF_GIVESELF  = 1,
333   RGF_PLAYERS   = 1<<1,
334   RGF_MONSTERS  = 1<<2,
335   RGF_OBJECTS   = 1<<3,
336   RGF_VOODOO    = 1<<4,
337   RGF_CORPSES   = 1<<5,
338   RGF_NOTARGET  = 1<<6,
339   RGF_NOTRACER  = 1<<7,
340   RGF_NOMASTER  = 1<<8,
341   RGF_CUBE      = 1<<9,
342   RGF_NOSIGHT   = 1<<10,
343   RGF_MISSILES  = 1<<11,
344   RGF_INCLUSIVE = 1<<12,
345   RGF_ITEMS     = 1<<13,
346   RGF_KILLED    = 1<<14,
347   RGF_EXFILTER  = 1<<15,
348   RGF_EXSPECIES = 1<<16,
349   RGF_EITHER    = 1<<17,
353 enum [decorate] /*ERadiusThrustFlags*/ {
354   RTF_AFFECTSOURCE = 1,
355   RTF_NOIMPACTDAMAGE = 2,
356   RTF_NOTMISSILE = 4,
357   RTF_THRUSTZ = 16,
361 // flags for A_PainAttack
362 enum [decorate] /*EPainAttackFlags*/ {
363   PAF_NOSKULLATTACK = 1,
364   PAF_AIMFACING     = 2,
365   PAF_NOTARGET      = 4,
369 // flags for A_Damage (Master/Target/Tracer/Children/Siblings/Self) series
370 enum [decorate] /*EDamageFlags*/ {
371   DMSS_FOILINVUL = 0x00000001,
372   DMSS_AFFECTARMOR = 0x00000002,
373   DMSS_KILL = 0x00000004,
374   DMSS_NOFACTOR = 0x00000008,
375   DMSS_FOILBUDDHA = 0x00000010,
376   DMSS_NOPROTECT = 0x00000020,
377   DMSS_EXFILTER = 0x00000040,
378   DMSS_EXSPECIES = 0x00000080,
379   DMSS_EITHER = 0x00000100,
380   DMSS_INFLICTORDMGTYPE = 0x00000200,
384 enum [decorate] /*EFireCustomMissileFlags*/ {
385   FPF_AIMATANGLE = 1,
386   FPF_TRANSFERTRANSLATION = 2,
387   FPF_NOAUTOAIM = 4,
391 // A_ZoomFactor flags
392 const [decorate] int ZOOM_INSTANT = 1;
393 const [decorate] int ZOOM_NOSCALETURNING = 2;
396 // flags for A_Kill (Master/Target/Tracer/Children/Siblings) series
397 enum [decorate] /*EKillFlags*/ {
398   KILS_FOILINVUL    = 0x00000001,
399   KILS_KILLMISSILES = 0x00000002,
400   KILS_NOMONSTERS   = 0x00000004,
401   KILS_FOILBUDDHA   = 0x00000008,
402   KILS_EXFILTER     = 0x00000010,
403   KILS_EXSPECIES    = 0x00000020,
404   KILS_EITHER       = 0x00000040,
408 // for A_Saw
409 const [decorate] int SF_NORANDOM = 1;
410 const [decorate] int SF_RANDOMLIGHTMISS = 2;
411 const [decorate] int SF_RANDOMLIGHTHIT = 4;
412 const [decorate] int SF_RANDOMLIGHTBOTH = 6;
413 const [decorate] int SF_NOUSEAMMOMISS = 8;
414 const [decorate] int SF_NOUSEAMMO = 16;
415 const [decorate] int SF_NOPULLIN = 32;
416 const [decorate] int SF_NOTURN = 64;
417 const [decorate] int SF_STEALARMOR = 128; // not implemented
420 // flags for A_AlertMonsters
421 enum [decorate] /*EAlertFlags*/ {
422   AMF_TARGETEMITTER   = 1,
423   AMF_TARGETNONPLAYER = 2,
424   AMF_EMITFROMTARGET  = 4,
428 // flags for A_QuakeEx
429 enum [decorate] /*EQuakeFlags*/ {
430   QF_RELATIVE      = 1,
431   QF_SCALEDOWN     = 1<<1,
432   QF_SCALEUP       = 1<<2,
433   QF_MAX           = 1<<3,
434   QF_FULLINTENSITY = 1<<4,
435   QF_WAVE          = 1<<5,
439 enum [decorate] /*EParticleFlags*/ {
440   SPF_FULLBRIGHT   = 1,
441   SPF_RELPOS       = 1<<1,
442   SPF_RELVEL       = 1<<2,
443   SPF_RELACCEL     = 1<<3,
444   SPF_RELANG       = 1<<4,
445   SPF_NOTIMEFREEZE = 1<<5,
447 const [decorate] int SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG;
450 // A_CheckProximity flags
451 enum [decorate] /*EProximityFlags*/ {
452   CPXF_ANCESTOR    = 1,
453   CPXF_LESSOREQUAL = 1<<1,
454   CPXF_NOZ         = 1<<2,
455   CPXF_COUNTDEAD   = 1<<3,
456   CPXF_DEADONLY    = 1<<4,
457   CPXF_EXACT       = 1<<5,
458   CPXF_SETTARGET   = 1<<6,
459   CPXF_SETMASTER   = 1<<7,
460   CPXF_SETTRACER   = 1<<8,
461   CPXF_FARTHEST    = 1<<9,
462   CPXF_CLOSEST     = 1<<10,
463   CPXF_SETONPTR    = 1<<11,
464   CPXF_CHECKSIGHT  = 1<<12,
468 enum [decorate] /*WARPF*/ {
469   WARPF_ABSOLUTEOFFSET    = 0x1,
470   WARPF_ABSOLUTEANGLE     = 0x2,
471   WARPF_USECALLERANGLE    = 0x4,
473   WARPF_NOCHECKPOSITION   = 0x8,
475   WARPF_INTERPOLATE       = 0x10,
476   WARPF_WARPINTERPOLATION = 0x20,
477   WARPF_COPYINTERPOLATION = 0x40,
479   WARPF_STOP              = 0x80,
480   WARPF_TOFLOOR           = 0x100,
481   WARPF_TESTONLY          = 0x200,
482   WARPF_ABSOLUTEPOSITION  = 0x400,
483   WARPF_BOB               = 0x800,
484   WARPF_MOVEPTR           = 0x1000,
485   WARPF_USEPTR            = 0x2000,
486   WARPF_USETID            = 0x2000,
487   WARPF_COPYVELOCITY      = 0x4000,
488   WARPF_COPYPITCH         = 0x8000,
492 enum [decorate] /*FAF_Flags*/ {
493   FAF_BOTTOM = 1,
494   FAF_MIDDLE = 2,
495   FAF_TOP    = 4,
496   FAF_NODISTFACTOR = 8, // deprecated
500 // flags for A_CheckLOF
501 enum [decorate] /*ELOFFlags*/ {
502   CLOFF_NOAIM_VERT = 0x1,
503   CLOFF_NOAIM_HORZ = 0x2,
505   CLOFF_JUMPENEMY = 0x4,
506   CLOFF_JUMPFRIEND = 0x8,
507   CLOFF_JUMPOBJECT = 0x10,
508   CLOFF_JUMPNONHOSTILE = 0x20,
510   CLOFF_SKIPENEMY = 0x40,
511   CLOFF_SKIPFRIEND = 0x80,
512   CLOFF_SKIPOBJECT = 0x100,
513   CLOFF_SKIPNONHOSTILE = 0x200,
515   CLOFF_MUSTBESHOOTABLE = 0x400,
517   CLOFF_SKIPTARGET = 0x800,
518   CLOFF_ALLOWNULL = 0x1000,
519   CLOFF_CHECKPARTIAL = 0x2000,
521   CLOFF_MUSTBEGHOST = 0x4000,
522   CLOFF_IGNOREGHOST = 0x8000,
524   CLOFF_MUSTBESOLID = 0x10000,
525   CLOFF_BEYONDTARGET = 0x20000,
527   CLOFF_FROMBASE = 0x40000,
528   CLOFF_MUL_HEIGHT = 0x80000,
529   CLOFF_MUL_WIDTH = 0x100000,
531   CLOFF_JUMP_ON_MISS = 0x200000,
532   CLOFF_AIM_VERT_NOOFFSET = 0x400000,
534   CLOFF_SETTARGET = 0x800000,
535   CLOFF_SETMASTER = 0x1000000,
536   CLOFF_SETTRACER = 0x2000000,
538   CLOFF_SKIPOBSTACLES = CLOFF_SKIPENEMY|CLOFF_SKIPFRIEND|CLOFF_SKIPOBJECT|CLOFF_SKIPNONHOSTILE,
539   CLOFF_NOAIM = CLOFF_NOAIM_VERT|CLOFF_NOAIM_HORZ
543 // Flags for GetAngle
544 enum [decorate] /*EGetAngleFlags*/ {
545   GAF_RELATIVE = 1,
546   GAF_SWITCH = 1<<1,
550 // Flags for GetZAt
551 enum [decorate] /*EZFlags*/ {
552   GZF_ABSOLUTEPOS = 1,    // Use the absolute position instead of an offsetted one.
553   GZF_ABSOLUTEANG = 1<<1, // Don't add the actor's angle to the parameter.
554   GZF_CEILING =     1<<2, // Check the ceiling instead of the floor.
555   GZF_3DRESTRICT =  1<<3, // Ignore midtextures and 3D floors above the pointer's z.
556   GZF_NOPORTALS =   1<<4, // Don't pass through any portals.
557   GZF_NO3DFLOOR =   1<<5, // Pass all 3D floors.
560 enum [decorate] /*FMDFlags*/ {
561   FMDF_NOPITCH     = 1<<0,
562   FMDF_INTERPOLATE = 1<<1,
563   FMDF_NOANGLE     = 1<<2,
567 // flags for A_BFGSpray
568 enum [decorate] /*EBFGSprayFlags*/ {
569   BFGF_HURTSOURCE = 1,
570   BFGF_MISSILEORIGIN = 2,
574 enum [decorate] /*ERaise*/ {
575   RF_TRANSFERFRIENDLINESS = 1,
576   RF_NOCHECKPOSITION = 2,
580 // gozzo constant
581 const [decorate] int ChunkFlags = SXF_TRANSFERTRANSLATION|SXF_ABSOLUTEVELOCITY;
584 enum [decorate] /*ESkillProperty*/ {
585   SKILLP_FastMonsters,
586   SKILLP_Respawn,
587   SKILLP_RespawnLimit,
588   SKILLP_DisableCheats,
589   SKILLP_AutoUseHealth,
590   SKILLP_SpawnFilter,
591   SKILLP_EasyBossBrain,
592   SKILLP_ACSReturn,
593   SKILLP_NoPain,
594   SKILLP_EasyKey,
595   SKILLP_SlowMonsters,
596   SKILLP_Infight,
597   SKILLP_PlayerRespawn,
600 // floating point properties
601 enum [decorate] /*EFSkillProperty*/ {
602   SKILLP_AmmoFactor,
603   SKILLP_DropAmmoFactor,
604   SKILLP_ArmorFactor,
605   SKILLP_HealthFactor,
606   SKILLP_DamageFactor,
607   SKILLP_Aggressiveness,
608   SKILLP_MonsterHealth,
609   SKILLP_FriendlyHealth,
610   SKILLP_KickbackFactor,
614 // flags for A_SelectWeapon
615 enum [decorate] /*ESelectWeaponFlags*/ {
616   SWF_SELECTPRIORITY = 1,
619 // flags for `A_Teleport()`
620 enum [decorate] /*T_Flags*/ {
621   TF_TELEFRAG     = 0x00000001, // Allow telefrag in order to teleport.
622   TF_RANDOMDECIDE = 0x00000002, // Randomly fail based on health. (A_Srcr2Decide)
623   TF_FORCED       = 0x00000004, // Forget what's in the way. TF_Telefrag takes precedence though.
624   TF_KEEPVELOCITY = 0x00000008, // Preserve velocity.
625   TF_KEEPANGLE    = 0x00000010, // Keep angle.
626   TF_USESPOTZ     = 0x00000020, // Set the z to the spot's z, instead of the floor.
627   TF_NOSRCFOG     = 0x00000040, // Don't leave any fog behind when teleporting.
628   TF_NODESTFOG    = 0x00000080, // Don't spawn any fog at the arrival position.
629   TF_USEACTORFOG  = 0x00000100, // Use the actor's TeleFogSourceType and TeleFogDestType fogs.
630   TF_NOJUMP       = 0x00000200, // Don't jump after teleporting.
631   TF_OVERRIDE     = 0x00000400, // Ignore NOTELEPORT.
632   TF_SENSITIVEZ   = 0x00000800, // Fail if the actor wouldn't fit in the position (for Z).
634   TF_KEEPORIENTATION = TF_KEEPVELOCITY|TF_KEEPANGLE,
635   TF_NOFOG = TF_NOSRCFOG|TF_NODESTFOG,
638 // Flags for A_WolfAttack
639 enum [decorate] /*EWolfAttackFlags*/ {
640   WAF_NORANDOM = 1,
641   WAF_USEPUFF = 2,
645 // flags for HasSpecialPowerup
646 enum [decorate] {
647   PWRT_BUDDHA = 1,
648   PWRT_REGEN,
649   PWRT_INFAMMO,