mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
associations coloring now also works for Doom (lines referring to sectors using their own tag)
This commit is contained in:
parent
447ad32c57
commit
2839d82df5
24 changed files with 130 additions and 40 deletions
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = "blocksound";
|
||||
singlesidedflag = "blocking";
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Black plague possesses thee";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Titan / Pope / Archimage";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Bloodbath";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
// See linedefflags
|
||||
soundlinedefflag = 64;
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
// See linedefflags
|
||||
soundlinedefflag = "blocksound";
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Black plague possesses thee";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Titan / Pope / Archimage";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Bloodbath";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -30,6 +30,9 @@ skills
|
|||
5 = "Nightmare!";
|
||||
}
|
||||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = true;
|
||||
|
||||
// Special linedefs
|
||||
soundlinedefflag = 64; // See linedefflags
|
||||
singlesidedflag = 1; // See linedefflags
|
||||
|
|
|
@ -83,46 +83,54 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Often we can get away by simply undrawing the previous
|
||||
// highlight and drawing the new highlight. But if associations
|
||||
// are or were drawn we need to redraw the entire display.
|
||||
|
||||
|
||||
// Previous association highlights something?
|
||||
if((highlighted != null) && (highlighted.Tag > 0)) completeredraw = true;
|
||||
|
||||
|
||||
// Set highlight association
|
||||
if(l != null)
|
||||
highlightasso.Set(l.Tag, UniversalType.LinedefTag);
|
||||
else
|
||||
highlightasso.Set(0, 0);
|
||||
|
||||
// New association highlights something?
|
||||
if((l != null) && (l.Tag > 0)) completeredraw = true;
|
||||
|
||||
|
||||
if(l != null)
|
||||
{
|
||||
// Check if we can find the linedefs action
|
||||
if((l.Action > 0) && General.Map.Config.LinedefActions.ContainsKey(l.Action))
|
||||
action = General.Map.Config.LinedefActions[l.Action];
|
||||
}
|
||||
|
||||
// Determine linedef associations
|
||||
for(int i = 0; i < Linedef.NUM_ARGS; i++)
|
||||
{
|
||||
// Previous association highlights something?
|
||||
if((association[i].type == UniversalType.SectorTag) ||
|
||||
(association[i].type == UniversalType.LinedefTag) ||
|
||||
(association[i].type == UniversalType.ThingTag)) completeredraw = true;
|
||||
|
||||
// Make new association
|
||||
if(action != null)
|
||||
association[i].Set(l.Args[i], action.Args[i].Type);
|
||||
else
|
||||
association[i].Set(0, 0);
|
||||
|
||||
// New association highlights something?
|
||||
if((association[i].type == UniversalType.SectorTag) ||
|
||||
(association[i].type == UniversalType.LinedefTag) ||
|
||||
(association[i].type == UniversalType.ThingTag)) completeredraw = true;
|
||||
}
|
||||
if(l.Tag > 0) completeredraw = true;
|
||||
|
||||
// Use the line tag to highlight sectors (Doom style)
|
||||
if(General.Map.Config.LineTagIndicatesSectors)
|
||||
{
|
||||
association[0].Set(l.Tag, UniversalType.SectorTag);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if we can find the linedefs action
|
||||
if((l.Action > 0) && General.Map.Config.LinedefActions.ContainsKey(l.Action))
|
||||
action = General.Map.Config.LinedefActions[l.Action];
|
||||
|
||||
// Determine linedef associations
|
||||
for(int i = 0; i < Linedef.NUM_ARGS; i++)
|
||||
{
|
||||
// Previous association highlights something?
|
||||
if((association[i].type == UniversalType.SectorTag) ||
|
||||
(association[i].type == UniversalType.LinedefTag) ||
|
||||
(association[i].type == UniversalType.ThingTag)) completeredraw = true;
|
||||
|
||||
// Make new association
|
||||
if(action != null)
|
||||
association[i].Set(l.Args[i], action.Args[i].Type);
|
||||
else
|
||||
association[i].Set(0, 0);
|
||||
|
||||
// New association highlights something?
|
||||
if((association[i].type == UniversalType.SectorTag) ||
|
||||
(association[i].type == UniversalType.LinedefTag) ||
|
||||
(association[i].type == UniversalType.ThingTag)) completeredraw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we're changing associations, then we
|
||||
// need to redraw the entire display
|
||||
if(completeredraw)
|
||||
|
|
|
@ -244,19 +244,35 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
// Tag must be above zero
|
||||
if(asso.tag <= 0) return;
|
||||
|
||||
// Linedefs
|
||||
foreach(Linedef l in General.Map.Map.Linedefs)
|
||||
|
||||
// Doom style referencing to sectors?
|
||||
if(General.Map.Config.LineTagIndicatesSectors && (asso.type == UniversalType.SectorTag))
|
||||
{
|
||||
// Known action on this line?
|
||||
if((l.Action > 0) && General.Map.Config.LinedefActions.ContainsKey(l.Action))
|
||||
// Linedefs
|
||||
foreach(Linedef l in General.Map.Map.Linedefs)
|
||||
{
|
||||
LinedefActionInfo action = General.Map.Config.LinedefActions[l.Action];
|
||||
if((action.Args[0].Type == (int)asso.type) && (l.Args[0] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[1].Type == (int)asso.type) && (l.Args[1] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[2].Type == (int)asso.type) && (l.Args[2] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[3].Type == (int)asso.type) && (l.Args[3] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[4].Type == (int)asso.type) && (l.Args[4] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
// Any action on this line?
|
||||
if(l.Action > 0)
|
||||
{
|
||||
if(l.Tag == asso.tag) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Linedefs
|
||||
foreach(Linedef l in General.Map.Map.Linedefs)
|
||||
{
|
||||
// Known action on this line?
|
||||
if((l.Action > 0) && General.Map.Config.LinedefActions.ContainsKey(l.Action))
|
||||
{
|
||||
LinedefActionInfo action = General.Map.Config.LinedefActions[l.Action];
|
||||
if((action.Args[0].Type == (int)asso.type) && (l.Args[0] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[1].Type == (int)asso.type) && (l.Args[1] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[2].Type == (int)asso.type) && (l.Args[2] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[3].Type == (int)asso.type) && (l.Args[3] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
if((action.Args[4].Type == (int)asso.type) && (l.Args[4] == asso.tag)) renderer.PlotLinedef(l, General.Colors.Indication);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private string makedoortrack;
|
||||
private int makedooraction;
|
||||
private int[] makedoorargs;
|
||||
private bool linetagindicatesectors;
|
||||
|
||||
// Skills
|
||||
private List<SkillInfo> skills;
|
||||
|
@ -137,6 +138,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public string MakeDoorTrack { get { return makedoortrack; } }
|
||||
public int MakeDoorAction { get { return makedooraction; } }
|
||||
public int[] MakeDoorArgs { get { return makedoorargs; } }
|
||||
public bool LineTagIndicatesSectors { get { return linetagindicatesectors ; } }
|
||||
|
||||
// Skills
|
||||
public List<SkillInfo> Skills { get { return skills; } }
|
||||
|
@ -231,6 +233,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
testparameters = cfg.ReadSetting("testparameters", "");
|
||||
makedoortrack = cfg.ReadSetting("makedoortrack", "-");
|
||||
makedooraction = cfg.ReadSetting("makedooraction", 0);
|
||||
linetagindicatesectors = cfg.ReadSetting("linetagindicatesectors", false);
|
||||
for(int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0);
|
||||
|
||||
// Flags have special (invariant culture) conversion
|
||||
|
|
Loading…
Reference in a new issue