private void ExecuteRenderer()
{
var engineCfg = GetRenderSettings();
try {
VFS.Reset();
var engine = new EngineSettings();
engine.ConfigureFromSettings(engineCfg);
var result = engine.Execute();
switch (result) {
case EngineResult.Exception:
Log("\r\nUnknown exception.");
AskBugReport(null);
break;
case EngineResult.RenderedOk:
// indicates EOF
Log("\r\nYour map has been rendered. If your image did not appear, something went wrong." +
" Please send an email to [email protected] with your map as an attachment.");
break;
case EngineResult.LoadTheaterFailed:
Log("\r\nTheater loading failed. Please make sure the mix directory is correct and that the required expansion packs are installed "
+ "if they are required for the map you want to render.");
AskBugReport(null);
break;
case EngineResult.LoadRulesFailed:
Log("\r\nRules loading failed. Please make sure the mix directory is correct and that the required expansion packs are installed "
+ "if they are required for the map you want to render.");
AskBugReport(null);
break;
}
}
catch (Exception exc) {
AskBugReport(exc);
}
}