mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 05:41:45 +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">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
|
|
|
@ -947,6 +947,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
public ImageData GetTextureImage(long longname)
|
||||
{
|
||||
// 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(textures.ContainsKey(longname)) return textures[longname];
|
||||
|
||||
|
@ -961,6 +962,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
|
||||
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(textures.ContainsKey(hash)) return textures[hash].Name;
|
||||
return name;
|
||||
|
@ -969,6 +971,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
//mxd
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1062,6 +1065,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
public ImageData GetFlatImage(long longname)
|
||||
{
|
||||
// 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(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
|
||||
public ImageData GetFlatImageKnown(long longname)
|
||||
/*public ImageData GetFlatImageKnown(long longname)
|
||||
{
|
||||
// Return flat
|
||||
return flatnamesshorttofull.ContainsKey(longname) ? flats[flatnamesshorttofull[longname]] : flats[longname]; //mxd
|
||||
}
|
||||
}*/
|
||||
|
||||
//mxd. Gets full flat name by short flat name
|
||||
public string GetFullFlatName(string name)
|
||||
|
@ -1083,6 +1087,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
|
||||
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(flats.ContainsKey(hash)) return flats[hash].Name;
|
||||
return name;
|
||||
|
@ -1091,6 +1096,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
//mxd
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1191,8 +1197,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if(!string.IsNullOrEmpty(pname))
|
||||
{
|
||||
long longname = Lump.MakeLongName(pname);
|
||||
if(sprites.ContainsKey(longname))
|
||||
return true;
|
||||
if(sprites.ContainsKey(longname)) return true;
|
||||
|
||||
// Go for all opened containers
|
||||
for(int i = containers.Count - 1; i >= 0; i--)
|
||||
|
|
|
@ -623,33 +623,30 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
}
|
||||
else
|
||||
{
|
||||
if(General.Map.Data.GetFlatExists(longimagename))
|
||||
{
|
||||
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
|
||||
if(longimagename == MapSet.EmptyLongName)
|
||||
{
|
||||
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
|
||||
if(!surfaces.ContainsKey(img))
|
||||
surfaces.Add(img, new List<SurfaceEntry>());
|
||||
if(!surfaces.ContainsKey(img)) surfaces.Add(img, new List<SurfaceEntry>());
|
||||
surfaces[img].Add(entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,11 +38,8 @@
|
|||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<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">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Build\Trackbar.dll</HintPath>
|
||||
|
|
|
@ -39,10 +39,8 @@
|
|||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassicModes\BaseClassicMode.cs" />
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="Trackbar, Version=1.0.2486.37933, Culture=neutral, PublicKeyToken=503bf28f63ad27b4">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -37,10 +37,8 @@
|
|||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BuilderPlug.cs" />
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue