[Scummvm-git-logs] scummvm master -> ef594c7e100b9229ebbf2c0708befc16612c254b
bluegr
bluegr at gmail.com
Wed Mar 24 21:27:20 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ef594c7e10 NANCY: Refactor persistent sound loading, and add some nancy2 chunks
Commit: ef594c7e100b9229ebbf2c0708befc16612c254b
https://github.com/scummvm/scummvm/commit/ef594c7e100b9229ebbf2c0708befc16612c254b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-03-24T23:26:57+02:00
Commit Message:
NANCY: Refactor persistent sound loading, and add some nancy2 chunks
Now, persistent sounds which do not exist will not be loaded. This allows
nancy2 to progress a bit further now - it now crashes when attempting to
initialize the inventory
Changed paths:
engines/nancy/nancy.cpp
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index 01419c930f..636b36d974 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -322,26 +322,31 @@ void NancyEngine::bootGameEngine() {
"MAP", "CD", "TBOX", "CURS", "VIEW", "MSND",
"BUOK", "BUDE", "BULS", "GLOB", "SLID",
"SET", "CURT", "CANT", "TH1", "TH2",
- "QUOT", "TMOD" };
+ "QUOT", "TMOD",
+ // Used in nancy2
+ "FR", "LG", "OB", "CRED", "CLOK",
+ "SPEC"
+ };
+
+ Common::String persistentSounds[] = {
+ "BUOK", "BUDE", "BULS", "GLOB", "CURT",
+ "CANT"
+ };
+
+ SoundDescription desc;
for (auto const &n : names) {
addBootChunk(n, boot->getChunkStream(n));
}
// Persistent sounds that are used across the engine. These originally get loaded inside Logo
- SoundDescription desc;
- desc.read(*g_nancy->getBootChunkStream("BUOK"), SoundDescription::kNormal);
- g_nancy->_sound->loadSound(desc);
- desc.read(*g_nancy->getBootChunkStream("BUDE"), SoundDescription::kNormal);
- g_nancy->_sound->loadSound(desc);
- desc.read(*g_nancy->getBootChunkStream("BULS"), SoundDescription::kNormal);
- g_nancy->_sound->loadSound(desc);
- desc.read(*g_nancy->getBootChunkStream("GLOB"), SoundDescription::kNormal);
- g_nancy->_sound->loadSound(desc);
- desc.read(*g_nancy->getBootChunkStream("CURT"), SoundDescription::kNormal);
- g_nancy->_sound->loadSound(desc);
- desc.read(*g_nancy->getBootChunkStream("CANT"), SoundDescription::kNormal);
- g_nancy->_sound->loadSound(desc);
+ for (auto const &s : persistentSounds) {
+ Common::SeekableReadStream *str = g_nancy->getBootChunkStream(s);
+ if (str) {
+ desc.read(*str, SoundDescription::kNormal);
+ g_nancy->_sound->loadSound(desc);
+ }
+ }
delete boot;
More information about the Scummvm-git-logs
mailing list