yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
screen_menu_tilemap_editor.h
Go to the documentation of this file.
1
#ifndef YAZE_APP_EDITOR_GRAPHICS_SCREEN_MENU_TILEMAP_EDITOR_H_
2
#define YAZE_APP_EDITOR_GRAPHICS_SCREEN_MENU_TILEMAP_EDITOR_H_
3
4
#include <array>
5
#include <cstdint>
6
#include <string>
7
#include <vector>
8
9
#include "
app/gfx/core/bitmap.h
"
10
#include "
app/gfx/types/snes_color.h
"
11
#include "
app/gui/canvas/canvas.h
"
12
#include "
app/gui/layout/adaptive_sheet_layout.h
"
13
#include "
app/gui/widgets/tile_selector_widget.h
"
14
#include "
app/platform/sdl_compat.h
"
15
#include "imgui/imgui.h"
16
#include "
rom/rom.h
"
17
#include "
zelda3/game_data.h
"
18
#include "
zelda3/screen/menu_tilemap.h
"
19
20
namespace
yaze
{
21
namespace
project {
22
struct
YazeProject;
23
}
24
namespace
editor {
25
26
class
UndoManager;
27
40
class
MenuTilemapEditorUI
{
41
public
:
42
// `undo_manager` and `rom`/`game_data`/`project` may be null (e.g. no ROM
43
// loaded yet); the panel degrades to "no data source" messaging rather
44
// than crashing.
45
void
Draw
(
Rom
* rom,
zelda3::GameData
* game_data,
46
project::YazeProject
* project,
UndoManager
* undo_manager);
47
48
bool
dirty
()
const
{
return
doc_
.
dirty
(); }
49
bool
loaded
()
const
{
return
loaded_
; }
50
const
std::string&
current_path
()
const
{
return
doc_
.
path
(); }
51
52
// Test-only hook: loads a file the same way "Open..." does, without a
53
// native file dialog (ImGuiTestEngine can't drive OS dialogs). Mirrors
54
// Controller::LoadRomForTesting's naming convention.
55
absl::Status
LoadFileForTesting
(
const
std::string& path) {
56
return
LoadFile
(path);
57
}
58
59
~MenuTilemapEditorUI
();
60
61
private
:
62
enum class
Tool
{
kPaint
,
kSelect
};
63
64
struct
FileListEntry
{
65
std::string
label
;
// display label (relative path)
66
std::string
full_path
;
67
bool
is_dirty
=
false
;
// true if this is the currently-open, dirty doc
68
};
69
70
// --- File / project ---
71
void
DrawFileBar
(
Rom
* rom,
project::YazeProject
* project);
72
void
RefreshProjectFileList
(
project::YazeProject
* project);
73
absl::Status
LoadFile
(
const
std::string& path);
74
absl::Status
SaveCurrent
();
75
absl::Status
SaveCurrentAs
();
76
absl::Status
RevertCurrent
();
77
void
CheckExternalChange
();
78
79
// --- Sources (CHR / palette) ---
80
void
DrawSourceBar
(
Rom
* rom,
zelda3::GameData
* game_data,
81
project::YazeProject
* project);
82
absl::Status
ResolveSources
(
Rom
* rom,
zelda3::GameData
* game_data);
83
// Resolves palette_colors_ per palette_source_kind_ and describes the
84
// source that actually supplied it (including an Auto fallback).
85
absl::Status
ResolvePaletteSource
(
Rom
* rom,
zelda3::GameData
* game_data,
86
std::string* description);
87
void
RebuildRenderTextures
();
88
89
// Owns a small SDL streaming texture for the reference-image overlay
90
// (arbitrary true-color PNG, unlike the indexed gfx::Bitmap used for the
91
// tilemap/picker/WRAM-dump renders).
92
void
SetReferenceImage
(
const
std::vector<uint8_t>& rgba,
int
width,
93
int
height);
94
void
DestroyReferenceTexture
();
95
96
// --- Canvas / tools ---
97
void
DrawToolbar
();
98
void
DrawMainCanvas
();
99
void
DrawTilePicker
();
100
void
DrawHoverReadout
();
101
void
DrawOverlayControls
();
102
void
DrawStatusBar
();
103
104
void
BeginStroke
(
const
std::string& description);
105
// Pushes the pending stroke onto undo_manager_ (set at the top of
106
// Draw() from its parameter) if it actually changed any bytes; no-ops
107
// if undo_manager_ is null (e.g. a caller that doesn't have one).
108
void
CommitStroke
();
109
void
RestoreSnapshot
(
const
std::string& path,
110
const
std::vector<uint8_t>& bytes);
111
112
void
PaintCellAt
(
int
row,
int
col);
113
void
EyedropAt
(
int
row,
int
col);
114
115
// --- Data ---
116
zelda3::MenuTilemapDocument
doc_
;
117
bool
loaded_
=
false
;
118
std::string
open_error_
;
119
120
std::vector<FileListEntry>
project_files_
;
121
bool
project_files_stale_
=
true
;
122
bool
project_has_page3_
=
false
;
123
124
// Sources
125
enum class
ChrSourceKind
{
kRom
,
kFile
};
126
// kAuto (default): the ROM symbol when it resolves to real data,
127
// otherwise Menu/menu_palette.asm when the project has one (the symbol
128
// reads all zero against a base ROM such as oos168.sfc, where the table
129
// is assembled rather than stored). The other kinds are explicit.
130
enum class
PaletteSourceKind
{
kAuto
,
kSymbol
,
kAsm
,
kHud
,
kFile
};
131
ChrSourceKind
chr_source_kind_
=
ChrSourceKind::kRom
;
132
PaletteSourceKind
palette_source_kind_
=
PaletteSourceKind::kAuto
;
133
std::string
palette_label_
=
"Oracle_Menu_Palette"
;
134
std::string
chr_file_path_
;
135
std::string
palette_file_path_
;
136
std::string
last_symbols_path_
;
137
bool
symbols_path_from_project_
=
false
;
138
// Discovered <project>/Menu/menu_palette.asm, or a user-picked override.
139
std::string
palette_asm_path_
;
140
bool
palette_asm_from_project_
=
false
;
141
std::string
asm_search_key_
;
// project path + code folder last searched
142
// Set when an input to the sources changed (kind, path, label, ROM);
143
// ResolveSources() runs once per change instead of every frame, even
144
// when it fails.
145
bool
sources_dirty_
=
true
;
146
const
Rom
*
resolved_rom_
=
nullptr
;
147
std::vector<uint8_t>
chr_sheet_
;
148
std::array<gfx::SnesColor, 32>
palette_colors_
{};
149
std::string
source_status_
;
// last resolve error/status, shown in UI
150
bool
sources_ready_
=
false
;
151
// Cached from Draw()'s parameter so BeginStroke/CommitStroke call sites
152
// elsewhere in this class don't each need it threaded through.
153
UndoManager
*
undo_manager_
=
nullptr
;
154
155
// Render/textures
156
gfx::Bitmap
canvas_bitmap_
;
157
gfx::Bitmap
picker_bitmap_
;
158
std::vector<uint8_t>
picker_indexed_
;
159
int
picker_width_
= 0;
160
int
picker_height_
= 0;
161
162
// Canvas widgets
163
gui::Canvas
canvas_
{
"##MenuTilemapCanvas"
, ImVec2(256, 256),
164
gui::CanvasGridSize::k8x8
, 2.0f};
165
gui::Canvas
picker_canvas_
{
"##MenuTilemapPicker"
, ImVec2(128, 448),
166
gui::CanvasGridSize::k8x8
, 1.0f};
167
// Adaptive sheet layout (Fit/1x/2x/4x, matching the room-graphics /
168
// overworld-canvas convention introduced in #262) for the tile picker's
169
// CHR sheet, which can be a few hundred pixels tall (7 sheets * 64px).
170
gui::TileSelectorWidget
tile_picker_widget_
{
"##MenuTilemapPickerWidget"
};
171
gui::AdaptiveSheetScaleMode
picker_scale_mode_
=
172
gui::AdaptiveSheetScaleMode::k1x
;
173
float
zoom_
= 2.0f;
174
bool
show_grid_
=
true
;
175
bool
show_priority_tint_
=
false
;
176
ImVec2
last_canvas_screen_origin_
{0.0f, 0.0f};
177
178
// Tool state
179
Tool
tool_
=
Tool::kPaint
;
180
int
selected_tile_id_
= 0;
181
int
selected_palette_
= 0;
182
bool
h_flip_
=
false
;
183
bool
v_flip_
=
false
;
184
bool
priority_
=
false
;
185
uint16_t
erase_word_
= 0x0000;
186
187
// Rect select
188
bool
selecting_
=
false
;
189
bool
has_selection_
=
false
;
190
ImVec2
select_drag_start_
{-1, -1};
191
zelda3::MenuTilemapDocument::Rect
selection_
{};
192
zelda3::MenuTilemapDocument::Clipboard
clipboard_
;
193
bool
has_clipboard_
=
false
;
194
195
// Stroke/undo
196
bool
stroke_active_
=
false
;
197
std::vector<uint8_t>
stroke_before_bytes_
;
198
std::string
stroke_description_
;
199
200
// Hover readout
201
bool
has_hover_
=
false
;
202
int
hover_row_
= 0;
203
int
hover_col_
= 0;
204
205
// Preview overlays
206
bool
show_ref_overlay_
=
false
;
207
float
ref_opacity_
= 0.5f;
208
ImVec2
ref_nudge_
{0.0f, 0.0f};
209
std::string
ref_image_path_
;
210
SDL_Texture*
ref_texture_
=
nullptr
;
211
int
ref_texture_width_
= 0;
212
int
ref_texture_height_
= 0;
213
bool
ref_loaded_
=
false
;
214
215
bool
show_wram_overlay_
=
false
;
216
std::string
wram_dump_path_
;
217
gfx::Bitmap
wram_bitmap_
;
218
bool
wram_loaded_
=
false
;
219
220
bool
show_dynamic_layer_
=
false
;
221
222
// Reload-on-external-change prompt
223
bool
show_reload_prompt_
=
false
;
224
double
last_external_check_time_
= -1.0;
225
};
226
227
}
// namespace editor
228
}
// namespace yaze
229
230
#endif
// YAZE_APP_EDITOR_GRAPHICS_SCREEN_MENU_TILEMAP_EDITOR_H_
adaptive_sheet_layout.h
bitmap.h
canvas.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:49
yaze::editor::MenuTilemapEditorUI
Self-contained ImGui UI for editing a single Oracle-of-Secrets- style 2bpp BG3 menu tilemap file,...
Definition
screen_menu_tilemap_editor.h:40
yaze::editor::MenuTilemapEditorUI::SaveCurrentAs
absl::Status SaveCurrentAs()
Definition
screen_menu_tilemap_editor.cc:324
yaze::editor::MenuTilemapEditorUI::EyedropAt
void EyedropAt(int row, int col)
Definition
screen_menu_tilemap_editor.cc:1103
yaze::editor::MenuTilemapEditorUI::wram_bitmap_
gfx::Bitmap wram_bitmap_
Definition
screen_menu_tilemap_editor.h:217
yaze::editor::MenuTilemapEditorUI::picker_height_
int picker_height_
Definition
screen_menu_tilemap_editor.h:160
yaze::editor::MenuTilemapEditorUI::open_error_
std::string open_error_
Definition
screen_menu_tilemap_editor.h:118
yaze::editor::MenuTilemapEditorUI::dirty
bool dirty() const
Definition
screen_menu_tilemap_editor.h:48
yaze::editor::MenuTilemapEditorUI::doc_
zelda3::MenuTilemapDocument doc_
Definition
screen_menu_tilemap_editor.h:116
yaze::editor::MenuTilemapEditorUI::palette_asm_path_
std::string palette_asm_path_
Definition
screen_menu_tilemap_editor.h:139
yaze::editor::MenuTilemapEditorUI::show_wram_overlay_
bool show_wram_overlay_
Definition
screen_menu_tilemap_editor.h:215
yaze::editor::MenuTilemapEditorUI::DestroyReferenceTexture
void DestroyReferenceTexture()
Definition
screen_menu_tilemap_editor.cc:88
yaze::editor::MenuTilemapEditorUI::show_grid_
bool show_grid_
Definition
screen_menu_tilemap_editor.h:174
yaze::editor::MenuTilemapEditorUI::canvas_
gui::Canvas canvas_
Definition
screen_menu_tilemap_editor.h:163
yaze::editor::MenuTilemapEditorUI::palette_source_kind_
PaletteSourceKind palette_source_kind_
Definition
screen_menu_tilemap_editor.h:132
yaze::editor::MenuTilemapEditorUI::erase_word_
uint16_t erase_word_
Definition
screen_menu_tilemap_editor.h:185
yaze::editor::MenuTilemapEditorUI::v_flip_
bool v_flip_
Definition
screen_menu_tilemap_editor.h:183
yaze::editor::MenuTilemapEditorUI::ref_opacity_
float ref_opacity_
Definition
screen_menu_tilemap_editor.h:207
yaze::editor::MenuTilemapEditorUI::DrawTilePicker
void DrawTilePicker()
Definition
screen_menu_tilemap_editor.cc:893
yaze::editor::MenuTilemapEditorUI::loaded_
bool loaded_
Definition
screen_menu_tilemap_editor.h:117
yaze::editor::MenuTilemapEditorUI::DrawStatusBar
void DrawStatusBar()
Definition
screen_menu_tilemap_editor.cc:1046
yaze::editor::MenuTilemapEditorUI::show_dynamic_layer_
bool show_dynamic_layer_
Definition
screen_menu_tilemap_editor.h:220
yaze::editor::MenuTilemapEditorUI::priority_
bool priority_
Definition
screen_menu_tilemap_editor.h:184
yaze::editor::MenuTilemapEditorUI::palette_label_
std::string palette_label_
Definition
screen_menu_tilemap_editor.h:133
yaze::editor::MenuTilemapEditorUI::tool_
Tool tool_
Definition
screen_menu_tilemap_editor.h:179
yaze::editor::MenuTilemapEditorUI::~MenuTilemapEditorUI
~MenuTilemapEditorUI()
Definition
screen_menu_tilemap_editor.cc:84
yaze::editor::MenuTilemapEditorUI::ResolvePaletteSource
absl::Status ResolvePaletteSource(Rom *rom, zelda3::GameData *game_data, std::string *description)
Definition
screen_menu_tilemap_editor.cc:557
yaze::editor::MenuTilemapEditorUI::DrawToolbar
void DrawToolbar()
Definition
screen_menu_tilemap_editor.cc:746
yaze::editor::MenuTilemapEditorUI::ref_texture_width_
int ref_texture_width_
Definition
screen_menu_tilemap_editor.h:211
yaze::editor::MenuTilemapEditorUI::loaded
bool loaded() const
Definition
screen_menu_tilemap_editor.h:49
yaze::editor::MenuTilemapEditorUI::picker_bitmap_
gfx::Bitmap picker_bitmap_
Definition
screen_menu_tilemap_editor.h:157
yaze::editor::MenuTilemapEditorUI::BeginStroke
void BeginStroke(const std::string &description)
Definition
screen_menu_tilemap_editor.cc:1054
yaze::editor::MenuTilemapEditorUI::sources_ready_
bool sources_ready_
Definition
screen_menu_tilemap_editor.h:150
yaze::editor::MenuTilemapEditorUI::current_path
const std::string & current_path() const
Definition
screen_menu_tilemap_editor.h:50
yaze::editor::MenuTilemapEditorUI::DrawOverlayControls
void DrawOverlayControls()
Definition
screen_menu_tilemap_editor.cc:970
yaze::editor::MenuTilemapEditorUI::tile_picker_widget_
gui::TileSelectorWidget tile_picker_widget_
Definition
screen_menu_tilemap_editor.h:170
yaze::editor::MenuTilemapEditorUI::stroke_before_bytes_
std::vector< uint8_t > stroke_before_bytes_
Definition
screen_menu_tilemap_editor.h:197
yaze::editor::MenuTilemapEditorUI::hover_col_
int hover_col_
Definition
screen_menu_tilemap_editor.h:203
yaze::editor::MenuTilemapEditorUI::show_ref_overlay_
bool show_ref_overlay_
Definition
screen_menu_tilemap_editor.h:206
yaze::editor::MenuTilemapEditorUI::show_priority_tint_
bool show_priority_tint_
Definition
screen_menu_tilemap_editor.h:175
yaze::editor::MenuTilemapEditorUI::stroke_active_
bool stroke_active_
Definition
screen_menu_tilemap_editor.h:196
yaze::editor::MenuTilemapEditorUI::picker_scale_mode_
gui::AdaptiveSheetScaleMode picker_scale_mode_
Definition
screen_menu_tilemap_editor.h:171
yaze::editor::MenuTilemapEditorUI::show_reload_prompt_
bool show_reload_prompt_
Definition
screen_menu_tilemap_editor.h:223
yaze::editor::MenuTilemapEditorUI::PaintCellAt
void PaintCellAt(int row, int col)
Definition
screen_menu_tilemap_editor.cc:1096
yaze::editor::MenuTilemapEditorUI::last_symbols_path_
std::string last_symbols_path_
Definition
screen_menu_tilemap_editor.h:136
yaze::editor::MenuTilemapEditorUI::h_flip_
bool h_flip_
Definition
screen_menu_tilemap_editor.h:182
yaze::editor::MenuTilemapEditorUI::stroke_description_
std::string stroke_description_
Definition
screen_menu_tilemap_editor.h:198
yaze::editor::MenuTilemapEditorUI::clipboard_
zelda3::MenuTilemapDocument::Clipboard clipboard_
Definition
screen_menu_tilemap_editor.h:192
yaze::editor::MenuTilemapEditorUI::wram_loaded_
bool wram_loaded_
Definition
screen_menu_tilemap_editor.h:218
yaze::editor::MenuTilemapEditorUI::project_has_page3_
bool project_has_page3_
Definition
screen_menu_tilemap_editor.h:122
yaze::editor::MenuTilemapEditorUI::DrawMainCanvas
void DrawMainCanvas()
Definition
screen_menu_tilemap_editor.cc:801
yaze::editor::MenuTilemapEditorUI::palette_asm_from_project_
bool palette_asm_from_project_
Definition
screen_menu_tilemap_editor.h:140
yaze::editor::MenuTilemapEditorUI::DrawSourceBar
void DrawSourceBar(Rom *rom, zelda3::GameData *game_data, project::YazeProject *project)
Definition
screen_menu_tilemap_editor.cc:360
yaze::editor::MenuTilemapEditorUI::hover_row_
int hover_row_
Definition
screen_menu_tilemap_editor.h:202
yaze::editor::MenuTilemapEditorUI::RestoreSnapshot
void RestoreSnapshot(const std::string &path, const std::vector< uint8_t > &bytes)
Definition
screen_menu_tilemap_editor.cc:1085
yaze::editor::MenuTilemapEditorUI::chr_sheet_
std::vector< uint8_t > chr_sheet_
Definition
screen_menu_tilemap_editor.h:147
yaze::editor::MenuTilemapEditorUI::canvas_bitmap_
gfx::Bitmap canvas_bitmap_
Definition
screen_menu_tilemap_editor.h:156
yaze::editor::MenuTilemapEditorUI::select_drag_start_
ImVec2 select_drag_start_
Definition
screen_menu_tilemap_editor.h:190
yaze::editor::MenuTilemapEditorUI::ref_loaded_
bool ref_loaded_
Definition
screen_menu_tilemap_editor.h:213
yaze::editor::MenuTilemapEditorUI::has_selection_
bool has_selection_
Definition
screen_menu_tilemap_editor.h:189
yaze::editor::MenuTilemapEditorUI::has_hover_
bool has_hover_
Definition
screen_menu_tilemap_editor.h:201
yaze::editor::MenuTilemapEditorUI::ChrSourceKind
ChrSourceKind
Definition
screen_menu_tilemap_editor.h:125
yaze::editor::MenuTilemapEditorUI::ChrSourceKind::kFile
@ kFile
yaze::editor::MenuTilemapEditorUI::ChrSourceKind::kRom
@ kRom
yaze::editor::MenuTilemapEditorUI::selected_palette_
int selected_palette_
Definition
screen_menu_tilemap_editor.h:181
yaze::editor::MenuTilemapEditorUI::selection_
zelda3::MenuTilemapDocument::Rect selection_
Definition
screen_menu_tilemap_editor.h:191
yaze::editor::MenuTilemapEditorUI::palette_file_path_
std::string palette_file_path_
Definition
screen_menu_tilemap_editor.h:135
yaze::editor::MenuTilemapEditorUI::RevertCurrent
absl::Status RevertCurrent()
Definition
screen_menu_tilemap_editor.cc:335
yaze::editor::MenuTilemapEditorUI::project_files_stale_
bool project_files_stale_
Definition
screen_menu_tilemap_editor.h:121
yaze::editor::MenuTilemapEditorUI::last_canvas_screen_origin_
ImVec2 last_canvas_screen_origin_
Definition
screen_menu_tilemap_editor.h:176
yaze::editor::MenuTilemapEditorUI::PaletteSourceKind
PaletteSourceKind
Definition
screen_menu_tilemap_editor.h:130
yaze::editor::MenuTilemapEditorUI::PaletteSourceKind::kSymbol
@ kSymbol
yaze::editor::MenuTilemapEditorUI::PaletteSourceKind::kHud
@ kHud
yaze::editor::MenuTilemapEditorUI::PaletteSourceKind::kAsm
@ kAsm
yaze::editor::MenuTilemapEditorUI::PaletteSourceKind::kAuto
@ kAuto
yaze::editor::MenuTilemapEditorUI::chr_source_kind_
ChrSourceKind chr_source_kind_
Definition
screen_menu_tilemap_editor.h:131
yaze::editor::MenuTilemapEditorUI::Draw
void Draw(Rom *rom, zelda3::GameData *game_data, project::YazeProject *project, UndoManager *undo_manager)
Definition
screen_menu_tilemap_editor.cc:123
yaze::editor::MenuTilemapEditorUI::LoadFileForTesting
absl::Status LoadFileForTesting(const std::string &path)
Definition
screen_menu_tilemap_editor.h:55
yaze::editor::MenuTilemapEditorUI::selected_tile_id_
int selected_tile_id_
Definition
screen_menu_tilemap_editor.h:180
yaze::editor::MenuTilemapEditorUI::last_external_check_time_
double last_external_check_time_
Definition
screen_menu_tilemap_editor.h:224
yaze::editor::MenuTilemapEditorUI::picker_width_
int picker_width_
Definition
screen_menu_tilemap_editor.h:159
yaze::editor::MenuTilemapEditorUI::RefreshProjectFileList
void RefreshProjectFileList(project::YazeProject *project)
Definition
screen_menu_tilemap_editor.cc:251
yaze::editor::MenuTilemapEditorUI::project_files_
std::vector< FileListEntry > project_files_
Definition
screen_menu_tilemap_editor.h:120
yaze::editor::MenuTilemapEditorUI::symbols_path_from_project_
bool symbols_path_from_project_
Definition
screen_menu_tilemap_editor.h:137
yaze::editor::MenuTilemapEditorUI::asm_search_key_
std::string asm_search_key_
Definition
screen_menu_tilemap_editor.h:141
yaze::editor::MenuTilemapEditorUI::SaveCurrent
absl::Status SaveCurrent()
Definition
screen_menu_tilemap_editor.cc:318
yaze::editor::MenuTilemapEditorUI::ref_texture_height_
int ref_texture_height_
Definition
screen_menu_tilemap_editor.h:212
yaze::editor::MenuTilemapEditorUI::ref_nudge_
ImVec2 ref_nudge_
Definition
screen_menu_tilemap_editor.h:208
yaze::editor::MenuTilemapEditorUI::source_status_
std::string source_status_
Definition
screen_menu_tilemap_editor.h:149
yaze::editor::MenuTilemapEditorUI::CheckExternalChange
void CheckExternalChange()
Definition
screen_menu_tilemap_editor.cc:343
yaze::editor::MenuTilemapEditorUI::zoom_
float zoom_
Definition
screen_menu_tilemap_editor.h:173
yaze::editor::MenuTilemapEditorUI::ResolveSources
absl::Status ResolveSources(Rom *rom, zelda3::GameData *game_data)
Definition
screen_menu_tilemap_editor.cc:644
yaze::editor::MenuTilemapEditorUI::ref_image_path_
std::string ref_image_path_
Definition
screen_menu_tilemap_editor.h:209
yaze::editor::MenuTilemapEditorUI::chr_file_path_
std::string chr_file_path_
Definition
screen_menu_tilemap_editor.h:134
yaze::editor::MenuTilemapEditorUI::undo_manager_
UndoManager * undo_manager_
Definition
screen_menu_tilemap_editor.h:153
yaze::editor::MenuTilemapEditorUI::SetReferenceImage
void SetReferenceImage(const std::vector< uint8_t > &rgba, int width, int height)
Definition
screen_menu_tilemap_editor.cc:97
yaze::editor::MenuTilemapEditorUI::picker_indexed_
std::vector< uint8_t > picker_indexed_
Definition
screen_menu_tilemap_editor.h:158
yaze::editor::MenuTilemapEditorUI::Tool
Tool
Definition
screen_menu_tilemap_editor.h:62
yaze::editor::MenuTilemapEditorUI::Tool::kSelect
@ kSelect
yaze::editor::MenuTilemapEditorUI::Tool::kPaint
@ kPaint
yaze::editor::MenuTilemapEditorUI::has_clipboard_
bool has_clipboard_
Definition
screen_menu_tilemap_editor.h:193
yaze::editor::MenuTilemapEditorUI::DrawFileBar
void DrawFileBar(Rom *rom, project::YazeProject *project)
Definition
screen_menu_tilemap_editor.cc:196
yaze::editor::MenuTilemapEditorUI::palette_colors_
std::array< gfx::SnesColor, 32 > palette_colors_
Definition
screen_menu_tilemap_editor.h:148
yaze::editor::MenuTilemapEditorUI::ref_texture_
SDL_Texture * ref_texture_
Definition
screen_menu_tilemap_editor.h:210
yaze::editor::MenuTilemapEditorUI::RebuildRenderTextures
void RebuildRenderTextures()
Definition
screen_menu_tilemap_editor.cc:684
yaze::editor::MenuTilemapEditorUI::selecting_
bool selecting_
Definition
screen_menu_tilemap_editor.h:188
yaze::editor::MenuTilemapEditorUI::picker_canvas_
gui::Canvas picker_canvas_
Definition
screen_menu_tilemap_editor.h:165
yaze::editor::MenuTilemapEditorUI::CommitStroke
void CommitStroke()
Definition
screen_menu_tilemap_editor.cc:1060
yaze::editor::MenuTilemapEditorUI::wram_dump_path_
std::string wram_dump_path_
Definition
screen_menu_tilemap_editor.h:216
yaze::editor::MenuTilemapEditorUI::resolved_rom_
const Rom * resolved_rom_
Definition
screen_menu_tilemap_editor.h:146
yaze::editor::MenuTilemapEditorUI::DrawHoverReadout
void DrawHoverReadout()
Definition
screen_menu_tilemap_editor.cc:959
yaze::editor::MenuTilemapEditorUI::sources_dirty_
bool sources_dirty_
Definition
screen_menu_tilemap_editor.h:145
yaze::editor::MenuTilemapEditorUI::LoadFile
absl::Status LoadFile(const std::string &path)
Definition
screen_menu_tilemap_editor.cc:302
yaze::editor::UndoManager
Manages undo/redo stacks for a single editor.
Definition
undo_manager.h:23
yaze::gfx::Bitmap
Represents a bitmap image optimized for SNES ROM hacking.
Definition
bitmap.h:70
yaze::gui::Canvas
Modern, robust canvas for drawing and manipulating graphics.
Definition
canvas.h:64
yaze::gui::TileSelectorWidget
Reusable tile selector built on top of Canvas.
Definition
tile_selector_widget.h:19
yaze::zelda3::MenuTilemapDocument
Definition
menu_tilemap.h:30
yaze::zelda3::MenuTilemapDocument::dirty
bool dirty() const
Definition
menu_tilemap.h:104
yaze::zelda3::MenuTilemapDocument::path
const std::string & path() const
Definition
menu_tilemap.h:103
game_data.h
menu_tilemap.h
yaze::gui::AdaptiveSheetScaleMode
AdaptiveSheetScaleMode
Definition
adaptive_sheet_layout.h:10
yaze::gui::AdaptiveSheetScaleMode::k1x
@ k1x
yaze::gui::CanvasGridSize::k8x8
@ k8x8
yaze
Definition
patch_export_usage.cc:8
rom.h
sdl_compat.h
SDL2/SDL3 compatibility layer.
snes_color.h
yaze::editor::MenuTilemapEditorUI::FileListEntry
Definition
screen_menu_tilemap_editor.h:64
yaze::editor::MenuTilemapEditorUI::FileListEntry::is_dirty
bool is_dirty
Definition
screen_menu_tilemap_editor.h:67
yaze::editor::MenuTilemapEditorUI::FileListEntry::full_path
std::string full_path
Definition
screen_menu_tilemap_editor.h:66
yaze::editor::MenuTilemapEditorUI::FileListEntry::label
std::string label
Definition
screen_menu_tilemap_editor.h:65
yaze::project::YazeProject
Modern project structure with comprehensive settings consolidation.
Definition
project.h:287
yaze::zelda3::GameData
Definition
game_data.h:74
yaze::zelda3::MenuTilemapDocument::Clipboard
Definition
menu_tilemap.h:47
yaze::zelda3::MenuTilemapDocument::Rect
Definition
menu_tilemap.h:38
tile_selector_widget.h
src
app
editor
graphics
screen_menu_tilemap_editor.h
Generated by
1.10.0