![]() |
Routines |
| Prev: 9C79 | Up: Map | Next: 9D25 |
|
Used by the routines at BLIT_SPRITE, BLIT_SPRITE_MIRRORED, DRAW_TURNED_RIGHT, DRAW_FLIP_ANTIDIAGONAL, DRAW_UPSIDE_DOWN, BLIT_SPRITE_FLIPPED, DRAW_FLIP_DIAGONAL and DRAW_TURNED_LEFT.
Returns an opcode rather than a flag, for BLIT_SPRITE to write into the middle of its own loop. The drawing mode is packed into B: the low two bits pick the combining operation here, the top three pick which of the eight drawing routines runs.
|
||||||||||
| SPRITE_COMBINE_OPCODE | 9D19 | LD A,B | Mode 0 leaves A zero -- a NOP, so the sprite byte is stored as it is. | |||||||
| 9D1A | AND $03 | |||||||||
| 9D1C | RET Z | |||||||||
| 9D1D | CP $01 | $AE is XOR (HL), which is how a sprite is drawn and then rubbed out again by drawing it a second time. | ||||||||
| 9D1F | LD A,$AE | |||||||||
| 9D21 | RET NZ | Modes 2 and 3 both take it. | ||||||||
| 9D22 | ADD A,$08 | $AE + 8 is $B6, OR (HL) -- the sprite laid over what is already there. | ||||||||
| 9D24 | RET | |||||||||
| Prev: 9C79 | Up: Map | Next: 9D25 |