Doom Wiki
Advertisement
Doom Wiki

Un Actor u objeto de mapa (map object), abreviado mobj del inglés, es un tipo de thinker que se corresponde más o menos con las cosas: los jugadores, los monstruos, objetos, obstáculos y decoraciones, puntos del mapa como los destinos de teletransportadores o puntos de desove, son todos objetos de mapa.

Descripción[]

Los comentarios del código de Doom los presentan de esta forma:

//  MapObj data. Map Objects or mobjs are actors, entities,
//  thinker, take-your-pick... anything that moves, acts, or
//  suffers state changes of more or less violent nature.

En el código fuente, los actores están representados por la enumeración mobjtype_t y las estructuras mobj_tmobjinfo_t.

El orden en que se declaran los tipos Mobj en los archivos info.h e info.c corresponde a su número DeHackEd, y la mayoría de los cambios dehacked consisten en la modificación de los valores de las propiedades de los actores o mobjinfo.

La información de los actores corresponde a la "clase" de un Mobj (por ejemplo, Diablillo) mientras que el actor corresponde a una "instancia" particular de la clase (por ejemplo, el Diablillo que espera en la sala de salida de E1M1).

La estructura de mobjinfo_t determina el número de puntos de daño con que el actor se inicia, qué estado tiene, cuáles son sus banderas, qué sonidos hace, su tiempo de reacción, su velocidad de movimiento, etc.

La estructura mobj_t almacena la posición actual y el momento, el sector en que se encuentra, cuál es su estado actual, su objetivo actual y dónde debe reaparecer en el nivel de dificultad Nightmare!.

Banderas[]

El código fuente original de Doom definió las siguientes banderas mobj (como enumeración mobjflag_t en el archivo p_mobj.h [1]).

Constante simbólica Bit(s) [2] Valor
decimal
Valor
hexadecimal
Comentario del código fuente [3]
MF_SPECIAL 0 1 0x1 Call P_SpecialThing when touched.
MF_SOLID 1 2 0x2 Blocks.
MF_SHOOTABLE 2 4 0x4 Can be hit.
MF_NOSECTOR 3 8 0x8 Don't use the sector links (invisible but touchable).
MF_NOBLOCKMAP 4 16 0x10 Don't use the blocklinks (inert but displayable)
MF_AMBUSH 5 32 0x20 Not to be activated by sound, deaf monster.
MF_JUSTHIT 6 64 0x40 Will try to attack right back.
MF_JUSTATTACKED 7 128 0x80 Will take at least one step before attacking.
MF_SPAWNCEILING 8 256 0x100 On level spawning (initial position), hang from ceiling instead of stand on floor.
MF_NOGRAVITY 9 512 0x200 Don't apply gravity (every tic), that is, object will float, keeping current height or changing it actively.
MF_DROPOFF 10 1024 0x400 This allows jumps from high places.
MF_PICKUP 11 2048 0x800 For players, will pick up items.
MF_NOCLIP 12 4096 0x1000 Player cheat. ???
MF_SLIDE 13 8192 0x2000 Player: keep info about sliding along walls.
MF_FLOAT 14 16384 0x4000 Allow moves to any height, no gravity. For active floaters, e.g. cacodemons, pain elementals.
MF_TELEPORT 15 32768 0x8000 Don't cross lines or ??? look at heights on teleport.
MF_MISSILE 16 65536 0x10000 Don't hit same species, explode on block. Player missiles as well as fireballs of various kinds.
MF_DROPPED 17 131072 0x20000 Dropped by a demon, not level spawned. E.g. ammo clips dropped by dying former humans.
MF_SHADOW 18 262144 0x40000 Use fuzzy draw (shadow demons or spectres), temporary player invisibility powerup.
MF_NOBLOOD 19 524288 0x80000 Flag: don't bleed when shot (use puff), barrels and shootable furniture shall not bleed.
MF_CORPSE 20 1048576 0x100000 Don't stop moving halfway off a step, that is, have dead bodies slide down all the way.
MF_INFLOAT 21 2097152 0x200000 Floating to a height for a move, ??? don't auto float to target's height.
MF_COUNTKILL 22 4194304 0x400000 On kill, count this enemy object towards intermission kill total. Happy gathering.
MF_COUNTITEM 23 8388608 0x800000 On picking up, count this item object towards intermission item total.
MF_SKULLFLY 24 16777216 0x1000000 Special handling: skull in flight. Neither a cacodemon nor a missile.
MF_NOTDMATCH 25 33554432 0x2000000 Don't spawn this object in death match mode (e.g. key cards).
MF_TRANSLATION 26, 27 201326592 0xC000000 Player sprites in multiplayer modes are modified using an internal color lookup table for re-indexing. If 0x4 0x8 or 0xc, use a translation table for player colormaps
MF_TRANSSHIFT 1, 3, 4 26 0x1A Hmm ???.
  1. Archivo p_mobj.h, fechado el 22 de diciembre de 1997, 8966 bytes, MD5 98518af2f9fc2cb5d5d7bde8901e5bb6
  2. Los bits son convencionalmente numerados desde cero; o sea, que el primer bit es el bit 0, el segundo bit es el bit 1, y así sucesivamente.
  3. Los signos de interrogación y otras indicaciones de incertidumbre son los que figuran en el código original.

Otros juegos[]

Heretic[]

En el código fuente de Heretic, las banderas se definen en el archivo doomdef.h. Se conservan todas las banderas de Doom. También se agregó un segundo conjunto adicional de banderas. Estas banderas se muestran en la siguiente tabla:

Constante simbólica Bit(s) Valor
decimal
Valor
hexadecimal
Comentario del código fuente
MF2_LOGRAV 0 1 0x00000001 alternative gravity setting
MF2_WINDTHRUST 1 2 0x00000002 gets pushed around by the wind specials
MF2_FLOORBOUNCE 2 4 0x00000004 bounces off the floor
MF2_THRUGHOST 3 8 0x00000008 missile will pass through ghosts
MF2_FLY 4 16 0x00000010 fly mode is active
MF2_FOOTCLIP 5 32 0x00000020 if feet are allowed to be clipped
MF2_SPAWNFLOAT 6 64 0x00000040 spawn random float z
MF2_NOTELEPORT 7 128 0x00000080 does not teleport
MF2_RIP 8 256 0x00000100 missile rips through solid targets
MF2_PUSHABLE 9 512 0x00000200 can be pushed by other moving mobjs
MF2_SLIDE 10 1024 0x00000400 slides against walls
MF2_ONMOBJ 11 2048 0x00000800 mobj is resting on top of another mobj
MF2_PASSMOBJ 12 4096 0x00001000 Enable z block checking. If on, this flag will allow the mobj to pass over/under other mobjs.
MF2_CANNOTPUSH 13 8192 0x00002000 cannot push other pushable mobjs
MF2_FEETARECLIPPED 14 16384 0x00004000 a mobj's feet are now being cut
MF2_BOSS 15 32768 0x00008000 mobj is a major boss
MF2_FIREDAMAGE 16 65536 0x00010000 does fire damage
MF2_NODMGTHRUST 17 131072 0x00020000 does not thrust target when damaging
MF2_TELESTOMP 18 262144 0x00040000 mobj can stomp another
MF2_FLOATBOB 19 524288 0x00080000 use float bobbing z movement
MF2_DONTDRAW 20 1048576 0x00100000 don't generate a vissprite

Hexen[]

En el código fuente de Hexen, las banderas se definen en el archivo h2def.h. Todas las banderas de Doom y Heretic se conservan, pero algunas han sido cambiadas o reemplazadas. También se han agregado nuevas banderas. La siguiente tabla muestra solo las banderas nuevas y modificadas.

Constante simbólica Bit(s) Valor
decimal
Valor
hexadecimal
Comentario del código fuente Estado
MF_ALTSHADOW 17 131072 0x20000 alternate fuzzy draw Reemplaza MF_DROPPED
MF_ICECORPSE 23 8388608 0x800000 a frozen corpse (for blasting) Reemplaza MF_COUNTITEM}}
MF_TRANSLATION 26, 27, 28 469762048 0x00000000 use a translation table (>>MF_TRANSHIFT) Redefinido
MF2_BLASTED 3 8 0x00000008 missile will pass through ghosts Reemplaza MF2_THRUGHOST
MF2_FLOORCLIP 5 32 0x00000020 if feet are allowed to be clipped Reemplaza MF2_FOOTCLIP
MF2_DROPPED 14 16384 0x00004000 dropped by a demon Reemplaza MF2_FEETARECLIPPED
MF2_IMPACT 21 2097152 0x00200000 an MF_MISSILE mobj can activate SPAC_IMPACT Nuevo
MF2_PUSHWALL 22 4194304 0x00400000 mobj can push walls Nuevo
MF2_MCROSS 23 8388608 0x00800000 can activate monster cross lines Nuevo
MF2_PCROSS 24 16777216 0x01000000 can activate projectile cross lines Nuevo
MF2_CANTLEAVEFLOORPIC 25 33554432 0x02000000 stay within a certain floor type Nuevo
MF2_NONSHOOTABLE 26 67108864 0x04000000 mobj is totally non-shootable, but still considered solid Nuevo
MF2_INVULNERABLE 27 134217728 0x08000000 mobj is invulnerable Nuevo
MF2_DORMANT 28 268435456 0x10000000 thing is dormant Nuevo
MF2_ICEDAMAGE 29 536870912 0x20000000 does ice damage Nuevo
MF2_SEEKERMISSILE 30 1073741824 0x40000000 is a seeker (for reflection) Nuevo
MF2_REFLECTIVE 31 2147483648 0x80000000 reflects missiles Nuevo

Enlaces externos[]

Advertisement