mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
SCUMM: Fix verb/sentence handling in Indy3 mac (there, a double click must be used to trigger a verb/sentence)
svn-id: r42907
This commit is contained in:
parent
e779747ca4
commit
d91d68a9ca
@ -23,10 +23,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "common/util.h"
|
||||
#include "common/system.h"
|
||||
|
||||
#include "scumm/actor.h"
|
||||
#include "scumm/object.h"
|
||||
@ -1195,6 +1194,12 @@ void ScummEngine::runInputScript(int clickArea, int val, int mode) {
|
||||
args[1] = VAR(82 + (val - 100));
|
||||
}
|
||||
}
|
||||
|
||||
// Clicks are handled differently in Indy3 mac: param 2 of the
|
||||
// input script is set to 0 for normal clicks, and to 1 for double clicks.
|
||||
uint32 time = _system->getMillis();
|
||||
args[2] = (time < _lastInputScriptTime + 500); // 500 ms double click delay
|
||||
_lastInputScriptTime = time;
|
||||
}
|
||||
|
||||
if (verbScript)
|
||||
|
@ -184,6 +184,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
|
||||
_mouseAndKeyboardStat = 0;
|
||||
_leftBtnPressed = 0;
|
||||
_rightBtnPressed = 0;
|
||||
_lastInputScriptTime = 0;
|
||||
_bootParam = 0;
|
||||
_dumpScripts = false;
|
||||
_debugMode = 0;
|
||||
|
@ -615,6 +615,12 @@ protected:
|
||||
uint16 _mouseAndKeyboardStat;
|
||||
byte _leftBtnPressed, _rightBtnPressed;
|
||||
|
||||
/**
|
||||
* Last time runInputScript was run (measured in terms of OSystem::getMillis()).
|
||||
* This is currently only used for Indy3 mac to detect "double clicks".
|
||||
*/
|
||||
uint32 _lastInputScriptTime;
|
||||
|
||||
/** The bootparam, to be passed to the script 1, the bootscript. */
|
||||
int _bootParam;
|
||||
|
||||
|
@ -23,6 +23,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "common/timer.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "scumm/actor.h"
|
||||
#include "scumm/file.h"
|
||||
@ -32,10 +35,6 @@
|
||||
#include "scumm/sound.h"
|
||||
#include "scumm/util.h"
|
||||
|
||||
#include "common/config-manager.h"
|
||||
#include "common/timer.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "sound/adpcm.h"
|
||||
#include "sound/audiocd.h"
|
||||
#include "sound/flac.h"
|
||||
@ -46,8 +45,6 @@
|
||||
#include "sound/vorbis.h"
|
||||
#include "sound/wave.h"
|
||||
|
||||
|
||||
|
||||
namespace Scumm {
|
||||
|
||||
struct MP3OffsetTable { /* Compressed Sound (.SO3) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user