Popup window to edit Tile16 data. More...
#include <tile16_editor.h>
Public Member Functions | |
Tile16Editor (std::array< gfx::Bitmap, zelda3::kNumTile16Individual > &tile16_individual) | |
absl::Status | InitBlockset (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 | DrawMenu () |
void | DrawTile16Editor () |
absl::Status | UpdateTile16Transfer () |
absl::Status | UpdateBlockset () |
absl::Status | DrawToCurrentTile16 (ImVec2 pos) |
absl::Status | UpdateTile16Edit () |
absl::Status | DrawTileEditControls () |
absl::Status | UpdateTransferTileCanvas () |
absl::Status | LoadTile8 () |
absl::Status | SetCurrentTile (int id) |
Public Member Functions inherited from yaze::SharedRom | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::SharedRom | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
Static Protected Attributes inherited from yaze::gfx::GfxContext | |
static std::unordered_map< uint8_t, gfx::Paletteset > | palettesets_ |
Popup window to edit Tile16 data.
Definition at line 24 of file tile16_editor.h.
|
inline |
Definition at line 26 of file tile16_editor.h.
References tile16_individual_.
absl::Status yaze::editor::Tile16Editor::InitBlockset | ( | const gfx::Bitmap & | tile16_blockset_bmp, |
const gfx::Bitmap & | current_gfx_bmp, | ||
std::array< uint8_t, 0x200 > & | all_tiles_types ) |
Definition at line 45 of file tile16_editor.cc.
References all_tiles_types_, current_gfx_bmp_, yaze::gfx::Bitmap::depth(), yaze::core::Renderer::GetInstance(), yaze::gfx::Bitmap::height(), yaze::util::HexByte(), LoadTile8(), yaze::gfx::Bitmap::palette(), yaze::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, tile16_blockset_bmp_, tile8_source_canvas_, yaze::gfx::Bitmap::vector(), and yaze::gfx::Bitmap::width().
absl::Status yaze::editor::Tile16Editor::Update | ( | ) |
Definition at line 70 of file tile16_editor.cc.
References DrawMenu(), DrawTile16Editor(), map_blockset_loaded_, RETURN_IF_ERROR, and UpdateTile16Transfer().
absl::Status yaze::editor::Tile16Editor::DrawMenu | ( | ) |
Definition at line 85 of file tile16_editor.cc.
References tile8_source_canvas_.
Referenced by Update().
void yaze::editor::Tile16Editor::DrawTile16Editor | ( | ) |
Definition at line 99 of file tile16_editor.cc.
References DrawTileEditControls(), status_, TABLE_BORDERS_RESIZABLE, UpdateBlockset(), and UpdateTile16Edit().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::UpdateTile16Transfer | ( | ) |
Definition at line 347 of file tile16_editor.cc.
References RETURN_IF_ERROR, TABLE_BORDERS_RESIZABLE, UpdateBlockset(), and UpdateTransferTileCanvas().
Referenced by Update().
absl::Status yaze::editor::Tile16Editor::UpdateBlockset | ( | ) |
Definition at line 129 of file tile16_editor.cc.
References yaze::gui::BeginChildWithScrollbar(), yaze::gui::BeginPadding(), blockset_canvas_, current_palette_, current_tile16_, current_tile16_bmp_, yaze::gui::EndPadding(), yaze::editor::Renderer::GetInstance(), map_blockset_loaded_, notify_tile16, yaze::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, yaze::SharedRom::rom(), tile16_blockset_bmp_, and tile16_individual_.
Referenced by DrawTile16Editor(), and UpdateTile16Transfer().
absl::Status yaze::editor::Tile16Editor::DrawToCurrentTile16 | ( | ImVec2 | pos | ) |
Definition at line 158 of file tile16_editor.cc.
References current_gfx_individual_, current_tile16_bmp_, and current_tile8_.
Referenced by UpdateTile16Edit().
absl::Status yaze::editor::Tile16Editor::UpdateTile16Edit | ( | ) |
Definition at line 191 of file tile16_editor.cc.
References current_gfx_bmp_, current_gfx_individual_, current_palette_, current_tile16_bmp_, current_tile8_, DrawToCurrentTile16(), yaze::editor::Renderer::GetInstance(), RETURN_IF_ERROR, yaze::SharedRom::rom(), tile16_edit_canvas_, tile8_source_canvas_, and yaze::core::Renderer::UpdateBitmap().
Referenced by DrawTile16Editor().
absl::Status yaze::editor::Tile16Editor::DrawTileEditControls | ( | ) |
Definition at line 244 of file tile16_editor.cc.
References current_gfx_bmp_, current_palette_, current_tile16_, current_tile16_bmp_, current_tile8_, yaze::editor::Renderer::GetInstance(), yaze::gui::InputHexByte(), notify_palette, yaze::gfx::GfxContext::palettesets_, priority_tile, RETURN_IF_ERROR, yaze::core::Renderer::UpdateBitmap(), x_flip, and y_flip.
Referenced by DrawTile16Editor().
absl::Status yaze::editor::Tile16Editor::UpdateTransferTileCanvas | ( | ) |
Definition at line 372 of file tile16_editor.cc.
References ASSIGN_OR_RETURN, yaze::gui::BitmapCanvasPipeline(), yaze::editor::Renderer::GetInstance(), yaze::LoadAllGraphicsData(), palette_, PRINT_IF_ERROR, RETURN_IF_ERROR, yaze::core::FileDialogWrapper::ShowOpenFileDialog(), transfer_blockset_bmp_, transfer_blockset_loaded_, transfer_canvas_, transfer_gfx_, transfer_overworld_, transfer_rom_, transfer_started_, and transfer_status_.
Referenced by UpdateTile16Transfer().
absl::Status yaze::editor::Tile16Editor::LoadTile8 | ( | ) |
Definition at line 280 of file tile16_editor.cc.
References current_gfx_bmp_, current_gfx_individual_, current_palette_, yaze::editor::Renderer::GetInstance(), map_blockset_loaded_, yaze::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, and yaze::SharedRom::rom().
Referenced by InitBlockset().
absl::Status yaze::editor::Tile16Editor::SetCurrentTile | ( | int | id | ) |
Definition at line 335 of file tile16_editor.cc.
References current_palette_, current_tile16_, current_tile16_bmp_, yaze::editor::Renderer::GetInstance(), yaze::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, yaze::SharedRom::rom(), and tile16_individual_.
|
private |
Definition at line 53 of file tile16_editor.h.
Referenced by LoadTile8(), Update(), and UpdateBlockset().
|
private |
Definition at line 54 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 55 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 56 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 57 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 58 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 60 of file tile16_editor.h.
|
private |
Definition at line 61 of file tile16_editor.h.
Referenced by DrawTileEditControls(), SetCurrentTile(), and UpdateBlockset().
|
private |
Definition at line 62 of file tile16_editor.h.
Referenced by DrawTileEditControls(), DrawToCurrentTile16(), and UpdateTile16Edit().
|
private |
Definition at line 63 of file tile16_editor.h.
Referenced by DrawTileEditControls(), LoadTile8(), SetCurrentTile(), UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 65 of file tile16_editor.h.
Referenced by UpdateBlockset().
|
private |
Definition at line 66 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 68 of file tile16_editor.h.
Referenced by InitBlockset().
|
private |
Definition at line 71 of file tile16_editor.h.
Referenced by UpdateBlockset().
|
private |
Definition at line 73 of file tile16_editor.h.
Referenced by InitBlockset(), and UpdateBlockset().
|
private |
Definition at line 76 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
private |
Definition at line 78 of file tile16_editor.h.
Referenced by DrawTileEditControls(), DrawToCurrentTile16(), SetCurrentTile(), UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 81 of file tile16_editor.h.
Referenced by DrawMenu(), InitBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 85 of file tile16_editor.h.
Referenced by DrawTileEditControls(), InitBlockset(), LoadTile8(), and UpdateTile16Edit().
|
private |
Definition at line 87 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 88 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 90 of file tile16_editor.h.
Referenced by SetCurrentTile(), Tile16Editor(), and UpdateBlockset().
|
private |
Definition at line 91 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), LoadTile8(), and UpdateTile16Edit().
|
private |
Definition at line 93 of file tile16_editor.h.
|
private |
Definition at line 94 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 96 of file tile16_editor.h.
Referenced by DrawTile16Editor().
|
private |
Definition at line 98 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 99 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 100 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 101 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().