1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-29 14:51:17 +00:00
8bitworkshop/presets/c64/sprites.h

30 lines
880 B
C
Raw Normal View History

2020-02-02 18:17:31 +00:00
#ifndef _SPRITES_H
#define _SPRITES_H
#include "common.h"
typedef struct {
2022-07-20 19:32:47 +00:00
struct {
byte x; /* X coordinate */
byte y; /* Y coordinate */
} spr_pos[8];
2020-02-02 18:17:31 +00:00
byte spr_hi_x; /* High bits of X coordinate */
2022-07-20 19:32:47 +00:00
byte spr_ena; /* Enable sprites */
2020-02-02 18:17:31 +00:00
byte spr_exp_y; /* Expand sprites in Y dir */
byte spr_bg_prio; /* Priority to background */
byte spr_mcolor; /* Sprite multicolor bits */
2022-07-20 19:32:47 +00:00
byte spr_exp_x; /* Expand sprites in X dir */
2020-02-02 18:17:31 +00:00
byte spr_color[8]; /* Colors for the sprites */
byte spr_shapes[8]; /* sprite shapes */
} SpriteShadow;
extern SpriteShadow sprshad;
void sprite_clear(void);
2022-07-20 19:32:47 +00:00
void sprite_update(char* screenmem);
2022-08-09 14:47:55 +00:00
void sprite_shape(byte index, const char* sprite_data);
2020-02-02 18:17:31 +00:00
void sprite_draw(byte i, word x, byte y, byte shape);
byte sprite_get_closest_collision(byte i, byte spr_coll);
2020-02-02 18:17:31 +00:00
#endif