aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-09 19:46:19 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-09 19:46:19 -0400
commitaa693c367a62615231f183ab91a7b01a5e5d0328 (patch)
tree0984fe3136230d8d79791afed981b1a21709540b
parentd26f7bbb003efd1ce06e56a4f11e3fed8704a282 (diff)
downloadnes-snake-aa693c367a62615231f183ab91a7b01a5e5d0328.tar.gz
nes-snake-aa693c367a62615231f183ab91a7b01a5e5d0328.zip
speed up the snake as the game goes on
-rw-r--r--main.s9
1 files changed, 7 insertions, 2 deletions
diff --git a/main.s b/main.s
index 7a20c25..37077a9 100644
--- a/main.s
+++ b/main.s
@@ -99,7 +99,7 @@ clrmem:
LDA #$03
LDX #$01
STA head, x
- LDA #30
+ LDA #35
STA frame_skip
; Second wait for vblank, PPU is ready after this
@@ -349,7 +349,12 @@ eat_apple:
TXA
BEQ collision ; for now - this is the win condition
STX length
- JSR new_apple
+ AND #$07
+ BNE +
+ LDX frame_skip
+ DEX
+ STX frame_skip
++ JSR new_apple
end_game_loop:
RTS ; }}}