diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-19 20:11:47 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-19 20:11:47 +0200 |
commit | 9f784e81f81651bed087902f9f3afee113e56148 (patch) | |
tree | ae89f6dabe2443b39aba292673027d197fc120e6 /src/object/auto/automush.cpp | |
parent | b8027ce9a7f050b95846a668a02f5801331e127f (diff) | |
download | colobot-9f784e81f81651bed087902f9f3afee113e56148.tar.gz colobot-9f784e81f81651bed087902f9f3afee113e56148.tar.bz2 colobot-9f784e81f81651bed087902f9f3afee113e56148.zip |
Switched to new implementation of the rest of math module
- changed structs from D3DVECTOR to Math::Vector
and from D3DMATRIX to Math::Matrix
- changed functions to new Math namespace functions
- moved mainmovie module from graphics to object
- added Get and Set to Math::Matrix
Diffstat (limited to 'src/object/auto/automush.cpp')
-rw-r--r-- | src/object/auto/automush.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index 44272d0..90dc13a 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -79,7 +79,7 @@ void CAutoMush::Init() bool CAutoMush::EventProcess(const Event &event)
{
- D3DVECTOR pos, speed, dir;
+ Math::Vector pos, speed, dir;
Math::Point dim;
float factor, zoom, size, angle;
int i, channel;
@@ -223,7 +223,7 @@ bool CAutoMush::EventProcess(const Event &event) {
m_object->SetAngleX(0, 0.0f);
m_object->SetAngleZ(0, 0.0f);
- m_object->SetZoom(0, D3DVECTOR(1.0f, 1.0f, 1.0f));
+ m_object->SetZoom(0, Math::Vector(1.0f, 1.0f, 1.0f));
}
return true;
@@ -235,7 +235,7 @@ bool CAutoMush::EventProcess(const Event &event) bool CAutoMush::SearchTarget()
{
CObject* pObj;
- D3DVECTOR iPos, oPos;
+ Math::Vector iPos, oPos;
ObjectType type;
float dist;
int i;
@@ -294,7 +294,7 @@ bool CAutoMush::SearchTarget() type != OBJECT_HUMAN ) continue;
oPos = pObj->RetPosition(0);
- dist = Length(oPos, iPos);
+ dist = Math::Distance(oPos, iPos);
if ( dist < 50.0f ) return true;
}
@@ -314,7 +314,7 @@ Error CAutoMush::RetError() bool CAutoMush::Write(char *line)
{
- D3DVECTOR pos;
+ Math::Vector pos;
char name[100];
if ( m_phase == AMP_WAIT ) return false;
@@ -340,7 +340,7 @@ bool CAutoMush::Write(char *line) bool CAutoMush::Read(char *line)
{
- D3DVECTOR pos;
+ Math::Vector pos;
if ( OpInt(line, "aExist", 0) == 0 ) return false;
|