mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Remove NOWATER define
This commit is contained in:
parent
c07c80fd9e
commit
8f65b98c24
7 changed files with 25 additions and 60 deletions
|
@ -100,7 +100,10 @@ INT32 dc_numlights = 0, dc_maxlights, dc_texheight;
|
|||
INT32 ds_y, ds_x1, ds_x2;
|
||||
lighttable_t *ds_colormap;
|
||||
lighttable_t *ds_translation; // Lactozilla: Sprite splat drawer
|
||||
|
||||
fixed_t ds_xfrac, ds_yfrac, ds_xstep, ds_ystep;
|
||||
INT32 ds_waterofs, ds_bgofs;
|
||||
|
||||
UINT16 ds_flatwidth, ds_flatheight;
|
||||
boolean ds_powersoftwo;
|
||||
|
||||
|
|
10
src/r_draw.h
10
src/r_draw.h
|
@ -56,7 +56,10 @@ extern INT32 dc_texheight;
|
|||
extern INT32 ds_y, ds_x1, ds_x2;
|
||||
extern lighttable_t *ds_colormap;
|
||||
extern lighttable_t *ds_translation;
|
||||
|
||||
extern fixed_t ds_xfrac, ds_yfrac, ds_xstep, ds_ystep;
|
||||
extern INT32 ds_waterofs, ds_bgofs;
|
||||
|
||||
extern UINT16 ds_flatwidth, ds_flatheight;
|
||||
extern boolean ds_powersoftwo;
|
||||
|
||||
|
@ -188,14 +191,9 @@ void R_DrawTiltedTranslucentFloorSprite_8(void);
|
|||
void R_CalcTiltedLighting(fixed_t start, fixed_t end);
|
||||
extern INT32 tiltlighting[MAXVIDWIDTH];
|
||||
|
||||
#ifndef NOWATER
|
||||
void R_DrawTranslucentWaterSpan_8(void);
|
||||
void R_DrawTiltedTranslucentWaterSpan_8(void);
|
||||
|
||||
extern INT32 ds_bgofs;
|
||||
extern INT32 ds_waterofs;
|
||||
#endif
|
||||
|
||||
void R_DrawFogSpan_8(void);
|
||||
|
||||
// Lactozilla: Non-powers-of-two
|
||||
|
@ -213,10 +211,8 @@ void R_DrawTranslucentFloorSprite_NPO2_8(void);
|
|||
void R_DrawTiltedFloorSprite_NPO2_8(void);
|
||||
void R_DrawTiltedTranslucentFloorSprite_NPO2_8(void);
|
||||
|
||||
#ifndef NOWATER
|
||||
void R_DrawTranslucentWaterSpan_NPO2_8(void);
|
||||
void R_DrawTiltedTranslucentWaterSpan_NPO2_8(void);
|
||||
#endif
|
||||
|
||||
#ifdef USEASM
|
||||
void ASMCALL R_DrawColumn_8_ASM(void);
|
||||
|
|
|
@ -911,7 +911,6 @@ void R_DrawTiltedTranslucentSpan_8(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
/** \brief The R_DrawTiltedTranslucentWaterSpan_8 function
|
||||
Like DrawTiltedTranslucentSpan, but for water
|
||||
*/
|
||||
|
@ -1045,7 +1044,6 @@ void R_DrawTiltedTranslucentWaterSpan_8(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif // NOWATER
|
||||
|
||||
void R_DrawTiltedSplat_8(void)
|
||||
{
|
||||
|
@ -1934,7 +1932,6 @@ void R_DrawTranslucentSpan_8 (void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
void R_DrawTranslucentWaterSpan_8(void)
|
||||
{
|
||||
UINT32 xposition;
|
||||
|
@ -2011,7 +2008,6 @@ void R_DrawTranslucentWaterSpan_8(void)
|
|||
yposition += ystep;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/** \brief The R_DrawFogSpan_8 function
|
||||
Draws the actual span with fogging.
|
||||
|
|
|
@ -1190,7 +1190,6 @@ void R_DrawTranslucentSpan_NPO2_8 (void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
void R_DrawTranslucentWaterSpan_NPO2_8(void)
|
||||
{
|
||||
fixed_t xposition;
|
||||
|
@ -1426,4 +1425,3 @@ void R_DrawTiltedTranslucentWaterSpan_NPO2_8(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif // NOWATER
|
||||
|
|
|
@ -115,15 +115,11 @@ void R_InitPlanes(void)
|
|||
}
|
||||
|
||||
//
|
||||
// Water ripple effect!!
|
||||
// Water ripple effect
|
||||
// Needs the height of the plane, and the vertical position of the span.
|
||||
// Sets planeripple.xfrac and planeripple.yfrac, added to ds_xfrac and ds_yfrac, if the span is not tilted.
|
||||
//
|
||||
|
||||
#ifndef NOWATER
|
||||
INT32 ds_bgofs;
|
||||
INT32 ds_waterofs;
|
||||
|
||||
struct
|
||||
{
|
||||
INT32 offset;
|
||||
|
@ -153,7 +149,6 @@ static void R_UpdatePlaneRipple(void)
|
|||
ds_waterofs = (leveltime & 1)*16384;
|
||||
planeripple.offset = (leveltime * 140);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// R_MapPlane
|
||||
|
@ -219,7 +214,7 @@ void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
|||
ds_yfrac = yoffs - FixedMul(planesin, distance) + (x1 - centerx) * ds_ystep;
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
// Water ripple effect
|
||||
if (planeripple.active)
|
||||
{
|
||||
// Needed for ds_bgofs
|
||||
|
@ -242,7 +237,6 @@ void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
|||
if ((y + ds_bgofs) < 0)
|
||||
ds_bgofs = -y;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (currentplane->slope)
|
||||
ds_colormap = colormaps;
|
||||
|
@ -605,9 +599,7 @@ void R_DrawPlanes(void)
|
|||
visplane_t *pl;
|
||||
INT32 i;
|
||||
|
||||
// Note: are these two lines really needed?
|
||||
// R_DrawSinglePlane and R_DrawSkyPlane do span/column drawer resets themselves anyway
|
||||
spanfunc = spanfuncs[BASEDRAWFUNC];
|
||||
R_UpdatePlaneRipple();
|
||||
|
||||
for (i = 0; i < MAXVISPLANES; i++, pl++)
|
||||
{
|
||||
|
@ -619,10 +611,6 @@ void R_DrawPlanes(void)
|
|||
R_DrawSinglePlane(pl);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
R_UpdatePlaneRipple();
|
||||
#endif
|
||||
}
|
||||
|
||||
// R_DrawSkyPlane
|
||||
|
@ -798,9 +786,7 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
planeripple.active = false;
|
||||
#endif
|
||||
spanfunc = spanfuncs[BASEDRAWFUNC];
|
||||
|
||||
if (pl->polyobj)
|
||||
|
@ -882,7 +868,6 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
}
|
||||
else light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||
|
||||
#ifndef NOWATER
|
||||
if (pl->ffloor->flags & FF_RIPPLE)
|
||||
{
|
||||
INT32 top, bottom;
|
||||
|
@ -908,7 +893,6 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
vid.width, vid.width);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||
|
@ -1016,7 +1000,6 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
yoffs = (fixed_t)(yoffs/fudgecanyon);
|
||||
}
|
||||
|
||||
#ifndef NOWATER
|
||||
if (planeripple.active)
|
||||
{
|
||||
fixed_t plheight = abs(P_GetSlopeZAt(pl->slope, pl->viewx, pl->viewy) - pl->viewz);
|
||||
|
@ -1030,16 +1013,13 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
R_SetSlopePlaneVectors(pl, 0, xoffs, yoffs, fudgecanyon);
|
||||
|
||||
switch (spanfunctype)
|
||||
{
|
||||
#ifndef NOWATER
|
||||
case SPANDRAWFUNC_WATER:
|
||||
spanfunctype = SPANDRAWFUNC_TILTEDWATER;
|
||||
break;
|
||||
#endif
|
||||
case SPANDRAWFUNC_TRANS:
|
||||
spanfunctype = SPANDRAWFUNC_TILTEDTRANS;
|
||||
break;
|
||||
|
|
24
src/screen.c
24
src/screen.c
|
@ -122,42 +122,34 @@ void SCR_SetDrawFuncs(void)
|
|||
colfuncs[COLDRAWFUNC_FOG] = R_DrawFogColumn_8;
|
||||
|
||||
spanfuncs[SPANDRAWFUNC_TRANS] = R_DrawTranslucentSpan_8;
|
||||
spanfuncs[SPANDRAWFUNC_TILTED] = R_DrawTiltedSpan_8;
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDTRANS] = R_DrawTiltedTranslucentSpan_8;
|
||||
spanfuncs[SPANDRAWFUNC_SPLAT] = R_DrawSplat_8;
|
||||
spanfuncs[SPANDRAWFUNC_TRANSSPLAT] = R_DrawTranslucentSplat_8;
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDSPLAT] = R_DrawTiltedSplat_8;
|
||||
spanfuncs[SPANDRAWFUNC_SPRITE] = R_DrawFloorSprite_8;
|
||||
spanfuncs[SPANDRAWFUNC_TRANSSPRITE] = R_DrawTranslucentFloorSprite_8;
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDSPRITE] = R_DrawTiltedFloorSprite_8;
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDTRANSSPRITE] = R_DrawTiltedTranslucentFloorSprite_8;
|
||||
spanfuncs[SPANDRAWFUNC_FOG] = R_DrawFogSpan_8;
|
||||
#ifndef NOWATER
|
||||
spanfuncs[SPANDRAWFUNC_WATER] = R_DrawTranslucentWaterSpan_8;
|
||||
#endif
|
||||
spanfuncs[SPANDRAWFUNC_TILTED] = R_DrawTiltedSpan_8;
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDTRANS] = R_DrawTiltedTranslucentSpan_8;
|
||||
#ifndef NOWATER
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDWATER] = R_DrawTiltedTranslucentWaterSpan_8;
|
||||
#endif
|
||||
spanfuncs[SPANDRAWFUNC_TILTEDSPLAT] = R_DrawTiltedSplat_8;
|
||||
spanfuncs[SPANDRAWFUNC_FOG] = R_DrawFogSpan_8;
|
||||
|
||||
// Lactozilla: Non-powers-of-two
|
||||
spanfuncs_npo2[BASEDRAWFUNC] = R_DrawSpan_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TRANS] = R_DrawTranslucentSpan_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTED] = R_DrawTiltedSpan_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDTRANS] = R_DrawTiltedTranslucentSpan_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_SPLAT] = R_DrawSplat_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TRANSSPLAT] = R_DrawTranslucentSplat_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDSPLAT] = R_DrawTiltedSplat_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_SPRITE] = R_DrawFloorSprite_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TRANSSPRITE] = R_DrawTranslucentFloorSprite_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDSPRITE] = R_DrawTiltedFloorSprite_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDTRANSSPRITE] = R_DrawTiltedTranslucentFloorSprite_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_FOG] = NULL; // Not needed
|
||||
#ifndef NOWATER
|
||||
spanfuncs_npo2[SPANDRAWFUNC_WATER] = R_DrawTranslucentWaterSpan_NPO2_8;
|
||||
#endif
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTED] = R_DrawTiltedSpan_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDTRANS] = R_DrawTiltedTranslucentSpan_NPO2_8;
|
||||
#ifndef NOWATER
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDWATER] = R_DrawTiltedTranslucentWaterSpan_NPO2_8;
|
||||
#endif
|
||||
spanfuncs_npo2[SPANDRAWFUNC_TILTEDSPLAT] = R_DrawTiltedSplat_NPO2_8;
|
||||
spanfuncs_npo2[SPANDRAWFUNC_FOG] = NULL; // Not needed
|
||||
|
||||
#ifdef RUSEASM
|
||||
if (R_ASM)
|
||||
|
|
16
src/screen.h
16
src/screen.h
|
@ -140,22 +140,22 @@ enum
|
|||
{
|
||||
SPANDRAWFUNC_BASE = BASEDRAWFUNC,
|
||||
SPANDRAWFUNC_TRANS,
|
||||
SPANDRAWFUNC_TILTED,
|
||||
SPANDRAWFUNC_TILTEDTRANS,
|
||||
|
||||
SPANDRAWFUNC_SPLAT,
|
||||
SPANDRAWFUNC_TRANSSPLAT,
|
||||
SPANDRAWFUNC_TILTEDSPLAT,
|
||||
|
||||
SPANDRAWFUNC_SPRITE,
|
||||
SPANDRAWFUNC_TRANSSPRITE,
|
||||
SPANDRAWFUNC_TILTEDSPRITE,
|
||||
SPANDRAWFUNC_TILTEDTRANSSPRITE,
|
||||
SPANDRAWFUNC_FOG,
|
||||
#ifndef NOWATER
|
||||
|
||||
SPANDRAWFUNC_WATER,
|
||||
#endif
|
||||
SPANDRAWFUNC_TILTED,
|
||||
SPANDRAWFUNC_TILTEDTRANS,
|
||||
SPANDRAWFUNC_TILTEDSPLAT,
|
||||
#ifndef NOWATER
|
||||
SPANDRAWFUNC_TILTEDWATER,
|
||||
#endif
|
||||
|
||||
SPANDRAWFUNC_FOG,
|
||||
|
||||
SPANDRAWFUNC_MAX
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue