aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2009-12-24 18:37:35 +0000
committerMatthew Hoops2009-12-24 18:37:35 +0000
commit996da19fc98eba75c96cd0fa82ef440b0c45e4dc (patch)
treea4a0df39f0a99fe9f039620967454c2daacfce46
parentd7cd8345c0ea2688101b3a0d059f6dc7ae45abd6 (diff)
downloadscummvm-rg350-996da19fc98eba75c96cd0fa82ef440b0c45e4dc.tar.gz
scummvm-rg350-996da19fc98eba75c96cd0fa82ef440b0c45e4dc.tar.bz2
scummvm-rg350-996da19fc98eba75c96cd0fa82ef440b0c45e4dc.zip
Stub SCI32's kOnMe to give better debugging info (used when clicking in the GK1 menu).
svn-id: r46533
-rw-r--r--engines/sci/engine/kernel.cpp1
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel32.cpp10
3 files changed, 12 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 4054d0374b..a35c518fdf 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -351,6 +351,7 @@ SciKernelFunction kfunct_mappers[] = {
DEFUN("RepaintPlane", kRepaintPlane, "o"),
DEFUN("FrameOut", kFrameOut, ""),
DEFUN("ListEachElementDo", kListEachElementDo, ".*"),
+ DEFUN("OnMe", kOnMe, "iio.*"),
// SCI2.1 Kernel Functions
DEFUN("Save", kSave, ".*"),
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 8f43a1b7f5..da66e8a5a4 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -406,6 +406,7 @@ reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv);
reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv);
reg_t kFrameOut(EngineState *s, int argc, reg_t *argv);
reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv);
+reg_t kOnMe(EngineState *s, int argc, reg_t *argv);
// SCI2.1 Kernel Functions
reg_t kSave(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp
index f6915578dd..bc706ea934 100644
--- a/engines/sci/engine/kernel32.cpp
+++ b/engines/sci/engine/kernel32.cpp
@@ -711,6 +711,16 @@ reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
+reg_t kOnMe(EngineState *s, int argc, reg_t *argv) {
+ // This kernel function looks like it calls a function in the object (arg 2) with
+ // the x/y coordinates supplied in args 0/1. Arg 3 seems to be 0.
+
+ // TODO
+
+ warning("kOnMe: (%d, %d) on object %04x:%04x", argv[0].toUint16(), argv[1].toUint16(), PRINT_REG(argv[2]));
+ return NULL_REG;
+}
+
} // End of namespace Sci
#endif // ENABLE_SCI32