yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
memory_editor.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_CODE_MEMORY_EDITOR_H
2#define YAZE_APP_EDITOR_CODE_MEMORY_EDITOR_H
3
4#include "absl/container/flat_hash_map.h"
5#include "app/editor/editor.h"
8#include "rom/rom.h"
9#include "rom/snes.h"
10#include "imgui/imgui.h"
11#include "util/file_util.h"
12#include "util/macro.h"
13
14namespace yaze {
15namespace editor {
16
17using ImGui::SameLine;
18using ImGui::Text;
19
21 explicit MemoryEditor(Rom* rom = nullptr) : rom_(rom) {}
22
23 void Update(bool& show_memory_editor);
24
25 // Set the ROM pointer
26 void SetRom(Rom* rom) { rom_ = rom; }
27
28 // Get the ROM pointer
29 Rom* rom() const { return rom_; }
30
31 private:
32 void DrawToolbar();
34 void DrawSearchPopup();
35 void DrawBookmarksPopup();
36
40 bool show_compare_rom_ = false;
42
43 // Toolbar state
44 char jump_address_[16] = "0x000000";
45 char search_pattern_[256] = "";
46 uint32_t current_address_ = 0;
47
48 struct Bookmark {
49 uint32_t address;
50 std::string name;
51 std::string description;
52 };
53 std::vector<Bookmark> bookmarks_;
54};
55
56} // namespace editor
57} // namespace yaze
58
59#endif // YAZE_APP_EDITOR_CODE_MEMORY_EDITOR_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
void Update(bool &show_memory_editor)
std::vector< Bookmark > bookmarks_
gui::MemoryEditorWidget memory_widget_
gui::MemoryEditorWidget comparison_widget_
MemoryEditor(Rom *rom=nullptr)