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

sev- noreply at scummvm.org
Sun May 24 09:42:40 UTC 2026


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

Summary:
cb163a5ca3 DIRECTOR: Fake VWCF for VideoWorks / VideoWorks II


Commit: cb163a5ca32aff55a45a538e868e1b8fc3928620
    https://github.com/scummvm/scummvm/commit/cb163a5ca32aff55a45a538e868e1b8fc3928620
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-24T11:42:21+02:00

Commit Message:
DIRECTOR: Fake VWCF for VideoWorks / VideoWorks II

Changed paths:
    engines/director/cast.cpp
    engines/director/score.cpp
    engines/director/types.h


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 010210e1bd2..6739fd58afe 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -355,6 +355,16 @@ bool Cast::loadConfig() {
 		stream = _castArchive->getMovieResourceIfPresent(MKTAG('V', 'W', 'C', 'F'));
 	}
 	if (!stream) {
+		if (g_director->getVersion() < 100) {
+			// D1 and below did not have a config chunk, use defaults
+			debugC(1, kDebugLoading, "Cast::loadConfig(): No config chunk found, using defaults for cast libID %d (%s)", _castLibID, _castName.c_str());
+			_version = g_director->getVersion() == 20 ? kFileVer020 : kFileVer010;
+			_frameRate = 15;
+			_movieRect = Common::Rect(512, 342);
+			_bitdepth = 1;
+			return true;
+		}
+
 		warning("Cast::loadConfig(): Wrong format. VWCF resource missing");
 		return false;
 	}
@@ -484,7 +494,15 @@ bool Cast::loadConfig() {
 		debugC(1, kDebugLoading, "Cast::loadConfig(): field17: %d, field18: %d, field19: %d, movieDepth: %d, field22: %d field23: %d",
 			_field17, _field18, _field19, _movieDepth, _field22, _field23);
 	} else {
-		_movieDepth = _bitdepth; // D2 and below
+		// D2 and below
+
+		_field17 = 0;
+		_field18 = 0;
+		_field19 = 0;
+
+		_movieDepth = _bitdepth;
+		_field22 = 0;
+		_field23 = 0;
 	}
 
 	if (_version >= kFileVer400) {
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b7e368a4396..d922b220003 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1868,7 +1868,12 @@ void Score::loadFrames(Common::SeekableReadStreamEndian &stream, uint16 version,
 	_frameDataOffset = 0;
 	_maxChannelsUsed = 0;
 
-	if (version < kFileVer400) {
+	if (version < kFileVer100) {
+		_framesStreamSize = _framesStream->readUint32();
+		_numChannelsDisplayed = 24;
+
+		_firstFramePosition = _framesStream->pos();
+	} else if (version < kFileVer400) {
 		_framesStreamSize = _framesStream->readUint32();
 		_numChannelsDisplayed = 30;
 
diff --git a/engines/director/types.h b/engines/director/types.h
index 17d84185893..480ecfe2ebe 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -358,6 +358,8 @@ enum ChunkType {
 };
 
 enum FileVer {
+	kFileVer010 = 0x100,
+	kFileVer020 = 0x200,
 	kFileVer100 = 0x3ff,
 	kFileVer200 = 0x400,
 	kFileVer300 = 0x404,




More information about the Scummvm-git-logs mailing list