Fix bitflags enum mobjflag_t for C++

This commit is contained in:
Eidolon 2026-03-15 15:23:33 -05:00
parent d73a42cf02
commit ffc9400799

View file

@ -100,76 +100,40 @@ extern "C" {
// //
// Misc. mobj flags // Misc. mobj flags
// //
typedef enum typedef INT32 mobjflag_t;
{ #define MF_SPECIAL (1) // Call P_TouchSpecialThing when touched.
// Call P_TouchSpecialThing when touched. #define MF_SOLID (1<<1) // Blocks.
MF_SPECIAL = 1, #define MF_SHOOTABLE (1<<2) // Can be hit.
// Blocks. #define MF_NOSECTOR (1<<3) // Don't use the sector links (invisible but touchable).
MF_SOLID = 1<<1, #define MF_NOBLOCKMAP (1<<4) // Don't use the blocklinks (inert but displayable)
// Can be hit. #define MF_PAPERCOLLISION (1<<5) // Thin, paper-like collision bound (for visual equivalent, see FF_PAPERSPRITE)
MF_SHOOTABLE = 1<<2, #define MF_PUSHABLE (1<<6) // You can push this object. It can activate switches and things by pushing it on top.
// Don't use the sector links (invisible but touchable). #define MF_BOSS (1<<7) // Object is a boss.
MF_NOSECTOR = 1<<3, #define MF_SPAWNCEILING (1<<8) // On level spawning (initial position), hang from ceiling instead of stand on floor.
// Don't use the blocklinks (inert but displayable) #define MF_NOGRAVITY (1<<9) // Don't apply gravity (every tic); object will float, keeping current height
MF_NOBLOCKMAP = 1<<4, #define MF_DRAWFROMFARAWAY (1<<10) // This object is visible from a greater distance than normal objects.
// Thin, paper-like collision bound (for visual equivalent, see FF_PAPERSPRITE) #define MF_SLIDEME (1<<11) // Slide this object when it hits a wall.
MF_PAPERCOLLISION = 1<<5, #define MF_NOCLIP (1<<12) // Don't collide with walls or solid objects. Two MF_NOCLIP objects can't touch each other at all!
// You can push this object. It can activate switches and things by pushing it on top. #define MF_FLOAT (1<<13) // Allow moves to any height, no gravity. For active floaters.
MF_PUSHABLE = 1<<6, #define MF_SLOPE (1<<14) // Change pitch/roll when touching slopes.
// Object is a boss. #define MF_MISSILE (1<<15) // Don't hit same species, explode on block.
MF_BOSS = 1<<7, #define MF_SPRING (1<<16) // Item is a spring.
// On level spawning (initial position), hang from ceiling instead of stand on floor. #define MF_ELEMENTAL (1<<17) // Object is elemental. If it is punted, it will evaporate.
MF_SPAWNCEILING = 1<<8, #define MF_NOTHINK (1<<18) // Don't run the thinker for this object.
// Don't apply gravity (every tic); object will float, keeping current height #define MF_NOCLIPHEIGHT (1<<19) // Don't adjust z if below or above floorz/ceilingz
// or changing it actively. #define MF_ENEMY (1<<20) // This mobj is an enemy!
MF_NOGRAVITY = 1<<9, #define MF_SCENERY (1<<21) // Scenery (uses scenery thinker).
// This object is visible from a greater distance than normal objects. #define MF_PAIN (1<<22) // Painful (shit hurts).
MF_DRAWFROMFARAWAY = 1<<10, #define MF_DONTPUNT (1<<23) // Object cannot be punted by invincible players. (Default CAN be punted, if it deals damage or is solid.)
// Slide this object when it hits a wall. #define MF_APPLYTERRAIN (1<<24) // Object uses terrain effects. (Overlays, footsteps, etc)
MF_SLIDEME = 1<<11, #define MF_NOCLIPTHING (1<<25) // for chase camera, don't be blocked by things (partial clipping)
// Don't collide with walls or solid objects. Two MF_NOCLIP objects can't touch each other at all! #define MF_GRENADEBOUNCE (1<<26) // Missile bounces like a grenade.
MF_NOCLIP = 1<<12, #define MF_RUNSPAWNFUNC (1<<27) // Run the action thinker on spawn.
// Allow moves to any height, no gravity. For active floaters. #define MF_DONTENCOREMAP (1<<28) // Don't remap in Encore mode. (Not a drawflag so that it's settable by mobjinfo.)
MF_FLOAT = 1<<13, #define MF_PICKUPFROMBELOW (1<<29) // Hitbox extends just as far below as above.
// Change pitch/roll when touching slopes. #define MF_NOSQUISH (1<<30) // Disable momentum-based squash and stretch.
MF_SLOPE = 1<<14, #define MF_NOHITLAGFORME ((INT32)(1U<<31)) // Disable hitlag for this object
// Don't hit same species, explode on block. // no more free slots, gotta get rid of more crusty base SRB2 flags
// Player missiles as well as fireballs of various kinds.
MF_MISSILE = 1<<15,
// Item is a spring.
MF_SPRING = 1<<16,
// Object is elemental. If it is punted, it will evaporate.
MF_ELEMENTAL = 1<<17,
// Don't run the thinker for this object.
MF_NOTHINK = 1<<18,
// Don't adjust z if below or above floorz/ceilingz
MF_NOCLIPHEIGHT = 1<<19,
// This mobj is an enemy!
MF_ENEMY = 1<<20,
// Scenery (uses scenery thinker).
MF_SCENERY = 1<<21,
// Painful (shit hurts).
MF_PAIN = 1<<22,
// Object cannot be punted by invincible players. (Default CAN be punted, if it deals damage or is solid.)
MF_DONTPUNT = 1<<23,
// Object uses terrain effects. (Overlays, footsteps, etc)
MF_APPLYTERRAIN = 1<<24,
// for chase camera, don't be blocked by things (partial clipping)
MF_NOCLIPTHING = 1<<25,
// Missile bounces like a grenade.
MF_GRENADEBOUNCE = 1<<26,
// Run the action thinker on spawn.
MF_RUNSPAWNFUNC = 1<<27,
// Don't remap in Encore mode. (Not a drawflag so that it's settable by mobjinfo.)
MF_DONTENCOREMAP = 1<<28,
// Hitbox extends just as far below as above.
MF_PICKUPFROMBELOW = 1<<29,
// Disable momentum-based squash and stretch.
MF_NOSQUISH = 1<<30,
// Disable hitlag for this object
MF_NOHITLAGFORME = (INT32)(1U<<31),
// no more free slots, gotta get rid of more crusty base SRB2 flags
} mobjflag_t;
typedef enum typedef enum
{ {