mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-04 01:41:42 +00:00
renamed GetFileFullName to GetFileName
This commit is contained in:
parent
941f9502e9
commit
ba2800d698
24 changed files with 43 additions and 43 deletions
|
@ -244,7 +244,7 @@ CCMD (wdir)
|
|||
{
|
||||
if (wadnum == -1 || fileSystem.GetFileContainer(i) == wadnum)
|
||||
{
|
||||
Printf ("%10ld %s\n", fileSystem.FileLength(i), fileSystem.GetFileFullName(i));
|
||||
Printf ("%10ld %s\n", fileSystem.FileLength(i), fileSystem.GetFileName(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -508,7 +508,7 @@ public:
|
|||
}
|
||||
if (!MusicStream)
|
||||
{
|
||||
Printf(PRINT_BOLD, "Failed to decode %s\n", fileSystem.GetFileFullName(soundtrack, false));
|
||||
Printf(PRINT_BOLD, "Failed to decode %s\n", fileSystem.GetFileName(soundtrack, false));
|
||||
}
|
||||
}
|
||||
animtex.SetSize(AnimTexture::VPX, width, height);
|
||||
|
|
|
@ -1181,7 +1181,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FTextureID &value, FTe
|
|||
|
||||
if (TexMan.GetLinkedTexture(lump) == pic)
|
||||
{
|
||||
name = fileSystem.GetFileFullName(lump);
|
||||
name = fileSystem.GetFileName(lump);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
ptrdiff_t FileLength (int lump) const;
|
||||
int GetFileFlags (int lump); // Return the flags for this lump
|
||||
const char* GetFileShortName(int lump) const;
|
||||
const char *GetFileFullName (int lump, bool returnshort = true) const; // [RH] Returns the lump's full name
|
||||
const char *GetFileName (int lump, bool returnshort = true) const; // [RH] Returns the lump's full name
|
||||
std::string GetFileFullPath (int lump) const; // [RH] Returns wad's name + lump's full name
|
||||
int GetFileContainer (int lump) const; // [RH] Returns wadnum for a specified lump
|
||||
int GetFileNamespace (int lump) const; // [RH] Returns the namespace a lump belongs to
|
||||
|
|
|
@ -1051,7 +1051,7 @@ const char* FileSystem::GetFileShortName(int lump) const
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
const char *FileSystem::GetFileFullName (int lump, bool returnshort) const
|
||||
const char *FileSystem::GetFileName (int lump, bool returnshort) const
|
||||
{
|
||||
if ((size_t)lump >= NumEntries)
|
||||
return NULL;
|
||||
|
@ -1078,7 +1078,7 @@ std::string FileSystem::GetFileFullPath(int lump) const
|
|||
{
|
||||
foo = GetResourceFileName(FileInfo[lump].rfnum);
|
||||
foo += ':';
|
||||
foo += +GetFileFullName(lump);
|
||||
foo += +GetFileName(lump);
|
||||
}
|
||||
return foo;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ FTextureID LoadSkin(const char * path, const char * fn)
|
|||
buffer.Format("%s%s", path, fn);
|
||||
|
||||
int texlump = FindGFXFile(buffer);
|
||||
const char * const texname = texlump < 0 ? fn : fileSystem.GetFileFullName(texlump);
|
||||
const char * const texname = texlump < 0 ? fn : fileSystem.GetFileName(texlump);
|
||||
return TexMan.CheckForTexture(texname, ETextureType::Any, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ForceLookup);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ bool FUE1Model::Load( const char *filename, int lumpnum, const char *buffer, int
|
|||
{
|
||||
int lumpnum2;
|
||||
hasSurfaces = true;
|
||||
FString realfilename = fileSystem.GetFileFullName(lumpnum);
|
||||
FString realfilename = fileSystem.GetFileName(lumpnum);
|
||||
if ( (size_t)realfilename.IndexOf("_d.3d") == realfilename.Len()-5 )
|
||||
{
|
||||
realfilename.Substitute("_d.3d","_a.3d");
|
||||
|
|
|
@ -309,7 +309,7 @@ FVoxelDef *R_LoadVoxelDef(int lumpnum, int spin)
|
|||
FVoxel *vox = R_LoadKVX(lumpnum);
|
||||
if (vox == NULL)
|
||||
{
|
||||
Printf("%s is not a valid voxel file\n", fileSystem.GetFileFullName(lumpnum));
|
||||
Printf("%s is not a valid voxel file\n", fileSystem.GetFileName(lumpnum));
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2585,7 +2585,7 @@ static void PMapValueWriter(FSerializer &ar, const M *map, const PMap *m)
|
|||
|
||||
if (TexMan.GetLinkedTexture(lump) == tex)
|
||||
{
|
||||
name = fileSystem.GetFileFullName(lump);
|
||||
name = fileSystem.GetFileName(lump);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -426,7 +426,7 @@ DEFINE_ACTION_FUNCTION(_TexMan, GetName)
|
|||
// Textures for full path names do not have their own name, they merely link to the source lump.
|
||||
auto lump = tex->GetSourceLump();
|
||||
if (TexMan.GetLinkedTexture(lump) == tex)
|
||||
retval = fileSystem.GetFileFullName(lump);
|
||||
retval = fileSystem.GetFileName(lump);
|
||||
}
|
||||
}
|
||||
ACTION_RETURN_STRING(retval);
|
||||
|
@ -850,7 +850,7 @@ DEFINE_ACTION_FUNCTION(_Wads, GetLumpFullName)
|
|||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(lump);
|
||||
ACTION_RETURN_STRING(fileSystem.GetFileFullName(lump));
|
||||
ACTION_RETURN_STRING(fileSystem.GetFileName(lump));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, GetLumpNamespace)
|
||||
|
|
|
@ -119,12 +119,12 @@ FImageSource *PNGImage_TryCreate(FileReader & data, int lumpnum)
|
|||
|
||||
if (compression != 0 || filter != 0 || interlace > 1)
|
||||
{
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the compression, filter, or interlace is not supported!\n", fileSystem.GetFileFullName(lumpnum));
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the compression, filter, or interlace is not supported!\n", fileSystem.GetFileName(lumpnum));
|
||||
return NULL;
|
||||
}
|
||||
if (!((1 << colortype) & 0x5D))
|
||||
{
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the colortype (%u) is not supported!\n", fileSystem.GetFileFullName(lumpnum), colortype);
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the colortype (%u) is not supported!\n", fileSystem.GetFileName(lumpnum), colortype);
|
||||
return NULL;
|
||||
}
|
||||
if (!((1 << bitdepth) & 0x116))
|
||||
|
@ -150,12 +150,12 @@ FImageSource *PNGImage_TryCreate(FileReader & data, int lumpnum)
|
|||
int ihoty = data.ReadInt32BE();
|
||||
if (ihotx < -32768 || ihotx > 32767)
|
||||
{
|
||||
Printf("X-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileFullName(lumpnum), ihotx, ihotx);
|
||||
Printf("X-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileName(lumpnum), ihotx, ihotx);
|
||||
ihotx = 0;
|
||||
}
|
||||
if (ihoty < -32768 || ihoty > 32767)
|
||||
{
|
||||
Printf("Y-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileFullName(lumpnum), ihoty, ihoty);
|
||||
Printf("Y-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileName(lumpnum), ihoty, ihoty);
|
||||
ihoty = 0;
|
||||
}
|
||||
tex->SetOffsets(ihotx, ihoty);
|
||||
|
@ -169,7 +169,7 @@ FImageSource *PNGImage_TryCreate(FileReader & data, int lumpnum)
|
|||
return tex;
|
||||
}
|
||||
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the bit-depth (%u) is not supported!\n", fileSystem.GetFileFullName(lumpnum), bitdepth);
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the bit-depth (%u) is not supported!\n", fileSystem.GetFileName(lumpnum), bitdepth);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ FImageSource *PNGImage_TryCreate(FileReader & data, int lumpnum)
|
|||
{
|
||||
if (data.Read(first4bytes.b, 4) != 4 || first4bytes.dw == MAKE_ID('I','E','N','D'))
|
||||
{
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the file ends immediately after the IHDR.\n", fileSystem.GetFileFullName(lumpnum));
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: failed to load PNG %s: the file ends immediately after the IHDR.\n", fileSystem.GetFileName(lumpnum));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -231,12 +231,12 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, int width, int height,
|
|||
int ihoty = lump.ReadInt32BE();
|
||||
if (ihotx < -32768 || ihotx > 32767)
|
||||
{
|
||||
Printf ("X-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileFullName (lumpnum), ihotx, ihotx);
|
||||
Printf ("X-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileName (lumpnum), ihotx, ihotx);
|
||||
ihotx = 0;
|
||||
}
|
||||
if (ihoty < -32768 || ihoty > 32767)
|
||||
{
|
||||
Printf ("Y-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileFullName (lumpnum), ihoty, ihoty);
|
||||
Printf ("Y-Offset for PNG texture %s is bad: %d (0x%08x)\n", fileSystem.GetFileName (lumpnum), ihoty, ihoty);
|
||||
ihoty = 0;
|
||||
}
|
||||
LeftOffset = ihotx;
|
||||
|
|
|
@ -185,7 +185,7 @@ void FGameTexture::AddAutoMaterials()
|
|||
auto lump = fileSystem.CheckNumForFullName(lookup.GetChars(), false, FileSys::ns_global, true);
|
||||
if (lump != -1)
|
||||
{
|
||||
auto bmtex = TexMan.FindGameTexture(fileSystem.GetFileFullName(lump), ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
auto bmtex = TexMan.FindGameTexture(fileSystem.GetFileName(lump), ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
if (bmtex != nullptr)
|
||||
{
|
||||
this->*(layer.pointer) = bmtex->GetTexture();
|
||||
|
@ -202,7 +202,7 @@ void FGameTexture::AddAutoMaterials()
|
|||
auto lump = fileSystem.CheckNumForFullName(lookup.GetChars(), false, FileSys::ns_global, true);
|
||||
if (lump != -1)
|
||||
{
|
||||
auto bmtex = TexMan.FindGameTexture(fileSystem.GetFileFullName(lump), ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
auto bmtex = TexMan.FindGameTexture(fileSystem.GetFileName(lump), ETextureType::Any, FTextureManager::TEXMAN_TryAny);
|
||||
if (bmtex != nullptr)
|
||||
{
|
||||
if (this->Layers == nullptr) this->Layers = std::make_unique<FMaterialLayers>();
|
||||
|
|
|
@ -457,7 +457,7 @@ FTextureID FTextureManager::CreateTexture (int lumpnum, ETextureType usetype)
|
|||
str = fileSystem.GetFileShortName(lumpnum);
|
||||
else
|
||||
{
|
||||
auto fn = fileSystem.GetFileFullName(lumpnum);
|
||||
auto fn = fileSystem.GetFileName(lumpnum);
|
||||
str = ExtractFileBase(fn);
|
||||
}
|
||||
auto out = MakeGameTexture(CreateTextureFromLump(lumpnum, usetype == ETextureType::Flat), str.GetChars(), usetype);
|
||||
|
|
|
@ -960,13 +960,13 @@ int ReadPalette(int lumpnum, uint8_t* buffer)
|
|||
id = MAKE_ID('I', 'E', 'N', 'D');
|
||||
fr.Read(&id, 4);
|
||||
}
|
||||
I_Error("%s contains no palette", fileSystem.GetFileFullName(lumpnum));
|
||||
I_Error("%s contains no palette", fileSystem.GetFileName(lumpnum));
|
||||
}
|
||||
if (memcmp(lumpmem, "JASC-PAL", 8) == 0)
|
||||
{
|
||||
FScanner sc;
|
||||
|
||||
sc.OpenMem(fileSystem.GetFileFullName(lumpnum), (char*)lumpmem, int(lump.size()));
|
||||
sc.OpenMem(fileSystem.GetFileName(lumpnum), (char*)lumpmem, int(lump.size()));
|
||||
sc.MustGetString();
|
||||
sc.MustGetNumber(); // version - ignore
|
||||
sc.MustGetNumber();
|
||||
|
|
|
@ -375,7 +375,7 @@ int FIWadManager::ScanIWAD (const char *iwad)
|
|||
{
|
||||
|
||||
CheckFileName(check.GetFileShortName(ii));
|
||||
auto full = check.GetFileFullName(ii, false);
|
||||
auto full = check.GetFileName(ii, false);
|
||||
if (full && strnicmp(full, "maps/", 5) == 0)
|
||||
{
|
||||
FString mapname(&full[5], strcspn(&full[5], "."));
|
||||
|
|
|
@ -3998,7 +3998,7 @@ CCMD(fs_dir)
|
|||
for (int i = 0; i < numfiles; i++)
|
||||
{
|
||||
auto container = fileSystem.GetResourceFileFullName(fileSystem.GetFileContainer(i));
|
||||
auto fn1 = fileSystem.GetFileFullName(i);
|
||||
auto fn1 = fileSystem.GetFileName(i);
|
||||
auto fns = fileSystem.GetFileShortName(i);
|
||||
auto fnid = fileSystem.GetResourceId(i);
|
||||
auto length = fileSystem.FileLength(i);
|
||||
|
|
|
@ -3098,7 +3098,7 @@ CVAR(Int, dehload, 0, CVAR_ARCHIVE) // Autoloading of .DEH lumps is disabled by
|
|||
// checks if lump is a .deh or .bex file. Only lumps in the root directory are considered valid.
|
||||
static bool isDehFile(int lumpnum)
|
||||
{
|
||||
const char* const fullName = fileSystem.GetFileFullName(lumpnum);
|
||||
const char* const fullName = fileSystem.GetFileName(lumpnum);
|
||||
const char* const extension = strrchr(fullName, '.');
|
||||
|
||||
return NULL != extension && strchr(fullName, '/') == NULL
|
||||
|
|
|
@ -258,7 +258,7 @@ void InitBuildTiles()
|
|||
int numlumps = fileSystem.GetNumEntries();
|
||||
for (int i = 0; i < numlumps; i++)
|
||||
{
|
||||
const char* name = fileSystem.GetFileFullName(i);
|
||||
const char* name = fileSystem.GetFileName(i);
|
||||
if (fileSystem.CheckNumForFullName(name) != i) continue; // This palette is hidden by a later one. Do not process
|
||||
FString base = ExtractFileBase(name, true);
|
||||
base.ToLower();
|
||||
|
|
|
@ -727,7 +727,7 @@ static int FindGLNodesInWAD(int labellump)
|
|||
int wadfile = fileSystem.GetFileContainer(labellump);
|
||||
FString glheader;
|
||||
|
||||
glheader.Format("GL_%s", fileSystem.GetFileFullName(labellump));
|
||||
glheader.Format("GL_%s", fileSystem.GetFileName(labellump));
|
||||
if (glheader.Len()<=8)
|
||||
{
|
||||
int gllabel = fileSystem.CheckNumForName(glheader.GetChars(), FileSys::ns_global, wadfile);
|
||||
|
@ -748,7 +748,7 @@ static int FindGLNodesInWAD(int labellump)
|
|||
if (fileSystem.GetFileContainer(lump)==wadfile)
|
||||
{
|
||||
auto mem = fileSystem.ReadFile(lump);
|
||||
if (MatchHeader(fileSystem.GetFileFullName(labellump), GetStringFromLump(lump).GetChars())) return lump;
|
||||
if (MatchHeader(fileSystem.GetFileName(labellump), GetStringFromLump(lump).GetChars())) return lump;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -881,7 +881,7 @@ bool MapLoader::LoadGLNodes(MapData * map)
|
|||
f_gwa = FResourceFile::OpenResourceFile(path);
|
||||
if (f_gwa==nullptr) return false;
|
||||
|
||||
strncpy(map->MapLumps[0].Name, fileSystem.GetFileFullName(map->lumpnum), 8);
|
||||
strncpy(map->MapLumps[0].Name, fileSystem.GetFileName(map->lumpnum), 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ bool MapLoader::LoadScriptFile(const char *name, int lumpnum, FileReader &lump,
|
|||
|
||||
if ((type == 1 && !isbinary) || (type == 2 && isbinary))
|
||||
{
|
||||
DPrintf(DMSG_ERROR, "Incorrect data format for conversation script in %s.\n", fileSystem.GetFileFullName(lumpnum));
|
||||
DPrintf(DMSG_ERROR, "Incorrect data format for conversation script in %s.\n", fileSystem.GetFileName(lumpnum));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ bool MapLoader::LoadScriptFile(const char *name, int lumpnum, FileReader &lump,
|
|||
// is exactly 1516 bytes long.
|
||||
if (numnodes % 1516 != 0)
|
||||
{
|
||||
DPrintf(DMSG_ERROR, "Incorrect data format for conversation script in %s.\n", fileSystem.GetFileFullName(lumpnum));
|
||||
DPrintf(DMSG_ERROR, "Incorrect data format for conversation script in %s.\n", fileSystem.GetFileName(lumpnum));
|
||||
return false;
|
||||
}
|
||||
numnodes /= 1516;
|
||||
|
@ -225,7 +225,7 @@ bool MapLoader::LoadScriptFile(const char *name, int lumpnum, FileReader &lump,
|
|||
// And the teaser version has 1488-byte entries.
|
||||
if (numnodes % 1488 != 0)
|
||||
{
|
||||
DPrintf(DMSG_ERROR, "Incorrect data format for conversation script in %s.\n", fileSystem.GetFileFullName(lumpnum));
|
||||
DPrintf(DMSG_ERROR, "Incorrect data format for conversation script in %s.\n", fileSystem.GetFileName(lumpnum));
|
||||
return false;
|
||||
}
|
||||
numnodes /= 1488;
|
||||
|
|
|
@ -2481,7 +2481,7 @@ public:
|
|||
isExtended = false;
|
||||
floordrop = false;
|
||||
|
||||
sc.OpenMem(fileSystem.GetFileFullName(map->lumpnum), map->Read(ML_TEXTMAP));
|
||||
sc.OpenMem(fileSystem.GetFileName(map->lumpnum), map->Read(ML_TEXTMAP));
|
||||
sc.SetCMode(true);
|
||||
if (sc.CheckString("namespace"))
|
||||
{
|
||||
|
|
|
@ -562,7 +562,7 @@ public:
|
|||
bool Parse(MapLoader *loader,int lumpnum, FileReader &lump, int lumplen)
|
||||
{
|
||||
Level = loader->Level;
|
||||
sc.OpenMem(fileSystem.GetFileFullName(lumpnum), lump.Read(lumplen));
|
||||
sc.OpenMem(fileSystem.GetFileName(lumpnum), lump.Read(lumplen));
|
||||
sc.SetCMode(true);
|
||||
// Namespace must be the first field because everything else depends on it.
|
||||
if (sc.CheckString("namespace"))
|
||||
|
|
|
@ -167,18 +167,18 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
|
|||
// This case can only happen if the lump is inside a real WAD file.
|
||||
// As such any special handling for other types of lumps is skipped.
|
||||
map->MapLumps[0].Reader = fileSystem.ReopenFileReader(lump_name);
|
||||
strncpy(map->MapLumps[0].Name, fileSystem.GetFileFullName(lump_name), 8);
|
||||
strncpy(map->MapLumps[0].Name, fileSystem.GetFileName(lump_name), 8);
|
||||
map->InWad = true;
|
||||
|
||||
int index = 0;
|
||||
|
||||
if (stricmp(fileSystem.GetFileFullName(lump_name + 1), "TEXTMAP") != 0)
|
||||
if (stricmp(fileSystem.GetFileName(lump_name + 1), "TEXTMAP") != 0)
|
||||
{
|
||||
for(int i = 1;; i++)
|
||||
{
|
||||
// Since levels must be stored in WADs they can't really have full
|
||||
// names and for any valid level lump this always returns the short name.
|
||||
const char * lumpname = fileSystem.GetFileFullName(lump_name + i);
|
||||
const char * lumpname = fileSystem.GetFileName(lump_name + i);
|
||||
try
|
||||
{
|
||||
index = GetMapIndex(mapname, index, lumpname, !justcheck);
|
||||
|
@ -208,7 +208,7 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
|
|||
map->MapLumps[1].Reader = fileSystem.ReopenFileReader(lump_name + 1);
|
||||
for(int i = 2;; i++)
|
||||
{
|
||||
const char * lumpname = fileSystem.GetFileFullName(lump_name + i);
|
||||
const char * lumpname = fileSystem.GetFileName(lump_name + i);
|
||||
|
||||
if (lumpname == NULL)
|
||||
{
|
||||
|
@ -264,7 +264,7 @@ MapData *P_OpenMapData(const char * mapname, bool justcheck)
|
|||
}
|
||||
map->lumpnum = lump_wad;
|
||||
auto reader = fileSystem.ReopenFileReader(lump_wad);
|
||||
map->resource = FResourceFile::OpenResourceFile(fileSystem.GetFileFullName(lump_wad), reader, true);
|
||||
map->resource = FResourceFile::OpenResourceFile(fileSystem.GetFileName(lump_wad), reader, true);
|
||||
wadReader = map->resource->GetContainerReader();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1963,7 +1963,7 @@ FBehavior *FBehaviorContainer::LoadModule (int lumpnum, FileReader *fr, int len,
|
|||
else
|
||||
{
|
||||
delete behavior;
|
||||
Printf(TEXTCOLOR_RED "%s: invalid ACS module\n", fileSystem.GetFileFullName(lumpnum));
|
||||
Printf(TEXTCOLOR_RED "%s: invalid ACS module\n", fileSystem.GetFileName(lumpnum));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue