mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
- added button to switch monsters on/off for testing (adds -nomonsters to parameters)
- preparations for new resource management
This commit is contained in:
parent
5c93390222
commit
4d67cc7dd4
39 changed files with 193 additions and 78 deletions
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "E1M1";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "E1M1";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "UniversalMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "E1M1";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "HexenMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "HexenMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "E1M1";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-basewad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "HexenMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "UniversalMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "HexenMapSetIO";
|
|||
defaultlumpname = "E1M1";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "HexenMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "HexenMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" +map %L %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
|
@ -18,7 +18,7 @@ formatinterface = "DoomMapSetIO";
|
|||
defaultlumpname = "MAP01";
|
||||
|
||||
// Default testing parameters
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2";
|
||||
testparameters = "-iwad \"%WP\" -skill \"%S\" -file \"%AP\" \"%F\" -warp %L1 %L2 %NM";
|
||||
|
||||
// Skill levels
|
||||
skills
|
||||
|
|
BIN
Resources/Icons/Monster.png
Normal file
BIN
Resources/Icons/Monster.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 699 B |
BIN
Resources/Icons/Monster2.png
Normal file
BIN
Resources/Icons/Monster2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 864 B |
Binary file not shown.
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 640 B |
|
@ -599,6 +599,7 @@
|
|||
<None Include="Resources\Copy.png" />
|
||||
<None Include="Resources\Cut.png" />
|
||||
<Content Include="Resources\DB2.ico" />
|
||||
<None Include="Resources\Monster2.png" />
|
||||
<None Include="Resources\Grid2_arrowup.png" />
|
||||
<None Include="Resources\Zoom_arrowup.png" />
|
||||
<None Include="Resources\Paste.png" />
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private int imagebrightness;
|
||||
private bool qualitydisplay;
|
||||
private bool squarethings;
|
||||
private bool testmonsters;
|
||||
|
||||
// These are not stored in the configuration, only used at runtime
|
||||
private string defaulttexture;
|
||||
|
@ -81,6 +82,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public float VisualViewRange { get { return visualviewrange; } internal set { visualviewrange = value; } }
|
||||
public bool QualityDisplay { get { return qualitydisplay; } internal set { qualitydisplay = value; } }
|
||||
public bool SquareThings { get { return squarethings; } internal set { squarethings = value; } }
|
||||
public bool TestMonsters { get { return testmonsters; } internal set { testmonsters = value; } }
|
||||
|
||||
public string DefaultTexture { get { return defaulttexture; } set { defaulttexture = value; } }
|
||||
public string DefaultFloorTexture { get { return defaultfloortexture; } set { defaultfloortexture = value; } }
|
||||
|
@ -122,6 +124,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
imagebrightness = cfg.ReadSetting("imagebrightness", 3);
|
||||
qualitydisplay = cfg.ReadSetting("qualitydisplay", true);
|
||||
squarethings = cfg.ReadSetting("squarethings", false);
|
||||
testmonsters = cfg.ReadSetting("testmonsters", true);
|
||||
|
||||
// Success
|
||||
return true;
|
||||
|
@ -146,6 +149,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
cfg.WriteSetting("imagebrightness", imagebrightness);
|
||||
cfg.WriteSetting("qualitydisplay", qualitydisplay);
|
||||
cfg.WriteSetting("squarethings", squarethings);
|
||||
cfg.WriteSetting("testmonsters", testmonsters);
|
||||
|
||||
// Save settings configuration
|
||||
General.WriteLogLine("Saving program configuration...");
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
lock(this)
|
||||
{
|
||||
// Load file
|
||||
if(bitmap != null) bitmap.Dispose();
|
||||
bitmap = (Bitmap)Bitmap.FromFile(filepathname);
|
||||
|
||||
// Get width and height from image
|
||||
|
|
|
@ -82,6 +82,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
// Read data as bitmap
|
||||
mem.Seek(0, SeekOrigin.Begin);
|
||||
if(bitmap != null) bitmap.Dispose();
|
||||
bitmap = reader.ReadAsBitmap(mem);
|
||||
if(bitmap == null) return;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
// Background loading
|
||||
private LinkedListNode<ImageData> loadingticket;
|
||||
private int loadstate; // true when loading, false when unloading
|
||||
private int loadstate;
|
||||
private bool temporary;
|
||||
|
||||
// GDI bitmap
|
||||
|
|
|
@ -35,10 +35,27 @@ namespace CodeImp.DoomBuilder.Data
|
|||
{
|
||||
#region ================== Constants
|
||||
|
||||
// Image format
|
||||
private const PixelFormat IMAGE_FORMAT = PixelFormat.Format16bppArgb1555;
|
||||
|
||||
// Dimensions of a single preview image
|
||||
private const int IMAGE_WIDTH = 64;
|
||||
private const int IMAGE_HEIGHT = 64;
|
||||
|
||||
// How many previews on a single atlas?
|
||||
private const int PREVIEWS_X = 8;
|
||||
private const int PREVIEWS_Y = 8;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Atlases
|
||||
private List<Bitmap> atlases;
|
||||
|
||||
// Next preview index
|
||||
private int nextpreviewindex;
|
||||
|
||||
// Disposing
|
||||
private bool isdisposed = false;
|
||||
|
||||
|
@ -57,7 +74,9 @@ namespace CodeImp.DoomBuilder.Data
|
|||
public PreviewManager()
|
||||
{
|
||||
// Initialize
|
||||
|
||||
atlases = new List<Bitmap>();
|
||||
nextpreviewindex = 0;
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
@ -69,7 +88,9 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if(!isdisposed)
|
||||
{
|
||||
// Clean up
|
||||
|
||||
foreach(Bitmap b in atlases) b.Dispose();
|
||||
atlases = null;
|
||||
|
||||
// Done
|
||||
isdisposed = true;
|
||||
}
|
||||
|
@ -77,7 +98,47 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
#region ================== Calculations
|
||||
|
||||
// Returns atlas index for the given preview index
|
||||
private int GetAtlasIndex(int previewindex)
|
||||
{
|
||||
return previewindex / (PREVIEWS_X * PREVIEWS_Y);
|
||||
}
|
||||
|
||||
// Returns local X index for the given preview index
|
||||
private int GetLocalXIndex(int previewindex)
|
||||
{
|
||||
int localindex = previewindex - GetAtlasIndex(previewindex) * (PREVIEWS_X * PREVIEWS_Y);
|
||||
return localindex % PREVIEWS_Y;
|
||||
}
|
||||
|
||||
// Returns local Y index for the given preview index
|
||||
private int GetLocalYIndex(int previewindex)
|
||||
{
|
||||
int localindex = previewindex - GetAtlasIndex(previewindex) * (PREVIEWS_X * PREVIEWS_Y);
|
||||
return localindex / PREVIEWS_X;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Loading
|
||||
|
||||
// This makes a new atlas
|
||||
private void MakeNewAtlas()
|
||||
{
|
||||
Bitmap b = new Bitmap(IMAGE_WIDTH * PREVIEWS_X, IMAGE_HEIGHT * PREVIEWS_Y, IMAGE_FORMAT);
|
||||
atlases.Add(b);
|
||||
}
|
||||
|
||||
// This makes a preview for the given image and updates the image settings
|
||||
private void MakeImagePreview(Image img)
|
||||
{
|
||||
// Do we have to make a new atlas?
|
||||
if(GetAtlasIndex(nextpreviewindex) > (atlases.Count - 1)) MakeNewAtlas();
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
{
|
||||
// Get resource from memory
|
||||
bitmapdata = General.ThisAssembly.GetManifestResourceStream("CodeImp.DoomBuilder.Resources." + Name);
|
||||
if(bitmap != null) bitmap.Dispose();
|
||||
bitmap = (Bitmap)Image.FromStream(bitmapdata);
|
||||
bitmapdata.Dispose();
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
|
||||
// Read data as bitmap
|
||||
mem.Seek(0, SeekOrigin.Begin);
|
||||
if(bitmap != null) bitmap.Dispose();
|
||||
bitmap = reader.ReadAsBitmap(mem);
|
||||
if(bitmap == null) return;
|
||||
|
||||
|
|
|
@ -86,12 +86,13 @@ namespace CodeImp.DoomBuilder.Data
|
|||
// Checks
|
||||
if(this.IsLoaded) return;
|
||||
if((width == 0) || (height == 0)) return;
|
||||
|
||||
|
||||
lock(this)
|
||||
{
|
||||
// Create texture bitmap
|
||||
try
|
||||
{
|
||||
if(bitmap != null) bitmap.Dispose();
|
||||
bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb);
|
||||
bitmapdata = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
pixels = (PixelColor*)bitmapdata.Scan0.ToPointer();
|
||||
|
|
|
@ -93,6 +93,7 @@ namespace CodeImp.DoomBuilder
|
|||
string p_wp = "", p_wf = "";
|
||||
string p_ap = "", p_apq = "";
|
||||
string p_l1 = "", p_l2 = "";
|
||||
string p_nm = "";
|
||||
|
||||
// Find the first IWAD file
|
||||
if(General.Map.Data.FindFirstIWAD(out iwadloc))
|
||||
|
@ -155,6 +156,9 @@ namespace CodeImp.DoomBuilder
|
|||
int.TryParse(numstr, out num);
|
||||
if(first) p_l1 = num.ToString(); else p_l2 = num.ToString();
|
||||
}
|
||||
|
||||
// No monsters?
|
||||
if(!General.Settings.TestMonsters) p_nm = "-nomonsters";
|
||||
|
||||
// Make sure all our placeholders are in uppercase
|
||||
outp = outp.Replace("%f", "%F");
|
||||
|
@ -171,6 +175,9 @@ namespace CodeImp.DoomBuilder
|
|||
outp = outp.Replace("%aP", "%AP");
|
||||
outp = outp.Replace("%Ap", "%AP");
|
||||
outp = outp.Replace("%s", "%S");
|
||||
outp = outp.Replace("%nM", "%NM");
|
||||
outp = outp.Replace("%Nm", "%NM");
|
||||
outp = outp.Replace("%nm", "%NM");
|
||||
|
||||
// Replace placeholders with actual values
|
||||
outp = outp.Replace("%F", General.Map.Launcher.TempWAD);
|
||||
|
@ -182,6 +189,7 @@ namespace CodeImp.DoomBuilder
|
|||
outp = outp.Replace("\"%AP\"", p_apq);
|
||||
outp = outp.Replace("%AP", p_ap);
|
||||
outp = outp.Replace("%S", skill.ToString());
|
||||
outp = outp.Replace("%NM", p_nm);
|
||||
|
||||
// Return result
|
||||
return outp;
|
||||
|
|
7
Source/Properties/Resources.Designer.cs
generated
7
Source/Properties/Resources.Designer.cs
generated
|
@ -151,6 +151,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap Monster2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Monster2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap NewMap {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("NewMap", resourceCulture);
|
||||
|
|
|
@ -124,15 +124,27 @@
|
|||
<data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="MissingTexture" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MissingTexture.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Splash3_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Splash3_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Properties" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Properties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Filter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Filter.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Status0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -142,17 +154,32 @@
|
|||
<data name="mergegeometry" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mergegeometry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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="File" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NewMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WarningOff" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WarningOff.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Hourglass" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Hourglass.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Grid2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Grid2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="OpenMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Grid4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Grid4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
|
@ -160,61 +187,37 @@
|
|||
<data name="SaveMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SaveMap.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>
|
||||
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Status1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Hourglass" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Hourglass.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="mergegeometry2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mergegeometry2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="File" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NewMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MissingTexture" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MissingTexture.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UnknownImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnknownImage.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Splash3_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Splash3_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Splash3_trans" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Splash3_trans.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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 name="Grid2_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Grid2_arrowup.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 name="UnknownImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnknownImage.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="mergegeometry2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\mergegeometry2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WarningOff" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WarningOff.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Status1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Status1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Grid2_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Grid2_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Zoom_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Zoom_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="OpenMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\OpenMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Monster2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Monster2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Source/Resources/Monster2.png
Normal file
BIN
Source/Resources/Monster2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 864 B |
18
Source/Windows/MainForm.Designer.cs
generated
18
Source/Windows/MainForm.Designer.cs
generated
|
@ -96,6 +96,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttonautomerge = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.buttontestmonsters = new System.Windows.Forms.ToolStripButton();
|
||||
this.buttontest = new System.Windows.Forms.ToolStripSplitButton();
|
||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.statusbar = new System.Windows.Forms.StatusStrip();
|
||||
|
@ -577,6 +578,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.buttonsnaptogrid,
|
||||
this.buttonautomerge,
|
||||
this.toolStripSeparator5,
|
||||
this.buttontestmonsters,
|
||||
this.buttontest,
|
||||
this.toolStripSeparator6});
|
||||
this.toolbar.Location = new System.Drawing.Point(0, 24);
|
||||
|
@ -749,6 +751,19 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// buttontestmonsters
|
||||
//
|
||||
this.buttontestmonsters.Checked = true;
|
||||
this.buttontestmonsters.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.buttontestmonsters.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.buttontestmonsters.Image = global::CodeImp.DoomBuilder.Properties.Resources.Monster2;
|
||||
this.buttontestmonsters.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.buttontestmonsters.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.buttontestmonsters.Name = "buttontestmonsters";
|
||||
this.buttontestmonsters.Size = new System.Drawing.Size(23, 22);
|
||||
this.buttontestmonsters.Text = "Test with monsters";
|
||||
this.buttontestmonsters.Click += new System.EventHandler(this.buttontestmonsters_Click);
|
||||
//
|
||||
// buttontest
|
||||
//
|
||||
this.buttontest.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
|
@ -795,7 +810,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.statuslabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.statuslabel.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.statuslabel.Name = "statuslabel";
|
||||
this.statuslabel.Size = new System.Drawing.Size(365, 18);
|
||||
this.statuslabel.Size = new System.Drawing.Size(396, 18);
|
||||
this.statuslabel.Spring = true;
|
||||
this.statuslabel.Text = "Initializing user interface...";
|
||||
this.statuslabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
|
@ -1268,5 +1283,6 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private System.Windows.Forms.ToolStripMenuItem itempaste;
|
||||
private System.Windows.Forms.ToolStripStatusLabel configlabel;
|
||||
private System.Windows.Forms.ToolStripMenuItem menumode;
|
||||
private System.Windows.Forms.ToolStripButton buttontestmonsters;
|
||||
}
|
||||
}
|
|
@ -183,7 +183,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
UpdateEditMenu();
|
||||
UpdateModeMenu();
|
||||
UpdateToolsMenu();
|
||||
UpdateEditModeItems();
|
||||
UpdateToolbar();
|
||||
UpdateSkills();
|
||||
}
|
||||
|
||||
|
@ -1052,6 +1052,13 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
int skill = (int)((sender as ToolStripMenuItem).Tag);
|
||||
General.Map.Launcher.TestAtSkill(skill);
|
||||
}
|
||||
|
||||
// Toggle monster testing
|
||||
private void buttontestmonsters_Click(object sender, EventArgs e)
|
||||
{
|
||||
General.Settings.TestMonsters = !General.Settings.TestMonsters;
|
||||
buttontestmonsters.Checked = General.Settings.TestMonsters;
|
||||
}
|
||||
|
||||
// This loses focus
|
||||
private void LoseFocus(object sender, EventArgs e)
|
||||
|
@ -1184,11 +1191,14 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
if(pvi is ToolStripSeparator) pvi.Visible = false;
|
||||
}
|
||||
|
||||
// This enables or disables all editing mode items
|
||||
private void UpdateEditModeItems()
|
||||
// This enables or disables all editing mode items and toolbar buttons
|
||||
private void UpdateToolbar()
|
||||
{
|
||||
// Enable/disable all items
|
||||
// Enable/disable all edit mode items
|
||||
foreach(ToolStripItem i in editmodeitems) i.Enabled = (General.Map != null);
|
||||
|
||||
// Update buttons
|
||||
buttontestmonsters.Checked = General.Settings.TestMonsters;
|
||||
}
|
||||
|
||||
// This checks one of the edit mode items (and unchecks all others)
|
||||
|
|
Loading…
Reference in a new issue