UFO: Alien Invasion
cl_inventory.h
Go to the documentation of this file.
1
6/*
7Copyright (C) 2002-2022 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
57 FILTER_ENSURE_32BIT = 0x7FFFFFFF
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.
Definition: cl_inventory.h:35
@ FILTER_S_ARMOUR
Definition: cl_inventory.h:41
@ FILTER_S_HEAVY
Definition: cl_inventory.h:39
@ FILTER_CRAFTITEM
Definition: cl_inventory.h:46
@ FILTER_S_PRIMARY
Definition: cl_inventory.h:37
@ MAX_SOLDIER_FILTERTYPES
Definition: cl_inventory.h:43
@ FILTER_AIRCRAFT
Definition: cl_inventory.h:50
@ FILTER_S_MISC
Definition: cl_inventory.h:40
@ FILTER_DUMMY
Definition: cl_inventory.h:51
@ FILTER_S_IMPLANT
Definition: cl_inventory.h:42
@ FILTER_S_SECONDARY
Definition: cl_inventory.h:38
@ FILTER_ENSURE_32BIT
Definition: cl_inventory.h:57
@ FILTER_DISASSEMBLY
Definition: cl_inventory.h:53
@ MAX_FILTERTYPES
Definition: cl_inventory.h:55
@ FILTER_UGVITEM
Definition: cl_inventory.h:47
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