[Scummvm-git-logs] scummvm master -> 3663056c16e1483ac2293347f4fbc4cd881c3704

sev- sev at scummvm.org
Wed Jul 22 12:03:16 UTC 2020


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:
3663056c16 DIRECTOR: LINGO: Implemented 'preLoad', fixed return value for 'preLoadCast'


Commit: 3663056c16e1483ac2293347f4fbc4cd881c3704
    https://github.com/scummvm/scummvm/commit/3663056c16e1483ac2293347f4fbc4cd881c3704
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-22T14:02:41+02:00

Commit Message:
DIRECTOR: LINGO: Implemented 'preLoad', fixed return value for 'preLoadCast'

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 5c84355945..67ebe7d806 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -1268,19 +1268,27 @@ void LB::b_playAccel(int nargs) {
 }
 
 void LB::b_preLoad(int nargs) {
-	g_lingo->printSTUBWithArglist("b_preLoad", nargs);
+	// We always pretend we preloaded all frames
+	// Returning the number of the last frame successfully "loaded"
+	if (nargs == 0) {
+		g_lingo->_theResult = Datum((int)g_director->getCurrentMovie()->getScore()->_frames.size());
+		return;
+	}
 
-	g_lingo->dropStack(nargs);
+	g_lingo->_theResult = g_lingo->pop();
+
+	if (nargs == 2)
+		g_lingo->pop();
 }
 
 void LB::b_preLoadCast(int nargs) {
+	// We always pretend we preloaded all cast
+	// Returning the number of the last cast successfully "loaded"
+
 	g_lingo->_theResult = g_lingo->pop();
 
 	if (nargs == 2)
-		g_lingo->_theResult = g_lingo->pop();
-
-	// We always pretend we preloaded all cast
-	// Returning the number of the last case successfully "loaded"
+		g_lingo->pop();
 }
 
 void LB::b_framesToHMS(int nargs) {




More information about the Scummvm-git-logs mailing list