[Scummvm-cvs-logs] SF.net SVN: scummvm:[45601] scummvm/trunk/engines/sci/gui/gui.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sun Nov 1 22:14:33 CET 2009


Revision: 45601
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45601&view=rev
Author:   m_kiewitz
Date:     2009-11-01 21:14:33 +0000 (Sun, 01 Nov 2009)

Log Message:
-----------
SCI/newgui: kBaseSetter ported from gregs engine, kq5 pathfinding works now correctly

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui.cpp

Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp	2009-11-01 20:16:46 UTC (rev 45600)
+++ scummvm/trunk/engines/sci/gui/gui.cpp	2009-11-01 21:14:33 UTC (rev 45601)
@@ -670,23 +670,20 @@
 		int16 z = (_s->_kernel->_selectorCache.z > -1) ? GET_SEL32V(_s->_segMan, object, z) : 0;
 		int16 yStep = GET_SEL32V(_s->_segMan, object, yStep);
 		GuiResourceId viewId = GET_SEL32V(_s->_segMan, object, view);
-		int16 loopNo = GET_SEL32V(_s->_segMan, object, loop);
-		int16 celNo = GET_SEL32V(_s->_segMan, object, cel);
+		GuiViewLoopNo loopNo = GET_SEL32V(_s->_segMan, object, loop);
+		GuiViewCelNo celNo = GET_SEL32V(_s->_segMan, object, cel);
 
 		SciGuiView *tmpView = _gfx->getView(viewId);
-		sciViewCelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo);
-		int16 left = x + celInfo->displaceX - (celInfo->width >> 1);
-		int16 right = left + celInfo->width;
-		int16 bottom = y + celInfo->displaceY - z + 1;
-		int16 top = bottom - yStep;
+		Common::Rect celRect;
 
-		debugC(2, kDebugLevelBaseSetter, "(%d,%d)+/-(%d,%d), (%d x %d) -> (%d, %d) to (%d, %d)\n",
-				x, y, celInfo->displaceX, celInfo->displaceY, celInfo->width, celInfo->height, left, top, bottom, right);
+		tmpView->getCelRect(loopNo, celNo, x, y, z, &celRect);
+		celRect.bottom = y + 1;
+		celRect.top = celRect.bottom - yStep;
 
-		PUT_SEL32V(_s->_segMan, object, brLeft, left);
-		PUT_SEL32V(_s->_segMan, object, brRight, right);
-		PUT_SEL32V(_s->_segMan, object, brTop, top);
-		PUT_SEL32V(_s->_segMan, object, brBottom, 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);
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list