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 the beepOn property and remove their respective STUBs #4010

Merged
merged 1 commit into from Jun 20, 2022

Conversation

r41k0u
Copy link
Contributor

@r41k0u r41k0u commented Jun 16, 2022

Implements the beepOn property by creating a bool _isBeepOn for the movie and emitting a beep at every mouse down event which meets these conditions:

  • beepOn is true
  • castMember being clicked is not active
    Tested using beepOn workshop movie and shows identical behaviour as in BasiliskII

Copy link
Member

@sev- sev- left a comment

Few remarks and an open question

@@ -377,7 +377,8 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
d = g_lingo->_actorList;
break;
case kTheBeepOn:
getTheEntitySTUB(kTheBeepOn);
d.type = INT;
d.u.i = (int) g_director->getCurrentMovie()->_isBeepOn;
Copy link
Member

@sev- sev- Jun 16, 2022

Choose a reason for hiding this comment

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

Please, do not add space after type cast.

@@ -936,7 +937,7 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
g_lingo->_actorList = d;
break;
case kTheBeepOn:
setTheEntitySTUB(kTheBeepOn);
g_director->getCurrentMovie()->_isBeepOn = (bool) d.u.i;
Copy link
Member

@sev- sev- Jun 16, 2022

Choose a reason for hiding this comment

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

Same thing regarding extra space after the type cast.

@@ -87,6 +87,8 @@ Movie::Movie(Window *window) {
_timeOutKeyDown = true;
_timeOutMouse = true;
_timeOutPlay = false;

_isBeepOn = false;
Copy link
Member

@sev- sev- Jun 16, 2022

Choose a reason for hiding this comment

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

I thought that beep is on by default, not off. Could you please check with the original?

Copy link
Contributor Author

@r41k0u r41k0u Jun 16, 2022

Choose a reason for hiding this comment

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

According to the D4 Dictionary, beepOn is FALSE by default. I will check with basiliskII and update

Copy link
Contributor Author

@r41k0u r41k0u Jun 20, 2022

Choose a reason for hiding this comment

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

I tested the movie. beepOn is off by default in the original too

@sev-
Copy link
Member

@sev- sev- commented Jun 20, 2022

Thank you.

@sev- sev- merged commit 50ba58c into scummvm:master Jun 20, 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