ADL: Implement hires6 action opcode 0x1e

This commit is contained in:
Walter van Niftrik
2017-02-20 11:07:56 +01:00
parent 6662d53f82
commit b152ef4eaf
3 changed files with 16 additions and 14 deletions
-12
View File
@@ -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
-1
View File
@@ -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
+16 -1
View File
@@ -59,6 +59,7 @@ private:
template <Direction D>
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