UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_inventory.h
Go to the documentation of this file.
1 
6 /*
7 Copyright (C) 2002-2020 UFO: Alien Invasion.
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24 */
25 
26 #pragma once
27 
35 typedef 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 
57  FILTER_ENSURE_32BIT = 0x7FFFFFFF
59 
60 bool INV_MoveItem(Inventory* inv, const invDef_t* toContainer, int px, int py, const invDef_t* fromContainer, Item* fItem, Item** tItem);
61 bool INV_LoadWeapon(const Item* weapon, Inventory* inv, const invDef_t* srcContainer, const invDef_t* destContainer);
62 bool INV_UnloadWeapon(Item* weapon, Inventory* inv, const invDef_t* container);
64 void INV_InitStartup(void);
66 const char* INV_GetFilterType(itemFilterTypes_t id);
67 itemFilterTypes_t INV_GetFilterTypeID(const char* filterTypeID);
68 bool INV_ItemMatchesFilter(const objDef_t* obj, const itemFilterTypes_t filterType);
69 Item* INV_SearchInInventoryWithFilter(const Inventory* const i, const invDef_t* container, const objDef_t* item, const itemFilterTypes_t filterType) __attribute__((nonnull(1)));
70 void INV_ItemDescription(const objDef_t* od);
itemFilterTypes_t INV_GetFilterTypeID(const char *filterTypeID)
Searches for a filter type name (as used in console functions) and returns the matching itemFilterTyp...
const equipDef_t * INV_GetEquipmentDefinitionByID(const char *name)
Gets equipment definition by id.
void INV_InitStartup(void)
itemFilterTypes_t
A list of filter types in the market and production view.
Definition: cl_inventory.h:35
const char * INV_GetFilterType(itemFilterTypes_t id)
Defines all attributes of objects used in the inventory.
Definition: inv_shared.h:264
#define __attribute__(x)
Definition: cxx.h:37
itemFilterTypes_t INV_GetFilterFromItem(const objDef_t *obj)
item instance data, with linked list capability
Definition: inv_shared.h:402
inventory definition with all its containers
Definition: inv_shared.h:525
void INV_ItemDescription(const objDef_t *od)
Prints the description for items (weapons, armour, ...)
bool INV_ItemMatchesFilter(const objDef_t *obj, const itemFilterTypes_t filterType)
Checks if the given object/item matched the given filter type.
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.
bool INV_LoadWeapon(const Item *weapon, Inventory *inv, const invDef_t *srcContainer, const invDef_t *destContainer)
Load a weapon with ammo.
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...
QGL_EXTERN GLint i
Definition: r_gl.h:113
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition: r_gl.h:110
bool INV_UnloadWeapon(Item *weapon, Inventory *inv, const invDef_t *container)
Unload a weapon and put the ammo in a container.
inventory definition for our menus
Definition: inv_shared.h:371