aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/contain.cpp
diff options
context:
space:
mode:
authorMax Horn2007-06-30 16:25:59 +0000
committerMax Horn2007-06-30 16:25:59 +0000
commit206d167457efe684478a7947535a9c58b790e31d (patch)
tree16d2832c1de2c9c7f68ef622af247d57ed931a1e /engines/agos/contain.cpp
parent21624d3eb7514f8ca8a21a7567d34a8621800f70 (diff)
downloadscummvm-rg350-206d167457efe684478a7947535a9c58b790e31d.tar.gz
scummvm-rg350-206d167457efe684478a7947535a9c58b790e31d.tar.bz2
scummvm-rg350-206d167457efe684478a7947535a9c58b790e31d.zip
AGOS: Introduced ChildType enum
svn-id: r27792
Diffstat (limited to 'engines/agos/contain.cpp')
-rw-r--r--engines/agos/contain.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/agos/contain.cpp b/engines/agos/contain.cpp
index b5ca344905..891ac36d30 100644
--- a/engines/agos/contain.cpp
+++ b/engines/agos/contain.cpp
@@ -34,8 +34,8 @@ int AGOSEngine::canPlace(Item *x, Item *y) {
Item *z = derefItem(x->parent);
if (getGameType() == GType_ELVIRA1) {
- SubPlayer *p = (SubPlayer *)findChildOfType(y, 3);
- SubContainer *c = (SubContainer *)findChildOfType(y, 7);
+ SubPlayer *p = (SubPlayer *)findChildOfType(y, kPlayerType);
+ SubContainer *c = (SubContainer *)findChildOfType(y, kContainerType);
int cap = 0;
int wt;
@@ -59,7 +59,7 @@ int AGOSEngine::canPlace(Item *x, Item *y) {
return -2; /* Too heavy */
}
} else {
- SubObject *o = (SubObject *)findChildOfType(y, 2);
+ SubObject *o = (SubObject *)findChildOfType(y, kObjectType);
int ct;
int cap = 0;
@@ -120,11 +120,11 @@ int AGOSEngine::sizeRec(Item *x, int d) {
}
int AGOSEngine::sizeOfRec(Item *i, int d) {
- SubObject *o = (SubObject *)findChildOfType(i, 2);
+ SubObject *o = (SubObject *)findChildOfType(i, kObjectType);
if (getGameType() == GType_ELVIRA1) {
- SubPlayer *p = (SubPlayer *)findChildOfType(i, 3);
- SubContainer *c = (SubContainer *)findChildOfType(i, 7);
+ SubPlayer *p = (SubPlayer *)findChildOfType(i, kPlayerType);
+ SubContainer *c = (SubContainer *)findChildOfType(i, kContainerType);
if ((c) && (c->flags & 1)) {
if (o)
@@ -174,10 +174,10 @@ int AGOSEngine::weightRec(Item *x, int d) {
}
int AGOSEngine::weightOf(Item *x) {
- SubObject *o = (SubObject *)findChildOfType(x, 2);
+ SubObject *o = (SubObject *)findChildOfType(x, kObjectType);
if (getGameType() == GType_ELVIRA1) {
- SubPlayer *p = (SubPlayer *)findChildOfType(x, 3);
+ SubPlayer *p = (SubPlayer *)findChildOfType(x, kPlayerType);
if (o)
return o->objectWeight;
if (p)