mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
- fixes in rendering when display mode changed
- test map feature
This commit is contained in:
parent
1b1a243983
commit
aee5ae3fb8
18 changed files with 491 additions and 140 deletions
|
@ -1,8 +1,27 @@
|
|||
%F indicates the edited PWAD file to be tested.
|
||||
%WP indicates the IWAD resource files to be used (paths included).
|
||||
%WF indicates the IWAD resource files to be used (without paths).
|
||||
%L indicates the map lump name as is set in the map options.
|
||||
%AP indicates the additional resources (if any, paths included).
|
||||
%AF indicates the additional resources (if any, without paths).
|
||||
%E indicates the Episode number from E#M# map name.
|
||||
%M indicates the Map number from E#M# or MAP## map name.
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
%F indicates the edited PWAD file to be tested.
|
||||
NOTE: Doom Builder writes everything to a temporary file, this is not the file
|
||||
that was opened through the File -> Open Map dialog.
|
||||
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
%WP indicates the IWAD resource file to be used (path included).
|
||||
This is the first (highest) IWAD file that is found in the resources list.
|
||||
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
%WF indicates the IWAD resource file to be used (without path).
|
||||
This is the first (highest) IWAD file that is found in the resources list.
|
||||
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
%L indicates the map lump name as is set in the map options.
|
||||
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
%AP indicates the all resources files, except the first IWAD file (paths included).
|
||||
The items are seperated by spaces. When used within quotes "%AP", the quotes are
|
||||
also repeated for every item.
|
||||
|
||||
-------------------------------------------------------------------------------------
|
||||
|
|
BIN
Resources/Icons/Test.png
Normal file
BIN
Resources/Icons/Test.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 372 B |
|
@ -312,6 +312,7 @@
|
|||
<Compile Include="IO\FileImageReader.cs" />
|
||||
<Compile Include="IO\IImageReader.cs" />
|
||||
<Compile Include="IO\IMapSetIO.cs" />
|
||||
<Compile Include="General\Launcher.cs" />
|
||||
<Compile Include="IO\Lump.cs" />
|
||||
<Compile Include="IO\MapSetIO.cs" />
|
||||
<Compile Include="IO\UniversalMapSetIO.cs" />
|
||||
|
@ -529,6 +530,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\DB2.ico" />
|
||||
<None Include="Resources\Test.png" />
|
||||
<None Include="Resources\SlimDX_small.png" />
|
||||
<None Include="Resources\Splash3_trans.png" />
|
||||
<None Include="Resources\Splash3_small.png" />
|
||||
|
|
|
@ -1024,6 +1024,12 @@ namespace CodeImp.DoomBuilder
|
|||
|
||||
// This returns a unique temp filename
|
||||
internal static string MakeTempFilename(string tempdir)
|
||||
{
|
||||
return MakeTempFilename(tempdir, "tmp");
|
||||
}
|
||||
|
||||
// This returns a unique temp filename
|
||||
internal static string MakeTempFilename(string tempdir, string extension)
|
||||
{
|
||||
string filename;
|
||||
string chars = "abcdefghijklmnopqrstuvwxyz1234567890";
|
||||
|
@ -1035,7 +1041,7 @@ namespace CodeImp.DoomBuilder
|
|||
// Generate a filename
|
||||
filename = "";
|
||||
for(i = 0; i < 8; i++) filename += chars[rnd.Next(chars.Length)];
|
||||
filename = Path.Combine(tempdir, filename + ".tmp");
|
||||
filename = Path.Combine(tempdir, filename + "." + extension);
|
||||
}
|
||||
// Continue while file is not unique
|
||||
while(File.Exists(filename) || Directory.Exists(filename));
|
||||
|
|
227
Source/General/Launcher.cs
Normal file
227
Source/General/Launcher.cs
Normal file
|
@ -0,0 +1,227 @@
|
|||
|
||||
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
||||
* This program is released under GNU General Public License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Namespaces
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using System.Diagnostics;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.IO
|
||||
{
|
||||
internal class Launcher : IDisposable
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
private string tempwad;
|
||||
|
||||
private bool isdisposed;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public string TempWAD { get { return tempwad; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Destructor
|
||||
|
||||
// Constructor
|
||||
public Launcher(MapManager manager)
|
||||
{
|
||||
// Initialize
|
||||
this.tempwad = General.MakeTempFilename(manager.TempPath, "wad");
|
||||
|
||||
// Bind actions
|
||||
General.Actions.BindMethods(this);
|
||||
}
|
||||
|
||||
// Disposer
|
||||
public void Dispose()
|
||||
{
|
||||
// Not yet disposed?
|
||||
if(!isdisposed)
|
||||
{
|
||||
// Unbind actions
|
||||
General.Actions.UnbindMethods(this);
|
||||
|
||||
// Done
|
||||
isdisposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Parameters
|
||||
|
||||
// This takes the unconverted parameters (with placeholders) and converts it
|
||||
// to parameters with full paths, names and numbers where placeholders were put.
|
||||
// The tempfile must be the full path and filename to the PWAD file to test.
|
||||
public string ConvertParameters(string parameters)
|
||||
{
|
||||
string outp = parameters;
|
||||
DataLocation iwadloc;
|
||||
string p_wp = "", p_wf = "";
|
||||
string p_ap = "", p_apq = "";
|
||||
|
||||
// Find the first IWAD file
|
||||
if(General.Map.Data.FindFirstIWAD(out iwadloc))
|
||||
{
|
||||
// %WP and %WF result in IWAD file
|
||||
p_wp = iwadloc.location;
|
||||
p_wf = Path.GetFileName(p_wp);
|
||||
}
|
||||
|
||||
// Make a list of all data locations, including map location
|
||||
DataLocation maplocation = new DataLocation(DataLocation.RESOURCE_WAD, General.Map.FilePathName, false, false);
|
||||
DataLocationList locations = new DataLocationList();
|
||||
locations.AddRange(General.Map.Options.Resources);
|
||||
locations.Add(maplocation);
|
||||
|
||||
// Go for all data locations
|
||||
foreach(DataLocation dl in locations)
|
||||
{
|
||||
// Location not the IWAD file?
|
||||
if((dl.type == DataLocation.RESOURCE_WAD) && (dl.location != iwadloc.location))
|
||||
{
|
||||
// Add to string of files
|
||||
p_ap += dl.location + " ";
|
||||
p_apq += "\"" + dl.location + "\" ";
|
||||
}
|
||||
}
|
||||
|
||||
// Trim last space from resource file locations
|
||||
p_ap = p_ap.TrimEnd(' ');
|
||||
p_apq = p_apq.TrimEnd(' ');
|
||||
|
||||
// Make sure all our placeholders are in uppercase
|
||||
outp = outp.Replace("%f", "%F");
|
||||
outp = outp.Replace("%wp", "%WP");
|
||||
outp = outp.Replace("%wf", "%WF");
|
||||
outp = outp.Replace("%wP", "%WP");
|
||||
outp = outp.Replace("%wF", "%WF");
|
||||
outp = outp.Replace("%Wp", "%WP");
|
||||
outp = outp.Replace("%Wf", "%WF");
|
||||
outp = outp.Replace("%l", "%L");
|
||||
outp = outp.Replace("%ap", "%AP");
|
||||
outp = outp.Replace("%aP", "%AP");
|
||||
outp = outp.Replace("%Ap", "%AP");
|
||||
|
||||
// Replace placeholders with actual values
|
||||
outp = outp.Replace("%F", General.Map.Launcher.TempWAD);
|
||||
outp = outp.Replace("%WP", p_wp);
|
||||
outp = outp.Replace("%WF", p_wf);
|
||||
outp = outp.Replace("%L", General.Map.Options.CurrentName);
|
||||
outp = outp.Replace("\"%AP\"", p_apq);
|
||||
outp = outp.Replace("%AP", p_ap);
|
||||
|
||||
// Return result
|
||||
return outp;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Test
|
||||
|
||||
// This saves the map to a temporary file and launches a test
|
||||
[BeginAction("testmap")]
|
||||
public void Test()
|
||||
{
|
||||
Cursor oldcursor = Cursor.Current;
|
||||
ProcessStartInfo processinfo;
|
||||
Process process;
|
||||
TimeSpan deltatime;
|
||||
string args;
|
||||
|
||||
// Check if configuration is OK
|
||||
if((General.Map.ConfigSettings.TestProgram == "") ||
|
||||
!File.Exists(General.Map.ConfigSettings.TestProgram))
|
||||
{
|
||||
// Show message
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult result = General.ShowWarningMessage("Your test program is not set for the current game configuration. Would you like to set up your test program now?", MessageBoxButtons.YesNo);
|
||||
if(result == DialogResult.Yes)
|
||||
{
|
||||
// Show game configuration on the right page
|
||||
General.MainWindow.ShowConfigurationPage(2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Save map to temporary file
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
tempwad = General.MakeTempFilename(General.Map.TempPath, "wad");
|
||||
if(General.Map.SaveMap(tempwad, MapManager.SAVE_TEST))
|
||||
{
|
||||
// Make arguments
|
||||
args = ConvertParameters(General.Map.ConfigSettings.TestParameters);
|
||||
|
||||
// Setup process info
|
||||
processinfo = new ProcessStartInfo();
|
||||
processinfo.Arguments = args;
|
||||
processinfo.FileName = General.Map.ConfigSettings.TestProgram;
|
||||
processinfo.CreateNoWindow = false;
|
||||
processinfo.ErrorDialog = false;
|
||||
processinfo.UseShellExecute = true;
|
||||
processinfo.WindowStyle = ProcessWindowStyle.Normal;
|
||||
processinfo.WorkingDirectory = Path.GetDirectoryName(processinfo.FileName);
|
||||
|
||||
// Output info
|
||||
General.WriteLogLine("Running test program: " + processinfo.FileName);
|
||||
General.WriteLogLine("Program parameters: " + processinfo.Arguments);
|
||||
|
||||
try
|
||||
{
|
||||
// Start the program
|
||||
process = Process.Start(processinfo);
|
||||
|
||||
// Wait for program to complete
|
||||
process.WaitForExit();
|
||||
deltatime = TimeSpan.FromTicks(process.ExitTime.Ticks - process.StartTime.Ticks);
|
||||
General.WriteLogLine("Test program has finished.");
|
||||
General.WriteLogLine("Run time: " + deltatime.TotalSeconds.ToString("###########0.00") + " seconds");
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
// Unable to start the program
|
||||
General.ShowErrorMessage("Unable to start the test program, " + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK); ;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove temporary file
|
||||
try { File.Delete(tempwad); } catch(Exception) { }
|
||||
|
||||
// Restore old cursor
|
||||
Cursor.Current = oldcursor;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -65,6 +65,9 @@ namespace CodeImp.DoomBuilder
|
|||
private string filetitle;
|
||||
private string filepathname;
|
||||
private string temppath;
|
||||
private bool cancelmodechange;
|
||||
|
||||
// Main objects
|
||||
private MapSet map;
|
||||
private MapSetIO io;
|
||||
private MapOptions options;
|
||||
|
@ -79,7 +82,7 @@ namespace CodeImp.DoomBuilder
|
|||
private WAD tempwad;
|
||||
private GridSetup grid;
|
||||
private UndoManager undoredo;
|
||||
private bool cancelmodechange;
|
||||
private Launcher launcher;
|
||||
|
||||
// Disposing
|
||||
private bool isdisposed = false;
|
||||
|
@ -91,6 +94,7 @@ namespace CodeImp.DoomBuilder
|
|||
public string FilePathName { get { return filepathname; } }
|
||||
public string FileTitle { get { return filetitle; } }
|
||||
public string TempPath { get { return temppath; } }
|
||||
public bool CancelModeChange { get { return cancelmodechange; } set { cancelmodechange |= value; } }
|
||||
internal MapOptions Options { get { return options; } }
|
||||
public MapSet Map { get { return map; } }
|
||||
public EditMode Mode { get { return mode; } }
|
||||
|
@ -102,10 +106,11 @@ namespace CodeImp.DoomBuilder
|
|||
public IRenderer2D Renderer2D { get { return renderer2d; } }
|
||||
public IRenderer3D Renderer3D { get { return renderer3d; } }
|
||||
public GameConfiguration Config { get { return config; } }
|
||||
internal ConfigurationInfo ConfigSettings { get { return configinfo; } }
|
||||
public GridSetup Grid { get { return grid; } }
|
||||
public UndoManager UndoRedo { get { return undoredo; } }
|
||||
public IMapSetIO FormatInterface { get { return io; } }
|
||||
public bool CancelModeChange { get { return cancelmodechange; } set { cancelmodechange |= value; } }
|
||||
internal Launcher Launcher { get { return launcher; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -117,9 +122,15 @@ namespace CodeImp.DoomBuilder
|
|||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
|
||||
// Create temporary path
|
||||
temppath = General.MakeTempDirname();
|
||||
Directory.CreateDirectory(temppath);
|
||||
General.WriteLogLine("Temporary directory: " + temppath);
|
||||
|
||||
// Basic objects
|
||||
grid = new GridSetup();
|
||||
undoredo = new UndoManager();
|
||||
launcher = new Launcher(this);
|
||||
}
|
||||
|
||||
// Disposer
|
||||
|
@ -135,6 +146,7 @@ namespace CodeImp.DoomBuilder
|
|||
General.Actions.UnbindMethods(this);
|
||||
|
||||
// Dispose
|
||||
if(launcher != null) launcher.Dispose();
|
||||
if(undoredo != null) undoredo.Dispose();
|
||||
General.WriteLogLine("Unloading data resources...");
|
||||
if(data != null) data.Dispose();
|
||||
|
@ -180,11 +192,6 @@ namespace CodeImp.DoomBuilder
|
|||
|
||||
General.WriteLogLine("Creating new map '" + options.CurrentName + "' with configuration '" + options.ConfigFile + "'");
|
||||
|
||||
// Create temporary path
|
||||
temppath = General.MakeTempDirname();
|
||||
Directory.CreateDirectory(temppath);
|
||||
General.WriteLogLine("Temporary directory: " + temppath);
|
||||
|
||||
// Initiate graphics
|
||||
General.WriteLogLine("Initializing graphics device...");
|
||||
graphics = new D3DDevice(General.MainWindow.Display);
|
||||
|
@ -251,11 +258,6 @@ namespace CodeImp.DoomBuilder
|
|||
|
||||
General.WriteLogLine("Opening map '" + options.CurrentName + "' with configuration '" + options.ConfigFile + "'");
|
||||
|
||||
// Create temporary path
|
||||
temppath = General.MakeTempDirname();
|
||||
Directory.CreateDirectory(temppath);
|
||||
General.WriteLogLine("Temporary directory: " + temppath);
|
||||
|
||||
// Initiate graphics
|
||||
General.WriteLogLine("Initializing graphics device...");
|
||||
graphics = new D3DDevice(General.MainWindow.Display);
|
||||
|
|
52
Source/Interface/ConfigForm.Designer.cs
generated
52
Source/Interface/ConfigForm.Designer.cs
generated
|
@ -46,13 +46,15 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.nodebuildertest = new System.Windows.Forms.ComboBox();
|
||||
this.nodebuildersave = new System.Windows.Forms.ComboBox();
|
||||
this.tabtesting = new System.Windows.Forms.TabPage();
|
||||
this.browsetestprogram = new System.Windows.Forms.Button();
|
||||
this.noresultlabel = new System.Windows.Forms.Label();
|
||||
this.testresult = new System.Windows.Forms.TextBox();
|
||||
this.labelresult = new System.Windows.Forms.Label();
|
||||
this.testparameters = new System.Windows.Forms.TextBox();
|
||||
this.browsewad = new System.Windows.Forms.Button();
|
||||
this.testapplication = new System.Windows.Forms.TextBox();
|
||||
this.listconfigs = new System.Windows.Forms.ListView();
|
||||
this.columnname = new System.Windows.Forms.ColumnHeader();
|
||||
this.testprogramdialog = new System.Windows.Forms.OpenFileDialog();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
|
@ -258,11 +260,12 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
//
|
||||
// tabtesting
|
||||
//
|
||||
this.tabtesting.Controls.Add(this.browsetestprogram);
|
||||
this.tabtesting.Controls.Add(this.noresultlabel);
|
||||
this.tabtesting.Controls.Add(this.testresult);
|
||||
this.tabtesting.Controls.Add(this.labelresult);
|
||||
this.tabtesting.Controls.Add(this.testparameters);
|
||||
this.tabtesting.Controls.Add(label4);
|
||||
this.tabtesting.Controls.Add(this.browsewad);
|
||||
this.tabtesting.Controls.Add(this.testapplication);
|
||||
this.tabtesting.Controls.Add(label1);
|
||||
this.tabtesting.Controls.Add(label9);
|
||||
|
@ -275,6 +278,27 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.tabtesting.Text = "Testing";
|
||||
this.tabtesting.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// browsetestprogram
|
||||
//
|
||||
this.browsetestprogram.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.browsetestprogram.Image = global::CodeImp.DoomBuilder.Properties.Resources.Folder;
|
||||
this.browsetestprogram.Location = new System.Drawing.Point(363, 76);
|
||||
this.browsetestprogram.Name = "browsetestprogram";
|
||||
this.browsetestprogram.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
|
||||
this.browsetestprogram.Size = new System.Drawing.Size(30, 23);
|
||||
this.browsetestprogram.TabIndex = 33;
|
||||
this.browsetestprogram.Text = " ";
|
||||
this.browsetestprogram.UseVisualStyleBackColor = true;
|
||||
this.browsetestprogram.Click += new System.EventHandler(this.browsetestprogram_Click);
|
||||
//
|
||||
// noresultlabel
|
||||
//
|
||||
this.noresultlabel.Location = new System.Drawing.Point(84, 217);
|
||||
this.noresultlabel.Name = "noresultlabel";
|
||||
this.noresultlabel.Size = new System.Drawing.Size(272, 43);
|
||||
this.noresultlabel.TabIndex = 32;
|
||||
this.noresultlabel.Text = "An example result cannot be displayed, because it requires a map to be loaded.";
|
||||
//
|
||||
// testresult
|
||||
//
|
||||
this.testresult.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
|
@ -305,17 +329,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.testparameters.Name = "testparameters";
|
||||
this.testparameters.Size = new System.Drawing.Size(307, 79);
|
||||
this.testparameters.TabIndex = 28;
|
||||
//
|
||||
// browsewad
|
||||
//
|
||||
this.browsewad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.browsewad.Location = new System.Drawing.Point(312, 75);
|
||||
this.browsewad.Name = "browsewad";
|
||||
this.browsewad.Size = new System.Drawing.Size(81, 24);
|
||||
this.browsewad.TabIndex = 26;
|
||||
this.browsewad.Text = "Browse...";
|
||||
this.browsewad.UseVisualStyleBackColor = true;
|
||||
this.browsewad.Click += new System.EventHandler(this.browsewad_Click);
|
||||
this.testparameters.TextChanged += new System.EventHandler(this.testparameters_TextChanged);
|
||||
//
|
||||
// testapplication
|
||||
//
|
||||
|
@ -324,8 +338,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.testapplication.Location = new System.Drawing.Point(86, 77);
|
||||
this.testapplication.Name = "testapplication";
|
||||
this.testapplication.ReadOnly = true;
|
||||
this.testapplication.Size = new System.Drawing.Size(220, 20);
|
||||
this.testapplication.Size = new System.Drawing.Size(271, 20);
|
||||
this.testapplication.TabIndex = 25;
|
||||
this.testapplication.TextChanged += new System.EventHandler(this.testapplication_TextChanged);
|
||||
//
|
||||
// listconfigs
|
||||
//
|
||||
|
@ -352,6 +367,11 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.columnname.Text = "Configuration";
|
||||
this.columnname.Width = 200;
|
||||
//
|
||||
// testprogramdialog
|
||||
//
|
||||
this.testprogramdialog.Filter = "Executable Files (*.exe)|*.exe|Batch Files (*.bat)|*.bat";
|
||||
this.testprogramdialog.Title = "Browse Test Program";
|
||||
//
|
||||
// ConfigForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
|
@ -395,11 +415,13 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
private System.Windows.Forms.ComboBox nodebuildertest;
|
||||
private System.Windows.Forms.ComboBox nodebuildersave;
|
||||
private System.Windows.Forms.TextBox testparameters;
|
||||
private System.Windows.Forms.Button browsewad;
|
||||
private System.Windows.Forms.TextBox testapplication;
|
||||
private System.Windows.Forms.TextBox testresult;
|
||||
private System.Windows.Forms.Label labelresult;
|
||||
private System.Windows.Forms.ListView listconfigs;
|
||||
private System.Windows.Forms.ColumnHeader columnname;
|
||||
private System.Windows.Forms.Label noresultlabel;
|
||||
private System.Windows.Forms.Button browsetestprogram;
|
||||
private System.Windows.Forms.OpenFileDialog testprogramdialog;
|
||||
}
|
||||
}
|
|
@ -27,6 +27,7 @@ using System.Diagnostics;
|
|||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using System.IO;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -51,6 +52,10 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Add a copy
|
||||
lvi = listconfigs.Items.Add(ci.Name);
|
||||
lvi.Tag = ci.Clone();
|
||||
|
||||
// This is the current configuration?
|
||||
if((General.Map != null) && (General.Map.ConfigSettings.Filename == ci.Filename))
|
||||
lvi.Selected = true;
|
||||
}
|
||||
|
||||
// TODO: Save and test nodebuilders are allowed to be empty
|
||||
|
@ -58,6 +63,28 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Fill comboboxes with nodebuilders
|
||||
nodebuildersave.Items.AddRange(General.Nodebuilders.ToArray());
|
||||
nodebuildertest.Items.AddRange(General.Nodebuilders.ToArray());
|
||||
|
||||
// Check if a map is loaded
|
||||
if(General.Map != null)
|
||||
{
|
||||
// Show parameters example result
|
||||
labelresult.Visible = true;
|
||||
testresult.Visible = true;
|
||||
noresultlabel.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cannot show parameters example result
|
||||
labelresult.Visible = false;
|
||||
testresult.Visible = false;
|
||||
noresultlabel.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
// This shows a specific page
|
||||
public void ShowTab(int index)
|
||||
{
|
||||
tabs.SelectedIndex = index;
|
||||
}
|
||||
|
||||
// Configuration item selected
|
||||
|
@ -205,6 +232,20 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Apply to selected configuration
|
||||
ci = listconfigs.SelectedItems[0].Tag as ConfigurationInfo;
|
||||
ci.TestParameters = testparameters.Text;
|
||||
|
||||
// Show example result
|
||||
CreateParametersExample();
|
||||
}
|
||||
|
||||
// This creates a new parameters example
|
||||
private void CreateParametersExample()
|
||||
{
|
||||
// Map loaded?
|
||||
if(General.Map != null)
|
||||
{
|
||||
// Make converted parameters
|
||||
testresult.Text = General.Map.Launcher.ConvertParameters(testparameters.Text);
|
||||
}
|
||||
}
|
||||
|
||||
// OK clicked
|
||||
|
@ -239,10 +280,22 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.Close();
|
||||
}
|
||||
|
||||
// Browse clicked
|
||||
private void browsewad_Click(object sender, EventArgs e)
|
||||
// Browse test program
|
||||
private void browsetestprogram_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
// Set initial directory
|
||||
if(testapplication.Text.Length > 0)
|
||||
{
|
||||
try { testprogramdialog.InitialDirectory = Path.GetDirectoryName(testapplication.Text); }
|
||||
catch(Exception) { }
|
||||
}
|
||||
|
||||
// Browse for test program
|
||||
if(testprogramdialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
// Apply
|
||||
testapplication.Text = testprogramdialog.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -117,106 +117,37 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>The nodebuilder is a compiler which builds geometry structures for your map. You need these structures to be able to play the map in the game. For each purpose you can choose the desired nodebuilder configuration here.</value>
|
||||
</data>
|
||||
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label9.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label9.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>Here you can specify the program settings to use for launching a game engine when testing the map. Press F1 for a list of placeholders that can be used for automatic filenames, paths, names and numbers.</value>
|
||||
</data>
|
||||
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabresources.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="configdata.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabnodebuilder.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="nodebuildertest.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="nodebuildersave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabtesting.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="testresult.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="labelresult.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="testparameters.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="browsewad.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="testapplication.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="listconfigs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
<metadata name="testprogramdialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
72
Source/Interface/MainForm.Designer.cs
generated
72
Source/Interface/MainForm.Designer.cs
generated
|
@ -37,11 +37,11 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
|
||||
System.Windows.Forms.ToolStripSeparator toolstripSeperator1;
|
||||
System.Windows.Forms.ToolStripSeparator toolstripSeperator6;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
|
||||
System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.itemeditmodesseperator = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttoneditmodesseperator = new System.Windows.Forms.ToolStripSeparator();
|
||||
|
@ -54,6 +54,8 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.itemsavemap = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemsavemapas = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemsavemapinto = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.itemtestmap = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemnorecent = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.itemexit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuedit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -80,6 +82,8 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonautomerge = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttontest = new System.Windows.Forms.ToolStripButton();
|
||||
this.statusbar = new System.Windows.Forms.StatusStrip();
|
||||
this.statuslabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.gridlabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
|
@ -121,11 +125,11 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolstripSeperator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolstripSeperator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menumain.SuspendLayout();
|
||||
this.toolbar.SuspendLayout();
|
||||
this.statusbar.SuspendLayout();
|
||||
|
@ -176,16 +180,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
toolStripSeparator10.Name = "toolStripSeparator10";
|
||||
toolStripSeparator10.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
toolStripMenuItem4.Size = new System.Drawing.Size(161, 6);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
toolStripSeparator2.Size = new System.Drawing.Size(164, 6);
|
||||
//
|
||||
// toolStripSeparator11
|
||||
//
|
||||
toolStripSeparator11.Name = "toolStripSeparator11";
|
||||
|
@ -202,6 +196,16 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
toolstripSeperator6.Name = "toolstripSeperator6";
|
||||
toolstripSeperator6.Size = new System.Drawing.Size(162, 6);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
toolStripMenuItem4.Size = new System.Drawing.Size(161, 6);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
toolStripSeparator2.Size = new System.Drawing.Size(164, 6);
|
||||
//
|
||||
// itemeditmodesseperator
|
||||
//
|
||||
this.itemeditmodesseperator.Name = "itemeditmodesseperator";
|
||||
|
@ -242,6 +246,8 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.itemsavemap,
|
||||
this.itemsavemapas,
|
||||
this.itemsavemapinto,
|
||||
this.toolStripMenuItem5,
|
||||
this.itemtestmap,
|
||||
toolStripMenuItem2,
|
||||
this.itemnorecent,
|
||||
toolStripMenuItem3,
|
||||
|
@ -302,6 +308,20 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.itemsavemapinto.Text = "Save Map Into...";
|
||||
this.itemsavemapinto.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(198, 6);
|
||||
//
|
||||
// itemtestmap
|
||||
//
|
||||
this.itemtestmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test;
|
||||
this.itemtestmap.Name = "itemtestmap";
|
||||
this.itemtestmap.Size = new System.Drawing.Size(201, 22);
|
||||
this.itemtestmap.Tag = "builder_testmap";
|
||||
this.itemtestmap.Text = "Test Map";
|
||||
this.itemtestmap.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// itemnorecent
|
||||
//
|
||||
this.itemnorecent.Enabled = false;
|
||||
|
@ -448,7 +468,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.thingfilters,
|
||||
this.toolStripSeparator8,
|
||||
this.buttonsnaptogrid,
|
||||
this.buttonautomerge});
|
||||
this.buttonautomerge,
|
||||
this.toolStripSeparator5,
|
||||
this.buttontest});
|
||||
this.toolbar.Location = new System.Drawing.Point(0, 24);
|
||||
this.toolbar.Name = "toolbar";
|
||||
this.toolbar.Size = new System.Drawing.Size(839, 25);
|
||||
|
@ -576,6 +598,22 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.buttonautomerge.Text = "Merge Geometry";
|
||||
this.buttonautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// buttontest
|
||||
//
|
||||
this.buttontest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttontest.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test;
|
||||
this.buttontest.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttontest.Name = "buttontest";
|
||||
this.buttontest.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttontest.Tag = "builder_testmap";
|
||||
this.buttontest.Text = "Test Map";
|
||||
this.buttontest.Click += new System.EventHandler(this.InvokeTaggedAction);
|
||||
//
|
||||
// statusbar
|
||||
//
|
||||
this.statusbar.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
|
@ -1016,5 +1054,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
private System.Windows.Forms.ToolStripSeparator buttoneditmodesseperator;
|
||||
private System.Windows.Forms.ToolStripSeparator itemeditmodesseperator;
|
||||
private System.Windows.Forms.Timer processor;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
private System.Windows.Forms.ToolStripButton buttontest;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5;
|
||||
private System.Windows.Forms.ToolStripMenuItem itemtestmap;
|
||||
}
|
||||
}
|
|
@ -709,6 +709,13 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
if(!redrawtimer.Enabled) redrawtimer.Enabled = true;
|
||||
}
|
||||
|
||||
// This requests a delayed redraw
|
||||
public void DelayedRedraw()
|
||||
{
|
||||
// Request redraw
|
||||
if(!redrawtimer.Enabled) redrawtimer.Enabled = true;
|
||||
}
|
||||
|
||||
// Mouse click
|
||||
private void display_MouseClick(object sender, MouseEventArgs e) { if((General.Map != null) && (General.Map.Mode != null)) General.Map.Mode.OnMouseClick(e); }
|
||||
|
||||
|
@ -1057,11 +1064,13 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
itemsavemap.Enabled = (General.Map != null);
|
||||
itemsavemapas.Enabled = (General.Map != null);
|
||||
itemsavemapinto.Enabled = (General.Map != null);
|
||||
itemtestmap.Enabled = (General.Map != null);
|
||||
|
||||
// Toolbar icons
|
||||
buttonnewmap.Enabled = itemnewmap.Enabled;
|
||||
buttonopenmap.Enabled = itemopenmap.Enabled;
|
||||
buttonsavemap.Enabled = itemsavemap.Enabled;
|
||||
buttontest.Enabled = itemtestmap.Enabled;
|
||||
}
|
||||
|
||||
// This sets the recent files from configuration
|
||||
|
@ -1287,9 +1296,17 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Game Configuration action
|
||||
[BeginAction("configuration")]
|
||||
internal void ShowConfiguration()
|
||||
{
|
||||
// Show configuration dialog
|
||||
ShowConfigurationPage(-1);
|
||||
}
|
||||
|
||||
// This shows the configuration on a specific page
|
||||
internal void ShowConfigurationPage(int pageindex)
|
||||
{
|
||||
// Show configuration dialog
|
||||
ConfigForm cfgform = new ConfigForm();
|
||||
if(pageindex > -1) cfgform.ShowTab(pageindex);
|
||||
if(cfgform.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
// Update interface
|
||||
|
@ -1297,14 +1314,14 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
|
||||
// Let the plugins know
|
||||
General.Plugins.ProgramReconfigure();
|
||||
|
||||
|
||||
// Reload resources if a map is open
|
||||
if(General.Map != null) General.Map.ReloadResources();
|
||||
|
||||
|
||||
// Redraw display
|
||||
RedrawDisplay();
|
||||
}
|
||||
|
||||
|
||||
// Done
|
||||
cfgform.Dispose();
|
||||
}
|
||||
|
|
|
@ -141,12 +141,6 @@
|
|||
<metadata name="toolStripSeparator10.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="toolStripMenuItem4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="toolStripSeparator2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="toolStripSeparator11.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
|
@ -156,6 +150,12 @@
|
|||
<metadata name="toolstripSeperator6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="toolStripMenuItem4.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="toolStripSeparator2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="menumain.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
|
7
Source/Properties/Resources.Designer.cs
generated
7
Source/Properties/Resources.Designer.cs
generated
|
@ -207,6 +207,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Test {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Test", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap treeview {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("treeview", resourceCulture);
|
||||
|
|
|
@ -193,4 +193,7 @@
|
|||
<data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -395,9 +395,15 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
// Check if device must be reset
|
||||
if(!coopresult.IsSuccess)
|
||||
{
|
||||
// Device is lost and must be reset now
|
||||
// TODO: Check result codes, device cannot always be reset
|
||||
return Reset();
|
||||
// Should we reset?
|
||||
if(coopresult.Name == "D3DERR_DEVICENOTRESET")
|
||||
{
|
||||
// Device is lost and must be reset now
|
||||
Reset();
|
||||
}
|
||||
|
||||
// Impossible to render at this point
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set rendertarget
|
||||
|
|
|
@ -203,12 +203,12 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
graphics.Device.SetStreamSource(0, screenverts, 0, sizeof(FlatVertex));
|
||||
graphics.Device.SetTransform(TransformState.World, Matrix.Identity);
|
||||
graphics.Shaders.Display2D.Begin();
|
||||
|
||||
|
||||
// Go for all layers
|
||||
foreach(PresentLayer layer in present.layers)
|
||||
{
|
||||
int aapass;
|
||||
|
||||
|
||||
// Set blending mode
|
||||
switch(layer.blending)
|
||||
{
|
||||
|
@ -243,7 +243,7 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
|
||||
// Check which pass to use
|
||||
if(layer.antialiasing) aapass = 0; else aapass = 1;
|
||||
|
||||
|
||||
// Render layer
|
||||
switch(layer.layer)
|
||||
{
|
||||
|
@ -311,6 +311,11 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
graphics.Shaders.Display2D.Texture1 = null;
|
||||
graphics.Device.SetStreamSource(0, null, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Request delayed redraw
|
||||
General.MainWindow.DelayedRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -331,3 +331,12 @@ moveright
|
|||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
testmap
|
||||
{
|
||||
title = "File: Test Map";
|
||||
description = "Starts the game and loads this map for playing.";
|
||||
allowkeys = true;
|
||||
allowmouse = false;
|
||||
allowscroll = false;
|
||||
}
|
||||
|
|
BIN
Source/Resources/Test.png
Normal file
BIN
Source/Resources/Test.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 372 B |
Loading…
Reference in a new issue