• Robert Sprowson's avatar
    Add support for version 1.0 RLE compressed targa images · 47af4441
    Robert Sprowson authored
    Fix RLE decompression of 15bpp targa images
    
    In spec 1.0 RLE compressed data was allowed to span multiple scan lines, whereas spec 2.0 said the exact opposite (so that fast lookup tables into scan lines became possible). However, ChangeFSI could only handle RLE decompression where the data exactly decompressed to one line long, otherwise getting stuck in a REPEAT UNTIL loop until overrunning the end of the line buffer.
    A new PROCtarga (since it's common to all 5 possible pixel depths) loads lines, and optionally suspends decompression once one line has been fetched to allow continuation on the next line.
    
    A truncating divide when calculating 'step24' meant that 15bpp TGA's only got allocated half the memory they needed, leading to a data abort. Now, 8/15/16/24/32bpp get the right allocation.
    Docs updated.
    
    Version 1.49. Not tagged
    47af4441
ChangeFSI 295 KB