[Scummvm-git-logs] scummvm master -> 8e7566456a2eb671e634a1276b47f26c0b83419f

sev- sev at scummvm.org
Tue Aug 30 18:44:16 CEST 2016


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:
fe22b8bd0e DIRECTOR: Fix scanned archive names
8e7566456a DIRECTOR: Lingo: Documented when..then statements


Commit: fe22b8bd0e70839a001e0c91e9e598faa36e724b
    https://github.com/scummvm/scummvm/commit/fe22b8bd0e70839a001e0c91e9e598faa36e724b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-30T18:21:34+02:00

Commit Message:
DIRECTOR: Fix scanned archive names

Changed paths:
    engines/director/director.cpp
    engines/director/frame.cpp
    engines/director/resource.cpp
    engines/director/resource.h
    engines/director/score.cpp



diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index e72ad89..e1f4ef1 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -152,6 +152,8 @@ Common::HashMap<Common::String, Score *> DirectorEngine::loadMMMNames(Common::St
 			arc->openFile(i->getName());
 			Score *sc = new Score(this, arc);
 			nameMap[sc->getMacName()] = sc;
+
+			debugC(2, kDebugLoading, "Movie name: \"%s\"", sc->getMacName().c_str());
 		}
 	}
 
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 3d5d8b6..174581f 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -174,7 +174,7 @@ void Frame::readMainChannels(Common::SeekableSubReadStreamEndian &stream, uint16
 		default:
 			offset++;
 			stream.readByte();
-			debug("Field Position %d, Finish Position %d", offset, finishPosition);
+			debugC(kDebugLoading, "Frame::readMainChannels: Field Position %d, Finish Position %d", offset, finishPosition);
 			break;
 		}
 	}
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 787becf..7bb7328 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -51,6 +51,8 @@ bool Archive::openFile(const Common::String &fileName) {
 		return false;
 	}
 
+	_fileName = fileName;
+
 	return true;
 }
 
@@ -190,6 +192,12 @@ bool MacArchive::openFile(const Common::String &fileName) {
 		return false;
 	}
 
+	_fileName = _resFork->getBaseFileName();
+	if (_fileName.hasSuffix(".bin")) {
+		for (int i = 0; i < 4; i++)
+			_fileName.deleteLastChar();
+	}
+
 	Common::MacResTagArray tagArray = _resFork->getResTagArray();
 
 	for (uint32 i = 0; i < tagArray.size(); i++) {
diff --git a/engines/director/resource.h b/engines/director/resource.h
index 2d5a4ae..8e2ceae 100644
--- a/engines/director/resource.h
+++ b/engines/director/resource.h
@@ -43,6 +43,8 @@ public:
 	virtual bool openStream(Common::SeekableReadStream *stream, uint32 offset = 0) = 0;
 	virtual void close();
 
+	Common::String getFileName() const { return _fileName; }
+
 	bool isOpen() const { return _stream != 0; }
 
 	bool hasResource(uint32 tag, uint16 id) const;
@@ -67,6 +69,8 @@ protected:
 	typedef Common::HashMap<uint16, Resource> ResourceMap;
 	typedef Common::HashMap<uint32, ResourceMap> TypeMap;
 	TypeMap _types;
+
+	Common::String _fileName;
 };
 
 class MacArchive : public Archive {
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 6d6d022..9050651 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -108,12 +108,14 @@ Score::Score(DirectorEngine *vm, Archive *archive) {
 	_stopPlay = false;
 	_stageColor = 0;
 
-	if (_movieArchive->hasResource(MKTAG('M','C','N','M'), 0)) {
-		_macName = _movieArchive->getName(MKTAG('M','C','N','M'), 0).c_str();
+	if (archive->hasResource(MKTAG('M','C','N','M'), 0)) {
+		_macName = archive->getName(MKTAG('M','C','N','M'), 0).c_str();
+	} else {
+		_macName = archive->getFileName();
 	}
 
-	if (_movieArchive->hasResource(MKTAG('V','W','L','B'), 1024)) {
-		loadLabels(*_movieArchive->getResource(MKTAG('V','W','L','B'), 1024));
+	if (archive->hasResource(MKTAG('V','W','L','B'), 1024)) {
+		loadLabels(*archive->getResource(MKTAG('V','W','L','B'), 1024));
 	}
 }
 
@@ -344,7 +346,7 @@ void Score::loadLabels(Common::SeekableSubReadStreamEndian &stream) {
 	Common::SortedArray<Label *>::iterator j;
 
 	for (j = _labels->begin(); j != _labels->end(); ++j) {
-		debug("Frame %d, Label %s", (*j)->number, (*j)->name.c_str());
+		debugC(2, kDebugLoading, "Frame %d, Label %s", (*j)->number, (*j)->name.c_str());
 	}
 }
 


Commit: 8e7566456a2eb671e634a1276b47f26c0b83419f
    https://github.com/scummvm/scummvm/commit/8e7566456a2eb671e634a1276b47f26c0b83419f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-30T18:25:50+02:00

Commit Message:
DIRECTOR: Lingo: Documented when..then statements

Changed paths:
    engines/director/lingo/lingo.cpp
    engines/director/lingo/lingo.h



diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 17e8ea4..dbc0227 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -58,9 +58,9 @@ struct EventHandlerType {
 	{ kEventStart,				"start" },
 
 	{ kEventKeyUp,				"keyUp" },
-	{ kEventKeyDown,			"keyDown" },
-	{ kEventMouseUp,			"mouseUp" },
-	{ kEventMouseDown,			"mouseDown" },
+	{ kEventKeyDown,			"keyDown" },			// D2 as when
+	{ kEventMouseUp,			"mouseUp" },			// D2 as when
+	{ kEventMouseDown,			"mouseDown" },			// D2 as when
 	{ kEventRightMouseDown,		"rightMouseDown" },
 	{ kEventRightMouseUp,		"rightMouseUp" },
 	{ kEventMouseEnter,			"mouseEnter" },
@@ -68,6 +68,8 @@ struct EventHandlerType {
 	{ kEventMouseUpOutSide,		"mouseUpOutSide" },
 	{ kEventMouseWithin,		"mouseWithin" },
 
+	{ kEventTimeout,			"timeout" },			// D2 as when
+
 	{ kEventNone,				0 },
 };
 
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 4dd0041..0b31215 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -48,6 +48,7 @@ enum LEvent {
 	kEventIdle,
 	kEventStepFrame,
 	kEventExitFrame,
+	kEventTimeout,
 
 	kEventActivateWindow,
 	kEventDeactivateWindow,





More information about the Scummvm-git-logs mailing list