MCPcopy Create free account
hub / github.com/PerroEngine/Perro / read_bytes

Function read_bytes

perro_source/render_stack/perro_render_bridge/src/two_d.rs:590–595  ·  view source on GitHub ↗
(bytes: &'a [u8], cursor: &mut usize, len: usize)

Source from the content-addressed store, hash-verified

588 bytes: &[u8],
589 cursor: &mut usize,
590) -> Option<TileSetCollisionShape2D> {
591 match read_u8(bytes, cursor)? {
592 0 => Some(TileSetCollisionShape2D::Auto),
593 1 => {
594 let shape = match read_u8(bytes, cursor)? {
595 0 => TileSetShape2D::Rect {
596 width: read_f32(bytes, cursor)?,
597 height: read_f32(bytes, cursor)?,
598 },

Callers 4

decode_tileset_2d_binaryFunction · 0.70
read_u32Function · 0.70
read_i32Function · 0.70
read_f32Function · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected