diff options
author | Vladimir Menshakov | 2009-10-16 07:37:12 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-10-16 07:37:12 +0000 |
commit | 9934b70733f3322e1136d805f927fb0f628d1dfc (patch) | |
tree | fab10a2c073d2498e67754704df1deb068c404f1 | |
parent | 1535ae7f6ee54dc3457794fd7e73c7410b4506a1 (diff) | |
download | scummvm-rg350-9934b70733f3322e1136d805f927fb0f628d1dfc.tar.gz scummvm-rg350-9934b70733f3322e1136d805f927fb0f628d1dfc.tar.bz2 scummvm-rg350-9934b70733f3322e1136d805f927fb0f628d1dfc.zip |
removed MemoryReadStreamEndian, used regular memory stream classes.
svn-id: r45150
-rw-r--r-- | engines/teenagent/objects.cpp | 28 | ||||
-rw-r--r-- | engines/teenagent/objects.h | 1 |
2 files changed, 14 insertions, 15 deletions
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp index f42a5f3140..0ddcbf54fe 100644 --- a/engines/teenagent/objects.cpp +++ b/engines/teenagent/objects.cpp @@ -31,20 +31,20 @@ namespace TeenAgent { void Rect::load(byte * src) { _base = src; - Common::MemoryReadStreamEndian ins(src, 8); - left = ins.readUint16(); - top = ins.readUint16(); - right = ins.readUint16(); - bottom = ins.readUint16(); + Common::MemoryReadStream ins(src, 8); + left = ins.readUint16LE(); + top = ins.readUint16LE(); + right = ins.readUint16LE(); + bottom = ins.readUint16LE(); } void Rect::save() { assert(_base != NULL); - //Common::MemoryWriteStreamEndian out(_base, 8); //FIXME: maybe add this class to common? - WRITE_LE_UINT16(_base + 0, left); - WRITE_LE_UINT16(_base + 2, top); - WRITE_LE_UINT16(_base + 4, right); - WRITE_LE_UINT16(_base + 6, bottom); + Common::MemoryWriteStream outs(_base, 8); + outs.writeUint16LE(left); + outs.writeUint16LE(top); + outs.writeUint16LE(right); + outs.writeUint16LE(bottom); } void Rect::render(Graphics::Surface *surface, uint8 color) const { @@ -131,13 +131,13 @@ void InventoryObject::load(byte *src) { } void UseHotspot::load(byte *src) { - Common::MemoryReadStreamEndian in(src, 9); + Common::MemoryReadStream in(src, 9); inventory_id = in.readByte(); object_id = in.readByte(); unk02 = in.readByte(); - x = in.readUint16(); - y = in.readUint16(); - callback = in.readUint16(); + x = in.readUint16LE(); + y = in.readUint16LE(); + callback = in.readUint16LE(); } void Walkbox::dump() { diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h index 60b5d5ad2c..ecd1dd71e9 100644 --- a/engines/teenagent/objects.h +++ b/engines/teenagent/objects.h @@ -27,7 +27,6 @@ #define TEENAGENT_OBJECTS_H #include "common/rect.h" -#include "common/stream.h" #include "graphics/surface.h" namespace TeenAgent { |