diff options
author | Max Horn | 2003-01-06 16:04:01 +0000 |
---|---|---|
committer | Max Horn | 2003-01-06 16:04:01 +0000 |
commit | 9270a0558b8b3cac00d998053450da270a46823d (patch) | |
tree | 34ec16097187bb0cd3a90beb0f7dc53674c6a2f0 /scumm/actor.cpp | |
parent | 37a64f5d12e0343347cffa57b7e1bbd00ec60db0 (diff) | |
download | scummvm-rg350-9270a0558b8b3cac00d998053450da270a46823d.tar.gz scummvm-rg350-9270a0558b8b3cac00d998053450da270a46823d.tar.bz2 scummvm-rg350-9270a0558b8b3cac00d998053450da270a46823d.zip |
some chore/limb related code
svn-id: r6348
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 9599ad32d0..542cdd440e 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1067,6 +1067,43 @@ void Actor::animateCostume() } } +void Actor::animateLimb(int limb, int f) +{ + // This methods is very similiar to animateCostume(). + // However, instead of animating *all* the limbs, it only animates + // the specified limb to be at the frame specified by "f". + + if (!f) + return; + + animProgress++; + if (animProgress >= animSpeed) { + animProgress = 0; + + if (costume == 0) + return; + + byte *aksq, *akfo; + uint size; + byte *akos = _vm->getResourceAddress(rtCostume, costume); + assert(akos); + + aksq = _vm->findResourceData(MKID('AKSQ'), akos); + akfo = _vm->findResourceData(MKID('AKFO'), akos); + + size = _vm->getResourceDataSize(akfo) >> 1; + + while (f--) { + if (cost.active[limb] != 0) + _vm->akos_increaseAnim(this, limb, aksq, (uint16 *)akfo, size); + } + +// needRedraw = true; +// needBgReset = true; + } +} + + void Scumm::setActorRedrawFlags(bool fg, bool bg) { int i, j; |