target word animation

This commit is contained in:
4am committed 2020-05-07 11:55:50 -04:00
1 parent 5bce74bfc3
commit f2ffbe8582
2 files changed
+34 -3

No files matched your search

+22 -2
View File
@@ -3,6 +3,19 @@
;
; common graphics functions
;
; Public functions:
; - Home
; - WaitForKeyWithTimeout
; - ScrollDown
; - ScrollDownBy
; - ScrollUp
; - ScrollUpBy
; - LogicalColumnToPhysicalColumn
; - ToASCIIString
;
; Public variables:
; - GlobalLeftMargin
;
GlobalLeftMargin
!byte $0A
@@ -69,11 +82,14 @@ WaitForKeyWithTimeout
@exit rts
ScrollDown
lda #$16
ScrollDownBy
; in: Y = logical column to scroll
; A = number of HGR rows to scroll
; out: X/Y preserved
stx @x+1
sty @y+1
ldx #$16
tax
jsr LogicalColumnToPhysicalColumn
jsr InitScrollStorage
jsr WaitForVBL
@@ -84,11 +100,14 @@ ScrollDown
rts
ScrollUp
lda #$16
ScrollUpBy
; in: Y = logical column to scroll
; A = number of HGR rows to scroll
; out: X/Y preserved
stx @x+1
sty @y+1
ldx #$16
tax
jsr LogicalColumnToPhysicalColumn
jsr InitScrollStorage
jsr WaitForVBL
@@ -99,6 +118,7 @@ ScrollUp
rts
InitScrollStorage
; out: preserves X/Y
lda #$00
sta $FC
sta $FD
+12 -1
View File
@@ -199,7 +199,6 @@ PlayEventLetter
rts ; puzzle is complete, return to caller with A = kCompletedPuzzle
MarkTargetWord
; TODO animation here?
ldx #4
ldy #0
- lda puzzle_data4, y
@@ -207,6 +206,18 @@ MarkTargetWord
iny
cpy puzzle_logical_width
bne -
ldy #0
- lda #1
jsr ScrollUpBy
iny
cpy puzzle_logical_width
bne -
ldy #0
- lda #1
jsr ScrollDownBy
iny
cpy puzzle_logical_width
bne -
; TODO sound here?
rts