diff options
author | Filippos Karapetis | 2010-06-16 21:56:39 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-16 21:56:39 +0000 |
commit | 20d8de27bad1e9e8cd218c258ec863f89219b49c (patch) | |
tree | 4c7e0afc9c83d776dd1c7b74a1f3e7120ef102ba /engines/sci/engine/kernel32.cpp | |
parent | 9b6f71d7cf76e529ed8010224442ceef18183fcb (diff) | |
download | scummvm-rg350-20d8de27bad1e9e8cd218c258ec863f89219b49c.tar.gz scummvm-rg350-20d8de27bad1e9e8cd218c258ec863f89219b49c.tar.bz2 scummvm-rg350-20d8de27bad1e9e8cd218c258ec863f89219b49c.zip |
Implemented the SCI2.1 kMulDiv kernel function. Walking in Torin's Passage is done correctly now, without leaving trails
svn-id: r49909
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index a077f110cf..d35dd38792 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -879,6 +879,14 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } +reg_t kMulDiv(EngineState *s, int argc, reg_t *argv) { + int16 multiplicant = argv[0].toSint16(); + int16 multiplier = argv[1].toSint16(); + int16 denominator = argv[2].toSint16(); + + return make_reg(0, multiplicant * multiplier / denominator); +} + } // End of namespace Sci #endif // ENABLE_SCI32 |