[Scummvm-cvs-logs] SF.net SVN: scummvm:[41380] scummvm/trunk/engines/sword1
Hkz at users.sourceforge.net
Hkz at users.sourceforge.net
Mon Jun 8 19:54:44 CEST 2009
Revision: 41380
http://scummvm.svn.sourceforge.net/scummvm/?rev=41380&view=rev
Author: Hkz
Date: 2009-06-08 17:54:44 +0000 (Mon, 08 Jun 2009)
Log Message:
-----------
sword1: slight cleanup of psx related sound code and comments
Modified Paths:
--------------
scummvm/trunk/engines/sword1/music.cpp
scummvm/trunk/engines/sword1/sound.cpp
Modified: scummvm/trunk/engines/sword1/music.cpp
===================================================================
--- scummvm/trunk/engines/sword1/music.cpp 2009-06-08 17:47:37 UTC (rev 41379)
+++ scummvm/trunk/engines/sword1/music.cpp 2009-06-08 17:54:44 UTC (rev 41380)
@@ -272,7 +272,7 @@
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();
Modified: scummvm/trunk/engines/sword1/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sound.cpp 2009-06-08 17:47:37 UTC (rev 41379)
+++ scummvm/trunk/engines/sword1/sound.cpp 2009-06-08 17:54:44 UTC (rev 41380)
@@ -226,14 +226,14 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list