diff options
author | Max Horn | 2002-11-13 13:42:16 +0000 |
---|---|---|
committer | Max Horn | 2002-11-13 13:42:16 +0000 |
commit | 248b9d974fdd2a1c14a369711eb9167ad5467f1d (patch) | |
tree | f3317dd527e0c6292ada7cdc2d1d27f6d56d5144 /simon | |
parent | de554e2f9d9a389eb30e6ff1953e017a2817935f (diff) | |
download | scummvm-rg350-248b9d974fdd2a1c14a369711eb9167ad5467f1d.tar.gz scummvm-rg350-248b9d974fdd2a1c14a369711eb9167ad5467f1d.tar.bz2 scummvm-rg350-248b9d974fdd2a1c14a369711eb9167ad5467f1d.zip |
cleanup
svn-id: r5530
Diffstat (limited to 'simon')
-rw-r--r-- | simon/simon.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index 6c333ca4d5..dc8f2dc176 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -4674,11 +4674,15 @@ bool SimonState::load_game(uint slot) void SimonState::initSound() { + uint i; /* only read voice file in windows game */ if (_game & GAME_TALKIE) { const char *s; const char *e; + // + // Load voice file + // _voice_offsets = NULL; _voice_file = new File(); _voice_type = FORMAT_NONE; @@ -4725,6 +4729,10 @@ void SimonState::initSound() if (_voice_file->read(_voice_offsets, gss->NUM_VOICE_RESOURCES * sizeof(uint32)) != gss->NUM_VOICE_RESOURCES * sizeof(uint32)) error("Cannot read voice offsets"); +#ifdef SCUMM_BIG_ENDIAN + for (i = 0; i < gss->NUM_VOICE_RESOURCES; i++) + _voice_offsets[i] = FROM_LE_32(_voice_offsets[i]); +#endif #ifdef USE_MAD if (_voice_type == FORMAT_MP3) { uint8 buf[2048]; @@ -4740,6 +4748,9 @@ void SimonState::initSound() #endif } + // + // Load effects + // _effects_offsets = NULL; _effects_file = new File(); _effects_type = FORMAT_VOC; @@ -4772,6 +4783,10 @@ void SimonState::initSound() if (_effects_file->read(_effects_offsets, gss->NUM_EFFECTS_RESOURCES * sizeof(uint32)) != gss->NUM_EFFECTS_RESOURCES * sizeof(uint32)) error("Cannot read effects offsets"); +#ifdef SCUMM_BIG_ENDIAN + for (i = 0; i < gss->NUM_EFFECTS_RESOURCES; i++) + _effects_offsets[i] = FROM_LE_32(_effects_offsets[i]); +#endif #ifdef USE_MAD if (_effects_type == FORMAT_MP3) { uint8 buf[2048]; @@ -4789,18 +4804,6 @@ void SimonState::initSound() _effects_type = FORMAT_NONE; } -#if defined(SCUMM_BIG_ENDIAN) - uint r; - if (_voice_offsets) { - for (r = 0; r < gss->NUM_VOICE_RESOURCES; r++) - _voice_offsets[r] = FROM_LE_32(_voice_offsets[r]); - } - - if (_effects_offsets) { - for (r = 0; r < gss->NUM_EFFECTS_RESOURCES; r++) - _effects_offsets[r] = FROM_LE_32(_effects_offsets[r]); - } -#endif } } |