diff options
author | Johannes Schickel | 2008-03-09 15:24:47 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-09 15:24:47 +0000 |
commit | d2bbfbcc35a1ab8cc3be52dba690a07cbabdf632 (patch) | |
tree | d81928a37ca17b3a240a8fbb2d54c4572353947b /engines/kyra/kyra_v2.cpp | |
parent | 05f68b17d4a60ece9e2eed14746eab5b29a3e688 (diff) | |
download | scummvm-rg350-d2bbfbcc35a1ab8cc3be52dba690a07cbabdf632.tar.gz scummvm-rg350-d2bbfbcc35a1ab8cc3be52dba690a07cbabdf632.tar.bz2 scummvm-rg350-d2bbfbcc35a1ab8cc3be52dba690a07cbabdf632.zip |
- fixed little glitch when putting items in cauldron
- implemented listing of items in cauldron
svn-id: r31088
Diffstat (limited to 'engines/kyra/kyra_v2.cpp')
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 83bc93c2c4..e9aa61de11 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -1848,6 +1848,7 @@ void KyraEngine_v2::cauldronItemAnim(int item) { mouseY -= 2; uint32 waitEnd = _system->getMillis() + _tickLength; _system->warpMouse(mouseX, mouseY); + _system->updateScreen(); delayUntil(waitEnd); } @@ -1858,6 +1859,7 @@ void KyraEngine_v2::cauldronItemAnim(int item) { mouseX -= 2; uint32 waitEnd = _system->getMillis() + _tickLength; _system->warpMouse(mouseX, mouseY); + _system->updateScreen(); delayUntil(waitEnd); } @@ -1997,6 +1999,50 @@ bool KyraEngine_v2::addToCauldronStateTable(int data, int idx) { return false; } +void KyraEngine_v2::listItemsInCauldron() { + int itemsInCauldron = 0; + for (int i = 0; i < 25; ++i) { + if (_cauldronTable[i] != -1) + ++itemsInCauldron; + else + break; + } + + if (!itemsInCauldron) { + if (!_cauldronState) + objectChat(getTableString(0xF4, _cCodeBuffer, 1), 0, 0x83, 0xF4); + else + objectChat(getTableString(0xF3, _cCodeBuffer, 1), 0, 0x83, 0xF3); + } else { + objectChat(getTableString(0xF7, _cCodeBuffer, 1), 0, 0x83, 0xF7); + + char buffer[80]; + for (int i = 0; i < itemsInCauldron-1; ++i) { + char *str = buffer; + strcpy(str, getTableString(_cauldronTable[i]+54, _cCodeBuffer, 1)); + if (_lang == 1) { + if (*str == 37) + str += 2; + } + strcpy((char*)_unkBuf500Bytes, "..."); + strcat((char*)_unkBuf500Bytes, str); + strcat((char*)_unkBuf500Bytes, "..."); + objectChat((const char*)_unkBuf500Bytes, 0, 0x83, _cauldronTable[i]+54); + } + + char *str = buffer; + strcpy(str, getTableString(_cauldronTable[itemsInCauldron-1]+54, _cCodeBuffer, 1)); + if (_lang == 1) { + if (*str == 37) + str += 2; + } + strcpy((char*)_unkBuf500Bytes, "..."); + strcat((char*)_unkBuf500Bytes, str); + strcat((char*)_unkBuf500Bytes, "."); + objectChat((const char*)_unkBuf500Bytes, 0, 0x83, _cauldronTable[itemsInCauldron-1]+54); + } +} + #pragma mark - void KyraEngine_v2::registerDefaultSettings() { |