Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into s_skinprovements

This commit is contained in:
toasterbabe 2016-08-30 13:30:56 +01:00
commit 8d8be8a7b2
11 changed files with 114 additions and 79 deletions

View file

@ -162,28 +162,28 @@ matrix:
- clang-3.8 - clang-3.8
compiler: clang-3.8 compiler: clang-3.8
#clang version 3.8.1-svn271127-1~exp1 (branches/release_38) #clang version 3.8.1-svn271127-1~exp1 (branches/release_38)
- os: osx
osx_image: beta-xcode6.1
#Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
- os: osx
osx_image: beta-xcode6.2
compiler: gcc
#Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
# - os: osx # - os: osx
# osx_image: beta-xcode6.3 # osx_image: beta-xcode6.1
# #I think xcode.6.3 VM is broken, it does not boot # #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
- os: osx # - os: osx
osx_image: xcode6.4 # osx_image: beta-xcode6.2
#Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) # compiler: gcc
- os: osx # #Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
osx_image: xcode7 ## - os: osx
#Apple LLVM version 7.0.0 (clang-700.0.72) ## osx_image: beta-xcode6.3
- os: osx ## #I think xcode.6.3 VM is broken, it does not boot
osx_image: xcode7.1 # - os: osx
#Apple LLVM version 7.0.0 (clang-700.1.76) # osx_image: xcode6.4
- os: osx # #Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
osx_image: xcode7.2 # - os: osx
#Apple LLVM version 7.0.2 (clang-700.1.81) # osx_image: xcode7
# #Apple LLVM version 7.0.0 (clang-700.0.72)
# - os: osx
# osx_image: xcode7.1
# #Apple LLVM version 7.0.0 (clang-700.1.76)
# - os: osx
# osx_image: xcode7.2
# #Apple LLVM version 7.0.2 (clang-700.1.81)
- os: osx - os: osx
osx_image: xcode7.3 osx_image: xcode7.3
#Apple LLVM version 7.3.0 (clang-703.0.31) #Apple LLVM version 7.3.0 (clang-703.0.31)

View file

@ -66,9 +66,9 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing);
#endif #endif
#ifdef SORTING #ifdef SORTING
void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub, fixed_t fixedheight, void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub, boolean isceiling, fixed_t fixedheight,
INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, boolean fogplane, extracolormap_t *planecolormap); INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, boolean fogplane, extracolormap_t *planecolormap);
void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector, fixed_t fixedheight, void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector, boolean isceiling, fixed_t fixedheight,
INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, extracolormap_t *planecolormap); INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, extracolormap_t *planecolormap);
#else #else
static void HWR_Add3DWater(lumpnum_t lumpnum, extrasubsector_t *xsub, fixed_t fixedheight, static void HWR_Add3DWater(lumpnum_t lumpnum, extrasubsector_t *xsub, fixed_t fixedheight,
@ -521,7 +521,7 @@ static UINT8 HWR_FogBlockAlpha(INT32 light, UINT32 color, UINT32 fadecolor) // L
// -----------------+ // -----------------+
// HWR_RenderPlane : Render a floor or ceiling convex polygon // HWR_RenderPlane : Render a floor or ceiling convex polygon
// -----------------+ // -----------------+
static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fixedheight, static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean isceiling, fixed_t fixedheight,
FBITFIELD PolyFlags, INT32 lightlevel, lumpnum_t lumpnum, sector_t *FOFsector, UINT8 alpha, boolean fogplane, extracolormap_t *planecolormap) FBITFIELD PolyFlags, INT32 lightlevel, lumpnum_t lumpnum, sector_t *FOFsector, UINT8 alpha, boolean fogplane, extracolormap_t *planecolormap)
{ {
polyvertex_t * pv; polyvertex_t * pv;
@ -554,17 +554,16 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
// Get the slope pointer to simplify future code // Get the slope pointer to simplify future code
if (FOFsector) if (FOFsector)
{ {
if (FOFsector->f_slope && FOFsector->floorheight == fixedheight) if (FOFsector->f_slope && !isceiling)
slope = FOFsector->f_slope; slope = FOFsector->f_slope;
else if (FOFsector->c_slope && FOFsector->ceilingheight == fixedheight) else if (FOFsector->c_slope && isceiling)
slope = FOFsector->c_slope; slope = FOFsector->c_slope;
} }
else else
{ {
// Use fixedheight to determine whether to check floor or ceiling because I hate my life if (gr_frontsector->f_slope && !isceiling)
if (gr_frontsector->f_slope && gr_frontsector->floorheight == fixedheight)
slope = gr_frontsector->f_slope; slope = gr_frontsector->f_slope;
else if (gr_frontsector->c_slope && gr_frontsector->ceilingheight == fixedheight) else if (gr_frontsector->c_slope && isceiling)
slope = gr_frontsector->c_slope; slope = gr_frontsector->c_slope;
} }
@ -638,12 +637,7 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
if (FOFsector != NULL) if (FOFsector != NULL)
{ {
#ifdef ESLOPE if (!isceiling) // it's a floor
if ((slope && slope == FOFsector->f_slope)
|| fixedheight == FOFsector->floorheight) // it's a floor
#else
if (fixedheight == FOFsector->floorheight) // it's a floor
#endif
{ {
scrollx = FIXED_TO_FLOAT(FOFsector->floor_xoffs)/fflatsize; scrollx = FIXED_TO_FLOAT(FOFsector->floor_xoffs)/fflatsize;
scrolly = FIXED_TO_FLOAT(FOFsector->floor_yoffs)/fflatsize; scrolly = FIXED_TO_FLOAT(FOFsector->floor_yoffs)/fflatsize;
@ -658,12 +652,7 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
} }
else if (gr_frontsector) else if (gr_frontsector)
{ {
#ifdef ESLOPE if (!isceiling) // it's a floor
if ((slope && slope == gr_frontsector->f_slope)
|| fixedheight == gr_frontsector->floorheight) // it's a floor
#else
if (fixedheight < dup_viewz) // it's a floor
#endif
{ {
scrollx = FIXED_TO_FLOAT(gr_frontsector->floor_xoffs)/fflatsize; scrollx = FIXED_TO_FLOAT(gr_frontsector->floor_xoffs)/fflatsize;
scrolly = FIXED_TO_FLOAT(gr_frontsector->floor_yoffs)/fflatsize; scrolly = FIXED_TO_FLOAT(gr_frontsector->floor_yoffs)/fflatsize;
@ -3111,7 +3100,7 @@ static inline void HWR_AddPolyObjectSegs(void)
} }
#ifdef POLYOBJECTS_PLANES #ifdef POLYOBJECTS_PLANES
static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, fixed_t fixedheight, static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, boolean isceiling, fixed_t fixedheight,
FBITFIELD blendmode, UINT8 lightlevel, lumpnum_t lumpnum, sector_t *FOFsector, FBITFIELD blendmode, UINT8 lightlevel, lumpnum_t lumpnum, sector_t *FOFsector,
UINT8 alpha, extracolormap_t *planecolormap) UINT8 alpha, extracolormap_t *planecolormap)
{ {
@ -3195,7 +3184,7 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, fixed_t fixedheight
if (FOFsector != NULL) if (FOFsector != NULL)
{ {
if (fixedheight == FOFsector->floorheight) // it's a floor if (!isceiling) // it's a floor
{ {
scrollx = FIXED_TO_FLOAT(FOFsector->floor_xoffs)/fflatsize; scrollx = FIXED_TO_FLOAT(FOFsector->floor_xoffs)/fflatsize;
scrolly = FIXED_TO_FLOAT(FOFsector->floor_yoffs)/fflatsize; scrolly = FIXED_TO_FLOAT(FOFsector->floor_yoffs)/fflatsize;
@ -3210,7 +3199,7 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, fixed_t fixedheight
} }
else if (gr_frontsector) else if (gr_frontsector)
{ {
if (fixedheight < dup_viewz) // it's a floor if (!isceiling) // it's a floor
{ {
scrollx = FIXED_TO_FLOAT(gr_frontsector->floor_xoffs)/fflatsize; scrollx = FIXED_TO_FLOAT(gr_frontsector->floor_xoffs)/fflatsize;
scrolly = FIXED_TO_FLOAT(gr_frontsector->floor_yoffs)/fflatsize; scrolly = FIXED_TO_FLOAT(gr_frontsector->floor_yoffs)/fflatsize;
@ -3303,13 +3292,13 @@ static void HWR_AddPolyObjectPlanes(void)
{ {
FSurfaceInfo Surf; FSurfaceInfo Surf;
FBITFIELD blendmode = HWR_TranstableToAlpha(po_ptrs[i]->translucency, &Surf); FBITFIELD blendmode = HWR_TranstableToAlpha(po_ptrs[i]->translucency, &Surf);
HWR_AddTransparentPolyobjectFloor(levelflats[polyobjsector->floorpic].lumpnum, po_ptrs[i], polyobjsector->floorheight, HWR_AddTransparentPolyobjectFloor(levelflats[polyobjsector->floorpic].lumpnum, po_ptrs[i], false, polyobjsector->floorheight,
polyobjsector->lightlevel, Surf.FlatColor.s.alpha, polyobjsector, blendmode, NULL); polyobjsector->lightlevel, Surf.FlatColor.s.alpha, polyobjsector, blendmode, NULL);
} }
else else
{ {
HWR_GetFlat(levelflats[polyobjsector->floorpic].lumpnum); HWR_GetFlat(levelflats[polyobjsector->floorpic].lumpnum);
HWR_RenderPolyObjectPlane(po_ptrs[i], polyobjsector->floorheight, PF_Occlude, HWR_RenderPolyObjectPlane(po_ptrs[i], false, polyobjsector->floorheight, PF_Occlude,
polyobjsector->lightlevel, levelflats[polyobjsector->floorpic].lumpnum, polyobjsector->lightlevel, levelflats[polyobjsector->floorpic].lumpnum,
polyobjsector, 255, NULL); polyobjsector, 255, NULL);
} }
@ -3325,13 +3314,13 @@ static void HWR_AddPolyObjectPlanes(void)
FBITFIELD blendmode; FBITFIELD blendmode;
memset(&Surf, 0x00, sizeof(Surf)); memset(&Surf, 0x00, sizeof(Surf));
blendmode = HWR_TranstableToAlpha(po_ptrs[i]->translucency, &Surf); blendmode = HWR_TranstableToAlpha(po_ptrs[i]->translucency, &Surf);
HWR_AddTransparentPolyobjectFloor(levelflats[polyobjsector->ceilingpic].lumpnum, po_ptrs[i], polyobjsector->ceilingheight, HWR_AddTransparentPolyobjectFloor(levelflats[polyobjsector->ceilingpic].lumpnum, po_ptrs[i], true, polyobjsector->ceilingheight,
polyobjsector->lightlevel, Surf.FlatColor.s.alpha, polyobjsector, blendmode, NULL); polyobjsector->lightlevel, Surf.FlatColor.s.alpha, polyobjsector, blendmode, NULL);
} }
else else
{ {
HWR_GetFlat(levelflats[polyobjsector->ceilingpic].lumpnum); HWR_GetFlat(levelflats[polyobjsector->ceilingpic].lumpnum);
HWR_RenderPolyObjectPlane(po_ptrs[i], polyobjsector->ceilingheight, PF_Occlude, HWR_RenderPolyObjectPlane(po_ptrs[i], true, polyobjsector->ceilingheight, PF_Occlude,
polyobjsector->lightlevel, levelflats[polyobjsector->floorpic].lumpnum, polyobjsector->lightlevel, levelflats[polyobjsector->floorpic].lumpnum,
polyobjsector, 255, NULL); polyobjsector, 255, NULL);
} }
@ -3485,7 +3474,7 @@ static void HWR_Subsector(size_t num)
if (sub->validcount != validcount) if (sub->validcount != validcount)
{ {
HWR_GetFlat(levelflats[gr_frontsector->floorpic].lumpnum); HWR_GetFlat(levelflats[gr_frontsector->floorpic].lumpnum);
HWR_RenderPlane(gr_frontsector, &extrasubsectors[num], HWR_RenderPlane(gr_frontsector, &extrasubsectors[num], false,
// Hack to make things continue to work around slopes. // Hack to make things continue to work around slopes.
locFloorHeight == cullFloorHeight ? locFloorHeight : gr_frontsector->floorheight, locFloorHeight == cullFloorHeight ? locFloorHeight : gr_frontsector->floorheight,
// We now return you to your regularly scheduled rendering. // We now return you to your regularly scheduled rendering.
@ -3507,7 +3496,7 @@ static void HWR_Subsector(size_t num)
if (sub->validcount != validcount) if (sub->validcount != validcount)
{ {
HWR_GetFlat(levelflats[gr_frontsector->ceilingpic].lumpnum); HWR_GetFlat(levelflats[gr_frontsector->ceilingpic].lumpnum);
HWR_RenderPlane(NULL, &extrasubsectors[num], HWR_RenderPlane(NULL, &extrasubsectors[num], true,
// Hack to make things continue to work around slopes. // Hack to make things continue to work around slopes.
locCeilingHeight == cullCeilingHeight ? locCeilingHeight : gr_frontsector->ceilingheight, locCeilingHeight == cullCeilingHeight ? locCeilingHeight : gr_frontsector->ceilingheight,
// We now return you to your regularly scheduled rendering. // We now return you to your regularly scheduled rendering.
@ -3576,6 +3565,7 @@ static void HWR_Subsector(size_t num)
HWR_AddTransparentFloor(0, HWR_AddTransparentFloor(0,
&extrasubsectors[num], &extrasubsectors[num],
false,
*rover->bottomheight, *rover->bottomheight,
*gr_frontsector->lightlist[light].lightlevel, *gr_frontsector->lightlist[light].lightlevel,
alpha, rover->master->frontsector, PF_Translucent|PF_NoTexture, alpha, rover->master->frontsector, PF_Translucent|PF_NoTexture,
@ -3593,6 +3583,7 @@ static void HWR_Subsector(size_t num)
#else #else
HWR_AddTransparentFloor(levelflats[*rover->bottompic].lumpnum, HWR_AddTransparentFloor(levelflats[*rover->bottompic].lumpnum,
&extrasubsectors[num], &extrasubsectors[num],
false,
*rover->bottomheight, *rover->bottomheight,
*gr_frontsector->lightlist[light].lightlevel, *gr_frontsector->lightlist[light].lightlevel,
rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, PF_Translucent, rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, PF_Translucent,
@ -3603,7 +3594,7 @@ static void HWR_Subsector(size_t num)
{ {
HWR_GetFlat(levelflats[*rover->bottompic].lumpnum); HWR_GetFlat(levelflats[*rover->bottompic].lumpnum);
light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false); light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
HWR_RenderPlane(NULL, &extrasubsectors[num], *rover->bottomheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, levelflats[*rover->bottompic].lumpnum, HWR_RenderPlane(NULL, &extrasubsectors[num], false, *rover->bottomheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, levelflats[*rover->bottompic].lumpnum,
rover->master->frontsector, 255, false, gr_frontsector->lightlist[light].extra_colormap); rover->master->frontsector, 255, false, gr_frontsector->lightlist[light].extra_colormap);
} }
} }
@ -3637,6 +3628,7 @@ static void HWR_Subsector(size_t num)
HWR_AddTransparentFloor(0, HWR_AddTransparentFloor(0,
&extrasubsectors[num], &extrasubsectors[num],
true,
*rover->topheight, *rover->topheight,
*gr_frontsector->lightlist[light].lightlevel, *gr_frontsector->lightlist[light].lightlevel,
alpha, rover->master->frontsector, PF_Translucent|PF_NoTexture, alpha, rover->master->frontsector, PF_Translucent|PF_NoTexture,
@ -3654,6 +3646,7 @@ static void HWR_Subsector(size_t num)
#else #else
HWR_AddTransparentFloor(levelflats[*rover->toppic].lumpnum, HWR_AddTransparentFloor(levelflats[*rover->toppic].lumpnum,
&extrasubsectors[num], &extrasubsectors[num],
true,
*rover->topheight, *rover->topheight,
*gr_frontsector->lightlist[light].lightlevel, *gr_frontsector->lightlist[light].lightlevel,
rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, PF_Translucent, rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, PF_Translucent,
@ -3665,7 +3658,7 @@ static void HWR_Subsector(size_t num)
{ {
HWR_GetFlat(levelflats[*rover->toppic].lumpnum); HWR_GetFlat(levelflats[*rover->toppic].lumpnum);
light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false); light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
HWR_RenderPlane(NULL, &extrasubsectors[num], *rover->topheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, levelflats[*rover->toppic].lumpnum, HWR_RenderPlane(NULL, &extrasubsectors[num], true, *rover->topheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, levelflats[*rover->toppic].lumpnum,
rover->master->frontsector, 255, false, gr_frontsector->lightlist[light].extra_colormap); rover->master->frontsector, 255, false, gr_frontsector->lightlist[light].extra_colormap);
} }
} }
@ -4592,6 +4585,7 @@ static void HWR_RenderWall(wallVert3D *wallVerts, FSurfaceInfo *pSurf, FBITFIE
typedef struct typedef struct
{ {
extrasubsector_t *xsub; extrasubsector_t *xsub;
boolean isceiling;
fixed_t fixedheight; fixed_t fixedheight;
INT32 lightlevel; INT32 lightlevel;
lumpnum_t lumpnum; lumpnum_t lumpnum;
@ -4609,6 +4603,7 @@ static planeinfo_t *planeinfo = NULL;
typedef struct typedef struct
{ {
polyobj_t *polysector; polyobj_t *polysector;
boolean isceiling;
fixed_t fixedheight; fixed_t fixedheight;
INT32 lightlevel; INT32 lightlevel;
lumpnum_t lumpnum; lumpnum_t lumpnum;
@ -4644,7 +4639,7 @@ static INT32 drawcount = 0;
#define MAX_TRANSPARENTFLOOR 512 #define MAX_TRANSPARENTFLOOR 512
// This will likely turn into a copy of HWR_Add3DWater and replace it. // This will likely turn into a copy of HWR_Add3DWater and replace it.
void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub, void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub, boolean isceiling,
fixed_t fixedheight, INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, boolean fogplane, extracolormap_t *planecolormap) fixed_t fixedheight, INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, boolean fogplane, extracolormap_t *planecolormap)
{ {
static size_t allocedplanes = 0; static size_t allocedplanes = 0;
@ -4659,6 +4654,7 @@ void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub,
Z_Realloc(planeinfo, allocedplanes * sizeof (*planeinfo), PU_LEVEL, &planeinfo); Z_Realloc(planeinfo, allocedplanes * sizeof (*planeinfo), PU_LEVEL, &planeinfo);
} }
planeinfo[numplanes].isceiling = isceiling;
planeinfo[numplanes].fixedheight = fixedheight; planeinfo[numplanes].fixedheight = fixedheight;
planeinfo[numplanes].lightlevel = lightlevel; planeinfo[numplanes].lightlevel = lightlevel;
planeinfo[numplanes].lumpnum = lumpnum; planeinfo[numplanes].lumpnum = lumpnum;
@ -4669,12 +4665,13 @@ void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub,
planeinfo[numplanes].fogplane = fogplane; planeinfo[numplanes].fogplane = fogplane;
planeinfo[numplanes].planecolormap = planecolormap; planeinfo[numplanes].planecolormap = planecolormap;
planeinfo[numplanes].drawcount = drawcount++; planeinfo[numplanes].drawcount = drawcount++;
numplanes++; numplanes++;
} }
// Adding this for now until I can create extrasubsector info for polyobjects // Adding this for now until I can create extrasubsector info for polyobjects
// When that happens it'll just be done through HWR_AddTransparentFloor and HWR_RenderPlane // When that happens it'll just be done through HWR_AddTransparentFloor and HWR_RenderPlane
void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector, void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector, boolean isceiling,
fixed_t fixedheight, INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, extracolormap_t *planecolormap) fixed_t fixedheight, INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, extracolormap_t *planecolormap)
{ {
static size_t allocedpolyplanes = 0; static size_t allocedpolyplanes = 0;
@ -4689,6 +4686,7 @@ void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector,
Z_Realloc(polyplaneinfo, allocedpolyplanes * sizeof (*polyplaneinfo), PU_LEVEL, &polyplaneinfo); Z_Realloc(polyplaneinfo, allocedpolyplanes * sizeof (*polyplaneinfo), PU_LEVEL, &polyplaneinfo);
} }
polyplaneinfo[numpolyplanes].isceiling = isceiling;
polyplaneinfo[numpolyplanes].fixedheight = fixedheight; polyplaneinfo[numpolyplanes].fixedheight = fixedheight;
polyplaneinfo[numpolyplanes].lightlevel = lightlevel; polyplaneinfo[numpolyplanes].lightlevel = lightlevel;
polyplaneinfo[numpolyplanes].lumpnum = lumpnum; polyplaneinfo[numpolyplanes].lumpnum = lumpnum;
@ -4854,7 +4852,7 @@ static void HWR_CreateDrawNodes(void)
if (!(sortnode[sortindex[i]].plane->blend & PF_NoTexture)) if (!(sortnode[sortindex[i]].plane->blend & PF_NoTexture))
HWR_GetFlat(sortnode[sortindex[i]].plane->lumpnum); HWR_GetFlat(sortnode[sortindex[i]].plane->lumpnum);
HWR_RenderPlane(NULL, sortnode[sortindex[i]].plane->xsub, sortnode[sortindex[i]].plane->fixedheight, sortnode[sortindex[i]].plane->blend, sortnode[sortindex[i]].plane->lightlevel, HWR_RenderPlane(NULL, sortnode[sortindex[i]].plane->xsub, sortnode[sortindex[i]].plane->isceiling, sortnode[sortindex[i]].plane->fixedheight, sortnode[sortindex[i]].plane->blend, sortnode[sortindex[i]].plane->lightlevel,
sortnode[sortindex[i]].plane->lumpnum, sortnode[sortindex[i]].plane->FOFSector, sortnode[sortindex[i]].plane->alpha, sortnode[sortindex[i]].plane->fogplane, sortnode[sortindex[i]].plane->planecolormap); sortnode[sortindex[i]].plane->lumpnum, sortnode[sortindex[i]].plane->FOFSector, sortnode[sortindex[i]].plane->alpha, sortnode[sortindex[i]].plane->fogplane, sortnode[sortindex[i]].plane->planecolormap);
} }
else if (sortnode[sortindex[i]].polyplane) else if (sortnode[sortindex[i]].polyplane)
@ -4864,7 +4862,7 @@ static void HWR_CreateDrawNodes(void)
if (!(sortnode[sortindex[i]].polyplane->blend & PF_NoTexture)) if (!(sortnode[sortindex[i]].polyplane->blend & PF_NoTexture))
HWR_GetFlat(sortnode[sortindex[i]].polyplane->lumpnum); HWR_GetFlat(sortnode[sortindex[i]].polyplane->lumpnum);
HWR_RenderPolyObjectPlane(sortnode[sortindex[i]].polyplane->polysector, sortnode[sortindex[i]].polyplane->fixedheight, sortnode[sortindex[i]].polyplane->blend, sortnode[sortindex[i]].polyplane->lightlevel, HWR_RenderPolyObjectPlane(sortnode[sortindex[i]].polyplane->polysector, sortnode[sortindex[i]].polyplane->isceiling, sortnode[sortindex[i]].polyplane->fixedheight, sortnode[sortindex[i]].polyplane->blend, sortnode[sortindex[i]].polyplane->lightlevel,
sortnode[sortindex[i]].polyplane->lumpnum, sortnode[sortindex[i]].polyplane->FOFSector, sortnode[sortindex[i]].polyplane->alpha, sortnode[sortindex[i]].polyplane->planecolormap); sortnode[sortindex[i]].polyplane->lumpnum, sortnode[sortindex[i]].polyplane->FOFSector, sortnode[sortindex[i]].polyplane->alpha, sortnode[sortindex[i]].polyplane->planecolormap);
} }
else if (sortnode[sortindex[i]].wall) else if (sortnode[sortindex[i]].wall)
@ -6168,7 +6166,7 @@ static void HWR_Render3DWater(void)
for (i = 0; i < numfloors; i++) for (i = 0; i < numfloors; i++)
{ {
HWR_GetFlat(planeinfo[i].lumpnum); HWR_GetFlat(planeinfo[i].lumpnum);
HWR_RenderPlane(NULL, planeinfo[i].xsub, planeinfo[i].fixedheight, PF_Translucent, planeinfo[i].lightlevel, planeinfo[i].lumpnum, HWR_RenderPlane(NULL, planeinfo[i].xsub, planeinfo[i].isceiling, planeinfo[i].fixedheight, PF_Translucent, planeinfo[i].lightlevel, planeinfo[i].lumpnum,
planeinfo[i].FOFSector, planeinfo[i].alpha, planeinfo[i].fogplane, planeinfo[i].planecolormap); planeinfo[i].FOFSector, planeinfo[i].alpha, planeinfo[i].fogplane, planeinfo[i].planecolormap);
} }
numfloors = 0; numfloors = 0;

View file

@ -18,6 +18,9 @@ enum hud {
hud_time, hud_time,
hud_rings, hud_rings,
hud_lives, hud_lives,
// Match / CTF / Tag / Ringslinger
hud_weaponrings,
hud_powerstones,
// NiGHTS mode // NiGHTS mode
hud_nightslink, hud_nightslink,
hud_nightsdrill, hud_nightsdrill,

View file

@ -44,6 +44,9 @@ static const char *const hud_disable_options[] = {
"rings", "rings",
"lives", "lives",
"weaponrings",
"powerstones",
"nightslink", "nightslink",
"nightsdrill", "nightsdrill",
"nightsrings", "nightsrings",

View file

@ -2126,8 +2126,12 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
} }
// Ramp test // Ramp test
if (thing->player && maxstep > 0 if (maxstep > 0 && !(
&& !(P_PlayerTouchingSectorSpecial(thing->player, 1, 14) || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)) thing->player && (
P_PlayerTouchingSectorSpecial(thing->player, 1, 14)
|| GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)
)
)
{ {
// If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS // If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS
// step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more. // step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more.
@ -2813,7 +2817,7 @@ isblocking:
// see about climbing on the wall // see about climbing on the wall
if (!(checkline->flags & ML_NOCLIMB)) if (!(checkline->flags & ML_NOCLIMB))
{ {
boolean canclimb; // FUCK C90 boolean canclimb;
angle_t climbangle, climbline; angle_t climbangle, climbline;
INT32 whichside = P_PointOnLineSide(slidemo->x, slidemo->y, li); INT32 whichside = P_PointOnLineSide(slidemo->x, slidemo->y, li);

View file

@ -2000,8 +2000,6 @@ void P_XYMovement(mobj_t *mo)
I_Assert(mo != NULL); I_Assert(mo != NULL);
I_Assert(!P_MobjWasRemoved(mo)); I_Assert(!P_MobjWasRemoved(mo));
moved = true;
// if it's stopped // if it's stopped
if (!mo->momx && !mo->momy) if (!mo->momx && !mo->momy)
{ {
@ -2058,9 +2056,9 @@ void P_XYMovement(mobj_t *mo)
if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true) && !(mo->eflags & MFE_SPRUNG)) if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true) && !(mo->eflags & MFE_SPRUNG))
{ {
// blocked move // blocked move
moved = false;
if (player) { if (player) {
moved = false;
if (player->bot) if (player->bot)
B_MoveBlocked(player); B_MoveBlocked(player);
} }
@ -2165,7 +2163,7 @@ void P_XYMovement(mobj_t *mo)
else else
mo->momx = mo->momy = 0; mo->momx = mo->momy = 0;
} }
else if (player) else
moved = true; moved = true;
if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;; if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;;
@ -2725,6 +2723,12 @@ static boolean P_ZMovement(mobj_t *mo)
mo->z = mo->floorz; mo->z = mo->floorz;
#ifdef ESLOPE #ifdef ESLOPE
if (mo->standingslope) // You're still on the ground; why are we here?
{
mo->momz = 0;
return true;
}
P_CheckPosition(mo, mo->x, mo->y); // Sets mo->standingslope correctly P_CheckPosition(mo, mo->x, mo->y); // Sets mo->standingslope correctly
if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM)) if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM))
{ {

View file

@ -2290,25 +2290,24 @@ static void P_DoClimbing(player_t *player)
fixed_t platy; fixed_t platy;
subsector_t *glidesector; subsector_t *glidesector;
boolean climb = true; boolean climb = true;
boolean onesided = ((player->lastsidehit != -1 && player->lastlinehit != -1) && !(lines[player->lastlinehit].backsector));
platx = P_ReturnThrustX(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale)); platx = P_ReturnThrustX(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale));
platy = P_ReturnThrustY(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale)); platy = P_ReturnThrustY(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale));
glidesector = R_IsPointInSubsector(player->mo->x + platx, player->mo->y + platy); glidesector = R_PointInSubsector(player->mo->x + platx, player->mo->y + platy);
if (!glidesector || glidesector->sector != player->mo->subsector->sector) if (onesided || glidesector->sector != player->mo->subsector->sector)
{ {
boolean floorclimb; boolean floorclimb = false;
boolean thrust; boolean thrust = false;
boolean boostup; boolean boostup = false;
boolean skyclimber; boolean skyclimber = false;
fixed_t floorheight, ceilingheight; // ESLOPE fixed_t floorheight, ceilingheight; // ESLOPE
thrust = false;
floorclimb = false;
boostup = false;
skyclimber = false;
if (glidesector) if (onesided)
floorclimb = true;
else
{ {
#ifdef ESLOPE #ifdef ESLOPE
floorheight = glidesector->sector->f_slope ? P_GetZAt(glidesector->sector->f_slope, player->mo->x, player->mo->y) floorheight = glidesector->sector->f_slope ? P_GetZAt(glidesector->sector->f_slope, player->mo->x, player->mo->y)
@ -2603,8 +2602,6 @@ static void P_DoClimbing(player_t *player)
} }
} }
} }
else
floorclimb = true;
if (player->lastsidehit != -1 && player->lastlinehit != -1) if (player->lastsidehit != -1 && player->lastlinehit != -1)
{ {

View file

@ -1363,7 +1363,19 @@ void R_DrawColumnShadowed_8(void)
height = dc_lightlist[i].height >> LIGHTSCALESHIFT; height = dc_lightlist[i].height >> LIGHTSCALESHIFT;
if (solid) if (solid)
{
bheight = dc_lightlist[i].botheight >> LIGHTSCALESHIFT; bheight = dc_lightlist[i].botheight >> LIGHTSCALESHIFT;
if (bheight < height)
{
// confounded slopes sometimes allow partial invertedness,
// even including cases where the top and bottom heights
// should actually be the same!
// swap the height values as a workaround for this quirk
INT32 temp = height;
height = bheight;
bheight = temp;
}
}
if (height <= dc_yl) if (height <= dc_yl)
{ {
dc_colormap = dc_lightlist[i].rcolormap; dc_colormap = dc_lightlist[i].rcolormap;

View file

@ -771,7 +771,7 @@ subsector_t *R_PointInSubsector(fixed_t x, fixed_t y)
} }
// //
// R_IsPointInSubsector, same as above but returns 0 if not in subsector // R_IsPointInSubsector, same as above but returns 0 if not in subsector - this does not work in opengl because of polyvertex_t
// //
subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y) subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y)
{ {

View file

@ -147,7 +147,7 @@ static void R_InstallSpriteLump(UINT16 wad, // graphics patch
if (sprtemp[frame].rotate == (SRF_3D|SRF_2D)) if (sprtemp[frame].rotate == (SRF_3D|SRF_2D))
sprtemp[frame].rotate = SRF_2D; // SRF_3D|SRF_2D being enabled at the same time doesn't HURT in the current sprite angle implementation, but it DOES mean more to check in some of the helper functions. Let's not allow this scenario to happen. sprtemp[frame].rotate = SRF_2D; // SRF_3D|SRF_2D being enabled at the same time doesn't HURT in the current sprite angle implementation, but it DOES mean more to check in some of the helper functions. Let's not allow this scenario to happen.
for (r = 1; r < 4; r++) // Don't set for front/back frames for (r = 0; r < 4; r++) // Thanks to R_PrecacheLevel, we can't leave sprtemp[*].lumppat[*] == LUMPERROR... so we load into the front/back angle too.
{ {
sprtemp[frame].lumppat[r + rightfactor] = lumppat; sprtemp[frame].lumppat[r + rightfactor] = lumppat;
sprtemp[frame].lumpid[r + rightfactor] = lumpid; sprtemp[frame].lumpid[r + rightfactor] = lumpid;

View file

@ -1393,6 +1393,10 @@ static void ST_drawMatchHUD(void)
if (G_TagGametype() && !(stplyr->pflags & PF_TAGIT)) if (G_TagGametype() && !(stplyr->pflags & PF_TAGIT))
return; return;
#ifdef HAVE_BLUA
if (LUA_HudEnabled(hud_weaponrings)) {
#endif
if (stplyr->powers[pw_infinityring]) if (stplyr->powers[pw_infinityring])
ST_drawWeaponRing(pw_infinityring, 0, 0, offset, infinityring); ST_drawWeaponRing(pw_infinityring, 0, 0, offset, infinityring);
else if (stplyr->health > 1) else if (stplyr->health > 1)
@ -1416,6 +1420,12 @@ static void ST_drawMatchHUD(void)
offset += 20; offset += 20;
ST_drawWeaponRing(pw_railring, RW_RAIL, WEP_RAIL, offset, railring); ST_drawWeaponRing(pw_railring, RW_RAIL, WEP_RAIL, offset, railring);
#ifdef HAVE_BLUA
}
if (LUA_HudEnabled(hud_powerstones)) {
#endif
// Power Stones collected // Power Stones collected
offset = 136; // Used for Y now offset = 136; // Used for Y now
@ -1447,6 +1457,10 @@ static void ST_drawMatchHUD(void)
if (stplyr->powers[pw_emeralds] & EMERALD7) if (stplyr->powers[pw_emeralds] & EMERALD7)
V_DrawScaledPatch(28, STRINGY(offset), V_SNAPTOLEFT, tinyemeraldpics[6]); V_DrawScaledPatch(28, STRINGY(offset), V_SNAPTOLEFT, tinyemeraldpics[6]);
#ifdef HAVE_BLUA
}
#endif
} }
static inline void ST_drawRaceHUD(void) static inline void ST_drawRaceHUD(void)