Enhance overworld editor with music editing features and custom overworld support

- Added a new Music tab in the Map Properties panel for editing music tracks associated with different game states.
- Implemented functionality to save music data for both Light and Dark World maps.
- Updated feature flags to enable custom overworld features based on ASM version, improving flexibility for ROM modifications.
- Enhanced UI elements with tooltips and popups for better user guidance on custom overworld settings.
This commit is contained in:
scawful
2025-09-27 11:32:42 -04:00
parent 8fe90c4c50
commit c6490314f3
10 changed files with 337 additions and 44 deletions

View File

@@ -18,16 +18,21 @@ OverworldMap::OverworldMap(int index, Rom *rom)
: index_(index), parent_(index), rom_(rom) {
LoadAreaInfo();
if (core::FeatureFlags::get().overworld.kLoadCustomOverworld) {
// If the custom overworld ASM has NOT already been applied, manually set
// the vanilla values.
uint8_t asm_version = (*rom_)[OverworldCustomASMHasBeenApplied];
if (asm_version == 0x00) {
// Use ASM version byte as source of truth, with flag as override
uint8_t asm_version = (*rom_)[OverworldCustomASMHasBeenApplied];
bool use_custom_overworld = (asm_version != 0xFF) ||
core::FeatureFlags::get().overworld.kLoadCustomOverworld;
if (use_custom_overworld) {
if (asm_version == 0x00 || asm_version == 0xFF) {
// No custom ASM applied but flag enabled - set up vanilla values manually
LoadCustomOverworldData();
} else {
// Custom overworld ASM applied - set up custom tileset
SetupCustomTileset(asm_version);
}
}
// For vanilla ROMs without flag, LoadAreaInfo already handles everything
}
absl::Status OverworldMap::BuildMap(int count, int game_state, int world,