summaryrefslogtreecommitdiff
path: root/pokemontools/vba/vba.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-11-13 19:02:23 -0600
committerBryan Bishop <kanzure@gmail.com>2013-11-13 19:02:23 -0600
commit8be80027e87c80678b1d0a453c866d79a9af47b2 (patch)
tree13a5469cedb76fd2c52dddd7efbbbcf5118c6be3 /pokemontools/vba/vba.py
parentb44e7b6dee19c9029e68747315e4fc84e741a86b (diff)
parent4a002c193b2225f9e370bf640b0c547252e42cd1 (diff)
Merge branch 'master' into battle-handling
Diffstat (limited to 'pokemontools/vba/vba.py')
-rw-r--r--pokemontools/vba/vba.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py
index e339f57..57e5e1b 100644
--- a/pokemontools/vba/vba.py
+++ b/pokemontools/vba/vba.py
@@ -1130,6 +1130,8 @@ class crystal(object):
if not wram:
self.inject_script_into_rom(asm=script, wram_address=address)
else:
+ # TODO: move this into a separate function. Maybe use a context
+ # manager to restore wram at the end.
mem = list(self.vba.memory)
backup_wram = mem[address : address + len(script)]
mem[address : address + len(script)] = script