#ifndef YAZE_APP_EDITOR_MASTER_EDITOR_H #define YAZE_APP_EDITOR_MASTER_EDITOR_H #define IMGUI_DEFINE_MATH_OPERATORS 1 #include #include #include #include #include #include "absl/status/status.h" #include "app/core/common.h" #include "app/core/constants.h" #include "app/gui/pipeline.h" #include "app/editor/context/gfx_context.h" #include "app/editor/dungeon_editor.h" #include "app/editor/graphics_editor.h" #include "app/editor/modules/assembly_editor.h" #include "app/editor/modules/music_editor.h" #include "app/editor/modules/palette_editor.h" #include "app/editor/overworld_editor.h" #include "app/editor/screen_editor.h" #include "app/editor/sprite_editor.h" #include "app/emu/emulator.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/gui/input.h" #include "app/rom.h" namespace yaze { namespace app { namespace editor { class MasterEditor : public SharedROM, public GfxContext, public core::ExperimentFlags { public: MasterEditor() { current_editor_ = &overworld_editor_; } void SetupScreen(std::shared_ptr renderer); absl::Status Update(); void Shutdown() { overworld_editor_.Shutdown(); } private: void DrawFileDialog(); void DrawStatusPopup(); void DrawAboutPopup(); void DrawInfoPopup(); void DrawYazeMenu(); void DrawFileMenu(); void DrawEditMenu(); void DrawViewMenu(); void DrawHelpMenu(); void SaveRom(); bool about_ = false; bool rom_info_ = false; bool backup_rom_ = false; bool save_new_auto_ = true; bool show_status_ = false; bool rom_assets_loaded_ = false; absl::Status status_; absl::Status prev_status_; std::shared_ptr sdl_renderer_; emu::Emulator emulator_; AssemblyEditor assembly_editor_; DungeonEditor dungeon_editor_; GraphicsEditor graphics_editor_; MusicEditor music_editor_; OverworldEditor overworld_editor_; PaletteEditor palette_editor_; ScreenEditor screen_editor_; SpriteEditor sprite_editor_; Editor *current_editor_ = nullptr; }; } // namespace editor } // namespace app } // namespace yaze #endif // YAZE_APP_EDITOR_MASTER_EDITOR_H