gcc7 compile fixes (Fall through; spr2 var comparison)

This commit is contained in:
mazmazz 2019-08-03 23:00:21 -04:00
parent 8a0f1e7ed4
commit 5b284c8170
5 changed files with 6 additions and 3 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: