Refactor ROM save functionality to use structured settings

- Introduced a new SaveSettings struct to encapsulate parameters for the SaveToFile method, improving clarity and maintainability.
- Updated SaveToFile method signature to accept SaveSettings instead of individual parameters.
- Adjusted SaveRom method in EditorManager to utilize the new SaveSettings struct for better parameter management.
- Removed redundant label loading from LoadFromFile when z3_load is true, streamlining the loading process.
This commit is contained in:
scawful
2025-05-13 21:00:53 -04:00
parent 0863b7c606
commit 8d34ebf534
3 changed files with 24 additions and 10 deletions

View File

@@ -576,7 +576,10 @@ absl::Status EditorManager::SaveRom() {
RETURN_IF_ERROR(
SaveAllGraphicsData(*current_rom_, gfx::Arena::Get().gfx_sheets()));
return current_rom_->SaveToFile(backup_rom_, save_new_auto_);
Rom::SaveSettings settings;
settings.backup = backup_rom_;
settings.save_new = save_new_auto_;
return current_rom_->SaveToFile(settings);
}
absl::Status EditorManager::OpenRomOrProject(const std::string &filename) {