4cade/src/fx/fx.hgr.foursquare.white.a

169 lines
3.0 KiB
Plaintext
Raw Permalink Normal View History

2018-12-29 18:43:59 +00:00
;license:MIT
2020-11-19 03:05:43 +00:00
;(c) 2018-2020 by 4am/qkumba
2018-12-29 18:43:59 +00:00
;
2018-11-02 00:32:42 +00:00
!cpu 6502
!to "build/FX.INDEXED/FOURSQUARE",plain
2018-11-02 00:32:42 +00:00
*=$6000
2022-08-26 01:56:15 +00:00
!source "src/fx/macros.a"
2020-11-19 03:05:43 +00:00
lda #23
sta $FD
lda #<Coordinates
2018-11-02 00:32:42 +00:00
sta $FE
2020-11-19 03:05:43 +00:00
lda #>Coordinates
sta $FF
ldy #0
sty $F7
ldx #11
stx $F8
txa
inx
stx $F9
ldx #19
stx $FA
inx
stx $FB
ldx #39
stx $FC
- lda $F7
ldx $F8
jsr @box2
lda $F9
ldx $FD
jsr @box2
lda #$FF
jsr stainc
jsr stainc
dec $F8
inc $F9
dec $FA
inc $FB
dec $FC
dec $FD
inc $F7
lda $F7
cmp #6
bne -
2020-11-25 22:52:59 +00:00
lda #$80
sta Coordinates+$798
2020-11-19 03:05:43 +00:00
lda #<Coordinates
sta $FE
lda #>Coordinates
2018-11-02 00:32:42 +00:00
sta $FF
ldy #$00
@loop1
lda ($FE),y
bpl @copy
lda #$18
jsr iWaitForKeyWithTimeout
2018-11-02 00:32:42 +00:00
bmi @exit
bpl @next ; always branches
@copy
tax
iny
lda ($fe),y
tay
txa
jsr HGRBlockToWhite
@next
inc $FE
bne +
inc $FF
+ inc $FE
bne +
inc $FF
+ ldy #$00
lda ($FE),y
cmp #$80
bne @loop1
@loop2
dec $FE
lda $FE
cmp #$FF
bne +
dec $FF
+ dec $FE
lda $FE
cmp #$FF
bne +
dec $FF
+ ldy #$00
lda ($FE),y
cmp #$80
beq @exit
lda ($FE),y
bpl @copy2
lda #$18
jsr iWaitForKeyWithTimeout
2018-11-02 00:32:42 +00:00
bmi @exit
bpl @loop2 ; always branches
@copy2
tax
iny
lda ($fe),y
tay
txa
jsr HGRBlockCopy
beq @loop2 ; always branches
@exit rts
2020-11-19 03:05:43 +00:00
@box2 sta $F4
stx $F5
jsr @box1
ldx $F4
- inx
cpx $F5
bcs +
jsr txasta
lda $F7
jsr statxa
lda $FA
jsr statxa
lda $FB
jsr statxa
lda $FC
jsr stainc
bne - ; always branches
+ txa
; fall through
@box1 ldx $FA
stx $F6
ldx $F7
jsr +
ldx $FC
stx $F6
ldx $FB
+
- jsr stainc
pha
txa
jsr stainc
pla
cpx $F6
inx
bcc -
rts
statxa jsr stainc
txasta txa
stainc sta ($FE), y
iny
bne +
inc $FF
+ rts
+HGR_WHITE_ROUTINES
+HGR_BLOCK_COPY_ROUTINES
2020-11-19 03:05:43 +00:00
!byte $80,$80
2022-11-22 03:22:41 +00:00
!if * and 1 {
!byte 0
}
2020-11-19 03:05:43 +00:00
Coordinates