diff options
author | Andrew Kurushin | 2005-01-18 15:01:21 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-01-18 15:01:21 +0000 |
commit | b4b2e52df78fd309613d8df73f090b98e834969b (patch) | |
tree | 7e79ad73fbb11d0755e2c3e4926d99ab3653bb95 /saga/actor.h | |
parent | c1ce30b0bfa69aee3c91602536da8d2c5fa72e8b (diff) | |
download | scummvm-rg350-b4b2e52df78fd309613d8df73f090b98e834969b.tar.gz scummvm-rg350-b4b2e52df78fd309613d8df73f090b98e834969b.tar.bz2 scummvm-rg350-b4b2e52df78fd309613d8df73f090b98e834969b.zip |
another step in verb implementation:
- objectMap responds to mouse move (but respond script not run well ?)
loadStrings add some special count check
- so all other LUT based resource should implement this technique
svn-id: r16594
Diffstat (limited to 'saga/actor.h')
-rw-r--r-- | saga/actor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/saga/actor.h b/saga/actor.h index 6deb87b9d2..4e18ca23ae 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -276,9 +276,9 @@ public: void cmdActorWalkTo(int argc, const char **argv); - bool validActorId(uint16 id) { return (id == 1) || ((id >= 0x2000) && (id < (0x2000 | _actorsCount))); } - int actorIdToIndex(uint16 id) { return (id == 1 ) ? 0 : (id & ~0x2000); } - uint16 actorIndexToId(int index) { return (index == 0 ) ? 1 : (index | 0x2000); } + bool validActorId(uint16 id) { return (id == ID_PROTAG) || ((id > OBJECT_TYPE_MASK) && (id < objectIndexToId(kGameObjectActor, _actorsCount))); } + int actorIdToIndex(uint16 id) { return (id == ID_PROTAG ) ? 0 : objectIdToIndex(id); } + uint16 actorIndexToId(int index) { return (index == 0 ) ? ID_PROTAG : objectIndexToId(kGameObjectActor, index); } int direct(int msec); int drawActors(); |