yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
default_editor_factories.cc
Go to the documentation of this file.
2
3#include <memory>
4
17#include "rom/rom.h"
18
19namespace yaze::editor {
20
21void RegisterDefaultEditorFactories(EditorRegistry* registry) {
22 if (!registry) {
23 return;
24 }
25
26 // Core editor set (used by RomSession/EditorSet construction).
27 registry->RegisterFactory(EditorType::kAssembly,
28 [](Rom* rom) {
29 return std::make_unique<AssemblyEditor>(rom);
30 });
31 registry->RegisterFactory(EditorType::kDungeon,
32 [](Rom* rom) {
33 return std::make_unique<DungeonEditorV2>(rom);
34 });
35 registry->RegisterFactory(EditorType::kGraphics,
36 [](Rom* rom) {
37 return std::make_unique<GraphicsEditor>(rom);
38 });
39 registry->RegisterFactory(EditorType::kMusic,
40 [](Rom* rom) {
41 return std::make_unique<MusicEditor>(rom);
42 });
43 registry->RegisterFactory(EditorType::kOverworld,
44 [](Rom* rom) {
45 return std::make_unique<OverworldEditor>(rom);
46 });
47 registry->RegisterFactory(EditorType::kPalette,
48 [](Rom* rom) {
49 return std::make_unique<PaletteEditor>(rom);
50 });
51 registry->RegisterFactory(EditorType::kScreen,
52 [](Rom* rom) {
53 return std::make_unique<ScreenEditor>(rom);
54 });
55 registry->RegisterFactory(EditorType::kSprite,
56 [](Rom* rom) {
57 return std::make_unique<SpriteEditor>(rom);
58 });
59 registry->RegisterFactory(EditorType::kMessage,
60 [](Rom* rom) {
61 return std::make_unique<MessageEditor>(rom);
62 });
63 registry->RegisterFactory(EditorType::kHex,
64 [](Rom* rom) {
65 return std::make_unique<MemoryEditor>(rom);
66 });
67 registry->RegisterFactory(EditorType::kSettings,
68 [](Rom*) { return std::make_unique<SettingsPanel>(); });
69}
70
71} // namespace yaze::editor
Editors are the view controllers for the application.
void RegisterDefaultEditorFactories(EditorRegistry *registry)