From 21eff1eef2e7a56c1a54b566423f64ee37bda53f Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Sat, 17 Jan 2004 11:16:38 +0000 Subject: And again ... guess who fails compiling this ? svn-id: r12453 --- sword1/sound.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sword1/sound.cpp b/sword1/sound.cpp index 8d496016a2..c81362addb 100644 --- a/sword1/sound.cpp +++ b/sword1/sound.cpp @@ -219,7 +219,8 @@ int16 *Sound::uncompressSpeech(uint32 index, uint32 cSize, uint32 *size) { void Sound::calcWaveVolume(int16 *data, uint32 length) { int16 *blkPos = data + 918; - for (uint32 cnt = 0; cnt < WAVE_VOL_TAB_LENGTH; cnt++) + uint32 cnt; + for (cnt = 0; cnt < WAVE_VOL_TAB_LENGTH; cnt++) _waveVolume[cnt] = false; _waveVolPos = 0; for (uint32 blkCnt = 1; blkCnt < length / 918; blkCnt++) { @@ -228,11 +229,11 @@ void Sound::calcWaveVolume(int16 *data, uint32 length) { return; } int32 average = 0; - for (uint32 cnt = 0; cnt < 918; cnt++) + for (cnt = 0; cnt < 918; cnt++) average += blkPos[cnt]; average /= 918; uint32 diff = 0; - for (uint32 cnt = 0; cnt < 918; cnt++) { + for (cnt = 0; cnt < 918; cnt++) { int16 smpDiff = *blkPos - average; diff += (uint32)ABS(smpDiff); blkPos++; -- cgit v1.2.3