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/task/taskadvance.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/task/taskadvance.cpp')
-rw-r--r-- | src/object/task/taskadvance.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/object/task/taskadvance.cpp b/src/object/task/taskadvance.cpp index 8387dbe..c7326c4 100644 --- a/src/object/task/taskadvance.cpp +++ b/src/object/task/taskadvance.cpp @@ -22,6 +22,7 @@ #include <d3d.h>
#include "common/struct.h"
+#include "math/geometry.h"
#include "graphics/d3d/d3dengine.h"
#include "math/old/math3d.h"
#include "common/event.h"
@@ -100,7 +101,7 @@ Error CTaskAdvance::Start(float length) Error CTaskAdvance::IsEnded()
{
- D3DVECTOR pos;
+ Math::Vector pos;
float length;
if ( m_engine->RetPause() ) return ERR_CONTINUE;
@@ -117,7 +118,7 @@ Error CTaskAdvance::IsEnded() }
pos = m_object->RetPosition(0);
- length = Length2d(pos, m_startPos);
+ length = Math::DistanceProjected(pos, m_startPos);
if ( length > m_lastDist ) // forward?
{
|