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

ysj1173886760 42030331+ysj1173886760 at users.noreply.github.com
Mon Aug 9 12:35:59 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:
677cec6aea DIRECTOR: implement setting the timer.
be5134d7ca DIRECTOR: fix FPE in initTransParams


Commit: 677cec6aea4db228554a9a82bba67e6dbab3538b
    https://github.com/scummvm/scummvm/commit/677cec6aea4db228554a9a82bba67e6dbab3538b
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-09T20:35:45+08:00

Commit Message:
DIRECTOR: implement setting the timer.

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


diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 48fea88b0a..166a47993d 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1100,7 +1100,8 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
 		movie->setPrimaryEventHandler(kEventTimeout, d.asString());
 		break;
 	case kTheTimer:
-		setTheEntitySTUB(kTheTimer);
+		// so value of the timer would be d.asInt()
+		movie->_lastTimerReset = _vm->getMacTicks() - d.asInt();
 		break;
 	case kTheTrace:
 		setTheEntitySTUB(kTheTrace);


Commit: be5134d7ca9589a629fc88b12fde23fe83b7d7e8
    https://github.com/scummvm/scummvm/commit/be5134d7ca9589a629fc88b12fde23fe83b7d7e8
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-09T20:35:45+08:00

Commit Message:
DIRECTOR: fix FPE in initTransParams

Changed paths:
    engines/director/transitions.cpp


diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index 774368092b..8234f1bcc5 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -1064,19 +1064,19 @@ void Window::initTransParams(TransParams &t, Common::Rect &clipRect) {
 
 	switch (transProps[t.type].dir) {
 	case kTransDirHorizontal:
-		t.steps = w / t.chunkSize;
+		t.steps = MAX(w / t.chunkSize, (uint)1);
 		t.xStepSize = w / t.steps;
 		t.xpos = w % t.steps;
 		break;
 
 	case kTransDirVertical:
-		t.steps = h / t.chunkSize;
+		t.steps = MAX(h / t.chunkSize, (uint)1);
 		t.yStepSize = h / t.steps;
 		t.ypos = h % t.steps;
 		break;
 
 	case kTransDirBoth:
-		t.steps = m / t.chunkSize;
+		t.steps = MAX(m / t.chunkSize, (uint)1);
 
 		t.xStepSize = w / t.steps;
 		t.xpos = w % t.steps;




More information about the Scummvm-git-logs mailing list