[Scummvm-git-logs] scummvm master -> 8952503207f54c35640bf1f3ac4e0474bccdb719

dreammaster paulfgilbert at gmail.com
Sun Jul 7 03:53:29 CEST 2019


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:
8952503207 GLK: ALAN3: One final attempt at an openpandora fix


Commit: 8952503207f54c35640bf1f3ac4e0474bccdb719
    https://github.com/scummvm/scummvm/commit/8952503207f54c35640bf1f3ac4e0474bccdb719
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-07-06T18:52:39-07:00

Commit Message:
GLK: ALAN3: One final attempt at an openpandora fix

Changed paths:
    engines/glk/alan2/alan2.cpp


diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp
index 4168ca2..76904fb 100644
--- a/engines/glk/alan2/alan2.cpp
+++ b/engines/glk/alan2/alan2.cpp
@@ -158,14 +158,18 @@ static void syncObjects(Common::Serializer &s) {
 
 static void syncEventQueue(Common::Serializer &s) {
 	int i;
-	if (s.isSaving()) {
-		eventq[etop].time = 0;        // Mark the top
-		for (i = 0; i <= etop; ++i)
-			eventq[i].synchronize(s);
-	} else {
-		for (i = 0; eventq[i - 1].time; ++i)
-			eventq[i].synchronize(s);
+	EvtqElem *arr = eventq;
+
+	if (s.isLoading()) {
+		for (i = 0; arr[i - 1].time; ++i)
+			arr[i].synchronize(s);
 		etop = i - 1;
+	} else {
+		// Mark the top
+		arr[etop].time = 0;
+
+		for (i = 0; i <= etop; ++i)
+			arr[i].synchronize(s);
 	}
 }
 





More information about the Scummvm-git-logs mailing list