[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.20,1.21 animation.h,1.17,1.18
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sat Feb 14 02:44:02 CET 2004
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16057/driver
Modified Files:
animation.cpp animation.h
Log Message:
Paint the overlay black at the end of the movie. Not all movies fade out on
their own, and sometimes the cutscene player will have to wait for the lead
out to finish before returning to the game. (This will probably be true
even after we fix the timing of the lead-outs.)
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- animation.cpp 13 Feb 2004 00:54:58 -0000 1.20
+++ animation.cpp 14 Feb 2004 10:37:20 -0000 1.21
@@ -317,6 +317,13 @@
}
}
+void AnimationState::clearDisplay(void) {
+ NewGuiColor black = _vm->_system->RGBToColor(0, 0, 0);
+
+ for (int i = 0; i < 640 * 480; i++)
+ overlay[i] = black;
+}
+
void AnimationState::updateDisplay(void) {
_vm->_system->copy_rect_overlay(overlay, 640, 0, 0, 640, 480);
}
@@ -518,6 +525,15 @@
if (text)
closeTextObject(text[textCounter]);
+#ifndef BACKEND_8BIT
+ // Most movies fade to black on their own, but not all of them. Since
+ // we may be hanging around in the cutscene player for a while longer,
+ // waiting for the lead-out sound to finish, paint the overlay black.
+
+ anim->clearDisplay();
+ anim->updateDisplay();
+#endif
+
_vm->_graphics->clearScene();
_vm->_graphics->setNeedFullRedraw();
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- animation.h 12 Feb 2004 16:55:18 -0000 1.17
+++ animation.h 14 Feb 2004 10:37:21 -0000 1.18
@@ -120,6 +120,7 @@
#ifndef BACKEND_8BIT
void drawTextObject(SpriteInfo *s, uint8 *src);
+ void clearDisplay();
void updateDisplay(void);
#endif
More information about the Scummvm-git-logs
mailing list