diff options
author | Denis Kasak | 2009-07-27 05:34:22 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-27 05:34:22 +0000 |
commit | 5a44af4433cb61607c39894d87291d33b2d4010c (patch) | |
tree | c3e60588b925ba6f939e737d840923cfbef1c8e8 | |
parent | 21a22f7f77bd876414e6155747d4a037ae0c1f23 (diff) | |
download | scummvm-rg350-5a44af4433cb61607c39894d87291d33b2d4010c.tar.gz scummvm-rg350-5a44af4433cb61607c39894d87291d33b2d4010c.tar.bz2 scummvm-rg350-5a44af4433cb61607c39894d87291d33b2d4010c.zip |
Enabled running of look/use scripts on left/right mouse button press for testing (Warning: unstable in some places).
svn-id: r42841
-rw-r--r-- | engines/draci/game.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 09bcf4cf13..620a8ca9e7 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -178,8 +178,10 @@ void Game::loop() { } int animUnderCursor = _vm->_anims->getTopAnimationID(x, y); + Animation *anim = _vm->_anims->getAnimation(animUnderCursor); int curObject = getObjectWithAnimation(animUnderCursor); + GameObject *obj = &_objects[curObject]; Animation *atitle = _vm->_anims->getAnimation(kTitleText); @@ -187,9 +189,19 @@ void Game::loop() { atitle->deleteFrames(); if (curObject != kNotFound) { - GameObject *obj = &_objects[curObject]; Text *title = new Text (obj->_title, _vm->_bigFont, kFontColour1, 0, 0); atitle->addFrame(title); + + // HACK: Test running look and use scripts + if (_vm->_mouse->lButtonPressed()) { + _vm->_script->run(obj->_program, obj->_look); + _vm->_mouse->lButtonSet(false); + } + + if (_vm->_mouse->rButtonPressed()) { + _vm->_script->run(obj->_program, obj->_use); + _vm->_mouse->rButtonSet(false); + } } debugC(2, kDraciAnimationDebugLevel, "Anim under cursor: %d", animUnderCursor); |