mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-02-03 13:11:04 +00:00
Standardize and finalize the naming conventions for the new UDMF keys to everything lightmap-related to use an "lm_" prefix.
This commit is contained in:
parent
5124788013
commit
4107176f0d
2 changed files with 13 additions and 13 deletions
|
@ -52,9 +52,9 @@ Usage: zdray [options] sourcefile.wad
|
||||||
thing // ZDRayInfo (ZDRay properties for the map)
|
thing // ZDRayInfo (ZDRay properties for the map)
|
||||||
{
|
{
|
||||||
type = 9890;
|
type = 9890;
|
||||||
zdraysuncolor = <string> (hex color, default: "FFFFFF")
|
lm_suncolor = <string> (hex color, default: "FFFFFF")
|
||||||
zdraysampledistance = <int> (default: 8, map units each lightmap texel covers, must be in powers of two)
|
lm_sampledistance = <int> (default: 8, map units each lightmap texel covers, must be in powers of two)
|
||||||
zdraygridsize = <float> (default: 32, grid density for the automatic light probes)
|
lm_gridsize = <float> (default: 32, grid density for the automatic light probes)
|
||||||
}
|
}
|
||||||
|
|
||||||
thing // Static point light (Light color and distance properties use the same args as dynamic lights)
|
thing // Static point light (Light color and distance properties use the same args as dynamic lights)
|
||||||
|
|
|
@ -118,7 +118,7 @@ void FLevel::SetupLights()
|
||||||
{
|
{
|
||||||
const UDMFKey &key = thing->props[propIndex];
|
const UDMFKey &key = thing->props[propIndex];
|
||||||
|
|
||||||
if (!stricmp(key.key, "zdraysuncolor"))
|
if (!stricmp(key.key, "lm_suncolor"))
|
||||||
{
|
{
|
||||||
FString hex = FString("0x") + FString(key.value);
|
FString hex = FString("0x") + FString(key.value);
|
||||||
hex.StripChars("\"");
|
hex.StripChars("\"");
|
||||||
|
@ -126,7 +126,7 @@ void FLevel::SetupLights()
|
||||||
int rgb = hex.ToULong();
|
int rgb = hex.ToULong();
|
||||||
lightcolor = (uint32_t)rgb;
|
lightcolor = (uint32_t)rgb;
|
||||||
}
|
}
|
||||||
else if (!stricmp(key.key, "zdraysampledistance"))
|
else if (!stricmp(key.key, "lm_sampledistance"))
|
||||||
{
|
{
|
||||||
Samples = atoi(key.value);
|
Samples = atoi(key.value);
|
||||||
if (Samples < 8) Samples = 8;
|
if (Samples < 8) Samples = 8;
|
||||||
|
@ -135,14 +135,14 @@ void FLevel::SetupLights()
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// light bounces temporarily disabled
|
// light bounces temporarily disabled
|
||||||
else if (!stricmp(key.key, "zdraybounces"))
|
else if (!stricmp(key.key, "lm_bounces"))
|
||||||
{
|
{
|
||||||
LightBounce = atoi(key.value);
|
LightBounce = atoi(key.value);
|
||||||
if (LightBounce < 0) LightBounce = 0;
|
if (LightBounce < 0) LightBounce = 0;
|
||||||
if (LightBounce > 8) LightBounce = 8;
|
if (LightBounce > 8) LightBounce = 8;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
else if (!stricmp(key.key, "zdraygridsize"))
|
else if (!stricmp(key.key, "lm_gridsize"))
|
||||||
{
|
{
|
||||||
GridSize = atof(key.value) ? atof(key.value) : 64.f;
|
GridSize = atof(key.value) ? atof(key.value) : 64.f;
|
||||||
if (GridSize < 1.f) GridSize = 1.f;
|
if (GridSize < 1.f) GridSize = 1.f;
|
||||||
|
@ -429,15 +429,15 @@ void FLevel::CreateLights()
|
||||||
for (unsigned int propIndex = 0; propIndex < sector->props.Size(); propIndex++)
|
for (unsigned int propIndex = 0; propIndex < sector->props.Size(); propIndex++)
|
||||||
{
|
{
|
||||||
const UDMFKey &key = sector->props[propIndex];
|
const UDMFKey &key = sector->props[propIndex];
|
||||||
if (!stricmp(key.key, "lightcolorfloor"))
|
if (!stricmp(key.key, "lm_lightcolorfloor"))
|
||||||
{
|
{
|
||||||
lightcolor = atoi(key.value);
|
lightcolor = atoi(key.value);
|
||||||
}
|
}
|
||||||
else if (!stricmp(key.key, "lightintensityfloor"))
|
else if (!stricmp(key.key, "lm_lightintensityfloor"))
|
||||||
{
|
{
|
||||||
lightintensity = atof(key.value);
|
lightintensity = atof(key.value);
|
||||||
}
|
}
|
||||||
else if (!stricmp(key.key, "lightdistancefloor"))
|
else if (!stricmp(key.key, "lm_lightdistancefloor"))
|
||||||
{
|
{
|
||||||
lightdistance = atof(key.value);
|
lightdistance = atof(key.value);
|
||||||
}
|
}
|
||||||
|
@ -461,15 +461,15 @@ void FLevel::CreateLights()
|
||||||
for (unsigned int propIndex = 0; propIndex < sector->props.Size(); propIndex++)
|
for (unsigned int propIndex = 0; propIndex < sector->props.Size(); propIndex++)
|
||||||
{
|
{
|
||||||
const UDMFKey &key = sector->props[propIndex];
|
const UDMFKey &key = sector->props[propIndex];
|
||||||
if (!stricmp(key.key, "lightcolorceiling"))
|
if (!stricmp(key.key, "lm_lightcolorceiling"))
|
||||||
{
|
{
|
||||||
lightcolor = atoi(key.value);
|
lightcolor = atoi(key.value);
|
||||||
}
|
}
|
||||||
else if (!stricmp(key.key, "lightintensityceiling"))
|
else if (!stricmp(key.key, "lm_lightintensityceiling"))
|
||||||
{
|
{
|
||||||
lightintensity = atof(key.value);
|
lightintensity = atof(key.value);
|
||||||
}
|
}
|
||||||
else if (!stricmp(key.key, "lightdistanceceiling"))
|
else if (!stricmp(key.key, "lm_lightdistanceceiling"))
|
||||||
{
|
{
|
||||||
lightdistance = atof(key.value);
|
lightdistance = atof(key.value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue