Popup window to edit Tile16 data. More...
#include <tile16_editor.h>

Classes | |
| struct | LayoutScratch |
Public Member Functions | |
| Tile16Editor (Rom *rom, gfx::Tilemap *tile16_blockset) | |
| absl::Status | Initialize (const gfx::Bitmap &tile16_blockset_bmp, const gfx::Bitmap ¤t_gfx_bmp, std::array< uint8_t, 0x200 > &all_tiles_types) |
| absl::Status | Update () |
| absl::Status | UpdateAsPanel () |
| Update the editor content without MenuBar (for EditorPanel usage) | |
| void | DrawContextMenu () |
| Draw context menu with editor actions. | |
| void | DrawTile16Editor () |
| absl::Status | UpdateBlockset () |
| void | DrawScratchSpace () |
| absl::Status | SaveLayoutToScratch (int slot) |
| absl::Status | LoadLayoutFromScratch (int slot) |
| absl::Status | DrawToCurrentTile16 (ImVec2 pos, const gfx::Bitmap *source_tile=nullptr) |
| absl::Status | UpdateTile16Edit () |
| absl::Status | LoadTile8 () |
| absl::Status | SetCurrentTile (int id) |
| void | RequestTileSwitch (int target_tile_id) |
| absl::Status | CopyTile16ToClipboard (int tile_id) |
| absl::Status | PasteTile16FromClipboard () |
| absl::Status | SaveTile16ToScratchSpace (int slot) |
| absl::Status | LoadTile16FromScratchSpace (int slot) |
| absl::Status | ClearScratchSpace (int slot) |
| absl::Status | FlipTile16Horizontal () |
| absl::Status | FlipTile16Vertical () |
| absl::Status | RotateTile16 () |
| absl::Status | FillTile16WithTile8 (int tile8_id) |
| absl::Status | AutoTileTile16 () |
| absl::Status | ClearTile16 () |
| absl::Status | CyclePalette (bool forward=true) |
| absl::Status | ApplyPaletteToAll (uint8_t palette_id) |
| absl::Status | PreviewPaletteChange (uint8_t palette_id) |
| absl::Status | ApplyToSelection (const std::function< void(int)> &operation) |
| absl::Status | BatchEdit (const std::vector< int > &tile_ids, const std::function< void(int)> &operation) |
| absl::Status | Undo () |
| absl::Status | Redo () |
| void | SaveUndoState () |
| void | EnableLivePreview (bool enable) |
| absl::Status | UpdateLivePreview () |
| absl::Status | ValidateTile16Data () |
| bool | IsTile16Valid (int tile_id) const |
| absl::Status | SaveTile16ToROM () |
| Write current tile16 data directly to ROM (bypasses pending system) | |
| absl::Status | UpdateOverworldTilemap () |
| Update the overworld tilemap to reflect tile changes. | |
| absl::Status | CommitChangesToBlockset () |
| Commit pending changes to the blockset atlas. | |
| absl::Status | CommitChangesToOverworld () |
| Full commit workflow: ROM + blockset + notify parent. | |
| absl::Status | DiscardChanges () |
| Discard current tile's changes (single tile) | |
| bool | has_pending_changes () const |
| Check if any tiles have uncommitted changes. | |
| int | pending_changes_count () const |
| Get count of tiles with pending changes. | |
| bool | is_tile_modified (int tile_id) const |
| Check if a specific tile has pending changes. | |
| const gfx::Bitmap * | GetPendingTileBitmap (int tile_id) const |
| Get preview bitmap for a pending tile (nullptr if not modified) | |
| absl::Status | CommitAllChanges () |
| Write all pending changes to ROM and notify parent. | |
| void | DiscardAllChanges () |
| Discard all pending changes (revert to ROM state) | |
| void | DiscardCurrentTileChanges () |
| Discard only the current tile's pending changes. | |
| void | MarkCurrentTileModified () |
| Mark the current tile as having pending changes. | |
| absl::Status | UpdateTile8Palette (int tile8_id) |
| Update palette for a specific tile8. | |
| absl::Status | RefreshAllPalettes () |
| Refresh all tile8 palettes after a palette change. | |
| void | DrawPaletteSettings () |
| Draw palette settings UI. | |
| int | GetPaletteSlotForSheet (int sheet_index) const |
| Get base palette slot for a graphics sheet. | |
| int | GetActualPaletteSlot (int palette_button, int sheet_index) const |
| Calculate actual palette slot from button + sheet. | |
| int | GetPaletteBaseForSheet (int sheet_index) const |
| Get palette base row for a graphics sheet. | |
| int | GetSheetIndexForTile8 (int tile8_id) const |
| Determine which graphics sheet contains a tile8. | |
| int | GetActualPaletteSlotForCurrentTile16 () const |
| Get the palette slot for the current tile being edited. | |
| gfx::SnesPalette | CreateRemappedPaletteForViewing (const gfx::SnesPalette &source, int target_row) const |
| Create a remapped palette for viewing with user-selected palette. | |
| int | GetEncodedPaletteRow (uint8_t pixel_value) const |
| Get the encoded palette row for a pixel value. | |
| absl::Status | UpdateROMTile16Data () |
| absl::Status | RefreshTile16Blockset () |
| gfx::Tile16 * | GetCurrentTile16Data () |
| absl::Status | RegenerateTile16BitmapFromROM () |
| absl::Status | UpdateBlocksetBitmap () |
| absl::Status | PickTile8FromTile16 (const ImVec2 &position) |
| void | DrawManualTile8Inputs () |
| void | SetRom (Rom *rom) |
| Rom * | rom () const |
| void | SetGameData (zelda3::GameData *game_data) |
| zelda3::GameData * | game_data () const |
| void | set_palette (const gfx::SnesPalette &palette) |
| void | set_on_changes_committed (std::function< absl::Status()> callback) |
| int | current_palette () const |
| void | set_current_palette (int palette) |
| int | current_tile16 () const |
| int | current_tile8 () const |
| void | AnalyzeTile8SourceData () const |
Private Member Functions | |
| void | FinalizePendingUndo () |
| Finalize any pending undo snapshot by capturing current state as "after" and pushing a Tile16EditAction to undo_manager_. | |
| void | RestoreFromSnapshot (const Tile16Snapshot &snapshot) |
| Restore editor state from a Tile16Snapshot (used by undo actions). | |
| void | ApplyPaletteToCurrentTile16Bitmap () |
| void | HandleKeyboardShortcuts () |
| void | CopyTile16ToAtlas (int tile_id) |
Static Private Attributes | |
| static constexpr int | kTilesPerPage = 64 |
| static constexpr int | kTilesPerRow = 8 |
Additional Inherited Members | |
Static Protected Attributes inherited from yaze::gfx::GfxContext | |
| static std::unordered_map< uint8_t, gfx::Paletteset > | palettesets_ |
Popup window to edit Tile16 data.
Provides visual editing of 16x16 tiles composed of four 8x8 sub-tiles. Uses a pending changes system to prevent accidental ROM modifications.
Definition at line 125 of file tile16_editor.h.
|
inline |
Definition at line 127 of file tile16_editor.h.
| absl::Status yaze::editor::Tile16Editor::Initialize | ( | const gfx::Bitmap & | tile16_blockset_bmp, |
| const gfx::Bitmap & | current_gfx_bmp, | ||
| std::array< uint8_t, 0x200 > & | all_tiles_types ) |
Definition at line 97 of file tile16_editor.cc.
References yaze::gui::AddTableColumn(), all_tiles_types_, yaze::gui::TileSelectorWidget::AttachCanvas(), blockset_canvas_, blockset_selector_, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_gfx_bmp_, current_tile16_, current_tile16_bmp_, current_tile8_, yaze::gui::Canvas::custom_labels_enabled(), yaze::gfx::Bitmap::depth(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::height(), yaze::util::HexByte(), yaze::gui::Canvas::InitializeDefaults(), yaze::gui::Canvas::InitializePaletteEditor(), yaze::editor::kTile16PixelCount, yaze::editor::kTile16Size, map_blockset_loaded_, yaze::gui::Canvas::mutable_labels(), yaze::gfx::Bitmap::palette(), priority_tile, yaze::gfx::Arena::QueueTextureCommand(), RETURN_IF_ERROR, rom_, yaze::gui::Canvas::SetAutoResize(), SetCurrentTile(), yaze::gfx::Bitmap::SetPalette(), yaze::gui::TileSelectorWidget::SetTileCount(), tile16_blockset_, tile16_blockset_bmp_, tile16_edit_canvas_, tile8_source_canvas_, tile_edit_table_, yaze::gfx::Bitmap::vector(), yaze::gfx::Bitmap::width(), x_flip, and y_flip.
Referenced by yaze::editor::OverworldEditor::Load(), and yaze::test::RomDependentTestSuite::RunTile16EditorTest().
| absl::Status yaze::editor::Tile16Editor::Update | ( | ) |
Definition at line 178 of file tile16_editor.cc.
References ClearScratchSpace(), CommitChangesToBlockset(), CopyTile16ToClipboard(), current_tile16_, yaze::gui::Canvas::custom_labels_enabled(), yaze::gui::DangerButton(), DrawPaletteSettings(), DrawTile16Editor(), EnableLivePreview(), GetCurrentTile16Data(), HandleKeyboardShortcuts(), yaze::zelda3::kTile16Ptr, live_preview_enabled_, LoadTile16FromScratchSpace(), map_blockset_loaded_, PasteTile16FromClipboard(), pending_tile16_bitmaps_, pending_tile16_changes_, pending_tile_switch_target_, RefreshTile16Blockset(), RETURN_IF_ERROR, rom_, SaveTile16ToROM(), SaveTile16ToScratchSpace(), scratch_space_, SetCurrentTile(), show_unsaved_changes_dialog_, status_, yaze::gui::SuccessButton(), tile8_source_canvas_, UpdateLivePreview(), and yaze::Rom::WriteTile16().
| absl::Status yaze::editor::Tile16Editor::UpdateAsPanel | ( | ) |
Update the editor content without MenuBar (for EditorPanel usage)
This is the panel-friendly version that doesn't require ImGuiWindowFlags_MenuBar. Menu items are available through the context menu instead.
Definition at line 339 of file tile16_editor.cc.
References current_tile16_, yaze::gui::DangerButton(), DrawContextMenu(), DrawPaletteSettings(), DrawTile16Editor(), GetCurrentTile16Data(), HandleKeyboardShortcuts(), ICON_MD_MENU, yaze::zelda3::kTile16Ptr, map_blockset_loaded_, pending_tile16_bitmaps_, pending_tile16_changes_, pending_tile_switch_target_, RefreshTile16Blockset(), RETURN_IF_ERROR, rom_, SetCurrentTile(), show_unsaved_changes_dialog_, yaze::gui::SuccessButton(), UpdateLivePreview(), and yaze::Rom::WriteTile16().
| void yaze::editor::Tile16Editor::DrawContextMenu | ( | ) |
Draw context menu with editor actions.
Contains the same actions as the MenuBar but in context menu form. Call this when right-clicking or from a menu button.
Definition at line 433 of file tile16_editor.cc.
References ClearScratchSpace(), ClearTile16(), CommitChangesToBlockset(), CopyTile16ToClipboard(), current_tile16_, yaze::gui::Canvas::custom_labels_enabled(), EnableLivePreview(), FlipTile16Horizontal(), FlipTile16Vertical(), live_preview_enabled_, LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), RotateTile16(), SaveTile16ToROM(), SaveTile16ToScratchSpace(), scratch_space_, status_, and tile8_source_canvas_.
Referenced by UpdateAsPanel().
| void yaze::editor::Tile16Editor::DrawTile16Editor | ( | ) |
Definition at line 334 of file tile16_editor.cc.
References status_, and UpdateTile16Edit().
Referenced by Update(), and UpdateAsPanel().

| absl::Status yaze::editor::Tile16Editor::UpdateBlockset | ( | ) |
Definition at line 507 of file tile16_editor.cc.
References yaze::gui::BeginCanvas(), yaze::gui::BeginChildWithScrollbar(), yaze::gui::BeginPadding(), blockset_canvas_, blockset_selector_, current_tile16_, yaze::gui::CanvasFrameOptions::draw_context_menu, yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, yaze::gui::TileSelectorWidget::DrawFilterBar(), yaze::gui::EndCanvas(), yaze::gui::EndPadding(), yaze::gui::TileSelectorWidget::GetSelectedTileID(), yaze::gui::CanvasFrameOptions::grid_step, yaze::util::logf(), yaze::gui::TileSelectorWidget::Render(), yaze::gui::CanvasFrameOptions::render_popups, RequestTileSwitch(), yaze::gui::TileSelectorWidget::SetSelectedTile(), tile16_blockset_bmp_, and yaze::gui::CanvasFrameOptions::use_child_window.
| void yaze::editor::Tile16Editor::DrawScratchSpace | ( | ) |
Definition at line 3231 of file tile16_editor.cc.
References layout_scratch_, LoadLayoutFromScratch(), SaveLayoutToScratch(), and status_.
Referenced by UpdateTile16Edit().

| absl::Status yaze::editor::Tile16Editor::SaveLayoutToScratch | ( | int | slot | ) |
Definition at line 3258 of file tile16_editor.cc.
References current_tile16_, layout_scratch_, and tile16_blockset_.
Referenced by DrawScratchSpace().
| absl::Status yaze::editor::Tile16Editor::LoadLayoutFromScratch | ( | int | slot | ) |
Definition at line 3284 of file tile16_editor.cc.
References blockset_selector_, layout_scratch_, RETURN_IF_ERROR, scroll_to_current_, selected_tiles_, selection_start_tile_, SetCurrentTile(), and yaze::gui::TileSelectorWidget::SetSelectedTile().
Referenced by DrawScratchSpace().

| absl::Status yaze::editor::Tile16Editor::DrawToCurrentTile16 | ( | ImVec2 | pos, |
| const gfx::Bitmap * | source_tile = nullptr ) |
Definition at line 752 of file tile16_editor.cc.
References current_gfx_individual_, current_palette_, current_tile16_, current_tile16_bmp_, current_tile8_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), GetCurrentTile16Data(), yaze::gfx::Bitmap::is_active(), yaze::editor::kTile16Size, yaze::editor::kTile8Size, last_edit_time_, live_preview_enabled_, yaze::util::logf(), MarkCurrentTileModified(), priority_tile, yaze::gfx::Arena::QueueTextureCommand(), RETURN_IF_ERROR, SaveUndoState(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::size(), yaze::gfx::Arena::UPDATE, UpdateBlocksetBitmap(), UpdateOverworldTilemap(), yaze::gfx::Bitmap::WriteToPixel(), x_flip, and y_flip.
Referenced by UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::UpdateTile16Edit | ( | ) |
Definition at line 902 of file tile16_editor.cc.
References AnalyzeTile8SourceData(), auto_normalize_pixels_, yaze::gui::BeginCanvas(), blockset_canvas_, yaze::editor::UndoManager::CanUndo(), yaze::gui::CanvasFrameOptions::canvas_size, ClearTile16(), CommitAllChanges(), CommitChangesToOverworld(), CopyTile16ToClipboard(), yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_gfx_bmp_, current_gfx_individual_, current_page_, current_palette_, current_tile16_, current_tile16_bmp_, current_tile8_, yaze::gui::DangerButton(), DiscardAllChanges(), DiscardChanges(), yaze::gui::CanvasFrameOptions::draw_context_menu, yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, yaze::gui::Canvas::DrawBitmap(), DrawManualTile8Inputs(), DrawPaletteSettings(), DrawScratchSpace(), yaze::gui::Canvas::DrawTilePainter(), yaze::gui::Canvas::DrawTileSelector(), DrawToCurrentTile16(), yaze::gfx::SnesPalette::empty(), yaze::gui::EndCanvas(), yaze::gfx::Arena::Get(), GetActualPaletteSlot(), GetActualPaletteSlotForCurrentTile16(), yaze::gui::Canvas::GetGlobalScale(), GetSheetIndexForTile8(), yaze::gui::CanvasFrameOptions::grid_step, has_pending_changes(), HOVER_HINT, yaze::gfx::Bitmap::is_active(), yaze::gui::Canvas::IsMouseHovering(), jump_to_tile_id_, yaze::editor::kTile8DisplayScale, yaze::editor::kTile8PixelCount, kTilesPerPage, kTilesPerRow, yaze::util::logf(), yaze::gfx::Bitmap::mutable_data(), overworld_palette_, palette_, PasteTile16FromClipboard(), pending_changes_count(), PickTile8FromTile16(), priority_tile, yaze::gfx::Arena::QueueTextureCommand(), RefreshAllPalettes(), RefreshTile16Blockset(), yaze::gui::CanvasFrameOptions::render_popups, RequestTileSwitch(), RETURN_IF_ERROR, scroll_to_current_, yaze::gfx::Bitmap::set_data(), yaze::gui::Canvas::set_draggable(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), show_palette_settings_, yaze::gui::Canvas::ShowAdvancedCanvasProperties(), yaze::gui::Canvas::ShowScalingControls(), yaze::gfx::SnesPalette::size(), yaze::gui::SuccessButton(), yaze::gfx::Bitmap::texture(), tile16_blockset_, tile16_blockset_bmp_, tile16_edit_canvas_, tile8_preview_bmp_, tile8_source_canvas_, Undo(), undo_manager_, yaze::gfx::Arena::UPDATE, yaze::gfx::Bitmap::UpdateSurfacePixels(), UpdateTile8Palette(), yaze::gui::CanvasFrameOptions::use_child_window, yaze::gfx::Bitmap::width(), x_flip, y_flip, and yaze::gui::Canvas::zero_point().
Referenced by DrawTile16Editor().
| absl::Status yaze::editor::Tile16Editor::LoadTile8 | ( | ) |
Definition at line 1713 of file tile16_editor.cc.
References auto_normalize_pixels_, yaze::gfx::Arena::CREATE, current_gfx_bmp_, current_gfx_individual_, yaze::gfx::Bitmap::data(), game_data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::editor::kTile8DisplayScale, yaze::util::logf(), overworld_palette_, palette_normalization_mask_, yaze::gfx::Arena::QueueTextureCommand(), RefreshAllPalettes(), RETURN_IF_ERROR, rom_, yaze::gui::Canvas::SetCanvasSize(), yaze::gfx::Bitmap::size(), yaze::gfx::SnesPalette::size(), tile8_source_canvas_, and yaze::gfx::Bitmap::width().
Referenced by DrawPaletteSettings(), and set_palette().
| absl::Status yaze::editor::Tile16Editor::SetCurrentTile | ( | int | id | ) |
Definition at line 1802 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), ASSIGN_OR_RETURN, auto_normalize_pixels_, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_, current_tile16_bmp_, current_tile16_data_, FinalizePendingUndo(), yaze::gfx::Arena::Get(), yaze::gfx::GetTilemapData(), yaze::gfx::Bitmap::is_active(), jump_to_tile_id_, yaze::zelda3::kTile16Ptr, yaze::editor::kTile16Size, yaze::util::logf(), palette_normalization_mask_, pending_tile16_bitmaps_, pending_tile16_changes_, yaze::gfx::Arena::QueueTextureCommand(), yaze::Rom::ReadTile16(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, rom_, yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::surface(), and tile16_blockset_.
Referenced by DiscardAllChanges(), DiscardChanges(), DiscardCurrentTileChanges(), DrawManualTile8Inputs(), yaze::editor::OverworldCanvasRenderer::DrawTile16Selector(), Initialize(), LoadLayoutFromScratch(), yaze::editor::TilePaintingManager::PickTile16FromHoveredCanvas(), RequestTileSwitch(), yaze::test::RomDependentTestSuite::RunTile16EditorTest(), Update(), and UpdateAsPanel().
| void yaze::editor::Tile16Editor::RequestTileSwitch | ( | int | target_tile_id | ) |
Definition at line 1866 of file tile16_editor.cc.
References current_tile16_, is_tile_modified(), yaze::util::logf(), pending_tile_switch_target_, rom_, SetCurrentTile(), show_unsaved_changes_dialog_, and tile16_blockset_.
Referenced by UpdateBlockset(), and UpdateTile16Edit().

| absl::Status yaze::editor::Tile16Editor::CopyTile16ToClipboard | ( | int | tile_id | ) |
Definition at line 1903 of file tile16_editor.cc.
References ASSIGN_OR_RETURN, yaze::gfx::Tilemap::atlas, yaze::editor::Tile16ClipboardData::bitmap, clipboard_tile16_, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Arena::Get(), yaze::gfx::GetTilemapData(), yaze::editor::Tile16ClipboardData::has_data, yaze::gfx::Bitmap::is_active(), yaze::zelda3::kTile16Ptr, yaze::editor::kTile16Size, yaze::gfx::Bitmap::palette(), pending_tile16_bitmaps_, pending_tile16_changes_, yaze::gfx::Arena::QueueTextureCommand(), yaze::Rom::ReadTile16(), rom_, yaze::gfx::Bitmap::SetPalette(), tile16_blockset_, yaze::editor::Tile16ClipboardData::tile_data, and yaze::gfx::Bitmap::vector().
Referenced by DrawContextMenu(), HandleKeyboardShortcuts(), Update(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::PasteTile16FromClipboard | ( | ) |
Definition at line 1953 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), yaze::editor::Tile16ClipboardData::bitmap, clipboard_tile16_, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Arena::Get(), yaze::editor::Tile16ClipboardData::has_data, yaze::gfx::Bitmap::is_active(), yaze::editor::kTile16Size, live_preview_enabled_, MarkCurrentTileModified(), yaze::gfx::Bitmap::palette(), yaze::gfx::Arena::QueueTextureCommand(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), yaze::gfx::Bitmap::SetPalette(), yaze::editor::Tile16ClipboardData::tile_data, UpdateBlocksetBitmap(), UpdateOverworldTilemap(), and yaze::gfx::Bitmap::vector().
Referenced by DrawContextMenu(), HandleKeyboardShortcuts(), Update(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::SaveTile16ToScratchSpace | ( | int | slot | ) |
Definition at line 1982 of file tile16_editor.cc.
References yaze::gfx::Arena::CREATE, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::editor::kNumScratchSlots, yaze::editor::kTile16Size, yaze::gfx::Bitmap::palette(), yaze::gfx::Arena::QueueTextureCommand(), scratch_space_, and yaze::gfx::Bitmap::vector().
Referenced by DrawContextMenu(), and Update().
| absl::Status yaze::editor::Tile16Editor::LoadTile16FromScratchSpace | ( | int | slot | ) |
Definition at line 2003 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Arena::Get(), yaze::editor::kNumScratchSlots, yaze::editor::kTile16Size, live_preview_enabled_, MarkCurrentTileModified(), yaze::gfx::Arena::QueueTextureCommand(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), scratch_space_, yaze::gfx::Bitmap::SetPalette(), UpdateBlocksetBitmap(), and UpdateOverworldTilemap().
Referenced by DrawContextMenu(), and Update().
| absl::Status yaze::editor::Tile16Editor::ClearScratchSpace | ( | int | slot | ) |
Definition at line 2036 of file tile16_editor.cc.
References yaze::editor::kNumScratchSlots, and scratch_space_.
Referenced by DrawContextMenu(), and Update().
| absl::Status yaze::editor::Tile16Editor::FlipTile16Horizontal | ( | ) |
Definition at line 2046 of file tile16_editor.cc.
References current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::is_active(), live_preview_enabled_, MarkCurrentTileModified(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), yaze::gfx::Tile16::tile0_, yaze::gfx::Tile16::tile1_, yaze::gfx::Tile16::tile2_, yaze::gfx::Tile16::tile3_, UpdateBlocksetBitmap(), and UpdateOverworldTilemap().
Referenced by DrawContextMenu(), and HandleKeyboardShortcuts().
| absl::Status yaze::editor::Tile16Editor::FlipTile16Vertical | ( | ) |
Definition at line 2072 of file tile16_editor.cc.
References current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::is_active(), live_preview_enabled_, MarkCurrentTileModified(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), yaze::gfx::Tile16::tile0_, yaze::gfx::Tile16::tile1_, yaze::gfx::Tile16::tile2_, yaze::gfx::Tile16::tile3_, UpdateBlocksetBitmap(), and UpdateOverworldTilemap().
Referenced by DrawContextMenu(), and HandleKeyboardShortcuts().
| absl::Status yaze::editor::Tile16Editor::RotateTile16 | ( | ) |
Definition at line 2098 of file tile16_editor.cc.
References current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::is_active(), live_preview_enabled_, MarkCurrentTileModified(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), yaze::gfx::Tile16::tile0_, yaze::gfx::Tile16::tile1_, yaze::gfx::Tile16::tile2_, yaze::gfx::Tile16::tile3_, UpdateBlocksetBitmap(), and UpdateOverworldTilemap().
Referenced by DrawContextMenu(), and HandleKeyboardShortcuts().
| absl::Status yaze::editor::Tile16Editor::FillTile16WithTile8 | ( | int | tile8_id | ) |
Definition at line 2126 of file tile16_editor.cc.
References current_gfx_individual_, current_palette_, current_tile16_data_, live_preview_enabled_, MarkCurrentTileModified(), priority_tile, RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), x_flip, and y_flip.
Referenced by HandleKeyboardShortcuts().
| absl::Status yaze::editor::Tile16Editor::AutoTileTile16 | ( | ) |
| absl::Status yaze::editor::Tile16Editor::ClearTile16 | ( | ) |
Definition at line 2157 of file tile16_editor.cc.
References current_palette_, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::is_active(), live_preview_enabled_, MarkCurrentTileModified(), RegenerateTile16BitmapFromROM(), RETURN_IF_ERROR, SaveUndoState(), UpdateBlocksetBitmap(), and UpdateOverworldTilemap().
Referenced by DrawContextMenu(), HandleKeyboardShortcuts(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::CyclePalette | ( | bool | forward = true | ) |
Definition at line 2183 of file tile16_editor.cc.
References current_palette_, yaze::util::logf(), RefreshAllPalettes(), and RETURN_IF_ERROR.
Referenced by HandleKeyboardShortcuts().

| absl::Status yaze::editor::Tile16Editor::ApplyPaletteToAll | ( | uint8_t | palette_id | ) |
| absl::Status yaze::editor::Tile16Editor::PreviewPaletteChange | ( | uint8_t | palette_id | ) |
Definition at line 2201 of file tile16_editor.cc.
References auto_normalize_pixels_, yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::SnesPalette::empty(), game_data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::gfx::PaletteGroupMap::overworld_main, overworld_palette_, palette_, yaze::zelda3::GameData::palette_groups, preview_dirty_, preview_tile16_, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), show_palette_preview_, yaze::gfx::SnesPalette::size(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::vector().
| absl::Status yaze::editor::Tile16Editor::ApplyToSelection | ( | const std::function< void(int)> & | operation | ) |
| absl::Status yaze::editor::Tile16Editor::BatchEdit | ( | const std::vector< int > & | tile_ids, |
| const std::function< void(int)> & | operation ) |
| absl::Status yaze::editor::Tile16Editor::Undo | ( | ) |
Definition at line 2314 of file tile16_editor.cc.
References FinalizePendingUndo(), yaze::editor::UndoManager::Undo(), and undo_manager_.
Referenced by HandleKeyboardShortcuts(), and UpdateTile16Edit().

| absl::Status yaze::editor::Tile16Editor::Redo | ( | ) |
Definition at line 2319 of file tile16_editor.cc.
References yaze::editor::UndoManager::Redo(), and undo_manager_.
Referenced by HandleKeyboardShortcuts().

| void yaze::editor::Tile16Editor::SaveUndoState | ( | ) |
Definition at line 2293 of file tile16_editor.cc.
References yaze::editor::Tile16Snapshot::bitmap_data, yaze::editor::Tile16Snapshot::bitmap_palette, current_palette_, current_tile16_, current_tile16_bmp_, current_tile16_data_, FinalizePendingUndo(), yaze::gfx::Bitmap::is_active(), yaze::editor::Tile16Snapshot::palette, yaze::gfx::Bitmap::palette(), pending_undo_before_, yaze::editor::Tile16Snapshot::priority, priority_tile, yaze::editor::Tile16Snapshot::tile_data, yaze::editor::Tile16Snapshot::tile_id, yaze::gfx::Bitmap::vector(), x_flip, yaze::editor::Tile16Snapshot::x_flip, y_flip, and yaze::editor::Tile16Snapshot::y_flip.
Referenced by ClearTile16(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), and RotateTile16().

|
inline |
Definition at line 202 of file tile16_editor.h.
References live_preview_enabled_.
Referenced by DrawContextMenu(), and Update().
| absl::Status yaze::editor::Tile16Editor::UpdateLivePreview | ( | ) |
Definition at line 3430 of file tile16_editor.cc.
References auto_normalize_pixels_, yaze::gfx::Bitmap::Create(), current_palette_, current_tile16_bmp_, yaze::gfx::SnesPalette::empty(), game_data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), live_preview_enabled_, yaze::gfx::PaletteGroupMap::overworld_main, overworld_palette_, palette_, yaze::zelda3::GameData::palette_groups, preview_dirty_, preview_tile16_, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), yaze::gfx::SnesPalette::size(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::vector().
Referenced by Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::ValidateTile16Data | ( | ) |
Definition at line 2323 of file tile16_editor.cc.
References current_palette_, and tile16_blockset_.
| bool yaze::editor::Tile16Editor::IsTile16Valid | ( | int | tile_id | ) | const |
Definition at line 2339 of file tile16_editor.cc.
References tile16_blockset_.
| absl::Status yaze::editor::Tile16Editor::SaveTile16ToROM | ( | ) |
Write current tile16 data directly to ROM (bypasses pending system)
Definition at line 2345 of file tile16_editor.cc.
References CommitChangesToBlockset(), current_tile16_, current_tile16_bmp_, yaze::gfx::Bitmap::is_active(), yaze::util::logf(), pending_tile16_bitmaps_, pending_tile16_changes_, RETURN_IF_ERROR, rom_, yaze::Rom::set_dirty(), UpdateOverworldTilemap(), and UpdateROMTile16Data().
Referenced by DrawContextMenu(), DrawManualTile8Inputs(), HandleKeyboardShortcuts(), and Update().
| absl::Status yaze::editor::Tile16Editor::UpdateOverworldTilemap | ( | ) |
Update the overworld tilemap to reflect tile changes.
Definition at line 2373 of file tile16_editor.cc.
References CopyTile16ToAtlas(), current_tile16_, and tile16_blockset_.
Referenced by ClearTile16(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), RotateTile16(), and SaveTile16ToROM().

| absl::Status yaze::editor::Tile16Editor::CommitChangesToBlockset | ( | ) |
Commit pending changes to the blockset atlas.
Definition at line 2388 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::modified(), yaze::gfx::Arena::QueueTextureCommand(), tile16_blockset_, and yaze::gfx::Arena::UPDATE.
Referenced by DrawContextMenu(), HandleKeyboardShortcuts(), SaveTile16ToROM(), and Update().

| absl::Status yaze::editor::Tile16Editor::CommitChangesToOverworld | ( | ) |
Full commit workflow: ROM + blockset + notify parent.
Definition at line 2408 of file tile16_editor.cc.
References CopyTile16ToAtlas(), current_tile16_, yaze::util::logf(), on_changes_committed_, pending_tile16_bitmaps_, pending_tile16_changes_, RETURN_IF_ERROR, UpdateBlocksetBitmap(), and UpdateROMTile16Data().
Referenced by UpdateTile16Edit().

| absl::Status yaze::editor::Tile16Editor::DiscardChanges | ( | ) |
Discard current tile's changes (single tile)
Definition at line 2432 of file tile16_editor.cc.
References current_tile16_, yaze::util::logf(), RETURN_IF_ERROR, and SetCurrentTile().
Referenced by UpdateTile16Edit().

|
inline |
Check if any tiles have uncommitted changes.
Definition at line 245 of file tile16_editor.h.
References pending_tile16_changes_.
Referenced by yaze::editor::OverworldEditor::Update(), yaze::editor::MapRefreshCoordinator::UpdateBlocksetWithPendingTileChanges(), and UpdateTile16Edit().
|
inline |
Get count of tiles with pending changes.
Definition at line 248 of file tile16_editor.h.
References pending_tile16_changes_.
Referenced by UpdateTile16Edit().
|
inline |
Check if a specific tile has pending changes.
Definition at line 253 of file tile16_editor.h.
References pending_tile16_changes_.
Referenced by RequestTileSwitch(), and yaze::editor::MapRefreshCoordinator::UpdateBlocksetWithPendingTileChanges().
|
inline |
Get preview bitmap for a pending tile (nullptr if not modified)
Definition at line 258 of file tile16_editor.h.
References pending_tile16_bitmaps_.
Referenced by yaze::editor::MapRefreshCoordinator::UpdateBlocksetWithPendingTileChanges().
| absl::Status yaze::editor::Tile16Editor::CommitAllChanges | ( | ) |
Write all pending changes to ROM and notify parent.
Definition at line 2440 of file tile16_editor.cc.
References yaze::zelda3::kTile16Ptr, yaze::util::logf(), on_changes_committed_, pending_tile16_bitmaps_, pending_tile16_changes_, RefreshTile16Blockset(), RETURN_IF_ERROR, rom_, yaze::Rom::set_dirty(), and yaze::Rom::WriteTile16().
Referenced by UpdateTile16Edit().

| void yaze::editor::Tile16Editor::DiscardAllChanges | ( | ) |
Discard all pending changes (revert to ROM state)
Definition at line 2475 of file tile16_editor.cc.
References current_tile16_, yaze::util::logf(), pending_tile16_bitmaps_, pending_tile16_changes_, and SetCurrentTile().
Referenced by UpdateTile16Edit().

| void yaze::editor::Tile16Editor::DiscardCurrentTileChanges | ( | ) |
Discard only the current tile's pending changes.
Definition at line 2494 of file tile16_editor.cc.
References current_tile16_, yaze::util::logf(), pending_tile16_bitmaps_, pending_tile16_changes_, and SetCurrentTile().

| void yaze::editor::Tile16Editor::MarkCurrentTileModified | ( | ) |
Mark the current tile as having pending changes.
Definition at line 2510 of file tile16_editor.cc.
References current_tile16_, current_tile16_bmp_, current_tile16_data_, yaze::util::logf(), pending_tile16_bitmaps_, pending_tile16_changes_, and preview_dirty_.
Referenced by ClearTile16(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), and RotateTile16().

| absl::Status yaze::editor::Tile16Editor::UpdateTile8Palette | ( | int | tile8_id | ) |
Update palette for a specific tile8.
Definition at line 2777 of file tile16_editor.cc.
References auto_normalize_pixels_, current_gfx_individual_, current_palette_, yaze::gfx::SnesPalette::empty(), game_data(), yaze::gfx::Arena::Get(), GetActualPaletteSlot(), GetSheetIndexForTile8(), yaze::util::logf(), overworld_palette_, palette_, yaze::zelda3::GameData::palette_groups, yaze::gfx::Arena::QueueTextureCommand(), rom_, yaze::gfx::SnesPalette::size(), and yaze::gfx::Arena::UPDATE.
Referenced by PickTile8FromTile16(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::RefreshAllPalettes | ( | ) |
Refresh all tile8 palettes after a palette change.
Definition at line 2844 of file tile16_editor.cc.
References auto_normalize_pixels_, CreateRemappedPaletteForViewing(), current_gfx_bmp_, current_gfx_individual_, current_palette_, current_tile16_bmp_, yaze::gfx::SnesPalette::empty(), game_data(), yaze::gfx::Arena::Get(), GetActualPaletteSlot(), GetActualPaletteSlotForCurrentTile16(), GetSheetIndexForTile8(), yaze::gfx::Bitmap::is_active(), yaze::util::logf(), overworld_palette_, palette_, yaze::zelda3::GameData::palette_groups, yaze::gfx::Arena::QueueTextureCommand(), rom_, yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), yaze::gfx::SnesPalette::size(), and yaze::gfx::Arena::UPDATE.
Referenced by CyclePalette(), HandleKeyboardShortcuts(), LoadTile8(), PickTile8FromTile16(), and UpdateTile16Edit().
| void yaze::editor::Tile16Editor::DrawPaletteSettings | ( | ) |
Draw palette settings UI.
Definition at line 3077 of file tile16_editor.cc.
References yaze::gui::Canvas::ApplyROMPalette(), auto_normalize_pixels_, current_gfx_individual_, current_palette_, current_palette_group_, current_tile8_, HOVER_HINT, LoadTile8(), yaze::util::logf(), palette_normalization_mask_, rom_, show_palette_settings_, yaze::gui::Canvas::ShowColorAnalysis(), yaze::gui::Canvas::ShowPaletteEditor(), tile16_edit_canvas_, and tile8_source_canvas_.
Referenced by Update(), UpdateAsPanel(), and UpdateTile16Edit().
| int yaze::editor::Tile16Editor::GetPaletteSlotForSheet | ( | int | sheet_index | ) | const |
Get base palette slot for a graphics sheet.
| sheet_index | Graphics sheet index (0-7) |
Definition at line 2577 of file tile16_editor.cc.
References current_palette_.
| int yaze::editor::Tile16Editor::GetActualPaletteSlot | ( | int | palette_button, |
| int | sheet_index ) const |
Calculate actual palette slot from button + sheet.
| palette_button | User-selected palette (0-7) |
| sheet_index | Graphics sheet the tile8 belongs to |
This is the core palette mapping function. It combines:
Definition at line 2611 of file tile16_editor.cc.
References GetPaletteBaseForSheet().
Referenced by AnalyzeTile8SourceData(), GetActualPaletteSlotForCurrentTile16(), RefreshAllPalettes(), UpdateTile16Edit(), and UpdateTile8Palette().

| int yaze::editor::Tile16Editor::GetPaletteBaseForSheet | ( | int | sheet_index | ) | const |
Get palette base row for a graphics sheet.
| sheet_index | Graphics sheet index (0-7) |
Definition at line 2648 of file tile16_editor.cc.
Referenced by CreateRemappedPaletteForViewing(), and GetActualPaletteSlot().
| int yaze::editor::Tile16Editor::GetSheetIndexForTile8 | ( | int | tile8_id | ) | const |
Determine which graphics sheet contains a tile8.
| tile8_id | Tile8 ID from the graphics buffer |
Definition at line 2622 of file tile16_editor.cc.
Referenced by CreateRemappedPaletteForViewing(), GetActualPaletteSlotForCurrentTile16(), RefreshAllPalettes(), UpdateTile16Edit(), and UpdateTile8Palette().
| int yaze::editor::Tile16Editor::GetActualPaletteSlotForCurrentTile16 | ( | ) | const |
Get the palette slot for the current tile being edited.
Definition at line 2634 of file tile16_editor.cc.
References current_gfx_individual_, current_palette_, current_tile8_, GetActualPaletteSlot(), and GetSheetIndexForTile8().
Referenced by ApplyPaletteToCurrentTile16Bitmap(), RefreshAllPalettes(), and UpdateTile16Edit().

| gfx::SnesPalette yaze::editor::Tile16Editor::CreateRemappedPaletteForViewing | ( | const gfx::SnesPalette & | source, |
| int | target_row ) const |
Create a remapped palette for viewing with user-selected palette.
| source | Full 256-color palette |
| target_row | User-selected palette row (0-7 maps to the sheet base) |
Definition at line 2678 of file tile16_editor.cc.
References yaze::gfx::SnesPalette::AddColor(), current_gfx_individual_, current_tile8_, GetPaletteBaseForSheet(), GetSheetIndexForTile8(), and yaze::gfx::SnesPalette::size().
Referenced by RefreshAllPalettes().

| int yaze::editor::Tile16Editor::GetEncodedPaletteRow | ( | uint8_t | pixel_value | ) | const |
Get the encoded palette row for a pixel value.
| pixel_value | Raw pixel value from the graphics buffer |
Definition at line 2721 of file tile16_editor.cc.
Referenced by AnalyzeTile8SourceData().
| absl::Status yaze::editor::Tile16Editor::UpdateROMTile16Data | ( | ) |
Definition at line 556 of file tile16_editor.cc.
References current_tile16_, GetCurrentTile16Data(), yaze::zelda3::kTile16Ptr, yaze::util::logf(), RETURN_IF_ERROR, rom_, and yaze::Rom::WriteTile16().
Referenced by CommitChangesToOverworld(), DrawManualTile8Inputs(), and SaveTile16ToROM().

| absl::Status yaze::editor::Tile16Editor::RefreshTile16Blockset | ( | ) |
Definition at line 570 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, yaze::gfx::Arena::Get(), yaze::util::logf(), yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::set_modified(), tile16_blockset_, and yaze::gfx::Arena::UPDATE.
Referenced by CommitAllChanges(), Update(), UpdateAsPanel(), and UpdateTile16Edit().

| gfx::Tile16 * yaze::editor::Tile16Editor::GetCurrentTile16Data | ( | ) |
Definition at line 549 of file tile16_editor.cc.
References current_tile16_data_, and rom_.
Referenced by DrawManualTile8Inputs(), DrawToCurrentTile16(), PickTile8FromTile16(), RegenerateTile16BitmapFromROM(), Update(), UpdateAsPanel(), and UpdateROMTile16Data().
| absl::Status yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM | ( | ) |
Definition at line 663 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_gfx_individual_, current_tile16_, current_tile16_bmp_, yaze::gfx::Arena::Get(), GetCurrentTile16Data(), yaze::gfx::TileInfo::horizontal_mirror_, yaze::gfx::TileInfo::id_, yaze::editor::kTile16PixelCount, yaze::editor::kTile16Size, yaze::editor::kTile8Size, yaze::util::logf(), yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::TileInfo::vertical_mirror_, x_flip, and y_flip.
Referenced by ClearTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), RotateTile16(), and SetCurrentTile().
| absl::Status yaze::editor::Tile16Editor::UpdateBlocksetBitmap | ( | ) |
Definition at line 589 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, current_tile16_, current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::editor::kTile16Size, kTilesPerRow, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::size(), tile16_blockset_, tile16_blockset_bmp_, yaze::gfx::Arena::UPDATE, yaze::gfx::Bitmap::width(), and yaze::gfx::Bitmap::WriteToPixel().
Referenced by ClearTile16(), CommitChangesToOverworld(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), and RotateTile16().
| absl::Status yaze::editor::Tile16Editor::PickTile8FromTile16 | ( | const ImVec2 & | position | ) |
Definition at line 2524 of file tile16_editor.cc.
References current_palette_, current_tile16_, current_tile8_, GetCurrentTile16Data(), yaze::gfx::TileInfo::horizontal_mirror_, yaze::gfx::TileInfo::id_, yaze::util::logf(), yaze::gfx::TileInfo::over_, yaze::gfx::TileInfo::palette_, priority_tile, RefreshAllPalettes(), RETURN_IF_ERROR, rom_, UpdateTile8Palette(), yaze::gfx::TileInfo::vertical_mirror_, x_flip, and y_flip.
Referenced by UpdateTile16Edit().

| void yaze::editor::Tile16Editor::DrawManualTile8Inputs | ( | ) |
Definition at line 3317 of file tile16_editor.cc.
References current_tile16_, GetCurrentTile16Data(), yaze::gfx::TileInfo::horizontal_mirror_, yaze::gfx::TileInfo::id_, yaze::gfx::TileInfo::over_, yaze::gfx::TileInfo::palette_, rom_, SaveTile16ToROM(), SetCurrentTile(), UpdateROMTile16Data(), and yaze::gfx::TileInfo::vertical_mirror_.
Referenced by UpdateTile16Edit().

|
inline |
Definition at line 354 of file tile16_editor.h.
Referenced by yaze::editor::OverworldEditor::Load().

|
inline |
|
inline |
Definition at line 356 of file tile16_editor.h.
References game_data(), and game_data_.
Referenced by yaze::editor::OverworldEditor::SetGameData().

|
inline |
Definition at line 357 of file tile16_editor.h.
References game_data_.
Referenced by ApplyPaletteToCurrentTile16Bitmap(), LoadTile8(), PreviewPaletteChange(), RefreshAllPalettes(), SetGameData(), UpdateLivePreview(), and UpdateTile8Palette().
|
inline |
Definition at line 360 of file tile16_editor.h.
References current_gfx_bmp_, yaze::gfx::Bitmap::is_active(), LoadTile8(), yaze::util::logf(), overworld_palette_, palette_, rom_, and yaze::gfx::SnesPalette::size().
Referenced by yaze::editor::OverworldEditor::Load(), yaze::editor::MapRefreshCoordinator::RefreshMapPalette(), and yaze::editor::MapRefreshCoordinator::RefreshTile16Blockset().

|
inline |
Definition at line 392 of file tile16_editor.h.
References on_changes_committed_.
Referenced by yaze::editor::OverworldEditor::Load().
|
inline |
Definition at line 397 of file tile16_editor.h.
References current_palette_.
|
inline |
Definition at line 398 of file tile16_editor.h.
References current_palette_.
|
inline |
Definition at line 401 of file tile16_editor.h.
References current_tile16_.
|
inline |
Definition at line 402 of file tile16_editor.h.
References current_tile8_.
| void yaze::editor::Tile16Editor::AnalyzeTile8SourceData | ( | ) | const |
Definition at line 2966 of file tile16_editor.cc.
References current_gfx_bmp_, current_gfx_individual_, current_palette_, yaze::gfx::Bitmap::data(), yaze::gfx::Bitmap::depth(), GetActualPaletteSlot(), GetEncodedPaletteRow(), yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::util::logf(), overworld_palette_, yaze::gfx::Bitmap::palette(), palette_, yaze::gfx::Bitmap::size(), yaze::gfx::SnesPalette::size(), and yaze::gfx::Bitmap::width().
Referenced by UpdateTile16Edit().
|
private |
Finalize any pending undo snapshot by capturing current state as "after" and pushing a Tile16EditAction to undo_manager_.
Definition at line 2264 of file tile16_editor.cc.
References yaze::editor::Tile16Snapshot::bitmap_data, yaze::editor::Tile16Snapshot::bitmap_palette, current_palette_, current_tile16_, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::is_active(), yaze::editor::Tile16Snapshot::palette, yaze::gfx::Bitmap::palette(), pending_undo_before_, yaze::editor::Tile16Snapshot::priority, priority_tile, yaze::editor::UndoManager::Push(), RestoreFromSnapshot(), yaze::editor::Tile16Snapshot::tile_data, yaze::editor::Tile16Snapshot::tile_id, undo_manager_, yaze::gfx::Bitmap::vector(), x_flip, yaze::editor::Tile16Snapshot::x_flip, y_flip, and yaze::editor::Tile16Snapshot::y_flip.
Referenced by SaveUndoState(), SetCurrentTile(), and Undo().
|
private |
Restore editor state from a Tile16Snapshot (used by undo actions).
Definition at line 2248 of file tile16_editor.cc.
References yaze::editor::Tile16Snapshot::bitmap_data, yaze::editor::Tile16Snapshot::bitmap_palette, yaze::gfx::Bitmap::Create(), current_palette_, current_tile16_, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Arena::Get(), yaze::editor::Tile16Snapshot::palette, pending_tile16_bitmaps_, pending_tile16_changes_, yaze::editor::Tile16Snapshot::priority, priority_tile, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPalette(), yaze::editor::Tile16Snapshot::tile_data, yaze::editor::Tile16Snapshot::tile_id, yaze::gfx::Arena::UPDATE, x_flip, yaze::editor::Tile16Snapshot::x_flip, y_flip, and yaze::editor::Tile16Snapshot::y_flip.
Referenced by FinalizePendingUndo().

|
private |
Definition at line 2734 of file tile16_editor.cc.
References auto_normalize_pixels_, current_tile16_bmp_, yaze::gfx::SnesPalette::empty(), game_data(), yaze::gfx::Arena::Get(), GetActualPaletteSlotForCurrentTile16(), yaze::gfx::Bitmap::is_active(), yaze::gfx::PaletteGroupMap::overworld_main, overworld_palette_, palette_, yaze::zelda3::GameData::palette_groups, yaze::gfx::PaletteGroup::palette_ref(), yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), yaze::gfx::SnesPalette::size(), and yaze::gfx::Arena::UPDATE.
Referenced by LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), RegenerateTile16BitmapFromROM(), and SetCurrentTile().
|
private |
Definition at line 3488 of file tile16_editor.cc.
References ClearTile16(), CommitChangesToBlockset(), CopyTile16ToClipboard(), current_gfx_individual_, current_palette_, current_tile16_, current_tile8_, CyclePalette(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), PasteTile16FromClipboard(), Redo(), RefreshAllPalettes(), RotateTile16(), SaveTile16ToROM(), status_, and Undo().
Referenced by Update(), and UpdateAsPanel().
|
private |
Definition at line 3555 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::editor::kTile16Size, kTilesPerRow, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::size(), tile16_blockset_, yaze::gfx::Arena::UPDATE, yaze::gfx::Bitmap::width(), and yaze::gfx::Bitmap::WriteToPixel().
Referenced by CommitChangesToOverworld(), and UpdateOverworldTilemap().
|
private |
Definition at line 408 of file tile16_editor.h.
Referenced by CommitAllChanges(), CopyTile16ToClipboard(), DrawManualTile8Inputs(), DrawPaletteSettings(), GetCurrentTile16Data(), Initialize(), LoadTile8(), PickTile8FromTile16(), RefreshAllPalettes(), RequestTileSwitch(), rom(), SaveTile16ToROM(), set_palette(), SetCurrentTile(), SetRom(), Update(), UpdateAsPanel(), UpdateROMTile16Data(), and UpdateTile8Palette().
|
private |
Definition at line 409 of file tile16_editor.h.
Referenced by game_data(), and SetGameData().
|
private |
Definition at line 410 of file tile16_editor.h.
Referenced by Initialize(), Update(), and UpdateAsPanel().
|
private |
Definition at line 411 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), FillTile16WithTile8(), FinalizePendingUndo(), Initialize(), PickTile8FromTile16(), RegenerateTile16BitmapFromROM(), RestoreFromSnapshot(), SaveUndoState(), and UpdateTile16Edit().
|
private |
Definition at line 412 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), FillTile16WithTile8(), FinalizePendingUndo(), Initialize(), PickTile8FromTile16(), RegenerateTile16BitmapFromROM(), RestoreFromSnapshot(), SaveUndoState(), and UpdateTile16Edit().
|
private |
Definition at line 413 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), FillTile16WithTile8(), FinalizePendingUndo(), Initialize(), PickTile8FromTile16(), RestoreFromSnapshot(), SaveUndoState(), and UpdateTile16Edit().
|
private |
Definition at line 415 of file tile16_editor.h.
|
private |
Definition at line 416 of file tile16_editor.h.
Referenced by CommitChangesToOverworld(), CopyTile16ToClipboard(), current_tile16(), DiscardAllChanges(), DiscardChanges(), DiscardCurrentTileChanges(), DrawContextMenu(), DrawManualTile8Inputs(), DrawToCurrentTile16(), FinalizePendingUndo(), HandleKeyboardShortcuts(), Initialize(), MarkCurrentTileModified(), PickTile8FromTile16(), RegenerateTile16BitmapFromROM(), RequestTileSwitch(), RestoreFromSnapshot(), SaveLayoutToScratch(), SaveTile16ToROM(), SaveUndoState(), SetCurrentTile(), Update(), UpdateAsPanel(), UpdateBlockset(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), UpdateROMTile16Data(), and UpdateTile16Edit().
|
private |
Definition at line 417 of file tile16_editor.h.
Referenced by CreateRemappedPaletteForViewing(), current_tile8(), DrawPaletteSettings(), DrawToCurrentTile16(), GetActualPaletteSlotForCurrentTile16(), HandleKeyboardShortcuts(), Initialize(), PickTile8FromTile16(), and UpdateTile16Edit().
|
private |
Definition at line 418 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), ClearTile16(), current_palette(), CyclePalette(), DrawPaletteSettings(), DrawToCurrentTile16(), FillTile16WithTile8(), FinalizePendingUndo(), GetActualPaletteSlotForCurrentTile16(), GetPaletteSlotForSheet(), HandleKeyboardShortcuts(), PickTile8FromTile16(), RefreshAllPalettes(), RestoreFromSnapshot(), SaveUndoState(), set_current_palette(), UpdateLivePreview(), UpdateTile16Edit(), UpdateTile8Palette(), and ValidateTile16Data().
|
private |
Definition at line 421 of file tile16_editor.h.
Referenced by CopyTile16ToClipboard(), and PasteTile16FromClipboard().
|
private |
Definition at line 424 of file tile16_editor.h.
Referenced by ClearScratchSpace(), DrawContextMenu(), LoadTile16FromScratchSpace(), SaveTile16ToScratchSpace(), and Update().
|
private |
Definition at line 432 of file tile16_editor.h.
Referenced by DrawScratchSpace(), LoadLayoutFromScratch(), and SaveLayoutToScratch().
|
private |
Definition at line 435 of file tile16_editor.h.
Referenced by FinalizePendingUndo(), Redo(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 436 of file tile16_editor.h.
Referenced by FinalizePendingUndo(), and SaveUndoState().
|
private |
Definition at line 446 of file tile16_editor.h.
Referenced by ClearTile16(), DrawContextMenu(), DrawToCurrentTile16(), EnableLivePreview(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), RotateTile16(), Update(), and UpdateLivePreview().
|
private |
Definition at line 447 of file tile16_editor.h.
Referenced by PreviewPaletteChange(), and UpdateLivePreview().
|
private |
Definition at line 448 of file tile16_editor.h.
Referenced by MarkCurrentTileModified(), PreviewPaletteChange(), and UpdateLivePreview().
|
private |
Definition at line 449 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
private |
Definition at line 452 of file tile16_editor.h.
Referenced by LoadLayoutFromScratch().
|
private |
Definition at line 453 of file tile16_editor.h.
Referenced by LoadLayoutFromScratch().
|
private |
Definition at line 454 of file tile16_editor.h.
|
private |
Definition at line 457 of file tile16_editor.h.
|
private |
Definition at line 458 of file tile16_editor.h.
|
private |
Definition at line 459 of file tile16_editor.h.
|
private |
Definition at line 460 of file tile16_editor.h.
Referenced by PreviewPaletteChange().
|
private |
Definition at line 463 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), and UpdateTile16Edit().
|
private |
Definition at line 464 of file tile16_editor.h.
Referenced by DrawPaletteSettings().
|
private |
Definition at line 465 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), LoadTile8(), and SetCurrentTile().
|
private |
Definition at line 467 of file tile16_editor.h.
Referenced by ApplyPaletteToCurrentTile16Bitmap(), DrawPaletteSettings(), LoadTile8(), PreviewPaletteChange(), RefreshAllPalettes(), SetCurrentTile(), UpdateLivePreview(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 471 of file tile16_editor.h.
Referenced by DrawToCurrentTile16().
|
private |
Definition at line 472 of file tile16_editor.h.
|
private |
Definition at line 475 of file tile16_editor.h.
Referenced by CommitAllChanges(), CommitChangesToOverworld(), CopyTile16ToClipboard(), DiscardAllChanges(), DiscardCurrentTileChanges(), has_pending_changes(), is_tile_modified(), MarkCurrentTileModified(), pending_changes_count(), RestoreFromSnapshot(), SaveTile16ToROM(), SetCurrentTile(), Update(), and UpdateAsPanel().
|
private |
Definition at line 476 of file tile16_editor.h.
Referenced by CommitAllChanges(), CommitChangesToOverworld(), CopyTile16ToClipboard(), DiscardAllChanges(), DiscardCurrentTileChanges(), GetPendingTileBitmap(), MarkCurrentTileModified(), RestoreFromSnapshot(), SaveTile16ToROM(), SetCurrentTile(), Update(), and UpdateAsPanel().
|
private |
Definition at line 477 of file tile16_editor.h.
Referenced by RequestTileSwitch(), Update(), and UpdateAsPanel().
|
private |
Definition at line 478 of file tile16_editor.h.
Referenced by RequestTileSwitch(), Update(), and UpdateAsPanel().
|
private |
Definition at line 481 of file tile16_editor.h.
Referenced by SetCurrentTile(), and UpdateTile16Edit().
|
private |
Definition at line 482 of file tile16_editor.h.
Referenced by LoadLayoutFromScratch(), and UpdateTile16Edit().
|
private |
Definition at line 483 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
staticconstexprprivate |
Definition at line 484 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
staticconstexprprivate |
Definition at line 485 of file tile16_editor.h.
Referenced by CopyTile16ToAtlas(), UpdateBlocksetBitmap(), and UpdateTile16Edit().
|
private |
Definition at line 487 of file tile16_editor.h.
|
private |
Definition at line 488 of file tile16_editor.h.
|
private |
Definition at line 490 of file tile16_editor.h.
Referenced by Initialize().
|
private |
Definition at line 493 of file tile16_editor.h.
Referenced by Initialize(), UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 496 of file tile16_editor.h.
Referenced by Initialize(), LoadLayoutFromScratch(), and UpdateBlockset().
|
private |
Definition at line 499 of file tile16_editor.h.
Referenced by Initialize(), UpdateBlockset(), UpdateBlocksetBitmap(), and UpdateTile16Edit().
|
private |
Definition at line 503 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), Initialize(), and UpdateTile16Edit().
|
private |
Definition at line 507 of file tile16_editor.h.
Referenced by ApplyPaletteToCurrentTile16Bitmap(), ClearTile16(), CopyTile16ToAtlas(), CopyTile16ToClipboard(), DrawToCurrentTile16(), FinalizePendingUndo(), FlipTile16Horizontal(), FlipTile16Vertical(), Initialize(), LoadTile16FromScratchSpace(), MarkCurrentTileModified(), PasteTile16FromClipboard(), PreviewPaletteChange(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), RestoreFromSnapshot(), RotateTile16(), SaveTile16ToROM(), SaveTile16ToScratchSpace(), SaveUndoState(), SetCurrentTile(), UpdateBlocksetBitmap(), UpdateLivePreview(), and UpdateTile16Edit().
|
private |
Definition at line 510 of file tile16_editor.h.
Referenced by DrawContextMenu(), DrawPaletteSettings(), Initialize(), LoadTile8(), Update(), and UpdateTile16Edit().
|
private |
Definition at line 514 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), Initialize(), LoadTile8(), RefreshAllPalettes(), set_palette(), and UpdateTile16Edit().
|
private |
Definition at line 516 of file tile16_editor.h.
Referenced by Initialize().
|
private |
Definition at line 519 of file tile16_editor.h.
Referenced by CommitChangesToBlockset(), CopyTile16ToAtlas(), CopyTile16ToClipboard(), Initialize(), IsTile16Valid(), RefreshTile16Blockset(), RequestTileSwitch(), SaveLayoutToScratch(), SetCurrentTile(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), UpdateTile16Edit(), and ValidateTile16Data().
|
private |
Definition at line 520 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), CreateRemappedPaletteForViewing(), DrawPaletteSettings(), DrawToCurrentTile16(), FillTile16WithTile8(), GetActualPaletteSlotForCurrentTile16(), HandleKeyboardShortcuts(), LoadTile8(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 522 of file tile16_editor.h.
|
private |
Definition at line 523 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), ApplyPaletteToCurrentTile16Bitmap(), PreviewPaletteChange(), RefreshAllPalettes(), set_palette(), UpdateLivePreview(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 524 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), ApplyPaletteToCurrentTile16Bitmap(), LoadTile8(), PreviewPaletteChange(), RefreshAllPalettes(), set_palette(), UpdateLivePreview(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 526 of file tile16_editor.h.
Referenced by DrawContextMenu(), DrawScratchSpace(), DrawTile16Editor(), HandleKeyboardShortcuts(), and Update().
|
private |
Definition at line 529 of file tile16_editor.h.
Referenced by CommitAllChanges(), CommitChangesToOverworld(), and set_on_changes_committed().
|
private |
Definition at line 532 of file tile16_editor.h.
Referenced by ClearTile16(), CopyTile16ToClipboard(), FillTile16WithTile8(), FinalizePendingUndo(), FlipTile16Horizontal(), FlipTile16Vertical(), GetCurrentTile16Data(), LoadTile16FromScratchSpace(), MarkCurrentTileModified(), PasteTile16FromClipboard(), RestoreFromSnapshot(), RotateTile16(), SaveTile16ToScratchSpace(), SaveUndoState(), and SetCurrentTile().