diff options
author | Max Horn | 2005-03-15 21:48:06 +0000 |
---|---|---|
committer | Max Horn | 2005-03-15 21:48:06 +0000 |
commit | 6e33b3f0a7b80a5d84c277bed05ee376b4ebb517 (patch) | |
tree | f60fb92ebe795c540b443474594d0b9de6fb89c6 /scumm/akos.cpp | |
parent | deca1352524cfc4ba32fedf85b9863f119f70063 (diff) | |
download | scummvm-rg350-6e33b3f0a7b80a5d84c277bed05ee376b4ebb517.tar.gz scummvm-rg350-6e33b3f0a7b80a5d84c277bed05ee376b4ebb517.tar.bz2 scummvm-rg350-6e33b3f0a7b80a5d84c277bed05ee376b4ebb517.zip |
Some cleanup/costume code unification. Note: NES costume code probably should be using subclasses; and maybe we should add AKOSLoadedCostume and NESLoadedCostume ?
svn-id: r17161
Diffstat (limited to 'scumm/akos.cpp')
-rw-r--r-- | scumm/akos.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 1e4f0357d7..e09713a26f 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -148,13 +148,6 @@ bool ScummEngine::akos_hasManyDirections(int costume) { return (akhd->flags & 2) != 0; } -int ScummEngine::akos_frameToAnim(Actor *a, int frame) { - if (_version >= 7 && akos_hasManyDirections(a->_costume)) - return toSimpleDir(1, a->getFacing()) + frame * 8; - else - return newDirToOldDir(a->getFacing()) + frame * 4; -} - void ScummEngine::akos_decodeData(Actor *a, int frame, uint usemask) { uint anim; const byte *akos, *r; @@ -168,7 +161,10 @@ void ScummEngine::akos_decodeData(Actor *a, int frame, uint usemask) { if (a->_costume == 0) return; - anim = akos_frameToAnim(a, frame); + if (_version >= 7 && akos_hasManyDirections(a->_costume)) + anim = toSimpleDir(1, a->getFacing()) + frame * 8; + else + anim = newDirToOldDir(a->getFacing()) + frame * 4; akos = getResourceAddress(rtCostume, a->_costume); assert(akos); |