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:
lordlou
2023-04-09 18:35:46 -04:00
committed by GitHub
parent 0bc5a3bc8d
commit 6059b5ef66
78 changed files with 3214 additions and 24689 deletions

View File

@@ -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 = {}