pub struct MetatileCell {
pub tile_id: u8,
pub flip_x: bool,
pub flip_y: bool,
pub palette_bank: u8,
}Expand description
One tile cell within a metatile. Beyond the basic tile index, this carries optional flip flags and a palette bank selector that are commonly needed by tilemap renderers.
Fields§
§tile_id: u8Index of the tile in the tileset’s tile table.
flip_x: boolFlip horizontally.
flip_y: boolFlip vertically.
palette_bank: u8Palette bank index (0–7 for GBC-style, 0 for DMG).
Implementations§
Source§impl MetatileCell
impl MetatileCell
Sourcepub fn from_tile_id(tile_id: u8) -> Self
pub fn from_tile_id(tile_id: u8) -> Self
Create an entry that references only a tile ID with no flips.
Trait Implementations§
Source§impl Clone for MetatileCell
impl Clone for MetatileCell
Source§fn clone(&self) -> MetatileCell
fn clone(&self) -> MetatileCell
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MetatileCell
Source§impl Debug for MetatileCell
impl Debug for MetatileCell
Source§impl Default for MetatileCell
impl Default for MetatileCell
impl Eq for MetatileCell
Source§impl PartialEq for MetatileCell
impl PartialEq for MetatileCell
impl StructuralPartialEq for MetatileCell
Auto Trait Implementations§
impl Freeze for MetatileCell
impl RefUnwindSafe for MetatileCell
impl Send for MetatileCell
impl Sync for MetatileCell
impl Unpin for MetatileCell
impl UnsafeUnpin for MetatileCell
impl UnwindSafe for MetatileCell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more