title: "vbmTestTilePixel" description: TRSE built-in method (from IDE help)
vbmTestTilePixel
Systems: VIC20
Parameters: a,b,b
[byte] = vbmTestTilePixel( [address-tile], [byte-X], [byte-Y] );
- [address-tile] - Character tile address to test
- [byte-X] - X position 0 - 7
- [byte-Y] - Y position 0 - 7
Description
Tests a single pixel within a tile character. Returns 0 if no pixel, otherwise returns a non-zero value indicated in the position of the pixel.
Example
tiles: incbin("tiles.bin", $4000);
i, j :byte;
ok:cstring="1";
no:cstring="0";
p1 : pointer;
...
p1 := $4008; // address of second character tile
// draw the tile as 0 and 1 characters
for j := 0 to 8 do
begin
for i := 0 to 8 do
begin
if ( vbmTestTilePixel( p1, i, j ) ) then
vbmDrawText( ok, font, i, j*8, 8 )
else
vbmDrawText( no, font, i, j*8, 8 );
end;
end;