Add Changes stack to ROM for saving
This commit is contained in:
@@ -306,12 +306,10 @@ void MasterEditor::DrawHelpMenu() {
|
||||
ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
ImGui::Text("File -> Open");
|
||||
ImGui::Text("Select a ROM file to open");
|
||||
ImGui::Text("Supported ROMs:");
|
||||
ImGui::Text("Supported ROMs (headered or unheadered):");
|
||||
ImGui::Text("The Legend of Zelda: A Link to the Past");
|
||||
ImGui::Text("US Version 1.0");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Must remove header before opening");
|
||||
ImGui::Text("Header is 0x200 bytes of data at the beginning of the ROM");
|
||||
ImGui::Text("JP Version 1.0");
|
||||
|
||||
if (ImGui::Button("Close", gui::kDefaultModalSize)) {
|
||||
open_rom_help = false;
|
||||
|
||||
@@ -245,13 +245,15 @@ void OverworldEditor::RenderUpdatedMapBitmap(const ImVec2 &click_position,
|
||||
|
||||
void OverworldEditor::QueueROMChanges(int index, ushort new_tile16) {
|
||||
// Store the changes made by the user to the ROM (or project file)
|
||||
overworld_.SaveOverworldMaps();
|
||||
if (!overworld_.CreateTile32Tilemap()) {
|
||||
// overworld_.SaveMap16Tiles();
|
||||
overworld_.SaveMap32Tiles();
|
||||
} else {
|
||||
std::cout << "Failed to create tile32 tilemap" << std::endl;
|
||||
}
|
||||
rom()->QueueChanges([&]() {
|
||||
overworld_.SaveOverworldMaps();
|
||||
if (!overworld_.CreateTile32Tilemap()) {
|
||||
// overworld_.SaveMap16Tiles();
|
||||
overworld_.SaveMap32Tiles();
|
||||
} else {
|
||||
std::cout << "Failed to create tile32 tilemap" << std::endl;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void OverworldEditor::DetermineActiveMap(const ImVec2 &mouse_position) {
|
||||
|
||||
Reference in New Issue
Block a user