#include <src/Ext/Techno/Body.h>
List of all members.
Constructor & Destructor Documentation
TechnoExt::ExtData::ExtData |
( |
const DWORD |
Canary, |
|
|
TT *const |
OwnerObject |
|
) |
| [inline] |
: Extension<TT>(Canary, OwnerObject),
idxSlot_Wave (0),
idxSlot_Beam (0),
idxSlot_Warp (0),
idxSlot_Parasite(0),
Survivors_Done (0),
Insignia_Image (NULL),
GarrisonedIn (NULL),
EMPSparkleAnim (NULL),
EMPLastMission (mission_None),
ShadowDrawnManually (false),
RadarJam(NULL),
PoweredUnit(NULL)
{
this->CloakSkipTimer.Stop();
};
virtual TechnoExt::ExtData::~ExtData |
( |
| ) |
[inline, virtual] |
Member Function Documentation
unsigned int TechnoExt::ExtData::AlphaFrame |
( |
SHPStruct * |
Image | ) |
|
{
int countFrames = Conversions::Int2Highest(Image->Frames);
DWORD Facing;
this->AttachedToObject->Facing.GetFacing(&Facing);
WORD F = (WORD)Facing;
return (F >> (16 - countFrames));
}
bool TechnoExt::ExtData::DrawVisualFX |
( |
| ) |
|
{
TechnoClass * Object = this->AttachedToObject;
if(Object->VisualCharacter(true, Object->Owner) == VisualType::Normal) {
if(!Object->Disguised) {
return true;
}
}
return false;
}
eAction TechnoExt::ExtData::GetDeactivatedAction |
( |
ObjectClass * |
Hovered = NULL | ) |
const |
{
if(!Hovered) {
return act_None;
}
if(auto tHovered = generic_cast<TechnoClass *>(Hovered)) {
if(this->AttachedToObject->Owner->IsAlliedWith(tHovered)) {
if(tHovered->IsSelectable()) {
return act_Select;
}
}
}
return act_None;
}
UnitTypeClass * TechnoExt::ExtData::GetUnitType |
( |
| ) |
|
virtual void TechnoExt::ExtData::InvalidatePointer |
( |
void * |
ptr | ) |
[inline, virtual] |
bool TechnoExt::ExtData::IsDeactivated |
( |
| ) |
const |
bool TechnoExt::ExtData::IsOperated |
( |
| ) |
|
This function checks if this object can currently be used, in terms of having or needing an operator.
- Returns:
- true if it needs an operator and has one, or if it doesn't need an operator in the first place. false if it needs an operator and doesn't have one.
- Author:
- Renegade
- Date:
- 27.04.10
bool TechnoExt::ExtData::IsPowered |
( |
| ) |
|
This function checks if this object can currently be used, in terms of having or needing a powering structure and that structure's status.
- Returns:
- true if it needs a structure and has an active one, or if it doesn't need a structure in the first place. false if it needs a structure and doesn't have an active one.
- Author:
- Renegade
- Date:
- 27.04.10
{
TechnoTypeClass *TT = this->AttachedToObject->GetTechnoType();
if(TT && TT->PoweredUnit) {
HouseClass* Owner = this->AttachedToObject->Owner;
for(int i = 0; i < Owner->Buildings.Count; ++i) {
BuildingClass* Building = Owner->Buildings.GetItem(i);
if(Building->Type->PowersUnit) {
if(Building->Type->PowersUnit == TT) {
return Building->RegisteredAsPoweredUnitSource && !Building->IsUnderEMP();
}
}
}
return false;
} else if(this->PoweredUnit) {
return this->PoweredUnit->IsPowered();
} else {
return true;
}
}
virtual size_t TechnoExt::ExtData::Size |
( |
| ) |
const [inline, virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: