diff --git a/code/foundation/src/models/components.h b/code/foundation/src/models/components.h index 7629496..ac24ea2 100644 --- a/code/foundation/src/models/components.h +++ b/code/foundation/src/models/components.h @@ -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 { diff --git a/code/foundation/src/world/entity_view.c b/code/foundation/src/world/entity_view.c index b7fe255..4d91417 100644 --- a/code/foundation/src/world/entity_view.c +++ b/code/foundation/src/world/entity_view.c @@ -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) }, diff --git a/code/foundation/src/world/entity_view.h b/code/foundation/src/world/entity_view.h index 1d3cbcc..795a036 100644 --- a/code/foundation/src/world/entity_view.h +++ b/code/foundation/src/world/entity_view.h @@ -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;