get RomStr from romstr.py in gbz80disasm

This commit is contained in:
Bryan Bishop 2012-06-06 20:26:02 -05:00
parent 63ccfbfd62
commit 315edbe14b
1 changed files with 4 additions and 6 deletions

View File

@ -6,19 +6,17 @@ from copy import copy, deepcopy
from ctypes import c_int8 from ctypes import c_int8
import json import json
import random import random
from romstr import RomStr
spacing = "\t" 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(): def random_hash():
available_chars = string.hexdigits[:16] available_chars = string.hexdigits[:16]
return ''.join( return ''.join(
random.choice(available_chars) random.choice(available_chars)
for dummy in xrange(5)) 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"): def load_rom(filename="../baserom.gbc"):
"""loads bytes into memory""" """loads bytes into memory"""
global rom global rom