Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIRECTOR: LINGO: Implement setting of timeOutLapsed property #4023

Merged
merged 1 commit into from Jun 21, 2022

Conversation

r41k0u
Copy link
Contributor

@r41k0u r41k0u commented Jun 20, 2022

This change adds a baseline which is subtracted from the timer to give the modified lapsed time. The baseline is set to 0 by default so the modified lapsed time won't show up unless it has been set. The changes have NOT been tested as there weren't any workshop movies testing for the same. I will update it after making a movie and testing it

@@ -1105,7 +1105,9 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
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);
if (g_director->getVersion() >= 400 && d.type == INT) {
Copy link
Member

@sev- sev- Jun 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when it is not INT, shall we probably print out a warning? How does the original behave?

@r41k0u
Copy link
Contributor Author

@r41k0u r41k0u commented Jun 21, 2022

I have added a warning in case the parameter is not an INT

g_director->_tickBaseline = g_director->getMacTicks() - d.asInt();
}
if (d.type != INT) {
warning("Lingo::setTheEntity() : Wrong DatumType %d for setting of Lingo Property timeOutLapsed", d.type);
Copy link
Member

@sev- sev- Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this, but something tells me that Lingo will be fine if the type is FLOAT too.

@sev- sev- merged commit ad6b800 into scummvm:master Jun 21, 2022
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants