Change silly dispatcher function name
This commit is contained in:
parent
8729a8a40a
commit
41d0713686
|
@ -61,7 +61,7 @@ def main(args=None):
|
|||
args = parser.parse_args(args)
|
||||
|
||||
with open(args.output, 'wb') as f:
|
||||
f.write(dispatcher.build_path(args.dir))
|
||||
f.write(dispatcher.build(args.dir))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -42,7 +42,7 @@ def build(src):
|
|||
booter.extend(b'\0' * (constants['elf-offset'] - len(booter)))
|
||||
|
||||
constants['elf-offset'] = len(booter)
|
||||
booter.extend(dispatcher.build_path(path.join(src, 'MacOS.elf')))
|
||||
booter.extend(dispatcher.build(path.join(src, 'MacOS.elf')))
|
||||
constants['elf-size'] = len(booter) - constants['elf-offset']
|
||||
|
||||
if 'lzss-offset' in constants:
|
||||
|
@ -54,7 +54,7 @@ def build(src):
|
|||
constants[base + '-offset'] = len(booter)
|
||||
for attempt in ['MacROM', 'Parcels']:
|
||||
try:
|
||||
data = dispatcher.build_path(path.join(src, attempt))
|
||||
data = dispatcher.build(path.join(src, attempt))
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
|
|
|
@ -44,7 +44,7 @@ def build_dir(p):
|
|||
raise WrongFormat
|
||||
|
||||
|
||||
def build_path(p):
|
||||
def build(p):
|
||||
parent = path.dirname(path.abspath(p))
|
||||
name = path.basename(path.abspath(p))
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ def build(src):
|
|||
new.src = a
|
||||
new.compress = 'lzss'
|
||||
|
||||
new.data = dispatcher.build_path(new.src)
|
||||
new.data = dispatcher.build(new.src)
|
||||
new.unpackedlen = len(new.data)
|
||||
if new.compress == 'lzss':
|
||||
new.data = compress(new.data)
|
||||
|
|
|
@ -53,7 +53,7 @@ def parse_configinfo(src_path):
|
|||
linelist = []
|
||||
chunks = {'': linelist} # must sort as first
|
||||
|
||||
for line in dispatcher.build_path(src_path).decode('utf8').split('\n'):
|
||||
for line in dispatcher.build(src_path).decode('utf8').split('\n'):
|
||||
words = shlex.split(line, comments=True, posix=True)
|
||||
if len(words) == 0: continue
|
||||
|
||||
|
@ -144,7 +144,7 @@ def build(src):
|
|||
|
||||
# This will typically contain the emulator, which I can't reliably extract
|
||||
try:
|
||||
rom = bytearray(dispatcher.build_path(path.join(src, 'EverythingElse')))
|
||||
rom = bytearray(dispatcher.build(path.join(src, 'EverythingElse')))
|
||||
except FileNotFoundError:
|
||||
rom = bytearray(0x400000)
|
||||
|
||||
|
@ -260,7 +260,7 @@ def build(src):
|
|||
matches = glob.glob(glob.escape(path.join(src, filename)) + '*')
|
||||
if matches:
|
||||
match = min(matches) # try for * before *.src
|
||||
blob = dispatcher.build_path(match)
|
||||
blob = dispatcher.build(match)
|
||||
insert_and_assert(rom, blob, configinfo_offset + blob_offset)
|
||||
|
||||
# let's do a cheeky checksum!
|
||||
|
|
|
@ -25,7 +25,7 @@ def checksum(binary):
|
|||
def build(src):
|
||||
if not path.exists(path.join(src, 'Romfile')): raise dispatcher.WrongFormat
|
||||
|
||||
romfile = dispatcher.build_path(path.join(src, 'Romfile')).decode('utf8').split('\n')
|
||||
romfile = dispatcher.build(path.join(src, 'Romfile')).decode('utf8').split('\n')
|
||||
|
||||
rsrc_list = []
|
||||
for l in romfile:
|
||||
|
@ -49,11 +49,11 @@ def build(src):
|
|||
|
||||
rom = bytearray(b'kc' * (rom_size // 2))
|
||||
|
||||
maincode = dispatcher.build_path(path.join(src, 'MainCode'))
|
||||
maincode = dispatcher.build(path.join(src, 'MainCode'))
|
||||
rom[:len(maincode)] = maincode
|
||||
|
||||
try:
|
||||
decldata = dispatcher.build_path(path.join(src, 'DeclData'))
|
||||
decldata = dispatcher.build(path.join(src, 'DeclData'))
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
else:
|
||||
|
@ -65,7 +65,7 @@ def build(src):
|
|||
bogus_off = 0x5C
|
||||
|
||||
for r in rsrc_list:
|
||||
data = dispatcher.build_path(path.join(src, r['src']))
|
||||
data = dispatcher.build(path.join(src, r['src']))
|
||||
|
||||
data_ptr = lowlevel.pad(free + 16, ALIGN)
|
||||
mm_ptr = data_ptr - 12
|
||||
|
|
Loading…
Reference in New Issue