diff options
author | Johannes Schickel | 2008-03-17 23:01:50 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-17 23:01:50 +0000 |
commit | 1042c6dccf9fd34a80990335420f6ef6dd2d4d1f (patch) | |
tree | 8cfa1e1b9d6ee03856c5a27b315cb52537a56a17 /engines/kyra | |
parent | 8752939fe480b471febed9a9e85069208429b7d3 (diff) | |
download | scummvm-rg350-1042c6dccf9fd34a80990335420f6ef6dd2d4d1f.tar.gz scummvm-rg350-1042c6dccf9fd34a80990335420f6ef6dd2d4d1f.tar.bz2 scummvm-rg350-1042c6dccf9fd34a80990335420f6ef6dd2d4d1f.zip |
Implemented opcodes:
- 70: o2_backUpInventoryGfx
- 71: o2_disableSceneAnim
- 72: o2_enableSceneAnim
- 73: o2_restoreInventoryGfx
svn-id: r31167
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 1 | ||||
-rw-r--r-- | engines/kyra/kyra_v2.h | 5 | ||||
-rw-r--r-- | engines/kyra/script_v2.cpp | 34 |
3 files changed, 36 insertions, 4 deletions
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 0ecb5e6b66..d10e501273 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -107,6 +107,7 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags) : KyraEngi _gamePlayBuffer = 0; _unkBuf500Bytes = 0; _screenBuffer = 0; + _inventorySaved = false; _unkBuf200kByte = 0; memset(&_defaultShapeTable, 0, sizeof(_defaultShapeTable)); memset(&_sceneShapeTable, 0, sizeof(_sceneShapeTable)); diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 87d4e0e29b..884123f26a 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -341,6 +341,7 @@ protected: void restorePage3(); uint8 *_screenBuffer; + bool _inventorySaved; void backUpPage0(); void restorePage0(); @@ -997,6 +998,10 @@ protected: int o2_disableAnimObject(ScriptState *script); int o2_enableAnimObject(ScriptState *script); int o2_restoreBackBuffer(ScriptState *script); + int o2_backUpInventoryGfx(ScriptState *script); + int o2_disableSceneAnim(ScriptState *script); + int o2_enableSceneAnim(ScriptState *script); + int o2_restoreInventoryGfx(ScriptState *script); int o2_update(ScriptState *script); int o2_fadeScenePal(ScriptState *script); int o2_enterNewSceneEx(ScriptState *script); diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index 2ea6d51089..7330434ee0 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -593,6 +593,32 @@ int KyraEngine_v2::o2_restoreBackBuffer(ScriptState *script) { return 0; } +int KyraEngine_v2::o2_backUpInventoryGfx(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_backUpInventoryGfx(%p) ()", (const void *)script); + _screen->copyRegionToBuffer(1, 0, 144, 320, 56, _screenBuffer); + _inventorySaved = true; + return 0; +} + +int KyraEngine_v2::o2_disableSceneAnim(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_disableSceneAnim(%p) (%d)", (const void *)script, stackPos(0)); + _sceneAnims[stackPos(0)].flags &= ~1; + return 0; +} + +int KyraEngine_v2::o2_enableSceneAnim(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_enableSceneAnim(%p) (%d)", (const void *)script, stackPos(0)); + _sceneAnims[stackPos(0)].flags |= 1; + return 0; +} + +int KyraEngine_v2::o2_restoreInventoryGfx(ScriptState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_restoreInventoryGfx(%p) ()", (const void *)script); + _screen->copyBlockToPage(1, 0, 144, 320, 56, _screenBuffer); + _inventorySaved = false; + return 0; +} + int KyraEngine_v2::o2_update(ScriptState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_update(%p) (%d)", (const void *)script, stackPos(0)); @@ -1487,11 +1513,11 @@ void KyraEngine_v2::setupOpcodeTable() { // 0x44 OpcodeUnImpl(), Opcode(o2_restoreBackBuffer), - OpcodeUnImpl(), - OpcodeUnImpl(), + Opcode(o2_backUpInventoryGfx), + Opcode(o2_disableSceneAnim), // 0x48 - OpcodeUnImpl(), - OpcodeUnImpl(), + Opcode(o2_enableSceneAnim), + Opcode(o2_restoreInventoryGfx), OpcodeUnImpl(), Opcode(o2_update), // 0x4c |