Working on tutorial refactoring
This commit is contained in:
1 parent
ea8f64c940
commit
9fa120d4ad
82 files changed
+1877
-7563
No files matched your search
+23
-29
@@ -63,6 +63,10 @@ namespace FRG {
|
||||
|
||||
void tutorialShowTaxiHint();
|
||||
|
||||
// Shows the HUD for the current location with its callbacks wired and visibility
|
||||
// applied. Game calls it once a new game's state has been reset.
|
||||
void showGameplayHud();
|
||||
|
||||
void setChatUnread(int chatIndex, bool unread, const std::string& previewMsg = "");
|
||||
|
||||
void spendMoney(int amount);
|
||||
@@ -75,7 +79,6 @@ namespace FRG {
|
||||
std::function<void(int)> chatOpenCallback;
|
||||
std::function<void()> skipCutsceneFunc;
|
||||
std::function<void()> callTaxiFunc;
|
||||
std::function<void()> tutorialUnlockInteractiveObjectsFunc;
|
||||
std::function<void(int)> onSaveGame;
|
||||
std::function<void(int)> onLoadGame;
|
||||
std::function<SaveSlotInfo(int)> getSlotInfoFunc;
|
||||
@@ -93,7 +96,6 @@ namespace FRG {
|
||||
void onChatBubbleReady(const std::string& text, bool incoming);
|
||||
|
||||
void setDarklandsMode(bool enabled);
|
||||
void advanceTutorialStep();
|
||||
void onItemPickedUp(const std::string& itemId);
|
||||
void onLocationChanged(const std::string& locationName);
|
||||
void onEnemyKilledInUniInterior();
|
||||
@@ -137,6 +139,9 @@ namespace FRG {
|
||||
#else
|
||||
bool shadowsEnabled = true;
|
||||
#endif
|
||||
// Applied only when a new game starts (off = start with the tutorial Completed);
|
||||
// saved games keep their own tutorial progress.
|
||||
bool tutorialEnabledSetting = true;
|
||||
std::string lastMusicTrack;
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
@@ -160,15 +165,18 @@ namespace FRG {
|
||||
AudioPlayerAsync& audioPlayer_;
|
||||
|
||||
void enterGameplay(bool isFromLoad = false);
|
||||
void applyHudForCurrentState();
|
||||
// HUD layout for the current location and darklands mode.
|
||||
std::shared_ptr<UiNode> gameplayHudRoot() const;
|
||||
// Single place that decides which HUD buttons and tutorial hints are visible:
|
||||
// buttons follow the inventory, hints follow gameState_.tutorialStep and the
|
||||
// tutorial flags. Runs every frame; names absent from the shown screen are skipped.
|
||||
void refreshHudVisibility();
|
||||
void refreshQuestJournalUi();
|
||||
void reloadLocalizedGameContent();
|
||||
std::shared_ptr<UiNode> loadLocalizedUi(const std::string& basePath, const std::string& zipFile);
|
||||
std::shared_ptr<Texture> loadLocalizedTexture(const std::string& basePath, const std::string& zipFile);
|
||||
void loadUiRoots(const std::string& zipFile);
|
||||
void selectQuestByIndex(int index);
|
||||
void refreshItemPickupHud();
|
||||
void setupStep5Callbacks();
|
||||
void setupGameplayHudCallbacks();
|
||||
void openPhoneMessenger();
|
||||
void openPhoneBank();
|
||||
@@ -182,7 +190,6 @@ namespace FRG {
|
||||
void openPhoneChatFromList(int chatIndex, std::shared_ptr<UiNode> chatRoot);
|
||||
void returnToPhoneChatList();
|
||||
void closePhoneScreenFromChat();
|
||||
void applyUniIntHud();
|
||||
void rebuildChatBubblesFromHistory(int chatIndex, bool isPortrait);
|
||||
void showModalMenuScreen();
|
||||
|
||||
@@ -196,7 +203,8 @@ namespace FRG {
|
||||
void showCreditsScreen();
|
||||
void showSettingsScreen();
|
||||
void showSettingsGraphicsScreen();
|
||||
|
||||
void setupTutorialToggle();
|
||||
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
void showSettingsNoMusicWebScreen();
|
||||
@@ -235,30 +243,19 @@ namespace FRG {
|
||||
int journalMenuStackDepth_ = 0;
|
||||
std::vector<std::string> visibleQuestIds;
|
||||
|
||||
std::shared_ptr<UiNode> hudRoot;
|
||||
std::shared_ptr<UiNode> hudStep1Root;
|
||||
std::shared_ptr<UiNode> hudStep2Root;
|
||||
std::shared_ptr<UiNode> hudStep3Root;
|
||||
std::shared_ptr<UiNode> hudStep4Root;
|
||||
std::shared_ptr<UiNode> hudStep5aRoot;
|
||||
std::shared_ptr<UiNode> hudStep5bRoot;
|
||||
std::shared_ptr<UiNode> hudStep5abRoot;
|
||||
// One HUD per location (+ darklands variant); each holds all of its buttons and
|
||||
// tutorial hints, refreshHudVisibility() shows the relevant ones.
|
||||
std::shared_ptr<UiNode> hudDormRoot;
|
||||
std::shared_ptr<UiNode> hudUniExtRoot;
|
||||
std::shared_ptr<UiNode> hudUniIntStep10Root;
|
||||
std::shared_ptr<UiNode> hudUniIntStep11Root;
|
||||
std::shared_ptr<UiNode> hudUniIntStep12Root;
|
||||
std::shared_ptr<UiNode> hudUniIntFullRoot;
|
||||
std::shared_ptr<UiNode> hudUniIntStep13Root;
|
||||
std::shared_ptr<UiNode> hudUniIntDarkFullRoot;
|
||||
std::shared_ptr<UiNode> hudUniExtDarkRoot;
|
||||
std::shared_ptr<UiNode> hudUniIntRoot;
|
||||
std::shared_ptr<UiNode> hudUniIntDarkRoot;
|
||||
|
||||
std::shared_ptr<UiNode> hudCutsceneRoot_;
|
||||
// "Click to advance the dialogue" hint; drawn by topUiManager, above the dialogue.
|
||||
std::shared_ptr<UiNode> hudTopHintRoot_;
|
||||
|
||||
std::shared_ptr<UiNode> phoneMainRoot;
|
||||
std::shared_ptr<UiNode> phoneMainHintARoot;
|
||||
std::shared_ptr<UiNode> phoneMainHintBRoot;
|
||||
std::shared_ptr<UiNode> phoneMainHintABRoot;
|
||||
|
||||
std::shared_ptr<UiNode> phoneBankRoot;
|
||||
std::shared_ptr<UiNode> phoneVideoRoot;
|
||||
@@ -267,17 +264,12 @@ namespace FRG {
|
||||
|
||||
// Portrait-mode (vertical) equivalents for screens that have a portrait layout
|
||||
std::shared_ptr<UiNode> verticalPhoneMainRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneMainHintARoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneMainHintBRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneMainHintABRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneBankRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneVideoRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneMapDormRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneMapUniRoot;
|
||||
std::shared_ptr<UiNode> phoneChatListRoot;
|
||||
std::shared_ptr<UiNode> phoneChatListHintRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneChatListRoot;
|
||||
std::shared_ptr<UiNode> verticalPhoneChatListHintRoot;
|
||||
std::shared_ptr<UiNode> phoneChat1Root;
|
||||
std::shared_ptr<UiNode> phoneChat2Root;
|
||||
std::shared_ptr<UiNode> phoneChat3Root;
|
||||
@@ -367,6 +359,8 @@ namespace FRG {
|
||||
std::string musicToggleOff;
|
||||
std::string soundToggleOn;
|
||||
std::string soundToggleOff;
|
||||
std::string tutorialToggleOn;
|
||||
std::string tutorialToggleOff;
|
||||
std::string fullScreenToggleOn;
|
||||
std::string fullScreenToggleOff;
|
||||
std::string shadowToggleOn;
|
||||
|
||||
Reference in new issue
Block a user