yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
music_editor.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_MUSIC_EDITOR_H
2#define YAZE_APP_EDITOR_MUSIC_EDITOR_H
3
5#include "app/editor/editor.h"
6#include "app/rom.h"
8#include "imgui/imgui.h"
9
10namespace yaze {
11namespace editor {
12
13static const char* kGameSongs[] = {"Title",
14 "Light World",
15 "Beginning",
16 "Rabbit",
17 "Forest",
18 "Intro",
19 "Town",
20 "Warp",
21 "Dark world",
22 "Master sword",
23 "File select",
24 "Soldier",
25 "Mountain",
26 "Shop",
27 "Fanfare",
28 "Castle",
29 "Palace (Pendant)",
30 "Cave (Same as Secret Way)",
31 "Clear (Dungeon end)",
32 "Church",
33 "Boss",
34 "Dungeon (Crystal)",
35 "Psychic",
36 "Secret Way (Same as Cave)",
37 "Rescue",
38 "Crystal",
39 "Fountain",
40 "Pyramid",
41 "Kill Agahnim",
42 "Ganon Room",
43 "Last Boss"};
44
45static constexpr absl::string_view kSongNotes[] = {
46 "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "C",
47 "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "C"};
48
49const ImGuiTableFlags toolset_table_flags_ = ImGuiTableFlags_SizingFixedFit;
50const ImGuiTableFlags music_editor_flags_ = ImGuiTableFlags_SizingFixedFit |
51 ImGuiTableFlags_Resizable |
52 ImGuiTableFlags_Reorderable;
57class MusicEditor : public Editor {
58 public:
59 explicit MusicEditor(Rom* rom = nullptr) : rom_(rom) {
61 }
62
63 void Initialize() override;
64 absl::Status Load() override;
65 absl::Status Save() override { return absl::UnimplementedError("Save"); }
66 absl::Status Update() override;
67 absl::Status Cut() override { return absl::UnimplementedError("Cut"); }
68 absl::Status Copy() override { return absl::UnimplementedError("Copy"); }
69 absl::Status Paste() override { return absl::UnimplementedError("Paste"); }
70 absl::Status Undo() override { return absl::UnimplementedError("Undo"); }
71 absl::Status Redo() override { return absl::UnimplementedError("Redo"); }
72 absl::Status Find() override { return absl::UnimplementedError("Find"); }
73
74 // Set the ROM pointer
75 void set_rom(Rom* rom) { rom_ = rom; }
76
77 // Get the ROM pointer
78 Rom* rom() const { return rom_; }
79
80 private:
82 void DrawChannels();
83 void DrawPianoStaff();
84 void DrawPianoRoll();
85 void DrawSongToolset();
86 void DrawToolset();
87
89
91};
92
93} // namespace editor
94} // namespace yaze
95
96#endif
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:59
Text editor for modifying assembly code.
EditorType type_
Definition editor.h:92
absl::Status Find() override
zelda3::music::Tracker music_tracker_
absl::Status Paste() override
void Initialize() override
absl::Status Save() override
absl::Status Cut() override
absl::Status Load() override
absl::Status Copy() override
absl::Status Update() override
absl::Status Undo() override
absl::Status Redo() override
AssemblyEditor assembly_editor_
MusicEditor(Rom *rom=nullptr)
Editors are the view controllers for the application.
const ImGuiTableFlags music_editor_flags_
const ImGuiTableFlags toolset_table_flags_
Main namespace for the application.
Definition controller.cc:18