Implement binary map linedef actions for all blendmode strengths anyway.

This commit is contained in:
sphere 2021-06-05 13:00:23 +02:00
parent 5690f52d4a
commit eb5e93d625
4 changed files with 201 additions and 18 deletions

View file

@ -3129,6 +3129,192 @@ linedeftypes
title = "Fog Wall"; title = "Fog Wall";
prefix = "(909)"; prefix = "(909)";
} }
910
{
title = "100% Additive";
prefix = "(910)";
}
911
{
title = "90% Additive";
prefix = "(911)";
}
912
{
title = "80% Additive";
prefix = "(912)";
}
913
{
title = "70% Additive";
prefix = "(913)";
}
914
{
title = "60% Additive";
prefix = "(914)";
}
915
{
title = "50% Additive";
prefix = "(915)";
}
916
{
title = "40% Additive";
prefix = "(916)";
}
917
{
title = "30% Additive";
prefix = "(917)";
}
918
{
title = "20% Additive";
prefix = "(918)";
}
919
{
title = "10% Additive";
prefix = "(919)";
}
920
{
title = "100% Subtractive";
prefix = "(920)";
}
921
{
title = "90% Subtractive";
prefix = "(921)";
}
922
{
title = "80% Subtractive";
prefix = "(922)";
}
923
{
title = "70% Subtractive";
prefix = "(923)";
}
924
{
title = "60% Subtractive";
prefix = "(924)";
}
925
{
title = "50% Subtractive";
prefix = "(925)";
}
926
{
title = "40% Subtractive";
prefix = "(926)";
}
927
{
title = "30% Subtractive";
prefix = "(927)";
}
928
{
title = "20% Subtractive";
prefix = "(928)";
}
929
{
title = "10% Subtractive";
prefix = "(929)";
}
930
{
title = "100% Reverse Subtractive";
prefix = "(930)";
}
931
{
title = "90% Reverse Subtractive";
prefix = "(931)";
}
932
{
title = "80% Reverse Subtractive";
prefix = "(932)";
}
933
{
title = "70% Reverse Subtractive";
prefix = "(933)";
}
934
{
title = "60% Reverse Subtractive";
prefix = "(934)";
}
935
{
title = "50% Reverse Subtractive";
prefix = "(935)";
}
936
{
title = "40% Reverse Subtractive";
prefix = "(936)";
}
937
{
title = "30% Reverse Subtractive";
prefix = "(937)";
}
938
{
title = "20% Reverse Subtractive";
prefix = "(938)";
}
939
{
title = "10% Reverse Subtractive";
prefix = "(939)";
}
940
{
title = "Modulate";
prefix = "(940)";
}
} }
} }

View file

@ -1494,11 +1494,11 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
transnum_t transtable = R_GetLinedefTransTable(gl_linedef); transnum_t transtable = R_GetLinedefTransTable(gl_linedef);
if (transtable == NUMTRANSMAPS) if (transtable == NUMTRANSMAPS)
transtable = 0; transtable = 0;
if (gl_linedef->special == 910) if (gl_linedef->special >= 910 && gl_linedef->special <= 919)
blend = AST_ADD; blend = AST_ADD;
else if (gl_linedef->special == 911) else if (gl_linedef->special >= 920 && gl_linedef->special <= 929)
blend = AST_SUBTRACT; blend = AST_SUBTRACT;
else if (gl_linedef->special == 912) else if (gl_linedef->special >= 930 && gl_linedef->special <= 939)
blend = AST_REVERSESUBTRACT; blend = AST_REVERSESUBTRACT;
blendmode = HWR_SurfaceBlend(blend, transtable, &Surf); blendmode = HWR_SurfaceBlend(blend, transtable, &Surf);

View file

@ -3144,21 +3144,18 @@ static void P_ConvertBinaryMap(void)
lines[i].args[1] = tag; lines[i].args[1] = tag;
lines[i].special = 720; lines[i].special = 720;
break; break;
case 900: //Translucent wall (10%)
case 901: //Translucent wall (20%)
case 902: //Translucent wall (30%)
case 903: //Translucent wall (40%)
case 904: //Translucent wall (50%)
case 905: //Translucent wall (60%)
case 906: //Translucent wall (70%)
case 907: //Translucent wall (80%)
case 908: //Translucent wall (90%)
lines[i].alpha = ((909 - lines[i].special) << FRACBITS)/10;
break;
default: default:
break; break;
} }
// Set alpha for translucent walls
if (lines[i].special >= 900 && lines[i].special < 909)
lines[i].alpha = ((909 - lines[i].special) << FRACBITS)/10;
// Set alpha for additive/subtractive/reverse subtractive walls
if (lines[i].special >= 910 && lines[i].special <= 939)
lines[i].alpha = ((10 - lines[i].special % 10) << FRACBITS)/10;
//Linedef executor delay //Linedef executor delay
if (lines[i].special >= 400 && lines[i].special < 500) if (lines[i].special >= 400 && lines[i].special < 500)
{ {

View file

@ -162,25 +162,25 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
return; return;
transtable = R_GetLinedefTransTable(ldef); transtable = R_GetLinedefTransTable(ldef);
if (ldef->special == 910) if (ldef->special >= 910 && ldef->special <= 919)
{ {
if (transtable == NUMTRANSMAPS) if (transtable == NUMTRANSMAPS)
transtable = 0; transtable = 0;
blendmode = AST_ADD; blendmode = AST_ADD;
} }
else if (ldef->special == 911) else if (ldef->special >= 920 && ldef->special <= 929)
{ {
if (transtable == NUMTRANSMAPS) if (transtable == NUMTRANSMAPS)
transtable = 0; transtable = 0;
blendmode = AST_SUBTRACT; blendmode = AST_SUBTRACT;
} }
else if (ldef->special == 912) else if (ldef->special >= 930 && ldef->special <= 939)
{ {
if (transtable == NUMTRANSMAPS) if (transtable == NUMTRANSMAPS)
transtable = 0; transtable = 0;
blendmode = AST_REVERSESUBTRACT; blendmode = AST_REVERSESUBTRACT;
} }
else if (ldef->special == 913) else if (ldef->special == 940)
{ {
transtable = 0; transtable = 0;
blendmode = AST_MODULATE; blendmode = AST_MODULATE;