diff options
author | Florian Kagerer | 2009-09-11 21:15:48 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-09-11 21:15:48 +0000 |
commit | 4e34275af1d69c8cbe693c539eac005e4c7dfa06 (patch) | |
tree | a46e3b01b830878a30a667c854002e97b3194eb4 | |
parent | 9f7c0a24e230ef8d41b4d4c3bd3f83fb1a02a780 (diff) | |
download | scummvm-rg350-4e34275af1d69c8cbe693c539eac005e4c7dfa06.tar.gz scummvm-rg350-4e34275af1d69c8cbe693c539eac005e4c7dfa06.tar.bz2 scummvm-rg350-4e34275af1d69c8cbe693c539eac005e4c7dfa06.zip |
LOL: add missing opcode
svn-id: r44036
-rw-r--r-- | engines/kyra/lol.cpp | 14 | ||||
-rw-r--r-- | engines/kyra/lol.h | 3 | ||||
-rw-r--r-- | engines/kyra/scene_lol.cpp | 14 | ||||
-rw-r--r-- | engines/kyra/screen_lol.cpp | 3 | ||||
-rw-r--r-- | engines/kyra/script_lol.cpp | 19 |
5 files changed, 29 insertions, 24 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 257e863548..45336e7730 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1718,6 +1718,20 @@ void LoLEngine::generateFlashPalette(const Palette &src, Palette &dst, int color dst.copy(src, 128); } +void LoLEngine::createGfxTables() { + if (_flags.isTalkie || _loadSuppFilesFlag) + return; + + Palette tpal(768); + _screen->loadPalette("fxpal.col", tpal); + _screen->loadBitmap("fxpal.shp", 3, 3, 0); + const uint8 *shpPal = _screen->getPtrToShape(_screen->getCPagePtr(2), 0) + 11; + + _screen->generateTruelightTables(shpPal, 20, tpal, _screen->getPalette(1), _trueLightTable1, _trueLightTable2, 70); + + _loadSuppFilesFlag = 1; +} + void LoLEngine::updateSequenceBackgroundAnimations() { if (_updateFlags & 8) return; diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index d62ab7d60c..4a00bb8d6c 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -796,6 +796,7 @@ private: int olol_assignSpecialGuiShape(EMCState *script); int olol_findInventoryItem(EMCState *script); int olol_restoreFadePalette(EMCState *script); + int olol_getSelectedCharacter(EMCState *script); int olol_drinkBezelCup(EMCState *script); int olol_changeItemTypeOrFlag(EMCState *script); int olol_placeInventoryItemInHand(EMCState *script); @@ -885,6 +886,7 @@ private: void setPaletteBrightness(const Palette &srcPal, int brightness, int modifier); void generateBrightnessPalette(const Palette &src, Palette &dst, int brightness, int modifier); void generateFlashPalette(const Palette &src, Palette &dst, int colorFlags); + void createGfxTables(); void updateSequenceBackgroundAnimations(); bool _dialogueField; @@ -983,7 +985,6 @@ private: void loadCmzFile(const char *file); void loadLevelShpDat(const char *shpFile, const char *datFile, bool flag); void loadLevelGraphics(const char *file, int specialColor, int weight, int vcnLen, int vmpLen, const char *palFile); - void createGfxTables(); void resetItems(int flag); void disableMonsters(); diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp index 1d76f43f96..7c45abb970 100644 --- a/engines/kyra/scene_lol.cpp +++ b/engines/kyra/scene_lol.cpp @@ -450,20 +450,6 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight _loadSuppFilesFlag = 1; } -void LoLEngine::createGfxTables() { - if (_flags.isTalkie || _loadSuppFilesFlag) - return; - - Palette tpal(768); - _screen->loadPalette("fxpal.col", tpal); - _screen->loadBitmap("fxpal.shp", 3, 3, 0); - const uint8 *shpPal = _screen->getPtrToShape(_screen->getCPagePtr(2), 0) + 11; - - _screen->generateTruelightTables(shpPal, 20, tpal, _screen->getPalette(1), _trueLightTable1, _trueLightTable2, 70); - - _loadSuppFilesFlag = 1; -} - void LoLEngine::resetItems(int flag) { for (int i = 0; i < 1024; i++) { _levelBlockProperties[i].direction = 5; diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index 240ca40480..408e568b0b 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -251,8 +251,7 @@ void Screen_LoL::generateTruelightTables(const uint8 *ovl, int a, const Palette } } else { - for (int ii = 0; ii < 256; ii++) - outTable2[(i << 8) + ii] = 0; + memset(&outTable2[i << 8], 0, 256); } } } diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index 318385400c..e710a184cf 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -2005,12 +2005,6 @@ int LoLEngine::olol_findInventoryItem(EMCState *script) { return -1; } -int LoLEngine::olol_drinkBezelCup(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_drinkBezelCup(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - drinkBezelCup(3 - stackPos(0), stackPos(1)); - return 1; -} - int LoLEngine::olol_restoreFadePalette(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_restoreFadePalette(%p)", (const void *)script); _screen->getPalette(0).copy(_screen->getPalette(1), 0, 128); @@ -2019,6 +2013,17 @@ int LoLEngine::olol_restoreFadePalette(EMCState *script) { return 1; } +int LoLEngine::olol_getSelectedCharacter(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getSelectedCharacter(%p)", (const void *)script); + return _selectedCharacter; +} + +int LoLEngine::olol_drinkBezelCup(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_drinkBezelCup(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + drinkBezelCup(3 - stackPos(0), stackPos(1)); + return 1; +} + int LoLEngine::olol_changeItemTypeOrFlag(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_changeItemTypeOrFlag(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); if (stackPos(0) < 1) @@ -2881,7 +2886,7 @@ void LoLEngine::setupOpcodeTable() { Opcode(olol_calcNewBlockPosition); // 0xA8 - OpcodeUnImpl(); + Opcode(olol_getSelectedCharacter); OpcodeUnImpl(); Opcode(olol_drinkBezelCup); Opcode(olol_changeItemTypeOrFlag); |