<div class="gmail_quote">On Tue, Aug 4, 2009 at 12:07 PM, <span dir="ltr"><<a href="mailto:dkasak13@users.sourceforge.net">dkasak13@users.sourceforge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Modified: scummvm/branches/gsoc2009-draci/engines/draci/surface.cpp<br>
===================================================================<br>
--- scummvm/branches/gsoc2009-draci/engines/draci/surface.cpp 2009-08-04 18:24:39 UTC (rev 43050)<br>
+++ scummvm/branches/gsoc2009-draci/engines/draci/surface.cpp 2009-08-04 19:07:12 UTC (rev 43051)<br>+uint Surface::centerOnX(uint x, uint width) {<br>
+<br>
+ int newX = x - width / 2;<br>
+<br>
+ if (newX < 0)<br>
+ newX = 0;<br>
+<br>
+ if (newX + width >= (uint)w - 1)<br>
+ newX = (w - 1) - width;</blockquote><div><br></div><div>I would swap these two steps to ensure that if the text is too wide, then at least you see the left part right. doesn't your routine only check overflow and leave cropping on the left side unhandled? </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br></blockquote></div>-- <br>Robert Špalek <<a href="mailto:rspalek@gmail.com">rspalek@gmail.com</a>><br>