mirror of
https://github.com/digarok/festro.git
synced 2024-06-01 06:41:31 +00:00
rewrite prodrop for GR support
This commit is contained in:
parent
b30c6e9571
commit
19b3005577
22
festro.s
22
festro.s
|
@ -670,23 +670,26 @@ HandleProdrop
|
||||||
:scanCharLoop
|
:scanCharLoop
|
||||||
lda (srcPtr),y
|
lda (srcPtr),y
|
||||||
cmp #" " ; SPACE
|
cmp #" " ; SPACE
|
||||||
]dropCharCompare equ *-1
|
]dropCharCompare equ *-1 ; we change this for GRaphics mode
|
||||||
beq :nextChar
|
beq :nextChar
|
||||||
and #%01111111 ; clear high bit to indicate non-animated state
|
|
||||||
|
|
||||||
phy ; +1
|
phy ; +1
|
||||||
phy ; +2
|
phy ; +2
|
||||||
ldy #0
|
ldy #0
|
||||||
sta (dstPtr),y
|
sta (dstPtr),y
|
||||||
|
|
||||||
iny
|
iny
|
||||||
pla ; +1
|
pla ; +1
|
||||||
sta (dstPtr),y
|
sta (dstPtr),y
|
||||||
lda _prodropScanLine
|
lda _prodropScanLine
|
||||||
|
ora #%10000000 ; set high bit to indicate non-animated state
|
||||||
|
|
||||||
iny
|
iny
|
||||||
sta (dstPtr),y
|
sta (dstPtr),y
|
||||||
|
|
||||||
iny
|
iny
|
||||||
jsr GetRand
|
jsr GetRand
|
||||||
and #%0111111 ; decided to limit it to make the values a little
|
and #%01111111 ; decided to limit it to make the values a little
|
||||||
; closer together. #$00 - #$7f
|
; closer together. #$00 - #$7f
|
||||||
; this particularly helps with gaps when nothing is
|
; this particularly helps with gaps when nothing is
|
||||||
; falling because you started with few characters
|
; falling because you started with few characters
|
||||||
|
@ -756,8 +759,10 @@ HandleProdrop
|
||||||
beq :prodropUpdateLoop ; reset src pointer and do it all over
|
beq :prodropUpdateLoop ; reset src pointer and do it all over
|
||||||
stz _prodropAnimDone ; hate to continually set this false, but we have time
|
stz _prodropAnimDone ; hate to continually set this false, but we have time
|
||||||
|
|
||||||
|
ldy #2
|
||||||
|
lda (srcPtr),y ; now it's in our y value
|
||||||
cmp #$80 ; check for high bit
|
cmp #$80 ; check for high bit
|
||||||
bcs ]dropIt ; not set? then we're animating it
|
blt ]dropIt ; not set? then we're animating it
|
||||||
ldy #3 ; check random wait state
|
ldy #3 ; check random wait state
|
||||||
lda (srcPtr),y
|
lda (srcPtr),y
|
||||||
beq ]setCharAnim ; is 0 so set it to animate on next pass
|
beq ]setCharAnim ; is 0 so set it to animate on next pass
|
||||||
|
@ -777,7 +782,7 @@ HandleProdrop
|
||||||
lda (srcPtr),y ; get our X value
|
lda (srcPtr),y ; get our X value
|
||||||
tay
|
tay
|
||||||
lda #" "
|
lda #" "
|
||||||
]dropCharWrite equ *-1
|
]dropCharWrite equ *-1 ; we set this differently for GRaphics mode
|
||||||
sta (dstPtr),y
|
sta (dstPtr),y
|
||||||
* breath... holy crap all that just to draw a space at X,Y
|
* breath... holy crap all that just to draw a space at X,Y
|
||||||
ldy #2
|
ldy #2
|
||||||
|
@ -805,9 +810,10 @@ HandleProdrop
|
||||||
bra ]nextAnimChar
|
bra ]nextAnimChar
|
||||||
|
|
||||||
]setCharAnim
|
]setCharAnim
|
||||||
lda (srcPtr)
|
ldy #2
|
||||||
ora #%10000000 ; set high bit
|
lda (srcPtr),y
|
||||||
sta (srcPtr)
|
and #%01111111 ; clear high bit
|
||||||
|
sta (srcPtr),y
|
||||||
|
|
||||||
|
|
||||||
]nextAnimChar
|
]nextAnimChar
|
||||||
|
|
Loading…
Reference in New Issue
Block a user