jetpac | Routines |
Prev: 6f70 | Up: Map | Next: 6fb2 |
Used by the routine at 6fb6.
|
||||||||||||
6f86 | inc de | Jetman Y position | ||||||||||
6f87 | ld a,(de) | Update the laser beam Y position to align with the middle of the Jetman sprite | ||||||||||
6f88 | sub $0d | |||||||||||
6f8a | ld (hl),a | |||||||||||
6f8b | inc hl | Laser X position: pulse #1 | ||||||||||
6f8c | ld b,$03 | Loop counter | ||||||||||
6f8e | ld (hl),c | Update pulse #1 | ||||||||||
6f8f | ld a,c | |||||||||||
6f90 | and $fb | |||||||||||
6f92 | inc hl | Update the rest of the pulses: #2, #3 and #4 | ||||||||||
6f93 | ld (hl),a | |||||||||||
6f94 | djnz $6f92 | |||||||||||
6f96 | inc hl | Update the laser beam "length" value, using the random_number as a base value | ||||||||||
6f97 | ld a,($5dce) | |||||||||||
6f9a | and $38 | |||||||||||
6f9c | or $84 | |||||||||||
6f9e | ld (hl),a | |||||||||||
6f9f | inc hl | DE points to laser beam "colour attribute" | ||||||||||
6fa0 | ex de,hl | |||||||||||
6fa1 | ld hl,$6fb2 | HL=Laser beam colour table | ||||||||||
6fa4 | ld a,($5dce) | Use random_number to point HL to one of the values in the colour table | ||||||||||
6fa7 | and $03 | |||||||||||
6fa9 | ld c,a | |||||||||||
6faa | ld b,$00 | |||||||||||
6fac | add hl,bc | |||||||||||
6fad | ld a,(hl) | |||||||||||
6fae | ld (de),a | Assign laser beam "colour attribute" a new colour | ||||||||||
6faf | jp $67e7 | Laser fire SFX |
Prev: 6f70 | Up: Map | Next: 6fb2 |