#include <src/Misc/SWTypes/ChronoSphere.h>
List of all members.
Constructor & Destructor Documentation
SW_ChronoSphere::SW_ChronoSphere |
( |
| ) |
[inline] |
virtual SW_ChronoSphere::~SW_ChronoSphere |
( |
| ) |
[inline, virtual] |
Member Function Documentation
virtual const char* SW_ChronoSphere::GetTypeString |
( |
| ) |
[inline, virtual] |
bool SW_ChronoSphere::HandlesType |
( |
int |
type | ) |
[virtual] |
Reimplemented from NewSWType.
{
return (type == SuperWeaponType::ChronoSphere);
}
void SW_ChronoSphere::Initialize |
( |
SWTypeExt::ExtData * |
pData, |
|
|
SuperWeaponTypeClass * |
pSW |
|
) |
| [virtual] |
bool SW_ChronoSphere::Launch |
( |
SuperClass * |
pThis, |
|
|
CellStruct * |
pCoords, |
|
|
byte |
IsPlayer |
|
) |
| [virtual] |
Implements NewSWType.
{
SuperWeaponTypeClass *pSW = pThis->Type;
SWTypeExt::ExtData *pData = SWTypeExt::ExtMap.Find(pSW);
if(pThis->IsCharged) {
CellClass *pTarget = MapClass::Instance->GetCellAt(pCoords);
pThis->ChronoMapCoords = *pCoords;
CoordStruct coords;
pTarget->GetCoords(&coords);
if(pTarget->Flags & cf_Bridge) {
coords.Z += pTarget->BridgeHeight();
}
coords.Z += pData->SW_AnimHeight;
if(pData->SW_Anim.Get()) {
SWTypeExt::CreateChronoAnim(pThis, &coords, pData->SW_Anim);
}
if(IsPlayer) {
int idxWarp = -1;
for(int i=0; i<SuperWeaponTypeClass::Array->Count; ++i) {
SuperWeaponTypeClass* pWarp = SuperWeaponTypeClass::Array->GetItem(i);
if(pWarp->Type == SuperWeaponType::ChronoWarp) {
if(!_strcmpi(pData->SW_PostDependent, pWarp->ID)) {
idxWarp = i;
break;
} else if(idxWarp == -1) {
idxWarp = i;
}
}
}
if(idxWarp == -1) {
Debug::Log("[ChronoSphere::Launch] There is no SuperWeaponType of type ChronoWarp. Aborted.\n");
}
Unsorted::CurrentSWType = idxWarp;
}
}
return true;
}
void SW_ChronoSphere::LoadFromINI |
( |
SWTypeExt::ExtData * |
pData, |
|
|
SuperWeaponTypeClass * |
pSW, |
|
|
CCINIClass * |
pINI |
|
) |
| [virtual] |
Reimplemented from NewSWType.
{
const char * section = pSW->ID;
if(!pINI->GetSection(section)) {
return;
}
INI_EX exINI(pINI);
pData->Chronosphere_KillOrganic.Read(&exINI, section, "Chronosphere.KillOrganic");
pData->Chronosphere_KillTeleporters.Read(&exINI, section, "Chronosphere.KillTeleporters");
pData->Chronosphere_AffectIronCurtain.Read(&exINI, section, "Chronosphere.AffectsIronCurtain");
pData->Chronosphere_AffectUnwarpable.Read(&exINI, section, "Chronosphere.AffectsUnwarpable");
pData->Chronosphere_AffectUndeployable.Read(&exINI, section, "Chronosphere.AffectsUndeployable");
pData->Chronosphere_BlowUnplaceable.Read(&exINI, section, "Chronosphere.BlowUnplaceable");
pData->Chronosphere_ReconsiderBuildings.Read(&exINI, section, "Chronosphere.ReconsiderBuildings");
pData->Chronosphere_BlastSrc.Parse(&exINI, section, "Chronosphere.BlastSrc");
pData->Chronosphere_BlastDest.Parse(&exINI, section, "Chronosphere.BlastDest");
if(!pData->Chronosphere_AffectBuildings) {
pData->SW_AffectsTarget = (pData->SW_AffectsTarget.Get() & ~SuperWeaponTarget::Building);
}
pData->SW_AffectsTarget.Read(&exINI, section, "SW.AffectsTarget");
pData->Chronosphere_AffectBuildings = ((pData->SW_AffectsTarget.Get() & SuperWeaponTarget::Building) != 0);
pData->SW_AffectsTarget = (pData->SW_AffectsTarget.Get() | SuperWeaponTarget::Building);
}
The documentation for this class was generated from the following files: