diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/objects.cpp | 5 | ||||
-rw-r--r-- | engines/sherlock/objects.h | 17 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_user_interface.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/talk.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 2 |
5 files changed, 13 insertions, 17 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 0a4b7e92a9..1d2cb1b725 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -66,7 +66,6 @@ BaseObject::BaseObject() { _aType = OBJECT; _lookFrames = 0; _seqCounter = 0; - _lookFacing = 0; _lookcAnim = 0; _seqStack = 0; _seqTo = 0; @@ -986,7 +985,7 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { _lookPosition.x = s.readUint16LE() * FIXED_INT_MULTIPLIER / 100; _lookPosition.y = s.readByte() * FIXED_INT_MULTIPLIER; } - _lookFacing = s.readByte(); + _lookPosition._facing = s.readByte(); _lookcAnim = s.readByte(); if (!isRoseTattoo) @@ -1113,7 +1112,7 @@ void Object::load3DO(Common::SeekableReadStream &s) { // Unverified END _lookPosition.y = s.readByte() * FIXED_INT_MULTIPLIER; - _lookFacing = s.readByte(); + _lookPosition._facing = s.readByte(); // Unverified _lookcAnim = s.readByte(); diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h index 7e94dd2bdd..60b5b3345e 100644 --- a/engines/sherlock/objects.h +++ b/engines/sherlock/objects.h @@ -117,6 +117,12 @@ public: void operator-=(const Point32 &delta) { x -= delta.x; y -= delta.y; } }; +class PositionFacing : public Point32 { +public: + int _facing; + + PositionFacing() : Point32(), _facing(0) {} +}; struct WalkSequence { Common::String _vgsName; @@ -210,8 +216,7 @@ public: AType _aType; // Tells if this is an object, person, talk, etc. int _lookFrames; // How many frames to play of the look anim before pausing int _seqCounter; // How many times this sequence has been executed - Point32 _lookPosition; // Where to walk when examining object - int _lookFacing; // Direction to face when examining object + PositionFacing _lookPosition; // Where to walk when examining object int _lookcAnim; int _seqStack; // Allows gosubs to return to calling frame int _seqTo; // Allows 1-5, 8-3 type sequences encoded in 2 bytes @@ -427,14 +432,6 @@ public: virtual void setObjTalkSequence(int seq); }; - -class PositionFacing : public Point32 { -public: - int _facing; - - PositionFacing() : Point32(), _facing(0) {} -}; - struct CAnim { Common::String _name; // Name Common::Point _position; // Position diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp index 684824c17d..8fcc92b2ac 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.cpp +++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp @@ -500,7 +500,7 @@ void ScalpelUserInterface::examine() { scene.startCAnim(_cNum, canimSpeed); } else if (obj._lookPosition.y != 0) { // Need to walk to the object to be examined - people[HOLMES].walkToCoords(obj._lookPosition, obj._lookFacing); + people[HOLMES].walkToCoords(obj._lookPosition, obj._lookPosition._facing); } if (!talk._talkToAbort) { diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 1195ba0b6b..11ae9b4c1f 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -488,7 +488,7 @@ void Talk::talk(int objNum) { events.setCursor(WAIT); if (obj._lookPosition.y != 0) // Need to walk to character first - people[HOLMES].walkToCoords(obj._lookPosition, obj._lookFacing); + people[HOLMES].walkToCoords(obj._lookPosition, obj._lookPosition._facing); events.setCursor(ARROW); if (!_talkToAbort) @@ -503,7 +503,7 @@ void Talk::talk(int objNum) { events.setCursor(WAIT); if (obj._lookPosition.y != 0) // Walk over to person to talk to - people[HOLMES].walkToCoords(obj._lookPosition, obj._lookFacing); + people[HOLMES].walkToCoords(obj._lookPosition, obj._lookPosition._facing); events.setCursor(ARROW); if (!_talkToAbort) { diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index 7de78457c6..107eeba0d0 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -87,7 +87,7 @@ void TattooUserInterface::lookAtObject() { } else if (_bgShape->_lookPosition.y != 0) { // Need to walk to object before looking at it people[HOLMES].walkToCoords(Common::Point(_bgShape->_lookPosition.x * FIXED_INT_MULTIPLIER, - _bgShape->_lookPosition.y * FIXED_INT_MULTIPLIER), _bgShape->_lookFacing); + _bgShape->_lookPosition.y * FIXED_INT_MULTIPLIER), _bgShape->_lookPosition._facing); } if (!talk._talkToAbort) { |