From 60881987d058ad92366aa7fc0767f9f55d33fca4 Mon Sep 17 00:00:00 2001 From: lukaslw Date: Thu, 31 Jul 2014 05:29:03 +0200 Subject: PRINCE: Animations - update --- engines/prince/hero.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/prince/hero.cpp') diff --git a/engines/prince/hero.cpp b/engines/prince/hero.cpp index 3b5403532c..bb6d07e524 100644 --- a/engines/prince/hero.cpp +++ b/engines/prince/hero.cpp @@ -191,12 +191,16 @@ void Hero::countDrawPosition() { // any chance? if (baseX == 320) { tempMiddleY = _middleY - (baseY - 240); + if (baseY != 240) { + error("Hero::countDrawPosition() - tempMiddleY"); + } } else { tempMiddleY = _middleY; } int phaseFrameIndex = heroAnim->getPhaseFrameIndex(_phase); - _frameXSize = heroAnim->getFrameWidth(phaseFrameIndex); - _frameYSize = heroAnim->getFrameHeight(phaseFrameIndex); + Graphics::Surface *heroSurface = heroAnim->getFrame(phaseFrameIndex); + _frameXSize = heroSurface->w; + _frameYSize = heroSurface->h; _scaledFrameXSize = getScaledValue(_frameXSize); _scaledFrameYSize = getScaledValue(_frameYSize); -- cgit v1.2.3