[Scummvm-cvs-logs] SF.net SVN: scummvm:[42495] scummvm/trunk/engines/agi
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Wed Jul 15 01:03:40 CEST 2009
Revision: 42495
http://scummvm.svn.sourceforge.net/scummvm/?rev=42495&view=rev
Author: buddha_
Date: 2009-07-14 23:03:40 +0000 (Tue, 14 Jul 2009)
Log Message:
-----------
Remove ioFailed() usage from AGI engine.
Modified Paths:
--------------
scummvm/trunk/engines/agi/graphics.cpp
scummvm/trunk/engines/agi/sound.cpp
scummvm/trunk/engines/agi/wagparser.cpp
Modified: scummvm/trunk/engines/agi/graphics.cpp
===================================================================
--- scummvm/trunk/engines/agi/graphics.cpp 2009-07-14 23:03:25 UTC (rev 42494)
+++ scummvm/trunk/engines/agi/graphics.cpp 2009-07-14 23:03:40 UTC (rev 42495)
@@ -846,7 +846,7 @@
//Chunks4-7 are duplicates of chunks0-3
- if (agipal.ioFailed()) {
+ if (agipal.eos() || agipal.err()) {
warning("Couldn't read AGIPAL palette from '%s'. Not changing palette", filename);
return;
}
Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp 2009-07-14 23:03:25 UTC (rev 42494)
+++ scummvm/trunk/engines/agi/sound.cpp 2009-07-14 23:03:40 UTC (rev 42495)
@@ -133,7 +133,7 @@
seg[segNum].inc = stream.readUint16LE();
}
- return !stream.ioFailed();
+ return !(stream.eos() || stream.err());
}
/** Reads an Apple IIGS wave information structure from the given stream. */
@@ -154,7 +154,7 @@
if (ignoreAddr)
addr = 0;
- return !stream.ioFailed();
+ return !(stream.eos() || stream.err());
}
bool IIgsWaveInfo::finalize(Common::SeekableReadStream &uint8Wave) {
@@ -219,7 +219,7 @@
byte wac = stream.readByte(); // Read A wave count
byte wbc = stream.readByte(); // Read B wave count
oscList.read(stream, wac, ignoreAddr); // Read the oscillators
- return (wac == wbc) && !stream.ioFailed(); // A and B wave counts must match
+ return (wac == wbc) && !(stream.eos() || stream.err()); // A and B wave counts must match
}
bool IIgsInstrumentHeader::finalize(Common::SeekableReadStream &uint8Wave) {
@@ -1158,7 +1158,7 @@
// Convert the wave from 8-bit unsigned to 8-bit signed format
for (uint i = 0; i < length; i++)
dest[i] = (int8) ((int) source.readByte() - 128);
- return !source.ioFailed();
+ return !(source.eos() || source.err());
}
bool IIgsSoundMgr::loadWaveFile(const Common::FSNode &wavePath, const IIgsExeInfo &exeInfo) {
Modified: scummvm/trunk/engines/agi/wagparser.cpp
===================================================================
--- scummvm/trunk/engines/agi/wagparser.cpp 2009-07-14 23:03:25 UTC (rev 42494)
+++ scummvm/trunk/engines/agi/wagparser.cpp 2009-07-14 23:03:40 UTC (rev 42495)
@@ -70,7 +70,7 @@
_propNum = stream.readByte();
_propSize = stream.readUint16LE();
- if (stream.ioFailed()) { // Check that we got the whole header
+ if (stream.eos() || stream.err()) { // Check that we got the whole header
_readOk = false;
return _readOk;
}
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