From 47ad577a785aaeef7856aca883b367e9b681c4b7 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 8 Sep 2010 20:11:11 +0000 Subject: SCI: ability to change r_acc within DrawControl preparation for returning rect array on |r| textcodes svn-id: r52642 --- engines/sci/engine/kgraphics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 02891dde9e..e3ab557eff 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -903,6 +903,10 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) { reg_t controlObject = argv[0]; Common::String objName = s->_segMan->getObjectName(controlObject); + // Most of the time, we won't return anything to the caller + // but |r| textcodes will trigger creation of rects in memory and will then set s->r_acc + s->r_acc = NULL_REG; + // Disable the "Change Directory" button, as we don't allow the game engine to // change the directory where saved games are placed // "changeDirItem" is used in the import windows of QFG2&3 @@ -941,7 +945,7 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) { } _k_GenericDrawControl(s, controlObject, false); - return NULL_REG; + return s->r_acc; } reg_t kHiliteControl(EngineState *s, int argc, reg_t *argv) { -- cgit v1.2.3