mirror of
https://github.com/notwa/mm
synced 2024-11-05 02:19:03 -08:00
keep files in place for no compression (VROM==ROM)
This commit is contained in:
parent
0597642c58
commit
ed63ff4654
1 changed files with 6 additions and 5 deletions
11
z64dump.py
11
z64dump.py
|
@ -252,7 +252,7 @@ def fix_rom(f):
|
|||
def align(x):
|
||||
return (x + 15) // 16 * 16
|
||||
|
||||
def create_rom(d, compression=None, nocomplist=None):
|
||||
def create_rom(d, compression=None, nocomplist=None, keep_inplace=False):
|
||||
root, _, files = next(os.walk(d))
|
||||
files.sort()
|
||||
|
||||
|
@ -282,8 +282,8 @@ def create_rom(d, compression=None, nocomplist=None):
|
|||
unempty = size_v > 0
|
||||
compressed = size_v >= 4 and data[:4] == b'Yaz0'
|
||||
|
||||
if i <= 2:
|
||||
# makerom, boot, dmadata need to be exactly where they were
|
||||
if i <= 2 or keep_inplace:
|
||||
# makerom, boot, dmadata need to be exactly where they were.
|
||||
start_v = vs
|
||||
start_p = start_v
|
||||
else:
|
||||
|
@ -396,9 +396,10 @@ def run(args):
|
|||
fix_rom(f)
|
||||
continue
|
||||
|
||||
# directories are technically files, so check this first
|
||||
# directories are technically files, so check this first:
|
||||
if os.path.isdir(path):
|
||||
create_rom(path, a.compression, a.skip)
|
||||
keep_inplace = a.compression == None
|
||||
create_rom(path, a.compression, a.skip, keep_inplace)
|
||||
elif os.path.isfile(path):
|
||||
dump_rom(path, not a.no_decompress)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue