Added support for SRB2's Thing type "parameter" property.

This commit is contained in:
MascaraSnake 2016-02-29 11:41:17 +01:00
parent 552a4ea920
commit 0c1ab582a7
63 changed files with 1780 additions and 2043 deletions

View file

@ -128,7 +128,7 @@ defaulttexturescale = 1.0f;
defaultflatscale = 1.0f;
// Thing number for start position in 3D Mode
start3dmode = 32000;
start3dmode = 3328;
@ -2515,12 +2515,7 @@ thingtypes
height = 16;
sort = 1;
32000 = "3D Mode Start";
32001
{
arrow = 0;
title = "Control Sector Position Hint";
}
3328 = "3D Mode Start";
}
starts
@ -4236,342 +4231,6 @@ thingtypes
}
}
nightstrk1
{
color = 13; // Pink
title = "NiGHTS Track (2nd Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
5796
{
title = "(Mare 2) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
5797
{
title = "(Mare 2) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
5798
{
title = "(Mare 2) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
5806
{
title = "(Mare 2) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
nightstrk2
{
color = 13; // Pink
title = "NiGHTS Track (3rd Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
9892
{
title = "(Mare 3) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
9893
{
title = "(Mare 3) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
9894
{
title = "(Mare 3) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
9902
{
title = "(Mare 3) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
nightstrk3
{
color = 13; // Pink
title = "NiGHTS Track (4th Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
13988
{
title = "(Mare 4) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
13989
{
title = "(Mare 4) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
13990
{
title = "(Mare 4) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
13998
{
title = "(Mare 4) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
nightstrk4
{
color = 13; // Pink
title = "NiGHTS Track (5th Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
18084
{
title = "(Mare 5) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
18085
{
title = "(Mare 5) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
18086
{
title = "(Mare 5) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
18094
{
title = "(Mare 5) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
nightstrk5
{
color = 13; // Pink
title = "NiGHTS Track (6th Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
22180
{
title = "(Mare 6) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
22181
{
title = "(Mare 6) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
22182
{
title = "(Mare 6) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
22190
{
title = "(Mare 6) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
nightstrk6
{
color = 13; // Pink
title = "NiGHTS Track (7th Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
26276
{
title = "(Mare 7) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
26277
{
title = "(Mare 7) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
26278
{
title = "(Mare 7) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
26286
{
title = "(Mare 7) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
nightstrk7
{
color = 13; // Pink
title = "NiGHTS Track (8th Mare)";
width = 8;
height = 4096;
sprite = "UNKNA0";
30372
{
title = "(Mare 8) Axis";
sprite = "internal:axis1";
circle = 1;
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
angletext = "Radius/Direction";
parametertext = "Mare";
}
30373
{
title = "(Mare 8) Axis Transfer";
sprite = "internal:axis2";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
30374
{
title = "(Mare 8) Axis Transfer Line";
sprite = "internal:axis3";
unflippable = true;
ignoreZ = true;
flagsvaluetext = "Order";
parametertext = "Mare";
}
30382
{
title = "(Mare 8) Ideya Capture";
sprite = "CAPSA0";
width = 72;
height = 144;
angletext = "Rings";
parametertext = "Mare";
}
}
mario
{
color = 6; // Brown

View file

@ -623,12 +623,12 @@ namespace CodeImp.DoomBuilder.Config
// This applies default settings to a thing
public void ApplyDefaultThingSettings(Thing t)
{
t.Type = defaultthingtype;
t.FullType = defaultthingtype;
t.Rotate(defaultthingangle);
foreach(string f in defaultthingflags) t.SetFlag(f, true);
//mxd. Set default arguments
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(tti != null)
{
t.Args[0] = (int)tti.Args[0].DefaultValue;

View file

@ -28,291 +28,318 @@ namespace CodeImp.DoomBuilder.Controls
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThingBrowserControl));
this.sizecaption = new System.Windows.Forms.Label();
this.blockingcaption = new System.Windows.Forms.Label();
this.positioncaption = new System.Windows.Forms.Label();
this.typecaption = new System.Windows.Forms.Label();
this.sizelabel = new System.Windows.Forms.Label();
this.blockinglabel = new System.Windows.Forms.Label();
this.positionlabel = new System.Windows.Forms.Label();
this.thingimages = new System.Windows.Forms.ImageList(this.components);
this.infopanel = new System.Windows.Forms.Panel();
this.spritepanel = new System.Windows.Forms.Panel();
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
this.classname = new System.Windows.Forms.LinkLabel();
this.labelclassname = new System.Windows.Forms.Label();
this.typeid = new CodeImp.DoomBuilder.Controls.NumericTextbox();
this.label1 = new System.Windows.Forms.Label();
this.tbFilter = new System.Windows.Forms.TextBox();
this.bClear = new System.Windows.Forms.Button();
this.updatetimer = new System.Windows.Forms.Timer(this.components);
this.typelist = new CodeImp.DoomBuilder.GZBuilder.Controls.MultiSelectTreeview();
this.infopanel.SuspendLayout();
this.spritepanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spritetex)).BeginInit();
this.SuspendLayout();
//
// sizecaption
//
this.sizecaption.Location = new System.Drawing.Point(0, 38);
this.sizecaption.Name = "sizecaption";
this.sizecaption.Size = new System.Drawing.Size(54, 13);
this.sizecaption.TabIndex = 16;
this.sizecaption.Text = "Size:";
this.sizecaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// blockingcaption
//
this.blockingcaption.Location = new System.Drawing.Point(0, 54);
this.blockingcaption.Name = "blockingcaption";
this.blockingcaption.Size = new System.Drawing.Size(54, 13);
this.blockingcaption.TabIndex = 14;
this.blockingcaption.Text = "Blocking:";
this.blockingcaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// positioncaption
//
this.positioncaption.Location = new System.Drawing.Point(0, 22);
this.positioncaption.Name = "positioncaption";
this.positioncaption.Size = new System.Drawing.Size(54, 13);
this.positioncaption.TabIndex = 12;
this.positioncaption.Text = "Position:";
this.positioncaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// typecaption
//
this.typecaption.Location = new System.Drawing.Point(0, 6);
this.typecaption.Name = "typecaption";
this.typecaption.Size = new System.Drawing.Size(54, 13);
this.typecaption.TabIndex = 10;
this.typecaption.Text = "Type:";
this.typecaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// sizelabel
//
this.sizelabel.AutoSize = true;
this.sizelabel.Location = new System.Drawing.Point(60, 38);
this.sizelabel.Name = "sizelabel";
this.sizelabel.Size = new System.Drawing.Size(42, 13);
this.sizelabel.TabIndex = 17;
this.sizelabel.Text = "16 x 96";
//
// blockinglabel
//
this.blockinglabel.AutoSize = true;
this.blockinglabel.Location = new System.Drawing.Point(60, 54);
this.blockinglabel.Name = "blockinglabel";
this.blockinglabel.Size = new System.Drawing.Size(63, 13);
this.blockinglabel.TabIndex = 15;
this.blockinglabel.Text = "True-Height";
//
// positionlabel
//
this.positionlabel.AutoSize = true;
this.positionlabel.Location = new System.Drawing.Point(60, 22);
this.positionlabel.Name = "positionlabel";
this.positionlabel.Size = new System.Drawing.Size(38, 13);
this.positionlabel.TabIndex = 13;
this.positionlabel.Text = "Ceiling";
//
// thingimages
//
this.thingimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("thingimages.ImageStream")));
this.thingimages.TransparentColor = System.Drawing.SystemColors.Window;
this.thingimages.Images.SetKeyName(0, "thing00.png");
this.thingimages.Images.SetKeyName(1, "thing01.png");
this.thingimages.Images.SetKeyName(2, "thing02.png");
this.thingimages.Images.SetKeyName(3, "thing03.png");
this.thingimages.Images.SetKeyName(4, "thing04.png");
this.thingimages.Images.SetKeyName(5, "thing05.png");
this.thingimages.Images.SetKeyName(6, "thing06.png");
this.thingimages.Images.SetKeyName(7, "thing07.png");
this.thingimages.Images.SetKeyName(8, "thing08.png");
this.thingimages.Images.SetKeyName(9, "thing09.png");
this.thingimages.Images.SetKeyName(10, "thing10.png");
this.thingimages.Images.SetKeyName(11, "thing11.png");
this.thingimages.Images.SetKeyName(12, "thing12.png");
this.thingimages.Images.SetKeyName(13, "thing13.png");
this.thingimages.Images.SetKeyName(14, "thing14.png");
this.thingimages.Images.SetKeyName(15, "thing15.png");
this.thingimages.Images.SetKeyName(16, "thing16.png");
this.thingimages.Images.SetKeyName(17, "thing17.png");
this.thingimages.Images.SetKeyName(18, "thing18.png");
this.thingimages.Images.SetKeyName(19, "thing19.png");
this.thingimages.Images.SetKeyName(20, "category00.png");
this.thingimages.Images.SetKeyName(21, "category01.png");
this.thingimages.Images.SetKeyName(22, "category02.png");
this.thingimages.Images.SetKeyName(23, "category03.png");
this.thingimages.Images.SetKeyName(24, "category04.png");
this.thingimages.Images.SetKeyName(25, "category05.png");
this.thingimages.Images.SetKeyName(26, "category06.png");
this.thingimages.Images.SetKeyName(27, "category07.png");
this.thingimages.Images.SetKeyName(28, "category08.png");
this.thingimages.Images.SetKeyName(29, "category09.png");
this.thingimages.Images.SetKeyName(30, "category10.png");
this.thingimages.Images.SetKeyName(31, "category11.png");
this.thingimages.Images.SetKeyName(32, "category12.png");
this.thingimages.Images.SetKeyName(33, "category13.png");
this.thingimages.Images.SetKeyName(34, "category14.png");
this.thingimages.Images.SetKeyName(35, "category15.png");
this.thingimages.Images.SetKeyName(36, "category16.png");
this.thingimages.Images.SetKeyName(37, "category17.png");
this.thingimages.Images.SetKeyName(38, "category18.png");
this.thingimages.Images.SetKeyName(39, "category19.png");
this.thingimages.Images.SetKeyName(40, "Warning.png");
//
// infopanel
//
this.infopanel.Controls.Add(this.spritepanel);
this.infopanel.Controls.Add(this.classname);
this.infopanel.Controls.Add(this.labelclassname);
this.infopanel.Controls.Add(this.sizelabel);
this.infopanel.Controls.Add(this.typecaption);
this.infopanel.Controls.Add(this.sizecaption);
this.infopanel.Controls.Add(this.typeid);
this.infopanel.Controls.Add(this.blockinglabel);
this.infopanel.Controls.Add(this.positioncaption);
this.infopanel.Controls.Add(this.blockingcaption);
this.infopanel.Controls.Add(this.positionlabel);
this.infopanel.Location = new System.Drawing.Point(0, 233);
this.infopanel.Name = "infopanel";
this.infopanel.Size = new System.Drawing.Size(304, 87);
this.infopanel.TabIndex = 18;
//
// spritepanel
//
this.spritepanel.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.spritepanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.spritepanel.Controls.Add(this.spritetex);
this.spritepanel.Location = new System.Drawing.Point(235, 2);
this.spritepanel.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3);
this.spritepanel.Name = "spritepanel";
this.spritepanel.Size = new System.Drawing.Size(68, 68);
this.spritepanel.TabIndex = 23;
//
// spritetex
//
this.spritetex.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.Default;
this.spritetex.Dock = System.Windows.Forms.DockStyle.Fill;
this.spritetex.Highlighted = false;
this.spritetex.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
this.spritetex.Location = new System.Drawing.Point(0, 0);
this.spritetex.Name = "spritetex";
this.spritetex.PageUnit = System.Drawing.GraphicsUnit.Pixel;
this.spritetex.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.None;
this.spritetex.Size = new System.Drawing.Size(64, 64);
this.spritetex.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.spritetex.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
this.spritetex.TabIndex = 0;
this.spritetex.TabStop = false;
//
// classname
//
this.classname.ActiveLinkColor = System.Drawing.SystemColors.Highlight;
this.classname.AutoSize = true;
this.classname.LinkColor = System.Drawing.SystemColors.HotTrack;
this.classname.Location = new System.Drawing.Point(60, 70);
this.classname.Name = "classname";
this.classname.Size = new System.Drawing.Size(165, 13);
this.classname.TabIndex = 27;
this.classname.TabStop = true;
this.classname.Text = "SuperTurboTurkeyPuncherPlayer";
this.classname.VisitedLinkColor = System.Drawing.SystemColors.HotTrack;
this.classname.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.classname_LinkClicked);
//
// labelclassname
//
this.labelclassname.Location = new System.Drawing.Point(0, 70);
this.labelclassname.Name = "labelclassname";
this.labelclassname.Size = new System.Drawing.Size(54, 13);
this.labelclassname.TabIndex = 25;
this.labelclassname.Text = "Class:";
this.labelclassname.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// typeid
//
this.typeid.AllowDecimal = false;
this.typeid.AllowNegative = false;
this.typeid.AllowRelative = false;
this.typeid.ForeColor = System.Drawing.SystemColors.WindowText;
this.typeid.ImeMode = System.Windows.Forms.ImeMode.Off;
this.typeid.Location = new System.Drawing.Point(60, 2);
this.typeid.Name = "typeid";
this.typeid.Size = new System.Drawing.Size(68, 20);
this.typeid.TabIndex = 1;
this.typeid.TextChanged += new System.EventHandler(this.typeid_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 6);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 19;
this.label1.Text = "Filter:";
//
// tbFilter
//
this.tbFilter.Location = new System.Drawing.Point(42, 3);
this.tbFilter.Name = "tbFilter";
this.tbFilter.Size = new System.Drawing.Size(232, 20);
this.tbFilter.TabIndex = 20;
this.tbFilter.TextChanged += new System.EventHandler(this.tbFilter_TextChanged);
this.tbFilter.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbFilter_KeyUp);
//
// bClear
//
this.bClear.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
this.bClear.Location = new System.Drawing.Point(277, 1);
this.bClear.Name = "bClear";
this.bClear.Size = new System.Drawing.Size(24, 23);
this.bClear.TabIndex = 21;
this.bClear.UseVisualStyleBackColor = true;
this.bClear.Click += new System.EventHandler(this.bClear_Click);
//
// updatetimer
//
this.updatetimer.Tick += new System.EventHandler(this.updatetimer_Tick);
//
// typelist
//
this.typelist.HideSelection = false;
this.typelist.ImageIndex = 0;
this.typelist.ImageList = this.thingimages;
this.typelist.Location = new System.Drawing.Point(0, 28);
this.typelist.Margin = new System.Windows.Forms.Padding(8, 8, 9, 8);
this.typelist.Name = "typelist";
this.typelist.SelectedImageIndex = 0;
this.typelist.SelectionBackColor = System.Drawing.SystemColors.Highlight;
this.typelist.SelectionMode = CodeImp.DoomBuilder.GZBuilder.Controls.TreeViewSelectionMode.SingleSelect;
this.typelist.ShowNodeToolTips = true;
this.typelist.Size = new System.Drawing.Size(304, 203);
this.typelist.TabIndex = 22;
this.typelist.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.typelist_MouseDoubleClick);
this.typelist.MouseEnter += new System.EventHandler(this.typelist_MouseEnter);
this.typelist.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.typelist_KeyPress);
this.typelist.SelectionsChanged += new System.EventHandler(this.typelist_SelectionsChanged);
//
// ThingBrowserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.typelist);
this.Controls.Add(this.bClear);
this.Controls.Add(this.tbFilter);
this.Controls.Add(this.label1);
this.Controls.Add(this.infopanel);
this.Name = "ThingBrowserControl";
this.Size = new System.Drawing.Size(304, 320);
this.Resize += new System.EventHandler(this.ThingBrowserControl_Resize);
this.infopanel.ResumeLayout(false);
this.infopanel.PerformLayout();
this.spritepanel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.spritetex)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThingBrowserControl));
this.sizecaption = new System.Windows.Forms.Label();
this.blockingcaption = new System.Windows.Forms.Label();
this.positioncaption = new System.Windows.Forms.Label();
this.typecaption = new System.Windows.Forms.Label();
this.parametercaption = new System.Windows.Forms.Label();
this.sizelabel = new System.Windows.Forms.Label();
this.blockinglabel = new System.Windows.Forms.Label();
this.positionlabel = new System.Windows.Forms.Label();
this.thingimages = new System.Windows.Forms.ImageList(this.components);
this.infopanel = new System.Windows.Forms.Panel();
this.spritepanel = new System.Windows.Forms.Panel();
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
this.classname = new System.Windows.Forms.LinkLabel();
this.labelclassname = new System.Windows.Forms.Label();
this.typeid = new CodeImp.DoomBuilder.Controls.NumericTextbox();
this.parameterid = new CodeImp.DoomBuilder.Controls.NumericTextbox();
this.label1 = new System.Windows.Forms.Label();
this.tbFilter = new System.Windows.Forms.TextBox();
this.bClear = new System.Windows.Forms.Button();
this.updatetimer = new System.Windows.Forms.Timer(this.components);
this.typelist = new CodeImp.DoomBuilder.GZBuilder.Controls.MultiSelectTreeview();
this.infopanel.SuspendLayout();
this.spritepanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spritetex)).BeginInit();
this.SuspendLayout();
//
// sizecaption
//
this.sizecaption.Location = new System.Drawing.Point(4, 63);
this.sizecaption.Name = "sizecaption";
this.sizecaption.Size = new System.Drawing.Size(54, 13);
this.sizecaption.TabIndex = 16;
this.sizecaption.Text = "Size:";
this.sizecaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// blockingcaption
//
this.blockingcaption.Location = new System.Drawing.Point(4, 79);
this.blockingcaption.Name = "blockingcaption";
this.blockingcaption.Size = new System.Drawing.Size(54, 13);
this.blockingcaption.TabIndex = 14;
this.blockingcaption.Text = "Blocking:";
this.blockingcaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// positioncaption
//
this.positioncaption.Location = new System.Drawing.Point(4, 47);
this.positioncaption.Name = "positioncaption";
this.positioncaption.Size = new System.Drawing.Size(54, 13);
this.positioncaption.TabIndex = 12;
this.positioncaption.Text = "Position:";
this.positioncaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// typecaption
//
this.typecaption.Location = new System.Drawing.Point(4, 6);
this.typecaption.Name = "typecaption";
this.typecaption.Size = new System.Drawing.Size(54, 13);
this.typecaption.TabIndex = 10;
this.typecaption.Text = "Type:";
this.typecaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// parametercaption
//
this.parametercaption.Location = new System.Drawing.Point(0, 27);
this.parametercaption.Name = "parametercaption";
this.parametercaption.Size = new System.Drawing.Size(58, 13);
this.parametercaption.TabIndex = 10;
this.parametercaption.Text = "Parameter:";
this.parametercaption.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// sizelabel
//
this.sizelabel.AutoSize = true;
this.sizelabel.Location = new System.Drawing.Point(64, 63);
this.sizelabel.Name = "sizelabel";
this.sizelabel.Size = new System.Drawing.Size(42, 13);
this.sizelabel.TabIndex = 17;
this.sizelabel.Text = "16 x 96";
//
// blockinglabel
//
this.blockinglabel.AutoSize = true;
this.blockinglabel.Location = new System.Drawing.Point(64, 79);
this.blockinglabel.Name = "blockinglabel";
this.blockinglabel.Size = new System.Drawing.Size(63, 13);
this.blockinglabel.TabIndex = 15;
this.blockinglabel.Text = "True-Height";
//
// positionlabel
//
this.positionlabel.AutoSize = true;
this.positionlabel.Location = new System.Drawing.Point(64, 47);
this.positionlabel.Name = "positionlabel";
this.positionlabel.Size = new System.Drawing.Size(38, 13);
this.positionlabel.TabIndex = 13;
this.positionlabel.Text = "Ceiling";
//
// thingimages
//
this.thingimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("thingimages.ImageStream")));
this.thingimages.TransparentColor = System.Drawing.SystemColors.Window;
this.thingimages.Images.SetKeyName(0, "thing00.png");
this.thingimages.Images.SetKeyName(1, "thing01.png");
this.thingimages.Images.SetKeyName(2, "thing02.png");
this.thingimages.Images.SetKeyName(3, "thing03.png");
this.thingimages.Images.SetKeyName(4, "thing04.png");
this.thingimages.Images.SetKeyName(5, "thing05.png");
this.thingimages.Images.SetKeyName(6, "thing06.png");
this.thingimages.Images.SetKeyName(7, "thing07.png");
this.thingimages.Images.SetKeyName(8, "thing08.png");
this.thingimages.Images.SetKeyName(9, "thing09.png");
this.thingimages.Images.SetKeyName(10, "thing10.png");
this.thingimages.Images.SetKeyName(11, "thing11.png");
this.thingimages.Images.SetKeyName(12, "thing12.png");
this.thingimages.Images.SetKeyName(13, "thing13.png");
this.thingimages.Images.SetKeyName(14, "thing14.png");
this.thingimages.Images.SetKeyName(15, "thing15.png");
this.thingimages.Images.SetKeyName(16, "thing16.png");
this.thingimages.Images.SetKeyName(17, "thing17.png");
this.thingimages.Images.SetKeyName(18, "thing18.png");
this.thingimages.Images.SetKeyName(19, "thing19.png");
this.thingimages.Images.SetKeyName(20, "category00.png");
this.thingimages.Images.SetKeyName(21, "category01.png");
this.thingimages.Images.SetKeyName(22, "category02.png");
this.thingimages.Images.SetKeyName(23, "category03.png");
this.thingimages.Images.SetKeyName(24, "category04.png");
this.thingimages.Images.SetKeyName(25, "category05.png");
this.thingimages.Images.SetKeyName(26, "category06.png");
this.thingimages.Images.SetKeyName(27, "category07.png");
this.thingimages.Images.SetKeyName(28, "category08.png");
this.thingimages.Images.SetKeyName(29, "category09.png");
this.thingimages.Images.SetKeyName(30, "category10.png");
this.thingimages.Images.SetKeyName(31, "category11.png");
this.thingimages.Images.SetKeyName(32, "category12.png");
this.thingimages.Images.SetKeyName(33, "category13.png");
this.thingimages.Images.SetKeyName(34, "category14.png");
this.thingimages.Images.SetKeyName(35, "category15.png");
this.thingimages.Images.SetKeyName(36, "category16.png");
this.thingimages.Images.SetKeyName(37, "category17.png");
this.thingimages.Images.SetKeyName(38, "category18.png");
this.thingimages.Images.SetKeyName(39, "category19.png");
this.thingimages.Images.SetKeyName(40, "Warning.png");
//
// infopanel
//
this.infopanel.Controls.Add(this.spritepanel);
this.infopanel.Controls.Add(this.classname);
this.infopanel.Controls.Add(this.labelclassname);
this.infopanel.Controls.Add(this.sizelabel);
this.infopanel.Controls.Add(this.typecaption);
this.infopanel.Controls.Add(this.parametercaption);
this.infopanel.Controls.Add(this.sizecaption);
this.infopanel.Controls.Add(this.typeid);
this.infopanel.Controls.Add(this.parameterid);
this.infopanel.Controls.Add(this.blockinglabel);
this.infopanel.Controls.Add(this.positioncaption);
this.infopanel.Controls.Add(this.blockingcaption);
this.infopanel.Controls.Add(this.positionlabel);
this.infopanel.Location = new System.Drawing.Point(0, 233);
this.infopanel.Name = "infopanel";
this.infopanel.Size = new System.Drawing.Size(304, 112);
this.infopanel.TabIndex = 18;
//
// spritepanel
//
this.spritepanel.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.spritepanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.spritepanel.Controls.Add(this.spritetex);
this.spritepanel.Location = new System.Drawing.Point(235, 2);
this.spritepanel.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3);
this.spritepanel.Name = "spritepanel";
this.spritepanel.Size = new System.Drawing.Size(68, 68);
this.spritepanel.TabIndex = 23;
//
// spritetex
//
this.spritetex.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.Default;
this.spritetex.Dock = System.Windows.Forms.DockStyle.Fill;
this.spritetex.Highlighted = false;
this.spritetex.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
this.spritetex.Location = new System.Drawing.Point(0, 0);
this.spritetex.Name = "spritetex";
this.spritetex.PageUnit = System.Drawing.GraphicsUnit.Pixel;
this.spritetex.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.None;
this.spritetex.Size = new System.Drawing.Size(64, 64);
this.spritetex.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.spritetex.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
this.spritetex.TabIndex = 0;
this.spritetex.TabStop = false;
//
// classname
//
this.classname.ActiveLinkColor = System.Drawing.SystemColors.Highlight;
this.classname.AutoSize = true;
this.classname.LinkColor = System.Drawing.SystemColors.HotTrack;
this.classname.Location = new System.Drawing.Point(64, 95);
this.classname.Name = "classname";
this.classname.Size = new System.Drawing.Size(165, 13);
this.classname.TabIndex = 27;
this.classname.TabStop = true;
this.classname.Text = "SuperTurboTurkeyPuncherPlayer";
this.classname.VisitedLinkColor = System.Drawing.SystemColors.HotTrack;
this.classname.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.classname_LinkClicked);
//
// labelclassname
//
this.labelclassname.Location = new System.Drawing.Point(4, 95);
this.labelclassname.Name = "labelclassname";
this.labelclassname.Size = new System.Drawing.Size(54, 13);
this.labelclassname.TabIndex = 25;
this.labelclassname.Text = "Class:";
this.labelclassname.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// typeid
//
this.typeid.AllowDecimal = false;
this.typeid.AllowNegative = false;
this.typeid.AllowRelative = false;
this.typeid.ForeColor = System.Drawing.SystemColors.WindowText;
this.typeid.ImeMode = System.Windows.Forms.ImeMode.Off;
this.typeid.Location = new System.Drawing.Point(64, 2);
this.typeid.Name = "typeid";
this.typeid.Size = new System.Drawing.Size(68, 20);
this.typeid.TabIndex = 1;
this.typeid.TextChanged += new System.EventHandler(this.typeid_TextChanged);
//
// parameterid
//
this.parameterid.AllowDecimal = false;
this.parameterid.AllowNegative = false;
this.parameterid.AllowRelative = false;
this.parameterid.ForeColor = System.Drawing.SystemColors.WindowText;
this.parameterid.ImeMode = System.Windows.Forms.ImeMode.Off;
this.parameterid.Location = new System.Drawing.Point(64, 24);
this.parameterid.Name = "parameterid";
this.parameterid.Size = new System.Drawing.Size(68, 20);
this.parameterid.TabIndex = 2;
this.parameterid.TextChanged += new System.EventHandler(this.parameterid_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 6);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 19;
this.label1.Text = "Filter:";
//
// tbFilter
//
this.tbFilter.Location = new System.Drawing.Point(42, 3);
this.tbFilter.Name = "tbFilter";
this.tbFilter.Size = new System.Drawing.Size(232, 20);
this.tbFilter.TabIndex = 20;
this.tbFilter.TextChanged += new System.EventHandler(this.tbFilter_TextChanged);
this.tbFilter.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbFilter_KeyUp);
//
// bClear
//
this.bClear.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
this.bClear.Location = new System.Drawing.Point(277, 1);
this.bClear.Name = "bClear";
this.bClear.Size = new System.Drawing.Size(24, 23);
this.bClear.TabIndex = 21;
this.bClear.UseVisualStyleBackColor = true;
this.bClear.Click += new System.EventHandler(this.bClear_Click);
//
// updatetimer
//
this.updatetimer.Tick += new System.EventHandler(this.updatetimer_Tick);
//
// typelist
//
this.typelist.HideSelection = false;
this.typelist.ImageIndex = 0;
this.typelist.ImageList = this.thingimages;
this.typelist.Location = new System.Drawing.Point(0, 28);
this.typelist.Margin = new System.Windows.Forms.Padding(8, 8, 9, 8);
this.typelist.Name = "typelist";
this.typelist.SelectedImageIndex = 0;
this.typelist.SelectionBackColor = System.Drawing.SystemColors.Highlight;
this.typelist.SelectionMode = CodeImp.DoomBuilder.GZBuilder.Controls.TreeViewSelectionMode.SingleSelect;
this.typelist.ShowNodeToolTips = true;
this.typelist.Size = new System.Drawing.Size(304, 203);
this.typelist.TabIndex = 22;
this.typelist.SelectionsChanged += new System.EventHandler(this.typelist_SelectionsChanged);
this.typelist.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.typelist_KeyPress);
this.typelist.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.typelist_MouseDoubleClick);
this.typelist.MouseEnter += new System.EventHandler(this.typelist_MouseEnter);
//
// ThingBrowserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.typelist);
this.Controls.Add(this.bClear);
this.Controls.Add(this.tbFilter);
this.Controls.Add(this.label1);
this.Controls.Add(this.infopanel);
this.Name = "ThingBrowserControl";
this.Size = new System.Drawing.Size(304, 345);
this.Resize += new System.EventHandler(this.ThingBrowserControl_Resize);
this.infopanel.ResumeLayout(false);
this.infopanel.PerformLayout();
this.spritepanel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.spritetex)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -322,13 +349,15 @@ namespace CodeImp.DoomBuilder.Controls
private System.Windows.Forms.Label blockinglabel;
private System.Windows.Forms.Label positionlabel;
private NumericTextbox typeid;
private System.Windows.Forms.ImageList thingimages;
private NumericTextbox parameterid;
private System.Windows.Forms.ImageList thingimages;
private System.Windows.Forms.Panel infopanel;
private System.Windows.Forms.Label sizecaption;
private System.Windows.Forms.Label blockingcaption;
private System.Windows.Forms.Label positioncaption;
private System.Windows.Forms.Label typecaption;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label parametercaption;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbFilter;
private System.Windows.Forms.Button bClear;
private CodeImp.DoomBuilder.GZBuilder.Controls.MultiSelectTreeview typelist;

View file

@ -157,6 +157,12 @@ namespace CodeImp.DoomBuilder.Controls
typeid_TextChanged(this, EventArgs.Empty);
}
public void SelectType(int type, int parameter)
{
parameterid.Text = parameter.ToString();
SelectType(type);
}
// Return selected type info
public ThingTypeInfo GetSelectedInfo()
{
@ -172,6 +178,7 @@ namespace CodeImp.DoomBuilder.Controls
typelist.SelectedNodes.Clear(); //mxd
validnodes.Clear(); //mxd
typeid.Text = "";
parameterid.Text = "";
// Collapse nodes
foreach(TreeNode n in nodes)
@ -192,6 +199,11 @@ namespace CodeImp.DoomBuilder.Controls
return typeid.GetResult(original);
}
public int GetFullType(int original)
{
return GetResult(original % 4096) + parameterid.GetResult(original / 4096) * 4096;
}
//mxd
public void FocusTextbox()
{
@ -400,7 +412,14 @@ namespace CodeImp.DoomBuilder.Controls
if(OnTypeChanged != null) OnTypeChanged(thinginfo);
}
private void updatetimer_Tick(object sender, EventArgs e)
//Parameter changed
private void parameterid_TextChanged(object sender, EventArgs e)
{
// Raise event
if (OnTypeChanged != null) OnTypeChanged(thinginfo);
}
private void updatetimer_Tick(object sender, EventArgs e)
{
updatetimer.Stop();
UpdateThingSprite();

File diff suppressed because it is too large Load diff

View file

@ -28,386 +28,408 @@ namespace CodeImp.DoomBuilder.Controls
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.Label label5;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label3;
System.Windows.Forms.Label label1;
this.labelaction = new System.Windows.Forms.Label();
this.infopanel = new System.Windows.Forms.GroupBox();
this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
this.classname = new System.Windows.Forms.Label();
this.labelclass = new System.Windows.Forms.Label();
this.arg5 = new System.Windows.Forms.Label();
this.arglbl5 = new System.Windows.Forms.Label();
this.arglbl4 = new System.Windows.Forms.Label();
this.arg4 = new System.Windows.Forms.Label();
this.arglbl3 = new System.Windows.Forms.Label();
this.arglbl2 = new System.Windows.Forms.Label();
this.arg3 = new System.Windows.Forms.Label();
this.arglbl1 = new System.Windows.Forms.Label();
this.arg2 = new System.Windows.Forms.Label();
this.arg1 = new System.Windows.Forms.Label();
this.angle = new System.Windows.Forms.Label();
this.tag = new System.Windows.Forms.Label();
this.position = new System.Windows.Forms.Label();
this.action = new System.Windows.Forms.Label();
this.type = new System.Windows.Forms.Label();
this.spritepanel = new System.Windows.Forms.GroupBox();
this.spritename = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
this.flagsPanel = new System.Windows.Forms.GroupBox();
this.flags = new System.Windows.Forms.ListView();
label5 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
this.infopanel.SuspendLayout();
this.spritepanel.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spritetex)).BeginInit();
this.flagsPanel.SuspendLayout();
this.SuspendLayout();
//
// label5
//
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(165, 79);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(37, 13);
label5.TabIndex = 8;
label5.Text = "Angle:";
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(30, 79);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(29, 13);
label4.TabIndex = 4;
label4.Text = "Tag:";
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(11, 64);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(47, 13);
label3.TabIndex = 3;
label3.Text = "Position:";
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(24, 19);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(34, 13);
label1.TabIndex = 0;
label1.Text = "Type:";
//
// labelaction
//
this.labelaction.AutoSize = true;
this.labelaction.Location = new System.Drawing.Point(18, 49);
this.labelaction.Name = "labelaction";
this.labelaction.Size = new System.Drawing.Size(40, 13);
this.labelaction.TabIndex = 2;
this.labelaction.Text = "Action:";
//
// infopanel
//
this.infopanel.Controls.Add(this.anglecontrol);
this.infopanel.Controls.Add(this.classname);
this.infopanel.Controls.Add(this.labelclass);
this.infopanel.Controls.Add(this.arg5);
this.infopanel.Controls.Add(this.arglbl5);
this.infopanel.Controls.Add(this.arglbl4);
this.infopanel.Controls.Add(this.arg4);
this.infopanel.Controls.Add(this.arglbl3);
this.infopanel.Controls.Add(this.arglbl2);
this.infopanel.Controls.Add(this.arg3);
this.infopanel.Controls.Add(this.arglbl1);
this.infopanel.Controls.Add(this.arg2);
this.infopanel.Controls.Add(this.arg1);
this.infopanel.Controls.Add(this.angle);
this.infopanel.Controls.Add(label5);
this.infopanel.Controls.Add(this.tag);
this.infopanel.Controls.Add(this.position);
this.infopanel.Controls.Add(this.action);
this.infopanel.Controls.Add(label4);
this.infopanel.Controls.Add(label3);
this.infopanel.Controls.Add(this.labelaction);
this.infopanel.Controls.Add(this.type);
this.infopanel.Controls.Add(label1);
this.infopanel.Location = new System.Drawing.Point(0, 0);
this.infopanel.Name = "infopanel";
this.infopanel.Size = new System.Drawing.Size(473, 100);
this.infopanel.TabIndex = 4;
this.infopanel.TabStop = false;
this.infopanel.Text = " Thing ";
//
// anglecontrol
//
this.anglecontrol.Angle = 0;
this.anglecontrol.AngleOffset = 0;
this.anglecontrol.Location = new System.Drawing.Point(235, 73);
this.anglecontrol.Name = "anglecontrol";
this.anglecontrol.Size = new System.Drawing.Size(24, 24);
this.anglecontrol.TabIndex = 38;
//
// classname
//
this.classname.AutoEllipsis = true;
this.classname.Location = new System.Drawing.Point(61, 34);
this.classname.Name = "classname";
this.classname.Size = new System.Drawing.Size(210, 14);
this.classname.TabIndex = 40;
this.classname.Text = "CrazyFlyingShotgunSpawner";
//
// labelclass
//
this.labelclass.AutoSize = true;
this.labelclass.Location = new System.Drawing.Point(23, 34);
this.labelclass.Name = "labelclass";
this.labelclass.Size = new System.Drawing.Size(35, 13);
this.labelclass.TabIndex = 39;
this.labelclass.Text = "Class:";
//
// arg5
//
this.arg5.AutoEllipsis = true;
this.arg5.Location = new System.Drawing.Point(384, 79);
this.arg5.Name = "arg5";
this.arg5.Size = new System.Drawing.Size(83, 14);
this.arg5.TabIndex = 37;
this.arg5.Text = "Arg 1:";
//
// arglbl5
//
this.arglbl5.AutoEllipsis = true;
this.arglbl5.BackColor = System.Drawing.Color.Transparent;
this.arglbl5.Location = new System.Drawing.Point(257, 79);
this.arglbl5.Name = "arglbl5";
this.arglbl5.Size = new System.Drawing.Size(121, 14);
this.arglbl5.TabIndex = 32;
this.arglbl5.Text = "Arg 1:";
this.arglbl5.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arglbl4
//
this.arglbl4.AutoEllipsis = true;
this.arglbl4.BackColor = System.Drawing.Color.Transparent;
this.arglbl4.Location = new System.Drawing.Point(257, 64);
this.arglbl4.Name = "arglbl4";
this.arglbl4.Size = new System.Drawing.Size(121, 14);
this.arglbl4.TabIndex = 31;
this.arglbl4.Text = "Arg 1:";
this.arglbl4.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arg4
//
this.arg4.AutoEllipsis = true;
this.arg4.Location = new System.Drawing.Point(384, 64);
this.arg4.Name = "arg4";
this.arg4.Size = new System.Drawing.Size(83, 14);
this.arg4.TabIndex = 36;
this.arg4.Text = "Arg 1:";
//
// arglbl3
//
this.arglbl3.AutoEllipsis = true;
this.arglbl3.BackColor = System.Drawing.Color.Transparent;
this.arglbl3.Location = new System.Drawing.Point(257, 49);
this.arglbl3.Name = "arglbl3";
this.arglbl3.Size = new System.Drawing.Size(121, 14);
this.arglbl3.TabIndex = 30;
this.arglbl3.Text = "Arg 1:";
this.arglbl3.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arglbl2
//
this.arglbl2.AutoEllipsis = true;
this.arglbl2.BackColor = System.Drawing.Color.Transparent;
this.arglbl2.Location = new System.Drawing.Point(257, 34);
this.arglbl2.Name = "arglbl2";
this.arglbl2.Size = new System.Drawing.Size(121, 14);
this.arglbl2.TabIndex = 29;
this.arglbl2.Text = "Arg 1:";
this.arglbl2.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arg3
//
this.arg3.AutoEllipsis = true;
this.arg3.Location = new System.Drawing.Point(384, 49);
this.arg3.Name = "arg3";
this.arg3.Size = new System.Drawing.Size(83, 14);
this.arg3.TabIndex = 35;
this.arg3.Text = "Arg 1:";
//
// arglbl1
//
this.arglbl1.AutoEllipsis = true;
this.arglbl1.BackColor = System.Drawing.Color.Transparent;
this.arglbl1.Location = new System.Drawing.Point(257, 19);
this.arglbl1.Name = "arglbl1";
this.arglbl1.Size = new System.Drawing.Size(121, 14);
this.arglbl1.TabIndex = 28;
this.arglbl1.Text = "Arg 1:";
this.arglbl1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arg2
//
this.arg2.AutoEllipsis = true;
this.arg2.Location = new System.Drawing.Point(384, 34);
this.arg2.Name = "arg2";
this.arg2.Size = new System.Drawing.Size(83, 14);
this.arg2.TabIndex = 34;
this.arg2.Text = "Arg 1:";
//
// arg1
//
this.arg1.AutoEllipsis = true;
this.arg1.Location = new System.Drawing.Point(384, 19);
this.arg1.Name = "arg1";
this.arg1.Size = new System.Drawing.Size(83, 14);
this.arg1.TabIndex = 33;
this.arg1.Text = "Arg 1:";
//
// angle
//
this.angle.AutoSize = true;
this.angle.Location = new System.Drawing.Point(206, 79);
this.angle.Name = "angle";
this.angle.Size = new System.Drawing.Size(25, 13);
this.angle.TabIndex = 11;
this.angle.Text = "270";
//
// tag
//
this.tag.AutoSize = true;
this.tag.Location = new System.Drawing.Point(61, 79);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(13, 13);
this.tag.TabIndex = 7;
this.tag.Text = "0";
//
// position
//
this.position.AutoSize = true;
this.position.Location = new System.Drawing.Point(61, 64);
this.position.Name = "position";
this.position.Size = new System.Drawing.Size(91, 13);
this.position.TabIndex = 6;
this.position.Text = "1024, 1024, 1024";
//
// action
//
this.action.AutoEllipsis = true;
this.action.Location = new System.Drawing.Point(61, 49);
this.action.Name = "action";
this.action.Size = new System.Drawing.Size(210, 14);
this.action.TabIndex = 5;
this.action.Text = "0 - Spawn a Blue Poopie and Ammo";
//
// type
//
this.type.AutoSize = true;
this.type.Location = new System.Drawing.Point(61, 19);
this.type.Name = "type";
this.type.Size = new System.Drawing.Size(96, 13);
this.type.TabIndex = 1;
this.type.Text = "0 - Big Brown Pimp";
//
// spritepanel
//
this.spritepanel.Controls.Add(this.spritename);
this.spritepanel.Controls.Add(this.panel1);
this.spritepanel.Location = new System.Drawing.Point(479, 0);
this.spritepanel.Name = "spritepanel";
this.spritepanel.Size = new System.Drawing.Size(86, 100);
this.spritepanel.TabIndex = 5;
this.spritepanel.TabStop = false;
this.spritepanel.Text = " Sprite ";
//
// spritename
//
this.spritename.Location = new System.Drawing.Point(7, 79);
this.spritename.Name = "spritename";
this.spritename.Size = new System.Drawing.Size(72, 13);
this.spritename.TabIndex = 1;
this.spritename.Text = "BROWNHUG";
this.spritename.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel1.Controls.Add(this.spritetex);
this.panel1.Location = new System.Drawing.Point(12, 14);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(64, 64);
this.panel1.TabIndex = 0;
//
// spritetex
//
this.spritetex.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.Default;
this.spritetex.Dock = System.Windows.Forms.DockStyle.Fill;
this.spritetex.Highlighted = false;
this.spritetex.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
this.spritetex.Location = new System.Drawing.Point(0, 0);
this.spritetex.Name = "spritetex";
this.spritetex.PageUnit = System.Drawing.GraphicsUnit.Pixel;
this.spritetex.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.None;
this.spritetex.Size = new System.Drawing.Size(60, 60);
this.spritetex.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.spritetex.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
this.spritetex.TabIndex = 0;
this.spritetex.TabStop = false;
//
// flagsPanel
//
this.flagsPanel.Controls.Add(this.flags);
this.flagsPanel.Location = new System.Drawing.Point(571, 0);
this.flagsPanel.Name = "flagsPanel";
this.flagsPanel.Size = new System.Drawing.Size(568, 100);
this.flagsPanel.TabIndex = 6;
this.flagsPanel.TabStop = false;
this.flagsPanel.Text = " Flags";
//
// flags
//
this.flags.BackColor = System.Drawing.SystemColors.Control;
this.flags.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.flags.CheckBoxes = true;
this.flags.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.flags.Location = new System.Drawing.Point(6, 18);
this.flags.Name = "flags";
this.flags.Scrollable = false;
this.flags.ShowGroups = false;
this.flags.Size = new System.Drawing.Size(556, 73);
this.flags.TabIndex = 0;
this.flags.UseCompatibleStateImageBehavior = false;
this.flags.View = System.Windows.Forms.View.List;
//
// ThingInfoPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.flagsPanel);
this.Controls.Add(this.spritepanel);
this.Controls.Add(this.infopanel);
this.MaximumSize = new System.Drawing.Size(10000, 100);
this.MinimumSize = new System.Drawing.Size(100, 100);
this.Name = "ThingInfoPanel";
this.Size = new System.Drawing.Size(1145, 100);
this.infopanel.ResumeLayout(false);
this.infopanel.PerformLayout();
this.spritepanel.ResumeLayout(false);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.spritetex)).EndInit();
this.flagsPanel.ResumeLayout(false);
this.ResumeLayout(false);
System.Windows.Forms.Label label5;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label label3;
System.Windows.Forms.Label label1;
this.labelaction = new System.Windows.Forms.Label();
this.infopanel = new System.Windows.Forms.GroupBox();
this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();
this.classname = new System.Windows.Forms.Label();
this.labelclass = new System.Windows.Forms.Label();
this.parameter = new System.Windows.Forms.Label();
this.labelparameter = new System.Windows.Forms.Label();
this.arg5 = new System.Windows.Forms.Label();
this.arglbl5 = new System.Windows.Forms.Label();
this.arglbl4 = new System.Windows.Forms.Label();
this.arg4 = new System.Windows.Forms.Label();
this.arglbl3 = new System.Windows.Forms.Label();
this.arglbl2 = new System.Windows.Forms.Label();
this.arg3 = new System.Windows.Forms.Label();
this.arglbl1 = new System.Windows.Forms.Label();
this.arg2 = new System.Windows.Forms.Label();
this.arg1 = new System.Windows.Forms.Label();
this.angle = new System.Windows.Forms.Label();
this.tag = new System.Windows.Forms.Label();
this.position = new System.Windows.Forms.Label();
this.action = new System.Windows.Forms.Label();
this.type = new System.Windows.Forms.Label();
this.spritepanel = new System.Windows.Forms.GroupBox();
this.spritename = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
this.flagsPanel = new System.Windows.Forms.GroupBox();
this.flags = new System.Windows.Forms.ListView();
label5 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
this.infopanel.SuspendLayout();
this.spritepanel.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.spritetex)).BeginInit();
this.flagsPanel.SuspendLayout();
this.SuspendLayout();
//
// label5
//
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(165, 79);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(37, 13);
label5.TabIndex = 8;
label5.Text = "Angle:";
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(31, 79);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(29, 13);
label4.TabIndex = 4;
label4.Text = "Tag:";
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(12, 64);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(47, 13);
label3.TabIndex = 3;
label3.Text = "Position:";
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(25, 19);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(34, 13);
label1.TabIndex = 0;
label1.Text = "Type:";
//
// labelaction
//
this.labelaction.AutoSize = true;
this.labelaction.Location = new System.Drawing.Point(19, 49);
this.labelaction.Name = "labelaction";
this.labelaction.Size = new System.Drawing.Size(40, 13);
this.labelaction.TabIndex = 2;
this.labelaction.Text = "Action:";
//
// infopanel
//
this.infopanel.Controls.Add(this.anglecontrol);
this.infopanel.Controls.Add(this.classname);
this.infopanel.Controls.Add(this.labelclass);
this.infopanel.Controls.Add(this.parameter);
this.infopanel.Controls.Add(this.labelparameter);
this.infopanel.Controls.Add(this.arg5);
this.infopanel.Controls.Add(this.arglbl5);
this.infopanel.Controls.Add(this.arglbl4);
this.infopanel.Controls.Add(this.arg4);
this.infopanel.Controls.Add(this.arglbl3);
this.infopanel.Controls.Add(this.arglbl2);
this.infopanel.Controls.Add(this.arg3);
this.infopanel.Controls.Add(this.arglbl1);
this.infopanel.Controls.Add(this.arg2);
this.infopanel.Controls.Add(this.arg1);
this.infopanel.Controls.Add(this.angle);
this.infopanel.Controls.Add(label5);
this.infopanel.Controls.Add(this.tag);
this.infopanel.Controls.Add(this.position);
this.infopanel.Controls.Add(this.action);
this.infopanel.Controls.Add(label4);
this.infopanel.Controls.Add(label3);
this.infopanel.Controls.Add(this.labelaction);
this.infopanel.Controls.Add(this.type);
this.infopanel.Controls.Add(label1);
this.infopanel.Location = new System.Drawing.Point(0, 0);
this.infopanel.Name = "infopanel";
this.infopanel.Size = new System.Drawing.Size(473, 100);
this.infopanel.TabIndex = 4;
this.infopanel.TabStop = false;
this.infopanel.Text = " Thing ";
//
// anglecontrol
//
this.anglecontrol.Angle = 0;
this.anglecontrol.AngleOffset = 0;
this.anglecontrol.Location = new System.Drawing.Point(235, 73);
this.anglecontrol.Name = "anglecontrol";
this.anglecontrol.Size = new System.Drawing.Size(24, 24);
this.anglecontrol.TabIndex = 38;
//
// classname
//
this.classname.AutoEllipsis = true;
this.classname.Location = new System.Drawing.Point(62, 34);
this.classname.Name = "classname";
this.classname.Size = new System.Drawing.Size(210, 14);
this.classname.TabIndex = 40;
this.classname.Text = "CrazyFlyingShotgunSpawner";
//
// labelclass
//
this.labelclass.AutoSize = true;
this.labelclass.Location = new System.Drawing.Point(24, 34);
this.labelclass.Name = "labelclass";
this.labelclass.Size = new System.Drawing.Size(35, 13);
this.labelclass.TabIndex = 39;
this.labelclass.Text = "Class:";
//
// parameter
//
this.parameter.AutoEllipsis = true;
this.parameter.Location = new System.Drawing.Point(62, 34);
this.parameter.Name = "parameter";
this.parameter.Size = new System.Drawing.Size(210, 14);
this.parameter.TabIndex = 42;
this.parameter.Text = "0";
//
// labelparameter
//
this.labelparameter.AutoSize = true;
this.labelparameter.Location = new System.Drawing.Point(0, 34);
this.labelparameter.Name = "labelparameter";
this.labelparameter.Size = new System.Drawing.Size(58, 13);
this.labelparameter.TabIndex = 41;
this.labelparameter.Text = "Parameter:";
//
// arg5
//
this.arg5.AutoEllipsis = true;
this.arg5.Location = new System.Drawing.Point(384, 79);
this.arg5.Name = "arg5";
this.arg5.Size = new System.Drawing.Size(83, 14);
this.arg5.TabIndex = 37;
this.arg5.Text = "Arg 1:";
//
// arglbl5
//
this.arglbl5.AutoEllipsis = true;
this.arglbl5.BackColor = System.Drawing.Color.Transparent;
this.arglbl5.Location = new System.Drawing.Point(257, 79);
this.arglbl5.Name = "arglbl5";
this.arglbl5.Size = new System.Drawing.Size(121, 14);
this.arglbl5.TabIndex = 32;
this.arglbl5.Text = "Arg 1:";
this.arglbl5.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arglbl4
//
this.arglbl4.AutoEllipsis = true;
this.arglbl4.BackColor = System.Drawing.Color.Transparent;
this.arglbl4.Location = new System.Drawing.Point(257, 64);
this.arglbl4.Name = "arglbl4";
this.arglbl4.Size = new System.Drawing.Size(121, 14);
this.arglbl4.TabIndex = 31;
this.arglbl4.Text = "Arg 1:";
this.arglbl4.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arg4
//
this.arg4.AutoEllipsis = true;
this.arg4.Location = new System.Drawing.Point(384, 64);
this.arg4.Name = "arg4";
this.arg4.Size = new System.Drawing.Size(83, 14);
this.arg4.TabIndex = 36;
this.arg4.Text = "Arg 1:";
//
// arglbl3
//
this.arglbl3.AutoEllipsis = true;
this.arglbl3.BackColor = System.Drawing.Color.Transparent;
this.arglbl3.Location = new System.Drawing.Point(257, 49);
this.arglbl3.Name = "arglbl3";
this.arglbl3.Size = new System.Drawing.Size(121, 14);
this.arglbl3.TabIndex = 30;
this.arglbl3.Text = "Arg 1:";
this.arglbl3.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arglbl2
//
this.arglbl2.AutoEllipsis = true;
this.arglbl2.BackColor = System.Drawing.Color.Transparent;
this.arglbl2.Location = new System.Drawing.Point(257, 34);
this.arglbl2.Name = "arglbl2";
this.arglbl2.Size = new System.Drawing.Size(121, 14);
this.arglbl2.TabIndex = 29;
this.arglbl2.Text = "Arg 1:";
this.arglbl2.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arg3
//
this.arg3.AutoEllipsis = true;
this.arg3.Location = new System.Drawing.Point(384, 49);
this.arg3.Name = "arg3";
this.arg3.Size = new System.Drawing.Size(83, 14);
this.arg3.TabIndex = 35;
this.arg3.Text = "Arg 1:";
//
// arglbl1
//
this.arglbl1.AutoEllipsis = true;
this.arglbl1.BackColor = System.Drawing.Color.Transparent;
this.arglbl1.Location = new System.Drawing.Point(257, 19);
this.arglbl1.Name = "arglbl1";
this.arglbl1.Size = new System.Drawing.Size(121, 14);
this.arglbl1.TabIndex = 28;
this.arglbl1.Text = "Arg 1:";
this.arglbl1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// arg2
//
this.arg2.AutoEllipsis = true;
this.arg2.Location = new System.Drawing.Point(384, 34);
this.arg2.Name = "arg2";
this.arg2.Size = new System.Drawing.Size(83, 14);
this.arg2.TabIndex = 34;
this.arg2.Text = "Arg 1:";
//
// arg1
//
this.arg1.AutoEllipsis = true;
this.arg1.Location = new System.Drawing.Point(384, 19);
this.arg1.Name = "arg1";
this.arg1.Size = new System.Drawing.Size(83, 14);
this.arg1.TabIndex = 33;
this.arg1.Text = "Arg 1:";
//
// angle
//
this.angle.AutoSize = true;
this.angle.Location = new System.Drawing.Point(206, 79);
this.angle.Name = "angle";
this.angle.Size = new System.Drawing.Size(25, 13);
this.angle.TabIndex = 11;
this.angle.Text = "270";
//
// tag
//
this.tag.AutoSize = true;
this.tag.Location = new System.Drawing.Point(62, 79);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(13, 13);
this.tag.TabIndex = 7;
this.tag.Text = "0";
//
// position
//
this.position.AutoSize = true;
this.position.Location = new System.Drawing.Point(62, 64);
this.position.Name = "position";
this.position.Size = new System.Drawing.Size(91, 13);
this.position.TabIndex = 6;
this.position.Text = "1024, 1024, 1024";
//
// action
//
this.action.AutoEllipsis = true;
this.action.Location = new System.Drawing.Point(62, 49);
this.action.Name = "action";
this.action.Size = new System.Drawing.Size(210, 14);
this.action.TabIndex = 5;
this.action.Text = "0 - Spawn a Blue Poopie and Ammo";
//
// type
//
this.type.AutoSize = true;
this.type.Location = new System.Drawing.Point(62, 19);
this.type.Name = "type";
this.type.Size = new System.Drawing.Size(96, 13);
this.type.TabIndex = 1;
this.type.Text = "0 - Big Brown Pimp";
//
// spritepanel
//
this.spritepanel.Controls.Add(this.spritename);
this.spritepanel.Controls.Add(this.panel1);
this.spritepanel.Location = new System.Drawing.Point(479, 0);
this.spritepanel.Name = "spritepanel";
this.spritepanel.Size = new System.Drawing.Size(86, 100);
this.spritepanel.TabIndex = 5;
this.spritepanel.TabStop = false;
this.spritepanel.Text = " Sprite ";
//
// spritename
//
this.spritename.Location = new System.Drawing.Point(7, 79);
this.spritename.Name = "spritename";
this.spritename.Size = new System.Drawing.Size(72, 13);
this.spritename.TabIndex = 1;
this.spritename.Text = "BROWNHUG";
this.spritename.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel1.Controls.Add(this.spritetex);
this.panel1.Location = new System.Drawing.Point(12, 14);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(64, 64);
this.panel1.TabIndex = 0;
//
// spritetex
//
this.spritetex.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.Default;
this.spritetex.Dock = System.Windows.Forms.DockStyle.Fill;
this.spritetex.Highlighted = false;
this.spritetex.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
this.spritetex.Location = new System.Drawing.Point(0, 0);
this.spritetex.Name = "spritetex";
this.spritetex.PageUnit = System.Drawing.GraphicsUnit.Pixel;
this.spritetex.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.None;
this.spritetex.Size = new System.Drawing.Size(60, 60);
this.spritetex.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.spritetex.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
this.spritetex.TabIndex = 0;
this.spritetex.TabStop = false;
//
// flagsPanel
//
this.flagsPanel.Controls.Add(this.flags);
this.flagsPanel.Location = new System.Drawing.Point(571, 0);
this.flagsPanel.Name = "flagsPanel";
this.flagsPanel.Size = new System.Drawing.Size(568, 100);
this.flagsPanel.TabIndex = 6;
this.flagsPanel.TabStop = false;
this.flagsPanel.Text = " Flags";
//
// flags
//
this.flags.BackColor = System.Drawing.SystemColors.Control;
this.flags.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.flags.CheckBoxes = true;
this.flags.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.flags.Location = new System.Drawing.Point(6, 18);
this.flags.Name = "flags";
this.flags.Scrollable = false;
this.flags.ShowGroups = false;
this.flags.Size = new System.Drawing.Size(556, 73);
this.flags.TabIndex = 0;
this.flags.UseCompatibleStateImageBehavior = false;
this.flags.View = System.Windows.Forms.View.List;
//
// ThingInfoPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.flagsPanel);
this.Controls.Add(this.spritepanel);
this.Controls.Add(this.infopanel);
this.MaximumSize = new System.Drawing.Size(10000, 100);
this.MinimumSize = new System.Drawing.Size(100, 100);
this.Name = "ThingInfoPanel";
this.Size = new System.Drawing.Size(1145, 100);
this.infopanel.ResumeLayout(false);
this.infopanel.PerformLayout();
this.spritepanel.ResumeLayout(false);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.spritetex)).EndInit();
this.flagsPanel.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -439,6 +461,8 @@ namespace CodeImp.DoomBuilder.Controls
private ConfigurablePictureBox spritetex;
private System.Windows.Forms.Label classname;
private System.Windows.Forms.Label labelclass;
private System.Windows.Forms.Label parameter;
private System.Windows.Forms.Label labelparameter;
}
}
}

View file

@ -73,7 +73,7 @@ namespace CodeImp.DoomBuilder.Controls
flagsPanel.Left = spritepanel.Left + spritepanel.Width + spritepanel.Margin.Right + flagsPanel.Margin.Left; //mxd
// Lookup thing info
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
// Get thing action information
LinedefActionInfo act;
@ -100,13 +100,20 @@ namespace CodeImp.DoomBuilder.Controls
// Thing info
infopanel.Text = " Thing " + t.Index + " ";
type.Text = t.Type + " - " + ti.Title;
type.Text = t.SRB2Type + " - " + ti.Title;
if(ti.IsObsolete) type.Text += " - OBSOLETE"; //mxd
action.Text = actioninfo;
bool displayclassname = !string.IsNullOrEmpty(ti.ClassName) && !ti.ClassName.StartsWith("$"); //mxd
labelclass.Visible = !General.Map.SRB2;
classname.Visible = !General.Map.SRB2;
labelparameter.Enabled = General.Map.SRB2;
parameter.Enabled = General.Map.SRB2;
labelparameter.Visible = General.Map.SRB2;
parameter.Visible = General.Map.SRB2;
bool displayclassname = !General.Map.SRB2 && !string.IsNullOrEmpty(ti.ClassName) && !ti.ClassName.StartsWith("$"); //mxd
labelclass.Enabled = displayclassname; //mxd
classname.Enabled = displayclassname; //mxd
classname.Text = (displayclassname ? ti.ClassName : "--"); //mxd
parameter.Text = t.Parameter.ToString(CultureInfo.InvariantCulture);
position.Text = t.Position.x.ToString(CultureInfo.InvariantCulture) + ", " + t.Position.y.ToString(CultureInfo.InvariantCulture) + ", " + zinfo;
tag.Text = t.Tag + (General.Map.Options.TagLabels.ContainsKey(t.Tag) ? " - " + General.Map.Options.TagLabels[t.Tag] : string.Empty);
angle.Text = t.AngleDoom + "\u00B0";

View file

@ -667,7 +667,7 @@ namespace CodeImp.DoomBuilder.Editing
foreach(Thing t in General.Map.Map.Things)
{
if(t.Type == 1)
if(t.SRB2Type == 1)
{
//store thing and position
if(start == null)

View file

@ -361,10 +361,10 @@ namespace CodeImp.DoomBuilder.Editing
bool qualifies = true;
// Get thing info
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
// Check against simple properties
qualifies &= (thingtype == -1) || (t.Type == thingtype);
qualifies &= (thingtype == -1) || (t.SRB2Type == thingtype);
qualifies &= (thingangle == -1) || (Angle2D.RealToDoom(t.Angle) == thingangle);
qualifies &= (thingzheight == int.MinValue) || ((int)(t.Position.z) == thingzheight);
qualifies &= (thingaction == -1) || (t.Action == thingaction);

View file

@ -85,7 +85,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
// Process oh so special things
foreach(Thing t in things)
{
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(info == null) continue;
switch(info.ClassName.ToLowerInvariant())
{
@ -124,7 +124,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
// We may need all of these actors...
foreach(Thing t in General.Map.ThingsFilter.VisibleThings)
{
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(info == null) continue;
switch(info.ClassName.ToLowerInvariant())
{

View file

@ -20,7 +20,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
public ThingCopyData(Thing t)
{
type = t.Type;
type = t.FullType;
angledoom = t.AngleDoom;
pos = t.Position;
flags = new Dictionary<string, bool>(t.Flags);
@ -32,7 +32,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data
public void ApplyTo(Thing t)
{
t.Type = type;
t.FullType = type;
t.Rotate(angledoom);
t.Move(pos);

View file

@ -47,15 +47,15 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
foreach(Thing t in General.Map.Map.Things)
{
if(thingcounts.ContainsKey(t.Type))
if(thingcounts.ContainsKey(t.SRB2Type))
{
thingcounts[t.Type]++;
thingcounts[t.SRB2Type]++;
}
else
{
thingcounts.Add(t.Type, 1);
thingtitles.Add(t.Type, "Unknown thing");
thingclasses.Add(t.Type, "-");
thingcounts.Add(t.SRB2Type, 1);
thingtitles.Add(t.SRB2Type, "Unknown thing");
thingclasses.Add(t.SRB2Type, "-");
}
}
@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
{
List<Thing> list = new List<Thing>();
foreach(Thing t in General.Map.Map.Things)
if(t.Type == type) list.Add(t);
if(t.SRB2Type == type) list.Add(t);
return list;
}

View file

@ -654,7 +654,7 @@ namespace CodeImp.DoomBuilder
// Remove all flags from all 3D Start things
foreach (Thing t in outputset.Things)
{
if (t.Type == config.Start3DModeThingType)
if (t.SRB2Type == config.Start3DModeThingType)
{
// We're not using SetFlag here, this doesn't have to be undone.
// Please note that this is totally exceptional!

View file

@ -2050,7 +2050,7 @@ namespace CodeImp.DoomBuilder.Geometry
// Checks if there's a wall at appropriate height to align thing to
private static bool CanAlignThingTo(Thing t, Sector front, Sector back)
{
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
int absz = GetThingAbsoluteZ(t, ti);
int height = ti.Height == 0 ? 1 : (int)ti.Height;
Rectangle thing = new Rectangle(0, t.IsFlipped ? absz - height : absz, 1, height);
@ -2073,7 +2073,7 @@ namespace CodeImp.DoomBuilder.Geometry
// Checks if there's a wall at appropriate height to align thing to
private static bool CanAlignThingTo(Thing t, Sector sector)
{
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
int absz = GetThingAbsoluteZ(t, ti);
Rectangle thing = new Rectangle(0, absz, 1, ti.Height == 0 ? 1 : (int)ti.Height);
@ -2101,7 +2101,7 @@ namespace CodeImp.DoomBuilder.Geometry
//keep thing height constant
if(initialSector != t.Sector && General.Map.FormatInterface.HasThingHeight)
{
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
if(ti.AbsoluteZ) return;
if(t.IsFlipped && initialSector.CeilHeight != t.Sector.CeilHeight)
@ -2136,7 +2136,7 @@ namespace CodeImp.DoomBuilder.Geometry
const int linealpha = 128;
foreach (Thing t in General.Map.Map.Things)
{
int lightid = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Type);
int lightid = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.SRB2Type);
if(lightid == -1) continue;
// TODO: this basically duplicates VisualThing.UpdateLight()...
@ -2150,7 +2150,7 @@ namespace CodeImp.DoomBuilder.Geometry
if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[0]) n = 0;
else if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1]) n = 10;
else n = 20;
DynamicLightType lightType = (DynamicLightType)(t.Type - 9800 - n);
DynamicLightType lightType = (DynamicLightType)(t.SRB2Type - 9800 - n);
if(lightType == DynamicLightType.SECTOR)
{
@ -2175,7 +2175,7 @@ namespace CodeImp.DoomBuilder.Geometry
// Determine light color
PixelColor color;
switch(t.Type)
switch(t.SRB2Type)
{
case 1502: // Vavoom light
color = new PixelColor(linealpha, 255, 255, 255);

View file

@ -242,7 +242,7 @@ namespace CodeImp.DoomBuilder.IO
writer.Write(t.Roll); //mxd
writer.Write(t.ScaleX); //mxd
writer.Write(t.ScaleY); //mxd
writer.Write(t.Type);
writer.Write(t.FullType);
writer.Write(t.Action);
for(int i = 0; i < t.Args.Length; i++) writer.Write(t.Args[i]);

View file

@ -421,7 +421,7 @@ namespace CodeImp.DoomBuilder.IO
writer.Write((Int16)t.Position.x);
writer.Write((Int16)t.Position.y);
writer.Write((Int16)t.AngleDoom);
writer.Write((UInt16)t.Type);
writer.Write((UInt16)t.FullType);
writer.Write((UInt16)t.GetFlagsValue());
}

View file

@ -448,7 +448,7 @@ namespace CodeImp.DoomBuilder.IO
writer.Write((Int16)t.Position.y);
writer.Write((Int16)t.Position.z);
writer.Write((Int16)t.AngleDoom);
writer.Write((UInt16)t.Type);
writer.Write((UInt16)t.FullType);
writer.Write((UInt16)flags);
writer.Write((Byte)t.Action);
writer.Write((Byte)t.Args[0]);

View file

@ -340,7 +340,7 @@ namespace CodeImp.DoomBuilder.IO
if(t.Roll != 0) coll.Add("roll", t.Roll); //mxd
if(t.ScaleX != 0 && t.ScaleX != 1.0f) coll.Add("scalex", t.ScaleX); //mxd
if(t.ScaleY != 0 && t.ScaleY != 1.0f) coll.Add("scaley", t.ScaleY); //mxd
coll.Add("type", t.Type);
coll.Add("type", t.FullType);
if(t.Action != 0) coll.Add("special", t.Action);
if(t.Args[0] != 0) coll.Add("arg0", t.Args[0]);
if(t.Args[1] != 0) coll.Add("arg1", t.Args[1]);

View file

@ -96,8 +96,10 @@ namespace CodeImp.DoomBuilder.Map
#region ================== Properties
public MapSet Map { get { return map; } }
public int Type { get { return type; } set { BeforePropsChange(); type = value; } } //mxd
public Vector3D Position { get { return pos; } }
public int FullType { get { return type; } set { BeforePropsChange(); type = value; } } //mxd
public int SRB2Type { get { if (General.Map.SRB2) return type % 4096; else return type; } set { BeforePropsChange(); if (General.Map.SRB2) type = (type / 4096) * 4096 + value; else type = value; } }
public int Parameter { get { if (General.Map.SRB2) return type / 4096; else return 0; } set { BeforePropsChange(); if (General.Map.SRB2) type = value * 4096 + (type % 4096); } }
public Vector3D Position { get { return pos; } }
public float ScaleX { get { return scaleX; } } //mxd. This is UDMF property, not actual scale!
public float ScaleY { get { return scaleY; } } //mxd. This is UDMF property, not actual scale!
public int Pitch { get { return pitch; } } //mxd
@ -119,17 +121,17 @@ namespace CodeImp.DoomBuilder.Map
public bool IsModel { get { return ismodel; } } //mxd
public bool IsDirectional { get { return directional; } } //mxd
public bool Highlighted { get { return highlighted; } set { highlighted = value; } } //mxd
public bool IsSlopeVertex { get { return General.Map.FormatInterface.SlopeVertexType == this.Type; } }
public bool IsSlopeVertex { get { return General.Map.FormatInterface.SlopeVertexType == this.SRB2Type; } }
public bool IsFlipped
{
get
{
ThingTypeInfo ti = General.Map.Data.GetThingInfo(Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(SRB2Type);
return ti.Hangs ^ IsReverse;
}
}
public bool IsReverse { get { return General.Map.SRB2 && !Unflippable && IsFlagSet("2"); } }
public bool Unflippable { get { return General.Map.Data.GetThingInfo(Type).IsUnflippable; } }
public bool Unflippable { get { return General.Map.Data.GetThingInfo(SRB2Type).IsUnflippable; } }
#endregion
#region ================== Constructor / Disposer
@ -404,7 +406,7 @@ namespace CodeImp.DoomBuilder.Map
// Change position
this.pos = newpos;
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -417,7 +419,7 @@ namespace CodeImp.DoomBuilder.Map
// Change position
this.pos = new Vector3D(newpos.x, newpos.y, pos.z);
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -430,7 +432,7 @@ namespace CodeImp.DoomBuilder.Map
// Change position
this.pos = new Vector3D(x, y, zoffset);
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -443,7 +445,7 @@ namespace CodeImp.DoomBuilder.Map
this.anglerad = newangle;
this.angledoom = Angle2D.RealToDoom(newangle);
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -456,7 +458,7 @@ namespace CodeImp.DoomBuilder.Map
anglerad = Angle2D.DoomToReal(newangle);
angledoom = newangle;
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -466,9 +468,9 @@ namespace CodeImp.DoomBuilder.Map
BeforePropsChange();
pitch = General.ClampAngle(newpitch);
pitchrad = ((ismodel && General.Map.Data.ModeldefEntries[type].InheritActorPitch) ? Angle2D.DegToRad(pitch) : 0);
pitchrad = ((ismodel && General.Map.Data.ModeldefEntries[SRB2Type].InheritActorPitch) ? Angle2D.DegToRad(pitch) : 0);
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -478,9 +480,9 @@ namespace CodeImp.DoomBuilder.Map
BeforePropsChange();
roll = General.ClampAngle(newroll);
rollrad = ( (rollsprite || (ismodel && General.Map.Data.ModeldefEntries[type].InheritActorRoll)) ? Angle2D.DegToRad(roll) : 0);
rollrad = ( (rollsprite || (ismodel && General.Map.Data.ModeldefEntries[SRB2Type].InheritActorRoll)) ? Angle2D.DegToRad(roll) : 0);
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -492,7 +494,7 @@ namespace CodeImp.DoomBuilder.Map
scaleX = scalex;
scaleY = scaley;
if(type != General.Map.Config.Start3DModeThingType)
if(SRB2Type != General.Map.Config.Start3DModeThingType)
General.Map.IsChanged = true;
}
@ -523,7 +525,7 @@ namespace CodeImp.DoomBuilder.Map
public void UpdateConfiguration()
{
// Lookup settings
ThingTypeInfo ti = General.Map.Data.GetThingInfo(type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(SRB2Type);
// Apply size
size = ti.Radius;
@ -567,14 +569,14 @@ namespace CodeImp.DoomBuilder.Map
return;
}
ismodel = General.Map.Data.ModeldefEntries.ContainsKey(type);
if(ismodel && General.Map.Data.ModeldefEntries[type].LoadState == ModelLoadState.None)
ismodel = General.Map.Data.ProcessModel(type);
ismodel = General.Map.Data.ModeldefEntries.ContainsKey(SRB2Type);
if(ismodel && General.Map.Data.ModeldefEntries[SRB2Type].LoadState == ModelLoadState.None)
ismodel = General.Map.Data.ProcessModel(SRB2Type);
if(ismodel)
{
rollrad = (General.Map.Data.ModeldefEntries[type].InheritActorRoll ? Angle2D.DegToRad(roll) : 0);
pitchrad = (General.Map.Data.ModeldefEntries[type].InheritActorPitch ? Angle2D.DegToRad(pitch) : 0);
rollrad = (General.Map.Data.ModeldefEntries[SRB2Type].InheritActorRoll ? Angle2D.DegToRad(roll) : 0);
pitchrad = (General.Map.Data.ModeldefEntries[SRB2Type].InheritActorPitch ? Angle2D.DegToRad(pitch) : 0);
}
else if(rollsprite)
{

View file

@ -568,11 +568,11 @@ namespace CodeImp.DoomBuilder.Rendering
if(t.Selected) return General.Colors.Selection;
//mxd. If thing is light, set it's color to light color:
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Type) != -1)
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.SRB2Type) != -1)
{
if(t.Type == 1502) //vavoom light
if(t.SRB2Type == 1502) //vavoom light
return new PixelColor(255, 255, 255, 255);
if(t.Type == 1503) //vavoom colored light
if(t.SRB2Type == 1503) //vavoom colored light
return new PixelColor(255, (byte)t.Args[1], (byte)t.Args[2], (byte)t.Args[3]);
return new PixelColor(255, (byte)t.Args[0], (byte)t.Args[1], (byte)t.Args[2]);
}
@ -1161,8 +1161,8 @@ namespace CodeImp.DoomBuilder.Rendering
//collect models
if(t.IsModel)
{
if(!modelsByType.ContainsKey(t.Type)) modelsByType.Add(t.Type, new List<Thing>());
modelsByType[t.Type].Add(t);
if(!modelsByType.ContainsKey(t.SRB2Type)) modelsByType.Add(t.SRB2Type, new List<Thing>());
modelsByType[t.SRB2Type].Add(t);
}
// Create vertices
@ -1172,8 +1172,8 @@ namespace CodeImp.DoomBuilder.Rendering
buffercount++;
//mxd
if(!thingsByType.ContainsKey(t.Type)) thingsByType.Add(t.Type, new List<Thing>());
thingsByType[t.Type].Add(t);
if(!thingsByType.ContainsKey(t.SRB2Type)) thingsByType.Add(t.SRB2Type, new List<Thing>());
thingsByType[t.SRB2Type].Add(t);
}
totalcount++;
@ -1396,7 +1396,7 @@ namespace CodeImp.DoomBuilder.Rendering
Matrix modelscale = Matrix.Scaling(sx, sx, sy);
Matrix rotation = Matrix.RotationY(-t.RollRad) * Matrix.RotationX(-t.PitchRad) * Matrix.RotationZ(t.Angle);
Matrix position = Matrix.Translation(screenpos.x, screenpos.y, 0.0f);
Matrix world = General.Map.Data.ModeldefEntries[t.Type].Transform * modelscale * rotation * viewscale * position;
Matrix world = General.Map.Data.ModeldefEntries[t.SRB2Type].Transform * modelscale * rotation * viewscale * position;
graphics.Shaders.Things2D.SetTransformSettings(world);
graphics.Shaders.Things2D.ApplySettings();
@ -1439,12 +1439,12 @@ namespace CodeImp.DoomBuilder.Rendering
foreach (Thing t in things)
{
int type = t.Type % 4096;
int type = t.SRB2Type;
if (type == General.Map.FormatInterface.AxisType) axes.Add(t);
if (type == General.Map.FormatInterface.AxisTransferLineType) axistransferlines.Add(t);
}
//Sort by axis number and mare number.
axistransferlines.Sort((x, y) => (x.GetFlagsValue() | (x.Type / 4096)<<16).CompareTo((y.GetFlagsValue() | (y.Type / 4096) << 16)));
axistransferlines.Sort((x, y) => (x.GetFlagsValue() | (x.Parameter)<<16).CompareTo((y.GetFlagsValue() | (y.Parameter) << 16)));
//Render axis transfer lines.
int i = 0;
@ -1456,7 +1456,7 @@ namespace CodeImp.DoomBuilder.Rendering
if (iNext < size && axistransferlines[iNext].GetFlagsValue() == axistransferlines[i].GetFlagsValue() + 1)
{
int mare = axistransferlines[i].Type / 4096;
int mare = axistransferlines[i].Parameter;
RenderLine((Vector2D)axistransferlines[i].Position, (Vector2D)axistransferlines[iNext].Position, 1f, General.Colors.GetNiGHTSColor(mare), true);
/* Start looking for partners for the one beyond iNext. */
i = iNext + 1;
@ -1470,7 +1470,7 @@ namespace CodeImp.DoomBuilder.Rendering
//Render axes.
foreach (Thing axis in axes)
{
int mare = axis.Type / 4096;
int mare = axis.Parameter;
RenderCircle((Vector2D)axis.Position, (float)(axis.AngleDoom & 0x3FFF), 1f, General.Colors.GetNiGHTSColor(mare), true);
}
}

View file

@ -855,7 +855,7 @@ namespace CodeImp.DoomBuilder.Rendering
//mxd. If current thing is light - set it's color to light color
Color4 litcolor;
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness)
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1 && !fullbrightness)
{
wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor
litcolor = t.LightColor;
@ -1164,7 +1164,7 @@ namespace CodeImp.DoomBuilder.Rendering
//mxd. If current thing is light - set it's color to light color
Color4 litcolor;
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1 && !fullbrightness)
if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1 && !fullbrightness)
{
wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor
litcolor = t.LightColor;
@ -1430,7 +1430,7 @@ namespace CodeImp.DoomBuilder.Rendering
Matrix modelscale = Matrix.Scaling(sx, sx, sy);
Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(-t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle);
world = General.Map.Data.ModeldefEntries[t.Thing.Type].Transform * modelscale * modelrotation * t.Position;
world = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Transform * modelscale * modelrotation * t.Position;
ApplyMatrices3D();
//mxd. set variables for fog rendering
@ -1531,7 +1531,7 @@ namespace CodeImp.DoomBuilder.Rendering
Matrix modelscale = Matrix.Scaling(sx, sx, sy);
Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(-t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle);
world = General.Map.Data.ModeldefEntries[t.Thing.Type].Transform * modelscale * modelrotation * t.Position;
world = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Transform * modelscale * modelrotation * t.Position;
ApplyMatrices3D();
//mxd. set variables for fog rendering
@ -1543,7 +1543,7 @@ namespace CodeImp.DoomBuilder.Rendering
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, fogfactor);
}
GZModel model = General.Map.Data.ModeldefEntries[t.Thing.Type].Model;
GZModel model = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Model;
for(int i = 0; i < model.Meshes.Count; i++)
{
graphics.Shaders.World3D.Texture1 = model.Textures[i];
@ -1617,7 +1617,7 @@ namespace CodeImp.DoomBuilder.Rendering
foreach(VisualThing lt in lightthings)
{
// Don't light self
if(General.Map.Data.GldefsEntries.ContainsKey(t.Thing.Type) && General.Map.Data.GldefsEntries[t.Thing.Type].DontLightSelf && t.Thing.Index == lt.Thing.Index)
if(General.Map.Data.GldefsEntries.ContainsKey(t.Thing.SRB2Type) && General.Map.Data.GldefsEntries[t.Thing.SRB2Type].DontLightSelf && t.Thing.Index == lt.Thing.Index)
continue;
float distSquared = Vector3.DistanceSquared(lt.Center, t.PositionV3);
@ -1728,7 +1728,7 @@ namespace CodeImp.DoomBuilder.Rendering
{
case RenderPass.Mask:
case RenderPass.Solid:
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.Type];
ModelData mde = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type];
if(!maskedmodelthings.ContainsKey(mde)) maskedmodelthings.Add(mde, new List<VisualThing>());
maskedmodelthings[mde].Add(t);
break;

View file

@ -105,7 +105,7 @@ namespace CodeImp.DoomBuilder.VisualModes
// Find a 3D Mode thing
foreach(Thing t in General.Map.Map.Things)
{
if(t.Type == General.Map.Config.Start3DModeThingType)
if(t.SRB2Type == General.Map.Config.Start3DModeThingType)
{
modething = t;
break; //mxd
@ -147,7 +147,7 @@ namespace CodeImp.DoomBuilder.VisualModes
// Find a 3D Mode thing
foreach(Thing t in General.Map.Map.Things)
{
if(t.Type == General.Map.Config.Start3DModeThingType)
if(t.SRB2Type == General.Map.Config.Start3DModeThingType)
{
modething = t;
break; //mxd

View file

@ -283,7 +283,7 @@ namespace CodeImp.DoomBuilder.VisualModes
Thing start = null;
foreach(Thing t in General.Map.Map.Things)
{
if(t.Type == 1)
if(t.SRB2Type == 1)
{
//store thing and position
start = t;

View file

@ -503,7 +503,7 @@ namespace CodeImp.DoomBuilder.VisualModes
protected void CheckLightState()
{
//mxd. Check if thing is light
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.Type);
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.SRB2Type);
if(light_id != -1)
{
isGldefsLight = false;
@ -512,7 +512,7 @@ namespace CodeImp.DoomBuilder.VisualModes
UpdateBoundingBox(lightRadius, lightRadius * 2);
}
//check if we have light from GLDEFS
else if(General.Map.Data.GldefsEntries.ContainsKey(thing.Type))
else if(General.Map.Data.GldefsEntries.ContainsKey(thing.SRB2Type))
{
isGldefsLight = true;
UpdateGldefsLight();
@ -535,7 +535,7 @@ namespace CodeImp.DoomBuilder.VisualModes
//mxd. Used in ColorPicker to update light
public void UpdateLight()
{
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.Type);
int light_id = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, thing.SRB2Type);
if(light_id != -1)
{
UpdateLight(light_id);
@ -570,7 +570,7 @@ namespace CodeImp.DoomBuilder.VisualModes
lightRenderStyle = DynamicLightRenderStyle.NEGATIVE;
lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 3, thing.Args[1] / scaled_intensity / 3, thing.Args[2] / scaled_intensity / 3);
}
lightType = (DynamicLightType)(thing.Type - 9800 - n);
lightType = (DynamicLightType)(thing.SRB2Type - 9800 - n);
if(lightType == DynamicLightType.SECTOR)
{
@ -587,7 +587,7 @@ namespace CodeImp.DoomBuilder.VisualModes
else //it's one of vavoom lights
{
lightRenderStyle = DynamicLightRenderStyle.VAVOOM;
lightType = (DynamicLightType)thing.Type;
lightType = (DynamicLightType)thing.SRB2Type;
if(lightType == DynamicLightType.VAVOOM_COLORED)
lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2, thing.Args[3] / scaled_intensity / 2);
else
@ -601,7 +601,7 @@ namespace CodeImp.DoomBuilder.VisualModes
//mxd
private void UpdateGldefsLight()
{
DynamicLightData light = General.Map.Data.GldefsEntries[thing.Type];
DynamicLightData light = General.Map.Data.GldefsEntries[thing.SRB2Type];
float intensity_mod = General.Settings.GZDynamicLightIntensity;
float scale_mod = General.Settings.GZDynamicLightRadius;

View file

@ -3648,8 +3648,8 @@ namespace CodeImp.DoomBuilder.Windows
if(IsInfoPanelExpanded) thinginfo.ShowInfo(t);
// Show info on collapsed label
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
labelcollapsedinfo.Text = t.Type + " - " + ti.Title;
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
labelcollapsedinfo.Text = t.SRB2Type + " - " + ti.Title;
labelcollapsedinfo.Refresh();
//mxd. let the plugins know

View file

@ -49,7 +49,7 @@ namespace CodeImp.DoomBuilder.Windows
this.actiongroup = new System.Windows.Forms.GroupBox();
this.argscontrol = new CodeImp.DoomBuilder.Controls.ArgumentsControl();
this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton();
this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(true);
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.cbRandomAngle = new System.Windows.Forms.CheckBox();
this.anglecontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl();

View file

@ -187,10 +187,10 @@ namespace CodeImp.DoomBuilder.Windows
Thing ft = General.GetByIndex(things, 0);
// Set type
thingtype.SelectType(ft.Type);
thingtype.SelectType(ft.SRB2Type, ft.Parameter);
// Flags
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(ft.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(ft.SRB2Type);
IDictionary<string, string> newFlags = (ti == null || ti.Flags.Count == 0) ? General.Map.Config.ThingFlags : ti.Flags;
foreach (CheckBox c in flags.Checkboxes)
@ -236,12 +236,12 @@ namespace CodeImp.DoomBuilder.Windows
//mxd. Update sector info
t.DetermineSector();
if (t.Type != ft.Type) allsametype = false;
if (t.SRB2Type != ft.SRB2Type) allsametype = false;
// Type does not match?
ThingTypeInfo info = thingtype.GetSelectedInfo(); //mxd
if(info != null && info.Index != t.Type)
if(info != null && info.Index != t.SRB2Type)
thingtype.ClearSelectedType();
// Flags
@ -628,7 +628,7 @@ namespace CodeImp.DoomBuilder.Windows
foreach(Thing t in things)
{
//Set type
t.Type = thingtype.GetResult(t.Type);
t.FullType = thingtype.GetFullType(t.FullType);
// Update settings
t.UpdateConfiguration();

View file

@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.Windows
Thing ft = General.GetByIndex(things, 0);
// Set type
thingtype.SelectType(ft.Type);
thingtype.SelectType(ft.FullType);
// Flags
foreach(CheckBox c in flags.Checkboxes)
@ -233,7 +233,7 @@ namespace CodeImp.DoomBuilder.Windows
// Type does not match?
ThingTypeInfo info = thingtype.GetSelectedInfo(); //mxd
if(info != null && info.Index != t.Type) thingtype.ClearSelectedType();
if(info != null && info.Index != t.FullType) thingtype.ClearSelectedType();
// Flags
foreach(CheckBox c in flags.Checkboxes)
@ -685,7 +685,7 @@ namespace CodeImp.DoomBuilder.Windows
foreach(Thing t in things)
{
//Set type
t.Type = thingtype.GetResult(t.Type);
t.FullType = thingtype.GetResult(t.FullType);
// Update settings
t.UpdateConfiguration();

View file

@ -238,7 +238,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects
{
Thing t = map.CreateThing();
General.Settings.ApplyDefaultThingSettings(t);
t.Type = VERTEX_HEIGHT_THING_TYPE;
t.SRB2Type = VERTEX_HEIGHT_THING_TYPE;
t.Move(pos);
t.Selected = true;
}

View file

@ -213,7 +213,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in things)
{
//mxd. Do some path reconnecting shenanigans...
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
string targetclass = string.Empty;
int targetarg = -1;
@ -246,7 +246,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(other.Index == t.Index)
continue;
info = General.Map.Data.GetThingInfo(other.Type);
info = General.Map.Data.GetThingInfo(other.SRB2Type);
if(info.ClassName.ToLowerInvariant() == targetclass && other.Args[targetarg] == t.Tag)
{
other.Move(other.Position); //hacky way to call BeforePropsChange()...
@ -300,7 +300,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
List<Thing> things = new List<Thing>(General.Map.Map.Things);
foreach(Thing t in things)
{
if(t.Type == General.Map.Config.Start3DModeThingType)
if(t.SRB2Type == General.Map.Config.Start3DModeThingType)
{
if(thingfound == null)
{
@ -323,7 +323,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
Thing t = General.Map.Map.CreateThing();
if(t != null)
{
t.Type = General.Map.Config.Start3DModeThingType;
t.SRB2Type = General.Map.Config.Start3DModeThingType;
t.Move(mousemappos);
t.UpdateConfiguration();
General.Map.ThingsFilter.Update();

View file

@ -834,7 +834,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
index = 0;
foreach(Thing t in selectedthings)
{
if(!fixedrotationthingtypes.Contains(t.Type)) //mxd. Polyobject Anchors, I hate you!
if(!fixedrotationthingtypes.Contains(t.SRB2Type)) //mxd. Polyobject Anchors, I hate you!
t.Rotate(Angle2D.Normalized(newthingangle[index]));
index++;
}
@ -1126,10 +1126,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
if((t.Position.y + t.Size) > right.y) right.y = t.Position.y + t.Size;
if(!fixedrotationthingtypes.Contains(t.Type)) //mxd
if(!fixedrotationthingtypes.Contains(t.SRB2Type)) //mxd
{
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);
if(tti != null && tti.FixedRotation) fixedrotationthingtypes.Add(t.Type);
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(tti != null && tti.FixedRotation) fixedrotationthingtypes.Add(t.SRB2Type);
}
// Keep original coordinates

View file

@ -255,7 +255,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Check if we can use thing arguments
else if(t.Action == 0)
{
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(ti != null)
{
clearassociations = false;
@ -607,7 +607,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
t.CopyPropertiesTo(clone);
// If the cloned item is an interpolation point or patrol point, then insert the point in the path
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
int nextpointtagargnum = -1;
// Thing type can be changed in MAPINFO DoomEdNums block...
@ -1084,7 +1084,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
excludedLines.Add(l);
if(excludedLines.Count == thingsCount)
{
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.SRB2Type);
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align Thing ¹" + t.Index + " (" + tti.Title + ") to any linedef in a map!");
aligned = true;
}
@ -1140,7 +1140,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
foreach(Thing t in selected)
{
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
if(info == null || info.Category == null || info.Category.Arrow == 0)
continue;
t.Rotate(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI);
@ -1150,7 +1150,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
foreach(Thing t in selected)
{
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
if(info == null || info.Category == null || info.Category.Arrow == 0)
continue;
t.Rotate(Vector2D.GetAngle(mousemappos, t.Position));

View file

@ -38,7 +38,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Go for all things
foreach(Thing t in General.Map.Map.Things)
{
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(info != null && info.IsObsolete)
{
SubmitResult(new ResultObsoleteThing(t, info.ObsoleteMessage));

View file

@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Go for all the things
foreach(Thing t in General.Map.Map.Things)
{
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type);
bool stuck = false;
// Check this thing for getting stuck?
@ -128,7 +128,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(processedthingpairs.ContainsKey(t.Index) && processedthingpairs[t.Index].Contains(ot.Index)) continue;
// Only check of items that can block
if(General.Map.Data.GetThingInfo(ot.Type).Blocking == ThingTypeInfo.THING_BLOCKING_NONE) continue;
if(General.Map.Data.GetThingInfo(ot.SRB2Type).Blocking == ThingTypeInfo.THING_BLOCKING_NONE) continue;
// need to compare the flags
if(FlagsOverlap(t, ot) && ThingsOverlap(t, ot))
@ -196,8 +196,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
Vector3D p1 = t1.Position;
Vector3D p2 = t2.Position;
ThingTypeInfo t1info = General.Map.Data.GetThingInfo(t1.Type);
ThingTypeInfo t2info = General.Map.Data.GetThingInfo(t2.Type);
ThingTypeInfo t1info = General.Map.Data.GetThingInfo(t1.SRB2Type);
ThingTypeInfo t2info = General.Map.Data.GetThingInfo(t2.SRB2Type);
// simple bounding box collision detection
if( p1.x + t1.Size - ALLOWED_STUCK_DISTANCE < p2.x - t2.Size + ALLOWED_STUCK_DISTANCE ||

View file

@ -25,7 +25,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Go for all things
foreach(Thing t in General.Map.Map.Things)
{
if(General.Map.Data.GetThingInfoEx(t.Type) == null) SubmitResult(new ResultUnknownThing(t));
if(General.Map.Data.GetThingInfoEx(t.SRB2Type) == null) SubmitResult(new ResultUnknownThing(t));
// Handle thread interruption
try { Thread.Sleep(0); } catch (ThreadInterruptedException) { return; }

View file

@ -54,7 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") at " + thing.Position.x + ", " + thing.Position.y + " is obsolete.";
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") at " + thing.Position.x + ", " + thing.Position.y + " is obsolete.";
}
// Rendering

View file

@ -69,7 +69,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") is stuck in linedef " + line.Index + " at " + thing.Position.x + ", " + thing.Position.y;
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") is stuck in linedef " + line.Index + " at " + thing.Position.x + ", " + thing.Position.y;
}
// Rendering

View file

@ -78,7 +78,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Thing " + thing1.Index + " (" + General.Map.Data.GetThingInfo(thing1.Type).Title + ") is stuck in thing " + thing2.Index + " (" + General.Map.Data.GetThingInfo(thing2.Type).Title + ") at " + thing1.Position.x + ", " + thing1.Position.y;
return "Thing " + thing1.Index + " (" + General.Map.Data.GetThingInfo(thing1.SRB2Type).Title + ") is stuck in thing " + thing2.Index + " (" + General.Map.Data.GetThingInfo(thing2.SRB2Type).Title + ") at " + thing1.Position.x + ", " + thing1.Position.y;
}
// Rendering

View file

@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") is outside the map at " + thing.Position.x + ", " + thing.Position.y;
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") is outside the map at " + thing.Position.x + ", " + thing.Position.y;
}
// Rendering

View file

@ -51,7 +51,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Thing " + thing.Index + " has unknown type (" + thing.Type + ").";
return "Thing " + thing.Index + " has unknown type (" + thing.SRB2Type + ").";
}
// Rendering

View file

@ -53,7 +53,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.Type).Title + ") is unused. " + details;
return "Thing " + thing.Index + " (" + General.Map.Data.GetThingInfo(thing.SRB2Type).Title + ") is unused. " + details;
}
// Rendering

View file

@ -233,7 +233,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")" + argtext));
}
}

View file

@ -99,7 +99,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(replace) t.Rotate(Angle2D.DoomToReal(replaceangle));
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
}
}

View file

@ -135,7 +135,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
}
}

View file

@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
Thing t = General.Map.Map.GetThingByIndex(index);
if(t != null)
{
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + index + " (" + ti.Title + ")"));
}
}

View file

@ -112,7 +112,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(addthing)
{
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
}
}

View file

@ -95,7 +95,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(replace) t.Tag = replacetag;
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
}
}

View file

@ -112,7 +112,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(addthing)
{
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
}
}

View file

@ -95,17 +95,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in list)
{
// Match?
if(t.Type == findtype)
if(t.SRB2Type == findtype)
{
// Replace
if(replace)
{
t.Type = replacetype;
t.SRB2Type = replacetype;
t.UpdateConfiguration();
}
// Add to list
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")"));
}
}

View file

@ -573,7 +573,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private static float GetAlignedThingZ(BaseVisualMode mode, Thing t, float targtthingheight)
{
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(info != null)
{
if(info.AbsoluteZ && t.IsFlipped) return t.Position.z; // Not sure what to do here...

View file

@ -716,7 +716,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Thing action on this thing?
else if(t.Action == 0)
{
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
if(ti != null)
{
if( ((ti.Args[0].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[0]))) ||

View file

@ -693,7 +693,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public ThingProperties(Thing t) : base(t.Fields, MapElementType.THING)
{
type = t.Type;
type = t.FullType;
angle = t.Angle;
zheight = t.Position.z;
pitch = t.Pitch;
@ -715,7 +715,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Applies selected settings
public void Apply(Thing t, ThingPropertiesCopySettings settings)
{
if(settings.Type) t.Type = type;
if(settings.Type) t.FullType = type;
if(settings.Angle) t.Rotate(angle);
if(settings.ZHeight) t.Move(t.Position.x, t.Position.y, zheight);
if(settings.Pitch) t.SetPitch(pitch);
@ -915,7 +915,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public static bool PropertiesMatch(ThingPropertiesCopySettings flags, Thing source, Thing target)
{
// Built-in properties
if(flags.Type && source.Type != target.Type) return false;
if(flags.Type && source.FullType != target.FullType) return false;
if(flags.Angle && source.AngleDoom != target.AngleDoom) return false;
if(flags.Action && source.Action != target.Action) return false;
if(flags.Arguments)

View file

@ -42,15 +42,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in selection)
{
if(!thingcounts.ContainsKey(t.Type))
if(!thingcounts.ContainsKey(t.SRB2Type))
{
thingcounts.Add(t.Type, 1);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
thingtitles.Add(t.Type, ti.Title);
thingcounts.Add(t.SRB2Type, 1);
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type);
thingtitles.Add(t.SRB2Type, ti.Title);
}
else
{
thingcounts[t.Type]++;
thingcounts[t.SRB2Type]++;
}
}
@ -82,7 +82,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
foreach(Thing t in selection)
{
if(!selectedtypes.Contains(t.Type)) t.Selected = false;
if(!selectedtypes.Contains(t.SRB2Type)) t.Selected = false;
}
//update display

View file

@ -847,7 +847,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if ((Vector2D)t.Position == v.Position)
{
switch (t.Type)
switch (t.SRB2Type)
{
case 1504: slopefloorthings.Add(t); break;
case 1505: slopeceilingthings.Add(t); break;
@ -1148,7 +1148,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Find interesting things (such as sector slopes)
foreach (Thing t in General.Map.Map.Things)
{
switch (t.Type)
switch (t.SRB2Type)
{
// ========== Copy slope ==========
case 9511:
@ -3570,7 +3570,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(excludedLines.Count == thingsCount)
{
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.Type);
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.SRB2Type);
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align Thing ¹" + t.Index + " (" + tti.Title + ") to any linedef in a map!");
aligned = true;
}
@ -3614,10 +3614,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
//set position and angles
Thing t = visualThings[0].Thing;
if((t.Type == 9072 || t.Type == 9073) && t.Args[3] > 0) //AimingCamera or MovingCamera with target?
if((t.SRB2Type == 9072 || t.SRB2Type == 9073) && t.Args[3] > 0) //AimingCamera or MovingCamera with target?
{
//position
if(t.Type == 9072 && (t.Args[0] > 0 || t.Args[1] > 0)) //positon MovingCamera at targeted interpolation point
if(t.SRB2Type == 9072 && (t.Args[0] > 0 || t.Args[1] > 0)) //positon MovingCamera at targeted interpolation point
{
int ipTag = t.Args[0] + (t.Args[1] << 8);
Thing ip = null;
@ -3625,7 +3625,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//find interpolation point
foreach(Thing tgt in General.Map.Map.Things)
{
if(tgt.Tag == ipTag && tgt.Type == 9070)
if(tgt.Tag == ipTag && tgt.SRB2Type == 9070)
{
ip = tgt;
break;
@ -3697,7 +3697,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Map.VisualCamera.AngleZ = pitch ? -delta.GetAngleZ() : Angle2D.PI;
}
}
else if((t.Type == 9025 || t.Type == 9073 || t.Type == 9070) && t.Args[0] != 0) //InterpolationPoint, SecurityCamera or AimingCamera with pitch?
else if((t.SRB2Type == 9025 || t.SRB2Type == 9073 || t.SRB2Type == 9070) && t.Args[0] != 0) //InterpolationPoint, SecurityCamera or AimingCamera with pitch?
{
General.Map.VisualCamera.Position = visualThings[0].CenterV3D; //position at camera
General.Map.VisualCamera.AngleXY = t.Angle - Angle2D.PI;

View file

@ -73,7 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.mode = mode;
// Find thing information
info = General.Map.Data.GetThingInfo(Thing.Type);
info = General.Map.Data.GetThingInfo(Thing.SRB2Type);
//mxd. When true, the thing can be moved below floor/above ceiling
nointeraction = (info.Actor != null && info.Actor.GetFlagValue("nointeraction", false));
@ -363,7 +363,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Determine position
Vector3D pos = Thing.Position;
if(Thing.Type == 9501)
if(Thing.SRB2Type == 9501)
{
if(Thing.Sector != null) //mxd
{
@ -372,7 +372,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
pos.z = sd.Ceiling.sector.CeilHeight + Thing.Position.z;
}
}
else if(Thing.Type == 9500)
else if(Thing.SRB2Type == 9500)
{
if(Thing.Sector != null) //mxd
{
@ -400,7 +400,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
else pos.z = 0;
}
else if (General.Map.SRB2 && Thing.Type == 1705)
else if (General.Map.SRB2 && Thing.SRB2Type == 1705)
{
//Use the flags value instead of the Z position for the Z position. SRB2 is really stupid sometimes.
pos.z = Thing.GetFlagsValue();
@ -515,7 +515,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void Rebuild()
{
// Find thing information
info = General.Map.Data.GetThingInfo(Thing.Type);
info = General.Map.Data.GetThingInfo(Thing.SRB2Type);
//mxd. When true, the thing can be moved below floor/above ceiling
nointeraction = (info.Actor != null && info.Actor.GetFlagValue("nointeraction", false));
@ -797,7 +797,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket))
undoticket = mode.CreateUndo("Change thing height");
if (General.Map.SRB2 && Thing.Type == 1705)
if (General.Map.SRB2 && Thing.SRB2Type == 1705)
{
int newZ = General.Clamp(Thing.GetFlagsValue() + amount,0,0xFFFF);
Thing.SetFlagsValue(newZ);

View file

@ -45,7 +45,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
SectorData sourcesectordata = data.Mode.GetSectorData(sourcesector);
if(!sourcesectordata.Updated) sourcesectordata.Update();
switch(thing.Type)
switch(thing.SRB2Type)
{
case 9510:
data.Floor.plane = sourcesectordata.Floor.plane;

View file

@ -46,7 +46,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(ld != null)
{
if(t.Type == 9500)
if(t.SRB2Type == 9500)
{
// Slope the floor from the linedef to thing
t.DetermineSector(data.Mode.BlockMap);
@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
}
else if(t.Type == 9501)
else if(t.SRB2Type == 9501)
{
// Slope the ceiling from the linedef to thing
t.DetermineSector(data.Mode.BlockMap);

View file

@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
Thing t = thing;
// Floor slope thing
if(t.Type == 9502)
if(t.SRB2Type == 9502)
{
t.DetermineSector(data.Mode.BlockMap);
if(t.Sector != null)
@ -76,7 +76,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
// Ceiling slope thing
else if(t.Type == 9503)
else if(t.SRB2Type == 9503)
{
t.DetermineSector(data.Mode.BlockMap);
if(t.Sector != null)

View file

@ -102,7 +102,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
foreach(VisualThing t in selectedVisualThings)
{
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.Thing.Type) != -1)
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1)
{
selection.Add(t.Thing);
visualSelection.Add(t);
@ -114,7 +114,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
ICollection<Thing> list = General.Map.Map.GetSelectedThings(true);
foreach(Thing t in list)
{
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.Type) != -1)
if(Array.IndexOf(GZGeneral.GZ_LIGHTS, t.SRB2Type) != -1)
selection.Add(t);
}
}
@ -124,9 +124,9 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
//this is called only once
private void SetupSliders(Thing referenceThing)
{
ThingTypeInfo typeInfo = General.Map.Data.GetThingInfoEx(referenceThing.Type);
ThingTypeInfo typeInfo = General.Map.Data.GetThingInfoEx(referenceThing.SRB2Type);
int firstArg = 3;
if(referenceThing.Type == 1502 || referenceThing.Type == 1503)
if(referenceThing.SRB2Type == 1502 || referenceThing.SRB2Type == 1503)
firstArg = 0;
//first slider is always used
@ -134,7 +134,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
colorPickerSlider1.OnValueChanged += OnSliderValueChanged;
//either both of them or none are used
if(Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.Type) != -1)
if(Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.SRB2Type) != -1)
{
showAllControls = true;
colorPickerSlider2.Label = typeInfo.Args[4].Title + ":";
@ -170,13 +170,13 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
//size
int firstArg = 3;
if(referenceThing.Type == 1502 || referenceThing.Type == 1503)
if(referenceThing.SRB2Type == 1502 || referenceThing.SRB2Type == 1503)
firstArg = 0;
lightProps.PrimaryRadius = referenceThing.Args[firstArg];
//either both of them or none are used
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.Type) != -1)
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, referenceThing.SRB2Type) != -1)
{
lightProps.SecondaryRadius = referenceThing.Args[4];
lightProps.Interval = referenceThing.AngleDoom;
@ -216,13 +216,13 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
//update color
if(colorChanged) //need this check to allow relative mode to work properly
{
if(t.Type == 1503) //Vavoom Light Color
if(t.SRB2Type == 1503) //Vavoom Light Color
{
t.Args[1] = lightProps.Red;
t.Args[2] = lightProps.Green;
t.Args[3] = lightProps.Blue;
}
else if(t.Type != 1502) //vavoom light has no color settings
else if(t.SRB2Type != 1502) //vavoom light has no color settings
{
t.Args[0] = lightProps.Red;
t.Args[1] = lightProps.Green;
@ -231,7 +231,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
}
int firstArg = 3;
if(t.Type == 1502 || t.Type == 1503) firstArg = 0;
if(t.SRB2Type == 1502 || t.SRB2Type == 1503) firstArg = 0;
//update radius and intensity
if(RELATIVE_MODE)
@ -241,7 +241,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
t.Args[firstArg] = fixedVal.PrimaryRadius + lightProps.PrimaryRadius;
if(t.Args[firstArg] < 0) t.Args[firstArg] = 0;
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.Type) != -1)
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.SRB2Type) != -1)
{
t.Args[4] = fixedVal.SecondaryRadius + lightProps.SecondaryRadius;
if(t.Args[4] < 0) t.Args[4] = 0;
@ -254,7 +254,7 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
if(lightProps.PrimaryRadius != -1)
t.Args[firstArg] = lightProps.PrimaryRadius;
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.Type) != -1)
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.SRB2Type) != -1)
{
t.Args[4] = lightProps.SecondaryRadius;
t.Rotate(General.ClampAngle(lightProps.Interval));
@ -322,8 +322,8 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
//this is called only once
private static Color GetThingColor(Thing thing)
{
if(thing.Type == 1502) return Color.White; //vavoom light
if(thing.Type == 1503) return Color.FromArgb((byte)thing.Args[1], (byte)thing.Args[2], (byte)thing.Args[3]); //vavoom colored light
if(thing.SRB2Type == 1502) return Color.White; //vavoom light
if(thing.SRB2Type == 1503) return Color.FromArgb((byte)thing.Args[1], (byte)thing.Args[2], (byte)thing.Args[3]); //vavoom colored light
return Color.FromArgb((byte)thing.Args[0], (byte)thing.Args[1], (byte)thing.Args[2]);
}
@ -337,11 +337,11 @@ namespace CodeImp.DoomBuilder.ColorPicker.Windows
Thing t = selection[i];
LightProps lp = new LightProps();
int firstArg = 3;
if(t.Type == 1502 || t.Type == 1503) firstArg = 0;
if(t.SRB2Type == 1502 || t.SRB2Type == 1503) firstArg = 0;
lp.PrimaryRadius = t.Args[firstArg];
//either both of them or none are used
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.Type) != -1)
if(showAllControls && Array.IndexOf(LIGHT_USES_ANGLE_VALUE, t.SRB2Type) != -1)
{
lp.SecondaryRadius = t.Args[4];
lp.Interval = t.AngleDoom;

View file

@ -422,7 +422,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
foreach(Thing thing in General.Map.Map.Things)
{
// SoundEnvironment thing, see http://zdoom.org/wiki/Classes:SoundEnvironment
if(thing.Type != SOUND_ENVIROMNEMT_THING_TYPE) continue;
if(thing.SRB2Type != SOUND_ENVIROMNEMT_THING_TYPE) continue;
if(thing.Sector == null) thing.DetermineSector();
if(thing.Sector != null && sectors.Contains(thing.Sector)) things.Add(thing);
}

View file

@ -515,7 +515,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode
if(t != null)
{
General.Settings.ApplyDefaultThingSettings(t);
t.Type = BuilderPlug.SOUND_ENVIROMNEMT_THING_TYPE;
t.SRB2Type = BuilderPlug.SOUND_ENVIROMNEMT_THING_TYPE;
t.Move(pos);
t.UpdateConfiguration();

View file

@ -259,7 +259,7 @@ namespace CodeImp.DoomBuilder.TagExplorer
foreach(TreeNode node in nodes)
{
NodeInfo nodeInfo = node.Tag as NodeInfo;
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(General.Map.Map.GetThingByIndex(nodeInfo.Index).Type);
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(General.Map.Map.GetThingByIndex(nodeInfo.Index).SRB2Type);
if(tti != null)
{

View file

@ -29,8 +29,8 @@ namespace CodeImp.DoomBuilder.TagExplorer
index = t.Index;
action = t.Action;
tag = t.Tag;
polyobjnumber = ((t.Type > 9299 && t.Type < 9304) ? t.AngleDoom : int.MinValue);
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.Type);
polyobjnumber = ((t.SRB2Type > 9299 && t.SRB2Type < 9304) ? t.AngleDoom : int.MinValue);
ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type);
defaultName = (tti != null ? tti.Title : "Thing");
}