Object Class Reference

an instance of an object type (ObjectType) on the map More...

#include <objects.h>

Inheritance diagram for Object:

Inheritance graph
[legend]
List of all members.

Public Member Functions

const ObjectTypegetType () const
 Object ()
 Object (const ObjectType *o)
void display (Surface &surface, const SPoint &pos, int weather=0) const
const OverviewMapImagegetOverviewMapImage (int weather)
void setDir (int dir)
int getDir () const
void write (tnstream &stream)
void read (tnstream &stream)

Public Attributes

const ObjectTypetyp
int damage
int dir
int remainingGrowthTime

Detailed Description

an instance of an object type (ObjectType) on the map

Definition at line 46 of file objects.h.


Constructor & Destructor Documentation

Object::Object (  ) 

Definition at line 81 of file objects.cpp.

References damage, dir, remainingGrowthTime, and typ.

Object::Object ( const ObjectType o  ) 

Definition at line 89 of file objects.cpp.

References damage, dir, ObjectType::growthDuration, ObjectType::lifetime, AgeableItem::lifetimer, remainingGrowthTime, and typ.


Member Function Documentation

const ObjectType* Object::getType (  )  const [inline]

Definition at line 49 of file objects.h.

References typ.

void Object::display ( Surface surface,
const SPoint pos,
int  weather = 0 
) const

Definition at line 109 of file objects.cpp.

References dir, ObjectType::display(), and typ.

const OverviewMapImage * Object::getOverviewMapImage ( int  weather  ) 

Definition at line 114 of file objects.cpp.

References dir, ObjectType::getOverviewMapImage(), and typ.

void Object::setDir ( int  dir  ) 

Definition at line 99 of file objects.cpp.

References dir.

Referenced by calculateobject().

int Object::getDir (  )  const

Definition at line 104 of file objects.cpp.

References dir.

void Object::write ( tnstream stream  ) 

Definition at line 121 of file objects.cpp.

References damage, dir, AgeableItem::lifetimer, objectVersion, remainingGrowthTime, and tnstream::writeInt().

Referenced by RemoveObject::runAction().

void Object::read ( tnstream stream  ) 

Definition at line 130 of file objects.cpp.

References damage, dir, AgeableItem::lifetimer, objectVersion, tnstream::readInt(), and remainingGrowthTime.

Referenced by RemoveObject::undoAction().


Member Data Documentation

const ObjectType* Object::typ

Definition at line 48 of file objects.h.

Referenced by ChangeObjectProperty::ChangeObjectProperty(), compareObjectHeight(), display(), ForestCalculation::Smoothing::GetNeighbourMask(), getOverviewMapImage(), getType(), Object(), tspfldloaders::readfields(), tunitattacksobject::setresult(), and GetTargetImage::visit().

int Object::damage

Definition at line 49 of file objects.h.

Referenced by Object(), read(), tspfldloaders::readfields(), and write().

int Object::dir

Definition at line 51 of file objects.h.

Referenced by MapField::addobject(), ForestCalculation::calculateforest(), display(), getDir(), ForestCalculation::Smoothing::GetNeighbourMask(), getOverviewMapImage(), Object(), read(), tspfldloaders::readfields(), SpawnObject::runAction(), setDir(), SpawnObject::undoAction(), and write().

int Object::remainingGrowthTime

Definition at line 52 of file objects.h.

Referenced by Object(), read(), tspfldloaders::readfields(), and write().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 01:47:59 2012 for Advanced Strategic Command by  doxygen 1.5.1