[Scummvm-git-logs] scummvm master -> 50ba58c7c9094ae37289a561708538a754a9dbba

sev- noreply at scummvm.org
Mon Jun 20 23:04:33 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
50ba58c7c9 DIRECTOR: LINGO: Implement the beepOn property and remove their respective STUBs


Commit: 50ba58c7c9094ae37289a561708538a754a9dbba
    https://github.com/scummvm/scummvm/commit/50ba58c7c9094ae37289a561708538a754a9dbba
Author: Pragyansh Chaturvedi (r41k0u) (pragyanshchaturvedi18 at gmail.com)
Date: 2022-06-21T01:04:30+02:00

Commit Message:
DIRECTOR: LINGO: Implement the beepOn property and remove their respective STUBs

Changed paths:
    engines/director/events.cpp
    engines/director/lingo/lingo-the.cpp
    engines/director/movie.cpp
    engines/director/movie.h


diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index 961f729f930..2d3838b9c7e 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -190,6 +190,10 @@ bool Movie::processEvent(Common::Event &event) {
 			// Even in D4, `the clickOn` uses the old "active" sprite instead of mouse sprite.
 			_currentClickOnSpriteId = sc->getActiveSpriteIDFromPos(pos);
 
+			if (!spriteId && _isBeepOn) {
+				g_lingo->func_beep(1);
+			}
+
 			if (spriteId > 0 && sc->_channels[spriteId]->_sprite->shouldHilite()) {
 				_currentHiliteChannelId = spriteId;
 				g_director->_wm->_hilitingWidget = true;
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 7848d43efae..8d7b8103bfb 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -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;
 		break;
 	case kTheButtonStyle:
 		d.type = INT;
@@ -940,7 +941,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;
 		break;
 	case kTheButtonStyle:
 		if (d.asInt())
diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index 1fb6cd4311f..2e9d3ca94d8 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -87,6 +87,8 @@ Movie::Movie(Window *window) {
 	_timeOutKeyDown = true;
 	_timeOutMouse = true;
 	_timeOutPlay = false;
+
+	_isBeepOn = false;
 }
 
 Movie::~Movie() {
diff --git a/engines/director/movie.h b/engines/director/movie.h
index a95090b4bc4..80bb5b4a5a0 100644
--- a/engines/director/movie.h
+++ b/engines/director/movie.h
@@ -168,6 +168,8 @@ public:
 	bool _timeOutMouse;
 	bool _timeOutPlay;
 
+	bool _isBeepOn;
+
 private:
 	Window *_window;
 	DirectorEngine *_vm;




More information about the Scummvm-git-logs mailing list