[Scummvm-cvs-logs] SF.net SVN: scummvm:[50577] scummvm/trunk/engines/sci/engine
lskovlun at users.sourceforge.net
lskovlun at users.sourceforge.net
Fri Jul 2 00:38:37 CEST 2010
Revision: 50577
http://scummvm.svn.sourceforge.net/scummvm/?rev=50577&view=rev
Author: lskovlun
Date: 2010-07-01 22:38:36 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Support the CD kernel call (stub) and add the TRUE_REG constant.
Would be nice to use this constant in pre-existing code.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/engine/kernel32.cpp
scummvm/trunk/engines/sci/engine/vm_types.h
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2010-07-01 22:31:48 UTC (rev 50576)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2010-07-01 22:38:36 UTC (rev 50577)
@@ -425,6 +425,7 @@
{ 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
};
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2010-07-01 22:31:48 UTC (rev 50576)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2010-07-01 22:38:36 UTC (rev 50577)
@@ -449,6 +449,7 @@
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
Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-07-01 22:31:48 UTC (rev 50576)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-07-01 22:38:36 UTC (rev 50577)
@@ -898,7 +898,7 @@
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,10 +907,27 @@
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;
+}
+
} // End of namespace Sci
#endif // ENABLE_SCI32
Modified: scummvm/trunk/engines/sci/engine/vm_types.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm_types.h 2010-07-01 22:31:48 UTC (rev 50576)
+++ scummvm/trunk/engines/sci/engine/vm_types.h 2010-07-01 22:38:36 UTC (rev 50577)
@@ -87,6 +87,7 @@
extern const reg_t NULL_REG;
extern const reg_t SIGNAL_REG;
+extern const reg_t TRUE_REG;
// Selector ID
typedef int Selector;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list