llvm-mos-sdk
sprites.h
Go to the documentation of this file.
1 // Copyright 2024 LLVM-MOS Project
2 // Licensed under the Apache License, Version 2.0 with LLVM Exceptions.
3 // See https://github.com/llvm-mos/llvm-mos-sdk/blob/main/LICENSE for license
4 // information.
5 
6 #include <stdbool.h>
7 #include <stdint.h>
8 
9 #ifndef _NEO_SPRITES_H
10 #define _NEO_SPRITES_H
11 
12 #include <neo6502.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
21 void neo_sprite_reset(void);
22 
33 void neo_sprite_set(uint8_t id, uint16_t x, uint16_t y, uint8_t img, uint8_t flip, uint8_t anchor);
34 
40 void neo_sprite_hide(uint8_t id);
41 
49 bool neo_sprite_collision(uint8_t first, uint8_t second, uint8_t distance);
50 
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif
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.
std::uint16_t
::uint16_t uint16_t
Definition: cstdint:22
neo_sprite_hide
void neo_sprite_hide(uint8_t id)
Hide the specified sprite.
std::uint8_t
::uint8_t uint8_t
Definition: cstdint:21
x
byte x
Definition: api.h:26
y
byte byte y
Definition: api.h:26
neo6502.h
neo_sprite_reset
void neo_sprite_reset(void)
Reset the sprite system.
neo_sprite_collision
bool neo_sprite_collision(uint8_t first, uint8_t second, uint8_t distance)
Check collision between two sprites.
neo_sprite_position
void neo_sprite_position(uint8_t id, uint16_t *x, uint16_t *y)
Get sprite position.