Make ExperimentFlags a singleton, remove inheritance relationships

This commit is contained in:
scawful
2024-12-31 18:13:53 -05:00
parent 5e1e2901ff
commit d3eca0f950
16 changed files with 69 additions and 82 deletions

View File

@@ -314,9 +314,12 @@ absl::Status Rom::SaveToFile(bool backup, bool save_new, std::string filename) {
}
// Run the other save functions
if (flags()->kSaveAllPalettes) RETURN_IF_ERROR(SaveAllPalettes());
if (flags()->kSaveGfxGroups) RETURN_IF_ERROR(SaveGroupsToRom());
if (flags()->kSaveGraphicsSheet) RETURN_IF_ERROR(SaveAllGraphicsData());
if (core::ExperimentFlags::get().kSaveAllPalettes)
RETURN_IF_ERROR(SaveAllPalettes());
if (core::ExperimentFlags::get().kSaveGfxGroups)
RETURN_IF_ERROR(SaveGroupsToRom());
if (core::ExperimentFlags::get().kSaveGraphicsSheet)
RETURN_IF_ERROR(SaveAllGraphicsData());
if (save_new) {
// Create a file of the same name and append the date between the filename