📄 r_defs.h
字号:
boolean pseudoSector; fixed_t virtualFloorheight; fixed_t virtualCeilingheight; linechain_t *sectorLines; struct sector_s **stackList; double lineoutLength; // ----- end special tricks -----} sector_t;//// The SideDef.//typedef struct{ // add this to the calculated texture column fixed_t textureoffset; // add this to the calculated texture top fixed_t rowoffset; // Texture indices. // We do not maintain names here. short toptexture; short bottomtexture; short midtexture; // Sector the SideDef is facing. sector_t* sector; //SoM: 3/6/2000: This is the special of the linedef this side belongs to. int special;} side_t;//// Move clipping aid for LineDefs.//typedef enum{ ST_HORIZONTAL, ST_VERTICAL, ST_POSITIVE, ST_NEGATIVE} slopetype_t;typedef struct line_s{ // Vertices, from v1 to v2. vertex_t* v1; vertex_t* v2; // Precalculated v2 - v1 for side checking. fixed_t dx; fixed_t dy; // Animation related. short flags; short special; short tag; // Visual appearance: SideDefs. // sidenum[1] will be -1 if one sided short sidenum[2]; // Neat. Another bounding box, for the extent // of the LineDef. fixed_t bbox[4]; // To aid move clipping. slopetype_t slopetype; // Front and back sector. // Note: redundant? Can be retrieved from SideDefs. sector_t* frontsector; sector_t* backsector; // if == validcount, already checked int validcount; // thinker_t for reversable actions void* specialdata; // wallsplat_t list void* splats; //SoM: 3/6/2000 int tranlump; // translucency filter, -1 == none // (Will have to fix to use with Legacy's Translucency?) int firsttag,nexttag; // improves searches for tags. //SoM: Wall portals wallportal_t* wallportals;} line_t;//// A SubSector.// References a Sector.// Basically, this is a list of LineSegs,// indicating the visible walls that define// (all or some) sides of a convex BSP leaf.//typedef struct subsector_s{ sector_t* sector; short numlines; short firstline; // floorsplat_t list void* splats;} subsector_t;// SoM: 3/6/200//// Sector list node showing all sectors an object appears in.//// There are two threads that flow through these nodes. The first thread// starts at touching_thinglist in a sector_t and flows through the m_snext// links to find all mobjs that are entirely or partially in the sector.// The second thread starts at touching_sectorlist in an mobj_t and flows// through the m_tnext links to find all sectors a thing touches. This is// useful when applying friction or push effects to sectors. These effects// can be done as thinkers that act upon all objects touching their sectors.// As an mobj moves through the world, these nodes are created and// destroyed, with the links changed appropriately.//// For the links, NULL means top or end of list.typedef struct msecnode_s{ sector_t *m_sector; // a sector containing this object struct mobj_s *m_thing; // this object struct msecnode_s *m_tprev; // prev msecnode_t for this thing struct msecnode_s *m_tnext; // next msecnode_t for this thing struct msecnode_s *m_sprev; // prev msecnode_t for this sector struct msecnode_s *m_snext; // next msecnode_t for this sector boolean visited; // killough 4/4/98, 4/7/98: used in search algorithms} msecnode_t;//Hurdler: 04/12/2000: for now, only used in hardware mode// maybe later for software as well?// that's why it's moved heretypedef struct light_s { USHORT type; // light,... (cfr #define in hwr_light.c) float light_xoffset; float light_yoffset; // y offset to adjust corona's height ULONG corona_color; // color of the light for static lighting float corona_radius; // radius of the coronas ULONG dynamic_color; // color of the light for dynamic lighting float dynamic_radius; // radius of the light ball float dynamic_sqrradius; // radius^2 of the light ball} light_t;#ifdef TANDLtypedef struct lightmap_s { float s[2], t[2]; light_t *light; struct lightmap_s *next;} lightmap_t;#endif//// The LineSeg.//typedef struct{ vertex_t* v1; vertex_t* v2; fixed_t offset; angle_t angle; side_t* sidedef; line_t* linedef; // Sector references. // Could be retrieved from linedef, too. // backsector is NULL for one sided lines sector_t* frontsector; sector_t* backsector; // lenght of the seg : used by the hardware renderer float length;#ifdef TANDL //Hurdler: 04/12/2000: added for static lightmap lightmap_t *lightmaps;#endif // SoM: Why slow things down by calculating lightlists for every // thick side. int numlights; r_lightlist_t* rlights;} seg_t;//// BSP node.//typedef struct{ // Partition line. fixed_t x; fixed_t y; fixed_t dx; fixed_t dy; // Bounding box for each child. fixed_t bbox[2][4]; // If NF_SUBSECTOR its a subsector. unsigned short children[2];} node_t;// posts are runs of non masked source pixelstypedef struct{ byte topdelta; // -1 is the last post in a column // BP: humf, -1 with byte ! (unsigned char) test WARNING byte length; // length data bytes follows} post_t;// column_t is a list of 0 or more post_t, (byte)-1 terminatedtypedef post_t column_t;//// OTHER TYPES//#ifndef MAXFFLOORS#define MAXFFLOORS 40#endif//// ?//typedef struct drawseg_s{ seg_t* curline; int x1; int x2; fixed_t scale1; fixed_t scale2; fixed_t scalestep; // 0=none, 1=bottom, 2=top, 3=both int silhouette; // do not clip sprites above this fixed_t bsilheight; // do not clip sprites below this fixed_t tsilheight; // Pointers to lists for sprite clipping, // all three adjusted so [x1] is first value. short* sprtopclip; short* sprbottomclip; short* maskedtexturecol; struct visplane_s* ffloorplanes[MAXFFLOORS]; int numffloorplanes; struct ffloor_s* thicksides[MAXFFLOORS]; short* thicksidecol; int numthicksides; fixed_t frontscale[MAXVIDWIDTH];} drawseg_t;// Patches.// A patch holds one or more columns.// Patches are used for sprites and all masked pictures,// and we compose textures from the TEXTURE1/2 lists// of patches.////WARNING: this structure is clooned in GlidePatch_tstruct patch_s{ short width; // bounding box size short height; short leftoffset; // pixels to the left of origin short topoffset; // pixels below the origin int columnofs[8]; // only [width] used // the [0] is &columnofs[width]};typedef struct patch_s patch_t;typedef enum { PALETTE = 0, // 1 byte is the index in the doom palette (as usual) INTENSITY = 1, // 1 byte intensity INTENSITY_ALPHA = 2, // 2 byte : alpha then intensity RGB24 = 3, // 24 bit rgb RGBA32 = 4, // 32 bit rgba} pic_mode_t;// a pic is an unmasked block of pixels, stored in horizontal way//typedef struct{ short width; byte zero; // set to 0 allow autodetection of pic_t // mode instead of patch or raw byte mode; // see pic_mode_t above short height; short reserved1; // set to 0 byte data[0];} pic_t;typedef enum{ SC_NONE = 0, SC_TOP = 1, SC_BOTTOM = 2} spritecut_e;// A vissprite_t is a thing// that will be drawn during a refresh.// I.e. a sprite object that is partly visible.typedef struct vissprite_s{ // Doubly linked list. struct vissprite_s* prev; struct vissprite_s* next; int x1; int x2; // for line side calculation fixed_t gx; fixed_t gy; // global bottom / top for silhouette clipping fixed_t gz; fixed_t gzt; // horizontal position of x1 fixed_t startfrac; fixed_t scale; // negative if flipped fixed_t xiscale; fixed_t texturemid; int patch; // for color translation and shadow draw, // maxbright frames as well lighttable_t* colormap; //Fab:29-04-98: for MF_SHADOW sprites, which translucency table to use byte* transmap; int mobjflags; // SoM: 3/6/2000: height sector for underwater/fake ceiling support int heightsec; //SoM: 4/3/2000: Global colormaps! extracolormap_t* extra_colormap; fixed_t xscale; //SoM: Precalculated top and bottom screen coords for the sprite. fixed_t thingheight; //The actual height of the thing (for 3D floors) sector_t* sector; //The sector containing the thing. fixed_t sz; fixed_t szt; int cut; //0 for none, bit 1 for top, bit 2 for bottom} vissprite_t;//// Sprites are patches with a special naming convention// so they can be recognized by R_InitSprites.// The base name is NNNNFx or NNNNFxFx, with// x indicating the rotation, x = 0, 1-7.// The sprite and frame specified by a thing_t// is range checked at run time.// A sprite is a patch_t that is assumed to represent// a three dimensional object and may have multiple// rotations pre drawn.// Horizontal flipping is used to save space,// thus NNNNF2F5 defines a mirrored patch.// Some sprites will only have one picture used// for all views: NNNNF0//typedef struct{ // If false use 0 for any position. // Note: as eight entries are available, // we might as well insert the same name eight times. boolean rotate; // Lump to use for view angles 0-7. int lumppat[8]; // lump number 16:16 wad:lump short lumpid[8]; // id in the spriteoffset,spritewidth.. tables // Flip bit (1 = flip) to use for view angles 0-7. byte flip[8];} spriteframe_t;//// A sprite definition: a number of animation frames.//typedef struct{ int numframes; spriteframe_t* spriteframes;} spritedef_t;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -