Files
balatro-gba-chinese-jocker-…/include/sprite.h
T
2025-01-31 17:42:09 -05:00

30 lines
567 B
C

#ifndef SPRITE_H
#define SPRITE_H
#include <tonc.h>
typedef struct
{
OBJ_ATTR *obj;
OBJ_AFFINE *aff;
u32 tid, pb;
POINT pos;
} Sprite;
// Sprite methods
Sprite *sprite_new(u16 a0, u16 a1, u32 tid, u32 pb, int sprite_index);
Sprite *affine_sprite_new(u16 a0, u16 a1, u32 tid, u32 pb);
void sprite_destroy(Sprite **sprite);
INLINE void sprite_position(Sprite *sprite, int x, int y)
{
sprite->pos.x = x;
sprite->pos.y = y;
obj_set_pos(sprite->obj, x, y);
}
// Sprite functions
void sprite_init();
void sprite_draw();
#endif // SPRITE_H