refactor: Update CMake presets and improve MusicEditor initialization

- Added binary directory paths to CMake presets for better build organization.
- Enhanced the macOS AI preset description to include networking capabilities.
- Refactored MusicEditor constructor to remove ROM dependency, simplifying initialization.
- Cleaned up unused ROM pointer methods in MusicEditor for improved clarity.
This commit is contained in:
scawful
2025-10-05 00:35:47 -04:00
parent 5a35718070
commit 92a3ddded2
4 changed files with 10 additions and 11 deletions

View File

@@ -26,6 +26,7 @@
"hidden": true,
"description": "Unix/macOS/Linux base with Makefiles",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build",
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
@@ -144,14 +145,17 @@
{
"name": "mac-ai",
"displayName": "macOS AI",
"description": "macOS with AI agent (z3ed + JSON + gRPC)",
"description": "macOS with AI agent (z3ed + JSON + gRPC + networking)",
"inherits": "mac-dev",
"binaryDir": "${sourceDir}/build_ai",
"cacheVariables": {
"Z3ED_AI": "ON",
"YAZE_WITH_JSON": "ON",
"YAZE_WITH_GRPC": "ON",
"YAZE_BUILD_Z3ED": "ON",
"YAZE_BUILD_EMU": "ON"
"YAZE_BUILD_EMU": "ON",
"YAZE_BUILD_TESTS": "ON",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{

View File

@@ -1,7 +1,7 @@
// AppDelegate.mm
#import "app/core/platform/app_delegate.h"
#import "app/core/controller.h"
#import "app/core/platform/file_dialog.h"
#import "util/file_util.h"
#import "app/editor/editor.h"
#import "app/rom.h"

View File

@@ -48,7 +48,7 @@ class EditorSet {
: assembly_editor_(rom),
dungeon_editor_(rom),
graphics_editor_(rom),
music_editor_(rom),
music_editor_(),
overworld_editor_(rom),
palette_editor_(rom),
screen_editor_(rom),

View File

@@ -57,7 +57,8 @@ const ImGuiTableFlags music_editor_flags_ = ImGuiTableFlags_SizingFixedFit |
*/
class MusicEditor : public Editor {
public:
MusicEditor(Rom* rom) : Editor(rom), assembly_editor_(rom), apu_(rom->memory_impl()) {}
MusicEditor() : Editor(EditorType::kMusic) {}
void Initialize() override;
absl::Status Load() override;
absl::Status Save() override { return absl::UnimplementedError("Save"); }
@@ -68,12 +69,6 @@ class MusicEditor : public Editor {
absl::Status Undo() override { return absl::UnimplementedError("Undo"); }
absl::Status Redo() override { return absl::UnimplementedError("Redo"); }
absl::Status Find() override { return absl::UnimplementedError("Find"); }
// Set the ROM pointer
void set_rom(Rom* rom) { rom_ = rom; }
// Get the ROM pointer
Rom* rom() const { return rom_; }
private:
// UI Drawing Methods