aboutsummaryrefslogtreecommitdiff
path: root/object.cpp
diff options
context:
space:
mode:
authorJames Brown2002-03-08 08:42:11 +0000
committerJames Brown2002-03-08 08:42:11 +0000
commitc161197117e3212e146083086f6f0ee581062789 (patch)
treed010a59c776f126613e110bbf80d4e64c55143ab /object.cpp
parent41d1864add8dd9fe227963b812c59edb83a74138 (diff)
downloadscummvm-rg350-c161197117e3212e146083086f6f0ee581062789.tar.gz
scummvm-rg350-c161197117e3212e146083086f6f0ee581062789.tar.bz2
scummvm-rg350-c161197117e3212e146083086f6f0ee581062789.zip
Yet more cleanups. Remove 'index' (reserved keyword), and remove 'res' shadowing.
svn-id: r3685
Diffstat (limited to 'object.cpp')
-rw-r--r--object.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/object.cpp b/object.cpp
index caa3bb877f..7db7a6e823 100644
--- a/object.cpp
+++ b/object.cpp
@@ -943,11 +943,11 @@ int Scumm::getObjNewDir(int obj) {
}
}
-int Scumm::findInventory(int owner, int index) {
+int Scumm::findInventory(int owner, int idx) {
int count = 1, i, obj;
for (i=0; i!=_maxInventoryItems; i++) {
obj = _inventory[i];
- if (obj && getOwner(obj)==owner && count++ == index)
+ if (obj && getOwner(obj)==owner && count++ == idx)
return obj;
}
return 0;
@@ -1130,7 +1130,7 @@ void Scumm::drawEnqueuedObject(EnqueuedObject *eo) {
VirtScreen *vs;
byte *roomptr,*bomp;
byte *ptr;
- int index;
+ int idx;
ObjectData *od;
BompDrawData bdd;
@@ -1141,9 +1141,9 @@ void Scumm::drawEnqueuedObject(EnqueuedObject *eo) {
if (eo->l==0) {
roomptr = getResourceAddress(1, _roomResource);
- index = getObjectIndex(eo->a);
- assert(index != -1);
- ptr = roomptr + _objs[index].offs_obim_to_room;
+ idx = getObjectIndex(eo->a);
+ assert(idx != -1);
+ ptr = roomptr + _objs[idx].offs_obim_to_room;
} else if (eo->a!=0) {
od = &_objs[getObjectIndex(eo->a)];
ptr = getResourceAddress(rtFlObject, od->fl_object_index);