diff options
author | Martin Kiewitz | 2009-10-08 11:57:17 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-08 11:57:17 +0000 |
commit | 43a60d965a4a543eaaf1dd63336024c85373e1be (patch) | |
tree | aa8ce7f24661c432005e52b4106e3ba92b418ccb | |
parent | 8f8b84f774600bb4ac6b53b9f69d934ca17b2818 (diff) | |
download | scummvm-rg350-43a60d965a4a543eaaf1dd63336024c85373e1be.tar.gz scummvm-rg350-43a60d965a4a543eaaf1dd63336024c85373e1be.tar.bz2 scummvm-rg350-43a60d965a4a543eaaf1dd63336024c85373e1be.zip |
SCI/newgui: change to nsRect, scripts expect that. Fixes mouse clicking on several games
svn-id: r44784
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index c08fbb1c6b..1fea7e0df9 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -1139,16 +1139,12 @@ void SciGuiGfx::AnimateFill(List *list, byte &old_picNotValid) { PUT_SEL32V(curObject, cel, celNo); } - // 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); + // Create rect according to coordinates and given cel 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); + PUT_SEL32V(curObject, nsLeft, celRect.left); + PUT_SEL32V(curObject, nsTop, celRect.top); + PUT_SEL32V(curObject, nsRight, celRect.right); + PUT_SEL32V(curObject, nsBottom, celRect.bottom); if (!(mask & SCI_ANIMATE_MASK_FIXEDPRIORITY)) PUT_SEL32V(curObject, priority, 0); // CoordPri(y) FIXME @@ -1238,10 +1234,10 @@ void SciGuiGfx::AnimateDrawCels(List *list) { priority = GET_SEL32V(curObject, priority); paletteNo = GET_SEL32V(curObject, palette); - celRect.left = GET_SEL32V(curObject, lsLeft); - celRect.top = GET_SEL32V(curObject, lsTop); - celRect.right = GET_SEL32V(curObject, lsRight); - celRect.bottom = GET_SEL32V(curObject, lsBottom); + celRect.left = GET_SEL32V(curObject, nsLeft); + celRect.top = GET_SEL32V(curObject, nsTop); + celRect.right = GET_SEL32V(curObject, nsRight); + celRect.bottom = GET_SEL32V(curObject, nsBottom); //hSaved = SaveBits(rect, SCI_SCREEN_MASK_ALL); //PUT_SEL32V(curObject, 11, hSaved.toUint16()); |