From 537b32a8a347e2f01017d33101debe75d1e7f615 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 24 Nov 2025 17:01:26 +0100 Subject: [PATCH] some misc cleanups also account for a few more double evluations from min/max macros and save a few angle to fixed conversions in spb handling --- src/f_finale.c | 3 +- src/g_game.c | 3 +- src/hardware/hw_portal.c | 4 +- src/k_hud.c | 6 ++- src/k_kart.c | 3 +- src/p_enemy.c | 27 ++++++++--- src/p_slopes.c | 26 +++++----- src/p_spec.c | 16 ++++-- src/p_user.c | 18 +++---- src/r_data.c | 102 +++------------------------------------ src/r_draw.cpp | 46 +++++++++++------- src/r_main.cpp | 42 ++++++++-------- src/r_things.h | 1 + src/s_sound.c | 12 ++--- src/v_video.c | 3 +- 15 files changed, 129 insertions(+), 183 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index d1d32285f..6f221ff4d 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -319,6 +319,7 @@ void F_IntroTicker(void) D_StartTitle(); return; } + if (finalecount == 8) S_StartSound(NULL, sfx_vroom); else if (finalecount == 47) @@ -697,7 +698,7 @@ void F_CreditTicker(void) // Draw credits text on top for (i = 0; credits[i]; i++) { - switch(credits[i][0]) + switch (credits[i][0]) { case 0: y += 80< 0; bufx--) diff --git a/src/hardware/hw_portal.c b/src/hardware/hw_portal.c index 952bd0e66..aca1cffa0 100644 --- a/src/hardware/hw_portal.c +++ b/src/hardware/hw_portal.c @@ -120,8 +120,8 @@ void HWR_PortalFrame(gl_portal_t* portal) viewz = portal->viewz; viewangle = portal->viewangle; - viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT); - viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT); + //viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT); + //viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT); if (portal->clipline != -1) { diff --git a/src/k_hud.c b/src/k_hud.c index eb00068d9..6772975ed 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -4442,8 +4442,10 @@ static void K_drawLapStartAnim(void) UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, K_GetHudColor(), GTC_CACHE); INT32 vflags = V_SNAPTOTOP|V_HUDTRANS; - fixed_t slideout = max(0, 32*(((progress - 76)*FRACUNIT) + R_GetTimeFrac(RTF_LEVEL))); - fixed_t slidein = max(0, 32*(((stplyr->kartstuff[k_lapanimation] - 76)*FRACUNIT) - R_GetTimeFrac(RTF_LEVEL))); + fixed_t slideout = 32*(((progress - 76)*FRACUNIT) + R_GetTimeFrac(RTF_LEVEL)); + slideout = max(0, slideout); + fixed_t slidein = 32*(((stplyr->kartstuff[k_lapanimation] - 76)*FRACUNIT) - R_GetTimeFrac(RTF_LEVEL)); + slidein = max(0, slidein); // First, draw the emblem and hand INT32 emblemx = (BASEVIDWIDTH << (FRACBITS - 1)) + slidein; diff --git a/src/k_kart.c b/src/k_kart.c index 2b3a1e552..bd3a0d736 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -6168,6 +6168,7 @@ static void K_KartDrift(player_t *player, boolean onground) else player->kartstuff[k_brakedrift] = 0; } + // // K_KartUpdatePosition // @@ -6226,7 +6227,7 @@ void K_KartUpdatePosition(player_t *player) if ((isprevcheckpointp || isnextcheckpointp) && (!mo->movecount || mo->movecount == player->laps+1)) { - pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x, + pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x, mo->y - player->mo->y), mo->z - player->mo->z) / FRACUNIT; diff --git a/src/p_enemy.c b/src/p_enemy.c index 880f110cd..76f1af9a0 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8176,13 +8176,16 @@ void A_SPBChase(void *thing) // Smoothly rotate horz angle angle_t input = hang - actor->angle; boolean invert = (input > ANGLE_180); + fixed_t fixedinput; if (invert) input = InvAngle(input); + fixedinput = AngleFixed(input); // Slow down when turning; it looks better and makes U-turns not unfair - xyspeed = FixedMul(actor->cvmem, max(0, (((180<cvmem, max(0, xyspeed)); - input = FixedAngle(AngleFixed(input)/4); + input = FixedAngle(fixedinput/4); if (invert) input = InvAngle(input); @@ -8193,11 +8196,13 @@ void A_SPBChase(void *thing) invert = (input > ANGLE_180); if (invert) input = InvAngle(input); + fixedinput = AngleFixed(input); // Slow down when turning; might as well do it for momz, since we do it above too - zspeed = FixedMul(actor->cvmem, max(0, (((180<cvmem, max(0, zspeed)); - input = FixedAngle(AngleFixed(input)/4); + input = FixedAngle(fixedinput/4); if (invert) input = InvAngle(input); @@ -8301,13 +8306,17 @@ void A_SPBChase(void *thing) // Smoothly rotate horz angle angle_t input = hang - actor->angle; boolean invert = (input > ANGLE_180); + fixed_t fixedinput; + if (invert) input = InvAngle(input); + fixedinput = AngleFixed(input); // Slow down when turning; it looks better and makes U-turns not unfair - xyspeed = FixedMul(wspeed, max(0, (((180< ANGLE_180); if (invert) input = InvAngle(input); + fixedinput = AngleFixed(input); // Slow down when turning; might as well do it for momz, since we do it above too - zspeed = FixedMul(wspeed, max(0, (((180<flags & ML_NOSONIC) - flags |= SL_NOPHYSICS; - if (!(line->flags & ML_NOTAILS)) - flags |= SL_NODYNAMIC; - if (line->flags & ML_NOKNUX) - flags |= SL_ANCHORVERTEX; + + const boolean frontfloor = (special == 700 || special == 702 || special == 703); + const boolean backfloor = (special == 710 || special == 712 || special == 713); + const boolean frontceil = (special == 701 || special == 702 || special == 713); + const boolean backceil = (special == 711 || special == 712 || special == 703); if (!frontfloor && !backfloor && !frontceil && !backceil) { @@ -364,6 +357,13 @@ void P_SpawnSlope_Line(int linenum) return; } + if (line->flags & ML_NOSONIC) + flags |= SL_NOPHYSICS; + if (!(line->flags & ML_NOTAILS)) + flags |= SL_NODYNAMIC; + if (line->flags & ML_NOKNUX) + flags |= SL_ANCHORVERTEX; + fixed_t len = R_PointToDist2(0, 0, line->dx, line->dy); nx = FixedDiv(line->dy, len); ny = -FixedDiv(line->dx, len); @@ -809,7 +809,7 @@ void P_ResetDynamicSlopes(void) if (lines[i].flags & ML_NOKNUX) *slopetoset = P_NewVertexSlope(lines[i].tag, sides[lines[i].sidenum[which]].textureoffset >> FRACBITS, - sides[lines[i].sidenum[which]].rowoffset >> FRACBITS, flags); + sides[lines[i].sidenum[which]].rowoffset >> FRACBITS, flags); else *slopetoset = P_NewVertexSlope(lines[i].tag, lines[i].tag, lines[i].tag, flags); diff --git a/src/p_spec.c b/src/p_spec.c index b33f4a230..6751b5b6c 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2087,13 +2087,17 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) // Seek offset from current song position if (line->flags & ML_EFFECT1) { + const UINT32 muslength = S_GetMusicLength(); + const UINT32 muspos = S_GetMusicPosition(); + const UINT32 muslooppoint = S_GetMusicLoopPoint(); + // adjust for loop point if subtracting - if (position < 0 && S_GetMusicLength() && - S_GetMusicPosition() > S_GetMusicLoopPoint() && - S_GetMusicPosition() + position < S_GetMusicLoopPoint()) - position = max(S_GetMusicLength() - (S_GetMusicLoopPoint() - (S_GetMusicPosition() + position)), 0); + if (position < 0 && muslength && + muspos > muslooppoint && + muspos + position < muslooppoint) + position = max(muslength - (muslooppoint - (muspos + position)), 0); else - position = max(S_GetMusicPosition() + position, 0); + position = max(muspos + position, 0); } // Fade current music to target volume (if music won't be changed) @@ -2160,11 +2164,13 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) if (sfxnum == sfx_None) return; // Do nothing! + if (sfxnum < sfx_None || sfxnum >= NUMSFX) { CONS_Debug(DBG_GAMELOGIC, "Line type 414 Executor: sfx number %d is invalid!\n", sfxnum); return; } + if (line->tag != 0) // Do special stuff only if a non-zero linedef tag is set { if (line->flags & ML_EFFECT5) // Repeat Midtexture diff --git a/src/p_user.c b/src/p_user.c index 5cff67f4b..0b743dcd1 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -214,12 +214,11 @@ UINT8 P_GetNextEmerald(void) if (!(emeralds & EMERALD6)) return 5; return 6; } - else // Depends on stage - { - if (gamemap < sstage_start || gamemap > sstage_end) - return 0; - return (UINT8)(gamemap - sstage_start); - } + + // Depends on stage + if (gamemap < sstage_start || gamemap > sstage_end) + return 0; + return (UINT8)(gamemap - sstage_start); } // @@ -435,8 +434,8 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings) if (!player->mo) return; - player->mo->health += num_rings; - player->health += num_rings; + //player->mo->health += num_rings; + //player->health += num_rings; player->totalring += num_rings; //{ SRB2kart - rings don't really do anything, but we don't want the player spilling them later. @@ -582,7 +581,8 @@ static boolean isPlayerLosing(player_t *player) if (players[i].marescore > player->marescore) ++pos; - maxpos = max(getPlayerPos(&players[i]), maxpos); + const UINT8 playerpos = getPlayerPos(&players[i]); + maxpos = max(playerpos, maxpos); } if (maxpos == 1) diff --git a/src/r_data.c b/src/r_data.c index da5a81dac..120b0cfd2 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -307,10 +307,10 @@ static boolean R_CheckTextureLumpLength(texture_t *texture, size_t patch) CONS_Alert( CONS_ERROR, "%.8s: texture lump data is too small. Expected %s bytes, got %s. (%s)\n", - texture->name, - sizeu1(offsetof(softwarepatch_t, columnofs)), - sizeu2(lumplength), - wadfiles[wadnum]->lumpinfo[lumpnum].fullname + texture->name, + sizeu1(offsetof(softwarepatch_t, columnofs)), + sizeu2(lumplength), + wadfiles[wadnum]->lumpinfo[lumpnum].fullname ); return false; @@ -853,6 +853,7 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch) { Z_Free(patchName); } + patchName = (char *)Z_Malloc((texturesTokenLength+1)*sizeof(char),PU_STATIC,NULL); memcpy(patchName,texturesToken,texturesTokenLength*sizeof(char)); patchName[texturesTokenLength] = '\0'; @@ -1249,60 +1250,6 @@ void R_ParseTEXTURESLump(UINT16 wadNum, UINT16 lumpNum, INT32 *texindex) Z_Free((void *)texturesText); } -/* -static inline lumpnum_t R_CheckNumForNameList(const char *name, lumplist_t *list, size_t listsize) // SRB2kart - unused. -{ - size_t i; - UINT16 lump; - - for (i = listsize - 1; i < INT16_MAX; i--) - { - lump = W_CheckNumForNamePwad(name, list[i].wadfile, list[i].firstlump); - if (lump == INT16_MAX || lump > (list[i].firstlump + list[i].numlumps)) - continue; - else - return (list[i].wadfile<<16)+lump; - } - return LUMPERROR; -} -*/ - -/*static lumplist_t *colormaplumps = NULL; ///\todo free leak -static size_t numcolormaplumps = 0; - -static void R_InitExtraColormaps(void) -{ - lumpnum_t startnum, endnum; - UINT16 cfile, clump; - static size_t maxcolormaplumps = 16; - - for (cfile = clump = 0; cfile < numwadfiles; cfile++, clump = 0) - { - startnum = W_CheckNumForNamePwad("C_START", cfile, clump); - if (startnum == INT16_MAX) - continue; - - endnum = W_CheckNumForNamePwad("C_END", cfile, clump); - - if (endnum == INT16_MAX) - I_Error("R_InitExtraColormaps: C_START without C_END\n"); - - // This shouldn't be possible when you use the Pwad function, silly - //if (WADFILENUM(startnum) != WADFILENUM(endnum)) - //I_Error("R_InitExtraColormaps: C_START and C_END in different wad files!\n"); - - if (numcolormaplumps >= maxcolormaplumps) - maxcolormaplumps *= 2; - colormaplumps = Z_Realloc(colormaplumps, - sizeof (*colormaplumps) * maxcolormaplumps, PU_STATIC, NULL); - colormaplumps[numcolormaplumps].wadfile = cfile; - colormaplumps[numcolormaplumps].firstlump = startnum+1; - colormaplumps[numcolormaplumps].numlumps = endnum - (startnum + 1); - numcolormaplumps++; - } - CONS_Printf(M_GetText("Number of Extra Colormaps: %s\n"), sizeu1(numcolormaplumps)); -}*/ - // Search for flat name. lumpnum_t R_GetFlatNumForName(const char *name) { @@ -1430,7 +1377,7 @@ void R_ReInitColormaps(UINT16 num, lumpnum_t newencoremap) encoremap = Z_Malloc(256 + 10, PU_LEVEL, NULL); W_ReadLump(newencoremap, encoremap); colormap_p = colormap_p2 = colormaps; - colormap_p += (256 * 32); + colormap_p += COLORMAP_REMAPOFFSET; for (p = 0; p < 32; p++) { @@ -1439,6 +1386,7 @@ void R_ReInitColormaps(UINT16 num, lumpnum_t newencoremap) *colormap_p = colormap_p2[encoremap[i]]; colormap_p++; } + colormap_p2 += 256; } } @@ -1465,43 +1413,9 @@ void R_ClearColormaps(void) for (i = 0; i < MAXCOLORMAPS; i++) foundcolormaps[i] = LUMPERROR; - memset(extra_colormaps, 0, sizeof (extra_colormaps)); + memset(extra_colormaps, 0, sizeof(extra_colormaps)); } -/*INT32 R_ColormapNumForName(char *name) -{ - lumpnum_t lump, i; - - if (num_extra_colormaps == MAXCOLORMAPS) - I_Error("R_ColormapNumForName: Too many colormaps! the limit is %d\n", MAXCOLORMAPS); - - lump = R_CheckNumForNameList(name, colormaplumps, numcolormaplumps); - if (lump == LUMPERROR) - I_Error("R_ColormapNumForName: Cannot find colormap lump %.8s\n", name); - - for (i = 0; i < num_extra_colormaps; i++) - if (lump == foundcolormaps[i]) - return i; - - foundcolormaps[num_extra_colormaps] = lump; - - // aligned on 8 bit for asm code - extra_colormaps[num_extra_colormaps].colormap = Z_Malloc(W_LumpLength(lump), PU_LEVEL, NULL); - W_ReadLump(lump, extra_colormaps[num_extra_colormaps].colormap); - - // We set all params of the colormap to normal because there - // is no real way to tell how GL should handle a colormap lump anyway.. - extra_colormaps[num_extra_colormaps].maskcolor = 0xffff; - extra_colormaps[num_extra_colormaps].fadecolor = 0x0; - extra_colormaps[num_extra_colormaps].maskamt = 0x0; - extra_colormaps[num_extra_colormaps].fadestart = 0; - extra_colormaps[num_extra_colormaps].fadeend = 31; - extra_colormaps[num_extra_colormaps].fog = 0; - - num_extra_colormaps++; - return (INT32)num_extra_colormaps - 1; -}*/ - // // R_CreateColormap // diff --git a/src/r_draw.cpp b/src/r_draw.cpp index f27b0023c..639107daa 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -355,13 +355,14 @@ UINT8 *R_GetBlendTable(int style, INT32 alphalevel) // Return a normal translucency table if (--alphalevel >= 0) return transtables + (ClipTransLevel(alphalevel) << FF_TRANSSHIFT); - else - return NULL; + + return NULL; } boolean R_BlendLevelVisible(INT32 blendmode, INT32 alphalevel) { - if (blendmode <= AST_COPY || blendmode == AST_SUBTRACT || blendmode == AST_MODULATE || blendmode >= AST_OVERLAY) + if (blendmode <= AST_COPY || blendmode == AST_SUBTRACT || + blendmode == AST_MODULATE || blendmode >= AST_OVERLAY) return true; return (alphalevel < BlendTab_Count[BlendTab_FromStyle[blendmode]]); @@ -412,7 +413,8 @@ static UINT8* RGetTranslationColormap(INT32 skinnum, skincolors_t color, UINT8 f // Get colormap ret = tt[skintableindex][color]; } - else ret = NULL; + else + ret = NULL; // Generate the colormap if necessary if (!ret) @@ -435,36 +437,46 @@ UINT8* R_GetTranslationColormap(INT32 skinnum, skincolors_t color, UINT8 flags) UINT8* R_GetLocalTranslationColormap(skin_t *skin, skin_t *localskin, skincolors_t color, UINT8 flags, boolean local) { - if (localskin) - return RGetTranslationColormap(localskin - K_GetSkinArray(local), color, flags, local); - else - return RGetTranslationColormap((skin - skins), color, flags, false); + const INT32 skinnum = localskin ? (localskin - K_GetSkinArray(local)) : (skin - skins); + return RGetTranslationColormap(skinnum, color, flags, (localskin && local)); } patch_t* R_GetSkinFaceRank(player_t* ply) { - if (ply->skinlocal && ply->localskin) - return localfacerankprefix[ply->localskin - 1]; - else if (ply->localskin) + if (ply->localskin) + { + if (ply->skinlocal) + return localfacerankprefix[ply->localskin - 1]; + return facerankprefix[ply->localskin - 1]; + } + return facerankprefix[ply->skin]; } patch_t* R_GetSkinFaceWant(player_t* ply) { - if (ply->skinlocal && ply->localskin) - return localfacewantprefix[ply->localskin - 1]; - else if (ply->localskin) + if (ply->localskin) + { + if (ply->skinlocal) + return localfacewantprefix[ply->localskin - 1]; + return facewantprefix[ply->localskin - 1]; + } + return facewantprefix[ply->skin]; } patch_t* R_GetSkinFaceMini(player_t* ply) { - if (ply->skinlocal && ply->localskin) - return localfacemmapprefix[ply->localskin - 1]; - else if (ply->localskin) + if (ply->localskin) + { + if (ply->skinlocal) + return localfacemmapprefix[ply->localskin - 1]; + return facemmapprefix[ply->localskin - 1]; + } + return facemmapprefix[ply->skin]; } diff --git a/src/r_main.cpp b/src/r_main.cpp index 06c595809..0226d8288 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -433,10 +433,7 @@ fixed_t R_ScaleFromGlobalAngle(angle_t visangle) if (den > num>>16) { num = FixedDiv(num, den); - if (num > 64*FRACUNIT) - return 64*FRACUNIT; - if (num < 256) - return 256; + num = CLAMP(num, 256, 64*FRACUNIT); return num; } return 64*FRACUNIT; @@ -449,8 +446,8 @@ line_t *R_GetFFloorLine(const line_t *line, const ffloor_t *pfloor, const sector size_t linenum = std::min((size_t)(line - sector->lines[0]), pfloor->master->frontsector->linecount); return pfloor->master->frontsector->lines[0] + linenum; } - else - return pfloor->master; + + return pfloor->master; } side_t *R_GetFFloorSide(const line_t *line, const ffloor_t *pfloor, const sector_t *sector) @@ -460,8 +457,8 @@ side_t *R_GetFFloorSide(const line_t *line, const ffloor_t *pfloor, const sector line_t *newline = R_GetFFloorLine(line, pfloor, sector); return &sides[newline->sidenum[0]]; } - else - return &sides[pfloor->master->sidenum[0]]; + + return &sides[pfloor->master->sidenum[0]]; } // @@ -1095,7 +1092,7 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y) // R_SetupFrame // -mobj_t *viewmobj; +mobj_t *viewmobj = NULL; static void R_SetupCommonFrame(player_t * player, sector_t * sector) { @@ -1258,13 +1255,7 @@ void R_SetupFrame(UINT8 pnum, boolean skybox) R_SetViewContext(static_cast(VIEWCONTEXT_PLAYER1 + pnum)); - if (thiscam->reset) - { - R_ResetViewInterpolation(pnum); - thiscam->reset = false; - } - - if (player->spectator || thiscam->freecam) + if (player->spectator || (thiscam && thiscam->freecam)) { // Free flying spectator uses demo freecam. This // requires chasecam to be enabled. @@ -1274,13 +1265,22 @@ void R_SetupFrame(UINT8 pnum, boolean skybox) if (player->playerstate == PST_DEAD || player->exiting) chasecam = true; // force chasecam on - if (chasecam && (thiscam && !thiscam->chase)) + if (thiscam) { - P_ResetCamera(player, thiscam); - thiscam->chase = true; + if (thiscam->reset) + { + R_ResetViewInterpolation(pnum); + thiscam->reset = false; + } + + if (chasecam && !thiscam->chase) + { + P_ResetCamera(player, thiscam); + thiscam->chase = true; + } + else if (!chasecam) + thiscam->chase = false; } - else if (thiscam && !chasecam) - thiscam->chase = false; newview->sky = !skybox; diff --git a/src/r_things.h b/src/r_things.h index fd03a6611..55dc6174f 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -67,6 +67,7 @@ FUNCINLINE static ATTRINLINE INT32 R_ThingLightLevel(mobj_t* thing) { return (INT32)thing->lightlevel; } + fixed_t R_GetSpriteDirectionalLighting(angle_t angle); fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope); diff --git a/src/s_sound.c b/src/s_sound.c index b84d69384..bc7fb7165 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -97,7 +97,6 @@ consvar_t cv_pausemusic = {"playmusicifpaused", "No", CV_SAVE, CV_YesNo, NULL, static CV_PossibleValue_t music_resync_threshold_cons_t[] = { {0, "MIN"}, {1000, "MAX"}, - {0} }; consvar_t cv_music_resync_threshold = {"music_resync_threshold", "0", CV_SAVE|CV_CALL, music_resync_threshold_cons_t, I_UpdateSongLagThreshold, 0, NULL, NULL, 0, 0, NULL}; @@ -1955,13 +1954,13 @@ static const char *musicexception_list[] = { // check if the current music is smth we dont want to keep (vote music, etc) static boolean S_CheckMusicException(void) { - if (!fasticmp(music.name, mapmusic.name)) - return true; - // dumb hack but dont keepmusic music that is supposed to reset if (music.flags & MUSIC_RELOADRESET) return true; + if (!fasticmp(music.name, mapmusic.name)) + return true; + // in case somehow the mapmusic was replaced with smth we dont want to keep for (size_t i = 0; i < sizeof(musicexception_list)/sizeof(musicexception_list[0]); i++) { @@ -2059,16 +2058,13 @@ static boolean S_SkipIntroMusic(void) if (fasticmp(music.name, "titles")) return false; - char *maptitle = G_BuildMapTitle(gamemap); // Zzz... + CLEANUP(Z_Pfree) char *maptitle = G_BuildMapTitle(gamemap); // Zzz... if (maptitle && fasticmp(maptitle, "Wandering Falls")) // wandering balls changes its song when the race starts Zzz... { - Z_Free(maptitle); return false; } - Z_Free(maptitle); - return true; } diff --git a/src/v_video.c b/src/v_video.c index b3e2cd38b..d87dd73b7 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -546,7 +546,8 @@ void V_SetPalette(INT32 palettenum) V_ReloadPalette(); #ifdef HWRENDER - if (rendermode == render_soft || (rendermode == render_opengl && HWR_ShouldUsePaletteRendering())) // opengl without paletterendering hates subpalettes + if (rendermode == render_soft || + (rendermode == render_opengl && HWR_ShouldUsePaletteRendering())) // opengl without paletterendering hates subpalettes #endif { if (palettenum == 0)