mirror of
https://github.com/a2-4am/4cade.git
synced 2024-09-27 12:57:21 +00:00
92 lines
1.8 KiB
Plaintext
92 lines
1.8 KiB
Plaintext
;license:MIT
|
|
;(c) 2019 by 4am
|
|
;
|
|
!cpu 6502
|
|
!to "build/FX.INDEXED/ARROW",plain
|
|
*=$6000
|
|
|
|
y = $fc
|
|
row = $fd
|
|
col = $fe
|
|
counter = $ff
|
|
|
|
!source "src/fx/macros.a"
|
|
!source "src/constants.a"
|
|
|
|
lda #(40+12)
|
|
sta counter
|
|
|
|
lda #39
|
|
sta col
|
|
ColLoop
|
|
lda #11
|
|
sta row
|
|
ldy col
|
|
sty y
|
|
jsr WaitForVBL
|
|
RowLoop
|
|
; check if this column is visible
|
|
ldy y
|
|
+IS_Y_OFFSCREEN
|
|
bcs @skip1
|
|
|
|
; do top half of arrow
|
|
+SWITCH_TO_MASKS copymasks1
|
|
lda row
|
|
jsr HGRBlockCopyWithMask
|
|
|
|
; do bottom half of arrow (opposing row, same col)
|
|
+SWITCH_TO_MASKS copymasks4
|
|
lda #23
|
|
sec
|
|
sbc row
|
|
jsr HGRBlockCopyWithMask
|
|
@skip1
|
|
; now check if *this* column is visible
|
|
iny
|
|
sty y
|
|
+IS_Y_OFFSCREEN
|
|
bcs @nextrow
|
|
|
|
; do top half of arrow
|
|
lda row
|
|
jsr HGRBlockCopy
|
|
|
|
; do bottom half of arrow
|
|
lda #23
|
|
sec
|
|
sbc row
|
|
jsr HGRBlockCopy
|
|
@nextrow
|
|
dec row
|
|
+LBPL RowLoop
|
|
lda $c000
|
|
bmi @exit
|
|
dec col
|
|
dec counter
|
|
+LBNE ColLoop
|
|
@exit jmp UnwaitForVBL
|
|
|
|
copymasks1
|
|
!byte %11111111
|
|
!byte %11111110
|
|
!byte %11111100
|
|
!byte %11111000
|
|
!byte %11110000
|
|
!byte %11100000
|
|
!byte %11000000
|
|
!byte %10000000
|
|
copymasks4
|
|
!byte %10000000
|
|
!byte %11000000
|
|
!byte %11100000
|
|
!byte %11110000
|
|
!byte %11111000
|
|
!byte %11111100
|
|
!byte %11111110
|
|
!byte %11111111
|
|
|
|
!source "src/wait.a"
|
|
+HGR_BLOCK_COPY_ROUTINES
|
|
+HGR_COPY_MASK_ROUTINES
|