aboutsummaryrefslogtreecommitdiff
path: root/engines/mutationofjb/gamedata.h
diff options
context:
space:
mode:
authorĽubomír Remák2018-10-28 14:57:53 +0100
committerĽubomír Remák2018-10-28 14:57:53 +0100
commit0b746971f103a620013dc9145ab6d3038e378192 (patch)
tree0aafd90bfc39df0bb254684ecd044c16f3632720 /engines/mutationofjb/gamedata.h
parent887b6343e935a2368e7032fa6be8a9a53e02b3e5 (diff)
downloadscummvm-rg350-0b746971f103a620013dc9145ab6d3038e378192.tar.gz
scummvm-rg350-0b746971f103a620013dc9145ab6d3038e378192.tar.bz2
scummvm-rg350-0b746971f103a620013dc9145ab6d3038e378192.zip
MUTATIONOFJB: Implement implicit actions.
Add implicit pick up action for certain statics. Respect disabled implicit walk action for doors.
Diffstat (limited to 'engines/mutationofjb/gamedata.h')
-rw-r--r--engines/mutationofjb/gamedata.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/engines/mutationofjb/gamedata.h b/engines/mutationofjb/gamedata.h
index 9daefd8252..fb81518890 100644
--- a/engines/mutationofjb/gamedata.h
+++ b/engines/mutationofjb/gamedata.h
@@ -57,8 +57,6 @@ struct Door : public Common::Serializable {
*
* If it ends with '+', using the "go" verb on the door will not implicitly change the scene,
* but the player will still walk towards the door.
- *
- * TODO: Implement the '+' restriction.
*/
char _name[MAX_ENTITY_NAME_LENGTH + 1];
/**
@@ -82,7 +80,11 @@ struct Door : public Common::Serializable {
uint16 _walkToX;
/** Y coordinate for position player will walk towards after clicking the door (WY register). */
uint8 _walkToY;
- /** Unknown for now - likely not even used. */
+ /**
+ * Encoded player frames.
+ * 4 bits - destFrame
+ * 4 bits - walkToFrame
+ */
uint8 _SP;
/**
@@ -105,6 +107,13 @@ struct Door : public Common::Serializable {
* @param sz Serializer.
*/
virtual void saveLoadWithSerializer(Common::Serializer &sz) override;
+
+ /**
+ * Check whether walk action used on this door causes implicit scene change.
+ *
+ * @return True if door implicitly changes current scene, false otherwise.
+ */
+ bool allowsImplicitSceneChange() const;
};
/**
@@ -216,7 +225,6 @@ struct Static : public Common::Serializable {
* entity.
*
* TODO: Support '~' statics.
- * TODO: Support combinable statics.
*/
char _name[MAX_ENTITY_NAME_LENGTH + 1];
/** X coordinate of the static rectangle (XX register). */
@@ -250,11 +258,20 @@ struct Static : public Common::Serializable {
virtual void saveLoadWithSerializer(Common::Serializer &sz) override;
/**
+ * Check whether this static is combinable.
* Statics with names ending with '[' are allowed to be combined with other items.
*
* @return True if combinable, false otherwise.
*/
bool isCombinable() const;
+
+ /**
+ * Check whether this static is implicitly picked up.
+ * Statics with names starting with '~' are implicitly picked up.
+ *
+ * @return Returns true if this static is implicitly picked up by pick up action, false otherwise.
+ */
+ bool allowsImplicitPickup() const;
};
/**