mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Merge remote-tracking branch 'public-gitlab/master' into 21-deb
This commit is contained in:
commit
e4ce0ab9f1
7 changed files with 137 additions and 23 deletions
|
@ -70,7 +70,7 @@ matrix:
|
||||||
- p7zip-full
|
- p7zip-full
|
||||||
- gcc-7
|
- gcc-7
|
||||||
compiler: gcc-7
|
compiler: gcc-7
|
||||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough"
|
||||||
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
||||||
- os: linux
|
- os: linux
|
||||||
addons:
|
addons:
|
||||||
|
@ -85,7 +85,7 @@ matrix:
|
||||||
- p7zip-full
|
- p7zip-full
|
||||||
- gcc-8
|
- gcc-8
|
||||||
compiler: gcc-8
|
compiler: gcc-8
|
||||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough -Wno-error=format-overflow"
|
||||||
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
|
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|
|
@ -190,9 +190,6 @@ endif
|
||||||
ifdef GCC46
|
ifdef GCC46
|
||||||
WFLAGS+=-Wno-suggest-attribute=noreturn
|
WFLAGS+=-Wno-suggest-attribute=noreturn
|
||||||
endif
|
endif
|
||||||
ifdef GCC71
|
|
||||||
WFLAGS+=-Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef MINGW
|
ifndef MINGW
|
||||||
ifdef GCC45
|
ifdef GCC45
|
||||||
|
@ -222,6 +219,18 @@ endif
|
||||||
ifdef GCC61
|
ifdef GCC61
|
||||||
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
|
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
|
||||||
endif
|
endif
|
||||||
|
ifdef GCC71
|
||||||
|
WFLAGS+=-Wno-error=implicit-fallthrough
|
||||||
|
WFLAGS+=-Wno-implicit-fallthrough
|
||||||
|
endif
|
||||||
|
ifdef GCC80
|
||||||
|
WFLAGS+=-Wno-error=format-overflow
|
||||||
|
WFLAGS+=-Wno-error=stringop-truncation
|
||||||
|
WFLAGS+=-Wno-error=stringop-overflow
|
||||||
|
WFLAGS+=-Wno-format-overflow
|
||||||
|
WFLAGS+=-Wno-stringop-truncation
|
||||||
|
WFLAGS+=-Wno-stringop-overflow
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
#indicate platform and what interface use with
|
#indicate platform and what interface use with
|
||||||
|
|
|
@ -1796,6 +1796,10 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
||||||
mapname, resetplayer, lastgametype, gametype, chmappending));
|
mapname, resetplayer, lastgametype, gametype, chmappending));
|
||||||
CONS_Printf(M_GetText("Speeding off to level...\n"));
|
CONS_Printf(M_GetText("Speeding off to level...\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CON_ToggleOff();
|
||||||
|
CON_ClearHUD();
|
||||||
|
|
||||||
if (demoplayback && !timingdemo)
|
if (demoplayback && !timingdemo)
|
||||||
precache = false;
|
precache = false;
|
||||||
|
|
||||||
|
@ -1812,7 +1816,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
||||||
G_InitNew(ultimatemode, mapname, resetplayer, skipprecutscene);
|
G_InitNew(ultimatemode, mapname, resetplayer, skipprecutscene);
|
||||||
if (demoplayback && !timingdemo)
|
if (demoplayback && !timingdemo)
|
||||||
precache = true;
|
precache = true;
|
||||||
CON_ToggleOff();
|
|
||||||
if (timingdemo)
|
if (timingdemo)
|
||||||
G_DoneLevelLoad();
|
G_DoneLevelLoad();
|
||||||
|
|
||||||
|
|
|
@ -633,6 +633,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
|
||||||
HWR_SubsecPoly(bspnum&(~NF_SUBSECTOR), poly);
|
HWR_SubsecPoly(bspnum&(~NF_SUBSECTOR), poly);
|
||||||
//Hurdler: implement a loading status
|
//Hurdler: implement a loading status
|
||||||
|
|
||||||
|
#ifdef HWR_LOADING_SCREEN
|
||||||
if (ls_count-- <= 0)
|
if (ls_count-- <= 0)
|
||||||
{
|
{
|
||||||
char s[16];
|
char s[16];
|
||||||
|
@ -657,6 +658,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
|
||||||
|
|
||||||
I_UpdateNoVsync();
|
I_UpdateNoVsync();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
M_ClearBox(bbox);
|
M_ClearBox(bbox);
|
||||||
poly = extrasubsectors[bspnum&~NF_SUBSECTOR].planepoly;
|
poly = extrasubsectors[bspnum&~NF_SUBSECTOR].planepoly;
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
// the original aspect ratio of Doom graphics isn't square
|
// the original aspect ratio of Doom graphics isn't square
|
||||||
#define ORIGINAL_ASPECT (320.0f/200.0f)
|
#define ORIGINAL_ASPECT (320.0f/200.0f)
|
||||||
|
|
||||||
|
// Uncomment this to enable the OpenGL loading screen
|
||||||
|
//#define HWR_LOADING_SCREEN
|
||||||
|
|
||||||
// -----------
|
// -----------
|
||||||
// structures
|
// structures
|
||||||
// -----------
|
// -----------
|
||||||
|
|
|
@ -2140,6 +2140,10 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fixed_t texturevpeg;
|
fixed_t texturevpeg;
|
||||||
|
boolean attachtobottom = false;
|
||||||
|
#ifdef ESLOPE
|
||||||
|
boolean slopeskew = false; // skew FOF walls with slopes?
|
||||||
|
#endif
|
||||||
|
|
||||||
// Wow, how was this missing from OpenGL for so long?
|
// Wow, how was this missing from OpenGL for so long?
|
||||||
// ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software
|
// ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software
|
||||||
|
@ -2147,24 +2151,50 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
||||||
if (newline)
|
if (newline)
|
||||||
{
|
{
|
||||||
texturevpeg = sides[newline->sidenum[0]].rowoffset;
|
texturevpeg = sides[newline->sidenum[0]].rowoffset;
|
||||||
if (newline->flags & ML_DONTPEGBOTTOM)
|
attachtobottom = !!(newline->flags & ML_DONTPEGBOTTOM);
|
||||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
#ifdef ESLOPE
|
||||||
|
slopeskew = !!(newline->flags & ML_DONTPEGTOP);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
|
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
|
||||||
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
attachtobottom = !!(gr_linedef->flags & ML_DONTPEGBOTTOM);
|
||||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
#ifdef ESLOPE
|
||||||
|
slopeskew = !!(rover->master->flags & ML_DONTPEGTOP);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
grTex = HWR_GetTexture(texnum);
|
grTex = HWR_GetTexture(texnum);
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
if (!slopeskew) // no skewing
|
||||||
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
|
{
|
||||||
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
if (attachtobottom)
|
||||||
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
|
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||||
|
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!attachtobottom) // skew by top
|
||||||
|
{
|
||||||
|
wallVerts[3].t = wallVerts[2].t = texturevpeg * grTex->scaleY;
|
||||||
|
wallVerts[0].t = (h - l + texturevpeg) * grTex->scaleY;
|
||||||
|
wallVerts[1].t = (hS - lS + texturevpeg) * grTex->scaleY;
|
||||||
|
}
|
||||||
|
else // skew by bottom
|
||||||
|
{
|
||||||
|
wallVerts[0].t = wallVerts[1].t = texturevpeg * grTex->scaleY;
|
||||||
|
wallVerts[3].t = wallVerts[0].t - (h - l) * grTex->scaleY;
|
||||||
|
wallVerts[2].t = wallVerts[1].t - (hS - lS) * grTex->scaleY;
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
if (attachtobottom)
|
||||||
|
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||||
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||||
#endif
|
#endif
|
||||||
|
|
85
src/r_segs.c
85
src/r_segs.c
|
@ -745,6 +745,12 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
// Render FOF sides kinda like normal sides, with the frac and step and everything
|
// Render FOF sides kinda like normal sides, with the frac and step and everything
|
||||||
// NOTE: INT64 instead of fixed_t because overflow concerns
|
// NOTE: INT64 instead of fixed_t because overflow concerns
|
||||||
INT64 top_frac, top_step, bottom_frac, bottom_step;
|
INT64 top_frac, top_step, bottom_frac, bottom_step;
|
||||||
|
// skew FOF walls with slopes?
|
||||||
|
boolean slopeskew = false;
|
||||||
|
fixed_t ffloortextureslide = 0;
|
||||||
|
INT32 oldx = -1;
|
||||||
|
fixed_t left_top, left_bottom; // needed here for slope skewing
|
||||||
|
pslope_t *skewslope = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void (*colfunc_2s) (column_t *);
|
void (*colfunc_2s) (column_t *);
|
||||||
|
@ -883,7 +889,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
{
|
{
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
SLOPEPARAMS(*light->caster->b_slope, leftheight, rightheight, *light->caster->bottomheight)
|
SLOPEPARAMS(*light->caster->b_slope, leftheight, rightheight, *light->caster->bottomheight)
|
||||||
|
#undef SLOPEPARAMS
|
||||||
leftheight -= viewz;
|
leftheight -= viewz;
|
||||||
rightheight -= viewz;
|
rightheight -= viewz;
|
||||||
|
|
||||||
|
@ -955,21 +961,71 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
mceilingclip = ds->sprtopclip;
|
mceilingclip = ds->sprtopclip;
|
||||||
dc_texheight = textureheight[texnum]>>FRACBITS;
|
dc_texheight = textureheight[texnum]>>FRACBITS;
|
||||||
|
|
||||||
|
#ifdef ESLOPE
|
||||||
|
// calculate both left ends
|
||||||
|
if (*pfloor->t_slope)
|
||||||
|
left_top = P_GetZAt(*pfloor->t_slope, ds->leftpos.x, ds->leftpos.y) - viewz;
|
||||||
|
else
|
||||||
|
left_top = *pfloor->topheight - viewz;
|
||||||
|
|
||||||
|
if (*pfloor->b_slope)
|
||||||
|
left_bottom = P_GetZAt(*pfloor->b_slope, ds->leftpos.x, ds->leftpos.y) - viewz;
|
||||||
|
else
|
||||||
|
left_bottom = *pfloor->bottomheight - viewz;
|
||||||
|
skewslope = *pfloor->t_slope; // skew using top slope by default
|
||||||
|
if (newline)
|
||||||
|
{
|
||||||
|
if (newline->flags & ML_DONTPEGTOP)
|
||||||
|
slopeskew = true;
|
||||||
|
}
|
||||||
|
else if (pfloor->master->flags & ML_DONTPEGTOP)
|
||||||
|
slopeskew = true;
|
||||||
|
|
||||||
|
if (slopeskew)
|
||||||
|
dc_texturemid = left_top;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
dc_texturemid = *pfloor->topheight - viewz;
|
dc_texturemid = *pfloor->topheight - viewz;
|
||||||
|
|
||||||
if (newline)
|
if (newline)
|
||||||
{
|
{
|
||||||
offsetvalue = sides[newline->sidenum[0]].rowoffset;
|
offsetvalue = sides[newline->sidenum[0]].rowoffset;
|
||||||
if (newline->flags & ML_DONTPEGBOTTOM)
|
if (newline->flags & ML_DONTPEGBOTTOM)
|
||||||
|
{
|
||||||
|
#ifdef ESLOPE
|
||||||
|
skewslope = *pfloor->b_slope; // skew using bottom slope
|
||||||
|
if (slopeskew)
|
||||||
|
dc_texturemid = left_bottom;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
offsetvalue -= *pfloor->topheight - *pfloor->bottomheight;
|
offsetvalue -= *pfloor->topheight - *pfloor->bottomheight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
offsetvalue = sides[pfloor->master->sidenum[0]].rowoffset;
|
offsetvalue = sides[pfloor->master->sidenum[0]].rowoffset;
|
||||||
if (curline->linedef->flags & ML_DONTPEGBOTTOM)
|
if (curline->linedef->flags & ML_DONTPEGBOTTOM)
|
||||||
|
{
|
||||||
|
#ifdef ESLOPE
|
||||||
|
skewslope = *pfloor->b_slope; // skew using bottom slope
|
||||||
|
if (slopeskew)
|
||||||
|
dc_texturemid = left_bottom;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
offsetvalue -= *pfloor->topheight - *pfloor->bottomheight;
|
offsetvalue -= *pfloor->topheight - *pfloor->bottomheight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ESLOPE
|
||||||
|
if (slopeskew)
|
||||||
|
{
|
||||||
|
angle_t lineangle = R_PointToAngle2(curline->v1->x, curline->v1->y, curline->v2->x, curline->v2->y);
|
||||||
|
|
||||||
|
if (skewslope)
|
||||||
|
ffloortextureslide = FixedMul(skewslope->zdelta, FINECOSINE((lineangle-skewslope->xydirection)>>ANGLETOFINESHIFT));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
dc_texturemid += offsetvalue;
|
dc_texturemid += offsetvalue;
|
||||||
|
|
||||||
// Texture must be cached before setting colfunc_2s,
|
// Texture must be cached before setting colfunc_2s,
|
||||||
|
@ -988,15 +1044,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
// Set heights according to plane, or slope, whichever
|
// Set heights according to plane, or slope, whichever
|
||||||
{
|
{
|
||||||
fixed_t left_top, right_top, left_bottom, right_bottom;
|
fixed_t right_top, right_bottom;
|
||||||
|
|
||||||
SLOPEPARAMS(*pfloor->t_slope, left_top, right_top, *pfloor->topheight)
|
// calculate right ends now
|
||||||
SLOPEPARAMS(*pfloor->b_slope, left_bottom, right_bottom, *pfloor->bottomheight)
|
if (*pfloor->t_slope)
|
||||||
#undef SLOPEPARAMS
|
right_top = P_GetZAt(*pfloor->t_slope, ds->rightpos.x, ds->rightpos.y) - viewz;
|
||||||
left_top -= viewz;
|
else
|
||||||
right_top -= viewz;
|
right_top = *pfloor->topheight - viewz;
|
||||||
left_bottom -= viewz;
|
|
||||||
right_bottom -= viewz;
|
if (*pfloor->b_slope)
|
||||||
|
right_bottom = P_GetZAt(*pfloor->b_slope, ds->rightpos.x, ds->rightpos.y) - viewz;
|
||||||
|
else
|
||||||
|
right_bottom = *pfloor->bottomheight - viewz;
|
||||||
|
|
||||||
// using INT64 to avoid 32bit overflow
|
// using INT64 to avoid 32bit overflow
|
||||||
top_frac = (INT64)centeryfrac - (((INT64)left_top * ds->scale1) >> FRACBITS);
|
top_frac = (INT64)centeryfrac - (((INT64)left_top * ds->scale1) >> FRACBITS);
|
||||||
|
@ -1020,8 +1079,16 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
{
|
{
|
||||||
if (maskedtexturecol[dc_x] != INT16_MAX)
|
if (maskedtexturecol[dc_x] != INT16_MAX)
|
||||||
{
|
{
|
||||||
|
#ifdef ESLOPE
|
||||||
|
if (ffloortextureslide) { // skew FOF walls
|
||||||
|
if (oldx != -1)
|
||||||
|
dc_texturemid += FixedMul(ffloortextureslide, (maskedtexturecol[oldx]-maskedtexturecol[dc_x])<<FRACBITS);
|
||||||
|
oldx = dc_x;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// Calculate bounds
|
// Calculate bounds
|
||||||
// clamp the values if necessary to avoid overflows and rendering glitches caused by them
|
// clamp the values if necessary to avoid overflows and rendering glitches caused by them
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
|
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
|
||||||
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;
|
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;
|
||||||
|
|
Loading…
Reference in a new issue