UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_inventory.h
Go to the documentation of this file.
1
5
6/*
7Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24*/
25
26#pragma once
27
35typedef enum {
36 /* All types starting with "FILTER_S_" contain items that can be used on/with soldiers (i.e. personal equipment). */
44
45 /* Non-soldier items */
54
56
59
60bool INV_MoveItem(Inventory* inv, const invDef_t* toContainer, int px, int py, const invDef_t* fromContainer, Item* fItem, Item** tItem);
61bool INV_LoadWeapon(const Item* weapon, Inventory* inv, const invDef_t* srcContainer, const invDef_t* destContainer);
62bool INV_UnloadWeapon(Item* weapon, Inventory* inv, const invDef_t* container);
64void INV_InitStartup(void);
67itemFilterTypes_t INV_GetFilterTypeID(const char* filterTypeID);
68bool INV_ItemMatchesFilter(const objDef_t* obj, const itemFilterTypes_t filterType);
69Item* INV_SearchInInventoryWithFilter(const Inventory* const i, const invDef_t* container, const objDef_t* item, const itemFilterTypes_t filterType) __attribute__((nonnull(1)));
70void INV_ItemDescription(const objDef_t* od);
bool INV_LoadWeapon(const Item *weapon, Inventory *inv, const invDef_t *srcContainer, const invDef_t *destContainer)
Load a weapon with ammo.
itemFilterTypes_t INV_GetFilterFromItem(const objDef_t *obj)
void INV_InitStartup(void)
itemFilterTypes_t INV_GetFilterTypeID(const char *filterTypeID)
Searches for a filter type name (as used in console functions) and returns the matching itemFilterTyp...
bool INV_MoveItem(Inventory *inv, const invDef_t *toContainer, int px, int py, const invDef_t *fromContainer, Item *fItem, Item **tItem)
Move item between containers.
void INV_ItemDescription(const objDef_t *od)
Prints the description for items (weapons, armour, ...).
const equipDef_t * INV_GetEquipmentDefinitionByID(const char *name)
Gets equipment definition by id.
bool INV_UnloadWeapon(Item *weapon, Inventory *inv, const invDef_t *container)
Unload a weapon and put the ammo in a container.
const char * INV_GetFilterType(itemFilterTypes_t id)
Item * INV_SearchInInventoryWithFilter(const Inventory *const i, const invDef_t *container, const objDef_t *item, const itemFilterTypes_t filterType) __attribute__((nonnull(1)))
Searches if there is an item at location (x/y) in a scrollable container. You can also provide an ite...
itemFilterTypes_t
A list of filter types in the market and production view.
@ FILTER_S_ARMOUR
@ FILTER_S_HEAVY
@ FILTER_CRAFTITEM
@ FILTER_S_PRIMARY
@ MAX_SOLDIER_FILTERTYPES
@ FILTER_AIRCRAFT
@ FILTER_S_MISC
@ FILTER_DUMMY
@ FILTER_S_IMPLANT
@ FILTER_S_SECONDARY
@ FILTER_ENSURE_32BIT
@ FILTER_DISASSEMBLY
@ MAX_FILTERTYPES
@ FILTER_UGVITEM
bool INV_ItemMatchesFilter(const objDef_t *obj, const itemFilterTypes_t filterType)
Checks if the given object/item matched the given filter type.
inventory definition with all its containers
Definition inv_shared.h:525
item instance data, with linked list capability
Definition inv_shared.h:402
#define __attribute__(x)
Definition cxx.h:37
QGL_EXTERN GLint i
Definition r_gl.h:113
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition r_gl.h:110
inventory definition for our menus
Definition inv_shared.h:371
Defines all attributes of objects used in the inventory.
Definition inv_shared.h:264