Struct megadrive_sys::vdp::TileFlags [−][src]
A struct representing the display flags of a single tile.
This is shared between sprite definitions and tiles rendered on one of the 3 render planes.
Implementations
impl TileFlags
[src]
pub fn for_tile(tile_idx: u16, palette: u8) -> TileFlags
[src]
Create a new flag set for a given tile index.
pub fn tile_index(self) -> u16
[src]
Get the tile index these flags refer to.
pub fn set_tile_index(self, tile_index: u16) -> TileFlags
[src]
Set the tile index for these flags.
pub fn palette(self) -> u8
[src]
Get the palette index these flags use.
pub fn set_palette(self, palette: u8) -> TileFlags
[src]
Set the palette used by these flags.
pub fn priority(self) -> bool
[src]
Returns true if this tile will be rendered with priority.
pub fn set_priority(self, p: bool) -> TileFlags
[src]
Configure whether these flags render tiles with priority.
pub fn flip_h(self) -> bool
[src]
Returns true if this tile is flipped horizontally.
pub fn set_flip_h(self, p: bool) -> TileFlags
[src]
Set whether these flags will render horizontally flipped tiles.
pub fn flip_v(self) -> bool
[src]
Returns true if this tile is flipped vertically.
pub fn set_flip_v(self, p: bool) -> TileFlags
[src]
Set whether these flags will render vertically flipped tiles.
Trait Implementations
impl Clone for TileFlags
[src]
fn clone(&self) -> TileFlags
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TileFlags
[src]
impl Debug for TileFlags
[src]
impl Default for TileFlags
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,