diff options
author | Travis Howell | 2009-03-16 09:38:20 +0000 |
---|---|---|
committer | Travis Howell | 2009-03-16 09:38:20 +0000 |
commit | 7d85194eaae2e741ca9b2e55c91eaa2cdf4ff0c3 (patch) | |
tree | 6267628fbd521dcb7c25fc2af0d707dc000468c0 /engines/parallaction | |
parent | 57b0038e5e83f913b703077a5c1778d65aade07c (diff) | |
download | scummvm-rg350-7d85194eaae2e741ca9b2e55c91eaa2cdf4ff0c3.tar.gz scummvm-rg350-7d85194eaae2e741ca9b2e55c91eaa2cdf4ff0c3.tar.bz2 scummvm-rg350-7d85194eaae2e741ca9b2e55c91eaa2cdf4ff0c3.zip |
Fix crash regression in BRA introduction for now.
svn-id: r39444
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/parallaction.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 69d5d7c6f5..c6b9f02021 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -166,20 +166,22 @@ void Parallaction::updateView() { if (canScroll()) { scrollX = _gfx->getScrollPos(); - Common::Point foot; - _char._ani->getFoot(foot); + if (_char._ani->gfxobj) { + Common::Point foot; + _char._ani->getFoot(foot); - foot.x -= scrollX; - //foot.y -= ... + foot.x -= scrollX; + //foot.y -= ... - int min = SCROLL_BAND_WIDTH; - int max = _screenWidth - SCROLL_BAND_WIDTH; + int min = SCROLL_BAND_WIDTH; + int max = _screenWidth - SCROLL_BAND_WIDTH; - if (foot.x < min) { - scrollX -= (min - foot.x); - } else - if (foot.x > max) { - scrollX += (foot.x - max); + if (foot.x < min) { + scrollX -= (min - foot.x); + } else + if (foot.x > max) { + scrollX += (foot.x - max); + } } } _gfx->setScrollPos(scrollX); |