(snake.rom) Minor optimizations
This commit is contained in:
parent
912afb678f
commit
c63a8fa882
|
@ -143,7 +143,7 @@ RTN
|
|||
POP
|
||||
|
||||
( detect collision with apple )
|
||||
.snake/x LDZ2 .apple/x LDZ2 [ ROT = ROT ROT = #0101 !! ] ,&no-collision-apple JCN
|
||||
.snake/x LDZ2 .apple/x LDZ2 NEQ2 ,&no-collision-apple JCN
|
||||
#00 ;draw-apple JSR2
|
||||
.snake/length LDZ INC .snake/length STZ
|
||||
;add-apple JSR2
|
||||
|
@ -153,7 +153,7 @@ RTN
|
|||
.snake/length LDZ #01
|
||||
&loop-body
|
||||
( pop ) DUP 2* .snake/tail + LDZ2
|
||||
.snake/x LDZ2 [ ROT = ROT ROT = #0101 !! ] ,&no-collision-body JCN
|
||||
.snake/x LDZ2 NEQ2 ,&no-collision-body JCN
|
||||
#01 .snake/dead STZ
|
||||
#03 ;draw-snake JSR2
|
||||
&no-collision-body
|
||||
|
|
Loading…
Reference in New Issue