efd/v1
DavoSK 2023-02-02 16:21:12 +01:00
commit f6d5c76d1b
3 changed files with 20 additions and 5 deletions

View File

@ -143,8 +143,16 @@ typedef struct {
} Item;
typedef struct {
int spritesheet;
int frame;
union {
struct {
uint32_t spritesheet;
uint32_t frame;
};
struct {
uint32_t sprite_id;
uint32_t sprite_data;
};
};
} Sprite;
typedef struct {

View File

@ -47,7 +47,6 @@ pkt_desc pkt_entity_view_desc[] = {
{ PKT_HALF(entity_view, progress_value) },
{ PKT_KEEP_IF(entity_view, kind, EKIND_SPRITE, 2) },
{ PKT_UINT(entity_view, spritesheet) },
{ PKT_UINT(entity_view, frame) },

View File

@ -82,8 +82,16 @@ typedef struct entity_view {
float progress_value;
// sprite index
int spritesheet;
int frame;
union {
struct {
uint32_t spritesheet;
uint32_t frame;
};
struct {
uint32_t sprite_id;
uint32_t sprite_data;
};
};
// NOTE(zaklaus): inventory
uint8_t has_items;