![]() |
Routines |
| Prev: BF7F | Up: Map | Next: BFB8 |
|
Used by the routine at RunFrame.
Used when the ship is erased. If it is facing left (bit 7 of C8FD or of A if entered at SelectMirroredErase_Entry) the horizontal position is moved to the other side of the sprite by its width in ScratchQuad and IY is pointed at the routine for the width in the table at EraseMirroredRowDirectly, which erases a mirrored sprite.
|
||||||||||||
| SelectMirroredErase | BF85 | LD A,($C8FD) | The ship's facing. | |||||||||
|
This entry point is used by the routine at DrawPiece.
|
||||||||||||
| SelectMirroredErase_Entry | BF88 | LD HL,($BF83) | Fetch the word at BF83 into HL. | |||||||||
| BF8B | BIT 7,A | Return if bit 7 of A is clear. | ||||||||||
| BF8D | RET Z | |||||||||||
| BF8E | LD B,$F9 | B=F9. | ||||||||||
| BF90 | LD A,($5C28) | The sprite width in bytes. | ||||||||||
| BF93 | DEC A | Step A back. | ||||||||||
| BF94 | ADD A,A | Double A. | ||||||||||
| BF95 | ADD A,A | Double A. | ||||||||||
| BF96 | ADD A,A | Double A. | ||||||||||
| BF97 | ADD A,L | A gains L. | ||||||||||
| BF98 | LD ($BF83),A | The column on the other side of the sprite. | ||||||||||
| BF9B | LD A,($5C28) | The sprite width in bytes. | ||||||||||
| BF9E | LD IY,$A7A4 | The erase mirrored row directly. | ||||||||||
| BFA2 | CP $06 | Return if A is 06. | ||||||||||
| BFA4 | RET Z | |||||||||||
| BFA5 | LD IY,$A7AC | The second mirrored-row erase. | ||||||||||
| BFA9 | CP $05 | Return if A is 05. | ||||||||||
| BFAB | RET Z | |||||||||||
| BFAC | LD IY,$A7B4 | The third mirrored-row erase. | ||||||||||
| BFB0 | CP $04 | Return if A is 04. | ||||||||||
| BFB2 | RET Z | |||||||||||
| BFB3 | LD IY,$A7BC | The fourth mirrored-row erase. | ||||||||||
| BFB7 | RET | Return. | ||||||||||
| Prev: BF7F | Up: Map | Next: BFB8 |