mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
LADX: fix egg sprite in non-patched gfx mode (#1699)
This commit is contained in:
@@ -64,9 +64,6 @@ from ..Options import TrendyGame, Palette, MusicChangeCondition
|
||||
def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, multiworld=None, player_name=None, player_names=[], player_id = 0):
|
||||
rom_patches = []
|
||||
|
||||
if ap_settings["ap_title_screen"]:
|
||||
rom_patches.append(pkgutil.get_data(__name__, "patches/title_screen.bdiff4"))
|
||||
|
||||
rom = ROMWithTables(args.input_filename, rom_patches)
|
||||
rom.player_names = player_names
|
||||
pymods = []
|
||||
@@ -416,9 +413,7 @@ def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, m
|
||||
assert(len(auth) == 12)
|
||||
rom.patch(0x00, SEED_LOCATION, None, binascii.hexlify(auth))
|
||||
|
||||
|
||||
for pymod in pymods:
|
||||
pymod.postPatch(rom)
|
||||
|
||||
|
||||
return rom
|
||||
|
@@ -1,5 +1,8 @@
|
||||
import binascii
|
||||
import bsdiff4
|
||||
import os
|
||||
import pkgutil
|
||||
import tempfile
|
||||
|
||||
from BaseClasses import Entrance, Item, ItemClassification, Location, Tutorial
|
||||
from Fill import fill_restrictive
|
||||
@@ -406,10 +409,18 @@ class LinksAwakeningWorld(World):
|
||||
player_names=all_names,
|
||||
player_id = self.player)
|
||||
|
||||
handle = open(out_path, "wb")
|
||||
rom.save(handle, name="LADXR")
|
||||
with open(out_path, "wb") as handle:
|
||||
rom.save(handle, name="LADXR")
|
||||
|
||||
# Write title screen after everything else is done - full gfxmods may stomp over the egg tiles
|
||||
if self.player_options["ap_title_screen"]:
|
||||
with tempfile.NamedTemporaryFile(delete=False) as title_patch:
|
||||
title_patch.write(pkgutil.get_data(__name__, "LADXR/patches/title_screen.bdiff4"))
|
||||
|
||||
bsdiff4.file_patch_inplace(out_path, title_patch.name)
|
||||
os.unlink(title_patch.name)
|
||||
|
||||
|
||||
handle.close()
|
||||
patch = LADXDeltaPatch(os.path.splitext(out_path)[0]+LADXDeltaPatch.patch_file_ending, player=self.player,
|
||||
player_name=self.multiworld.player_name[self.player], patched_path=out_path)
|
||||
patch.write()
|
||||
|
Reference in New Issue
Block a user