Added sounds

This commit is contained in:
Vladislav Khorev committed 2026-07-07 23:05:01 +03:00
1 parent c6ba8bd008
commit 124208f2a4
26 files changed
+210 -36

No files matched your search

+6 -4
View File
@@ -16,7 +16,6 @@
#include <android/log.h>
#endif
#ifdef EMSCRIPTEN
#include <emscripten.h>
#endif
@@ -258,10 +257,12 @@ namespace ZL
menuManager.onItemPickedUp(itemId);
const Item* item = ItemRegistry::instance().findById(itemId);
if (item) menuManager.showToast(menuManager.toastTextureItemAdded, item->name);
audioPlayer->playSoundAsync("audio/831642__ienba__generic-game-pick-up.ogg");
};
gameState.inventory.onItemRemoved = [this](const std::string& itemId) {
const Item* item = ItemRegistry::instance().findById(itemId);
if (item) menuManager.showToast(menuManager.toastTextureItemRemoved, item->name);
audioPlayer->playSoundAsync("audio/831642__ienba__generic-game-pick-up.ogg");
};
// Wire phone dialogue start function so MenuManager can trigger dialogues.
@@ -433,7 +434,7 @@ namespace ZL
uniInteriorParams.playerPosition = Eigen::Vector3f(0.942694, 0, -9.63104);
gameState.locations["uni_interior"] = std::make_shared<Location>(renderer, gameState.inventory);
gameState.locations["uni_interior"]->setup(uniInteriorParams, &gameState.questJournal);
gameState.locations["uni_interior"]->setup(uniInteriorParams, &gameState.questJournal, audioPlayer.get());
gameState.locations["uni_interior"]->scriptEngine.setGlobalStore(&gameState.globalInts);
gameState.locations["uni_interior"]->scriptEngine.setGlobalFloatStore(&gameState.globalFloats);
gameState.locations["uni_interior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { gameState.isNight = isNight; gameState.isDawn = isDawn; };
@@ -487,7 +488,7 @@ namespace ZL
gameState.locations["uni_exterior"] = std::make_shared<Location>(renderer, gameState.inventory);
gameState.locations["uni_exterior"]->setup(uniExteriorParams, &gameState.questJournal);
gameState.locations["uni_exterior"]->setup(uniExteriorParams, &gameState.questJournal, audioPlayer.get());
gameState.locations["uni_exterior"]->scriptEngine.setGlobalStore(&gameState.globalInts);
gameState.locations["uni_exterior"]->scriptEngine.setGlobalFloatStore(&gameState.globalFloats);
gameState.locations["uni_exterior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) {
@@ -547,7 +548,7 @@ namespace ZL
params_dorm.playerPosition = Eigen::Vector3f(6.76345, 0, -14.6022);
gameState.locations["location_dorm"] = std::make_shared<Location>(renderer, gameState.inventory);
gameState.locations["location_dorm"]->setup(params_dorm, &gameState.questJournal);
gameState.locations["location_dorm"]->setup(params_dorm, &gameState.questJournal, audioPlayer.get());
gameState.locations["location_dorm"]->scriptEngine.setGlobalStore(&gameState.globalInts);
gameState.locations["location_dorm"]->scriptEngine.setGlobalFloatStore(&gameState.globalFloats);
gameState.locations["location_dorm"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { gameState.isNight = isNight; gameState.isDawn = isDawn; };
@@ -1482,6 +1483,7 @@ namespace ZL
bool Game::startDarklandsTransition()
{
audioPlayer->playSoundAsync("audio/459618__n-lerche__blow.ogg");
if (!gameState.isNight)
{
currentLocation()->dialogueSystem.startDialogue("darklands_day_dialog001");