summaryrefslogtreecommitdiffstats
path: root/src/object/task/taskreset.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-19 20:11:47 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-19 20:11:47 +0200
commit9f784e81f81651bed087902f9f3afee113e56148 (patch)
treeae89f6dabe2443b39aba292673027d197fc120e6 /src/object/task/taskreset.cpp
parentb8027ce9a7f050b95846a668a02f5801331e127f (diff)
downloadcolobot-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/taskreset.cpp')
-rw-r--r--src/object/task/taskreset.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/object/task/taskreset.cpp b/src/object/task/taskreset.cpp
index f44f22a..0d18c6d 100644
--- a/src/object/task/taskreset.cpp
+++ b/src/object/task/taskreset.cpp
@@ -63,7 +63,7 @@ CTaskReset::~CTaskReset()
bool CTaskReset::EventProcess(const Event &event)
{
- D3DVECTOR pos, speed;
+ Math::Vector pos, speed;
Math::Point dim;
float angle, duration;
@@ -175,7 +175,7 @@ bool CTaskReset::EventProcess(const Event &event)
// Assigns the goal was achieved.
// A positive angle makes a turn right.
-Error CTaskReset::Start(D3DVECTOR goal, D3DVECTOR angle)
+Error CTaskReset::Start(Math::Vector goal, Math::Vector angle)
{
CObject* fret;
int i;
@@ -242,7 +242,7 @@ Error CTaskReset::IsEnded()
if ( m_phase == TRSP_ZOUT )
{
- dist = Length(m_begin, m_goal);
+ dist = Math::Distance(m_begin, m_goal);
m_phase = TRSP_MOVE;
m_speed = 1.0f/(dist*RESET_DELAY_MOVE/100.0f);
m_progress = 0.0f;
@@ -283,7 +283,7 @@ Error CTaskReset::IsEnded()
bool CTaskReset::SearchVehicle()
{
CObject* pObj;
- D3DVECTOR oPos;
+ Math::Vector oPos;
ObjectType type;
float oRadius, dist;
int i;
@@ -332,7 +332,7 @@ bool CTaskReset::SearchVehicle()
type != OBJECT_WORM ) continue;
if ( !pObj->GetCrashSphere(0, oPos, oRadius) ) continue;
- dist = Length(oPos, m_goal)-oRadius;
+ dist = Math::Distance(oPos, m_goal)-oRadius;
if ( dist < 5.0f ) return true;
}