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
"
6
#include "
app/gui/core/input.h
"
7
#include "
app/gui/imgui_memory_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
14
namespace
yaze
{
15
namespace
editor {
16
17
using
ImGui::SameLine;
18
using
ImGui::Text;
19
20
struct
MemoryEditor
{
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
();
33
void
DrawJumpToAddressPopup
();
34
void
DrawSearchPopup
();
35
void
DrawBookmarksPopup
();
36
37
Rom
*
rom_
;
38
gui::MemoryEditorWidget
memory_widget_
;
39
gui::MemoryEditorWidget
comparison_widget_
;
40
bool
show_compare_rom_
=
false
;
41
Rom
comparison_rom_
;
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
yaze::Rom
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
editor.h
file_util.h
imgui_memory_editor.h
input.h
macro.h
yaze
Definition
application.cc:18
snes.h
rom.h
yaze::editor::MemoryEditor::Bookmark
Definition
memory_editor.h:48
yaze::editor::MemoryEditor::Bookmark::description
std::string description
Definition
memory_editor.h:51
yaze::editor::MemoryEditor::Bookmark::address
uint32_t address
Definition
memory_editor.h:49
yaze::editor::MemoryEditor::Bookmark::name
std::string name
Definition
memory_editor.h:50
yaze::editor::MemoryEditor
Definition
memory_editor.h:20
yaze::editor::MemoryEditor::rom
Rom * rom() const
Definition
memory_editor.h:29
yaze::editor::MemoryEditor::search_pattern_
char search_pattern_[256]
Definition
memory_editor.h:45
yaze::editor::MemoryEditor::Update
void Update(bool &show_memory_editor)
Definition
memory_editor.cc:11
yaze::editor::MemoryEditor::bookmarks_
std::vector< Bookmark > bookmarks_
Definition
memory_editor.h:53
yaze::editor::MemoryEditor::memory_widget_
gui::MemoryEditorWidget memory_widget_
Definition
memory_editor.h:38
yaze::editor::MemoryEditor::comparison_rom_
Rom comparison_rom_
Definition
memory_editor.h:41
yaze::editor::MemoryEditor::current_address_
uint32_t current_address_
Definition
memory_editor.h:46
yaze::editor::MemoryEditor::jump_address_
char jump_address_[16]
Definition
memory_editor.h:44
yaze::editor::MemoryEditor::SetRom
void SetRom(Rom *rom)
Definition
memory_editor.h:26
yaze::editor::MemoryEditor::DrawBookmarksPopup
void DrawBookmarksPopup()
Definition
memory_editor.cc:187
yaze::editor::MemoryEditor::comparison_widget_
gui::MemoryEditorWidget comparison_widget_
Definition
memory_editor.h:39
yaze::editor::MemoryEditor::DrawJumpToAddressPopup
void DrawJumpToAddressPopup()
Definition
memory_editor.cc:96
yaze::editor::MemoryEditor::DrawToolbar
void DrawToolbar()
Definition
memory_editor.cc:50
yaze::editor::MemoryEditor::DrawSearchPopup
void DrawSearchPopup()
Definition
memory_editor.cc:139
yaze::editor::MemoryEditor::show_compare_rom_
bool show_compare_rom_
Definition
memory_editor.h:40
yaze::editor::MemoryEditor::rom_
Rom * rom_
Definition
memory_editor.h:37
yaze::editor::MemoryEditor::MemoryEditor
MemoryEditor(Rom *rom=nullptr)
Definition
memory_editor.h:21
yaze::gui::MemoryEditorWidget
Definition
imgui_memory_editor.h:25
src
app
editor
code
memory_editor.h
Generated by
1.10.0