Merge branch 'gcc7-fixes-aug2019' into 'master'

gcc7 compile fixes (Fall through; spr2 var comparison)

See merge request STJr/SRB2Internal!277
This commit is contained in:
Digiku 2019-08-04 03:19:25 -04:00
commit c29cfbef9b
6 changed files with 7 additions and 4 deletions

View file

@ -1080,7 +1080,7 @@ void HWR_drawAMline(const fline_t *fl, INT32 color)
// -------------------+
// HWR_DrawConsoleFill : draw flat coloured transparent rectangle because that's cool, and hw sucks less than sw for that.
// -------------------+
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32 options)
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color)
{
FOutVector v[4];
FSurfaceInfo Surf;

View file

@ -50,7 +50,7 @@ void HWR_CreateStaticLightmaps(INT32 bspnum);
void HWR_PrepLevelCache(size_t pnumtextures);
void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color);
void HWR_DrawFadeFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT16 actualcolor, UINT8 strength);
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32 options); // Lat: separate flags from color since color needs to be an uint to work right.
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color); // Lat: separate flags from color since color needs to be an uint to work right.
void HWR_DrawPic(INT32 x,INT32 y,lumpnum_t lumpnum);
UINT8 *HWR_GetScreenshot(void);

View file

@ -207,7 +207,7 @@ static int lib_setSpr2default(lua_State *L)
else
return luaL_error(L, "spr2defaults[] invalid set");
if (j < 0 || j >= free_spr2)
if (j >= free_spr2)
return luaL_error(L, "spr2defaults[] set %d out of range (%d - %d)", j, 0, free_spr2-1);
spr2defaults[i] = j;

View file

@ -9717,6 +9717,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_EGGROBO1:
mobj->movecount = P_RandomKey(13);
mobj->color = SKINCOLOR_RUBY + P_RandomKey(MAXSKINCOLORS - SKINCOLOR_RUBY);
// fall through
case MT_HIVEELEMENTAL:
mobj->extravalue1 = 5;
break;
@ -11116,6 +11117,7 @@ You should think about modifying the deathmatch starts to take full advantage of
mobj->color = SKINCOLOR_GOLD;
mobj->colorized = true;
}
// fall through
case MT_EGGMOBILE3:
mobj->cusval = mthing->extrainfo;
break;

View file

@ -2540,6 +2540,7 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
? player->charability
: skin->ability)
== CA_SWIM) ? SPR2_SWIM : SPR2_FLY;
// fall through
// Use the handy list, that's what it's there for!
default:

View file

@ -1374,7 +1374,7 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
if (rendermode != render_soft && rendermode != render_none)
{
UINT32 hwcolor = V_GetHWConsBackColor();
HWR_DrawConsoleFill(x, y, w, h, hwcolor, c); // we still use the regular color stuff but only for flags. actual draw color is "hwcolor" for this.
HWR_DrawConsoleFill(x, y, w, h, hwcolor); // we still use the regular color stuff but only for flags. actual draw color is "hwcolor" for this.
return;
}
#endif