doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
idInventory Class Reference

#include <Player.h>

Public Member Functions

 idInventory ()
 
 ~idInventory ()
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
void Clear (void)
 
void GivePowerUp (idPlayer *player, int powerup, int msec)
 
void ClearPowerUps (void)
 
void GetPersistantData (idDict &dict)
 
void RestoreInventory (idPlayer *owner, const idDict &dict)
 
bool Give (idPlayer *owner, const idDict &spawnArgs, const char *statname, const char *value, int *idealWeapon, bool updateHud)
 
void Drop (const idDict &spawnArgs, const char *weapon_classname, int weapon_index)
 
ammo_t AmmoIndexForAmmoClass (const char *ammo_classname) const
 
int MaxAmmoForAmmoClass (idPlayer *owner, const char *ammo_classname) const
 
int WeaponIndexForAmmoClass (const idDict &spawnArgs, const char *ammo_classname) const
 
ammo_t AmmoIndexForWeaponClass (const char *weapon_classname, int *ammoRequired)
 
const char * AmmoPickupNameForIndex (ammo_t ammonum) const
 
void AddPickupName (const char *name, const char *icon, idPlayer *owner)
 
int HasAmmo (ammo_t type, int amount)
 
bool UseAmmo (ammo_t type, int amount)
 
int HasAmmo (const char *weapon_classname, bool includeClip=false, idPlayer *owner=NULL)
 
void UpdateArmor (void)
 

Public Attributes

int maxHealth
 
int weapons
 
int powerups
 
int armor
 
int maxarmor
 
int ammo [AMMO_NUMTYPES]
 
int clip [MAX_WEAPONS]
 
int powerupEndTime [MAX_POWERUPS]
 
int ammoPredictTime
 
int deplete_armor
 
float deplete_rate
 
int deplete_ammount
 
int nextArmorDepleteTime
 
int pdasViewed [4]
 
int selPDA
 
int selEMail
 
int selVideo
 
int selAudio
 
bool pdaOpened
 
bool turkeyScore
 
idList< idDict * > items
 
idStrList pdas
 
idStrList pdaSecurity
 
idStrList videos
 
idStrList emails
 
bool ammoPulse
 
bool weaponPulse
 
bool armorPulse
 
int lastGiveTime
 
idList< idLevelTriggerInfolevelTriggers
 
int nextItemPickup
 
int nextItemNum
 
int onePickupTime
 
idList< idItemInfopickupItemNames
 
idList< idObjectiveInfoobjectiveNames
 

Detailed Description

Definition at line 137 of file Player.h.

Constructor & Destructor Documentation

idInventory::idInventory ( )
inline

Definition at line 181 of file Player.h.

idInventory::~idInventory ( )
inline

Definition at line 182 of file Player.h.

Member Function Documentation

void idInventory::AddPickupName ( const char *  name,
const char *  icon,
idPlayer owner 
)

Definition at line 776 of file Player.cpp.

ammo_t idInventory::AmmoIndexForAmmoClass ( const char *  ammo_classname) const

Definition at line 707 of file Player.cpp.

ammo_t idInventory::AmmoIndexForWeaponClass ( const char *  weapon_classname,
int ammoRequired 
)

Definition at line 759 of file Player.cpp.

const char * idInventory::AmmoPickupNameForIndex ( ammo_t  ammonum) const

Definition at line 725 of file Player.cpp.

void idInventory::Clear ( void  )

Definition at line 155 of file Player.cpp.

void idInventory::ClearPowerUps ( void  )

Definition at line 245 of file Player.cpp.

void idInventory::Drop ( const idDict spawnArgs,
const char *  weapon_classname,
int  weapon_index 
)
void idInventory::GetPersistantData ( idDict dict)

Definition at line 258 of file Player.cpp.

bool idInventory::Give ( idPlayer owner,
const idDict spawnArgs,
const char *  statname,
const char *  value,
int idealWeapon,
bool  updateHud 
)
void idInventory::GivePowerUp ( idPlayer player,
int  powerup,
int  msec 
)

Definition at line 207 of file Player.cpp.

int idInventory::HasAmmo ( ammo_t  type,
int  amount 
)
int idInventory::HasAmmo ( const char *  weapon_classname,
bool  includeClip = false,
idPlayer owner = NULL 
)
int idInventory::MaxAmmoForAmmoClass ( idPlayer owner,
const char *  ammo_classname 
) const

Definition at line 716 of file Player.cpp.

void idInventory::Restore ( idRestoreGame savefile)

Definition at line 576 of file Player.cpp.

void idInventory::RestoreInventory ( idPlayer owner,
const idDict dict 
)

Definition at line 354 of file Player.cpp.

void idInventory::Save ( idSaveGame savefile) const

Definition at line 472 of file Player.cpp.

void idInventory::UpdateArmor ( void  )
bool idInventory::UseAmmo ( ammo_t  type,
int  amount 
)
int idInventory::WeaponIndexForAmmoClass ( const idDict spawnArgs,
const char *  ammo_classname 
) const

Definition at line 735 of file Player.cpp.

Member Data Documentation

int idInventory::ammo[AMMO_NUMTYPES]

Definition at line 144 of file Player.h.

int idInventory::ammoPredictTime

Definition at line 153 of file Player.h.

bool idInventory::ammoPulse

Definition at line 174 of file Player.h.

int idInventory::armor

Definition at line 142 of file Player.h.

bool idInventory::armorPulse

Definition at line 176 of file Player.h.

int idInventory::clip[MAX_WEAPONS]

Definition at line 145 of file Player.h.

int idInventory::deplete_ammount

Definition at line 157 of file Player.h.

int idInventory::deplete_armor

Definition at line 155 of file Player.h.

float idInventory::deplete_rate

Definition at line 156 of file Player.h.

idStrList idInventory::emails

Definition at line 172 of file Player.h.

idList<idDict *> idInventory::items

Definition at line 168 of file Player.h.

int idInventory::lastGiveTime

Definition at line 177 of file Player.h.

idList<idLevelTriggerInfo> idInventory::levelTriggers

Definition at line 179 of file Player.h.

int idInventory::maxarmor

Definition at line 143 of file Player.h.

int idInventory::maxHealth

Definition at line 139 of file Player.h.

int idInventory::nextArmorDepleteTime

Definition at line 158 of file Player.h.

int idInventory::nextItemNum

Definition at line 213 of file Player.h.

int idInventory::nextItemPickup

Definition at line 212 of file Player.h.

idList<idObjectiveInfo> idInventory::objectiveNames

Definition at line 216 of file Player.h.

int idInventory::onePickupTime

Definition at line 214 of file Player.h.

bool idInventory::pdaOpened

Definition at line 166 of file Player.h.

idStrList idInventory::pdas

Definition at line 169 of file Player.h.

idStrList idInventory::pdaSecurity

Definition at line 170 of file Player.h.

int idInventory::pdasViewed[4]

Definition at line 160 of file Player.h.

idList<idItemInfo> idInventory::pickupItemNames

Definition at line 215 of file Player.h.

int idInventory::powerupEndTime[MAX_POWERUPS]

Definition at line 146 of file Player.h.

int idInventory::powerups

Definition at line 141 of file Player.h.

int idInventory::selAudio

Definition at line 165 of file Player.h.

int idInventory::selEMail

Definition at line 163 of file Player.h.

int idInventory::selPDA

Definition at line 162 of file Player.h.

int idInventory::selVideo

Definition at line 164 of file Player.h.

bool idInventory::turkeyScore

Definition at line 167 of file Player.h.

idStrList idInventory::videos

Definition at line 171 of file Player.h.

bool idInventory::weaponPulse

Definition at line 175 of file Player.h.

int idInventory::weapons

Definition at line 140 of file Player.h.


The documentation for this class was generated from the following files: