Permalink
Browse files

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/
  • Loading branch information...
Joefish committed Apr 21, 2018
1 parent c20b960 commit ebaa6739ec68cf18b8c8a272df8d992a36a4728e
Showing with 15 additions and 7 deletions.
  1. +3 −1 engines/supernova/imageid.h
  2. +9 −4 engines/supernova/resman.cpp
  3. +1 −1 engines/supernova/resman.h
  4. +2 −1 engines/supernova/screenstatic.cpp
@@ -647,7 +647,9 @@ enum ImageId {
kImageCellRobotSparks,
kImageCellRobotBroken,
kImageCellDoorClosed,
kImageCellDummy1
kImageCellDummy1,
// file 55
kImageOutroScreen
};

}
@@ -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 {
@@ -44,7 +44,7 @@ class ResourceManager {
};

public:
static const int kNumImageFiles = 44;
static const int kNumImageFiles = 45;

public:
ResourceManager();
@@ -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

0 comments on commit ebaa673

Please sign in to comment.