mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 00:21:34 +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)
|
CCMD(listmaps)
|
||||||
{
|
{
|
||||||
|
int iwadNum = fileSystem.GetIwadNum();
|
||||||
|
|
||||||
for (unsigned i = 0; i < wadlevelinfos.Size(); i++)
|
for (unsigned i = 0; i < wadlevelinfos.Size(); i++)
|
||||||
{
|
{
|
||||||
level_info_t *info = &wadlevelinfos[i];
|
level_info_t *info = &wadlevelinfos[i];
|
||||||
|
@ -368,13 +370,20 @@ CCMD(listmaps)
|
||||||
|
|
||||||
if (map != NULL)
|
if (map != NULL)
|
||||||
{
|
{
|
||||||
|
int mapWadNum = fileSystem.GetFileContainer(map->lumpnum);
|
||||||
|
|
||||||
if (argv.argc() == 1
|
if (argv.argc() == 1
|
||||||
|| CheckWildcards(argv[1], info->MapName.GetChars())
|
|| CheckWildcards(argv[1], info->MapName.GetChars())
|
||||||
|| CheckWildcards(argv[1], info->LookupLevelName().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(),
|
bool isFromPwad = mapWadNum != iwadNum;
|
||||||
fileSystem.GetResourceFileName(fileSystem.GetFileContainer(map->lumpnum)));
|
|
||||||
|
const char* lineColor = isFromPwad ? TEXTCOLOR_LIGHTBLUE : "";
|
||||||
|
|
||||||
|
Printf("%s%s: '%s' (%s)\n", lineColor, info->MapName.GetChars(),
|
||||||
|
info->LookupLevelName().GetChars(),
|
||||||
|
fileSystem.GetResourceFileName(mapWadNum));
|
||||||
}
|
}
|
||||||
delete map;
|
delete map;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue