diff options
author | Johannes Schickel | 2008-05-18 08:04:12 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-05-18 08:04:12 +0000 |
commit | 1ea774e95f8ce0927a38aa0e5d467cc6ca82b78b (patch) | |
tree | f2df70519739bed76e7b5a72c122bdeab60e13bc /engines | |
parent | 721b1ecc9afa235d7535c1b9fa1bca8374b49ab1 (diff) | |
download | scummvm-rg350-1ea774e95f8ce0927a38aa0e5d467cc6ca82b78b.tar.gz scummvm-rg350-1ea774e95f8ce0927a38aa0e5d467cc6ca82b78b.tar.bz2 scummvm-rg350-1ea774e95f8ce0927a38aa0e5d467cc6ca82b78b.zip |
Fixed fillRect opcode for HoF.
svn-id: r32166
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/kyra_hof.h | 1 | ||||
-rw-r--r-- | engines/kyra/kyra_lok.h | 3 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.h | 1 | ||||
-rw-r--r-- | engines/kyra/script_hof.cpp | 9 | ||||
-rw-r--r-- | engines/kyra/script_lok.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/script_v1.cpp | 6 |
6 files changed, 17 insertions, 9 deletions
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index fe4b6390b7..7f13ae6be1 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -742,6 +742,7 @@ protected: int o2_setDrawNoShapeFlag(EMCState *script); int o2_setRunFlag(EMCState *script); int o2_showLetter(EMCState *script); + int o2_fillRect(EMCState *script); int o2_playFireflyScore(EMCState *script); int o2_encodeShape(EMCState *script); int o2_defineSceneAnim(EMCState *script); diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 2eee4f2f6e..679094cdf3 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -791,9 +791,10 @@ protected: int o1_pauseMusicSeconds(EMCState *script); int o1_resetMaskRegion(EMCState *script); int o1_setPaletteChangeFlag(EMCState *script); - int o1_dummy(EMCState *script); + int o1_fillRect(EMCState *script); int o1_vocUnload(EMCState *script); int o1_vocLoad(EMCState *script); + int o1_dummy(EMCState *script); }; } // end of namespace Kyra diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 81a6254c7f..742d7549c0 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -227,7 +227,6 @@ protected: int o1_getMouseState(EMCState *script); int o1_setDeathHandler(EMCState *script); int o1_playWanderScoreViaMap(EMCState *script); - int o1_fillRect(EMCState *script); int o1_blockInWalkableRegion(EMCState *script); int o1_blockOutWalkableRegion(EMCState *script); int o1_playSoundEffect(EMCState *script); diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index d2b6b08183..8408489ab0 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -838,6 +838,13 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { return 0; } +int KyraEngine_HoF::o2_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + _screen->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0)); + return 0; +} + + int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { @@ -1624,7 +1631,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_setRunFlag); Opcode(o2_showLetter); OpcodeUnImpl(); - Opcode(o1_fillRect); + Opcode(o2_fillRect); // 0x68 OpcodeUnImpl(); OpcodeUnImpl(); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 670c7282e3..f31990cdc8 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -1706,6 +1706,12 @@ int KyraEngine_LoK::o1_setPaletteChangeFlag(EMCState *script) { return _paletteChanged; } +int KyraEngine_LoK::o1_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); + return 0; +} + int KyraEngine_LoK::o1_vocUnload(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_vocUnload(%p) ()", (const void *)script); // this should unload all voc files (not needed) diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index ce3b7ba050..4795263ff3 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -96,12 +96,6 @@ int KyraEngine_v1::o1_playWanderScoreViaMap(EMCState *script) { return 0; } -int KyraEngine_v1::o1_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - screen()->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); - return 0; -} - int KyraEngine_v1::o1_blockInWalkableRegion(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); screen()->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); |