| 754 | //========================================================================== |
| 755 | |
| 756 | bool 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 | // |
nothing calls this directly
no test coverage detected