aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/objects.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-03-21 18:18:12 -0400
committerPaul Gilbert2015-03-21 18:18:12 -0400
commit26c51680741882b7ee60a0e24227e6c6918aab0e (patch)
treeb8dedbccec43475ba96927b7c0f0055529462c97 /engines/sherlock/objects.h
parent8f4b4a7bc269bf454ab90d003f1cc55104c175b6 (diff)
downloadscummvm-rg350-26c51680741882b7ee60a0e24227e6c6918aab0e.tar.gz
scummvm-rg350-26c51680741882b7ee60a0e24227e6c6918aab0e.tar.bz2
scummvm-rg350-26c51680741882b7ee60a0e24227e6c6918aab0e.zip
SHERLOCK: Implemented checkObject and some support methods
Diffstat (limited to 'engines/sherlock/objects.h')
-rw-r--r--engines/sherlock/objects.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index d9f1c7409e..d7442f928f 100644
--- a/engines/sherlock/objects.h
+++ b/engines/sherlock/objects.h
@@ -137,7 +137,18 @@ struct UseType {
void synchronize(Common::SeekableReadStream &s);
};
-struct Object {
+class Object {
+private:
+ static SherlockEngine *_vm;
+
+ bool checkEndOfSequence() const;
+
+ void setObjSequence(int seq, bool wait);
+public:
+ static bool _countCAnimFrames;
+
+ static void setVm(SherlockEngine *vm);
+public:
Common::String _name; // Name
Common::String _description; // Description
Common::String _examine; // Examine in-depth description
@@ -151,7 +162,7 @@ struct Object {
int _sequenceNumber; // Sequence being used
SpriteType _type; // Object type
Common::Point _position; // Current position
- Common::Point _movement; // Momvement amount
+ Common::Point _delta; // Momvement amount
Common::Point _oldPosition; // Old position
Common::Point _oldSize; // Image's old size
Common::Point _goto; // Walk destination
@@ -185,19 +196,23 @@ struct Object {
void synchronize(Common::SeekableReadStream &s);
void toggleHidden();
+
+ void checkObject(Object &o);
+
+ int checkNameForCodes(const Common::String &name, Common::StringArray *messages);
};
struct CAnim {
Common::String _name; // Name
- int _sequences[MAX_FRAME]; // Animation sequences
+ byte _sequences[MAX_FRAME]; // Animation sequences
Common::Point _position; // Position
int _size; // Size of uncompressed animation
SpriteType _type;
int _flags; // Tells if can be walked behind
Common::Point _goto; // coords holmes should walk to before starting canim
- int _sequenceNumber;
+ int _gotoDir;
Common::Point _teleportPos; // Location Holmes shoul teleport to after
- int _teleportS; // playing canim
+ int _teleportDir; // playing canim
void synchronize(Common::SeekableReadStream &s);
};