diff options
author | Lars Skovlund | 2010-07-01 22:38:36 +0000 |
---|---|---|
committer | Lars Skovlund | 2010-07-01 22:38:36 +0000 |
commit | 4dd02d2f4ab05839f86db9102c954ca34bfc1c34 (patch) | |
tree | dbb1155ca84bf848d04c78092bc5638c5c833cf0 /engines/sci | |
parent | 32dfd0cedce13f00b512d87b3b9bb7c383cc3b45 (diff) | |
download | scummvm-rg350-4dd02d2f4ab05839f86db9102c954ca34bfc1c34.tar.gz scummvm-rg350-4dd02d2f4ab05839f86db9102c954ca34bfc1c34.tar.bz2 scummvm-rg350-4dd02d2f4ab05839f86db9102c954ca34bfc1c34.zip |
Support the CD kernel call (stub) and add the TRUE_REG constant.
Would be nice to use this constant in pre-existing code.
svn-id: r50577
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 19 | ||||
-rw-r--r-- | engines/sci/engine/vm_types.h | 1 |
4 files changed, 21 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 58619986cb..47f7ac3bc8 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -425,6 +425,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(IsOnMe), SIG_EVERYWHERE, "iio.*", NULL, NULL }, { MAP_CALL(MulDiv), SIG_EVERYWHERE, "iii", NULL, NULL }, { MAP_CALL(Text), SIG_EVERYWHERE, ".*", NULL, NULL }, + { MAP_CALL(CD), SIG_EVERYWHERE, ".*", NULL, NULL }, { NULL, NULL, SIG_EVERYWHERE, NULL, NULL, NULL } #endif }; diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index a3cf7b5f91..cb66aa9f4d 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -449,6 +449,7 @@ reg_t kList(EngineState *s, int argc, reg_t *argv); reg_t kRobot(EngineState *s, int argc, reg_t *argv); reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv); reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv); +reg_t kCD(EngineState *s, int argc, reg_t *argv); #endif diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index 2d492eb3ee..8b854dbca1 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -898,7 +898,7 @@ reg_t kInPolygon(EngineState *s, int argc, reg_t *argv) { reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { // TODO: argument 0 is usually 0, and arguments 1 and 2 are usually 1 switch (argv[0].toUint16()) { - case 0: + case 0: { if (argc != 4) { warning("kCreateTextBitmap(0): expected 4 arguments, got %i", argc); return NULL_REG; @@ -907,6 +907,23 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); debug("kCreateTextBitmap: %s", text.c_str()); } + default: + warning("CreateTextBitmap(%d)", argv[0].toUint16()); + } + + return NULL_REG; +} + +reg_t kCD(EngineState *s, int argc, reg_t *argv) +{ + // TODO: Stub + switch (argv[0].toUint16()) { + case 0: + // Return whether the contents of disc argv[1] is available. + return TRUE_REG; + default: + warning("CD(%d)", argv[0].toUint16()); + } return NULL_REG; } diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h index 614b6f247d..828fba3d7d 100644 --- a/engines/sci/engine/vm_types.h +++ b/engines/sci/engine/vm_types.h @@ -87,6 +87,7 @@ enum { extern const reg_t NULL_REG; extern const reg_t SIGNAL_REG; +extern const reg_t TRUE_REG; // Selector ID typedef int Selector; |