summaryrefslogtreecommitdiff
path: root/pokemontools/vba/vba.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-11-14 00:43:52 -0600
committerBryan Bishop <kanzure@gmail.com>2013-11-14 00:43:52 -0600
commitdc0a7ac670915a089d1b1ba27df0b5daca2b56f3 (patch)
tree4d9f22311619ed5e18d93ff2d7b0f04ef1e3dcf7 /pokemontools/vba/vba.py
parent106f45ac7acd657834c5ac2cd5a7d1198ddea95c (diff)
make get_text slightly more configurable
Add params to the get_text() function to dump text tiles from screen.
Diffstat (limited to 'pokemontools/vba/vba.py')
-rw-r--r--pokemontools/vba/vba.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py
index c7a0bf9..204e102 100644
--- a/pokemontools/vba/vba.py
+++ b/pokemontools/vba/vba.py
@@ -718,14 +718,14 @@ class crystal(object):
self.vba.write_memory_at(0xd8dc, 5)
self.vba.write_memory_at(0xd8dd, 99)
- def get_text(self, chars=chars):
+ def get_text(self, chars=chars, offset=0, bounds=1000):
"""
Returns alphanumeric text on the screen.
Other characters will not be shown.
"""
output = ""
- tiles = self.vba.memory[0xc4a0:0xc4a0 + 1000]
+ tiles = self.vba.memory[0xc4a0 + offset:0xc4a0 + offset + bounds]
for each in tiles:
if each in chars.keys():
thing = chars[each]