[Scummvm-git-logs] scummvm master -> 19e078a8861a5fb9ce0c5dfa3341cc5f5786fa0a
sev-
noreply at scummvm.org
Sat Jun 11 00:08:01 UTC 2022
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:
19e078a886 DIRECTOR: Implement VWTL loading (not used yet)
Commit: 19e078a8861a5fb9ce0c5dfa3341cc5f5786fa0a
https://github.com/scummvm/scummvm/commit/19e078a8861a5fb9ce0c5dfa3341cc5f5786fa0a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-11T02:07:34+02:00
Commit Message:
DIRECTOR: Implement VWTL loading (not used yet)
Changed paths:
engines/director/cast.cpp
engines/director/cast.h
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 640f6251eb0..d4cd7aea24b 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -390,7 +390,8 @@ void Cast::loadCast() {
// Pattern Tiles
if (_castArchive->hasResource(MKTAG('V', 'W', 'T', 'L'), -1)) {
- debug("STUB: Unhandled VWTL resource.");
+ loadVWTL(*(r = _castArchive->getFirstResource(MKTAG('V', 'W', 'T', 'L'))));
+ delete r;
}
// Time code
@@ -1359,4 +1360,34 @@ void Cast::loadSord(Common::SeekableReadStreamEndian &stream) {
debugC(1, kDebugLoading, "Cast::loadSord(): number of entries: %d", numEntries);
}
+// Pattern tiles
+//
+// Basically, a reference to Bitmap cast accompanied with rectrangle
+void Cast::loadVWTL(Common::SeekableReadStreamEndian &stream) {
+ debugC(1, kDebugLoading, "****** Loading CastMember petterns VWTL");
+
+ Common::Rect r;
+ uint16 castLibId = 0; // default for pre-D5
+ uint16 memberId;
+
+ for (int i = 0; i < NUMTILEPATTERNS; i++) {
+ stream.readUint32(); // unused
+
+ if (_version >= kFileVer500)
+ castLibId = stream.readUint16LE();
+
+ memberId = stream.readUint16LE();
+
+ r = Movie::readRect(stream);
+
+ _patterns[i].bitmapId.castLib = castLibId;
+ _patterns[i].bitmapId.member = memberId;
+ _patterns[i].rect = r;
+
+ debugC(2, kDebugLoading, "Cast::loadCastDataVWCR(): entry %d - %u:%u [%d, %d, %d, %d]", i, castLibId, memberId,
+ r.left, r.top, r.right, r.bottom);
+ }
+
+}
+
} // End of namespace Director
diff --git a/engines/director/cast.h b/engines/director/cast.h
index 5c018ece68c..71d7d3fd005 100644
--- a/engines/director/cast.h
+++ b/engines/director/cast.h
@@ -50,7 +50,7 @@ typedef Common::HashMap<byte, byte> CharMap;
typedef Common::HashMap<uint16, uint16> FontSizeMap;
struct FontXPlatformInfo {
Common::String toFont;
- bool remapChars;
+ bool remapChars;
FontSizeMap sizeMap;
FontXPlatformInfo() : remapChars(false) {}
@@ -66,6 +66,12 @@ struct FontMapEntry {
};
typedef Common::HashMap<uint16, FontMapEntry *> FontMap;
+#define NUMTILEPATTERNS 8
+struct TilePatternEntry {
+ CastMemberID bitmapId;
+ Common::Rect rect;
+};
+
class Cast {
public:
Cast(Movie *movie, uint16 castLibID, bool shared = false);
@@ -114,6 +120,7 @@ private:
void loadFontMapV4(Common::SeekableReadStreamEndian &stream);
void loadFXmp(Common::SeekableReadStreamEndian &stream);
bool readFXmpLine(Common::SeekableReadStreamEndian &stream);
+ void loadVWTL(Common::SeekableReadStreamEndian &stream);
public:
Archive *_castArchive;
@@ -150,6 +157,8 @@ private:
Common::HashMap<uint16, CastMemberInfo *> _castsInfo;
Common::HashMap<Common::String, int, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _castsNames;
Common::HashMap<uint16, int> _castsScriptIds;
+
+ TilePatternEntry _patterns[NUMTILEPATTERNS];
};
} // End of namespace Director
More information about the Scummvm-git-logs
mailing list