mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Merge branch 'blentran-bin' into 'blentran'
Blentran: implement linedef actions for all blendmode strengths See merge request STJr/SRB2!1535
This commit is contained in:
commit
d9ecb800e3
5 changed files with 209 additions and 45 deletions
|
@ -3129,6 +3129,192 @@ linedeftypes
|
|||
title = "Fog Wall";
|
||||
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)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1484,23 +1484,12 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
case 256:
|
||||
blendmode = PF_Translucent;
|
||||
break;
|
||||
case 913:
|
||||
blendmode = PF_Multiplicative;
|
||||
Surf.PolyColor.s.alpha = 0xff;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
UINT32 blend = 0;
|
||||
transnum_t transtable = R_GetLinedefTransTable(gl_linedef);
|
||||
if (transtable == NUMTRANSMAPS)
|
||||
if ((blend = gl_linedef->blendmode) && (transtable == NUMTRANSMAPS || blendmode == AST_MODULATE))
|
||||
transtable = 0;
|
||||
if (gl_linedef->special == 910)
|
||||
blend = AST_ADD;
|
||||
else if (gl_linedef->special == 911)
|
||||
blend = AST_SUBTRACT;
|
||||
else if (gl_linedef->special == 912)
|
||||
blend = AST_REVERSESUBTRACT;
|
||||
|
||||
blendmode = HWR_SurfaceBlend(blend, transtable, &Surf);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3144,21 +3144,30 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = tag;
|
||||
lines[i].special = 720;
|
||||
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:
|
||||
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;
|
||||
|
||||
if (lines[i].special >= 910 && lines[i].special <= 919) // additive
|
||||
lines[i].blendmode = AST_ADD;
|
||||
|
||||
if (lines[i].special >= 920 && lines[i].special <= 929) // subtractive
|
||||
lines[i].blendmode = AST_SUBTRACT;
|
||||
|
||||
if (lines[i].special >= 930 && lines[i].special <= 939) // reverse subtractive
|
||||
lines[i].blendmode = AST_REVERSESUBTRACT;
|
||||
|
||||
if (lines[i].special == 940) // modulate
|
||||
lines[i].blendmode = AST_MODULATE;
|
||||
|
||||
//Linedef executor delay
|
||||
if (lines[i].special >= 400 && lines[i].special < 500)
|
||||
{
|
||||
|
|
|
@ -398,6 +398,7 @@ typedef struct line_s
|
|||
// Visual appearance: sidedefs.
|
||||
UINT16 sidenum[2]; // sidenum[1] will be 0xffff if one-sided
|
||||
fixed_t alpha; // translucency
|
||||
UINT8 blendmode; // blendmode
|
||||
INT32 executordelay;
|
||||
|
||||
fixed_t bbox[4]; // bounding box for the extent of the linedef
|
||||
|
|
23
src/r_segs.c
23
src/r_segs.c
|
@ -162,29 +162,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
return;
|
||||
|
||||
transtable = R_GetLinedefTransTable(ldef);
|
||||
if (ldef->special == 910)
|
||||
{
|
||||
if (transtable == NUMTRANSMAPS)
|
||||
transtable = 0;
|
||||
blendmode = AST_ADD;
|
||||
}
|
||||
else if (ldef->special == 911)
|
||||
{
|
||||
if (transtable == NUMTRANSMAPS)
|
||||
transtable = 0;
|
||||
blendmode = AST_SUBTRACT;
|
||||
}
|
||||
else if (ldef->special == 912)
|
||||
{
|
||||
if (transtable == NUMTRANSMAPS)
|
||||
transtable = 0;
|
||||
blendmode = AST_REVERSESUBTRACT;
|
||||
}
|
||||
else if (ldef->special == 913)
|
||||
{
|
||||
if ((blendmode = ldef->blendmode) && (transtable == NUMTRANSMAPS || blendmode == AST_MODULATE))
|
||||
transtable = 0;
|
||||
blendmode = AST_MODULATE;
|
||||
}
|
||||
if (transtable != NUMTRANSMAPS && (dc_transmap = R_GetBlendTable(blendmode, transtable)))
|
||||
{
|
||||
colfunc = colfuncs[COLDRAWFUNC_FUZZY];
|
||||
|
|
Loading…
Reference in a new issue