[Scummvm-cvs-logs] SF.net SVN: scummvm:[40684] scummvm/trunk/engines/sci/engine/kgraphics.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon May 18 14:34:25 CEST 2009


Revision: 40684
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40684&view=rev
Author:   fingolfin
Date:     2009-05-18 12:34:25 +0000 (Mon, 18 May 2009)

Log Message:
-----------
SCI: Added a FIXME to graph_save_box

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-18 12:34:03 UTC (rev 40683)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-18 12:34:25 UTC (rev 40684)
@@ -200,8 +200,13 @@
 
 reg_t graph_save_box(EngineState *s, rect_t area) {
 	reg_t handle = kalloc(s, "graph_save_box()", sizeof(gfxw_snapshot_t *));
-	gfxw_snapshot_t **ptr = (gfxw_snapshot_t **) kmem(s, handle);
+	gfxw_snapshot_t **ptr = (gfxw_snapshot_t **)kmem(s, handle);
 
+	// FIXME: gfxw_make_snapshot returns a pointer. Now why do we store a
+	// pointer to real memory inside the SCI heap?
+	// If we save and the load again, this cannot work in general.
+	// This seems like bad design. Either the snapshot data itself should be
+	// stored in the heap, or a unique persistent id.
 	*ptr = gfxw_make_snapshot(s->visual, area);
 
 	return handle;


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