aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-10 16:08:01 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-10 16:08:01 -0400
commit20af7436bb2cfed3ee27b1bb761e031d35905b3c (patch)
tree39f6094253702fb657dec51007235e43efa962ee
parent0408674c94433e250363fc2b37a8be791cf4ac80 (diff)
downloadnes-snake-20af7436bb2cfed3ee27b1bb761e031d35905b3c.tar.gz
nes-snake-20af7436bb2cfed3ee27b1bb761e031d35905b3c.zip
don't place an apple on the snake body
-rw-r--r--main.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.s b/main.s
index 8d908fa..705a9f1 100644
--- a/main.s
+++ b/main.s
@@ -540,6 +540,14 @@ new_apple: ; {{{
CLC
ADC #$3D
STA apple.y
+
+ LDA apple.x
+ STA body_test_x
+ LDA apple.y
+ STA body_test_y
+ JSR test_body_collision
+ CMP #$01
+ BEQ new_apple
RTS ; }}}
draw_sprite_at_head: ; {{{
LDA #$20