; explosion seen when we're hit by enemy fire. ; flash the part of the screen where the lorchas are displayed. ; previously this flashed the whole screen, but it gave me a ; headache. .export _explosion .include "atari.inc" .importzp tmp1, tmp2 .import _jsleep counter = tmp1 color2save = tmp2 ; extern void explosion(void); _explosion: ; { ldy #3 ; loop counter, counts 3 2 1 lda COLOR1 and #$0f sta tmp2 ; { @loop: lda #$0a sta counter ; { @wait4scanline: ; { lda VCOUNT cmp #(4+8)*4 bne @wait4scanline ; } sta WSYNC ; { @scanlines: lda COLOR2 and #$f0 ora tmp2 sta WSYNC sta COLPF2 lda #0 sta COLPF1 lda VCOUNT cmp #(4+23)*4 bne @scanlines ; stop changing color 2 lines after the bottom row of lorchas ; } lda COLOR2 ; put colors back like they were for the rest of the frame sta COLPF2 lda COLOR1 sta COLPF1 dec counter bne @wait4scanline ; } ldx #0 ;\ lda #$0a ; | jsleep(10); jsr _jsleep ;/ dey bne @loop ; we're done if Y==0 ; } rts ; }