![]() |
Routines |
Prev: 26154 | Up: Map | Next: 26320 |
Call when the player bullet hits an alien. The alien explosion is drawn where the alien is, the blurbler is called, then the explosion is cleared. The game freezes while the explosion is on screen and the sound is playing, but you don't notice it.
If there are more aliens this jumps out the recalc_horde_stats routine. If the last one was hit, rind the end of screen siren, clean up a bit, then return.
Used by the routine at bullet_alien_coll_yaxis.
|
||||||||
alien_hit | 26225 | CALL alien_hit_zero_udgs | Zero out the alien in the UDG data | |||||
26228 | LD HL,_EXPLOSION_UDG_TOP | Puts _EXPLOSION_UDG_TOP into _EXPLOSION_GFX_TOP. Top char row of explosion graphic | ||||||
26231 | LD (_EXPLOSION_GFX_TOP),HL | |||||||
26234 | LD HL,_EXPLOSION_UDG_BOTTOM | Put _EXPLOSION_UDG_BOTTOM into _EXPLOSION_GFX_BOTTOM. Bottom char row of explosion graphic | ||||||
26237 | LD (_EXPLOSION_GFX_BOTTOM),HL | |||||||
26240 | CALL draw_alien_explosion | Draw the explosion on screen and remove the player bullet | ||||||
26243 | CALL clear_player_bullet | |||||||
26246 | CALL sound_burbler | Sound burbler | ||||||
26249 | DEFB 16,80,32,40,64,20,128,10 | Alien hit sound | ||||||
26257 | DEFB 0 | |||||||
Sound burbler return point
|
||||||||
26258 | CALL increase_score | Bump score based on alien type hit | ||||||
26261 | LD HL,_EXPLOSION_UDG_CLEAR | Now draw an "blank" alien explosion to clear that bit of the screen | ||||||
26264 | LD (_EXPLOSION_GFX_TOP),HL | |||||||
26267 | LD (_EXPLOSION_GFX_BOTTOM),HL | |||||||
26270 | CALL draw_alien_explosion | |||||||
26273 | LD A,(_NUM_ALIENS_REMAINING) | One fewer alien to deal with | ||||||
26276 | DEC A | |||||||
26277 | LD (_NUM_ALIENS_REMAINING),A | |||||||
26280 | JP NZ,recalc_horde_stats | If there are more aliens, jump out via the routine which works out the horde's extremes | ||||||
If we get here the last alien has been zapped
|
||||||||
26283 | CALL clear_alien_bullets | Clear all alien bullets from screen | ||||||
26286 | LD B,40 | 40 rings of the siren | ||||||
screen_clear_siren | 26288 | LD A,(_PORT254_SHADOW) | Pick up port 254 shadow | |||||
26291 | ADD A,8 | Roll the border colour | ||||||
26293 | AND 56 | |||||||
26295 | LD (_PORT254_SHADOW),A | |||||||
26298 | CALL sound_burbler | Sound burbler | ||||||
26301 | DEFB 16,100,32,50,64,25,32,50 | Last alien hit sound | ||||||
26309 | DEFB 0 | |||||||
26310 | DJNZ screen_clear_siren | |||||||
Clean up a bit, return to go and start next screen
|
||||||||
26312 | CALL clear_spaceship | |||||||
26315 | CALL clear_bottom_char_row | Clear bottom row | ||||||
26318 | POP HL | |||||||
26319 | RET |
Prev: 26154 | Up: Map | Next: 26320 |