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

sev- sev at scummvm.org
Tue Feb 14 19:01:40 CET 2017


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

Summary:
98b4d12d4c DIRECTOR: Lingo: Implement b_delay()
748878bf6b DIRECTOR: Hid noisy debug output
dcdce7b055 DIRECTOR: Lingo: Fixed 'go to' functions


Commit: 98b4d12d4c754068e3fc6cfbf603f77ceaf93d44
    https://github.com/scummvm/scummvm/commit/98b4d12d4c754068e3fc6cfbf603f77ceaf93d44
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-14T18:49:20+01:00

Commit Message:
DIRECTOR: Lingo: Implement b_delay()

Changed paths:
    engines/director/lingo/lingo-builtins.cpp
    engines/director/score.h


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index be0a191..8ae595c 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -20,6 +20,7 @@
  *
  */
 
+#include "common/system.h"
 #include "director/lingo/lingo.h"
 
 namespace Director {
@@ -871,7 +872,8 @@ void Lingo::b_nothing(int nargs) {
 void Lingo::b_delay(int nargs) {
 	Datum d = g_lingo->pop();
 	d.toInt();
-	warning("STUB: b_delay(%d)", d.u.i);
+
+	g_director->getCurrentScore()->_nextFrameTime = g_system->getMillis() + (float)d.u.i / 60 * 1000;
 }
 
 void Lingo::b_do(int nargs) {
diff --git a/engines/director/score.h b/engines/director/score.h
index dca1b8f..61d9118 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -110,6 +110,7 @@ public:
 	Common::Rect _movieRect;
 
 	bool _stopPlay;
+	uint32 _nextFrameTime;
 
 private:
 	uint16 _versionMinor;
@@ -123,7 +124,6 @@ private:
 	uint16 _castArrayStart;
 	uint16 _currentFrame;
 	Common::String _currentLabel;
-	uint32 _nextFrameTime;
 	uint32 _flags;
 	uint16 _castArrayEnd;
 	uint16 _movieScriptCount;


Commit: 748878bf6b52a289902c78a5a3206d6db1aba270
    https://github.com/scummvm/scummvm/commit/748878bf6b52a289902c78a5a3206d6db1aba270
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-14T18:57:53+01:00

Commit Message:
DIRECTOR: Hid noisy debug output

Changed paths:
    engines/director/frame.cpp
    engines/director/images.cpp


diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index fa9063d..3c73b82 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -727,7 +727,7 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
 	BitmapCast *bc = NULL;
 
 	if (_vm->getSharedBMP() != NULL && _vm->getSharedBMP()->contains(imgId)) {
-		debugC(2, kDebugImages, "Shared cast BMP: id: %d", imgId);
+		debugC(4, kDebugImages, "Shared cast BMP: id: %d", imgId);
 		pic = _vm->getSharedBMP()->getVal(imgId);
 		pic->seek(0); // TODO: this actually gets re-read every loop... we need to rewind it!
 		bc = static_cast<BitmapCast *>(_vm->getSharedCasts()->getVal(spriteId));
@@ -740,14 +740,14 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
 		if (_vm->getVersion() < 4) {
 			int w = bc->initialRect.width(), h = bc->initialRect.height();
 
-			debugC(2, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
+			debugC(4, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
 				imgId, w, h, bc->flags, bc->someFlaggyThing, bc->unk1, bc->unk2);
 			img = new BITDDecoder(w, h);
 		} else if (_vm->getVersion() < 6) {
 			bc = static_cast<BitmapCast *>(_vm->getCurrentScore()->_casts[spriteId]);
 			int w = bc->initialRect.width(), h = bc->initialRect.height();
 
-			debugC(2, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
+			debugC(4, kDebugImages, "id: %d, w: %d, h: %d, flags: %x, some: %x, unk1: %d, unk2: %d",
 				imgId, w, h, bc->flags, bc->someFlaggyThing, bc->unk1, bc->unk2);
 			img = new BITDDecoderV4(w, h, bc->bitsPerPixel);
 		} else {
diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 53e91ac..4574165 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -147,7 +147,7 @@ bool BITDDecoder::loadStream(Common::SeekableReadStream &stream) {
 	// If the stream has exactly the required number of bits for this image,
 	// we assume it is uncompressed.
 	if (stream.size() * 8 == _surface->pitch * _surface->h) {
-		debugC(3, kDebugImages, "Skipping compression");
+		debugC(6, kDebugImages, "Skipping compression");
 		for (y = 0; y < _surface->h; y++) {
 			for (x = 0; x < _surface->pitch; ) {
 				byte color = stream.readByte();
@@ -265,7 +265,7 @@ bool BITDDecoderV4::loadStream(Common::SeekableReadStream &stream) {
 	// If the stream has exactly the required number of bits for this image,
 	// we assume it is uncompressed.
 	if (stream.size() * 8 == _surface->pitch * _surface->h) {
-		debugC(3, kDebugImages, "Skipping compression");
+		debugC(6, kDebugImages, "Skipping compression");
 		for (y = 0; y < _surface->h; y++) {
 			for (x = 0; x < _surface->pitch; ) {
 				byte color = stream.readByte();


Commit: dcdce7b055742b6bc53a208a4d1292482f87bb30
    https://github.com/scummvm/scummvm/commit/dcdce7b055742b6bc53a208a4d1292482f87bb30
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-14T19:03:44+01:00

Commit Message:
DIRECTOR: Lingo: Fixed 'go to' functions

Changed paths:
    engines/director/director.cpp
    engines/director/director.h
    engines/director/lingo/lingo-funcs.cpp
    engines/director/score.cpp


diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 4806b57..f26d873 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -89,6 +89,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
 	_keyCode = 0;
 	_machineType = 9; // Macintosh IIci
 	_playbackPaused = false;
+	g_director->_skipFrameAdvance = false;
 }
 
 DirectorEngine::~DirectorEngine() {
diff --git a/engines/director/director.h b/engines/director/director.h
index 001393b..eeb9c6b 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -108,6 +108,7 @@ public:
 	int _keyCode;
 	int _machineType;
 	bool _playbackPaused;
+	bool _skipFrameAdvance;
 
 	Common::String _nextMovie;
 	Common::String _nextMovieFrameS;
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index 7056d9a..5ddfd0d 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -223,6 +223,8 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
 	if (frame.type == VOID)
 		return;
 
+	_vm->_skipFrameAdvance = true;
+
 	if (frame.type == STRING) {
 		if (_vm->getCurrentScore())
 			_vm->getCurrentScore()->setStartToLabel(*frame.u.s);
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 31f97f7..ca016d0 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -884,9 +884,11 @@ void Score::update() {
 		}
 	}
 
-	if (!g_director->_playbackPaused)
+	if (!g_director->_playbackPaused && !g_director->_skipFrameAdvance)
 		_currentFrame++;
 
+	g_director->_skipFrameAdvance = false;
+
 	if (_currentFrame >= _frames.size())
 		return;
 





More information about the Scummvm-git-logs mailing list