Merge branch 'gcc7_corrections_aug2019' into 'master'

ACTUALLY fix for gcc7

See merge request STJr/SRB2Internal!280
This commit is contained in:
MascaraSnake 2019-08-04 06:19:33 -04:00
commit 5cff567a34
7 changed files with 10 additions and 14 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)
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color, UINT32 actualcolor)
{
FOutVector v[4];
FSurfaceInfo Surf;
@ -1239,7 +1239,7 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color)
v[0].tow = v[1].tow = 0.0f;
v[2].tow = v[3].tow = 1.0f;
Surf.FlatColor.rgba = UINT2RGBA(color);
Surf.FlatColor.rgba = UINT2RGBA(actualcolor);
Surf.FlatColor.s.alpha = 0x80;
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);

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); // 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, INT32 color, UINT32 actualcolor); // 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

@ -1214,7 +1214,6 @@ static UINT8 P_GetModelSprite2(md2_t *md2, skin_t *skin, UINT8 spr2, player_t *p
switch(spr2)
{
// Normal special cases.
case SPR2_JUMP:
spr2 = ((player
@ -1228,7 +1227,6 @@ static UINT8 P_GetModelSprite2(md2_t *md2, skin_t *skin, UINT8 spr2, player_t *p
: skin->ability)
== CA_SWIM) ? SPR2_SWIM : SPR2_FLY;
break;
// Use the handy list, that's what it's there for!
default:
spr2 = spr2defaults[spr2];

View File

@ -9717,7 +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
break;
case MT_HIVEELEMENTAL:
mobj->extravalue1 = 5;
break;
@ -11117,7 +11117,7 @@ You should think about modifying the deathmatch starts to take full advantage of
mobj->color = SKINCOLOR_GOLD;
mobj->colorized = true;
}
// fall through
break;
case MT_EGGMOBILE3:
mobj->cusval = mthing->extrainfo;
break;

View File

@ -2527,7 +2527,6 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
switch(spr2)
{
// Normal special cases.
case SPR2_JUMP:
spr2 = ((player
@ -2540,8 +2539,7 @@ UINT8 P_GetSkinSprite2(skin_t *skin, UINT8 spr2, player_t *player)
? player->charability
: skin->ability)
== CA_SWIM) ? SPR2_SWIM : SPR2_FLY;
// fall through
break;
// Use the handy list, that's what it's there for!
default:
spr2 = spr2defaults[spr2];

View File

@ -158,14 +158,14 @@ static void MidiSoundfontPath_Onchange(void)
if (stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
{
char *token;
char *miditoken;
char *source = strdup(cv_midisoundfontpath.string);
boolean proceed = true;
// check if file exists; menu calls this method at every keystroke
while ((token = strtok_r(source, ";", &source)))
while ((miditoken = strtok_r(source, ";", &source)))
{
SDL_RWops *rw = SDL_RWFromFile(token, "r");
SDL_RWops *rw = SDL_RWFromFile(miditoken, "r");
if (rw != NULL)
SDL_RWclose(rw);
else

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); // we still use the regular color stuff but only for flags. actual draw color is "hwcolor" for this.
HWR_DrawConsoleFill(x, y, w, h, c, hwcolor); // we still use the regular color stuff but only for flags. actual draw color is "hwcolor" for this.
return;
}
#endif