yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
editor_manager.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_EDITOR_MANAGER_H
2#define YAZE_APP_EDITOR_EDITOR_MANAGER_H
3
4#define IMGUI_DEFINE_MATH_OPERATORS
5
6#include "absl/status/status.h"
7#include "app/core/project.h"
19#include "app/emu/emulator.h"
20#include "app/gui/input.h"
21#include "app/rom.h"
22#include "yaze_config.h"
23
24namespace yaze {
25namespace editor {
26
38class EditorManager : public SharedRom {
39 public:
46 for (auto *editor : active_editors_) {
47 editor->set_context(&context_);
48 }
49 std::stringstream ss;
50 ss << YAZE_VERSION_MAJOR << "." << YAZE_VERSION_MINOR << "."
51 << YAZE_VERSION_PATCH;
52 ss >> version_;
53 }
54
55 void Initialize(const std::string &filename = "");
56 absl::Status Update();
57 void DrawMenuBar();
58
59 auto emulator() -> emu::Emulator & { return emulator_; }
60 auto quit() const { return quit_; }
61
62 private:
64 void DrawHomepage();
65 void DrawPopups();
66
67 void LoadRom();
68 void LoadAssets();
69 void SaveRom();
70 void OpenRomOrProject(const std::string &filename);
71 absl::Status OpenProject();
72 void SaveProject();
73
74 bool quit_ = false;
75 bool about_ = false;
76 bool rom_info_ = false;
77 bool backup_rom_ = false;
78 bool save_as_menu_ = false;
79 bool save_new_auto_ = true;
80 bool open_rom_help = false;
81 bool open_manage_project = false;
83 bool new_project_menu = false;
84
85 bool show_emulator_ = false;
86 bool show_memory_editor_ = false;
87 bool show_asm_editor_ = false;
88 bool show_imgui_metrics_ = false;
89 bool show_imgui_demo_ = false;
93
94 std::string version_ = "";
95
96 absl::Status status_;
98 std::vector<Editor *> active_editors_;
99 std::vector<std::unique_ptr<Rom>> roms_;
100 Rom *current_rom_ = nullptr;
101
104
117};
118
119} // namespace editor
120} // namespace yaze
121
122#endif // YAZE_APP_EDITOR_EDITOR_MANAGER_H
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:59
auto rom()
Definition rom.h:382
SharedRom()=default
Text editor for modifying assembly code.
DungeonEditor class for editing dungeons.
void OpenRomOrProject(const std::string &filename)
OverworldEditor overworld_editor_
std::vector< std::unique_ptr< Rom > > roms_
MemoryEditorWithDiffChecker memory_editor_
std::vector< Editor * > active_editors_
void Initialize(const std::string &filename="")
auto emulator() -> emu::Emulator &
Interface for editor classes.
Definition editor.h:53
Allows the user to edit graphics sheets from the game or view prototype graphics.
A class for editing music data in a Rom.
Manipulates the Overworld and OverworldMap data in a Rom.
Allows the user to view and edit in game palettes.
The ScreenEditor class allows the user to edit a variety of screens in the game or create a custom me...
Allows the user to edit sprites.
A class for emulating and debugging SNES games.
Definition emulator.h:39
Editors are the view controllers for the application.
Main namespace for the application.
Definition controller.cc:18
Represents a project in the application.
Definition project.h:26