mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
Added: 3D floor should be affected by control sector's color_floor and color_ceiling.
This commit is contained in:
parent
76b2b1be10
commit
cb8473fa09
5 changed files with 33 additions and 14 deletions
|
@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.3.0.2854")]
|
||||
[assembly: AssemblyVersion("2.3.0.2855")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
[assembly: AssemblyHash("71440fb")]
|
||||
[assembly: AssemblyHash("76b2b1b")]
|
||||
|
|
|
@ -29,5 +29,5 @@ using System.Resources;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.3.0.2854")]
|
||||
[assembly: AssemblyVersion("2.3.0.2855")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
|
|
@ -16,7 +16,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private readonly Linedef linedef;
|
||||
|
||||
// Floor and ceiling planes
|
||||
public PixelColor ColorFloor { get; private set; }
|
||||
private SectorLevel floor;
|
||||
public PixelColor ColorCeiling { get; private set; }
|
||||
private SectorLevel ceiling;
|
||||
|
||||
// Alpha transparency
|
||||
|
@ -197,6 +199,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
ceiling.colorbelow = PixelColor.FromInt(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (VavoomType)
|
||||
{
|
||||
ColorFloor = sd.ColorFloor;
|
||||
ColorCeiling = sd.ColorCeiling;
|
||||
}
|
||||
else
|
||||
{
|
||||
ColorFloor = sd.ColorCeiling;
|
||||
ColorCeiling = sd.ColorFloor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,13 +115,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
byte alpha = (byte)General.Clamp(level.alpha, 0, 255);
|
||||
int color = PixelColor.FromInt(level.color).WithAlpha(alpha).ToInt();
|
||||
int targetbrightness;
|
||||
if(extrafloor != null && !extrafloor.VavoomType && !level.disablelighting)
|
||||
SectorData sd = mode.GetSectorData(this.Sector.Sector);
|
||||
if (extrafloor != null && !extrafloor.VavoomType && !level.disablelighting)
|
||||
{
|
||||
//mxd. Top extrafloor level should calculate fogdensity from the brightness of the level above it
|
||||
if(!innerside)
|
||||
{
|
||||
targetbrightness = 0;
|
||||
SectorData sd = mode.GetSectorData(this.Sector.Sector);
|
||||
for(int i = 0; i < sd.LightLevels.Count - 1; i++)
|
||||
{
|
||||
if(sd.LightLevels[i] == level)
|
||||
|
@ -135,7 +135,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else
|
||||
{
|
||||
targetbrightness = level.brightnessbelow;
|
||||
SectorData sd = mode.GetSectorData(this.Sector.Sector);
|
||||
for(int i = 0; i < sd.LightLevels.Count; i++)
|
||||
{
|
||||
if(sd.LightLevels[i] == level)
|
||||
|
@ -151,6 +150,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
targetbrightness = level.brightnessbelow;
|
||||
}
|
||||
|
||||
// [ZZ] Apply Doom 64 lighting here (for extrafloor)
|
||||
if (extrafloor != null) color = PixelColor.Modulate(PixelColor.FromInt(color), extrafloor.VavoomType ? extrafloor.ColorCeiling : extrafloor.ColorFloor).WithAlpha(alpha).ToInt();
|
||||
|
||||
//mxd. Determine fog density
|
||||
fogfactor = CalculateFogFactor(targetbrightness);
|
||||
|
||||
|
|
|
@ -111,16 +111,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else
|
||||
texscale = new Vector2D(1.0f / 64.0f, 1.0f / 64.0f);
|
||||
|
||||
// Determine brightness
|
||||
int color = PixelColor.FromInt(level.color).WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt();
|
||||
// Determine brightness
|
||||
byte alpha = (byte)General.Clamp(level.alpha, 0, 255);
|
||||
int color = PixelColor.FromInt(level.color).WithAlpha(alpha).ToInt();
|
||||
|
||||
//mxd. Top extrafloor level should calculate fogdensity
|
||||
//from the brightness of the level above it
|
||||
int targetbrightness;
|
||||
//mxd. Top extrafloor level should calculate fogdensity
|
||||
//from the brightness of the level above it
|
||||
SectorData sd = mode.GetSectorData(this.Sector.Sector);
|
||||
int targetbrightness;
|
||||
if(extrafloor != null && extrafloor.VavoomType && !level.disablelighting)
|
||||
{
|
||||
targetbrightness = 0;
|
||||
SectorData sd = mode.GetSectorData(this.Sector.Sector);
|
||||
for(int i = 0; i < sd.LightLevels.Count - 1; i++)
|
||||
{
|
||||
if(sd.LightLevels[i] == level)
|
||||
|
@ -135,8 +136,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
targetbrightness = level.brightnessbelow;
|
||||
}
|
||||
|
||||
//mxd. Determine fog density
|
||||
fogfactor = CalculateFogFactor(targetbrightness);
|
||||
// [ZZ] Apply Doom 64 lighting here (for extrafloor)
|
||||
if (extrafloor != null) color = PixelColor.Modulate(PixelColor.FromInt(color), extrafloor.VavoomType ? extrafloor.ColorFloor : extrafloor.ColorCeiling).WithAlpha(alpha).ToInt();
|
||||
|
||||
//mxd. Determine fog density
|
||||
fogfactor = CalculateFogFactor(targetbrightness);
|
||||
|
||||
// Make vertices
|
||||
ReadOnlyCollection<Vector2D> triverts = Sector.Sector.Triangles.Vertices;
|
||||
|
|
Loading…
Reference in a new issue