yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
oracle_state_library_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_AGENT_PANELS_ORACLE_STATE_LIBRARY_PANEL_H_
2#define YAZE_APP_EDITOR_AGENT_PANELS_ORACLE_STATE_LIBRARY_PANEL_H_
3
4#include <memory>
5#include <string>
6#include <vector>
7
8#include "absl/status/status.h"
10
11namespace yaze {
12namespace editor {
13
17struct StateEntry {
18 std::string id;
19 std::string label;
20 std::string path;
21 std::string status; // "draft", "canon", "deprecated"
22 std::string md5;
23 std::string captured_by;
24 std::string verified_by;
25 std::string verified_at;
26 std::string deprecated_reason;
27 std::vector<std::string> tags;
28
29 // Metadata
30 int module = 0;
31 int room = 0;
32 int area = 0;
33 bool indoors = false;
34 int link_x = 0;
35 int link_y = 0;
36 int health = 0;
37 int max_health = 0;
38 int rupees = 0;
39 std::string location;
40 std::string summary;
41};
42
54 public:
57
61 void Draw();
62
66 void SetClient(std::shared_ptr<emu::mesen::MesenSocketClient> client);
67
71 void RefreshLibrary();
72
76 absl::Status LoadState(const std::string& state_id);
77
81 absl::Status VerifyState(const std::string& state_id);
82
86 absl::Status DeprecateState(const std::string& state_id,
87 const std::string& reason);
88
89 private:
90 void DrawToolbar();
91 void DrawStateList();
92 void DrawStateDetails();
94 void LoadManifest();
95 void SaveManifest();
96
97 std::shared_ptr<emu::mesen::MesenSocketClient> client_;
98
99 // Library data
100 std::vector<StateEntry> entries_;
101 std::string library_root_;
102 std::string manifest_path_;
103
104 // UI state
106 bool show_deprecated_ = false;
107 bool show_draft_ = true;
108 bool show_canon_ = true;
109 char filter_text_[128] = {};
110 char tag_filter_[64] = {};
111
112 // Verification dialog state
114 std::string verify_target_id_;
115 char verify_notes_[256] = {};
116
117 // Deprecation dialog state
120 char deprecate_reason_[256] = {};
121
122 // Status
123 std::string status_message_;
124 bool status_is_error_ = false;
125};
126
127} // namespace editor
128} // namespace yaze
129
130#endif // YAZE_APP_EDITOR_AGENT_PANELS_ORACLE_STATE_LIBRARY_PANEL_H_
ImGui panel for Oracle of Secrets save state library management.
void SetClient(std::shared_ptr< emu::mesen::MesenSocketClient > client)
Set the Mesen socket client for emulator communication.
std::shared_ptr< emu::mesen::MesenSocketClient > client_
absl::Status VerifyState(const std::string &state_id)
Verify and promote a state to canon.
absl::Status DeprecateState(const std::string &state_id, const std::string &reason)
Deprecate a state.
absl::Status LoadState(const std::string &state_id)
Load a state into the emulator.
void RefreshLibrary()
Refresh the state library from disk.
State entry from the Oracle save state library.
std::vector< std::string > tags