Working on loading
This commit is contained in:
1 parent
d38a75ea72
commit
9b71ee447a
11 files changed
+268
-55
No files matched your search
+12
-5
@@ -126,18 +126,24 @@ namespace FRG {
|
||||
|
||||
void saveGame(int slot);
|
||||
void loadGame(int slot);
|
||||
void playMusicForLoadedGame();
|
||||
SaveSlotInfo readSlotInfo(int slot) const;
|
||||
// Every campaign's locations, all built at startup (campaign id -> locations).
|
||||
// gameState.locations is a copy of the active campaign's entry.
|
||||
// Locations of the loaded campaign (campaign id -> locations); at most one entry,
|
||||
// empty until the player starts or loads a game. gameState.locations is a copy
|
||||
// of the active campaign's entry.
|
||||
std::unordered_map<std::string, LocationMap> campaignLocations;
|
||||
|
||||
// Builds one location from its config and wires the callbacks every location gets.
|
||||
std::shared_ptr<Location> createLocation(const LocationConfig& config);
|
||||
// Wires the callbacks that span a campaign's locations (teleports, dialogue, HUD...).
|
||||
void wireCampaignLocations(LocationMap& locations);
|
||||
// Queues one loading step per location of `campaign`, plus its wiring step.
|
||||
void queueCampaignBuildSteps(const CampaignConfig& campaign);
|
||||
// Makes `campaignId` the played campaign: its locations and its quest definitions.
|
||||
// Runs `then` with the campaign active. If its locations aren't loaded, they are
|
||||
// built first behind the campaign's loading screen (one loading step per
|
||||
// location) and any other loaded campaign is released.
|
||||
void loadCampaignThen(const std::string& campaignId, std::function<void()> then);
|
||||
// Releases every loaded campaign's locations and the textures only they used.
|
||||
void unloadCampaigns();
|
||||
// Makes a loaded campaign the played one: its locations and its quest definitions.
|
||||
void activateCampaign(const std::string& campaignId);
|
||||
const CampaignConfig& activeCampaign() const;
|
||||
|
||||
@@ -168,6 +174,7 @@ namespace FRG {
|
||||
void drawUI();
|
||||
|
||||
void drawLoading();
|
||||
void drawLoadingScreenUi();
|
||||
|
||||
void onPointerDown(int64_t fingerId, int eventX, int eventY, int mx, int my);
|
||||
void onPointerUp(int64_t fingerId, int eventX, int eventY, int mx, int my);
|
||||
|
||||
Reference in new issue
Block a user