[Scummvm-git-logs] scummvm master -> 7f6aa593a89e5a3eb105575a1daa1f09fbba5402
dwatteau
noreply at scummvm.org
Sun Sep 1 12:22:44 UTC 2024
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:
7f6aa593a8 SCUMM: MM (NES): Fix sound effect when starting a new game (Trac#2536)
Commit: 7f6aa593a89e5a3eb105575a1daa1f09fbba5402
https://github.com/scummvm/scummvm/commit/7f6aa593a89e5a3eb105575a1daa1f09fbba5402
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-09-01T14:21:13+02:00
Commit Message:
SCUMM: MM (NES): Fix sound effect when starting a new game (Trac#2536)
We should play the "Pickum item" sound when starting a new game, but until
now, only the "crickets" sound was played in ScummVM.
Using triggerSound() instead of addSoundToQueue() to deal with this sound
effect fixes this, and AndywinXp confirmed from 6502 disasm that "whatever
is called through startSound is executed immediately", and "there doesn't
seem to be a sound queue."
Thanks a lot again, Andy! :)
Changed paths:
engines/scumm/script_v2.cpp
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 186f007b443..a0ed8fd60f8 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1594,8 +1594,9 @@ void ScummEngine_v2::o2_pickupObject() {
if (getObjectIndex(obj) == -1)
return;
- if (whereIsObject(obj) == WIO_INVENTORY) /* Don't take an */
- return; /* object twice */
+ // Don't take an object twice
+ if (whereIsObject(obj) == WIO_INVENTORY)
+ return;
addObjectToInventory(obj, _roomResource);
markObjectRectAsDirty(obj);
@@ -1605,7 +1606,7 @@ void ScummEngine_v2::o2_pickupObject() {
runInventoryScript(1);
if (_game.platform == Common::kPlatformNES)
- _sound->startSound(51); // play 'pickup' sound
+ _sound->triggerSound(51); // play 'pickup' sound (not using the queue; see Trac#2536)
}
void ScummEngine_v2::o2_cursorCommand() { // TODO: Define the magic numbers
More information about the Scummvm-git-logs
mailing list