refactor: Integrate PlatformPaths for configuration directory management

- Replaced direct calls to GetConfigDirectory with PlatformPaths::GetConfigDirectory across multiple files to standardize configuration directory access.
- Updated RecentFilesManager, EditorManager, and various agent components to handle potential errors when retrieving the configuration directory.
- Enhanced file loading functions to utilize the new LoadFileFromConfigDir method for improved clarity and error handling.
- Introduced new methods in file_util.h for better file management practices, leveraging std::filesystem for cross-platform consistency.
This commit is contained in:
scawful
2025-10-08 20:50:49 -04:00
parent 9bc31bc8fc
commit 7f4a0f546c
14 changed files with 281 additions and 717 deletions

View File

@@ -9,6 +9,12 @@
#include "imgui/imgui.h"
namespace yaze {
// Forward declaration
namespace emu {
class Emulator;
}
namespace editor {
static const char* kGameSongs[] = {"Title",
@@ -77,6 +83,15 @@ class MusicEditor : public Editor {
// Get the ROM pointer
Rom* rom() const { return rom_; }
// Emulator integration for live audio playback
void set_emulator(emu::Emulator* emulator) { emulator_ = emulator; }
emu::Emulator* emulator() const { return emulator_; }
// Audio control methods
void PlaySong(int song_id);
void StopSong();
void SetVolume(float volume); // 0.0 to 1.0
private:
// UI Drawing Methods
@@ -112,6 +127,7 @@ class MusicEditor : public Editor {
ImGuiTableFlags_BordersV | ImGuiTableFlags_PadOuterX;
Rom* rom_;
emu::Emulator* emulator_ = nullptr; // For live audio playback
};
} // namespace editor