[Scummvm-git-logs] scummvm-tools master -> 783f50acb3b188cf59eb85616ad10a4b3a74e2d5

sdelamarre noreply at scummvm.org
Thu Mar 16 23:32:39 UTC 2023


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

Summary:
783f50acb3 GOB: add comments for operation 14,15 of degob readExpr


Commit: 783f50acb3b188cf59eb85616ad10a4b3a74e2d5
    https://github.com/scummvm/scummvm-tools/commit/783f50acb3b188cf59eb85616ad10a4b3a74e2d5
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-03-17T00:31:29+01:00

Commit Message:
GOB: add comments for operation 14,15 of degob readExpr

Changed paths:
    engines/gob/degob_script.cpp


diff --git a/engines/gob/degob_script.cpp b/engines/gob/degob_script.cpp
index 1ef8dd3e..f93f5312 100644
--- a/engines/gob/degob_script.cpp
+++ b/engines/gob/degob_script.cpp
@@ -371,20 +371,22 @@ std::string Script::readExpr(char stopToken) {
 
 		while ((operation == 14) || (operation == 15)) {
 			if (operation == 14) {
+				// Add a direct offset
 				expr += printStr("#%d#", readUint16() * 4);
 
 				skip(2);
 				if (peekUint8() == 97)
 					skip(1);
 			} else if (operation == 15) {
+				// Add an offset from an array
 				expr += printStr("#%d->", readUint16() * 4);
 
 				skip(2);
-				uint8 var_A = readUint8();
+				dimCount = readUint8();
 
-				skip(var_A);
+				skip(dimCount);
 
-				for (int i = 0; i < var_A; i++)
+				for (int i = 0; i < dimCount; i++)
 					expr += readExpr(12) + "->";
 
 				expr += "#";




More information about the Scummvm-git-logs mailing list