This commit is contained in:
Alex Bates 2021-02-04 18:48:19 +00:00
parent 6b1367d212
commit d72e0079e8
3 changed files with 5 additions and 5 deletions

View File

@ -47,8 +47,7 @@ def read_splat(splat_config: str):
for segment in all_segments:
for subdir, path, obj_type, start in segment.get_ld_files():
print(path)
path = (segment.name if segment.name.endswith("/") else "") + subdir + "/" + path
path = subdir + "/" + path
objects.add(path)
segments[path] = segment

View File

@ -46,7 +46,7 @@ def get_funcs_defined_in_c(c_file):
class N64SegCode(N64Segment):
def parse_segment_files(self, segment, seg_start, seg_end, seg_name, seg_vram):
prefix = "" if seg_name.endswith("/") else f"{seg_name}_"
prefix = seg_name if seg_name.endswith("/") else f"{seg_name}_"
ret = []
prev_start = -1
@ -70,6 +70,8 @@ class N64SegCode(N64Segment):
if not name:
name = self.get_default_name(start) if seg_name == self.get_default_name(seg_start) else f"{prefix}{start:X}"
elif seg_name.endswith("/"):
name = seg_name + name
vram = seg_vram + (start - seg_start)
@ -735,7 +737,6 @@ class N64SegCode(N64Segment):
c_path = os.path.join(
base_path,
"src",
self.name if self.name.endswith("/") else "",
split_file["name"] + "." + self.get_ext(split_file["subtype"])
)

View File

@ -130,7 +130,7 @@ class Segment:
for subdir, path, obj_type, start in self.get_ld_files():
# Hack for non-0x10 alignment
if start % 0x10 != 0 and i != 0:
tmp_sect_name = os.path.join(subdir, path).replace(".", "_")
tmp_sect_name = path.replace(".", "_")
tmp_sect_name = tmp_sect_name.replace("/", "_")
tmp_vram = start - self.rom_start + self.vram_start
s += (