diff options
author | Alyssa Milburn | 2011-07-16 00:57:13 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-07-16 00:57:13 +0200 |
commit | 28d4aaf095e4f3979d1f6dc75b53d73f412e83a0 (patch) | |
tree | e4ae4cbec5968948b2d645c6cfe848df05149acf /engines | |
parent | acfd13633d97a121fe5581544feba692aa81b5a8 (diff) | |
download | scummvm-rg350-28d4aaf095e4f3979d1f6dc75b53d73f412e83a0.tar.gz scummvm-rg350-28d4aaf095e4f3979d1f6dc75b53d73f412e83a0.tar.bz2 scummvm-rg350-28d4aaf095e4f3979d1f6dc75b53d73f412e83a0.zip |
COMPOSER: Fix z-ordering issues.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/composer/composer.cpp | 3 | ||||
-rw-r--r-- | engines/composer/composer.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index 936f1ff595..acd1d33e65 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -457,7 +457,7 @@ void ComposerEngine::processAnimFrame() { } } -void ComposerEngine::addSprite(uint16 id, uint16 animId, uint16 zorder, const Common::Point &pos) { +void ComposerEngine::addSprite(uint16 id, uint16 animId, int16 zorder, const Common::Point &pos) { Sprite sprite; sprite.id = id; sprite.animId = animId; @@ -471,6 +471,7 @@ void ComposerEngine::addSprite(uint16 id, uint16 animId, uint16 zorder, const Co for (Common::List<Sprite>::iterator i = _sprites.begin(); i != _sprites.end(); i++) { if (sprite.zorder > i->zorder) continue; + i++; _sprites.insert(i, sprite); return; } diff --git a/engines/composer/composer.h b/engines/composer/composer.h index 4955a0ce3a..a90eb61459 100644 --- a/engines/composer/composer.h +++ b/engines/composer/composer.h @@ -62,7 +62,7 @@ class ComposerEngine; struct Sprite { uint16 id; uint16 animId; - uint16 zorder; + int16 zorder; Common::Point pos; Graphics::Surface surface; }; @@ -195,7 +195,7 @@ private: void playWaveForAnim(uint16 id, bool bufferingOnly); void processAnimFrame(); - void addSprite(uint16 id, uint16 animId, uint16 zorder, const Common::Point &pos); + void addSprite(uint16 id, uint16 animId, int16 zorder, const Common::Point &pos); void removeSprite(uint16 id, uint16 animId); void loadCTBL(uint id, uint fadePercent); |