Prev: 26225 Up: Map Next: 26337
26320: Alien hit, zero out the UDGs
IX+2 points to the first scan of the hit alien's graphics structure. Those 2 bytes are zeroed out, then we skip 11*2 bytes which points IX at the hit alien's next scan down. Repeat 32 times (recalling that the alien data structure actually holds 2 16x16 sprites, one for alien looking left, one for alien looking right).
The effect is to wipe the alien from the next screen redraw - a gap will be drawn from the zeroes.
This is passed IX as pointing at the UDG data, less 2, hence the IX+2 and IX+3. Bit odd.
Used by the routine at alien_hit.
Input
IX Address of hit alien's UDGs in the structure at _ALIEN_ROWS_DATA, less 2
alien_hit_zero_udgs 26320 LD B,32 2 UDGs to clear, 16 bytes each
26322 LD DE,22 22 is 2*11, the distance between sprite UDG scan pairs
26325 XOR A Zero them out
alien_hit_zero_udgs_0 26326 LD (IX+2),A Clear 2 bytes
26329 LD (IX+3),A
26332 ADD IX,DE Move to next scanline
26334 DJNZ alien_hit_zero_udgs_0 Repeat for both alien UDGs
26336 RET
Prev: 26225 Up: Map Next: 26337