The blitter's primary task is to draw sprites onto the screen. It has to handle colour remapping and transparency effects. Additional methods are provided to pre-encode the game's sprite data into a format preferred by the blitter.

The following blitters exist in SVN:


uint8 GetScreenDepth()

Get the screen depth this blitter works for. This is either: 8, 16, 24 or 32.

void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)

Draw an image to the screen, given an amount of params defined above.

void DrawColorMappingRect(void *dst, int width, int height, int pal)

Draw a colortable to the screen. This is: the color of the screen is read and is looked-up in the palette to match a new color, which then is put on the screen again.

Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)

Convert a sprite from the loader to our own format.

The SpriteLoader calls this method for each real sprite that it loads. This function needs to convert the sprite data from RGBAM format to the blitter's preferred format. For 8bpp blitters, this will usually mean dropping the RGBA data and just using the indexed M part.

const char *GetRenderer()

Get the renderer this class depends on.