[Scummvm-cvs-logs] SF.net SVN: scummvm:[43051] scummvm/branches/gsoc2009-draci/engines/draci

Robert Špalek rspalek at gmail.com
Tue Aug 4 22:18:42 CEST 2009


On Tue, Aug 4, 2009 at 12:07 PM, <dkasak13 at users.sourceforge.net> wrote:

> Modified: scummvm/branches/gsoc2009-draci/engines/draci/surface.cpp
> ===================================================================
> --- scummvm/branches/gsoc2009-draci/engines/draci/surface.cpp   2009-08-04
> 18:24:39 UTC (rev 43050)
> +++ scummvm/branches/gsoc2009-draci/engines/draci/surface.cpp   2009-08-04
> 19:07:12 UTC (rev 43051)
> +uint Surface::centerOnX(uint x, uint width) {
> +
> +       int newX = x - width / 2;
> +
> +       if (newX < 0)
> +               newX = 0;
> +
> +       if (newX + width >= (uint)w - 1)
> +               newX = (w - 1) - width;


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?

>
> --
Robert Špalek <rspalek at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-git-logs/attachments/20090804/e8cc0e7d/attachment.html>


More information about the Scummvm-git-logs mailing list