mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reorganise r_things.h
This commit is contained in:
parent
d35464204e
commit
34c4da018a
1 changed files with 43 additions and 28 deletions
|
|
@ -18,21 +18,23 @@
|
||||||
#include "r_patch.h"
|
#include "r_patch.h"
|
||||||
#include "r_portal.h"
|
#include "r_portal.h"
|
||||||
#include "r_defs.h"
|
#include "r_defs.h"
|
||||||
|
#include "r_skins.h"
|
||||||
|
|
||||||
// number of sprite lumps for spritewidth,offset,topoffset lookup tables
|
// --------------
|
||||||
// Fab: this is a hack : should allocate the lookup tables per sprite
|
// SPRITE LOADING
|
||||||
#define MAXVISSPRITES 2048 // added 2-2-98 was 128
|
// --------------
|
||||||
|
|
||||||
#define VISSPRITECHUNKBITS 6 // 2^6 = 64 sprites per chunk
|
|
||||||
#define VISSPRITESPERCHUNK (1 << VISSPRITECHUNKBITS)
|
|
||||||
#define VISSPRITEINDEXMASK (VISSPRITESPERCHUNK - 1)
|
|
||||||
|
|
||||||
#define FEETADJUST (4<<FRACBITS) // R_AddSingleSpriteDef
|
#define FEETADJUST (4<<FRACBITS) // R_AddSingleSpriteDef
|
||||||
|
|
||||||
// Constant arrays used for psprite clipping
|
boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef, UINT16 wadnum, UINT16 startlump, UINT16 endlump);
|
||||||
// and initializing clipping.
|
|
||||||
extern INT16 negonearray[MAXVIDWIDTH];
|
//faB: find sprites in wadfile, replace existing, add new ones
|
||||||
extern INT16 screenheightarray[MAXVIDWIDTH];
|
// (only sprites from namelist are added or replaced)
|
||||||
|
void R_AddSpriteDefs(UINT16 wadnum);
|
||||||
|
|
||||||
|
// ---------------------
|
||||||
|
// MASKED COLUMN DRAWING
|
||||||
|
// ---------------------
|
||||||
|
|
||||||
// vars for R_DrawMaskedColumn
|
// vars for R_DrawMaskedColumn
|
||||||
extern INT16 *mfloorclip;
|
extern INT16 *mfloorclip;
|
||||||
|
|
@ -46,9 +48,14 @@ extern fixed_t windowbottom;
|
||||||
void R_DrawMaskedColumn(column_t *column);
|
void R_DrawMaskedColumn(column_t *column);
|
||||||
void R_DrawFlippedMaskedColumn(column_t *column, INT32 texheight);
|
void R_DrawFlippedMaskedColumn(column_t *column, INT32 texheight);
|
||||||
|
|
||||||
//faB: find sprites in wadfile, replace existing, add new ones
|
// ----------------
|
||||||
// (only sprites from namelist are added or replaced)
|
// SPRITE RENDERING
|
||||||
void R_AddSpriteDefs(UINT16 wadnum);
|
// ----------------
|
||||||
|
|
||||||
|
// Constant arrays used for psprite clipping
|
||||||
|
// and initializing clipping.
|
||||||
|
extern INT16 negonearray[MAXVIDWIDTH];
|
||||||
|
extern INT16 screenheightarray[MAXVIDWIDTH];
|
||||||
|
|
||||||
fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope);
|
fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope);
|
||||||
|
|
||||||
|
|
@ -67,6 +74,9 @@ boolean R_ThingVisibleWithinDist (mobj_t *thing,
|
||||||
boolean R_PrecipThingVisible (precipmobj_t *precipthing,
|
boolean R_PrecipThingVisible (precipmobj_t *precipthing,
|
||||||
fixed_t precip_draw_dist);
|
fixed_t precip_draw_dist);
|
||||||
|
|
||||||
|
// --------------
|
||||||
|
// MASKED DRAWING
|
||||||
|
// --------------
|
||||||
/** Used to count the amount of masked elements
|
/** Used to count the amount of masked elements
|
||||||
* per portal to later group them in separate
|
* per portal to later group them in separate
|
||||||
* drawnode lists.
|
* drawnode lists.
|
||||||
|
|
@ -81,21 +91,18 @@ typedef struct
|
||||||
|
|
||||||
void R_DrawMasked(maskcount_t* masks, UINT8 nummasks);
|
void R_DrawMasked(maskcount_t* masks, UINT8 nummasks);
|
||||||
|
|
||||||
// --------------
|
// ----------
|
||||||
// SPRITE LOADING
|
// VISSPRITES
|
||||||
// --------------
|
// ----------
|
||||||
|
|
||||||
boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef, UINT16 wadnum, UINT16 startlump, UINT16 endlump);
|
// number of sprite lumps for spritewidth,offset,topoffset lookup tables
|
||||||
|
// Fab: this is a hack : should allocate the lookup tables per sprite
|
||||||
|
#define MAXVISSPRITES 2048 // added 2-2-98 was 128
|
||||||
|
|
||||||
// -----------
|
#define VISSPRITECHUNKBITS 6 // 2^6 = 64 sprites per chunk
|
||||||
// SKINS STUFF
|
#define VISSPRITESPERCHUNK (1 << VISSPRITECHUNKBITS)
|
||||||
// -----------
|
#define VISSPRITEINDEXMASK (VISSPRITESPERCHUNK - 1)
|
||||||
|
|
||||||
#include "r_skins.h"
|
|
||||||
|
|
||||||
// -----------
|
|
||||||
// NOT SKINS STUFF !
|
|
||||||
// -----------
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
// actual cuts
|
// actual cuts
|
||||||
|
|
@ -174,6 +181,12 @@ typedef struct vissprite_s
|
||||||
INT32 dispoffset; // copy of info->dispoffset, affects ordering but not drawing
|
INT32 dispoffset; // copy of info->dispoffset, affects ordering but not drawing
|
||||||
} vissprite_t;
|
} vissprite_t;
|
||||||
|
|
||||||
|
extern UINT32 visspritecount;
|
||||||
|
|
||||||
|
// ----------
|
||||||
|
// DRAW NODES
|
||||||
|
// ----------
|
||||||
|
|
||||||
// A drawnode is something that points to a 3D floor, 3D side, or masked
|
// A drawnode is something that points to a 3D floor, 3D side, or masked
|
||||||
// middle texture. This is used for sorting with sprites.
|
// middle texture. This is used for sorting with sprites.
|
||||||
typedef struct drawnode_s
|
typedef struct drawnode_s
|
||||||
|
|
@ -188,10 +201,12 @@ typedef struct drawnode_s
|
||||||
struct drawnode_s *prev;
|
struct drawnode_s *prev;
|
||||||
} drawnode_t;
|
} drawnode_t;
|
||||||
|
|
||||||
extern UINT32 visspritecount;
|
|
||||||
|
|
||||||
void R_InitDrawNodes(void);
|
void R_InitDrawNodes(void);
|
||||||
|
|
||||||
|
// -----------------------
|
||||||
|
// SPRITE FRAME CHARACTERS
|
||||||
|
// -----------------------
|
||||||
|
|
||||||
// Functions to go from sprite character ID to frame number
|
// Functions to go from sprite character ID to frame number
|
||||||
// for 2.1 compatibility this still uses the old 'A' + frame code
|
// for 2.1 compatibility this still uses the old 'A' + frame code
|
||||||
// The use of symbols tends to be painful for wad editors though
|
// The use of symbols tends to be painful for wad editors though
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue