arrival: erase heart

This commit is contained in:
Vince Weaver 2018-10-17 00:34:34 -04:00
parent 263cd58fde
commit 718872a29e
2 changed files with 47 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -559,12 +559,16 @@ ar_draw_wfall:
;======================================================
; 6237
; -464 (draw heart)
; -217 (erase heart)
; -3 = return
;==========
; 5770
; 5553
ar_state4:
jsr erase_heart ; 6+211
lda HEART_X ; 3
sta XPOS ; 3
lda HEART_Y ; 3
@ -584,10 +588,13 @@ ar_state4:
ar_done_heart:
; delay
; Try X=127 Y=9 cycles=5770
ldy #9 ; 2
arloopV:ldx #127 ; 2
; Try X=21 Y=50 cycles=5551 R2
nop
ldy #50 ; 2
arloopV:ldx #21 ; 2
arloopW:dex ; 2
bne arloopW ; 2nt/3
dey ; 2
@ -595,6 +602,17 @@ arloopW:dex ; 2
jmp ar_back_from_jumptable
heart_path:
.byte $14,$20
.byte $14,$20
.byte $13,$18
.byte $13,$18
.byte $14,$16
.byte $15,$16
; .byte $15,$14
; .byte $14,$14
;======================
; erase field
@ -619,3 +637,28 @@ field_loop:
; -1
rts ; 6
;======================
; erase heart
;======================
; erase to black, (13-18,14-20)
; erase to green (13-18,20-24)
; 2+ 6*[29 + 5 ] + 5 = 211
erase_heart:
ldx #5 ; 13 - 18 ; 2
heart_loop:
lda #$00 ; black ; 2
sta $780+13,X ; 14 ; 5
sta $428+13,X ; 16 ; 5
sta $4a8+13,X ; 18 ; 5
lda #$44 ; green ; 2
sta $528+13,X ; 20 ; 5
sta $5a8+13,X ; 22 ; 5
dex ; 2
bpl heart_loop ; 3
; -1
rts ; 6