![]() |
Routines |
| Prev: A21C | Up: Map | Next: A234 |
|
Used by the routines at new_sprite_header and old_sprite_header.
A graphic is a width in bytes and a height in rows, then the rows, bottom row first, each the width in bytes, left to right; there is no mask. This also returns in C the index into the row-routine tables erase_row_routines and draw_row_routines: the width less one when the sprite is drawn shifted (x AND 6 not zero), the width plus four when it is byte-aligned -- so 0-4 are the shifted routines for widths 1-5 and 5-10 the aligned ones for widths 1-6.
|
||||||||||||||||||||
| read_graphic_header | A223 | LD A,(DE) | ||||||||||||||||||
| A224 | LD H,A | |||||||||||||||||||
| A225 | LD C,A | |||||||||||||||||||
| A226 | DEC C | |||||||||||||||||||
| A227 | INC DE | |||||||||||||||||||
| A228 | LD A,(DE) | |||||||||||||||||||
| A229 | LD B,A | |||||||||||||||||||
| A22A | INC DE | |||||||||||||||||||
| A22B | LD A,L | Shifted: index width-1 | ||||||||||||||||||
| A22C | AND $06 | |||||||||||||||||||
| A22E | RET NZ | |||||||||||||||||||
| A22F | LD A,$05 | Byte-aligned: index width+4 | ||||||||||||||||||
| A231 | ADD A,C | |||||||||||||||||||
| A232 | LD C,A | |||||||||||||||||||
| A233 | RET | |||||||||||||||||||
| Prev: A21C | Up: Map | Next: A234 |