aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kmisc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/kmisc.cpp')
-rw-r--r--engines/sci/engine/kmisc.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 16eb7ae7d5..4782b19280 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -250,6 +250,24 @@ reg_t kMemory(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kPlatform(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+ if (argc == 1) {
+ if (argv[0].toUint16() == 4)
+ if (((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows)
+ return make_reg(0, 2);
+ else
+ return make_reg(0, 1);
+ else if (argv[0].toUint16() == 5)
+ warning("kPlatform(5)"); // TODO: return 1 based on some variable
+ else if (argv[0].toUint16() == 6)
+ warning("kPlatform(6)"); // TODO: return some variable
+ else if (argv[0].toUint16() == 7 && ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows)
+ return make_reg(0, 1);
+ }
+
+ return NULL_REG;
+}
+
reg_t kStub(EngineState *s, int funct_nr, int argc, reg_t *argv) {
char tmpbuf[200];
sprintf(tmpbuf, "Unimplemented syscall: %s[%x] (",