MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / RefreshCacheLevels

Method RefreshCacheLevels

Sources/Main.cpp:1679–1957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1677}
1678
1679void GameEventHandler::RefreshCacheLevels(bool recreateAll)
1680{
1681 ZoneScopedC(0x888888);
1682
1683 LOGI("Searching for levels...");
1684
1685 auto& resolver = ContentResolver::Get();
1686
1687 Compatibility::EventConverter eventConverter;
1688
1689 bool hasChristmasChronicles = fs::IsReadableFile(fs::FindPathCaseInsensitive(fs::CombinePath(resolver.GetSourcePath(), "xmas99.j2e"_s)));
1690 const HashMap<String, Pair<String, String>> knownLevels = {
1691 { "trainer"_s, { "prince"_s, {} } },
1692 { "castle1"_s, { "prince"_s, "01"_s } },
1693 { "castle1n"_s, { "prince"_s, "02"_s } },
1694 { "carrot1"_s, { "prince"_s, "03"_s } },
1695 { "carrot1n"_s, { "prince"_s, "04"_s } },
1696 { "labrat1"_s, { "prince"_s, "05"_s } },
1697 { "labrat2"_s, { "prince"_s, "06"_s } },
1698 { "labrat3"_s, { "prince"_s, "bonus"_s } },
1699
1700 { "colon1"_s, { "rescue"_s, "01"_s } },
1701 { "colon2"_s, { "rescue"_s, "02"_s } },
1702 { "psych1"_s, { "rescue"_s, "03"_s } },
1703 { "psych2"_s, { "rescue"_s, "04"_s } },
1704 { "beach"_s, { "rescue"_s, "05"_s } },
1705 { "beach2"_s, { "rescue"_s, "06"_s } },
1706 { "psych3"_s, { "rescue"_s, "bonus"_s } },
1707
1708 { "diam1"_s, { "flash"_s, "01"_s } },
1709 { "diam3"_s, { "flash"_s, "02"_s } },
1710 { "tube1"_s, { "flash"_s, "03"_s } },
1711 { "tube2"_s, { "flash"_s, "04"_s } },
1712 { "medivo1"_s, { "flash"_s, "05"_s } },
1713 { "medivo2"_s, { "flash"_s, "06"_s } },
1714 { "garglair"_s, { "flash"_s, "bonus"_s } },
1715 { "tube3"_s, { "flash"_s, "bonus"_s } },
1716
1717 { "jung1"_s, { "monk"_s, "01"_s } },
1718 { "jung2"_s, { "monk"_s, "02"_s } },
1719 { "hell"_s, { "monk"_s, "03"_s } },
1720 { "hell2"_s, { "monk"_s, "04"_s } },
1721 { "damn"_s, { "monk"_s, "05"_s } },
1722 { "damn2"_s, { "monk"_s, "06"_s } },
1723
1724 { "share1"_s, { "share"_s, "01"_s } },
1725 { "share2"_s, { "share"_s, "02"_s } },
1726 { "share3"_s, { "share"_s, "03"_s } },
1727
1728 { "xmas1"_s, { "xmas99"_s, "01"_s } },
1729 { "xmas2"_s, { "xmas99"_s, "02"_s } },
1730 { "xmas3"_s, { "xmas99"_s, "03"_s } },
1731
1732 { "easter1"_s, { "secretf"_s, "01"_s } },
1733 { "easter2"_s, { "secretf"_s, "02"_s } },
1734 { "easter3"_s, { "secretf"_s, "03"_s } },
1735 { "haunted1"_s, { "secretf"_s, "04"_s } },
1736 { "haunted2"_s, { "secretf"_s, "05"_s } },

Callers 1

OnShowMethod · 0.80

Calls 15

lowercaseInPlaceFunction · 0.85
GetSourcePathMethod · 0.80
firstMethod · 0.80
GetCachePathMethod · 0.80
DirectoryClass · 0.50
StringClass · 0.50
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
OpenMethod · 0.45
ConvertMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected