MYST3: Implement opcode soundPlayBadClick

This commit is contained in:
Bastien Bouclet 2014-07-02 11:31:38 +02:00
parent 39415ca523
commit 700af5ae05
2 changed files with 8 additions and 0 deletions

View File

@ -237,6 +237,7 @@ Script::Script(Myst3Engine *vm):
OP_2(200, ambientPlayCurrentNode, kValue, kValue );
OP_0(201, ambientApply );
OP_1(202, ambientApplyWithFadeDelay, kEvalValue );
OP_0(203, soundPlayBadClick );
OP_1(205, soundPlay, kEvalValue );
OP_2(206, soundPlayVolume, kEvalValue, kEvalValue );
OP_3(207, soundPlayVolumeDirection, kEvalValue, kEvalValue, kEvalValue );
@ -2426,6 +2427,12 @@ void Script::ambientApplyWithFadeDelay(Context &c, const Opcode &cmd) {
_vm->_ambient->applySounds(_vm->_state->valueOrVarValue(cmd.args[0]));
}
void Script::soundPlayBadClick(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Play bad click sound", cmd.op);
_vm->_sound->playEffect(697, 5);
}
void Script::soundPlay(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Play sound %d", cmd.op, cmd.args[0]);

View File

@ -284,6 +284,7 @@ private:
DECLARE_OPCODE(ambientPlayCurrentNode);
DECLARE_OPCODE(ambientApply);
DECLARE_OPCODE(ambientApplyWithFadeDelay);
DECLARE_OPCODE(soundPlayBadClick);
DECLARE_OPCODE(soundPlay);
DECLARE_OPCODE(soundPlayVolume);
DECLARE_OPCODE(soundPlayVolumeDirection);