[Scummvm-devel] OSystem::clearScreen documentation / implementation

Johannes Schickel lordhoto at gmail.com
Sat Feb 14 19:52:54 CET 2009


Hi,

I had a look at our OSystem::clearScreen documentation. It says:

    /**
     * Clear the screen to black.
     */

In reality it seems every backend assumes palette index 0 is black. Thus 
they are all, including the BaseBackend::clearScreen implementation, 
fill their screenbuffer with 0 and update the screen. PalmOS seems to 
make a difference here, it seems to always fill its screen with an RGB 
value of 0, thus black.

This makes me wonder whether we should update our documentation to the 
reality, means something like "Fill the screen framebuffer with 0 and 
refresh screen afterwards" OR maybe we should update all implementations 
to search for a black color in the currently setup palette and use that one.

On the other hand it could be of course fine to assume palette index 0 
is always black... :-). But then it should still be said in the 
documentation IMHO.

// Johannes




More information about the Scummvm-devel mailing list