#[repr(C)]pub struct OamEntry {
pub y: u8,
pub x: u8,
pub tile: u8,
pub attr: OamAttr,
}Expand description
A single OAM sprite entry (4 bytes).
| Byte | Field | Meaning |
|---|---|---|
| 0 | y | Screen Y position, offset by 16. |
| 1 | x | Screen X position, offset by 8. |
| 2 | tile | Tile index into the sprite tile data. |
| 3 | attr | Attribute flags (OamAttr). |
Fields§
§y: u8Screen Y position, offset by 16 (0 and >= 160 hide the sprite).
x: u8Screen X position, offset by 8 (0 and >= 168 hide the sprite).
tile: u8Tile index into the sprite tile data.
attr: OamAttrAttribute flags: palette, flip, priority, and CGB bank/palette.
Trait Implementations§
Auto Trait Implementations§
impl BankSafe for OamEntry
impl Freeze for OamEntry
impl RefUnwindSafe for OamEntry
impl Send for OamEntry
impl Sync for OamEntry
impl Unpin for OamEntry
impl UnsafeUnpin for OamEntry
impl UnwindSafe for OamEntry
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