![]() |
Routines |
| Prev: 32760 | Up: Map | Next: 32770 |
|
Used by the BASIC program. Draws picture number *DrawPicture_Number from the picture list that starts at Graphics_Crosshair. The picture goes to the screen, or to a buffer when BASIC has POKEd the high bytes used by the instructions at DrawPicture_PixelsHighByte (pixels) and DrawPicture_AttributesHighByte (attributes).
Each picture record is laid out as follows:
Both lots of data are run-length encoded. A non-zero byte is written as it is. A zero byte is followed by a count and a value, and the value is written that many times (a count of zero writes it 256 times).
When bit 0 of the flags is clear, the pixel data is in column order: each column is written from the top of the picture to the bottom, one byte for each pixel line, and then the next column to the right follows. When bit 0 is set, the pixel data is in row order: each pixel line is written from left to right, from the top of the picture to the bottom. The attribute data is always in the same order as the attribute file.
The routine works out its own address as it runs, so the same code works on both sides of the game.
|
||||||||||||||||||||||
| DrawPicture | 32768 | JR DrawPicture_Unpack | Jump over the parameters to DrawPicture_Unpack. | |||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||||
| Prev: 32760 | Up: Map | Next: 32770 |