[Scummvm-git-logs] scummvm master -> 42d3d48f46473b8dd148a1e080711b1bad770b83
sev-
sev at scummvm.org
Wed Jun 3 22:08:05 UTC 2020
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
38a5b8e9ef DIRECTOR: Moved all director test-related code to tests.cpp
787f3e4e61 DIRECTOR: Added test score for the test target
fbbe8b1bd7 DIRECTOR: LINGO: Do not freak out when requested to puppet VOID sound
a0d78ebf9a DIRECTOR: Added sanity check to getCurrentLabelNumber()
42d3d48f46 DIRECTOR: Skip b_updateStage() for the test target
Commit: 38a5b8e9ef68dc1a5d6cbef32bc888e215180fdd
https://github.com/scummvm/scummvm/commit/38a5b8e9ef68dc1a5d6cbef32bc888e215180fdd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-04T00:07:34+02:00
Commit Message:
DIRECTOR: Moved all director test-related code to tests.cpp
Changed paths:
A engines/director/tests.cpp
engines/director/director.cpp
engines/director/director.h
engines/director/graphics.cpp
engines/director/module.mk
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 55cf583f93..003366f8cf 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -306,78 +306,4 @@ Common::Error DirectorEngine::run() {
return Common::kNoError;
}
-Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Common::String &folder) {
- Common::FSNode directory(folder);
- Common::FSList movies;
- const char *sharedMMMname;
-
- if (getPlatform() == Common::kPlatformWindows)
- sharedMMMname = "SHARDCST.MMM";
- else
- sharedMMMname = "Shared Cast";
-
-
- Common::HashMap<Common::String, Score *> *nameMap = new Common::HashMap<Common::String, Score *>();
- if (!directory.getChildren(movies, Common::FSNode::kListFilesOnly))
- return nameMap;
-
- if (!movies.empty()) {
- for (Common::FSList::const_iterator i = movies.begin(); i != movies.end(); ++i) {
- debugC(2, kDebugLoading, "File: %s", i->getName().c_str());
-
- if (Common::matchString(i->getName().c_str(), sharedMMMname, true)) {
- _sharedCastFile = i->getName();
-
- debugC(2, kDebugLoading, "Shared cast detected: %s", i->getName().c_str());
- continue;
- }
-
- Archive *arc = createArchive();
-
- warning("name: %s", i->getName().c_str());
- arc->openFile(i->getName());
- Score *sc = new Score(this);
- sc->setArchive(arc);
- nameMap->setVal(sc->getMacName(), sc);
-
- debugC(2, kDebugLoading, "Movie name: \"%s\"", sc->getMacName().c_str());
- }
- }
-
- return nameMap;
-}
-
-void DirectorEngine::enqueueAllMovies() {
- Common::FSNode dir(ConfMan.get("path"));
- Common::FSList files;
- if (!dir.getChildren(files, Common::FSNode::kListFilesOnly)) {
- warning("DirectorEngine::enqueueAllMovies(): Failed inquiring file list");
- return;
- }
-
- for (Common::FSList::const_iterator file = files.begin(); file != files.end(); ++file)
- _movieQueue.push_back((*file).getName());
-
- Common::sort(_movieQueue.begin(), _movieQueue.end());
-
- debug(1, "=========> Enqueued %d movies", _movieQueue.size());
-}
-
-MovieReference DirectorEngine::getNextMovieFromQueue() {
- MovieReference res;
-
- if (_movieQueue.empty())
- return res;
-
- res.movie = _movieQueue.front();
-
- debug(0, "=======================================");
- debug(0, "=========> Next movie is %s", res.movie.c_str());
- debug(0, "=======================================");
-
- _movieQueue.remove_at(0);
-
- return res;
-}
-
} // End of namespace Director
diff --git a/engines/director/director.h b/engines/director/director.h
index e726cf4af7..eb288b62b2 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -194,6 +194,8 @@ private:
Common::StringArray _movieQueue;
+
+ // tests.cpp
private:
void testFontScaling();
void testFonts();
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 93804d3645..5f0a193d7e 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -19,12 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "common/macresman.h"
#include "common/system.h"
-#include "engines/util.h"
-
-#include "graphics/fonts/macfont.h"
-#include "graphics/macgui/macfontmanager.h"
#include "graphics/macgui/macwindowmanager.h"
#include "director/director.h"
@@ -782,97 +777,6 @@ void DirectorEngine::setPalette(byte *palette, uint16 count) {
_wm->passPalette(palette, count);
}
-void DirectorEngine::testFontScaling() {
- int x = 10;
- int y = 10;
- int w = 640;
- int h = 480;
-
- initGraphics(w, h);
- _system->getPaletteManager()->setPalette(macPalette, 0, 256);
-
- Graphics::ManagedSurface surface;
-
- surface.create(w, h);
- surface.clear(255);
-
- Graphics::MacFont origFont(Graphics::kMacFontNewYork, 18);
-
- const Graphics::MacFONTFont *font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(origFont);
-
- Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 200, 500);
-
- Graphics::MacFont bigFont(Graphics::kMacFontNewYork, 15);
-
- font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(bigFont);
-
- Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 50 + 200, 500);
-
- const char *text = "d";
-
- for (int i = 9; i <= 20; i++) {
- Graphics::MacFont macFont(Graphics::kMacFontNewYork, i);
-
- const Graphics::Font *font = _wm->_fontMan->getFont(macFont);
-
- int width = font->getStringWidth(text);
-
- Common::Rect bbox = font->getBoundingBox(text, x, y, w);
- surface.frameRect(bbox, 15);
-
- font->drawString(&surface, text, x, y, width, 0);
-
- x += width + 1;
- }
-
- for (int i = 0; i < 16; i++) {
- for (int j = 0; j < 16; j++) {
- int y1 = 80 + i * 7;
- int x1 = 80 + j * 7;
-
- for (x = x1; x < x1 + 6; x++)
- for (y = y1; y < y1 + 6; y++)
- *((byte *)surface.getBasePtr(x, y)) = transformColor(i * 16 + j);
- }
- }
-
- g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h); // testing fonts
-
- Common::Event event;
-
- while (true) {
- if (g_system->getEventManager()->pollEvent(event))
- if (event.type == Common::EVENT_QUIT)
- break;
-
- g_system->updateScreen();
- g_system->delayMillis(10);
- }
-}
-
-void DirectorEngine::testFonts() {
- Common::String fontName("Helvetica");
-
- Common::MacResManager *fontFile = new Common::MacResManager();
- if (!fontFile->open(fontName))
- error("testFonts(): Could not open %s as a resource fork", fontName.c_str());
-
- Common::MacResIDArray fonds = fontFile->getResIDArray(MKTAG('F','O','N','D'));
- if (fonds.size() > 0) {
- for (Common::Array<uint16>::iterator iterator = fonds.begin(); iterator != fonds.end(); ++iterator) {
- Common::SeekableReadStream *stream = fontFile->getResource(MKTAG('F', 'O', 'N', 'D'), *iterator);
- Common::String name = fontFile->getResName(MKTAG('F', 'O', 'N', 'D'), *iterator);
-
- debug("Font: %s", name.c_str());
-
- Graphics::MacFontFamily font;
- font.load(*stream);
- }
- }
-
- delete fontFile;
-}
-
void DirectorEngine::setCursor(int type) {
switch (type) {
case kCursorDefault:
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 2d76699c5f..73f3091e20 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -17,6 +17,7 @@ MODULE_OBJS = \
sound.o \
sprite.o \
stxt.o \
+ tests.o \
transitions.o \
util.o \
lingo/lingo-gr.o \
diff --git a/engines/director/tests.cpp b/engines/director/tests.cpp
new file mode 100644
index 0000000000..88f0e2f5c5
--- /dev/null
+++ b/engines/director/tests.cpp
@@ -0,0 +1,211 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/config-manager.h"
+#include "common/system.h"
+
+#include "common/macresman.h"
+
+#include "graphics/fonts/macfont.h"
+#include "graphics/macgui/macfontmanager.h"
+#include "graphics/macgui/macwindowmanager.h"
+
+#include "engines/util.h"
+
+#include "director/director.h"
+#include "director/archive.h"
+#include "director/score.h"
+
+namespace Director {
+
+//////////////////////
+// Graphics tests
+//////////////////////
+void DirectorEngine::testFontScaling() {
+ int x = 10;
+ int y = 10;
+ int w = 640;
+ int h = 480;
+
+ initGraphics(w, h);
+ setPalette(-1);
+
+ Graphics::ManagedSurface surface;
+
+ surface.create(w, h);
+ surface.clear(255);
+
+ Graphics::MacFont origFont(Graphics::kMacFontNewYork, 18);
+
+ const Graphics::MacFONTFont *font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(origFont);
+
+ Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 200, 500);
+
+ Graphics::MacFont bigFont(Graphics::kMacFontNewYork, 15);
+
+ font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(bigFont);
+
+ Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 50 + 200, 500);
+
+ const char *text = "d";
+
+ for (int i = 9; i <= 20; i++) {
+ Graphics::MacFont macFont(Graphics::kMacFontNewYork, i);
+
+ const Graphics::Font *font = _wm->_fontMan->getFont(macFont);
+
+ int width = font->getStringWidth(text);
+
+ Common::Rect bbox = font->getBoundingBox(text, x, y, w);
+ surface.frameRect(bbox, 15);
+
+ font->drawString(&surface, text, x, y, width, 0);
+
+ x += width + 1;
+ }
+
+ for (int i = 0; i < 16; i++) {
+ for (int j = 0; j < 16; j++) {
+ int y1 = 80 + i * 7;
+ int x1 = 80 + j * 7;
+
+ for (x = x1; x < x1 + 6; x++)
+ for (y = y1; y < y1 + 6; y++)
+ *((byte *)surface.getBasePtr(x, y)) = transformColor(i * 16 + j);
+ }
+ }
+
+ g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h); // testing fonts
+
+ Common::Event event;
+
+ while (true) {
+ if (g_system->getEventManager()->pollEvent(event))
+ if (event.type == Common::EVENT_QUIT)
+ break;
+
+ g_system->updateScreen();
+ g_system->delayMillis(10);
+ }
+}
+
+void DirectorEngine::testFonts() {
+ Common::String fontName("Helvetica");
+
+ Common::MacResManager *fontFile = new Common::MacResManager();
+ if (!fontFile->open(fontName))
+ error("testFonts(): Could not open %s as a resource fork", fontName.c_str());
+
+ Common::MacResIDArray fonds = fontFile->getResIDArray(MKTAG('F','O','N','D'));
+ if (fonds.size() > 0) {
+ for (Common::Array<uint16>::iterator iterator = fonds.begin(); iterator != fonds.end(); ++iterator) {
+ Common::SeekableReadStream *stream = fontFile->getResource(MKTAG('F', 'O', 'N', 'D'), *iterator);
+ Common::String name = fontFile->getResName(MKTAG('F', 'O', 'N', 'D'), *iterator);
+
+ debug("Font: %s", name.c_str());
+
+ Graphics::MacFontFamily font;
+ font.load(*stream);
+ }
+ }
+
+ delete fontFile;
+}
+
+//////////////////////
+// Movie iteration
+//////////////////////
+Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Common::String &folder) {
+ Common::FSNode directory(folder);
+ Common::FSList movies;
+ const char *sharedMMMname;
+
+ if (getPlatform() == Common::kPlatformWindows)
+ sharedMMMname = "SHARDCST.MMM";
+ else
+ sharedMMMname = "Shared Cast";
+
+
+ Common::HashMap<Common::String, Score *> *nameMap = new Common::HashMap<Common::String, Score *>();
+ if (!directory.getChildren(movies, Common::FSNode::kListFilesOnly))
+ return nameMap;
+
+ if (!movies.empty()) {
+ for (Common::FSList::const_iterator i = movies.begin(); i != movies.end(); ++i) {
+ debugC(2, kDebugLoading, "File: %s", i->getName().c_str());
+
+ if (Common::matchString(i->getName().c_str(), sharedMMMname, true)) {
+ _sharedCastFile = i->getName();
+
+ debugC(2, kDebugLoading, "Shared cast detected: %s", i->getName().c_str());
+ continue;
+ }
+
+ Archive *arc = createArchive();
+
+ warning("name: %s", i->getName().c_str());
+ arc->openFile(i->getName());
+ Score *sc = new Score(this);
+ sc->setArchive(arc);
+ nameMap->setVal(sc->getMacName(), sc);
+
+ debugC(2, kDebugLoading, "Movie name: \"%s\"", sc->getMacName().c_str());
+ }
+ }
+
+ return nameMap;
+}
+
+void DirectorEngine::enqueueAllMovies() {
+ Common::FSNode dir(ConfMan.get("path"));
+ Common::FSList files;
+ if (!dir.getChildren(files, Common::FSNode::kListFilesOnly)) {
+ warning("DirectorEngine::enqueueAllMovies(): Failed inquiring file list");
+ return;
+ }
+
+ for (Common::FSList::const_iterator file = files.begin(); file != files.end(); ++file)
+ _movieQueue.push_back((*file).getName());
+
+ Common::sort(_movieQueue.begin(), _movieQueue.end());
+
+ debug(1, "=========> Enqueued %d movies", _movieQueue.size());
+}
+
+MovieReference DirectorEngine::getNextMovieFromQueue() {
+ MovieReference res;
+
+ if (_movieQueue.empty())
+ return res;
+
+ res.movie = _movieQueue.front();
+
+ debug(0, "=======================================");
+ debug(0, "=========> Next movie is %s", res.movie.c_str());
+ debug(0, "=======================================");
+
+ _movieQueue.remove_at(0);
+
+ return res;
+}
+
+} // End of namespace Director
Commit: 787f3e4e61e11c7d9a39fd964e853ed8b05bc04e
https://github.com/scummvm/scummvm/commit/787f3e4e61e11c7d9a39fd964e853ed8b05bc04e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-04T00:07:34+02:00
Commit Message:
DIRECTOR: Added test score for the test target
Changed paths:
common/macresman.h
engines/director/archive.cpp
engines/director/archive.h
engines/director/director.cpp
engines/director/director.h
engines/director/tests.cpp
diff --git a/common/macresman.h b/common/macresman.h
index ce3e7a8013..48850ee92d 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -166,6 +166,8 @@ public:
*/
String getBaseFileName() const { return _baseFileName; }
+ void setBaseFileName(Common::String str) { _baseFileName = str; }
+
/**
* Return list of resource IDs with specified type ID
*/
diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 9a34a1b59a..08c94765ea 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -222,6 +222,34 @@ bool MacArchive::openFile(const Common::String &fileName) {
_fileName.deleteLastChar();
}
+ readTags();
+
+ return true;
+}
+
+bool MacArchive::openStream(Common::SeekableReadStream *stream, uint32 startOffset) {
+ close();
+
+ if (startOffset)
+ error("MacArchive::openStream(): startOffset > 0 is not yet implemented");
+
+ _resFork = new Common::MacResManager();
+ stream->seek(startOffset);
+
+ if (!_resFork->loadFromMacBinary(*stream)) {
+ close();
+ return false;
+ }
+
+ _fileName = "<stream>";
+ _resFork->setBaseFileName(_fileName);
+
+ readTags();
+
+ return true;
+}
+
+void MacArchive::readTags() {
Common::MacResTagArray tagArray = _resFork->getResTagArray();
for (uint32 i = 0; i < tagArray.size(); i++) {
@@ -236,13 +264,6 @@ bool MacArchive::openFile(const Common::String &fileName) {
debug(3, "Found MacArchive resource '%s' %d: %s", tag2str(tagArray[i]), idArray[j], res.name.c_str());
}
}
-
- return true;
-}
-
-bool MacArchive::openStream(Common::SeekableReadStream *stream, uint32 startOffset) {
- // TODO: Add support for this (v4 Windows games)
- return false;
}
Common::SeekableSubReadStreamEndian *MacArchive::getResource(uint32 tag, uint16 id) {
diff --git a/engines/director/archive.h b/engines/director/archive.h
index 2f851b57e4..3ec8f63472 100644
--- a/engines/director/archive.h
+++ b/engines/director/archive.h
@@ -92,6 +92,8 @@ public:
private:
Common::MacResManager *_resFork;
+
+ void readTags();
};
class RIFFArchive : public Archive {
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 003366f8cf..22ef9c1c71 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -142,16 +142,7 @@ Common::Error DirectorEngine::run() {
_soundManager = new DirectorSound(this);
if (getGameGID() == GID_TEST) {
- _mainArchive = nullptr;
- _currentScore = nullptr;
-
- if (debugChannelSet(-1, kDebugText)) {
- testFontScaling();
- testFonts();
- }
-
- _lingo->runTests();
-
+ runTests();
return Common::kNoError;
} else if (getGameGID() == GID_TESTALL) {
enqueueAllMovies();
diff --git a/engines/director/director.h b/engines/director/director.h
index eb288b62b2..bd3b6fa06e 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -202,6 +202,8 @@ private:
void enqueueAllMovies();
MovieReference getNextMovieFromQueue();
+
+ void runTests();
};
extern DirectorEngine *g_director;
diff --git a/engines/director/tests.cpp b/engines/director/tests.cpp
index 88f0e2f5c5..6bfd92c9a0 100644
--- a/engines/director/tests.cpp
+++ b/engines/director/tests.cpp
@@ -22,7 +22,9 @@
#include "common/config-manager.h"
#include "common/system.h"
+#include "common/zlib.h"
+#include "common/memstream.h"
#include "common/macresman.h"
#include "graphics/fonts/macfont.h"
@@ -34,6 +36,7 @@
#include "director/director.h"
#include "director/archive.h"
#include "director/score.h"
+#include "director/lingo/lingo.h"
namespace Director {
@@ -208,4 +211,89 @@ MovieReference DirectorEngine::getNextMovieFromQueue() {
return res;
}
+const byte testMovie[] = {
+ 0x1F, 0x8B, 0x08, 0x08, 0x2C, 0x1B, 0xD8, 0x5E, 0x02, 0x03, 0x74, 0x65,
+ 0x73, 0x74, 0x31, 0x00, 0xB5, 0x54, 0xCD, 0x6B, 0x13, 0x51, 0x10, 0x9F,
+ 0xFD, 0x48, 0xB3, 0x6D, 0xA3, 0xA6, 0x36, 0x16, 0x0B, 0x2A, 0x1B, 0x28,
+ 0x52, 0x4A, 0xB5, 0x7E, 0xA1, 0xB6, 0x14, 0x69, 0x0D, 0x0D, 0x29, 0x92,
+ 0x5A, 0x92, 0xB4, 0xD6, 0x0A, 0xD2, 0x42, 0xB7, 0x9F, 0x69, 0x36, 0xA4,
+ 0x69, 0x2D, 0xF4, 0xD0, 0xA5, 0x27, 0xF1, 0x54, 0xF0, 0xA0, 0x88, 0x37,
+ 0xC1, 0x83, 0x28, 0xD8, 0x9C, 0x3C, 0x49, 0x05, 0x0F, 0xFD, 0x23, 0x14,
+ 0x4F, 0x42, 0xF1, 0xA0, 0x5E, 0x04, 0x0F, 0x92, 0xF8, 0x7B, 0x1F, 0xBB,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, 0x14, 0x47, 0xF4, 0x18, 0x5F, 0x4C,
+ 0x6C, 0xFD, 0x93, 0xD0, 0x2B, 0xD0, 0x5E, 0x57, 0xC3, 0x8B, 0x65, 0xF3,
+ 0x8C, 0xB9, 0x58, 0x8E, 0x0D, 0xAD, 0xCE, 0x59, 0x05, 0xCB, 0xCC, 0x4E,
+ 0x17, 0x66, 0x56, 0xF3, 0x56, 0x61, 0xC9, 0x06, 0xDD, 0x3E, 0x56, 0x58,
+ 0x58, 0xEF, 0x4B, 0xDB, 0x6B, 0x0B, 0xD6, 0x8A, 0x39, 0x6B, 0x97, 0xCC,
+ 0xC4, 0xFC, 0x74, 0xB1, 0x6C, 0x95, 0x56, 0xFA, 0xB0, 0xAD, 0x7A, 0x07,
+ 0xE2, 0x1A, 0xE3, 0x7D, 0x57, 0x87, 0xBD, 0x80, 0x54, 0x76, 0x21, 0xFA,
+ 0x4E, 0x0A, 0x3B, 0x0E, 0x2E, 0x86, 0x42, 0x77, 0x91, 0xF3, 0x26, 0x9A,
+ 0x00, 0xD7, 0x4F, 0x51, 0x8B, 0x54, 0x07, 0x79, 0x61, 0xBB, 0x78, 0x40,
+ 0xCF, 0xEA, 0x7D, 0x82, 0xD7, 0x25, 0xD3, 0xB6, 0x94, 0x95, 0xCF, 0xDB,
+ 0xE6, 0x3D, 0xBB, 0x94, 0x9F, 0x89, 0xCB, 0x5E, 0x1E, 0xC5, 0x17, 0xCD,
+ 0xEB, 0x38, 0x6E, 0xD5, 0xD1, 0x6F, 0xD2, 0x74, 0x2D, 0xFA, 0x42, 0x06,
+ 0x00, 0x00
+};
+
+void DirectorEngine::runTests() {
+ Common::MemoryReadStream *movie = new Common::MemoryReadStream(testMovie, ARRAYSIZE(testMovie));
+ Common::SeekableReadStream *stream = Common::wrapCompressedReadStream(movie);
+
+ _mainArchive = new RIFXArchive();
+ _mainArchive->openStream(stream, 0);
+ _currentScore = new Score(this);
+ _currentScore->setArchive(_mainArchive);
+ _currentScore->loadArchive();
+
+ if (debugChannelSet(-1, kDebugText)) {
+ testFontScaling();
+ testFonts();
+ }
+
+ _lingo->runTests();
+}
+
} // End of namespace Director
Commit: fbbe8b1bd7b8ef08a9238da2d08cc853f1e25926
https://github.com/scummvm/scummvm/commit/fbbe8b1bd7b8ef08a9238da2d08cc853f1e25926
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-04T00:07:34+02:00
Commit Message:
DIRECTOR: LINGO: Do not freak out when requested to puppet VOID sound
Changed paths:
engines/director/lingo/lingo-codegen.cpp
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 24ccde1622..7ea255c577 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -450,6 +450,9 @@ int Lingo::castIdFetch(Datum &var) {
warning("castIdFetch: reference to non-existent cast ID: %d", castId);
else
id = castId;
+ } else if (var.type == VOID) {
+ warning("castIdFetch: reference to VOID cast ID");
+ return 0;
} else {
error("castIdFetch: was expecting STRING or INT, got %s", var.type2str());
}
Commit: a0d78ebf9ae4922205ebe5c1e5831d5399eb73e0
https://github.com/scummvm/scummvm/commit/a0d78ebf9ae4922205ebe5c1e5831d5399eb73e0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-04T00:07:34+02:00
Commit Message:
DIRECTOR: Added sanity check to getCurrentLabelNumber()
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index dc8edfbe33..2c604379b1 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1308,6 +1308,9 @@ void Score::gotoLoop() {
int Score::getCurrentLabelNumber() {
Common::SortedArray<Label *>::iterator i;
+ if (!_labels)
+ return 0;
+
int frame = 0;
for (i = _labels->begin(); i != _labels->end(); ++i) {
Commit: 42d3d48f46473b8dd148a1e080711b1bad770b83
https://github.com/scummvm/scummvm/commit/42d3d48f46473b8dd148a1e080711b1bad770b83
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-04T00:07:34+02:00
Commit Message:
DIRECTOR: Skip b_updateStage() for the test target
Changed paths:
engines/director/lingo/lingo-builtins.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 99c6ee71f3..9b66b088c4 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -1827,6 +1827,12 @@ void LB::b_zoomBox(int nargs) {
void LB::b_updateStage(int nargs) {
ARGNUMCHECK(0);
+ if (g_director->getGameGID() == GID_TEST) {
+ warning("b_updateStage: Skipping due to tests");
+
+ return;
+ }
+
Score *score = g_director->getCurrentScore();
if (!score) {
More information about the Scummvm-git-logs
mailing list