diff options
author | Walter van Niftrik | 2009-10-11 14:58:58 +0000 |
---|---|---|
committer | Walter van Niftrik | 2009-10-11 14:58:58 +0000 |
commit | 4a157d43b352997e05164d231a634bc65d302308 (patch) | |
tree | df30b2013d40566976e641b4663538755660fe0a /engines | |
parent | 117dfd08ecc41a6c7dc339ba21205e72fcb764fa (diff) | |
download | scummvm-rg350-4a157d43b352997e05164d231a634bc65d302308.tar.gz scummvm-rg350-4a157d43b352997e05164d231a634bc65d302308.tar.bz2 scummvm-rg350-4a157d43b352997e05164d231a634bc65d302308.zip |
SCI: Implement CoordPri() with two args.
svn-id: r44927
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 01e42df13d..a57ba731ab 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -288,7 +288,7 @@ SciKernelFunction kfunct_mappers[] = { /*62*/ DEFUN("GetCWD", kGetCWD, "r"), /*63*/ DEFUN("CheckFreeSpace", kCheckFreeSpace, "r"), /*64*/ DEFUN("ValidPath", kValidPath, "r"), - /*65*/ DEFUN("CoordPri", kCoordPri, "i"), + /*65*/ DEFUN("CoordPri", kCoordPri, "ii*"), /*66*/ DEFUN("StrAt", kStrAt, "rii*"), /*67*/ DEFUN("DeviceInfo", kDeviceInfo, "i.*"), // FIXME: signature check removed (set to .*), as this function accepts a parameter in SCI32 games diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 3765835295..6206c69a48 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -753,7 +753,12 @@ reg_t kWait(EngineState *s, int argc, reg_t *argv) { reg_t kCoordPri(EngineState *s, int argc, reg_t *argv) { int16 y = argv[0].toSint16(); - return make_reg(0, s->_gui->coordinateToPriority(y)); + if ((argc < 2) || (y != 1)) { + return make_reg(0, s->_gui->coordinateToPriority(y)); + } else { + int16 priority = argv[1].toSint16(); + return make_reg(0, s->_gui->priorityToCoordinate(priority)); + } } reg_t kPriCoord(EngineState *s, int argc, reg_t *argv) { |