diff options
author | Vladimir Menshakov | 2009-09-05 20:58:25 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-09-05 20:58:25 +0000 |
commit | a2c28b0a8fa85411c8018e089ab0d3db5f8420bf (patch) | |
tree | cb13a7aa2c0170ab8cdf00af27e30e0a24123df1 /engines/teenagent/inventory.cpp | |
parent | 0b002beccd31fa2796a319427624af1b2ad580b6 (diff) | |
download | scummvm-rg350-a2c28b0a8fa85411c8018e089ab0d3db5f8420bf.tar.gz scummvm-rg350-a2c28b0a8fa85411c8018e089ab0d3db5f8420bf.tar.bz2 scummvm-rg350-a2c28b0a8fa85411c8018e089ab0d3db5f8420bf.zip |
made second chapter completable.
svn-id: r43966
Diffstat (limited to 'engines/teenagent/inventory.cpp')
-rw-r--r-- | engines/teenagent/inventory.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index a0346f63be..bdf99bd971 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -144,9 +144,15 @@ bool Inventory::processEvent(const Common::Event &event) { case Common::EVENT_LBUTTONDOWN: { //check combine - if (selected_obj == NULL || hovered_obj == NULL) + if (hovered_obj == NULL) return _active; + if (selected_obj == NULL) { + activate(false); + _engine->displayMessage(hovered_obj->description()); + return true; + } + int id1 = selected_obj->id; int id2 = hovered_obj->id; @@ -190,13 +196,6 @@ bool Inventory::processEvent(const Common::Event &event) { activate(false); if (_engine->processCallback(READ_LE_UINT16(table + 1))) return true; - else { - //some callbacks returns false if they need to display default description - _engine->displayMessage(hovered_obj->description()); - activate(false); - resetSelectedObject(); - return true; - } } } } |