18×18 icon format: Difference between revisions

From Sinclair Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 30: Line 30:


d3:  BRIGHT (0 = off)
d3:  BRIGHT (0 = off)
Note: The background of the outermost pixels is always transparent. When an icon is selected the attributes of the cells are inverted and the outermost pixels are changed to white from black.

Revision as of 23:48, 24 November 2011

Buddy.png

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)

Note: The background of the outermost pixels is always transparent. When an icon is selected the attributes of the cells are inverted and the outermost pixels are changed to white from black.