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

djsrv dservilla at gmail.com
Wed Jul 15 03:10:23 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:
d6270b7f09 DIRECTOR: LINGO: Add event map comment


Commit: d6270b7f0900c64ff9d09b179786c1907fa86ef3
    https://github.com/scummvm/scummvm/commit/d6270b7f0900c64ff9d09b179786c1907fa86ef3
Author: djsrv (dservilla at gmail.com)
Date: 2020-07-14T23:09:05-04:00

Commit Message:
DIRECTOR: LINGO: Add event map comment

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


diff --git a/engines/director/lingo/lingo-bytecode.cpp b/engines/director/lingo/lingo-bytecode.cpp
index a79a74f0d3..3c5dc8cb70 100644
--- a/engines/director/lingo/lingo-bytecode.cpp
+++ b/engines/director/lingo/lingo-bytecode.cpp
@@ -871,10 +871,18 @@ ScriptContext *Lingo::compileLingoV4(Common::SeekableSubReadStreamEndian &stream
 	int16 factoryNameId = stream.readSint16();
 
 	// offset 50 - contents map
-	// TODO: I believe the handler vectors map handlers to some sort of identifier
-	/* uint16 handlerVectorsCount = */ stream.readUint16();
-	/* uint32 handlerVectorsOffset = */ stream.readUint32();
-	/* uint32 handlerVectorFlags = */ stream.readUint32();
+
+	/* uint16 eventMapCount = */ stream.readUint16();
+	/* uint32 eventMapOffset = */ stream.readUint32();
+	/* uint32 eventMapFlags = */ stream.readUint32();
+	// The event map is an int16 array used to quickly access events.
+	// Its first item is the index of the mouseDown handler or -1,
+	// its second item is the index of the mouseUp handler or -1, etc.
+	// eventMapFlags & (1 << 0) indicates there is a mouseDown handler,
+	// eventMapFlags & (1 << 1) indicates there is a mouseUp handler, etc.
+	// We probably don't need to read this since we already did something
+	// similar with _eventHandlers.
+
 	uint16 propertiesCount = stream.readUint16();
 	uint32 propertiesOffset = stream.readUint32();
 	uint16 globalsCount = stream.readUint16();




More information about the Scummvm-git-logs mailing list