aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2014-09-08 09:13:26 +0100
committerThierry Crozat2014-09-08 09:13:52 +0100
commit4afb40e16f20bad0da4d67222cf8193c51d5ee8f (patch)
treec9d76899b081f5354a54f705bcf789ffa13cec80
parent2a75e9f1adad1599b8153ff39286a72ba51b3b52 (diff)
downloadscummvm-rg350-4afb40e16f20bad0da4d67222cf8193c51d5ee8f.tar.gz
scummvm-rg350-4afb40e16f20bad0da4d67222cf8193c51d5ee8f.tar.bz2
scummvm-rg350-4afb40e16f20bad0da4d67222cf8193c51d5ee8f.zip
SWORD1: Fix speech endianness heuristic on big endian systems
This should fix bug #6720.
-rw-r--r--engines/sword1/sound.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index a6e6d3917e..ef4a2ee025 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -156,7 +156,12 @@ void Sound::checkSpeechFileEndianness() {
be_diff_sum /= be_cpt;
delete [] data;
// Set the big endian flag
+ // uncompreesSpeech gives data in little endian, so on big endian systems the heuristic is actually reversed
+#ifdef SCUMM_BIG_ENDIAN
+ _bigEndianSpeech = (le_diff_sum < be_diff_sum);
+#else
_bigEndianSpeech = (be_diff_sum < le_diff_sum);
+#endif
if (_bigEndianSpeech)
debug(6, "Mac version: using big endian speech file");
else