diff --git a/Tales_Exe.py b/Tales_Exe.py index 284ba35..1eee56b 100644 --- a/Tales_Exe.py +++ b/Tales_Exe.py @@ -72,6 +72,28 @@ def get_arguments(argv=None): help="(Optional) - Insert only changed files not yet commited", ) + sp_extract.add_argument( + "--update-battle-subs", + required=False, + dest="update_subs", + action="store_true", + help="(Deprecated)", + ) + + sp_extract.add_argument( + "--update-subs", + required=False, + action="store_true", + help="(Optional) - Update Battle and Fmv Subs", + ) + + sp_extract.add_argument( + "--single-build", + required=False, + action="store_true", + help="(Optional) - Create just a single iso instead", + ) + sp_insert = sp.add_parser( "insert", help="Take the new texts and recreate the files", diff --git a/pythonlib/formats/rebirth/theirsce.py b/pythonlib/formats/rebirth/theirsce.py index e1b1f66..9a5e63b 100644 --- a/pythonlib/formats/rebirth/theirsce.py +++ b/pythonlib/formats/rebirth/theirsce.py @@ -238,7 +238,7 @@ class Theirsce(FileIO): elif size_mask == 2: value = top << 16 | self.read_uint16() value = value | 0xFF000000 | 0xF80000 if signed else value - else: #if size_mask == 3: + elif size_mask == 3: value = self.read_uint32() # to signed diff --git a/pythonlib/games/ToolsTOR.py b/pythonlib/games/ToolsTOR.py index 2244456..92cdd5f 100644 --- a/pythonlib/games/ToolsTOR.py +++ b/pythonlib/games/ToolsTOR.py @@ -269,7 +269,7 @@ class ToolsTOR(ToolsTales): # sections.append(sub.off) # Setup three-way opcode generator - d = TheirsceBaseInstruction(); d.type = InstructionType.INVALID + d = TheirsceBaseInstruction(0); d.type = InstructionType.INVALID a,b,c = tee(theirsce.walk_code(), 3) next(a, d) next(b, d); next(b, d) @@ -863,12 +863,14 @@ class ToolsTOR(ToolsTales): f.write(data) else: dest_path = out_path / file_relpath - with FileIO(file_path, "r+b") as f: - data = self.get_new_menu(entry, f, xml_folder_path) - dest_path.parent.mkdir(parents=True, exist_ok=True) - with dest_path.open("wb") as f: + with FileIO(file_path, "r+b") as f: + data = f.read() + + with FileIO(dest_path, "wb") as f: f.write(data) + f.seek(0) + self.get_new_menu(entry, f, xml_folder_path) def pack_menu_file(self, root, pools: list[list[int]], base_offset: int, f: FileIO, monster_hack: bool) -> None: