Draws a 2-bit (4-color) sprite to the LCD.
Technical Details #
This routine draws an arbitrary-sized sprite to the LCD. In Doors CSE 8.0, it is implemented to allow any 16-bit position and any 8-bit width and height for sprites. It will sanely handle sprites that are partially off-screen by not drawing them at all. In future Doors CSE versions, it will perform proper clipping to display the onscreen portions of partially off-screen sprites.
de = top-left x
hl = top-left y
ix = pointer to sprite data with the following format:
.db widthpx, heightpx .db bitpacked_padded_rows...
The routine accepts any 16-bit x-coordinate and any 16-bit y-coordinate. Widths must be at most 255 pixels; heights must be at most 240 pixels. Note: After Doors CSE 8.0, this routine will properly handle transparency at the edges of sprites with widths not divisible by 8, and clipping of partially off-screen sprites.
Sprite drawn to the LCD.