aboutsummaryrefslogtreecommitdiff
path: root/costume.cpp
diff options
context:
space:
mode:
authorMax Horn2002-05-20 14:41:47 +0000
committerMax Horn2002-05-20 14:41:47 +0000
commit0c861c9ff2155fb9e44847f249232166c93ae695 (patch)
treeb62ab34dd1482ca89b3404753d3631b806324e3e /costume.cpp
parent3035a307dcaa188740d08fac81bdf950fe005eb6 (diff)
downloadscummvm-rg350-0c861c9ff2155fb9e44847f249232166c93ae695.tar.gz
scummvm-rg350-0c861c9ff2155fb9e44847f249232166c93ae695.tar.bz2
scummvm-rg350-0c861c9ff2155fb9e44847f249232166c93ae695.zip
moved isCostumeInUse() to costume.cpp; make use of isInCurrentRoom(); added missing FIXME comment for a FT hack
svn-id: r4362
Diffstat (limited to 'costume.cpp')
-rw-r--r--costume.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/costume.cpp b/costume.cpp
index 7b5d528ec6..e95b690eca 100644
--- a/costume.cpp
+++ b/costume.cpp
@@ -1072,3 +1072,18 @@ byte Scumm::cost_increaseAnim(LoadedCostume * lc, Actor * a, int slot)
return (lc->_dataptr[i] & 0x7F) != code;
} while (1);
}
+
+bool Scumm::isCostumeInUse(int cost)
+{
+ int i;
+ Actor *a;
+
+ if (_roomResource != 0)
+ for (i = 1; i < NUM_ACTORS; i++) {
+ a = derefActor(i);
+ if (a->isInCurrentRoom() && a->costume == cost)
+ return true;
+ }
+
+ return false;
+}