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 () |
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) |
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 () |
absl::Status | UpdateOverworldTilemap () |
absl::Status | CommitChangesToBlockset () |
absl::Status | CommitChangesToOverworld () |
absl::Status | DiscardChanges () |
absl::Status | UpdateTile8Palette (int tile8_id) |
absl::Status | RefreshAllPalettes () |
void | DrawPaletteSettings () |
int | GetPaletteSlotForSheet (int sheet_index) const |
int | GetActualPaletteSlot (int palette_button, int sheet_index) const |
int | GetSheetIndexForTile8 (int tile8_id) const |
int | GetActualPaletteSlotForCurrentTile16 () const |
absl::Status | UpdateROMTile16Data () |
absl::Status | RefreshTile16Blockset () |
gfx::Tile16 * | GetCurrentTile16Data () |
absl::Status | RegenerateTile16BitmapFromROM () |
absl::Status | UpdateBlocksetBitmap () |
absl::Status | PickTile8FromTile16 (const ImVec2 &position) |
void | DrawManualTile8Inputs () |
void | set_rom (Rom *rom) |
Rom * | rom () const |
void | set_palette (const gfx::SnesPalette &palette) |
void | set_on_changes_committed (std::function< absl::Status()> callback) |
Static Private Attributes | |
static constexpr size_t | kMaxUndoStates_ = 50 |
Additional Inherited Members | |
![]() | |
static std::unordered_map< uint8_t, gfx::Paletteset > | palettesets_ |
Popup window to edit Tile16 data.
Definition at line 39 of file tile16_editor.h.
|
inline |
Definition at line 41 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 26 of file tile16_editor.cc.
References yaze::gui::AddTableColumn(), all_tiles_types_, yaze::gfx::Bitmap::Create(), current_gfx_bmp_, current_tile16_, current_tile16_bmp_, current_tile8_, yaze::gui::Canvas::custom_labels_enabled(), yaze::gfx::Bitmap::depth(), 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, RETURN_IF_ERROR, rom_, yaze::gui::Canvas::SetAutoResize(), SetCurrentTile(), yaze::gfx::Bitmap::SetPalette(), 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 100 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(), live_preview_enabled_, LoadTile16FromScratchSpace(), map_blockset_loaded_, PasteTile16FromClipboard(), Redo(), RETURN_IF_ERROR, RotateTile16(), SaveTile16ToROM(), SaveTile16ToScratchSpace(), scratch_space_used_, status_, tile8_source_canvas_, and Undo().
Referenced by yaze::editor::OverworldEditor::Update().
void yaze::editor::Tile16Editor::DrawTile16Editor | ( | ) |
Definition at line 255 of file tile16_editor.cc.
References status_, and UpdateTile16Edit().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::UpdateBlockset | ( | ) |
Definition at line 260 of file tile16_editor.cc.
References yaze::gui::BeginChildWithScrollbar(), yaze::gui::BeginPadding(), blockset_canvas_, current_tile16_, yaze::gui::Canvas::DrawBackground(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawContextMenu(), yaze::gui::Canvas::DrawGrid(), yaze::gui::Canvas::DrawOverlay(), yaze::gui::Canvas::DrawTileSelector(), yaze::gui::EndPadding(), yaze::gui::Canvas::GetGlobalScale(), yaze::gui::Canvas::IsMouseHovering(), yaze::util::logf(), RETURN_IF_ERROR, SetCurrentTile(), tile16_blockset_bmp_, and yaze::gui::Canvas::zero_point().
void yaze::editor::Tile16Editor::DrawScratchSpace | ( | ) |
Definition at line 2359 of file tile16_editor.cc.
References layout_scratch_.
Referenced by UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::SaveLayoutToScratch | ( | int | slot | ) |
Definition at line 2378 of file tile16_editor.cc.
References layout_scratch_.
absl::Status yaze::editor::Tile16Editor::LoadLayoutFromScratch | ( | int | slot | ) |
Definition at line 2390 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 528 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(), 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 677 of file tile16_editor.cc.
References blockset_canvas_, ClearTile16(), CommitChangesToOverworld(), CopyTile16ToClipboard(), yaze::gfx::Arena::CREATE, yaze::gfx::Bitmap::Create(), current_gfx_bmp_, current_gfx_individual_, current_palette_, current_tile16_, current_tile16_bmp_, current_tile8_, DiscardChanges(), yaze::gui::Canvas::DrawBackground(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawContextMenu(), yaze::gui::Canvas::DrawGrid(), DrawManualTile8Inputs(), yaze::gui::Canvas::DrawOverlay(), DrawPaletteSettings(), DrawScratchSpace(), yaze::gui::Canvas::DrawTilePainter(), yaze::gui::Canvas::DrawTileSelector(), DrawToCurrentTile16(), yaze::gfx::Arena::Get(), GetActualPaletteSlot(), GetActualPaletteSlotForCurrentTile16(), yaze::gui::Canvas::GetGlobalScale(), GetSheetIndexForTile8(), HOVER_HINT, yaze::gfx::Bitmap::is_active(), yaze::gui::Canvas::IsMouseHovering(), yaze::util::logf(), yaze::gfx::Bitmap::mutable_data(), overworld_palette_, PasteTile16FromClipboard(), PickTile8FromTile16(), priority_tile, yaze::gfx::Arena::QueueTextureCommand(), RefreshAllPalettes(), RefreshTile16Blockset(), RETURN_IF_ERROR, yaze::gui::Canvas::set_draggable(), SetCurrentTile(), yaze::gfx::Bitmap::SetPalette(), show_palette_settings_, yaze::gui::Canvas::ShowAdvancedCanvasProperties(), yaze::gui::Canvas::ShowScalingControls(), yaze::gfx::SnesPalette::size(), tile16_blockset_bmp_, tile16_edit_canvas_, tile8_source_canvas_, Undo(), undo_stack_, UpdateTile8Palette(), yaze::gfx::Bitmap::vector(), 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 1221 of file tile16_editor.cc.
References auto_normalize_pixels_, yaze::gfx::Arena::CREATE, current_gfx_bmp_, current_gfx_individual_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::util::logf(), overworld_palette_, palette_normalization_mask_, yaze::gfx::Arena::QueueTextureCommand(), RefreshAllPalettes(), RETURN_IF_ERROR, rom(), rom_, yaze::gfx::Bitmap::size(), yaze::gfx::SnesPalette::size(), yaze::Rom::size(), and yaze::gfx::Bitmap::width().
Referenced by DrawPaletteSettings(), and set_palette().
absl::Status yaze::editor::Tile16Editor::SetCurrentTile | ( | int | id | ) |
Definition at line 1302 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, auto_normalize_pixels_, yaze::gfx::Arena::CREATE, yaze::gfx::Bitmap::Create(), current_tile16_, current_tile16_bmp_, current_tile16_data_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::GetTilemapData(), yaze::zelda3::kNumTile16Individual, yaze::editor::kTile16PixelCount, yaze::editor::kTile16Size, yaze::util::logf(), overworld_palette_, palette_, yaze::Rom::palette_group(), palette_normalization_mask_, yaze::gfx::Arena::QueueTextureCommand(), yaze::Rom::ReadTile16(), rom(), rom_, yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::size(), yaze::gfx::SnesPalette::size(), tile16_blockset_, and yaze::gfx::Bitmap::width().
Referenced by DiscardChanges(), DrawManualTile8Inputs(), yaze::editor::OverworldEditor::DrawTile16Selector(), Initialize(), yaze::test::RomDependentTestSuite::RunTile16EditorTest(), UpdateBlockset(), and UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::CopyTile16ToClipboard | ( | int | tile_id | ) |
Definition at line 1381 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, clipboard_has_data_, clipboard_tile16_, yaze::gfx::Arena::CREATE, yaze::gfx::Bitmap::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 Update(), and UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::PasteTile16FromClipboard | ( | ) |
Definition at line 1400 of file tile16_editor.cc.
References clipboard_has_data_, clipboard_tile16_, yaze::gfx::Arena::CREATE, yaze::gfx::Bitmap::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 Update(), and UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::SaveTile16ToScratchSpace | ( | int | slot | ) |
Definition at line 1415 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 Update().
absl::Status yaze::editor::Tile16Editor::LoadTile16FromScratchSpace | ( | int | slot | ) |
Definition at line 1431 of file tile16_editor.cc.
References yaze::gfx::Arena::CREATE, yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Arena::QueueTextureCommand(), scratch_space_, scratch_space_used_, and yaze::gfx::Bitmap::SetPalette().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::ClearScratchSpace | ( | int | slot | ) |
Definition at line 1450 of file tile16_editor.cc.
References scratch_space_used_.
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::FlipTile16Horizontal | ( | ) |
Definition at line 1460 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), palette_, yaze::gfx::Arena::QueueTextureCommand(), SaveUndoState(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::size(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::WriteToPixel().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::FlipTile16Vertical | ( | ) |
Definition at line 1495 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), palette_, yaze::gfx::Arena::QueueTextureCommand(), SaveUndoState(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::size(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::WriteToPixel().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::RotateTile16 | ( | ) |
Definition at line 1530 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Bitmap::data(), yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), palette_, yaze::gfx::Arena::QueueTextureCommand(), SaveUndoState(), yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::size(), yaze::gfx::Arena::UPDATE, and yaze::gfx::Bitmap::WriteToPixel().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::FillTile16WithTile8 | ( | int | tile8_id | ) |
Definition at line 1565 of file tile16_editor.cc.
References current_gfx_individual_, current_tile16_bmp_, yaze::gfx::Arena::Get(), 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().
absl::Status yaze::editor::Tile16Editor::AutoTileTile16 | ( | ) |
absl::Status yaze::editor::Tile16Editor::ClearTile16 | ( | ) |
Definition at line 1604 of file tile16_editor.cc.
References current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::gfx::Bitmap::mutable_data(), yaze::gfx::Arena::QueueTextureCommand(), SaveUndoState(), yaze::gfx::Bitmap::set_modified(), and yaze::gfx::Arena::UPDATE.
Referenced by Update(), and UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::CyclePalette | ( | bool | forward = true | ) |
Definition at line 1623 of file tile16_editor.cc.
References current_palette_, yaze::util::logf(), RefreshAllPalettes(), and RETURN_IF_ERROR.
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::ApplyPaletteToAll | ( | uint8_t | palette_id | ) |
absl::Status yaze::editor::Tile16Editor::PreviewPaletteChange | ( | uint8_t | palette_id | ) |
Definition at line 1641 of file tile16_editor.cc.
References yaze::gfx::Bitmap::Create(), current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::Rom::palette_group(), preview_dirty_, preview_tile16_, yaze::gfx::Arena::QueueTextureCommand(), rom(), 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 1696 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(), and UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::Redo | ( | ) |
Definition at line 1729 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().
void yaze::editor::Tile16Editor::SaveUndoState | ( | ) |
Definition at line 1671 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 96 of file tile16_editor.h.
References live_preview_enabled_.
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::UpdateLivePreview | ( | ) |
absl::Status yaze::editor::Tile16Editor::ValidateTile16Data | ( | ) |
Definition at line 1754 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 1771 of file tile16_editor.cc.
References yaze::gfx::Tilemap::atlas, yaze::gfx::Bitmap::size(), and tile16_blockset_.
absl::Status yaze::editor::Tile16Editor::SaveTile16ToROM | ( | ) |
Definition at line 1777 of file tile16_editor.cc.
References CommitChangesToBlockset(), current_tile16_bmp_, yaze::gfx::Bitmap::is_active(), RETURN_IF_ERROR, rom_, and UpdateOverworldTilemap().
Referenced by DrawManualTile8Inputs(), and Update().
absl::Status yaze::editor::Tile16Editor::UpdateOverworldTilemap | ( | ) |
Definition at line 1796 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, 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 | ( | ) |
Definition at line 1842 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 SaveTile16ToROM(), and Update().
absl::Status yaze::editor::Tile16Editor::CommitChangesToOverworld | ( | ) |
Definition at line 1862 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, 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 | ( | ) |
Definition at line 1910 of file tile16_editor.cc.
References current_tile16_, yaze::util::logf(), RETURN_IF_ERROR, and SetCurrentTile().
Referenced by UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::UpdateTile8Palette | ( | int | tile8_id | ) |
Definition at line 2065 of file tile16_editor.cc.
References current_gfx_individual_, current_palette_, yaze::gfx::Arena::Get(), yaze::util::logf(), overworld_palette_, palette_, yaze::Rom::palette_group(), yaze::gfx::Arena::QueueTextureCommand(), rom(), rom_, yaze::gfx::SnesPalette::size(), and yaze::gfx::Arena::UPDATE.
Referenced by PickTile8FromTile16(), and UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::RefreshAllPalettes | ( | ) |
Definition at line 2123 of file tile16_editor.cc.
References current_gfx_bmp_, current_gfx_individual_, current_palette_, current_tile16_bmp_, yaze::gfx::Arena::Get(), yaze::gfx::Bitmap::is_active(), yaze::util::logf(), overworld_palette_, palette_, yaze::Rom::palette_group(), yaze::gfx::Arena::QueueTextureCommand(), rom(), rom_, yaze::gfx::Bitmap::set_modified(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::SnesPalette::size(), and yaze::gfx::Arena::UPDATE.
Referenced by CyclePalette(), LoadTile8(), PickTile8FromTile16(), and UpdateTile16Edit().
void yaze::editor::Tile16Editor::DrawPaletteSettings | ( | ) |
Definition at line 2205 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(), and UpdateTile16Edit().
int yaze::editor::Tile16Editor::GetPaletteSlotForSheet | ( | int | sheet_index | ) | const |
Definition at line 1972 of file tile16_editor.cc.
References current_palette_.
int yaze::editor::Tile16Editor::GetActualPaletteSlot | ( | int | palette_button, |
int | sheet_index | ||
) | const |
Definition at line 2002 of file tile16_editor.cc.
Referenced by GetActualPaletteSlotForCurrentTile16(), and UpdateTile16Edit().
int yaze::editor::Tile16Editor::GetSheetIndexForTile8 | ( | int | tile8_id | ) | const |
Definition at line 2038 of file tile16_editor.cc.
Referenced by GetActualPaletteSlotForCurrentTile16(), and UpdateTile16Edit().
int yaze::editor::Tile16Editor::GetActualPaletteSlotForCurrentTile16 | ( | ) | const |
Definition at line 2050 of file tile16_editor.cc.
References current_gfx_individual_, current_palette_, current_tile8_, GetActualPaletteSlot(), and GetSheetIndexForTile8().
Referenced by UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::UpdateROMTile16Data | ( | ) |
Definition at line 325 of file tile16_editor.cc.
References current_tile16_, GetCurrentTile16Data(), yaze::util::logf(), RETURN_IF_ERROR, rom_, and yaze::Rom::WriteTile16().
Referenced by CommitChangesToOverworld(), and DrawManualTile8Inputs().
absl::Status yaze::editor::Tile16Editor::RefreshTile16Blockset | ( | ) |
Definition at line 338 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 UpdateTile16Edit().
gfx::Tile16 * yaze::editor::Tile16Editor::GetCurrentTile16Data | ( | ) |
Definition at line 309 of file tile16_editor.cc.
References current_tile16_, current_tile16_data_, yaze::Rom::ReadTile16(), and rom_.
Referenced by DrawManualTile8Inputs(), DrawToCurrentTile16(), PickTile8FromTile16(), RegenerateTile16BitmapFromROM(), and UpdateROMTile16Data().
absl::Status yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM | ( | ) |
Definition at line 429 of file tile16_editor.cc.
References yaze::gfx::Arena::CREATE, yaze::gfx::Bitmap::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(), overworld_palette_, yaze::Rom::palette_group(), yaze::gfx::Arena::QueueTextureCommand(), rom(), yaze::gfx::Bitmap::SetPalette(), yaze::gfx::SnesPalette::size(), yaze::gfx::TileInfo::vertical_mirror_, x_flip, and y_flip.
absl::Status yaze::editor::Tile16Editor::UpdateBlocksetBitmap | ( | ) |
Definition at line 357 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, 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 1918 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 2403 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 135 of file tile16_editor.h.
Referenced by yaze::editor::OverworldEditor::Load().
|
inline |
Definition at line 136 of file tile16_editor.h.
References rom_.
Referenced by LoadTile8(), PreviewPaletteChange(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), set_rom(), SetCurrentTile(), and UpdateTile8Palette().
|
inline |
Definition at line 139 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().
|
inline |
Definition at line 165 of file tile16_editor.h.
References on_changes_committed_.
Referenced by yaze::editor::OverworldEditor::Load().
|
private |
Definition at line 170 of file tile16_editor.h.
Referenced by DrawManualTile8Inputs(), DrawPaletteSettings(), GetCurrentTile16Data(), Initialize(), LoadTile8(), PickTile8FromTile16(), RefreshAllPalettes(), rom(), SaveTile16ToROM(), set_palette(), set_rom(), SetCurrentTile(), UpdateROMTile16Data(), and UpdateTile8Palette().
|
private |
Definition at line 171 of file tile16_editor.h.
Referenced by Initialize(), and Update().
|
private |
Definition at line 172 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), Initialize(), PickTile8FromTile16(), Redo(), RegenerateTile16BitmapFromROM(), SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 173 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), Initialize(), PickTile8FromTile16(), Redo(), RegenerateTile16BitmapFromROM(), SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 174 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), Initialize(), PickTile8FromTile16(), Redo(), SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 176 of file tile16_editor.h.
|
private |
Definition at line 177 of file tile16_editor.h.
Referenced by CommitChangesToOverworld(), DiscardChanges(), DrawManualTile8Inputs(), DrawToCurrentTile16(), GetCurrentTile16Data(), Initialize(), PickTile8FromTile16(), Redo(), RegenerateTile16BitmapFromROM(), SaveUndoState(), SetCurrentTile(), Undo(), Update(), UpdateBlockset(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), UpdateROMTile16Data(), UpdateTile16Edit(), and ValidateTile16Data().
|
private |
Definition at line 178 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), DrawToCurrentTile16(), GetActualPaletteSlotForCurrentTile16(), Initialize(), PickTile8FromTile16(), Update(), and UpdateTile16Edit().
|
private |
Definition at line 179 of file tile16_editor.h.
Referenced by CyclePalette(), DrawPaletteSettings(), DrawToCurrentTile16(), GetActualPaletteSlotForCurrentTile16(), GetPaletteSlotForSheet(), PickTile8FromTile16(), Redo(), RefreshAllPalettes(), SaveUndoState(), Undo(), Update(), UpdateTile16Edit(), UpdateTile8Palette(), and ValidateTile16Data().
|
private |
Definition at line 182 of file tile16_editor.h.
Referenced by CopyTile16ToClipboard(), and PasteTile16FromClipboard().
|
private |
Definition at line 183 of file tile16_editor.h.
Referenced by CopyTile16ToClipboard(), and PasteTile16FromClipboard().
|
private |
Definition at line 186 of file tile16_editor.h.
Referenced by LoadTile16FromScratchSpace(), and SaveTile16ToScratchSpace().
|
private |
Definition at line 187 of file tile16_editor.h.
Referenced by ClearScratchSpace(), LoadTile16FromScratchSpace(), SaveTile16ToScratchSpace(), and Update().
|
private |
Definition at line 195 of file tile16_editor.h.
Referenced by DrawScratchSpace(), LoadLayoutFromScratch(), and SaveLayoutToScratch().
|
private |
Definition at line 205 of file tile16_editor.h.
Referenced by SaveUndoState(), Undo(), and UpdateTile16Edit().
|
private |
Definition at line 206 of file tile16_editor.h.
Referenced by Redo(), SaveUndoState(), and Undo().
|
staticconstexprprivate |
Definition at line 207 of file tile16_editor.h.
Referenced by SaveUndoState().
|
private |
Definition at line 210 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), EnableLivePreview(), and Update().
|
private |
Definition at line 211 of file tile16_editor.h.
Referenced by PreviewPaletteChange().
|
private |
Definition at line 212 of file tile16_editor.h.
Referenced by PreviewPaletteChange().
|
private |
Definition at line 215 of file tile16_editor.h.
|
private |
Definition at line 216 of file tile16_editor.h.
|
private |
Definition at line 217 of file tile16_editor.h.
|
private |
Definition at line 220 of file tile16_editor.h.
|
private |
Definition at line 221 of file tile16_editor.h.
|
private |
Definition at line 222 of file tile16_editor.h.
|
private |
Definition at line 223 of file tile16_editor.h.
Referenced by PreviewPaletteChange().
|
private |
Definition at line 226 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), and UpdateTile16Edit().
|
private |
Definition at line 227 of file tile16_editor.h.
Referenced by DrawPaletteSettings().
|
private |
Definition at line 228 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), LoadTile8(), and SetCurrentTile().
|
private |
Definition at line 229 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), LoadTile8(), and SetCurrentTile().
|
private |
Definition at line 232 of file tile16_editor.h.
Referenced by DrawToCurrentTile16().
|
private |
Definition at line 233 of file tile16_editor.h.
|
private |
Definition at line 235 of file tile16_editor.h.
|
private |
Definition at line 236 of file tile16_editor.h.
|
private |
Definition at line 238 of file tile16_editor.h.
Referenced by Initialize().
|
private |
Definition at line 241 of file tile16_editor.h.
Referenced by UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 244 of file tile16_editor.h.
Referenced by Initialize(), UpdateBlockset(), UpdateBlocksetBitmap(), and UpdateTile16Edit().
|
private |
Definition at line 247 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), Initialize(), and UpdateTile16Edit().
|
private |
Definition at line 250 of file tile16_editor.h.
Referenced by ClearTile16(), CommitChangesToOverworld(), DrawToCurrentTile16(), FillTile16WithTile8(), FlipTile16Horizontal(), FlipTile16Vertical(), Initialize(), LoadTile16FromScratchSpace(), PasteTile16FromClipboard(), PreviewPaletteChange(), Redo(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), RotateTile16(), SaveTile16ToROM(), SaveTile16ToScratchSpace(), SaveUndoState(), SetCurrentTile(), Undo(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), and UpdateTile16Edit().
|
private |
Definition at line 253 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), Initialize(), Update(), and UpdateTile16Edit().
|
private |
Definition at line 257 of file tile16_editor.h.
Referenced by Initialize(), LoadTile8(), RefreshAllPalettes(), set_palette(), and UpdateTile16Edit().
|
private |
Definition at line 259 of file tile16_editor.h.
Referenced by Initialize().
|
private |
Definition at line 261 of file tile16_editor.h.
Referenced by CommitChangesToBlockset(), CommitChangesToOverworld(), CopyTile16ToClipboard(), Initialize(), IsTile16Valid(), RefreshTile16Blockset(), SetCurrentTile(), UpdateBlocksetBitmap(), UpdateOverworldTilemap(), and ValidateTile16Data().
|
private |
Definition at line 262 of file tile16_editor.h.
Referenced by DrawPaletteSettings(), DrawToCurrentTile16(), FillTile16WithTile8(), GetActualPaletteSlotForCurrentTile16(), LoadTile8(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), Update(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 264 of file tile16_editor.h.
|
private |
Definition at line 265 of file tile16_editor.h.
Referenced by FlipTile16Horizontal(), FlipTile16Vertical(), RefreshAllPalettes(), RotateTile16(), set_palette(), SetCurrentTile(), and UpdateTile8Palette().
|
private |
Definition at line 266 of file tile16_editor.h.
Referenced by LoadTile8(), RefreshAllPalettes(), RegenerateTile16BitmapFromROM(), set_palette(), SetCurrentTile(), UpdateTile16Edit(), and UpdateTile8Palette().
|
private |
Definition at line 268 of file tile16_editor.h.
Referenced by DrawTile16Editor(), and Update().
|
private |
Definition at line 271 of file tile16_editor.h.
Referenced by CommitChangesToOverworld(), and set_on_changes_committed().
|
private |
Definition at line 274 of file tile16_editor.h.
Referenced by GetCurrentTile16Data(), and SetCurrentTile().