1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00

Add erasure of collision buffer to tgi_clear

git-svn-id: svn://svn.cc65.org/cc65/trunk@5938 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
karri 2012-11-20 06:19:50 +00:00
parent 2c5e0f13a1
commit 8d545b2e17

View File

@ -199,7 +199,7 @@ INIT:
lda #$A0 lda #$A0
sta COLLBASH sta COLLBASH
; Put collision index before sprite data ; Put collision index before sprite data
lda #$FE lda #$FF
sta COLLOFFL sta COLLOFFL
lda #$FF lda #$FF
sta COLLOFFH sta COLLOFFH
@ -260,12 +260,17 @@ CONTROL:
cmp #5 cmp #5
bne ControlSwap bne ControlSwap
lda ptr1 lda ptr1 ; Activate/deactivate collission detection
bne @L0 bne @L0
lda %00100000 ; tgi_clear does not erase collision buffer
sta cls_sprite+2
lda __sprsys lda __sprsys
ora #$20 ora #$20
bra @L1 bra @L1
@L0: lda __sprsys @L0:
lda %00000000 ; tgi_clear erases collision buffer
sta cls_sprite+2
lda __sprsys
and #$df and #$df
@L1: sta __sprsys @L1: sta __sprsys
sta SPRSYS sta SPRSYS