aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-14 13:23:37 +0000
committerMartin Kiewitz2009-10-14 13:23:37 +0000
commit8df9514b79a0cde3b883c9d2599b3c879c06c614 (patch)
treef54870a09cf3a0185d87b24d6a358a56be9d1344 /engines
parenta2c7ec6d85c23a1cbf7da75f146a926677e5321a (diff)
downloadscummvm-rg350-8df9514b79a0cde3b883c9d2599b3c879c06c614.tar.gz
scummvm-rg350-8df9514b79a0cde3b883c9d2599b3c879c06c614.tar.bz2
scummvm-rg350-8df9514b79a0cde3b883c9d2599b3c879c06c614.zip
SCI/newgui: SciGuiTransitions now supports pixelation effect (lsl5 intro)
svn-id: r45077
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_transitions.cpp25
-rw-r--r--engines/sci/gui/gui_transitions.h2
2 files changed, 26 insertions, 1 deletions
diff --git a/engines/sci/gui/gui_transitions.cpp b/engines/sci/gui/gui_transitions.cpp
index b7507051be..254a6253ec 100644
--- a/engines/sci/gui/gui_transitions.cpp
+++ b/engines/sci/gui/gui_transitions.cpp
@@ -58,6 +58,9 @@ void SciGuiTransitions::doit(Common::Rect picRect) {
if (_isVGA) {
// === VGA transitions
switch (_number) {
+ case SCI_TRANSITIONS_VGA_PIXELATION:
+ setNewPalette(); pixelation();
+ break;
case SCI_TRANSITIONS_VGA_FADEPALETTE:
fadeOut(); setNewScreen(); fadeIn();
break;
@@ -74,7 +77,7 @@ void SciGuiTransitions::doit(Common::Rect picRect) {
break;
default:
- warning("SciGuiTransitions: VGA-%d not implemented", _number);
+ warning("SciGuiTransitions: EGA-%d not implemented", _number);
setNewPalette(); setNewScreen();
}
}
@@ -126,4 +129,24 @@ void SciGuiTransitions::fadeIn() {
}
}
+// pixelates the new picture over the old one
+void SciGuiTransitions::pixelation () {
+ uint16 mask = 0x40, stepNr = 0;
+ Common::Rect pixelRect;
+
+ do {
+ mask = (mask & 1) ? (mask >> 1) ^ 0xB400 : mask >> 1;
+ if (mask >= 320 * 200)
+ continue;
+ pixelRect.left = mask % 320; pixelRect.right = pixelRect.left + 1;
+ pixelRect.top = mask / 320; pixelRect.bottom = pixelRect.top + 1;
+ _screen->copyRectToScreen(pixelRect);
+ if ((stepNr & 0x3FF) == 0) {
+ g_system->updateScreen();
+ g_system->delayMillis(5);
+ }
+ stepNr++;
+ } while (mask != 0x40);
+}
+
} // End of namespace Sci
diff --git a/engines/sci/gui/gui_transitions.h b/engines/sci/gui/gui_transitions.h
index 11a75f3603..32c77486d2 100644
--- a/engines/sci/gui/gui_transitions.h
+++ b/engines/sci/gui/gui_transitions.h
@@ -35,6 +35,7 @@ enum {
};
enum {
+ SCI_TRANSITIONS_VGA_PIXELATION = 9,
SCI_TRANSITIONS_VGA_FADEPALETTE = 10
};
@@ -53,6 +54,7 @@ private:
void setNewScreen();
void fadeOut();
void fadeIn();
+ void pixelation();
SciGui *_gui;
SciGuiScreen *_screen;