aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorstevenhoefel2017-02-07 16:08:11 +1100
committerstevenhoefel2017-02-07 16:08:11 +1100
commit2d8e52771aaa545119990c819ee4e5ddaad85596 (patch)
tree826d96194ff279ef05fd74344c6d76f6c0c9356f /engines
parentf192831c86e603370cc92e9ac846605db9e5fa5f (diff)
downloadscummvm-rg350-2d8e52771aaa545119990c819ee4e5ddaad85596.tar.gz
scummvm-rg350-2d8e52771aaa545119990c819ee4e5ddaad85596.tar.bz2
scummvm-rg350-2d8e52771aaa545119990c819ee4e5ddaad85596.zip
DIRECTOR: More font alignment and spacing on buttons. Go to frame 0 if no labels.
Diffstat (limited to 'engines')
-rw-r--r--engines/director/frame.cpp6
-rw-r--r--engines/director/score.cpp13
2 files changed, 13 insertions, 6 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 3b121e0121..4260eaad8e 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 deff766f72..2a29234bbc 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;
+ }
}
}
}