[Scummvm-cvs-logs] SF.net SVN: scummvm:[40806] scummvm/trunk/engines/sci/engine/kgraphics.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat May 23 13:56:27 CEST 2009
Revision: 40806
http://scummvm.svn.sourceforge.net/scummvm/?rev=40806&view=rev
Author: thebluegr
Date: 2009-05-23 11:56:27 +0000 (Sat, 23 May 2009)
Log Message:
-----------
Fixed the incorrect placement of the copyright message in KQ6 on screen
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-23 10:50:24 UTC (rev 40805)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-23 11:56:27 UTC (rev 40806)
@@ -3268,6 +3268,8 @@
}
}
+ // 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,7 +3280,17 @@
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;
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list