[Scummvm-devel] Fwd: Re: SVN: scummvm:[39000] scummvm/trunk/engines/sci

Willem Jan Palenstijn wjp at usecode.org
Sun Mar 1 16:21:44 CET 2009

----- Forwarded message from Greg Frieger <gregfrieger at yahoo.com> -----

Subject: Re: [Bulk] Re: SVN: scummvm:[39000] scummvm/trunk/engines/sci
From: Greg Frieger <gregfrieger at yahoo.com>
To: Willem Jan Palenstijn <wjp at usecode.org>
Reply-To: Greg Frieger <gregfrieger at yahoo.com>
Date: Sun, 1 Mar 2009 17:10:47 +0200

   Hello Willem,

   It receives a wrong background color from port->bgcolor in kgraphics.cpp
   line 3098. And it happens in all games (SCI0 and SCI1), so, unless text
   background color is not specified by script, it try to map it to (204,
   204, 204) which is just an 'uninitialized' value.

   It seems that VM creates a port with 'transparent' bgcolor which have all
   values bugus exept for mask == 0, but later this mask is not checked and
   therefore it maps a transparent color to gray.

   Best regards,



   Sunday, March 1, 2009, 4:33:27 PM, you wrote:

   > On Sun, Mar 01, 2009 at 04:17:03PM +0200, Greg Frieger wrote:

   >>    Hello Willem,

   >>    You're right. gfx_xlate_pixmap() not supposed to allocate colors for

   >>    because it assumes that it was already done in gfxop_new_text()

   >>    by COL_XLATE macro. But because this macro was commented out (BTW,

   >>    all text colors remained unmapped. And I mapped'em by force.

   >>    Now, with COL_XLATE macro uncommented and slightely changed, it
   works fine

   >>    without my piece of code. I've attached the patch, so please check
   if it

   >>    is correct.

   > That looks sensible and indeed works fine in KQ5 and Longbow.

   > Strangely it changes the background colour of the text in the opening

   > window in KQ1sci from blue to black.

   > There is something else a bit fishy there, though, so it's quite

   > possible your patch is correct and it goes wrong earlier. The bgcolor

   > passed to gfxop_new_text in kq1sci is

   > bg_color= {visual = {global_index = 19850976, r = 0, g = 0, b = 0

   > }, alpha = 208, priority = -82, control = 7, mask = 0}, flags=0)

   > which looks bogus.

   > -Willem Jan

   >>    Also I fixed color matching in box drawing and line drawing (not

   >>    yet). Maybe they are also unneeded.

   >>    Best regards,

   >>     Greg

----- End forwarded message -----

More information about the Scummvm-devel mailing list