MCPcopy Create free account
hub / github.com/ZDoom/Raze / FindMapByName

Function FindMapByName

source/core/mapinfo.cpp:75–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75MapRecord *FindMapByName(const char *nm)
76{
77 if (!nm || !*nm) return nullptr;
78 for (auto& map : mapList)
79 {
80 if (map->labelName.CompareNoCase(nm) == 0)
81 {
82 return map.Data();
83 }
84 }
85 // retry with the path being removed.
86 FString s = ExtractFileBase(nm);
87 for (auto& map : mapList)
88 {
89 if (map->labelName.CompareNoCase(s) == 0)
90 {
91 return map.Data();
92 }
93 }
94 return nullptr;
95}
96
97
98MapRecord *FindMapByLevelNum(int num)

Callers 12

loadconsFunction · 0.85
ParseMapHeaderMethod · 0.85
G_ValidateSavegameFunction · 0.85
changeMapFunction · 0.85
CCMDFunction · 0.85
MainLoopFunction · 0.85
CheckUserMapFunction · 0.85
FindNextMapFunction · 0.85
FindNextSecretMapFunction · 0.85
SetMusicForMapFunction · 0.85
DoStartGameFunction · 0.85
InsertMapFunction · 0.85

Calls 3

ExtractFileBaseFunction · 0.85
CompareNoCaseMethod · 0.80
DataMethod · 0.45

Tested by

no test coverage detected