Compare commits
No commits in common. "0a1e3e0cad0447bbbfec2cdb65f79a2b21107ea3" and "bd7e1bc15df20ba6261109229d17a6177539bcb0" have entirely different histories.
0a1e3e0cad
...
bd7e1bc15d
|
@ -1,12 +1,3 @@
|
||||||
# OpenMFOR
|
|
||||||
# credits manually reinstated due to the comments being lost from the object code decompilation
|
|
||||||
|
|
||||||
# Original release is Copyright (C) 2022 Kazuto88
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# Source Generated with Decompyle++
|
# Source Generated with Decompyle++
|
||||||
# File: Fusion_Graph.pyc (Python 3.8)
|
# File: Fusion_Graph.pyc (Python 3.8)
|
||||||
|
|
||||||
|
@ -15,7 +6,7 @@ import sys
|
||||||
|
|
||||||
class Game:
|
class Game:
|
||||||
|
|
||||||
def __init__(self, vanillaGame, randoSettings=None):
|
def __init__(self, vanillaGame, randoSettings = (None,)):
|
||||||
self.graph = dict()
|
self.graph = dict()
|
||||||
self.areaConnections = dict()
|
self.areaConnections = dict()
|
||||||
self.areaConnectionOffsets = dict()
|
self.areaConnectionOffsets = dict()
|
||||||
|
@ -50,7 +41,7 @@ class Game:
|
||||||
sourceDoor = int.from_bytes(sourceRom.read(1), 'little')
|
sourceDoor = int.from_bytes(sourceRom.read(1), 'little')
|
||||||
targetOffset = sourceRom.tell()
|
targetOffset = sourceRom.tell()
|
||||||
targetArea = int.from_bytes(sourceRom.read(1), 'little')
|
targetArea = int.from_bytes(sourceRom.read(1), 'little')
|
||||||
while sourceArea != 255:
|
if sourceArea != 255:
|
||||||
self.areaConnections.update({
|
self.areaConnections.update({
|
||||||
'S{}-{:02X}'.format(sourceArea, sourceDoor): targetArea })
|
'S{}-{:02X}'.format(sourceArea, sourceDoor): targetArea })
|
||||||
self.areaConnectionOffsets.update({
|
self.areaConnectionOffsets.update({
|
||||||
|
@ -91,7 +82,7 @@ class Game:
|
||||||
doorString]
|
doorString]
|
||||||
doorNumber += 1
|
doorNumber += 1
|
||||||
# print('DEBUG: Parsing seemingly done?')
|
# print('DEBUG: Parsing seemingly done?')
|
||||||
except FileNotFoundError:
|
except:
|
||||||
print('Error:', vanillaGame, 'could not be opened.')
|
print('Error:', vanillaGame, 'could not be opened.')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@ -212,44 +203,48 @@ class Game:
|
||||||
checkRequirement = (start, end)
|
checkRequirement = (start, end)
|
||||||
return self.requirements.get(checkRequirement)
|
return self.requirements.get(checkRequirement)
|
||||||
|
|
||||||
def get_path(self, start, end, LimitArea=False, path=None, depth=100):
|
def get_path(self, start, end, LimitArea, path, depth = (False, None, 100)):
|
||||||
if path == None:
|
if path == None:
|
||||||
self.visited.clear()
|
self.visited.clear()
|
||||||
self.queue.clear()
|
self.queue.clear()
|
||||||
path = list()
|
path = list()
|
||||||
path = path + [start]
|
path = path + [
|
||||||
|
start]
|
||||||
if start not in self.graph:
|
if start not in self.graph:
|
||||||
return None
|
return None
|
||||||
if start == end:
|
if None == end:
|
||||||
return path
|
return path
|
||||||
if len(path) >= depth:
|
# if None(path) >= depth:
|
||||||
|
if path >= depth:
|
||||||
return None
|
return None
|
||||||
for point in self.graph[start]:
|
for point in None.graph[start]:
|
||||||
if point in self.itemLocations:
|
if point in self.itemLocations and point not in end:
|
||||||
if point not in end:
|
continue
|
||||||
continue
|
|
||||||
if point in path:
|
if point in path:
|
||||||
continue
|
continue
|
||||||
if LimitArea:
|
if LimitArea:
|
||||||
for area in range(0, 7):
|
for area in range(0, 7):
|
||||||
if 'S{}'.format(area) in start:
|
if 'S{}'.format(area) in start and 'S{}'.format(area) not in point:
|
||||||
if 'S{}'.format(area) not in point:
|
return None
|
||||||
return None
|
edge = (start, point)
|
||||||
edge = (start, point)
|
self.queue.append(edge)
|
||||||
self.queue.append(edge)
|
if self.queue:
|
||||||
while self.queue:
|
edge = self.queue.pop()
|
||||||
edge = self.queue.pop()
|
if edge not in self.visited:
|
||||||
if edge not in self.visited:
|
self.visited.append(edge)
|
||||||
self.visited.append(edge)
|
node = edge[1]
|
||||||
node = edge[1]
|
pathReqs = self.get_requirements(start, node)
|
||||||
pathReqs = self.get_requirements(start, node)
|
if pathReqs == None:
|
||||||
if pathReqs == None:
|
newpath = self.get_path(node, end, LimitArea, path, depth)
|
||||||
newpath = self.get_path(node, end, LimitArea, path, depth)
|
if newpath:
|
||||||
if newpath:
|
path = path + [
|
||||||
path = path + [node]
|
node]
|
||||||
return newpath
|
return newpath
|
||||||
elif pathReqs == True:
|
if pathReqs == True:
|
||||||
newpath = self.get_path(node, end, LimitArea, path, depth)
|
newpath = self.get_path(node, end, LimitArea, path, depth)
|
||||||
if newpath:
|
if newpath:
|
||||||
path = path + [node]
|
path = path + [
|
||||||
return newpath
|
node]
|
||||||
|
return newpath
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
# OpenMFOR
|
|
||||||
# credits manually reinstated due to the comments being lost from the object code decompilation
|
|
||||||
|
|
||||||
# Original release is Copyright (C) 2022 Kazuto88
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# Source Generated with Decompyle++
|
# Source Generated with Decompyle++
|
||||||
# File: Fusion_Items.pyc (Python 3.8)
|
# File: Fusion_Items.pyc (Python 3.8)
|
||||||
|
|
||||||
|
|
9
GUI.py
9
GUI.py
|
@ -1,12 +1,3 @@
|
||||||
# OpenMFOR
|
|
||||||
# credits manually reinstated due to the comments being lost from the object code decompilation
|
|
||||||
|
|
||||||
# Original release is Copyright (C) 2022 Kazuto88
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# Source Generated with Decompyle++
|
# Source Generated with Decompyle++
|
||||||
# File: GUI.pyc (Python 3.8)
|
# File: GUI.pyc (Python 3.8)
|
||||||
|
|
||||||
|
|
9
MFOR.py
9
MFOR.py
|
@ -1,12 +1,3 @@
|
||||||
# OpenMFOR
|
|
||||||
# credits manually reinstated due to the comments being lost from the object code decompilation
|
|
||||||
|
|
||||||
# Original release is Copyright (C) 2022 Kazuto88
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# Source Generated with Decompyle++
|
# Source Generated with Decompyle++
|
||||||
# File: MFOR.pyc (Python 3.8)
|
# File: MFOR.pyc (Python 3.8)
|
||||||
|
|
||||||
|
|
14
README.md
14
README.md
|
@ -4,23 +4,13 @@ This is the official unofficial Git repository for the Metroid Fusion Open Rando
|
||||||
|
|
||||||
Considering the original repository states that the software is GPL-3.0 licensed, but no source was ever released, we're endeavouring on this (potentially failing) task of making MFOR Open Again️™️
|
Considering the original repository states that the software is GPL-3.0 licensed, but no source was ever released, we're endeavouring on this (potentially failing) task of making MFOR Open Again️™️
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
* [OpenMFOR repository][] (This project, in case you are looking at a fork)
|
|
||||||
* The [original MFOR repository][] on Github
|
|
||||||
* The [original MFOR thread][] on Metroid Construction
|
|
||||||
|
|
||||||
[OpenMFOR]: https://git.inabaudonge.reisen/OpenMFOR/OpenMFOR
|
|
||||||
[original MFOR repository]: https://github.com/Kazuto88/MFOR
|
|
||||||
[original MFOR thread]: https://forum.metroidconstruction.com/index.php/topic,5376.0.html
|
|
||||||
|
|
||||||
## Project Status
|
## Project Status
|
||||||
|
|
||||||
- [x] Decent disassembly
|
- [x] Decent disassembly
|
||||||
- [x] GUI
|
- [x] GUI
|
||||||
- [x] CRC verification
|
- [x] CRC verification
|
||||||
- [x] Logic
|
- [ ] Logic
|
||||||
- [x] Reconstructing missing parts of code
|
- [ ] Reconstructing missing parts of code
|
||||||
- [x] Patching
|
- [x] Patching
|
||||||
- [ ] Generating BPS patches
|
- [ ] Generating BPS patches
|
||||||
|
|
||||||
|
|
7201
Randomizer.py
7201
Randomizer.py
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue