[Scummvm-cvs-logs] CVS: scummvm/sword1 sound.cpp,1.26,1.27 sword1.cpp,1.48,1.49
Travis Howell
kirben at users.sourceforge.net
Mon Jul 26 20:56:16 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm NEWS,1.71,1.72 README,1.275,1.276 TODO,1.140,1.141
- Next message: [Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.438,1.439 vga.cpp,1.116,1.117
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30941/sword1
Modified Files:
sound.cpp sword1.cpp
Log Message:
Add support for speech in demo.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sound.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- sound.cpp 17 Jan 2004 11:16:38 -0000 1.26
+++ sound.cpp 27 Jul 2004 03:47:49 -0000 1.27
@@ -186,6 +186,12 @@
headerPos++;
if (headerPos < 100) {
uint32 resSize = READ_LE_UINT32(fBuf + headerPos + 4) >> 1;
+ // Demo uses slightly different headers
+ if (resSize > cSize) {
+ resSize = READ_LE_UINT32(fBuf + headerPos + 6) >> 1;
+ headerPos += 2;
+ }
+
int16 *srcData = (int16*)(fBuf + headerPos + 8);
int16 *dstData = (int16*)malloc(resSize * 2);
uint32 srcPos = 0;
@@ -254,9 +260,10 @@
*/
sprintf(cowName, "SPEECH%d.CLU", SwordEngine::_systemVars.currentCD);
_cowFile.open(cowName);
- if (!_cowFile.isOpen()) {
+ if (!_cowFile.isOpen())
_cowFile.open("speech.clu");
- }
+ if (!_cowFile.isOpen())
+ _cowFile.open("cows.mad");
if (_cowFile.isOpen()) {
_cowHeaderSize = _cowFile.readUint32LE();
_cowHeader = (uint32*)malloc(_cowHeaderSize);
Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- sword1.cpp 16 Jul 2004 06:57:47 -0000 1.48
+++ sword1.cpp 27 Jul 2004 03:47:56 -0000 1.49
@@ -1066,10 +1066,6 @@
_systemVars.playSpeech = true;
return ;
} else {
- const char msg[] = "SPEECH2.CLU not found.\nPlease copy the SPEECH.CLU from CD2 and rename it to SPEECH2.CLU";
- GUI::MessageDialog dialog(msg);
- dialog.runModal();
- error(msg);
}
} else { // speech1.clu & speech2.clu not present. are we running from cd?
if (test.open("cd1.id")) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm NEWS,1.71,1.72 README,1.275,1.276 TODO,1.140,1.141
- Next message: [Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.438,1.439 vga.cpp,1.116,1.117
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list