aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-23 11:56:27 +0000
committerFilippos Karapetis2009-05-23 11:56:27 +0000
commitf77dfe9d23374733c2553765bcdc7037ed2b649d (patch)
treedfa57fbc18f33b08a011be083bdddb249a3b2576 /engines/sci/engine
parentb4126beea2a22a3ca57f756cd9b026cb5e555102 (diff)
downloadscummvm-rg350-f77dfe9d23374733c2553765bcdc7037ed2b649d.tar.gz
scummvm-rg350-f77dfe9d23374733c2553765bcdc7037ed2b649d.tar.bz2
scummvm-rg350-f77dfe9d23374733c2553765bcdc7037ed2b649d.zip
Fixed the incorrect placement of the copyright message in KQ6 on screen
svn-id: r40806
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kgraphics.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index a05dea88cd..865ed2dcc4 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -3268,6 +3268,8 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
}
}
+ // This code places texts incorrectly on screen
+#if 0
// If the text does not fit on the screen, move it to the left and upwards until it does
if (halign == ALIGN_LEFT)
GFX_ASSERT(gfxop_get_text_params(s->gfx_state, font_nr, text, area.width, &area.width, &area.height, 0, NULL, NULL, NULL));
@@ -3278,6 +3280,16 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (area.y + area.height > 200)
area.y += 200 - area.y - area.height; // Plus negative number = subtraction
+#else
+ // Replaced with this instead
+ // If the text does not fit on the screen, clip it till it does
+ if (area.x + area.width > s->gfx_state->pic_port_bounds.width)
+ area.width = CLIP<int>(area.width, 0, s->gfx_state->pic_port_bounds.width);
+
+ if (area.y + area.height > s->gfx_state->pic_port_bounds.height)
+ area.height = CLIP<int>(area.height, 0, s->gfx_state->pic_port_bounds.height);
+#endif
+
if (gray)
color1 = &bg_color;