Make CMotion classes use COldObject
parent
16883fcdc4
commit
2c474d7c06
|
@ -23,6 +23,7 @@
|
|||
#include "app/app.h"
|
||||
|
||||
#include "object/robotmain.h"
|
||||
#include "object/old_object.h"
|
||||
#include "object/level/parserline.h"
|
||||
#include "object/level/parserparam.h"
|
||||
|
||||
|
@ -34,7 +35,7 @@
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotion::CMotion(CObject* object)
|
||||
CMotion::CMotion(COldObject* object)
|
||||
{
|
||||
m_app = CApplication::GetInstancePointer();
|
||||
m_sound = m_app->GetSound();
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
#include "common/event.h"
|
||||
#include "common/global.h"
|
||||
|
||||
#include "object/object.h"
|
||||
|
||||
#include "object/object_type.h"
|
||||
|
||||
namespace Gfx {
|
||||
class CEngine;
|
||||
|
@ -34,12 +33,13 @@ class CParticle;
|
|||
class CTerrain;
|
||||
class CWater;
|
||||
class CCamera;
|
||||
class COldModelManager;
|
||||
}
|
||||
|
||||
class CApplication;
|
||||
class CBrain;
|
||||
class CPhysics;
|
||||
class CObject;
|
||||
class COldObject;
|
||||
class CRobotMain;
|
||||
class CSoundInterface;
|
||||
class CLevelParserLine;
|
||||
|
@ -48,7 +48,7 @@ class CLevelParserLine;
|
|||
class CMotion
|
||||
{
|
||||
public:
|
||||
CMotion(CObject* object);
|
||||
CMotion(COldObject* object);
|
||||
virtual ~CMotion();
|
||||
|
||||
void SetPhysics(CPhysics* physics);
|
||||
|
@ -80,7 +80,7 @@ protected:
|
|||
Gfx::CTerrain* m_terrain;
|
||||
Gfx::CWater* m_water;
|
||||
Gfx::CCamera* m_camera;
|
||||
CObject* m_object;
|
||||
COldObject* m_object;
|
||||
CBrain* m_brain;
|
||||
CPhysics* m_physics;
|
||||
CRobotMain* m_main;
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include "graphics/engine/oldmodelmanager.h"
|
||||
#include "graphics/engine/particle.h"
|
||||
|
||||
#include "object/old_object.h"
|
||||
|
||||
#include "physics/physics.h"
|
||||
|
||||
|
||||
|
@ -38,7 +40,7 @@ const float START_TIME = 1000.0f; // beginning of the relative time
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionAnt::CMotionAnt(CObject* object) : CMotion(object)
|
||||
CMotionAnt::CMotionAnt(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_armMember = START_TIME;
|
||||
m_armTimeAbs = START_TIME;
|
||||
|
|
|
@ -49,7 +49,7 @@ enum MotionAntSpecialAction
|
|||
class CMotionAnt : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionAnt(CObject* object);
|
||||
CMotionAnt(COldObject* object);
|
||||
~CMotionAnt();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "graphics/engine/oldmodelmanager.h"
|
||||
|
||||
#include "object/interface/carrier_object.h"
|
||||
#include "object/old_object.h"
|
||||
|
||||
#include "physics/physics.h"
|
||||
|
||||
|
@ -39,7 +39,7 @@ const float START_TIME = 1000.0f; // beginning of the relative time
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionBee::CMotionBee(CObject* object) : CMotion(object)
|
||||
CMotionBee::CMotionBee(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_armMember = START_TIME;
|
||||
m_armTimeAbs = START_TIME;
|
||||
|
|
|
@ -43,7 +43,7 @@ enum MotionBeeSpecialAction
|
|||
class CMotionBee : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionBee(CObject* object);
|
||||
CMotionBee(COldObject* object);
|
||||
~CMotionBee();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "math/geometry.h"
|
||||
|
||||
#include "object/old_object.h"
|
||||
#include "object/robotmain.h"
|
||||
#include "object/interface/carrier_object.h"
|
||||
|
||||
|
@ -47,7 +48,7 @@ const float START_TIME = 1000.0f; // beginning of the relative time
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionHuman::CMotionHuman(CObject* object) : CMotion(object)
|
||||
CMotionHuman::CMotionHuman(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_partiReactor = -1;
|
||||
m_armMember = START_TIME;
|
||||
|
|
|
@ -61,7 +61,7 @@ enum MotionHumanSpecialAction
|
|||
class CMotionHuman : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionHuman(CObject* object);
|
||||
CMotionHuman(COldObject* object);
|
||||
~CMotionHuman();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -19,15 +19,16 @@
|
|||
|
||||
|
||||
#include "object/motion/motionlevelcontroller.h"
|
||||
#include "physics/physics.h"
|
||||
|
||||
#include "graphics/engine/oldmodelmanager.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "object/old_object.h"
|
||||
|
||||
#include "physics/physics.h"
|
||||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionLevelController::CMotionLevelController(CObject* object) : CMotion(object)
|
||||
CMotionLevelController::CMotionLevelController(COldObject* object) : CMotion(object)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
class CMotionLevelController : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionLevelController(CObject* object);
|
||||
CMotionLevelController(COldObject* object);
|
||||
~CMotionLevelController();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "graphics/engine/oldmodelmanager.h"
|
||||
|
||||
#include "object/old_object.h"
|
||||
|
||||
#include "physics/physics.h"
|
||||
|
||||
|
||||
|
@ -37,7 +39,7 @@ const float START_TIME = 1000.0f; // beginning of the relative time
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionQueen::CMotionQueen(CObject* object) : CMotion(object)
|
||||
CMotionQueen::CMotionQueen(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_armMember = START_TIME;
|
||||
m_armTimeAbs = START_TIME;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
class CMotionQueen : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionQueen(CObject* object);
|
||||
CMotionQueen(COldObject* object);
|
||||
~CMotionQueen();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include "graphics/engine/oldmodelmanager.h"
|
||||
#include "graphics/engine/particle.h"
|
||||
|
||||
#include "object/old_object.h"
|
||||
|
||||
#include "physics/physics.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -38,7 +40,7 @@ const float START_TIME = 1000.0f; // beginning of the relative time
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionSpider::CMotionSpider(CObject* object) : CMotion(object)
|
||||
CMotionSpider::CMotionSpider(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_armMember = START_TIME;
|
||||
m_armTimeAbs = START_TIME;
|
||||
|
|
|
@ -47,7 +47,7 @@ enum MotionSpiderSpecialAction
|
|||
class CMotionSpider : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionSpider(CObject* object);
|
||||
CMotionSpider(COldObject* object);
|
||||
~CMotionSpider();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "graphics/engine/terrain.h"
|
||||
#include "graphics/engine/water.h"
|
||||
|
||||
#include "object/old_object.h"
|
||||
#include "object/robotmain.h"
|
||||
|
||||
|
||||
|
@ -39,7 +40,7 @@
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionToto::CMotionToto(CObject* object) : CMotion(object)
|
||||
CMotionToto::CMotionToto(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_time = 0.0f;
|
||||
m_bDisplayInfo = false;
|
||||
|
|
|
@ -38,7 +38,7 @@ enum MotionTotoAction
|
|||
class CMotionToto : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionToto(CObject* object);
|
||||
CMotionToto(COldObject* object);
|
||||
~CMotionToto();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "object/brain.h"
|
||||
#include "object/object_manager.h"
|
||||
#include "object/old_object.h"
|
||||
#include "object/interface/powered_object.h"
|
||||
#include "object/interface/transportable_object.h"
|
||||
|
||||
|
@ -44,15 +45,13 @@
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionVehicle::CMotionVehicle(CObject* object) : CMotion(object)
|
||||
CMotionVehicle::CMotionVehicle(COldObject* object) : CMotion(object)
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i=0 ; i<4 ; i++ )
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
m_wheelTurn[i] = 0.0f;
|
||||
}
|
||||
for ( i=0 ; i<3 ; i++ )
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
m_flyPaw[i] = 0.0f;
|
||||
}
|
||||
|
@ -944,7 +943,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
powerCell->SetAngle(0, Math::Vector(0.0f, powerCellAngle, 0.0f));
|
||||
dynamic_cast<CTransportableObject*>(powerCell)->SetTransporter(m_object);
|
||||
assert(m_object->Implements(ObjectInterfaceType::Powered));
|
||||
dynamic_cast<CPoweredObject*>(m_object)->SetPower(powerCell);
|
||||
m_object->SetPower(powerCell);
|
||||
}
|
||||
|
||||
pos = m_object->GetPosition();
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
class CMotionVehicle : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionVehicle(CObject* object);
|
||||
CMotionVehicle(COldObject* object);
|
||||
~CMotionVehicle();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "math/geometry.h"
|
||||
|
||||
#include "object/old_object.h"
|
||||
|
||||
#include "physics/physics.h"
|
||||
|
||||
|
||||
|
@ -45,7 +47,7 @@ const int WORM_PART = 7; // number of parts of a worm
|
|||
|
||||
// Object's constructor.
|
||||
|
||||
CMotionWorm::CMotionWorm(CObject* object) : CMotion(object)
|
||||
CMotionWorm::CMotionWorm(COldObject* object) : CMotion(object)
|
||||
{
|
||||
m_timeUp = 18.0f;
|
||||
m_timeDown = 18.0f;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
class CMotionWorm : public CMotion
|
||||
{
|
||||
public:
|
||||
CMotionWorm(CObject* object);
|
||||
CMotionWorm(COldObject* object);
|
||||
~CMotionWorm();
|
||||
|
||||
void DeleteObject(bool bAll=false);
|
||||
|
|
Loading…
Reference in New Issue