mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
- Fixed a bug that allowed to use texture names longer than 8 characters, making the WAD file unusable after saving
@ added a texturenamelength config var. Setting it to higher than 8 may result in unexpected behaviour due to the speed optimizations relying on 8 char texture names and should not be changed for now.
This commit is contained in:
parent
84a3069926
commit
f66980b60f
25 changed files with 133 additions and 6 deletions
|
@ -72,6 +72,10 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
|
|
|
@ -73,6 +73,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -73,6 +73,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -72,6 +72,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -72,6 +72,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -77,6 +77,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -73,6 +73,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -83,6 +83,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -72,6 +72,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -72,6 +72,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -75,6 +75,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -86,6 +86,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -73,6 +73,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY001";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -73,6 +73,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -75,6 +75,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -86,6 +86,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -96,6 +96,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -85,6 +85,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -85,6 +85,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -85,6 +85,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY001";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -72,6 +72,11 @@ defaultthingflags
|
|||
// Flat used as sky (for missing textures check)
|
||||
skyflatname = "F_SKY1";
|
||||
|
||||
// Maximum length of texture name length in characters (<= 0 for unlimited)
|
||||
// WARNING: changing this may destroy your WAD file. Only change it when
|
||||
// you know what you're doing!
|
||||
maxtexturenamelength = 8;
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
This tells Doom Builder where to find the information for textures
|
||||
|
|
|
@ -71,6 +71,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private bool linetagindicatesectors;
|
||||
private string decorategames;
|
||||
private string skyflatname;
|
||||
private int maxtexturenamelength;
|
||||
|
||||
// Skills
|
||||
private List<SkillInfo> skills;
|
||||
|
@ -153,6 +154,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public bool LineTagIndicatesSectors { get { return linetagindicatesectors ; } }
|
||||
public string DecorateGames { get { return decorategames; } }
|
||||
public string SkyFlatName { get { return skyflatname; } }
|
||||
public int MaxTextureNamelength { get { return maxtexturenamelength; } }
|
||||
|
||||
// Skills
|
||||
public List<SkillInfo> Skills { get { return skills; } }
|
||||
|
@ -256,6 +258,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
linetagindicatesectors = cfg.ReadSetting("linetagindicatesectors", false);
|
||||
decorategames = cfg.ReadSetting("decorategames", "");
|
||||
skyflatname = cfg.ReadSetting("skyflatname", "F_SKY1");
|
||||
maxtexturenamelength = cfg.ReadSetting("maxtexturenamelength", 8);
|
||||
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
|
||||
|
|
|
@ -55,6 +55,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.name.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
|
||||
this.name.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.name.Location = new System.Drawing.Point(0, 64);
|
||||
this.name.MaxLength = 8;
|
||||
this.name.Name = "name";
|
||||
this.name.Size = new System.Drawing.Size(68, 20);
|
||||
this.name.TabIndex = 2;
|
||||
|
|
|
@ -65,6 +65,9 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
|
||||
// set the max length of texture names
|
||||
name.MaxLength = General.Map.Config.MaxTextureNamelength;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -92,18 +92,34 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
// Read texture structure
|
||||
TextureStructure tx = new TextureStructure(this);
|
||||
if(this.HasError) break;
|
||||
|
||||
// Add the texture
|
||||
textures.Add(tx);
|
||||
|
||||
// if a limit for the texture name length is set make sure that it's not exceeded
|
||||
if ((General.Map.Config.MaxTextureNamelength > 0) && (tx.Name.Length > General.Map.Config.MaxTextureNamelength))
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Texture name \"" + tx.Name + "\" too long. Texture names must have a length of " + General.Map.Config.MaxTextureNamelength.ToString() + " characters or less");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the texture
|
||||
textures.Add(tx);
|
||||
}
|
||||
}
|
||||
else if(objdeclaration == "sprite")
|
||||
{
|
||||
// Read sprite structure
|
||||
TextureStructure tx = new TextureStructure(this);
|
||||
if(this.HasError) break;
|
||||
|
||||
// Add the sprite
|
||||
sprites.Add(tx);
|
||||
|
||||
// if a limit for the sprite name length is set make sure that it's not exceeded
|
||||
if ((General.Map.Config.MaxTextureNamelength > 0) && (tx.Name.Length > General.Map.Config.MaxTextureNamelength))
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Sprite name \"" + tx.Name + "\" too long. Sprite names must have a length of " + General.Map.Config.MaxTextureNamelength.ToString() + " characters or less");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the sprite
|
||||
sprites.Add(tx);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue