[Scummvm-git-logs] scummvm master -> 662919ddb0e0c75be0086007de29dc7dde07f92b

rvanlaar noreply at scummvm.org
Fri Oct 18 15:00:06 UTC 2024


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:
b1a1be521e DIRECTOR: show amount bytes unread in loadCastData
662919ddb0 DIRECTOR: LINGO: TESTS: add tests for `offset`


Commit: b1a1be521eaf1d3ea869ea9dc3d0564a2aaea13c
    https://github.com/scummvm/scummvm/commit/b1a1be521eaf1d3ea869ea9dc3d0564a2aaea13c
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-10-18T16:59:50+02:00

Commit Message:
DIRECTOR: show amount bytes unread in loadCastData

Show the amount of bytes that are not read when loading a castmember
in `loadCastData`.

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index cfe83c3a375..47157c423ae 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -1099,9 +1099,9 @@ void Cast::loadCastData(Common::SeekableReadStreamEndian &stream, uint16 id, Res
 		warning("BUILDBOT: Read past dataStream for id: %d type: %s", id, castType2str((CastType) castType));
 	}
 
-	if (castStream.pos() < castStream.size()) {
-		warning("BUILDBOT: Left over bytes in dataStream for id: %d type: %s", id, castType2str((CastType) castType));
-	}
+	int leftOver = castStream.size() - castStream.pos();
+	if (leftOver > 0)
+		warning("BUILDBOT: Left over bytes: %d in dataStream for id: %d type: %s", leftOver, id, castType2str((CastType) castType));
 
 	if (_loadedCast->contains(id)) { // Skip unhandled casts
 		debugCN(3, kDebugLoading, "Children: ");


Commit: 662919ddb0e0c75be0086007de29dc7dde07f92b
    https://github.com/scummvm/scummvm/commit/662919ddb0e0c75be0086007de29dc7dde07f92b
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-10-18T16:59:50+02:00

Commit Message:
DIRECTOR: LINGO: TESTS: add tests for `offset`

Tested `offset` to be case insensitive for D4 and D5 on windows.
Added a failing test to reflect that.

Lingo Dictionary D5 mentions the following:

    On the Macintosh, the string comparison is not sensitive to case
    or diacritical marks. For example, Lingo considers “a” and “A”
    the same character on the Macintosh.

Changed paths:
    engines/director/lingo/tests/strings.lingo


diff --git a/engines/director/lingo/tests/strings.lingo b/engines/director/lingo/tests/strings.lingo
index 1787d750d4f..7977188b6c7 100644
--- a/engines/director/lingo/tests/strings.lingo
+++ b/engines/director/lingo/tests/strings.lingo
@@ -183,3 +183,9 @@ set the itemDelimiter to ":"
 scummvmAssertEqual(the last item of "one:two", "two")
 set the itemDelimiter to save
 scummvmAssertEqual(the last item of "onetwo", "onetwo")
+
+-- LB::b_offset
+set pos to offset("mov", "mov")
+scummvmAssertEqual(pos, 1)
+set pos to offset("mov", "MOV")
+scummvmAssertEqual(pos, 1)




More information about the Scummvm-git-logs mailing list