From b152ef4eaf7f52e72accb959f4c3ecec209e893e Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 20 Feb 2017 11:07:10 +0100 Subject: ADL: Implement hires6 action opcode 0x1e --- engines/adl/adl_v5.cpp | 12 ------------ engines/adl/adl_v5.h | 1 - engines/adl/hires6.cpp | 17 ++++++++++++++++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/engines/adl/adl_v5.cpp b/engines/adl/adl_v5.cpp index 503be9a337..929ffff7f4 100644 --- a/engines/adl/adl_v5.cpp +++ b/engines/adl/adl_v5.cpp @@ -101,10 +101,6 @@ int AdlEngine_v5::o5_dummy(ScriptEnv &e) { int AdlEngine_v5::o5_setTextMode(ScriptEnv &e) { OP_DEBUG_1("\tSET_TEXT_MODE(%d)", e.arg(1)); - // TODO - // 1: 4-line mode - // 2: 24-line mode - switch (e.arg(1)) { case 1: if (_linesPrinted != 0) { @@ -155,12 +151,4 @@ int AdlEngine_v5::o5_setRoomPic(ScriptEnv &e) { return 2; } -int AdlEngine_v5::o_winGame(ScriptEnv &e) { - OP_DEBUG_0("\tWIN_GAME()"); - - // TODO - - return 0; -} - } // End of namespace Adl diff --git a/engines/adl/adl_v5.h b/engines/adl/adl_v5.h index a163381493..473b244993 100644 --- a/engines/adl/adl_v5.h +++ b/engines/adl/adl_v5.h @@ -45,7 +45,6 @@ protected: int o5_setTextMode(ScriptEnv &e); int o5_setRegionRoom(ScriptEnv &e); int o5_setRoomPic(ScriptEnv &e); - int o_winGame(ScriptEnv &e); }; } // End of namespace Adl diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp index 3de7e594a1..03c9b1c923 100644 --- a/engines/adl/hires6.cpp +++ b/engines/adl/hires6.cpp @@ -59,6 +59,7 @@ private: template int o_goDirection(ScriptEnv &e); + int o_fluteSound(ScriptEnv &e); static const uint kRegions = 3; static const uint kItems = 15; @@ -129,7 +130,7 @@ void HiRes6Engine::setupOpcodeTables() { // 0x1c Opcode(o1_dropItem); Opcode(o5_setRoomPic); - Opcode(o_winGame); + Opcode(o_fluteSound); OpcodeUnImpl(); // 0x20 Opcode(o2_initDisk); @@ -159,6 +160,20 @@ int HiRes6Engine::o_goDirection(ScriptEnv &e) { return -1; } +int HiRes6Engine::o_fluteSound(ScriptEnv &e) { + OP_DEBUG_0("\tFLUTE_SOUND()"); + + Tones tones; + + tones.push_back(Tone(1072.0, 587.6)); + tones.push_back(Tone(1461.0, 495.8)); + tones.push_back(Tone(0.0, 1298.7)); + + playTones(tones, false); + + return 0; +} + #define SECTORS_PER_TRACK 16 #define BYTES_PER_SECTOR 256 -- cgit v1.2.3