jetpac | Routines |
Prev: 6f2a | Up: Map | Next: 6f70 |
Find an unused laser beam slot - return if non free - then initialise and draw the laser GFX in the correct location and direction in relation to Jetman. Used by the routine at 7492.
|
||||||||
6f5a | ld a,($5c78) | Return unless one of first two bits of SYSVAR_FRAMES are set | ||||||
6f5d | and $03 | |||||||
6f5f | ret nz | |||||||
6f60 | ld hl,$5d08 | HL=laser beam objects | ||||||
6f63 | ld de,$0008 | |||||||
6f66 | ld b,$04 | Loop counter for all 4 laser beams | ||||||
6f68 | ld a,(hl) | Get first byte of object | ||||||
6f69 | and a | |||||||
6f6a | jr z,$6f70 | Initialise and draw laser beam, if unused | ||||||
6f6c | add hl,de | |||||||
6f6d | djnz $6f68 | Repeat until an unused beam is found | ||||||
6f6f | ret | Return if no free slots are available |
Prev: 6f2a | Up: Map | Next: 6f70 |