diff --git a/TODDC_Test.py b/TODDC_Test.py new file mode 100644 index 0000000..2f510f6 --- /dev/null +++ b/TODDC_Test.py @@ -0,0 +1,18 @@ +import ToolsTODDC +import json +import struct +import comptolib +import io +import re +import string +import pandas as pd +import json +import os +import lxml.etree as etree + + +tool = ToolsTODDC.ToolsTODDC("toddc.tbl") + +ele = tool.menu_files_json[0] +tool.extract_Menu_File(ele) + diff --git a/ToolsTODDC.py b/ToolsTODDC.py index 58d97b3..e06df4c 100644 --- a/ToolsTODDC.py +++ b/ToolsTODDC.py @@ -42,7 +42,7 @@ class ToolsTODDC(ToolsTales): #self.icolors = dict([[i, j] for j, i in self.jsonTblTags['COLORS'].items()]) - with open("../{}/Data/{}/Menu/MenuFiles.json".format(self.repo_name, self.gameName)) as f: + with open("../{}/Data/Menu/MenuFiles.json".format(self.repo_name, self.gameName)) as f: self.menu_files_json = json.load(f) \ No newline at end of file diff --git a/ToolsTales.py b/ToolsTales.py index a364333..ecf6fe3 100644 --- a/ToolsTales.py +++ b/ToolsTales.py @@ -891,12 +891,14 @@ class ToolsTales: text_end = section['Text_End'] #Extract Pointers of the file + print("Extract Pointers") pointers_offset, pointers_value = self.get_special_pointers( text_start, text_end, base_offset, section['Pointer_Offset_Start'], section['Nb_Per_Block'], section['Step'], section['Section'], file_path) #Extract Text from the pointers + print("Extract Text") texts = [ self.bytes_to_text(f, ele + base_offset)[0] for ele in pointers_value] - + print(texts) #Make a list section_list.extend( [section['Section']] * len(texts)) diff --git a/__pycache__/ToolsTODDC.cpython-38.pyc b/__pycache__/ToolsTODDC.cpython-38.pyc new file mode 100644 index 0000000..21457e0 Binary files /dev/null and b/__pycache__/ToolsTODDC.cpython-38.pyc differ diff --git a/__pycache__/ToolsTales.cpython-38.pyc b/__pycache__/ToolsTales.cpython-38.pyc index ed9fca1..9141a6d 100644 Binary files a/__pycache__/ToolsTales.cpython-38.pyc and b/__pycache__/ToolsTales.cpython-38.pyc differ