ScummVM API documentation
MM::MM1::Treasure Class Reference

Public Member Functions

byte & operator[] (uint i)
 
void clear ()
 
void clear0 ()
 
bool present () const
 
bool hasItems () const
 
void synchronize (Common::Serializer &s)
 
uint16 getGold () const
 
void setGold (uint16 amount)
 
byte getGems () const
 
void setGems (byte amount)
 
byte removeItem ()
 

Public Attributes

byte & _trapType = _data[1]
 
byte & _container = _data[2]
 
byte *const _items = &_data[3]
 

Member Function Documentation

◆ clear()

void MM::MM1::Treasure::clear ( )

Clears the treasure list

◆ clear0()

void MM::MM1::Treasure::clear0 ( )

Clears everything except byte 0

◆ present()

bool MM::MM1::Treasure::present ( ) const

Returns true if any treasure has been assigned

◆ hasItems()

bool MM::MM1::Treasure::hasItems ( ) const

Returns true if any items are present

◆ synchronize()

void MM::MM1::Treasure::synchronize ( Common::Serializer s)

Synchronize savegame data

◆ getGold()

uint16 MM::MM1::Treasure::getGold ( ) const
inline

Return the gold value for the treasure

◆ setGold()

void MM::MM1::Treasure::setGold ( uint16  amount)
inline

Sets the gold value for the treasure

◆ getGems()

byte MM::MM1::Treasure::getGems ( ) const
inline

Return the gems amount

◆ setGems()

void MM::MM1::Treasure::setGems ( byte  amount)
inline

Set the gems amount

◆ removeItem()

byte MM::MM1::Treasure::removeItem ( )

Get any item, and remove it from the treasure


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