Ares
Public Member Functions

SW_SpyPlane Class Reference

#include <src/Misc/SWTypes/SpyPlane.h>

Inheritance diagram for SW_SpyPlane:
NewSWType

List of all members.

Public Member Functions

 SW_SpyPlane ()
virtual ~SW_SpyPlane ()
virtual const char * GetTypeString ()
virtual void LoadFromINI (SWTypeExt::ExtData *pData, SuperWeaponTypeClass *pSW, CCINIClass *pINI)
virtual void Initialize (SWTypeExt::ExtData *pData, SuperWeaponTypeClass *pSW)
virtual bool Launch (SuperClass *pThis, CellStruct *pCoords, byte IsPlayer)
virtual bool HandlesType (int type)

Constructor & Destructor Documentation

SW_SpyPlane::SW_SpyPlane ( ) [inline]
                              : NewSWType()
                        { };
virtual SW_SpyPlane::~SW_SpyPlane ( ) [inline, virtual]
                        { };

Member Function Documentation

virtual const char* SW_SpyPlane::GetTypeString ( ) [inline, virtual]

Reimplemented from NewSWType.

                        { return NULL; }
bool SW_SpyPlane::HandlesType ( int  type) [virtual]

Reimplemented from NewSWType.

{
        return (type == SuperWeaponType::SpyPlane);
}
void SW_SpyPlane::Initialize ( SWTypeExt::ExtData pData,
SuperWeaponTypeClass *  pSW 
) [virtual]

Reimplemented from NewSWType.

{
        // Defaults to Spy Plane values
        pData->SpyPlane_TypeIndex = AircraftTypeClass::FindIndex("SPYP");
        pData->SpyPlane_Count = 1;
        pData->SpyPlane_Mission = mission_AttackAgain;

        pData->SW_RadarEvent = false;

        pData->EVA_Ready = VoxClass::FindIndex("EVA_SpyPlaneReady");
        
        pData->SW_AITargetingType = SuperWeaponAITargetingMode::ParaDrop;
        pData->SW_Cursor = MouseCursor::First[MouseCursorType::SpyPlane];
}
bool SW_SpyPlane::Launch ( SuperClass *  pThis,
CellStruct *  pCoords,
byte  IsPlayer 
) [virtual]

Implements NewSWType.

{
        SuperWeaponTypeClass *pSW = pThis->Type;
        SWTypeExt::ExtData *pData = SWTypeExt::ExtMap.Find(pSW);
        
        if(pThis->IsCharged) {
                // launch all at once
                CellClass *pTarget = MapClass::Instance->GetCellAt(pCoords);
                pThis->Owner->SendSpyPlanes(pData->SpyPlane_TypeIndex.Get(), pData->SpyPlane_Count.Get(),
                        pData->SpyPlane_Mission.Get(), pTarget, NULL);
        }

        return true;
}
void SW_SpyPlane::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->SpyPlane_Count.Read(&exINI, section, "SpyPlane.Count");
        pData->SpyPlane_TypeIndex.Read(&exINI, section, "SpyPlane.Type");
        pData->SpyPlane_Mission.Read(&exINI, section, "SpyPlane.Mission");
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines