From e2f61faeae3ed90ccb28ff1bc15bc302de577f55 Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Thu, 14 Dec 2017 11:59:09 +0000 Subject: [PATCH] Fix bug in game. --- eg/proto-game.60p | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/eg/proto-game.60p b/eg/proto-game.60p index 2bb6ce1..b805f59 100644 --- a/eg/proto-game.60p +++ b/eg/proto-game.60p @@ -264,10 +264,13 @@ routine player_logic // check collision. copy [ptr] + y, a + // if "collision" is with your own self, treat it as if it's blank space! + cmp a, 81 + if z { + ld a, 32 + } cmp a, 32 if z { - copy 81, [ptr] + y - copy ^screen, ptr st off, c add ptr, pos @@ -275,10 +278,14 @@ routine player_logic copy new_pos, pos + copy ^screen, ptr + st off, c + add ptr, pos + copy 81, [ptr] + y + st off, c } else { st on, c - st off, c // FIXME this branch seems to be called even when there is no collision. why? trash n trash a trash z