ytmytm / geos

Source code of GEOS 2.0 for the Commodore 64 and 128
3 stars 0 forks source link

accelerated bitmaps (unpack RLE with Beamracer) #10

Open ytmytm opened 3 years ago

ytmytm commented 3 years ago

This requires rewrite of BitmapUp and BitmapClip. BSW's version generates stream of bytes, consumed one by one. Bytes outside clipping region are ignored.

Unpacking with Beamracer means that consumer (drawing routine) is in one of three states:

In every state we need to keep track of repeated values:

For this we need to compare and subtract number of bytes until left margin, until right margin, until bitmap end of line. BSW version has only counters that decrease always by one.