aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-08 11:49:11 +0000
committerMartin Kiewitz2009-10-08 11:49:11 +0000
commit8f8b84f774600bb4ac6b53b9f69d934ca17b2818 (patch)
tree944e5fd18128950003ba791f69e7e41500a1a4df /engines
parent120b6b939267afaecf23e13fca3d94f8b98aee30 (diff)
downloadscummvm-rg350-8f8b84f774600bb4ac6b53b9f69d934ca17b2818.tar.gz
scummvm-rg350-8f8b84f774600bb4ac6b53b9f69d934ca17b2818.tar.bz2
scummvm-rg350-8f8b84f774600bb4ac6b53b9f69d934ca17b2818.zip
SCI/newgui: kAnimate - coordinates fixed
svn-id: r44783
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_gfx.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index dbc7c9f0f0..c08fbb1c6b 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -1111,6 +1111,7 @@ void SciGuiGfx::AnimateFill(List *list, byte &old_picNotValid) {
GuiViewLoopNo loopNo;
GuiViewCelNo celNo;
int16 x, y, priority;
+ Common::Rect celRect;
uint16 mask;
while (curNode) {
@@ -1138,9 +1139,17 @@ void SciGuiGfx::AnimateFill(List *list, byte &old_picNotValid) {
PUT_SEL32V(curObject, cel, celNo);
}
- // FIXME: this code doesnt seem to do anything useful?!?!
- // rect = (Common::Rect *)&cobj[_objOfs[8]];
- // res->getCelRect(curLoop, curCel, x, y, z, rect);
+ // Adjust given rect to cel
+ celRect.left = GET_SEL32V(curObject, lsLeft);
+ celRect.top = GET_SEL32V(curObject, lsTop);
+ celRect.right = GET_SEL32V(curObject, lsRight);
+ celRect.bottom = GET_SEL32V(curObject, lsBottom);
+ view->getCelRect(loopNo, celNo, x, y, priority, &celRect);
+ PUT_SEL32V(curObject, lsLeft, celRect.left);
+ PUT_SEL32V(curObject, lsTop, celRect.top);
+ PUT_SEL32V(curObject, lsRight, celRect.right);
+ PUT_SEL32V(curObject, lsBottom, celRect.bottom);
+
if (!(mask & SCI_ANIMATE_MASK_FIXEDPRIORITY))
PUT_SEL32V(curObject, priority, 0); // CoordPri(y) FIXME
@@ -1211,7 +1220,7 @@ void SciGuiGfx::AnimateDrawCels(List *list) {
GuiViewLoopNo loopNo;
GuiViewCelNo celNo;
int16 x, y, priority;
- Common::Rect rect;
+ Common::Rect celRect;
uint16 mask, paletteNo;
reg_t hSaved;
@@ -1228,14 +1237,17 @@ void SciGuiGfx::AnimateDrawCels(List *list) {
y = GET_SEL32V(curObject, y);
priority = GET_SEL32V(curObject, priority);
paletteNo = GET_SEL32V(curObject, palette);
-
- //rect = (Common::Rect *)&cobj[_objOfs[8]];
+
+ celRect.left = GET_SEL32V(curObject, lsLeft);
+ celRect.top = GET_SEL32V(curObject, lsTop);
+ celRect.right = GET_SEL32V(curObject, lsRight);
+ celRect.bottom = GET_SEL32V(curObject, lsBottom);
//hSaved = SaveBits(rect, SCI_SCREEN_MASK_ALL);
//PUT_SEL32V(curObject, 11, hSaved.toUint16());
// draw corresponding cel
- drawCel(viewId, loopNo, celNo, x, y, priority, paletteNo);
+ drawCel(viewId, loopNo, celNo, celRect.left, celRect.top, priority, paletteNo);
// arr1[inx] = 1;
if (mask & SCI_ANIMATE_MASK_REMOVEVIEW) {