18×18 icon format

From Sinclair Wiki
Revision as of 23:40, 24 November 2011 by Cheveron (talk | contribs) (Created page with "Proposed format for the 18x18 icons used in the Buddy GUI by Andrew Owen. Each icon is stored in 56 bytes. This is not very RAM efficient but speeds up drawing by removing the n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Proposed format for the 18x18 icons used in the Buddy GUI by Andrew Owen.

Each icon is stored in 56 bytes. This is not very RAM efficient but speeds up drawing by removing the need to shift the data.

The first 54 bytes contain the bitmap in the following format:

Each of the 18 lines is stored in 3 bytes The 2nd and 3rd byte store the middle 16 pixels of the icon The 1st byte has the following meaning:

bit 0: first pixel of the line bit 1-6: always 0 bit 7: last pixel of the line

The last two bytes contain the attributes for the middle 4 cells with the following meaning:

[F E D C] [B A 9 8] [7 6 5 4] [3 2 1 0] cell 3 cell 2 cell 1 cell 0

For each nibble the following meaning applies:

d0-2: paper colour (000 = transparent) d3: BRIGHT (0 = off)