Added a sanity check to baseSetter() - Torin's demo progresses a bit further now

svn-id: r47695
This commit is contained in:
Filippos Karapetis 2010-01-30 01:46:54 +00:00
parent 928b4a6df6
commit b01a793e55

View File

@ -145,17 +145,19 @@ void SciGui32::baseSetter(reg_t object) {
int16 loopNo = GET_SEL32V(_s->_segMan, object, loop);
int16 celNo = GET_SEL32V(_s->_segMan, object, cel);
View *tmpView = _gfx->getView(viewId);
Common::Rect celRect;
if (viewId != SIGNAL_OFFSET) {
View *tmpView = _gfx->getView(viewId);
Common::Rect celRect;
tmpView->getCelRect(loopNo, celNo, x, y, z, &celRect);
celRect.bottom = y + 1;
celRect.top = celRect.bottom - yStep;
tmpView->getCelRect(loopNo, celNo, x, y, z, &celRect);
celRect.bottom = y + 1;
celRect.top = celRect.bottom - yStep;
PUT_SEL32V(_s->_segMan, object, brLeft, celRect.left);
PUT_SEL32V(_s->_segMan, object, brRight, celRect.right);
PUT_SEL32V(_s->_segMan, object, brTop, celRect.top);
PUT_SEL32V(_s->_segMan, object, brBottom, celRect.bottom);
PUT_SEL32V(_s->_segMan, object, brLeft, celRect.left);
PUT_SEL32V(_s->_segMan, object, brRight, celRect.right);
PUT_SEL32V(_s->_segMan, object, brTop, celRect.top);
PUT_SEL32V(_s->_segMan, object, brBottom, celRect.bottom);
}
}
}