Fixed: HiRes images should not be used on surfaces with long texture names.

Changed, Draw Lines and Draw Curve modes: "Auto-finish drawing" option now works regardless of "Continuous drawing" option (previously it worked only when the latter was enabled). 
Changed: position and size of the "Errors and Warnings" window is now stored while the editor is running.
Internal: rewritten parts of long texture names support code. It now involves much less special handling.
Updated ZDoom_DECORATE.cfg (A_QuakeEx, A_CheckBlock).
Updated ZDoom_ACS.cfg (QuakeEx).
Updated ZDoom ACC (QuakeEx).
This commit is contained in:
MaxED 2016-03-23 14:52:33 +00:00
parent 6b4dc3a287
commit db9de0d349
17 changed files with 127 additions and 267 deletions

View file

@ -358,7 +358,7 @@ special
-88:SetActorRoll(2),
-89:ChangeActorRoll(2,3),
-90:GetActorRoll(1),
-91:QuakeEx(8,12),
-91:QuakeEx(8,14),
-92:Warp(6,11),
-93:GetMaxInventory(2),
-94:SetSectorDamage(2,5),

View file

@ -309,7 +309,7 @@ keywords
PolyWait = "void PolyWait(int polyid)";
Print = "void Print(type:expression)\nPrint will print something to the screen.\nPrint will only display for the activator of the script\nFor printing to all players, use PrintBold.";
PrintBold = "void PrintBold(type:expression)\nThis is exactly the same as Print, except all players will see the printed text\non the screen instead of just the activator of the script.";
QuakeEx = "bool QuakeEx(int tid, int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, str sound[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0]]]])";
QuakeEx = "bool QuakeEx(int tid, int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, str sound[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0[, int falloff = 0[, int highpoint = 0]]]]]])";
Radius_Quake = "Radius_Quake(intensity, duration, damrad, tremrad, tid)";
Radius_Quake2 = "void Radius_Quake2(int tid, int intensity, int duration, int damrad, int tremrad, str sound)";
Random = "int Random(int min, int max)";

View file

@ -162,7 +162,7 @@ keywords
A_PlayerSkinCheck = "state A_PlayerSkinCheck(str state)";
A_SkullPop = "A_SkullPop[(str type = \"BloodySkull\")]";
A_Quake = "A_Quake(int intensity, int duration, int damageradius, int tremorradius[, str sound = \"world/quake\"])";
A_QuakeEx = "A_QuakeEx(int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad[, str sound = \"world/quake\"[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0]]]]])";
A_QuakeEx = "A_QuakeEx(int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad[, str sound = \"world/quake\"[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0[, int falloff = 0[, int highpoint = 0]]]]]]])";
//Spawn functions
A_TossGib = "A_TossGib";
A_SpawnDebris = "A_SpawnDebris(str type[, bool translation = false[, float horizontal_vel = 1.0[, float vertical_vel = 1.0]]])";
@ -170,7 +170,7 @@ keywords
A_SpawnItemEx = "bool A_SpawnItemEx(str type[, float xoffset = 0.0[, float yoffset = 0.0[, float zoffset = 0.0[, float xvelocity = 0.0[, float yvelocity = 0.0[, float zvelocity = 0.0[, float angle = 0.0[, int flags = 0[, int skipchance = 0[, int tid = 0]]]]]]]]]])";
A_SpawnParticle = "A_SpawnParticle(color color[, int flags = 0[, int lifetime = 35[, int size = 1[, float angle = 0.0[, float xoff = 0.0[, float yoff = 0.0[, float zoff = 0.0[, float velx = 0.0[, float vely = 0.0[, float velz = 0.0[, float accelx = 0.0[, float accely = 0.0[, float accelz = 0.0[, float startalpha = 1.0[, float fadestep = -1.0]]]]]]]]]]]]]]])";
//State jumps
A_CheckBlock = "state A_CheckBlock(str block[, int flags = 0[, int pointer = AAPTR_TARGET]])";
A_CheckBlock = "state A_CheckBlock(str block[, int flags = 0[, int pointer = AAPTR_TARGET[, float xoff = 0.0[, float yoff = 0.0[, float zoff = 0.0[, float angle = 0.0]]]]]])";
A_CheckCeiling = "state A_CheckCeiling(str state)\nstate A_CheckCeiling(int offset)";
A_CheckFloor = "state A_CheckFloor(str state)\nstate A_CheckFloor(int offset)";
A_CheckFlag = "state A_CheckFlag(str flagname, state label[, int check_pointer = AAPTR_DEFAULT])";
@ -1084,6 +1084,8 @@ constants
CBF_SETONPTR;
CBF_DROPOFF;
CBF_NOACTORS;
CBF_ABSOLUTEPOS;
CBF_ABSOLUTEANGLE;
CHF_DONTMOVE;
CHF_FASTCHASE;
CHF_NIGHTMAREFAST;

View file

@ -22,6 +22,7 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
@ -49,6 +50,7 @@ namespace CodeImp.DoomBuilder.Data
public int LumpIndex; // Text lump index if Resource is wad
internal DataReader Resource;
public HashSet<string> Entries; // Actors/models/sounds etc.
public ScriptType ScriptType;
public override string ToString()
{
@ -81,6 +83,7 @@ namespace CodeImp.DoomBuilder.Data
private List<string> texturenames;
private Dictionary<long, ImageData> flats;
private Dictionary<long, long> flatnamesshorttofull; //mxd
private Dictionary<long, long> flatnamesfulltoshort; //mxd
private List<string> flatnames;
private Dictionary<long, ImageData> sprites;
private List<MatchingTextureSet> texturesets;
@ -310,6 +313,7 @@ namespace CodeImp.DoomBuilder.Data
flatnames = new List<string>();
texturenamesshorttofull = new Dictionary<long, long>(); //mxd
flatnamesshorttofull = new Dictionary<long, long>(); //mxd
flatnamesfulltoshort = new Dictionary<long, long>(); //mxd
imageque = new Queue<ImageData>();
previews = new PreviewManager();
texturesets = new List<MatchingTextureSet>();
@ -479,6 +483,9 @@ namespace CodeImp.DoomBuilder.Data
foreach(KeyValuePair<long, long> t in texturenamesshorttofull)
if(!flatnamesshorttofull.ContainsKey(t.Key)) flatnamesshorttofull.Add(t.Key, t.Value);
//mxd
flatnamesfulltoshort = flatnamesshorttofull.ToDictionary(t => t.Value, t => t.Key); //flatnamesshorttofull.ToDictionary(kp => kp.Value, kp => kp.Key);
// Add flats to textures
foreach(KeyValuePair<long, ImageData> f in flatsonly)
{
@ -1336,6 +1343,12 @@ namespace CodeImp.DoomBuilder.Data
return hash; //TEXTURES and HiRes flats should still override regular ones...
return (General.Map.Config.UseLongTextureNames && flatnamesshorttofull.ContainsKey(hash) ? flatnamesshorttofull[hash] : hash);
}
//mxd
internal long GetShortLongFlatName(long hash)
{
return (flatnamesfulltoshort.ContainsKey(hash) ? flatnamesfulltoshort[hash] : hash);
}
#endregion
@ -1366,7 +1379,7 @@ namespace CodeImp.DoomBuilder.Data
{
HiResImage replacer = new HiResImage(img);
replacer.ApplySettings(textures[hash]);
textures[hash] = replacer;
textures[img.LongName] = replacer;
//replaced = true;
// Add to preview manager
@ -1380,7 +1393,7 @@ namespace CodeImp.DoomBuilder.Data
{
HiResImage replacer = new HiResImage(img);
replacer.ApplySettings(flats[hash]);
flats[hash] = replacer;
flats[img.LongName] = replacer;
//replaced = true;
// Add to preview manager
@ -2594,9 +2607,30 @@ namespace CodeImp.DoomBuilder.Data
foreach(Sidedef sd in General.Map.Map.Sidedefs)
{
// Add used textures to dictionary
if(sd.LongHighTexture != MapSet.EmptyLongName) usedtextures[sd.LongHighTexture] = true;
if(sd.LongMiddleTexture != MapSet.EmptyLongName) usedtextures[sd.LongMiddleTexture] = true;
if(sd.LongLowTexture != MapSet.EmptyLongName) usedtextures[sd.LongLowTexture] = true;
if(sd.LongHighTexture != MapSet.EmptyLongName)
{
usedtextures[sd.LongHighTexture] = true;
//mxd. Part of long name support shennanigans
if(texturenamesshorttofull.ContainsKey(sd.LongHighTexture))
usedtextures[texturenamesshorttofull[sd.LongHighTexture]] = true;
}
if(sd.LongMiddleTexture != MapSet.EmptyLongName)
{
usedtextures[sd.LongMiddleTexture] = true;
//mxd. Part of long name support shennanigans
if(texturenamesshorttofull.ContainsKey(sd.LongMiddleTexture))
usedtextures[texturenamesshorttofull[sd.LongMiddleTexture]] = true;
}
if(sd.LongLowTexture != MapSet.EmptyLongName)
{
usedtextures[sd.LongLowTexture] = true;
//mxd. Part of long name support shennanigans
if(texturenamesshorttofull.ContainsKey(sd.LongLowTexture))
usedtextures[texturenamesshorttofull[sd.LongLowTexture]] = true;
}
}
// Go through the map to find the used flats
@ -2605,6 +2639,12 @@ namespace CodeImp.DoomBuilder.Data
// Add used flats to dictionary
usedtextures[s.LongFloorTexture] = false;
usedtextures[s.LongCeilTexture] = false;
//mxd. Part of long name support shennanigans
if(flatnamesshorttofull.ContainsKey(s.LongFloorTexture))
usedtextures[flatnamesshorttofull[s.LongFloorTexture]] = false;
if(flatnamesshorttofull.ContainsKey(s.LongCeilTexture))
usedtextures[flatnamesshorttofull[s.LongCeilTexture]] = false;
}
}
}
@ -2619,9 +2659,30 @@ namespace CodeImp.DoomBuilder.Data
foreach(Sidedef sd in General.Map.Map.Sidedefs)
{
// Add used textures to dictionary
if(sd.LongHighTexture != MapSet.EmptyLongName) usedtextures[sd.LongHighTexture] = true;
if(sd.LongMiddleTexture != MapSet.EmptyLongName) usedtextures[sd.LongMiddleTexture] = true;
if(sd.LongLowTexture != MapSet.EmptyLongName) usedtextures[sd.LongLowTexture] = true;
if(sd.LongHighTexture != MapSet.EmptyLongName)
{
usedtextures[sd.LongHighTexture] = true;
//mxd. Part of long name support shennanigans
if(texturenamesshorttofull.ContainsKey(sd.LongHighTexture))
usedtextures[texturenamesshorttofull[sd.LongHighTexture]] = true;
}
if(sd.LongMiddleTexture != MapSet.EmptyLongName)
{
usedtextures[sd.LongMiddleTexture] = true;
//mxd. Part of long name support shennanigans
if(texturenamesshorttofull.ContainsKey(sd.LongMiddleTexture))
usedtextures[texturenamesshorttofull[sd.LongMiddleTexture]] = true;
}
if(sd.LongLowTexture != MapSet.EmptyLongName)
{
usedtextures[sd.LongLowTexture] = true;
//mxd. Part of long name support shennanigans
if(texturenamesshorttofull.ContainsKey(sd.LongLowTexture))
usedtextures[texturenamesshorttofull[sd.LongLowTexture]] = true;
}
}
}
@ -2635,6 +2696,12 @@ namespace CodeImp.DoomBuilder.Data
// Add used flats to dictionary
usedflats[s.LongFloorTexture] = false;
usedflats[s.LongCeilTexture] = false;
//mxd. Part of long name support shennanigans
if(flatnamesshorttofull.ContainsKey(s.LongFloorTexture))
usedflats[flatnamesshorttofull[s.LongFloorTexture]] = false;
if(flatnamesshorttofull.ContainsKey(s.LongCeilTexture))
usedflats[flatnamesshorttofull[s.LongCeilTexture]] = false;
}
}
}

View file

@ -87,13 +87,13 @@ namespace CodeImp.DoomBuilder.Data
internal void ApplySettings(ImageData overridden)
{
// Copy all the names...
// Copy relevant names...
name = overridden.Name;
virtualname = overridden.VirtualName;
displayname = overridden.DisplayName;
longname = overridden.LongName;
isFlat = overridden.IsFlat;
hasLongName = overridden.HasLongName;
overridesettingsapplied = true;
if(!overridden.IsImageLoaded) overridden.LoadImage();

View file

@ -328,9 +328,6 @@ namespace CodeImp.DoomBuilder.Editing
// Convert UDMF fields back to flags and activations, if needed
if(!(General.Map.FormatInterface is UniversalMapSetIO)) General.Map.Map.TranslateFromUDMF();
//mxd. Translate texture names
General.Map.Map.TranslateTextureNames(General.Map.Config.UseLongTextureNames, true);
// Modify tags and actions if preferred
if(options.ChangeTags == PasteOptions.TAGS_REMOVE) Tools.RemoveMarkedTags();
if(options.ChangeTags == PasteOptions.TAGS_RENUMBER) Tools.RenumberMarkedTags();

View file

@ -131,7 +131,7 @@ namespace CodeImp.DoomBuilder.Editing
}
// Read settings from configuration
internal void ReadFromConfig(Configuration cfg, string path, bool uselongtexturenames)
internal void ReadFromConfig(Configuration cfg, string path)
{
// Read settings
background = cfg.ReadSetting(path + ".background", "");
@ -142,9 +142,6 @@ namespace CodeImp.DoomBuilder.Editing
backscaley = cfg.ReadSetting(path + ".backscaley", 100) / 100.0f;
gridsize = cfg.ReadSetting(path + ".gridsize", DEFAULT_GRID_SIZE);
//mxd. Translate background name?
TranslateBackgroundName(uselongtexturenames);
// Setup
SetGridSize(gridsize);
LinkBackground();
@ -177,23 +174,6 @@ namespace CodeImp.DoomBuilder.Editing
LinkBackground();
}
//mxd
internal void TranslateBackgroundName(bool uselongtexturenames)
{
if(string.IsNullOrEmpty(background)) return;
switch(backsource)
{
case SOURCE_TEXTURES:
background = (uselongtexturenames ? General.Map.Data.GetFullTextureName(background) : MapSet.GetShortTextureName(background));
break;
case SOURCE_FLATS:
background = (uselongtexturenames ? General.Map.Data.GetFullFlatName(background) : MapSet.GetShortTextureName(background));
break;
}
}
// This sets the background view
internal void SetBackgroundView(int offsetx, int offsety, float scalex, float scaley)
{

View file

@ -417,13 +417,6 @@ namespace CodeImp.DoomBuilder
// Remove unused sectors
map.RemoveUnusedSectors(true);
//mxd. Translate to long or short texture names.
bool nameschanged = map.TranslateTextureNames(config.UseLongTextureNames, false);
grid.TranslateBackgroundName(config.UseLongTextureNames);
//mxd. Sector textures may've been changed
if(nameschanged) data.UpdateUsedTextures();
// Update structures
options.ApplyGridSettings();
map.UpdateConfiguration();
@ -514,10 +507,6 @@ namespace CodeImp.DoomBuilder
// And switch to it
ChangeMapSet(newmap);
// Translate texture names
map.TranslateTextureNames(config.UseLongTextureNames, false);
grid.TranslateBackgroundName(config.UseLongTextureNames);
// Sector textures may've been changed
data.UpdateUsedTextures();
@ -2501,13 +2490,6 @@ namespace CodeImp.DoomBuilder
General.MainWindow.UpdateLinedefColorPresets(); //mxd
General.MainWindow.UpdateInterface();
//mxd. Translate texture names
bool nameschanged = map.TranslateTextureNames(config.UseLongTextureNames, false);
grid.TranslateBackgroundName(config.UseLongTextureNames);
//mxd. Sector textures may've been changed
if(nameschanged) data.UpdateUsedTextures();
// Done
General.MainWindow.DisplayReady();
General.MainWindow.RedrawDisplay(); //mxd

View file

@ -569,7 +569,7 @@ namespace CodeImp.DoomBuilder.Map
// This loads the grid settings
internal void ApplyGridSettings()
{
General.Map.Grid.ReadFromConfig(mapconfig, "grid", General.Map.Config.UseLongTextureNames);
General.Map.Grid.ReadFromConfig(mapconfig, "grid");
}
//mxd. This reads stored selection groups from the map configuration

View file

@ -3265,151 +3265,6 @@ namespace CodeImp.DoomBuilder.Map
foreach(Thing t in things) if(t.Marked) t.TranslateFromUDMF();
}
//mxd
internal bool TranslateTextureNames(bool uselongnames, bool markedonly)
{
if(markedonly)
{
List<Sector> markedsectors = GetMarkedSectors(true);
List<Sidedef> markedsides = GetMarkedSidedefs(true);
if(uselongnames) return TranslateToLongTextureNames(markedsectors, markedsides);
return TranslateToShortTextureNames(markedsectors, markedsides);
}
else
{
if(uselongnames) return TranslateToLongTextureNames(sectors, sidedefs);
return TranslateToShortTextureNames(sectors, sidedefs);
}
}
//mxd
private static bool TranslateToLongTextureNames(IEnumerable<Sector> sectors, IEnumerable<Sidedef> sidedefs)
{
bool changed = false;
foreach(Sector s in sectors)
{
if(s.FloorTexture != "-")
{
string ft = General.Map.Data.GetFullFlatName(s.FloorTexture);
if(ft != s.FloorTexture)
{
s.SetFloorTexture(Lump.MakeLongName(ft));
changed = true;
}
}
if(s.CeilTexture != "-")
{
string ct = General.Map.Data.GetFullFlatName(s.CeilTexture);
if(ct != s.CeilTexture)
{
s.SetCeilTexture(Lump.MakeLongName(ct));
changed = true;
}
}
}
foreach(Sidedef s in sidedefs)
{
if(s.HighTexture != "-")
{
string ht = General.Map.Data.GetFullTextureName(s.HighTexture);
if(ht != s.HighTexture)
{
s.SetTextureHigh(Lump.MakeLongName(ht));
changed = true;
}
}
if(s.MiddleTexture != "-")
{
string mt = General.Map.Data.GetFullTextureName(s.MiddleTexture);
if(mt != s.MiddleTexture)
{
s.SetTextureMid(Lump.MakeLongName(mt));
changed = true;
}
}
if(s.LowTexture != "-")
{
string lt = General.Map.Data.GetFullTextureName(s.LowTexture);
if(lt != s.LowTexture)
{
s.SetTextureLow(Lump.MakeLongName(lt));
changed = true;
}
}
}
return changed;
}
private static bool TranslateToShortTextureNames(IEnumerable<Sector> sectors, IEnumerable<Sidedef> sidedefs)
{
bool changed = false;
foreach(Sector s in sectors)
{
if(s.FloorTexture != "-")
{
string ft = GetShortTextureName(s.FloorTexture);
if(ft != s.FloorTexture)
{
s.SetFloorTexture(ft);
changed = true;
}
}
if(s.CeilTexture != "-")
{
string ct = GetShortTextureName(s.CeilTexture);
if(ct != s.CeilTexture)
{
s.SetCeilTexture(ct);
changed = true;
}
}
}
foreach(Sidedef s in sidedefs)
{
if(s.HighTexture != "-")
{
string ht = GetShortTextureName(s.HighTexture);
if(ht != s.HighTexture)
{
s.SetTextureHigh(ht);
changed = true;
}
}
if(s.MiddleTexture != "-")
{
string mt = GetShortTextureName(s.MiddleTexture);
if(mt != s.MiddleTexture)
{
s.SetTextureMid(mt);
changed = true;
}
}
if(s.LowTexture != "-")
{
string lt = GetShortTextureName(s.LowTexture);
if(lt != s.LowTexture)
{
s.SetTextureLow(lt);
changed = true;
}
}
}
return changed;
}
internal static string GetShortTextureName(string name)
{
string shortname = Path.GetFileNameWithoutExtension(name).ToUpperInvariant();
if(shortname.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH) shortname = shortname.Substring(0, DataManager.CLASIC_IMAGE_NAME_LENGTH);
return shortname;
}
/// <summary>This removes unused vertices.</summary>
public void RemoveUnusedVertices()
{

View file

@ -812,8 +812,6 @@ namespace CodeImp.DoomBuilder.Map
// Apply changes
this.floorheight = hfloor;
this.ceilheight = hceil;
//SetFloorTexture(tfloor);
//SetCeilTexture(tceil);
this.effect = effect;
this.tags = new List<int>(tags); //mxd
this.flags = new Dictionary<string, bool>(flags); //mxd
@ -845,7 +843,7 @@ namespace CodeImp.DoomBuilder.Map
if(string.IsNullOrEmpty(name)) name = "-"; //mxd
floortexname = name;
longfloortexname = General.Map.Data.GetFullLongFlatName(Lump.MakeLongName(name)); //mxd
longfloortexname = Lump.MakeLongName(name);
updateneeded = true;
General.Map.IsChanged = true;
}
@ -857,27 +855,7 @@ namespace CodeImp.DoomBuilder.Map
if(string.IsNullOrEmpty(name)) name = "-"; //mxd
ceiltexname = name;
longceiltexname = General.Map.Data.GetFullLongFlatName(Lump.MakeLongName(name)); //mxd
updateneeded = true;
General.Map.IsChanged = true;
}
//mxd. This sets texture lookup
internal void SetFloorTexture(long hash)
{
BeforePropsChange();
longfloortexname = hash;
updateneeded = true;
General.Map.IsChanged = true;
}
//mxd. This sets texture lookup
internal void SetCeilTexture(long hash)
{
BeforePropsChange();
longceiltexname = hash;
longceiltexname = Lump.MakeLongName(name);
updateneeded = true;
General.Map.IsChanged = true;
}

View file

@ -679,7 +679,7 @@ namespace CodeImp.DoomBuilder.Map
BeforePropsChange();
texnamehigh = string.IsNullOrEmpty(name) ? "-" : name; //mxd
longtexnamehigh = General.Map.Data.GetFullLongTextureName(Lump.MakeLongName(name)); //mxd
longtexnamehigh = Lump.MakeLongName(name);
General.Map.IsChanged = true;
}
@ -689,7 +689,7 @@ namespace CodeImp.DoomBuilder.Map
BeforePropsChange();
texnamemid = string.IsNullOrEmpty(name) ? "-" : name; //mxd;
longtexnamemid = General.Map.Data.GetFullLongTextureName(Lump.MakeLongName(name)); //mxd
longtexnamemid = Lump.MakeLongName(name);
General.Map.IsChanged = true;
}
@ -699,34 +699,7 @@ namespace CodeImp.DoomBuilder.Map
BeforePropsChange();
texnamelow = string.IsNullOrEmpty(name) ? "-" : name; //mxd;
longtexnamelow = General.Map.Data.GetFullLongTextureName(Lump.MakeLongName(name)); //mxd
General.Map.IsChanged = true;
}
//mxd. This sets texture lookup
public void SetTextureHigh(long hash)
{
BeforePropsChange();
longtexnamehigh = hash;
General.Map.IsChanged = true;
}
//mxd. This sets texture lookup
public void SetTextureMid(long hash)
{
BeforePropsChange();
longtexnamemid = hash;
General.Map.IsChanged = true;
}
//mxd. This sets texture lookup
public void SetTextureLow(long hash)
{
BeforePropsChange();
longtexnamelow = hash;
longtexnamelow = Lump.MakeLongName(name);
General.Map.IsChanged = true;
}

View file

@ -31,6 +31,10 @@ namespace CodeImp.DoomBuilder.Windows
{
#region ================== Variables
//mxd. Window setup stuff
private static Point location = Point.Empty;
private static Size size = Size.Empty;
#endregion
#region ================== Constructor / Disposer
@ -39,6 +43,15 @@ namespace CodeImp.DoomBuilder.Windows
public ErrorsForm()
{
InitializeComponent();
//mxd. Apply window settings
if(location != Point.Empty)
{
this.StartPosition = FormStartPosition.Manual;
this.Location = location;
}
if(size != Size.Empty) this.Size = size;
FillList();
checkerrors.Start();
checkshow.Checked = General.Settings.ShowErrorsWindow;
@ -86,16 +99,17 @@ namespace CodeImp.DoomBuilder.Windows
{
checkerrors.Stop();
General.Settings.ShowErrorsWindow = checkshow.Checked;
//mxd. Save window settings
location = this.Location;
size = this.Size;
}
// Checking for more errors
private void checkerrors_Tick(object sender, EventArgs e)
{
// If errors have been added, update the list
if(General.ErrorLogger.HasChanged)
{
FillList();
}
if(General.ErrorLogger.HasChanged) FillList();
}
// This clears all errors

View file

@ -4015,17 +4015,19 @@ namespace CodeImp.DoomBuilder.Windows
{
// Go for all setors
bool updated = false;
long imgshorthash = General.Map.Data.GetShortLongFlatName(img.LongName); //mxd. Part of long name support shennanigans
foreach(Sector s in General.Map.Map.Sectors)
{
// Update floor buffer if needed
if(s.LongFloorTexture == img.LongName)
if(s.LongFloorTexture == img.LongName || s.LongFloorTexture == imgshorthash)
{
s.UpdateFloorSurface();
updated = true;
}
// Update ceiling buffer if needed
if(s.LongCeilTexture == img.LongName)
if(s.LongCeilTexture == img.LongName || s.LongCeilTexture == imgshorthash)
{
s.UpdateCeilingSurface();
updated = true;

View file

@ -454,7 +454,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
//mxd. Points and existing geometry form a closed shape?
if(continuousdrawing && autoclosedrawing)
if(autoclosedrawing)
{
// Determive center point
float minx = float.MaxValue;

View file

@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.IO;
@ -769,8 +770,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Copy texture
public virtual void OnCopyTexture()
{
//mxd. When UseLongTextureNames is disabled, use texture name as stored in Sidedef, otherwise use full name.
string texturename = ((General.Map.Options.UseLongTextureNames && Texture != null && Texture.UsedInMap) ? Texture.Name : GetTextureName());
//mxd. When UseLongTextureNames is enabled and the image filename is longer than 8 chars, use full name,
// otherwise use texture name as stored in Sector
string texturename = ((General.Map.Options.UseLongTextureNames && Texture != null && Texture.UsedInMap
&& Path.GetFileNameWithoutExtension(Texture.Name).Length > DataManager.CLASIC_IMAGE_NAME_LENGTH)
? Texture.Name : GetTextureName());
BuilderPlug.Me.CopiedFlat = texturename;
if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedTexture = texturename;
mode.SetActionResult("Copied flat \"" + texturename + "\".");

View file

@ -20,6 +20,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Geometry;
@ -1133,8 +1134,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Copy texture
public virtual void OnCopyTexture()
{
//mxd. When UseLongTextureNames is disabled, use texture name as stored in Sidedef, otherwise use full name.
string texturename = ((General.Map.Options.UseLongTextureNames && Texture != null && Texture.UsedInMap) ? Texture.Name : GetTextureName());
//mxd. When UseLongTextureNames is enabled and the image filename is longer than 8 chars, use full name,
// otherwise use texture name as stored in Sidedef
string texturename = ((General.Map.Options.UseLongTextureNames && Texture != null && Texture.UsedInMap
&& Path.GetFileNameWithoutExtension(Texture.Name).Length > DataManager.CLASIC_IMAGE_NAME_LENGTH)
? Texture.Name : GetTextureName());
BuilderPlug.Me.CopiedTexture = texturename;
if(General.Map.Config.MixTexturesFlats) BuilderPlug.Me.CopiedFlat = texturename;
mode.SetActionResult("Copied texture \"" + texturename + "\".");