sword1: slight cleanup of psx related sound code and comments

svn-id: r41380
This commit is contained in:
Fabio Battaglia 2009-06-08 17:54:44 +00:00
parent aef8d2b04b
commit 51d0005af3
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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;