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
This commit is contained in:
Alug committed 2025-11-24 17:01:26 +01:00
1 parent 5988cc4470
commit 537b32a8a3
15 files changed
+129 -183

No files matched your search

+2 -1
View File
@@ -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<<FRACBITS; break;
case 1: y += 30<<FRACBITS; break;
+2 -1
View File
@@ -3037,7 +3037,8 @@ tryagain:
void G_AddMapToBuffer(INT16 map)
{
INT16 bufx, refreshnum = max(0, TOLMaps(G_TOLFlag(gametype))-3);
const INT32 tolmaps = TOLMaps(G_TOLFlag(gametype));
INT16 bufx, refreshnum = max(0, tolmaps-3);
// Add the map to the buffer.
for (bufx = NUMMAPS-1; bufx > 0; bufx--)
+2 -2
View File
@@ -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)
{
+4 -2
View File
@@ -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;
+2 -1
View File
@@ -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;
+19 -8
View File
@@ -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<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
xyspeed = (((180<<FRACBITS) - fixedinput) / 90) - FRACUNIT;
xyspeed = FixedMul(actor->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<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
zspeed = (((180<<FRACBITS) - fixedinput) / 90) - FRACUNIT;
zspeed = FixedMul(actor->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<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
xyspeed = (((180<<FRACBITS) - fixedinput) / 90) - FRACUNIT;
xyspeed = FixedMul(wspeed, max(0, xyspeed));
input = FixedAngle(AngleFixed(input)/4);
input = FixedAngle(fixedinput/4);
if (invert)
input = InvAngle(input);
@@ -8318,11 +8327,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(wspeed, max(0, (((180<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
zspeed = max(0, (((180<<FRACBITS) - fixedinput) / 90) - FRACUNIT);
zspeed = FixedMul(wspeed, zspeed);
input = FixedAngle(AngleFixed(input)/4);
input = FixedAngle(fixedinput/4);
if (invert)
input = InvAngle(input);
+13 -13
View File
@@ -338,19 +338,12 @@ void P_SpawnSlope_Line(int linenum)
vector3_t origin, point;
vector2_t direction;
fixed_t nx, ny, dz, extent;
boolean frontfloor = (special == 700 || special == 702 || special == 703);
boolean backfloor = (special == 710 || special == 712 || special == 713);
boolean frontceil = (special == 701 || special == 702 || special == 713);
boolean backceil = (special == 711 || special == 712 || special == 703);
UINT8 flags = 0; // Slope flags
if (line->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);
+11 -5
View File
@@ -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
+9 -9
View File
@@ -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)
+8 -94
View File
@@ -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
//
+29 -17
View File
@@ -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];
}
+21 -21
View File
@@ -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>((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_e>(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;
+1
View File
@@ -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);
+4 -8
View File
@@ -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;
}
+2 -1
View File
@@ -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)