working on refactoring

This commit is contained in:
Vladislav Khorev committed 2026-10-24 22:37:20 +06:00
1 parent 9b71ee447a
commit d5ef126264
12 files changed
+309 -219

No files matched your search

+9
View File
@@ -36,6 +36,9 @@ namespace FRG {
// Interactive objects stay locked until the tutorial reaches "pick up an item".
bool lockInteractiveObjectsDuringTutorial = false;
// UI layout shown while this location loads; empty = the campaign's loading screen.
std::string loadingScreenPath;
// Returns false (and logs) when the file can't be read or parsed.
static bool fromFile(const std::string& path, const std::string& zipFile, LocationConfig& out);
};
@@ -45,6 +48,8 @@ namespace FRG {
std::string id;
std::map<std::string, std::string> titles; // language code -> title
std::vector<std::string> locationConfigPaths;
// Parsed from locationConfigPaths when the registry loads.
std::vector<LocationConfig> locations;
std::string startLocation;
std::string startMusic;
std::string startStatePath;
@@ -56,6 +61,10 @@ namespace FRG {
static constexpr const char* kDefaultLoadingScreen = "resources/w/ui/screen_loading.json";
std::string title(Language lang) const;
// Returns nullptr if the campaign has no such location.
const LocationConfig* findLocation(const std::string& locationId) const;
// The location's own loading screen, else the campaign's.
std::string loadingScreenFor(const std::string& locationId) const;
};
// Campaigns listed in resources/config/campaigns.json, in display order.