aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kgraphics.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 2c81409fce..051c6f8b2e 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -200,8 +200,13 @@ int _find_priority_band(EngineState *s, int nr) {
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;