aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-09-08 20:11:11 +0000
committerMartin Kiewitz2010-09-08 20:11:11 +0000
commit47ad577a785aaeef7856aca883b367e9b681c4b7 (patch)
treed16e1628a3765af70636a0cff4862cb2f1e1b641
parent0288f60f1972b5c5a7d719a8114fdeae32024cb2 (diff)
downloadscummvm-rg350-47ad577a785aaeef7856aca883b367e9b681c4b7.tar.gz
scummvm-rg350-47ad577a785aaeef7856aca883b367e9b681c4b7.tar.bz2
scummvm-rg350-47ad577a785aaeef7856aca883b367e9b681c4b7.zip
SCI: ability to change r_acc within DrawControl
preparation for returning rect array on |r| textcodes svn-id: r52642
-rw-r--r--engines/sci/engine/kgraphics.cpp6
1 files changed, 5 insertions, 1 deletions
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) {