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

Classes | |
| struct | LayoutScratch |
| struct | UndoState |
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 | ApplyPaletteToCurrentTile16Bitmap () |
Static Private Attributes | |
| static constexpr size_t | kMaxUndoStates_ = 50 |
| 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 109 of file tile16_editor.h.
|
inline |
Definition at line 111 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 30 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 111 of file tile16_editor.cc.
References ClearScratchSpace(), ClearTile16(), CommitChangesToBlockset(), CopyTile16ToClipboard(), current_gfx_individual_, current_palette_, current_tile16_, current_tile8_, yaze::gui::Canvas::custom_labels_enabled(), CyclePalette(), DrawPaletteSettings(), DrawTile16Editor(), EnableLivePreview(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), GetCurrentTile16Data(), yaze::zelda3::kTile16Ptr, live_preview_enabled_, LoadTile16FromScratchSpace(), map_blockset_loaded_, PasteTile16FromClipboard(), pending_tile16_bitmaps_, pending_tile16_changes_, pending_tile_switch_target_, Redo(), RefreshTile16Blockset(), RETURN_IF_ERROR, rom_, RotateTile16(), SaveTile16ToROM(), SaveTile16ToScratchSpace(), scratch_space_used_, SetCurrentTile(), show_unsaved_changes_dialog_, status_, tile8_source_canvas_, Undo(), 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 340 of file tile16_editor.cc.
References ClearTile16(), CommitChangesToBlockset(), CopyTile16ToClipboard(), current_gfx_individual_, current_palette_, current_tile16_, current_tile8_, CyclePalette(), DrawContextMenu(), DrawPaletteSettings(), DrawTile16Editor(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), GetCurrentTile16Data(), ICON_MD_MENU, yaze::zelda3::kTile16Ptr, map_blockset_loaded_, PasteTile16FromClipboard(), pending_tile16_bitmaps_, pending_tile16_changes_, pending_tile_switch_target_, Redo(), RefreshTile16Blockset(), RETURN_IF_ERROR, rom_, RotateTile16(), SaveTile16ToROM(), SetCurrentTile(), show_unsaved_changes_dialog_, status_, Undo(), UpdateLivePreview(), and yaze::Rom::WriteTile16().
Referenced by yaze::editor::Tile16EditorPanel::Draw().
| 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 495 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_used_, status_, and tile8_source_canvas_.
Referenced by UpdateAsPanel().
| void yaze::editor::Tile16Editor::DrawTile16Editor | ( | ) |
Definition at line 335 of file tile16_editor.cc.
References status_, and UpdateTile16Edit().
Referenced by Update(), and UpdateAsPanel().

| absl::Status yaze::editor::Tile16Editor::UpdateBlockset | ( | ) |
Definition at line 569 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::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 3323 of file tile16_editor.cc.
References layout_scratch_.
Referenced by UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::SaveLayoutToScratch | ( | int | slot | ) |
Definition at line 3342 of file tile16_editor.cc.
References layout_scratch_.
| absl::Status yaze::editor::Tile16Editor::LoadLayoutFromScratch | ( | int | slot | ) |
Definition at line 3355 of file tile16_editor.cc.
References layout_scratch_.
| absl::Status yaze::editor::Tile16Editor::DrawToCurrentTile16 | ( | ImVec2 | pos, |
| const gfx::Bitmap * | source_tile = nullptr ) |
Definition at line 817 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 968 of file tile16_editor.cc.
References AnalyzeTile8SourceData(), yaze::gfx::Tilemap::atlas, yaze::gui::BeginCanvas(), blockset_canvas_, 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_, 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::zelda3::kNumTile16Individual, 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::SetPaletteWithTransparent(), show_palette_settings_, yaze::gui::Canvas::ShowAdvancedCanvasProperties(), yaze::gui::Canvas::ShowScalingControls(), yaze::gfx::Bitmap::size(), yaze::gfx::SnesPalette::size(), yaze::gfx::Bitmap::texture(), tile16_blockset_, tile16_blockset_bmp_, tile16_edit_canvas_, tile8_preview_bmp_, tile8_source_canvas_, Undo(), undo_stack_, 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 1774 of file tile16_editor.cc.
References 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_, 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 1863 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::data(), yaze::gfx::SnesPalette::empty(), game_data(), yaze::gfx::Arena::Get(), GetActualPaletteSlotForCurrentTile16(), yaze::gfx::GetTilemapData(), yaze::gfx::Bitmap::is_active(), jump_to_tile_id_, yaze::zelda3::kNumTile16Individual, yaze::editor::kTile16PixelCount, yaze::zelda3::kTile16Ptr, yaze::editor::kTile16Size, kTilesPerRow, yaze::util::logf(), yaze::gfx::PaletteGroupMap::overworld_main, overworld_palette_, palette_, yaze::zelda3::GameData::palette_groups, yaze::gfx::Arena::QueueTextureCommand(), yaze::Rom::ReadTile16(), rom_, yaze::gfx::Bitmap::SetPaletteWithTransparent(), yaze::gfx::Bitmap::size(), yaze::gfx::SnesPalette::size(), yaze::gfx::PaletteGroup::size(), yaze::gfx::Bitmap::surface(), tile16_blockset_, and yaze::gfx::Bitmap::width().
Referenced by DiscardAllChanges(), DiscardChanges(), DiscardCurrentTileChanges(), DrawManualTile8Inputs(), yaze::editor::OverworldEditor::DrawTile16Selector(), Initialize(), RequestTileSwitch(), yaze::test::RomDependentTestSuite::RunTile16EditorTest(), Update(), and UpdateAsPanel().
| void yaze::editor::Tile16Editor::RequestTileSwitch | ( | int | target_tile_id | ) |
Definition at line 1971 of file tile16_editor.cc.
References current_tile16_, is_tile_modified(), yaze::zelda3::kNumTile16Individual, 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 2007 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, clipboard_has_data_, clipboard_tile16_, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, yaze::gfx::Arena::Get(), yaze::gfx::GetTilemapData(), yaze::zelda3::kNumTile16Individual, yaze::gfx::Bitmap::palette(), yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPalette(), and tile16_blockset_.
Referenced by DrawContextMenu(), Update(), UpdateAsPanel(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::PasteTile16FromClipboard | ( | ) |
Definition at line 2027 of file tile16_editor.cc.
References clipboard_has_data_, clipboard_tile16_, yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::palette(), yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPalette(), and yaze::gfx::Bitmap::vector().
Referenced by DrawContextMenu(), Update(), UpdateAsPanel(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::SaveTile16ToScratchSpace | ( | int | slot | ) |
Definition at line 2042 of file tile16_editor.cc.
References yaze::gfx::Arena::CREATE, current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::palette(), yaze::gfx::Arena::QueueTextureCommand(), scratch_space_, scratch_space_used_, and yaze::gfx::Bitmap::vector().
Referenced by DrawContextMenu(), and Update().

| absl::Status yaze::editor::Tile16Editor::LoadTile16FromScratchSpace | ( | int | slot | ) |
Definition at line 2058 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), yaze::gfx::Arena::CREATE, current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Arena::QueueTextureCommand(), scratch_space_, scratch_space_used_, and yaze::gfx::Bitmap::SetPalette().
Referenced by DrawContextMenu(), and Update().

| absl::Status yaze::editor::Tile16Editor::ClearScratchSpace | ( | int | slot | ) |
Definition at line 2077 of file tile16_editor.cc.
References scratch_space_used_.
Referenced by DrawContextMenu(), and Update().
| absl::Status yaze::editor::Tile16Editor::FlipTile16Horizontal | ( | ) |
Definition at line 2087 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Bitmap::is_active(), MarkCurrentTileModified(), SaveUndoState(), yaze::gfx::Bitmap::size(), and yaze::gfx::Bitmap::WriteToPixel().
Referenced by DrawContextMenu(), Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::FlipTile16Vertical | ( | ) |
Definition at line 2121 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Bitmap::is_active(), MarkCurrentTileModified(), SaveUndoState(), yaze::gfx::Bitmap::size(), and yaze::gfx::Bitmap::WriteToPixel().
Referenced by DrawContextMenu(), Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::RotateTile16 | ( | ) |
Definition at line 2155 of file tile16_editor.cc.
References ApplyPaletteToCurrentTile16Bitmap(), yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Bitmap::is_active(), MarkCurrentTileModified(), SaveUndoState(), yaze::gfx::Bitmap::size(), and yaze::gfx::Bitmap::WriteToPixel().
Referenced by DrawContextMenu(), Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::FillTile16WithTile8 | ( | int | tile8_id | ) |
Definition at line 2189 of file tile16_editor.cc.
References current_gfx_individual_, current_tile16_bmp_, yaze::gfx::Arena::Get(), MarkCurrentTileModified(), yaze::gfx::Arena::QueueTextureCommand(), SaveUndoState(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::size(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::WriteToPixel().
Referenced by Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::AutoTileTile16 | ( | ) |
| absl::Status yaze::editor::Tile16Editor::ClearTile16 | ( | ) |
Definition at line 2232 of file tile16_editor.cc.
References current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), MarkCurrentTileModified(), yaze::gfx::Bitmap::mutable_data(), yaze::gfx::Arena::QueueTextureCommand(), SaveUndoState(), yaze::gfx::Bitmap::set_modified(), and yaze::gfx::Arena::UPDATE.
Referenced by DrawContextMenu(), Update(), UpdateAsPanel(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::CyclePalette | ( | bool | forward = true | ) |
Definition at line 2255 of file tile16_editor.cc.
References current_palette_, yaze::util::logf(), RefreshAllPalettes(), and RETURN_IF_ERROR.
Referenced by Update(), and UpdateAsPanel().

| absl::Status yaze::editor::Tile16Editor::ApplyPaletteToAll | ( | uint8_t | palette_id | ) |
| absl::Status yaze::editor::Tile16Editor::PreviewPaletteChange | ( | uint8_t | palette_id | ) |
Definition at line 2273 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_tile16_bmp_, game_data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::gfx::PaletteGroupMap::overworld_main, yaze::zelda3::GameData::palette_groups, preview_dirty_, preview_tile16_, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), show_palette_preview_, 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 2329 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_palette_, current_tile16_, current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::editor::Tile16Editor::UndoState::palette, yaze::gfx::Bitmap::palette(), yaze::editor::Tile16Editor::UndoState::priority, priority_tile, yaze::gfx::Arena::QueueTextureCommand(), redo_stack_, yaze::gfx::Bitmap::SetPalette(), yaze::editor::Tile16Editor::UndoState::tile_bitmap, yaze::editor::Tile16Editor::UndoState::tile_id, undo_stack_, yaze::gfx::Arena::UPDATE, yaze::gfx::Bitmap::vector(), x_flip, yaze::editor::Tile16Editor::UndoState::x_flip, y_flip, and yaze::editor::Tile16Editor::UndoState::y_flip.
Referenced by Update(), UpdateAsPanel(), and UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::Redo | ( | ) |
Definition at line 2362 of file tile16_editor.cc.
References current_palette_, current_tile16_, current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::editor::Tile16Editor::UndoState::palette, yaze::editor::Tile16Editor::UndoState::priority, priority_tile, yaze::gfx::Arena::QueueTextureCommand(), redo_stack_, SaveUndoState(), yaze::editor::Tile16Editor::UndoState::tile_bitmap, yaze::editor::Tile16Editor::UndoState::tile_id, yaze::gfx::Arena::UPDATE, x_flip, yaze::editor::Tile16Editor::UndoState::x_flip, y_flip, and yaze::editor::Tile16Editor::UndoState::y_flip.
Referenced by Update(), and UpdateAsPanel().

| void yaze::editor::Tile16Editor::SaveUndoState | ( | ) |
Definition at line 2304 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_palette_, current_tile16_, current_tile16_bmp_, yaze::gfx::Bitmap::is_active(), kMaxUndoStates_, yaze::editor::Tile16Editor::UndoState::palette, yaze::gfx::Bitmap::palette(), yaze::editor::Tile16Editor::UndoState::priority, priority_tile, redo_stack_, yaze::gfx::Bitmap::SetPalette(), yaze::editor::Tile16Editor::UndoState::tile_bitmap, yaze::editor::Tile16Editor::UndoState::tile_id, undo_stack_, yaze::gfx::Bitmap::vector(), x_flip, yaze::editor::Tile16Editor::UndoState::x_flip, y_flip, and yaze::editor::Tile16Editor::UndoState::y_flip.
Referenced by ClearTile16(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), Redo(), and RotateTile16().
|
inline |
Definition at line 186 of file tile16_editor.h.
References live_preview_enabled_.
Referenced by DrawContextMenu(), and Update().
| absl::Status yaze::editor::Tile16Editor::UpdateLivePreview | ( | ) |
Definition at line 3482 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_palette_, current_tile16_bmp_, game_data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), live_preview_enabled_, yaze::gfx::PaletteGroupMap::overworld_main, yaze::zelda3::GameData::palette_groups, preview_dirty_, preview_tile16_, yaze::gfx::Arena::QueueTextureCommand(), yaze::gfx::Bitmap::SetPaletteWithTransparent(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::vector().
Referenced by Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::ValidateTile16Data | ( | ) |
Definition at line 2387 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, current_palette_, current_tile16_, yaze::gfx::Bitmap::size(), and tile16_blockset_.

| bool yaze::editor::Tile16Editor::IsTile16Valid | ( | int | tile_id | ) | const |
Definition at line 2404 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, yaze::gfx::Bitmap::size(), and tile16_blockset_.

| absl::Status yaze::editor::Tile16Editor::SaveTile16ToROM | ( | ) |
Write current tile16 data directly to ROM (bypasses pending system)
Definition at line 2410 of file tile16_editor.cc.
References CommitChangesToBlockset(), current_tile16_, current_tile16_bmp_, yaze::gfx::Bitmap::is_active(), yaze::util::logf(), RETURN_IF_ERROR, rom_, yaze::Rom::set_dirty(), UpdateOverworldTilemap(), and UpdateROMTile16Data().
Referenced by DrawContextMenu(), DrawManualTile8Inputs(), Update(), and UpdateAsPanel().
| absl::Status yaze::editor::Tile16Editor::UpdateOverworldTilemap | ( | ) |
Update the overworld tilemap to reflect tile changes.
Definition at line 2435 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::zelda3::kNumTile16Individual, 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 DrawToCurrentTile16(), and SaveTile16ToROM().
| absl::Status yaze::editor::Tile16Editor::CommitChangesToBlockset | ( | ) |
Commit pending changes to the blockset atlas.
Definition at line 2481 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(), SaveTile16ToROM(), Update(), and UpdateAsPanel().

| absl::Status yaze::editor::Tile16Editor::CommitChangesToOverworld | ( | ) |
Full commit workflow: ROM + blockset + notify parent.
Definition at line 2501 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::util::logf(), on_changes_committed_, yaze::gfx::Arena::QueueTextureCommand(), RETURN_IF_ERROR, yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::size(), tile16_blockset_, yaze::gfx::Arena::UPDATE, UpdateBlocksetBitmap(), UpdateROMTile16Data(), yaze::gfx::Bitmap::width(), and yaze::gfx::Bitmap::WriteToPixel().
Referenced by UpdateTile16Edit().
| absl::Status yaze::editor::Tile16Editor::DiscardChanges | ( | ) |
Discard current tile's changes (single tile)
Definition at line 2551 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 229 of file tile16_editor.h.
References pending_tile16_changes_.
Referenced by yaze::editor::OverworldEditor::Update(), yaze::editor::OverworldEditor::UpdateBlocksetWithPendingTileChanges(), and UpdateTile16Edit().
|
inline |
Get count of tiles with pending changes.
Definition at line 232 of file tile16_editor.h.
References pending_tile16_changes_.
Referenced by UpdateTile16Edit().
|
inline |
Check if a specific tile has pending changes.
Definition at line 237 of file tile16_editor.h.
References pending_tile16_changes_.
Referenced by RequestTileSwitch(), and yaze::editor::OverworldEditor::UpdateBlocksetWithPendingTileChanges().
|
inline |
Get preview bitmap for a pending tile (nullptr if not modified)
Definition at line 242 of file tile16_editor.h.
References pending_tile16_bitmaps_.
Referenced by yaze::editor::OverworldEditor::UpdateBlocksetWithPendingTileChanges().
| absl::Status yaze::editor::Tile16Editor::CommitAllChanges | ( | ) |
Write all pending changes to ROM and notify parent.
Definition at line 2559 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 2594 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 2609 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 2621 of file tile16_editor.cc.
References current_tile16_, current_tile16_bmp_, GetCurrentTile16Data(), yaze::util::logf(), pending_tile16_bitmaps_, and pending_tile16_changes_.
Referenced by ClearTile16(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), and RotateTile16().

| absl::Status yaze::editor::Tile16Editor::UpdateTile8Palette | ( | int | tile8_id | ) |
Update palette for a specific tile8.
Definition at line 2884 of file tile16_editor.cc.
References 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 2944 of file tile16_editor.cc.
References 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(), LoadTile8(), PickTile8FromTile16(), and UpdateTile16Edit().
| void yaze::editor::Tile16Editor::DrawPaletteSettings | ( | ) |
Draw palette settings UI.
Definition at line 3169 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 2688 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 2722 of file tile16_editor.cc.
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 2767 of file tile16_editor.cc.
| 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 2741 of file tile16_editor.cc.
Referenced by GetActualPaletteSlotForCurrentTile16(), RefreshAllPalettes(), UpdateTile16Edit(), and UpdateTile8Palette().
| int yaze::editor::Tile16Editor::GetActualPaletteSlotForCurrentTile16 | ( | ) | const |
Get the palette slot for the current tile being edited.
Definition at line 2753 of file tile16_editor.cc.
References current_gfx_individual_, current_palette_, current_tile8_, GetActualPaletteSlot(), and GetSheetIndexForTile8().
Referenced by ApplyPaletteToCurrentTile16Bitmap(), RefreshAllPalettes(), SetCurrentTile(), 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 rows 2-9) |
Definition at line 2797 of file tile16_editor.cc.
References yaze::gfx::SnesPalette::AddColor(), 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 2834 of file tile16_editor.cc.
Referenced by AnalyzeTile8SourceData().
| absl::Status yaze::editor::Tile16Editor::UpdateROMTile16Data | ( | ) |
Definition at line 622 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 635 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 606 of file tile16_editor.cc.
References current_tile16_, current_tile16_data_, yaze::zelda3::kTile16Ptr, yaze::Rom::ReadTile16(), and rom_.
Referenced by DrawManualTile8Inputs(), DrawToCurrentTile16(), MarkCurrentTileModified(), PickTile8FromTile16(), RegenerateTile16BitmapFromROM(), Update(), UpdateAsPanel(), and UpdateROMTile16Data().

| absl::Status yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM | ( | ) |
Definition at line 728 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.
| absl::Status yaze::editor::Tile16Editor::UpdateBlocksetBitmap | ( | ) |
Definition at line 654 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::zelda3::kNumTile16Individual, 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 CommitChangesToOverworld(), and DrawToCurrentTile16().
| absl::Status yaze::editor::Tile16Editor::PickTile8FromTile16 | ( | const ImVec2 & | position | ) |
Definition at line 2634 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 3368 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 338 of file tile16_editor.h.
Referenced by yaze::editor::OverworldEditor::Load().

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

|
inline |
Definition at line 341 of file tile16_editor.h.
References game_data_.
Referenced by ApplyPaletteToCurrentTile16Bitmap(), LoadTile8(), PreviewPaletteChange(), RefreshAllPalettes(), SetCurrentTile(), SetGameData(), UpdateLivePreview(), and UpdateTile8Palette().
|
inline |
Definition at line 344 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::OverworldEditor::RefreshMapPalette(), and yaze::editor::OverworldEditor::RefreshTile16Blockset().

|
inline |
Definition at line 376 of file tile16_editor.h.
References on_changes_committed_.
Referenced by yaze::editor::OverworldEditor::Load().
|
inline |
Definition at line 381 of file tile16_editor.h.
References current_palette_.
|
inline |
Definition at line 382 of file tile16_editor.h.
References current_palette_.
|
inline |
Definition at line 385 of file tile16_editor.h.
References current_tile16_.
|
inline |
Definition at line 386 of file tile16_editor.h.
References current_tile8_.
| void yaze::editor::Tile16Editor::AnalyzeTile8SourceData | ( | ) | const |
Definition at line 3061 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 |
Definition at line 2847 of file tile16_editor.cc.
References 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::SetPaletteWithTransparent(), yaze::gfx::SnesPalette::size(), and yaze::gfx::Arena::UPDATE.
Referenced by FlipTile16Horizontal(), FlipTile16Vertical(), RegenerateTile16BitmapFromROM(), and RotateTile16().
|
private |
Definition at line 392 of file tile16_editor.h.
Referenced by CommitAllChanges(), DrawManualTile8Inputs(), DrawPaletteSettings(), GetCurrentTile16Data(), Initialize(), LoadTile8(), PickTile8FromTile16(), RefreshAllPalettes(), RequestTileSwitch(), rom(), SaveTile16ToROM(), set_palette(), SetCurrentTile(), SetRom(), Update(), UpdateAsPanel(), UpdateROMTile16Data(), and UpdateTile8Palette().
|
private |
Definition at line 393 of file tile16_editor.h.
Referenced by game_data(), and SetGameData().
|
private |
Definition at line 394 of file tile16_editor.h.
Referenced by Initialize(), Update(), and UpdateAsPanel().
|
private |
Definition at line 395 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), Initialize(), PickTile8FromTile16(), Redo(), RegenerateTile16BitmapFromROM(), SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 396 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), Initialize(), PickTile8FromTile16(), Redo(), RegenerateTile16BitmapFromROM(), SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 397 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), Initialize(), PickTile8FromTile16(), Redo(), SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 399 of file tile16_editor.h.
|
private |
Definition at line 400 of file tile16_editor.h.
Referenced by CommitChangesToOverworld(), current_tile16(), DiscardAllChanges(), DiscardChanges(), DiscardCurrentTileChanges(), DrawContextMenu(), DrawManualTile8Inputs(), DrawToCurrentTile16(), GetCurrentTile16Data(), Initialize(), MarkCurrentTileModified(), PickTile8FromTile16(), Redo(), RegenerateTile16BitmapFromROM(), RequestTileSwitch(), SaveTile16ToROM(), SaveUndoState(), SetCurrentTile(), Undo(), Update(), UpdateAsPanel(), UpdateBlockset(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), UpdateROMTile16Data(), UpdateTile16Edit(), and ValidateTile16Data().
|
private |
Definition at line 401 of file tile16_editor.h.
Referenced by current_tile8(), DrawPaletteSettings(), DrawToCurrentTile16(), GetActualPaletteSlotForCurrentTile16(), Initialize(), PickTile8FromTile16(), Update(), UpdateAsPanel(), and UpdateTile16Edit().
|
private |
Definition at line 402 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), current_palette(), CyclePalette(), DrawPaletteSettings(), DrawToCurrentTile16(), GetActualPaletteSlotForCurrentTile16(), GetPaletteSlotForSheet(), PickTile8FromTile16(), Redo(), RefreshAllPalettes(), SaveUndoState(), set_current_palette(), Undo(), Update(), UpdateAsPanel(), UpdateLivePreview(), UpdateTile16Edit(), UpdateTile8Palette(), and ValidateTile16Data().
|
private |
Definition at line 405 of file tile16_editor.h.
Referenced by CopyTile16ToClipboard(), and PasteTile16FromClipboard().
|
private |
Definition at line 406 of file tile16_editor.h.
Referenced by CopyTile16ToClipboard(), and PasteTile16FromClipboard().
|
private |
Definition at line 409 of file tile16_editor.h.
Referenced by LoadTile16FromScratchSpace(), and SaveTile16ToScratchSpace().
|
private |
Definition at line 410 of file tile16_editor.h.
Referenced by ClearScratchSpace(), DrawContextMenu(), LoadTile16FromScratchSpace(), SaveTile16ToScratchSpace(), and Update().
|
private |
Definition at line 418 of file tile16_editor.h.
Referenced by DrawScratchSpace(), LoadLayoutFromScratch(), and SaveLayoutToScratch().
|
private |
Definition at line 428 of file tile16_editor.h.
Referenced by SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 429 of file tile16_editor.h.
Referenced by Redo(), SaveUndoState(), and Undo().
|
staticconstexprprivate |
Definition at line 430 of file tile16_editor.h.
Referenced by SaveUndoState().
|
private |
Definition at line 433 of file tile16_editor.h.
Referenced by DrawContextMenu(), DrawToCurrentTile16(), EnableLivePreview(), Update(), and UpdateLivePreview().
|
private |
Definition at line 434 of file tile16_editor.h.
Referenced by PreviewPaletteChange(), and UpdateLivePreview().
|
private |
Definition at line 435 of file tile16_editor.h.
Referenced by PreviewPaletteChange(), and UpdateLivePreview().
|
private |
Definition at line 436 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
private |
Definition at line 439 of file tile16_editor.h.
|
private |
Definition at line 440 of file tile16_editor.h.
|
private |
Definition at line 441 of file tile16_editor.h.
|
private |
Definition at line 444 of file tile16_editor.h.
|
private |
Definition at line 445 of file tile16_editor.h.
|
private |
Definition at line 446 of file tile16_editor.h.
|
private |
Definition at line 447 of file tile16_editor.h.
Referenced by PreviewPaletteChange().
|
private |
Definition at line 450 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), and UpdateTile16Edit().
|
private |
Definition at line 451 of file tile16_editor.h.
Referenced by DrawPaletteSettings().
|
private |
Definition at line 452 of file tile16_editor.h.
Referenced by DrawPaletteSettings().
|
private |
Definition at line 454 of file tile16_editor.h.
Referenced by DrawPaletteSettings().
|
private |
Definition at line 458 of file tile16_editor.h.
Referenced by DrawToCurrentTile16().
|
private |
Definition at line 459 of file tile16_editor.h.
|
private |
Definition at line 462 of file tile16_editor.h.
Referenced by CommitAllChanges(), DiscardAllChanges(), DiscardCurrentTileChanges(), has_pending_changes(), is_tile_modified(), MarkCurrentTileModified(), pending_changes_count(), Update(), and UpdateAsPanel().
|
private |
Definition at line 463 of file tile16_editor.h.
Referenced by CommitAllChanges(), DiscardAllChanges(), DiscardCurrentTileChanges(), GetPendingTileBitmap(), MarkCurrentTileModified(), Update(), and UpdateAsPanel().
|
private |
Definition at line 464 of file tile16_editor.h.
Referenced by RequestTileSwitch(), Update(), and UpdateAsPanel().
|
private |
Definition at line 465 of file tile16_editor.h.
Referenced by RequestTileSwitch(), Update(), and UpdateAsPanel().
|
private |
Definition at line 468 of file tile16_editor.h.
Referenced by SetCurrentTile(), and UpdateTile16Edit().
|
private |
Definition at line 469 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
private |
Definition at line 470 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
staticconstexprprivate |
Definition at line 471 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
staticconstexprprivate |
Definition at line 472 of file tile16_editor.h.
Referenced by CommitChangesToOverworld(), SetCurrentTile(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), and UpdateTile16Edit().
|
private |
Definition at line 474 of file tile16_editor.h.
|
private |
Definition at line 475 of file tile16_editor.h.
|
private |
Definition at line 477 of file tile16_editor.h.
Referenced by Initialize().
|
private |
Definition at line 480 of file tile16_editor.h.
Referenced by Initialize(), UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 483 of file tile16_editor.h.
Referenced by Initialize(), and UpdateBlockset().
|
private |
Definition at line 484 of file tile16_editor.h.
Referenced by Initialize(), UpdateBlockset(), UpdateBlocksetBitmap(), and UpdateTile16Edit().
|
private |
Definition at line 488 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), Initialize(), and UpdateTile16Edit().
|
private |
Definition at line 492 of file tile16_editor.h.
Referenced by ApplyPaletteToCurrentTile16Bitmap(), ClearTile16(), CommitChangesToOverworld(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), Initialize(), LoadTile16FromScratchSpace(), MarkCurrentTileModified(), PasteTile16FromClipboard(), PreviewPaletteChange(), Redo(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), RotateTile16(), SaveTile16ToROM(), SaveTile16ToScratchSpace(), SaveUndoState(), SetCurrentTile(), Undo(), UpdateBlocksetBitmap(), UpdateLivePreview(), UpdateOverworldTilemap(), and UpdateTile16Edit().
|
private |
Definition at line 495 of file tile16_editor.h.
Referenced by DrawContextMenu(), DrawPaletteSettings(), Initialize(), LoadTile8(), Update(), and UpdateTile16Edit().
|
private |
Definition at line 499 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), Initialize(), LoadTile8(), RefreshAllPalettes(), set_palette(), and UpdateTile16Edit().
|
private |
Definition at line 501 of file tile16_editor.h.
Referenced by Initialize().
|
private |
Definition at line 504 of file tile16_editor.h.
Referenced by CommitChangesToBlockset(), CommitChangesToOverworld(), CopyTile16ToClipboard(), Initialize(), IsTile16Valid(), RefreshTile16Blockset(), RequestTileSwitch(), SetCurrentTile(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), UpdateTile16Edit(), and ValidateTile16Data().
|
private |
Definition at line 505 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), DrawPaletteSettings(), DrawToCurrentTile16(), FillTile16WithTile8(), GetActualPaletteSlotForCurrentTile16(), LoadTile8(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), Update(), UpdateAsPanel(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 507 of file tile16_editor.h.
|
private |
Definition at line 508 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), ApplyPaletteToCurrentTile16Bitmap(), RefreshAllPalettes(), set_palette(), SetCurrentTile(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 509 of file tile16_editor.h.
Referenced by AnalyzeTile8SourceData(), ApplyPaletteToCurrentTile16Bitmap(), LoadTile8(), RefreshAllPalettes(), set_palette(), SetCurrentTile(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 511 of file tile16_editor.h.
Referenced by DrawContextMenu(), DrawTile16Editor(), Update(), and UpdateAsPanel().
|
private |
Definition at line 514 of file tile16_editor.h.
Referenced by CommitAllChanges(), CommitChangesToOverworld(), and set_on_changes_committed().
|
private |
Definition at line 517 of file tile16_editor.h.
Referenced by GetCurrentTile16Data(), and SetCurrentTile().