[Scummvm-git-logs] scummvm master -> d0b3ed1fc4ce7a8a0f587785a286d8c1b0feed47
dreammaster
noreply at scummvm.org
Thu Oct 8 10:39:33 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
effbf8a12f MADS: FOREST: Add digi console command
d0b3ed1fc4 MADS: FOREST: Fix catapulted fox sound cut off #17289
Commit: effbf8a12f8850352a02892fb276815e51b8a7d6
https://github.com/scummvm/scummvm/commit/effbf8a12f8850352a02892fb276815e51b8a7d6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-10-08T21:17:36+11:00
Commit Message:
MADS: FOREST: Add digi console command
Changed paths:
A engines/mads/forest/console.cpp
A engines/mads/forest/console.h
engines/mads/forest/forest.cpp
engines/mads/module.mk
diff --git a/engines/mads/forest/console.cpp b/engines/mads/forest/console.cpp
new file mode 100644
index 00000000000..299805fae7b
--- /dev/null
+++ b/engines/mads/forest/console.cpp
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "mads/forest/console.h"
+#include "mads/forest/sound/digi.h"
+
+namespace MADS {
+namespace Forest {
+
+Console::Console() : MADS::Console() {
+ registerCmd("digi", WRAP_METHOD(Console, cmdDigi));
+}
+
+bool Console::cmdDigi(int argc, const char **argv) {
+ if (argc != 2) {
+ debugPrintf("digi <name>\n");
+ return true;
+ } else {
+ digi_play(argv[1], 2);
+ return false;
+ }
+}
+
+} // namespace Forest
+} // namespace MADS
diff --git a/engines/mads/forest/console.h b/engines/mads/forest/console.h
new file mode 100644
index 00000000000..c90559b14a0
--- /dev/null
+++ b/engines/mads/forest/console.h
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MADS_FOREST_CONSOLE_H
+#define MADS_FOREST_CONSOLE_H
+
+#include "mads/console.h"
+
+namespace MADS {
+namespace Forest {
+
+class Console : public MADS::Console {
+private:
+ bool cmdDigi(int argc, const char **argv);
+
+public:
+ Console();
+ ~Console() override {}
+};
+
+} // namespace Forest
+} // namespace MADS
+
+#endif
diff --git a/engines/mads/forest/forest.cpp b/engines/mads/forest/forest.cpp
index 16b0637c741..dd4d4edc3ca 100644
--- a/engines/mads/forest/forest.cpp
+++ b/engines/mads/forest/forest.cpp
@@ -20,7 +20,6 @@
*/
#include "engines/util.h"
-#include "mads/console.h"
#include "mads/core/attr.h"
#include "mads/core/conv.h"
#include "mads/core/env.h"
@@ -38,6 +37,7 @@
#include "mads/core/sound.h"
#include "mads/core/text.h"
#include "mads/forest/forest.h"
+#include "mads/forest/console.h"
#include "mads/forest/extra.h"
#include "mads/forest/global.h"
#include "mads/forest/inventory.h"
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 4db6ca11997..93ffcf58c4b 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -374,6 +374,7 @@ MODULE_OBJS := \
dragonsphere/sound/rsound_dragonsphere.o \
dragonsphere/sound/sound.o \
forest/forest.o \
+ forest/console.o \
forest/extra.o \
forest/global.o \
forest/inventory.o \
Commit: d0b3ed1fc4ce7a8a0f587785a286d8c1b0feed47
https://github.com/scummvm/scummvm/commit/d0b3ed1fc4ce7a8a0f587785a286d8c1b0feed47
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-10-08T21:39:19+11:00
Commit Message:
MADS: FOREST: Fix catapulted fox sound cut off #17289
Thanks to Tropp
Changed paths:
engines/mads/forest/sound/digi.cpp
engines/mads/forest/sound/digi.h
diff --git a/engines/mads/forest/sound/digi.cpp b/engines/mads/forest/sound/digi.cpp
index 55c6432f191..9747764cc97 100644
--- a/engines/mads/forest/sound/digi.cpp
+++ b/engines/mads/forest/sound/digi.cpp
@@ -46,7 +46,9 @@ DigiPlayer::DigiPlayer(Audio::Mixer *mixer) : _mixer(mixer) {
}
void DigiPlayer::play(const char *name, int slot) {
- stop(slot);
+ // Stop any previous sound on the channel without firing any end trigger
+ stopChannel(slot, false);
+
DigiChannel &c = _channels[slot - 1];
Audio::AudioStream *audioStream;
Common::SeekableReadStream *src;
@@ -89,6 +91,10 @@ void DigiPlayer::play(const char *name, int slot) {
}
void DigiPlayer::stop(int slot) {
+ stopChannel(slot, true);
+}
+
+void DigiPlayer::stopChannel(int slot, bool signalEnd) {
assert(slot >= 1 && slot <= MAX_DIGI_CHANNELS);
DigiChannel &c = _channels[slot - 1];
@@ -96,7 +102,7 @@ void DigiPlayer::stop(int slot) {
_mixer->stopHandle(c._soundHandle);
c._isPlaying = false;
- if (c._endTrigger) {
+ if (signalEnd && c._endTrigger) {
kernel.trigger_setup_mode = KERNEL_TRIGGER_DAEMON;
kernel_timing_trigger(1, c._triggerId);
}
diff --git a/engines/mads/forest/sound/digi.h b/engines/mads/forest/sound/digi.h
index b023c3d5ef3..7a50d0a6260 100644
--- a/engines/mads/forest/sound/digi.h
+++ b/engines/mads/forest/sound/digi.h
@@ -43,6 +43,8 @@ private:
DigiChannel _channels[MAX_DIGI_CHANNELS];
int _initialVolume = MAX_DIGI_VOLUME;
+ void stopChannel(int slot, bool signalEnd);
+
public:
DigiPlayer(Audio::Mixer *mixer);
More information about the Scummvm-git-logs
mailing list