UFO: Alien Invasion
cl_inventory_callbacks.cpp File Reference
#include "cl_inventory_callbacks.h"
#include "cl_shared.h"
#include "cl_inventory.h"
#include "ui/ui_main.h"
#include "ui/ui_nodes.h"
#include "cgame/cl_game.h"
#include "ui/ui_popup.h"
Include dependency graph for cl_inventory_callbacks.cpp:

Go to the source code of this file.

Functions

static const char * CL_WeaponSkillToName (int weaponSkill)
 Translate a weaponSkill integer to a translated string. More...
 
void INV_ItemDescription (const objDef_t *od)
 Prints the description for items (weapons, armour, ...) More...
 
static void INV_IncreaseFiremode_f (void)
 Increases the number of the firemode to display. More...
 
static void INV_DecreaseFiremode_f (void)
 Decreases the number of the firemode to display. More...
 
static void INV_IncreaseItem_f (void)
 Increases the number of the weapon to display (for ammo) or the ammo to display (for weapon) More...
 
static void INV_DecreaseItem_f (void)
 Decreases the number of the firemode to display (for ammo) or the ammo to display (for weapon) More...
 
static void INV_UpdateObject_f (void)
 Update the GUI with the selected item. More...
 
static void INV_UpdateActorLoad_f (void)
 Update the equipment weight for the selected actor. More...
 
void INV_InitCallbacks (void)
 

Variables

static const objDef_tcurrentDisplayedObject
 
static int itemIndex
 
static int fireModeIndex
 

Function Documentation

◆ CL_WeaponSkillToName()

static const char * CL_WeaponSkillToName ( int  weaponSkill)
static

Translate a weaponSkill integer to a translated string.

Definition at line 40 of file cl_inventory_callbacks.cpp.

References _, SKILL_ASSAULT, SKILL_CLOSE, SKILL_EXPLOSIVE, SKILL_HEAVY, and SKILL_SNIPER.

Referenced by INV_ItemDescription().

◆ INV_DecreaseFiremode_f()

static void INV_DecreaseFiremode_f ( void  )
static

Decreases the number of the firemode to display.

See also
UP_ItemDescription

Definition at line 244 of file cl_inventory_callbacks.cpp.

References currentDisplayedObject, fireModeIndex, and INV_ItemDescription().

Referenced by INV_InitCallbacks().

◆ INV_DecreaseItem_f()

static void INV_DecreaseItem_f ( void  )
static

Decreases the number of the firemode to display (for ammo) or the ammo to display (for weapon)

See also
UP_ItemDescription

Definition at line 289 of file cl_inventory_callbacks.cpp.

References objDef_t::ammos, currentDisplayedObject, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_t::numAmmos, objDef_t::numWeapons, and objDef_t::weapons.

Referenced by INV_InitCallbacks().

◆ INV_IncreaseFiremode_f()

static void INV_IncreaseFiremode_f ( void  )
static

Increases the number of the firemode to display.

See also
UP_ItemDescription

Definition at line 230 of file cl_inventory_callbacks.cpp.

References currentDisplayedObject, fireModeIndex, and INV_ItemDescription().

Referenced by INV_InitCallbacks().

◆ INV_IncreaseItem_f()

static void INV_IncreaseItem_f ( void  )
static

Increases the number of the weapon to display (for ammo) or the ammo to display (for weapon)

See also
UP_ItemDescription

Definition at line 258 of file cl_inventory_callbacks.cpp.

References objDef_t::ammos, currentDisplayedObject, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_t::numAmmos, objDef_t::numWeapons, and objDef_t::weapons.

Referenced by INV_InitCallbacks().

◆ INV_InitCallbacks()

◆ INV_ItemDescription()

void INV_ItemDescription ( const objDef_t od)

◆ INV_UpdateActorLoad_f()

◆ INV_UpdateObject_f()

static void INV_UpdateObject_f ( void  )
static

Variable Documentation

◆ currentDisplayedObject

const objDef_t* currentDisplayedObject
static

◆ fireModeIndex

◆ itemIndex

int itemIndex
static