aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorRuediger Hanke2002-07-21 14:31:58 +0000
committerRuediger Hanke2002-07-21 14:31:58 +0000
commit59c58a3b68b064fea9c51d9ce6f9c2ce0ae15ce7 (patch)
tree8a8b86fcf6cd59882ba36af9aee1d275c65ecba1 /simon
parent8de1ace6c7a8cb2d18abdea56edb7991731ba38f (diff)
downloadscummvm-rg350-59c58a3b68b064fea9c51d9ce6f9c2ce0ae15ce7.tar.gz
scummvm-rg350-59c58a3b68b064fea9c51d9ce6f9c2ce0ae15ce7.tar.bz2
scummvm-rg350-59c58a3b68b064fea9c51d9ce6f9c2ce0ae15ce7.zip
Voices were broken in Simon on Big Endian systems ...
svn-id: r4612
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index b2e71a54ac..ef8957cb66 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -4613,15 +4613,15 @@ void SimonState::initSound()
_effects_offsets = NULL;
_effects_file = fopen_maybe_lowercase(e);
- if (_effects_file == NULL)
- return;
-
- _effects_offsets = (uint32 *)malloc(gss->NUM_EFFECTS_RESOURCES * sizeof(uint32));
- if (_effects_offsets == NULL)
- error("Out of memory for effects offsets");
+ if (_effects_file != NULL)
+ {
+ _effects_offsets = (uint32 *)malloc(gss->NUM_EFFECTS_RESOURCES * sizeof(uint32));
+ if (_effects_offsets == NULL)
+ error("Out of memory for effects offsets");
- if (fread(_effects_offsets, gss->NUM_EFFECTS_RESOURCES * sizeof(uint32), 1, _effects_file) != 1)
- error("Cannot read effects offsets");
+ if (fread(_effects_offsets, gss->NUM_EFFECTS_RESOURCES * sizeof(uint32), 1, _effects_file) != 1)
+ error("Cannot read effects offsets");
+ }
#if defined(SCUMM_BIG_ENDIAN)
for (int r = 0; r < gss->NUM_VOICE_RESOURCES; r++)
@@ -4688,7 +4688,6 @@ void SimonState::playVoice(uint voice)
|| wave_hdr.fmt != MKID('fmt ') || READ_LE_UINT16(&wave_hdr.format_tag) != 1
|| READ_LE_UINT16(&wave_hdr.channels) != 1
|| READ_LE_UINT16(&wave_hdr.bits_per_sample) != 8) {
- warning("playVoice(%d): cannot read RIFF header", voice);
return;
}