Added: HiRes images are now also applied to sprites.

Fixed: HiRes images should be loaded from subdirectories too.
Fixed: in some cases the editor was unable to locate existing "LoRes" images when loading HiRes images.
Disabled some HiRes-related warnings, because the editor doesn't track all sprites or graphics.
This commit is contained in:
MaxED 2016-03-22 22:24:33 +00:00
parent 07a4c5c51e
commit 6b4dc3a287
5 changed files with 42 additions and 18 deletions

View file

@ -244,7 +244,7 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. This finds and returns a HiRes textue stream
public override Stream GetHiResTextureData(string pname, ref string hireslocation)
public override Stream GetHiResTextureData(string name, ref string hireslocation)
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
@ -253,12 +253,12 @@ namespace CodeImp.DoomBuilder.Data
// Note the backward order, because the last wad's images have priority
for(int i = wads.Count - 1; i >= 0; i--)
{
Stream data = wads[i].GetTextureData(pname, false, ref hireslocation);
Stream data = wads[i].GetTextureData(name, false, ref hireslocation);
if(data != null) return data;
}
// Find in HiRes directory
string filename = FindFirstFile(HIRES_DIR, pname, false);
string filename = FindFirstFile(HIRES_DIR, name, true);
if(!string.IsNullOrEmpty(filename) && FileExists(filename))
{
hireslocation = location.GetDisplayName();