Skip to main content

hide

Function hide 

Source
pub fn hide(access: Access<'_>, i: u8)
Expand description

Move an object off screen, which is the only way to stop it being drawn.

There is no per-object enable bit; set_enabled switches all forty at once. Writing zero to y puts the object sixteen pixels above the top edge, and that one byte is the whole of it: x, the tile and the attributes can stay.

OamShadow::new leaves every object hidden this way, so a page starts empty rather than needing to be cleared.

ยงPanics

If i is ENTRY_COUNT or beyond.