From 8d545b2e17457fe44e2ec41b02a086a71499a028 Mon Sep 17 00:00:00 2001 From: karri Date: Tue, 20 Nov 2012 06:19:50 +0000 Subject: [PATCH] Add erasure of collision buffer to tgi_clear git-svn-id: svn://svn.cc65.org/cc65/trunk@5938 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/lynx/lynx-160-102-16.s | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libsrc/lynx/lynx-160-102-16.s b/libsrc/lynx/lynx-160-102-16.s index 78d47eb17..72dd0f206 100644 --- a/libsrc/lynx/lynx-160-102-16.s +++ b/libsrc/lynx/lynx-160-102-16.s @@ -199,7 +199,7 @@ INIT: lda #$A0 sta COLLBASH ; Put collision index before sprite data - lda #$FE + lda #$FF sta COLLOFFL lda #$FF sta COLLOFFH @@ -260,12 +260,17 @@ CONTROL: cmp #5 bne ControlSwap - lda ptr1 + lda ptr1 ; Activate/deactivate collission detection bne @L0 + lda %00100000 ; tgi_clear does not erase collision buffer + sta cls_sprite+2 lda __sprsys ora #$20 bra @L1 -@L0: lda __sprsys +@L0: + lda %00000000 ; tgi_clear erases collision buffer + sta cls_sprite+2 + lda __sprsys and #$df @L1: sta __sprsys sta SPRSYS -- 2.39.5