ScummVM API documentation
MADS::InventoryObjects Class Reference
Inheritance diagram for MADS::InventoryObjects:
Common::Array< InventoryObject >

Public Member Functions

 InventoryObjects (MADSEngine *vm)
 
void load ()
 
void synchronize (Common::Serializer &s)
 
InventoryObjectgetItem (int itemIndex)
 
void setRoom (int objectId, int sceneNumber)
 
bool isInRoom (int objectId) const
 
bool isInInventory (int objectId) const
 
void addToInventory (int objectId)
 
void removeFromInventory (int objectId, int newScene)
 
int getIdFromDesc (int objectId)
 
- Public Member Functions inherited from Common::Array< InventoryObject >
 Array (size_type count)
 
 Array (size_type count, const InventoryObject &value)
 
 Array (const Array< InventoryObject > &array)
 
 Array (Array< InventoryObject > &&old)
 
 Array (std::initializer_list< InventoryObject > list)
 
 Array (const T2 *array, size_type n)
 
void emplace (const_iterator pos, TArgs &&... args)
 
void emplace_back (TArgs &&...args)
 
void push_back (const InventoryObject &element)
 
void push_back (InventoryObject &&element)
 
void push_back (const Array< InventoryObject > &array)
 
void pop_back ()
 
const InventoryObject * data () const
 
InventoryObject * data ()
 
InventoryObject & front ()
 
const InventoryObject & front () const
 
InventoryObject & back ()
 
const InventoryObject & back () const
 
void insert_at (size_type idx, const InventoryObject &element)
 
void insert_at (size_type idx, const Array< InventoryObject > &array)
 
void insert (iterator pos, const InventoryObject &element)
 
InventoryObject remove_at (size_type idx)
 
InventoryObject & operator[] (size_type idx)
 
const InventoryObject & operator[] (size_type idx) const
 
Array< InventoryObject > & operator= (const Array< InventoryObject > &array)
 
Arrayoperator= (Array< InventoryObject > &&old)
 
size_type size () const
 
void clear ()
 
iterator erase (iterator pos)
 
iterator erase (iterator first, iterator last)
 
bool empty () const
 
bool operator== (const Array< InventoryObject > &other) const
 
bool operator!= (const Array< InventoryObject > &other) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void reserve (size_type newCapacity)
 
void resize (size_type newSize)
 
void resize (size_type newSize, const InventoryObject value)
 
void assign (const_iterator first, const_iterator last)
 
void swap (Array &arr)
 

Public Attributes

SynchronizedList _inventoryList
 

Additional Inherited Members

- Public Types inherited from Common::Array< InventoryObject >
typedef InventoryObject * iterator
 
typedef const InventoryObject * const_iterator
 
typedef InventoryObject value_type
 
typedef uint size_type
 
- Protected Member Functions inherited from Common::Array< InventoryObject >
void allocCapacity (size_type capacity)
 
void freeStorage (InventoryObject *storage, const size_type elements)
 
iterator insert_aux (iterator pos, const_iterator first, const_iterator last)
 
- Static Protected Member Functions inherited from Common::Array< InventoryObject >
static size_type roundUpCapacity (size_type capacity)
 
- Protected Attributes inherited from Common::Array< InventoryObject >
size_type _capacity
 
size_type _size
 
InventoryObject * _storage
 

Constructor & Destructor Documentation

◆ InventoryObjects()

MADS::InventoryObjects::InventoryObjects ( MADSEngine vm)
inline

Constructor

Member Function Documentation

◆ load()

void MADS::InventoryObjects::load ( )

Loads the game's object list

◆ synchronize()

void MADS::InventoryObjects::synchronize ( Common::Serializer s)

Synchronize the objects list in a savegame

◆ getItem()

InventoryObject& MADS::InventoryObjects::getItem ( int  itemIndex)
inline

Returns the inventory item from the player's inventory

◆ setRoom()

void MADS::InventoryObjects::setRoom ( int  objectId,
int  sceneNumber 
)

Sets an item's scene number

◆ isInRoom()

bool MADS::InventoryObjects::isInRoom ( int  objectId) const

Returns true if a given object is in the player's current scene

◆ isInInventory()

bool MADS::InventoryObjects::isInInventory ( int  objectId) const

Returns true if a given object is in the player's inventory

◆ addToInventory()

void MADS::InventoryObjects::addToInventory ( int  objectId)

Removes the specified object from the player's inventory

◆ removeFromInventory()

void MADS::InventoryObjects::removeFromInventory ( int  objectId,
int  newScene 
)

Removes the specified object to the player's inventory

Parameters
objectIdObject to remove
newSceneSpecifies the new scene to set the item to

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