diff options
author | Nipun Garg | 2019-08-03 10:42:07 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:31 +0200 |
commit | 7ad5cf9d30ca24ace6709b43fe4549897505c8ab (patch) | |
tree | 8b806a3b359ac1b2f83470ad048e456868a842d0 /engines/hdb/hdb.cpp | |
parent | 878eefceb5e2937512c060385a3464a1c38b2def (diff) | |
download | scummvm-rg350-7ad5cf9d30ca24ace6709b43fe4549897505c8ab.tar.gz scummvm-rg350-7ad5cf9d30ca24ace6709b43fe4549897505c8ab.tar.bz2 scummvm-rg350-7ad5cf9d30ca24ace6709b43fe4549897505c8ab.zip |
HDB: Add new PPC-specific code
Diffstat (limited to 'engines/hdb/hdb.cpp')
-rw-r--r-- | engines/hdb/hdb.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 5cd561542c..f1ff789010 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -393,8 +393,18 @@ void HDBGame::setTargetXY(int x, int y) { return; // Double-Clicking on the player to open inventory? - if (g_hdb->isPPC()) - warning("STUB: Add double-click to inventory functionality for PPC version"); + if (g_hdb->isPPC()) { + if (x == px && y == py) { + static uint32 dblClickTimer = 0; + + if (dblClickTimer && ((int)(g_system->getMillis() - dblClickTimer) < (int)(kGameFPS * 5))) { + g_hdb->_window->openInventory(); + dblClickTimer = 0; + } else + dblClickTimer = g_system->getMillis(); + return; + } + } // If we're attacking...don't do anything else AIState stateList[] = { |