1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//!This is the module to interact in a save way with the Sprites C++ library.
use ;
///Create a `const` raw pointer to a sprite as u8, without creating an intermediate reference.
pub use get_sprite_addr;
extern "C"
/// 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
///
/// ----- ##### -----
/// --#-- ##### --#--
/// ###-## ##### ##-##
/// --#-- ##### --#--
/// ----- ##### -----
/// ```