Add ZSCustomOverworld ASM patch application feature

- Introduced a new feature flag to enable the application of ZSCustomOverworld ASM patches when upgrading ROM versions.
- Updated the OverworldEditor to include a dialog for upgrading ROM versions, with options to apply ASM patches based on the feature flag.
- Enhanced the DrawOverworldMapSettings method to dynamically adjust UI elements based on the ROM version and provide upgrade options.
- Implemented the ApplyZSCustomOverworldASM method to handle the patch application process, including error handling and logging.
- Updated feature flags display in the UI to reflect the new ASM patch application option, improving user experience and functionality.
This commit is contained in:
scawful
2025-09-25 15:28:39 -04:00
parent 83dbee155b
commit dcb98f6a45
3 changed files with 296 additions and 37 deletions

View File

@@ -60,6 +60,9 @@ class FeatureFlags {
// Load custom overworld data from the ROM and enable UI.
bool kLoadCustomOverworld = false;
// Apply ZSCustomOverworld ASM patches when upgrading ROM versions.
bool kApplyZSCustomOverworldASM = false;
} overworld;
};
@@ -93,6 +96,10 @@ class FeatureFlags {
std::to_string(get().overworld.kSaveOverworldItems) + "\n";
result += "kSaveOverworldProperties: " +
std::to_string(get().overworld.kSaveOverworldProperties) + "\n";
result += "kLoadCustomOverworld: " +
std::to_string(get().overworld.kLoadCustomOverworld) + "\n";
result += "kApplyZSCustomOverworldASM: " +
std::to_string(get().overworld.kApplyZSCustomOverworldASM) + "\n";
return result;
}
};
@@ -120,6 +127,8 @@ struct FlagsMenu {
&FeatureFlags::get().overworld.kSaveOverworldProperties);
Checkbox("Load Custom Overworld",
&FeatureFlags::get().overworld.kLoadCustomOverworld);
Checkbox("Apply ZSCustomOverworld ASM",
&FeatureFlags::get().overworld.kApplyZSCustomOverworldASM);
}
void DrawDungeonFlags() {