18×18 icon format: Difference between revisions

From Sinclair Wiki
Jump to navigation Jump to search
(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...")
 
No edit summary
Line 6: Line 6:


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


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


Line 16: Line 20:


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


Line 21: Line 26:


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

Revision as of 23:43, 24 November 2011

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)