diff options
author | johndoe123 | 2015-11-28 23:44:35 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 5a69f7356130c08f6d0835e0ca6228d542d9fb73 (patch) | |
tree | 0cfbea4d85dd7046c04d1542ba8b8394a07910f8 /engines | |
parent | 15498a231aca26c701fa5f123fbe2e0f1bd9cf67 (diff) | |
download | scummvm-rg350-5a69f7356130c08f6d0835e0ca6228d542d9fb73.tar.gz scummvm-rg350-5a69f7356130c08f6d0835e0ca6228d542d9fb73.tar.bz2 scummvm-rg350-5a69f7356130c08f6d0835e0ca6228d542d9fb73.zip |
ILLUSIONS: DUCKMAN: Implement opcode 73
Diffstat (limited to 'engines')
-rw-r--r-- | engines/illusions/duckman/scriptopcodes_duckman.cpp | 11 | ||||
-rw-r--r-- | engines/illusions/duckman/scriptopcodes_duckman.h | 1 |
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); |