feat: Implement ROM Saving Functionality and Update Success Message

- Added functionality to save the modified graphics sheet to the ROM after import, ensuring changes are preserved.
- Updated success message to confirm the ROM has been saved and display the filename for better user feedback.
This commit is contained in:
scawful
2025-10-05 12:21:53 -04:00
parent cbe8a3c6d1
commit 744c49ffc8

View File

@@ -81,9 +81,13 @@ absl::Status GfxImport::Run(const std::vector<std::string>& arg_vec) {
sheet.set_data(cgx_loaded);
// TODO: Implement saving the modified graphics sheet back to the ROM.
auto save_status = rom_.SaveToFile({.save_new = false});
if (!save_status.ok()) {
return save_status;
}
std::cout << "Successfully imported graphics sheet " << sheet_id << " from " << input_file << std::endl;
std::cout << "(Saving to ROM not yet implemented)" << std::endl;
std::cout << "✅ ROM saved to: " << rom_.filename() << std::endl;
return absl::OkStatus();
}