mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-05-31 00:51:37 +00:00
UDMF map format: increased maximum supported texture name length to 2048.
Preferences: added "Capitalize texture names" option (located in Preferences -> Appearance -> Additional options). When disabled, the casing of displayed texture names will match filenames for textures loaded form TEXTURES or pk3/pk7/folder resources. Textures Browser: added support for displaying long texture names. Errors list is now cleared when reloading resources. Visual mode: added basic support for sector slopes (no UI for that feature yet).
This commit is contained in:
parent
48caddf130
commit
a61bba2536
25 changed files with 254 additions and 103 deletions
|
@ -597,25 +597,27 @@ namespace CodeImp.DoomBuilder.Data
|
|||
private ICollection<ImageData> LoadDirectoryImages(string path, int imagetype, bool includesubdirs)
|
||||
{
|
||||
List<ImageData> images = new List<ImageData>();
|
||||
string[] files;
|
||||
string name;
|
||||
|
||||
// Go for all files
|
||||
files = GetAllFiles(path, includesubdirs);
|
||||
string[] files = GetAllFiles(path, includesubdirs);
|
||||
foreach(string f in files)
|
||||
{
|
||||
// Make the texture name from filename without extension
|
||||
name = Path.GetFileNameWithoutExtension(f).ToUpperInvariant();
|
||||
if(name.Length > 8) name = name.Substring(0, 8);
|
||||
if(name.Length > 0)
|
||||
{
|
||||
// Add image to list
|
||||
images.Add(CreateImage(name, f, imagetype));
|
||||
}
|
||||
else
|
||||
name = Path.GetFileNameWithoutExtension(f);
|
||||
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
// Can't load image without name
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Can't load an unnamed texture from \"" + path + "\". Please consider giving names to your resources.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(name.Length > General.Map.Config.MaxTextureNameLength) name = name.Substring(0, General.Map.Config.MaxTextureNameLength);
|
||||
if(General.Settings.CapitalizeTextureNames) name = name.ToUpperInvariant(); //mxd
|
||||
|
||||
// Add image to list
|
||||
images.Add(CreateImage(name, f, imagetype));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue