453: Mixed D+C fixes; unused param cast in P_FadeFakeFloor

This commit is contained in:
mazmazz 2018-09-15 01:04:15 -04:00
parent e8a5735f75
commit 5585edf459
2 changed files with 6 additions and 2 deletions

View File

@ -2621,6 +2621,7 @@ static inline void LoadDisappearThinker(actionf_p1 thinker)
//
static inline void LoadFadeThinker(actionf_p1 thinker)
{
sector_t *ss;
fade_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
ht->thinker.function.acp1 = thinker;
ht->dest_exc = LoadExtraColormap(save_p);
@ -2641,7 +2642,7 @@ static inline void LoadFadeThinker(actionf_p1 thinker)
ht->doghostfade = READUINT8(save_p);
ht->exactalpha = READUINT8(save_p);
sector_t *ss = LoadSector(ht->sectornum);
ss = LoadSector(ht->sectornum);
if (ss)
{
size_t j = 0; // ss->ffloors is saved as ffloor #0, ss->ffloors->next is #1, etc

View File

@ -7574,6 +7574,7 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval
boolean stillfading = false;
INT32 alpha;
fade_t *fadingdata = (fade_t *)rover->fadingdata;
(void)docolormap; // *shrug* maybe we can use this in the future. For now, let's be consistent with our other function params
if (rover->master->special == 258) // Laser block
return false;
@ -7832,6 +7833,8 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
boolean doexists, boolean dotranslucent, boolean dolighting, boolean docolormap,
boolean docollision, boolean doghostfade, boolean exactalpha)
{
fade_t *d;
// If fading an invisible FOF whose render flags we did not yet set,
// initialize its alpha to 1
if (dotranslucent &&
@ -7845,7 +7848,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor
if (rover->alpha == max(1, min(256, relative ? rover->alpha + destvalue : destvalue)))
return;
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
d->thinker.function.acp1 = (actionf_p1)T_Fade;
d->rover = rover;