mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-03 17:32:26 +00:00
- fixed: The mutipatch texture builder did not set the source lump.
This commit is contained in:
parent
58bc12ee19
commit
a330b46d1a
4 changed files with 10 additions and 7 deletions
|
@ -170,6 +170,6 @@ public:
|
|||
}
|
||||
|
||||
void AddTexturesLumps(int lump1, int lump2, int patcheslump);
|
||||
void ParseTexture(FScanner &sc, ETextureType usetype);
|
||||
void ParseTexture(FScanner &sc, ETextureType usetype, int deflump);
|
||||
void ResolveAllPatches();
|
||||
};
|
||||
|
|
|
@ -606,7 +606,7 @@ void FMultipatchTextureBuilder::ParsePatch(FScanner &sc, BuildInfo &info, TexPar
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FMultipatchTextureBuilder::ParseTexture(FScanner &sc, ETextureType UseType)
|
||||
void FMultipatchTextureBuilder::ParseTexture(FScanner &sc, ETextureType UseType, int deflump)
|
||||
{
|
||||
BuildInfo &buildinfo = BuiltTextures[BuiltTextures.Reserve(1)];
|
||||
|
||||
|
@ -637,6 +637,7 @@ void FMultipatchTextureBuilder::ParseTexture(FScanner &sc, ETextureType UseType)
|
|||
sc.MustGetStringName(",");
|
||||
sc.MustGetNumber();
|
||||
buildinfo.Height = sc.Number;
|
||||
buildinfo.DefinitionLump = deflump;
|
||||
|
||||
bool offset2set = false;
|
||||
if (sc.CheckString("{"))
|
||||
|
@ -911,6 +912,7 @@ void FMultipatchTextureBuilder::ResolveAllPatches()
|
|||
{
|
||||
auto img = new FMultiPatchTexture(buildinfo.Width, buildinfo.Height, buildinfo.Parts, buildinfo.bComplex, buildinfo.textual);
|
||||
auto itex = new FImageTexture(img);
|
||||
itex->SetSourceLump(buildinfo.DefinitionLump);
|
||||
AddImageToTexture(itex, buildinfo);
|
||||
}
|
||||
BuiltTextures.Delete(i);
|
||||
|
|
|
@ -782,23 +782,23 @@ void FTextureManager::ParseTextureDef(int lump, FMultipatchTextureBuilder &build
|
|||
}
|
||||
else if (sc.Compare("texture"))
|
||||
{
|
||||
build.ParseTexture(sc, ETextureType::Override);
|
||||
build.ParseTexture(sc, ETextureType::Override, lump);
|
||||
}
|
||||
else if (sc.Compare("sprite"))
|
||||
{
|
||||
build.ParseTexture(sc, ETextureType::Sprite);
|
||||
build.ParseTexture(sc, ETextureType::Sprite, lump);
|
||||
}
|
||||
else if (sc.Compare("walltexture"))
|
||||
{
|
||||
build.ParseTexture(sc, ETextureType::Wall);
|
||||
build.ParseTexture(sc, ETextureType::Wall, lump);
|
||||
}
|
||||
else if (sc.Compare("flat"))
|
||||
{
|
||||
build.ParseTexture(sc, ETextureType::Flat);
|
||||
build.ParseTexture(sc, ETextureType::Flat, lump);
|
||||
}
|
||||
else if (sc.Compare("graphic"))
|
||||
{
|
||||
build.ParseTexture(sc, ETextureType::MiscPatch);
|
||||
build.ParseTexture(sc, ETextureType::MiscPatch, lump);
|
||||
}
|
||||
else if (sc.Compare("#include"))
|
||||
{
|
||||
|
|
|
@ -253,6 +253,7 @@ public:
|
|||
bool isCanvas() const { return bHasCanvas; }
|
||||
|
||||
int GetSourceLump() { return SourceLump; } // needed by the scripted GetName method.
|
||||
void SetSourceLump(int sl) { SourceLump = sl; }
|
||||
bool FindHoles(const unsigned char * buffer, int w, int h);
|
||||
|
||||
void CopySize(FTexture* BaseTexture)
|
||||
|
|
Loading…
Reference in a new issue