mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-12-18 16:10:58 +00:00
c07df8f596
Fixed, Visual mode, UDMF: sector geometry cache was not updated after using "Match Brightness" and "Change Brightness" actions on ceilings, so the changes made by them were not visible when using Classic modes in "View Ceiling Textures" mode. Fixed, Visual mode, UDMF: "Match Brightness" and "Change Brightness" actions set brightness incorrectly in some cases. Fixed: ACS script names gathering logic was unable to process relative #include and #import paths (like '#import "..\acs\qtilt.acs"'). Updated ZDoom_DECORATE.cfg.
58 lines
1.3 KiB
C#
58 lines
1.3 KiB
C#
#region ================== Namespaces
|
|
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using CodeImp.DoomBuilder.ZDoom;
|
|
using CodeImp.DoomBuilder.GZBuilder.Data;
|
|
|
|
#endregion
|
|
|
|
//mxd. Modeldef parser used to create ScriptItems for use in script editor's navigator
|
|
namespace CodeImp.DoomBuilder.GZBuilder.GZDoom
|
|
{
|
|
internal sealed class ModeldefParserSE : ZDTextParser
|
|
{
|
|
private readonly List<ScriptItem> models;
|
|
internal List<ScriptItem> Models { get { return models; } }
|
|
|
|
public ModeldefParserSE()
|
|
{
|
|
models = new List<ScriptItem>();
|
|
}
|
|
|
|
public override bool Parse(Stream stream, string sourcefilename)
|
|
{
|
|
base.Parse(stream, sourcefilename);
|
|
|
|
// Continue until at the end of the stream
|
|
while (SkipWhitespace(true))
|
|
{
|
|
string token = ReadToken();
|
|
|
|
if (!string.IsNullOrEmpty(token))
|
|
{
|
|
token = token.ToUpperInvariant();
|
|
|
|
if(token == "MODEL")
|
|
{
|
|
SkipWhitespace(true);
|
|
int startPos = (int)stream.Position;
|
|
string modelName = ReadToken();
|
|
SkipWhitespace(true);
|
|
token = ReadToken(); //this should be "{"
|
|
|
|
if (token == "{")
|
|
{
|
|
ScriptItem i = new ScriptItem(0, modelName, startPos, false);
|
|
models.Add(i);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//sort nodes
|
|
models.Sort(ScriptItem.SortByName);
|
|
return true;
|
|
}
|
|
}
|
|
}
|