Modern project structure with comprehensive settings consolidation. More...
#include <project.h>
Classes | |
struct | AgentSettings |
Public Member Functions | |
absl::Status | Create (const std::string &project_name, const std::string &base_path) |
absl::Status | Open (const std::string &project_path) |
absl::Status | Save () |
absl::Status | SaveAs (const std::string &new_path) |
absl::Status | ImportZScreamProject (const std::string &zscream_project_path) |
absl::Status | ExportForZScream (const std::string &target_path) |
absl::Status | LoadAllSettings () |
absl::Status | SaveAllSettings () |
absl::Status | ResetToDefaults () |
absl::Status | InitializeEmbeddedLabels () |
std::string | GetLabel (const std::string &resource_type, int id, const std::string &default_value="") const |
absl::Status | Validate () const |
std::vector< std::string > | GetMissingFiles () const |
absl::Status | RepairProject () |
std::string | GetDisplayName () const |
std::string | GetRelativePath (const std::string &absolute_path) const |
std::string | GetAbsolutePath (const std::string &relative_path) const |
bool | IsEmpty () const |
bool | project_opened () const |
Public Attributes | |
ProjectMetadata | metadata |
std::string | name |
std::string | filepath |
ProjectFormat | format = ProjectFormat::kYazeNative |
std::string | rom_filename |
std::string | rom_backup_folder |
std::vector< std::string > | additional_roms |
std::string | code_folder |
std::string | assets_folder |
std::string | patches_folder |
std::string | labels_filename |
std::string | symbols_filename |
FeatureFlags::Flags | feature_flags |
WorkspaceSettings | workspace_settings |
std::unordered_map< std::string, std::unordered_map< std::string, std::string > > | resource_labels |
bool | use_embedded_labels = true |
std::string | build_script |
std::string | output_folder |
std::vector< std::string > | build_configurations |
std::string | git_repository |
bool | track_changes = true |
struct yaze::core::YazeProject::AgentSettings | agent_settings |
std::string | zscream_project_file |
std::map< std::string, std::string > | zscream_mappings |
Private Member Functions | |
absl::Status | LoadFromYazeFormat (const std::string &project_path) |
absl::Status | SaveToYazeFormat () |
absl::Status | ImportFromZScreamFormat (const std::string &project_path) |
void | InitializeDefaults () |
std::string | GenerateProjectId () const |
Modern project structure with comprehensive settings consolidation.
absl::Status yaze::core::YazeProject::Create | ( | const std::string & | project_name, |
const std::string & | base_path | ||
) |
Definition at line 76 of file project.cc.
References assets_folder, code_folder, yaze::core::ProjectMetadata::created_by, yaze::core::ProjectMetadata::created_date, filepath, InitializeDefaults(), labels_filename, yaze::core::ProjectMetadata::last_modified, metadata, name, output_folder, patches_folder, rom_backup_folder, Save(), symbols_filename, yaze::core::ProjectMetadata::version, and yaze::core::ProjectMetadata::yaze_version.
Referenced by yaze::core::ProjectManager::CreateFromTemplate(), yaze::editor::EditorManager::DrawMenuBar(), and yaze::cli::handlers::ProjectInitCommandHandler::Execute().
absl::Status yaze::core::YazeProject::Open | ( | const std::string & | project_path | ) |
Definition at line 115 of file project.cc.
References filepath, format, ImportFromZScreamFormat(), yaze::core::kYazeNative, yaze::core::kZScreamCompat, LoadFromYazeFormat(), and LOG_DEBUG.
Referenced by yaze::cli::handlers::ProjectBuildCommandHandler::Execute(), yaze::editor::EditorManager::ImportProject(), yaze::editor::EditorManager::OpenProject(), yaze::editor::EditorManager::OpenRomOrProject(), and yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels().
absl::Status yaze::core::YazeProject::Save | ( | ) |
Definition at line 150 of file project.cc.
References SaveToYazeFormat().
Referenced by Create(), yaze::core::ProjectManager::CreateFromTemplate(), yaze::editor::EditorManager::DrawMenuBar(), ResetToDefaults(), SaveAs(), yaze::editor::EditorManager::SaveProject(), and yaze::editor::EditorManager::SaveProjectAs().
absl::Status yaze::core::YazeProject::SaveAs | ( | const std::string & | new_path | ) |
Definition at line 154 of file project.cc.
References filepath, and Save().
absl::Status yaze::core::YazeProject::ImportZScreamProject | ( | const std::string & | zscream_project_path | ) |
Definition at line 402 of file project.cc.
References format, InitializeDefaults(), yaze::core::kZScreamCompat, name, zscream_mappings, and zscream_project_file.
Referenced by yaze::editor::EditorManager::ImportProject().
absl::Status yaze::core::YazeProject::ExportForZScream | ( | const std::string & | target_path | ) |
Definition at line 424 of file project.cc.
References yaze::core::ProjectMetadata::author, code_folder, yaze::core::ProjectMetadata::description, metadata, name, rom_filename, and yaze::core::ProjectMetadata::yaze_version.
absl::Status yaze::core::YazeProject::LoadAllSettings | ( | ) |
Definition at line 445 of file project.cc.
References filepath, and LoadFromYazeFormat().
absl::Status yaze::core::YazeProject::SaveAllSettings | ( | ) |
Definition at line 451 of file project.cc.
References SaveToYazeFormat().
absl::Status yaze::core::YazeProject::ResetToDefaults | ( | ) |
Definition at line 456 of file project.cc.
References InitializeDefaults(), and Save().
absl::Status yaze::core::YazeProject::InitializeEmbeddedLabels | ( | ) |
Definition at line 887 of file project.cc.
References LOG_DEBUG, resource_labels, yaze::zelda3::Zelda3Labels::ToResourceLabels(), and use_embedded_labels.
Referenced by yaze::cli::resources::CommandContext::EnsureLabelsLoaded(), yaze::cli::agent::HandleTestConversationCommand(), yaze::cli::InitializeMockRom(), yaze::editor::AgentChatWidget::SetRomContext(), and yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels().
std::string yaze::core::YazeProject::GetLabel | ( | const std::string & | resource_type, |
int | id, | ||
const std::string & | default_value = "" |
||
) | const |
Definition at line 914 of file project.cc.
References yaze::zelda3::Zelda3Labels::GetLabel(), resource_labels, and use_embedded_labels.
absl::Status yaze::core::YazeProject::Validate | ( | ) | const |
Definition at line 461 of file project.cc.
References code_folder, filepath, GetAbsolutePath(), labels_filename, name, and rom_filename.
Referenced by yaze::editor::EditorManager::BuildModernMenu(), yaze::editor::EditorManager::OpenProject(), and yaze::core::ProjectManager::ValidateProjectStructure().
std::vector< std::string > yaze::core::YazeProject::GetMissingFiles | ( | ) | const |
Definition at line 488 of file project.cc.
References GetAbsolutePath(), labels_filename, rom_filename, and symbols_filename.
Referenced by yaze::core::ProjectManager::GetRecommendedFixesForProject().
absl::Status yaze::core::YazeProject::RepairProject | ( | ) |
Definition at line 504 of file project.cc.
References assets_folder, code_folder, GetAbsolutePath(), labels_filename, output_folder, patches_folder, and rom_backup_folder.
Referenced by yaze::editor::EditorManager::RepairCurrentProject().
std::string yaze::core::YazeProject::GetDisplayName | ( | ) | const |
Definition at line 532 of file project.cc.
References yaze::core::ProjectMetadata::description, metadata, and name.
Referenced by yaze::editor::EditorManager::OpenProject(), and yaze::editor::EditorManager::SaveProjectAs().
std::string yaze::core::YazeProject::GetRelativePath | ( | const std::string & | absolute_path | ) | const |
Definition at line 539 of file project.cc.
References filepath.
Referenced by yaze::editor::AgentChatWidget::SaveAgentSettingsToProject(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::GetAbsolutePath | ( | const std::string & | relative_path | ) | const |
Definition at line 553 of file project.cc.
References filepath.
Referenced by GetMissingFiles(), yaze::editor::AgentChatWidget::LoadAgentSettingsFromProject(), RepairProject(), and Validate().
bool yaze::core::YazeProject::IsEmpty | ( | ) | const |
Definition at line 562 of file project.cc.
References code_folder, name, and rom_filename.
|
inline |
Definition at line 162 of file project.h.
References filepath, and name.
Referenced by yaze::editor::EditorManager::DrawMenuBar(), yaze::editor::EditorManager::RepairCurrentProject(), yaze::editor::EditorManager::SaveProject(), and yaze::editor::EditorManager::SaveProjectAs().
|
private |
Definition at line 166 of file project.cc.
References additional_roms, agent_settings, yaze::core::YazeProject::AgentSettings::ai_model, yaze::core::YazeProject::AgentSettings::ai_provider, assets_folder, yaze::core::ProjectMetadata::author, yaze::core::WorkspaceSettings::autosave_enabled, yaze::core::WorkspaceSettings::autosave_interval_secs, yaze::core::WorkspaceSettings::backup_on_save, build_configurations, build_script, code_folder, yaze::core::ProjectMetadata::created_date, yaze::core::WorkspaceSettings::custom_keybindings, yaze::core::YazeProject::AgentSettings::custom_system_prompt, yaze::core::WorkspaceSettings::dark_mode, yaze::core::ProjectMetadata::description, yaze::core::WorkspaceSettings::editor_visibility, feature_flags, yaze::core::WorkspaceSettings::font_global_scale, yaze::core::YazeProject::AgentSettings::gemini_api_key, git_repository, yaze::core::FeatureFlags::Flags::Overworld::kApplyZSCustomOverworldASM, yaze::core::FeatureFlags::Flags::Overworld::kLoadCustomOverworld, yaze::core::FeatureFlags::Flags::kSaveDungeonMaps, yaze::core::FeatureFlags::Flags::kSaveGraphicsSheet, labels_filename, yaze::core::WorkspaceSettings::last_layout_preset, yaze::core::ProjectMetadata::last_modified, yaze::core::ProjectMetadata::license, yaze::core::YazeProject::AgentSettings::max_retry_attempts, yaze::core::YazeProject::AgentSettings::max_tool_iterations, metadata, name, yaze::core::YazeProject::AgentSettings::ollama_host, output_folder, yaze::core::FeatureFlags::Flags::overworld, patches_folder, yaze::core::WorkspaceSettings::recent_files, resource_labels, rom_backup_folder, rom_filename, yaze::core::WorkspaceSettings::saved_layouts, yaze::core::WorkspaceSettings::show_collision, yaze::core::WorkspaceSettings::show_grid, yaze::core::YazeProject::AgentSettings::show_reasoning, symbols_filename, yaze::core::ProjectMetadata::tags, track_changes, yaze::core::WorkspaceSettings::ui_theme, yaze::core::YazeProject::AgentSettings::use_custom_prompt, yaze::core::YazeProject::AgentSettings::verbose, yaze::core::ProjectMetadata::version, workspace_settings, yaze::core::ProjectMetadata::yaze_version, zscream_mappings, and zscream_project_file.
Referenced by LoadAllSettings(), and Open().
|
private |
Definition at line 271 of file project.cc.
References additional_roms, agent_settings, yaze::core::YazeProject::AgentSettings::ai_model, yaze::core::YazeProject::AgentSettings::ai_provider, assets_folder, yaze::core::ProjectMetadata::author, yaze::core::WorkspaceSettings::autosave_enabled, yaze::core::WorkspaceSettings::autosave_interval_secs, yaze::core::WorkspaceSettings::backup_on_save, build_configurations, build_script, code_folder, yaze::core::ProjectMetadata::created_date, yaze::core::WorkspaceSettings::custom_keybindings, yaze::core::YazeProject::AgentSettings::custom_system_prompt, yaze::core::WorkspaceSettings::dark_mode, yaze::core::ProjectMetadata::description, yaze::core::WorkspaceSettings::editor_visibility, feature_flags, filepath, yaze::core::WorkspaceSettings::font_global_scale, yaze::core::YazeProject::AgentSettings::gemini_api_key, GetRelativePath(), git_repository, yaze::core::FeatureFlags::Flags::Overworld::kApplyZSCustomOverworldASM, yaze::core::FeatureFlags::Flags::Overworld::kLoadCustomOverworld, yaze::core::FeatureFlags::Flags::kSaveDungeonMaps, yaze::core::FeatureFlags::Flags::kSaveGraphicsSheet, labels_filename, yaze::core::WorkspaceSettings::last_layout_preset, yaze::core::ProjectMetadata::last_modified, yaze::core::ProjectMetadata::license, yaze::core::YazeProject::AgentSettings::max_retry_attempts, yaze::core::YazeProject::AgentSettings::max_tool_iterations, metadata, name, yaze::core::YazeProject::AgentSettings::ollama_host, output_folder, yaze::core::FeatureFlags::Flags::overworld, patches_folder, yaze::core::WorkspaceSettings::recent_files, resource_labels, rom_backup_folder, rom_filename, yaze::core::WorkspaceSettings::saved_layouts, yaze::core::WorkspaceSettings::show_collision, yaze::core::WorkspaceSettings::show_grid, yaze::core::YazeProject::AgentSettings::show_reasoning, symbols_filename, yaze::core::ProjectMetadata::tags, track_changes, yaze::core::WorkspaceSettings::ui_theme, yaze::core::YazeProject::AgentSettings::use_custom_prompt, yaze::core::YazeProject::AgentSettings::verbose, yaze::core::ProjectMetadata::version, workspace_settings, yaze::core::ProjectMetadata::yaze_version, zscream_mappings, and zscream_project_file.
Referenced by Save(), and SaveAllSettings().
|
private |
Definition at line 566 of file project.cc.
References InitializeDefaults(), name, and zscream_project_file.
Referenced by Open().
|
private |
Definition at line 579 of file project.cc.
References yaze::core::WorkspaceSettings::autosave_enabled, yaze::core::WorkspaceSettings::autosave_interval_secs, yaze::core::WorkspaceSettings::backup_on_save, build_configurations, yaze::core::WorkspaceSettings::dark_mode, feature_flags, yaze::core::WorkspaceSettings::font_global_scale, yaze::core::FeatureFlags::Flags::Overworld::kApplyZSCustomOverworldASM, yaze::core::FeatureFlags::Flags::Overworld::kLoadCustomOverworld, yaze::core::FeatureFlags::Flags::kSaveDungeonMaps, yaze::core::FeatureFlags::Flags::kSaveGraphicsSheet, yaze::core::FeatureFlags::Flags::overworld, yaze::core::WorkspaceSettings::show_collision, yaze::core::WorkspaceSettings::show_grid, track_changes, yaze::core::WorkspaceSettings::ui_theme, and workspace_settings.
Referenced by Create(), ImportFromZScreamFormat(), ImportZScreamProject(), and ResetToDefaults().
|
private |
Definition at line 603 of file project.cc.
ProjectMetadata yaze::core::YazeProject::metadata |
Definition at line 80 of file project.h.
Referenced by Create(), yaze::core::ProjectManager::CreateFromTemplate(), ExportForZScream(), GetDisplayName(), yaze::core::ProjectManager::GetRecommendedFixesForProject(), LoadFromYazeFormat(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::name |
Definition at line 81 of file project.h.
Referenced by yaze::core::ProjectManager::BackupProject(), Create(), yaze::cli::handlers::ProjectBuildCommandHandler::Execute(), ExportForZScream(), GetDisplayName(), ImportFromZScreamFormat(), ImportZScreamProject(), IsEmpty(), LoadFromYazeFormat(), project_opened(), SaveToYazeFormat(), yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels(), and Validate().
std::string yaze::core::YazeProject::filepath |
Definition at line 82 of file project.h.
Referenced by yaze::core::ProjectManager::BackupProject(), yaze::editor::EditorManager::BuildModernMenu(), Create(), yaze::editor::EditorManager::DrawMenuBar(), GetAbsolutePath(), GetRelativePath(), LoadAllSettings(), Open(), yaze::editor::EditorManager::OpenProject(), project_opened(), SaveAs(), yaze::editor::EditorManager::SaveProjectAs(), SaveToYazeFormat(), and Validate().
ProjectFormat yaze::core::YazeProject::format = ProjectFormat::kYazeNative |
Definition at line 83 of file project.h.
Referenced by ImportZScreamProject(), and Open().
std::string yaze::core::YazeProject::rom_filename |
Definition at line 86 of file project.h.
Referenced by yaze::editor::EditorManager::DrawMenuBar(), yaze::cli::handlers::ProjectBuildCommandHandler::Execute(), ExportForZScream(), GetMissingFiles(), yaze::core::ProjectManager::GetRecommendedFixesForProject(), IsEmpty(), LoadFromYazeFormat(), yaze::editor::EditorManager::OpenProject(), SaveToYazeFormat(), and Validate().
std::string yaze::core::YazeProject::rom_backup_folder |
Definition at line 87 of file project.h.
Referenced by Create(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().
std::vector<std::string> yaze::core::YazeProject::additional_roms |
Definition at line 88 of file project.h.
Referenced by LoadFromYazeFormat(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::code_folder |
Definition at line 91 of file project.h.
Referenced by Create(), yaze::editor::EditorManager::DrawMenuBar(), ExportForZScream(), yaze::core::ProjectManager::GetRecommendedFixesForProject(), IsEmpty(), LoadFromYazeFormat(), yaze::editor::EditorManager::OpenProject(), RepairProject(), SaveToYazeFormat(), and Validate().
std::string yaze::core::YazeProject::assets_folder |
Definition at line 92 of file project.h.
Referenced by Create(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::patches_folder |
Definition at line 93 of file project.h.
Referenced by Create(), yaze::cli::handlers::ProjectBuildCommandHandler::Execute(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::labels_filename |
Definition at line 94 of file project.h.
Referenced by Create(), yaze::editor::EditorManager::DrawMenuBar(), GetMissingFiles(), yaze::core::ProjectManager::GetRecommendedFixesForProject(), LoadFromYazeFormat(), yaze::editor::EditorManager::OpenProject(), RepairProject(), SaveToYazeFormat(), yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels(), and Validate().
std::string yaze::core::YazeProject::symbols_filename |
Definition at line 95 of file project.h.
Referenced by Create(), GetMissingFiles(), LoadFromYazeFormat(), and SaveToYazeFormat().
FeatureFlags::Flags yaze::core::YazeProject::feature_flags |
Definition at line 98 of file project.h.
Referenced by yaze::core::ProjectManager::CreateFromTemplate(), InitializeDefaults(), LoadFromYazeFormat(), yaze::editor::EditorManager::OpenProject(), yaze::editor::EditorManager::SaveProject(), and SaveToYazeFormat().
WorkspaceSettings yaze::core::YazeProject::workspace_settings |
Definition at line 99 of file project.h.
Referenced by yaze::core::ProjectManager::CreateFromTemplate(), InitializeDefaults(), LoadFromYazeFormat(), yaze::editor::EditorManager::OpenProject(), yaze::editor::EditorManager::SaveProject(), and SaveToYazeFormat().
std::unordered_map<std::string, std::unordered_map<std::string, std::string> > yaze::core::YazeProject::resource_labels |
Definition at line 100 of file project.h.
Referenced by yaze::cli::resources::CommandContext::EnsureLabelsLoaded(), GetLabel(), yaze::cli::agent::HandleTestConversationCommand(), InitializeEmbeddedLabels(), yaze::cli::InitializeMockRom(), LoadFromYazeFormat(), SaveToYazeFormat(), yaze::editor::AgentChatWidget::SetRomContext(), and yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels().
bool yaze::core::YazeProject::use_embedded_labels = true |
Definition at line 103 of file project.h.
Referenced by yaze::cli::resources::CommandContext::EnsureLabelsLoaded(), GetLabel(), yaze::cli::agent::HandleTestConversationCommand(), InitializeEmbeddedLabels(), yaze::editor::AgentChatWidget::SetRomContext(), and yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels().
std::string yaze::core::YazeProject::build_script |
Definition at line 106 of file project.h.
Referenced by LoadFromYazeFormat(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::output_folder |
Definition at line 107 of file project.h.
Referenced by Create(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().
std::vector<std::string> yaze::core::YazeProject::build_configurations |
Definition at line 108 of file project.h.
Referenced by InitializeDefaults(), LoadFromYazeFormat(), and SaveToYazeFormat().
std::string yaze::core::YazeProject::git_repository |
Definition at line 111 of file project.h.
Referenced by yaze::core::ProjectManager::GetRecommendedFixesForProject(), LoadFromYazeFormat(), and SaveToYazeFormat().
bool yaze::core::YazeProject::track_changes = true |
Definition at line 112 of file project.h.
Referenced by yaze::core::ProjectManager::GetRecommendedFixesForProject(), InitializeDefaults(), LoadFromYazeFormat(), and SaveToYazeFormat().
struct yaze::core::YazeProject::AgentSettings yaze::core::YazeProject::agent_settings |
std::string yaze::core::YazeProject::zscream_project_file |
Definition at line 129 of file project.h.
Referenced by ImportFromZScreamFormat(), ImportZScreamProject(), LoadFromYazeFormat(), and SaveToYazeFormat().
std::map<std::string, std::string> yaze::core::YazeProject::zscream_mappings |
Definition at line 130 of file project.h.
Referenced by ImportZScreamProject(), LoadFromYazeFormat(), and SaveToYazeFormat().