mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
DIRECTOR: LINGO: Implement kTheLastKey function
This commit is contained in:
parent
de24b461b9
commit
c5651d67a6
@ -129,6 +129,7 @@ void DirectorEngine::processEvents() {
|
||||
debugC(1, kDebugEvents, "processEvents(): keycode: %d", _keyCode);
|
||||
}
|
||||
|
||||
sc->_lastKeyTime = g_director->getMacTicks();
|
||||
_lingo->processEvent(kEventKeyDown);
|
||||
break;
|
||||
|
||||
|
@ -429,6 +429,10 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
|
||||
case kTheLastFrame:
|
||||
d.type = INT;
|
||||
d.u.i = _vm->getCurrentScore()->_frames.size() - 1;
|
||||
break;
|
||||
case kTheLastKey:
|
||||
d.type = INT;
|
||||
d.u.i = _vm->getMacTicks() - _vm->getCurrentScore()->_lastKeyTime;
|
||||
break;
|
||||
default:
|
||||
warning("Lingo::getTheEntity(): Unprocessed getting field \"%s\" of entity %s", field2str(field), entity2str(entity));
|
||||
|
@ -76,6 +76,7 @@ Score::Score(DirectorEngine *vm) {
|
||||
_soundManager = _vm->getSoundManager();
|
||||
_currentMouseDownSpriteId = 0;
|
||||
_mouseIsDown = false;
|
||||
_lastKeyTime = _vm->getMacTicks();
|
||||
|
||||
// FIXME: TODO: Check whether the original truely does it
|
||||
if (_vm->getVersion() <= 3) {
|
||||
|
@ -142,6 +142,7 @@ public:
|
||||
Common::Rect _movieRect;
|
||||
uint16 _currentMouseDownSpriteId;
|
||||
bool _mouseIsDown;
|
||||
uint32 _lastKeyTime;
|
||||
|
||||
bool _stopPlay;
|
||||
uint32 _nextFrameTime;
|
||||
|
Loading…
x
Reference in New Issue
Block a user