mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
SCI: Use SeekableReadStreamEndianWrapper
This commit is contained in:
parent
e7cb7113cd
commit
d74516f84a
@ -27,8 +27,7 @@
|
||||
#include "common/platform.h" // for Platform::kPlatformMacintosh
|
||||
#include "common/rational.h" // for operator*, Rational
|
||||
#include "common/str.h" // for String
|
||||
#include "common/stream.h" // for SeekableReadStream
|
||||
#include "common/substream.h" // for SeekableSubReadStreamEndian
|
||||
#include "common/stream.h" // for SeekableReadStream, SeekableReadStreamEndianWrapper
|
||||
#include "common/textconsole.h" // for error, warning
|
||||
#include "common/types.h" // for Flag::NO, Flag::YES
|
||||
#include "sci/engine/seg_manager.h" // for SegManager
|
||||
@ -385,7 +384,7 @@ void RobotDecoder::initStream(const GuiResourceId robotId) {
|
||||
const uint16 version = stream->readUint16BE();
|
||||
const bool bigEndian = (0 < version && version <= 0x00ff);
|
||||
|
||||
_stream = new Common::SeekableSubReadStreamEndian(stream, 0, stream->size(), bigEndian, DisposeAfterUse::YES);
|
||||
_stream = new Common::SeekableReadStreamEndianWrapper(stream, bigEndian, DisposeAfterUse::YES);
|
||||
_stream->seek(2, SEEK_SET);
|
||||
if (_stream->readUint32BE() != MKTAG('S', 'O', 'L', 0)) {
|
||||
error("Resource %s is not Robot type!", fileName.c_str());
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "sci/graphics/helpers.h" // for GuiResourceId
|
||||
#include "sci/graphics/screen_item32.h" // for ScaleInfo, ScreenItem (ptr o...
|
||||
|
||||
namespace Common { class SeekableSubReadStreamEndian; }
|
||||
namespace Common { class SeekableReadStreamEndian; }
|
||||
namespace Sci {
|
||||
class Plane;
|
||||
class SegManager;
|
||||
@ -644,7 +644,7 @@ private:
|
||||
/**
|
||||
* The read stream containing raw robot data.
|
||||
*/
|
||||
Common::SeekableSubReadStreamEndian *_stream;
|
||||
Common::SeekableReadStreamEndian *_stream;
|
||||
|
||||
/**
|
||||
* The current status of the player.
|
||||
|
Loading…
Reference in New Issue
Block a user