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

sev- sev at scummvm.org
Mon Jul 6 10:08:32 UTC 2020


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

Summary:
5ed12e2fe8 DIRECTOR: Initialize Director class members
3b6d290a12 DIRECTOR: LINGO: Copy all fields in the copy constructor
7264109786 DIRECTOR: Set Movie stageColor.
548345161c DIRECTOR: Plug memory leak
dea1b4a2ab DIRECTOR: Plug memory leak
d90e2f06ec DIRECTOR: Init Stxt for D4 variant


Commit: 5ed12e2fe8182ee0033475b4ef3d455e79dd75ad
    https://github.com/scummvm/scummvm/commit/5ed12e2fe8182ee0033475b4ef3d455e79dd75ad
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-06T11:56:37+02:00

Commit Message:
DIRECTOR: Initialize Director class members

Changed paths:
    engines/director/director.cpp


diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index f4f1b36c6c..fe8ccb1dfe 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -81,9 +81,11 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
 	_soundManager = nullptr;
 	_currentPalette = nullptr;
 	_currentPaletteLength = 0;
+	_currentStage = nullptr;
 	_lingo = nullptr;
 
 	_wm = nullptr;
+	_surface = nullptr;
 
 	const Common::FSNode gameDataDir(ConfMan.get("path"));
 


Commit: 3b6d290a129da7cf32d57c1edfb6968d3661397e
    https://github.com/scummvm/scummvm/commit/3b6d290a129da7cf32d57c1edfb6968d3661397e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-06T11:58:53+02:00

Commit Message:
DIRECTOR: LINGO: Copy all fields in the copy constructor

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


diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 3b1da06c76..a6d09edf05 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -199,6 +199,9 @@ public:
 		}
 		_constants = sc._constants;
 		_propNames = sc._propNames;
+
+		_archive = sc._archive;
+		_id = sc._id;
 	}
 
 	Datum getParentScript();


Commit: 7264109786253c055d4b9ec4bb9e930ed8eb2a8d
    https://github.com/scummvm/scummvm/commit/7264109786253c055d4b9ec4bb9e930ed8eb2a8d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-06T12:01:48+02:00

Commit Message:
DIRECTOR: Set Movie stageColor.

However, I do not see it set anywhere else. It could be a bigger problem

Changed paths:
    engines/director/movie.cpp


diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index b72d75bd8b..fe9520ca49 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -39,6 +39,7 @@ Movie::Movie(Stage *stage) {
 	_lingo = _vm->getLingo();
 
 	_flags = 0;
+	_stageColor = 0xFF;
 
 	_currentMouseDownSpriteId = 0;
 	_currentClickOnSpriteId = 0;


Commit: 548345161c77e1473644dd56dd2d9b59be737991
    https://github.com/scummvm/scummvm/commit/548345161c77e1473644dd56dd2d9b59be737991
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-06T12:04:41+02:00

Commit Message:
DIRECTOR: Plug memory leak

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index f60fb5ea0b..d244fbb9ae 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -186,11 +186,11 @@ Common::Point Channel::getPosition() {
 }
 
 MacShape *Channel::getShape() {
-	MacShape *shape = new MacShape();
-
 	if (_sprite->_castType != kCastShape)
 		return nullptr;
 
+	MacShape *shape = new MacShape();
+
 	shape->ink = _sprite->_ink;
 	shape->spriteType = _sprite->_spriteType;
 	shape->foreColor = _sprite->_foreColor;


Commit: dea1b4a2abe0a9932d7058b63564d7105fe55aed
    https://github.com/scummvm/scummvm/commit/dea1b4a2abe0a9932d7058b63564d7105fe55aed
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-06T12:06:21+02:00

Commit Message:
DIRECTOR: Plug memory leak

Changed paths:
    engines/director/stage.cpp


diff --git a/engines/director/stage.cpp b/engines/director/stage.cpp
index 85fa92380a..ffd88bcf25 100644
--- a/engines/director/stage.cpp
+++ b/engines/director/stage.cpp
@@ -145,8 +145,10 @@ void Stage::inkBlitFrom(Channel *channel, Common::Rect destRect, Graphics::Manag
 	// Shapes do not have surfaces of their own, so draw the shape directly upon
 	// stage surface.
 	if (ms) {
-		if (ms->foreColor == ms->backColor)
+		if (ms->foreColor == ms->backColor) {
+			delete ms;
 			return;
+		}
 
 		Common::Rect fillRect((int)srcRect.width(), (int)srcRect.height());
 		fillRect.moveTo(srcRect.left, srcRect.top);


Commit: d90e2f06ec9518c77240503a912425a101bf83ca
    https://github.com/scummvm/scummvm/commit/d90e2f06ec9518c77240503a912425a101bf83ca
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-07-06T12:08:03+02:00

Commit Message:
DIRECTOR: Init Stxt for D4 variant

Changed paths:
    engines/director/stxt.cpp


diff --git a/engines/director/stxt.cpp b/engines/director/stxt.cpp
index eb97dd159e..9da9c3f413 100644
--- a/engines/director/stxt.cpp
+++ b/engines/director/stxt.cpp
@@ -30,12 +30,22 @@ namespace Director {
 Stxt::Stxt(Common::SeekableSubReadStreamEndian &textStream) {
 	// TODO: Side effects on textStream make this a little hard to understand in context?
 
+	_fontId = 0;
+	_fontSize = 12;
+	_textType = kTextTypeFixed;
+	_textAlign = kTextAlignLeft;
+	_textShadow = kSizeNone;
+	_textSlant = 0;
+	_palinfo1 = _palinfo2 = _palinfo3 = 0;
+	_unk1f = _unk2f = 0;
+	_unk3f = 0;
+
 	// D4+ variant
 	if (textStream.size() == 0)
 		return;
 
 	uint32 offset = textStream.readUint32();
-	if (offset != 12){
+	if (offset != 12) {
 		error("Stxt init: unhandlef offset");
 		return;
 	}
@@ -43,16 +53,6 @@ Stxt::Stxt(Common::SeekableSubReadStreamEndian &textStream) {
 	uint32 dataLen = textStream.readUint32();
 	Common::String text;
 
-	_fontId = 0;
-	_fontSize = 12;
-	_textType = kTextTypeFixed;
-	_textAlign = kTextAlignLeft;
-	_textShadow = kSizeNone;
-	_textSlant = 0;
-	_palinfo1 = _palinfo2 = _palinfo3 = 0;
-	_unk1f = _unk2f = 0;
-	_unk3f = 0;
-
 	for (uint32 i = 0; i < strLen; i++) {
 		byte ch = textStream.readByte();
 		if (ch == 0x0d) {




More information about the Scummvm-git-logs mailing list