yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::ObjectTileLayout Struct Reference

Editable tile8 layout captured from an object's draw trace. More...

#include <object_tile_editor.h>

Classes

struct  Cell
 

Public Member Functions

CellFindCell (int rel_x, int rel_y)
 
const CellFindCell (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< Cellcells
 
int bounds_width = 0
 
int bounds_height = 0
 
int tile_data_address = -1
 
bool is_custom = false
 
std::string custom_filename
 

Detailed Description

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.

Member Function Documentation

◆ FromTraces()

◆ CreateEmpty()

◆ FindCell() [1/2]

ObjectTileLayout::Cell * yaze::zelda3::ObjectTileLayout::FindCell ( int rel_x,
int rel_y )

Definition at line 96 of file object_tile_editor.cc.

References cells.

◆ FindCell() [2/2]

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.

◆ HasModifications()

bool yaze::zelda3::ObjectTileLayout::HasModifications ( ) const

Definition at line 111 of file object_tile_editor.cc.

References cells.

Referenced by yaze::zelda3::ObjectTileEditor::WriteBack().

◆ RevertAll()

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

Here is the call graph for this function:

Member Data Documentation

◆ object_id

int16_t yaze::zelda3::ObjectTileLayout::object_id = 0

◆ origin_tile_x

int yaze::zelda3::ObjectTileLayout::origin_tile_x = 0

Definition at line 28 of file object_tile_editor.h.

Referenced by CreateEmpty(), and FromTraces().

◆ origin_tile_y

int yaze::zelda3::ObjectTileLayout::origin_tile_y = 0

Definition at line 29 of file object_tile_editor.h.

Referenced by CreateEmpty(), and FromTraces().

◆ cells

◆ bounds_width

◆ bounds_height

◆ tile_data_address

◆ is_custom

◆ custom_filename


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