[Scummvm-cvs-logs] SF.net SVN: scummvm:[45717] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Sat Nov 7 10:18:30 CET 2009
Revision: 45717
http://scummvm.svn.sourceforge.net/scummvm/?rev=45717&view=rev
Author: megath
Date: 2009-11-07 09:18:30 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
added actor position, orientation and dump() to hotspot struct
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-11-07 09:16:00 UTC (rev 45716)
+++ scummvm/trunk/engines/teenagent/objects.cpp 2009-11-07 09:18:30 UTC (rev 45717)
@@ -134,12 +134,19 @@
Common::MemoryReadStream in(src, 9);
inventory_id = in.readByte();
object_id = in.readByte();
- unk02 = in.readByte();
- x = in.readUint16LE();
- y = in.readUint16LE();
+ orientation = in.readByte();
+ actor_x = in.readUint16LE();
+ actor_y = in.readUint16LE();
callback = in.readUint16LE();
}
+void UseHotspot::dump() const {
+ debug(0,
+ "hotspot: inv_id: %02x, obj_id: %02x, orientation?: %02x, actor position: (%d,%d), callback: %04x",
+ inventory_id, object_id, orientation, actor_x, actor_y, callback
+ );
+}
+
void Walkbox::dump() const {
debug(0, "walkbox %02x %02x [%d, %d, %d, %d] %02x %02x %02x %02x ",
type, orientation,
Modified: scummvm/trunk/engines/teenagent/objects.h
===================================================================
--- scummvm/trunk/engines/teenagent/objects.h 2009-11-07 09:16:00 UTC (rev 45716)
+++ scummvm/trunk/engines/teenagent/objects.h 2009-11-07 09:18:30 UTC (rev 45717)
@@ -113,10 +113,11 @@
struct UseHotspot {
byte inventory_id;
byte object_id;
- byte unk02;
- uint16 x, y;
+ byte orientation; //?
+ uint16 actor_x, actor_y;
uint16 callback;
void load(byte *src);
+ void dump() const;
};
struct Walkbox {
@@ -137,6 +138,9 @@
byte * _base;
};
+//\todo move it to util.h?
+template<typename T> inline T SIGN (T x) { return (x > 0)? 1: ((x < 0)? -1: 0); }
+
} // End of namespace TeenAgent
#endif
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