Function arduboy_rust::prelude::sprites::draw_override
source · pub fn draw_override(x: i16, y: i16, bitmap: *const u8, frame: u8)
Expand description
Draw a sprite by replacing the existing content completely.
Parameters
- x,y The coordinates of the top left pixel location.
- bitmap A pointer to the array containing the image frames.
- frame The frame number of the image to draw.
A sprite is drawn by overwriting the pixels in the buffer with the data from the specified frame in the array. No masking is done. A bit set to 1 in the frame will set the pixel to 1 in the buffer, and a 0 in the array will set a 0 in the buffer.
image before after (# = 1, - = 0)
----- ----- -----
--#-- ----- --#--
##-## ----- ##-##
--#-- ----- --#--
----- ----- -----
image before after
----- ##### -----
--#-- ##### --#--
##-## ##### ##-##
--#-- ##### --#--
----- ##### -----