diff options
author | Paul Gilbert | 2008-01-01 13:00:47 +0000 |
---|---|---|
committer | Paul Gilbert | 2008-01-01 13:00:47 +0000 |
commit | 79a9074548e0e988344cab3842a134559da0c8b5 (patch) | |
tree | abee52ba56d4fb54aada7e2e3b0f7eba41c256a8 /engines/lure | |
parent | 4308e6ab10b56a5212647d943c2cb424aa8307f8 (diff) | |
download | scummvm-rg350-79a9074548e0e988344cab3842a134559da0c8b5.tar.gz scummvm-rg350-79a9074548e0e988344cab3842a134559da0c8b5.tar.bz2 scummvm-rg350-79a9074548e0e988344cab3842a134559da0c8b5.zip |
Added support for the EGA introduction sequence
svn-id: r30116
Diffstat (limited to 'engines/lure')
-rw-r--r-- | engines/lure/intro.cpp | 25 | ||||
-rw-r--r-- | engines/lure/intro.h | 5 | ||||
-rw-r--r-- | engines/lure/lure.cpp | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/engines/lure/intro.cpp b/engines/lure/intro.cpp index 9d73cc0fe5..9f551e188c 100644 --- a/engines/lure/intro.cpp +++ b/engines/lure/intro.cpp @@ -54,20 +54,21 @@ static const AnimRecord anim_screens[] = { // should be aborted bool Introduction::showScreen(uint16 screenId, uint16 paletteId, uint16 delaySize) { + Screen &screen = Screen::getReference(); Events &events = Events::getReference(); bool isEGA = LureEngine::getReference().isEGA(); - _screen.screen().loadScreen(screenId); - _screen.update(); + screen.screen().loadScreen(screenId); + screen.update(); Palette p(paletteId); - if (isEGA) _screen.setPalette(&p); - else _screen.paletteFadeIn(&p); + if (isEGA) screen.setPalette(&p); + else screen.paletteFadeIn(&p); bool result = interruptableDelay(delaySize); if (events.quitFlag) return true; if (!isEGA) - _screen.paletteFadeOut(); + screen.paletteFadeOut(); return result; } @@ -93,7 +94,9 @@ bool Introduction::interruptableDelay(uint32 milliseconds) { // Main method for the introduction sequence bool Introduction::show() { - _screen.setPaletteEmpty(); + Screen &screen = Screen::getReference(); + bool isEGA = LureEngine::getReference().isEGA(); + screen.setPaletteEmpty(); // Initial game company and then game screen @@ -101,12 +104,14 @@ bool Introduction::show() { if (showScreen(start_screens[ctr], start_screens[ctr] + 1, 5000)) return true; + PaletteCollection coll(0x32); + Palette EgaPalette(0x1D); + // Animated screens AnimationSequence *anim; bool result; uint8 currentSound = 0xff; - PaletteCollection coll(0x32); const AnimRecord *curr_anim = anim_screens; for (; curr_anim->resourceId; ++curr_anim) { // Handle sound selection @@ -121,7 +126,7 @@ bool Introduction::show() { bool fadeIn = curr_anim == anim_screens; anim = new AnimationSequence(curr_anim->resourceId, - coll.getPalette(curr_anim->paletteIndex), fadeIn); + isEGA ? EgaPalette : coll.getPalette(curr_anim->paletteIndex), fadeIn); if (curr_anim->initialPause != 0) if (interruptableDelay(curr_anim->initialPause * 1000 / 50)) return true; @@ -151,10 +156,10 @@ bool Introduction::show() { // Show battle pictures one frame at a time result = false; - anim = new AnimationSequence(0x48, coll.getPalette(4), false); + anim = new AnimationSequence(0x48, isEGA ? EgaPalette : coll.getPalette(4), false); do { result = interruptableDelay(2000); - _screen.paletteFadeOut(); + screen.paletteFadeOut(); if (!result) result = interruptableDelay(500); if (result) break; } while (anim->step()); diff --git a/engines/lure/intro.h b/engines/lure/intro.h index d6b42c455b..d219438b8a 100644 --- a/engines/lure/intro.h +++ b/engines/lure/intro.h @@ -32,14 +32,9 @@ namespace Lure { class Introduction { private: - Screen &_screen; - OSystem &_system; - bool showScreen(uint16 screenId, uint16 paletteId, uint16 delaySize); bool interruptableDelay(uint32 milliseconds); public: - Introduction(Screen &screen, OSystem &system): _screen(screen), _system(system) {} - bool show(); }; diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index 2e1d4bf0c2..3a0d35de56 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -133,8 +133,8 @@ int LureEngine::go() { if (ConfMan.getInt("boot_param") == 0) { // Show the introduction Sound.loadSection(Sound.isRoland() ? ROLAND_INTRO_SOUND_RESOURCE_ID : ADLIB_INTRO_SOUND_RESOURCE_ID); - Introduction *intro = new Introduction(*_screen, *_system); + Introduction *intro = new Introduction(); intro->show(); delete intro; } |