[Scummvm-git-logs] scummvm master -> e4762aef5e5a1d3d3aaacbde67b67bd73bcd898f

ysj1173886760 42030331+ysj1173886760 at users.noreply.github.com
Mon Jul 26 09:16:34 UTC 2021


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

Summary:
161276dcca DIRECTOR: implement offset of string.
e4762aef5e DIRECTOR: don't scroll for auto expand text.


Commit: 161276dcca64bdf3d45bd028ffc525c4c6db45b5
    https://github.com/scummvm/scummvm/commit/161276dcca64bdf3d45bd028ffc525c4c6db45b5
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-07-26T17:04:03+08:00

Commit Message:
DIRECTOR: implement offset of string.

Changed paths:
    engines/director/lingo/lingo-builtins.cpp


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index bc4e7bfda0..809b054e70 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -478,12 +478,15 @@ void LB::b_offset(int nargs) {
 		b_offsetRect(nargs);
 		return;
 	}
-	Common::String target = g_lingo->pop().asString();
 	Common::String source = g_lingo->pop().asString();
+	Common::String target = g_lingo->pop().asString();
 
-	warning("STUB: b_offset()");
+	const char *str = strstr(source.c_str(), target.c_str());
 
-	g_lingo->push(Datum(0));
+	if (str == nullptr)
+		g_lingo->push(Datum(0));
+	else
+		g_lingo->push(Datum(int(str - source.c_str() + 1)));
 }
 
 void LB::b_string(int nargs) {


Commit: e4762aef5e5a1d3d3aaacbde67b67bd73bcd898f
    https://github.com/scummvm/scummvm/commit/e4762aef5e5a1d3d3aaacbde67b67bd73bcd898f
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-07-26T17:10:10+08:00

Commit Message:
DIRECTOR: don't scroll for auto expand text.

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index d3a06f4045..2b423d3c3e 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -1832,6 +1832,11 @@ bool MacText::processEvent(Common::Event &event) {
 }
 
 void MacText::scroll(int delta) {
+	// disable the scroll for auto expand text
+	// should be amend to check the text type. e.g. auto expand type, fixed type, scroll type.
+	if (!_fixedDims)
+		return;
+
 	int oldScrollPos = _scrollPos;
 
 	_scrollPos += delta * kConScrollStep;




More information about the Scummvm-git-logs mailing list