Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TerrainType::Weather Class Reference

#include <terraintype.h>

Inheritance diagram for TerrainType::Weather:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void paint (Surface &s, SPoint pos)
 displays the image on the screen coordinates x1/y1
const OverviewMapImagegetQuickView ()
 Weather (TerrainType *base)
 ~Weather ()
void runTextIO (PropertyContainer &pc)
void read (tnstream &stream)
void read (tnstream &stream, int version)
void write (tnstream &stream) const
int getMemoryFootprint () const

Public Attributes

Surface image
 the image of the field
int defensebonus
 the defense bonus for the unit standing on this field.
int attackbonus
 the attack bonus for the unit standing on this field.
int basicjamming
 the view obstraction of the field
TerrainType::MoveMalus move_malus
 the movement cost for the various units to move across this field
int bi_pict
 the image index from the graphic set. -1 if graphics is not from graphic set.
TerrainBits art
 the properties defining which unit can move onto this field and which not
TerrainTypeterraintype
 pointer to the outer structure

Constructor & Destructor Documentation

TerrainType::Weather::Weather TerrainType base  )  [inline]
 

Definition at line 128 of file terraintype.h.

TerrainType::Weather::~Weather  ) 
 

Definition at line 147 of file terraintype.cpp.


Member Function Documentation

int TerrainType::Weather::getMemoryFootprint  )  const
 

Definition at line 353 of file terraintype.cpp.

References OverviewMapImage::getMemoryFootprint(), Surface::getMemoryFootprint(), and image.

Referenced by TerrainType::getMemoryFootprint().

const OverviewMapImage * TerrainType::Weather::getQuickView  ) 
 

Definition at line 135 of file terraintype.cpp.

References bi_pict, and image.

void TerrainType::Weather::paint Surface s,
SPoint  pos
 

displays the image on the screen coordinates x1/y1

Definition at line 119 of file terraintype.cpp.

References bi_pict, image, megaBlitter(), and nullParam.

Referenced by MapRenderer::paintSingleField().

void TerrainType::Weather::read tnstream stream,
int  version
 

Definition at line 205 of file terraintype.cpp.

References art, attackbonus, basicjamming, bi_pict, defensebonus, image, minmalq, move_malus, Surface::read(), TerrainType::MoveMalus::read(), TerrainBits::read(), tnstream::readChar(), tnstream::readInt(), and tnstream::readWord().

void TerrainType::Weather::read tnstream stream  )  [virtual]
 

Implements LoadableItemType.

Definition at line 199 of file terraintype.cpp.

References terrain_version.

Referenced by TerrainType::read().

void TerrainType::Weather::runTextIO PropertyContainer pc  )  [virtual]
 

Implements LoadableItemType.

Definition at line 459 of file terraintype.cpp.

References art, attackbonus, basicjamming, bi_pict, cmovemalitypenum, cwettertypennum, defensebonus, extractFileName_withoutSuffix(), fatalError(), LoadableItemType::filename, graphicOperationNum, graphicOperations, TerrainType::id, image, minmalq, move_malus, snowify(), strrr(), terrainProperties, terrainPropertyNum, terraintype, TerrainType::weather, and weatherAbbrev.

Referenced by TerrainType::runTextIO().

void TerrainType::Weather::write tnstream stream  )  const [virtual]
 

Implements LoadableItemType.

Definition at line 258 of file terraintype.cpp.

References art, attackbonus, basicjamming, bi_pict, defensebonus, image, move_malus, Surface::write(), TerrainType::MoveMalus::write(), and TerrainBits::write().

Referenced by TerrainType::write().


Member Data Documentation

TerrainBits TerrainType::Weather::art
 

the properties defining which unit can move onto this field and which not

Definition at line 121 of file terraintype.h.

Referenced by GuiFunctions::PutAntiSubMine::available(), read(), runTextIO(), tfield::setparams(), and write().

int TerrainType::Weather::attackbonus
 

the attack bonus for the unit standing on this field.

See also:
AttackFormula::strength_attackbonus(int)

Definition at line 105 of file terraintype.h.

Referenced by tfield::getattackbonus(), read(), runTextIO(), and write().

int TerrainType::Weather::basicjamming
 

the view obstraction of the field

Definition at line 108 of file terraintype.h.

Referenced by tfield::getjamming(), read(), runTextIO(), and write().

int TerrainType::Weather::bi_pict
 

the image index from the graphic set. -1 if graphics is not from graphic set.

See also:
GraphicSet

Definition at line 118 of file terraintype.h.

Referenced by ForestCalculation::Smoothing::GetNeighbourMask(), getQuickView(), paint(), read(), runTextIO(), ForestCalculation::Smoothing::SmoothIt(), and write().

int TerrainType::Weather::defensebonus
 

the defense bonus for the unit standing on this field.

See also:
AttackFormula::defense_defensebonus(int)

Definition at line 102 of file terraintype.h.

Referenced by tfield::getdefensebonus(), read(), runTextIO(), and write().

Surface TerrainType::Weather::image
 

the image of the field

Definition at line 99 of file terraintype.h.

Referenced by getMemoryFootprint(), getQuickView(), paint(), read(), runTextIO(), and write().

TerrainType::MoveMalus TerrainType::Weather::move_malus
 

the movement cost for the various units to move across this field

Definition at line 111 of file terraintype.h.

Referenced by read(), runTextIO(), tfield::setparams(), and write().

TerrainType* TerrainType::Weather::terraintype
 

pointer to the outer structure

Definition at line 124 of file terraintype.h.

Referenced by DashboardPanel::eval(), tfield::getmovemalus(), tfield::getName(), SolarPowerplant::getPlus(), tfield::getweather(), SelectionHolder::pickup(), runTextIO(), tfield::setparams(), tfield::setweather(), transformMap(), viewterraininfo(), and tspfldloaders::writefields().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:21:26 2008 for Advanced Strategic Command by  doxygen 1.4.2