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:
@@ -1,3 +1,4 @@
|
||||
import bsdiff4
|
||||
import binascii
|
||||
import Utils
|
||||
|
||||
@@ -6,9 +7,13 @@ h2b = binascii.unhexlify
|
||||
|
||||
|
||||
class ROM:
|
||||
def __init__(self, filename):
|
||||
def __init__(self, filename, patches=None):
|
||||
data = open(Utils.user_path(filename), "rb").read()
|
||||
#assert len(data) == 1024 * 1024
|
||||
|
||||
if patches:
|
||||
for patch in patches:
|
||||
data = bsdiff4.patch(data, patch)
|
||||
|
||||
self.banks = []
|
||||
for n in range(0x40):
|
||||
self.banks.append(bytearray(data[n*0x4000:(n+1)*0x4000]))
|
||||
|
||||
Reference in New Issue
Block a user