[Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_draw.cpp,1.12,1.13
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Tue Sep 9 00:02:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv4601/driver
Modified Files:
d_draw.cpp
Log Message:
Clarified some comments in PlaySmacker(). At this point it should be fairly
trivial to actually play the Smacker voice-overs, but I think the sound
code needs a bit more cleaning up first. (I'm pretty sure it isn't
alignment-safe, and it might not be endian-safe either.)
Index: d_draw.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_draw.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- d_draw.cpp 8 Sep 2003 17:44:26 -0000 1.12
+++ d_draw.cpp 9 Sep 2003 07:01:04 -0000 1.13
@@ -537,6 +537,10 @@
// TODO: Play the voice-over sounds.
+ // Do we really need to pre-cache the text sprites and speech data
+ // like this? It'd be simpler to just store the text id and construct
+ // the data as we go along.
+
if (text) {
uint8 oldPal[1024];
uint8 tmpPal[1024];
@@ -550,8 +554,11 @@
int textCounter = 0;
// Fake a palette that will hopefully make the text visible.
- // In the opening cutscene it seems to use colours 1 (black)
- // and 255 (white).
+ // In the opening cutscene it seems to use colours 1 (black?)
+ // and 255 (white?).
+ //
+ // The text should probably be colored the same as the rest of
+ // the in-game text.
memcpy(oldPal, palCopy, 1024);
memset(tmpPal, 0, 1024);
@@ -568,6 +575,8 @@
EraseBackBuffer();
OpenTextObject(text[textCounter]);
DrawTextObject(text[textCounter]);
+ if (text[textCounter]->speech)
+ debug(0, "FIXME: Play subtitle speech");
}
if (frameCounter == text[textCounter]->endFrame) {
@@ -582,10 +591,14 @@
char key;
- if (ReadKey(&key) == RD_OK && key == 27)
+ if (ReadKey(&key) == RD_OK && key == 27) {
+ // StopWavSpeech()
break;
+ }
- // Simulate ~12 frames per second.
+ // Simulate ~12 frames per second. I don't know what
+ // frame rate the original movies had, or even if it
+ // was constant, but this seems to work reasonably.
g_system->delay_msecs(80);
}
More information about the Scummvm-git-logs
mailing list