yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::editor::Tile16Editor Class Reference

Popup window to edit Tile16 data. More...

#include <tile16_editor.h>

Inheritance diagram for yaze::app::editor::Tile16Editor:
Collaboration diagram for yaze::app::editor::Tile16Editor:

Public Member Functions

absl::Status 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])
 
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< Romshared_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< std::vector< uint8_t > > tile16_individual_data_
 
std::vector< gfx::Bitmaptile16_individual_
 
std::vector< gfx::Bitmapcurrent_gfx_individual_
 
std::vector< uint8_t > current_tile16_data_
 
std::vector< uint8_t > tile8_gfx_data_
 
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< Romshared_rom_ = nullptr
 
- Static Protected Attributes inherited from yaze::app::editor::context::GfxContext
static std::unordered_map< uint8_t, gfx::Palettesetpalettesets_
 

Detailed Description

Popup window to edit Tile16 data.

Definition at line 29 of file tile16_editor.h.

Member Function Documentation

◆ InitBlockset()

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] )

◆ Update()

absl::Status yaze::app::editor::Tile16Editor::Update ( )

Definition at line 73 of file tile16_editor.cc.

References DrawMenu(), DrawTile16Editor(), map_blockset_loaded_, RETURN_IF_ERROR, and UpdateTile16Transfer().

Referenced by yaze::app::editor::OverworldEditor::DrawToolset().

Here is the call graph for this function:

◆ DrawMenu()

absl::Status yaze::app::editor::Tile16Editor::DrawMenu ( )

Definition at line 88 of file tile16_editor.cc.

References yaze::app::gui::Canvas::custom_labels_enabled(), and tile8_source_canvas_.

Referenced by Update().

Here is the call graph for this function:

◆ DrawTile16Editor()

void yaze::app::editor::Tile16Editor::DrawTile16Editor ( )

Definition at line 102 of file tile16_editor.cc.

References DrawTileEditControls(), status_, TABLE_BORDERS_RESIZABLE, UpdateBlockset(), and UpdateTile16Edit().

Referenced by Update().

Here is the call graph for this function:

◆ UpdateTile16Transfer()

absl::Status yaze::app::editor::Tile16Editor::UpdateTile16Transfer ( )

Definition at line 340 of file tile16_editor.cc.

References RETURN_IF_ERROR, TABLE_BORDERS_RESIZABLE, UpdateBlockset(), and UpdateTransferTileCanvas().

Referenced by Update().

Here is the call graph for this function:

◆ UpdateBlockset()

◆ DrawToCurrentTile16()

absl::Status yaze::app::editor::Tile16Editor::DrawToCurrentTile16 ( ImVec2 pos)

Definition at line 161 of file tile16_editor.cc.

References current_gfx_individual_, current_tile16_bmp_, current_tile8_, and yaze::app::gfx::Bitmap::WriteToPixel().

Referenced by UpdateTile16Edit().

Here is the call graph for this function:

◆ UpdateTile16Edit()

◆ DrawTileEditControls()

◆ UpdateTransferTileCanvas()

◆ LoadTile8()

◆ SetCurrentTile()

Member Data Documentation

◆ map_blockset_loaded_

bool yaze::app::editor::Tile16Editor::map_blockset_loaded_ = false
private

Definition at line 56 of file tile16_editor.h.

Referenced by LoadTile8(), Update(), and UpdateBlockset().

◆ transfer_started_

bool yaze::app::editor::Tile16Editor::transfer_started_ = false
private

Definition at line 57 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_blockset_loaded_

bool yaze::app::editor::Tile16Editor::transfer_blockset_loaded_ = false
private

Definition at line 58 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ current_tile16_

int yaze::app::editor::Tile16Editor::current_tile16_ = 0
private

Definition at line 60 of file tile16_editor.h.

Referenced by DrawTileEditControls(), SetCurrentTile(), and UpdateBlockset().

◆ current_tile8_

int yaze::app::editor::Tile16Editor::current_tile8_ = 0
private

Definition at line 61 of file tile16_editor.h.

Referenced by DrawTileEditControls(), DrawToCurrentTile16(), and UpdateTile16Edit().

◆ current_palette_

uint8_t yaze::app::editor::Tile16Editor::current_palette_ = 0
private

◆ notify_tile16

core::NotifyValue<uint32_t> yaze::app::editor::Tile16Editor::notify_tile16
private

Definition at line 64 of file tile16_editor.h.

Referenced by UpdateBlockset().

◆ notify_palette

core::NotifyValue<uint8_t> yaze::app::editor::Tile16Editor::notify_palette
private

Definition at line 65 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ x_flip

bool yaze::app::editor::Tile16Editor::x_flip
private

Definition at line 68 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ y_flip

bool yaze::app::editor::Tile16Editor::y_flip
private

Definition at line 69 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ priority_tile

bool yaze::app::editor::Tile16Editor::priority_tile
private

Definition at line 70 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ tile_size

int yaze::app::editor::Tile16Editor::tile_size
private

Definition at line 71 of file tile16_editor.h.

◆ all_tiles_types_

uint8_t* yaze::app::editor::Tile16Editor::all_tiles_types_
private

Definition at line 73 of file tile16_editor.h.

Referenced by InitBlockset().

◆ blockset_canvas_

gui::Canvas yaze::app::editor::Tile16Editor::blockset_canvas_
private
Initial value:
{"blocksetCanvas", ImVec2(0x100, 0x4000),

Definition at line 76 of file tile16_editor.h.

Referenced by UpdateBlockset().

◆ tile16_blockset_bmp_

gfx::Bitmap yaze::app::editor::Tile16Editor::tile16_blockset_bmp_
private

Definition at line 78 of file tile16_editor.h.

Referenced by InitBlockset(), and UpdateBlockset().

◆ tile16_edit_canvas_

gui::Canvas yaze::app::editor::Tile16Editor::tile16_edit_canvas_
private
Initial value:
{"Tile16EditCanvas", ImVec2(0x40, 0x40),

Definition at line 81 of file tile16_editor.h.

Referenced by UpdateTile16Edit().

◆ current_tile16_bmp_

gfx::Bitmap yaze::app::editor::Tile16Editor::current_tile16_bmp_
private

◆ tile8_source_canvas_

gui::Canvas yaze::app::editor::Tile16Editor::tile8_source_canvas_
private
Initial value:
{
"Tile8SourceCanvas",
constexpr int kTilesheetWidth
Definition snes_tile.h:14
constexpr int kTilesheetHeight
Definition snes_tile.h:15

Definition at line 86 of file tile16_editor.h.

Referenced by DrawMenu(), InitBlockset(), and UpdateTile16Edit().

◆ current_gfx_bmp_

gfx::Bitmap yaze::app::editor::Tile16Editor::current_gfx_bmp_
private

Definition at line 90 of file tile16_editor.h.

Referenced by DrawTileEditControls(), InitBlockset(), LoadTile8(), and UpdateTile16Edit().

◆ transfer_canvas_

gui::Canvas yaze::app::editor::Tile16Editor::transfer_canvas_
private

Definition at line 92 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_blockset_bmp_

gfx::Bitmap yaze::app::editor::Tile16Editor::transfer_blockset_bmp_
private

Definition at line 93 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ tile16_individual_data_

std::vector<std::vector<uint8_t> > yaze::app::editor::Tile16Editor::tile16_individual_data_
private

Definition at line 95 of file tile16_editor.h.

◆ tile16_individual_

std::vector<gfx::Bitmap> yaze::app::editor::Tile16Editor::tile16_individual_
private

Definition at line 96 of file tile16_editor.h.

Referenced by InitBlockset(), SetCurrentTile(), and UpdateBlockset().

◆ current_gfx_individual_

std::vector<gfx::Bitmap> yaze::app::editor::Tile16Editor::current_gfx_individual_
private

Definition at line 98 of file tile16_editor.h.

Referenced by DrawToCurrentTile16(), LoadTile8(), and UpdateTile16Edit().

◆ current_tile16_data_

std::vector<uint8_t> yaze::app::editor::Tile16Editor::current_tile16_data_
private

Definition at line 100 of file tile16_editor.h.

◆ tile8_gfx_data_

std::vector<uint8_t> yaze::app::editor::Tile16Editor::tile8_gfx_data_
private

Definition at line 102 of file tile16_editor.h.

Referenced by InitBlockset().

◆ palette_editor_

PaletteEditor yaze::app::editor::Tile16Editor::palette_editor_
private

Definition at line 104 of file tile16_editor.h.

◆ palette_

gfx::SnesPalette yaze::app::editor::Tile16Editor::palette_
private

Definition at line 106 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_overworld_

zelda3::overworld::Overworld yaze::app::editor::Tile16Editor::transfer_overworld_
private

Definition at line 107 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ status_

absl::Status yaze::app::editor::Tile16Editor::status_
private

Definition at line 109 of file tile16_editor.h.

Referenced by DrawTile16Editor().

◆ transfer_rom_

Rom yaze::app::editor::Tile16Editor::transfer_rom_
private

Definition at line 111 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_status_

absl::Status yaze::app::editor::Tile16Editor::transfer_status_
private

Definition at line 112 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().


The documentation for this class was generated from the following files: