diff options
author | Nicola Mettifogo | 2008-01-28 16:52:41 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-01-28 16:52:41 +0000 |
commit | 3c2c16c705b41e0186cd203bc303a0902bf3059e (patch) | |
tree | f872c9b34aff5a5b1f1d09a4a52e117972249724 /engines/parallaction/exec_ns.cpp | |
parent | 1bba7bd04e1ca2cdc20cb2646f7e32a65c0d53f0 (diff) | |
download | scummvm-rg350-3c2c16c705b41e0186cd203bc303a0902bf3059e.tar.gz scummvm-rg350-3c2c16c705b41e0186cd203bc303a0902bf3059e.tar.bz2 scummvm-rg350-3c2c16c705b41e0186cd203bc303a0902bf3059e.zip |
Fixed animation sorting: everything should be drawn like before revision 30673 now. Character may still disappear when changing location because of wrong resource management, though.
svn-id: r30680
Diffstat (limited to 'engines/parallaction/exec_ns.cpp')
-rw-r--r-- | engines/parallaction/exec_ns.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index b5d6bb03eb..93a0e9ab25 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -320,7 +320,7 @@ DECLARE_COMMAND_OPCODE(stop) { void Parallaction_ns::drawAnimations() { - uint16 _si = 0; + uint16 layer = 0; for (AnimationList::iterator it = _animations.begin(); it != _animations.end(); it++) { @@ -331,16 +331,17 @@ void Parallaction_ns::drawAnimations() { int16 frame = CLIP((int)v18->_frame, 0, v18->getFrameNum()-1); if (v18->_flags & kFlagsNoMasked) - _si = 3; + layer = 3; else - _si = _gfx->queryMask(v18->_top + v18->height()); + layer = _gfx->queryMask(v18->_top + v18->height()); _gfx->showGfxObj(obj, true); obj->frame = frame; obj->x = v18->_left; obj->y = v18->_top; - obj->z = _si; + obj->z = v18->_z; + obj->layer = layer; } if (((v18->_flags & kFlagsActive) == 0) && (v18->_flags & kFlagsRemove)) { @@ -426,7 +427,8 @@ label1: a->_z = a->_top + a->height(); } - sortAnimations(); + _char._ani._z = _char._ani.height() + _char._ani._top; + _char._ani.gfxobj->z = _char._ani._z; modCounter++; return; |