LADX: generate without rom (#4278)

This commit is contained in:
threeandthreee
2025-07-26 16:16:00 -04:00
committed by GitHub
parent fa49fef695
commit 7a8048a8fd
11 changed files with 317 additions and 290 deletions

View File

@@ -181,8 +181,8 @@ class IndoorRoomSpriteData(PointerTable):
class ROMWithTables(ROM):
def __init__(self, filename, patches=None):
super().__init__(filename, patches)
def __init__(self, data, patches=None):
super().__init__(data, patches)
# Ability to patch any text in the game with different text
self.texts = Texts(self)
@@ -203,7 +203,7 @@ class ROMWithTables(ROM):
self.itemNames = {}
def save(self, filename, *, name=None):
def save(self):
# Assert special handling of bank 9 expansion is fine
for i in range(0x3d42, 0x4000):
assert self.banks[9][i] == 0, self.banks[9][i]
@@ -221,4 +221,4 @@ class ROMWithTables(ROM):
self.room_sprite_data_indoor.store(self)
self.background_tiles.store(self)
self.background_attributes.store(self)
super().save(filename, name=name)
return super().save()