aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/object.cpp
diff options
context:
space:
mode:
authorMax Horn2006-10-29 14:45:31 +0000
committerMax Horn2006-10-29 14:45:31 +0000
commit46dc61163aa404b1ccc98c0c7c88902518387955 (patch)
tree1e62357a64be34d64ad89e0d94adad9373e686b0 /engines/scumm/object.cpp
parent41b4a34b5b7f9f91f25204503ea9b951cbfc5c26 (diff)
downloadscummvm-rg350-46dc61163aa404b1ccc98c0c7c88902518387955.tar.gz
scummvm-rg350-46dc61163aa404b1ccc98c0c7c88902518387955.tar.bz2
scummvm-rg350-46dc61163aa404b1ccc98c0c7c88902518387955.zip
Named / documented the V0-V2 object states (we should probably rename the corresponding opcodes here and in descumm to make reading script dumps easier)
svn-id: r24566
Diffstat (limited to 'engines/scumm/object.cpp')
-rw-r--r--engines/scumm/object.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index b95cfeab12..e67d7d25fe 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -278,7 +278,7 @@ int ScummEngine::getState(int obj) {
// blowing up the mansion, should they feel the urge to.
if (_game.id == GID_MANIAC && (obj == 182 || obj == 193))
- _objectStateTable[obj] |= 0x08;
+ _objectStateTable[obj] |= kObjectState_08;
}
return _objectStateTable[obj];
@@ -466,17 +466,17 @@ int ScummEngine::getObjActToObjActDist(int a, int b) {
int ScummEngine::findObject(int x, int y) {
int i, b;
byte a;
- const int mask = (_game.version <= 2) ? 0x8 : 0xF;
+ const int mask = (_game.version <= 2) ? kObjectState_08 : 0xF;
for (i = 1; i < _numLocalObjects; i++) {
if ((_objs[i].obj_nr < 1) || getClass(_objs[i].obj_nr, kObjectClassUntouchable))
continue;
if (_game.version == 0) {
- if (_objs[i].flags == 0 && _objs[i].state & 0x2)
+ if (_objs[i].flags == 0 && _objs[i].state & kObjectStateUntouchable)
continue;
} else {
- if (_game.version <= 2 && _objs[i].state & 0x2)
+ if (_game.version <= 2 && _objs[i].state & kObjectStateUntouchable)
continue;
}
@@ -505,7 +505,7 @@ int ScummEngine::findObject(int x, int y) {
void ScummEngine::drawRoomObject(int i, int arg) {
ObjectData *od;
byte a;
- const int mask = (_game.version <= 2) ? 0x8 : 0xF;
+ const int mask = (_game.version <= 2) ? kObjectState_08 : 0xF;
od = &_objs[i];
if ((i < 1) || (od->obj_nr < 1) || !od->state)
@@ -524,7 +524,7 @@ void ScummEngine::drawRoomObject(int i, int arg) {
void ScummEngine::drawRoomObjects(int arg) {
int i;
- const int mask = (_game.version <= 2) ? 0x8 : 0xF;
+ const int mask = (_game.version <= 2) ? kObjectState_08 : 0xF;
if (_game.heversion >= 60) {
// In HE games, normal objects are drawn, followed by FlObjects.