diff --git a/eg/proto-game.60p b/eg/proto-game.60p index 83a53e5..d1760a4 100644 --- a/eg/proto-game.60p +++ b/eg/proto-game.60p @@ -239,8 +239,14 @@ routine player_logic copy [ptr] + y, a cmp a, 32 if z { - copy new_pos, pos copy 81, [ptr] + y + + copy ^screen, ptr + st off, c + add ptr, pos + copy 32, [ptr] + y + + copy new_pos, pos } else { // copy game_state_game_over, dispatch_game_state trash n diff --git a/src/sixtypical/analyzer.py b/src/sixtypical/analyzer.py index 1272055..32c61e5 100644 --- a/src/sixtypical/analyzer.py +++ b/src/sixtypical/analyzer.py @@ -414,7 +414,10 @@ class Analyzer(object): # FIXME: this is just to support "copy [foo] + y, a". consider disallowing `a` as something # that can be used in `copy`. should be using `st` or `ld` instead, probably. - if dest != REG_A: + if dest == REG_A: + context.set_touched(REG_A) + context.set_written(REG_A) + else: context.set_unmeaningful(REG_A) elif opcode == 'with-sei':