aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/illusions/duckman/scriptopcodes_duckman.cpp11
-rw-r--r--engines/illusions/duckman/scriptopcodes_duckman.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/engines/illusions/duckman/scriptopcodes_duckman.cpp b/engines/illusions/duckman/scriptopcodes_duckman.cpp
index 5abef682b6..07f83817a4 100644
--- a/engines/illusions/duckman/scriptopcodes_duckman.cpp
+++ b/engines/illusions/duckman/scriptopcodes_duckman.cpp
@@ -118,7 +118,7 @@ void ScriptOpcodes_Duckman::initOpcodes() {
OPCODE(70, opPause);
OPCODE(71, opUnpause);
OPCODE(72, opStartSound);
- // TODO OPCODE(73, );
+ OPCODE(73, opStartSoundAtPosition);
// 74 unused
OPCODE(75, opStopSound);
OPCODE(76, opStartMidiMusic);
@@ -631,6 +631,15 @@ void ScriptOpcodes_Duckman::opStartSound(ScriptThread *scriptThread, OpCall &opC
_vm->_soundMan->playSound(soundEffectId, volume, 0);
}
+void ScriptOpcodes_Duckman::opStartSoundAtPosition(ScriptThread *scriptThread, OpCall &opCall) {
+ ARG_INT16(volume);
+ ARG_UINT32(soundEffectId);
+ ARG_UINT32(namedPointId);
+ Common::Point pos = _vm->getNamedPointPosition(namedPointId);
+ int16 pan = _vm->convertPanXCoord(pos.x);
+ _vm->_soundMan->playSound(soundEffectId, volume, pan);
+}
+
void ScriptOpcodes_Duckman::opStopSound(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_UINT32(soundEffectId);
diff --git a/engines/illusions/duckman/scriptopcodes_duckman.h b/engines/illusions/duckman/scriptopcodes_duckman.h
index 1dbe6e6e6d..63536b0295 100644
--- a/engines/illusions/duckman/scriptopcodes_duckman.h
+++ b/engines/illusions/duckman/scriptopcodes_duckman.h
@@ -95,6 +95,7 @@ protected:
void opPause(ScriptThread *scriptThread, OpCall &opCall);
void opUnpause(ScriptThread *scriptThread, OpCall &opCall);
void opStartSound(ScriptThread *scriptThread, OpCall &opCall);
+ void opStartSoundAtPosition(ScriptThread *scriptThread, OpCall &opCall);
void opStopSound(ScriptThread *scriptThread, OpCall &opCall);
void opStartMidiMusic(ScriptThread *scriptThread, OpCall &opCall);
void opStopMidiMusic(ScriptThread *scriptThread, OpCall &opCall);