mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- moved the linkedTexture pointer up one level out of the resource descriptor into the file system record.
This commit is contained in:
parent
2e258e8cdb
commit
89fb479c19
2 changed files with 4 additions and 6 deletions
|
@ -47,7 +47,6 @@ struct FResourceLump
|
||||||
int8_t RefCount;
|
int8_t RefCount;
|
||||||
char * Cache;
|
char * Cache;
|
||||||
FResourceFile * Owner;
|
FResourceFile * Owner;
|
||||||
FTexture * LinkedTexture;
|
|
||||||
int Namespace;
|
int Namespace;
|
||||||
|
|
||||||
FResourceLump()
|
FResourceLump()
|
||||||
|
@ -58,7 +57,6 @@ struct FResourceLump
|
||||||
RefCount = 0;
|
RefCount = 0;
|
||||||
Namespace = 0; // ns_global
|
Namespace = 0; // ns_global
|
||||||
*Name = 0;
|
*Name = 0;
|
||||||
LinkedTexture = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~FResourceLump();
|
virtual ~FResourceLump();
|
||||||
|
|
|
@ -64,6 +64,7 @@ struct FWadCollection::LumpRecord
|
||||||
{
|
{
|
||||||
int wadnum;
|
int wadnum;
|
||||||
FResourceLump *lump;
|
FResourceLump *lump;
|
||||||
|
FTexture* linkedTexture;
|
||||||
};
|
};
|
||||||
|
|
||||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||||
|
@ -204,6 +205,7 @@ int FWadCollection::AddExternalFile(const char *filename)
|
||||||
FWadCollection::LumpRecord *lumprec = &LumpInfo[LumpInfo.Reserve(1)];
|
FWadCollection::LumpRecord *lumprec = &LumpInfo[LumpInfo.Reserve(1)];
|
||||||
lumprec->lump = lump;
|
lumprec->lump = lump;
|
||||||
lumprec->wadnum = -1;
|
lumprec->wadnum = -1;
|
||||||
|
lumprec->linkedTexture = nullptr;
|
||||||
return LumpInfo.Size()-1; // later
|
return LumpInfo.Size()-1; // later
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -620,8 +622,7 @@ void FWadCollection::SetLinkedTexture(int lump, FTexture *tex)
|
||||||
{
|
{
|
||||||
if ((size_t)lump < NumLumps)
|
if ((size_t)lump < NumLumps)
|
||||||
{
|
{
|
||||||
FResourceLump *reslump = LumpInfo[lump].lump;
|
LumpInfo[lump].linkedTexture = tex;
|
||||||
reslump->LinkedTexture = tex;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,8 +636,7 @@ FTexture *FWadCollection::GetLinkedTexture(int lump)
|
||||||
{
|
{
|
||||||
if ((size_t)lump < NumLumps)
|
if ((size_t)lump < NumLumps)
|
||||||
{
|
{
|
||||||
FResourceLump *reslump = LumpInfo[lump].lump;
|
return LumpInfo[lump].linkedTexture;
|
||||||
return reslump->LinkedTexture;
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue