diff options
author | Martin Kiewitz | 2009-10-28 19:10:39 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-28 19:10:39 +0000 |
commit | 88e56f87eb351f2a2ed7df6ada8f7d81e99f02ec (patch) | |
tree | 40f108424770f1c38b4949fd567ff45aa35482d4 /engines/sci/engine | |
parent | 5abe6c8054c1ad78e2052b5a172e0f75e7d7a09f (diff) | |
download | scummvm-rg350-88e56f87eb351f2a2ed7df6ada8f7d81e99f02ec.tar.gz scummvm-rg350-88e56f87eb351f2a2ed7df6ada8f7d81e99f02ec.tar.bz2 scummvm-rg350-88e56f87eb351f2a2ed7df6ada8f7d81e99f02ec.zip |
SCI/newgui: IsItSkip moved into SciGui
svn-id: r45479
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 0a6dc60881..684fc44858 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -371,22 +371,13 @@ reg_t kCantBeHere(EngineState *s, int argc, reg_t *argv) { return make_reg(0, !canBeHere); } -// TODO: This should go into SciGui reg_t kIsItSkip(EngineState *s, int argc, reg_t *argv) { GuiResourceId viewId = argv[0].toSint16(); int16 loopNo = argv[1].toSint16(); int16 celNo = argv[2].toSint16(); - int16 y = argv[3].toUint16(); - int16 x = argv[4].toUint16(); - - SciGuiView *tmpView = new SciGuiView(s->resMan, NULL, NULL, viewId); - sciViewCelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo); - x = CLIP<int>(x, 0, celInfo->width - 1); - y = CLIP<int>(y, 0, celInfo->height - 1); - byte *celData = tmpView->getBitmap(loopNo, celNo); - int result = (celData[y * celInfo->width + x] == celInfo->clearKey); - delete tmpView; + Common::Point position(argv[4].toUint16(), argv[3].toUint16()); + bool result = s->_gui->isItSkip(viewId, loopNo, celNo, position); return make_reg(0, result); } |