-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic filesystem patching support #11
Draft
patataofcourse
wants to merge
15
commits into
master
Choose a base branch
from
fs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting a PR to more easily see changes. This is still very much a WIP.
The purpose of this is to load files from a specific folder in the SD - later on functionality will be added for Barista to load mod files into this folder. This "LayeredFS" implementation respects Megamix's order in file loading*.
There's also a split of Hooks.cpp into several different files - this is most likely only the first step in reorganization cause things are currently a mess.
TODO:
Since the whole "region/language folders" stuff was added on localization, JP support here would be more involved. For that reason, we'll be leaving that for the future.
* Megamix loads files for specific regions and languages in this order:
RELAfolder
->REfolder
->folder
...where
RE
is the code for the specific region (JP/US/EU/KR) andLA
is the code for the specific language (JP/EN/GE/IT/FR/ES/KR).Usual LayeredFS implementations will therefore result in the game's region-specific files taking precedence over the mod's region-generic files, due to the order in checking becoming:
mod/RELAfolder
->game/RELAfolder
->mod/REfolder
->game/REfolder
->mod/folder
->game/folder
This would mean that, for example, a modded file placed in
cellanim
instead ofUScellanim
would get ignored by the game, since the original version would be found first.This implementation instead always tries to load the modded files first and foremost, removing the need to duplicate substituted files in different regions/languages. The way Saltwater goes about loading files is:
mod/RELAfolder
->mod/REfolder
->mod/folder
->game/RELAfolder
->game/REfolder
->game/folder
This means that this implementation had to be specifically tailored to Megamix's file loading system, which unfortunately puts a lot more of a burden on us (since we can't just use one of the existing solutions out there).