aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/object.h
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-04-18 23:35:23 +0200
committerWillem Jan Palenstijn2013-05-08 20:40:58 +0200
commit9c2341678ef4984bf92b3878295250faf980b066 (patch)
tree2fb4805e05e16b9924e80c9947e6bad723b28c4b /engines/scumm/object.h
parent8172d679df5148a4a32f46074b20cb6caf91844f (diff)
parenta5f4ff36ffc386d48f2da49387a9655ce9295a4d (diff)
downloadscummvm-rg350-9c2341678ef4984bf92b3878295250faf980b066.tar.gz
scummvm-rg350-9c2341678ef4984bf92b3878295250faf980b066.tar.bz2
scummvm-rg350-9c2341678ef4984bf92b3878295250faf980b066.zip
Merge branch 'master'
Diffstat (limited to 'engines/scumm/object.h')
-rw-r--r--engines/scumm/object.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/scumm/object.h b/engines/scumm/object.h
index cdf8b09e6f..8212075e43 100644
--- a/engines/scumm/object.h
+++ b/engines/scumm/object.h
@@ -24,6 +24,26 @@
namespace Scumm {
+static inline int OBJECT_V0(int id, byte type) {
+ assert(id < 256);
+ return (type << 8 | id);
+}
+#define OBJECT_V0_ID(obj) (obj & 0xFF)
+#define OBJECT_V0_TYPE(obj) ((obj >> 8) & 0xFF)
+
+enum ObjectV0Type {
+ kObjectV0TypeFG = 0, // foreground object
+ // - with owner/state, might (but has not to) be pickupable
+ // -> with entry in _objectOwner/StateTable
+ // -> all objects in _inventory have this type
+ // - image can be exchanged (background overlay)
+ kObjectV0TypeBG = 1, // background object
+ // - without owner/state, not pickupable (room only)
+ // -> without entry in _objectOwner/StateTable
+ // - image cannot be exchanged (part of background image)
+ kObjectV0TypeActor = 2 // object is an actor
+};
+
enum ObjectClass {
kObjectClassNeverClip = 20,
kObjectClassAlwaysClip = 21,