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

Willem Jan Palenstijn wjp at usecode.org
Sun Mar 1 14:18:50 CET 2009


On Sun, Mar 01, 2009 at 04:07:04AM +0000, gregfrieger at users.sourceforge.net wrote:
> Revision: 39000
>           http://scummvm.svn.sourceforge.net/scummvm/?rev=39000&view=rev
> Author:   gregfrieger
> Date:     2009-03-01 04:07:04 +0000 (Sun, 01 Mar 2009)
> 
> Log Message:
> -----------
> Fixed windows and text drawing problem in SCI1
> 
[...]
> @@ -1920,6 +1941,13 @@
>  		gfx_pixmap_t *pxm = handle->text_pixmaps[i];
>  
>  		if (!pxm->data) {
> +			// Matching pixmap's colors to current system palette if needed
> +			for (int i = 0; i < pxm->colors_nr; i++) {
> +				if (pxm->colors[i].global_index == -1)
> +					pxm->colors[i].global_index = _gfxop_matchColor(state, pxm->colors[i].r, pxm->colors[i].g,
> +					pxm->colors[i].b);
> +			}
> +
>  			gfx_xlate_pixmap(pxm, state->driver->mode, state->options->text_xlate_filter);
>  			gfxr_endianness_adjust(pxm, state->driver->mode); // FIXME: resmgr layer!
>  		}

Hi Greg,

I could very well be mistaken, but shouldn't the gfx_xlate_pixmap() call be
taking care of mapping colours to the global palette? In this particular
case it doesn't seem to do that because pxm->flags indicates it has
already been done (GFX_PIXMAP_FLAG_PALETTE_ALLOCATED), though.

If that flag is wrong in certain situations, I think we should try to
fix that.


-Willem Jan




More information about the Scummvm-devel mailing list