TEXTURES support: both patch Blend syntaxes are now supported (previously only "Blend <string color>[,<float alpha>]" was supported).

Added X11R6RGB parser.
Rewritten parts of unhandled exceptions handling to reduce the chance of additional exceptions happening after the first one.
This commit is contained in:
MaxED 2016-03-16 23:26:53 +00:00
parent 1703af1c82
commit adadca9d99
20 changed files with 605 additions and 390 deletions

View file

@ -701,7 +701,6 @@ namespace CodeImp.DoomBuilder.Data
#region ================== TERRAIN (mxd)
//mxd
public override IEnumerable<TextResourceData> GetTerrainData()
{
// Error when suspended
@ -722,6 +721,28 @@ namespace CodeImp.DoomBuilder.Data
#endregion
#region ================== XBRSBSBB11 (mxd)
public override IEnumerable<TextResourceData> GetX11R6RGBData()
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
List<TextResourceData> result = new List<TextResourceData>();
string[] files = GetAllFilesWithTitle("", "X11R6RGB", false);
// Add to collection
foreach(string s in files)
result.Add(new TextResourceData(this, LoadFile(s), s, true));
// Find in any of the wad files
foreach(WADReader wr in wads) result.AddRange(wr.GetTerrainData());
return result;
}
#endregion
#region ================== Methods
// This loads the images in this directory