aboutsummaryrefslogtreecommitdiff
path: root/scumm/base-costume.cpp
diff options
context:
space:
mode:
authorMax Horn2004-01-05 16:19:14 +0000
committerMax Horn2004-01-05 16:19:14 +0000
commita469559d134822121b2268aebc9ca733985c2146 (patch)
treead2e3f3b77092292db301cec9a20e7509b5064cf /scumm/base-costume.cpp
parent6a7cf6d6cfb4be5d212a8d27304e11820125679e (diff)
downloadscummvm-rg350-a469559d134822121b2268aebc9ca733985c2146.tar.gz
scummvm-rg350-a469559d134822121b2268aebc9ca733985c2146.tar.bz2
scummvm-rg350-a469559d134822121b2268aebc9ca733985c2146.zip
added Actor::getElevation and Actor::setElevation; cleaned up costume API a bit; some minor cleanup/tweaks
svn-id: r12160
Diffstat (limited to 'scumm/base-costume.cpp')
-rw-r--r--scumm/base-costume.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp
index 67fb8eaf3d..691ea27d2b 100644
--- a/scumm/base-costume.cpp
+++ b/scumm/base-costume.cpp
@@ -25,10 +25,15 @@
namespace Scumm {
-byte BaseCostumeRenderer::drawCostume(const CostumeData &cost) {
+byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, const CostumeData &cost) {
int i;
byte result = 0;
+ _outptr = vs.screenPtr + vs.xstart;
+ _outwidth = vs.width;
+ _outheight = vs.height;
+ _numStrips = vs.width / 8;
+
if (_vm->_version == 1) {
_xmove = 0;
_ymove = 0;
@@ -61,4 +66,18 @@ void BaseCostumeRenderer::codec1_ignorePakCols(int num) {
} while (1);
}
+bool ScummEngine::isCostumeInUse(int cost) const {
+ int i;
+ Actor *a;
+
+ if (_roomResource != 0)
+ for (i = 1; i < _numActors; i++) {
+ a = derefActor(i);
+ if (a->isInCurrentRoom() && a->costume == cost)
+ return true;
+ }
+
+ return false;
+}
+
} // End of namespace Scumm