diff options
author | Joseph-Eugene Winzer | 2017-08-13 21:34:36 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 01:33:24 +0000 |
commit | 5845cd7bd20eaaed9383389c397c321376a47db6 (patch) | |
tree | c061c508933076f65d3bf235c5549374f90bd06c | |
parent | bfa96d6f5071af1b1d175babe7c641c9406a3a18 (diff) | |
download | scummvm-rg350-5845cd7bd20eaaed9383389c397c321376a47db6.tar.gz scummvm-rg350-5845cd7bd20eaaed9383389c397c321376a47db6.tar.bz2 scummvm-rg350-5845cd7bd20eaaed9383389c397c321376a47db6.zip |
SUPERNOVA: Fixes rerendering of the room
One sprite can consist of many sections that are concatenated in a
linked list.
-rw-r--r-- | engines/supernova/supernova.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index 5bd49d0d89..faff7bc44f 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -359,8 +359,13 @@ void SupernovaEngine::restoreScreen() { void SupernovaEngine::renderRoom(Room &room) { if (room.getFileNumber() != -1) { for (int i = 0; i < _currentImage->_numSections; ++i) { - if (room.isSectionVisible(i)) - renderImage(room.getFileNumber(), i); + int section = i; + if (room.isSectionVisible(section)) { + do { + renderImage(room.getFileNumber(), section); + section = _currentImage->_section[section].next; + } while (section != 0); + } } } } |