diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-05-29 13:19:02 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-05-29 13:19:02 -0500 |
commit | 0edf9eb8b8d5bdf74b8af18401a92c2ce7a2c2a3 (patch) | |
tree | ee0f406346ffbe5f4bdcc69bac76b010ceab11ef | |
parent | ee7d39bf046ca4b8c40eb293d50657cda151dc58 (diff) |
move AsmList into romstr.py too
-rw-r--r-- | extras/crystal.py | 13 | ||||
-rw-r--r-- | extras/romstr.py | 10 |
2 files changed, 12 insertions, 11 deletions
diff --git a/extras/crystal.py b/extras/crystal.py index bd4f17ec0..e94e0cb89 100644 --- a/extras/crystal.py +++ b/extras/crystal.py @@ -230,7 +230,8 @@ def map_name_cleaner(input): replace("hooh", "HoOh").\ replace(" ", "") -from romstr import RomStr +from romstr import RomStr, AsmList + rom = RomStr(None) def direct_load_rom(filename="../baserom.gbc"): @@ -252,16 +253,6 @@ def load_rom(filename="../baserom.gbc"): elif os.lstat(filename).st_size != len(rom): return direct_load_rom(filename) -class AsmList(list): - """simple wrapper to prevent all asm lines from being shown on screen""" - - def length(self): - """len(self)""" - return len(self) - - def __repr__(self): - return "AsmList(too long)" - def load_asm(filename="../main.asm"): """loads the asm source code into memory""" diff --git a/extras/romstr.py b/extras/romstr.py index 9d50fcea1..112348a2b 100644 --- a/extras/romstr.py +++ b/extras/romstr.py @@ -23,3 +23,13 @@ class RomStr(str): """returns hex values from rom starting at offset until the given byte""" return self.interval(offset, self.find(chr(byte), offset) - offset, strings=strings) +class AsmList(list): + """simple wrapper to prevent all asm lines from being shown on screen""" + + def length(self): + """len(self)""" + return len(self) + + def __repr__(self): + return "AsmList(too long)" + |