[Scummvm-git-logs] scummvm master -> a09d15e89266fb0f9f655dab8083484fc11ac232
sev-
sev at scummvm.org
Tue Feb 7 20:55:37 CET 2017
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:
355435e9a7 DIRECTOR: Move graphics-related code to graphics.cpp
a09d15e892 DIRECTOR: Fixed Lingo's 'go to movie' Red/Blue works
Commit: 355435e9a7bbcfcc0e4dc23e45dfce3b5337a1cd
https://github.com/scummvm/scummvm/commit/355435e9a7bbcfcc0e4dc23e45dfce3b5337a1cd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-07T20:08:49+01:00
Commit Message:
DIRECTOR: Move graphics-related code to graphics.cpp
Changed paths:
engines/director/director.cpp
engines/director/director.h
engines/director/graphics.cpp
engines/director/score.cpp
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 9417538..6456da1 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -192,32 +192,4 @@ Common::HashMap<Common::String, Score *> *DirectorEngine::scanMovies(const Commo
return nameMap;
}
-void DirectorEngine::setPalette(byte *palette, uint16 count) {
- _currentPalette = palette;
- _currentPaletteLength = count;
-}
-
-void DirectorEngine::testFonts() {
- Common::String fontName("Helvetica");
-
- Common::MacResManager *fontFile = new Common::MacResManager();
- if (!fontFile->open(fontName))
- error("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;
-}
-
} // End of namespace Director
diff --git a/engines/director/director.h b/engines/director/director.h
index 9277abf..fee36da 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -60,6 +60,7 @@ enum {
kDebugText = 1 << 4
};
+extern byte defaultPalette[768];
class DirectorEngine : public ::Engine {
public:
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index f980ede..76ff417 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -19,10 +19,72 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include "common/events.h"
+#include "common/macresman.h"
+#include "common/system.h"
+#include "engines/util.h"
+
+#include "graphics/palette.h"
+#include "graphics/fonts/macfont.h"
+#include "graphics/macgui/macfontmanager.h"
+#include "graphics/macgui/macwindowmanager.h"
+
#include "director/director.h"
namespace Director {
+// Referred as extern
+byte defaultPalette[768] = {
+ 0, 0, 0, 17, 17, 17, 34, 34, 34, 68, 68, 68, 85, 85, 85, 119,
+ 119, 119, 136, 136, 136, 170, 170, 170, 187, 187, 187, 221, 221, 221, 238, 238,
+ 238, 0, 0, 17, 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119,
+ 0, 0, 136, 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, 238, 0,
+ 17, 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, 136,
+ 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, 17, 0, 0,
+ 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, 136, 0, 0, 170,
+ 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, 0, 0, 0, 51, 0, 0,
+ 102, 0, 0, 153, 0, 0, 204, 0, 0, 255, 0, 51, 0, 0, 51, 51,
+ 0, 51, 102, 0, 51, 153, 0, 51, 204, 0, 51, 255, 0, 102, 0, 0,
+ 102, 51, 0, 102, 102, 0, 102, 153, 0, 102, 204, 0, 102, 255, 0, 153,
+ 0, 0, 153, 51, 0, 153, 102, 0, 153, 153, 0, 153, 204, 0, 153, 255,
+ 0, 204, 0, 0, 204, 51, 0, 204, 102, 0, 204, 153, 0, 204, 204, 0,
+ 204, 255, 0, 255, 0, 0, 255, 51, 0, 255, 102, 0, 255, 153, 0, 255,
+ 204, 0, 255, 255, 51, 0, 0, 51, 0, 51, 51, 0, 102, 51, 0, 153,
+ 51, 0, 204, 51, 0, 255, 51, 51, 0, 51, 51, 51, 51, 51, 102, 51,
+ 51, 153, 51, 51, 204, 51, 51, 255, 51, 102, 0, 51, 102, 51, 51, 102,
+ 102, 51, 102, 153, 51, 102, 204, 51, 102, 255, 51, 153, 0, 51, 153, 51,
+ 51, 153, 102, 51, 153, 153, 51, 153, 204, 51, 153, 255, 51, 204, 0, 51,
+ 204, 51, 51, 204, 102, 51, 204, 153, 51, 204, 204, 51, 204, 255, 51, 255,
+ 0, 51, 255, 51, 51, 255, 102, 51, 255, 153, 51, 255, 204, 51, 255, 255,
+ 102, 0, 0, 102, 0, 51, 102, 0, 102, 102, 0, 153, 102, 0, 204, 102,
+ 0, 255, 102, 51, 0, 102, 51, 51, 102, 51, 102, 102, 51, 153, 102, 51,
+ 204, 102, 51, 255, 102, 102, 0, 102, 102, 51, 102, 102, 102, 102, 102, 153,
+ 102, 102, 204, 102, 102, 255, 102, 153, 0, 102, 153, 51, 102, 153, 102, 102,
+ 153, 153, 102, 153, 204, 102, 153, 255, 102, 204, 0, 102, 204, 51, 102, 204,
+ 102, 102, 204, 153, 102, 204, 204, 102, 204, 255, 102, 255, 0, 102, 255, 51,
+ 102, 255, 102, 102, 255, 153, 102, 255, 204, 102, 255, 255, 153, 0, 0, 153,
+ 0, 51, 153, 0, 102, 153, 0, 153, 153, 0, 204, 153, 0, 255, 153, 51,
+ 0, 153, 51, 51, 153, 51, 102, 153, 51, 153, 153, 51, 204, 153, 51, 255,
+ 153, 102, 0, 153, 102, 51, 153, 102, 102, 153, 102, 153, 153, 102, 204, 153,
+ 102, 255, 153, 153, 0, 153, 153, 51, 153, 153, 102, 153, 153, 153, 153, 153,
+ 204, 153, 153, 255, 153, 204, 0, 153, 204, 51, 153, 204, 102, 153, 204, 153,
+ 153, 204, 204, 153, 204, 255, 153, 255, 0, 153, 255, 51, 153, 255, 102, 153,
+ 255, 153, 153, 255, 204, 153, 255, 255, 204, 0, 0, 204, 0, 51, 204, 0,
+ 102, 204, 0, 153, 204, 0, 204, 204, 0, 255, 204, 51, 0, 204, 51, 51,
+ 204, 51, 102, 204, 51, 153, 204, 51, 204, 204, 51, 255, 204, 102, 0, 204,
+ 102, 51, 204, 102, 102, 204, 102, 153, 204, 102, 204, 204, 102, 255, 204, 153,
+ 0, 204, 153, 51, 204, 153, 102, 204, 153, 153, 204, 153, 204, 204, 153, 255,
+ 204, 204, 0, 204, 204, 51, 204, 204, 102, 204, 204, 153, 204, 204, 204, 204,
+ 204, 255, 204, 255, 0, 204, 255, 51, 204, 255, 102, 204, 255, 153, 204, 255,
+ 204, 204, 255, 255, 255, 0, 0, 255, 0, 51, 255, 0, 102, 255, 0, 153,
+ 255, 0, 204, 255, 0, 255, 255, 51, 0, 255, 51, 51, 255, 51, 102, 255,
+ 51, 153, 255, 51, 204, 255, 51, 255, 255, 102, 0, 255, 102, 51, 255, 102,
+ 102, 255, 102, 153, 255, 102, 204, 255, 102, 255, 255, 153, 0, 255, 153, 51,
+ 255, 153, 102, 255, 153, 153, 255, 153, 204, 255, 153, 255, 255, 204, 0, 255,
+ 204, 51, 255, 204, 102, 255, 204, 153, 255, 204, 204, 255, 204, 255, 255, 255,
+ 0, 255, 255, 51, 255, 255, 102, 255, 255, 153, 255, 255, 204, 255, 255, 255 };
+
+
static byte director3Patterns[][8] = { { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
{ 0xFF, 0xFF, 0x77, 0xFF, 0xFF, 0xFF, 0x77, 0xFF },
{ 0x77, 0xFF, 0xDD, 0xFF, 0x77, 0xFF, 0xDD, 0xFF },
@@ -152,4 +214,90 @@ Graphics::MacPatterns &DirectorEngine::getPatterns() {
return _director3QuickDrawPatterns;
}
+void DirectorEngine::setPalette(byte *palette, uint16 count) {
+ _currentPalette = palette;
+ _currentPaletteLength = count;
+}
+
+void DirectorEngine::testFontScaling() {
+ int x = 10;
+ int y = 10;
+ int w = 640;
+ int h = 480;
+
+ initGraphics(w, h, true);
+ _system->getPaletteManager()->setPalette(defaultPalette, 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;
+ }
+
+ g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h);
+
+ 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("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;
+}
+
+
}
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 2a29234..04371e3 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -27,7 +27,6 @@
#include "engines/util.h"
#include "graphics/font.h"
-#include "graphics/fonts/macfont.h"
#include "graphics/palette.h"
#include "graphics/macgui/macfontmanager.h"
#include "graphics/macgui/macwindowmanager.h"
@@ -42,113 +41,6 @@
namespace Director {
-static byte defaultPalette[768] = {
- 0, 0, 0, 17, 17, 17, 34, 34, 34, 68, 68, 68, 85, 85, 85, 119,
- 119, 119, 136, 136, 136, 170, 170, 170, 187, 187, 187, 221, 221, 221, 238, 238,
- 238, 0, 0, 17, 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119,
- 0, 0, 136, 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, 238, 0,
- 17, 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, 136,
- 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, 17, 0, 0,
- 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, 136, 0, 0, 170,
- 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, 0, 0, 0, 51, 0, 0,
- 102, 0, 0, 153, 0, 0, 204, 0, 0, 255, 0, 51, 0, 0, 51, 51,
- 0, 51, 102, 0, 51, 153, 0, 51, 204, 0, 51, 255, 0, 102, 0, 0,
- 102, 51, 0, 102, 102, 0, 102, 153, 0, 102, 204, 0, 102, 255, 0, 153,
- 0, 0, 153, 51, 0, 153, 102, 0, 153, 153, 0, 153, 204, 0, 153, 255,
- 0, 204, 0, 0, 204, 51, 0, 204, 102, 0, 204, 153, 0, 204, 204, 0,
- 204, 255, 0, 255, 0, 0, 255, 51, 0, 255, 102, 0, 255, 153, 0, 255,
- 204, 0, 255, 255, 51, 0, 0, 51, 0, 51, 51, 0, 102, 51, 0, 153,
- 51, 0, 204, 51, 0, 255, 51, 51, 0, 51, 51, 51, 51, 51, 102, 51,
- 51, 153, 51, 51, 204, 51, 51, 255, 51, 102, 0, 51, 102, 51, 51, 102,
- 102, 51, 102, 153, 51, 102, 204, 51, 102, 255, 51, 153, 0, 51, 153, 51,
- 51, 153, 102, 51, 153, 153, 51, 153, 204, 51, 153, 255, 51, 204, 0, 51,
- 204, 51, 51, 204, 102, 51, 204, 153, 51, 204, 204, 51, 204, 255, 51, 255,
- 0, 51, 255, 51, 51, 255, 102, 51, 255, 153, 51, 255, 204, 51, 255, 255,
- 102, 0, 0, 102, 0, 51, 102, 0, 102, 102, 0, 153, 102, 0, 204, 102,
- 0, 255, 102, 51, 0, 102, 51, 51, 102, 51, 102, 102, 51, 153, 102, 51,
- 204, 102, 51, 255, 102, 102, 0, 102, 102, 51, 102, 102, 102, 102, 102, 153,
- 102, 102, 204, 102, 102, 255, 102, 153, 0, 102, 153, 51, 102, 153, 102, 102,
- 153, 153, 102, 153, 204, 102, 153, 255, 102, 204, 0, 102, 204, 51, 102, 204,
- 102, 102, 204, 153, 102, 204, 204, 102, 204, 255, 102, 255, 0, 102, 255, 51,
- 102, 255, 102, 102, 255, 153, 102, 255, 204, 102, 255, 255, 153, 0, 0, 153,
- 0, 51, 153, 0, 102, 153, 0, 153, 153, 0, 204, 153, 0, 255, 153, 51,
- 0, 153, 51, 51, 153, 51, 102, 153, 51, 153, 153, 51, 204, 153, 51, 255,
- 153, 102, 0, 153, 102, 51, 153, 102, 102, 153, 102, 153, 153, 102, 204, 153,
- 102, 255, 153, 153, 0, 153, 153, 51, 153, 153, 102, 153, 153, 153, 153, 153,
- 204, 153, 153, 255, 153, 204, 0, 153, 204, 51, 153, 204, 102, 153, 204, 153,
- 153, 204, 204, 153, 204, 255, 153, 255, 0, 153, 255, 51, 153, 255, 102, 153,
- 255, 153, 153, 255, 204, 153, 255, 255, 204, 0, 0, 204, 0, 51, 204, 0,
- 102, 204, 0, 153, 204, 0, 204, 204, 0, 255, 204, 51, 0, 204, 51, 51,
- 204, 51, 102, 204, 51, 153, 204, 51, 204, 204, 51, 255, 204, 102, 0, 204,
- 102, 51, 204, 102, 102, 204, 102, 153, 204, 102, 204, 204, 102, 255, 204, 153,
- 0, 204, 153, 51, 204, 153, 102, 204, 153, 153, 204, 153, 204, 204, 153, 255,
- 204, 204, 0, 204, 204, 51, 204, 204, 102, 204, 204, 153, 204, 204, 204, 204,
- 204, 255, 204, 255, 0, 204, 255, 51, 204, 255, 102, 204, 255, 153, 204, 255,
- 204, 204, 255, 255, 255, 0, 0, 255, 0, 51, 255, 0, 102, 255, 0, 153,
- 255, 0, 204, 255, 0, 255, 255, 51, 0, 255, 51, 51, 255, 51, 102, 255,
- 51, 153, 255, 51, 204, 255, 51, 255, 255, 102, 0, 255, 102, 51, 255, 102,
- 102, 255, 102, 153, 255, 102, 204, 255, 102, 255, 255, 153, 0, 255, 153, 51,
- 255, 153, 102, 255, 153, 153, 255, 153, 204, 255, 153, 255, 255, 204, 0, 255,
- 204, 51, 255, 204, 102, 255, 204, 153, 255, 204, 204, 255, 204, 255, 255, 255,
- 0, 255, 255, 51, 255, 255, 102, 255, 255, 153, 255, 255, 204, 255, 255, 255 };
-
-void DirectorEngine::testFontScaling() {
- int x = 10;
- int y = 10;
- int w = 640;
- int h = 480;
-
- initGraphics(w, h, true);
- g_system->getPaletteManager()->setPalette(defaultPalette, 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;
- }
-
- g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h);
-
- 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);
- }
-}
-
Score::Score(DirectorEngine *vm, Archive *archive) {
_vm = vm;
_surface = new Graphics::ManagedSurface;
Commit: a09d15e89266fb0f9f655dab8083484fc11ac232
https://github.com/scummvm/scummvm/commit/a09d15e89266fb0f9f655dab8083484fc11ac232
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-07T20:57:32+01:00
Commit Message:
DIRECTOR: Fixed Lingo's 'go to movie' Red/Blue works
Changed paths:
engines/director/director.cpp
engines/director/director.h
engines/director/lingo/lingo-funcs.cpp
engines/director/lingo/lingo.h
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 6456da1..ab45e92 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -76,6 +76,8 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
_movies = nullptr;
+ _nextMovieFrameI = -1;
+
_wm = nullptr;
const Common::FSNode gameDataDir(ConfMan.get("path"));
@@ -146,8 +148,43 @@ Common::Error DirectorEngine::run() {
_currentScore = new Score(this, _mainArchive);
debug(0, "Score name %s", _currentScore->getMacName().c_str());
- _currentScore->loadArchive();
- _currentScore->startLoop();
+ bool loop = true;
+
+ while (loop) {
+ loop = false;
+
+ _currentScore->loadArchive();
+
+ // If we came in a loop, then skip as requested
+ if (!_nextMovieFrameS.empty())
+ _currentScore->setStartToLabel(_nextMovieFrameS);
+
+ if (_nextMovieFrameI != -1)
+ _currentScore->setCurrentFrame(_nextMovieFrameI);
+
+ _currentScore->startLoop();
+
+ // If a loop was requested, do it
+ if (!_nextMovie.empty()) {
+ _lingo->restartLingo();
+
+ delete _currentScore;
+
+ Archive *mov = openMainArchive(_nextMovie);
+
+ if (!mov) {
+ warning("nextMovie: No score is loaded");
+
+ return Common::kNoError;
+ }
+
+ _currentScore = new Score(this, mov);
+ debug(0, "Score name %s", _currentScore->getMacName().c_str());
+
+ _nextMovie.clear();
+ loop = true;
+ }
+ }
return Common::kNoError;
}
diff --git a/engines/director/director.h b/engines/director/director.h
index fee36da..882eb14 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -110,6 +110,10 @@ public:
int _machineType;
bool _playbackPaused;
+ Common::String _nextMovie;
+ Common::String _nextMovieFrameS;
+ int _nextMovieFrameI;
+
protected:
virtual Common::Error run();
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index ef19293..5ae58a9 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -181,19 +181,24 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
return;
}
- restartLingo();
+ _vm->_nextMovie = *movie.u.s;
+ _vm->_currentScore->_stopPlay = true;
- delete _vm->_currentScore;
+ _vm->_nextMovieFrameS.clear();
+ _vm->_nextMovieFrameI = -1;
- Archive *mov = _vm->openMainArchive(*movie.u.s);
+ if (frame.type == VOID)
+ return;
- _vm->_currentScore = new Score(_vm, mov);
- debug(0, "Score name %s", _vm->_currentScore->getMacName().c_str());
- _vm->_currentScore->loadArchive();
- }
+ if (frame.type == STRING) {
+ _vm->_nextMovieFrameS = *frame.u.s;
+ return;
+ }
+
+ frame.toInt();
+
+ _vm->_nextMovieFrameI = frame.u.i;
- if (!_vm->_currentScore) {
- warning("func_goto: No score is loaded");
return;
}
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 618d658..afadef7 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -174,6 +174,8 @@ public:
Lingo(DirectorEngine *vm);
~Lingo();
+ void restartLingo();
+
void addCode(const char *code, ScriptType type, uint16 id);
void executeScript(ScriptType type, uint16 id);
void printStack(const char *s);
@@ -534,8 +536,6 @@ private:
void push(Datum d);
Datum pop(void);
- void restartLingo();
-
Common::HashMap<uint32, const char *> _eventHandlerTypes;
Common::HashMap<Common::String, uint32> _eventHandlerTypeIds;
Common::HashMap<Common::String, Audio::AudioStream *> _audioAliases;
More information about the Scummvm-git-logs
mailing list