diff options
-rw-r--r-- | engines/supernova/imageid.h | 4 | ||||
-rw-r--r-- | engines/supernova/resman.cpp | 13 | ||||
-rw-r--r-- | engines/supernova/resman.h | 2 | ||||
-rw-r--r-- | engines/supernova/screenstatic.cpp | 3 |
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 |