mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Added, Visual mode: both Sky1 and Sky2 MAPINFO properties are now used when creating classic skybox texture.
This commit is contained in:
parent
e561d13048
commit
53a2344838
2 changed files with 32 additions and 3 deletions
|
@ -2588,10 +2588,29 @@ namespace CodeImp.DoomBuilder.Data
|
|||
{
|
||||
// Create classic texture
|
||||
Vector2D scale;
|
||||
Bitmap img = GetTextureBitmap(skytex, out scale);
|
||||
if(img != null)
|
||||
Bitmap sky1 = GetTextureBitmap(skytex, out scale);
|
||||
if(sky1 != null)
|
||||
{
|
||||
skybox = MakeClassicSkyBox(img, scale);
|
||||
// Double skies?
|
||||
if(mapinfo.DoubleSky)
|
||||
{
|
||||
Bitmap sky2 = GetTextureBitmap(mapinfo.Sky2);
|
||||
if(sky2 != null)
|
||||
{
|
||||
// Resize if needed
|
||||
if(sky2.Width != sky1.Width || sky2.Height != sky1.Height)
|
||||
ResizeImage(sky2, sky1.Width, sky1.Height);
|
||||
|
||||
// Combine both textures. Sky2 is below Sky1
|
||||
using(Graphics g = Graphics.FromImage(sky2))
|
||||
g.DrawImageUnscaled(sky1, 0, 0);
|
||||
|
||||
// Use the composite one
|
||||
sky1 = sky2;
|
||||
}
|
||||
}
|
||||
|
||||
skybox = MakeClassicSkyBox(sky1, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,6 +189,16 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
|
|||
if(mapinfo.OutsideFogDensity > 0 && (mapinfo.OutsideFogColor.Red > 0 || mapinfo.OutsideFogColor.Green > 0 || mapinfo.OutsideFogColor.Blue > 0))
|
||||
mapinfo.HasOutsideFogColor = true;
|
||||
|
||||
if(!string.IsNullOrEmpty(mapinfo.Sky2) && !mapinfo.DoubleSky)
|
||||
{
|
||||
LogWarning("\"Sky2\" is defined without \"doublesky\" flag. It won't be shown ingame");
|
||||
}
|
||||
else if(string.IsNullOrEmpty(mapinfo.Sky2) && mapinfo.DoubleSky)
|
||||
{
|
||||
LogWarning("\"doublesky\" flag is defined without \"Sky2\" property.");
|
||||
mapinfo.DoubleSky = false;
|
||||
}
|
||||
|
||||
// All done
|
||||
return !this.HasError;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue