diff options
author | Filippos Karapetis | 2008-12-19 08:22:25 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-19 08:22:25 +0000 |
commit | b7dbd3ec06c3b203d2c8e201a818e6f5e3297f83 (patch) | |
tree | 4c1e98c983d690dc51d18a7df732bb8f79f64791 /graphics | |
parent | 83194b2188c2cbaf205b8926b7d7641a2003f85f (diff) | |
download | scummvm-rg350-b7dbd3ec06c3b203d2c8e201a818e6f5e3297f83.tar.gz scummvm-rg350-b7dbd3ec06c3b203d2c8e201a818e6f5e3297f83.tar.bz2 scummvm-rg350-b7dbd3ec06c3b203d2c8e201a818e6f5e3297f83.zip |
Some slight cleanup
svn-id: r35435
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/smk_player.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/graphics/smk_player.cpp b/graphics/smk_player.cpp index f6565c8ac3..74bdd1b603 100644 --- a/graphics/smk_player.cpp +++ b/graphics/smk_player.cpp @@ -799,28 +799,18 @@ void SMKPlayer::queueCompressedBuffer(byte *buffer, uint32 bufferSize, if (!is16Bits) { for (int k = 0; k < (isStereo ? 2 : 1); k++) { - int8 v = (int8) ((int16) audioTrees[k]->getCode(audioBS)); - - bases[k] += v; - - byte data = CLIP<int>(bases[k], 0, 255); - - *curPointer++ = data ^ 0x80; + bases[k] += (int8) ((int16) audioTrees[k]->getCode(audioBS)); + *curPointer++ = CLIP<int>(bases[k], 0, 255) ^ 0x80; curPos++; } } else { for (int k = 0; k < (isStereo ? 2 : 1); k++) { - int16 v = (int16) (audioTrees[k * 2]->getCode(audioBS) | - (audioTrees[k * 2 + 1]->getCode(audioBS) << 8)); - - bases[k] += v; - - int16 data = CLIP<int32>(bases[k], -32768, 32767); - - WRITE_BE_UINT16(curPointer, data); + bases[k] += (int16) (audioTrees[k * 2]->getCode(audioBS) | + (audioTrees[k * 2 + 1]->getCode(audioBS) << 8)); + WRITE_BE_UINT16(curPointer, CLIP<int32>(bases[k], -32768, 32767)); curPointer += 2; curPos += 2; } |