![]() |
Routines |
| Prev: EF4E | Up: Map | Next: EF6C |
|
Used by the routine at DRAW_SPRITE.
A holds how many of the sprite's bytes lie left of the region's first. The columns drawn are the rest of the sprite, or, if it also runs past the region's right edge, the region's width and its spare column (bit 6 then: no spill beyond). The last byte left of the region is still read, and one more column drawn for it, because its shifted spill is the first visible column's left part; bit 5, set as the drawing starts, keeps it from being written itself.
|
||||||||
| DRAW_SPRITE_CLIP_LEFT | EF53 | PUSH DE | The sprite runs past the right edge too: the region's width and its spare column | |||||
| EF54 | LD E,A | |||||||
| EF55 | ADD A,(IY+DRAW_WIDTH-V) | |||||||
| EF58 | SUB (IY+FOUND_RECORD-V) | |||||||
| EF5B | JR NC,DRAW_SPRITE_CLIP_LEFT_0 | |||||||
| EF5D | LD A,(DRAW_WIDTH) | |||||||
| EF60 | SET 6,C | |||||||
| EF62 | INC A | |||||||
| EF63 | JR DRAW_SPRITE_CLIP_LEFT_1 | |||||||
| DRAW_SPRITE_CLIP_LEFT_0 | EF65 | LD A,(FOUND_RECORD) | Or the rest of the sprite | |||||
| EF68 | SUB E | |||||||
| DRAW_SPRITE_CLIP_LEFT_1 | EF69 | POP DE | On to skip the bytes cut off | |||||
| EF6A | JR DRAW_SPRITE_ROWS_0 | |||||||
| Prev: EF4E | Up: Map | Next: EF6C |