yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_PROJECT_H
2#define YAZE_CORE_PROJECT_H
3
4#include <algorithm>
5#include <cstdint>
6#include <map>
7#include <optional>
8#include <string>
9#include <unordered_map>
10#include <vector>
11
12#include "absl/status/status.h"
13#include "absl/status/statusor.h"
14#include "absl/strings/string_view.h"
15#include "core/features.h"
16#include "core/hack_manifest.h"
17#include "core/rom_settings.h"
18#include "core/sprite_asset.h"
20
21namespace yaze {
22namespace core {
23class LyraTerrainDocument;
24}
25namespace project {
26
31enum class ProjectFormat {
32 kYazeNative, // .yaze - YAZE native format
33 kZScreamCompat // .zsproj - ZScream compatibility format
34};
35
41 std::string version = "2.0";
42 std::string created_by = "YAZE";
43 std::string created_date;
44 std::string last_modified;
45 std::string yaze_version;
46 std::string description;
47 std::vector<std::string> tags;
48 std::string author;
49 std::string license;
50 std::string project_id;
51
52 // ZScream compatibility
53 bool zscream_compatible = false;
54 std::string zscream_version;
55};
56
62 // Display settings
63 float font_global_scale = 1.0f;
64 bool dark_mode = true;
65 std::string ui_theme = "default";
66
67 // Layout settings
68 std::string last_layout_preset;
69 std::vector<std::string> saved_layouts;
70 std::string window_layout_data; // ImGui .ini data
71
72 // Editor preferences
73 bool autosave_enabled = true;
74 float autosave_interval_secs = 300.0f; // 5 minutes
75 bool backup_on_save = true;
76 bool show_grid = true;
77 bool show_collision = false;
78
79 // Backup management
80 int backup_retention_count = 20; // Keep last N backups (0 = unlimited)
81 bool backup_keep_daily = true; // Keep one backup per day
82 int backup_keep_daily_days = 14; // Days to retain daily snapshots
83
84 // Label preferences
85 bool prefer_hmagic_names = true; // Prefer Hyrule Magic sprite names
86
87 // Advanced settings
88 std::map<std::string, std::string> custom_keybindings;
89 std::vector<std::string> recent_files;
90 std::map<std::string, bool> editor_visibility;
91};
92
98 // Collision tile IDs used by minecart tracks and interactions.
99 std::vector<uint16_t> track_tiles;
100 std::vector<uint16_t> track_stop_tiles;
101 std::vector<uint16_t> track_switch_tiles;
102
103 // Object/Sprite IDs used for minecart tooling and validation.
104 std::vector<uint16_t> track_object_ids;
105 std::vector<uint16_t> minecart_sprite_ids;
106};
107
118 std::vector<uint16_t> reserved_sheets;
119 std::vector<uint16_t> flagged_sheets;
120 std::map<uint16_t, std::vector<uint16_t>> reserved_blocks;
121
122 bool empty() const {
123 return reserved_sheets.empty() && flagged_sheets.empty() &&
124 reserved_blocks.empty();
125 }
126};
127
138 // Annotation files, merged in order (yaze.atlas/1 or the Oracle of Secrets
139 // room/overworld files). `annotations=a.json,b.json`.
140 std::vector<std::string> annotations;
141 // "vanilla" (built-in vanilla names and colors) or "none".
142 std::string defaults = "vanilla";
143 // Optional .sym for symbol links. Empty: the .sym next to the ROM, then
144 // [files] symbols_filename.
145 std::string symbols;
146 // Folder for the editor's Export buttons. Empty: the project folder.
147 std::string export_folder;
148 // The loaded file had an [atlas] section; save writes it back even when
149 // every value is the default.
150 bool section_present = false;
151
152 bool IsDefault() const {
153 return annotations.empty() && defaults == "vanilla" && symbols.empty() &&
154 export_folder.empty();
155 }
156 bool operator==(const AtlasSettings& other) const {
157 return annotations == other.annotations && defaults == other.defaults &&
158 symbols == other.symbols && export_folder == other.export_folder;
159 }
160};
161
171 std::string file;
172 // The loaded file had a [planning] section; save writes it back even when
173 // `file` is empty.
174 bool section_present = false;
175
176 bool IsDefault() const { return file.empty(); }
177 bool operator==(const PlanningSettings& other) const {
178 return file == other.file;
179 }
180};
181
197 struct Line {
198 enum class Kind : uint8_t { kComment, kKnownKey, kUnknownLine };
200 std::string key; // kKnownKey and kUnknownLine (empty without '=').
201 std::string text; // The line as written, without its line ending.
202 };
203 struct Section {
204 std::string name; // Without brackets. "" = before the first section.
205 bool known = false; // A section this build parses.
206 std::vector<Line> lines;
207 };
208 std::vector<Section> sections; // File order, one entry per section name.
209
210 bool empty() const {
211 for (const auto& section : sections) {
212 for (const auto& line : section.lines) {
213 if (line.kind != Line::Kind::kKnownKey) {
214 return false;
215 }
216 }
217 }
218 return true;
219 }
220};
221
223// kBlock rejects identity/protected-range conflicts; kReadOnly forbids ROM writes.
225
231
233 uint32_t start = 0;
234 uint32_t end = 0;
235 std::string reason;
236};
237
239 std::string symbols_mlb;
240 std::string sourcemap_json;
241 std::string annotations_json;
242 std::string hooks_json;
243 std::string lint_json;
244};
245
247 bool loaded = false;
248 std::string config_path;
249 std::string preset;
250 std::vector<std::string> include_paths;
251 std::vector<std::pair<std::string, std::string>> defines;
252 std::vector<std::string> emits;
253 std::vector<std::string> main_files;
254 std::string std_includes_path;
255 std::string std_defines_path;
256 std::string mapper;
257 int rom_size = 0;
258 std::string symbols_format;
259 std::string symbols_path;
260 std::vector<Z3dkMemoryRange> prohibited_memory_ranges;
261 std::optional<bool> lsp_log_enabled;
262 std::string lsp_log_path;
269 bool warn_hook_return = true;
270 std::string rom_path;
272};
273
274std::string RomRoleToString(RomRole role);
275RomRole ParseRomRole(absl::string_view value);
276std::string RomWritePolicyToString(RomWritePolicy policy);
277RomWritePolicy ParseRomWritePolicy(absl::string_view value);
278
279// Native files use atomic replacement. Browser files use synchronous VFS
280// replacement or exclusive creation. When replace_existing is false, an
281// existing destination is rejected without mutation.
282absl::Status WriteProjectFileAtomically(absl::string_view target_path,
283 absl::string_view contents,
284 bool replace_existing);
285
291 YazeProject() = default;
292 YazeProject(const YazeProject&) = default;
296 // Open() and InitializeResourceLabelProvider() point the process-wide
297 // zelda3::GetResourceLabels() at this project's members; the destructor
298 // releases any binding that still refers to them.
299 ~YazeProject();
300
301 // Basic project info
303 std::string name;
304 std::string filepath;
306
307 // ROM and resources
308 std::string rom_filename;
309 std::string rom_backup_folder;
310 std::vector<std::string> additional_roms; // For multi-ROM projects
312
313 // Code and assets
314 std::string code_folder;
315 std::string assets_folder;
316 std::string patches_folder;
317 std::string labels_filename;
318 std::string symbols_filename;
319 // Overworld cutscene camera/actor shots ([files] cutscene_shots). Empty:
320 // the Cutscene Camera window is read-only and offers Copy JSON.
321 std::string cutscene_shots;
322 // Optional read-only raw DMA graphics preview manifest, relative to project.
324 // Read-only literal ASM tile patterns for the standard dungeon renderer.
326 // Tracked custom collision source kept in step with the ROM on every save
327 // ([files] custom_collision_json). Empty: collision lives only in the ROM.
329 std::string
330 custom_objects_folder; // Folder containing custom object .bin files
331 std::string
332 hack_manifest_file; // Path to hack_manifest.json (ASM integration)
333 // Opt-in, read-only sprite catalog. Both paths resolve relative to the project.
336 std::vector<SpriteAssetBinding> sprite_assets;
337
338 // Optional game-independent terrain labels, stored outside the ROM.
340
341 // Optional editable Lyra terrain document, independent of ROM map storage.
342 std::string lyra_terrain_file;
343
344 // Optional producer request; saving does not refresh its source bindings.
346
347 // Optional build-transfer control references. Save preserves their paths,
348 // but does not create, copy, or refresh their contents. The canonical Save
349 // receipt remains adjacent to the descriptor, even with a legacy reference.
353
354 // Optional read-only palette names, contextual sprite uses and provenance.
356
357 // Optional custom object file mapping (object_id -> filenames per subtype).
358 std::unordered_map<int, std::vector<std::string>> custom_object_files;
359
360 // Consolidated settings (previously scattered across multiple files)
368 std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
370
371 // Embedded labels flag - when true, resource_labels contains all default
372 // Zelda3 labels
374
375 // ASM hack integration manifest (loaded from hack_manifest_file)
377
378 // Optional z3dk project configuration discovered from z3dk.toml.
380
381 // Build and deployment
382 std::string build_script;
383 std::string output_folder;
384 std::vector<std::string> build_configurations;
385 std::string build_target;
386 std::string asm_entry_point;
387 std::vector<std::string> asm_sources;
388
389 // Version control integration
390 std::string git_repository;
391 bool track_changes = true;
392 std::string last_build_hash;
394
395 // AI Agent Settings
397 std::string ai_provider =
398 "auto"; // auto, gemini, anthropic, openai, ollama, mock
399 std::string ai_model; // e.g., "gemini-2.5-flash", "llama3:latest"
400 std::string ollama_host = "http://localhost:11434";
401 std::string gemini_api_key; // Optional, can use env var
402 std::string
403 custom_system_prompt; // Path to custom prompt (relative to project)
404 bool use_custom_prompt = false;
405 bool show_reasoning = true;
406 bool verbose = false;
409 float temperature = 0.25f;
410 float top_p = 0.95f;
412 bool stream_responses = false;
413 std::vector<std::string> favorite_models;
414 std::vector<std::string> model_chain;
415 int chain_mode = 0;
421 bool enable_tool_gui = true;
422 bool enable_tool_music = true;
426 std::string builder_blueprint_path; // Saved agent builder configuration
428
429 // ZScream compatibility (for importing existing projects)
430 std::string zscream_project_file; // Path to original .zsproj if importing
431 std::map<std::string, std::string> zscream_mappings; // Field mappings
432
433 // WASM persistence (project + music state in IndexedDB)
439
440 // Unknown sections, unknown keys and comments from the loaded .yaze file,
441 // written back on save (see ProjectFilePassthrough).
443
444 // Bundle resolution
445 // Walk up the path hierarchy to find the first ancestor directory whose
446 // filename ends with ".yazeproj". If `path` itself is a .yazeproj directory,
447 // returns it as-is. Returns an empty string when no bundle root is found.
448 static std::string ResolveBundleRoot(const std::string& path);
449
450 // Methods
451 absl::Status Create(const std::string& project_name,
452 const std::string& base_path);
453 absl::Status Open(const std::string& project_path);
454 // Parse an in-memory native project descriptor as if it lived at
455 // `project_path`. Used by the raw project editor to validate and adopt a
456 // draft before it replaces the active descriptor on disk.
457 absl::Status LoadFromString(const std::string& content,
458 const std::string& project_path);
459 // Checks the persisted source/build settings against this live context.
460 // UI layout, timestamps and recent-file history do not qualify build inputs.
461 absl::Status ValidateSavedSourceBindings(const std::string& content) const;
462 // Returns no selection when lyra_build_request_file is empty. Native-save
463 // producer/proof references alone describe capability, not expanded admission.
464 // Expanded claims require the existing completed build and its current
465 // hash-bound Save/transfer evidence. Failure must not use a manifest fallback.
466 // This does not compile, grant allocation, or create completion evidence.
467 absl::StatusOr<std::optional<std::string>> ResolveExpandedBuildRunTarget(
468 const std::string& editing_source_path) const;
469 // Serializes without writing, for coordinated descriptor/sidecar publication.
470 absl::StatusOr<std::string> SerializeToString() const;
471 absl::Status Save();
472 // Create a new descriptor without replacing a file that appeared after the
473 // caller's preflight check.
474 absl::Status SaveNew();
475 absl::Status SaveAs(const std::string& new_path);
476 // Saves an independent project-owned terrain copy without modifying the
477 // original terrain. Both destination files roll back together on failure.
478 absl::Status SaveAsWithLyraTerrain(
479 const std::string& new_path, const core::LyraTerrainDocument& terrain,
480 const std::optional<std::string>& expected_source_bytes);
481 absl::Status ImportZScreamProject(const std::string& zscream_project_path);
482 absl::Status ExportForZScream(const std::string& target_path);
483
484 // Settings management
485 absl::Status LoadAllSettings();
486 absl::Status SaveAllSettings();
487 absl::Status ResetToDefaults();
488
489 // Labels management
490 absl::Status InitializeEmbeddedLabels(
491 const std::unordered_map<std::string,
492 std::unordered_map<std::string, std::string>>&
493 labels); // Load all default Zelda3 labels
494 std::string GetLabel(const std::string& resource_type, int id,
495 const std::string& default_value = "") const;
496
502 absl::Status ImportLabelsFromZScream(const std::string& filepath);
503
509 absl::Status ImportLabelsFromZScreamContent(const std::string& content);
510
515
516 // Validation and integrity
517 absl::Status Validate() const;
518 std::vector<std::string> GetMissingFiles() const;
519 absl::Status RepairProject();
520
521 // Utilities
522 // Normalize filesystem paths to absolute paths based on the project file
523 // location. This avoids relying on the process working directory when
524 // opening ROMs/projects (important for iOS and portable bundles).
526 std::string GetDisplayName() const;
527 std::string GetRelativePath(const std::string& absolute_path) const;
528 std::string GetAbsolutePath(const std::string& relative_path) const;
529 // [atlas] annotations / symbols resolved against the project file.
530 std::vector<std::string> AtlasAnnotationPaths() const;
531 std::string AtlasSymbolsPath() const;
532 // [planning] file resolved against the project file; empty when unset.
533 std::string PlanningFilePath() const;
534 bool IsEmpty() const;
535 std::string MakeStorageKey(absl::string_view suffix) const;
536
537 // Project state
538 bool project_opened() const { return !name.empty() && !filepath.empty(); }
539 // Manifest identity, independent of the project filename or display name.
540 bool IsOracleCompatible() const;
541
542 // Hack manifest (ASM integration) reload hook (safe no-op if unset).
543 void ReloadHackManifest();
544 void ReloadZ3dkSettings();
545 bool HasZ3dkConfig() const { return z3dk_settings.loaded; }
546 std::string GetZ3dkArtifactPath(absl::string_view artifact_name) const;
547
548 private:
549 absl::Status ParseFromString(const std::string& content);
550 absl::Status LoadFromYazeFormat(const std::string& project_path);
551 absl::Status SaveToYazeFormat(bool replace_existing = true);
552 absl::Status ImportFromZScreamFormat(const std::string& project_path);
553
554#ifdef YAZE_ENABLE_JSON_PROJECT_FORMAT
555 absl::Status LoadFromJsonFormat(const std::string& project_path);
556 absl::Status SaveToJsonFormat();
557#endif
558
559 void InitializeDefaults();
560 void TryLoadZ3dkConfig();
561 void TryLoadHackManifest();
562 std::string GenerateProjectId() const;
563};
564
570 public:
571 // Project templates
573 std::string name;
574 std::string description;
575 std::string icon;
577 };
578
579 static std::vector<ProjectTemplate> GetProjectTemplates();
580 static absl::StatusOr<YazeProject> CreateFromTemplate(
581 const std::string& template_name, const std::string& project_name,
582 const std::string& base_path);
583
584 // Project discovery and management
585 static std::vector<std::string> FindProjectsInDirectory(
586 const std::string& directory);
587 static absl::Status BackupProject(const YazeProject& project);
588 static absl::Status RestoreProject(const std::string& backup_path);
589
590 // Format conversion utilities
591 static absl::Status ConvertProject(const std::string& source_path,
592 const std::string& target_path,
593 ProjectFormat target_format);
594
595 // Validation and repair
596 static absl::Status ValidateProjectStructure(const YazeProject& project);
597 static std::vector<std::string> GetRecommendedFixesForProject(
598 const YazeProject& project);
599};
600
601// Compatibility - ResourceLabelManager (still used by ROM class)
603 bool LoadLabels(const std::string& filename);
604 bool SaveLabels();
605 void DisplayLabels(bool* p_open);
606 void EditLabel(const std::string& type, const std::string& key,
607 const std::string& newValue);
608 void SelectableLabelWithNameEdit(bool selected, const std::string& type,
609 const std::string& key,
610 const std::string& defaultValue);
611 std::string GetLabel(const std::string& type, const std::string& key);
612 std::string CreateOrGetLabel(const std::string& type, const std::string& key,
613 const std::string& defaultValue);
614
615 bool labels_loaded_ = false;
616 std::string filename_;
618 std::string key_name;
620 };
621
622 std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
624};
625
626// Compatibility - RecentFilesManager
627const std::string kRecentFilesFilename = "recent_files.txt";
628
630 public:
631 // Singleton pattern - get the global instance
633 static RecentFilesManager instance;
634 return instance;
635 }
636
637 // Delete copy constructor and assignment operator
640
641 void AddFile(const std::string& file_path) {
642 // Add a file to the list, avoiding duplicates
643 // Move to front if already exists (MRU - Most Recently Used)
644 auto it = std::find(recent_files_.begin(), recent_files_.end(), file_path);
645 if (it != recent_files_.end()) {
646 recent_files_.erase(it);
647 }
648 recent_files_.insert(recent_files_.begin(), file_path);
649
650 // Limit to 20 most recent files
651 if (recent_files_.size() > 20) {
652 recent_files_.resize(20);
653 }
655 }
656
657 void RemoveFile(const std::string& file_path) {
658 auto it = std::find(recent_files_.begin(), recent_files_.end(), file_path);
659 if (it != recent_files_.end()) {
660 recent_files_.erase(it);
662 }
663 }
664
665 void Save();
666
667 void Load();
668
669 const std::vector<std::string>& GetRecentFiles() const {
670 return recent_files_;
671 }
672
673 void Clear() {
674 recent_files_.clear();
676 }
677
679 [[nodiscard]] std::uint64_t GetGeneration() const { return generation_; }
680
681 private:
683 Load(); // Load on construction
684 }
685
686 std::string GetFilePath() const;
687
689
690 std::vector<std::string> recent_files_;
691 std::uint64_t generation_ = 0;
692};
693
694} // namespace project
695} // namespace yaze
696
697#endif // YAZE_CORE_PROJECT_H
Loads and queries the hack manifest JSON for yaze-ASM integration.
Enhanced project management with templates and validation.
Definition project.h:569
static std::vector< std::string > FindProjectsInDirectory(const std::string &directory)
Definition project.cc:3385
static absl::Status ValidateProjectStructure(const YazeProject &project)
Definition project.cc:3448
static absl::StatusOr< YazeProject > CreateFromTemplate(const std::string &template_name, const std::string &project_name, const std::string &base_path)
Definition project.cc:3343
static std::vector< std::string > GetRecommendedFixesForProject(const YazeProject &project)
Definition project.cc:3453
static std::vector< ProjectTemplate > GetProjectTemplates()
Definition project.cc:3195
static absl::Status RestoreProject(const std::string &backup_path)
static absl::Status ConvertProject(const std::string &source_path, const std::string &target_path, ProjectFormat target_format)
static absl::Status BackupProject(const YazeProject &project)
Definition project.cc:3415
void RemoveFile(const std::string &file_path)
Definition project.h:657
std::string GetFilePath() const
Definition project.cc:4307
void AddFile(const std::string &file_path)
Definition project.h:641
static RecentFilesManager & GetInstance()
Definition project.h:632
std::uint64_t GetGeneration() const
Bumps when recent file list changes (add/remove/clear/load).
Definition project.h:679
const std::vector< std::string > & GetRecentFiles() const
Definition project.h:669
RecentFilesManager(const RecentFilesManager &)=delete
std::vector< std::string > recent_files_
Definition project.h:690
RecentFilesManager & operator=(const RecentFilesManager &)=delete
std::string RomRoleToString(RomRole role)
Definition project.cc:461
absl::Status WriteProjectFileAtomically(absl::string_view target_path, absl::string_view contents, bool replace_existing)
Definition project.cc:453
RomRole ParseRomRole(absl::string_view value)
Definition project.cc:475
const std::string kRecentFilesFilename
Definition project.h:627
ProjectFormat
Supported project file formats.
Definition project.h:31
RomWritePolicy ParseRomWritePolicy(absl::string_view value)
Definition project.cc:503
std::string RomWritePolicyToString(RomWritePolicy policy)
Definition project.cc:489
Atlas map views ([atlas]).
Definition project.h:137
std::vector< std::string > annotations
Definition project.h:140
bool operator==(const AtlasSettings &other) const
Definition project.h:156
Dungeon overlay configuration (per-project).
Definition project.h:97
std::vector< uint16_t > track_object_ids
Definition project.h:104
std::vector< uint16_t > minecart_sprite_ids
Definition project.h:105
std::vector< uint16_t > track_stop_tiles
Definition project.h:100
std::vector< uint16_t > track_tiles
Definition project.h:99
std::vector< uint16_t > track_switch_tiles
Definition project.h:101
Project rules for graphics sheets ([graphics_sheets]).
Definition project.h:117
std::vector< uint16_t > reserved_sheets
Definition project.h:118
std::map< uint16_t, std::vector< uint16_t > > reserved_blocks
Definition project.h:120
std::vector< uint16_t > flagged_sheets
Definition project.h:119
Planning editor sidecar ([planning]).
Definition project.h:170
bool operator==(const PlanningSettings &other) const
Definition project.h:177
Lines of a .yaze file that this build does not model.
Definition project.h:196
std::vector< Section > sections
Definition project.h:208
Enhanced metadata for project tracking.
Definition project.h:40
std::vector< std::string > tags
Definition project.h:47
std::string CreateOrGetLabel(const std::string &type, const std::string &key, const std::string &defaultValue)
Definition project.cc:3604
std::string GetLabel(const std::string &type, const std::string &key)
Definition project.cc:3591
void EditLabel(const std::string &type, const std::string &key, const std::string &newValue)
Definition project.cc:3573
bool LoadLabels(const std::string &filename)
Definition project.cc:3488
void SelectableLabelWithNameEdit(bool selected, const std::string &type, const std::string &key, const std::string &defaultValue)
Definition project.cc:3579
std::unordered_map< std::string, std::unordered_map< std::string, std::string > > labels_
Definition project.h:623
std::string expected_hash
Definition project.h:228
RomWritePolicy write_policy
Definition project.h:229
Consolidated workspace and UI settings.
Definition project.h:61
std::map< std::string, std::string > custom_keybindings
Definition project.h:88
std::vector< std::string > saved_layouts
Definition project.h:69
std::map< std::string, bool > editor_visibility
Definition project.h:90
std::vector< std::string > recent_files
Definition project.h:89
std::vector< std::string > favorite_models
Definition project.h:413
std::vector< std::string > model_chain
Definition project.h:414
Modern project structure with comprehensive settings consolidation.
Definition project.h:290
std::string rom_backup_folder
Definition project.h:309
std::unordered_map< int, std::vector< std::string > > custom_object_files
Definition project.h:358
YazeProject & operator=(YazeProject &&)=default
absl::Status ResetToDefaults()
Definition project.cc:2539
std::string custom_objects_folder
Definition project.h:330
absl::Status RepairProject()
Definition project.cc:2614
std::string MakeStorageKey(absl::string_view suffix) const
Definition project.cc:1337
static std::string ResolveBundleRoot(const std::string &path)
Definition project.cc:581
absl::Status ValidateSavedSourceBindings(const std::string &content) const
Definition project.cc:804
struct yaze::project::YazeProject::MusicPersistence music_persistence
YazeProject & operator=(const YazeProject &)=default
bool project_opened() const
Definition project.h:538
std::string sprite_catalog_file
Definition project.h:334
absl::StatusOr< std::string > SerializeToString() const
Definition project.cc:1586
std::string zscream_project_file
Definition project.h:430
absl::Status ExportForZScream(const std::string &target_path)
Definition project.cc:2506
ProjectMetadata metadata
Definition project.h:302
absl::Status SaveToYazeFormat(bool replace_existing=true)
Definition project.cc:2450
std::string native_save_transfer_proof_file
Definition project.h:351
absl::Status ImportZScreamProject(const std::string &zscream_project_path)
Definition project.cc:2483
absl::Status SaveAllSettings()
Definition project.cc:2534
absl::Status LoadFromString(const std::string &content, const std::string &project_path)
Definition project.cc:773
absl::Status ImportLabelsFromZScreamContent(const std::string &content)
Import labels from ZScream format content directly.
Definition project.cc:3712
std::string git_repository
Definition project.h:390
core::HackManifest hack_manifest
Definition project.h:376
void InitializeResourceLabelProvider()
Initialize the global ResourceLabelProvider with this project's labels.
Definition project.cc:3736
absl::Status ParseFromString(const std::string &content)
Definition project.cc:1987
std::string cutscene_shots
Definition project.h:321
std::vector< std::string > additional_roms
Definition project.h:310
bool HasZ3dkConfig() const
Definition project.h:545
std::string native_save_receipt_file
Definition project.h:352
std::string lyra_terrain_file
Definition project.h:342
std::string terrain_catalog_file
Definition project.h:339
std::string patches_folder
Definition project.h:316
absl::Status LoadFromYazeFormat(const std::string &project_path)
Definition project.cc:2429
std::unordered_map< std::string, std::unordered_map< std::string, std::string > > resource_labels
Definition project.h:369
std::vector< std::string > AtlasAnnotationPaths() const
Definition project.cc:2747
std::string GenerateProjectId() const
Definition project.cc:3186
absl::Status Create(const std::string &project_name, const std::string &base_path)
Definition project.cc:528
std::string assets_folder
Definition project.h:315
GraphicsSheetSettings graphics_sheets
Definition project.h:364
std::string AtlasSymbolsPath() const
Definition project.cc:2756
YazeProject(const YazeProject &)=default
absl::Status LoadAllSettings()
Definition project.cc:2528
std::string labels_filename
Definition project.h:317
std::vector< std::string > asm_sources
Definition project.h:387
std::string hack_manifest_file
Definition project.h:332
std::string GetDisplayName() const
Definition project.cc:2648
PlanningSettings planning
Definition project.h:366
std::string PlanningFilePath() const
Definition project.cc:2760
std::string native_save_producer_file
Definition project.h:350
std::vector< std::string > GetMissingFiles() const
Definition project.cc:2589
std::string lyra_build_request_file
Definition project.h:345
WorkspaceSettings workspace_settings
Definition project.h:362
std::string GetZ3dkArtifactPath(absl::string_view artifact_name) const
Definition project.cc:2790
std::string output_folder
Definition project.h:383
std::string asm_entry_point
Definition project.h:386
std::string GetRelativePath(const std::string &absolute_path) const
Definition project.cc:2655
std::vector< SpriteAssetBinding > sprite_assets
Definition project.h:336
absl::Status InitializeEmbeddedLabels(const std::unordered_map< std::string, std::unordered_map< std::string, std::string > > &labels)
Definition project.cc:3619
ProjectFilePassthrough file_passthrough
Definition project.h:442
absl::StatusOr< std::optional< std::string > > ResolveExpandedBuildRunTarget(const std::string &editing_source_path) const
Definition project.cc:889
absl::Status SaveAs(const std::string &new_path)
Definition project.cc:1195
absl::Status SaveNew()
Definition project.cc:769
bool IsOracleCompatible() const
Definition project.cc:1207
struct yaze::project::YazeProject::AgentSettings agent_settings
std::string custom_collision_json
Definition project.h:328
DungeonOverlaySettings dungeon_overlay
Definition project.h:363
absl::Status SaveAsWithLyraTerrain(const std::string &new_path, const core::LyraTerrainDocument &terrain, const std::optional< std::string > &expected_source_bytes)
Definition project.cc:1214
std::string palette_catalog_file
Definition project.h:355
absl::Status ImportFromZScreamFormat(const std::string &project_path)
Definition project.cc:2768
std::string GetAbsolutePath(const std::string &relative_path) const
Definition project.cc:2675
std::string overworld_graphics_preview
Definition project.h:323
std::string GetLabel(const std::string &resource_type, int id, const std::string &default_value="") const
Definition project.cc:3677
std::string sprite_source_root
Definition project.h:335
absl::Status Open(const std::string &project_path)
Definition project.cc:607
absl::Status ImportLabelsFromZScream(const std::string &filepath)
Import labels from a ZScream DefaultNames.txt file.
Definition project.cc:3692
YazeProject(YazeProject &&)=default
std::string last_build_hash
Definition project.h:392
std::map< std::string, std::string > zscream_mappings
Definition project.h:431
std::string dungeon_tile_patterns
Definition project.h:325
absl::Status Validate() const
Definition project.cc:2544
core::FeatureFlags::Flags feature_flags
Definition project.h:361
std::vector< std::string > build_configurations
Definition project.h:384
core::RomAddressOverrides rom_address_overrides
Definition project.h:367
std::string symbols_filename
Definition project.h:318
Z3dkSettings z3dk_settings
Definition project.h:379
std::vector< std::string > include_paths
Definition project.h:250
std::string std_includes_path
Definition project.h:254
std::vector< std::string > main_files
Definition project.h:253
std::vector< std::string > emits
Definition project.h:252
std::vector< std::pair< std::string, std::string > > defines
Definition project.h:251
Z3dkArtifactPaths artifact_paths
Definition project.h:271
std::optional< bool > lsp_log_enabled
Definition project.h:261
std::vector< Z3dkMemoryRange > prohibited_memory_ranges
Definition project.h:260
std::string std_defines_path
Definition project.h:255