[Scummvm-devel] Bitdepth/pixel format API concerns

Travis Howell kirben at optusnet.com.au
Sat Jun 13 12:55:36 CEST 2009


Johannes Schickel wrote:
> J Northup wrote:
>> When loading graphical resources, engines call a generic color-order 
>> swapping function as necessary.
> 
> Kirben told me that those conversions would make the SCUMM code much 
> more complex, but I'm not exactly sure. Kirben, maybe you can comment on 
> this again? Anyway since the backend is forced to do conversion, this 
> isn't exactly needed, it might be used by engine authors when they 
> expire performance problems on certain backends. (See the mail from Max 
> on 9th of July 10:54 AM).

The problem is the resources used for wizImages in HE games are 
manipulated on the fly.

A resource can be created or loaded, then have the screen buffer (front 
or back) copied or another resource drawn (sometimes via memory buffer) 
into that resource, and then finally drawn to screen at later point. It 
is even possible for modified resources, to be based off other modified 
resources.

So modified resources still need to be kept in their native format, and 
   additional conversions would be required (ie when copying from the 
screen buffers), meaning more complex code.

See the current code for captureWizImage, drawWizImage and 
drawWizPolygonTransform in engines/scumm/he/wiz_he.cpp of the 
gsoc2009-16bit branch for more specifics.




More information about the Scummvm-devel mailing list