- added the resource file name to the listmaps printout.

This commit is contained in:
Christoph Oelckers 2020-10-14 01:13:36 +02:00
parent c17808d789
commit 25d79285a3
2 changed files with 11 additions and 2 deletions

View file

@ -1446,7 +1446,7 @@ const char *FileSystem::GetResourceFileName (int rfnum) const noexcept
name = Files[rfnum]->FileName;
slash = strrchr (name, '/');
return slash != NULL ? slash+1 : name;
return (slash != NULL && slash[1] != 0) ? slash+1 : name;
}
//==========================================================================

View file

@ -55,7 +55,16 @@ CCMD(listmaps)
{
for (unsigned int i = 0; i < numUsedSlots; i++)
{
Printf("%s - %s\n", mapList[i].fileName.GetChars(), mapList[i].DisplayName());
int lump = fileSystem.FindFile(mapList[i].fileName);
if (lump >= 0)
{
int rfnum = fileSystem.GetFileContainer(lump);
Printf("%s - %s (%s)\n", mapList[i].fileName.GetChars(), mapList[i].DisplayName(), fileSystem.GetResourceFileName(rfnum));
}
else
{
Printf("%s - %s (defined but does not exist)\n", mapList[i].fileName.GetChars(), mapList[i].DisplayName());
}
}
}