diff options
author | Thierry Crozat | 2017-11-15 23:40:36 +0000 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:15:40 +0000 |
commit | 58cfbb532bd5092b3159211713c146c94dacead9 (patch) | |
tree | 1bd9b92e6988bd99f25854cdafa786ab9b3b5f27 /engines/supernova | |
parent | b39beb43fd9e9cbbebc0a6bb035ed6cc809f6385 (diff) | |
download | scummvm-rg350-58cfbb532bd5092b3159211713c146c94dacead9.tar.gz scummvm-rg350-58cfbb532bd5092b3159211713c146c94dacead9.tar.bz2 scummvm-rg350-58cfbb532bd5092b3159211713c146c94dacead9.zip |
SUPERNOVA: Fix room rendering
It could initially access the wrong image to check the number
of section. The code was working fine as long as it had one
section, so there was probably no bad side effect to using
the wrong image (except if it was NULL).
Diffstat (limited to 'engines/supernova')
-rw-r--r-- | engines/supernova/supernova.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index c0b9216de1..66fde2806f 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -480,11 +480,12 @@ void SupernovaEngine::restoreScreen() { void SupernovaEngine::renderRoom(Room &room) { if (room.getFileNumber() != -1) { + _currentImage = &(_images[room.getFileNumber()]); for (int i = 0; i < _currentImage->_numSections; ++i) { int section = i; if (room.isSectionVisible(section)) { do { - renderImage(room.getFileNumber(), section); + renderImage(*_currentImage, section); section = _currentImage->_section[section].next; } while (section != 0); } |