diff --git a/src/app/editor/code/memory_editor.h b/src/app/editor/code/memory_editor.h index bb2f2e3f..01ecc981 100644 --- a/src/app/editor/code/memory_editor.h +++ b/src/app/editor/code/memory_editor.h @@ -8,14 +8,13 @@ #include "app/editor/code/assembly_editor.h" #include "app/editor/code/memory_editor.h" #include "app/editor/dungeon/dungeon_editor.h" +#include "app/editor/editor.h" #include "app/editor/graphics/graphics_editor.h" #include "app/editor/graphics/palette_editor.h" #include "app/editor/graphics/screen_editor.h" #include "app/editor/music/music_editor.h" #include "app/editor/overworld/overworld_editor.h" #include "app/editor/sprite/sprite_editor.h" -#include "app/editor/editor.h" -#include "app/editor/utils/gfx_context.h" #include "app/emu/emulator.h" #include "app/gfx/snes_palette.h" #include "app/gfx/snes_tile.h" diff --git a/src/app/editor/editor.cmake b/src/app/editor/editor.cmake index 4f8351ad..2a0516f3 100644 --- a/src/app/editor/editor.cmake +++ b/src/app/editor/editor.cmake @@ -14,7 +14,6 @@ set( app/editor/graphics/palette_editor.cc app/editor/graphics/tile16_editor.cc app/editor/graphics/gfx_group_editor.cc - app/editor/utils/gfx_context.cc app/editor/overworld/entity.cc app/editor/system/settings_editor.cc app/editor/system/command_manager.cc diff --git a/src/app/editor/editor.h b/src/app/editor/editor.h index 85b11df0..b6d6ccf6 100644 --- a/src/app/editor/editor.h +++ b/src/app/editor/editor.h @@ -1,7 +1,14 @@ #ifndef YAZE_APP_CORE_EDITOR_H #define YAZE_APP_CORE_EDITOR_H +#include + #include "absl/status/status.h" +#include "app/editor/system/command_manager.h" +#include "app/editor/system/constant_manager.h" +#include "app/editor/system/extension_manager.h" +#include "app/editor/system/history_manager.h" +#include "app/editor/system/resource_manager.h" namespace yaze { namespace app { @@ -12,6 +19,14 @@ namespace app { */ namespace editor { +struct EditorContext { + static ConstantManager constant_manager; + static CommandManager command_manager; + static ExtensionManager extension_manager; + static HistoryManager history_manager; + static ResourceManager resource_manager; +}; + enum class EditorType { kAssembly, kDungeon, @@ -25,7 +40,7 @@ enum class EditorType { kSettings, }; -constexpr std::array kEditorNames = { +constexpr std::array kEditorNames = { "Assembly", "Dungeon", "Graphics", "Music", "Overworld", "Palette", "Screen", "Sprite", "Message", "Settings", }; @@ -37,7 +52,7 @@ constexpr std::array kEditorNames = { * Provides basic editing operations that each editor should implement. */ class Editor { - public: +public: Editor() = default; virtual ~Editor() = default; @@ -54,8 +69,9 @@ class Editor { EditorType type() const { return type_; } - protected: +protected: EditorType type_; + EditorContext context_; }; /** @@ -82,8 +98,8 @@ typedef struct EditorLayoutParams { absl::Status DrawEditor(EditorLayoutParams *params); -} // namespace editor -} // namespace app -} // namespace yaze +} // namespace editor +} // namespace app +} // namespace yaze -#endif // YAZE_APP_CORE_EDITOR_H +#endif // YAZE_APP_CORE_EDITOR_H diff --git a/src/app/editor/editor_manager.cc b/src/app/editor/editor_manager.cc index 6843c787..c1e0eb80 100644 --- a/src/app/editor/editor_manager.cc +++ b/src/app/editor/editor_manager.cc @@ -13,7 +13,7 @@ #include "app/editor/music/music_editor.h" #include "app/editor/overworld/overworld_editor.h" #include "app/editor/sprite/sprite_editor.h" -#include "app/editor/utils/flags.h" +#include "app/editor/system/flags.h" #include "app/emu/emulator.h" #include "app/gui/icons.h" #include "app/gui/input.h" @@ -54,6 +54,7 @@ void EditorManager::SetupScreen(std::string filename) { PRINT_IF_ERROR(rom()->LoadFromFile(filename)); } overworld_editor_.InitializeZeml(); + InitializeCommands(); } absl::Status EditorManager::Update() { @@ -246,14 +247,13 @@ void EditorManager::ManageActiveEditors() { absl::Status EditorManager::DrawDynamicLayout() { // Dynamic layout for multiple editors to be open at once // Allows for tiling and resizing of editors using ImGui - return DrawEditor(&root_layout_); } void EditorManager::ManageKeyboardShortcuts() { bool ctrl_or_super = (GetIO().KeyCtrl || GetIO().KeySuper); - command_manager_.ShowWhichKey(); + editor_context_.command_manager.ShowWhichKey(); // If CMD + R is pressed, reload the top result of recent files if (IsKeyDown(ImGuiKey_R) && ctrl_or_super) { @@ -313,7 +313,7 @@ void EditorManager::InitializeCommands() { if (root_layout_.editor == nullptr) { root_layout_.editor = &overworld_editor_; } - + // New editor popup for window management commands static EditorLayoutParams new_layout; if (ImGui::BeginPopup("NewEditor")) { @@ -362,25 +362,26 @@ void EditorManager::InitializeCommands() { ImGui::EndPopup(); } - command_manager_.RegisterPrefix("window", 'w', "window management", ""); - command_manager_.RegisterSubcommand( + editor_context_.command_manager.RegisterPrefix("window", 'w', + "window management", ""); + editor_context_.command_manager.RegisterSubcommand( "window", "vsplit", '/', "vertical split", "split windows vertically and place editor in new window", [this]() { ImGui::OpenPopup("NewEditor"); root_layout_.v_split = true; }); - command_manager_.RegisterSubcommand( + editor_context_.command_manager.RegisterSubcommand( "window", "hsplit", '-', "horizontal split", "split windows horizontally and place editor in new window", [this]() { ImGui::OpenPopup("NewEditor"); root_layout_.h_split = true; }); - command_manager_.RegisterSubcommand("window", "close", 'd', "close", - "close the current editor", [this]() { - if (root_layout_.editor != nullptr) { - root_layout_.editor = nullptr; - } - }); + editor_context_.command_manager.RegisterSubcommand( + "window", "close", 'd', "close", "close the current editor", [this]() { + if (root_layout_.editor != nullptr) { + root_layout_.editor = nullptr; + } + }); } void EditorManager::DrawStatusPopup() { diff --git a/src/app/editor/editor_manager.h b/src/app/editor/editor_manager.h index 9f8168dd..cdb23019 100644 --- a/src/app/editor/editor_manager.h +++ b/src/app/editor/editor_manager.h @@ -15,14 +15,10 @@ #include "app/editor/music/music_editor.h" #include "app/editor/overworld/overworld_editor.h" #include "app/editor/sprite/sprite_editor.h" -#include "app/editor/system/command_manager.h" -#include "app/editor/system/constant_manager.h" -#include "app/editor/system/extension_manager.h" #include "app/editor/system/settings_editor.h" #include "app/emu/emulator.h" #include "app/gui/input.h" #include "app/rom.h" -#include "yaze.h" namespace yaze { namespace app { @@ -33,18 +29,11 @@ namespace editor { * @brief The EditorManager controls the main editor window and manages the * various editor classes. * - * This class inherits from SharedRom and ExperimentFlags, and - * provides functionality for setting up the screen, updating the editor, and - * shutting down the editor. It also includes methods for drawing various menus - * and popups, saving the Rom, and managing editor-specific flags. - * * The EditorManager class contains instances of various editor classes such as * AssemblyEditor, DungeonEditor, GraphicsEditor, MusicEditor, OverworldEditor, * PaletteEditor, ScreenEditor, and SpriteEditor. The current_editor_ member * variable points to the currently active editor in the tab view. * - * @note This class assumes the presence of an SDL_Renderer object for rendering - * graphics. */ class EditorManager : public SharedRom, public core::ExperimentFlags { public: @@ -101,13 +90,12 @@ class EditorManager : public SharedRom, public core::ExperimentFlags { std::vector active_editors_; std::vector active_layouts_; + EditorLayoutParams root_layout_; + Project current_project_; - CommandManager command_manager_; - ConstantManager constant_manager_; - ExtensionManager extension_manager_; + EditorContext editor_context_; Editor *current_editor_ = nullptr; - EditorLayoutParams root_layout_; AssemblyEditor assembly_editor_; DungeonEditor dungeon_editor_; GraphicsEditor graphics_editor_; @@ -119,8 +107,6 @@ class EditorManager : public SharedRom, public core::ExperimentFlags { SettingsEditor settings_editor_; MessageEditor message_editor_; MemoryEditorWithDiffChecker memory_editor_; - - yaze_editor_context editor_context_; }; } // namespace editor diff --git a/src/app/editor/graphics/graphics_editor.cc b/src/app/editor/graphics/graphics_editor.cc index 3ce0b43d..d43a751b 100644 --- a/src/app/editor/graphics/graphics_editor.cc +++ b/src/app/editor/graphics/graphics_editor.cc @@ -13,6 +13,7 @@ #include "app/gfx/snes_tile.h" #include "app/gui/canvas.h" #include "app/gui/color.h" +#include "app/gui/icons.h" #include "app/gui/input.h" #include "app/gui/modules/asset_browser.h" #include "app/gui/style.h" diff --git a/src/app/editor/graphics/screen_editor.cc b/src/app/editor/graphics/screen_editor.cc index 22a2b2aa..a8c55329 100644 --- a/src/app/editor/graphics/screen_editor.cc +++ b/src/app/editor/graphics/screen_editor.cc @@ -398,6 +398,23 @@ void ScreenEditor::DrawDungeonMapsEditor() { } } + if (ImGui::BeginTable("##DungeonMapToolset", 2, ImGuiTableFlags_SizingFixedFit)) { + ImGui::TableSetupColumn("Draw Mode"); + ImGui::TableSetupColumn("Edit Mode"); + + ImGui::TableNextColumn(); + if (ImGui::Button(ICON_MD_DRAW)) { + current_mode_ = EditingMode::DRAW; + } + + ImGui::TableNextColumn(); + if (ImGui::Button(ICON_MD_EDIT)) { + current_mode_ = EditingMode::EDIT; + } + + ImGui::EndTable(); + } + static std::vector dungeon_names = { "Sewers/Sanctuary", "Hyrule Castle", "Eastern Palace", "Desert Palace", "Tower of Hera", "Agahnim's Tower", @@ -483,13 +500,20 @@ void ScreenEditor::DrawDungeonMapsEditor() { ImGui::EndChild(); ImGui::TableNextColumn(); - tilemap_canvas_.DrawBackground(ImVec2(128 * 2 + 2, (192 * 2) + 4)); + tilemap_canvas_.DrawBackground(); tilemap_canvas_.DrawContextMenu(); - tilemap_canvas_.DrawTileSelector(8.f); + if (tilemap_canvas_.DrawTileSelector(16.f)) { + // Get the tile8 ID to use for the tile16 drawing above + selected_tile8_ = tilemap_canvas_.GetTileIdFromMousePos(); + } tilemap_canvas_.DrawBitmapTable(sheets_); tilemap_canvas_.DrawGrid(); tilemap_canvas_.DrawOverlay(); + + ImGui::Text("Selected tile8: %d", selected_tile8_); + ImGui::Separator(); + ImGui::Text("For use with custom inserted graphics assembly patches."); if (ImGui::Button("Load GFX from BIN file")) LoadBinaryGfx(); ImGui::EndTable(); diff --git a/src/app/editor/graphics/tile16_editor.h b/src/app/editor/graphics/tile16_editor.h index 08d1f2fe..9889ec61 100644 --- a/src/app/editor/graphics/tile16_editor.h +++ b/src/app/editor/graphics/tile16_editor.h @@ -4,7 +4,6 @@ #include "absl/status/status.h" #include "app/core/common.h" #include "app/editor/graphics/palette_editor.h" -#include "app/editor/utils/gfx_context.h" #include "app/gfx/bitmap.h" #include "app/gfx/snes_palette.h" #include "app/gfx/snes_tile.h" @@ -20,7 +19,7 @@ namespace editor { /** * @brief Popup window to edit Tile16 data */ -class Tile16Editor : public context::GfxContext, public SharedRom { +class Tile16Editor : public GfxContext, public SharedRom { public: absl::Status InitBlockset(const gfx::Bitmap& tile16_blockset_bmp, const gfx::Bitmap& current_gfx_bmp, diff --git a/src/app/editor/overworld/entity.cc b/src/app/editor/overworld/entity.cc index 30ddba97..785a9012 100644 --- a/src/app/editor/overworld/entity.cc +++ b/src/app/editor/overworld/entity.cc @@ -1,5 +1,6 @@ #include "app/editor/overworld/entity.h" +#include "app/gui/icons.h" #include "app/gui/input.h" #include "app/gui/style.h" diff --git a/src/app/editor/overworld/overworld_editor.h b/src/app/editor/overworld/overworld_editor.h index 26a9fac9..dbbacd76 100644 --- a/src/app/editor/overworld/overworld_editor.h +++ b/src/app/editor/overworld/overworld_editor.h @@ -8,12 +8,11 @@ #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" +#include "app/editor/editor.h" #include "app/editor/graphics/gfx_group_editor.h" #include "app/editor/graphics/palette_editor.h" #include "app/editor/graphics/tile16_editor.h" #include "app/editor/overworld/entity.h" -#include "app/editor/editor.h" -#include "app/editor/utils/gfx_context.h" #include "app/gfx/bitmap.h" #include "app/gfx/snes_palette.h" #include "app/gfx/snes_tile.h" @@ -111,7 +110,7 @@ class EntranceContext { class OverworldEditor : public Editor, public SharedRom, public EntranceContext, - public context::GfxContext, + public GfxContext, public core::ExperimentFlags { public: OverworldEditor() { type_ = EditorType::kOverworld; } diff --git a/src/app/editor/system/command_manager.cc b/src/app/editor/system/command_manager.cc index f8310414..bcb3995c 100644 --- a/src/app/editor/system/command_manager.cc +++ b/src/app/editor/system/command_manager.cc @@ -2,7 +2,6 @@ #include -#include "app/editor/editor.h" #include "imgui/imgui.h" namespace yaze { @@ -74,11 +73,7 @@ ImGuiKey MapKeyToImGuiKey(char key) { // When the player presses Space, a popup will appear fixed to the bottom of the // ImGui window with a list of the available key commands which can be used. -void CommandManager::ShowWhichKey(EditorLayoutParams *editor_layout) { - if (commands_.empty()) { - InitializeDefaults(); - } - +void CommandManager::ShowWhichKey() { if (ImGui::IsKeyPressed(ImGuiKey_Space)) { ImGui::OpenPopup("WhichKey"); } @@ -117,20 +112,8 @@ void CommandManager::ShowWhichKey(EditorLayoutParams *editor_layout) { } ImGui::EndPopup(); } - - // if the user presses the shortcut key, execute the command - // or if it is a subcommand prefix, wait for the next key - // to determine the subcommand - static bool subcommand_section = false; - for (const auto &[shortcut, info] : commands_) { - if (ImGui::IsKeyPressed(MapKeyToImGuiKey(shortcut[0]))) { - info.command_info.command(); - } - } } -void CommandManager::InitializeDefaults() {} - void CommandManager::SaveKeybindings(const std::string &filepath) { std::ofstream out(filepath); if (out.is_open()) { diff --git a/src/app/editor/system/command_manager.h b/src/app/editor/system/command_manager.h index 06319f37..1e0ce6fe 100644 --- a/src/app/editor/system/command_manager.h +++ b/src/app/editor/system/command_manager.h @@ -5,7 +5,6 @@ #include #include -#include "app/editor/editor.h" #include "imgui/imgui.h" namespace yaze { @@ -65,9 +64,7 @@ public: } } - void ShowWhichKey(EditorLayoutParams *editor_layout = nullptr); - - void InitializeDefaults(); + void ShowWhichKey(); void SaveKeybindings(const std::string &filepath); void LoadKeybindings(const std::string &filepath); diff --git a/src/app/editor/system/constant_manager.h b/src/app/editor/system/constant_manager.h index fd49428f..4909e4a7 100644 --- a/src/app/editor/system/constant_manager.h +++ b/src/app/editor/system/constant_manager.h @@ -2,19 +2,7 @@ #define YAZE_APP_EDITOR_SYSTEM_CONSTANT_MANAGER_H #include -#include -#include -#include -#include -#include "absl/status/status.h" -#include "app/editor/utils/gfx_context.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" -#include "app/rom.h" -#include "app/zelda3/common.h" -#include "app/zelda3/overworld/overworld.h" #include "app/zelda3/overworld/overworld_map.h" #include "imgui/imgui.h" @@ -86,4 +74,4 @@ class ConstantManager { } // namespace app } // namespace yaze -#endif // YAZE_APP_EDITOR_SYSTEM_CONSTANT_MANAGER_H \ No newline at end of file +#endif // YAZE_APP_EDITOR_SYSTEM_CONSTANT_MANAGER_H diff --git a/src/app/editor/utils/flags.h b/src/app/editor/system/flags.h similarity index 100% rename from src/app/editor/utils/flags.h rename to src/app/editor/system/flags.h diff --git a/src/app/editor/system/history_manager.h b/src/app/editor/system/history_manager.h new file mode 100644 index 00000000..f059e6e8 --- /dev/null +++ b/src/app/editor/system/history_manager.h @@ -0,0 +1,32 @@ +#ifndef YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H +#define YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H + +#include +#include +#include + +namespace yaze { +namespace app { +namespace editor { + +// System history manager, undo and redo. +class HistoryManager { + public: + HistoryManager() = default; + ~HistoryManager() = default; + + void Add(const char* data); + void Undo(); + void Redo(); + + private: + std::vector history_; + std::stack undo_; + std::stack redo_; +}; + +} // namespace editor +} // namespace app +} // namespace yaze + +#endif // YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H diff --git a/src/app/editor/system/popup_manager.cc b/src/app/editor/system/popup_manager.cc new file mode 100644 index 00000000..fb5b3538 --- /dev/null +++ b/src/app/editor/system/popup_manager.cc @@ -0,0 +1,19 @@ +#include "popup_manager.h" + +#include "imgui/imgui.h" + +namespace yaze { +namespace app { +namespace editor { + +PopupManager::PopupManager() { +} + +PopupManager::~PopupManager() { +} + + + +} // namespace editor +} // namespace app +} // namespace yaze diff --git a/src/app/editor/system/popup_manager.h b/src/app/editor/system/popup_manager.h new file mode 100644 index 00000000..056cc8c7 --- /dev/null +++ b/src/app/editor/system/popup_manager.h @@ -0,0 +1,21 @@ +#ifndef YAZE_APP_EDITOR_POPUP_MANAGER_H +#define YAZE_APP_EDITOR_POPUP_MANAGER_H + +namespace yaze { +namespace app { +namespace editor { + +// ImGui popup manager. +class PopupManager { + public: + PopupManager(); + ~PopupManager(); + + void Show(const char* name); +}; + +} // namespace editor +} // namespace app +} // namespace yaze + +#endif // YAZE_APP_EDITOR_POPUP_MANAGER_H diff --git a/src/app/editor/system/resource_manager.h b/src/app/editor/system/resource_manager.h new file mode 100644 index 00000000..dee31d2c --- /dev/null +++ b/src/app/editor/system/resource_manager.h @@ -0,0 +1,30 @@ +#ifndef YAZE_APP_EDITOR_SYSTEM_RESOURCE_MANAGER_H +#define YAZE_APP_EDITOR_SYSTEM_RESOURCE_MANAGER_H + +#include + +namespace yaze { +namespace app { +namespace editor { + +// System resource manager. +class ResourceManager { + public: + ResourceManager(); + ~ResourceManager(); + + void Load(const char* path); + void Unload(const char* path); + void UnloadAll(); + + size_t Count() const; + + private: + size_t count_; +}; + +} // namespace editor +} // namespace app +} // namespace yaze + +#endif // YAZE_APP_EDITOR_SYSTEM_RESOURCE_MANAGER_H diff --git a/src/app/editor/system/settings_editor.cc b/src/app/editor/system/settings_editor.cc index 38f50e9d..2be90b39 100644 --- a/src/app/editor/system/settings_editor.cc +++ b/src/app/editor/system/settings_editor.cc @@ -2,7 +2,7 @@ #include "app/editor/system/settings_editor.h" #include "absl/status/status.h" -#include "app/editor/utils/flags.h" +#include "app/editor/system/flags.h" #include "imgui/imgui.h" namespace yaze { diff --git a/src/app/editor/utils/gfx_context.cc b/src/app/editor/utils/gfx_context.cc deleted file mode 100644 index 677e9852..00000000 --- a/src/app/editor/utils/gfx_context.cc +++ /dev/null @@ -1,26 +0,0 @@ -#include "app/editor/utils/gfx_context.h" - -#include "imgui/imgui.h" - -#include - -#include "app/editor/graphics/palette_editor.h" -#include "app/editor/editor.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" -#include "app/gui/canvas.h" -#include "app/gui/icons.h" -#include "app/rom.h" - -namespace yaze { -namespace app { -namespace editor { -namespace context { - -std::unordered_map GfxContext::palettesets_; - -} -} // namespace editor -} // namespace app -} // namespace yaze \ No newline at end of file diff --git a/src/app/editor/utils/gfx_context.h b/src/app/editor/utils/gfx_context.h deleted file mode 100644 index 669f459c..00000000 --- a/src/app/editor/utils/gfx_context.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef YAZE_APP_EDITOR_VRAM_CONTEXT_H -#define YAZE_APP_EDITOR_VRAM_CONTEXT_H - -#include "imgui/imgui.h" - -#include -#include - -#include "app/editor/editor.h" -#include "app/gfx/bitmap.h" -#include "app/gfx/snes_palette.h" -#include "app/gfx/snes_tile.h" -#include "app/gui/canvas.h" -#include "app/gui/icons.h" -#include "app/rom.h" - -namespace yaze { -namespace app { -namespace editor { -namespace context { - -/** - * @brief Shared graphical context across editors. - */ -class GfxContext { - protected: - // Palettesets for the tile16 individual tiles - static std::unordered_map palettesets_; -}; - -} // namespace context -} // namespace editor -} // namespace app -} // namespace yaze - -#endif // YAZE_APP_EDITOR_VRAM_CONTEXT_H \ No newline at end of file diff --git a/src/app/gfx/snes_palette.cc b/src/app/gfx/snes_palette.cc index 0188fcc7..a8005ae7 100644 --- a/src/app/gfx/snes_palette.cc +++ b/src/app/gfx/snes_palette.cc @@ -351,5 +351,6 @@ absl::Status LoadAllPalettes(const std::vector &rom_data, } } // namespace gfx +std::unordered_map GfxContext::palettesets_; } // namespace app } // namespace yaze diff --git a/src/app/gfx/snes_palette.h b/src/app/gfx/snes_palette.h index 64b8845e..bbe7bf57 100644 --- a/src/app/gfx/snes_palette.h +++ b/src/app/gfx/snes_palette.h @@ -405,7 +405,17 @@ struct Paletteset { gfx::SnesPalette composite; /**< The composite palette. */ }; -} // namespace gfx +} // namespace gfx +/** + * @brief Shared graphical context across editors. + */ +class GfxContext { +protected: + // Palettesets for the tile16 individual tiles + static std::unordered_map palettesets_; +}; + + } // namespace app } // namespace yaze diff --git a/src/app/zelda3/overworld/overworld_map.cc b/src/app/zelda3/overworld/overworld_map.cc index 71928c16..3ff96b98 100644 --- a/src/app/zelda3/overworld/overworld_map.cc +++ b/src/app/zelda3/overworld/overworld_map.cc @@ -2,16 +2,12 @@ #include #include -#include #include #include -#include "app/editor/utils/gfx_context.h" -#include "app/gfx/bitmap.h" #include "app/gfx/snes_tile.h" #include "app/rom.h" #include "app/zelda3/overworld/overworld.h" -#include "imgui/imgui.h" namespace yaze { namespace app { diff --git a/src/app/zelda3/overworld/overworld_map.h b/src/app/zelda3/overworld/overworld_map.h index 785246ad..f4158a04 100644 --- a/src/app/zelda3/overworld/overworld_map.h +++ b/src/app/zelda3/overworld/overworld_map.h @@ -6,7 +6,6 @@ #include #include "absl/status/status.h" -#include "app/editor/utils/gfx_context.h" #include "app/gfx/snes_palette.h" #include "app/gfx/snes_tile.h" #include "app/rom.h" @@ -60,7 +59,7 @@ constexpr int OverworldCustomTileGFXGroupEnabled = 0x140148; /** * @brief Represents a single Overworld map screen. */ -class OverworldMap : public editor::context::GfxContext { +class OverworldMap : public GfxContext { public: OverworldMap() = default; OverworldMap(int index, Rom& rom, bool load_custom_data = false); diff --git a/src/cli/z3ed.cmake b/src/cli/z3ed.cmake index f5138fd3..fd3b7772 100644 --- a/src/cli/z3ed.cmake +++ b/src/cli/z3ed.cmake @@ -7,7 +7,6 @@ add_executable( app/rom.cc app/core/common.cc app/core/project.cc - app/editor/utils/gfx_context.cc app/core/platform/file_path.mm ${YAZE_APP_EMU_SRC} ${YAZE_APP_GFX_SRC} diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index c0397354..d2601731 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -11,7 +11,6 @@ add_executable( test/zelda3/sprite_builder_test.cc app/rom.cc app/core/common.cc - app/editor/utils/gfx_context.cc ${ASAR_STATIC_SRC} ${YAZE_APP_CORE_SRC} ${YAZE_APP_EMU_SRC}