[Scummvm-git-logs] scummvm master -> 2d7afe5793c963572cda7bf2502de0a83f837ae2

sev- sev at scummvm.org
Mon Jun 22 07:36:28 UTC 2020


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

Summary:
f07c456888 DIRECTOR: Init digital video cast for D3
db702f318a DIRECTOR: Do not leak screenshots
275ffb3575 GUI: Fix mess with useRTL flaf in ThemeLayout
2d7afe5793 DIRECTOR: Proper flag initialization


Commit: f07c456888d5d1ebd0c2d6f28b0ac4a86faabbf6
    https://github.com/scummvm/scummvm/commit/f07c456888d5d1ebd0c2d6f28b0ac4a86faabbf6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-22T09:36:17+02:00

Commit Message:
DIRECTOR: Init digital video cast for D3

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index c69feacb11..635cf2b3ff 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -154,6 +154,17 @@ DigitalVideoCast::DigitalVideoCast(Common::ReadStreamEndian &stream, uint16 vers
 		for (int i = 0; i < 0xd; i++) {
 			stream.readByte();
 		}
+		_frameRate = 12;
+		_frameRateType = kFrameRateDefault;
+
+		_preload = false;
+		_enableVideo = false;
+		_pauseAtStart = false;
+		_showControls = false;
+		_looping = false;
+		_enableSound = false;
+		_enableCrop = false;
+		_center = false;
 	} else {
 		for (int i = 0; i < 4; i++) {
 			stream.readUint16();


Commit: db702f318a4c416e221d44fa948c01051624c7a9
    https://github.com/scummvm/scummvm/commit/db702f318a4c416e221d44fa948c01051624c7a9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-22T09:36:17+02:00

Commit Message:
DIRECTOR: Do not leak screenshots

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b504d2db8e..506c080bb7 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -656,7 +656,7 @@ void Score::renderFrame(uint16 frameId, bool forceUpdate, bool updateStageOnly)
 void Score::screenShot() {
 	Graphics::Surface rawSurface = _surface->rawSurface();
 	const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 0, 8, 16, 24);
-	Graphics::Surface newSurface = *(rawSurface.convertTo(requiredFormat_4byte, _vm->getPalette()));
+	Graphics::Surface *newSurface = rawSurface.convertTo(requiredFormat_4byte, _vm->getPalette());
 	Common::String currentPath = _vm->getCurrentPath().c_str();
 	Common::replace(currentPath, "/", "-"); // exclude '/' from screenshot filename prefix
 	Common::String prefix = Common::String::format("%s%s", currentPath.c_str(), _macName.c_str());
@@ -665,11 +665,13 @@ void Score::screenShot() {
 	Common::DumpFile screenshotFile;
 	if (screenshotFile.open(filename)) {
 #ifdef USE_PNG
-		Image::writePNG(screenshotFile, newSurface);
+		Image::writePNG(screenshotFile, *newSurface);
 #else
 		warning("Screenshot requested, but PNG support is not compiled in");
 #endif
 	}
+
+	newSurface->free();
 }
 
 void Score::unrenderSprite(int spriteId) {


Commit: 275ffb35753e561dcf33fb204d8330ca54d71caf
    https://github.com/scummvm/scummvm/commit/275ffb35753e561dcf33fb204d8330ca54d71caf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-22T09:36:17+02:00

Commit Message:
GUI: Fix mess with useRTL flaf in ThemeLayout

Changed paths:
    gui/ThemeLayout.h


diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index 25ec9eb997..e9f7802f61 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -63,7 +63,7 @@ public:
 	ThemeLayout(ThemeLayout *p) :
 		_parent(p), _x(0), _y(0), _w(-1), _h(-1),
 		_defaultW(-1), _defaultH(-1),
-		_textHAlign(Graphics::kTextAlignInvalid) {}
+		_textHAlign(Graphics::kTextAlignInvalid), _useRTL(true) {}
 
 	virtual ~ThemeLayout() {
 		for (uint i = 0; i < _children.size(); ++i)
@@ -220,7 +220,7 @@ protected:
 
 class ThemeLayoutWidget : public ThemeLayout {
 public:
-	ThemeLayoutWidget(ThemeLayout *p, const Common::String &name, int16 w, int16 h, Graphics::TextAlign align, bool &useRTL) : ThemeLayout(p), _name(name) {
+	ThemeLayoutWidget(ThemeLayout *p, const Common::String &name, int16 w, int16 h, Graphics::TextAlign align, bool useRTL) : ThemeLayout(p), _name(name) {
 		_w = _defaultW = w;
 		_h = _defaultH = h;
 		_useRTL = useRTL;
@@ -266,7 +266,7 @@ public:
 	}
 
 	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h, bool &useRTL) override {
-		if (ThemeLayoutWidget::getWidgetData(name, x, y, w, h, _useRTL)) {
+		if (ThemeLayoutWidget::getWidgetData(name, x, y, w, h, useRTL)) {
 			h -= _tabHeight;
 			return true;
 		}


Commit: 2d7afe5793c963572cda7bf2502de0a83f837ae2
    https://github.com/scummvm/scummvm/commit/2d7afe5793c963572cda7bf2502de0a83f837ae2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-22T09:36:17+02:00

Commit Message:
DIRECTOR: Proper flag initialization

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 635cf2b3ff..441a78d7a2 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -178,14 +178,14 @@ DigitalVideoCast::DigitalVideoCast(Common::ReadStreamEndian &stream, uint16 vers
 			_frameRateType = (FrameRateType)((flags1 & 0x30) >> 4);
 		}
 		_preload = flags1 & 0x04;
-		_enableVideo = ~(flags1 & 0x02);
+		_enableVideo = !(flags1 & 0x02);
 		_pauseAtStart = flags1 & 0x01;
 
 		byte flags2 = stream.readByte();
 		_showControls = flags2 & 0x40;
 		_looping = flags2 & 0x10;
 		_enableSound = flags2 & 0x08;
-		_enableCrop = ~(flags2 & 0x02);
+		_enableCrop = !(flags2 & 0x02);
 		_center = flags2 & 0x01;
 	}
 }




More information about the Scummvm-git-logs mailing list