yaze 0.2.0
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
4#include "absl/strings/str_format.h"
7#include "app/gui/canvas.h"
8#include "app/gui/icons.h"
9#include "app/gui/input.h"
10#include "app/rom.h"
12#include "imgui/imgui.h"
13
14namespace yaze {
15namespace app {
16namespace editor {
17
18static const char* kGameSongs[] = {"Title",
19 "Light World",
20 "Beginning",
21 "Rabbit",
22 "Forest",
23 "Intro",
24 "Town",
25 "Warp",
26 "Dark world",
27 "Master sword",
28 "File select",
29 "Soldier",
30 "Mountain",
31 "Shop",
32 "Fanfare",
33 "Castle",
34 "Palace (Pendant)",
35 "Cave (Same as Secret Way)",
36 "Clear (Dungeon end)",
37 "Church",
38 "Boss",
39 "Dungeon (Crystal)",
40 "Psychic",
41 "Secret Way (Same as Cave)",
42 "Rescue",
43 "Crystal",
44 "Fountain",
45 "Pyramid",
46 "Kill Agahnim",
47 "Ganon Room",
48 "Last Boss"};
49
50static constexpr absl::string_view kSongNotes[] = {
51 "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "C",
52 "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "C"};
53
58class MusicEditor : public SharedRom, public Editor {
59 public:
61
62 absl::Status Update() override;
63
64 absl::Status Undo() override { return absl::UnimplementedError("Undo"); }
65 absl::Status Redo() override { return absl::UnimplementedError("Redo"); }
66 absl::Status Cut() override { return absl::UnimplementedError("Cut"); }
67 absl::Status Copy() override { return absl::UnimplementedError("Copy"); }
68 absl::Status Paste() override { return absl::UnimplementedError("Paste"); }
69 absl::Status Find() override { return absl::UnimplementedError("Find"); }
70
71 private:
72 void DrawChannels();
73 void DrawPianoStaff();
74 void DrawPianoRoll();
75 void DrawSongToolset();
76 void DrawToolset();
77
79
81 ImGuiTableFlags toolset_table_flags_ = ImGuiTableFlags_SizingFixedFit;
82 ImGuiTableFlags music_editor_flags_ = ImGuiTableFlags_SizingFixedFit |
83 ImGuiTableFlags_Resizable |
84 ImGuiTableFlags_Reorderable;
85};
86
87} // namespace editor
88} // namespace app
89} // namespace yaze
90
91#endif
A class to hold a shared pointer to a Rom object.
Definition rom.h:585
Text editor for modifying assembly code.
Interface for editor classes.
Definition editor.h:39
A class for editing music data in a Rom.
absl::Status Copy() override
absl::Status Redo() override
absl::Status Paste() override
absl::Status Update() override
zelda3::music::Tracker music_tracker_
ImGuiTableFlags toolset_table_flags_
ImGuiTableFlags music_editor_flags_
absl::Status Cut() override
absl::Status Undo() override
absl::Status Find() override
Definition common.cc:21