From c903ede02383618489e4b1c74f5a63be2416256b Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Mon, 17 Jul 2017 16:39:16 +0200 Subject: SUPERNOVA: Fixes renderRoom() by limiting the section range --- engines/supernova/supernova.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index ed145f1cf4..9abea6baf7 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -333,10 +333,8 @@ void SupernovaEngine::restoreScreen() { } void SupernovaEngine::renderRoom(Room &room) { - if (room.getFileNumber() == -1) { - _system->fillScreen(kColorBlack); - } else { - for (int i = 0; i < kMaxSection; ++i) { + if (room.getFileNumber() != -1) { + for (int i = 0; i < _currentImage->_numSections; ++i) { if (room.isSectionVisible(i)) renderImage(room.getFileNumber(), i); } -- cgit v1.2.3