Skip to content

Commit

Permalink
Merge branch 'new-structure' of https://github.com/lifebottle/Tales-o…
Browse files Browse the repository at this point in the history
…f-Hearts-DS into new-structure
  • Loading branch information
Fis-Ura committed Oct 14, 2024
2 parents e1dd892 + 1dd476e commit 731cd7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/pythonlib/formats/fps4.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def extract_files(self, destination_path:Path, copy_path:Path, decompressed=Fals

#Decompress using LZ10 or LZ11
if decompressed:
args = ['lzss', '-d', destination_path / file.name]
subprocess.run(args, cwd=Path.cwd() / 'tools/pythonlib/utils', stdout = subprocess.DEVNULL)
args = [Path.cwd() / 'tools/pythonlib/utils/lzss', '-d', destination_path / file.name]
subprocess.run(args, stdout = subprocess.DEVNULL)

with open(destination_path / file.name, 'rb') as f:
head = f.read(4)
Expand All @@ -145,10 +145,10 @@ def extract_files(self, destination_path:Path, copy_path:Path, decompressed=Fals
def compress_file(self, updated_file_path:Path, file_name:str, c_type:str):
args = []
if c_type == 'LZ10':
args = ['lzss', '-evn', updated_file_path / file_name]
args = [Path.cwd() / 'tools/pythonlib/utils/lzss', '-evn', updated_file_path / file_name]
elif c_type == "LZ11":
args = ['lzx', '-evb', updated_file_path / file_name]
subprocess.run(args, cwd=Path.cwd() / 'tools/pythonlib/utils', stdout = subprocess.DEVNULL)
args = [Path.cwd() / 'tools/pythonlib/utils/lzx', '-evb', updated_file_path / file_name]
subprocess.run(args, stdout = subprocess.DEVNULL)

def pack_fps4_type1(self, updated_file_path:Path, destination_folder:Path):
buffer = 0
Expand Down

0 comments on commit 731cd7c

Please sign in to comment.