yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
oracle_menu_registry.h
Go to the documentation of this file.
1#ifndef YAZE_CORE_ORACLE_MENU_REGISTRY_H_
2#define YAZE_CORE_ORACLE_MENU_REGISTRY_H_
3
4#include <filesystem>
5#include <string>
6#include <vector>
7
8#include "absl/status/statusor.h"
9
10namespace yaze::core {
11
13 std::string label;
14 std::string asm_path;
15 int line = 0;
16 std::string bin_path;
17 std::string resolved_bin_path;
18 bool exists = false;
19 uintmax_t size_bytes = 0;
20};
21
23 std::string label;
24 std::string asm_path;
25 int line = 0;
26 bool local = false;
27 int references = 0;
28};
29
31 std::string table_label;
32 int index = 0;
33 int row = 0;
34 int col = 0;
35 std::string note;
36 std::string asm_path;
37 int line = 0;
38};
39
41 std::filesystem::path project_root;
42 std::vector<std::string> asm_files;
43 std::vector<OracleMenuBinEntry> bins;
44 std::vector<OracleMenuDrawRoutine> draw_routines;
45 std::vector<OracleMenuComponent> components;
46 std::vector<std::string> warnings;
47};
48
53
61
63 int errors = 0;
64 int warnings = 0;
65 std::vector<OracleMenuValidationIssue> issues;
66};
67
69 std::string asm_path;
70 int line = 0;
71 std::string table_label;
72 int index = 0;
73 int old_row = 0;
74 int old_col = 0;
75 int new_row = 0;
76 int new_col = 0;
77 std::string old_line;
78 std::string new_line;
79 bool changed = false;
80 bool write_applied = false;
81};
82
83absl::StatusOr<std::filesystem::path> ResolveOracleProjectRoot(
84 const std::filesystem::path& start_path);
85
86absl::StatusOr<OracleMenuRegistry> BuildOracleMenuRegistry(
87 const std::filesystem::path& project_root);
88
90 const OracleMenuRegistry& registry, int max_row = 31, int max_col = 31);
91
92absl::StatusOr<OracleMenuComponentEditResult> SetOracleMenuComponentOffset(
93 const std::filesystem::path& project_root,
94 const std::string& asm_relative_path, const std::string& table_label,
95 int index, int row, int col, bool write_changes);
96
97} // namespace yaze::core
98
99#endif // YAZE_CORE_ORACLE_MENU_REGISTRY_H_
absl::StatusOr< std::filesystem::path > ResolveOracleProjectRoot(const std::filesystem::path &start_path)
absl::StatusOr< OracleMenuRegistry > BuildOracleMenuRegistry(const std::filesystem::path &project_root)
absl::StatusOr< OracleMenuComponentEditResult > SetOracleMenuComponentOffset(const std::filesystem::path &project_root, const std::string &asm_relative_path, const std::string &table_label, int index, int row, int col, bool write_changes)
OracleMenuValidationReport ValidateOracleMenuRegistry(const OracleMenuRegistry &registry, int max_row, int max_col)
std::vector< OracleMenuComponent > components
std::vector< OracleMenuDrawRoutine > draw_routines
std::vector< std::string > warnings
std::vector< std::string > asm_files
std::vector< OracleMenuBinEntry > bins
OracleMenuValidationSeverity severity
std::vector< OracleMenuValidationIssue > issues