yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::core::YazeProject Struct Reference

Modern project structure with comprehensive settings consolidation. More...

#include <project.h>

Collaboration diagram for yaze::core::YazeProject:

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
 

Detailed Description

Modern project structure with comprehensive settings consolidation.

Definition at line 78 of file project.h.

Member Function Documentation

◆ Create()

◆ Open()

◆ Save()

absl::Status yaze::core::YazeProject::Save ( )

◆ SaveAs()

absl::Status yaze::core::YazeProject::SaveAs ( const std::string &  new_path)

Definition at line 154 of file project.cc.

References filepath, and Save().

Here is the call graph for this function:

◆ ImportZScreamProject()

absl::Status yaze::core::YazeProject::ImportZScreamProject ( const std::string &  zscream_project_path)
Todo:
Implement actual ZScream format parsing when format is known

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().

Here is the call graph for this function:

◆ ExportForZScream()

absl::Status yaze::core::YazeProject::ExportForZScream ( const std::string &  target_path)

◆ LoadAllSettings()

absl::Status yaze::core::YazeProject::LoadAllSettings ( )

Definition at line 445 of file project.cc.

References filepath, and LoadFromYazeFormat().

Here is the call graph for this function:

◆ SaveAllSettings()

absl::Status yaze::core::YazeProject::SaveAllSettings ( )

Definition at line 451 of file project.cc.

References SaveToYazeFormat().

Here is the call graph for this function:

◆ ResetToDefaults()

absl::Status yaze::core::YazeProject::ResetToDefaults ( )

Definition at line 456 of file project.cc.

References InitializeDefaults(), and Save().

Here is the call graph for this function:

◆ InitializeEmbeddedLabels()

◆ GetLabel()

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.

Here is the call graph for this function:

◆ Validate()

absl::Status yaze::core::YazeProject::Validate ( ) const

◆ GetMissingFiles()

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().

Here is the call graph for this function:

◆ RepairProject()

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().

Here is the call graph for this function:

◆ GetDisplayName()

std::string yaze::core::YazeProject::GetDisplayName ( ) const

◆ GetRelativePath()

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().

◆ GetAbsolutePath()

std::string yaze::core::YazeProject::GetAbsolutePath ( const std::string &  relative_path) const

◆ IsEmpty()

bool yaze::core::YazeProject::IsEmpty ( ) const

Definition at line 562 of file project.cc.

References code_folder, name, and rom_filename.

◆ project_opened()

bool yaze::core::YazeProject::project_opened ( ) const
inline

◆ LoadFromYazeFormat()

absl::Status yaze::core::YazeProject::LoadFromYazeFormat ( const std::string &  project_path)
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().

◆ SaveToYazeFormat()

absl::Status yaze::core::YazeProject::SaveToYazeFormat ( )
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().

Here is the call graph for this function:

◆ ImportFromZScreamFormat()

absl::Status yaze::core::YazeProject::ImportFromZScreamFormat ( const std::string &  project_path)
private
Todo:
Implement ZScream format parsing when format specification is available

Definition at line 566 of file project.cc.

References InitializeDefaults(), name, and zscream_project_file.

Referenced by Open().

Here is the call graph for this function:

◆ InitializeDefaults()

◆ GenerateProjectId()

std::string yaze::core::YazeProject::GenerateProjectId ( ) const
private

Definition at line 603 of file project.cc.

Member Data Documentation

◆ metadata

◆ name

◆ filepath

◆ format

ProjectFormat yaze::core::YazeProject::format = ProjectFormat::kYazeNative

Definition at line 83 of file project.h.

Referenced by ImportZScreamProject(), and Open().

◆ rom_filename

◆ rom_backup_folder

std::string yaze::core::YazeProject::rom_backup_folder

Definition at line 87 of file project.h.

Referenced by Create(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().

◆ additional_roms

std::vector<std::string> yaze::core::YazeProject::additional_roms

Definition at line 88 of file project.h.

Referenced by LoadFromYazeFormat(), and SaveToYazeFormat().

◆ code_folder

◆ assets_folder

std::string yaze::core::YazeProject::assets_folder

Definition at line 92 of file project.h.

Referenced by Create(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().

◆ patches_folder

std::string yaze::core::YazeProject::patches_folder

◆ labels_filename

◆ symbols_filename

std::string yaze::core::YazeProject::symbols_filename

Definition at line 95 of file project.h.

Referenced by Create(), GetMissingFiles(), LoadFromYazeFormat(), and SaveToYazeFormat().

◆ feature_flags

◆ workspace_settings

◆ resource_labels

◆ use_embedded_labels

◆ build_script

std::string yaze::core::YazeProject::build_script

Definition at line 106 of file project.h.

Referenced by LoadFromYazeFormat(), and SaveToYazeFormat().

◆ output_folder

std::string yaze::core::YazeProject::output_folder

Definition at line 107 of file project.h.

Referenced by Create(), LoadFromYazeFormat(), RepairProject(), and SaveToYazeFormat().

◆ build_configurations

std::vector<std::string> yaze::core::YazeProject::build_configurations

Definition at line 108 of file project.h.

Referenced by InitializeDefaults(), LoadFromYazeFormat(), and SaveToYazeFormat().

◆ git_repository

std::string yaze::core::YazeProject::git_repository

◆ track_changes

bool yaze::core::YazeProject::track_changes = true

◆ agent_settings

◆ zscream_project_file

std::string yaze::core::YazeProject::zscream_project_file

◆ zscream_mappings

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().


The documentation for this struct was generated from the following files: