From ba43ed5d48501be6ccb97118a0866d67e266c08c Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 6 Jul 2018 21:53:37 -0400 Subject: [PATCH] Squash a few more errors Updated my compile setup to GCC 6.3, makes it as far as m_misc.c now with ERRORMODE and DEBUGMODE, stops at some gettext related stuff I don't know how to fix now --- src/g_game.c | 7 ++++--- src/k_kart.c | 27 +++++++++++++++------------ src/m_menu.c | 7 ++++--- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 50a90c05..9386681a 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2973,10 +2973,11 @@ void G_ExitLevel(void) boolean G_IsSpecialStage(INT32 mapnum) { #if 0 - if (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end) - return true; -#endif + return (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end); +#else + (void)mapnum; return false; +#endif } // diff --git a/src/k_kart.c b/src/k_kart.c index 27080423..9348118b 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1591,9 +1591,9 @@ void K_SpawnBobombExplosion(mobj_t *source, UINT8 color) mobj_t *smoldering = P_SpawnMobj(source->x, source->y, source->z, MT_SMOLDERING); mobj_t *dust; mobj_t *truc; - smoldering->tics = TICRATE*3; INT32 speed, speed2; + smoldering->tics = TICRATE*3; radius = source->radius>>FRACBITS; height = source->height>>FRACBITS; @@ -4892,13 +4892,16 @@ static void K_drawKartMinimapHead(player_t *player, INT32 x, INT32 y, INT32 flag // am xpos & ypos are the icon's starting position. Withouht // it, they wouldn't 'spawn' on the top-right side of the HUD. - fixed_t amnumxpos; - fixed_t amnumypos; - INT32 amxpos; - INT32 amypos; + fixed_t amnumxpos, amnumypos; + INT32 amxpos, amypos; node_t *bsp = &nodes[numnodes-1]; fixed_t maxx, minx, maxy, miny; + + fixed_t mapwidth, mapheight; + fixed_t xoffset, yoffset; + fixed_t xscale, yscale, zoom; + maxx = maxy = INT32_MAX; minx = miny = INT32_MIN; minx = bsp->bbox[0][BOXLEFT]; @@ -4924,16 +4927,16 @@ static void K_drawKartMinimapHead(player_t *player, INT32 x, INT32 y, INT32 flag miny >>= FRACBITS; maxy >>= FRACBITS; - fixed_t mapwidth = maxx - minx; - fixed_t mapheight = maxy - miny; + mapwidth = maxx - minx; + mapheight = maxy - miny; // These should always be small enough to be bitshift back right now - fixed_t xoffset = (minx + mapwidth/2)<width, mapwidth); - fixed_t yscale = FixedDiv(AutomapPic->height, mapheight); - fixed_t zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20); + xscale = FixedDiv(AutomapPic->width, mapwidth); + yscale = FixedDiv(AutomapPic->height, mapheight); + zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20); amnumxpos = (FixedMul(player->mo->x, zoom) - FixedMul(xoffset, zoom)); amnumypos = -(FixedMul(player->mo->y, zoom) - FixedMul(yoffset, zoom)); diff --git a/src/m_menu.c b/src/m_menu.c index 87982310..302910a4 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4307,14 +4307,15 @@ static char *M_GetConditionString(condition_t cond) case UC_EXTRAEMBLEM: return va("Get \"%s\" emblem", extraemblems[cond.requirement-1].name); default: - return ""; + return NULL; } } #define NUMCHECKLIST 23 static void M_DrawChecklist(void) { - INT32 i, line = 0, c, lastid; + UINT32 i, line = 0, c; + INT32 lastid; for (i = 0; i < MAXUNLOCKABLES; i++) { @@ -4341,7 +4342,7 @@ static void M_DrawChecklist(void) ++line; - if (cond.id != lastid) + if (lastid == -1 || cond.id != (UINT32)lastid) { V_DrawString(16, (line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), "*"); V_DrawString(32, (line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), str);