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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Mon Oct 12 13:36:42 CEST 2009


Revision: 44976
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44976&view=rev
Author:   m_kiewitz
Date:     2009-10-12 11:36:42 +0000 (Mon, 12 Oct 2009)

Log Message:
-----------
SCI/newgui: kGraph RedrawBox (ReAnimate) is now using class calling (functionality not yet implemented)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/gui/gui.cpp
    scummvm/trunk/engines/sci/gui/gui.h
    scummvm/trunk/engines/sci/gui/gui_gfx.cpp
    scummvm/trunk/engines/sci/gui/gui_gfx.h
    scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
    scummvm/trunk/engines/sci/gui32/gui32.cpp
    scummvm/trunk/engines/sci/gui32/gui32.h

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-12 11:36:42 UTC (rev 44976)
@@ -657,16 +657,9 @@
 	break;
 
 	case K_GRAPH_REDRAW_BOX: {
-		debugC(2, kDebugLevelGraphics, "redraw_box(%d, %d, %d, %d)\n", argv[1].toSint16(), argv[2].toSint16(), argv[3].toSint16(), argv[4].toSint16());
-
-		area.x += s->port->zone.x;
-		area.y += s->port->zone.y;
-
-		if (s->dyn_views && s->dyn_views->_parent == (GfxContainer *)s->port)
-			s->dyn_views->draw(Common::Point(0, 0));
-
-		// FIXME: Change to class calling
-		//gfxop_update_box(s->gfx_state, area);
+		rect = Common::Rect(x, y, x1, y1);
+		s->_gui->graphRedrawBox(rect);
+		break;
 	}
 	break;
 

Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui/gui.cpp	2009-10-12 11:36:42 UTC (rev 44976)
@@ -436,6 +436,10 @@
 	_gfx->BitsShow(rect);
 }
 
+void SciGui::graphRedrawBox(Common::Rect rect) {
+	_gfx->ReAnimate(rect);
+}
+
 int16 SciGui::picNotValid(int16 newPicNotValid) {
 	int16 oldPicNotValid = _screen->_picNotValid;
 

Modified: scummvm/trunk/engines/sci/gui/gui.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.h	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui/gui.h	2009-10-12 11:36:42 UTC (rev 44976)
@@ -83,6 +83,7 @@
 	virtual reg_t graphSaveBox(Common::Rect rect, uint16 flags);
 	virtual void graphRestoreBox(reg_t handle);
 	virtual void graphUpdateBox(Common::Rect rect);
+	virtual void graphRedrawBox(Common::Rect rect);
 
 	virtual int16 picNotValid(int16 newPicNotValid);
 

Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-12 11:36:42 UTC (rev 44976)
@@ -1358,6 +1358,11 @@
 	}
 }
 
+void SciGuiGfx::ReAnimate(Common::Rect rect) {
+	// TODO: implement ReAnimate
+	BitsShow(rect);
+}
+
 void SciGuiGfx::AddToPicDrawCels(List *list) {
 	reg_t curObject;
 	GuiAnimateEntry *listEntry;

Modified: scummvm/trunk/engines/sci/gui/gui_gfx.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.h	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.h	2009-10-12 11:36:42 UTC (rev 44976)
@@ -135,6 +135,7 @@
 	void AnimateDrawCels();
 	void AnimateUpdateScreen(byte oldPicNotValid);
 	void AnimateRestoreAndDelete(int argc, reg_t *argv);
+	void ReAnimate(Common::Rect rect);
 	void AddToPicDrawCels(List *list);
 	void AddToPicDrawView(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 leftPos, int16 topPos, int16 priority, int16 control);
 	bool CanBeHereCheckRectList(reg_t checkObject, Common::Rect checkRect, List *list);

Modified: scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-12 11:36:42 UTC (rev 44976)
@@ -250,7 +250,7 @@
 	if (arg2)
 		_gfx->BitsShow(pWnd->restoreRect);
 	else
-		_gfx->BitsShow(pWnd->restoreRect); // FIXME: dummy, should be ReAnimate(&pwnd->dims);
+		_gfx->ReAnimate(pWnd->restoreRect);
 	_windowList.remove(pWnd);
 	_gfx->SetPort(_windowList.back());
 	_windowsById[pWnd->id] = 0;

Modified: scummvm/trunk/engines/sci/gui32/gui32.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui32/gui32.cpp	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui32/gui32.cpp	2009-10-12 11:36:42 UTC (rev 44976)
@@ -961,6 +961,18 @@
 	gfxop_update_box(s->gfx_state, area);
 }
 
+void SciGui32::graphRedrawBox(Common::Rect rect) {
+	rect_t area = gfx_rect(rect.left, rect.top, rect.width(), rect.height());
+
+	area.x += s->port->zone.x;
+	area.y += s->port->zone.y;
+
+	if (s->dyn_views && s->dyn_views->_parent == (GfxContainer *)s->port)
+		s->dyn_views->draw(Common::Point(0, 0));
+
+	//gfxop_update_box(s->gfx_state, area);
+}
+
 int16 SciGui32::picNotValid(int16 newPicNotValid) {
 	int16 oldPicNotValid = s->pic_not_valid;
 

Modified: scummvm/trunk/engines/sci/gui32/gui32.h
===================================================================
--- scummvm/trunk/engines/sci/gui32/gui32.h	2009-10-12 10:34:31 UTC (rev 44975)
+++ scummvm/trunk/engines/sci/gui32/gui32.h	2009-10-12 11:36:42 UTC (rev 44976)
@@ -74,6 +74,7 @@
 	reg_t graphSaveBox(Common::Rect rect, uint16 flags);
 	void graphRestoreBox(reg_t handle);
 	void graphUpdateBox(Common::Rect);
+	void graphRedrawBox(Common::Rect);
 
 	int16 picNotValid(int16 newPicNotValid);
 


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