Fixed (DB2 bug): the first texture of every TEXTURE1 lump should be ignored, not the first texture loaded from the first map resource. Also, said texture(s) are no longer shown in the Textures browser.

Cosmetic update in ZDoom_DECORATE.cfg.
This commit is contained in:
MaxED 2015-01-15 20:48:57 +00:00
parent b08f64accb
commit f06387bd32
3 changed files with 9 additions and 14 deletions

View file

@ -181,7 +181,7 @@ keywords
A_SetSpecial = "A_SetSpecial(int special, int arg0, int arg1, int arg2, int arg3, int arg4)";
A_SetSpeed = "A_SetSpeed(float speed)";
A_SetTics = "A_SetTics(int tics)";
A_SetTranslucent = "A_SetTranslucent(float alpha, int mode)";
A_SetTranslucent = "A_SetTranslucent(float alpha[, int mode = 0])";
A_SetUserVar = "A_SetUserVar(string name, int value)";
A_TransferPointer = "A_TransferPointer(int source, int recipient, int sourcefield, int recipientfield[, int flags])\nflags: PTROP flags.";
A_UnHideThing = "A_UnHideThing";

View file

@ -842,7 +842,6 @@ namespace CodeImp.DoomBuilder.Data
PatchNames pnames = new PatchNames();
PatchNames newpnames;
int counter = 0;
long firsttexture = 0;
// Go for all opened containers
foreach(DataReader dr in containers)
@ -864,7 +863,6 @@ namespace CodeImp.DoomBuilder.Data
// Add or replace in textures list
list.Remove(img.LongName);
list.Add(img.LongName, img);
if(firsttexture == 0) firsttexture = img.LongName;
counter++;
//mxd. Also add as short name when texture name is longer than 8 chars
@ -887,10 +885,6 @@ namespace CodeImp.DoomBuilder.Data
}
}
// The first texture cannot be used, because in the game engine it
// has index 0 which means "no texture", so remove it from the list.
list.Remove(firsttexture);
// Output info
return counter;
}

View file

@ -348,13 +348,15 @@ namespace CodeImp.DoomBuilder.Data
if(issuspended) throw new Exception("Data reader is suspended");
List<ImageData> images = new List<ImageData>();
int lumpindex;
Lump lump;
float defaultscale = General.Map.Config.DefaultTextureScale; //mxd
// Load two sets of textures, if available
lump = file.FindLump("TEXTURE1");
if(lump != null) LoadTextureSet("TEXTURE1", lump.Stream, ref images, pnames);
Lump lump = file.FindLump("TEXTURE1");
if(lump != null)
{
LoadTextureSet("TEXTURE1", lump.Stream, ref images, pnames);
if(images.Count > 0) images.RemoveAt(0); //mxd. The first TEXTURE1 texture cannot be used. Let's remove it here
}
lump = file.FindLump("TEXTURE2");
if(lump != null) LoadTextureSet("TEXTURE2", lump.Stream, ref images, pnames);
@ -382,7 +384,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Load TEXTURES lump file
lumpindex = file.FindLumpIndex("TEXTURES");
int lumpindex = file.FindLumpIndex("TEXTURES");
while(lumpindex > -1)
{
MemoryStream filedata = new MemoryStream(file.Lumps[lumpindex].Stream.ReadAllBytes());
@ -394,8 +396,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add images to the container-specific texture set
foreach(ImageData img in images)
textureset.AddTexture(img);
foreach(ImageData img in images) textureset.AddTexture(img);
// Return result
return images;