From 0ede3a249c65bf555f6be9650f63d40c23440581 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 29 Jun 2019 02:06:22 +0530 Subject: HDB: Remove 'Check Pause Flag' stubs --- engines/hdb/ai-cinematic.cpp | 4 +++- engines/hdb/input.cpp | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'engines/hdb') diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index 5f651a3527..1226470ac3 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -84,7 +84,9 @@ void AI::processCines() { _cineBlitList[i]->pic->drawMasked(_cine[i]->x, _cine[i]->y); } - // TODO: Check for Game Pause + // Check for Game Pause + if (g_hdb->getPause()) + return; for (uint i = 0; i < _cine.size(); i++) { debug(3, "processCines: [%d] %s now: %d start: %d delay: %d", i, cineTypeStr[_cine[i]->cmdType], diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index e19b5ee83c..d9e0cbefc0 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -190,7 +190,10 @@ void Input::updateMouseButtons(int l, int m, int r) { } else if (_mouseX > (kScreenWidth - 32 * 5) && _mouseY >= 240) { warning("STUB: updateMouseButtons: checkDeliveriesSelect() required"); } else { - warning("STUB: updateMouseButtons: Add pause check"); + if (g_hdb->getPause() && g_hdb->getGameState() == GAME_PLAY) { + g_hdb->_window->checkPause(_mouseX, _mouseY); + return; + } stylusDown(_mouseX, _mouseY); } } else if (!_mouseLButton) { @@ -199,14 +202,18 @@ void Input::updateMouseButtons(int l, int m, int r) { // Check if MButton has been pressed if (_mouseMButton) { - warning("STUB: updateMouseButtons: Add pause check"); + if (g_hdb->getPause() && g_hdb->getGameState() == GAME_PLAY) + return; + g_hdb->_ai->clearWaypoints(); warning("STUB: Play SND_POP"); } // Check if RButton has been pressed if (_mouseRButton) { - warning("STUB: updateMouseButtons: Add pause check"); + if (g_hdb->getPause() && g_hdb->getGameState() == GAME_PLAY) + return; + uint16 buttons = getButtons() | kButtonB; setButtons(buttons); } -- cgit v1.2.3