diff options
author | Vladimir Menshakov | 2009-11-07 09:18:30 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-11-07 09:18:30 +0000 |
commit | a826c483b9f99c50d610b169c41b5d869a5502b3 (patch) | |
tree | 228d9457e92755d3223718ab2227ae7def804fee /engines | |
parent | ac1f49d7c957c333b573b3399aa755ed22b20c2b (diff) | |
download | scummvm-rg350-a826c483b9f99c50d610b169c41b5d869a5502b3.tar.gz scummvm-rg350-a826c483b9f99c50d610b169c41b5d869a5502b3.tar.bz2 scummvm-rg350-a826c483b9f99c50d610b169c41b5d869a5502b3.zip |
added actor position, orientation and dump() to hotspot struct
svn-id: r45717
Diffstat (limited to 'engines')
-rw-r--r-- | engines/teenagent/objects.cpp | 13 | ||||
-rw-r--r-- | engines/teenagent/objects.h | 8 |
2 files changed, 16 insertions, 5 deletions
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp index d7f2967483..ff7e7f07f8 100644 --- a/engines/teenagent/objects.cpp +++ b/engines/teenagent/objects.cpp @@ -134,12 +134,19 @@ void UseHotspot::load(byte *src) { 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, diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h index 545f5f7c2b..78a41df6a9 100644 --- a/engines/teenagent/objects.h +++ b/engines/teenagent/objects.h @@ -113,10 +113,11 @@ protected: 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 @@ protected: 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 |