|  | dsekai
    World engine for retrocomputers. | 
Definitions, functions, and macros pertaining to inventory objects. More...

Go to the source code of this file.
| Macros | |
| #define | ITEM_ERROR_INV_FULL -1 | 
| #define | ITEM_ERROR_DUPLICATE -2 | 
| #define | ITEM_ERROR_MISSING_TEMPLATE -3 | 
| #define | ITEM_ERROR_NOT_FOUND -4 | 
| #define | ITEM_TABLE(f) | 
| List of possible ITEM_TYPE_MASK values and their maximum stack sizes. | |
| #define | ITEM_USED_SUCCESSFUL -1 | 
| #define | ITEM_USED_FAILED 0 | 
| #define | ITEM_USED_SUCCESSFUL_SILENT 1 | 
| #define | item_break_if_last(items, i) | 
| #define | ITEM_TABLE_USE_CB_PROTOS(type, max) | 
| Macro to define ITEM_USE_CB prototypes from ITEM_TABLE. | |
| Typedefs | |
| typedef int8_t(* | ITEM_USE_CB) (int16_t e_idx, MOBILE_GID owner_gid, struct DSEKAI_STATE *state) | 
| Definition for a callback to execute when an ITEM is used. | |
| Functions | |
| int16_t | item_exists_in_inventory (int16_t template_gid, MOBILE_GID owner_gid, struct DSEKAI_STATE *state) SECTION_ITEM | 
| Determine if/where item with the given ITEM::gid exists in the inventory of an dsekai_items_owners. | |
| int16_t | item_decr_or_delete (int16_t e_idx, struct DSEKAI_STATE *state) SECTION_ITEM | 
| int16_t | item_stack_or_add (int16_t template_gid, MOBILE_GID owner_gid, struct DSEKAI_STATE *state) SECTION_ITEM | 
| Create an item in DSEKAI_STATE::items_handle from a template in TILEMAP::item_defs or increment its count if possible. | |
| int16_t | item_give_mobile (int16_t e_idx, MOBILE_GID owner_gid, struct DSEKAI_STATE *state) SECTION_ITEM | 
| int8_t | item_drop (int16_t e_idx, struct DSEKAI_STATE *state) SECTION_ITEM | 
| Drop am item on the map floor where its owner is standing. | |
| int16_t | item_pickup_xy (uint8_t x, uint8_t y, MOBILE_GID owner_gid, struct DSEKAI_STATE *state) SECTION_ITEM | 
| Pick up an item at the given x, y tile coordinates on the given TILEMAP. | |
| Variables | |
| RES_CONST uint8_t | gc_items_max [] | 
| Lookup table of maximum of each item type permitted in inventory. | |
| RES_CONST ITEM_USE_CB | gc_item_use_cbs [] | 
| Lookup table of callbacks to execute for item types. | |
| RES_CONST char * | gc_items_types [] | 
| Lookup table of text names for item types. | |
Definitions, functions, and macros pertaining to inventory objects.