llvm-mos-sdk
Functions
sprites.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <neo6502.h>
Include dependency graph for sprites.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void neo_sprite_reset (void)
 Reset the sprite system. More...
 
void neo_sprite_set (uint8_t id, uint16_t x, uint16_t y, uint8_t img, uint8_t flip, uint8_t anchor)
 Set the sprite. More...
 
void neo_sprite_hide (uint8_t id)
 Hide the specified sprite. More...
 
bool neo_sprite_collision (uint8_t first, uint8_t second, uint8_t distance)
 Check collision between two sprites. More...
 
void neo_sprite_position (uint8_t id, uint16_t *x, uint16_t *y)
 Get sprite position. More...
 

Function Documentation

◆ neo_sprite_collision()

bool neo_sprite_collision ( uint8_t  first,
uint8_t  second,
uint8_t  distance 
)

Check collision between two sprites.

Parameters
firstFirst sprite ID
secondSecond sprite ID
distanceMaximum distance between sprites

◆ neo_sprite_hide()

void neo_sprite_hide ( uint8_t  id)

Hide the specified sprite.

Parameters
idSprite ID

◆ neo_sprite_position()

void neo_sprite_position ( uint8_t  id,
uint16_t *  x,
uint16_t *  y 
)

Get sprite position.

Parameters
idSprite ID
xX position
yY position

◆ neo_sprite_reset()

void neo_sprite_reset ( void  )

Reset the sprite system.

◆ neo_sprite_set()

void neo_sprite_set ( uint8_t  id,
uint16_t  x,
uint16_t  y,
uint8_t  img,
uint8_t  flip,
uint8_t  anchor 
)

Set the sprite.

Parameters
idSprite ID
xX position
yY position
imgImage paramemters
flipFlip axis
anchorAnchor value