renamed things in file system to reduce Doom specific terminology.
This commit is contained in:
parent
a3475d3973
commit
d1abc3eb8c
50 changed files with 313 additions and 318 deletions
|
|
@ -124,7 +124,7 @@ FGameTexture::~FGameTexture()
|
|||
bool FGameTexture::isUserContent() const
|
||||
{
|
||||
int filenum = fileSystem.GetFileContainer(Base->GetSourceLump());
|
||||
return (filenum > fileSystem.GetMaxIwadNum());
|
||||
return (filenum > fileSystem.GetMaxBaseNum());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ void FGameTexture::AddAutoMaterials()
|
|||
if (this->*(layer.pointer) == nullptr) // only if no explicit assignment had been done.
|
||||
{
|
||||
FStringf lookup("%s%s%s", layer.path, fullname ? "" : "auto/", searchname.GetChars());
|
||||
auto lump = fileSystem.CheckNumForFullName(lookup.GetChars(), true);
|
||||
auto lump = fileSystem.FindFile(lookup.GetChars(), true);
|
||||
if (lump != -1)
|
||||
{
|
||||
auto bmtex = TexMan.FindGameTexture(fileSystem.GetFileName(lump), ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
|
|
@ -199,7 +199,7 @@ void FGameTexture::AddAutoMaterials()
|
|||
if (!this->Layers || this->Layers.get()->*(layer.pointer) == nullptr) // only if no explicit assignment had been done.
|
||||
{
|
||||
FStringf lookup("%s%s%s", layer.path, fullname ? "" : "auto/", searchname.GetChars());
|
||||
auto lump = fileSystem.CheckNumForFullName(lookup.GetChars(), true);
|
||||
auto lump = fileSystem.FindFile(lookup.GetChars(), true);
|
||||
if (lump != -1)
|
||||
{
|
||||
auto bmtex = TexMan.FindGameTexture(fileSystem.GetFileName(lump), ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ FTextureID FTextureManager::CheckForTexture (const char *name, ETextureType uset
|
|||
if (strchr(name, '/') || (flags & TEXMAN_ForceLookup))
|
||||
{
|
||||
FGameTexture *const NO_TEXTURE = (FGameTexture*)-1; // marker for lumps we already checked that do not map to a texture.
|
||||
int lump = fileSystem.CheckNumForFullName(name);
|
||||
int lump = fileSystem.FindFile(name);
|
||||
if (lump >= 0)
|
||||
{
|
||||
FGameTexture *tex = GetLinkedTexture(lump);
|
||||
|
|
@ -394,7 +394,7 @@ bool FTextureManager::OkForLocalization(FTextureID texnum, const char *substitut
|
|||
|
||||
// Mode 3 must also reject substitutions for non-IWAD content.
|
||||
int file = fileSystem.GetFileContainer(Textures[texnum.GetIndex()].Texture->GetSourceLump());
|
||||
if (file > fileSystem.GetMaxIwadNum()) return true;
|
||||
if (file > fileSystem.GetMaxBaseNum()) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -936,7 +936,7 @@ void FTextureManager::LoadTextureX(int wadnum, FMultipatchTextureBuilder &build)
|
|||
void FTextureManager::AddTexturesForWad(int wadnum, FMultipatchTextureBuilder &build)
|
||||
{
|
||||
int firsttexture = Textures.Size();
|
||||
bool iwad = wadnum >= fileSystem.GetIwadNum() && wadnum <= fileSystem.GetMaxIwadNum();
|
||||
bool iwad = wadnum >= fileSystem.GetBaseNum() && wadnum <= fileSystem.GetMaxBaseNum();
|
||||
|
||||
FirstTextureForFile.Push(firsttexture);
|
||||
|
||||
|
|
@ -1217,7 +1217,7 @@ void FTextureManager::AddTextures(void (*progressFunc_)(), void (*checkForHacks)
|
|||
progressFunc = progressFunc_;
|
||||
//if (BuildTileFiles.Size() == 0) CountBuildTiles ();
|
||||
|
||||
int wadcnt = fileSystem.GetNumWads();
|
||||
int wadcnt = fileSystem.GetContainerCount();
|
||||
|
||||
FMultipatchTextureBuilder build(*this, progressFunc_, checkForHacks);
|
||||
|
||||
|
|
@ -1409,7 +1409,7 @@ int FTextureManager::GuesstimateNumTextures ()
|
|||
{
|
||||
int numtex = 0;
|
||||
|
||||
for(int i = fileSystem.GetNumEntries()-1; i>=0; i--)
|
||||
for(int i = fileSystem.GetFileCount()-1; i>=0; i--)
|
||||
{
|
||||
int space = fileSystem.GetFileNamespace(i);
|
||||
switch(space)
|
||||
|
|
@ -1445,7 +1445,7 @@ int FTextureManager::GuesstimateNumTextures ()
|
|||
int FTextureManager::CountTexturesX ()
|
||||
{
|
||||
int count = 0;
|
||||
int wadcount = fileSystem.GetNumWads();
|
||||
int wadcount = fileSystem.GetContainerCount();
|
||||
for (int wadnum = 0; wadnum < wadcount; wadnum++)
|
||||
{
|
||||
// Use the most recent PNAMES for this WAD.
|
||||
|
|
@ -1503,16 +1503,16 @@ void FTextureManager::AdjustSpriteOffsets()
|
|||
int sprid;
|
||||
TMap<int, bool> donotprocess;
|
||||
|
||||
int numtex = fileSystem.GetNumEntries();
|
||||
int numtex = fileSystem.GetFileCount();
|
||||
|
||||
for (int i = 0; i < numtex; i++)
|
||||
{
|
||||
if (fileSystem.GetFileContainer(i) > fileSystem.GetMaxIwadNum()) break; // we are past the IWAD
|
||||
if (fileSystem.GetFileNamespace(i) == ns_sprites && fileSystem.GetFileContainer(i) >= fileSystem.GetIwadNum() && fileSystem.GetFileContainer(i) <= fileSystem.GetMaxIwadNum())
|
||||
if (fileSystem.GetFileContainer(i) > fileSystem.GetMaxBaseNum()) break; // we are past the IWAD
|
||||
if (fileSystem.GetFileNamespace(i) == ns_sprites && fileSystem.GetFileContainer(i) >= fileSystem.GetBaseNum() && fileSystem.GetFileContainer(i) <= fileSystem.GetMaxBaseNum())
|
||||
{
|
||||
const char *str = fileSystem.GetFileShortName(i);
|
||||
FTextureID texid = TexMan.CheckForTexture(str, ETextureType::Sprite, 0);
|
||||
if (texid.isValid() && fileSystem.GetFileContainer(GetGameTexture(texid)->GetSourceLump()) > fileSystem.GetMaxIwadNum())
|
||||
if (texid.isValid() && fileSystem.GetFileContainer(GetGameTexture(texid)->GetSourceLump()) > fileSystem.GetMaxBaseNum())
|
||||
{
|
||||
// This texture has been replaced by some PWAD.
|
||||
memcpy(&sprid, str, 4);
|
||||
|
|
@ -1551,12 +1551,12 @@ void FTextureManager::AdjustSpriteOffsets()
|
|||
|
||||
int lumpnum = tex->GetSourceLump();
|
||||
// We only want to change texture offsets for sprites in the IWAD or the file this lump originated from.
|
||||
if (lumpnum >= 0 && lumpnum < fileSystem.GetNumEntries())
|
||||
if (lumpnum >= 0 && lumpnum < fileSystem.GetFileCount())
|
||||
{
|
||||
int wadno = fileSystem.GetFileContainer(lumpnum);
|
||||
if ((iwadonly && wadno >= fileSystem.GetIwadNum() && wadno <= fileSystem.GetMaxIwadNum()) || (!iwadonly && wadno == ofslumpno))
|
||||
if ((iwadonly && wadno >= fileSystem.GetBaseNum() && wadno <= fileSystem.GetMaxBaseNum()) || (!iwadonly && wadno == ofslumpno))
|
||||
{
|
||||
if (wadno >= fileSystem.GetIwadNum() && wadno <= fileSystem.GetMaxIwadNum() && !forced && iwadonly)
|
||||
if (wadno >= fileSystem.GetBaseNum() && wadno <= fileSystem.GetMaxBaseNum() && !forced && iwadonly)
|
||||
{
|
||||
memcpy(&sprid, tex->GetName().GetChars(), 4);
|
||||
if (donotprocess.CheckKey(sprid)) continue; // do not alter sprites that only get partially replaced.
|
||||
|
|
@ -1630,7 +1630,7 @@ void FTextureManager::Listaliases()
|
|||
|
||||
void FTextureManager::SetLinkedTexture(int lump, FGameTexture* tex)
|
||||
{
|
||||
if (lump < fileSystem.GetNumEntries())
|
||||
if (lump < fileSystem.GetFileCount())
|
||||
{
|
||||
linkedMap.Insert(lump, tex);
|
||||
}
|
||||
|
|
@ -1644,7 +1644,7 @@ void FTextureManager::SetLinkedTexture(int lump, FGameTexture* tex)
|
|||
|
||||
FGameTexture* FTextureManager::GetLinkedTexture(int lump)
|
||||
{
|
||||
if (lump < fileSystem.GetNumEntries())
|
||||
if (lump < fileSystem.GetFileCount())
|
||||
{
|
||||
auto check = linkedMap.CheckKey(lump);
|
||||
if (check) return *check;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue