DIRECTOR: implement set the timeOutLength

This commit is contained in:
ysj1173886760 2021-08-06 15:22:37 +08:00
parent a1b9d60dde
commit 63f72c5963
3 changed files with 6 additions and 2 deletions

View File

@ -848,7 +848,8 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
d.u.i = _vm->getMacTicks() - g_director->getCurrentMovie()->_lastTimeOut;
break;
case kTheTimeoutLength:
getTheEntitySTUB(kTheTimeoutLength);
d.type = INT;
d.u.i = g_director->getCurrentMovie()->_timeOutLength;
break;
case kTheTimeoutMouse:
getTheEntitySTUB(kTheTimeoutMouse);
@ -1080,10 +1081,11 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
setTheEntitySTUB(kTheTimeoutKeyDown);
break;
case kTheTimeoutLapsed:
// timeOutLapsed can be set in D4, but can't in D3. see D3.1 interactivity manual p312 and D4 dictionary p296.
setTheEntitySTUB(kTheTimeoutLapsed);
break;
case kTheTimeoutLength:
setTheEntitySTUB(kTheTimeoutLength);
g_director->getCurrentMovie()->_timeOutLength = d.asInt();
break;
case kTheTimeoutMouse:
setTheEntitySTUB(kTheTimeoutMouse);

View File

@ -82,6 +82,7 @@ Movie::Movie(Window *window) {
_checkBoxAccess = 0;
_lastTimeOut = _lastEventTime;
_timeOutLength = 10800; // D4 dictionary p297, default value is 3minutes
}
Movie::~Movie() {

View File

@ -163,6 +163,7 @@ public:
uint16 _currentHiliteChannelId;
uint _lastTimeOut;
uint _timeOutLength;
private:
Window *_window;