![]() |
dsekai
World engine for retrocomputers.
|
An instance of an item in the world. More...
#include <itstruct.h>
Data Fields | |
RESOURCE_NAME | sprite_name |
int16_t | sprite_cache_id |
Index of the item's sprite loaded in the Unilayer Graphics Cache. | |
char | name [ITEM_NAME_SZ+1] |
Meaningful name of this item displayed in menus, etc. | |
int16_t | owner |
dsekai_items_owners for this particular item. | |
int16_t | gid |
Arbitrary portion of the GID of the item. | |
uint8_t | data |
Qualitative value specific to each ITEM_TYPE_MASK. | |
uint16_t | flags |
Item Flags pertaining to this item. | |
uint8_t | x |
If ITEM::owner is ::ITEM_OWNER_NONE, the X coord (in tiles) of this item on the TILEMAP referred to by ITEM::map_gid. | |
uint8_t | y |
If ITEM::owner is ::ITEM_OWNER_NONE, the Y coord (in tiles) of this item on the TILEMAP referred to by ITEM::map_gid. | |
TILEMAP_GID | map_gid |
TILEMAP::gid of the tilemap on which this item is sitting. Only has meaning when ITEM::owner is set to ::ITEM_OWNER_NONE. | |
Related Symbols | |
(Note that these are not member symbols.) | |
#define | item_get_type_flag(e) |
Get the Item Types and Use for ITEM e, e.g. to index in gc_items_max. | |
#define | item_set_type_flag(e, v) |
Set the Item Types and Use for ITEM e. | |
#define | item_get_count_flag(e) |
Return the number of copies of ITEM e as a stack. | |
#define | item_incr_count(e, v) |
Increment the number of copies of ITEM e as a stack. | |
An instance of an item in the world.
All extant items are stored in DSEKAI_STATE::items_handle after being created in-world, typically through a SCRIPT attached to a TILEMAP.
Example copies of items available to create on a given TILEMAP are stored in that's tilemap's TILEMAP::item_defs.
uint8_t ITEM::data |
Qualitative value specific to each ITEM_TYPE_MASK.
Item | Data |
---|---|
Seed | Crop GID |
Food | HP+ |