Parameters: int cell_w, int cell_h, int x_cells, int y_cells
Returns: LandGrid*
Parameters: LandGrid * super, int cell_w, int cell_h, int x_cells, int y_cells
Parameters: LandGrid * super
Removes all sprites from a grid, but does not destroy them.
Deletes a sprites grid. The sprites themselves are not destroyed.
Parameters: LandSprite * self, LandSpriteType * type
Parameters: LandSpriteType * type
Returns: LandSprite*
Parameters: LandSpriteType * type, LandImage * image
Parameters: LandSprite * self
Parameters: LandSprite * super
Parameters: LandSprite * sprite
Destroys a sprite. This will not remove its reference from a grid in case it is inside one - so only use this if you know what you are doing.
Same as land_sprite_del.
Parameters: LandSprite * self, LandGrid * grid
Parameters: LandSprite * self, LandSprite * other
Returns: int
Given two sprites who have a type LandSpriteTypeImage, do a pixel overlap test, and return 0 if they don’t overlap.
Parameters: LandGrid * self
Parameters: LandGrid * sprites_grid
Returns: LandArray*
Parameters: LandSprite * self, LandGrid * sprites_grid
Returns: LandList*
Return a list of all sprites overlapping the sprite in the given grid. The sprite itself is not returned. Note that this only works if all sprites in the grid have compatible overlapping, e.g. if the sprite does a pixel-overlap test, then all other sprites must have a pixel mask, or if it does a bounding circle test, then all other sprites must have a bounding circle, and so on.
Parameters: LandGrid * sprites_grid, float x, float y, float radius
Return a list of all sprites in the grid, whose position is inside the given circle (in pixels). The size of the sprite is currently ignored, only its point position is used.
Parameters: LandGrid * sprites_grid, float l, float t, float r, float b
Return a list of all sprites in the given rectangle. All the sprites who are in one of the grid cells overlapped by the rectangle are returned.
Parameters: LandGrid * grid, int cx, int cy
Parameters: LandGrid * sprites_grid, float p1x, float p1y, float p2x, float p2y, float p3x, float p3y
Return a list of all sprites in the given triangle. This only considers center positions, the size/shape of sprites is completely ignored.
Parameters: LandGrid * sprites_grid, LandView * view, float l, float t, float r, float b
Remove a sprite from a grid.
Parameters: LandSprite * self, LandGrid * grid, float x, float y
Place a sprite into a grid.
Move a sprite by the given amount of pixels
Move a sprite to the given position in pixels.
Parameters: LandSpritesGrid * self, LandView * view, int cell_x, int cell_y, float pixel_x, float pixel_y
Parameters: LandGrid * super, LandView * view
no parameters
Returns: LandSpriteType*
Parameters: LandSpriteType * self
Returns: LandSpriteTypeWithImage*
Parameters: LandSpriteType * super, LandImage * image, bool mask, int n
Parameters: LandImage * image, bool mask, int n
Parameters: LandSpriteType * super, LandAnimation * animation, LandImage * image, bool mask, int n
Parameters: LandAnimation * animation, LandImage * image, bool mask, int n
Create a new animation sprite type with the given animation. The image is used for collision detection. If no image is given, the first frame of the animation is used instead.
If a mask is request n is the number of rotations. A negative n means two variants are made for each rotation (one flipped horizontally).
Parameters: LandSpriteType * base