mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
CCMD listmaps: Colorize maps loaded from pwads in blue text
Colorize maps added from pwads differently so they stand out better
This commit is contained in:
parent
80d1c61714
commit
e0275df931
1 changed files with 12 additions and 3 deletions
|
@ -361,6 +361,8 @@ CCMD(targetinv)
|
|||
|
||||
CCMD(listmaps)
|
||||
{
|
||||
int iwadNum = fileSystem.GetIwadNum();
|
||||
|
||||
for (unsigned i = 0; i < wadlevelinfos.Size(); i++)
|
||||
{
|
||||
level_info_t *info = &wadlevelinfos[i];
|
||||
|
@ -368,13 +370,20 @@ CCMD(listmaps)
|
|||
|
||||
if (map != NULL)
|
||||
{
|
||||
int mapWadNum = fileSystem.GetFileContainer(map->lumpnum);
|
||||
|
||||
if (argv.argc() == 1
|
||||
|| CheckWildcards(argv[1], info->MapName.GetChars())
|
||||
|| CheckWildcards(argv[1], info->LookupLevelName().GetChars())
|
||||
|| CheckWildcards(argv[1], fileSystem.GetResourceFileName(fileSystem.GetFileContainer(map->lumpnum))))
|
||||
|| CheckWildcards(argv[1], fileSystem.GetResourceFileName(mapWadNum)))
|
||||
{
|
||||
Printf("%s: '%s' (%s)\n", info->MapName.GetChars(), info->LookupLevelName().GetChars(),
|
||||
fileSystem.GetResourceFileName(fileSystem.GetFileContainer(map->lumpnum)));
|
||||
bool isFromPwad = mapWadNum != iwadNum;
|
||||
|
||||
const char* lineColor = isFromPwad ? TEXTCOLOR_LIGHTBLUE : "";
|
||||
|
||||
Printf("%s%s: '%s' (%s)\n", lineColor, info->MapName.GetChars(),
|
||||
info->LookupLevelName().GetChars(),
|
||||
fileSystem.GetResourceFileName(mapWadNum));
|
||||
}
|
||||
delete map;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue