Added, Visual mode: added "Toggle Alpha-based Texture Highlighting" action. When enabled, 3d floor textures and middle textures on double-sided lines will be highlighted only when the crosshair points at a non-transparent pixel.

Changed: multi-part sectors are now better preserved after drawing new lines.
Changed, TEXTURES parser: patch loading errors are now ignored for textures with "NullTexture" option.
Changed, Game configurations: changed default door action arguments to better match vanilla ones.
Fixed, Actions: in some cases keyboard shortcuts involving Ctrl/Alt/Shift modifier keys were displayed incorrectly.
Fixed(?): probably fixed inability to save map wad in Slade 3.
Updated ZDoom_ACS.cfg.
Updated ZDoom_DECORATE.cfg.
Updated ZDoom ACC.
This commit is contained in:
MaxED 2016-06-13 23:37:55 +00:00 committed by spherallic
parent 93971a78ca
commit 95985a8894
23 changed files with 150 additions and 75 deletions

1
.gitignore vendored
View file

@ -463,3 +463,4 @@
/Build/D3D9.dll
/Build/D3D8.dll
/UpgradeLog.htm
/UpgradeLog2.htm

View file

@ -1086,3 +1086,17 @@
#define WARPF_USEPTR 0x2000
#define WARPF_COPYVELOCITY 0x4000
#define WARPF_COPYPITCH 0x8000
#define CPXF_ANCESTOR (1 << 0)
#define CPXF_LESSOREQUAL (1 << 1)
#define CPXF_NOZ (1 << 2)
#define CPXF_COUNTDEAD (1 << 3)
#define CPXF_DEADONLY (1 << 4)
#define CPXF_EXACT (1 << 5)
#define CPXF_SETTARGET (1 << 6)
#define CPXF_SETMASTER (1 << 7)
#define CPXF_SETTRACER (1 << 8)
#define CPXF_FARTHEST (1 << 9)
#define CPXF_CLOSEST (1 << 10)
#define CPXF_SETONPTR (1 << 11)
#define CPXF_CHECKSIGHT (1 << 12)

View file

@ -363,8 +363,9 @@ special
-93:GetMaxInventory(2),
-94:SetSectorDamage(2,5),
-95:SetSectorTerrain(3),
-96:SpawnParticle(1,15),
-96:SpawnParticle(1,16),
-97:SetMusicVolume(1),
-98:CheckProximity(3, 6),
// Zandronum's
-100:ResetMap(0),

View file

@ -400,7 +400,7 @@ door
title = "Movement Speed";
type = 11;
enum = "door_speeds";
default = 32;
default = 16;
}
arg2
@ -426,7 +426,7 @@ door
title = "Movement Speed";
type = 11;
enum = "door_speeds";
default = 32;
default = 16;
}
arg2
@ -452,7 +452,7 @@ door
title = "Movement Speed";
type = 11;
enum = "door_speeds";
default = 32;
default = 16;
}
arg2
@ -460,7 +460,7 @@ door
title = "Close Delay";
type = 11;
enum = "reset_tics";
default = 105;
default = 150;
}
arg3
@ -486,7 +486,7 @@ door
title = "Movement Speed";
type = 11;
enum = "door_speeds";
default = 32;
default = 16;
}
arg2
@ -494,7 +494,7 @@ door
title = "Close Delay";
type = 11;
enum = "reset_tics";
default = 105;
default = 150;
}
arg3

View file

@ -675,14 +675,14 @@ zdoom
title = "Animation Speed";
type = 11;
enum = "door_speeds";
default = 32;
default = 16;
}
arg2
{
title = "Close Delay";
type = 11;
enum = "reset_tics";
default = 140;
default = 150;
}
arg3
{

View file

@ -854,6 +854,7 @@ enums
70 = "70: 2 Seconds";
105 = "105: 3 Seconds";
140 = "140: 4 Seconds";
150 = "150: Doom default";
175 = "175: 5 Seconds";
210 = "210: 6 Seconds";
245 = "245: 7 Seconds";

View file

@ -110,6 +110,7 @@ keywords
CheckFont = "bool CheckFont(str fontname)";
CheckInventory = "int CheckInventory(str inventory_item)\nChecks the inventory of the actor who activated the script for the item specified by inventory_item";
CheckPlayerCamera = "int CheckPlayerCamera(int player)";
CheckProximity = "bool CheckProximity(int tid, str classname, float distance[, int count = 1[, int flags = 0[, int pointer = AAPTR_DEFAULT]]])";
CheckSight = "bool CheckSight(int source, int dest, int flags)";
CheckWeapon = "bool CheckWeapon(str weapon)\nChecks if player's active weapon is the weapon with specified class name.";
ClassifyActor = "int ClassifyActor(int tid)";
@ -658,6 +659,19 @@ constants
CLASS_CLERIC;
CLASS_FIGHTER;
CLASS_MAGE;
CPXF_ANCESTOR;
CPXF_LESSOREQUAL;
CPXF_NOZ;
CPXF_COUNTDEAD;
CPXF_DEADONLY;
CPXF_EXACT;
CPXF_SETTARGET;
CPXF_SETMASTER;
CPXF_SETTRACER;
CPXF_FARTHEST;
CPXF_CLOSEST;
CPXF_SETONPTR;
CPXF_CHECKSIGHT;
CR_BLACK;
CR_BLUE;
CR_BRICK;

View file

@ -85,7 +85,7 @@ keywords
A_FaceTarget = "A_FaceTarget[(float angle = 0.0[, float pitch = 270.0])]\nA_FaceTarget([float max_turn = 0.0[, float max_pitch = 270.0[, float ang_offset = 0.0[, float pitch_offset = 0.0[, int flags = 0[, float z_add = 0.0]]]]]])";
A_FaceMaster = "A_FaceMaster[(float angle = 0.0[, float pitch = 270.0])]\nA_FaceMaster([float max_turn = 0.0[, float max_pitch = 270.0[, float ang_offset = 0.0[, float pitch_offset = 0.0[, int flags = 0[, float z_add = 0.0]]]]]])";
A_FastChase = "A_FastChase";
A_KillChildren = "A_KillChildren[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage.";
A_KillChildren = "A_KillChildren[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage.";
A_KillMaster = "A_KillMaster[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage.";
A_KillSiblings = "A_KillSiblings[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage.";
A_KillTarget = "A_KillTarget[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage.";
@ -427,6 +427,8 @@ keywords
GetZAt = "float GetZAt([float x = 0.0[, float y = 0.0[, float angle = 0.0[, int flags = 0[, int pick_pointer = AAPTR_TARGET]]]]])";
GetGibHealth = "int GetGibHealth()";
GetCrouchFactor = "float GetCrouchFactor(int ptr = AAPTR_PLAYER1)";
GetCVar = "int GetCVar(str name)";
GetUserCVar = "int GetUserCVar(int playernum, str name)";
}
properties
@ -1245,6 +1247,7 @@ constants
SMF_PRECISE;
SPF_FORCECLAMP;
SPF_INTERPOLATE;
SPF_NOTIMEFREEZE;
TF_TELEFRAG;
TF_RANDOMDECIDE;
TF_FORCED;

View file

@ -133,15 +133,19 @@ namespace CodeImp.DoomBuilder.Actions
int button = key & ~((int)Keys.Control | (int)Keys.Shift | (int)Keys.Alt);
// When the button is a control key, then remove the control itsself
if((button == (int)Keys.ControlKey) ||
(button == (int)Keys.ShiftKey))
if((button == (int)Keys.ControlKey) || (button == (int)Keys.ShiftKey) || (button == (int)Keys.Alt))
{
ctrl = 0;
key = key & ~((int)Keys.Control | (int)Keys.Shift | (int)Keys.Alt);
}
// Determine control prefix
if(ctrl != 0) ctrlprefix = conv.ConvertToString(key);
//mxd. Determine control prefix
if(ctrl != 0)
{
if((key & (int)Keys.Control) != 0) ctrlprefix += "Ctrl+";
if((key & (int)Keys.Alt) != 0) ctrlprefix += "Alt+";
if((key & (int)Keys.Shift) != 0) ctrlprefix += "Shift+";
}
// Check if button is special
switch(button)

View file

@ -73,7 +73,7 @@
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;PROFILE</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View file

@ -1392,7 +1392,7 @@ namespace CodeImp.DoomBuilder
// Create new, emtpy lump
General.WriteLogLine(lumpname + " is required! Created empty lump.");
target.Insert(lumpname, insertindex, 0);
target.Insert(lumpname, insertindex, 0, false);
}
else
{
@ -1401,6 +1401,8 @@ namespace CodeImp.DoomBuilder
}
}
}
target.WriteHeaders(); //mxd
}
//mxd. This is called on tempwad, which should only have the current map inside it.
@ -1468,11 +1470,13 @@ namespace CodeImp.DoomBuilder
if(!skipping)
{
// Copy lump over!
Lump tgtlump = target.Insert(srclump.Name, target.Lumps.Count, srclump.Length);
Lump tgtlump = target.Insert(srclump.Name, target.Lumps.Count, srclump.Length, false);
srclump.CopyTo(tgtlump);
}
}
target.WriteHeaders(); //mxd
return headerpos;
}
@ -1531,7 +1535,7 @@ namespace CodeImp.DoomBuilder
// Copy the lump to the target
//General.WriteLogLine(srclumpname + " copying as " + tgtlumpname);
Lump lump = source.Lumps[sourceindex];
Lump newlump = target.Insert(tgtlumpname, targetindex, lump.Length);
Lump newlump = target.Insert(tgtlumpname, targetindex, lump.Length, false);
lump.CopyTo(newlump);
//mxd. We still need to increment targetindex...
@ -1548,6 +1552,8 @@ namespace CodeImp.DoomBuilder
}
}
}
target.WriteHeaders(); //mxd
}
}

View file

@ -2177,6 +2177,7 @@ namespace CodeImp.DoomBuilder.Geometry
public static void SplitOuterSectors(IEnumerable<Linedef> drawnlines)
{
Dictionary<Sector, HashSet<Sidedef>> sectorsidesref = new Dictionary<Sector, HashSet<Sidedef>>();
HashSet<Sidedef> drawnsides = new HashSet<Sidedef>();
// Create drawn lines per sector collection
foreach(Linedef l in drawnlines)
@ -2185,12 +2186,14 @@ namespace CodeImp.DoomBuilder.Geometry
{
if(!sectorsidesref.ContainsKey(l.Front.Sector)) sectorsidesref.Add(l.Front.Sector, new HashSet<Sidedef>());
sectorsidesref[l.Front.Sector].Add(l.Front);
drawnsides.Add(l.Front);
}
if(l.Back != null && (l.Back.Sector != null && !SectorWasInvalid(l.Back.Sector)))
{
if(!sectorsidesref.ContainsKey(l.Back.Sector)) sectorsidesref.Add(l.Back.Sector, new HashSet<Sidedef>());
sectorsidesref[l.Back.Sector].Add(l.Back);
drawnsides.Add(l.Back);
}
}
@ -2211,20 +2214,38 @@ namespace CodeImp.DoomBuilder.Geometry
if(side.Sector != group.Key) continue;
// Find drawing interior
List<LinedefSide> sides = FindPotentialSectorAt(side.Line, side.IsFront);
List<LinedefSide> linedefsides = FindPotentialSectorAt(side.Line, side.IsFront);
// Number of potential sides fewer than the sector has?
if(sides != null && sides.Count > 0 && sides.Count < group.Key.Sidedefs.Count)
if(linedefsides != null && linedefsides.Count > 0 && linedefsides.Count < group.Key.Sidedefs.Count)
{
Sector newsector = MakeSector(sides, null, false);
if(newsector != null)
// Collect sidedefs from new sector shape...
HashSet<Sidedef> newsectorsides = new HashSet<Sidedef>();
foreach(LinedefSide ls in linedefsides)
{
newsector.UpdateCache();
group.Key.UpdateCache();
Sidedef s = (ls.Front ? ls.Line.Front : ls.Line.Back);
if(s != null) newsectorsides.Add(s);
}
// Existing sector may've become invalid
SectorWasInvalid(group.Key);
// Make new sector only if one of the remaining sector sides was also drawn...
foreach(Sidedef s in group.Key.Sidedefs)
{
if(newsectorsides.Contains(s)) continue;
if(drawnsides.Contains(s))
{
Sector newsector = MakeSector(linedefsides, null, false);
if(newsector != null)
{
newsector.UpdateCache();
group.Key.UpdateCache();
}
// Existing sector may've become invalid
SectorWasInvalid(group.Key);
break;
}
}
}
}
}

View file

@ -366,7 +366,8 @@ namespace CodeImp.DoomBuilder.IO
#region ================== Lumps
// This creates a new lump in the WAD file
public Lump Insert(string name, int position, int datalength)
public Lump Insert(string name, int position, int datalength) { return Insert(name, position, datalength, true); } //mxd
public Lump Insert(string name, int position, int datalength, bool writeheaders)
{
// We will be adding a lump
numlumps++;
@ -382,7 +383,7 @@ namespace CodeImp.DoomBuilder.IO
lumpsoffset += datalength;
// Write the new headers
WriteHeaders();
if(writeheaders) WriteHeaders();
// Return the new lump
return lump;

View file

@ -341,7 +341,7 @@ namespace CodeImp.DoomBuilder.Map
if(force || ((linedef.Tag == 0) && (linedef.Action == 0) && (sector.Tag == 0) &&
((Other == null) || (Other.sector.Tag == 0))))
{
/*if(!HighRequired())
if(General.Settings.AutoClearSidedefTextures && !HighRequired())
{
BeforePropsChange(); //mxd
changed = true;
@ -349,13 +349,13 @@ namespace CodeImp.DoomBuilder.Map
this.longtexnamehigh = MapSet.EmptyLongName;
General.Map.IsChanged = true;
}
else*/ if(shiftmiddle && this.longtexnamehigh == MapSet.EmptyLongName && HighRequired()) //mxd
else if(shiftmiddle && this.longtexnamehigh == MapSet.EmptyLongName && HighRequired()) //mxd
{
SetTextureHigh(this.texnamemid);
changed = true;
}
/*if(!LowRequired())
if(General.Settings.AutoClearSidedefTextures && !LowRequired())
{
if(!changed) //mxd
{
@ -366,7 +366,7 @@ namespace CodeImp.DoomBuilder.Map
this.longtexnamelow = MapSet.EmptyLongName;
General.Map.IsChanged = true;
}
else*/ if(shiftmiddle && this.longtexnamelow == MapSet.EmptyLongName && LowRequired()) //mxd
else if(shiftmiddle && this.longtexnamelow == MapSet.EmptyLongName && LowRequired()) //mxd
{
SetTextureLow(this.texnamemid);
changed = true;

View file

@ -33,7 +33,6 @@ namespace CodeImp.DoomBuilder.Windows
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label7;
System.Windows.Forms.Label label6;
System.Windows.Forms.Label label5;
System.Windows.Forms.GroupBox groupBox1;
System.Windows.Forms.Label label1;
@ -238,7 +237,6 @@ namespace CodeImp.DoomBuilder.Windows
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.browseScreenshotsFolderDialog = new System.Windows.Forms.FolderBrowserDialog();
label7 = new System.Windows.Forms.Label();
label6 = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label();
groupBox1 = new System.Windows.Forms.GroupBox();
label1 = new System.Windows.Forms.Label();
@ -301,15 +299,6 @@ namespace CodeImp.DoomBuilder.Windows
label7.TabIndex = 7;
label7.Text = "Or select a special input control here:";
//
// label6
//
label6.AutoSize = true;
label6.Location = new System.Drawing.Point(20, 30);
label6.Name = "label6";
label6.Size = new System.Drawing.Size(40, 13);
label6.TabIndex = 2;
label6.Text = "Action:";
//
// label5
//
label5.AutoSize = true;
@ -1556,14 +1545,13 @@ namespace CodeImp.DoomBuilder.Windows
this.actioncontrolpanel.Controls.Add(label7);
this.actioncontrolpanel.Controls.Add(this.actiontitle);
this.actioncontrolpanel.Controls.Add(this.actioncontrolclear);
this.actioncontrolpanel.Controls.Add(label6);
this.actioncontrolpanel.Controls.Add(this.actionkey);
this.actioncontrolpanel.Controls.Add(label5);
this.actioncontrolpanel.Enabled = false;
this.actioncontrolpanel.Location = new System.Drawing.Point(377, 12);
this.actioncontrolpanel.Margin = new System.Windows.Forms.Padding(6);
this.actioncontrolpanel.Name = "actioncontrolpanel";
this.actioncontrolpanel.Size = new System.Drawing.Size(282, 511);
this.actioncontrolpanel.Size = new System.Drawing.Size(296, 511);
this.actioncontrolpanel.TabIndex = 9;
this.actioncontrolpanel.TabStop = false;
this.actioncontrolpanel.Text = " Action control ";
@ -1575,7 +1563,7 @@ namespace CodeImp.DoomBuilder.Windows
this.actiondescription.Multiline = true;
this.actiondescription.Name = "actiondescription";
this.actiondescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.actiondescription.Size = new System.Drawing.Size(256, 72);
this.actiondescription.Size = new System.Drawing.Size(266, 72);
this.actiondescription.TabIndex = 12;
//
// keyusedlist
@ -1587,7 +1575,7 @@ namespace CodeImp.DoomBuilder.Windows
this.keyusedlist.Location = new System.Drawing.Point(23, 307);
this.keyusedlist.Name = "keyusedlist";
this.keyusedlist.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.keyusedlist.Size = new System.Drawing.Size(238, 115);
this.keyusedlist.Size = new System.Drawing.Size(263, 115);
this.keyusedlist.Sorted = true;
this.keyusedlist.TabIndex = 11;
this.keyusedlist.Visible = false;
@ -1596,12 +1584,12 @@ namespace CodeImp.DoomBuilder.Windows
//
this.disregardshiftlabel.Location = new System.Drawing.Point(20, 224);
this.disregardshiftlabel.Name = "disregardshiftlabel";
this.disregardshiftlabel.Size = new System.Drawing.Size(245, 47);
this.disregardshiftlabel.Size = new System.Drawing.Size(266, 47);
this.disregardshiftlabel.TabIndex = 9;
this.disregardshiftlabel.Tag = "The selected actions uses %s to modify its behavior. These modifiers can not be u" +
"sed in a key combination for this action.";
this.disregardshiftlabel.Text = "The selected actions uses Shift, Alt and Control to modify its behavior. These mo" +
"difiers can not be used in a key combination for this action.";
this.disregardshiftlabel.Tag = "The selected action uses %s to modify its behavior. These modifiers can not be us" +
"ed in a key combination for this action.";
this.disregardshiftlabel.Text = "The selected action uses Shift, Alt and Control to modify its behavior. These mod" +
"ifiers can not be used in a key combination for this action.";
this.disregardshiftlabel.Visible = false;
//
// actioncontrol
@ -1611,7 +1599,7 @@ namespace CodeImp.DoomBuilder.Windows
this.actioncontrol.ImeMode = System.Windows.Forms.ImeMode.Off;
this.actioncontrol.Location = new System.Drawing.Point(23, 190);
this.actioncontrol.Name = "actioncontrol";
this.actioncontrol.Size = new System.Drawing.Size(238, 21);
this.actioncontrol.Size = new System.Drawing.Size(196, 21);
this.actioncontrol.TabIndex = 8;
this.actioncontrol.TabStop = false;
this.actioncontrol.SelectedIndexChanged += new System.EventHandler(this.actioncontrol_SelectedIndexChanged);
@ -1620,7 +1608,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.actiontitle.AutoSize = true;
this.actiontitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.actiontitle.Location = new System.Drawing.Point(67, 30);
this.actiontitle.Location = new System.Drawing.Point(17, 29);
this.actiontitle.Name = "actiontitle";
this.actiontitle.Size = new System.Drawing.Size(176, 13);
this.actiontitle.TabIndex = 1;

View file

@ -120,9 +120,6 @@
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>

View file

@ -135,6 +135,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private bool syncSelection; //mxd. Sync selection between Visual and Classic modes.
private bool lockSectorTextureOffsetsWhileDragging; //mxd
private bool syncthingedit; //mxd
private bool alphabasedtexturehighlighting; //mxd
#endregion
@ -191,6 +192,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public bool SyncSelection { get { return syncSelection; } set { syncSelection = value; } } //mxd
public bool LockSectorTextureOffsetsWhileDragging { get { return lockSectorTextureOffsetsWhileDragging; } internal set { lockSectorTextureOffsetsWhileDragging = value; } } //mxd
public bool SyncronizeThingEdit { get { return syncthingedit; } internal set { syncthingedit = value; } } //mxd
public bool AlphaBasedTextureHighlighting { get { return alphabasedtexturehighlighting; } internal set { alphabasedtexturehighlighting = value; } } //mxd
//mxd. "Make Door" action persistent settings
internal MakeDoorSettings MakeDoor;
@ -325,10 +327,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Load settings, which can be changed via UI
private void LoadUISettings()
{
lockSectorTextureOffsetsWhileDragging = General.Settings.ReadPluginSetting("locktextureoffsets", false); //mxd
lockSectorTextureOffsetsWhileDragging = General.Settings.ReadPluginSetting("locktextureoffsets", false);
viewselectionnumbers = General.Settings.ReadPluginSetting("viewselectionnumbers", true);
viewselectioneffects = General.Settings.ReadPluginSetting("viewselectioneffects", true); //mxd
syncthingedit = General.Settings.ReadPluginSetting("syncthingedit", true); //mxd
viewselectioneffects = General.Settings.ReadPluginSetting("viewselectioneffects", true);
syncthingedit = General.Settings.ReadPluginSetting("syncthingedit", true);
alphabasedtexturehighlighting = General.Settings.ReadPluginSetting("alphabasedtexturehighlighting", true);
}
//mxd. Save settings, which can be changed via UI
@ -338,6 +341,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Settings.WritePluginSetting("viewselectionnumbers", viewselectionnumbers);
General.Settings.WritePluginSetting("viewselectioneffects", viewselectioneffects);
General.Settings.WritePluginSetting("syncthingedit", syncthingedit);
General.Settings.WritePluginSetting("alphabasedtexturehighlighting", alphabasedtexturehighlighting);
}
//mxd. These should be reset when changing maps

View file

@ -1343,6 +1343,17 @@ toggleskew
default = 262231;
}
//mxd
alphabasedtexturehighlighting
{
title = "Toggle Alpha-based Texture Highlighting";
category = "visual";
description = "Toggles Alpha-based Texture Highlighting. When enabled, 3d floor textures and middle textures on double-sided lines will be highlighted only when the crosshair points at a non-transparent pixel.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}
placevisualstart
{
title = "Place Visual Mode Camera";

View file

@ -4416,6 +4416,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
UpdateChangedObjects();
}
//mxd
[BeginAction("alphabasedtexturehighlighting")]
public void ToggleAlphaBasedTextureHighlighting()
{
BuilderPlug.Me.AlphaBasedTextureHighlighting = !BuilderPlug.Me.AlphaBasedTextureHighlighting;
General.Interface.DisplayStatus(StatusType.Info, "Alpha-based textures highlighting is " + (BuilderPlug.Me.AlphaBasedTextureHighlighting ? "ENABLED" : "DISABLED"));
}
#endregion
#region ================== Texture Alignment

View file

@ -555,11 +555,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
Sidedef sd = MapSet.NearestSidedef(Sector.Sector.Sidedefs, pickintersect);
float side = sd.Line.SideOfLine(pickintersect);
//mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures
if ((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront))
{
if (!Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked))
return true;
//mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures
if((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront))
{
if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked))
return true;
// Fetch ZDoom fields
float rotate = Angle2D.DegToRad(level.sector.Fields.GetValue("rotationceiling", 0.0f));

View file

@ -509,11 +509,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
Sidedef sd = MapSet.NearestSidedef(Sector.Sector.Sidedefs, pickintersect);
float side = sd.Line.SideOfLine(pickintersect);
//mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures
if ((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront))
{
if (!Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked))
return true;
//mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures
if((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront))
{
if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked))
return true;
// Fetch ZDoom fields
float rotate = Angle2D.DegToRad(level.sector.Fields.GetValue("rotationfloor", 0.0f));

View file

@ -382,10 +382,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
return base.PickFastReject(from, to, dir);
}
//mxd. Alpha based picking
public override bool PickAccurate(Vector3D from, Vector3D to, Vector3D dir, ref float u_ray)
{
if (!Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray);
//mxd. Alpha based picking
public override bool PickAccurate(Vector3D from, Vector3D to, Vector3D dir, ref float u_ray)
{
if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray);
float u;
Sidedef sourceside = extrafloor.Linedef.Front;

View file

@ -399,7 +399,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Alpha based picking
public override bool PickAccurate(Vector3D from, Vector3D to, Vector3D dir, ref float u_ray)
{
if (!Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray);
if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray);
float u;
new Line2D(from, to).GetIntersection(Sidedef.Line.Line, out u);