Kart-Public/src/r_splats.h
toaster 97348beb66 Fix all compilation errors (tested using DEBUGMODE=1 and ERRORMODE=1) that remain outstanding. Notably:
* Remove FUNCMATH from all void-returning functions, given GCC80 specifically complains about this case.
	* Extend the length of all extant buffers to the safety threshold recommended by the compiler.
	* Add void casts to WS_getaddrinfo's setting to prevent complaints about incompatible typecasts.
	* Extend the charsel, face, and superface buffer sizes and writes to include the null terminator. (I didn't really want to do this because it's not even particularily NEEDED, but there was literally zero way to get around the request that I could find with multiple online searches. I tried.)
2018-07-07 16:52:01 +01:00

85 lines
2.5 KiB
C

// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1998-2000 by DooM Legacy Team.
// Copyright (C) 1999-2016 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file r_splats.h
/// \brief Flat sprites & splats effects
#ifndef __R_SPLATS_H__
#define __R_SPLATS_H__
#include "r_defs.h"
//#define WALLSPLATS // comment this out to compile without splat effects
/*#ifdef USEASM
#define FLOORSPLATS
#endif*/
#define MAXLEVELSPLATS 1024
// splat flags
#define SPLATDRAWMODE_MASK 0x03 // mask to get drawmode from flags
#define SPLATDRAWMODE_OPAQUE 0x00
#define SPLATDRAWMODE_SHADE 0x01
#define SPLATDRAWMODE_TRANS 0x02
// ==========================================================================
// DEFINITIONS
// ==========================================================================
// WALL SPLATS are patches drawn on top of wall segs
typedef struct wallsplat_s
{
lumpnum_t patch; // lump id.
vertex_t v1, v2; // vertices along the linedef
fixed_t top;
fixed_t offset; // offset in columns<<FRACBITS from start of linedef to start of splat
INT32 flags;
fixed_t *yoffset;
line_t *line; // the parent line of the splat seg
struct wallsplat_s *next;
} wallsplat_t;
// FLOOR SPLATS are pic_t (raw horizontally stored) drawn on top of the floor or ceiling
typedef struct floorsplat_s
{
lumpnum_t pic; // a pic_t lump id
INT32 flags;
INT32 size; // 64, 128, 256, etc.
vertex_t verts[4]; // (x,y) as viewn from above on map
fixed_t z; // z (height) is constant for all the floorsplats
subsector_t *subsector; // the parent subsector
mobj_t *mobj; // Mobj it is tied to
struct floorsplat_s *next;
struct floorsplat_s *nextvis;
} floorsplat_t;
// p_setup.c
fixed_t P_SegLength(seg_t *seg);
// call at P_SetupLevel()
#if !(defined (WALLSPLATS) || defined (FLOORSPLATS))
void R_ClearLevelSplats(void);
#else
void R_ClearLevelSplats(void);
#endif
#ifdef WALLSPLATS
void R_AddWallSplat(line_t *wallline, INT16 sectorside, const char *patchname, fixed_t top,
fixed_t wallfrac, INT32 flags);
#endif
#ifdef FLOORSPLATS
void R_AddFloorSplat(subsector_t *subsec, mobj_t *mobj, const char *picname, fixed_t x, fixed_t y, fixed_t z,
INT32 flags);
#endif
void R_ClearVisibleFloorSplats(void);
void R_AddVisibleFloorSplats(subsector_t *subsec);
void R_DrawVisibleFloorSplats(void);
#endif /*__R_SPLATS_H__*/