pub struct TilemapEntry {
pub tile_id: u16,
pub flip_h: bool,
pub flip_v: bool,
pub palette_group: u8,
pub priority: u8,
pub collision_override: Option<CollisionType>,
pub animation_group: Option<u8>,
}Expand description
A single entry in a tilemap, supporting 16-bit-style metadata.
Inspired by GBA’s screen entry format but not bound to GBA hardware. Each entry describes which tile to draw, how it should be transformed, and optional gameplay metadata (collision, animation frame group).
Fields§
§tile_id: u16Tile index — supports >256 tiles (unlike the 1-byte GB limit).
flip_h: boolFlip the tile horizontally before rendering.
flip_v: boolFlip the tile vertically before rendering.
palette_group: u8Palette bank selection (which sub-palette to use).
priority: u8Layer priority (0 = lowest, rendered first / behind).
collision_override: Option<CollisionType>Per-tile collision override. When Some, this overrides the
collision data that would normally come from tile-metadata tables.
animation_group: Option<u8>Animation frame group ID. When Some, the tile belongs to an
animated sequence (e.g. water, flowers). The renderer uses this
group index together with a global frame counter to select the
correct tile.
Trait Implementations§
Source§impl Clone for TilemapEntry
impl Clone for TilemapEntry
Source§fn clone(&self) -> TilemapEntry
fn clone(&self) -> TilemapEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more