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

Information about a tile at a specific screen location. More...

#include <coordinate_mapper.h>

Public Attributes

int tile_id = -1
 8x8 tile ID (-1 if invalid)
 
int tile16_index = -1
 16x16 tile index (-1 if invalid)
 
uint32_t rom_offset = 0
 ROM offset for tile data.
 
int palette_group = 0
 Palette group index.
 
int palette_index = 0
 Palette index within group.
 
ImVec2 tile_origin_px
 Top-left of tile in canvas space (pixels)
 
ImVec2 tile_size_px
 Size of the tile in pixels.
 
bool is_valid = false
 Whether the hit is valid.
 
int map_x = -1
 Tile X coordinate in map space.
 
int map_y = -1
 Tile Y coordinate in map space.
 
int local_map_id = -1
 Local map ID (for overworld)
 
std::string canvas_id
 ID of the canvas that was hit.
 

Detailed Description

Information about a tile at a specific screen location.

Contains all data needed to identify and locate a tile, including:

  • Tile IDs (8x8 and 16x16)
  • ROM offset for the tile data
  • Palette information
  • Position in canvas space

Definition at line 28 of file coordinate_mapper.h.

Member Data Documentation

◆ tile_id

int yaze::gui::TileHitInfo::tile_id = -1

8x8 tile ID (-1 if invalid)

Definition at line 29 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile(), and yaze::gui::ScreenToTileQuick().

◆ tile16_index

int yaze::gui::TileHitInfo::tile16_index = -1

16x16 tile index (-1 if invalid)

Definition at line 30 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile().

◆ rom_offset

uint32_t yaze::gui::TileHitInfo::rom_offset = 0

ROM offset for tile data.

Definition at line 31 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile().

◆ palette_group

int yaze::gui::TileHitInfo::palette_group = 0

Palette group index.

Definition at line 32 of file coordinate_mapper.h.

◆ palette_index

int yaze::gui::TileHitInfo::palette_index = 0

Palette index within group.

Definition at line 33 of file coordinate_mapper.h.

◆ tile_origin_px

ImVec2 yaze::gui::TileHitInfo::tile_origin_px

Top-left of tile in canvas space (pixels)

Definition at line 34 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile(), and yaze::gui::ScreenToTileQuick().

◆ tile_size_px

ImVec2 yaze::gui::TileHitInfo::tile_size_px

Size of the tile in pixels.

Definition at line 35 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile(), and yaze::gui::ScreenToTileQuick().

◆ is_valid

bool yaze::gui::TileHitInfo::is_valid = false

Whether the hit is valid.

Definition at line 36 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile(), and yaze::gui::ScreenToTileQuick().

◆ map_x

int yaze::gui::TileHitInfo::map_x = -1

Tile X coordinate in map space.

Definition at line 39 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile(), and yaze::gui::ScreenToTileQuick().

◆ map_y

int yaze::gui::TileHitInfo::map_y = -1

Tile Y coordinate in map space.

Definition at line 40 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile(), and yaze::gui::ScreenToTileQuick().

◆ local_map_id

int yaze::gui::TileHitInfo::local_map_id = -1

Local map ID (for overworld)

Definition at line 41 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::CanvasToTile().

◆ canvas_id

std::string yaze::gui::TileHitInfo::canvas_id

ID of the canvas that was hit.

Definition at line 42 of file coordinate_mapper.h.

Referenced by yaze::gui::CoordinateMapper::ScreenToTile().


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