revert to using flips; build script coming soon
This commit is contained in:
parent
b0197733d0
commit
5e214fb3eb
|
@ -24,7 +24,7 @@ Caveat emptor: the project is already diverging from the original decompilation
|
|||
- [x] Logic
|
||||
- [x] Reconstructing missing parts of code
|
||||
- [x] Patching
|
||||
- [ ] Generating BPS patches
|
||||
- [x] Generating BPS patches (python-bps-continued used to apply base patch as it's platform independent, but FLIPS to generate BPS files)
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -32,6 +32,8 @@ Beware: stuff doesn't _fully_ work as it should yet. Prerequisites are PySimpleG
|
|||
|
||||
Clone the repository, install prerequisites manually via pip or your favourite package manager, `python MFOR.py`. Choose your game options (hover over a given option to see a tooltip explaining it), then click Generate. A popup will ask you to open an unmodified copy of the original game. This is not provided with the randomizer for legal reasons.
|
||||
|
||||
To build FLIPS (present as a submodule), prerequisites are a C++ compiler, `libgomp` and `libgomp-devel`. Refer to [its README](https://github.com/Alcaro/Flips) for further info.
|
||||
|
||||
The randomizer currently works with **only** the USA/Australia version of the game. To ensure you have the correct version of the game, the CRC32 checksum should be: `6C75479C`
|
||||
|
||||
## Help
|
||||
|
|
|
@ -23,9 +23,6 @@ import math
|
|||
import Fusion_Graph as Graph
|
||||
from Fusion_Items import *
|
||||
from bps.apply import apply_to_files
|
||||
from bps.diff import diff_bytearrays
|
||||
from bps.io import write_bps
|
||||
from bps.util import bps_progress
|
||||
|
||||
version = '0.11.6+chozo1'
|
||||
|
||||
|
@ -2862,17 +2859,12 @@ def patch_game():
|
|||
patchedGame.write(value.to_bytes(1, 'little'))
|
||||
|
||||
if Patch:
|
||||
with open(BaseGame, 'rb') as source:
|
||||
sourcedata = source.read()
|
||||
with open(os.path.join('.', 'seeds', '{}.gba'.format(FileName)), 'rb') as target:
|
||||
targetdata = target.read()
|
||||
|
||||
blocksize = (len(sourcedata) + len(targetdata)) // 1000000 + 1
|
||||
print("Using blocks of {0} bytes".format(blocksize))
|
||||
|
||||
iterable = diff_bytearrays(blocksize, sourcedata, targetdata)
|
||||
with open(os.path.join('.', 'seeds', '{}.bps'.format(FileName)), 'wb') as patch:
|
||||
write_bps(bps_progress(iterable), patch)
|
||||
if os.path.exists(os.path.join('.', 'flips', 'flips.exe')):
|
||||
os.system('.\\flips\\flips.exe --create --bps "{}" ".\\seeds\\{}.gba"'.format(BaseGame, FileName))
|
||||
elif os.path.exists(os.path.join('.', 'flips', 'flips')):
|
||||
os.system('{} --create --bps "{}" "{}"'.format(os.path.join('.', 'flips', 'flips'), BaseGame, os.path.join('.', 'seeds', FileName + '.gba')))
|
||||
else:
|
||||
print('FLIPS is missing. Did you remember to build it?')
|
||||
|
||||
print('')
|
||||
|
||||
|
|
Loading…
Reference in a new issue