- mapinfo.cpp: Create CCMD listmaps to return map filenames.

This commit is contained in:
Mitchell Richters 2020-10-14 09:37:36 +11:00
parent bfed4e179b
commit fcfeafdbe9

View file

@ -33,6 +33,7 @@
**
*/
#include "c_dispatch.h"
#include "mapinfo.h"
#include "raze_music.h"
#include "filesystem.h"
@ -50,6 +51,15 @@ MapRecord* lastLevel; // Same here, for the last level.
unsigned int numUsedSlots;
CCMD(listmaps)
{
for (unsigned int i = 0; i < numUsedSlots; i++)
{
Printf("%s\n", mapList[i].fileName.GetChars());
}
}
MapRecord *FindMapByName(const char *nm)
{
for (unsigned i = 0; i < numUsedSlots; i++)