From 7877f8ae0e8808f814e36820891076468ca3dceb Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 27 Sep 2020 17:30:36 -0700 Subject: [PATCH] Fix some merge fuckups --- src/hardware/hw_main.h | 2 +- src/r_draw8.c | 139 ----------------------------------------- 2 files changed, 1 insertion(+), 140 deletions(-) diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index bc4a74e5f..eefcb8651 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -102,7 +102,7 @@ void HWR_ProjectWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, FBITFIELD blend void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo * pSurf, INT32 texnum, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap); void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfaceInfo* Surf, INT32 cutflag, ffloor_t *pfloor); void HWR_DrawSkyWall(FOutVector *wallVerts, FSurfaceInfo *Surf); -void HWR_DrawSkyBackground(float fpov); +void HWR_DrawSkyBackground(player_t *player, float fpov); #ifdef POLYOBJECTS void HWR_AddPolyObjectSegs(void); diff --git a/src/r_draw8.c b/src/r_draw8.c index 6badc16fb..e6116863e 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -916,145 +916,6 @@ void R_DrawTiltedTranslucentSpan_8(void) #endif } -#ifndef NOWATER -/** \brief The R_DrawTiltedTranslucentWaterSpan_8 function - Like DrawTiltedTranslucentSpan, but for water -*/ -void R_DrawTiltedTranslucentWaterSpan_8(void) -{ - // x1, x2 = ds_x1, ds_x2 - int width = ds_x2 - ds_x1; - double iz, uz, vz; - UINT32 u, v; - int i; - - UINT8 *source; - UINT8 *colormap; - UINT8 *dest; - UINT8 *dsrc; - - double startz, startu, startv; - double izstep, uzstep, vzstep; - double endz, endu, endv; - UINT32 stepu, stepv; - - iz = ds_sz.z + ds_sz.y*(centery-ds_y) + ds_sz.x*(ds_x1-centerx); - - // Lighting is simple. It's just linear interpolation from start to end - { - float planelightfloat = PLANELIGHTFLOAT; - float lightstart, lightend; - - lightend = (iz + ds_sz.x*width) * planelightfloat; - lightstart = iz * planelightfloat; - - R_CalcTiltedLighting(FLOAT_TO_FIXED(lightstart), FLOAT_TO_FIXED(lightend)); - //CONS_Printf("tilted lighting %f to %f (foc %f)\n", lightstart, lightend, focallengthf); - } - - uz = ds_su.z + ds_su.y*(centery-ds_y) + ds_su.x*(ds_x1-centerx); - vz = ds_sv.z + ds_sv.y*(centery-ds_y) + ds_sv.x*(ds_x1-centerx); - - dest = ylookup[ds_y] + columnofs[ds_x1]; - dsrc = screens[1] + (ds_y+ds_bgofs)*vid.width + ds_x1; - source = ds_source; - //colormap = ds_colormap; - -#if 0 // The "perfect" reference version of this routine. Pretty slow. - // Use it only to see how things are supposed to look. - i = 0; - do - { - double z = 1.f/iz; - u = (INT64)(uz*z) + viewx; - v = (INT64)(vz*z) + viewy; - - colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - *dest = *(ds_transmap + (colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]] << 8) + *dsrc++); - dest++; - iz += ds_sz.x; - uz += ds_su.x; - vz += ds_sv.x; - } while (--width >= 0); -#else -#define SPANSIZE 16 -#define INVSPAN 0.0625f - - startz = 1.f/iz; - startu = uz*startz; - startv = vz*startz; - - izstep = ds_sz.x * SPANSIZE; - uzstep = ds_su.x * SPANSIZE; - vzstep = ds_sv.x * SPANSIZE; - //x1 = 0; - width++; - - while (width >= SPANSIZE) - { - iz += izstep; - uz += uzstep; - vz += vzstep; - - endz = 1.f/iz; - endu = uz*endz; - endv = vz*endz; - stepu = (INT64)((endu - startu) * INVSPAN); - stepv = (INT64)((endv - startv) * INVSPAN); - u = (INT64)(startu) + viewx; - v = (INT64)(startv) + viewy; - - for (i = SPANSIZE-1; i >= 0; i--) - { - colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - *dest = *(ds_transmap + (colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]] << 8) + *dsrc++); - dest++; - u += stepu; - v += stepv; - } - startu = endu; - startv = endv; - width -= SPANSIZE; - } - if (width > 0) - { - if (width == 1) - { - u = (INT64)(startu); - v = (INT64)(startv); - colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - *dest = *(ds_transmap + (colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]] << 8) + *dsrc++); - } - else - { - double left = width; - iz += ds_sz.x * left; - uz += ds_su.x * left; - vz += ds_sv.x * left; - - endz = 1.f/iz; - endu = uz*endz; - endv = vz*endz; - left = 1.f/left; - stepu = (INT64)((endu - startu) * left); - stepv = (INT64)((endv - startv) * left); - u = (INT64)(startu) + viewx; - v = (INT64)(startv) + viewy; - - for (; width != 0; width--) - { - colormap = planezlight[tiltlighting[ds_x1++]] + (ds_colormap - colormaps); - *dest = *(ds_transmap + (colormap[source[((v >> nflatyshift) & nflatmask) | (u >> nflatxshift)]] << 8) + *dsrc++); - dest++; - u += stepu; - v += stepv; - } - } - } -#endif -} -#endif // NOWATER - void R_DrawTiltedSplat_8(void) { // x1, x2 = ds_x1, ds_x2