[Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.cpp,1.52,1.53
Oliver Kiehl
olki at users.sourceforge.net
Sat Sep 13 07:33:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv7719/driver
Modified Files:
d_sound.cpp
Log Message:
fix speech on BE
Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- d_sound.cpp 13 Sep 2003 13:05:52 -0000 1.52
+++ d_sound.cpp 13 Sep 2003 14:32:40 -0000 1.53
@@ -387,15 +387,19 @@
fp.close();
return (0);
}
+#ifdef SCUMM_BIG_ENDIAN
+ speechIndex[0] = SWAP_BYTES_32(speechIndex[0]);
+ speechIndex[1] = SWAP_BYTES_32(speechIndex[1]);
+#endif
- if (!FROM_LE_32(speechIndex[0]) || !FROM_LE_32(speechIndex[1])) {
+ if (!speechIndex[0] || !speechIndex[1]) {
fp.close();
return (0);
}
fp.close();
- i = (FROM_LE_32(speechIndex[1]) - 1) * 2 + sizeof(_wavHeader) + 8;
+ i = (speechIndex[1] - 1) * 2 + sizeof(_wavHeader) + 8;
return(i);
}
@@ -419,6 +423,10 @@
fp.close();
return (RDERR_READERROR);
}
+#ifdef SCUMM_BIG_ENDIAN
+ speechIndex[0] = SWAP_BYTES_32(speechIndex[0]);
+ speechIndex[1] = SWAP_BYTES_32(speechIndex[1]);
+#endif
if (!speechIndex[0] || !speechIndex[1]) {
fp.close();
@@ -500,6 +508,10 @@
fp.close();
return (RDERR_READERROR);
}
+#ifdef SCUMM_BIG_ENDIAN
+ speechIndex[0] = SWAP_BYTES_32(speechIndex[0]);
+ speechIndex[1] = SWAP_BYTES_32(speechIndex[1]);
+#endif
if (speechIndex[0] == 0 || speechIndex[1] == 0) {
fp.close();
More information about the Scummvm-git-logs
mailing list