#include <objecttype.h>
Inheritance diagram for ObjectType:

Public Types | |
| enum | NamingMethod { ReplaceTerrain, AddToTerrain, UnNamed } |
| enum | NetBehaviour { NetToBuildings = 1, NetToBuildingEntry = 2, NetToSelf = 4, NetToBorder = 8, SpecialForest = 0x10, AutoBorder = 0x20, KeepOrientation = 0x40 } |
Public Member Functions | |
| const FieldModification & | getFieldModification (int weather) const |
| ASCString | getName () const |
| int | getID () const |
| ObjectType (void) | |
| const OverviewMapImage * | getOverviewMapImage (int picnum, int weather) const |
| void | display (Surface &surface, const SPoint &pos) const |
| displays the objecttype at x/y on the screen | |
| void | display (Surface &surface, const SPoint &pos, int dir, int weather=0) const |
| const Surface & | getPicture (int i=0, int weather=0) const |
| returns the pointer to the image i | |
| bool | buildable (tfield *fld) const |
| can the object be build on the field fld | |
| void | read (tnstream &stream) |
| reads the objecttype from a stream | |
| void | write (tnstream &stream) const |
| write the objecttype from a stream | |
| void | runTextIO (PropertyContainer &pc) |
| reads or writes the objecttype to the text stream pc | |
| int | getEffectiveHeight () const |
| returns the level of height of this object in the normal 8 level scheme of asc (deep submerged, submerged, ... ) | |
| int | getMemoryFootprint () const |
Public Attributes | |
| int | id |
| the id of the object, used when referencing objects in files | |
| vector< int > | secondaryIDs |
| when loading a file and these IDs are encountered, this object will be used. | |
| int | groupID |
| the group ID allows units to specify whole groups of objects to be buildable / removable without specifying each individual object. | |
| BitSet | weather |
| bitmapped variable containing the different weather types the objects exist for | |
| bool | visibleago |
| is the object displayed under fog of war | |
| vector< IntRange > | linkableObjects |
| some objects are graphically linked with others on neighbouring fields. | |
| vector< IntRange > | linkableTerrain |
| objects can be graphically linked to terrain, as if the terrain was an object of the same type. | |
| int | armor |
| if an object should not be attackable, set armor to 0 | |
| ObjectType::FieldModification | fieldModification [cwettertypennum] |
| int | attackbonus_plus |
| this is added to the current attackbonus of the field to form the new attackbonus. | |
| int | attackbonus_abs |
| The attackbonus_abs replaces the current attackbonus of the field by a new one. A value of -1 won't affect the attackbonus of the field. | |
| int | defensebonus_plus |
| this is added to the current defensebonus of the field to form the new defensebonus. | |
| int | defensebonus_abs |
| The defensebonus_abs replaces the current defensebonus of the field by a new one. A value of -1 won't affect the attackbonus of the field. | |
| int | basicjamming_plus |
| this is added to the current basicjamming of the field to form the new jamming. | |
| int | basicjamming_abs |
| basicjamming_abs replaces the current basicjamming of the field by a new one. A value < 0 won't affect the jamming of the field | |
| int | viewbonus_plus |
| units standing on this object will get a bonus to their view | |
| int | viewbonus_abs |
| units standing on this object will get a bonus to their view | |
| int | imageHeight |
| the level of height the object is on. This is not the simple system of 8 levels used for units and building, but one with 255 levels to allow a fine grained specification of the order in which different objects are painted | |
| int | physicalHeight |
| the 'real' height of the object, which evaluated for construction and attack. The destinction between imageHeight and physicalHeight was made because of compatibility reasons | |
| Resources | buildcost |
| The resources required to construct the object with a unit; Note that units usually don't have any energy available. | |
| Resources | removecost |
| The resources required to remove the object with a unit; Note that units usually don't have any energy available. | |
| int | build_movecost |
| The movement points that are needed to build this object. | |
| int | remove_movecost |
| The movement points that are needed to remove this object. | |
| bool | canExistBeneathBuildings |
| if a building is constructed on the field containing the object, will the object be removed or will it stay beneath the building. | |
| ASCString | name |
| The name of the object. | |
| int | namingMethod |
| int | netBehaviour |
| specifies how the object is going to connect to other things | |
| TechAdapterDependency | techDependency |
| ObjectType::WeatherPicture | cwettertypennum |
| the images of the objects | |
| int | displayMethod |
| some objects require special displaying methods, for example shading the terrain they are build on | |
| double | growthRate |
| the probability that an object of this type spawns another object on a neighbouring field | |
| bool | growOnUnits |
| is the object growth stopped by units and buildings | |
| int | lifetime |
| the object is removed when it is lifetime turns old. -1 disables removal | |
| int | growthDuration |
| the time after which any growth stops. | |
Static Public Attributes | |
| static const char * | namingMethodNames [] = { "ReplaceTerrain", "AddToTerrain", "UnNamed", NULL } |
| static const int | namingMethodNum = 3 |
| static const int | netBehaviourNum = 7 |
Protected Member Functions | |
| int | getWeather (int weather) const |
Classes | |
| struct | FieldModification |
| struct | WeatherPicture |
| the images of the objects More... | |
Definition at line 30 of file objecttype.h.
|
|
Definition at line 127 of file objecttype.h. |
|
|
Definition at line 136 of file objecttype.h. |
|
|
Definition at line 47 of file objecttype.cpp. References AddToTerrain, canExistBeneathBuildings, displayMethod, groupID, growOnUnits, growthDuration, growthRate, imageHeight, lifetime, namingMethod, netBehaviour, physicalHeight, viewbonus_abs, and viewbonus_plus. |
|
|
can the object be build on the field fld
Definition at line 77 of file objecttype.cpp. References TerrainAccess::accessible(), tfield::bdt, tfield::building, getFieldModification(), tfield::getweather(), growOnUnits, and ObjectType::FieldModification::terrainaccess. |
|
||||||||||||||||||||
|
Definition at line 166 of file objecttype.cpp. References getWeather(). |
|
||||||||||||
|
displays the objecttype at x/y on the screen
Definition at line 284 of file objecttype.cpp. Referenced by Object::display(), ObjectItem::display(), and PipeLayer::paintSingleField(). |
|
|
returns the level of height of this object in the normal 8 level scheme of asc (deep submerged, submerged, ... )
Definition at line 90 of file objecttype.cpp. References physicalHeight. Referenced by tunitattacksobject::setup(). |
|
|
Definition at line 72 of file objecttype.cpp. References fieldModification, and getWeather(). Referenced by buildable(), and GuiFunctions::ObjectBuildingGui::checkObject(). |
|
|
Implements MapItemType. Definition at line 132 of file objecttype.h. References id. |
|
|
Definition at line 827 of file objecttype.cpp. References cwettertypennum. |
|
|
Implements MapItemType. Definition at line 125 of file objecttype.h. References name. |
|
||||||||||||
|
Definition at line 111 of file objecttype.cpp. References getWeather(). Referenced by Object::getOverviewMapImage(). |
|
||||||||||||
|
returns the pointer to the image i
Definition at line 132 of file objecttype.cpp. References IconRepository::getIcon(), getWeather(), and s2. Referenced by GuiFunctions::ObjectBuildingGui::getImage(). |
|
|
Definition at line 96 of file objecttype.cpp. Referenced by display(), getFieldModification(), getOverviewMapImage(), and getPicture(). |
|
|
|
|
|
if an object should not be attackable, set armor to 0
Definition at line 57 of file objecttype.h. Referenced by read(), runTextIO(), tunitattacksobject::setup(), and write(). |
|
|
The attackbonus_abs replaces the current attackbonus of the field by a new one. A value of -1 won't affect the attackbonus of the field.
Definition at line 82 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
this is added to the current attackbonus of the field to form the new attackbonus.
Definition at line 80 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
basicjamming_abs replaces the current basicjamming of the field by a new one. A value < 0 won't affect the jamming of the field
Definition at line 92 of file objecttype.h. Referenced by trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), read(), runTextIO(), and write(). |
|
|
this is added to the current basicjamming of the field to form the new jamming.
Definition at line 90 of file objecttype.h. Referenced by trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), read(), runTextIO(), and write(). |
|
|
The movement points that are needed to build this object.
Definition at line 114 of file objecttype.h. Referenced by GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::ObjectBuildingGui::getName(), read(), runTextIO(), and write(). |
|
|
The resources required to construct the object with a unit; Note that units usually don't have any energy available.
Definition at line 108 of file objecttype.h. Referenced by trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::ObjectBuildingGui::getName(), read(), runTextIO(), and write(). |
|
|
if a building is constructed on the field containing the object, will the object be removed or will it stay beneath the building.
Definition at line 120 of file objecttype.h. Referenced by ObjectType(), read(), runTextIO(), and write(). |
|
|
the images of the objects
Referenced by getMemoryFootprint(), read(), runTextIO(), and write(). |
|
|
The defensebonus_abs replaces the current defensebonus of the field by a new one. A value of -1 won't affect the attackbonus of the field.
Definition at line 87 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
this is added to the current defensebonus of the field to form the new defensebonus.
Definition at line 85 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
some objects require special displaying methods, for example shading the terrain they are build on
Definition at line 175 of file objecttype.h. Referenced by ObjectType(), PipeLayer::PipeLayer(), read(), runTextIO(), and write(). |
|
|
Referenced by getFieldModification(), PipeLayer::PipeLayer(), read(), runTextIO(), and write(). |
|
|
the group ID allows units to specify whole groups of objects to be buildable / removable without specifying each individual object.
Definition at line 42 of file objecttype.h. Referenced by ObjectType(), read(), runTextIO(), GuiFunctions::ObjectBuildingGui::search(), and write(). |
|
|
is the object growth stopped by units and buildings
Definition at line 184 of file objecttype.h. Referenced by buildable(), ObjectType(), read(), runTextIO(), and write(). |
|
|
the time after which any growth stops. This parameter is passed to all child-objects spawned through growth and should therefor be bigger than lifetime. Use -1 for unlimited Definition at line 191 of file objecttype.h. Referenced by Object::Object(), ObjectType(), read(), runTextIO(), and write(). |
|
|
the probability that an object of this type spawns another object on a neighbouring field
Definition at line 181 of file objecttype.h. Referenced by ObjectType(), read(), runTextIO(), and write(). |
|
|
the id of the object, used when referencing objects in files
Definition at line 35 of file objecttype.h. Referenced by GuiFunctions::ObjectBuildingGui::execute(), getID(), ItemFiltrationSystem::isFiltered(), and GuiFunctions::ObjectBuildingGui::search(). |
|
|
the level of height the object is on. This is not the simple system of 8 levels used for units and building, but one with 255 levels to allow a fine grained specification of the order in which different objects are painted
Definition at line 102 of file objecttype.h. Referenced by compareObjectHeight(), ObjectType(), read(), runTextIO(), and write(). |
|
|
the object is removed when it is lifetime turns old. -1 disables removal
Definition at line 187 of file objecttype.h. Referenced by Object::Object(), ObjectType(), read(), tspfldloaders::readfields(), runTextIO(), and write(). |
|
|
some objects are graphically linked with others on neighbouring fields.
Definition at line 51 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
objects can be graphically linked to terrain, as if the terrain was an object of the same type.
Definition at line 54 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
The name of the object.
Definition at line 123 of file objecttype.h. Referenced by getName(), GuiFunctions::ObjectBuildingGui::getName(), objectComp(), ObjectStorage< T >::print(), read(), runTextIO(), and write(). |
|
|
Definition at line 128 of file objecttype.h. Referenced by ObjectType(), read(), runTextIO(), and write(). |
|
|
Definition at line 67 of file objecttype.cpp. Referenced by runTextIO(). |
|
|
Definition at line 65 of file objecttype.cpp. Referenced by runTextIO(). |
|
|
specifies how the object is going to connect to other things
Definition at line 139 of file objecttype.h. Referenced by calculateobject(), ObjectType(), read(), runTextIO(), and write(). |
|
|
Definition at line 135 of file objecttype.h. Referenced by runTextIO(). |
|
|
the 'real' height of the object, which evaluated for construction and attack. The destinction between imageHeight and physicalHeight was made because of compatibility reasons
Definition at line 105 of file objecttype.h. Referenced by getEffectiveHeight(), ObjectType(), read(), runTextIO(), and write(). |
|
|
The movement points that are needed to remove this object.
Definition at line 117 of file objecttype.h. Referenced by GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::ObjectBuildingGui::getName(), read(), runTextIO(), and write(). |
|
|
The resources required to remove the object with a unit; Note that units usually don't have any energy available.
Definition at line 111 of file objecttype.h. Referenced by trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), GuiFunctions::ObjectBuildingGui::getName(), read(), runTextIO(), and write(). |
|
|
when loading a file and these IDs are encountered, this object will be used.
Definition at line 39 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
Definition at line 143 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
units standing on this object will get a bonus to their view
Definition at line 97 of file objecttype.h. Referenced by trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), ObjectType(), read(), runTextIO(), and write(). |
|
|
units standing on this object will get a bonus to their view
Definition at line 95 of file objecttype.h. Referenced by trunreplay::execnextreplaymove(), GuiFunctions::ObjectBuildingGui::execute(), ObjectType(), read(), runTextIO(), and write(). |
|
|
is the object displayed under fog of war
Definition at line 48 of file objecttype.h. Referenced by read(), runTextIO(), and write(). |
|
|
bitmapped variable containing the different weather types the objects exist for
Definition at line 45 of file objecttype.h. Referenced by ForestCalculation::Smoothing::SmoothIt(). |
1.4.2