mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-03-04 00:21:44 +00:00
Don't capitalize lowercase lump names when saving a map
This commit is contained in:
parent
4e043b510f
commit
c7aa31db7c
1 changed files with 4 additions and 4 deletions
|
@ -80,7 +80,7 @@ namespace CodeImp.DoomBuilder.IO
|
||||||
this.length = length;
|
this.length = length;
|
||||||
|
|
||||||
// Make name
|
// Make name
|
||||||
this.name = MakeNormalName(fixedname, WAD.ENCODING).ToUpperInvariant();
|
this.name = MakeNormalName(fixedname, WAD.ENCODING);
|
||||||
this.fixedname = MakeFixedName(name, WAD.ENCODING);
|
this.fixedname = MakeFixedName(name, WAD.ENCODING);
|
||||||
this.longname = MakeLongName(name, false); //mxd
|
this.longname = MakeLongName(name, false); //mxd
|
||||||
|
|
||||||
|
@ -149,14 +149,14 @@ namespace CodeImp.DoomBuilder.IO
|
||||||
while((length < fixedname.Length) && (fixedname[length] != 0)) length++;
|
while((length < fixedname.Length) && (fixedname[length] != 0)) length++;
|
||||||
|
|
||||||
// Make normal name
|
// Make normal name
|
||||||
return encoding.GetString(fixedname, 0, length).Trim().ToUpper();
|
return encoding.GetString(fixedname, 0, length).Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This makes the fixed name from normal name
|
// This makes the fixed name from normal name
|
||||||
public static byte[] MakeFixedName(string name, Encoding encoding)
|
public static byte[] MakeFixedName(string name, Encoding encoding)
|
||||||
{
|
{
|
||||||
// Make uppercase name and count bytes
|
// Make uppercase name and count bytes
|
||||||
string uppername = name.Trim().ToUpper();
|
string uppername = name.Trim();
|
||||||
int bytes = encoding.GetByteCount(uppername);
|
int bytes = encoding.GetByteCount(uppername);
|
||||||
if(bytes < 8) bytes = 8;
|
if(bytes < 8) bytes = 8;
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ namespace CodeImp.DoomBuilder.IO
|
||||||
{
|
{
|
||||||
// Make name
|
// Make name
|
||||||
this.fixedname = MakeFixedName(newname, WAD.ENCODING);
|
this.fixedname = MakeFixedName(newname, WAD.ENCODING);
|
||||||
this.name = MakeNormalName(this.fixedname, WAD.ENCODING).ToUpperInvariant();
|
this.name = MakeNormalName(this.fixedname, WAD.ENCODING);
|
||||||
this.longname = MakeLongName(newname);
|
this.longname = MakeLongName(newname);
|
||||||
|
|
||||||
// Write changes
|
// Write changes
|
||||||
|
|
Loading…
Reference in a new issue