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

stevenhoefel stevenhoefel at hotmail.com
Tue Feb 7 06:08:22 CET 2017


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

Summary:
2d8e52771a DIRECTOR: More font alignment and spacing on buttons. Go to frame 0 if no labels.


Commit: 2d8e52771aaa545119990c819ee4e5ddaad85596
    https://github.com/scummvm/scummvm/commit/2d8e52771aaa545119990c819ee4e5ddaad85596
Author: stevenhoefel (stevenhoefel at hotmail.com)
Date: 2017-02-07T16:08:11+11:00

Commit Message:
DIRECTOR: More font alignment and spacing on buttons. Go to frame 0 if no labels.

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


diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 3b121e0..4260eaa 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -891,6 +891,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
 
 	uint16 boxShadow = (uint16)textCast->boxShadow;
 	uint16 borderSize = (uint16)textCast->borderSize;
+	if (textSize != NULL) borderSize = 0;
 	uint16 padding = (uint16)textCast->gutterSize;
 	uint16 textShadow = (uint16)textCast->textShadow;
 
@@ -939,7 +940,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
 	height = textSurface->h;
 	if (textSize != NULL) {
 		//TODO: this offset could be due to incorrect fonts loaded!
-		textSize->bottom = height + (mt.getLineCount() - 2);
+		textSize->bottom = height + mt.getLineCount();
 	}
 
 	uint16 textX = 0, textY = 0;
@@ -970,7 +971,8 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
 			textX--;
 	} else {
 		x++;
-		y += 3;
+		if (width % 2 != 0) x++;
+		y += 2;
 	}
 
 	switch (textCast->textAlign) {
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index deff766..2a29234 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -743,10 +743,15 @@ void Score::gotoLoop() {
 	// If no marker are to the left of the playback head, the playback head continues to the right.
 	Common::SortedArray<Label *>::iterator i;
 
-	for (i = _labels->begin(); i != _labels->end(); ++i) {
-		if ((*i)->name == _currentLabel) {
-			_currentFrame = (*i)->number;
-			return;
+	if (_labels == NULL) {
+		_currentFrame = 0;
+		return;
+	} else {
+		for (i = _labels->begin(); i != _labels->end(); ++i) {
+			if ((*i)->name == _currentLabel) {
+				_currentFrame = (*i)->number;
+				return;
+			}
 		}
 	}
 }





More information about the Scummvm-git-logs mailing list