diff options
Diffstat (limited to 'engines/lure')
-rw-r--r-- | engines/lure/animseq.cpp | 6 | ||||
-rw-r--r-- | engines/lure/screen.cpp | 13 | ||||
-rw-r--r-- | engines/lure/screen.h | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/engines/lure/animseq.cpp b/engines/lure/animseq.cpp index 39d74e5ec8..f3c8a6b3b4 100644 --- a/engines/lure/animseq.cpp +++ b/engines/lure/animseq.cpp @@ -104,14 +104,14 @@ AnimationSequence::AnimationSequence(Screen &screen, OSystem &system, uint16 scr _lineRefs = d.getEntry(_screenId + 1); - // Show the screen that preceeds the start of the animation data - _screen.setPaletteEmpty(); + // Reset the palette and set the initial starting screen + _screen.setPaletteEmpty(RES_PALETTE_ENTRIES); _screen.screen().data().copyFrom(_decodedData, 0, 0, FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH); _screen.update(); // Set the palette if (fadeIn) _screen.paletteFadeIn(&_palette); - else _screen.setPalette(&_palette); + else _screen.setPalette(&_palette, 0, _palette.numEntries()); // Set up frame poitners _pPixels = _decodedData->data() + SCREEN_SIZE; diff --git a/engines/lure/screen.cpp b/engines/lure/screen.cpp index 0cd2dd9357..7e96484b2f 100644 --- a/engines/lure/screen.cpp +++ b/engines/lure/screen.cpp @@ -55,11 +55,11 @@ Screen::~Screen() { // setPaletteEmpty // Defaults the palette to an empty set -void Screen::setPaletteEmpty() { +void Screen::setPaletteEmpty(int numEntries) { delete _palette; _palette = new Palette(); - _system.setPalette(_palette->data(), 0, GAME_COLOURS); + _system.setPalette(_palette->data(), 0, numEntries); _system.updateScreen(); } @@ -76,9 +76,8 @@ void Screen::setPalette(Palette *p) { // Variation that allows the specification of a subset of a palette passed in to be copied void Screen::setPalette(Palette *p, uint16 start, uint16 num) { - _palette->palette()->copyFrom(p->palette(), start * PALETTE_FADE_INC_SIZE, - start * PALETTE_FADE_INC_SIZE, num * PALETTE_FADE_INC_SIZE); - _system.setPalette(_palette->data(), 0, GAME_COLOURS); + _palette->palette()->copyFrom(p->palette(), start * 4, start * 4, num * 4); + _system.setPalette(_palette->data(), start, num); _system.updateScreen(); } @@ -111,7 +110,7 @@ void Screen::paletteFadeIn(Palette *p) { } if (changed) { - _system.setPalette(_palette->data(), 0, GAME_COLOURS); + _system.setPalette(_palette->data(), 0, p->numEntries()); _system.updateScreen(); _system.delayMillis(20); events.pollEvent(); @@ -143,7 +142,7 @@ void Screen::paletteFadeOut(int numEntries) { } if (changed) { - _system.setPalette(_palette->data(), 0, GAME_COLOURS); + _system.setPalette(_palette->data(), 0, numEntries); _system.updateScreen(); _system.delayMillis(20); events.pollEvent(); diff --git a/engines/lure/screen.h b/engines/lure/screen.h index 7182c4236b..90db7ee314 100644 --- a/engines/lure/screen.h +++ b/engines/lure/screen.h @@ -47,12 +47,12 @@ public: ~Screen(); static Screen &getReference(); - void setPaletteEmpty(); + void setPaletteEmpty(int numEntries = RES_PALETTE_ENTRIES); void setPalette(Palette *p); void setPalette(Palette *p, uint16 start, uint16 num); Palette &getPalette() { return *_palette; } void paletteFadeIn(Palette *p); - void paletteFadeOut(int numEntries = MAIN_PALETTE_SIZE); + void paletteFadeOut(int numEntries = RES_PALETTE_ENTRIES); void resetPalette(); void empty(); void update(); |