[Scummvm-cvs-logs] SF.net SVN: scummvm: [30116] scummvm/trunk/engines/lure
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Tue Jan 1 14:00:47 CET 2008
Revision: 30116
http://scummvm.svn.sourceforge.net/scummvm/?rev=30116&view=rev
Author: dreammaster
Date: 2008-01-01 05:00:47 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
Added support for the EGA introduction sequence
Modified Paths:
--------------
scummvm/trunk/engines/lure/intro.cpp
scummvm/trunk/engines/lure/intro.h
scummvm/trunk/engines/lure/lure.cpp
Modified: scummvm/trunk/engines/lure/intro.cpp
===================================================================
--- scummvm/trunk/engines/lure/intro.cpp 2008-01-01 12:59:40 UTC (rev 30115)
+++ scummvm/trunk/engines/lure/intro.cpp 2008-01-01 13:00:47 UTC (rev 30116)
@@ -54,20 +54,21 @@
// 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 @@
// 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 @@
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 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 @@
// 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());
Modified: scummvm/trunk/engines/lure/intro.h
===================================================================
--- scummvm/trunk/engines/lure/intro.h 2008-01-01 12:59:40 UTC (rev 30115)
+++ scummvm/trunk/engines/lure/intro.h 2008-01-01 13:00:47 UTC (rev 30116)
@@ -32,14 +32,9 @@
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();
};
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2008-01-01 12:59:40 UTC (rev 30115)
+++ scummvm/trunk/engines/lure/lure.cpp 2008-01-01 13:00:47 UTC (rev 30116)
@@ -133,8 +133,8 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list