[Scummvm-cvs-logs] SF.net SVN: scummvm:[45150] scummvm/trunk/engines/teenagent

megath at users.sourceforge.net megath at users.sourceforge.net
Fri Oct 16 09:37:13 CEST 2009


Revision: 45150
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45150&view=rev
Author:   megath
Date:     2009-10-16 07:37:12 +0000 (Fri, 16 Oct 2009)

Log Message:
-----------
removed MemoryReadStreamEndian, used regular memory stream classes.

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/objects.cpp
    scummvm/trunk/engines/teenagent/objects.h

Modified: scummvm/trunk/engines/teenagent/objects.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/objects.cpp	2009-10-16 04:26:50 UTC (rev 45149)
+++ scummvm/trunk/engines/teenagent/objects.cpp	2009-10-16 07:37:12 UTC (rev 45150)
@@ -31,20 +31,20 @@
 
 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 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() {

Modified: scummvm/trunk/engines/teenagent/objects.h
===================================================================
--- scummvm/trunk/engines/teenagent/objects.h	2009-10-16 04:26:50 UTC (rev 45149)
+++ scummvm/trunk/engines/teenagent/objects.h	2009-10-16 07:37:12 UTC (rev 45150)
@@ -27,7 +27,6 @@
 #define TEENAGENT_OBJECTS_H
 
 #include "common/rect.h"
-#include "common/stream.h"
 #include "graphics/surface.h"
 
 namespace TeenAgent {


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