diff options
Diffstat (limited to 'engines/agos/script_pp.cpp')
-rw-r--r-- | engines/agos/script_pp.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/engines/agos/script_pp.cpp b/engines/agos/script_pp.cpp index fd8ef9b859..a7bda53e48 100644 --- a/engines/agos/script_pp.cpp +++ b/engines/agos/script_pp.cpp @@ -72,8 +72,8 @@ void AGOSEngine_PuzzlePack::setupOpcodes() { OPCODE(o_state), /* 28 */ OPCODE(o_oflag), - OPCODE(opp_iconifyWindow), OPCODE(o_invalid), + OPCODE(opp_iconifyWindow), OPCODE(o_destroy), /* 32 */ OPCODE(opp_restoreOopsPosition), @@ -238,7 +238,7 @@ void AGOSEngine_PuzzlePack::setupOpcodes() { /* 160 */ OPCODE(oe2_ink), OPCODE(off_screenTextBox), - OPCODE(os1_screenTextMsg), + OPCODE(opp_playTune), OPCODE(o_invalid), /* 164 */ OPCODE(oe2_getDollar2), @@ -297,7 +297,7 @@ void AGOSEngine_PuzzlePack::executeOpcode(int opcode) { void AGOSEngine_PuzzlePack::opp_iconifyWindow() { // 30 - getNextItemPtr(); + getNextWord(); if (_clockStopped != 0) _gameTime += time(NULL) - _clockStopped; _clockStopped = 0; @@ -308,7 +308,7 @@ void AGOSEngine_PuzzlePack::opp_restoreOopsPosition() { // 32: restore oops position uint i; - getNextItemPtr(); + getNextWord(); if (_oopsValid) { for (i = 0; i < _numVars; i++) { @@ -328,7 +328,7 @@ void AGOSEngine_PuzzlePack::opp_restoreOopsPosition() { void AGOSEngine_PuzzlePack::opp_loadMouseImage() { // 38: load mouse image - getNextItemPtr(); + getNextWord(); getVarOrByte(); loadMouseImage(); } @@ -405,6 +405,19 @@ void AGOSEngine_PuzzlePack::opp_loadUserGame() { loadGame(genSaveName(1)); } +void AGOSEngine_PuzzlePack::opp_playTune() { + // 162: play tune + getVarOrByte(); + getVarOrByte(); + getNextWord(); + + uint16 music = (uint16)getVarOrWord(); + if (music != _lastMusicPlayed) { + _lastMusicPlayed = music; + playSpeech(music, 1); + } +} + void AGOSEngine_PuzzlePack::opp_saveOopsPosition() { // 173: save oops position if (!isVgaQueueEmpty()) { |