1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-29 18:31:19 +00:00

all versions OK

This commit is contained in:
Dragorn421 2025-02-09 20:32:18 +01:00
parent dae083d039
commit ad6ff6df27
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335
7 changed files with 28 additions and 11 deletions

View file

@ -120,8 +120,21 @@ def process_pool(
range_start, range_end = rescoll.backing_memory.range
data = data[range_start:range_end]
if isinstance(rescoll.start_address, VRAMStartAddress):
if rescoll.start_address.vram % 8 == 0:
alignment = 8
elif rescoll.start_address.vram % 4 == 0:
alignment = 4
else:
raise NotImplementedError(
f"alignment for {rescoll.start_address.vram=:#08X}"
)
elif isinstance(rescoll.start_address, SegmentStartAddress):
alignment = 8
else:
raise NotImplementedError(rescoll.start_address)
# TODO File.name
file = File(rescoll.backing_memory.name, data=data)
file = File(rescoll.backing_memory.name, data=data, alignment=alignment)
file_by_rescoll[rescoll] = file
(