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

Method CheckLegacyMapDefinition

source/core/g_mapinfo.cpp:756–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754//==========================================================================
755
756bool FMapInfoParser::CheckLegacyMapDefinition(FString& mapname)
757{
758 if (Internal && (g_gameType & (GAMEFLAG_BLOOD | GAMEFLAG_DUKECOMPAT | GAMEFLAG_SW)) && sc.CheckString("{"))
759 {
760 sc.MustGetNumber();
761 int vol = sc.Number;
762 if (!isSWALL())
763 {
764 // Blood and Duke use volume/level pairs
765 sc.MustGetStringName(",");
766 sc.MustGetNumber();
767 int indx = sc.Number;
768 auto map = FindMapByIndexOnly(vol, indx);
769 if (!map) mapname = "";
770 else mapname = map->labelName;
771 }
772 else
773 {
774 // SW only uses the level number
775 auto map = FindMapByLevelNum(vol);
776 if (!map) mapname = "";
777 else mapname = map->labelName;
778 }
779 sc.MustGetStringName("}");
780 return true;
781 }
782 return false;
783}
784
785//==========================================================================
786//

Callers

nothing calls this directly

Calls 6

isSWALLFunction · 0.85
FindMapByIndexOnlyFunction · 0.85
FindMapByLevelNumFunction · 0.85
MustGetNumberMethod · 0.80
MustGetStringNameMethod · 0.80
CheckStringMethod · 0.45

Tested by

no test coverage detected