Fixing inconsistency between day and nights on uni_int location

This commit is contained in:
Vladislav Khorev committed 2026-06-11 21:19:39 +03:00
1 parent f52b6872b0
commit a9f4025333
10 files changed
+154 -54

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ namespace ZL
Game::Game()
: newTickCount(0)
, lastTickCount(0)
, menuManager(renderer)
, menuManager(renderer, globalInts)
, audioPlayer(std::make_unique<AudioPlayerAsync>())
{
}
+13 -3
View File
@@ -75,8 +75,9 @@ namespace ZL {
}
}
MenuManager::MenuManager(Renderer& iRenderer) :
renderer(iRenderer)
MenuManager::MenuManager(Renderer& iRenderer, std::unordered_map<std::string, int>& globalInts) :
renderer(iRenderer),
globalInts(globalInts)
{
}
@@ -492,13 +493,22 @@ namespace ZL {
});
uiManager.setButtonCallback("videoSkip", [this](const std::string&) {
closePhoneEntirely();
if (isNight)
{
startDialogueFunc("dialog_video002");
}
else
{
startNightTransitionFunc();
auto day = globalInts["day"];
if (day == 0)
{
startDialogueFunc("dialog_video003");
}
else
{
startNightTransitionFunc();
}
}
});
}
+2 -1
View File
@@ -38,13 +38,14 @@ namespace ZL {
UiManager uiManager;
UiManager topUiManager;
ZL::Quest::QuestJournal questJournal;
std::unordered_map<std::string, int>& globalInts;
// Global night mode state — persists across location transitions.
bool isNight = false;
bool isDawn = false; // sub-variant of night: brighter pink ambient, same lighting
MenuManager(Renderer& iRenderer);
MenuManager(Renderer& iRenderer, std::unordered_map<std::string, int>& globalInts);
void setup(Inventory& inv, const std::string& zipFile);