mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +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;
|
||||
char * Cache;
|
||||
FResourceFile * Owner;
|
||||
FTexture * LinkedTexture;
|
||||
int Namespace;
|
||||
|
||||
FResourceLump()
|
||||
|
@ -58,7 +57,6 @@ struct FResourceLump
|
|||
RefCount = 0;
|
||||
Namespace = 0; // ns_global
|
||||
*Name = 0;
|
||||
LinkedTexture = NULL;
|
||||
}
|
||||
|
||||
virtual ~FResourceLump();
|
||||
|
|
|
@ -64,6 +64,7 @@ struct FWadCollection::LumpRecord
|
|||
{
|
||||
int wadnum;
|
||||
FResourceLump *lump;
|
||||
FTexture* linkedTexture;
|
||||
};
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
@ -204,6 +205,7 @@ int FWadCollection::AddExternalFile(const char *filename)
|
|||
FWadCollection::LumpRecord *lumprec = &LumpInfo[LumpInfo.Reserve(1)];
|
||||
lumprec->lump = lump;
|
||||
lumprec->wadnum = -1;
|
||||
lumprec->linkedTexture = nullptr;
|
||||
return LumpInfo.Size()-1; // later
|
||||
}
|
||||
|
||||
|
@ -620,8 +622,7 @@ void FWadCollection::SetLinkedTexture(int lump, FTexture *tex)
|
|||
{
|
||||
if ((size_t)lump < NumLumps)
|
||||
{
|
||||
FResourceLump *reslump = LumpInfo[lump].lump;
|
||||
reslump->LinkedTexture = tex;
|
||||
LumpInfo[lump].linkedTexture = tex;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -635,8 +636,7 @@ FTexture *FWadCollection::GetLinkedTexture(int lump)
|
|||
{
|
||||
if ((size_t)lump < NumLumps)
|
||||
{
|
||||
FResourceLump *reslump = LumpInfo[lump].lump;
|
||||
return reslump->LinkedTexture;
|
||||
return LumpInfo[lump].linkedTexture;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue