Editable tile8 layout captured from an object's draw trace. More...
#include <object_tile_editor.h>
Classes | |
| struct | Cell |
Public Member Functions | |
| Cell * | FindCell (int rel_x, int rel_y) |
| const Cell * | FindCell (int rel_x, int rel_y) const |
| bool | HasModifications () const |
| void | RevertAll () |
Static Public Member Functions | |
| static ObjectTileLayout | FromTraces (const std::vector< ObjectDrawer::TileTrace > &traces) |
| static ObjectTileLayout | CreateEmpty (int width, int height, int16_t object_id, const std::string &filename) |
Public Attributes | |
| int16_t | object_id = 0 |
| int | origin_tile_x = 0 |
| int | origin_tile_y = 0 |
| std::vector< Cell > | cells |
| int | bounds_width = 0 |
| int | bounds_height = 0 |
| int | tile_data_address = -1 |
| bool | is_custom = false |
| std::string | custom_filename |
Editable tile8 layout captured from an object's draw trace.
Built by running an object draw in trace_only mode and normalizing the resulting TileTrace entries into a 0-based coordinate grid.
Definition at line 26 of file object_tile_editor.h.
|
static |
Definition at line 22 of file object_tile_editor.cc.
References bounds_height, bounds_width, cells, yaze::zelda3::ObjectTileLayout::Cell::modified, object_id, origin_tile_x, origin_tile_y, yaze::zelda3::ObjectTileLayout::Cell::original_word, yaze::zelda3::ObjectTileLayout::Cell::rel_x, yaze::zelda3::ObjectTileLayout::Cell::rel_y, yaze::zelda3::ObjectTileLayout::Cell::tile_info, and yaze::gfx::TileInfoToWord().
Referenced by yaze::zelda3::ObjectTileEditor::CaptureObjectLayout().

|
static |
Definition at line 67 of file object_tile_editor.cc.
References bounds_height, bounds_width, cells, custom_filename, is_custom, yaze::zelda3::ObjectTileLayout::Cell::modified, object_id, origin_tile_x, origin_tile_y, yaze::zelda3::ObjectTileLayout::Cell::original_word, yaze::zelda3::ObjectTileLayout::Cell::rel_x, yaze::zelda3::ObjectTileLayout::Cell::rel_y, tile_data_address, yaze::zelda3::ObjectTileLayout::Cell::tile_info, and yaze::gfx::TileInfoToWord().
Referenced by yaze::editor::ObjectTileEditorPanel::OpenForNewObject().

| ObjectTileLayout::Cell * yaze::zelda3::ObjectTileLayout::FindCell | ( | int | rel_x, |
| int | rel_y ) |
Definition at line 96 of file object_tile_editor.cc.
References cells.
| const ObjectTileLayout::Cell * yaze::zelda3::ObjectTileLayout::FindCell | ( | int | rel_x, |
| int | rel_y ) const |
Definition at line 103 of file object_tile_editor.cc.
References cells.
| bool yaze::zelda3::ObjectTileLayout::HasModifications | ( | ) | const |
Definition at line 111 of file object_tile_editor.cc.
References cells.
Referenced by yaze::zelda3::ObjectTileEditor::WriteBack().
| void yaze::zelda3::ObjectTileLayout::RevertAll | ( | ) |
Definition at line 118 of file object_tile_editor.cc.
References cells, yaze::zelda3::ObjectTileLayout::Cell::tile_info, and yaze::gfx::WordToTileInfo().
Referenced by yaze::editor::ObjectTileEditorPanel::DrawActionBar().

| int16_t yaze::zelda3::ObjectTileLayout::object_id = 0 |
Definition at line 27 of file object_tile_editor.h.
Referenced by yaze::editor::ObjectTileEditorPanel::ApplyChanges(), CreateEmpty(), and FromTraces().
| int yaze::zelda3::ObjectTileLayout::origin_tile_x = 0 |
Definition at line 28 of file object_tile_editor.h.
Referenced by CreateEmpty(), and FromTraces().
| int yaze::zelda3::ObjectTileLayout::origin_tile_y = 0 |
Definition at line 29 of file object_tile_editor.h.
Referenced by CreateEmpty(), and FromTraces().
| std::vector<Cell> yaze::zelda3::ObjectTileLayout::cells |
Definition at line 39 of file object_tile_editor.h.
Referenced by yaze::editor::ObjectTileEditorPanel::ApplyChanges(), CreateEmpty(), yaze::editor::ObjectTileEditorPanel::Draw(), yaze::editor::ObjectTileEditorPanel::DrawActionBar(), yaze::editor::ObjectTileEditorPanel::DrawSourceSheet(), yaze::editor::ObjectTileEditorPanel::DrawTileGrid(), yaze::editor::ObjectTileEditorPanel::DrawTileProperties(), FindCell(), FindCell(), FromTraces(), yaze::editor::ObjectTileEditorPanel::HandleKeyboardShortcuts(), HasModifications(), yaze::zelda3::ObjectTileEditor::RenderLayoutToBitmap(), RevertAll(), and yaze::zelda3::ObjectTileEditor::WriteBack().
| int yaze::zelda3::ObjectTileLayout::bounds_width = 0 |
Definition at line 40 of file object_tile_editor.h.
Referenced by CreateEmpty(), yaze::editor::ObjectTileEditorPanel::Draw(), yaze::editor::ObjectTileEditorPanel::DrawTileGrid(), FromTraces(), and yaze::zelda3::ObjectTileEditor::RenderLayoutToBitmap().
| int yaze::zelda3::ObjectTileLayout::bounds_height = 0 |
Definition at line 41 of file object_tile_editor.h.
Referenced by CreateEmpty(), yaze::editor::ObjectTileEditorPanel::Draw(), yaze::editor::ObjectTileEditorPanel::DrawTileGrid(), FromTraces(), and yaze::zelda3::ObjectTileEditor::RenderLayoutToBitmap().
| int yaze::zelda3::ObjectTileLayout::tile_data_address = -1 |
| bool yaze::zelda3::ObjectTileLayout::is_custom = false |
| std::string yaze::zelda3::ObjectTileLayout::custom_filename |
Definition at line 45 of file object_tile_editor.h.
Referenced by yaze::editor::ObjectTileEditorPanel::ApplyChanges(), yaze::zelda3::ObjectTileEditor::CaptureObjectLayout(), CreateEmpty(), yaze::editor::ObjectTileEditorPanel::Draw(), and yaze::zelda3::ObjectTileEditor::WriteBack().