From 7f26069f6924b0d450b6592755ba6ab40d507a9c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 5 Feb 2007 14:08:50 +0000 Subject: - Moved struct Mult_Data from Mult_v2 to Mult and merged Mult::_multData, Mult::_multData2 and some of the loose variables in Mult - Added some missing MD5s/game versions (#1652352) svn-id: r25393 --- engines/gob/game.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'engines/gob/game.cpp') diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 3d4d01d46d..87e1eef48b 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -377,6 +377,37 @@ void Game::freeSoundSlot(int16 slot) { _soundSamples[slot] = 0; } +int16 Game::checkKeys(int16 *pMouseX, int16 *pMouseY, int16 *pButtons, char handleMouse) { + _vm->_util->processInput(); + + if (_vm->_mult->_multData && (_vm->_global->_inter_variables != 0) && + (VAR(58) != 0)) { + if (_vm->_mult->_multData->frameStart != (int)VAR(58) - 1) + _vm->_mult->_multData->frameStart++; + else + _vm->_mult->_multData->frameStart = 0; + + _vm->_mult->playMult(_vm->_mult->_multData->frameStart + VAR(57), + _vm->_mult->_multData->frameStart + VAR(57), 1, handleMouse); + } + + if (_vm->_inter->_soundEndTimeKey != 0 + && _vm->_util->getTimeKey() >= _vm->_inter->_soundEndTimeKey) { + _vm->_snd->stopSound(_vm->_inter->_soundStopVal); + _vm->_inter->_soundEndTimeKey = 0; + } + + if (_vm->_global->_useMouse == 0) + error("checkKeys: Can't work without mouse!"); + + _vm->_util->getMouseState(pMouseX, pMouseY, pButtons); + + if (*pButtons == 3) + *pButtons = 0; + + return _vm->_util->checkKey(); +} + int16 Game::adjustKey(int16 key) { if (key <= 0x60 || key >= 0x7b) return key; -- cgit v1.2.3