diff options
author | Johannes Schickel | 2006-01-04 00:23:57 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-01-04 00:23:57 +0000 |
commit | 42eeb3aff69b88d845bbc73557788e5dc3522aed (patch) | |
tree | e5ecb74bbee7077af7e4f824b2afd16a9b92f268 | |
parent | 4183bc8c78071fbb6dd34998c0dcef0e9c57905c (diff) | |
download | scummvm-rg350-42eeb3aff69b88d845bbc73557788e5dc3522aed.tar.gz scummvm-rg350-42eeb3aff69b88d845bbc73557788e5dc3522aed.tar.bz2 scummvm-rg350-42eeb3aff69b88d845bbc73557788e5dc3522aed.zip |
Implemented cmd_shrinkBrandonDown and cmd_shrinkBrandonDown.
svn-id: r19902
-rw-r--r-- | kyra/script_v1.cpp | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index c0eb528c27..886e954579 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -1518,12 +1518,48 @@ int KyraEngine::cmd_setPaletteRange(ScriptState *script) { } int KyraEngine::cmd_shrinkBrandonDown(ScriptState *script) { - warning("STUB: cmd_shrinkBrandonDown"); + debug(3, "cmd_shrinkBrandonDown(0x%X) (%d)", script, stackPos(0)); + int delayTime = stackPos(0); + checkAmuletAnimFlags(); + int scaleValue = _scaleTable[_currentCharacter->y1]; + int scale = 0; + if (_scaleMode) { + scale = scaleValue; + } else { + scale = 256; + } + int scaleModeBackUp = _scaleMode; + _scaleMode = 1; + int scaleEnd = scale >> 1; + for (; scaleEnd <= scale; --scale) { + _scaleTable[_currentCharacter->y1] = scale; + animRefreshNPC(0); + delayWithTicks(1); + } + delayWithTicks(delayTime); // XXX + _scaleTable[_currentCharacter->y1] = scaleValue; + _scaleMode = scaleModeBackUp; return 0; } int KyraEngine::cmd_growBrandonUp(ScriptState *script) { - warning("STUB: cmd_growBrandonUp"); + debug(3, "cmd_growBrandonUp(0x%X) ()", script); + int scaleValue = _scaleTable[_currentCharacter->y1]; + int scale = 0; + if (_scaleMode) { + scale = scaleValue; + } else { + scale = 256; + } + int scaleModeBackUp = _scaleMode; + _scaleMode = 1; + for (int curScale = scale >> 1; curScale <= scale; ++curScale) { + _scaleTable[_currentCharacter->y1] = curScale; + animRefreshNPC(0); + delayWithTicks(1); + } + _scaleTable[_currentCharacter->y1] = scaleValue; + _scaleMode = scaleModeBackUp; return 0; } |