Popup window to edit Tile16 data. More...
#include <tile16_editor.h>
Public Member Functions | |
absl::Status | InitBlockset (const gfx::Bitmap &tile16_blockset_bmp, const gfx::Bitmap ¤t_gfx_bmp, const std::vector< gfx::Bitmap > &tile16_individual, uint8_t all_tiles_types[0x200]) |
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::app::SharedRom | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Private Attributes | |
bool | map_blockset_loaded_ = false |
bool | transfer_started_ = false |
bool | transfer_blockset_loaded_ = false |
int | current_tile16_ = 0 |
int | current_tile8_ = 0 |
uint8_t | current_palette_ = 0 |
core::NotifyValue< uint32_t > | notify_tile16 |
core::NotifyValue< uint8_t > | notify_palette |
bool | x_flip |
bool | y_flip |
bool | priority_tile |
int | tile_size |
uint8_t * | all_tiles_types_ |
gui::Canvas | blockset_canvas_ |
gfx::Bitmap | tile16_blockset_bmp_ |
gui::Canvas | tile16_edit_canvas_ |
gfx::Bitmap | current_tile16_bmp_ |
gui::Canvas | tile8_source_canvas_ |
gfx::Bitmap | current_gfx_bmp_ |
gui::Canvas | transfer_canvas_ |
gfx::Bitmap | transfer_blockset_bmp_ |
std::vector< gfx::Bitmap > | tile16_individual_ |
std::vector< gfx::Bitmap > | current_gfx_individual_ |
PaletteEditor | palette_editor_ |
gfx::SnesPalette | palette_ |
zelda3::overworld::Overworld | transfer_overworld_ |
absl::Status | status_ |
Rom | transfer_rom_ |
absl::Status | transfer_status_ |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::app::SharedRom | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
Static Protected Attributes inherited from yaze::app::GfxContext | |
static std::unordered_map< uint8_t, gfx::Paletteset > | palettesets_ |
Popup window to edit Tile16 data.
Definition at line 22 of file tile16_editor.h.
absl::Status yaze::app::editor::Tile16Editor::InitBlockset | ( | const gfx::Bitmap & | tile16_blockset_bmp, |
const gfx::Bitmap & | current_gfx_bmp, | ||
const std::vector< gfx::Bitmap > & | tile16_individual, | ||
uint8_t | all_tiles_types[0x200] ) |
Definition at line 52 of file tile16_editor.cc.
References all_tiles_types_, current_gfx_bmp_, yaze::app::gui::Canvas::custom_labels_enabled(), LoadTile8(), yaze::app::gui::Canvas::mutable_labels(), RETURN_IF_ERROR, tile16_blockset_bmp_, tile16_individual_, tile8_source_canvas_, and yaze::app::core::UppercaseHexByte().
Referenced by yaze::app::editor::OverworldEditor::Update().
absl::Status yaze::app::editor::Tile16Editor::Update | ( | ) |
Definition at line 72 of file tile16_editor.cc.
References DrawMenu(), DrawTile16Editor(), map_blockset_loaded_, RETURN_IF_ERROR, and UpdateTile16Transfer().
Referenced by yaze::app::editor::OverworldEditor::DrawToolset().
absl::Status yaze::app::editor::Tile16Editor::DrawMenu | ( | ) |
Definition at line 87 of file tile16_editor.cc.
References yaze::app::gui::Canvas::custom_labels_enabled(), and tile8_source_canvas_.
Referenced by Update().
void yaze::app::editor::Tile16Editor::DrawTile16Editor | ( | ) |
Definition at line 101 of file tile16_editor.cc.
References DrawTileEditControls(), status_, TABLE_BORDERS_RESIZABLE, UpdateBlockset(), and UpdateTile16Edit().
Referenced by Update().
absl::Status yaze::app::editor::Tile16Editor::UpdateTile16Transfer | ( | ) |
Definition at line 339 of file tile16_editor.cc.
References RETURN_IF_ERROR, TABLE_BORDERS_RESIZABLE, UpdateBlockset(), and UpdateTransferTileCanvas().
Referenced by Update().
absl::Status yaze::app::editor::Tile16Editor::UpdateBlockset | ( | ) |
Definition at line 131 of file tile16_editor.cc.
References yaze::app::core::NotifyValue< T >::apply_changes(), yaze::app::gfx::Bitmap::ApplyPalette(), yaze::app::gui::BeginChildWithScrollbar(), yaze::app::gui::BeginPadding(), blockset_canvas_, current_palette_, current_tile16_, current_tile16_bmp_, yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::DrawOverlay(), yaze::app::gui::Canvas::DrawTileSelector(), yaze::app::gui::EndPadding(), yaze::app::core::NotifyValue< T >::get(), yaze::app::core::Renderer::GetInstance(), yaze::app::gui::Canvas::GetTileIdFromMousePos(), map_blockset_loaded_, yaze::app::core::NotifyValue< T >::modified(), yaze::app::core::NotifyValue< T >::mutable_get(), notify_tile16, yaze::app::gui::Canvas::points(), yaze::app::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, yaze::app::SharedRom::rom(), tile16_blockset_bmp_, and tile16_individual_.
Referenced by DrawTile16Editor(), and UpdateTile16Transfer().
absl::Status yaze::app::editor::Tile16Editor::DrawToCurrentTile16 | ( | ImVec2 | pos | ) |
Definition at line 160 of file tile16_editor.cc.
References current_gfx_individual_, current_tile16_bmp_, current_tile8_, and yaze::app::gfx::Bitmap::WriteToPixel().
Referenced by UpdateTile16Edit().
absl::Status yaze::app::editor::Tile16Editor::UpdateTile16Edit | ( | ) |
Definition at line 193 of file tile16_editor.cc.
References current_gfx_bmp_, current_gfx_individual_, current_palette_, current_tile16_bmp_, current_tile8_, yaze::app::gui::Canvas::DrawBackground(), yaze::app::gui::Canvas::DrawBitmap(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::gui::Canvas::DrawGrid(), yaze::app::gui::Canvas::drawn_tile_position(), yaze::app::gui::Canvas::DrawOverlay(), yaze::app::gui::Canvas::DrawTilePainter(), yaze::app::gui::Canvas::DrawTileSelector(), DrawToCurrentTile16(), yaze::app::core::Renderer::GetInstance(), yaze::app::gui::Canvas::points(), RETURN_IF_ERROR, yaze::app::SharedRom::rom(), tile16_edit_canvas_, tile8_source_canvas_, and yaze::app::core::Renderer::UpdateBitmap().
Referenced by DrawTile16Editor().
absl::Status yaze::app::editor::Tile16Editor::DrawTileEditControls | ( | ) |
Definition at line 246 of file tile16_editor.cc.
References yaze::app::core::NotifyValue< T >::apply_changes(), yaze::app::gfx::Bitmap::ApplyPaletteWithTransparent(), current_gfx_bmp_, current_palette_, current_tile16_, current_tile16_bmp_, current_tile8_, yaze::app::core::NotifyValue< T >::get(), yaze::app::core::Renderer::GetInstance(), yaze::app::gui::InputHexByte(), yaze::app::core::NotifyValue< T >::modified(), yaze::app::core::NotifyValue< T >::mutable_get(), notify_palette, yaze::app::GfxContext::palettesets_, priority_tile, RETURN_IF_ERROR, yaze::app::core::Renderer::UpdateBitmap(), x_flip, and y_flip.
Referenced by DrawTile16Editor().
absl::Status yaze::app::editor::Tile16Editor::UpdateTransferTileCanvas | ( | ) |
Definition at line 364 of file tile16_editor.cc.
References yaze::app::gui::BitmapCanvasPipeline(), yaze::app::zelda3::overworld::Overworld::current_area_palette(), yaze::app::gui::FileDialogPipeline(), yaze::app::core::Renderer::GetInstance(), yaze::app::zelda3::overworld::Overworld::Load(), yaze::app::Rom::LoadAllGraphicsData(), yaze::app::Rom::LoadFromFile(), palette_, PRINT_IF_ERROR, RETURN_IF_ERROR, yaze::app::zelda3::overworld::Overworld::set_current_map(), yaze::app::zelda3::overworld::Overworld::tile16_blockset_data(), transfer_blockset_bmp_, transfer_blockset_loaded_, transfer_canvas_, transfer_overworld_, transfer_rom_, transfer_started_, and transfer_status_.
Referenced by UpdateTile16Transfer().
absl::Status yaze::app::editor::Tile16Editor::LoadTile8 | ( | ) |
Definition at line 282 of file tile16_editor.cc.
References current_gfx_bmp_, current_gfx_individual_, current_palette_, yaze::app::gfx::Bitmap::data(), yaze::app::core::Renderer::GetInstance(), map_blockset_loaded_, yaze::app::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, yaze::app::SharedRom::rom(), and yaze::app::gfx::Bitmap::width().
Referenced by InitBlockset().
absl::Status yaze::app::editor::Tile16Editor::SetCurrentTile | ( | int | id | ) |
Definition at line 327 of file tile16_editor.cc.
References yaze::app::gfx::Bitmap::ApplyPalette(), current_palette_, current_tile16_, current_tile16_bmp_, yaze::app::core::Renderer::GetInstance(), yaze::app::core::Renderer::RenderBitmap(), RETURN_IF_ERROR, yaze::app::SharedRom::rom(), and tile16_individual_.
Referenced by yaze::app::editor::OverworldEditor::DrawTile16Selector().
|
private |
Definition at line 49 of file tile16_editor.h.
Referenced by LoadTile8(), Update(), and UpdateBlockset().
|
private |
Definition at line 50 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 51 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 53 of file tile16_editor.h.
Referenced by DrawTileEditControls(), SetCurrentTile(), and UpdateBlockset().
|
private |
Definition at line 54 of file tile16_editor.h.
Referenced by DrawTileEditControls(), DrawToCurrentTile16(), and UpdateTile16Edit().
|
private |
Definition at line 55 of file tile16_editor.h.
Referenced by DrawTileEditControls(), LoadTile8(), SetCurrentTile(), UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 57 of file tile16_editor.h.
Referenced by UpdateBlockset().
|
private |
Definition at line 58 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 61 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 62 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 63 of file tile16_editor.h.
Referenced by DrawTileEditControls().
|
private |
Definition at line 64 of file tile16_editor.h.
|
private |
Definition at line 66 of file tile16_editor.h.
Referenced by InitBlockset().
|
private |
Definition at line 69 of file tile16_editor.h.
Referenced by UpdateBlockset().
|
private |
Definition at line 71 of file tile16_editor.h.
Referenced by InitBlockset(), and UpdateBlockset().
|
private |
Definition at line 74 of file tile16_editor.h.
Referenced by UpdateTile16Edit().
|
private |
Definition at line 76 of file tile16_editor.h.
Referenced by DrawTileEditControls(), DrawToCurrentTile16(), SetCurrentTile(), UpdateBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 79 of file tile16_editor.h.
Referenced by DrawMenu(), InitBlockset(), and UpdateTile16Edit().
|
private |
Definition at line 83 of file tile16_editor.h.
Referenced by DrawTileEditControls(), InitBlockset(), LoadTile8(), and UpdateTile16Edit().
|
private |
Definition at line 85 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 86 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
private |
Definition at line 88 of file tile16_editor.h.
Referenced by InitBlockset(), SetCurrentTile(), and UpdateBlockset().
|
private |
Definition at line 89 of file tile16_editor.h.
Referenced by DrawToCurrentTile16(), LoadTile8(), and UpdateTile16Edit().
|
private |
Definition at line 91 of file tile16_editor.h.
|
private |
Definition at line 93 of file tile16_editor.h.
Referenced by UpdateTransferTileCanvas().
|
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().