aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2018-04-21 18:58:58 +0200
committerJoseph-Eugene Winzer2019-02-06 09:42:11 +0100
commitebaa6739ec68cf18b8c8a272df8d992a36a4728e (patch)
treeda7306382f10bbe731a29c1acba0d5eb6fea3fc1
parentc20b960d80376653682e3eac0299f8a931cf66e3 (diff)
downloadscummvm-rg350-ebaa6739ec68cf18b8c8a272df8d992a36a4728e.tar.gz
scummvm-rg350-ebaa6739ec68cf18b8c8a272df8d992a36a4728e.tar.bz2
scummvm-rg350-ebaa6739ec68cf18b8c8a272df8d992a36a4728e.zip
SUPERNOVA: Adds Outro image
msn_data.055 that stores the outro image was missed to be added to imageInfo and thus not loaded during the engine init/
-rw-r--r--engines/supernova/imageid.h4
-rw-r--r--engines/supernova/resman.cpp13
-rw-r--r--engines/supernova/resman.h2
-rw-r--r--engines/supernova/screenstatic.cpp3
4 files changed, 15 insertions, 7 deletions
diff --git a/engines/supernova/imageid.h b/engines/supernova/imageid.h
index c1168c3978..a05b06c1da 100644
--- a/engines/supernova/imageid.h
+++ b/engines/supernova/imageid.h
@@ -647,7 +647,9 @@ enum ImageId {
kImageCellRobotSparks,
kImageCellRobotBroken,
kImageCellDoorClosed,
- kImageCellDummy1
+ kImageCellDummy1,
+ // file 55
+ kImageOutroScreen
};
}
diff --git a/engines/supernova/resman.cpp b/engines/supernova/resman.cpp
index 1c178846ed..d7ea0b3a71 100644
--- a/engines/supernova/resman.cpp
+++ b/engines/supernova/resman.cpp
@@ -163,10 +163,12 @@ void ResourceManager::initCursorGraphics() {
}
void ResourceManager::initImages() {
- for (int i = 0; i < kNumImageFiles; ++i) {
+ for (int i = 0; i < 44; ++i) {
if (!_images[i].init(i))
error("Failed reading image file msn_data.%03d", i);
}
+ if (!_images[44].init(55))
+ error("Failed reading image file msn_data.055");
}
Audio::SeekableAudioStream *ResourceManager::getSoundStream(AudioId index) {
@@ -190,9 +192,12 @@ Audio::AudioStream *ResourceManager::getSoundStream(MusicId index) {
}
const MSNImage *ResourceManager::getImage(int filenumber) const {
- assert(filenumber < kNumImageFiles);
-
- return &_images[filenumber];
+ if (filenumber < 44)
+ return &_images[filenumber];
+ else if (filenumber == 55)
+ return &_images[44];
+ else
+ return nullptr;
}
const byte *ResourceManager::getImage(CursorId id) const {
diff --git a/engines/supernova/resman.h b/engines/supernova/resman.h
index 080ecc5da4..080497e904 100644
--- a/engines/supernova/resman.h
+++ b/engines/supernova/resman.h
@@ -44,7 +44,7 @@ public:
};
public:
- static const int kNumImageFiles = 44;
+ static const int kNumImageFiles = 45;
public:
ResourceManager();
diff --git a/engines/supernova/screenstatic.cpp b/engines/supernova/screenstatic.cpp
index db987bf2fb..796c1483e1 100644
--- a/engines/supernova/screenstatic.cpp
+++ b/engines/supernova/screenstatic.cpp
@@ -139,7 +139,8 @@ static const Screen::ImageInfo imageInfo[] = {
{43, 12}, {43, 13}, {43, 14}, {43, 15}, {43, 16}, {43, 17},
{43, 18}, {43, 19}, {43, 20}, {43, 21}, {43, 22}, {43, 23},
{43, 24}, {43, 25}, {43, 26}, {43, 27}, {43, 28}, {43, 29},
- {43, 30}, {43, 31}
+ {43, 30}, {43, 31},
+ {55, 0}
};
// Default palette