1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-19 10:29:28 +00:00

Fix bug in copy []+y, a. "Hero" no longer leaves a trail.

This commit is contained in:
Chris Pressey 2017-12-13 17:00:21 +00:00
parent c84473224b
commit 1d8f1af964
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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':