37 void* (*Alloc) (
size_t size);
57 int tx,
int ty,
int* TU,
Item** icp);
77 return import->Alloc(size);
inventory_action_t
Possible inventory actions for moving items between containers.
bool tryAddToInventory(Inventory *const inv, const Item *const item, const invDef_t *container)
Tries to add an item to a container (in the inventory inv).
void destroyInventory(Inventory *const inv)
Destroys inventory.
int PackAmmoAndWeapon(character_t *const chr, const objDef_t *weapon, int missedPrimary, const equipDef_t *ed, int maxWeight)
Pack a weapon, possibly with some ammo.
void * alloc(size_t size)
inventory_action_t moveInInventory(Inventory *const inv, const invDef_t *from, Item *item, const invDef_t *to, int tx, int ty, int *TU, Item **icp)
Conditions for moving items between containers.
Defines all attributes of objects used in the inventory.
item instance data, with linked list capability
inventory definition with all its containers
struct inventoryImport_s inventoryImport_t
void EquipActor(character_t *const chr, const equipDef_t *ed, const objDef_t *weapon, int maxWeight)
The csi structure is the client-server-information structure which contains all the static data neede...
void initInventory(const char *name, const csi_t *csi, const inventoryImport_t *import)
Initializes the inventory definition by linking the ->next pointers properly.
void EquipActorNormal(character_t *const chr, const equipDef_t *ed, int maxWeight)
Fully equip one actor. The equipment that is added to the inventory of the given actor is taken from ...
Item * addInvList(Inventory *const inv, const invDef_t *container)
void EquipActorRobot(Inventory *const inv, const objDef_t *weapon)
Equip robot actor with default weapon. (defined in ugv_t->weapon)
const GLuint *typedef void(APIENTRY *GenRenderbuffersEXT_t)(GLsizei
Item * addToInventory(Inventory *const inv, const Item *const item, const invDef_t *container, int x, int y, int amount) __attribute__((warn_unused_result))
Add an item to a specified container in a given inventory.
void EquipActorMelee(Inventory *const inv, const teamDef_t *td)
Equip melee actor with item defined per teamDefs.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
inventory definition for our menus
float GetInventoryState(const Inventory *inventory, int &slowestFd)
Get the state of the given inventory: the items weight and the min TU needed to make full use of all ...
GLsizei const GLvoid * data
void emptyContainer(Inventory *const inv, const containerIndex_t container)
Clears the linked list of a container - removes all items from this container.
void destroyInventoryInterface(void)
bool removeFromInventory(Inventory *const inv, const invDef_t *container, Item *fItem) __attribute__((warn_unused_result))
void removeInvList(Item *invList)
int GetUsedSlots()
Calculate the number of used inventory slots.
Describes a character with all its attributes.