From 36cc07525b78f5f8b8d75ee625719ca23903c26b Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 25 Aug 2024 14:46:54 -0400 Subject: [PATCH] Refactor assembly_editor.cc, dungeon_editor.h, and overworld_editor.cc --- src/app/editor/code/assembly_editor.cc | 6 +++--- src/app/editor/dungeon/dungeon_editor.h | 1 - src/app/editor/overworld/overworld_editor.cc | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/editor/code/assembly_editor.cc b/src/app/editor/code/assembly_editor.cc index 77f6f240..fb78f06e 100644 --- a/src/app/editor/code/assembly_editor.cc +++ b/src/app/editor/code/assembly_editor.cc @@ -58,11 +58,11 @@ core::FolderItem LoadFolder(const std::string& folder) { auto root_files = FileDialogWrapper::GetFilesInFolder(current_folder.name); current_folder.files = RemoveIgnoredFiles(root_files, ignored_files); - for (const auto& folder : + for (const auto& subfolder : FileDialogWrapper::GetSubdirectoriesInFolder(current_folder.name)) { core::FolderItem folder_item; - folder_item.name = folder; - std::string full_folder = current_folder.name + "/" + folder; + folder_item.name = subfolder; + std::string full_folder = current_folder.name + "/" + subfolder; auto folder_files = FileDialogWrapper::GetFilesInFolder(full_folder); for (const auto& files : folder_files) { // Remove subdirectory files diff --git a/src/app/editor/dungeon/dungeon_editor.h b/src/app/editor/dungeon/dungeon_editor.h index ce549607..3e5536ba 100644 --- a/src/app/editor/dungeon/dungeon_editor.h +++ b/src/app/editor/dungeon/dungeon_editor.h @@ -99,7 +99,6 @@ class DungeonEditor : public Editor, bool object_loaded_ = false; bool palette_showing_ = false; bool refresh_graphics_ = false; - bool show_object_render_ = false; uint16_t current_entrance_id_ = 0; uint16_t current_room_id_ = 0; diff --git a/src/app/editor/overworld/overworld_editor.cc b/src/app/editor/overworld/overworld_editor.cc index 361a1e01..42965208 100644 --- a/src/app/editor/overworld/overworld_editor.cc +++ b/src/app/editor/overworld/overworld_editor.cc @@ -64,7 +64,6 @@ absl::Status OverworldEditor::Update() { RETURN_IF_ERROR(tile16_editor_.InitBlockset( tile16_blockset_bmp_, current_gfx_bmp_, tile16_individual_, *overworld_.mutable_all_tiles_types())); - gfx_group_editor_.InitBlockset(&tile16_blockset_bmp_); RETURN_IF_ERROR(LoadEntranceTileTypes(*rom())); all_gfx_loaded_ = true; } @@ -989,7 +988,7 @@ absl::Status OverworldEditor::LoadGraphics() { tile16_individual_.reserve(kNumTile16Individual); // Loop through the tiles and copy their pixel data into separate vectors - for (int i = 0; i < kNumTile16Individual; i++) { + for (uint i = 0; i < kNumTile16Individual; i++) { std::vector tile_data(kTile16Size * kTile16Size, 0x00); // Copy the pixel data for the current tile into the vector