doom

a minimalistic implementation of doom
git clone git://ssnf.xyz/doom
Log | Files | Refs

p_mobj.h (2287B)


      1 
      2 
      3 
      4 
      5 
      6 
      7 
      8 
      9 
     10 
     11 
     12 
     13 
     14 
     15 
     16 
     17 
     18 
     19 
     20 
     21 
     22 
     23 #ifndef __P_MOBJ__
     24 #define __P_MOBJ__
     25 
     26 
     27 #include "tables.h"
     28 #include "m_fixed.h"
     29 
     30 
     31 #include "d_think.h"
     32 
     33 
     34 
     35 #include "doomdata.h"
     36 
     37 
     38 
     39 
     40 #include "info.h"
     41 
     42 
     43 
     44 #ifdef __GNUG__
     45 #pragma interface
     46 #endif
     47 
     48 
     49 
     50 
     51 
     52 
     53 
     54 
     55 
     56 
     57 
     58 
     59 
     60 
     61 
     62 
     63 
     64 
     65 
     66 
     67 
     68 
     69 
     70 
     71 
     72 
     73 
     74 
     75 
     76 
     77 
     78 
     79 
     80 
     81 
     82 
     83 
     84 
     85 
     86 
     87 
     88 
     89 
     90 
     91 
     92 
     93 
     94 
     95 
     96 
     97 
     98 
     99 
    100 
    101 
    102 
    103 
    104 
    105 
    106 
    107 
    108 
    109 
    110 
    111 
    112 
    113 
    114 
    115 
    116 
    117 typedef enum
    118 {
    119     
    120     MF_SPECIAL		= 1,
    121     
    122     MF_SOLID		= 2,
    123     
    124     MF_SHOOTABLE	= 4,
    125     
    126     MF_NOSECTOR		= 8,
    127     
    128     MF_NOBLOCKMAP	= 16,                    
    129 
    130     
    131     MF_AMBUSH		= 32,
    132     
    133     MF_JUSTHIT		= 64,
    134     
    135     MF_JUSTATTACKED	= 128,
    136     
    137     
    138     MF_SPAWNCEILING	= 256,
    139     
    140     
    141     
    142     MF_NOGRAVITY	= 512,
    143 
    144     
    145     
    146     MF_DROPOFF		= 0x400,
    147     
    148     MF_PICKUP		= 0x800,
    149     
    150     MF_NOCLIP		= 0x1000,
    151     
    152     MF_SLIDE		= 0x2000,
    153     
    154     
    155     MF_FLOAT		= 0x4000,
    156     
    157     
    158     MF_TELEPORT		= 0x8000,
    159     
    160     
    161     MF_MISSILE		= 0x10000,	
    162     
    163     
    164     MF_DROPPED		= 0x20000,
    165     
    166     
    167     MF_SHADOW		= 0x40000,
    168     
    169     
    170     MF_NOBLOOD		= 0x80000,
    171     
    172     
    173     MF_CORPSE		= 0x100000,
    174     
    175     
    176     MF_INFLOAT		= 0x200000,
    177 
    178     
    179     
    180     
    181     MF_COUNTKILL	= 0x400000,
    182     
    183     
    184     
    185     MF_COUNTITEM	= 0x800000,
    186 
    187     
    188     
    189     MF_SKULLFLY		= 0x1000000,
    190 
    191     
    192     
    193     MF_NOTDMATCH    	= 0x2000000,
    194 
    195     
    196     
    197     
    198     
    199     MF_TRANSLATION  	= 0xc000000,
    200     
    201     MF_TRANSSHIFT	= 26
    202 
    203 } mobjflag_t;
    204 
    205 
    206 
    207 typedef struct mobj_s
    208 {
    209     
    210     thinker_t		thinker;
    211 
    212     
    213     fixed_t		x;
    214     fixed_t		y;
    215     fixed_t		z;
    216 
    217     
    218     struct mobj_s*	snext;
    219     struct mobj_s*	sprev;
    220 
    221     
    222     angle_t		angle;	
    223     spritenum_t		sprite;	
    224     int			frame;	
    225 
    226     
    227     
    228     struct mobj_s*	bnext;
    229     struct mobj_s*	bprev;
    230     
    231     struct subsector_s*	subsector;
    232 
    233     
    234     fixed_t		floorz;
    235     fixed_t		ceilingz;
    236 
    237     
    238     fixed_t		radius;
    239     fixed_t		height;	
    240 
    241     
    242     fixed_t		momx;
    243     fixed_t		momy;
    244     fixed_t		momz;
    245 
    246     
    247     int			validcount;
    248 
    249     mobjtype_t		type;
    250     mobjinfo_t*		info;	
    251     
    252     int			tics;	
    253     state_t*		state;
    254     int			flags;
    255     int			health;
    256 
    257     
    258     int			movedir;	
    259     int			movecount;	
    260 
    261     
    262     
    263     struct mobj_s*	target;
    264 
    265     
    266     
    267     int			reactiontime;   
    268 
    269     
    270     
    271     int			threshold;
    272 
    273     
    274     
    275     struct player_s*	player;
    276 
    277     
    278     int			lastlook;	
    279 
    280     
    281     mapthing_t		spawnpoint;	
    282 
    283     
    284     struct mobj_s*	tracer;	
    285     
    286 } mobj_t;
    287 
    288 
    289 
    290 #endif
    291 
    292 
    293 
    294 
    295