Replicate old hack in binary maps: Translucent FOFs set to full opacity cut cyan pixels

This commit is contained in:
MascaraSnake 2021-06-27 18:45:56 +02:00
parent b0a762a45e
commit 06e06a1cb6
2 changed files with 42 additions and 9 deletions

View file

@ -3104,17 +3104,21 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[2] |= TMFA_SPLAT;
}
else
lines[i].args[1] = 255;
//Appearance
if (lines[i].special == 105)
lines[i].args[2] = TMFA_NOPLANES|TMFA_NOSIDES;
lines[i].args[2] |= TMFA_NOPLANES|TMFA_NOSIDES;
else if (lines[i].special == 104)
lines[i].args[2] = TMFA_NOSIDES;
lines[i].args[2] |= TMFA_NOSIDES;
else if (lines[i].special == 103)
lines[i].args[2] = TMFA_NOPLANES;
lines[i].args[2] |= TMFA_NOPLANES;
if (lines[i].special != 100 && (lines[i].special != 104 || !(lines[i].flags & ML_NOCLIMB)))
lines[i].args[2] |= TMFA_NOSHADE;
if (lines[i].flags & ML_EFFECT6)
@ -3145,6 +3149,10 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[2] |= TMFW_SPLAT;
}
//No sides?
@ -3187,15 +3195,19 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[2] |= TMFA_SPLAT;
}
else
lines[i].args[1] = 255;
//Appearance
if (lines[i].special == 142 || lines[i].special == 145)
lines[i].args[2] = TMFA_NOSIDES;
lines[i].args[2] |= TMFA_NOSIDES;
else if (lines[i].special == 146)
lines[i].args[2] = TMFA_NOPLANES;
lines[i].args[2] |= TMFA_NOPLANES;
if (lines[i].special != 146 && (lines[i].flags & ML_NOCLIMB))
lines[i].args[2] |= TMFA_NOSHADE;
if (lines[i].flags & ML_EFFECT6)
@ -3256,6 +3268,10 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[3] |= TMFC_SPLAT;
}
else
lines[i].args[1] = 255;
@ -3298,15 +3314,19 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[2] |= TMFA_SPLAT;
}
else
lines[i].args[1] = 255;
//Appearance
if (lines[i].special == 193)
lines[i].args[2] = TMFA_NOPLANES|TMFA_NOSIDES;
lines[i].args[2] |= TMFA_NOPLANES|TMFA_NOSIDES;
if (lines[i].special >= 194)
lines[i].args[2] = TMFA_INSIDES;
lines[i].args[2] |= TMFA_INSIDES;
if (lines[i].special != 190 && (lines[i].special <= 193 || lines[i].flags & ML_NOCLIMB))
lines[i].args[2] |= TMFA_NOSHADE;
if (lines[i].flags & ML_EFFECT6)
@ -3354,6 +3374,10 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[2] |= TMFA_SPLAT;
}
else
lines[i].args[1] = 255;
@ -3411,6 +3435,10 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[3] |= TMFB_SPLAT;
}
else
lines[i].args[1] = 255;
@ -3459,7 +3487,8 @@ static void P_ConvertBinaryMap(void)
//Flags
if (lines[i].flags & ML_EFFECT1)
lines[i].args[2] = TMFL_NOBOSSES;
if (lines[i].flags & ML_EFFECT6)
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].flags & ML_EFFECT6 || lines[i].args[1] == 256)
lines[i].args[2] = TMFL_SPLAT;
break;
@ -3478,6 +3507,10 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
if (lines[i].args[1] == 256)
lines[i].args[2] |= FF_SPLAT;
}
else
lines[i].args[1] = 255;

View file

@ -5635,7 +5635,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
}
fflr->alpha = max(0, min(0xff, alpha));
if (fflr->alpha < 0xff)
if (fflr->alpha < 0xff || flags & FF_SPLAT)
{
fflr->flags |= FF_TRANSLUCENT;
fflr->spawnflags = fflr->flags;