Renamed some CAuto and CMotion classes
parent
26619e3f88
commit
ad08d50bea
|
@ -128,23 +128,23 @@ set(BASE_SOURCES
|
||||||
object/auto/autoderrick.cpp
|
object/auto/autoderrick.cpp
|
||||||
object/auto/autodestroyer.cpp
|
object/auto/autodestroyer.cpp
|
||||||
object/auto/autoegg.cpp
|
object/auto/autoegg.cpp
|
||||||
object/auto/autoenergy.cpp
|
object/auto/autopowerplant.cpp
|
||||||
object/auto/autofactory.cpp
|
object/auto/autofactory.cpp
|
||||||
object/auto/autoflag.cpp
|
object/auto/autoflag.cpp
|
||||||
object/auto/autohuston.cpp
|
object/auto/autohouston.cpp
|
||||||
object/auto/autojostle.cpp
|
object/auto/autojostle.cpp
|
||||||
object/auto/autolabo.cpp
|
object/auto/autolabo.cpp
|
||||||
object/auto/automush.cpp
|
object/auto/automush.cpp
|
||||||
object/auto/autonest.cpp
|
object/auto/autonest.cpp
|
||||||
object/auto/autonuclear.cpp
|
object/auto/autonuclearplant.cpp
|
||||||
object/auto/autopara.cpp
|
object/auto/autopowercaptor.cpp
|
||||||
object/auto/autoportico.cpp
|
object/auto/autoportico.cpp
|
||||||
object/auto/autoradar.cpp
|
object/auto/autoradar.cpp
|
||||||
object/auto/autorepair.cpp
|
object/auto/autorepair.cpp
|
||||||
object/auto/autoresearch.cpp
|
object/auto/autoresearch.cpp
|
||||||
object/auto/autoroot.cpp
|
object/auto/autoroot.cpp
|
||||||
object/auto/autosafe.cpp
|
object/auto/autovault.cpp
|
||||||
object/auto/autostation.cpp
|
object/auto/autopowerstation.cpp
|
||||||
object/auto/autotower.cpp
|
object/auto/autotower.cpp
|
||||||
object/brain.cpp
|
object/brain.cpp
|
||||||
object/drive_type.cpp
|
object/drive_type.cpp
|
||||||
|
@ -156,9 +156,9 @@ set(BASE_SOURCES
|
||||||
object/motion/motion.cpp
|
object/motion/motion.cpp
|
||||||
object/motion/motionant.cpp
|
object/motion/motionant.cpp
|
||||||
object/motion/motionbee.cpp
|
object/motion/motionbee.cpp
|
||||||
object/motion/motiondummy.cpp
|
object/motion/motionlevelcontroller.cpp
|
||||||
object/motion/motionhuman.cpp
|
object/motion/motionhuman.cpp
|
||||||
object/motion/motionmother.cpp
|
object/motion/motionqueen.cpp
|
||||||
object/motion/motionspider.cpp
|
object/motion/motionspider.cpp
|
||||||
object/motion/motiontoto.cpp
|
object/motion/motiontoto.cpp
|
||||||
object/motion/motionvehicle.cpp
|
object/motion/motionvehicle.cpp
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "object/object_manager.h"
|
#include "object/object_manager.h"
|
||||||
#include "object/robotmain.h"
|
#include "object/robotmain.h"
|
||||||
|
|
||||||
#include "object/auto/autopara.h"
|
#include "object/auto/autopowercaptor.h"
|
||||||
|
|
||||||
|
|
||||||
// Graphics module namespace
|
// Graphics module namespace
|
||||||
|
@ -110,7 +110,7 @@ bool CLightning::EventFrame(const Event &event)
|
||||||
}
|
}
|
||||||
else if (type == OBJECT_PARA)
|
else if (type == OBJECT_PARA)
|
||||||
{
|
{
|
||||||
CAutoPara* automat = static_cast<CAutoPara*>(obj->GetAuto());
|
CAutoPowerCaptor* automat = static_cast<CAutoPowerCaptor*>(obj->GetAuto());
|
||||||
if (automat != nullptr)
|
if (automat != nullptr)
|
||||||
automat->StartLightning();
|
automat->StartLightning();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/auto/autohuston.h"
|
#include "object/auto/autohouston.h"
|
||||||
|
|
||||||
#include "ui/interface.h"
|
#include "ui/interface.h"
|
||||||
#include "ui/window.h"
|
#include "ui/window.h"
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CAutoHuston::CAutoHuston(CObject* object) : CAuto(object)
|
CAutoHouston::CAutoHouston(CObject* object) : CAuto(object)
|
||||||
{
|
{
|
||||||
Math::Vector pos;
|
Math::Vector pos;
|
||||||
int i;
|
int i;
|
||||||
|
@ -169,14 +169,14 @@ CAutoHuston::CAutoHuston(CObject* object) : CAuto(object)
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CAutoHuston::~CAutoHuston()
|
CAutoHouston::~CAutoHouston()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
// Destroys the object.
|
||||||
|
|
||||||
void CAutoHuston::DeleteObject(bool bAll)
|
void CAutoHouston::DeleteObject(bool bAll)
|
||||||
{
|
{
|
||||||
CAuto::DeleteObject(bAll);
|
CAuto::DeleteObject(bAll);
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ void CAutoHuston::DeleteObject(bool bAll)
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoHuston::Init()
|
void CAutoHouston::Init()
|
||||||
{
|
{
|
||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
|
|
||||||
|
@ -195,14 +195,14 @@ void CAutoHuston::Init()
|
||||||
|
|
||||||
// Start the object.
|
// Start the object.
|
||||||
|
|
||||||
void CAutoHuston::Start(int param)
|
void CAutoHouston::Start(int param)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CAutoHuston::EventProcess(const Event &event)
|
bool CAutoHouston::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
Math::Vector speed;
|
Math::Vector speed;
|
||||||
Math::Point dim;
|
Math::Point dim;
|
||||||
|
@ -251,7 +251,7 @@ bool CAutoHuston::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Stops the controller.
|
// Stops the controller.
|
||||||
|
|
||||||
bool CAutoHuston::Abort()
|
bool CAutoHouston::Abort()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ bool CAutoHuston::Abort()
|
||||||
|
|
||||||
// Creates all the interface when the object is selected.
|
// Creates all the interface when the object is selected.
|
||||||
|
|
||||||
bool CAutoHuston::CreateInterface(bool bSelect)
|
bool CAutoHouston::CreateInterface(bool bSelect)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Math::Point pos, ddim;
|
Math::Point pos, ddim;
|
||||||
|
@ -289,7 +289,7 @@ bool CAutoHuston::CreateInterface(bool bSelect)
|
||||||
|
|
||||||
// Returns an error due to state of the automation.
|
// Returns an error due to state of the automation.
|
||||||
|
|
||||||
Error CAutoHuston::GetError()
|
Error CAutoHouston::GetError()
|
||||||
{
|
{
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// autohuston.h
|
// autohouston.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ struct HustonLens
|
||||||
const int HUSTONMAXLENS = 20;
|
const int HUSTONMAXLENS = 20;
|
||||||
|
|
||||||
|
|
||||||
class CAutoHuston : public CAuto
|
class CAutoHouston : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoHuston(CObject* object);
|
CAutoHouston(CObject* object);
|
||||||
~CAutoHuston();
|
~CAutoHouston();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/auto/autonuclear.h"
|
#include "object/auto/autonuclearplant.h"
|
||||||
|
|
||||||
#include "math/geometry.h"
|
#include "math/geometry.h"
|
||||||
|
|
||||||
|
@ -34,14 +34,14 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
const float NUCLEAR_DELAY = 30.0f; // duration of the generation
|
const float NUCLEARPLANT_DELAY = 30.0f; // duration of the generation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CAutoNuclear::CAutoNuclear(CObject* object) : CAuto(object)
|
CAutoNuclearPlant::CAutoNuclearPlant(CObject* object) : CAuto(object)
|
||||||
{
|
{
|
||||||
m_channelSound = -1;
|
m_channelSound = -1;
|
||||||
Init();
|
Init();
|
||||||
|
@ -49,14 +49,14 @@ CAutoNuclear::CAutoNuclear(CObject* object) : CAuto(object)
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CAutoNuclear::~CAutoNuclear()
|
CAutoNuclearPlant::~CAutoNuclearPlant()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
// Destroys the object.
|
||||||
|
|
||||||
void CAutoNuclear::DeleteObject(bool all)
|
void CAutoNuclearPlant::DeleteObject(bool all)
|
||||||
{
|
{
|
||||||
if ( !all )
|
if ( !all )
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ void CAutoNuclear::DeleteObject(bool all)
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoNuclear::Init()
|
void CAutoNuclearPlant::Init()
|
||||||
{
|
{
|
||||||
Math::Matrix* mat;
|
Math::Matrix* mat;
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ void CAutoNuclear::Init()
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CAutoNuclear::EventProcess(const Event &event)
|
bool CAutoNuclearPlant::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
CObject* cargo;
|
CObject* cargo;
|
||||||
Math::Matrix* mat;
|
Math::Matrix* mat;
|
||||||
|
@ -145,7 +145,7 @@ bool CAutoNuclear::EventProcess(const Event &event)
|
||||||
cargo->SetLock(true); // usable uranium
|
cargo->SetLock(true); // usable uranium
|
||||||
|
|
||||||
SetBusy(true);
|
SetBusy(true);
|
||||||
InitProgressTotal(1.5f+NUCLEAR_DELAY+1.5f);
|
InitProgressTotal(1.5f+NUCLEARPLANT_DELAY+1.5f);
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
|
|
||||||
m_sound->Play(SOUND_OPEN, m_object->GetPosition(0), 1.0f, 1.4f);
|
m_sound->Play(SOUND_OPEN, m_object->GetPosition(0), 1.0f, 1.4f);
|
||||||
|
@ -187,12 +187,12 @@ bool CAutoNuclear::EventProcess(const Event &event)
|
||||||
m_sound->Play(SOUND_CLOSE, m_object->GetPosition(0), 1.0f, 1.0f);
|
m_sound->Play(SOUND_CLOSE, m_object->GetPosition(0), 1.0f, 1.0f);
|
||||||
|
|
||||||
m_channelSound = m_sound->Play(SOUND_NUCLEAR, m_object->GetPosition(0), 1.0f, 0.1f, true);
|
m_channelSound = m_sound->Play(SOUND_NUCLEAR, m_object->GetPosition(0), 1.0f, 0.1f, true);
|
||||||
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, NUCLEAR_DELAY-1.0f, SOPER_CONTINUE);
|
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, NUCLEARPLANT_DELAY-1.0f, SOPER_CONTINUE);
|
||||||
m_sound->AddEnvelope(m_channelSound, 0.0f, 1.0f, 2.0f, SOPER_STOP);
|
m_sound->AddEnvelope(m_channelSound, 0.0f, 1.0f, 2.0f, SOPER_STOP);
|
||||||
|
|
||||||
m_phase = ANUP_GENERATE;
|
m_phase = ANUP_GENERATE;
|
||||||
m_progress = 0.0f;
|
m_progress = 0.0f;
|
||||||
m_speed = 1.0f/NUCLEAR_DELAY;
|
m_speed = 1.0f/NUCLEARPLANT_DELAY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ bool CAutoNuclear::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Creates all the interface when the object is selected.
|
// Creates all the interface when the object is selected.
|
||||||
|
|
||||||
bool CAutoNuclear::CreateInterface(bool bSelect)
|
bool CAutoNuclearPlant::CreateInterface(bool bSelect)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Math::Point pos, ddim;
|
Math::Point pos, ddim;
|
||||||
|
@ -316,7 +316,7 @@ bool CAutoNuclear::CreateInterface(bool bSelect)
|
||||||
|
|
||||||
// Seeking the uranium.
|
// Seeking the uranium.
|
||||||
|
|
||||||
CObject* CAutoNuclear::SearchUranium()
|
CObject* CAutoNuclearPlant::SearchUranium()
|
||||||
{
|
{
|
||||||
CObject* pObj;
|
CObject* pObj;
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ CObject* CAutoNuclear::SearchUranium()
|
||||||
|
|
||||||
// Seeks if a vehicle is too close.
|
// Seeks if a vehicle is too close.
|
||||||
|
|
||||||
bool CAutoNuclear::SearchVehicle()
|
bool CAutoNuclearPlant::SearchVehicle()
|
||||||
{
|
{
|
||||||
for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())
|
for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())
|
||||||
{
|
{
|
||||||
|
@ -379,7 +379,7 @@ bool CAutoNuclear::SearchVehicle()
|
||||||
|
|
||||||
// Creates an object stack.
|
// Creates an object stack.
|
||||||
|
|
||||||
void CAutoNuclear::CreatePower()
|
void CAutoNuclearPlant::CreatePower()
|
||||||
{
|
{
|
||||||
Math::Vector pos = m_object->GetPosition(0);
|
Math::Vector pos = m_object->GetPosition(0);
|
||||||
float angle = m_object->GetAngleY(0);
|
float angle = m_object->GetAngleY(0);
|
||||||
|
@ -395,7 +395,7 @@ void CAutoNuclear::CreatePower()
|
||||||
|
|
||||||
// Returns an error due the state of the automation.
|
// Returns an error due the state of the automation.
|
||||||
|
|
||||||
Error CAutoNuclear::GetError()
|
Error CAutoNuclearPlant::GetError()
|
||||||
{
|
{
|
||||||
CObject* pObj;
|
CObject* pObj;
|
||||||
ObjectType type;
|
ObjectType type;
|
||||||
|
@ -424,7 +424,7 @@ Error CAutoNuclear::GetError()
|
||||||
|
|
||||||
// Saves all parameters of the controller.
|
// Saves all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoNuclear::Write(CLevelParserLine* line)
|
bool CAutoNuclearPlant::Write(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( m_phase == ANUP_STOP ||
|
if ( m_phase == ANUP_STOP ||
|
||||||
m_phase == ANUP_WAIT ) return false;
|
m_phase == ANUP_WAIT ) return false;
|
||||||
|
@ -440,12 +440,12 @@ bool CAutoNuclear::Write(CLevelParserLine* line)
|
||||||
|
|
||||||
// Restores all parameters of the controller.
|
// Restores all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoNuclear::Read(CLevelParserLine* line)
|
bool CAutoNuclearPlant::Read(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
||||||
|
|
||||||
CAuto::Read(line);
|
CAuto::Read(line);
|
||||||
m_phase = static_cast< AutoNuclearPhase >(line->GetParam("aPhase")->AsInt(ANUP_WAIT));
|
m_phase = static_cast< AutoNuclearPlantPhase >(line->GetParam("aPhase")->AsInt(ANUP_WAIT));
|
||||||
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
||||||
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// autonuclear.h
|
// autonuclearplant.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum AutoNuclearPhase
|
enum AutoNuclearPlantPhase
|
||||||
{
|
{
|
||||||
ANUP_STOP = 1,
|
ANUP_STOP = 1,
|
||||||
ANUP_WAIT = 2,
|
ANUP_WAIT = 2,
|
||||||
|
@ -37,11 +37,11 @@ enum AutoNuclearPhase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CAutoNuclear : public CAuto
|
class CAutoNuclearPlant : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoNuclear(CObject* object);
|
CAutoNuclearPlant(CObject* object);
|
||||||
~CAutoNuclear();
|
~CAutoNuclearPlant();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ protected:
|
||||||
void CreatePower();
|
void CreatePower();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AutoNuclearPhase m_phase;
|
AutoNuclearPlantPhase m_phase;
|
||||||
float m_progress;
|
float m_progress;
|
||||||
float m_speed;
|
float m_speed;
|
||||||
float m_timeVirus;
|
float m_timeVirus;
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/auto/autopara.h"
|
#include "object/auto/autopowercaptor.h"
|
||||||
|
|
||||||
|
|
||||||
#include "math/geometry.h"
|
#include "math/geometry.h"
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CAutoPara::CAutoPara(CObject* object) : CAuto(object)
|
CAutoPowerCaptor::CAutoPowerCaptor(CObject* object) : CAuto(object)
|
||||||
{
|
{
|
||||||
m_channelSound = -1;
|
m_channelSound = -1;
|
||||||
Init();
|
Init();
|
||||||
|
@ -46,14 +46,14 @@ CAutoPara::CAutoPara(CObject* object) : CAuto(object)
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CAutoPara::~CAutoPara()
|
CAutoPowerCaptor::~CAutoPowerCaptor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
// Destroys the object.
|
||||||
|
|
||||||
void CAutoPara::DeleteObject(bool bAll)
|
void CAutoPowerCaptor::DeleteObject(bool bAll)
|
||||||
{
|
{
|
||||||
if ( m_channelSound != -1 )
|
if ( m_channelSound != -1 )
|
||||||
{
|
{
|
||||||
|
@ -68,7 +68,7 @@ void CAutoPara::DeleteObject(bool bAll)
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoPara::Init()
|
void CAutoPowerCaptor::Init()
|
||||||
{
|
{
|
||||||
Math::Matrix* mat;
|
Math::Matrix* mat;
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ void CAutoPara::Init()
|
||||||
|
|
||||||
// Reception of lightning.
|
// Reception of lightning.
|
||||||
|
|
||||||
void CAutoPara::StartLightning()
|
void CAutoPowerCaptor::StartLightning()
|
||||||
{
|
{
|
||||||
m_phase = APAP_LIGHTNING;
|
m_phase = APAP_LIGHTNING;
|
||||||
m_progress = 0.0f;
|
m_progress = 0.0f;
|
||||||
|
@ -99,7 +99,7 @@ void CAutoPara::StartLightning()
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CAutoPara::EventProcess(const Event &event)
|
bool CAutoPowerCaptor::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
Math::Vector pos, speed;
|
Math::Vector pos, speed;
|
||||||
Math::Point dim;
|
Math::Point dim;
|
||||||
|
@ -192,7 +192,7 @@ bool CAutoPara::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Creates all the interface when the object is selected.
|
// Creates all the interface when the object is selected.
|
||||||
|
|
||||||
bool CAutoPara::CreateInterface(bool bSelect)
|
bool CAutoPowerCaptor::CreateInterface(bool bSelect)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Math::Point pos, ddim;
|
Math::Point pos, ddim;
|
||||||
|
@ -228,7 +228,7 @@ bool CAutoPara::CreateInterface(bool bSelect)
|
||||||
|
|
||||||
// Returns an error due the state of the automation.
|
// Returns an error due the state of the automation.
|
||||||
|
|
||||||
Error CAutoPara::GetError()
|
Error CAutoPowerCaptor::GetError()
|
||||||
{
|
{
|
||||||
if ( m_object->GetVirusMode() )
|
if ( m_object->GetVirusMode() )
|
||||||
{
|
{
|
||||||
|
@ -240,7 +240,7 @@ Error CAutoPara::GetError()
|
||||||
|
|
||||||
// Load all objects under the lightning rod.
|
// Load all objects under the lightning rod.
|
||||||
|
|
||||||
void CAutoPara::ChargeObject(float rTime)
|
void CAutoPowerCaptor::ChargeObject(float rTime)
|
||||||
{
|
{
|
||||||
Math::Vector sPos = m_object->GetPosition(0);
|
Math::Vector sPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ void CAutoPara::ChargeObject(float rTime)
|
||||||
|
|
||||||
// Saves all parameters of the controller.
|
// Saves all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoPara::Write(CLevelParserLine* line)
|
bool CAutoPowerCaptor::Write(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( m_phase == APAP_WAIT ) return false;
|
if ( m_phase == APAP_WAIT ) return false;
|
||||||
|
|
||||||
|
@ -296,12 +296,12 @@ bool CAutoPara::Write(CLevelParserLine* line)
|
||||||
|
|
||||||
// Restores all parameters of the controller.
|
// Restores all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoPara::Read(CLevelParserLine* line)
|
bool CAutoPowerCaptor::Read(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
||||||
|
|
||||||
CAuto::Read(line);
|
CAuto::Read(line);
|
||||||
m_phase = static_cast< AutoParaPhase >(line->GetParam("aPhase")->AsInt(APAP_WAIT));
|
m_phase = static_cast< AutoPowerCaptorPhase >(line->GetParam("aPhase")->AsInt(APAP_WAIT));
|
||||||
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
||||||
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// autopara.h
|
// autopowercaptor.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum AutoParaPhase
|
enum AutoPowerCaptorPhase
|
||||||
{
|
{
|
||||||
APAP_WAIT = 1,
|
APAP_WAIT = 1,
|
||||||
APAP_LIGHTNING = 2,
|
APAP_LIGHTNING = 2,
|
||||||
|
@ -35,11 +35,11 @@ enum AutoParaPhase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CAutoPara : public CAuto
|
class CAutoPowerCaptor : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoPara(CObject* object);
|
CAutoPowerCaptor(CObject* object);
|
||||||
~CAutoPara();
|
~CAutoPowerCaptor();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ protected:
|
||||||
void ChargeObject(float rTime);
|
void ChargeObject(float rTime);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AutoParaPhase m_phase;
|
AutoPowerCaptorPhase m_phase;
|
||||||
float m_progress;
|
float m_progress;
|
||||||
float m_speed;
|
float m_speed;
|
||||||
float m_timeVirus;
|
float m_timeVirus;
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/auto/autoenergy.h"
|
#include "object/auto/autopowerplant.h"
|
||||||
|
|
||||||
#include "graphics/engine/terrain.h"
|
#include "graphics/engine/terrain.h"
|
||||||
|
|
||||||
|
@ -37,15 +37,15 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
const float ENERGY_POWER = 0.4f; // Necessary energy for a battery
|
const float POWERPLANT_POWER = 0.4f; // Necessary energy for a battery
|
||||||
const float ENERGY_DELAY = 12.0f; // processing time
|
const float POWERPLANT_DELAY = 12.0f; // processing time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CAutoEnergy::CAutoEnergy(CObject* object) : CAuto(object)
|
CAutoPowerPlant::CAutoPowerPlant(CObject* object) : CAuto(object)
|
||||||
{
|
{
|
||||||
m_partiSphere = -1;
|
m_partiSphere = -1;
|
||||||
Init();
|
Init();
|
||||||
|
@ -53,14 +53,14 @@ CAutoEnergy::CAutoEnergy(CObject* object) : CAuto(object)
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CAutoEnergy::~CAutoEnergy()
|
CAutoPowerPlant::~CAutoPowerPlant()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
// Destroys the object.
|
||||||
|
|
||||||
void CAutoEnergy::DeleteObject(bool all)
|
void CAutoPowerPlant::DeleteObject(bool all)
|
||||||
{
|
{
|
||||||
if ( m_partiSphere != -1 )
|
if ( m_partiSphere != -1 )
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ void CAutoEnergy::DeleteObject(bool all)
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoEnergy::Init()
|
void CAutoPowerPlant::Init()
|
||||||
{
|
{
|
||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
m_timeVirus = 0.0f;
|
m_timeVirus = 0.0f;
|
||||||
|
@ -106,7 +106,7 @@ void CAutoEnergy::Init()
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CAutoEnergy::EventProcess(const Event &event)
|
bool CAutoPowerPlant::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
CObject* cargo;
|
CObject* cargo;
|
||||||
Math::Vector pos, ppos, speed;
|
Math::Vector pos, ppos, speed;
|
||||||
|
@ -166,7 +166,7 @@ bool CAutoEnergy::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
if ( cargo->GetType() == OBJECT_METAL )
|
if ( cargo->GetType() == OBJECT_METAL )
|
||||||
{
|
{
|
||||||
if ( big > ENERGY_POWER ) bGO = true;
|
if ( big > POWERPLANT_POWER ) bGO = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ bool CAutoEnergy::EventProcess(const Event &event)
|
||||||
}
|
}
|
||||||
|
|
||||||
SetBusy(true);
|
SetBusy(true);
|
||||||
InitProgressTotal(ENERGY_DELAY);
|
InitProgressTotal(POWERPLANT_DELAY);
|
||||||
CAuto::UpdateInterface();
|
CAuto::UpdateInterface();
|
||||||
|
|
||||||
pos = m_object->GetPosition(0);
|
pos = m_object->GetPosition(0);
|
||||||
|
@ -191,11 +191,11 @@ bool CAutoEnergy::EventProcess(const Event &event)
|
||||||
speed = Math::Vector(0.0f, 0.0f, 0.0f);
|
speed = Math::Vector(0.0f, 0.0f, 0.0f);
|
||||||
dim.x = 3.0f;
|
dim.x = 3.0f;
|
||||||
dim.y = dim.x;
|
dim.y = dim.x;
|
||||||
m_partiSphere = m_particle->CreateParticle(pos, speed, dim, Gfx::PARTISPHERE1, ENERGY_DELAY, 0.0f, 0.0f);
|
m_partiSphere = m_particle->CreateParticle(pos, speed, dim, Gfx::PARTISPHERE1, POWERPLANT_DELAY, 0.0f, 0.0f);
|
||||||
|
|
||||||
m_phase = AENP_CREATE;
|
m_phase = AENP_CREATE;
|
||||||
m_progress = 0.0f;
|
m_progress = 0.0f;
|
||||||
m_speed = 1.0f/ENERGY_DELAY;
|
m_speed = 1.0f/POWERPLANT_DELAY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -249,11 +249,11 @@ bool CAutoEnergy::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
if ( cargo->GetType() == OBJECT_METAL )
|
if ( cargo->GetType() == OBJECT_METAL )
|
||||||
{
|
{
|
||||||
big -= event.rTime/ENERGY_DELAY*ENERGY_POWER;
|
big -= event.rTime/POWERPLANT_DELAY*POWERPLANT_POWER;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
big += event.rTime/ENERGY_DELAY*0.25f;
|
big += event.rTime/POWERPLANT_DELAY*0.25f;
|
||||||
}
|
}
|
||||||
cargo->SetZoom(0, 1.0f-m_progress);
|
cargo->SetZoom(0, 1.0f-m_progress);
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,7 @@ bool CAutoEnergy::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Seeking the metal object.
|
// Seeking the metal object.
|
||||||
|
|
||||||
CObject* CAutoEnergy::SearchMetal()
|
CObject* CAutoPowerPlant::SearchMetal()
|
||||||
{
|
{
|
||||||
CObject* pObj;
|
CObject* pObj;
|
||||||
ObjectType type;
|
ObjectType type;
|
||||||
|
@ -391,7 +391,7 @@ CObject* CAutoEnergy::SearchMetal()
|
||||||
|
|
||||||
// Search if a vehicle is too close.
|
// Search if a vehicle is too close.
|
||||||
|
|
||||||
bool CAutoEnergy::SearchVehicle()
|
bool CAutoPowerPlant::SearchVehicle()
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ bool CAutoEnergy::SearchVehicle()
|
||||||
|
|
||||||
// Create a cell.
|
// Create a cell.
|
||||||
|
|
||||||
void CAutoEnergy::CreatePower()
|
void CAutoPowerPlant::CreatePower()
|
||||||
{
|
{
|
||||||
Math::Vector pos = m_object->GetPosition(0);
|
Math::Vector pos = m_object->GetPosition(0);
|
||||||
float angle = m_object->GetAngleY(0);
|
float angle = m_object->GetAngleY(0);
|
||||||
|
@ -459,7 +459,7 @@ void CAutoEnergy::CreatePower()
|
||||||
|
|
||||||
// Seeking the battery during manufacture.
|
// Seeking the battery during manufacture.
|
||||||
|
|
||||||
CObject* CAutoEnergy::SearchPower()
|
CObject* CAutoPowerPlant::SearchPower()
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ CObject* CAutoEnergy::SearchPower()
|
||||||
|
|
||||||
// Returns an error due the state of the automation.
|
// Returns an error due the state of the automation.
|
||||||
|
|
||||||
Error CAutoEnergy::GetError()
|
Error CAutoPowerPlant::GetError()
|
||||||
{
|
{
|
||||||
CObject* pObj;
|
CObject* pObj;
|
||||||
ObjectType type;
|
ObjectType type;
|
||||||
|
@ -501,7 +501,7 @@ Error CAutoEnergy::GetError()
|
||||||
res = m_terrain->GetResource(m_object->GetPosition(0));
|
res = m_terrain->GetResource(m_object->GetPosition(0));
|
||||||
if ( res != Gfx::TR_POWER ) return ERR_ENERGY_NULL;
|
if ( res != Gfx::TR_POWER ) return ERR_ENERGY_NULL;
|
||||||
|
|
||||||
if ( m_object->GetEnergy() < ENERGY_POWER ) return ERR_ENERGY_LOW;
|
if ( m_object->GetEnergy() < POWERPLANT_POWER ) return ERR_ENERGY_LOW;
|
||||||
|
|
||||||
pObj = m_object->GetPower();
|
pObj = m_object->GetPower();
|
||||||
if ( pObj == 0 ) return ERR_ENERGY_EMPTY;
|
if ( pObj == 0 ) return ERR_ENERGY_EMPTY;
|
||||||
|
@ -518,7 +518,7 @@ Error CAutoEnergy::GetError()
|
||||||
|
|
||||||
// Creates all the interface when the object is selected.
|
// Creates all the interface when the object is selected.
|
||||||
|
|
||||||
bool CAutoEnergy::CreateInterface(bool bSelect)
|
bool CAutoPowerPlant::CreateInterface(bool bSelect)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Math::Point pos, ddim;
|
Math::Point pos, ddim;
|
||||||
|
@ -554,7 +554,7 @@ bool CAutoEnergy::CreateInterface(bool bSelect)
|
||||||
// Updates the state of all buttons on the interface,
|
// Updates the state of all buttons on the interface,
|
||||||
// following the time that elapses ...
|
// following the time that elapses ...
|
||||||
|
|
||||||
void CAutoEnergy::UpdateInterface(float rTime)
|
void CAutoPowerPlant::UpdateInterface(float rTime)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Ui::CGauge* pg;
|
Ui::CGauge* pg;
|
||||||
|
@ -579,7 +579,7 @@ void CAutoEnergy::UpdateInterface(float rTime)
|
||||||
|
|
||||||
// Saves all parameters of the controller.
|
// Saves all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoEnergy::Write(CLevelParserLine* line)
|
bool CAutoPowerPlant::Write(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( m_phase == AENP_STOP ||
|
if ( m_phase == AENP_STOP ||
|
||||||
m_phase == AENP_WAIT ) return false;
|
m_phase == AENP_WAIT ) return false;
|
||||||
|
@ -595,12 +595,12 @@ bool CAutoEnergy::Write(CLevelParserLine* line)
|
||||||
|
|
||||||
// Restores all parameters of the controller.
|
// Restores all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoEnergy::Read(CLevelParserLine* line)
|
bool CAutoPowerPlant::Read(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
||||||
|
|
||||||
CAuto::Read(line);
|
CAuto::Read(line);
|
||||||
m_phase = static_cast< AutoEnergyPhase >(line->GetParam("aPhase")->AsInt(AENP_WAIT));
|
m_phase = static_cast< AutoPowerPlantPhase >(line->GetParam("aPhase")->AsInt(AENP_WAIT));
|
||||||
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
||||||
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// autoenergy.h
|
// autopowerplant.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum AutoEnergyPhase
|
enum AutoPowerPlantPhase
|
||||||
{
|
{
|
||||||
AENP_STOP = 1,
|
AENP_STOP = 1,
|
||||||
AENP_WAIT = 2,
|
AENP_WAIT = 2,
|
||||||
|
@ -37,11 +37,11 @@ enum AutoEnergyPhase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CAutoEnergy : public CAuto
|
class CAutoPowerPlant : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoEnergy(CObject* object);
|
CAutoPowerPlant(CObject* object);
|
||||||
~CAutoEnergy();
|
~CAutoPowerPlant();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ protected:
|
||||||
CObject* SearchPower();
|
CObject* SearchPower();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AutoEnergyPhase m_phase;
|
AutoPowerPlantPhase m_phase;
|
||||||
float m_progress;
|
float m_progress;
|
||||||
float m_speed;
|
float m_speed;
|
||||||
float m_timeVirus;
|
float m_timeVirus;
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/auto/autostation.h"
|
#include "object/auto/autopowerstation.h"
|
||||||
|
|
||||||
#include "graphics/engine/particle.h"
|
#include "graphics/engine/particle.h"
|
||||||
#include "graphics/engine/terrain.h"
|
#include "graphics/engine/terrain.h"
|
||||||
|
@ -36,21 +36,21 @@
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CAutoStation::CAutoStation(CObject* object) : CAuto(object)
|
CAutoPowerStation::CAutoPowerStation(CObject* object) : CAuto(object)
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CAutoStation::~CAutoStation()
|
CAutoPowerStation::~CAutoPowerStation()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
// Destroys the object.
|
||||||
|
|
||||||
void CAutoStation::DeleteObject(bool bAll)
|
void CAutoPowerStation::DeleteObject(bool bAll)
|
||||||
{
|
{
|
||||||
if ( m_soundChannel != -1 )
|
if ( m_soundChannel != -1 )
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ void CAutoStation::DeleteObject(bool bAll)
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoStation::Init()
|
void CAutoPowerStation::Init()
|
||||||
{
|
{
|
||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
m_timeVirus = 0.0f;
|
m_timeVirus = 0.0f;
|
||||||
|
@ -79,7 +79,7 @@ void CAutoStation::Init()
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CAutoStation::EventProcess(const Event &event)
|
bool CAutoPowerStation::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
Math::Matrix* mat;
|
Math::Matrix* mat;
|
||||||
Math::Vector pos, ppos, speed;
|
Math::Vector pos, ppos, speed;
|
||||||
|
@ -239,7 +239,7 @@ bool CAutoStation::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Seeking the vehicle on the station.
|
// Seeking the vehicle on the station.
|
||||||
|
|
||||||
CObject* CAutoStation::SearchVehicle()
|
CObject* CAutoPowerStation::SearchVehicle()
|
||||||
{
|
{
|
||||||
Math::Vector sPos = m_object->GetPosition(0);
|
Math::Vector sPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ CObject* CAutoStation::SearchVehicle()
|
||||||
|
|
||||||
// Returns an error due the state of the automation.
|
// Returns an error due the state of the automation.
|
||||||
|
|
||||||
Error CAutoStation::GetError()
|
Error CAutoPowerStation::GetError()
|
||||||
{
|
{
|
||||||
Gfx::TerrainRes res;
|
Gfx::TerrainRes res;
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ Error CAutoStation::GetError()
|
||||||
|
|
||||||
// Crée toute l'interface lorsque l'objet est sélectionné .
|
// Crée toute l'interface lorsque l'objet est sélectionné .
|
||||||
|
|
||||||
bool CAutoStation::CreateInterface(bool bSelect)
|
bool CAutoPowerStation::CreateInterface(bool bSelect)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Math::Point pos, ddim;
|
Math::Point pos, ddim;
|
||||||
|
@ -339,7 +339,7 @@ bool CAutoStation::CreateInterface(bool bSelect)
|
||||||
// Updates the state of all buttons on the interface,
|
// Updates the state of all buttons on the interface,
|
||||||
// following the time that elapses ...
|
// following the time that elapses ...
|
||||||
|
|
||||||
void CAutoStation::UpdateInterface(float rTime)
|
void CAutoPowerStation::UpdateInterface(float rTime)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Ui::CGauge* pg;
|
Ui::CGauge* pg;
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// autostation.h
|
// autopowerstation.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CAutoStation : public CAuto
|
class CAutoPowerStation : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoStation(CObject* object);
|
CAutoPowerStation(CObject* object);
|
||||||
~CAutoStation();
|
~CAutoPowerStation();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/auto/autosafe.h"
|
#include "object/auto/autovault.h"
|
||||||
|
|
||||||
#include "math/geometry.h"
|
#include "math/geometry.h"
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ const float OPEN_DELAY = 8.0f; // duration of opening
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CAutoSafe::CAutoSafe(CObject* object) : CAuto(object)
|
CAutoVault::CAutoVault(CObject* object) : CAuto(object)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -58,14 +58,14 @@ CAutoSafe::CAutoSafe(CObject* object) : CAuto(object)
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CAutoSafe::~CAutoSafe()
|
CAutoVault::~CAutoVault()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
// Destroys the object.
|
||||||
|
|
||||||
void CAutoSafe::DeleteObject(bool bAll)
|
void CAutoVault::DeleteObject(bool bAll)
|
||||||
{
|
{
|
||||||
CObject* obj = SearchVehicle();
|
CObject* obj = SearchVehicle();
|
||||||
if ( obj != nullptr )
|
if ( obj != nullptr )
|
||||||
|
@ -86,7 +86,7 @@ void CAutoSafe::DeleteObject(bool bAll)
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoSafe::Init()
|
void CAutoVault::Init()
|
||||||
{
|
{
|
||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
m_timeVirus = 0.0f;
|
m_timeVirus = 0.0f;
|
||||||
|
@ -106,7 +106,7 @@ void CAutoSafe::Init()
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CAutoSafe::EventProcess(const Event &event)
|
bool CAutoVault::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
CObject* pObj;
|
CObject* pObj;
|
||||||
Math::Vector pos, speed;
|
Math::Vector pos, speed;
|
||||||
|
@ -308,7 +308,7 @@ bool CAutoSafe::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Creates all the interface when the object is selected.
|
// Creates all the interface when the object is selected.
|
||||||
|
|
||||||
bool CAutoSafe::CreateInterface(bool bSelect)
|
bool CAutoVault::CreateInterface(bool bSelect)
|
||||||
{
|
{
|
||||||
Ui::CWindow* pw;
|
Ui::CWindow* pw;
|
||||||
Math::Point pos, ddim;
|
Math::Point pos, ddim;
|
||||||
|
@ -338,7 +338,7 @@ bool CAutoSafe::CreateInterface(bool bSelect)
|
||||||
|
|
||||||
// Returns an error due the state of the automation.
|
// Returns an error due the state of the automation.
|
||||||
|
|
||||||
Error CAutoSafe::GetError()
|
Error CAutoVault::GetError()
|
||||||
{
|
{
|
||||||
if ( m_object->GetVirusMode() )
|
if ( m_object->GetVirusMode() )
|
||||||
{
|
{
|
||||||
|
@ -350,7 +350,7 @@ Error CAutoSafe::GetError()
|
||||||
|
|
||||||
// Saves all parameters of the controller.
|
// Saves all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoSafe::Write(CLevelParserLine* line)
|
bool CAutoVault::Write(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( m_phase == ASAP_WAIT ) return false;
|
if ( m_phase == ASAP_WAIT ) return false;
|
||||||
|
|
||||||
|
@ -365,12 +365,12 @@ bool CAutoSafe::Write(CLevelParserLine* line)
|
||||||
|
|
||||||
// Restores all parameters of the controller.
|
// Restores all parameters of the controller.
|
||||||
|
|
||||||
bool CAutoSafe::Read(CLevelParserLine* line)
|
bool CAutoVault::Read(CLevelParserLine* line)
|
||||||
{
|
{
|
||||||
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
if ( !line->GetParam("aExist")->AsBool(false) ) return false;
|
||||||
|
|
||||||
CAuto::Read(line);
|
CAuto::Read(line);
|
||||||
m_phase = static_cast< AutoSafePhase >(line->GetParam("aPhase")->AsInt(ASAP_WAIT));
|
m_phase = static_cast< AutoVaultPhase >(line->GetParam("aPhase")->AsInt(ASAP_WAIT));
|
||||||
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
m_progress = line->GetParam("aProgress")->AsFloat(0.0f);
|
||||||
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
m_speed = line->GetParam("aSpeed")->AsFloat(1.0f);
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ bool CAutoSafe::Read(CLevelParserLine* line)
|
||||||
|
|
||||||
// Counts the number of keys
|
// Counts the number of keys
|
||||||
|
|
||||||
int CAutoSafe::CountKeys()
|
int CAutoVault::CountKeys()
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
float cAngle = m_object->GetAngleY(0);
|
float cAngle = m_object->GetAngleY(0);
|
||||||
|
@ -460,7 +460,7 @@ int CAutoSafe::CountKeys()
|
||||||
|
|
||||||
// Blocks all keys.
|
// Blocks all keys.
|
||||||
|
|
||||||
void CAutoSafe::LockKeys()
|
void CAutoVault::LockKeys()
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ void CAutoSafe::LockKeys()
|
||||||
|
|
||||||
// Sent down all the keys.
|
// Sent down all the keys.
|
||||||
|
|
||||||
void CAutoSafe::DownKeys(float progress)
|
void CAutoVault::DownKeys(float progress)
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -509,7 +509,7 @@ void CAutoSafe::DownKeys(float progress)
|
||||||
|
|
||||||
// Delete all the keys.
|
// Delete all the keys.
|
||||||
|
|
||||||
void CAutoSafe::DeleteKeys()
|
void CAutoVault::DeleteKeys()
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
|
|
||||||
|
@ -541,7 +541,7 @@ void CAutoSafe::DeleteKeys()
|
||||||
|
|
||||||
// Seeking a vehicle in the safe.
|
// Seeking a vehicle in the safe.
|
||||||
|
|
||||||
CObject* CAutoSafe::SearchVehicle()
|
CObject* CAutoVault::SearchVehicle()
|
||||||
{
|
{
|
||||||
Math::Vector cPos = m_object->GetPosition(0);
|
Math::Vector cPos = m_object->GetPosition(0);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// autosafe.h
|
// autovault.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum AutoSafePhase
|
enum AutoVaultPhase
|
||||||
{
|
{
|
||||||
ASAP_WAIT = 1,
|
ASAP_WAIT = 1,
|
||||||
ASAP_OPEN = 2,
|
ASAP_OPEN = 2,
|
||||||
|
@ -35,11 +35,11 @@ enum AutoSafePhase
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CAutoSafe : public CAuto
|
class CAutoVault : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoSafe(CObject* object);
|
CAutoVault(CObject* object);
|
||||||
~CAutoSafe();
|
~CAutoVault();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ protected:
|
||||||
CObject* SearchVehicle();
|
CObject* SearchVehicle();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AutoSafePhase m_phase;
|
AutoVaultPhase m_phase;
|
||||||
float m_progress;
|
float m_progress;
|
||||||
float m_speed;
|
float m_speed;
|
||||||
float m_timeVirus;
|
float m_timeVirus;
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/motion/motiondummy.h"
|
#include "object/motion/motionlevelcontroller.h"
|
||||||
#include "physics/physics.h"
|
#include "physics/physics.h"
|
||||||
#include "graphics/engine/oldmodelmanager.h"
|
#include "graphics/engine/oldmodelmanager.h"
|
||||||
|
|
||||||
|
@ -27,27 +27,27 @@
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CMotionDummy::CMotionDummy(CObject* object) : CMotion(object)
|
CMotionLevelController::CMotionLevelController(CObject* object) : CMotion(object)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CMotionDummy::~CMotionDummy()
|
CMotionLevelController::~CMotionLevelController()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Removes an object.
|
// Removes an object.
|
||||||
|
|
||||||
void CMotionDummy::DeleteObject(bool bAll)
|
void CMotionLevelController::DeleteObject(bool bAll)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creates a Dummy traveling any lands on the ground.
|
// Creates a LevelController motion
|
||||||
|
|
||||||
void CMotionDummy::Create(Math::Vector pos, float angle, ObjectType type,
|
void CMotionLevelController::Create(Math::Vector pos, float angle, ObjectType type,
|
||||||
float power, Gfx::COldModelManager*)
|
float power, Gfx::COldModelManager*)
|
||||||
{
|
{
|
||||||
m_object->SetType(type);
|
m_object->SetType(type);
|
|
@ -17,18 +17,18 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// motiondummy.h
|
// motionlevelcontroller.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "object/motion/motion.h"
|
#include "object/motion/motion.h"
|
||||||
|
|
||||||
class CMotionDummy : public CMotion
|
class CMotionLevelController : public CMotion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMotionDummy(CObject* object);
|
CMotionLevelController(CObject* object);
|
||||||
~CMotionDummy();
|
~CMotionLevelController();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
void Create(Math::Vector pos, float angle, ObjectType type, float power, Gfx::COldModelManager* modelManager);
|
void Create(Math::Vector pos, float angle, ObjectType type, float power, Gfx::COldModelManager* modelManager);
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "object/motion/motionmother.h"
|
#include "object/motion/motionqueen.h"
|
||||||
|
|
||||||
#include "app/app.h"
|
#include "app/app.h"
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ const float START_TIME = 1000.0f; // beginning of the relative time
|
||||||
|
|
||||||
// Object's constructor.
|
// Object's constructor.
|
||||||
|
|
||||||
CMotionMother::CMotionMother(CObject* object) : CMotion(object)
|
CMotionQueen::CMotionQueen(CObject* object) : CMotion(object)
|
||||||
{
|
{
|
||||||
m_armMember = START_TIME;
|
m_armMember = START_TIME;
|
||||||
m_armTimeAbs = START_TIME;
|
m_armTimeAbs = START_TIME;
|
||||||
|
@ -53,21 +53,21 @@ CMotionMother::CMotionMother(CObject* object) : CMotion(object)
|
||||||
|
|
||||||
// Object's destructor.
|
// Object's destructor.
|
||||||
|
|
||||||
CMotionMother::~CMotionMother()
|
CMotionQueen::~CMotionQueen()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Removes an object.
|
// Removes an object.
|
||||||
|
|
||||||
void CMotionMother::DeleteObject(bool bAll)
|
void CMotionQueen::DeleteObject(bool bAll)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creates a vehicle traveling any lands on the ground.
|
// Creates a vehicle traveling any lands on the ground.
|
||||||
|
|
||||||
void CMotionMother::Create(Math::Vector pos, float angle, ObjectType type,
|
void CMotionQueen::Create(Math::Vector pos, float angle, ObjectType type,
|
||||||
float power, Gfx::COldModelManager* modelManager)
|
float power, Gfx::COldModelManager* modelManager)
|
||||||
{
|
{
|
||||||
int rank;
|
int rank;
|
||||||
|
@ -255,7 +255,7 @@ void CMotionMother::Create(Math::Vector pos, float angle, ObjectType type,
|
||||||
|
|
||||||
// Creates the physics of the object.
|
// Creates the physics of the object.
|
||||||
|
|
||||||
void CMotionMother::CreatePhysics()
|
void CMotionQueen::CreatePhysics()
|
||||||
{
|
{
|
||||||
Character* character;
|
Character* character;
|
||||||
int i;
|
int i;
|
||||||
|
@ -311,7 +311,7 @@ void CMotionMother::CreatePhysics()
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CMotionMother::EventProcess(const Event &event)
|
bool CMotionQueen::EventProcess(const Event &event)
|
||||||
{
|
{
|
||||||
CMotion::EventProcess(event);
|
CMotion::EventProcess(event);
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ bool CMotionMother::EventProcess(const Event &event)
|
||||||
|
|
||||||
// Management of an event.
|
// Management of an event.
|
||||||
|
|
||||||
bool CMotionMother::EventFrame(const Event &event)
|
bool CMotionQueen::EventFrame(const Event &event)
|
||||||
{
|
{
|
||||||
Math::Vector dir;
|
Math::Vector dir;
|
||||||
float s, a, prog;
|
float s, a, prog;
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see http://gnu.org/licenses
|
* along with this program. If not, see http://gnu.org/licenses
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// motionmother.h
|
// motionqueen.h
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CMotionMother : public CMotion
|
class CMotionQueen : public CMotion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMotionMother(CObject* object);
|
CMotionQueen(CObject* object);
|
||||||
~CMotionMother();
|
~CMotionQueen();
|
||||||
|
|
||||||
void DeleteObject(bool bAll=false);
|
void DeleteObject(bool bAll=false);
|
||||||
void Create(Math::Vector pos, float angle, ObjectType type, float power, Gfx::COldModelManager* modelManager);
|
void Create(Math::Vector pos, float angle, ObjectType type, float power, Gfx::COldModelManager* modelManager);
|
|
@ -33,29 +33,29 @@
|
||||||
#include "object/auto/autoderrick.h"
|
#include "object/auto/autoderrick.h"
|
||||||
#include "object/auto/autodestroyer.h"
|
#include "object/auto/autodestroyer.h"
|
||||||
#include "object/auto/autoegg.h"
|
#include "object/auto/autoegg.h"
|
||||||
#include "object/auto/autoenergy.h"
|
#include "object/auto/autopowerplant.h"
|
||||||
#include "object/auto/autofactory.h"
|
#include "object/auto/autofactory.h"
|
||||||
#include "object/auto/autoflag.h"
|
#include "object/auto/autoflag.h"
|
||||||
#include "object/auto/autohuston.h"
|
#include "object/auto/autohouston.h"
|
||||||
#include "object/auto/autojostle.h"
|
#include "object/auto/autojostle.h"
|
||||||
#include "object/auto/autolabo.h"
|
#include "object/auto/autolabo.h"
|
||||||
#include "object/auto/automush.h"
|
#include "object/auto/automush.h"
|
||||||
#include "object/auto/autonest.h"
|
#include "object/auto/autonest.h"
|
||||||
#include "object/auto/autonuclear.h"
|
#include "object/auto/autonuclearplant.h"
|
||||||
#include "object/auto/autopara.h"
|
#include "object/auto/autopowercaptor.h"
|
||||||
#include "object/auto/autoportico.h"
|
#include "object/auto/autoportico.h"
|
||||||
#include "object/auto/autoradar.h"
|
#include "object/auto/autoradar.h"
|
||||||
#include "object/auto/autorepair.h"
|
#include "object/auto/autorepair.h"
|
||||||
#include "object/auto/autoresearch.h"
|
#include "object/auto/autoresearch.h"
|
||||||
#include "object/auto/autoroot.h"
|
#include "object/auto/autoroot.h"
|
||||||
#include "object/auto/autosafe.h"
|
#include "object/auto/autovault.h"
|
||||||
#include "object/auto/autostation.h"
|
#include "object/auto/autopowerstation.h"
|
||||||
#include "object/auto/autotower.h"
|
#include "object/auto/autotower.h"
|
||||||
#include "object/motion/motionant.h"
|
#include "object/motion/motionant.h"
|
||||||
#include "object/motion/motionbee.h"
|
#include "object/motion/motionbee.h"
|
||||||
#include "object/motion/motiondummy.h"
|
#include "object/motion/motionlevelcontroller.h"
|
||||||
#include "object/motion/motionhuman.h"
|
#include "object/motion/motionhuman.h"
|
||||||
#include "object/motion/motionmother.h"
|
#include "object/motion/motionqueen.h"
|
||||||
#include "object/motion/motionspider.h"
|
#include "object/motion/motionspider.h"
|
||||||
#include "object/motion/motiontoto.h"
|
#include "object/motion/motiontoto.h"
|
||||||
#include "object/motion/motionvehicle.h"
|
#include "object/motion/motionvehicle.h"
|
||||||
|
@ -2627,7 +2627,7 @@ CObjectUPtr CObjectFactory::CreateVehicle(const ObjectCreateParams& params)
|
||||||
}
|
}
|
||||||
else if ( type == OBJECT_CONTROLLER )
|
else if ( type == OBJECT_CONTROLLER )
|
||||||
{
|
{
|
||||||
motion.reset(new CMotionDummy(obj.get())); //dummy object
|
motion.reset(new CMotionLevelController(obj.get())); //dummy object
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2668,7 +2668,7 @@ CObjectUPtr CObjectFactory::CreateInsect(const ObjectCreateParams& params)
|
||||||
std::unique_ptr<CMotion> motion;
|
std::unique_ptr<CMotion> motion;
|
||||||
if ( type == OBJECT_MOTHER )
|
if ( type == OBJECT_MOTHER )
|
||||||
{
|
{
|
||||||
motion.reset(new CMotionMother(obj.get()));
|
motion.reset(new CMotionQueen(obj.get()));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_ANT )
|
if ( type == OBJECT_ANT )
|
||||||
{
|
{
|
||||||
|
@ -2738,7 +2738,7 @@ void CObjectFactory::AddObjectAuto(COldObject* obj)
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_STATION )
|
if ( type == OBJECT_STATION )
|
||||||
{
|
{
|
||||||
objAuto.reset(new CAutoStation(obj));
|
objAuto.reset(new CAutoPowerStation(obj));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_CONVERT )
|
if ( type == OBJECT_CONVERT )
|
||||||
{
|
{
|
||||||
|
@ -2758,7 +2758,7 @@ void CObjectFactory::AddObjectAuto(COldObject* obj)
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_ENERGY )
|
if ( type == OBJECT_ENERGY )
|
||||||
{
|
{
|
||||||
objAuto.reset(new CAutoEnergy(obj));
|
objAuto.reset(new CAutoPowerPlant(obj));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_LABO )
|
if ( type == OBJECT_LABO )
|
||||||
{
|
{
|
||||||
|
@ -2766,19 +2766,19 @@ void CObjectFactory::AddObjectAuto(COldObject* obj)
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_NUCLEAR )
|
if ( type == OBJECT_NUCLEAR )
|
||||||
{
|
{
|
||||||
objAuto.reset(new CAutoNuclear(obj));
|
objAuto.reset(new CAutoNuclearPlant(obj));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_PARA )
|
if ( type == OBJECT_PARA )
|
||||||
{
|
{
|
||||||
objAuto.reset(new CAutoPara(obj));
|
objAuto.reset(new CAutoPowerCaptor(obj));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_SAFE )
|
if ( type == OBJECT_SAFE )
|
||||||
{
|
{
|
||||||
objAuto.reset(new CAutoSafe(obj));
|
objAuto.reset(new CAutoVault(obj));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_HUSTON )
|
if ( type == OBJECT_HUSTON )
|
||||||
{
|
{
|
||||||
objAuto.reset(new CAutoHuston(obj));
|
objAuto.reset(new CAutoHouston(obj));
|
||||||
}
|
}
|
||||||
if ( type == OBJECT_EGG )
|
if ( type == OBJECT_EGG )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue