mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
LADX: AP egg title screen (#1683)
This commit is contained in:
@@ -2,6 +2,7 @@ import binascii
|
||||
import importlib.util
|
||||
import importlib.machinery
|
||||
import os
|
||||
import pkgutil
|
||||
|
||||
from .romTables import ROMWithTables
|
||||
from . import assembler
|
||||
@@ -61,7 +62,12 @@ from ..Options import TrendyGame, Palette, MusicChangeCondition
|
||||
|
||||
# Function to generate a final rom, this patches the rom with all required patches
|
||||
def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, multiworld=None, player_name=None, player_names=[], player_id = 0):
|
||||
rom = ROMWithTables(args.input_filename)
|
||||
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 = []
|
||||
if args.pymod:
|
||||
@@ -271,6 +277,8 @@ def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, m
|
||||
|
||||
patches.core.warpHome(rom) # Needs to be done after setting the start location.
|
||||
patches.titleScreen.setRomInfo(rom, auth, seed_name, settings, player_name, player_id)
|
||||
if ap_settings["ap_title_screen"]:
|
||||
patches.titleScreen.setTitleGraphics(rom)
|
||||
patches.endscreen.updateEndScreen(rom)
|
||||
patches.aesthetics.updateSpriteData(rom)
|
||||
if args.doubletrouble:
|
||||
@@ -363,15 +371,7 @@ def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, m
|
||||
if x > max:
|
||||
return max
|
||||
return x
|
||||
def bin_to_rgb(word):
|
||||
red = word & 0b11111
|
||||
word >>= 5
|
||||
green = word & 0b11111
|
||||
word >>= 5
|
||||
blue = word & 0b11111
|
||||
return (red, green, blue)
|
||||
def rgb_to_bin(r, g, b):
|
||||
return (b << 10) | (g << 5) | r
|
||||
from patches.aesthetics import rgb_to_bin, bin_to_rgb
|
||||
|
||||
for address in range(start, end, 2):
|
||||
packed = (rom.banks[bank][address + 1] << 8) | rom.banks[bank][address]
|
||||
|
||||
Reference in New Issue
Block a user