[Scummvm-cvs-logs] scummvm master -> 4afb40e16f20bad0da4d67222cf8193c51d5ee8f

criezy criezy at scummvm.org
Mon Sep 8 10:15:08 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4afb40e16f SWORD1: Fix speech endianness heuristic on big endian systems


Commit: 4afb40e16f20bad0da4d67222cf8193c51d5ee8f
    https://github.com/scummvm/scummvm/commit/4afb40e16f20bad0da4d67222cf8193c51d5ee8f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2014-09-08T09:13:52+01:00

Commit Message:
SWORD1: Fix speech endianness heuristic on big endian systems

This should fix bug #6720.

Changed paths:
    engines/sword1/sound.cpp



diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index a6e6d39..ef4a2ee 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






More information about the Scummvm-git-logs mailing list