mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-18 10:01:48 +00:00
Fixed: flats and textures defined in TEXTURES should override regular ones (adding long texture names support broke this).
Removed unused references from all projects.
This commit is contained in:
parent
e99bad11ac
commit
43d4f80ba3
9 changed files with 25 additions and 35 deletions
|
@ -514,11 +514,9 @@
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Design" />
|
<Reference Include="System.Design" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
|
@ -947,6 +947,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
public ImageData GetTextureImage(long longname)
|
public ImageData GetTextureImage(long longname)
|
||||||
{
|
{
|
||||||
// Does this texture exist?
|
// Does this texture exist?
|
||||||
|
if(textures.ContainsKey(longname) && textures[longname] is HighResImage) return textures[longname]; //TEXTURES textures should still override regular ones...
|
||||||
if(texturenamesshorttofull.ContainsKey(longname)) return textures[texturenamesshorttofull[longname]]; //mxd
|
if(texturenamesshorttofull.ContainsKey(longname)) return textures[texturenamesshorttofull[longname]]; //mxd
|
||||||
if(textures.ContainsKey(longname)) return textures[longname];
|
if(textures.ContainsKey(longname)) return textures[longname];
|
||||||
|
|
||||||
|
@ -961,6 +962,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
|
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
|
||||||
long hash = MurmurHash2.Hash(name.Trim().ToUpperInvariant());
|
long hash = MurmurHash2.Hash(name.Trim().ToUpperInvariant());
|
||||||
|
|
||||||
|
if(textures.ContainsKey(hash) && textures[hash] is HighResImage) return textures[hash].Name; //TEXTURES textures should still override regular ones...
|
||||||
if(texturenamesshorttofull.ContainsKey(hash)) return textures[texturenamesshorttofull[hash]].Name;
|
if(texturenamesshorttofull.ContainsKey(hash)) return textures[texturenamesshorttofull[hash]].Name;
|
||||||
if(textures.ContainsKey(hash)) return textures[hash].Name;
|
if(textures.ContainsKey(hash)) return textures[hash].Name;
|
||||||
return name;
|
return name;
|
||||||
|
@ -969,6 +971,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
//mxd
|
//mxd
|
||||||
internal long GetFullLongTextureName(long hash)
|
internal long GetFullLongTextureName(long hash)
|
||||||
{
|
{
|
||||||
|
if(textures.ContainsKey(hash) && textures[hash] is HighResImage) return hash; //TEXTURES textures should still override regular ones...
|
||||||
return (General.Map.Config.UseLongTextureNames && texturenamesshorttofull.ContainsKey(hash) ? texturenamesshorttofull[hash] : hash);
|
return (General.Map.Config.UseLongTextureNames && texturenamesshorttofull.ContainsKey(hash) ? texturenamesshorttofull[hash] : hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1062,6 +1065,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
public ImageData GetFlatImage(long longname)
|
public ImageData GetFlatImage(long longname)
|
||||||
{
|
{
|
||||||
// Does this flat exist?
|
// Does this flat exist?
|
||||||
|
if(flats.ContainsKey(longname) && flats[longname] is HighResImage) return flats[longname]; //TEXTURES flats should still override regular ones...
|
||||||
if(flatnamesshorttofull.ContainsKey(longname)) return flats[flatnamesshorttofull[longname]]; //mxd
|
if(flatnamesshorttofull.ContainsKey(longname)) return flats[flatnamesshorttofull[longname]]; //mxd
|
||||||
if(flats.ContainsKey(longname)) return flats[longname];
|
if(flats.ContainsKey(longname)) return flats[longname];
|
||||||
|
|
||||||
|
@ -1070,11 +1074,11 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
// This returns an image by long and doesn't check if it exists
|
// This returns an image by long and doesn't check if it exists
|
||||||
public ImageData GetFlatImageKnown(long longname)
|
/*public ImageData GetFlatImageKnown(long longname)
|
||||||
{
|
{
|
||||||
// Return flat
|
// Return flat
|
||||||
return flatnamesshorttofull.ContainsKey(longname) ? flats[flatnamesshorttofull[longname]] : flats[longname]; //mxd
|
return flatnamesshorttofull.ContainsKey(longname) ? flats[flatnamesshorttofull[longname]] : flats[longname]; //mxd
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//mxd. Gets full flat name by short flat name
|
//mxd. Gets full flat name by short flat name
|
||||||
public string GetFullFlatName(string name)
|
public string GetFullFlatName(string name)
|
||||||
|
@ -1083,6 +1087,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
|
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
|
||||||
long hash = MurmurHash2.Hash(name.ToUpperInvariant());
|
long hash = MurmurHash2.Hash(name.ToUpperInvariant());
|
||||||
|
|
||||||
|
if(flats.ContainsKey(hash) && flats[hash] is HighResImage) return flats[hash].Name; //TEXTURES flats should still override regular ones...
|
||||||
if(flatnamesshorttofull.ContainsKey(hash)) return flats[flatnamesshorttofull[hash]].Name;
|
if(flatnamesshorttofull.ContainsKey(hash)) return flats[flatnamesshorttofull[hash]].Name;
|
||||||
if(flats.ContainsKey(hash)) return flats[hash].Name;
|
if(flats.ContainsKey(hash)) return flats[hash].Name;
|
||||||
return name;
|
return name;
|
||||||
|
@ -1091,6 +1096,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
//mxd
|
//mxd
|
||||||
internal long GetFullLongFlatName(long hash)
|
internal long GetFullLongFlatName(long hash)
|
||||||
{
|
{
|
||||||
|
if(flats.ContainsKey(hash) && flats[hash] is HighResImage) return hash; //TEXTURES flats should still override regular ones...
|
||||||
return (General.Map.Config.UseLongTextureNames && flatnamesshorttofull.ContainsKey(hash) ? flatnamesshorttofull[hash] : hash);
|
return (General.Map.Config.UseLongTextureNames && flatnamesshorttofull.ContainsKey(hash) ? flatnamesshorttofull[hash] : hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1191,8 +1197,7 @@ namespace CodeImp.DoomBuilder.Data
|
||||||
if(!string.IsNullOrEmpty(pname))
|
if(!string.IsNullOrEmpty(pname))
|
||||||
{
|
{
|
||||||
long longname = Lump.MakeLongName(pname);
|
long longname = Lump.MakeLongName(pname);
|
||||||
if(sprites.ContainsKey(longname))
|
if(sprites.ContainsKey(longname)) return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
// Go for all opened containers
|
// Go for all opened containers
|
||||||
for(int i = containers.Count - 1; i >= 0; i--)
|
for(int i = containers.Count - 1; i >= 0; i--)
|
||||||
|
|
|
@ -623,33 +623,30 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(General.Map.Data.GetFlatExists(longimagename))
|
if(longimagename == MapSet.EmptyLongName)
|
||||||
{
|
|
||||||
img = General.Map.Data.GetFlatImageKnown(longimagename);
|
|
||||||
|
|
||||||
// Is the texture loaded?
|
|
||||||
if(img.IsImageLoaded && !img.LoadFailed)
|
|
||||||
{
|
|
||||||
if(img.Texture == null) img.CreateTexture();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
img = General.Map.Data.WhiteTexture;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(longimagename == MapSet.EmptyLongName) //mxd
|
|
||||||
{
|
{
|
||||||
img = General.Map.Data.MissingTexture3D;
|
img = General.Map.Data.MissingTexture3D;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
img = General.Map.Data.UnknownTexture3D;
|
img = General.Map.Data.GetFlatImage(longimagename);
|
||||||
|
|
||||||
|
if(!(img is UnknownImage))
|
||||||
|
{
|
||||||
|
if(img.IsImageLoaded && !img.LoadFailed)
|
||||||
|
{
|
||||||
|
if(img.Texture == null) img.CreateTexture();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
img = General.Map.Data.WhiteTexture;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store by texture
|
// Store by texture
|
||||||
if(!surfaces.ContainsKey(img))
|
if(!surfaces.ContainsKey(img)) surfaces.Add(img, new List<SurfaceEntry>());
|
||||||
surfaces.Add(img, new List<SurfaceEntry>());
|
|
||||||
surfaces[img].Add(entry);
|
surfaces[img].Add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,8 @@
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Design" />
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\Build\Trackbar.dll</HintPath>
|
<HintPath>..\..\..\Build\Trackbar.dll</HintPath>
|
||||||
|
|
|
@ -39,10 +39,8 @@
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ClassicModes\BaseClassicMode.cs" />
|
<Compile Include="ClassicModes\BaseClassicMode.cs" />
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -37,10 +37,8 @@
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="BuilderPlug.cs" />
|
<Compile Include="BuilderPlug.cs" />
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Design" />
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
Loading…
Reference in a new issue