mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
SM: 20221101 update (#1479)
This adds support to most of Varia's 20221101 update. Notably, added Options for: - Objectives - Tourian - RelaxedRoundRobinCF As well as previously unsupported Options: - EscapeRando - RemoveEscapeEnemies - HideItems
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import itertools
|
||||
import itertools, math
|
||||
|
||||
from ..utils.utils import range_union, openFile
|
||||
|
||||
@@ -9,9 +9,14 @@ class IPS_Patch(object):
|
||||
self.truncate_length = None
|
||||
self.max_size = 0
|
||||
if patchDict is not None:
|
||||
recMaxSize = 0xffff
|
||||
for addr, data in patchDict.items():
|
||||
byteData = bytearray(data)
|
||||
self.add_record(addr, byteData)
|
||||
nrecs = int(math.ceil(float(len(data))/recMaxSize))
|
||||
for i in range(nrecs):
|
||||
start = i*recMaxSize
|
||||
end = min((i+1)*recMaxSize, len(data))
|
||||
byteData = bytearray(data[start:end])
|
||||
self.add_record(addr+start, byteData)
|
||||
|
||||
def toDict(self):
|
||||
ret = {}
|
||||
|
||||
Reference in New Issue
Block a user