diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/supernova.cpp | 4 | ||||
-rw-r--r-- | engines/supernova/supernova.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index f56db88bb7..0e7631becb 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -482,8 +482,10 @@ void SupernovaEngine::renderImage(int section) { } bool SupernovaEngine::setCurrentImage(int filenumber) { - if (filenumber == -1 || filenumber > ARRAYSIZE(_images) - 1) + if (filenumber == -1 || filenumber > ARRAYSIZE(_images) - 1) { + warning("Trying to display image from out of bound file number %d", filenumber); return false; + } _currentImage = &(_images[filenumber]); _system->getPaletteManager()->setPalette(_currentImage->getPalette(), 16, 239); diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h index fe171084b8..882f6a9feb 100644 --- a/engines/supernova/supernova.h +++ b/engines/supernova/supernova.h @@ -90,6 +90,8 @@ public: ScreenBufferStack _screenBuffer; byte _mouseNormal[256]; byte _mouseWait[256]; + // TODO check this! There are 56 data files (0 to 55) and at least the outro + // tries to displayimage from file 55 (and fails!). MSNImageDecoder _images[44]; MSNImageDecoder *_currentImage; struct SoundSample { |