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

Popup window to edit Tile16 data. More...

#include <tile16_editor.h>

Inheritance diagram for yaze::editor::Tile16Editor:

Public Member Functions

 Tile16Editor (std::array< gfx::Bitmap, zelda3::kNumTile16Individual > &tile16_individual)
 
absl::Status InitBlockset (const gfx::Bitmap &tile16_blockset_bmp, const gfx::Bitmap &current_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< Romshared_rom ()
 
auto rom ()
 

Private Attributes

bool map_blockset_loaded_ = false
 
bool transfer_started_ = false
 
bool transfer_blockset_loaded_ = false
 
bool x_flip = false
 
bool y_flip = false
 
bool priority_tile = false
 
int tile_size
 
int current_tile16_ = 0
 
int current_tile8_ = 0
 
uint8_t current_palette_ = 0
 
util::NotifyValue< uint32_t > notify_tile16
 
util::NotifyValue< uint8_t > notify_palette
 
std::array< uint8_t, 0x200 > 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::array< gfx::Bitmap, zelda3::kNumTile16Individual > & tile16_individual_
 
std::vector< gfx::Bitmapcurrent_gfx_individual_
 
PaletteEditor palette_editor_
 
gfx::SnesPalette palette_
 
absl::Status status_
 
Rom transfer_rom_
 
zelda3::Overworld transfer_overworld_ {transfer_rom_}
 
std::array< gfx::Bitmap, kNumGfxSheetstransfer_gfx_
 
absl::Status transfer_status_
 

Additional Inherited Members

- Static Public Attributes inherited from yaze::SharedRom
static std::shared_ptr< Romshared_rom_ = nullptr
 
- Static Protected Attributes inherited from yaze::gfx::GfxContext
static std::unordered_map< uint8_t, gfx::Palettesetpalettesets_
 

Detailed Description

Popup window to edit Tile16 data.

Definition at line 24 of file tile16_editor.h.

Constructor & Destructor Documentation

◆ Tile16Editor()

yaze::editor::Tile16Editor::Tile16Editor ( std::array< gfx::Bitmap, zelda3::kNumTile16Individual > & tile16_individual)
inline

Definition at line 26 of file tile16_editor.h.

References tile16_individual_.

Member Function Documentation

◆ InitBlockset()

◆ Update()

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().

Here is the call graph for this function:

◆ DrawMenu()

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

Definition at line 85 of file tile16_editor.cc.

References tile8_source_canvas_.

Referenced by Update().

◆ DrawTile16Editor()

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().

Here is the call graph for this function:

◆ UpdateTile16Transfer()

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().

Here is the call graph for this function:

◆ UpdateBlockset()

◆ DrawToCurrentTile16()

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().

◆ UpdateTile16Edit()

◆ DrawTileEditControls()

◆ UpdateTransferTileCanvas()

◆ LoadTile8()

absl::Status yaze::editor::Tile16Editor::LoadTile8 ( )

◆ SetCurrentTile()

absl::Status yaze::editor::Tile16Editor::SetCurrentTile ( int id)

Member Data Documentation

◆ map_blockset_loaded_

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

Definition at line 53 of file tile16_editor.h.

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

◆ transfer_started_

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

Definition at line 54 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_blockset_loaded_

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

Definition at line 55 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ x_flip

bool yaze::editor::Tile16Editor::x_flip = false
private

Definition at line 56 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ y_flip

bool yaze::editor::Tile16Editor::y_flip = false
private

Definition at line 57 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ priority_tile

bool yaze::editor::Tile16Editor::priority_tile = false
private

Definition at line 58 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ tile_size

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

Definition at line 60 of file tile16_editor.h.

◆ current_tile16_

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

Definition at line 61 of file tile16_editor.h.

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

◆ current_tile8_

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

Definition at line 62 of file tile16_editor.h.

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

◆ current_palette_

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

◆ notify_tile16

util::NotifyValue<uint32_t> yaze::editor::Tile16Editor::notify_tile16
private

Definition at line 65 of file tile16_editor.h.

Referenced by UpdateBlockset().

◆ notify_palette

util::NotifyValue<uint8_t> yaze::editor::Tile16Editor::notify_palette
private

Definition at line 66 of file tile16_editor.h.

Referenced by DrawTileEditControls().

◆ all_tiles_types_

std::array<uint8_t, 0x200> yaze::editor::Tile16Editor::all_tiles_types_
private

Definition at line 68 of file tile16_editor.h.

Referenced by InitBlockset().

◆ blockset_canvas_

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

Definition at line 71 of file tile16_editor.h.

Referenced by UpdateBlockset().

◆ tile16_blockset_bmp_

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

Definition at line 73 of file tile16_editor.h.

Referenced by InitBlockset(), and UpdateBlockset().

◆ tile16_edit_canvas_

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

Definition at line 76 of file tile16_editor.h.

Referenced by UpdateTile16Edit().

◆ current_tile16_bmp_

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

◆ tile8_source_canvas_

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

Definition at line 81 of file tile16_editor.h.

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

◆ current_gfx_bmp_

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

Definition at line 85 of file tile16_editor.h.

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

◆ transfer_canvas_

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

Definition at line 87 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_blockset_bmp_

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

Definition at line 88 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ tile16_individual_

std::array<gfx::Bitmap, zelda3::kNumTile16Individual>& yaze::editor::Tile16Editor::tile16_individual_
private

Definition at line 90 of file tile16_editor.h.

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

◆ current_gfx_individual_

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

Definition at line 91 of file tile16_editor.h.

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

◆ palette_editor_

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

Definition at line 93 of file tile16_editor.h.

◆ palette_

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

Definition at line 94 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ status_

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

Definition at line 96 of file tile16_editor.h.

Referenced by DrawTile16Editor().

◆ transfer_rom_

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

Definition at line 98 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_overworld_

zelda3::Overworld yaze::editor::Tile16Editor::transfer_overworld_ {transfer_rom_}
private

Definition at line 99 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_gfx_

std::array<gfx::Bitmap, kNumGfxSheets> yaze::editor::Tile16Editor::transfer_gfx_
private

Definition at line 100 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().

◆ transfer_status_

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

Definition at line 101 of file tile16_editor.h.

Referenced by UpdateTransferTileCanvas().


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