UFO: Alien Invasion
|
#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"
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_t * | currentDisplayedObject |
static int | itemIndex |
static int | fireModeIndex |
|
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().
Decreases the number of the firemode to display.
Definition at line 244 of file cl_inventory_callbacks.cpp.
References fireModeIndex, and INV_ItemDescription().
Referenced by INV_InitCallbacks().
Decreases the number of the firemode to display (for ammo) or the ammo to display (for weapon)
Definition at line 289 of file cl_inventory_callbacks.cpp.
References objDef_s::ammos, currentDisplayedObject, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_s::numAmmos, objDef_s::numWeapons, and objDef_s::weapons.
Referenced by INV_InitCallbacks().
Increases the number of the firemode to display.
Definition at line 230 of file cl_inventory_callbacks.cpp.
References fireModeIndex, and INV_ItemDescription().
Referenced by INV_InitCallbacks().
Increases the number of the weapon to display (for ammo) or the ammo to display (for weapon)
Definition at line 258 of file cl_inventory_callbacks.cpp.
References objDef_s::ammos, currentDisplayedObject, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_s::numAmmos, objDef_s::numWeapons, and objDef_s::weapons.
Referenced by INV_InitCallbacks().
Definition at line 407 of file cl_inventory_callbacks.cpp.
References Cmd_AddCommand(), INV_DecreaseFiremode_f(), INV_DecreaseItem_f(), INV_IncreaseFiremode_f(), INV_IncreaseItem_f(), INV_UpdateActorLoad_f(), and INV_UpdateObject_f().
Referenced by INV_InitStartup().
Prints the description for items (weapons, armour, ...)
[in] | od | The object definition of the item |
od->isDummy
here somewhere? Definition at line 67 of file cl_inventory_callbacks.cpp.
References _, objDef_s::ammo, objDef_s::ammos, CL_WeaponSkillToName(), Com_sprintf(), count, csi, Cvar_ForceSet(), Cvar_Set(), fireDef_s::damage, csi_s::dts, itemEffect_s::duration, objDef_s::fd, fireModeIndex, objDef_s::fireTwoHanded, GAME_ItemIsUseable(), i, objDef_s::id, damageType_s::id, objDef_s::implant, objDef_s::isAmmo(), objDef_s::isArmour(), itemEffect_s::isPermanent, itemIndex, fireDef_s::name, objDef_s::name, objDef_s::numAmmos, csi_s::numDTs, objDef_s::numFiredefs, objDef_s::numWeapons, itemEffect_s::period, objDef_s::price, Q_strcat(), fireDef_s::range, objDef_s::ratings, fireDef_s::shots, damageType_s::showInMenu, objDef_s::size, fireDef_s::spldmg, fireDef_s::spread, objDef_s::strengthenEffect, TEXT_ITEMDESCRIPTION, fireDef_s::time, UI_ExecuteConfunc(), UI_MAX_SMALLTEXTLEN, UI_RegisterText(), UI_ResetData(), UNIT_SIZE, objDef_s::weapon, objDef_s::weapons, fireDef_s::weaponSkill, objDef_s::weight, and WEIGHT_FACTOR.
Referenced by GAME_GetImportData(), INV_DecreaseFiremode_f(), INV_DecreaseItem_f(), INV_IncreaseFiremode_f(), INV_IncreaseItem_f(), and INV_UpdateObject_f().
Update the equipment weight for the selected actor.
Definition at line 355 of file cl_inventory_callbacks.cpp.
References _, Container::_invList, ABILITY_SPEED, Cmd_Argc(), Cmd_Argv(), Com_Printf(), Com_sprintf(), count, Container::def(), f, GAME_GetChrMaxLoad(), GAME_GetSelectedChr(), GET_ENCUMBRANCE_PENALTY, GET_TU, Inventory::getNextCont(), Inventory::getWeight(), i, character_s::inv, MAX_FIREDEFS_PER_WEAPON, MAX_VAR, name, popupText, Q_strcat(), character_s::score, chrScoreGlobal_s::skills, invDef_s::temp, fireDef_s::time, UI_ExecuteConfunc(), UI_Popup(), WEIGHT_FACTOR, and WEIGHT_NORMAL_PENALTY.
Referenced by INV_InitCallbacks().
Update the GUI with the selected item.
Definition at line 319 of file cl_inventory_callbacks.cpp.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), csi, Cvar_FindVar(), Cvar_SetValue(), cvar_s::integer, INV_GetFilterFromItem(), INV_ItemDescription(), INVSH_GetItemByIDX(), csi_s::numODs, and UI_ExecuteConfunc().
Referenced by INV_InitCallbacks().
|
static |
Definition at line 33 of file cl_inventory_callbacks.cpp.
Referenced by INV_DecreaseItem_f(), and INV_IncreaseItem_f().
|
static |
Definition at line 35 of file cl_inventory_callbacks.cpp.
Referenced by INV_DecreaseFiremode_f(), INV_IncreaseFiremode_f(), and INV_ItemDescription().
|
static |
Definition at line 34 of file cl_inventory_callbacks.cpp.
Referenced by INV_DecreaseItem_f(), INV_IncreaseItem_f(), and INV_ItemDescription().