From 4a637d65c36d7dad3a4d4ec75c243e12bb3b5449 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Wed, 20 Jul 2016 10:40:02 -0500 Subject: SCI32: Enable optional explicit memory management of hunk entries Bitmaps in ScrollWindow and Robot code are managed by the kernel and not by game scripts, although they must be able to be referenced through a reg_t. To prevent incorrect GC of bitmaps that are in use but not referenced by any game script, explicit memory management of hunk entries can be enabled. --- engines/sci/engine/kscripts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/engine/kscripts.cpp') diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 6fd130bceb..42e7a2028f 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -40,7 +40,7 @@ reg_t kLoad(EngineState *s, int argc, reg_t *argv) { // Request to dynamically allocate hunk memory for later use if (restype == kResourceTypeMemory) - return s->_segMan->allocateHunkEntry("kLoad()", resnr); + return s->_segMan->allocateHunkEntry("kLoad()", resnr, true); return make_reg(0, ((restype << 11) | resnr)); // Return the resource identifier as handle } -- cgit v1.2.3