hi Denis,<br><br><div class="gmail_quote">On Sat, Aug 8, 2009 at 9:12 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/script.cpp<br>
===================================================================<br>
--- scummvm/branches/gsoc2009-draci/engines/draci/script.cpp 2009-08-09 04:09:24 UTC (rev 43160)<br>
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.cpp 2009-08-09 04:12:36 UTC (rev 43161)<br>+int Script::funcActIco(int iconID) {<br>
+<br>
+ // The parameter seems to be an omission in the original player since it's not<br>
+ // used in the implementation of the function. It's possible that the functions were<br>
+ // implemented in such a way that they had to have a single parameter so this is only<br>
+ // passed as a dummy.</blockquote><div><br></div><div>yes, this is the case. if you want, you can reformulate the comment removing the doubt.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
+ // HACK: Some strings in the English data files are too long to fit the screen<br>
+ // This is a temporary resolution.<br>
+ if (speechFrame->getWidth() >= kScreenWidth) {<br>
+ speechFrame->setFont(_vm->_smallFont);<br>
+ } else {<br>
+ speechFrame->setFont(_vm->_bigFont);<br>
+ }<br>
+</blockquote><div><br></div><div>scaling the font is a very good solution. the real solution would be, of course, to test the source game texts one by one, and reformat the long ones, but that would require recompiling the game, and also the player would not be able to handle well the already existing English version on the www.</div>
<div><br></div><div>I think you may be a bit more careful, because you test the width exactly once, before changing the size. the outcome is thus dependent on what the font size was before the code was executed. for example, if the font was already set to small last time, and the currently drawn text is also too long, your test (using the smaller font size) may succeed that the width is small enough, you thus switch to the larger font, and then crop the text.</div>
<div><br></div><div>I know this is labeled as HACK, but I generally like the solution and so it's acceptable for me to leave it there, as long as you fix my comment above.</div><div><br></div></div>-- <br>Robert Špalek <<a href="mailto:rspalek@gmail.com">rspalek@gmail.com</a>><br>