| jetpac | Routines | 
| Prev: 6d94 | Up: Map | Next: 6de9 | 
  | 
||||||||
| 6d9c | call $72ef | Update Actor position direction | ||||||
| 6d9f | ld hl,$5dcb | Increment alien number | ||||||
| 6da2 | inc (hl) | |||||||
| 
 
Update the alien X position.
 
 | 
||||||||
| 6da3 | ld a,(ix+$01) | A=X position | ||||||
| 6da6 | bit 6,(ix+$04) | Check moving left/right bit | ||||||
| 6daa | jr nz,$6de4 | If moving left, subtract 2 from direction (via jump) | ||||||
| 6dac | add a,(ix+$05) | otherwise, we add alien X speed to value | ||||||
| 6daf | ld (ix+$01),a | Set new X position +/- 2 | ||||||
| 
 
Update the alien Y position.
 
 | 
||||||||
| 6db2 | ld a,(ix+$02) | Add Y speed to current Y position | ||||||
| 6db5 | add a,(ix+$06) | |||||||
| 6db8 | ld (ix+$02),a | |||||||
| 6dbb | call $7232 | Update actor X position (using temp direction) | ||||||
| 6dbe | call $7197 | Colourize the sprite | ||||||
| 6dc1 | call $75e8 | Platform collision (returns E) | ||||||
| 6dc4 | bit 2,e | Kill alien it collided with a platform | ||||||
| 6dc6 | jr nz,$6ddd | |||||||
| 6dc8 | call $6e1b | Fire laser beam (returns C) | ||||||
| 6dcb | ld a,c | Kill alien if it is dead | ||||||
| 6dcc | and a | |||||||
| 6dcd | jr nz,$6dd7 | |||||||
| 6dcf | call $6de9 | Alien collision check (returns E) | ||||||
| 6dd2 | dec e | Alien killed by collision if E is zero. Player gets no points! | ||||||
| 6dd3 | jp z,$6456 | |||||||
| 6dd6 | ret | |||||||
| 
 
Add score for Meteor kill.
 
 | 
||||||||
| 6dd7 | ld bc,$0025 | 25 points (decimal value) | ||||||
| 6dda | call $70c2 | Add points to score | ||||||
| 
 
Kill meteor - reset state, and play explosion SFX #1.
 
 | 
||||||||
| 6ddd | call $685d | Update actor state | ||||||
| 6de0 | xor a | A should be 0 for the Alien SFX | ||||||
| 6de1 | jp $67fd | Plays explosion SFX for an Alien | ||||||
| 
 
Subtract 2 from horizontal direction.
 
 | 
||||||||
| 6de4 | sub (ix+$05) | Subtract X speed | ||||||
| 6de7 | jr $6daf | |||||||
| Prev: 6d94 | Up: Map | Next: 6de9 |