From 2cb741281f104e8781e172c3b2f75d1f88008797 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 30 Sep 2005 09:14:21 +0000 Subject: Don't draw actors during cutaways. (Not that it makes any difference at this point. :-) svn-id: r18903 --- saga/actor.cpp | 5 +++++ saga/animation.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/saga/actor.cpp b/saga/actor.cpp index f057630172..ffb53835cb 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -24,6 +24,7 @@ #include "saga/saga.h" #include "saga/gfx.h" +#include "saga/animation.h" #include "saga/console.h" #include "saga/script.h" #include "saga/sndres.h" @@ -1575,6 +1576,10 @@ bool Actor::getSpriteParams(CommonObjectData *commonObjectData, int &frameNumber } void Actor::drawActors() { + if (_vm->_anim->hasCutaway()) { + return; + } + if (_vm->_scene->currentSceneNumber() <= 0) { return; } diff --git a/saga/animation.h b/saga/animation.h index 2e245489c2..994ff7d512 100644 --- a/saga/animation.h +++ b/saga/animation.h @@ -127,6 +127,9 @@ public: void finish(uint16 animId); void resume(uint16 animId, int cycles); int16 getCurrentFrame(uint16 animId); + bool hasCutaway(void) { + return _cutawayActive; + } bool hasAnimation(uint16 animId) { if (animId >= MAX_ANIMATIONS) { if (animId < MAX_ANIMATIONS + ARRAYSIZE(_cutawayAnimations)) -- cgit v1.2.3