Expose blendmodes to UDMF

This commit is contained in:
MascaraSnake 2021-12-12 07:02:17 +01:00
parent f431b20911
commit ac3dd146c7
3 changed files with 21 additions and 5 deletions

View file

@ -264,10 +264,10 @@ mapformat_udmf
}
// LINEDEF RENDERSTYLES
/*linedefrenderstyles
linedefrenderstyles
{
include("SRB222_misc.cfg", "linedefrenderstyles");
}*/
}
// THING FLAGS
thingflags

View file

@ -63,11 +63,14 @@ linedefflags_udmf
transfer = "Transfer Line";
}
/*linedefrenderstyles
linedefrenderstyles
{
translucent = "Translucent";
fog = "Fog";
}*/
add = "Add";
subtract = "Subtract";
reversesubtract = "Reverse subtract";
modulate = "Modulate";
}
sectorflags
{

View file

@ -1701,6 +1701,19 @@ static void ParseTextmapLinedefParameter(UINT32 i, char *param, char *val)
lines[i].sidenum[1] = atol(val);
else if (fastcmp(param, "alpha"))
lines[i].alpha = FLOAT_TO_FIXED(atof(val));
else if (fastcmp(param, "blendmode") || fastcmp(param, "renderstyle"))
{
if (fastcmp(val, "translucent"))
lines[i].blendmode = AST_COPY;
else if (fastcmp(val, "add"))
lines[i].blendmode = AST_ADD;
else if (fastcmp(val, "subtract"))
lines[i].blendmode = AST_SUBTRACT;
else if (fastcmp(val, "reversesubtract"))
lines[i].blendmode = AST_REVERSESUBTRACT;
else if (fastcmp(val, "modulate"))
lines[i].blendmode = AST_MODULATE;
}
else if (fastcmp(param, "executordelay"))
lines[i].executordelay = atol(val);