aboutsummaryrefslogtreecommitdiff
path: root/gfx.cpp
diff options
context:
space:
mode:
authorMax Horn2002-06-04 23:32:53 +0000
committerMax Horn2002-06-04 23:32:53 +0000
commitd35eed21f1cbd769bdad4e3028d16361c7bf9f74 (patch)
tree3d38928c8c0f89bdbc51dd660cdb79da4b5e30c6 /gfx.cpp
parent31a2efd89cdae6f8722af77177dba2a7763a94a5 (diff)
downloadscummvm-rg350-d35eed21f1cbd769bdad4e3028d16361c7bf9f74.tar.gz
scummvm-rg350-d35eed21f1cbd769bdad4e3028d16361c7bf9f74.tar.bz2
scummvm-rg350-d35eed21f1cbd769bdad4e3028d16361c7bf9f74.zip
more Actor class cleanup; renamed unkRoomFunc4 to palManipulate and added an icky, wrong implementation for it - yes this is complete nonsense but I'll try to replace it with the right thing RSN :-)
svn-id: r4404
Diffstat (limited to 'gfx.cpp')
-rw-r--r--gfx.cpp39
1 files changed, 5 insertions, 34 deletions
diff --git a/gfx.cpp b/gfx.cpp
index bbbd30b588..065f9263f7 100644
--- a/gfx.cpp
+++ b/gfx.cpp
@@ -311,8 +311,8 @@ void Scumm::setCameraFollows(Actor * a)
cd->_follows = a->number;
- if (a->room != _currentRoom) {
- startScene(a->room, 0, 0);
+ if (!a->isInCurrentRoom()) {
+ startScene(a->getRoom(), 0, 0);
}
ax = abs(a->x - cd->_cur.x);
@@ -332,8 +332,8 @@ void Scumm::setCameraFollows(Actor * a)
cd->_mode = CM_FOLLOW_ACTOR;
cd->_follows = a->number;
- if (a->room != _currentRoom) {
- startScene(a->room, 0, 0);
+ if (!a->isInCurrentRoom()) {
+ startScene(a->getRoom(), 0, 0);
cd->_mode = CM_FOLLOW_ACTOR;
cd->_cur.x = a->x;
setCameraAt(cd->_cur.x, 0);
@@ -346,7 +346,7 @@ void Scumm::setCameraFollows(Actor * a)
setCameraAt(a->x, 0);
for (i = 1, a = getFirstActor(); ++a, i < NUM_ACTORS; i++) {
- if (a->room == _currentRoom)
+ if (a->isInCurrentRoom())
a->needRedraw = true;
}
runHook(0);
@@ -2216,35 +2216,6 @@ void Scumm::screenEffect(int effect)
_screenEffectFlag = true;
}
-void Scumm::resetActorBgs()
-{
- Actor *a;
- int i;
- uint32 onlyActorFlags, bitpos;
-
- for (i = 0; i < 40; i++) {
- onlyActorFlags = (gfxUsageBits[_screenStartStrip + i] &= 0x3FFFFFFF);
- a = getFirstActor();
- bitpos = 1;
-
- while (onlyActorFlags) {
- if (onlyActorFlags & 1 && a->top != 0xFF && a->needBgReset) {
- gfxUsageBits[_screenStartStrip + i] ^= bitpos;
-
- if((a->bottom - a->top) >=0)
- gdi.resetBackground(a->top, a->bottom, i);
- }
- bitpos <<= 1;
- onlyActorFlags >>= 1;
- a++;
- }
- }
-
- for (i = 1, a = getFirstActor(); ++a, i < NUM_ACTORS; i++) {
- a->needBgReset = false;
- }
-}
-
void Gdi::resetBackground(int top, int bottom, int strip)
{
VirtScreen *vs = &_vm->virtscr[0];