+==========================================================================================+ |Keen 4-6 'terminator text' format: | +==========================================================================================+ This is the text that displays after the 'Ready, press any key' screen at Keen startup. It is composed of a monochrome bitmap that is scrolled across the screen and distorted for special effects. It is roughly RLE compressed 'PICT' format, where the raw data, since it is only two types, is composed of numbers (x white pixels, y black, z white...' even though the colors of some of the text is not black and white but black and not-black.) ------------------------------------------------------------------------------- FILE STRUCTURE: HEADER POINTERS ... .. . RLE LINE ... .. . ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ------------------------------------------------ HEADER: 0 2 Img height Height of the image in pixels 2 2 Img width Width of the image in pixels 4 2x Line point Pointers to line 1,2,3..etc of data. There will be [Img height] of these, each 2 bytes long. The first pointer will have the value (2 * [Img height] + 4) +2 ? RLE data RLE-WM compressed data ------------------------------------------------ ------------------------------------------------ DATA: (Always compressed) 0 2 Black run Number of black pixels to write 2 2 Not-blk rn Number of not-black pixels to write 4 2 Black run.... ... .. . ? 2 End $FF $FF; means 'end of row. ------------------------------------------------ ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- COMPRESSION: RLE-M is the compression used for monochrome bitmaps and some bit-level compression. Since there is only two types of data it consists entirely of count words. Normally this works on the bit level, but Keen uses it on the (Rather odd.) word level. The data is broken into words (Two-bytes) that indicate a nuber of pixels, starting with BLACK (So all terminator text's leftmost column must be black.) then not-black, then black... All values, even zero are valid except $FF $FF which indicates the row end. Rows CAN be stopped before or after the image width is reached, but this is NOT supposed to happen and causes some... odd effects. -------------------------------------------------------------------------------