diff options
author | Robert Špalek | 2009-11-01 10:15:48 +0000 |
---|---|---|
committer | Robert Špalek | 2009-11-01 10:15:48 +0000 |
commit | 7927196b3f1d210cc5c7ca76e377363f6db0654a (patch) | |
tree | b0372b7a1bbbe590faeef0da9c2c1349b0b55de7 /engines/draci | |
parent | f91c89560f9e50f6cecfe93795d4c00513f45206 (diff) | |
download | scummvm-rg350-7927196b3f1d210cc5c7ca76e377363f6db0654a.tar.gz scummvm-rg350-7927196b3f1d210cc5c7ca76e377363f6db0654a.tar.bz2 scummvm-rg350-7927196b3f1d210cc5c7ca76e377363f6db0654a.zip |
Fix mistakenly ordered flushing revealed by the last commit
svn-id: r45595
Diffstat (limited to 'engines/draci')
-rw-r--r-- | engines/draci/game.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 99d94040e2..14e1d9098f 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -195,7 +195,7 @@ void Game::init() { Text *speech = new Text("", _vm->_bigFont, kFontColour1, 0, 0, 0); speechAnim->addFrame(speech, NULL); - // Initialize inventory animation + // Initialize inventory animation. _iconsArchive is never flushed. const BAFile *f = _vm->_iconsArchive->getFile(13); Animation *inventoryAnim = _vm->_anims->addAnimation(kInventorySprite, 255, false); Sprite *inventorySprite = new Sprite(f->_data, f->_length, 0, 0, true); @@ -669,6 +669,7 @@ void Game::putItem(int itemID, int position) { Animation *anim = _vm->_anims->getAnimation(anim_id); if (!anim) { anim = _vm->_anims->addItem(anim_id, false); + // _itemImagesArchive is never flushed. const BAFile *img = _vm->_itemImagesArchive->getFile(2 * itemID); Sprite *sp = new Sprite(img->_data, img->_length, 0, 0, true); anim->addFrame(sp, NULL); @@ -1129,8 +1130,9 @@ int Game::loadAnimation(uint animNum, uint z) { uint freq = animationReader.readUint16LE(); uint delay = animationReader.readUint16LE(); + // _spritesArchive is flushed when entering a room. All + // scripts in a room are responsible for loading their animations. const BAFile *spriteFile = _vm->_spritesArchive->getFile(spriteNum); - Sprite *sp = new Sprite(spriteFile->_data, spriteFile->_length, x, y, true); // Some frames set the scaled dimensions to 0 even though other frames @@ -1219,6 +1221,8 @@ void Game::loadOverlays() { y = overlayReader.readUint16LE(); z = overlayReader.readByte(); + // _overlaysArchive is flushed when entering a room and this + // code is called after the flushing has been done. const BAFile *overlayFile; overlayFile = _vm->_overlaysArchive->getFile(num); Sprite *sp = new Sprite(overlayFile->_data, overlayFile->_length, x, y, true); @@ -1226,8 +1230,6 @@ void Game::loadOverlays() { _vm->_anims->addOverlay(sp, z); } - _vm->_overlaysArchive->clearCache(); - _vm->_screen->getSurface()->markDirty(); } @@ -1274,6 +1276,7 @@ void Game::enterNewRoom(bool force_reload) { _vm->_walkingMapsArchive->clearCache(); _vm->_soundsArchive->clearCache(); _vm->_dubbingArchive->clearCache(); + _vm->_overlaysArchive->clearCache(); _vm->_screen->clearScreen(); |