aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFabio Battaglia2009-06-08 17:54:44 +0000
committerFabio Battaglia2009-06-08 17:54:44 +0000
commit51d0005af37140451afe4a448c22d14e973f5801 (patch)
tree2d05cfb18aaf759fc9218c87eaccac4d12e88417 /engines
parentaef8d2b04bfc2f3e28a5b58e55a7a27fa9da74ee (diff)
downloadscummvm-rg350-51d0005af37140451afe4a448c22d14e973f5801.tar.gz
scummvm-rg350-51d0005af37140451afe4a448c22d14e973f5801.tar.bz2
scummvm-rg350-51d0005af37140451afe4a448c22d14e973f5801.zip
sword1: slight cleanup of psx related sound code and comments
svn-id: r41380
Diffstat (limited to 'engines')
-rw-r--r--engines/sword1/music.cpp2
-rw-r--r--engines/sword1/sound.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 9f602aca2c..fb9068dde7 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -272,7 +272,7 @@ bool MusicHandle::playPSX(uint16 id, bool loop) {
tableFile.close();
- if (size != 0xffffffff && size) {
+ if ((size != 0) && (size != 0xffffffff)) {
_file.seek(offset, SEEK_SET);
_audioSource = new Audio::VagStream(_file.readStream(size), loop);
fadeUp();
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 306d23db57..5577c66fc6 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -226,14 +226,14 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
return false;
}
- uint16 numRooms = file.readUint16LE(); // Number of rooms
+ uint16 numRooms = file.readUint16LE(); // Read number of rooms referenced in this file
file.seek(locIndex * 4 + 2); // 4 bytes per room, skip first 2 bytes
uint16 numLines = file.readUint16LE();
uint16 roomOffset = file.readUint16LE();
- file.seek(2 + numRooms * 4 + roomOffset * 2); // The offset is in terms of uint16's, so multiply by 2. Skip the 0x112 byte header too.
+ file.seek(2 + numRooms * 4 + roomOffset * 2); // The offset is in terms of uint16's, so multiply by 2. Skip the room indexes too.
locIndex = 0xFFFFFFFF;