Crate playdate_sprite

Crate playdate_sprite 

Source

Re-exports§

pub use crate::ext::*;

Modules§

api
callback
ext
prelude
utils

Structs§

Sprite
SpriteRef

Traits§

AnySprite
SpriteApi
SpriteType
Type of sprite, includes associated user-data and free-on-drop flag.
TypedSprite
Represents strictly typed sprite, includes associated user-data and free-on-drop flag.

Functions§

add_dirty_rect
Marks the given dirty_rect (in screen coordinates) as needing a redraw.
add_sprite
Adds the given sprite to the display list, so that it is drawn in the current scene.
all_overlapping_sprites
Returns an slice of all sprites that have collide rects that are currently overlapping.
clear_clip_rects_in_range
Clears the clipping rectangle for all sprites with a Z index within start_z and end_z inclusive.
draw_sprites
Draws every sprite in the display list.
query_sprite_info_along_line
Returns an slice of SpriteQueryInfos for all sprites with collision rects that intersect the line connecting x1, y1 and x2, y2.
query_sprites_along_line
Returns an slice of all sprites with collision rects that intersect the line connecting x1, y1 and x2, y2.
query_sprites_at_point
Returns an slice of all sprites with collision rects containing the point at x, y.
query_sprites_in_rect
Returns an slice of all sprites with collision rects that intersect the width by height rect at x, y.
remove_all_sprites
Removes all sprites from the display list.
remove_sprite
Removes the given sprite from the display list.
remove_sprites
Removes all of the given sprites from the display list.
reset_collision_world
Frees and reallocates internal collision data, resetting everything to its default state.
set_always_redraw
If set to true, causes all sprites to draw each frame, whether or not they have been marked dirty. This may speed up the performance of your game if the system’s dirty rect tracking is taking up too much time - for example if there are many sprites moving around on screen at once.
set_clip_rects_in_range
Sets the clipping rectangle for all sprites with a Z index within start_z and end_z inclusive.
sprite_count
Returns the total number of sprites in the display list.
update_and_draw_sprites
Updates and draws every sprite in the display list.

Type Aliases§

OwnedSprite
SharedSprite