added actor position, orientation and dump() to hotspot struct

svn-id: r45717
This commit is contained in:
Vladimir Menshakov 2009-11-07 09:18:30 +00:00
parent ac1f49d7c9
commit a826c483b9
2 changed files with 16 additions and 5 deletions

View File

@ -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,

View File

@ -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