![]() |
Routines |
| Prev: B336 | Up: Map | Next: B37A |
|
Used by the routine at draw_shot.
The inverse of draw_beam, from the alternate registers, which hold last pass's width, pattern and screen address (the shot routines EXX them away before moving the shot): each pattern byte inverted and ANDed onto the screen, for the lines in the fifth byte of old_sprite_x. Leaves the alternate set as it was.
|
||||||||||||
| erase_laser | B356 | EXX | the alternate set; nothing to rub out if the width is 0 | |||||||||
| B357 | LD A,B | |||||||||||
| B358 | AND A | |||||||||||
| B359 | JR Z,erase_laser_2 | |||||||||||
| B35B | LD C,B | |||||||||||
| B35C | LD A,(old_sprite_rows) | |||||||||||
| erase_laser_0 | B35F | EX AF,AF' | one line: clear the pattern's bits | |||||||||
| B360 | LD B,C | |||||||||||
| B361 | PUSH DE | |||||||||||
| B362 | PUSH HL | |||||||||||
| erase_laser_1 | B363 | LD A,(DE) | ||||||||||
| B364 | CPL | |||||||||||
| B365 | AND (HL) | |||||||||||
| B366 | LD (HL),A | |||||||||||
| B367 | INC L | |||||||||||
| B368 | INC DE | |||||||||||
| B369 | DJNZ erase_laser_1 | |||||||||||
| B36B | POP HL | the line above; the pattern's next row | ||||||||||
| B36C | CALL line_up_hl | |||||||||||
| B36F | POP DE | |||||||||||
| B370 | LD A,$08 | |||||||||||
| B372 | ADD A,E | |||||||||||
| B373 | LD E,A | |||||||||||
| B374 | EX AF,AF' | |||||||||||
| B375 | DEC A | |||||||||||
| B376 | JR NZ,erase_laser_0 | |||||||||||
| erase_laser_2 | B378 | EXX | back to the main set | |||||||||
| B379 | RET | |||||||||||
| Prev: B336 | Up: Map | Next: B37A |