shithub: pokecrystal

Download patch

ref: 315edbe14bd630e3d4dbdbeb362fc9dacc0e358d
parent: 63ccfbfd6225ca004c896d45ea44739aca328102
author: Bryan Bishop <[email protected]>
date: Wed Jun 6 16:26:02 EDT 2012

get RomStr from romstr.py in gbz80disasm

--- a/extras/gbz80disasm.py
+++ b/extras/gbz80disasm.py
@@ -6,9 +6,11 @@
 from ctypes import c_int8
 import json
 import random
+from romstr import RomStr
+
 spacing = "\t"
 
-#this was originally for renaming freeze maps for a unique name
+# this was originally for renaming freeze maps for a unique name
 def random_hash():
     available_chars = string.hexdigits[:16]
     return ''.join(
@@ -15,10 +17,6 @@
         random.choice(available_chars)
         for dummy in xrange(5))
 
-class RomStr(str):
-    """simple wrapper to prevent a giant rom from being shown on screen"""
-    def __repr__(self):
-        return "RomStr(too long)"
 def load_rom(filename="../baserom.gbc"):
     """loads bytes into memory"""
     global rom
@@ -25,7 +23,7 @@
     file_handler = open(filename, "r") 
     rom = RomStr(file_handler.read())
     file_handler.close()
-    return rom    
+    return rom
 
 temp_opt_table = [
   [ "ADC A", 0x8f, 0 ],