]> git.sur5r.net Git - cc65/commitdiff
Add erasure of collision buffer to tgi_clear
authorkarri <karri@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 20 Nov 2012 06:19:50 +0000 (06:19 +0000)
committerkarri <karri@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 20 Nov 2012 06:19:50 +0000 (06:19 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5938 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/lynx/lynx-160-102-16.s

index 78d47eb174d3e992ea75c2641557bb15c95b571c..72dd0f2063f011b342ddf8befe51b40188faf4ef 100644 (file)
@@ -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