Prev: 6629 Up: Map Next: 6690
6632: Animate the rocket flame sprites.
Used by the routines at 6690 and 66b4.
Input
IX Rocket object
6632 ld a,(ix+$02) Add 21 to rocket Y position
6635 add a,$15
6637 ld (ix+$02),a
663a ld hl,$5dc1
663d ld a,(hl) Add 21 to actor Y position
663e add a,$15
6640 ld (hl),a
6641 ld a,(ix+$02) If near ground, turn off flame sprites
6644 cp $b8
6646 jr z,$6681
6648 jr nc,$666c If >= 184, just update flame sprite vars
664a ld a,($5dcc) Game timer
664d and $04
664f jr nz,$667c DE=flame sprite #1 if bit-3 is set
6651 ld de,$7f7a else DE=flame sprite #2
Draw the flame sprites.
6654 push de
6655 ld de,$7f57 Destroy flame sprite #1
6658 call $7268
665b ld de,$7f7a Destroy flame sprite #2
665e call $7268
6661 pop de
6662 call $7263 Erase and animate actor sprite
6665 ld (ix+$03),$42 Set flame sprite colour to Red
6669 call $7197 Colourize the sprite
Update Rocket and Actor Y positions.
666c ld a,(ix+$02) Subtract $15 from rocket Y position
666f sub $15
6671 ld (ix+$02),a
6674 ld hl,$5dc1
6677 ld a,(hl) Subtract 21 from actor Y position
6678 sub $15
667a ld (hl),a
667b ret
Set first rocket flame sprite to be displayed.
667c ld de,$7f57 Rocket flame sprite #1
667f jr $6654 Draw flame sprite
Turn off the rocket flame sprites and update sprite variables.
6681 ld de,$7f57 Destroy flame sprite #1
6684 call $7268
6687 ld de,$7f7a Destroy flame sprite #2
668a call $7268
668d jp $666c Update sprite variables
Prev: 6629 Up: Map Next: 6690