Chapter
10
I
BASIC Keywords
In high resolution graphics,
1
bit of the tile mask equals
1
point
on the screen. Therefore, each position in the tile mask with the
bit value one
(1)
is
drawn. You can paint a pattern of
Xs
with
this tile mask:
byte 87654321
0 10000001
1
01000010
2
00100100
3
00011000
4 00011000
5
00100100
6 01000010
7 10000001
CHR$(&H8
1)
CHR$(&H42)
CHR$(&H24)
CHR$(&H18)
CHR$(&H18)
CHR$( &H24)
CHR$(&H42)
CHR$(&H81)
In 4-color graphics, 2 bits correspond
to
each point on the screen.
That
is,
each byte of the tile mask describes only 4 points. These
2 bits describe the color for the point being drawn. The following
chart shows the values for the given colors. Remember, Color 0 is
the set background color. (See COLOR.)
Palette Palette binary
0
1
value
green cyan 01
red magenta 10
brown white
11
The following tile mask sets up a
star
pattern in green and
brown using Palette 0
or
in cyan and white using Palette 1.
BYTE
0 01 00 00 01 CHR$(&H41)
1
00 01 01 00 CHR$(&H14)
2
11
11
11 11
CHR$(&HFF)
3
00 01 01 00 CHR$(&H14)
4 01 00 00 01 CHR$(&H41)
In 16-color graphics (Modes
3
and
5),
4 bits correspond
to
each
point on the screen. That is, each byte of the tile mask describes
only 2 points.
252