mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-20 19:02:12 +00:00
Game configurations: renamed lightmap things from static to lightmap. Added pulsing, flickering, and random flickering lightmap things
This commit is contained in:
parent
2b40a08f13
commit
10c7594c63
6 changed files with 185 additions and 26 deletions
|
@ -1,10 +1,10 @@
|
|||
gzdoom_lights
|
||||
{
|
||||
staticlights
|
||||
lightmaplights
|
||||
{
|
||||
color = 7;
|
||||
arrow = 0;
|
||||
title = "Static Lights";
|
||||
title = "Lightmap Lights";
|
||||
sort = 1;
|
||||
width = 0;
|
||||
height = 0;
|
||||
|
@ -15,8 +15,86 @@ gzdoom_lights
|
|||
|
||||
9876
|
||||
{
|
||||
title = "Static Point Light";
|
||||
class = "StaticPointLight"; // Fake class name
|
||||
title = "Lightmap Point Light";
|
||||
class = "pointlighttraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Red";
|
||||
default = 255;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Green";
|
||||
default = 255;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Blue";
|
||||
default = 255;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Radius";
|
||||
default = 64;
|
||||
}
|
||||
}
|
||||
|
||||
9877
|
||||
{
|
||||
title = "Lightmap Point Light (Pulsing)";
|
||||
class = "pointlightpulsetraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Red";
|
||||
default = 255;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Green";
|
||||
default = 255;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Blue";
|
||||
default = 255;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Radius";
|
||||
default = 64;
|
||||
}
|
||||
}
|
||||
|
||||
9878
|
||||
{
|
||||
title = "Lightmap Point Light (Flickering)";
|
||||
class = "pointlightflickertraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Red";
|
||||
default = 255;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Green";
|
||||
default = 255;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Blue";
|
||||
default = 255;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Radius";
|
||||
default = 64;
|
||||
}
|
||||
}
|
||||
|
||||
9879
|
||||
{
|
||||
title = "Lightmap Point Light (Random Flickering)";
|
||||
class = "pointlightflickerrandomtraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Red";
|
||||
|
@ -41,8 +119,89 @@ gzdoom_lights
|
|||
|
||||
9881
|
||||
{
|
||||
title = "Static Spotlight";
|
||||
class = "StaticSpotLight"; // Fake class name
|
||||
title = "Lightmap Spotlight";
|
||||
class = "spotlighttraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Color";
|
||||
default = 16777215;
|
||||
str = true;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Inner angle";
|
||||
default = 8;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Outer angle";
|
||||
default = 32;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Radius";
|
||||
default = 64;
|
||||
}
|
||||
}
|
||||
|
||||
9882
|
||||
{
|
||||
title = "Lightmap Spotlight (Pulsing)";
|
||||
class = "spotlightpulsetraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Color";
|
||||
default = 16777215;
|
||||
str = true;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Inner angle";
|
||||
default = 8;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Outer angle";
|
||||
default = 32;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Radius";
|
||||
default = 64;
|
||||
}
|
||||
}
|
||||
|
||||
9883
|
||||
{
|
||||
title = "Lightmap Spotlight (Flickering)";
|
||||
class = "spotlightflickertraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Color";
|
||||
default = 16777215;
|
||||
str = true;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Inner angle";
|
||||
default = 8;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Outer angle";
|
||||
default = 32;
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Radius";
|
||||
default = 64;
|
||||
}
|
||||
}
|
||||
|
||||
9884
|
||||
{
|
||||
title = "Lightmap Spotlight (Random Flickering)";
|
||||
class = "spotlightflickerrandomtraceattenuated";
|
||||
arg0
|
||||
{
|
||||
title = "Color";
|
||||
|
|
|
@ -579,7 +579,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|||
color = new PixelColor((byte)linealpha, (byte)t.Args[1], (byte)t.Args[2], (byte)t.Args[3]);
|
||||
break;
|
||||
|
||||
case GZGeneral.LightDef.POINT_STATIC:
|
||||
case GZGeneral.LightDef.POINT_LIGHTMAP:
|
||||
// ZDRay static lights have an intensity that's set through the thing's alpha value
|
||||
double intensity = t.Fields.GetValue("alpha", 1.0);
|
||||
byte r = (byte)General.Clamp(t.Args[0] * intensity, 0.0, 255.0);
|
||||
|
@ -622,7 +622,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
|
|||
else color = new PixelColor((byte)linealpha, (byte)((t.Args[0] & 0xFF0000) >> 16), (byte)((t.Args[0] & 0x00FF00) >> 8), (byte)((t.Args[0] & 0x0000FF)));
|
||||
|
||||
// ZDRay static lights have an intensity that's set through the thing's alpha value
|
||||
if (t.DynamicLightType.LightDef == GZGeneral.LightDef.SPOT_STATIC)
|
||||
if (t.DynamicLightType.LightDef == GZGeneral.LightDef.SPOT_LIGHTMAP)
|
||||
{
|
||||
double intensity = t.Fields.GetValue("alpha", 1.0);
|
||||
if (intensity != 1.0)
|
||||
|
|
|
@ -120,17 +120,17 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
|||
[LightDefClass("vavoomlightcolor")]
|
||||
VAVOOM_COLORED,
|
||||
|
||||
[LightDefRenderStyle(LightRenderStyle.STATIC)]
|
||||
[LightDefNum(9876)]
|
||||
[LightDefClass("staticpointlight")]
|
||||
[LightDefModifier(LightModifier.NORMAL)]
|
||||
POINT_STATIC,
|
||||
[LightDefRenderStyle(LightRenderStyle.LIGHTMAP)]
|
||||
[LightDefNum(9876, 9877, 9878, 9879)]
|
||||
[LightDefClass("pointlighttraceattenuated", "pointlightpulsetraceattenuated", "pointlightflickertraceattenuated", "pointlightflickerrandomtraceattenuated")]
|
||||
[LightDefModifier(LightModifier.NORMAL, LightModifier.PULSE, LightModifier.FLICKER, LightModifier.FLICKERRANDOM)]
|
||||
POINT_LIGHTMAP,
|
||||
|
||||
[LightDefRenderStyle(LightRenderStyle.STATIC)]
|
||||
[LightDefNum(9881)]
|
||||
[LightDefClass("staticspotlight")]
|
||||
[LightDefModifier(LightModifier.NORMAL)]
|
||||
SPOT_STATIC,
|
||||
[LightDefRenderStyle(LightRenderStyle.LIGHTMAP)]
|
||||
[LightDefNum(9881, 9882, 9883, 9884)]
|
||||
[LightDefClass("spotlighttraceattenuated", "spotlightpulsetraceattenuated", "spotlightflickertraceattenuated", "spotlightflickerrandomtraceattenuated")]
|
||||
[LightDefModifier(LightModifier.NORMAL, LightModifier.PULSE, LightModifier.FLICKER, LightModifier.FLICKERRANDOM)]
|
||||
SPOT_LIGHTMAP,
|
||||
|
||||
[LightDefRenderStyle(LightRenderStyle.NONE)]
|
||||
[LightDefNum(9890)]
|
||||
|
@ -150,7 +150,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
|||
ATTENUATED = 98,
|
||||
VAVOOM = 50,
|
||||
ADDITIVE = 25,
|
||||
STATIC = 98, // Same as attenuated
|
||||
LIGHTMAP = 98, // Same as attenuated
|
||||
NONE = 0,
|
||||
}
|
||||
|
||||
|
@ -232,14 +232,14 @@ namespace CodeImp.DoomBuilder.GZBuilder
|
|||
case LightDef.POINT_ADDITIVE:
|
||||
case LightDef.POINT_SUBTRACTIVE:
|
||||
case LightDef.POINT_ATTENUATED:
|
||||
case LightDef.POINT_STATIC:
|
||||
case LightDef.POINT_LIGHTMAP:
|
||||
LightType = LightType.POINT;
|
||||
break;
|
||||
case LightDef.SPOT_NORMAL:
|
||||
case LightDef.SPOT_ADDITIVE:
|
||||
case LightDef.SPOT_SUBTRACTIVE:
|
||||
case LightDef.SPOT_ATTENUATED:
|
||||
case LightDef.SPOT_STATIC:
|
||||
case LightDef.SPOT_LIGHTMAP:
|
||||
LightType = LightType.SPOT;
|
||||
break;
|
||||
case LightDef.VAVOOM_GENERIC:
|
||||
|
|
|
@ -592,7 +592,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
color = new PixelColor(255, (byte)((t.Args[0] & 0xFF0000) >> 16), (byte)((t.Args[0] & 0x00FF00) >> 8), (byte)((t.Args[0] & 0x0000FF)));
|
||||
|
||||
// ZDRay static lights have an intensity that's set through the thing's alpha value
|
||||
if (t.DynamicLightType.LightDef == GZGeneral.LightDef.SPOT_STATIC)
|
||||
if (t.DynamicLightType.LightDef == GZGeneral.LightDef.SPOT_LIGHTMAP)
|
||||
{
|
||||
double intensity = t.Fields.GetValue("alpha", 1.0);
|
||||
if (intensity != 1.0)
|
||||
|
@ -608,7 +608,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
|
||||
// Point light
|
||||
if (t.DynamicLightType.LightDef == GZGeneral.LightDef.POINT_STATIC)
|
||||
if (t.DynamicLightType.LightDef == GZGeneral.LightDef.POINT_LIGHTMAP)
|
||||
{
|
||||
// ZDRay static lights have an intensity that's set through the thing's alpha value
|
||||
double intensity = t.Fields.GetValue("alpha", 1.0);
|
||||
|
|
|
@ -608,7 +608,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
case GZGeneral.LightRenderStyle.VAVOOM: lightOffsets[0]++; break;
|
||||
case GZGeneral.LightRenderStyle.ADDITIVE: lightOffsets[2]++; break;
|
||||
case GZGeneral.LightRenderStyle.SUBTRACTIVE: lightOffsets[3]++; break;
|
||||
case GZGeneral.LightRenderStyle.STATIC: // Static lights look the same as attenuated lights
|
||||
case GZGeneral.LightRenderStyle.LIGHTMAP: // Static lights look the same as attenuated lights
|
||||
default: lightOffsets[1]++; break; // attenuated
|
||||
}
|
||||
}
|
||||
|
|
|
@ -679,7 +679,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
if (ld.LightDef != GZGeneral.LightDef.POINT_SUBTRACTIVE) // normal, additive, attenuated
|
||||
{
|
||||
// ZDRay static lights have an intensity that's set through the thing's alpha value
|
||||
float intensity = ld.LightRenderStyle == GZGeneral.LightRenderStyle.STATIC ? (float)thing.Fields.GetValue("alpha", 1.0) : 1.0f;
|
||||
float intensity = ld.LightRenderStyle == GZGeneral.LightRenderStyle.LIGHTMAP ? (float)thing.Fields.GetValue("alpha", 1.0) : 1.0f;
|
||||
|
||||
//lightColor.Alpha used in shader to perform some calculations based on light type
|
||||
lightColor = new Color4(
|
||||
|
@ -718,7 +718,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
if (ld.LightDef != GZGeneral.LightDef.SPOT_SUBTRACTIVE)
|
||||
{
|
||||
// ZDRay static lights have an intensity that's set through the thing's alpha value
|
||||
float intensity = ld.LightRenderStyle == GZGeneral.LightRenderStyle.STATIC ? (float)thing.Fields.GetValue("alpha", 1.0) : 1.0f;
|
||||
float intensity = ld.LightRenderStyle == GZGeneral.LightRenderStyle.LIGHTMAP ? (float)thing.Fields.GetValue("alpha", 1.0) : 1.0f;
|
||||
|
||||
lightColor = new Color4(
|
||||
c1 / DYNLIGHT_INTENSITY_SCALER * intensity,
|
||||
|
|
Loading…
Reference in a new issue