Merge branch 'master' into next

This commit is contained in:
Alam Ed Arias 2018-11-26 19:49:19 -05:00
commit 9a042cd5e2
8 changed files with 254 additions and 23 deletions

View file

@ -70,7 +70,7 @@ matrix:
- p7zip-full
- 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
- os: linux
addons:
@ -85,7 +85,7 @@ matrix:
- p7zip-full
- 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
- os: linux
compiler: clang

View file

@ -190,9 +190,6 @@ endif
ifdef GCC46
WFLAGS+=-Wno-suggest-attribute=noreturn
endif
ifdef GCC71
WFLAGS+=-Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3
endif
ifndef MINGW
ifdef GCC45
@ -222,6 +219,18 @@ endif
ifdef GCC61
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
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

View file

@ -1801,6 +1801,10 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
mapname, resetplayer, lastgametype, gametype, chmappending));
CONS_Printf(M_GetText("Speeding off to level...\n"));
}
CON_ToggleOff();
CON_ClearHUD();
if (demoplayback && !timingdemo)
precache = false;
@ -1817,7 +1821,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
G_InitNew(ultimatemode, mapname, resetplayer, skipprecutscene);
if (demoplayback && !timingdemo)
precache = true;
CON_ToggleOff();
if (timingdemo)
G_DoneLevelLoad();

View file

@ -633,6 +633,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
HWR_SubsecPoly(bspnum&(~NF_SUBSECTOR), poly);
//Hurdler: implement a loading status
#ifdef HWR_LOADING_SCREEN
if (ls_count-- <= 0)
{
char s[16];
@ -657,6 +658,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
I_UpdateNoVsync();
}
#endif
}
M_ClearBox(bbox);
poly = extrasubsectors[bspnum&~NF_SUBSECTOR].planepoly;

View file

@ -27,6 +27,9 @@
// the original aspect ratio of Doom graphics isn't square
#define ORIGINAL_ASPECT (320.0f/200.0f)
// Uncomment this to enable the OpenGL loading screen
//#define HWR_LOADING_SCREEN
// -----------
// structures
// -----------

View file

@ -2140,6 +2140,10 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
else
{
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?
// ...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)
{
texturevpeg = sides[newline->sidenum[0]].rowoffset;
if (newline->flags & ML_DONTPEGBOTTOM)
texturevpeg -= *rover->topheight - *rover->bottomheight;
attachtobottom = !!(newline->flags & ML_DONTPEGBOTTOM);
#ifdef ESLOPE
slopeskew = !!(newline->flags & ML_DONTPEGTOP);
#endif
}
else
{
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
texturevpeg -= *rover->topheight - *rover->bottomheight;
attachtobottom = !!(gr_linedef->flags & ML_DONTPEGBOTTOM);
#ifdef ESLOPE
slopeskew = !!(rover->master->flags & ML_DONTPEGTOP);
#endif
}
grTex = HWR_GetTexture(texnum);
#ifdef ESLOPE
if (!slopeskew) // no skewing
{
if (attachtobottom)
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
if (attachtobottom)
texturevpeg -= *rover->topheight - *rover->bottomheight;
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
#endif

View file

@ -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
// NOTE: INT64 instead of fixed_t because overflow concerns
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
void (*colfunc_2s) (column_t *);
@ -883,7 +889,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
{
#ifdef ESLOPE
SLOPEPARAMS(*light->caster->b_slope, leftheight, rightheight, *light->caster->bottomheight)
#undef SLOPEPARAMS
leftheight -= viewz;
rightheight -= viewz;
@ -955,20 +961,70 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
mceilingclip = ds->sprtopclip;
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;
if (newline)
{
offsetvalue = sides[newline->sidenum[0]].rowoffset;
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;
}
}
else
{
offsetvalue = sides[pfloor->master->sidenum[0]].rowoffset;
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;
}
}
#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;
@ -988,15 +1044,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
#ifdef ESLOPE
// 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)
SLOPEPARAMS(*pfloor->b_slope, left_bottom, right_bottom, *pfloor->bottomheight)
#undef SLOPEPARAMS
left_top -= viewz;
right_top -= viewz;
left_bottom -= viewz;
right_bottom -= viewz;
// calculate right ends now
if (*pfloor->t_slope)
right_top = P_GetZAt(*pfloor->t_slope, ds->rightpos.x, ds->rightpos.y) - viewz;
else
right_top = *pfloor->topheight - 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
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)
{
#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
// clamp the values if necessary to avoid overflows and rendering glitches caused by them
#ifdef ESLOPE
if (top_frac > (INT64)CLAMPMAX) sprtopscreen = windowtop = CLAMPMAX;
else if (top_frac > (INT64)CLAMPMIN) sprtopscreen = windowtop = (fixed_t)top_frac;

View file

@ -0,0 +1,117 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `srb2ms`
--
CREATE DATABASE IF NOT EXISTS `srb2ms` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `srb2ms`;
-- --------------------------------------------------------
--
-- Table structure for table `ms_bans`
--
CREATE TABLE `ms_bans` (
`bid` int(11) DEFAULT NULL,
`ipstart` int(11) DEFAULT NULL,
`ipend` int(11) DEFAULT NULL,
`full_endtime` int(11) DEFAULT NULL,
`permanent` tinyint(1) DEFAULT NULL,
`hostonly` tinyint(1) DEFAULT NULL,
`reason` text COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `ms_rooms`
--
CREATE TABLE `ms_rooms` (
`room_id` int(11) NOT NULL,
`title` text COLLATE utf8mb4_unicode_ci NOT NULL,
`motd` text COLLATE utf8mb4_unicode_ci NOT NULL,
`visible` tinyint(1) NOT NULL,
`order` int(11) NOT NULL,
`private` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `ms_rooms`
--
INSERT INTO `ms_rooms` (`room_id`, `title`, `motd`, `visible`, `order`, `private`) VALUES
(10, 'Example', 'Example Room', 1, 0, 0),
(0, 'All', 'View all of the servers currently being hosted.', 1, 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `ms_servers`
--
CREATE TABLE `ms_servers` (
`sid` int(11) NOT NULL,
`name` text COLLATE utf8mb4_unicode_ci NOT NULL,
`ip` text COLLATE utf8mb4_unicode_ci NOT NULL,
`port` int(11) NOT NULL,
`version` text COLLATE utf8mb4_unicode_ci NOT NULL,
`timestamp` int(11) NOT NULL,
`room` int(11) NOT NULL,
`key` text COLLATE utf8mb4_unicode_ci NOT NULL,
`room_override` int(11) NOT NULL,
`upnow` tinyint(1) NOT NULL,
`permanent` tinyint(1) NOT NULL,
`delisted` tinyint(1) NOT NULL,
`sticky` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `ms_versions`
--
CREATE TABLE `ms_versions` (
`mod_id` int(11) NOT NULL,
`mod_version` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `ms_versions`
--
INSERT INTO `ms_versions` (`mod_id`, `mod_version`) VALUES
(12, 25);
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`userid` int(11) NOT NULL,
`username` text COLLATE utf8mb4_unicode_ci NOT NULL,
`live_authkey` blob NOT NULL,
`live_publickey` blob NOT NULL,
`salt` blob NOT NULL,
`password` blob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;