mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-06-04 19:01:18 +00:00
Fixed, Script Editor: in some cases includes list was not updated before trying to compile the script leading to compilation failure.
Changed, ACC compiler: when building includes list, the compiler no longer tries to find/copy include files defined in current script configuration (previously it was hardcoded to skip "zcommon.acs" and "common.acs" only). Fixed, Visual mode: things with Additive RenderStyle were rendered as additive only when their alpha was less than 1.0.
This commit is contained in:
parent
9b87dc71e3
commit
f452fca58c
7 changed files with 165 additions and 96 deletions
|
@ -22,7 +22,6 @@ using System.Windows.Forms;
|
|||
using CodeImp.DoomBuilder.Config;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.Compilers;
|
||||
using CodeImp.DoomBuilder.GZBuilder.Data; //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -72,12 +71,19 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// This compiles the script file
|
||||
public override void Compile()
|
||||
{
|
||||
string inputfile, outputfile;
|
||||
//mxd. List of errors. UpdateScriptNames can return errors and also updates acs includes list
|
||||
List<CompilerError> errors = (config.ScriptType == ScriptType.ACS ? General.Map.UpdateScriptNames() : new List<CompilerError>());
|
||||
|
||||
//mxd. Errors already?..
|
||||
if(errors.Count > 0)
|
||||
{
|
||||
// Feed errors to panel
|
||||
panel.ShowErrors(errors);
|
||||
return;
|
||||
}
|
||||
|
||||
Compiler compiler;
|
||||
|
||||
// List of errors
|
||||
List<CompilerError> errors = new List<CompilerError>();
|
||||
|
||||
try
|
||||
{
|
||||
// Initialize compiler
|
||||
|
@ -91,11 +97,11 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
|
||||
// Copy the source file into the temporary directory
|
||||
inputfile = Path.Combine(compiler.Location, Path.GetFileName(filepathname));
|
||||
string inputfile = Path.Combine(compiler.Location, Path.GetFileName(filepathname));
|
||||
File.Copy(filepathname, inputfile);
|
||||
|
||||
// Make random output filename
|
||||
outputfile = General.MakeTempFilename(compiler.Location, "tmp");
|
||||
string outputfile = General.MakeTempFilename(compiler.Location, "tmp");
|
||||
|
||||
// Run compiler
|
||||
compiler.Parameters = config.Parameters;
|
||||
|
@ -117,15 +123,13 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
errors.Add(newerr);
|
||||
}
|
||||
|
||||
//mxd. Should be called only if current script is compiled successfully
|
||||
if (compiler.Errors.Length == 0 && config.ScriptType == ScriptType.ACS)
|
||||
General.Map.UpdateScriptNames();
|
||||
UpdateNavigator();
|
||||
}
|
||||
|
||||
// Dispose compiler
|
||||
compiler.Dispose();
|
||||
|
||||
//mxd. Update script navigator
|
||||
UpdateNavigator();
|
||||
|
||||
// Feed errors to panel
|
||||
panel.ShowErrors(errors);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue